/* Navigation fit safety net (desktop rail, 1001px and wider).
   These rules do nothing unless the inline check in SiteLayout.astro has measured
   real horizontal overflow of the shared header (for example when DM Sans fails to
   load and a wider fallback font is used, or the visitor has enlarged text).
   nav-fit-1: spacing only, same typography and order, every item stays visible.
   nav-fit-2: the existing approved tablet menu (751px to 1000px), all items kept. */
@media (min-width:1001px){
  html.nav-fit-1 body .site-header:not(#_):not(#__):not(#___){gap:10px!important;padding-left:16px!important;padding-right:16px!important}
  html.nav-fit-1 body .site-header .brand:not(#_):not(#__):not(#___){margin-right:0!important}
  html.nav-fit-1 body .site-header .nav:not(#_):not(#__):not(#___){gap:4px!important}
  html.nav-fit-1 body .site-header .nav-menu:not(#_):not(#__):not(#___){gap:8px!important;margin-left:4px!important}
  html.nav-fit-1 body .site-header .nav-menu a.nav-menu__cta:not(#_):not(#__):not(#___){padding-left:12px!important;padding-right:12px!important;margin-left:2px!important}
  html.nav-fit-1 body .site-header .nav-search:not(#_):not(#__):not(#___){margin-left:0!important}

  html.nav-fit-2 body .site-header:not(#_):not(#__):not(#___){gap:20px!important;padding-left:24px!important;padding-right:24px!important}
  html.nav-fit-2 body .site-header .brand img:not(#_):not(#__):not(#___){height:42px!important}
  html.nav-fit-2 body .site-header .nav-search:not(#_):not(#__):not(#___){order:-1}
  html.nav-fit-2 body .site-header .nav-toggle:not(#_):not(#__):not(#___){box-sizing:border-box;cursor:pointer;background:0 0;border:0;flex-direction:column;justify-content:space-between;width:44px;height:44px;padding:10px 5px;display:flex!important}
  html.nav-fit-2 body .site-header .nav-toggle span:not(#_):not(#__):not(#___){background:var(--color-cream);border-radius:2px;height:2px;transition:transform .2s,opacity .2s;display:block}
  html.nav-fit-2 body .site-header .nav-toggle[aria-expanded=true] span:first-child:not(#_):not(#__):not(#___){transform:translateY(10px) rotate(45deg)}
  html.nav-fit-2 body .site-header .nav-toggle[aria-expanded=true] span:nth-child(2):not(#_):not(#__):not(#___){opacity:0}
  html.nav-fit-2 body .site-header .nav-toggle[aria-expanded=true] span:nth-child(3):not(#_):not(#__):not(#___){transform:translateY(-10px) rotate(-45deg)}
  html.nav-fit-2 body .site-header .nav-menu:not(#_):not(#__):not(#___){display:none!important;margin-left:0!important}
  html.nav-fit-2 body .site-header .nav-menu.is-open:not(#_):not(#__):not(#___){z-index:20;background:var(--color-navy);border-bottom:1px solid color-mix(in srgb, var(--deco) 40%, transparent);flex-direction:column;align-items:stretch;gap:0!important;padding:8px 24px 24px;display:flex!important;position:absolute;top:100%;left:0;right:0;overscroll-behavior:contain;max-height:calc(100dvh - 72px);overflow-y:auto}
  html.nav-fit-2 body .site-header .nav-dd:not(#_):not(#__):not(#___){position:static}
  html.nav-fit-2 body .site-header .nav-dd__btn:not(#_):not(#__):not(#___){display:none!important}
  html.nav-fit-2 body .site-header .nav-dd__panel:not(#_):not(#__):not(#___){width:auto;box-shadow:none;opacity:1;visibility:visible;background:0 0;border:0;padding:0;position:static;transform:none;display:block}
  html.nav-fit-2 body .site-header .nav-dd__panel:not(#_):not(#__):not(#___)::before{display:none}
  html.nav-fit-2 body .site-header .nav-dd__box:not(#_):not(#__):not(#___){background:0 0;border:0;padding:0}
  html.nav-fit-2 body .site-header .nav-dd__h:not(#_):not(#__):not(#___){padding:14px 0 4px}
  html.nav-fit-2 body .site-header .nav-menu a:not(#_):not(#__):not(#___){font-family:var(--font-display);border-bottom:1px solid #f0ede214;border-radius:0;padding:14px 0;font-size:22px;white-space:normal}
  html.nav-fit-2 body .site-header .nav-menu .nav-dd__panel a b:not(#_):not(#__):not(#___){font-family:var(--font-display);font-size:22px;font-weight:400}
  html.nav-fit-2 body .site-header .nav-menu .nav-dd__panel a span:not(#_):not(#__):not(#___){display:none}
  html.nav-fit-2 body .site-header .nav-menu a.nav-menu__cta:not(#_):not(#__):not(#___){text-align:center;font-family:var(--font-sans);margin-top:18px!important;margin-left:0!important;padding:16px 20px!important;font-size:16px;border-bottom:0}
}
