/* Header layout: keep the complete brand visible and navigation reachable at every width. */
html body .site-header,
html body .site-header .header-inner {
    overflow: visible !important;
}
html body .site-header .header-inner {
    box-sizing: border-box !important;
    position: relative !important;
    width: min(1680px, calc(100% - 24px)) !important;
    max-width: 100% !important;
    padding: 15px 22px !important;
    gap: 14px !important;
}
html body .site-header .brand {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex: 0 1 auto !important;
    width: auto !important;
    max-width: 100% !important;
    gap: 14px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: visible !important;
    text-align: left !important;
}
html body .site-header .brand-logo-wrap {
    width: 68px !important;
    height: 68px !important;
    flex: 0 0 68px !important;
    border-radius: 18px !important;
}
html body .site-header .brand-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}
html body .site-header .brand-text,
html body .site-header .brand-text h1,
html body .site-header .brand-subtitle {
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
}
html body .site-header .brand-text h1 {
    margin: 0 !important;
    font-size: clamp(26px, 2.15vw, 36px) !important;
    line-height: 1.08 !important;
    letter-spacing: .025em !important;
    white-space: nowrap !important;
}
html body .site-header .brand-subtitle {
    margin-top: 4px !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
    letter-spacing: .16em !important;
    white-space: nowrap !important;
}
html body .site-header .top-nav {
    align-items: center !important;
    gap: 7px !important;
}
html body .site-header .top-nav > a,
html body .site-header .top-nav .nav-more > summary {
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 52px !important;
    padding: 9px 13px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    gap: 6px !important;
}
html body .site-header .nav-more {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    max-width: none !important;
}
html body .site-header .nav-more-menu {
    z-index: 1200 !important;
}
html body .site-header .user-menu {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    max-width: 220px !important;
    z-index: 1250 !important;
}
html body .site-header .user-menu-trigger {
    min-height: 52px !important;
    box-sizing: border-box !important;
}
html body .site-header :is(.top-nav > a, .nav-more > summary, .user-menu-trigger, .mobile-nav-toggle):focus-visible {
    outline: 2px solid #53d6ff !important;
    outline-offset: 3px !important;
}

/* Large desktops: one balanced row for brand, navigation and user account. */
@media (min-width: 1751px) {
    html body .site-header .header-inner {
        display: grid !important;
        grid-template-columns: minmax(315px, auto) minmax(0, 1fr) !important;
        align-items: center !important;
        column-gap: 20px !important;
    }
    html body .site-header .brand {
        grid-column: 1 !important;
        min-width: 0 !important;
    }
    html body .site-header .header-actions {
        grid-column: 2 !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 10px !important;
        min-width: 0 !important;
        width: 100% !important;
    }
    html body .site-header .top-nav {
        position: relative !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: auto !important;
        max-width: 100% !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        overflow: visible !important;
    }
    html body .site-header .mobile-nav-toggle {
        display: none !important;
    }
}

/* Typical desktop/laptop: move the entire navigation below the full logo. */
@media (min-width: 1200px) and (max-width: 1750px) {
    html body .site-header .header-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        grid-template-rows: auto auto !important;
        align-items: center !important;
        gap: 12px 20px !important;
        padding: 13px 22px 15px !important;
    }
    html body .site-header .brand {
        grid-column: 1 !important;
        grid-row: 1 !important;
        justify-self: start !important;
    }
    html body .site-header .header-actions {
        display: contents !important;
    }
    html body .site-header .mobile-nav-toggle {
        display: none !important;
    }
    html body .site-header .user-menu,
    html body .site-header .header-actions > .btn-primary {
        grid-column: 2 !important;
        grid-row: 1 !important;
        justify-self: end !important;
    }
    html body .site-header .top-nav {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 12px 0 0 !important;
        border: 0 !important;
        border-top: 1px solid rgba(35, 185, 255, .18) !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        overflow: visible !important;
    }
    html body .site-header .top-nav .nav-more {
        display: block !important;
        width: auto !important;
        max-width: max-content !important;
        flex: 0 0 auto !important;
    }
    html body .site-header .top-nav .nav-more > summary {
        width: auto !important;
        max-width: max-content !important;
    }
    html body .site-header .nav-more-menu {
        position: absolute !important;
        top: calc(100% + 8px) !important;
        right: 0 !important;
        width: max-content !important;
        min-width: 245px !important;
        max-width: min(360px, calc(100vw - 36px)) !important;
        margin: 0 !important;
        padding: 10px !important;
    }
}

/* Tablets and small screens: compact header with an accessible dropdown navigation. */
@media (max-width: 1199px) {
    html body .site-header .header-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        column-gap: 12px !important;
        padding: 12px 14px !important;
    }
    html body .site-header .brand {
        min-width: 0 !important;
        gap: 10px !important;
    }
    html body .site-header .brand-logo-wrap {
        width: 54px !important;
        height: 54px !important;
        flex-basis: 54px !important;
    }
    html body .site-header .brand-text {
        min-width: 0 !important;
    }
    html body .site-header .brand-text h1 {
        font-size: clamp(20px, 3.1vw, 29px) !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }
    html body .site-header .header-actions {
        display: flex !important;
        position: static !important;
        grid-column: 2 !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 8px !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
    }
    html body .site-header .mobile-nav-toggle {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
        order: 1 !important;
        width: 46px !important;
        height: 46px !important;
        flex: 0 0 46px !important;
    }
    html body .site-header .user-menu,
    html body .site-header .header-actions > .btn-primary {
        order: 2 !important;
    }
    html body .site-header .top-nav {
        box-sizing: border-box !important;
        position: absolute !important;
        top: calc(100% + 8px) !important;
        right: 12px !important;
        left: auto !important;
        display: none !important;
        flex-direction: column !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: min(370px, calc(100vw - 28px)) !important;
        max-width: calc(100vw - 24px) !important;
        max-height: min(75vh, 650px) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        padding: 12px !important;
        gap: 8px !important;
        border-radius: 16px !important;
        border: 1px solid rgba(35, 185, 255, .5) !important;
        background: #061626 !important;
        box-shadow: 0 25px 65px rgba(0, 0, 0, .55) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateY(-5px) !important;
        z-index: 1400 !important;
    }
    html body.mobile-nav-open .site-header .top-nav {
        display: grid !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
    }
    html body .site-header .top-nav > a,
    html body .site-header .top-nav .nav-more,
    html body .site-header .top-nav .nav-more > summary {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    html body .site-header .top-nav > a,
    html body .site-header .top-nav .nav-more > summary {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        min-height: 45px !important;
        padding: 10px 13px !important;
        white-space: normal !important;
        text-align: left !important;
        font-size: 13px !important;
    }
    html body .site-header .nav-more-menu {
        box-sizing: border-box !important;
        position: static !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 7px 0 0 !important;
        padding: 8px !important;
        border-radius: 12px !important;
        clip-path: none !important;
        transform: none !important;
    }
}

@media (max-width: 660px) {
    html body .site-header .header-inner {
        width: calc(100% - 12px) !important;
        padding: 10px !important;
        column-gap: 7px !important;
    }
    html body .site-header .brand-logo-wrap {
        width: 44px !important;
        height: 44px !important;
        flex-basis: 44px !important;
    }
    html body .site-header .brand {
        gap: 7px !important;
    }
    html body .site-header .brand-text h1 {
        font-size: clamp(15px, 4.5vw, 22px) !important;
        letter-spacing: 0 !important;
    }
    html body .site-header .brand-subtitle {
        display: none !important;
    }
    html body .site-header .user-menu,
    html body .site-header .user-menu-trigger {
        max-width: 44px !important;
    }
    html body .site-header .user-menu-trigger {
        width: 44px !important;
        height: 44px !important;
        padding: 4px !important;
        justify-content: center !important;
    }
    html body .site-header .user-trigger-name,
    html body .site-header .user-trigger-caret {
        display: none !important;
    }
    html body .site-header .mobile-nav-toggle {
        width: 44px !important;
        height: 44px !important;
        flex-basis: 44px !important;
    }
    html body .site-header .top-nav {
        right: 6px !important;
        left: 6px !important;
        width: auto !important;
        max-width: none !important;
    }
    html body .site-header .user-dropdown {
        right: 0 !important;
        width: min(280px, calc(100vw - 24px)) !important;
    }
}
