/* =====================================================================
   2026 shared layer: design tokens, header, theme toggle.
   Loaded on every page. New pieces are scoped to .hdr26 (header), .ftr26 (footer),
   .theme-fab (theme disc) and .h26 (homepage) so nothing leaks into older templates.
   ===================================================================== */

/* ---------- site-wide globals carried over from the previous nav.php ---------- */
:root {
  --neutral-100-zebra: #DFD9D2;
  --neutral-800-zebra: #2A2A2F;
  --neutral-100-header: #DFD9D2D9;
  --neutral-800-header: #2A2A2FD9;
  --page-padding: 200px;
  /* room for the floating header: 14px inset + 68px pill + 2px border (10 + 64 + 2 under 1080px) */
  --nav-height-top: 84px;
}
.light-theme { --header-color: var(--neutral-200); }
.dark-theme { --header-color: var(--neutral-800); }
div, h1, h2, h3, h4, h5, span, p { letter-spacing: -.5px; }
.no-scroll { overflow-y: hidden; }
html { scroll-padding-top: 104px; }
@media (max-width: 1200px) { :root { --page-padding: 96px; } }
@media (max-width: 1080px) { :root { --nav-height-top: 76px; } html { scroll-padding-top: 90px; } }
@media (max-width: 768px) { :root { --page-padding: 24px; } }

/* DM Sans loads deferred; this Arial fallback is metric-matched to it so text doesn't shift when the web font arrives */
@font-face { font-family: 'DM Sans Fallback'; src: local('Arial'), local('ArialMT'); size-adjust: 104.53%; ascent-override: 94.90%; descent-override: 29.66%; line-gap-override: 0%; }

/* ---------- 2026 design tokens (light) ---------- */
.h26, .hdr26, .ftr26, .theme-fab {
  --green: #19C798; --blue: #4CA9E9; --purple: #A264F8; --gold: #F4C085; --red: #CE6262;
  --neutral-100: #F4F1E6; --neutral-200: #E1DED6; --neutral-300: #CFC7C0; --neutral-500: #7E7D7E;
  --neutral-700: #303030; --neutral-800: #1C1C20; --neutral-900: #07070F;
  --green-tint: rgba(25,199,152,.12); --blue-tint: rgba(76,169,233,.12); --gold-tint: rgba(244,192,133,.12); --purple-tint: rgba(162,100,248,.12);
  --paper: #F7F5EC;
  --font: 'DM Sans', 'DM Sans Fallback', sans-serif;
  --tracking-display: -0.04em; --tracking-body: -0.02em;
  --radius-card: 1rem; --radius-callout: .875rem; --radius-button: .75rem; --radius-chip: .5rem;
  --max: 1240px; --gutter: clamp(16px,4vw,48px); --nav-h: 64px;
  --ease-out: cubic-bezier(.2,.7,.2,1); --ease-spring: cubic-bezier(.34,1.56,.64,1);
  font-family: var(--font);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 2026 design tokens (dark): neutrals flip, scoped to the new pieces ---------- */
body.dark-theme .h26, body.dark-theme .hdr26, body.dark-theme .ftr26, body.dark-theme .theme-fab {
  color-scheme: dark;
  --neutral-100: #07070F; --neutral-200: #1C1C20; --neutral-300: #303030; --neutral-500: #8E8C8E;
  --neutral-700: #CFC7C0; --neutral-800: #E1DED6; --neutral-900: #F4F1E6;
  --paper: #111116; --green-tint: rgba(25,199,152,.14);
}

/* ---------- resets: keep older global element styles out of the new pieces ---------- */
.hdr26 :is(span, p, li, a, label, small), .ftr26 :is(span, p, li, a, label, small), .h26 :is(span, p, li, a, label, small) { font: inherit; color: inherit; letter-spacing: inherit; }
.hdr26 a:where(:hover), .ftr26 a:where(:hover), .h26 a:where(:hover) { color: inherit; filter: none; }
.hdr26 :is(a, div), .ftr26 :is(a, div), .h26 :is(a, div) { width: auto; letter-spacing: inherit; }
.hdr26 p, .ftr26 p, .h26 p { margin: 0; }
.hdr26 label, .ftr26 label, .h26 label { display: inline; margin: 0; }
.hdr26 img, .ftr26 img, .h26 img { max-width: 100%; display: block; }
.hdr26 :focus-visible, .ftr26 :focus-visible, .h26 :focus-visible, .theme-fab:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }
/* the site styles <g> as an inline "green text" tag; keep it out of the SVG icon sprite (icons use currentColor) */
symbol g { color: inherit; }
.hdr26 .sr-only, .ftr26 .sr-only, .h26 .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header: floating, content-width pill ---------- */
.hdr26 { position: fixed; top: 14px; left: 50%; z-index: 9999; width: max-content; max-width: calc(100% - 32px); transform: translateX(-50%); margin: 0; color: var(--neutral-700); font-size: 1rem; line-height: 1.6; background: rgba(225,222,214,.82); backdrop-filter: blur(40px) saturate(1.2); -webkit-backdrop-filter: blur(40px) saturate(1.2); border: 1px solid var(--neutral-300); border-radius: 20px; box-shadow: 0 6px 20px rgba(7,7,15,.05); transition: box-shadow .3s, background-color .3s; }
.hdr26.scrolled { box-shadow: 0 12px 32px rgba(7,7,15,.10); background: rgba(232,229,221,.9); }
body.dark-theme .hdr26 { background: rgba(28,28,32,.82); }
body.dark-theme .hdr26.scrolled { background: rgba(28,28,32,.92); box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.hdr26 .hdr26-nav { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 28px; max-width: 1440px; margin: 0 auto; padding: 0 12px 0 22px; }
.hdr26 .hdr26-logo { display: flex; align-items: center; height: 26px; flex: none; }
.hdr26 .hdr26-logo svg { height: 100%; width: auto; }
.hdr26 .hdr26-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.hdr26 .hdr26-links > li { position: relative; }
.hdr26 .hdr26-link { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 10px; font-size: .9375rem; font-weight: 500; line-height: 1.6; color: var(--neutral-800); text-decoration: none; background: none; border: 0; font-family: inherit; cursor: pointer; letter-spacing: -.01em; white-space: nowrap; transition: background-color .2s; }
.hdr26 .hdr26-link:hover, .hdr26 .hdr26-links li:focus-within > .hdr26-link { background: var(--green-tint); color: var(--neutral-800); }
.hdr26 .hdr26-link svg { width: 14px; height: 14px; transition: transform .25s; }
.hdr26 .hdr26-has-menu:hover .hdr26-link svg, .hdr26 .hdr26-has-menu:focus-within .hdr26-link svg { transform: rotate(180deg); }
.hdr26 .hdr26-menu { position: absolute; top: calc(100% + 6px); left: 50%; width: 360px; padding: 12px; background: var(--neutral-200); border: 1px solid var(--neutral-300); border-radius: 12px; box-shadow: 0 16px 32px rgba(7,7,15,.10); opacity: 0; visibility: hidden; transform: translate(-50%,-6px); transition: opacity .2s, transform .2s, visibility .2s; }
.hdr26 .hdr26-has-menu:hover .hdr26-menu, .hdr26 .hdr26-has-menu:focus-within .hdr26-menu { opacity: 1; visibility: visible; transform: translate(-50%,0); }
.hdr26 .hdr26-menu a { display: block; padding: 12px 14px; border-radius: 8px; text-decoration: none; }
.hdr26 .hdr26-menu a:hover { background: var(--green-tint); }
.hdr26 .hdr26-menu strong { display: block; font-weight: 600; color: var(--neutral-900); font-size: .9375rem; letter-spacing: -.01em; }
.hdr26 .hdr26-menu span { display: block; font-size: .8125rem; color: var(--neutral-500); line-height: 1.4; margin-top: 2px; }
.hdr26 .hdr26-menu.hdr26-tools { width: 300px; }
.hdr26 .hdr26-menu.hdr26-tools a { padding: 9px 14px; font-size: .9375rem; color: var(--neutral-800); }
.hdr26 .hdr26-actions { display: flex; align-items: center; gap: 12px; flex: none; }

/* header buttons */
.hdr26 .hdr26-btn { --bg: var(--green); --fg: var(--neutral-900); position: relative; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px; border-radius: var(--radius-button); border: 1px solid transparent; background: var(--bg); color: var(--fg); font: 500 1rem/1 var(--font); letter-spacing: -.01em; text-decoration: none; cursor: pointer; transition: transform .35s var(--ease-spring), background-color .2s, border-color .2s; }
.hdr26 .hdr26-btn svg { width: 18px; height: 18px; transition: transform .35s var(--ease-spring); }
.hdr26 .hdr26-btn:hover svg { transform: translateX(3px); }
.hdr26 .hdr26-btn-primary:hover { background: #15b889; color: var(--fg); }
.hdr26 .hdr26-btn-ghost { --bg: transparent; border-color: var(--neutral-900); }
.hdr26 .hdr26-btn-ghost:hover { background: var(--neutral-900); color: var(--neutral-100); }
.hdr26 .hdr26-btn-sm { height: 40px; padding: 0 16px; font-size: .9375rem; }
body.dark-theme .hdr26 .hdr26-btn-primary { --fg: #07070F; color: #07070F; }

/* burger + mobile card menu */
.hdr26 .hdr26-burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; border-radius: 10px; padding: 0; }
.hdr26 .hdr26-burger span { display: block; width: 22px; height: 2px; background: var(--neutral-900); margin: 5px auto; border-radius: 2px; transition: transform .3s, opacity .3s; }
.hdr26.nav-open .hdr26-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hdr26.nav-open .hdr26-burger span:nth-child(2) { opacity: 0; }
.hdr26.nav-open .hdr26-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.hdr26 .hdr26-sheet { display: none; }
@media (max-width: 1080px) {
  .hdr26 { top: 10px; left: 10px; right: 10px; width: auto; max-width: none; transform: none; border-radius: 16px; }
  .hdr26 .hdr26-nav { height: 64px; padding: 0 8px 0 16px; }
  .hdr26 .hdr26-links, .hdr26 .hdr26-actions .hdr26-btn { display: none; }
  .hdr26 .hdr26-burger { display: block; }
  .hdr26 .hdr26-sheet { display: block; position: absolute; top: calc(100% + 8px); left: 0; right: 0; bottom: auto; max-height: calc(100vh - 110px); background: var(--neutral-100); padding: 8px 20px 20px; border: 1px solid var(--neutral-300); border-radius: 16px; box-shadow: 0 16px 32px rgba(7,7,15,.10); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s; overflow: auto; }
  .hdr26.nav-open .hdr26-sheet { opacity: 1; visibility: visible; transform: none; }
  .hdr26 .hdr26-sheet a { display: block; padding: 14px 0; border-bottom: 1px solid var(--neutral-300); font-size: 1.25rem; font-weight: 500; line-height: 1.6; color: var(--neutral-900); text-decoration: none; letter-spacing: -.02em; }
  .hdr26 .hdr26-sheet .hdr26-btn { display: flex; margin-top: 24px; width: 100%; justify-content: center; border-bottom: 0; font-size: 1rem; }
}

/* ---------- theme toggle: floating faceted disc, the site's only theme switch ---------- */
.theme-fab { position: fixed; left: 18px; bottom: 18px; z-index: 9990; display: flex; align-items: center; gap: 0; height: 48px; padding: 0 6px; margin: 0; border-radius: 999px; border: 1px solid var(--neutral-300); background: color-mix(in srgb, var(--neutral-100) 82%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 8px 24px rgba(7,7,15,.10); color: var(--neutral-900); font: 500 .875rem var(--font); cursor: pointer; overflow: hidden; transition: gap .3s var(--ease-out), padding .3s var(--ease-out), border-color .2s; }
.theme-fab .disc { width: 34px; height: 34px; flex: none; transition: transform .7s var(--ease-spring); }
.theme-fab.on .disc { transform: rotate(180deg); }
.theme-fab .rim { fill: none; stroke: var(--neutral-900); stroke-width: 1.5; }
.theme-fab .half-a { fill: #07070F; }
.theme-fab .half-b { fill: #F4F1E6; }
/* the approved reference renders this green facet invisible (opacity 0); remove the opacity to show it */
.theme-fab .facet { fill: var(--green); opacity: 0; }
.theme-fab .facet2 { fill: #CFC7C0; }
.theme-fab .lbl { max-width: 0; opacity: 0; white-space: nowrap; font: inherit; color: inherit; letter-spacing: inherit; line-height: 1; transition: max-width .35s var(--ease-out), opacity .25s; }
.theme-fab:hover, .theme-fab:focus-visible { gap: 10px; padding: 0 16px 0 6px; border-color: var(--neutral-500); }
.theme-fab:hover .lbl, .theme-fab:focus-visible .lbl { max-width: 120px; opacity: 1; }
body.hdr26-open .theme-fab { display: none; }
body.dark-theme .theme-fab { box-shadow: 0 8px 24px rgba(0,0,0,.5); }
@media (max-width: 700px) { .theme-fab { left: 12px; bottom: 12px; height: 44px; } .theme-fab .disc { width: 30px; height: 30px; } }

/* smooth color change while the theme flips */
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after { transition: background-color .5s ease, color .5s ease, border-color .5s ease, fill .5s ease, filter .5s ease !important; }

@media (prefers-reduced-motion: reduce) {
  .hdr26, .hdr26 *, .theme-fab, .theme-fab * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
