/* ==========================================================================
   GOINFOHUB · "THE PRACTICAL INSTRUMENT DESK"
   Vintage Warm Design System v3.0  —  complete front-end refactor
   --------------------------------------------------------------------------
   Design context
     Users      : search-driven, one-off calculator users (EN default)
     Job        : find an instrument fast -> compute -> leave
     Personality: analog, archival, warm, quietly authoritative
     Direction  : 1970s printed catalogue + letterpress + card-catalogue index
     Anti-ref   : blueprint grids, glass/blur, cool blue, cute caramel
     Constraints: zero-build static site · no external fonts/CDN/icons
                  all 114 pages · all calculation logic untouched · WCAG AA

   Token layers
     L1 primitive  — aged paper, sepia ink, rust, ochre, olive (raw swatches)
     L2 semantic   — the ONLY layer components consume (light + night edition)
     L3 legacy     — alias bridge for the 28 migrated legacy stylesheets
     L4 components — masthead, card-catalogue rail, ledger index, tool pages

   Load order (must stay last of the global stylesheets):
     css-2.css -> vintage/theme.css -> vintage/quick-desk.css

   Layout rewrite
     before : 64px utility bar + off-canvas drawer + blueprint hero + 2-col cards
     after  : edition line + newspaper masthead + department rule
              + persistent card-catalogue rail (drawer under 1024px)
              + editorial hero spread + ledger-style ruled index

   Contrast (computed, WCAG AA >= 4.5:1 — all pass)
     ink #2E2016 / paper #F3E6CD .......... 12.75:1
     secondary #5A4230 / paper #F3E6CD ..... 7.54:1
     link #8A331B / paper #F3E6CD .......... 6.62:1
     CTA #FDF7EA / espresso #3E2C1E ....... 12.42:1
     rust #A84624 / sheet #F9F0DE .......... 5.20:1
     night #F0DFC3 / espresso #241911 ..... 13.13:1
   ========================================================================== */

/* ============================================================ L1 PRIMITIVES */
:root {
  /* aged paper */
  --paper-0:   #FDF7EA;
  --paper-50:  #F9F0DE;
  --paper-100: #F3E6CD;
  --paper-200: #EAD7B7;
  --paper-300: #DFC79F;
  --paper-400: #C9AC81;
  --paper-500: #AD8C60;

  /* sepia ink */
  --ink-900: #2E2016;
  --ink-800: #3E2C1E;
  --ink-700: #5A4230;
  --ink-600: #745A41;
  --ink-500: #8E7458;
  --ink-400: #AC9273;

  /* warm accents */
  --rust-300: #E0AE8A;
  --rust-500: #C06336;
  --rust-600: #A84624;
  --rust-700: #8A331B;
  --rust-800: #6E2814;
  --brick-700: #8C3F2C;
  --ochre-400: #D9AA4A;
  --ochre-600: #B5801F;
  --olive-700: #4F6136;
  --sage-600:  #6B7A4B;
  --wine-700:  #7A2E2A;

  /* night edition primitives */
  --night-0:   #1B120C;
  --night-100: #241911;
  --night-200: #2F2117;
  --night-300: #3B2B1D;
  --night-400: #55402B;
  --night-500: #71573B;

  /* L1 alias names still consumed by the 28 legacy sheets */
  --cream-50:  var(--paper-0);
  --cream-100: var(--paper-50);
  --cream-200: var(--paper-200);
  --cream-300: var(--paper-300);
  --cream-400: var(--paper-400);
  --caramel-500: var(--rust-600);
  --caramel-600: var(--rust-700);
  --toffee-700: var(--rust-700);
  --toffee-800: var(--rust-800);
  --cocoa-850: var(--ink-700);
  --cocoa-900: var(--ink-800);
  --cocoa-950: var(--ink-900);

  --green-solid: #4F6136; --green-text: #3F5029; --green-bg: #E4E6CE; --green-border: #B9BE96;
  --amber-solid: #9A6A16; --amber-text: #7A5310; --amber-bg: #F3E2BC; --amber-border: #D9BC81;
  --red-solid:   #8C3F2C; --red-text:   #7A2E2A; --red-bg:   #F2D9CE; --red-border:   #D9AC98;
  --blue-solid:  #6B5A3A; --blue-text:  #57472C; --blue-bg:  #EADFC5; --blue-border:  #CBB894;
}

/* ======================================================= L2 SEMANTIC · DAY */
:root {
  --bg-page: var(--paper-100);
  --bg-surface: var(--paper-50);
  --bg-subtle: var(--paper-200);
  --bg-inset: var(--paper-300);
  --bg-accent-soft: #F0DEC0;

  --text-primary: var(--ink-900);
  --text-secondary: var(--ink-700);
  --text-placeholder: var(--ink-500);
  --text-disabled: var(--ink-400);
  --text-on-cta: var(--paper-0);
  --text-on-accent: var(--paper-0);

  --border: var(--paper-400);
  --border-strong: var(--paper-500);

  --primary: var(--rust-600);
  --primary-hover: var(--rust-700);
  --primary-active: var(--rust-800);
  --primary-subtle: #EFD9BC;
  --accent: var(--ochre-600);
  --accent-hover: #946613;
  --link: var(--rust-700);
  --link-hover: var(--rust-800);

  --cta-bg: var(--ink-800);
  --cta-text: var(--paper-0);
  --cta-hover-bg: var(--ink-700);
  --cta-active-bg: var(--rust-700);

  --success-solid: var(--green-solid); --success-text: var(--green-text);
  --success-bg: var(--green-bg);       --success-border: var(--green-border);
  --warning-solid: var(--amber-solid); --warning-text: var(--amber-text);
  --warning-bg: var(--amber-bg);       --warning-border: var(--amber-border);
  --error-solid: var(--red-solid);     --error-text: var(--red-text);
  --error-bg: var(--red-bg);           --error-border: var(--red-border);
  --info-solid: var(--blue-solid);     --info-text: var(--blue-text);
  --info-bg: var(--blue-bg);           --info-border: var(--blue-border);

  /* type — a serif body is the single biggest departure from the blueprint */
  --font-display: "Baskerville", "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  --font-sans: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --text-xs: 10.5px; --text-sm: 12px; --text-md: 13px; --text-base: 16px;
  --text-lg: 18px; --text-xl: 21px; --text-2xl: 26px; --text-3xl: 32px;
  --text-4xl: 42px; --text-5xl: 56px; --text-6xl: 74px;
  --leading-tight: 1.08; --leading-snug: 1.32; --leading-normal: 1.65; --leading-relaxed: 1.85;

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px;

  --radius-xs: 1px; --radius-sm: 2px; --radius-md: 3px;
  --radius-lg: 4px; --radius-xl: 6px; --radius-full: 999px;

  --shadow-sm: 2px 2px 0 var(--paper-300);
  --shadow-md: 3px 3px 0 var(--paper-400);
  --shadow-lg: 6px 6px 0 var(--paper-300);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 140ms; --duration-base: 220ms; --duration-slow: 360ms;

  --rule-thin: 1px solid var(--border);
  --rule-double: 3px double var(--border-strong);
  --paper-grain:
    radial-gradient(ellipse at 8% 4%, rgba(140, 91, 42, 0.075) 0%, transparent 42%),
    radial-gradient(ellipse at 92% 78%, rgba(140, 91, 42, 0.06) 0%, transparent 46%),
    radial-gradient(ellipse at 46% 108%, rgba(122, 46, 42, 0.045) 0%, transparent 52%);
}

/* ==================================================== L2 SEMANTIC · NIGHT */
[data-theme="dark"] {
  --bg-page: var(--night-100);
  --bg-surface: var(--night-200);
  --bg-subtle: var(--night-300);
  --bg-inset: var(--night-300);
  --bg-accent-soft: #3D2C1C;

  --text-primary: #F0DFC3;
  --text-secondary: #C9AF8D;
  --text-placeholder: #A68B6C;
  --text-disabled: #82694F;
  --text-on-cta: #241911;
  --text-on-accent: #241911;

  --border: #55402B;
  --border-strong: #71573B;

  --primary: #DE9A63;
  --primary-hover: #EDB27C;
  --primary-active: #F2C393;
  --primary-subtle: #3D2C1C;
  --accent: #D9AA4A;
  --accent-hover: #E8BF68;
  --link: #E5A974;
  --link-hover: #F2C393;

  --cta-bg: #D9AA4A;
  --cta-text: #241911;
  --cta-hover-bg: #E8BF68;
  --cta-active-bg: #DE9A63;

  --success-solid: #A8BE83; --success-text: #C2D3A4; --success-bg: #33402A; --success-border: #556B43;
  --warning-solid: #DBAE5C; --warning-text: #E9C982; --warning-bg: #463519; --warning-border: #7A5D2C;
  --error-solid: #D98C77;   --error-text: #E7AA98;   --error-bg: #47291F;   --error-border: #8A4E3B;
  --info-solid: #C6AE7E;    --info-text: #DCC9A4;    --info-bg: #3C3120;    --info-border: #6B5738;

  --shadow-sm: 2px 2px 0 #120B07;
  --shadow-md: 3px 3px 0 #120B07;
  --shadow-lg: 6px 6px 0 #120B07;
  --paper-grain:
    radial-gradient(ellipse at 8% 4%, rgba(222, 154, 99, 0.055) 0%, transparent 42%),
    radial-gradient(ellipse at 92% 78%, rgba(222, 154, 99, 0.045) 0%, transparent 46%);
}

/* ======================================================= L3 LEGACY BRIDGE
   css-2.css aliases every old variable to these semantic names. Declaring
   them again here (concrete, last-wins) keeps all 28 legacy tool sheets
   on the new palette without touching a single calculation rule.        */
:root {
  --c-bg: var(--bg-page);
  --c-surface: var(--bg-surface);
  --c-ink: var(--text-primary);
  --c-ink-soft: var(--text-secondary);
  --c-muted: var(--text-secondary);
  --c-brand: var(--rust-700);
  --c-brand-dark: var(--ink-900);
  --c-brand-mid: var(--rust-600);
  --c-brand-soft: var(--paper-200);
  --c-accent: var(--rust-700);
  --c-accent-dark: var(--ink-800);
  --c-accent-soft: var(--paper-200);
  --c-warn: var(--warning-text);
  --c-warn-soft: var(--warning-bg);
  --c-danger: var(--error-text);
  --c-danger-soft: var(--error-bg);
  --c-ok: var(--success-text);
  --c-ok-soft: var(--success-bg);
  --c-border: var(--border);
  --c-shadow: var(--shadow-sm);
  --radius: var(--radius-md);
  --maxw: 1180px;
  --font: var(--font-sans);
  --mono: var(--font-mono);

  --brand: var(--rust-700);
  --brand-soft: var(--paper-200);
  --brand-strong: var(--ink-900);
  --primary-soft: var(--paper-200);
  --primary-strong: var(--ink-900);
  --primary-dark: var(--ink-900);
  --primary-deep: var(--ink-900);
  --primary-light: var(--paper-300);
  --accent-soft: var(--paper-200);
  --accent-strong: var(--rust-700);
  --accent-2: var(--ochre-600);
  --accent-text: var(--link);
  --accent-active: var(--rust-800);
  --accent-quiet: var(--paper-300);
  --accent-quiet-hover: var(--paper-200);
  --bg: var(--bg-page);
  --surface: var(--bg-surface);
  --surface-2: var(--bg-subtle);
  --card: var(--bg-surface);
  --text: var(--text-primary);
  --text-soft: var(--text-secondary);
  --text-tertiary: var(--text-secondary);
  --ink: var(--text-primary);
  --ink-2: var(--text-secondary);
  --ink-soft: var(--text-secondary);
  --muted: var(--text-secondary);
  --line: var(--border);
  --border-subtle: var(--border);
  --shadow: var(--shadow-sm);
  --danger: var(--error-text);
  --danger-soft: var(--error-bg);
  --danger-solid: var(--error-solid);
  --danger-text: var(--error-text);
  --ok: var(--success-text);
  --ok-soft: var(--success-bg);
  --good: var(--success-text);
  --green: var(--success-text);
  --green-soft: var(--success-bg);
  --warn: var(--warning-text);
  --rose: var(--error-text);
  --rose-soft: var(--error-bg);
  --red: var(--error-text);
  --red-soft: var(--error-bg);
  --teal: var(--rust-700);
  --teal-soft: var(--paper-200);
  --blue: var(--info-solid);
  --blue-soft: var(--info-bg);
  --bg-inverse: var(--ink-800);
  --text-on-inverse: var(--text-on-cta);
  --code-bg: var(--ink-900);
  --code-ink: var(--paper-0);
  --bg-canvas: var(--bg-page);
  --bg-subtle-2: var(--bg-subtle);
}

/* ==================================================================== BASE */
html body {
  margin: 0;
  background-color: var(--bg-page);
  background-image: var(--paper-grain);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}
html body h1, html body h2, html body h3, html body h4, html body h5, html body h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.012em;
  line-height: var(--leading-snug);
}
html body a { color: var(--link); text-decoration: none; }
html body a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }
html body :focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
html body ::selection { background: var(--rust-300); color: var(--ink-900); }
html body hr { border: 0; border-top: var(--rule-thin); }
html body code, html body kbd, html body samp, html body pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
html body code, html body kbd {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 1px 5px;
}

/* ============================================================ 1 · EDITION */
html body .od-topbar {
  position: static;
  background: transparent;
  border: 0;
  backdrop-filter: none;
  z-index: auto;
}
html body .gh-edition {
  background: var(--ink-800);
  color: var(--paper-200);
  border-bottom: 1px solid var(--ink-700);
}
.gh-edition-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 7px 34px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.gh-edition-left { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-edition-center { color: var(--ochre-400); white-space: nowrap; }
.gh-edition-right { justify-self: end; display: flex; align-items: center; gap: 14px; }
html body .gh-edition .od-lang {
  display: flex;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
html body .gh-edition .od-lang a,
html body .gh-edition .od-lang a.od-active {
  color: var(--paper-200);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  border: 1px solid var(--ink-600);
  padding: 2px 7px;
  border-radius: 0;
  background: transparent;
}
html body .gh-edition .od-theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 24px;
  padding: 0;
  color: var(--paper-200);
  background: transparent;
  border: 1px solid var(--ink-600);
  border-radius: 0;
  cursor: pointer;
}
html body .gh-edition .od-theme-toggle:hover { color: var(--ochre-400); border-color: var(--ochre-400); }
.od-theme-toggle svg { width: 14px; height: 14px; }
/* theme icon visibility is inherited from css-2.css (moon in day, sun at night) */

/* ============================================================ 2 · MASTHEAD */
.gh-masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background-color: var(--bg-surface);
  background-image: var(--paper-grain);
  border-bottom: var(--rule-double);
  box-shadow: 0 3px 0 rgba(120, 84, 47, 0.07);
}
.gh-masthead-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 34px 12px;
  display: flex;
  align-items: center;
  gap: 22px;
}
html body .od-hamburger {
  display: none;
  flex: 0 0 auto;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  color: var(--text-primary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  cursor: pointer;
}
html body .od-hamburger:hover { background: var(--bg-inset); }
html body .od-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-weight: 400;
  white-space: nowrap;
}
html body .od-brand:hover { text-decoration: none; color: var(--text-primary); }
.gh-emblem { display: block; width: 44px; height: 44px; flex: 0 0 44px; color: var(--rust-700); }
html[data-theme="dark"] .gh-emblem { color: var(--primary); }
.gh-emblem svg { display: block; width: 44px; height: 44px; }
.gh-brand-text { display: flex; flex-direction: column; gap: 1px; }
html body .od-brand .od-brand-name {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--ink-900);
}
html body .od-brand .od-brand-name b { font-weight: 600; color: var(--rust-700); }
.gh-brand-sub {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
html body .od-topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.gh-masthead-note {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-left: 1px solid var(--border);
  padding-left: 18px;
  line-height: 1.5;
}
html body div.od-search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 250px;
  padding: 9px 12px;
  background: var(--paper-0);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
}
html body div.od-search > svg {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}
html body div.od-search > input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  outline: none;
  box-shadow: none;
}
html body div.od-search > input::placeholder { color: var(--text-placeholder); }
html body div.od-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-subtle); }

/* department rule — constrained to the same 1440px axis as masthead-inner / od-layout */
html body .od-nav {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 34px;
  border-top: 1px solid var(--border);
}
html body .od-nav a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 22px;
  border-right: 1px solid var(--border);
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}
html body .od-nav a:first-child { border-left: 1px solid var(--border); }
html body .od-nav a:hover { background: var(--bg-subtle); color: var(--rust-700); text-decoration: none; }
html body .od-nav a.od-active { background: var(--rust-700); color: var(--paper-0); }
.gh-nav-num { color: var(--ochre-600); font-size: 10px; }
html body .od-nav a.od-active .gh-nav-num { color: var(--paper-300); }
.gh-nav-fill {
  flex: 1 1 auto;
  margin-left: auto;
  padding: 9px 0 9px 0;
  align-self: center;
  text-align: right;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-placeholder);
}

/* ============================================================ 3 · LAYOUT */
html body .od-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  align-items: stretch;
  max-width: 1440px;
  min-height: calc(100vh - 180px);
  margin: 0 auto;
  padding: 0;
}
html body .od-content {
  min-width: 0;
  width: 100%;
  max-width: none;
  padding: 34px 46px 84px;
  margin: 0;
  /* full-height column rule, independent of the sticky rail's own height */
  border-left: 3px double var(--border-strong);
}
html body .od-content .container { max-width: 100%; margin: 0; }

/* card-catalogue rail */
html body .od-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  width: 268px;
  max-width: none;
  height: auto;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  padding: 30px 22px 40px 34px;
  background: transparent;
  border-right: 0;
  box-shadow: none;
  transform: none;
  transition: none;
  scrollbar-width: thin;
}
.gh-rail-head { padding-bottom: 20px; margin-bottom: 22px; border-bottom: var(--rule-double); }
.gh-rail-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust-700);
  margin-bottom: 10px;
}
.gh-rail-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.gh-rail-note { margin: 0; font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.5; }
html body .od-side-group { margin: 0 0 26px; }
html body .od-side-title {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 0 0 8px;
  padding: 0 0 7px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.gh-side-num { color: var(--rust-600); font-size: 10px; }
.gh-side-count { margin-left: auto; color: var(--text-placeholder); letter-spacing: 0.04em; }
html body .od-side-group a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 7px 5px 4px;
  border-radius: 0;
  border-bottom: 1px dotted var(--border);
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}
html body .od-side-group a:hover { background: var(--bg-subtle); color: var(--rust-700); text-decoration: none; }
html body .od-side-group a.od-active {
  background: var(--rust-700);
  color: var(--paper-0);
  border-bottom-color: var(--rust-700);
  padding-left: 8px;
}
.gh-side-idx {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ochre-600);
}
html body .od-side-group a.od-active .gh-side-idx { color: var(--paper-300); }
.gh-rail-foot {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-placeholder);
}
html body .od-sidebar-backdrop { display: none; }

/* ============================================================ 4 · FOOTER */
html body .od-footer {
  background: var(--ink-800);
  color: var(--paper-200);
  border-top: 4px double var(--ink-600);
  font-size: var(--text-sm);
}
html body .od-footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 34px 32px;
  align-items: start;
}
.gh-foot-brand { display: flex; flex-direction: column; gap: 10px; }
.gh-foot-word {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--paper-0);
}
.gh-foot-word b { color: var(--ochre-400); font-weight: 600; }
.gh-foot-brand p { margin: 0; max-width: 330px; color: var(--paper-300); line-height: 1.6; }
.gh-foot-col h3 {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ochre-400);
}
.gh-foot-col a, .gh-foot-col span { display: block; color: var(--paper-200); margin-bottom: 7px; }
html body .od-footer a { color: var(--paper-200); }
html body .od-footer a:hover { color: var(--ochre-400); }
.gh-foot-base {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--ink-600);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-400);
}

/* ======================================================== 5 · HOME HERO */
.gh-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.75fr);
  gap: 0;
  border-top: var(--rule-double);
  border-bottom: var(--rule-double);
}
.gh-hero-copy { padding: 34px 44px 40px 0; }
.gh-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust-700);
}
.gh-kicker::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--border); }
.gh-hero h1 {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(44px, 5.1vw, 76px);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.035em;
  color: var(--ink-900);
}
.gh-hero h1 em {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--rust-700);
}
.gh-hero .gh-lede,
html body .od-content .gh-lede {
  max-width: 560px;
  margin: 0 0 26px;
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}
html body .atlas-command {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 520px;
  padding: 12px 14px;
  background: var(--paper-0);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  box-shadow: 3px 3px 0 var(--bg-inset);
  color: var(--text-secondary);
}
html body .atlas-command:focus-within { border-color: var(--primary); box-shadow: 3px 3px 0 var(--bg-inset), 0 0 0 3px var(--primary-subtle); }
html body .atlas-command > svg { flex: 0 0 18px; width: 18px; height: 18px; }
html body .atlas-command input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  font-family: var(--font-mono);
  font-size: var(--text-md);
  color: var(--text-primary);
  outline: none;
}
html body .atlas-command input::placeholder { color: var(--text-placeholder); }
html body .atlas-command kbd {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 3px 7px;
}
.gh-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.gh-hero-meta span::before { content: "✦"; color: var(--ochre-600); margin-right: 8px; }

/* the plate: seal + statistics */
.gh-hero-plate {
  border-left: 1px solid var(--border-strong);
  padding: 30px 0 32px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(90deg, rgba(173, 140, 96, 0.07), transparent 60%);
}
.gh-seal { width: 150px; height: 150px; margin: 0 0 22px; color: var(--rust-700); }
html[data-theme="dark"] .gh-seal { color: var(--primary); }
.gh-seal svg { width: 150px; height: 150px; display: block; }
html body .atlas-stats {
  width: 100%;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border-strong);
}
html body .atlas-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--border);
}
html body .atlas-stat dt {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
html body .atlas-stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 27px;
  line-height: 1;
  color: var(--rust-700);
}
html body .atlas-note {
  margin: 16px 0 0;
  font-size: var(--text-sm);
  font-style: italic;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ======================================================= 6 · HOME INDEX */
html body .atlas-index-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 46px 0 6px;
  padding-bottom: 12px;
  border-bottom: var(--rule-double);
}
html body .atlas-index-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.025em;
}
html body .atlas-index-head span {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
html body .od-home { display: block; margin: 0; }
html body .od-home .od-cat { margin: 0; padding: 26px 0 12px; border-bottom: 1px solid var(--border); }
html body .od-home .od-cat:last-of-type { border-bottom: 0; }
html body .od-home .od-cat-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 14px;
}
html body .od-home .od-cat-head .atlas-cat-num {
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 0.9;
  font-weight: 400;
  color: var(--paper-400);
  letter-spacing: -0.04em;
}
html body .od-home .od-cat-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
}
html body .od-home .od-cat-head .atlas-cat-count {
  margin-left: auto;
  padding: 2px 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  background: var(--bg-subtle);
}
html body .od-home .od-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 34px;
  border-top: 1px solid var(--border);
}
html body .od-home .tool-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  align-items: start;
  gap: 10px;
  margin: 0;
  padding: 11px 8px 12px 4px;
  border: 0;
  border-bottom: 1px dotted var(--border-strong);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  color: var(--text-primary);
  transition: background var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out);
}
html body .od-home .tool-card:hover {
  background: var(--bg-subtle);
  text-decoration: none;
  transform: translateX(3px);
  box-shadow: none;
}
html body .od-home .tool-card .atlas-num {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
  color: var(--ochre-600);
  letter-spacing: 0.02em;
}
html body .od-home .tool-card .atlas-row { min-width: 0; }
html body .od-home .tool-card h3 {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink-900);
}
html body .od-home .tool-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}
html body .od-home .tool-card .atlas-arrow {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.5;
  color: var(--rust-600);
  opacity: 0.45;
  transition: opacity var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out);
}
html body .od-home .tool-card:hover .atlas-arrow { opacity: 1; transform: translate(2px, -2px); }
html body .od-home .tool-card:focus-visible .atlas-arrow { opacity: 1; }
html body .od-empty {
  display: none;
  margin: 28px 0;
  padding: 22px;
  border: var(--rule-double);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-align: center;
}
html body .atlas-foot {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 34px;
  padding: 18px 20px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
html body .atlas-foot strong { color: var(--ink-900); }
html body .atlas-foot a { color: var(--link); }

/* ==================================================== 7 · TOOL PAGES */
html body .od-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
html body .od-crumb a { color: var(--link); }
html body .od-content .hero {
  margin: 0 0 26px;
  padding: 26px 30px 22px;
  text-align: left;
  background-color: var(--bg-surface);
  background-image: var(--paper-grain);
  border: 1px solid var(--border-strong);
  border-top: 4px double var(--border-strong);
  border-radius: var(--radius-xs);
  box-shadow: 3px 3px 0 var(--bg-inset);
}
html body .od-content .hero h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink-900);
}
html body .od-content .hero p {
  max-width: 700px;
  margin: 0;
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--text-secondary);
  -webkit-text-fill-color: currentcolor;
}
html body .od-content .container { max-width: 100%; }
html body .od-content :where(.calc-card, .tool-box, .card, .panel, .box, .new-card, .tool-card-inner) {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  box-shadow: 3px 3px 0 var(--bg-inset);
  padding: 24px;
}
html body .od-content :where(.calc-card, .tool-box, .card, .panel, .box) h2,
html body .od-content :where(.calc-card, .tool-box, .card, .panel, .box) h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
html body .od-content label,
html body .od-content .label,
html body .od-content .field label,
html body .od-content .form-section,
html body .od-content .section-title {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
html body .od-content :where(input, select, textarea) {
  background: var(--paper-0);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-md);
  padding: 10px 12px;
  box-shadow: none;
}
html body .od-content :where(input, select, textarea):focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
  outline: none;
}
html body .od-content :is(input[type="range"], input[type="checkbox"], input[type="radio"]) { accent-color: var(--primary); }
html body .od-content :where(.btn, button.btn, .btn-primary, button[type="submit"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 22px;
  background: var(--cta-bg);
  color: var(--cta-text);
  border: 1px solid var(--cta-bg);
  border-radius: var(--radius-xs);
  box-shadow: 3px 3px 0 var(--bg-inset);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out), background var(--duration-fast) ease;
}
html body .od-content :where(.btn, button.btn, .btn-primary, button[type="submit"]):hover {
  background: var(--cta-hover-bg);
  border-color: var(--cta-hover-bg);
  color: var(--cta-text);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--bg-inset);
  text-decoration: none;
}
html body .od-content :where(.btn, button.btn, .btn-primary, button[type="submit"]):active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--bg-inset);
}
html body .od-content :where(.btn-reset, .btn-secondary, .btn-ghost, button[type="reset"], .tab, .tip-pill, .chip, .pill) {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  box-shadow: none;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  min-height: 38px;
  padding: 8px 14px;
  cursor: pointer;
}
html body .od-content :where(.btn-reset, .btn-secondary, .btn-ghost, button[type="reset"], .tab, .tip-pill, .chip, .pill):hover { background: var(--bg-inset); color: var(--text-primary); }
html body .od-content :where(.tab.active, .tip-pill.active, .pill.active, .chip.active) {
  background: var(--rust-700);
  border-color: var(--rust-700);
  color: var(--paper-0);
}
html body .od-content :where(.result-hero, .score-hero, .result-box) {
  background: var(--ink-800);
  background-image: none;
  border: 1px solid var(--ink-800);
  color: var(--paper-0);
  -webkit-text-fill-color: currentcolor;
}
html body .od-content :where(.result-hero, .score-hero) * { color: inherit; -webkit-text-fill-color: currentcolor; }
html body .od-content :where(.result-hero .value, .score-hero .value, .result-title, .result-stat) {
  font-family: var(--font-display);
  color: var(--paper-0);
}
html body .od-content :where(.result-stat, .stat, .result, .reult, .result-grid, .reut-grid, .result-card) {
  border-color: var(--border);
  background: var(--bg-surface);
}
html body .od-content :where(.result-stat, .stat) .value { font-family: var(--font-display); color: var(--rust-700); }
html body .od-content table { border-collapse: collapse; width: 100%; background: var(--bg-surface); }
html body .od-content :where(th, td) { border-bottom: 1px solid var(--border); padding: 9px 11px; color: var(--text-primary); }
html body .od-content th {
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: left;
}
html body .od-content :where(.prose, .legal, article) {
  font-family: var(--font-serif);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
}
html body .od-content .prose h2 {
  margin-top: 32px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
}
html body .od-content :where(.muted, .hint, .lede, .lead, .eyebrow, .legal-meta, .sub) { color: var(--text-secondary); }
html body .od-content .eyebrow,
html body .od-content .section-kicker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust-700);
}
html body .od-content .od-related {
  margin: 34px 0 8px;
  padding-top: 18px;
  border-top: var(--rule-double);
}
html body .od-content .od-related h2 { font-family: var(--font-display); font-size: var(--text-xl); }
html body .od-content .od-related a { color: var(--link); }
html body .od-content :where(.badge, .tag, .status, .empty, .note, .callout) {
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-secondary);
}
/* sharpen legacy pill / segmented controls to match the letterpress grid */
html body .od-content :where(.radio-pill, .seg-btn, .segmented, .toggle-pill, .option, .choice, .btn-group) {
  border-radius: var(--radius-xs);
}
/* last cold-legacy swatches: one blue badge + cool table row hovers */
html body .od-content :where(.badge-minor) { background: var(--info-bg); color: var(--info-text); }
html body .od-content :where(.badge-major) { background: var(--warning-bg); color: var(--warning-text); }
html body .od-content table tbody tr:hover { background: var(--bg-subtle); }
html body .od-content :where(.ok, .success, .good) { color: var(--success-text); }
html body .od-content :where(.warn, .warning) { color: var(--warning-text); }
html body .od-content :where(.error, .danger, .field-error) { color: var(--error-text); }

/* ================================================== 9 · NIGHT EDITION */
html[data-theme="dark"] body { background-color: var(--bg-page); }
html[data-theme="dark"] body .gh-edition { background: var(--night-0); border-bottom-color: var(--night-400); }
html[data-theme="dark"] body .gh-masthead { box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); }
html[data-theme="dark"] body .od-brand .od-brand-name { color: var(--text-primary); }
html[data-theme="dark"] body .od-brand .od-brand-name b { color: var(--primary); }
html[data-theme="dark"] body div.od-search { background: var(--bg-page); }
html[data-theme="dark"] body .od-nav a.od-active { background: var(--rust-700); color: var(--paper-0); }
html[data-theme="dark"] body .gh-hero h1 { color: var(--text-primary); }
html[data-theme="dark"] body .gh-hero h1 em { color: var(--primary); }
html[data-theme="dark"] body .atlas-command { background: var(--bg-page); }
html[data-theme="dark"] body .od-cat-head .atlas-cat-num { color: var(--night-500); }
html[data-theme="dark"] body .tool-card h3 { color: var(--text-primary); }
html[data-theme="dark"] body .atlas-foot strong { color: var(--text-primary); }

/* Repaint legacy hardcoded #fff surfaces so night edition never shows
   white panels with cream text. Buttons and results are handled below. */
html[data-theme="dark"] body .od-content :is(
  .hero, .calc-card, .tool-box, .card, .panel, .box, .new-card, .qty-card,
  .result, .result-box, .result-stat, .stat, .result-grid, .reut-grid, .result-card,
  .table-wrap, table, th, td, input, select, textarea, .field, .form-grid,
  .prose, .section, .legend-item, .tip-pill, .chip, .pill, .tab, .badge,
  .note, .callout, .empty, .score-meter, .result-hero, .score-hero, .reult
) {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border);
}
html[data-theme="dark"] body .od-content :is(input, select, textarea) { background-color: var(--bg-page); }
html[data-theme="dark"] body .od-content :where(.btn, button.btn, .btn-primary, button[type="submit"]) {
  background: var(--cta-bg);
  border-color: var(--cta-bg);
  color: var(--cta-text);
}
html[data-theme="dark"] body .od-content :where(.btn-reset, .btn-secondary, .btn-ghost, button[type="reset"], .tab, .tip-pill, .chip, .pill) {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
html[data-theme="dark"] body .od-content :where(.result-hero, .score-hero, .result-box) {
  background: var(--night-0);
  border-color: var(--night-500);
  color: var(--text-primary);
}
html[data-theme="dark"] body .od-content :where(.result-hero .value, .score-hero .value, .result-title, .result-stat) { color: var(--text-primary); }
html[data-theme="dark"] body .od-content :where(.result-stat .value, .stat .value) { color: var(--primary); }
html[data-theme="dark"] body .od-content th { background: var(--bg-subtle); }
html[data-theme="dark"] body .od-content .hero h1 { color: var(--text-primary); }
html[data-theme="dark"] body .od-content :where(.muted, .hint, .lede, .lead, .eyebrow) { color: var(--text-secondary); }
html[data-theme="dark"] body .od-footer { background: var(--night-0); }

/* ==================================================== 10 · RESPONSIVE */
@media (max-width: 1180px) {
  html body .od-layout { grid-template-columns: 234px minmax(0, 1fr); }
  html body .od-sidebar { width: 234px; padding-left: 22px; }
  html body .od-content { padding: 30px 30px 72px; }
  .gh-masthead-inner, .gh-edition-inner, .od-nav, .od-footer-inner { padding-left: 24px; padding-right: 24px; }
  .gh-hero-copy { padding-right: 28px; }
  .gh-hero-plate { padding-left: 24px; }
}

@media (max-width: 1023px) {
  html body .od-layout { display: block; min-height: calc(100vh - 170px); }
  html body .od-content { padding: 28px 26px 68px; border-left: 0; }
  html body .od-hamburger { display: inline-flex; }
  .gh-nav-fill { display: none; }
  /* css-2.css fixes the nav into a floating panel under 900px; outrank it */
  html body .od-topbar .od-nav { display: none; }
  html body .od-topbar .od-nav.od-open,
  html body .od-nav.od-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    padding: 0;
    border: 0;
    border-bottom: var(--rule-double);
    border-radius: 0;
    background: var(--bg-surface);
    box-shadow: 0 8px 16px rgba(46, 32, 22, 0.16);
  }
  html body .od-nav.od-open a { border-left: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 12px 24px; }
  .gh-masthead { position: sticky; }
  html body .od-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 300px;
    max-width: 88vw;
    height: 100vh;
    max-height: none;
    z-index: 90;
    padding: 82px 26px 36px;
    background-color: var(--bg-surface);
    background-image: var(--paper-grain);
    border-right: 1px solid var(--border-strong);
    box-shadow: 8px 0 24px rgba(46, 32, 22, 0.2);
    transform: translateX(-102%);
    transition: transform var(--duration-base) var(--ease-out);
  }
  html body .od-sidebar.od-open { transform: translateX(0); }
  html body .od-sidebar-backdrop.od-show {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(30, 20, 14, 0.52);
  }
  .gh-rail-head { padding-top: 6px; }
  .gh-hero { grid-template-columns: 1fr; }
  .gh-hero-copy { padding: 28px 0 26px; }
  .gh-hero-plate { border-left: 0; border-top: 1px solid var(--border-strong); padding: 24px 0 28px; flex-direction: row; flex-wrap: wrap; gap: 20px 30px; align-items: center; }
  .gh-seal { width: 112px; height: 112px; margin: 0; }
  .gh-seal svg { width: 112px; height: 112px; }
  html body .atlas-stats { flex: 1 1 260px; }
  html body .atlas-note { flex: 1 1 100%; margin: 0; }
  html body .od-home .od-cards { grid-template-columns: 1fr; }
  html body .od-footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .gh-edition-inner { grid-template-columns: 1fr auto; padding: 6px 16px; }
  .gh-edition-center { display: none; }
  .gh-masthead-inner { padding: 12px 16px 10px; gap: 12px; flex-wrap: wrap; }
  .gh-emblem { width: 36px; height: 36px; flex-basis: 36px; }
  .gh-emblem svg { width: 36px; height: 36px; }
  html body .od-brand .od-brand-name { display: inline; font-size: 26px; }
  .gh-brand-sub { font-size: 9px; letter-spacing: 0.2em; }
  html body .od-topbar-right { width: 100%; margin-left: 0; }
  html body div.od-search { min-width: 0; width: 100%; }
  .gh-masthead-note { display: none; }
  html body .od-content { padding: 22px 16px 56px; }
  html body .od-layout { min-height: calc(100vh - 150px); }
  .gh-kicker { font-size: 9.5px; letter-spacing: 0.1em; }
  .gh-kicker::after { display: none; }
  .gh-hero h1 { font-size: clamp(38px, 10vw, 56px); }
  .gh-hero .gh-lede { font-size: var(--text-base); }
  html body .od-content .hero { padding: 20px 18px; }
  html body .od-content :where(.calc-card, .tool-box, .card, .panel, .box) { padding: 18px; }
  html body .atlas-index-head h2 { font-size: var(--text-2xl); }
  html body .od-home .od-cat-head .atlas-cat-num { font-size: 36px; }
  html body .od-footer-inner { grid-template-columns: 1fr; gap: 22px; padding: 30px 16px 24px; }
  .gh-foot-base { flex-direction: column; }
}

@media (max-width: 420px) {
  .gh-edition-left { font-size: 9px; letter-spacing: 0.1em; }
  html body .od-brand .od-brand-name { font-size: 23px; }
  .gh-hero-meta { gap: 6px 14px; font-size: 9.5px; }
  html body .od-home .tool-card h3 { font-size: 16px; }
}

/* ==================================================== 11 · A11Y / PRINT */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .gh-edition, .od-hamburger, .od-nav, .od-search, .od-theme-toggle,
  .od-sidebar, .od-sidebar-backdrop, .gh-seal { display: none !important; }
  html body .od-layout { display: block; }
  html body .od-content { padding: 0; }
  html body .gh-masthead { position: static; box-shadow: none; }
  html body .od-home .tool-card { break-inside: avoid; }
}
