/* TEST 2026-11-20 — stable header CTA by CSS breakpoint.
   The full CTA and compact icon are separate links to the same Downloads page.
   CSS switches their visibility synchronously during resize; there is no
   JS reparenting or transient full-button measurement. */

/* Keep the nav inside its own grid column instead of absolute page-centering.
   This guarantees it cannot cover Downloads or account controls when text reflows. */
@media (min-width: 1080px) {
    .header.header--inner.header--modern > .header__canvas > ul.header__menu {
        position: static !important;
        left: auto !important;
        top: auto !important;
        right: auto !important;
        transform: none !important;
        width: max-content;
        max-width: 100%;
        margin: 0 auto !important;
        justify-content: center;
    }
    .header.header--inner.header--modern > .header__canvas {
        min-width: 0;
        justify-content: center;
    }
}
@media (min-width: 1600px) {
    .header.header--inner.header--modern ul.header__menu,
    body.page-home .header.header--inner.header--modern ul.header__menu {
        gap: clamp(26px, 2.4vw, 46px);
    }
}
@media (min-width: 1321px) and (max-width: 1599px) {
    .header.header--inner.header--modern ul.header__menu,
    body.page-home .header.header--inner.header--modern ul.header__menu {
        gap: 16px;
    }
}
@media (min-width: 1080px) and (max-width: 1320px) {
    .header.header--inner.header--modern ul.header__menu,
    body.page-home .header.header--inner.header--modern ul.header__menu {
        gap: 12px;
    }
}

/* The compact action lives next to Cart and Account in the original markup. */
.header.header--inner.header--modern > .profile__menu > a.ke-header-download-icon {
    display: none !important;
    flex: 0 0 36px;
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    height: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: transparent;
    border: 0;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: none;
    transform: none;
}
.header.header--inner.header--modern > .profile__menu > a.ke-header-download-icon i {
    font-size: 22px;
    line-height: 1;
}
.header.header--inner.header--modern > .profile__menu > a.ke-header-download-icon:hover,
.header.header--inner.header--modern > .profile__menu > a.ke-header-download-icon:focus-visible {
    color: #fff;
    background: rgba(255,255,255,.12);
}
.header.header--inner.header--modern > .profile__menu > a.ke-header-download-icon:focus-visible {
    outline: 2px solid #56e4c2;
    outline-offset: 2px;
}

/* Explicit, deterministic states. At 1899px and below the full CTA is NEVER
   painted — so it cannot flash during a resize or while JS initializes. */
@media (min-width: 1900px) {
    .header.header--inner.header--modern > a.header__cta {
        display: inline-flex !important;
    }
    .header.header--inner.header--modern {
        grid-template-columns: 154px minmax(0, 1fr) auto auto;
    }
}
@media (min-width: 1080px) and (max-width: 1899px) {
    .header.header--inner.header--modern {
        grid-template-columns: 154px minmax(0, 1fr) auto;
    }
}
@media (min-width: 1080px) and (max-width: 1240px) {
    .header.header--inner.header--modern {
        grid-template-columns: 140px minmax(0, 1fr) auto;
    }
}
@media (max-width: 1899px) {
    .header.header--inner.header--modern > a.header__cta {
        display: none !important;
    }
    .header.header--inner.header--modern > .profile__menu > a.ke-header-download-icon {
        display: inline-flex !important;
    }
}
/* On narrow browsers the existing drawer contains the navigation links. */
@media (max-width: 1079px) {
    .header.header--inner.header--modern > .profile__menu {
        gap: 8px;
    }
    .header.header--inner.header--modern > .profile__menu > a.ke-header-download-icon {
        flex-basis: 33px;
        width: 33px;
        min-width: 33px;
        max-width: 33px;
        height: 33px;
        min-height: 33px;
    }
    .header.header--inner.header--modern > .profile__menu > a.ke-header-download-icon i {
        font-size: 19px;
    }
}
/* The theme action remains available inside the mobile drawer. */
@media (max-width: 600px) {
    .header.header--inner.header--modern > .profile__menu > .btn_theme.btn_theme-display {
        display: none !important;
    }
}
@media (max-width: 359px) {
    .header.header--inner.header--modern .header__logo {
        width: 125px !important;
        max-width: 125px !important;
        min-width: 0;
    }
    .header.header--inner.header--modern .header__logo img {
        width: 125px !important;
        max-width: 100% !important;
        height: auto;
        object-fit: contain;
    }
}
