/* Keep the product switch in the same column on both products. */
@media (min-width:1241px) {
  .site-header, .critical-header-inner {
    grid-template-columns:minmax(220px,1fr) 220px 370px 58px 246px;
    column-gap:clamp(12px,1.5vw,24px);
  }
  .site-header .product-switch, .critical-site-header .switch { grid-column:2; grid-row:1; }
  .site-header .site-nav, .critical-site-header #critical-nav { grid-column:3; grid-row:1; }
  .site-header > .language-selector, .critical-site-header .critical-mobile-language { grid-column:4; grid-row:1; justify-self:end; margin:0; }
  .site-header .header-cta, .critical-site-header .header-cta { grid-column:5; grid-row:1; justify-self:end; width:246px; }
  .site-header .header-cta { min-width:0; padding-inline:12px; gap:8px; font-size:.78rem; white-space:nowrap; }
}
@media (min-width:1001px) and (max-width:1240px) {
  .site-header, .critical-header-inner { grid-template-columns:minmax(220px,1fr) 220px 370px 58px; column-gap:clamp(10px,1.2vw,16px); }
  .site-header .product-switch, .critical-site-header .switch { grid-column:2; grid-row:1; }
  .site-header .site-nav, .critical-site-header #critical-nav { grid-column:3; grid-row:1; }
  .site-header > .language-selector, .critical-site-header .critical-mobile-language { grid-column:4; grid-row:1; justify-self:end; margin:0; }
  .site-header .header-cta, .critical-site-header .header-cta { display:none; }
}
@media (min-width:1001px) {
  .site-header .site-nav, .critical-site-header #critical-nav { gap:14px; justify-self:start; white-space:nowrap; font-size:.82rem; }
  .critical-site-header #critical-nav > a { font-size:.82rem; }
  .site-header > .language-selector select { width:58px; min-width:58px; }
}
/* Medium screens use the same switch, language and menu columns. */
@media (min-width:901px) and (max-width:1000px) {
  .site-header { grid-template-columns:minmax(0,1fr) 220px 58px 44px; gap:18px; }
  .site-header .product-switch { grid-column:2; grid-row:1; }
  .site-header .mobile-language { display:block; grid-column:3; grid-row:1; }
  .site-header > .language-selector, .site-header .header-cta { display:none; }
  .site-header .menu-toggle { grid-column:4; grid-row:1; display:grid; gap:7px; width:44px; height:44px; place-content:center; justify-self:end; border:1px solid #56644a; background:transparent; cursor:pointer; }
  .site-header .menu-toggle span:not(.sr-only) { width:18px; height:1.5px; background:var(--signal); }
  .site-header .site-nav { display:none; position:absolute; top:100%; left:auto; right:0; width:280px; padding:12px 20px; flex-direction:column; align-items:stretch; gap:0; background:var(--ink); border:1px solid #343b33; box-shadow:0 18px 35px #0003; }
  .site-header .site-nav.is-open { display:flex; }
  .site-header .site-nav > a { display:flex; align-items:center; min-height:48px; padding:10px 0; border-bottom:1px solid #343b33; font-size:15px; }
  .site-header .site-nav > a:last-child { border-bottom:0; }
}
@media (min-width:601px) and (max-width:1000px) {
  .site-header .mobile-language select { display:block; width:58px; height:42px; appearance:none; border:1px solid #56644a; border-radius:0; padding:0; color:var(--paper); background:transparent; text-align:center; font-size:12px; font-weight:800; }
  .site-header .mobile-language select option { color:var(--ink); background:#fff; }
}
@media (min-width:601px) and (max-width:900px) {
  .site-header { min-height:156px; grid-template-columns:minmax(0,1fr) 58px 44px; grid-template-rows:76px 44px; align-content:center; padding-block:12px; row-gap:8px; }
  .site-header .mobile-language { display:block; grid-column:2; grid-row:1; }
  .site-header .menu-toggle { display:grid; grid-column:3; grid-row:1; width:44px; height:44px; place-content:center; gap:7px; justify-self:end; border:1px solid #56644a; background:transparent; }
  .site-header .menu-toggle span:not(.sr-only) { width:18px; height:1.5px; background:var(--signal); }
  .site-header .product-switch { grid-column:1/-1; grid-row:2; justify-self:center; min-height:46px; margin:0; }
  .site-header > .language-selector { display:none; }
  .site-header .site-nav { display:none; position:absolute; top:100%; left:auto; right:0; width:min(280px,100%); padding:12px 20px; flex-direction:column; align-items:stretch; gap:0; background:var(--ink); border:1px solid #343b33; box-shadow:0 18px 35px #0003; }
  .site-header .site-nav.is-open { display:flex; }
  .site-header .site-nav > a { display:flex; align-items:center; min-height:48px; padding:10px 0; border-bottom:1px solid #343b33; font-size:15px; }
}
@media (max-width:600px) { .site-header > .language-selector { display:none; } }

/* Give translated navigation room and keep the header action in the page content. */
@media (min-width:1280px) {
  .site-header { grid-template-columns:minmax(190px,1fr) 220px max-content 64px; column-gap:clamp(16px,1.5vw,24px); }
  .site-header .site-nav { grid-column:3; gap:clamp(18px,1.7vw,26px); font-size:15px; }
  .site-header .site-nav > a:not(.mobile-nav-link) { white-space:nowrap; }
  .site-header > .language-selector { grid-column:4; }
  .site-header > .language-selector select { width:64px; min-width:64px; }
}
@media (min-width:901px) and (max-width:1279px) {
  .site-header { grid-template-columns:minmax(0,1fr) 220px 58px 44px; gap:18px; }
  .site-header .product-switch { grid-column:2; grid-row:1; }
  .site-header .mobile-language { display:block; grid-column:3; grid-row:1; }
  .site-header > .language-selector { display:none; }
  .site-header .menu-toggle { grid-column:4; grid-row:1; display:grid; gap:7px; width:44px; height:44px; place-content:center; justify-self:end; border:1px solid #56644a; background:transparent; cursor:pointer; }
  .site-header .menu-toggle span:not(.sr-only) { width:18px; height:1.5px; background:var(--signal); }
  .site-header .site-nav { display:none; position:absolute; top:100%; left:auto; right:0; width:min(320px,100%); padding:12px 20px; flex-direction:column; align-items:stretch; gap:0; background:var(--ink); border:1px solid #343b33; box-shadow:0 18px 35px #0003; white-space:normal; }
  .site-header .site-nav.is-open { display:flex; }
  .site-header .site-nav > a:not(.mobile-nav-link) { display:flex; align-items:center; min-height:48px; padding:10px 0; border-bottom:1px solid #343b33; font-size:15px; line-height:1.35; }
  .site-header .site-nav > a:last-child { border-bottom:0; }
  .site-header .mobile-language select { display:block; width:58px; height:42px; appearance:none; border:1px solid #56644a; border-radius:0; padding:0; color:var(--paper); background:transparent; text-align:center; font-size:12px; font-weight:800; }
  .site-header .mobile-language select option { color:var(--ink); background:#fff; }
}
/* The sticky header stays visible while the section begins just below it. */
#services { scroll-margin-top:145px; }
#industries { scroll-margin-top:13px; }
@media (max-width:900px) { #services { scroll-margin-top:156px; } #industries { scroll-margin-top:0; } }
@media (max-width:600px) { #services { scroll-margin-top:136px; } }

/* One four-column frame on both products keeps the switch and language fixed. */
@media (min-width:1280px) {
  .site-header, .critical-header-inner {
    grid-template-columns:minmax(190px,1fr) 220px 510px 64px;
    column-gap:clamp(16px,1.5vw,24px);
  }
  .site-header .product-switch, .critical-site-header .switch { grid-column:2; grid-row:1; }
  .site-header .site-nav, .critical-site-header #critical-nav {
    grid-column:3; grid-row:1; width:100%; gap:0;
    justify-self:stretch; justify-content:space-between; white-space:nowrap;
  }
  .site-header .site-nav > a:not(.mobile-nav-link), .critical-site-header #critical-nav > a { font-size:15px; }
  .site-header > .language-selector, .critical-site-header .critical-mobile-language {
    grid-column:4; grid-row:1; width:64px; justify-self:end; margin:0;
  }
  .site-header > .language-selector select, .critical-site-header .critical-mobile-language select { width:64px; min-width:64px; }
}
@media (min-width:901px) and (max-width:1279px) {
  .site-header, .critical-header-inner {
    grid-template-columns:minmax(0,1fr) 220px 58px 44px;
    gap:18px; position:relative;
  }
  .site-header .product-switch, .critical-site-header .switch { grid-column:2; grid-row:1; }
  .site-header .mobile-language, .critical-site-header .critical-mobile-language { grid-column:3; grid-row:1; width:58px; margin:0; }
  .site-header .menu-toggle, .critical-site-header .menu.icon { grid-column:4; grid-row:1; display:grid; justify-self:end; width:44px; height:44px; }
  .critical-site-header #critical-nav {
    display:none; position:absolute; grid-column:auto; top:100%; right:0;
    width:min(320px,100%); padding:12px 20px; flex-direction:column;
    align-items:stretch; gap:0; white-space:normal; background:#0c100d;
    border:1px solid #343b33; box-shadow:0 18px 35px #0003;
  }
  .critical-site-header.open #critical-nav { display:flex; }
  .critical-site-header #critical-nav > a { display:flex; align-items:center; min-height:48px; padding:10px 0; border-bottom:1px solid #343b33; font-size:15px; line-height:1.35; }
  .critical-site-header #critical-nav > a:last-child { border-bottom:0; }
}
@media (max-width:900px) {
  .site-header .product-switch, .critical-site-header .switch { width:220px; }
  .site-header .product-switch a, .critical-site-header .switch a { width:102px; min-width:0; flex:0 0 102px; box-sizing:border-box; }
}
/* Keep a modest switch-to-navigation gap and evenly distribute the links. */
@media (min-width:1280px) {
  .site-header .site-nav, .critical-site-header #critical-nav {
    width:min(480px,100%);
    justify-self:end;
    justify-content:space-between;
    gap:8px;
  }
}

/* Shared desktop frame: the product switch and language control stay aligned. */
@media (min-width:1280px) {
  .site-header, .critical-header-inner {
    grid-template-columns:minmax(0,1fr) 248px 460px 64px;
    column-gap:57px;
  }
  .site-header .product-switch, .critical-site-header .switch {
    grid-column:2; grid-row:1; width:248px; min-height:60px;
    justify-self:start; gap:3px; padding:4px;
  }
  .site-header .product-switch a, .critical-site-header .switch a {
    box-sizing:border-box; flex:0 0 116px; width:116px; min-width:0;
    min-height:48px; padding:0 12px; font-size:12px;
  }
  .site-header .site-nav, .critical-site-header #critical-nav {
    grid-column:3; grid-row:1; width:460px; justify-self:stretch;
    justify-content:space-between; gap:8px;
  }
  .site-header > .language-selector, .critical-site-header .critical-mobile-language {
    grid-column:4; grid-row:1; width:64px; justify-self:end;
  }
  /* Longer Finnish labels need more room without moving either end control. */
  html[lang="fi"] .site-header, html[lang="fi"] .critical-header-inner {
    grid-template-columns:minmax(0,1fr) 248px 490px 64px;
    column-gap:42px;
  }
  html[lang="fi"] .site-header .site-nav, html[lang="fi"] .critical-site-header #critical-nav {
    width:490px;
  }
}
@media (min-width:901px) and (max-width:1279px) {
  .site-header, .critical-header-inner {
    grid-template-columns:minmax(0,1fr) 248px 58px 44px;
    gap:18px;
  }
  .site-header .product-switch, .critical-site-header .switch {
    grid-column:2; width:248px; min-height:60px; padding:4px; gap:3px;
  }
  .site-header .product-switch a, .critical-site-header .switch a {
    box-sizing:border-box; flex:0 0 116px; width:116px; min-width:0;
    min-height:48px; padding:0 12px; font-size:12px;
  }
}
@media (min-width:601px) and (max-width:900px) {
  .site-header .product-switch, .critical-site-header .switch { width:236px; }
  .site-header .product-switch a, .critical-site-header .switch a {
    flex:0 0 110px; width:110px; min-width:0;
  }
}
