/* Shared v2 header matching header.png, plus the existing index hero rules.
 * hx- selectors keep these components separate from production styles. */

/*
 * The header's own height, published on `body` so sections outside the hero -
 * and the other v2 pages, which have no hero at all - can offset their
 * anchors by the real header rather than a hard-coded guess.
 *
 * Only the custom properties belong here. The hero's own layout stays on
 * `.hx-root` below: putting `padding-top` or `background` on `body` would
 * indent and repaint every v2 page.
 */
body {
    --hx-header-h: clamp(80px, 5.625vw, 108px);
}

.hx-root {
    --hx-navy: #061c40;
    --hx-navy-deep: #08284f;
    --hx-accent: #f5b23c;
    --hx-accent-hover: #ffd27a;
    --hx-ink: #eef4ff;
    --hx-gutter: 40px;

    /* The subset face first: it holds every glyph the header and hero draw and
       is preloaded, so this text paints correctly on the first frame. Anything
       outside the subset (database-driven menu labels) falls through to the
       full family. */
    font-family: 'Noto Sans SC Hero', 'Noto Sans SC', -apple-system, 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    width: 100%;
    padding-top: var(--hx-header-h);
    background: var(--hx-navy);
    color: #fff;
}

.hx-root *,
.hx-root *::before,
.hx-root *::after {
    box-sizing: border-box;
}

.hx-root a {
    text-decoration: none;
}

/* Shared v2 navigation, measured from header.png (2048 × 108). */
.hx-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    height: var(--hx-header-h);
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 5.66% 0 2.93%;
    background: #1b3685;
    isolation: isolate;
}
.hx-header::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 31%;
    z-index: -1;
    background: linear-gradient(90deg, rgba(27, 54, 133, .35), #1b3685),
        url("/static/upload/admin/20210413/2.jpg") left 45% / cover no-repeat;
}
.hx-header {
    background: #07338d;
}
.hx-header::before {
    background: linear-gradient(90deg, rgba(7, 51, 141, .35), #07338d),
        url("/static/upload/admin/20210413/2.jpg") left 45% / cover no-repeat;
}
.hx-header .hx-nav > li > a {
    font-size: 20px;
    font-weight: 600;
    line-height: 29px;
    letter-spacing: 0;
}
.hx-header *, .hx-drawer * {
    font-family: 'Noto Sans SC Hero', 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
.hx-brand { display: flex; align-items: center; flex: 0 0 auto; margin-right: clamp(30px, 7.32vw, 150px); }
.hx-brand-mark { display: block; width: clamp(210px, 12.7vw, 260px); }
.hx-brand-mark img { display: block; width: 100%; height: auto; }
.hx-nav { display: flex; align-items: center; gap: clamp(18px, 1.17vw, 24px); list-style: none; margin: 0; padding: 0; }
.hx-nav > li { position: relative; height: var(--hx-header-h); display: flex; align-items: center; }
.hx-nav > li > a { display: flex; align-items: center; gap: 7px; color: #fff; white-space: nowrap; font-size: clamp(16px, 1.075vw, 22px); font-weight: 700; line-height: 1.4; }
.hx-nav > li > a:hover, .hx-nav > li > a:focus-visible,
.hx-nav > li:hover > a, .hx-nav > li.is-active > a { color: #f2ce71; }
.hx-caret.glyphicon { font-family: 'Glyphicons Halflings'; font-size: 11px; font-weight: 400; }
.hx-submenu { position: absolute; top: 100%; left: -18px; min-width: 208px; margin: 0; padding: 8px 0; list-style: none; background: #1b3685; border-top: 2px solid #f2ce71; box-shadow: 0 10px 24px #061c4040; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease; }
.hx-nav > li:hover > .hx-submenu, .hx-nav > li:focus-within > .hx-submenu { opacity: 1; visibility: visible; transform: none; }
.hx-submenu a { display: block; padding: 10px 22px; color: #fff; font-size: 15px; line-height: 1.5; white-space: nowrap; }
.hx-submenu a:hover, .hx-submenu a:focus-visible { background: #ffffff14; color: #f2ce71; }
@media (min-width: 768px) {
    /* Pixso desktop menu: 176 x 252px for six items at the 1920px reference. */
    .hx-header > .hx-nav > li > .hx-submenu {
        --hx-dropdown-unit: var(--desktop-unit, calc(100vw / 1920));
        box-sizing: border-box;
        top: calc(50% + 31 * var(--hx-dropdown-unit));
        left: calc(-32 * var(--hx-dropdown-unit));
        width: max-content;
        min-width: calc(176 * var(--hx-dropdown-unit));
        padding: calc(12 * var(--hx-dropdown-unit)) 0 calc(22 * var(--hx-dropdown-unit));
        border: calc(1 * var(--hx-dropdown-unit)) solid #ffefd2;
        background: #4673c6;
        box-shadow: none;
    }
    .v2-fluid .hx-header > .hx-nav > li > .hx-submenu { top: calc(100% + 17 * var(--hx-dropdown-unit)); }
    /* Keep the pointer inside the menu while crossing the gap below its label. */
    .hx-header > .hx-nav > li > .hx-submenu::before { content: ''; position: absolute; bottom: 100%; left: 0; width: 100%; height: calc(17 * var(--hx-dropdown-unit) + 1px); }
    .hx-header .hx-submenu a { padding: calc(5 * var(--hx-dropdown-unit)) calc(31 * var(--hx-dropdown-unit)); font-size: max(12px, calc(18 * var(--hx-dropdown-unit))); font-weight: 500; line-height: 1.444444; letter-spacing: calc(3 * var(--hx-dropdown-unit)); }
    .hx-header .hx-submenu a:hover, .hx-header .hx-submenu a:focus-visible { background: transparent; color: #ffda96; }
}
.hx-header-end { margin-left: auto; display: flex; align-items: center; gap: clamp(24px, 1.85vw, 38px); padding-left: 30px; }
.hx-lang { display: flex; align-items: center; gap: 13px; font-size: clamp(14px, .88vw, 18px); font-weight: 500; white-space: nowrap; }
.hx-lang button { border: 0; border-radius: 0; padding: 0; background: transparent; color: #fff; cursor: pointer; font: inherit; }
.hx-lang button:hover, .hx-lang button.is-active { color: #f2ce71; }
.hx-lang-sep { width: 1px; height: 21px; background: #ffffffa6; }
.hx-actions { display: flex; align-items: center; gap: clamp(15px, 1.46vw, 30px); }
.hx-btn { display: flex; align-items: center; justify-content: center; gap: 7px; height: clamp(46px, 2.735vw, 56px); padding: 0 11px; border: 1px solid #cca03e; border-radius: 6px; background: linear-gradient(180deg, #f2d27a, #b17d13); box-shadow: 0 3px 2px #061c4080; color: #fff; font-size: clamp(15px, 1.025vw, 21px); font-weight: 700; text-shadow: 1px 2px 2px #684b2f; white-space: nowrap; transition: filter .2s ease; }
.hx-btn:hover, .hx-btn:focus-visible { color: #fff; filter: brightness(1.12); }
.hx-ico { display: block; width: 23px; height: 25px; object-fit: contain; flex: 0 0 auto; }
.hx-header a:focus-visible, .hx-header button:focus-visible,
.hx-drawer a:focus-visible, .hx-drawer button:focus-visible { outline: 2px solid #f2ce71; outline-offset: 5px; }
.hx-burger { display: none; width: 44px; height: 44px; margin-left: auto; padding: 0; background: #ffffff14; border: 1px solid #ffffff66; border-radius: 6px; color: #fff; font-size: 22px; cursor: pointer; }
.hx-burger .glyphicon, .hx-drawer-close .glyphicon { font-family: 'Glyphicons Halflings'; }
.hx-drawer { position: fixed; inset: 0 0 0 auto; width: min(88vw, 360px); z-index: 1200; padding: 22px 24px 40px; overflow-y: auto; background: #1b3685; box-shadow: -14px 0 40px #0005; visibility: hidden; transform: translateX(100%); transition: transform .28s ease, visibility .28s; }
/*
 * Opening flips visibility at once. The base rule transitions `visibility`, so
 * on the way in the computed value stayed `hidden` for the length of the
 * animation and the browser refused to focus anything inside - the drawer
 * opened with focus still on the menu button behind it. Closing keeps the
 * transition, which is what it is there for: it holds the panel visible while
 * it slides out.
 */
.hx-drawer.is-open { visibility: visible; transform: none; transition: transform .28s ease; }
.hx-drawer-close { display: block; margin-left: auto; width: 44px; height: 44px; padding: 0; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; }
.hx-drawer .hx-nav { display: block; margin-top: 10px; }
.hx-drawer .hx-nav > li { display: block; height: auto; border-bottom: 1px solid #ffffff20; }
.hx-drawer .hx-nav > li > a { padding: 13px 0; font-size: 16px; }
.hx-drawer .hx-submenu { position: static; opacity: 1; visibility: inherit; transform: none; min-width: 0; padding: 0 0 10px; border: 0; box-shadow: none; }
.hx-drawer .hx-submenu a { padding: 7px 0 7px 14px; font-size: 14px; white-space: normal; }
.hx-drawer .hx-actions { display: grid; gap: 12px; margin-top: 22px; }
.hx-drawer .hx-lang { margin-top: 24px; }
.hx-scrim { position: fixed; inset: 0; z-index: 1100; background: #030c1e99; opacity: 0; visibility: hidden; transition: .28s ease; }
.hx-scrim.is-open { opacity: 1; visibility: visible; }
body.hx-menu-open { overflow: hidden; }

/* ------------------------------------------------------------------ hero */

.hx-hero {
    position: relative;
    width: 100%;
    /*
     * JS updates this ratio from the active image's intrinsic dimensions.
     * Unlike a fixed viewport height, this neither cover-crops the banner nor
     * leaves contain-letterboxing above and below it.
     */
    height: auto;
    aspect-ratio: var(--hx-slide-ratio, 1920 / 750);
    overflow: hidden;
    background: var(--hx-navy-deep);
}

.hx-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 900ms ease;
}

.hx-slide.is-active {
    opacity: 1;
}

.hx-slide > a,
.hx-slide > span {
    display: block;
    width: 100%;
    height: 100%;
}

.hx-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/*
 * The canvas draws a fixed 300px scrim. Here the overlay carries the gradient
 * itself, with the padding making up the difference, so the ranking row stays
 * legible when it wraps to two or more rows at narrower widths.
 */
.hx-hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 34px;
    padding-top: 80px;
    background: linear-gradient(180deg, rgba(4, 20, 48, 0) 0%, rgba(4, 20, 48, .45) 45%, rgba(4, 22, 54, .86) 100%);
}

.hx-controls {
    padding: 0 var(--hx-gutter);
    display: flex;
    align-items: center;
    gap: 26px;
}

.hx-dots {
    display: flex;
    align-items: center;
    gap: 24px;
}

.hx-dot {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .85);
    text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
    transition: color .3s ease;
}

.hx-dot.is-active {
    color: var(--hx-accent);
}

.hx-arrows {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 12px;
}

.hx-arrow {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .7);
    cursor: pointer;
    transition: background .2s ease;
}

.hx-arrow:hover,
.hx-arrow:focus {
    background: rgba(255, 255, 255, .28);
}

.hx-arrow span {
    display: block;
    width: 10px;
    height: 10px;
}

.hx-arrow-prev span {
    border-left: 1.8px solid #fff;
    border-bottom: 1.8px solid #fff;
    transform: translateX(1px) rotate(45deg);
}

.hx-arrow-next span {
    border-right: 1.8px solid #fff;
    border-top: 1.8px solid #fff;
    transform: translateX(-1px) rotate(45deg);
}

/* ----------------------------------------------------------- ranking row */

.hx-stats {
    padding: 0 var(--hx-gutter) 38px;
    display: grid;
    grid-template-columns: 1.45fr 1fr 1fr 1.15fr;
    gap: 34px;
    align-items: start;
}

.hx-stat {
    display: flex;
    gap: 14px;
}

.hx-stat-icon {
    display: block;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.hx-stat-headline {
    display: flex;
    align-items: baseline;
    gap: 16px;
    font-size: 27px;
    font-weight: 900;
    color: var(--hx-accent);
    letter-spacing: .02em;
    line-height: 1.15;
}

.hx-stat-note {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.75;
    color: var(--hx-ink);
    text-wrap: pretty;
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 1800px) {
    .hx-header { gap: 0; padding-right: 3%; }
    .hx-brand { margin-right: 30px; }
}
@media (max-width: 1500px) {
    .hx-root { --hx-gutter: 28px; }
    .hx-header { gap: 0; }
    .hx-brand { margin-right: 24px; }
    .hx-nav { gap: 18px; }
    .hx-header-end { gap: 20px; }
    .hx-actions { gap: 14px; }
    .hx-ico { width: 20px; height: 22px; }
}
@media (max-width: 1400px) {
    .hx-header > .hx-header-end > .hx-actions { display: none; }
    .hx-burger { display: block; margin-left: 0; }
}

@media (max-width: 1280px) {
    .hx-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 34px;
    }
}

@media (max-width: 991px) {
    body {
        --hx-header-h: 72px;
    }


    .hx-header > .hx-nav,
    .hx-header > .hx-header-end {
        display: none;
    }

    .hx-burger {
        display: block;
        margin-left: auto;
    }

    .hx-brand-mark {
        width: 220px;
        height: auto;
    }

    .hx-hero-overlay {
        gap: 22px;
        padding-top: 60px;
    }

    .hx-stat-headline {
        font-size: 22px;
        gap: 10px;
    }

    .hx-stat-note {
        font-size: 13px;
        line-height: 1.6;
    }

    .hx-stat-icon {
        width: 34px;
        height: 34px;
    }
}
@media (max-width: 1199px) {
    .hx-header .hx-nav > li > a {
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .hx-root {
        --hx-gutter: 18px;
    }

    .hx-stats {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        padding-bottom: 24px;
    }

    /* Only the leading ranking survives on a phone; the rest would bury the image. */
    .hx-stat:nth-child(n + 2) {
        display: none;
    }

    .hx-dots {
        gap: 16px;
    }

    .hx-dot {
        font-size: 16px;
    }

    .hx-arrow {
        width: 38px;
        height: 38px;
    }
}

/* ------------------------------------------------- retired page furniture */

/*
 * The right-hand floating widget (`.sign-up-wrap`) lives in the shared
 * production footer include, so it is hidden here rather than removed there —
 * this stylesheet is loaded by v2 pages only. Its three actions now live in
 * the header CTAs; the back-to-top chevron was part of the same stack and
 * goes with it.
 */
.sign-up-wrap {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .hx-drawer, .hx-scrim, .hx-submenu { transition: none; }
}

.hx-header-en .hx-brand { margin-right: 24px; }
.hx-header-en .hx-nav > li > a { font-size: clamp(14px, .88vw, 18px); }
@media (max-width: 1650px) {
    .hx-header-en > .hx-header-end > .hx-actions { display: none; }
    .hx-header-en .hx-burger { display: block; margin-left: 24px; }
}

@media (max-width: 1199px) {
    .hx-header > .hx-nav,
    .hx-header > .hx-header-end { display: none; }
    .hx-header .hx-burger { display: block; margin-left: auto; }
}

/* Shared drawer style at every hamburger breakpoint. */
.hx-mobile-only, .hx-burger-lines { display: none; }
.hx-drawer-top, .hx-drawer-nav, .hx-drawer-bottom { display: contents; }
@media (max-width: 1199px) {
    body { --hx-header-h: 54px; }
    .hx-header { padding: 0 12px; }
    .hx-header .hx-brand { margin-right: 0; }
    .hx-brand-mark { width: 113px; }
    .hx-burger { background: none; border: 0; border-radius: 0; }
    .hx-burger > .glyphicon { display: none; }
    .hx-burger-lines,
    .hx-burger-lines::before,
    .hx-burger-lines::after {
        display: block; width: 16px; height: 1.5px; border-radius: 1px; background: #fff;
    }
    .hx-burger-lines { position: relative; margin: auto; }
    .hx-burger-lines::before,
    .hx-burger-lines::after { content: ""; position: absolute; left: 0; }
    .hx-burger-lines::before { top: -6px; }
    .hx-burger-lines::after { top: 6px; }
}
.hx-drawer {
    display: flex; flex-direction: column; width: min(244.5px, 100vw);
    height: 100vh; height: 100dvh; padding: 0; overflow: hidden;
    background: #fff; color: #0c2049;
}
.hx-drawer .hx-mobile-only { display: block; }
.hx-default-label { display: none; }
.hx-drawer-top {
    display: flex; align-items: center; flex-shrink: 0; height: 54px;
    padding: 0 7px 0 13.5px; border-bottom: .5px solid #c7c7c7;
}
.hx-drawer-brand { flex-shrink: 0; }
.hx-drawer-brand img { display: block; width: 115px; height: auto; }
.hx-drawer-close { position: relative; color: #0c2049; }
.hx-drawer-close .glyphicon { display: none; }
.hx-drawer-close::before,
.hx-drawer-close::after {
    content: ""; position: absolute; left: 13px; top: 21px; width: 18px; height: 1.5px;
    background: currentColor; border-radius: 1px; transform: rotate(45deg);
}
.hx-drawer-close::after { transform: rotate(-45deg); }
.hx-drawer-nav { display: block; min-height: 0; overflow-y: auto; overscroll-behavior: contain; flex: 1; padding: 0 30px; }
.hx-drawer .hx-nav { margin: 0; padding: 0 0 18px; }
.hx-drawer .hx-nav > li { border: 0; }
.hx-drawer .hx-nav > li > a {
    min-height: 44px; padding: 10px 44px 10px 3px; color: #0c2049;
    font-size: 15px; font-weight: 400; line-height: 24px; letter-spacing: 1px; white-space: normal;
}
.hx-drawer .hx-caret { display: none; }
.hx-drawer .hx-submenu-toggle {
    display: flex; align-items: center;
    position: absolute; right: 0; top: 0; width: 44px; height: 44px;
    padding: 0; border: 0; background: none; color: #0c2049; cursor: pointer;
}
.hx-submenu-toggle::before {
    content: ""; display: block; margin: 0 4px 0 auto; width: 8px; height: 8px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg);
}
.hx-submenu-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
.hx-drawer .hx-submenu {
    padding: 7px 0; background: rgba(196, 196, 196, .25); border-radius: 0;
}
.hx-drawer [data-hx-home] > .hx-submenu {
    background: rgba(196, 196, 196, .25) url('../images/menu-building.png') right bottom / 125px 92.5px no-repeat;
}
.hx-drawer .hx-submenu[hidden] { display: none; }
.hx-drawer .hx-submenu a {
    padding: 5.25px 13px; min-height: 28px; color: #0c2049;
    font-size: 12px; font-weight: 400; line-height: 17.5px; letter-spacing: 1.5px;
}
.hx-drawer .hx-nav a:hover,
.hx-drawer .hx-nav a:focus-visible { color: #7a643c; background-color: #0c204908; }
.hx-drawer a:focus-visible,
.hx-drawer button:focus-visible { outline: 2px solid #0c2049; outline-offset: -2px; }
.hx-drawer-bottom {
    display: flex; flex-direction: column; flex-shrink: 0; padding: 10px 14px 24px;
    padding-bottom: max(24px, env(safe-area-inset-bottom)); background: #4673c6;
}
.hx-drawer .hx-lang { order: -1; margin: 0 0 8px; gap: 0; font-size: 12px; }
.hx-drawer .hx-lang button { min-width: 32px; min-height: 44px; }
.hx-drawer .hx-lang button:first-child { min-width: 44px; }
.hx-drawer .hx-lang-sep { height: 12px; }
.hx-drawer .hx-actions { display: flex; gap: 10px; margin: 0; }
.hx-drawer .hx-btn {
    flex: 1; min-width: 0; height: 44px; padding: 0 5px; gap: 6px;
    position: relative; isolation: isolate; border: 0; background: none; box-shadow: none;
    font-size: 12px; border-radius: 2.5px; letter-spacing: 1px;
}
.hx-drawer .hx-btn::before {
    content: ""; position: absolute; inset: 9px 0; z-index: -1; border: .5px solid #cca03e;
    border-radius: 2.5px; background: linear-gradient(180deg, #f2d27a, #b17d13); box-shadow: 0 2px 1px #061c4080;
}
.hx-drawer .hx-ico { width: 12px; height: 13px; }
.hx-drawer .hx-prospectus { display: none; }
.hx-drawer-bottom a:focus-visible,
.hx-drawer-bottom button:focus-visible { outline-color: #fff; }
.hx-drawer:lang(en-us) .hx-nav a { letter-spacing: 0; }

/* All v2 phones share the approved navigation and drawer dimensions. */
@media (max-width: 767px) {
    .hx-drawer .hx-submenu {
        background: rgba(196, 196, 196, .25) url('../images/menu-building.png') right bottom / 125px 92.5px no-repeat;
    }
    .v2-fluid { --hx-header-h: 72px; }
    /* Explicit height resets ResizeObserver's former desktop measurement. */
    .v2-fluid .hx-header { height: 72px; }
    .v2-fluid .hx-brand-mark { width: 151px; }
    .v2-fluid .hx-burger-lines,
    .v2-fluid .hx-burger-lines::before,
    .v2-fluid .hx-burger-lines::after { width: 22px; height: 2px; }
    .v2-fluid .hx-burger-lines::before { top: -8px; }
    .v2-fluid .hx-burger-lines::after { top: 8px; }
    .v2-fluid .hx-drawer-top { height: 72px; }
    .v2-fluid .hx-drawer-brand img { width: 151px; }
}
