/* Keep the brand centered while grouping reader actions on the right. */
.site-header .masthead { display: grid !important; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); height: auto !important; min-height: 116px; gap: 24px; padding-block: 14px; }
.site-header .brand-link { grid-column: 2; min-width: 0; }
.site-header .brand { width: clamp(250px, 24vw, 420px) !important; }
.site-header .header-actions { grid-column: 3; justify-self: end; display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.site-header .header-actions > a { position: static !important; transform: none !important; display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; min-height: 44px !important; height: auto !important; padding: 12px 18px !important; border-radius: 8px !important; font-size: 13px !important; font-weight: 700; line-height: 1.3; white-space: nowrap; text-decoration: none; }
.site-header .header-subscribe-btn { color: #343b43; background: #f6f7f8; border: 1px solid #e2e5e8; }
.site-header .header-subscribe-btn i { color: #bc2530; }
.site-header .header-subscribe-btn:hover { background: #fff2f3; border-color: #c52530; color: #a31d27; }
.site-header .header-actions > a:focus-visible { outline: 2px solid #c52530; outline-offset: 3px; }
@media (width <= 1200px) and (width > 800px) { .site-header .masthead { grid-template-columns: minmax(0, 1fr) auto; gap: 20px; } .site-header .brand-link { grid-column: 1; justify-self: start; } .site-header .header-actions { grid-column: 2; } }
@media (width <= 800px) { .site-header .masthead { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; min-height: 0; padding-block: 16px; } .site-header .brand-link { grid-column: 1 / -1; justify-self: center; } .site-header .brand { width: min(78vw, 320px) !important; } .site-header .header-actions { grid-column: 1; grid-row: 2; justify-self: start; gap: 8px; flex-wrap: wrap; justify-content: flex-start; } .site-header .header-actions > a { font-size: 12px !important; padding: 10px 12px !important; } .site-header .account-link span { display: inline !important; } .site-header .menu-toggle { grid-column: 2; grid-row: 2; position: static !important; transform: none !important; min-height: 44px; height: auto; justify-self: end; } }
@media (width <= 390px) { .site-header .masthead { gap: 10px 6px; } .site-header .header-actions { gap: 6px; } .site-header .header-actions > a { padding: 10px 8px !important; font-size: 11px !important; } .site-header .menu-toggle { padding-inline: 9px; } .site-header .menu-toggle span { display: none; } }

/* Explicit rows override the older mobile rules in the compiled theme. */
@media (width > 1024px) {
    .site-header .main-navigation {
        display: flex !important;
        flex-flow: row nowrap !important;
        justify-content: space-between;
        align-items: center;
        max-width: 1608px;
        gap: clamp(2px, .4vw, 8px) !important;
        padding: 8px clamp(12px, 1.5vw, 28px) !important;
        overflow: visible;
    }
    .site-header .main-navigation > :is(a, .nav-dropdown) {
        flex: 0 0 auto !important;
        width: auto !important;
    }
    .site-header .main-navigation :is(.nav-link, .nav-dropdown-toggle) {
        width: auto !important;
        min-height: 44px !important;
        padding: 10px clamp(3px, .45vw, 9px) !important;
        font-size: clamp(12px, .9vw, 14px) !important;
        line-height: 1.3 !important;
        white-space: nowrap !important;
    }
    .site-header .main-navigation .nav-dropdown-toggle { gap: 5px; }
}
@media (width <= 1024px) {
    .site-header .masthead {
        grid-template-columns: minmax(0, 1fr) 44px !important;
        grid-template-rows: auto auto !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 12px 16px !important;
    }
    .site-header .brand-link {
        grid-column: 1 !important;
        grid-row: 1 !important;
        justify-self: start !important;
        width: 100% !important;
        max-width: 300px;
        min-width: 0 !important;
    }
    .site-header .brand {
        width: min(100%, 300px) !important;
        max-width: 100% !important;
    }
    .site-header .brand img {
        display: block;
        width: 320.588235% !important;
        height: auto !important;
        max-width: none !important;
        object-fit: contain;
    }
    .site-header .menu-toggle {
        grid-column: 2 !important;
        grid-row: 1 !important;
        display: inline-flex !important;
        position: static !important;
        transform: none !important;
        justify-self: end !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
        border-radius: 10px !important;
        background: #f5f6f8;
        border: 1px solid #e2e5e8;
    }
    .site-header .menu-toggle span { display: none !important; }
    .site-header .menu-toggle:focus-visible {
        outline: 2px solid #b50915;
        outline-offset: 3px;
    }
    .site-header .header-actions {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        position: static !important;
        transform: none !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-self: stretch !important;
        width: 100% !important;
        min-width: 0 !important;
        gap: 8px !important;
        z-index: auto;
    }
    .site-header .header-actions > a {
        display: inline-flex !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 44px !important;
        padding: 10px 8px !important;
        gap: 6px !important;
        font-size: 12px !important;
        line-height: 1.35 !important;
        white-space: normal !important;
        text-align: center;
        box-sizing: border-box;
    }
    .site-header .header-actions > a span { display: inline !important; }
    .site-header .header-subscribe-btn {
        color: #343b43 !important;
        background: #f5f6f8 !important;
        border-color: #e2e5e8 !important;
        box-shadow: none !important;
    }
    .site-header .main-navigation {
        padding: 8px 16px 16px !important;
        gap: 4px !important;
        max-height: calc(100svh - 150px) !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        background: #fff;
    }
    .site-header :is(.nav-link, .nav-dropdown-toggle) {
        min-height: 44px !important;
        padding: 10px 12px !important;
        border-radius: 8px;
        font-size: 14px !important;
    }
}

/* Compact desktop edge: keep every label visible above the mobile breakpoint. */
@media (1024px < width < 1200px) {
    .site-header .main-navigation { gap: 0 !important; padding-inline: 8px !important; }
    .site-header .main-navigation :is(.nav-link, .nav-dropdown-toggle) { padding-inline: 0 !important; font-size: 12px !important; }
    .site-header .main-navigation .nav-dropdown-toggle { gap: 4px !important; }
}
