/* One navigation row, with a quieter utility group and a clear primary action. */
.site-header .header-inner {
    width:min(1480px,calc(100% - 64px));
    gap:24px;
}
.site-header .brand { width:170px; margin:0; }
.site-header .primary-nav { gap:18px; margin-inline-start:auto; }
.site-header .nav-link { font-size:.875rem; }
.site-header .header-actions {
    gap:10px;
    margin:0;
    padding-inline-start:18px;
    border-inline-start:1px solid #ffffff40;
}
.site-header .header-actions .header-careers {
    min-height:44px;
    padding:10px 8px;
    border:0;
    border-radius:3px;
    background:transparent;
    color:inherit;
    font-size:.875rem;
    font-weight:500;
    line-height:1.4;
}
.site-header .header-actions .header-careers:hover,
.site-header .header-actions .header-careers.is-active {
    background:#ffffff14;
    color:#a9d9ef;
}
.site-header .header-actions .header-quote {
    min-height:44px;
    padding:10px 18px;
    font-size:.875rem;
    white-space:nowrap;
}
.interior-page .site-header .header-actions,
.site-header.scrolled .header-actions { border-inline-start-color:#d5e1e8; }
.interior-page .site-header .header-actions .header-careers:hover,
.interior-page .site-header .header-actions .header-careers.is-active,
.site-header.scrolled .header-actions .header-careers:hover,
.site-header.scrolled .header-actions .header-careers.is-active { background:#edf5f9; color:#036b9e; }

@media(min-width:1181px) and (max-width:1350px) {
    .site-header .header-inner { gap:18px; }
    .site-header .brand { width:154px; }
    .site-header .primary-nav { gap:14px; }
    .site-header .header-actions { gap:6px; padding-inline-start:14px; }
    .site-header .header-actions .header-quote { padding-inline:14px; }
}

/* Careers stays in the top row; opening Menu reveals navigation and Quote. */
@media(max-width:1180px) {
    .site-header .header-inner {
        display:grid;
        grid-template-columns:minmax(0,1fr) auto 44px;
        grid-template-areas:'brand careers toggle' 'navigation navigation navigation' 'quote quote quote';
        grid-template-rows:78px auto auto;
        column-gap:14px;
        row-gap:0;
        height:auto;
    }
    .site-header .brand { grid-area:brand; width:170px; max-width:100%; }
    .site-header .header-actions { display:contents; }
    .site-header .header-actions .header-careers { grid-area:careers; justify-self:end; }
    .site-header .header-actions .menu-toggle { grid-area:toggle; margin:0; width:44px; height:44px; }
    .site-header .primary-nav {
        grid-area:navigation;
        position:static;
        inset:auto;
        margin:0;
        padding:16px 0;
        max-height:none;
        overflow:visible;
        border-block-start:1px solid #d5e1e8;
        background:transparent;
        color:#103447;
        box-shadow:none;
    }
    .site-header .primary-nav.open { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; }
    .site-header .primary-nav .nav-link { min-height:48px; padding:12px 0; font-size:1rem; }
    .site-header .primary-nav .nav-link.active,
    .site-header .primary-nav .nav-link:hover { color:#036b9e; }
    .site-header .header-actions .header-quote { display:none; }
    .site-header .primary-nav.open ~ .header-actions .header-quote {
        display:inline-flex;
        grid-area:quote;
        justify-self:stretch;
        margin-block-end:20px;
        min-width:150px;
    }
    .site-header:has(.primary-nav.open) { background:#fff; color:#103447; border-color:#d5e1e8; box-shadow:0 14px 30px #10344718; }
    .site-header:has(.primary-nav.open) .header-inner { max-height:100svh; overflow-y:auto; }
    .site-header:has(.primary-nav.open) .logo-light { opacity:0; }
    .site-header:has(.primary-nav.open) .logo-dark { opacity:1; }
    .site-header:has(.primary-nav.open) .header-careers:hover,
    .site-header:has(.primary-nav.open) .header-careers.is-active { background:#edf5f9; color:#036b9e; }
}
@media(max-width:640px) {
    .site-header .header-inner { width:calc(100% - 40px); column-gap:10px; }
    .site-header .brand { width:150px; }
    .site-header .primary-nav.open { grid-template-columns:1fr; }
}
@media(max-width:380px) {
    .site-header .brand { width:128px; }
    .site-header .header-actions .header-careers { padding-inline:5px; }
}

/* The language control stays on the physical left, including on RTL pages. */
.language-dock {
    position:fixed;
    left:0;
    right:auto;
    top:52%;
    transform:translateY(-50%);
    z-index:65;
    direction:ltr;
}
.language-dock summary {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:8px;
    width:44px;
    min-height:86px;
    padding:12px 7px;
    border-radius:0 8px 8px 0;
    background:#0372a8;
    color:#fff;
    box-shadow:3px 4px 20px #09273526;
    cursor:pointer;
    list-style:none;
    font:500 .875rem/1.4 var(--body);
}
.language-dock summary::-webkit-details-marker { display:none; }
.language-dock summary svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.5; }
.language-dock summary:hover,
.language-dock[open] summary { background:#005b87; }
.language-dock summary:focus-visible { outline:3px solid #25a8e0; outline-offset:3px; }
.language-dock-panel {
    position:absolute;
    left:calc(100% + 10px);
    top:50%;
    transform:translateY(-50%);
    width:196px;
    max-width:calc(100vw - 68px);
    padding:16px;
    border:1px solid #d5e1e8;
    border-radius:8px;
    background:#fff;
    color:#103447;
    box-shadow:0 8px 30px #10344726;
}
.language-dock-panel label { display:block; margin-bottom:8px; font-size:.875rem; font-weight:500; }
.language-dock-panel select {
    appearance:none;
    width:100%;
    min-height:44px;
    padding:9px 32px 9px 12px;
    border:1px solid #a3b7c2;
    border-radius:4px;
    background:#fff;
    color:#103447;
    font:400 1rem/1.4 var(--body);
    cursor:pointer;
}
.language-dock-panel::after {
    content:'';
    position:absolute;
    right:30px;
    bottom:36px;
    width:7px;
    height:7px;
    border-right:1.5px solid currentColor;
    border-bottom:1.5px solid currentColor;
    transform:rotate(45deg);
    pointer-events:none;
}
.language-dock-panel select:focus-visible { outline:3px solid #25a8e0; outline-offset:2px; }
@media(min-width:761px) {
    /* Both side tabs sit outside the reading area, including in RTL. */
    main .wrap, .footer .wrap { width:min(1480px,calc(100% - 120px)); }
}
@media(max-width:760px) {
    /* Use the fixed top row so the tab never tracks over text or slide controls. */
    .site-header .header-inner {
        width:auto;
        margin-left:calc(56px + env(safe-area-inset-left,0px));
        margin-right:max(16px,env(safe-area-inset-right,0px));
    }
    .language-dock {
        top:17px;
        left:env(safe-area-inset-left,0px);
        transform:none;
        z-index:101;
    }
    .language-dock summary {
        gap:2px;
        min-height:44px;
        padding:4px;
        font-size:.75rem;
        line-height:1.1;
    }
    .language-dock summary svg { width:17px; height:17px; }
    .language-dock-panel {
        top:calc(100% + 8px);
        left:6px;
        transform:none;
        max-width:calc(100vw - 24px);
    }
}
