/*
 * Shared site header
 * This file is loaded after the legacy and theme stylesheets and is the
 * authoritative header component for both themes and all breakpoints.
 */

body > .site-header {
    --header-bg: #07111f;
    --header-surface: #0d1a29;
    --header-surface-hover: #142437;
    --header-text: #e5edf6;
    --header-text-strong: #f8fafc;
    --header-muted: #9aacc0;
    --header-border: #26384c;
    --header-accent: #67b3d2;
    --header-accent-contrast: #06111d;
    --header-accent-soft: #132b3c;
    --header-focus: rgba(103, 179, 210, 0.32);
    --header-shadow: 0 8px 24px rgba(2, 8, 18, 0.2);
    --header-drawer-bg: #081422;
}

:root[data-theme="light"] body > .site-header {
    --header-bg: #ffffff;
    --header-surface: #f7f9fb;
    --header-surface-hover: #eef3f6;
    --header-text: #33485d;
    --header-text-strong: #14283b;
    --header-muted: #617488;
    --header-border: #d6e0e8;
    --header-accent: #0f5f82;
    --header-accent-contrast: #ffffff;
    --header-accent-soft: #edf5f8;
    --header-focus: rgba(15, 95, 130, 0.2);
    --header-shadow: 0 1px 2px rgba(15, 35, 55, 0.04), 0 8px 24px rgba(15, 35, 55, 0.055);
    --header-drawer-bg: #ffffff;
}

body > .site-header,
body > .site-header *,
body > .site-header *::before,
body > .site-header *::after {
    box-sizing: border-box;
}

body > .site-header {
    position: sticky !important;
    inset: 0 0 auto !important;
    z-index: 1000 !important;
    width: 100% !important;
    min-height: 68px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--header-border) !important;
    border-radius: 0 !important;
    background: var(--header-bg) !important;
    color: var(--header-text) !important;
    box-shadow: var(--header-shadow) !important;
    backdrop-filter: none !important;
}

body > .site-header::before,
body > .site-header::after {
    display: none !important;
    content: none !important;
}

body > .site-header .header-inner {
    width: 100% !important;
    max-width: 1520px !important;
    min-height: 68px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 26px !important;
}

body > .site-header .logo {
    min-width: max-content !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: var(--header-text-strong) !important;
    text-decoration: none !important;
    letter-spacing: -0.035em !important;
}

body > .site-header .logo-wordmark {
    color: inherit !important;
    font-family: var(--font-display, "Sora", sans-serif) !important;
    font-size: 1.06rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

body > .site-header .beta-tag {
    min-width: 34px !important;
    min-height: 20px !important;
    padding: 0 7px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid color-mix(in srgb, var(--header-accent) 38%, var(--header-border)) !important;
    border-radius: 6px !important;
    background: var(--header-accent-soft) !important;
    color: var(--header-accent) !important;
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    line-height: 1 !important;
}

body > .site-header :where(a, button, input):focus-visible {
    outline: 2px solid var(--header-accent) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px var(--header-focus) !important;
}

body > .site-header svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body > .site-header .status-dot {
    width: 8px !important;
    height: 8px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #0f9f78 !important;
    box-shadow: 0 0 0 3px rgba(15, 159, 120, 0.12) !important;
}

body > .site-header .theme-toggle-icon {
    width: 18px !important;
    height: 18px !important;
}

body > .site-header .theme-toggle-icon-sun,
:root[data-theme="light"] body > .site-header .theme-toggle-icon-moon {
    display: block !important;
}

body > .site-header .theme-toggle-icon-moon,
:root[data-theme="light"] body > .site-header .theme-toggle-icon-sun {
    display: none !important;
}

body > .site-header .lang-flag-icon {
    display: block !important;
    width: 21px !important;
    height: 15px !important;
    border-radius: 2px !important;
    object-fit: cover !important;
}

body > .site-header .header-search-suggestions .suggestion-item {
    border-bottom-color: var(--header-border) !important;
    background: transparent !important;
    color: var(--header-text) !important;
}

body > .site-header .header-search-suggestions .suggestion-item:is(:hover, :focus-visible, .is-active) {
    background: var(--header-surface-hover) !important;
    color: var(--header-text-strong) !important;
}

body > .site-header .header-search-suggestions .s-ticker {
    color: var(--header-text-strong) !important;
}

body > .site-header .header-search-suggestions .s-name {
    color: var(--header-muted) !important;
}

@media (min-width: 1240px) {
    body > .site-header .mobile-top-actions,
    body > .site-header .mobile-menu-toggle,
    body > .site-header .nav-mobile-head,
    body > .site-header .nav-mobile-auth,
    body > .site-header .nav-mobile-section-label {
        display: none !important;
    }

    body > .site-header .main-nav {
        position: static !important;
        inset: auto !important;
        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 18px !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow: visible !important;
    }

    body > .site-header .nav-links {
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 2px !important;
        border: 0 !important;
        background: transparent !important;
    }

    body > .site-header .nav-link,
    body > .site-header .nav-link.nav-link-primary {
        position: relative !important;
        min-width: 0 !important;
        min-height: 42px !important;
        padding: 0 10px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
        border: 0 !important;
        border-radius: 8px !important;
        background: transparent !important;
        color: var(--header-text) !important;
        box-shadow: none !important;
        font-size: 0.79rem !important;
        font-weight: 700 !important;
        line-height: 1 !important;
        text-decoration: none !important;
        white-space: nowrap !important;
    }

    body > .site-header .nav-link-icon {
        display: none !important;
    }

    body > .site-header .nav-link::after {
        content: "" !important;
        position: absolute !important;
        right: 10px !important;
        bottom: 2px !important;
        left: 10px !important;
        width: auto !important;
        height: 2px !important;
        border-radius: 2px !important;
        background: var(--header-accent) !important;
        opacity: 0 !important;
        transform: scaleX(0.45) !important;
        transition: opacity 150ms ease, transform 150ms ease !important;
    }

    body > .site-header .nav-link:hover,
    body > .site-header .nav-link:focus-visible {
        background: var(--header-surface-hover) !important;
        color: var(--header-text-strong) !important;
        transform: none !important;
    }

    body > .site-header .nav-link.active,
    body > .site-header .nav-link.nav-link-primary.active {
        background: var(--header-accent-soft) !important;
        color: var(--header-accent) !important;
        box-shadow: none !important;
    }

    body > .site-header .nav-link.active::after {
        opacity: 1 !important;
        transform: scaleX(1) !important;
    }

    body > .site-header .header-action-cluster {
        min-width: 0 !important;
        margin-left: auto !important;
        padding-left: 16px !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        border-left: 1px solid var(--header-border) !important;
    }

    body > .site-header .nav-utils {
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 7px !important;
    }

    body > .site-header .header-stock-search {
        position: relative !important;
        width: clamp(168px, 14vw, 210px) !important;
        min-width: 0 !important;
        margin: 0 !important;
        display: block !important;
    }

    body > .site-header .header-stock-search input {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 40px !important;
        padding: 0 34px 0 36px !important;
        border: 1px solid var(--header-border) !important;
        border-radius: 9px !important;
        background: var(--header-surface) !important;
        color: var(--header-text-strong) !important;
        box-shadow: none !important;
        font-size: 0.78rem !important;
    }

    body > .site-header .header-stock-search input::placeholder {
        color: var(--header-muted) !important;
        opacity: 1 !important;
    }

    body > .site-header .header-search-icon {
        position: absolute !important;
        z-index: 2 !important;
        top: 50% !important;
        left: 12px !important;
        width: 16px !important;
        height: 16px !important;
        color: var(--header-muted) !important;
        transform: translateY(-50%) !important;
        pointer-events: none !important;
    }

    body > .site-header .market-status {
        min-height: 40px !important;
        padding: 0 11px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        border: 1px solid var(--header-border) !important;
        border-radius: 9px !important;
        background: transparent !important;
        color: var(--header-text) !important;
        white-space: nowrap !important;
    }

    body > .site-header .market-status-text {
        color: inherit !important;
        font-size: 0.74rem !important;
        font-weight: 700 !important;
    }

    body > .site-header :where(.nav-theme-group, .nav-lang-group, .lang-switcher, .nav-auth) {
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    body > .site-header :where(.theme-toggle, .lang-switcher a, .nav-auth .nav-btn) {
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
        border: 1px solid var(--header-border) !important;
        border-radius: 9px !important;
        background: transparent !important;
        color: var(--header-text) !important;
        box-shadow: none !important;
        text-decoration: none !important;
    }

    body > .site-header :where(.theme-toggle, .lang-switcher a, .nav-auth .nav-btn):hover {
        border-color: color-mix(in srgb, var(--header-accent) 46%, var(--header-border)) !important;
        background: var(--header-surface-hover) !important;
        color: var(--header-text-strong) !important;
        transform: none !important;
    }

    body > .site-header .theme-toggle-text {
        display: none !important;
    }

    body > .site-header .nav-auth .nav-btn:not(.nav-btn-icon) {
        width: auto !important;
        min-width: 76px !important;
        padding: 0 14px !important;
        border-color: var(--header-accent) !important;
        background: var(--header-accent) !important;
        color: var(--header-accent-contrast) !important;
        font-size: 0.76rem !important;
        font-weight: 800 !important;
    }

    body > .site-header .logout-icon-btn svg {
        width: 18px !important;
        height: 18px !important;
    }

    body > .site-header .header-search-suggestions {
        top: calc(100% + 8px) !important;
        right: 0 !important;
        left: 0 !important;
        border: 1px solid var(--header-border) !important;
        border-radius: 10px !important;
        background: var(--header-bg) !important;
        color: var(--header-text) !important;
        box-shadow: 0 18px 40px rgba(2, 8, 18, 0.18) !important;
        overflow: hidden !important;
    }
}

@media (min-width: 1240px) and (max-width: 1390px) {
    body > .site-header .header-inner {
        gap: 18px !important;
        padding: 0 18px !important;
    }

    body > .site-header .main-nav,
    body > .site-header .header-action-cluster {
        gap: 10px !important;
    }

    body > .site-header .nav-link,
    body > .site-header .nav-link.nav-link-primary {
        padding-right: 8px !important;
        padding-left: 8px !important;
        font-size: 0.75rem !important;
    }

    body > .site-header .header-stock-search {
        width: 166px !important;
    }

    body > .site-header .market-status {
        display: none !important;
    }
}

@media (max-width: 1239px) {
    body.menu-open {
        overflow: hidden !important;
    }

    body > .site-header {
        min-height: 64px !important;
    }

    body > .site-header .header-inner {
        min-height: 64px !important;
        padding: 0 14px !important;
        grid-template-columns: auto minmax(0, 1fr) auto !important;
        gap: 10px !important;
    }

    body > .site-header .logo-wordmark {
        font-size: 1rem !important;
    }

    body > .site-header .mobile-top-actions {
        min-width: 0 !important;
        margin: 0 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 6px !important;
    }

    body > .site-header .mobile-lang-shortcut {
        display: none !important;
    }

    body > .site-header :where(.theme-toggle-mobile, .mobile-auth-shortcut, .mobile-menu-toggle) {
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        margin: 0 !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1px solid var(--header-border) !important;
        border-radius: 9px !important;
        background: transparent !important;
        color: var(--header-text) !important;
        box-shadow: none !important;
        text-decoration: none !important;
    }

    body > .site-header :where(.theme-toggle-mobile, .mobile-auth-shortcut, .mobile-menu-toggle):hover {
        background: var(--header-surface-hover) !important;
        color: var(--header-text-strong) !important;
    }

    body > .site-header .mobile-auth-shortcut {
        display: none !important;
    }

    body > .site-header .mobile-shortcut-icon {
        width: 18px !important;
        height: 18px !important;
    }

    body > .site-header .mobile-menu-toggle {
        position: relative !important;
        flex-direction: column !important;
        gap: 4px !important;
    }

    body > .site-header .mobile-menu-toggle .bar {
        position: static !important;
        width: 18px !important;
        height: 1.5px !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 2px !important;
        background: currentColor !important;
        transform: none !important;
        transition: transform 150ms ease, opacity 150ms ease !important;
    }

    body > .site-header .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: translateY(5.5px) rotate(45deg) !important;
    }

    body > .site-header .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0 !important;
    }

    body > .site-header .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-5.5px) rotate(-45deg) !important;
    }

    body > .site-header .main-nav {
        position: fixed !important;
        z-index: 1102 !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: min(390px, calc(100vw - 22px)) !important;
        max-width: none !important;
        height: 100dvh !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 16px 24px !important;
        display: block !important;
        border: 0 !important;
        border-left: 1px solid var(--header-border) !important;
        border-radius: 0 !important;
        background: var(--header-drawer-bg) !important;
        color: var(--header-text) !important;
        box-shadow: -22px 0 52px rgba(2, 8, 18, 0.24) !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        transform: translateX(104%) !important;
        transition: transform 190ms ease !important;
        overscroll-behavior: contain !important;
    }

    body > .site-header .main-nav.active {
        transform: translateX(0) !important;
    }

    body > .site-header .nav-mobile-head {
        position: sticky !important;
        z-index: 3 !important;
        top: 0 !important;
        min-height: 68px !important;
        margin: 0 -16px !important;
        padding: 0 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        border-bottom: 1px solid var(--header-border) !important;
        background: var(--header-drawer-bg) !important;
    }

    body > .site-header .nav-mobile-title {
        color: var(--header-text-strong) !important;
        font-family: var(--font-display, "Sora", sans-serif) !important;
        font-size: 0.92rem !important;
        font-weight: 800 !important;
        letter-spacing: -0.02em !important;
    }

    body > .site-header .nav-mobile-close {
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1px solid var(--header-border) !important;
        border-radius: 9px !important;
        background: transparent !important;
        color: var(--header-text) !important;
        font-size: 1.45rem !important;
        font-weight: 400 !important;
        line-height: 1 !important;
    }

    body > .site-header .nav-mobile-section-label {
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        color: var(--header-muted) !important;
        font-size: 0.65rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.1em !important;
        line-height: 1.2 !important;
        text-transform: uppercase !important;
    }

    body > .site-header .nav-mobile-auth {
        margin: 0 -16px !important;
        padding: 18px 16px !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
        border-bottom: 1px solid var(--header-border) !important;
        background: var(--header-surface) !important;
    }

    body > .site-header .nav-mobile-auth .nav-mobile-section-label {
        grid-column: 1 / -1 !important;
    }

    body > .site-header .nav-mobile-auth .nav-mobile-auth-btn {
        width: 100% !important;
        min-height: 42px !important;
        padding: 0 12px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1px solid var(--header-accent) !important;
        border-radius: 9px !important;
        background: var(--header-accent) !important;
        color: var(--header-accent-contrast) !important;
        font-size: 0.76rem !important;
        font-weight: 800 !important;
        text-decoration: none !important;
    }

    body > .site-header .nav-links {
        margin: 0 !important;
        padding: 18px 0 !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 5px !important;
        border: 0 !important;
        border-bottom: 1px solid var(--header-border) !important;
        background: transparent !important;
    }

    body > .site-header .nav-links > .nav-mobile-section-label {
        margin: 0 10px 6px !important;
    }

    body > .site-header .nav-links > .nav-mobile-account-label {
        margin-top: 14px !important;
        padding-top: 16px !important;
        border-top: 1px solid var(--header-border) !important;
    }

    body > .site-header .nav-link,
    body > .site-header .nav-link.nav-link-primary {
        position: relative !important;
        width: 100% !important;
        min-height: 48px !important;
        margin: 0 !important;
        padding: 0 12px !important;
        display: grid !important;
        grid-template-columns: 30px minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 10px !important;
        border: 1px solid transparent !important;
        border-radius: 9px !important;
        background: transparent !important;
        color: var(--header-text) !important;
        box-shadow: none !important;
        font-size: 0.88rem !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        text-align: left !important;
        text-decoration: none !important;
    }

    body > .site-header .nav-link::after {
        display: none !important;
        content: none !important;
    }

    body > .site-header .nav-link-icon {
        width: 30px !important;
        height: 30px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1px solid var(--header-border) !important;
        border-radius: 8px !important;
        background: var(--header-surface) !important;
        color: var(--header-muted) !important;
    }

    body > .site-header .nav-link-icon svg {
        width: 17px !important;
        height: 17px !important;
    }

    body > .site-header .nav-link:hover,
    body > .site-header .nav-link:focus-visible {
        border-color: var(--header-border) !important;
        background: var(--header-surface-hover) !important;
        color: var(--header-text-strong) !important;
        transform: none !important;
    }

    body > .site-header .nav-link.active,
    body > .site-header .nav-link.nav-link-primary.active {
        border-color: color-mix(in srgb, var(--header-accent) 35%, var(--header-border)) !important;
        background: var(--header-accent-soft) !important;
        color: var(--header-accent) !important;
        box-shadow: inset 3px 0 0 var(--header-accent) !important;
    }

    body > .site-header .nav-link.active .nav-link-icon {
        border-color: color-mix(in srgb, var(--header-accent) 35%, var(--header-border)) !important;
        background: var(--header-bg) !important;
        color: var(--header-accent) !important;
    }

    body > .site-header .header-action-cluster {
        margin: 0 !important;
        padding: 18px 0 0 !important;
        display: block !important;
        border: 0 !important;
        background: transparent !important;
    }

    body > .site-header .nav-utils {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body > .site-header .header-stock-search {
        position: relative !important;
        grid-column: 1 / -1 !important;
        width: 100% !important;
        margin: 0 !important;
        display: block !important;
    }

    body > .site-header .header-stock-search input {
        width: 100% !important;
        min-height: 44px !important;
        padding: 0 38px 0 40px !important;
        border: 1px solid var(--header-border) !important;
        border-radius: 9px !important;
        background: var(--header-surface) !important;
        color: var(--header-text-strong) !important;
        box-shadow: none !important;
        font-size: 0.9rem !important;
    }

    body > .site-header .header-stock-search input::placeholder {
        color: var(--header-muted) !important;
        opacity: 1 !important;
    }

    body > .site-header .header-search-icon {
        position: absolute !important;
        z-index: 2 !important;
        top: 50% !important;
        left: 14px !important;
        width: 17px !important;
        height: 17px !important;
        color: var(--header-muted) !important;
        transform: translateY(-50%) !important;
        pointer-events: none !important;
    }

    body > .site-header .header-search-suggestions {
        top: calc(100% + 7px) !important;
        right: 0 !important;
        left: 0 !important;
        border: 1px solid var(--header-border) !important;
        border-radius: 10px !important;
        background: var(--header-bg) !important;
        color: var(--header-text) !important;
        box-shadow: 0 18px 40px rgba(2, 8, 18, 0.2) !important;
    }

    body > .site-header .market-status {
        grid-column: 1 / -1 !important;
        min-height: 42px !important;
        padding: 0 12px !important;
        display: flex !important;
        align-items: center !important;
        gap: 9px !important;
        border: 1px solid var(--header-border) !important;
        border-radius: 9px !important;
        background: transparent !important;
        color: var(--header-text) !important;
    }

    body > .site-header .market-status-text {
        color: inherit !important;
        font-size: 0.79rem !important;
        font-weight: 700 !important;
    }

    body > .site-header :where(.nav-theme-group, .nav-lang-group) {
        min-width: 0 !important;
        display: grid !important;
        gap: 7px !important;
    }

    body > .site-header .nav-lang-group .lang-switcher {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body > .site-header :where(.nav-theme-group .theme-toggle, .nav-lang-group .lang-switcher a) {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 44px !important;
        padding: 0 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        border: 1px solid var(--header-border) !important;
        border-radius: 9px !important;
        background: var(--header-surface) !important;
        color: var(--header-text) !important;
        box-shadow: none !important;
        text-decoration: none !important;
    }

    body > .site-header .nav-theme-group .theme-toggle-text {
        display: inline !important;
        color: inherit !important;
        font-size: 0.78rem !important;
        font-weight: 700 !important;
    }

    body > .site-header .nav-auth {
        display: none !important;
    }

    body > .mobile-nav-overlay {
        position: fixed !important;
        z-index: 999 !important;
        inset: 0 !important;
        display: block !important;
        background: rgba(2, 8, 18, 0.54) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: opacity 180ms ease, visibility 180ms ease !important;
        backdrop-filter: blur(2px) !important;
    }

    body > .mobile-nav-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

@media (max-width: 430px) {
    body > .site-header .header-inner {
        padding: 0 10px !important;
        gap: 7px !important;
    }

    body > .site-header .logo {
        gap: 6px !important;
    }

    body > .site-header .logo-wordmark {
        font-size: 0.94rem !important;
    }

    body > .site-header .beta-tag {
        min-width: 30px !important;
        padding: 0 5px !important;
        font-size: 0.56rem !important;
    }

    body > .site-header .mobile-top-actions {
        gap: 5px !important;
    }

    body > .site-header :where(.theme-toggle-mobile, .mobile-auth-shortcut, .mobile-menu-toggle) {
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body > .site-header *,
    body > .mobile-nav-overlay {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
