.header {
    display: block;
    background-color: var(--background-color);
    padding-top: 22px;
    padding-bottom: 12px;
    z-index: 100;
    font-size: 20px;
    line-height: 100%;
    font-family: var(--font2);
    overflow-x: clip;
}

.navbar-inner {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
}

.navbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding-bottom: 22px;
}

.socials {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 2;
    margin-top: 4px;
}

.social {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.social:hover .social-inner {
    transform: translateY(-2px);
}

.social-inner {
    width: 22px;
    min-width: 22px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
    transform: translateY(0px);
    will-change: transform;
}

.social-inner-smaller {
    width: 21px;
    min-width: 21px;
}

#instagram,
#linkedin,
#pinterest {
    display: none;
}

.navbar-account-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 26px;
    flex: 2;
}

.account-button-wrapper {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.account-icon-wrapper {
    margin-top: 1px;
    width: 19px;
    min-width: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-buttons-separator {
    width: 1px;
    height: 21px;
    background-color: var(--text-color);
}

.subscribe-button {
    padding: 4px 26px;
    font-family: var(--font2);
    font-size: 20px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin-bottom: 4px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    height: calc(37px * var(--logo-scale));
    width: auto;
}

.navbar-logo-text {
    font-family: var(--font4);
    line-height: 80%;
    letter-spacing: -0.02em;
    font-size: 46px;
}

.navbar-links-outer {
    padding-top: 13px;
    padding-bottom: 13px;
    border-top: 1px solid var(--text-color);
    border-bottom: 1px solid var(--text-color);
    min-height: 50px;
}

.navbar-links-inner {
    display: flex;
    justify-content: center;
}

.nav {
    display: none;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    column-gap: 30px;
    row-gap: 12px;
}

.nav li {
    list-style-type: none;
    display: flex;
    position: relative;
}

.nav-link, .links-label {
    line-height: 100%;
    position: relative;
    white-space: nowrap;
}

.secondary-links .nav-link {
    width: 100%;
    padding: 14px 16px;
    border-bottom: 1px solid var(--text-color);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.secondary-links-inner:last-child {
    border-bottom: none;
}

.links-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.nav li:hover .secondary-links, .nav .secondary-links:focus-within {
    opacity: 1;
    pointer-events: all;
}

.dropdown-arrow-svg {
    width: 8px;
    min-width: 8px;
    height: 5px;
    min-height: 5px;
    margin-left: 7px;
    margin-top: 1px;
}

.secondary-links {
    position: absolute;
    bottom: 0px;
    left: -17px;
    transform: translateY(100%);  
    opacity: 0;
    pointer-events: none;
    transition-duration: 0.15s;
    transition-property: opacity;
    min-width: 168px;
    z-index: 2;
}

.secondary-links-inner {
    margin-top: 13px;
    display: flex;
    flex-direction: column;
    background-color: var(--background-color);
    border: 1px solid var(--text-color);
}

.secondary-links-inner .nav-link:hover {
    color: var(--background-color);
    background-color: var(--text-color);
}

.menu-button-wrapper {
    display: none;
}

.subscribe-button-mobile-wrapper {
    display: none;
}

.desktop-navbar {
    display: block !important;
    opacity: 1 !important;
    height: auto !important;
}

/* Styles for extra large desktop */
@media (min-width: 1920px) { 
    .nav {
        column-gap: calc(3vw * var(--scale));
    }
}

/* Styles for large desktop */
@media (min-width: 1439px) {  
    .header {
        padding-top: calc(1.53vw * var(--scale));
        padding-bottom: calc(0.83vw * var(--scale));
        font-size: calc(1.39vw * var(--scale));
    }
    
    .navbar-top {
        padding-bottom: calc(1.53vw * var(--scale));
    }
    
    .socials {
        gap: calc(1.53vw * var(--scale));
        margin-top: calc(0.28vw * var(--scale));
    }
    
    .social-inner {
        width: calc(1.53vw * var(--scale));
        min-width: calc(1.53vw * var(--scale));
    }
    
    .social-inner-smaller {
        width: calc(1.46vw * var(--scale));
        min-width: calc(1.46vw * var(--scale));
    }
       
    .navbar-account-links {
        gap: calc(1.81vw * var(--scale));
    }
    
    .account-button-wrapper {
        gap: calc(0.42vw * var(--scale));
    }
    
    .account-icon-wrapper {
        margin-top: 1px;
        width: calc(1.32vw * var(--scale));
        min-width: calc(1.32vw * var(--scale));
    }
    
    .account-buttons-separator {
        height: calc(1.46vw * var(--scale));
    }
    
    .subscribe-button {
        padding: calc(0.28vw * var(--scale)) calc(1.81vw * var(--scale));
        font-size: calc(1.39vw * var(--scale));
    }
    
    .logo-wrapper {
        margin-bottom: calc(0.28vw * var(--scale));
    }
    
    .logo-image {
        height: calc(2.57vw * var(--scale) * var(--logo-scale));
    }
    
    .navbar-logo-text {
        font-size: calc(3.19vw * var(--scale));
    }
    
    .navbar-links-outer {
        padding-top: calc(0.9vw * var(--scale));
        padding-bottom: calc(0.9vw * var(--scale));
        min-height: calc(3.47vw * var(--scale));
    }
    
    .nav {
        column-gap: calc(2.08vw * var(--scale));
        row-gap: calc(0.83vw * var(--scale));
    }
    
    .secondary-links .nav-link {
        padding: calc(0.97vw * var(--scale)) calc(1.11vw * var(--scale));

    }
    
    .dropdown-arrow-svg {
        width: calc(0.56vw * var(--scale));
        min-width: calc(0.56vw * var(--scale));
        height: calc(0.35vw * var(--scale));
        min-height: calc(0.35vw * var(--scale));
        margin-left: calc(0.49vw * var(--scale));
        margin-top: 1px;
    }
    
    .secondary-links {
        left: calc(-1.18vw * var(--scale));
        min-width: calc(11.8vw * var(--scale));
    }
    
    .secondary-links-inner {
        margin-top: calc(1.08vw * var(--scale));
    }
}

/* Styles for tablet */
@media (max-width: 991px) { 
    .account-button-text,
    .account-buttons-separator,
    .subscribe-button,
    .socials {
        display: none;
    }

    .header {
        padding-top: 22px;
        padding-bottom: 12px;
        position: relative;
    }

    .navbar-top {
        padding-bottom: 10px;
    }

    .navbar-account-links {
        gap: 16px;
        flex: 1;
    }
    
    .account-icon-wrapper {
        margin-top: 1px;
        width: 28px;
        min-width: 28px;
    }

    .logo-wrapper {
        flex: 2;
        margin-bottom: 0px;
    }

    .navbar-logo-text {
        font-size: 38px;
    }

    .menu-button-wrapper {
        flex: 1;
        display: block;
    }

    .menu-button {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        row-gap: 7px;
        width: 30px;
        height: 30px;
    }

    .menu-line {
        width: 30px;
        height: 2px;
        background-color: var(--text-color);
        pointer-events: none;
        transition: transform 0.3s ease;
    }

    .navbar-links-outer {
        text-align: center;
        position: absolute;
        background-color: var(--background-color);
        height: calc(100dvh);
        transform: translateY(100%);
        left: 0;
        right: 0;
        bottom: 0px;
        display: none;
        opacity: 0;
        flex-direction: column;
        justify-content: center;
        margin-left: 0;
        border-top: none;
        border-bottom: none;
        padding-top: 0px;
        padding-bottom: 0px;
    }

    .navbar-links-inner {
        padding-top: 15vh;
        padding-bottom: 16vh;
        flex-direction: column;
        align-items: center;
        row-gap: 23px;
        overflow-y: auto;
        justify-content: flex-start;
    }

    .nav {
        flex-direction: column;
        row-gap: 23px;
        min-width: 280px;
    }

    .nav-link, .links-label {
        line-height: 120%;
        font-size: 24px;
        width: fit-content;
    }

    .dropdown-arrow-svg {
        width: 10px;
        min-width: 10px;
        height: 6px;
        position: absolute;
        right: -8px;
        transform: translateX(100%);
        margin-top: 2px;
    }

    .secondary-links {
        min-width: 100%;
        position: static;
        transform: unset;
        opacity: 1;
        pointer-events: none;
        transition-duration: 0.15s;
        transition-property: height;
        height: 0px;
        overflow: hidden;
    }

    .secondary-links-inner {
        align-items: center;
        padding-top: 23px;
        margin-top: 25px;
        padding-bottom: 23px;
        border: none;
        row-gap: 14px;
        border-top: 1px solid var(--text-color);
        border-bottom: 1px solid var(--text-color) !important;
        overflow: hidden;
    }

    .nav li {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .secondary-links .nav-link {
        font-size: 20px;
        font-weight: 400;
        line-height: 150%;
        color: var(--text-color);
        padding: 0px;
        border-bottom: none;
        width: fit-content;
    }

    .secondary-links-inner .nav-link:hover {
        color: unset;
        background-color: unset;
    }

    .subscribe-button-mobile-wrapper {
        display: flex;
        min-width: 280px;
        padding-top: 30px;
        border-top: 1px solid var(--text-color);
    }
    
    .subscribe-button-mobile {
        display: block;
        font-size: 22px;
        padding: 5px 30px;
        margin-left: auto;
        margin-right: auto;
    }

    .logo-image {
        height: calc(30px * var(--logo-scale));
    }

    .social:hover .social-inner {
        transform: translateY(-2px);
    }
}

/* Styles for mobile */
@media (max-width: 479px) { 
    .header {
        padding-top: 18px;
    }

    .navbar-top {
        padding-bottom: 6px;
    }

    .navbar-account-links {
        gap: 14px;
    }
    
    .account-icon-wrapper {
        width: 26px;
        min-width: 26px;
    }


    .navbar-logo-text {
        font-size: 32px;
    }

    .menu-button {
        height: 28px;
        width: 28px;
    }

    .menu-line {
        width: 28px;
        height: 2px;
    }

    .nav {
        row-gap: 18px;
        min-width: 58vw;
    }

    .nav-link, .links-label {
        font-size: 22px;
    }

    .secondary-links-inner {
        padding-top: 18px;
        margin-top: 22px;
        padding-bottom: 18px;
        row-gap: 8px;
    }

    .subscribe-button-mobile-wrapper {
        min-width: 58vw;
        padding-top: 32px;
    }
    
    .subscribe-button-mobile {
        font-size: 21px;
    }

    .logo-image {
        height: calc(26px * var(--logo-scale));
    }
}
/* V2 compact desktop header: single-row layout, less blank space */
@media (min-width: 992px) {
    .header {
        padding-top: 10px;
        padding-bottom: 8px;
    }

    .navbar-top {
        flex-wrap: nowrap;
        align-items: center;
        gap: 16px;
        padding-bottom: 10px;
    }

    .socials {
        order: 0;
        flex: 1 1 0;
        min-width: 0;
        margin-top: 0;
        gap: 16px;
    }

    .logo-wrapper {
        order: 0;
        flex: 0 0 auto;
        min-width: 0;
        justify-content: center;
        margin: 0;
        padding: 0;
    }

    .logo {
        width: auto;
    }

    .navbar-logo-text {
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.15;
        letter-spacing: 0;
        font-family: "Inter", "Noto Sans SC", sans-serif;
        font-weight: 700;
        font-size: clamp(34px, 2.4vw, 48px);
    }

    .navbar-account-links {
        order: 0;
        flex: 1 1 0;
        min-width: 0;
        gap: 16px;
        justify-content: flex-end;
    }

    .account-button-wrapper {
        font-size: 16px;
    }

    .subscribe-button {
        font-size: 16px;
        padding: 6px 18px;
    }
}

@media (min-width: 992px) and (max-width: 1200px) {
    .navbar-logo-text {
        font-size: clamp(30px, 2.8vw, 40px);
    }
}

/* V5 high-contrast finance terminal header */
.header-tech {
    position: sticky;
    top: 0;
    z-index: 220;
    background: linear-gradient(180deg, #eef3f9 0%, #f5f8fc 100%);
    border-bottom: 1px solid #cfd9e6;
    box-shadow: 0 12px 30px rgb(15 23 42 / 0.08);
    font-family: "Inter", "Noto Sans SC", sans-serif;
}

.header-tech::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(transparent 95%, rgb(15 23 42 / 0.04) 100%);
    background-size: 100% 22px;
    opacity: 0.35;
}

.header-tech .navbar-inner {
    position: relative;
}

.header-tech .tech-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 34px;
    padding: 0 12px;
    margin-top: 4px;
    border-radius: 8px;
    background: linear-gradient(90deg, #0b1d3a 0%, #143263 55%, #1d4fa4 100%);
    color: #ebf2ff;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.header-tech .tech-status-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.header-tech .tech-kicker {
    font-weight: 800;
    letter-spacing: 0.08em;
}

.header-tech .tech-dot-divider {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.5);
}

.header-tech .tech-mini-link {
    font-weight: 700;
    color: rgb(235 242 255 / 0.9);
}

.header-tech .tech-status-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.header-tech .tech-utc-label {
    opacity: 0.8;
    font-weight: 700;
}

.header-tech .tech-utc-clock {
    font-family: "JetBrains Mono", "Consolas", monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.header-tech .tech-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgb(255 255 255 / 0.28);
    background: rgb(52 211 153 / 0.2);
    font-weight: 800;
}

.header-tech .tech-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22d3ee;
    box-shadow: 0 0 0 4px rgb(34 211 238 / 0.2);
}

.header-tech .navbar-top {
    margin-top: 8px;
    padding-bottom: 8px;
}

.header-tech .socials {
    gap: 8px;
}

.header-tech .social-inner {
    width: 33px;
    min-width: 33px;
    height: 33px;
    border: 1px solid #cad5e4;
    border-radius: 6px;
    background: #fff;
    color: #122a4d;
}

.header-tech .logo-wrapper {
    flex-direction: column;
    gap: 5px;
    margin-bottom: 0;
}

.header-tech .navbar-logo-text {
    font-family: "Inter", "Noto Sans SC", sans-serif;
    font-size: clamp(40px, 2.9vw, 54px);
    font-weight: 850;
    letter-spacing: 0.01em;
    line-height: 0.92;
    color: #0f2d5c;
}

.header-tech .logo-subtitle {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #475569;
    text-transform: uppercase;
    white-space: nowrap;
}

.header-tech .navbar-account-links {
    gap: 8px;
}

.header-tech .account-buttons-separator {
    height: 16px;
    background: #b5c3d6;
}

.header-tech .account-button-wrapper {
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid #c9d5e4;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    font-weight: 650;
}

.header-tech .subscribe-button {
    padding: 8px 14px;
    border-radius: 8px;
    font-family: "Inter", "Noto Sans SC", sans-serif;
    font-size: 15px;
    font-weight: 760;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.header-tech .tech-metrics-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 8px;
    padding: 6px 8px;
    border: 1px solid #d1daea;
    border-radius: 8px;
    background: linear-gradient(90deg, #f8fbff 0%, #f2f6fd 100%);
}

.header-tech .tech-metric-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 24px;
    padding: 0 8px;
    border: 1px solid #d4ddec;
    border-radius: 6px;
    background: #fff;
    font-family: "JetBrains Mono", "Consolas", monospace;
}

.header-tech .tech-metric-item strong {
    font-size: 10px;
    color: #64748b;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.header-tech .tech-metric-item em {
    font-size: 10px;
    color: #0f2d5c;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-style: normal;
    font-weight: 800;
}

.header-tech .navbar-links-outer {
    border-top: 1px solid #d4deeb;
    border-bottom: 1px solid #d4deeb;
    background: #fdfefe;
}

.header-tech .nav {
    column-gap: 24px;
}

.header-tech .nav-link,
.header-tech .links-label {
    font-family: "Inter", "Noto Sans SC", sans-serif;
    font-size: 16px;
    font-weight: 760;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #22324b;
    padding: 6px 2px;
}

.header-tech .nav li.nav-current > .nav-link,
.header-tech .nav li.nav-current > .links-label {
    color: #1450b7;
}

.header-tech .nav-link::after,
.header-tech .links-label::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -7px;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, #1f6feb, #0ea5e9);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.header-tech .nav li:hover > .nav-link::after,
.header-tech .nav li:hover > .links-label::after,
.header-tech .nav li.nav-current > .nav-link::after,
.header-tech .nav li.nav-current > .links-label::after {
    transform: scaleX(1);
}

@media (max-width: 991px) {
    .header-tech {
        position: static;
        box-shadow: none;
    }

    .header-tech::before,
    .header-tech .tech-metrics-row {
        display: none;
    }

    .header-tech .tech-status-bar {
        height: 28px;
        margin-top: 0;
        font-size: 9px;
    }

    .header-tech .tech-mini-link,
    .header-tech .tech-dot-divider {
        display: none;
    }

    .header-tech .navbar-top {
        margin-top: 6px;
        padding-bottom: 6px;
    }

    .header-tech .logo-subtitle {
        font-size: 9px;
        letter-spacing: 0.1em;
    }
}

@media (max-width: 620px) {
    .header-tech .tech-status-bar {
        display: none;
    }
}

/* V6 professional financial cleanup */
.header-tech {
    background: #f7f9fc;
}

.header-tech .tech-status-bar {
    border-radius: 4px;
    background: linear-gradient(90deg, #0d2852 0%, #163a74 65%, #1f4f9d 100%);
}

.header-tech .tech-live-pill {
    border-radius: 4px;
    background: rgb(56 189 248 / 0.16);
}

.header-tech .account-button-wrapper {
    border-radius: 4px;
}

.header-tech .subscribe-button {
    border-radius: 4px;
}

.header-tech .nav-link,
.header-tech .links-label {
    text-transform: none;
    letter-spacing: 0.01em;
}

.header-tech .tech-metrics-row {
    width: fit-content;
    max-width: 100%;
    border: none;
    background: transparent;
    padding: 0;
    margin: 8px auto 10px;
}

.header-tech .tech-metric-item {
    border-radius: 4px;
    height: 26px;
    background: #fff;
}

@media (min-width: 992px) {
    .header-tech .navbar-top {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 18px;
    }

    .header-tech .socials {
        display: none;
    }

    .header-tech .logo-wrapper {
        grid-column: 2;
        justify-self: center;
    }

    .header-tech .navbar-account-links {
        grid-column: 3;
        justify-self: end;
        justify-content: flex-end;
    }

    .header-tech .navbar-logo-text {
        font-size: clamp(48px, 3.2vw, 62px);
        font-weight: 820;
        letter-spacing: 0.012em;
    }

    .header-tech .logo-subtitle {
        font-size: 11px;
        letter-spacing: 0.18em;
    }
}

/* V7 compact header tuning: reduce first-screen obstruction */
.header-tech {
    box-shadow: 0 8px 18px rgb(15 23 42 / 0.06);
}

.header-tech .navbar-inner {
    padding-top: 4px;
}

.header-tech .tech-status-bar {
    height: 30px;
    margin-top: 0;
    padding: 0 10px;
    font-size: 9px;
}

.header-tech .tech-live-pill {
    padding: 3px 8px;
}

.header-tech .navbar-top {
    margin-top: 4px;
    padding-bottom: 4px;
}

.header-tech .logo-wrapper {
    gap: 3px;
}

.header-tech .tech-metrics-row {
    margin: 4px auto 6px;
}

.header-tech .tech-metric-item {
    height: 22px;
    padding: 0 6px;
}

.header-tech .tech-metric-item strong,
.header-tech .tech-metric-item em {
    font-size: 9px;
}

.header-tech .navbar-links-outer {
    min-height: 46px;
}

.header-tech .nav-link,
.header-tech .links-label {
    padding: 5px 2px;
}

@media (min-width: 992px) {
    .header-tech .navbar-top {
        gap: 12px;
    }

    .header-tech .navbar-logo-text {
        font-size: clamp(38px, 2.5vw, 48px);
        line-height: 0.96;
    }

    .header-tech .logo-subtitle {
        font-size: 10px;
        letter-spacing: 0.14em;
    }

    .header-tech .account-button-wrapper {
        padding: 6px 9px;
        font-size: 14px;
    }

    .header-tech .subscribe-button {
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* V8 ultra-compact tuning: visibly reduce header vertical height */
.header-tech .navbar-inner {
    padding-top: 2px;
}

.header-tech .tech-status-bar {
    height: 24px;
    padding: 0 8px;
    font-size: 8px;
    letter-spacing: 0.04em;
}

.header-tech .tech-live-pill {
    padding: 2px 6px;
    gap: 4px;
}

.header-tech .tech-live-dot {
    width: 5px;
    height: 5px;
    box-shadow: 0 0 0 2px rgb(34 211 238 / 0.2);
}

.header-tech .navbar-top {
    margin-top: 2px;
    padding-bottom: 2px;
}

.header-tech .logo-wrapper {
    gap: 1px;
}

.header-tech .navbar-links-outer {
    min-height: 36px;
}

.header-tech .nav-link,
.header-tech .links-label {
    padding: 2px 2px;
    font-size: 15px;
}

@media (min-width: 992px) {
    .header-tech .tech-metrics-row {
        display: none;
    }

    .header-tech .navbar-top {
        gap: 10px;
    }

    .header-tech .navbar-logo-text {
        font-size: clamp(30px, 2vw, 40px);
        line-height: 0.95;
    }

    .header-tech .logo-subtitle {
        font-size: 9px;
        letter-spacing: 0.12em;
    }

    .header-tech .account-button-wrapper {
        padding: 4px 8px;
        font-size: 13px;
    }

    .header-tech .subscribe-button {
        padding: 4px 10px;
        font-size: 13px;
    }
}
