/* ==========================================================================
   The ReThink Planner — global stylesheet
   Aesthetic: "the ReThink worksheet in daylight" — the warm-broadsheet system
   from The ReThink (cream paper, warm ink, ONE dawn-amber accent, Fraunces +
   Newsreader), LIGHT as the default because a planner is a worksheet you fill
   in at a kitchen table, not an instrument you read after dark. Dark mode is
   the toggle (same warm-night surfaces as The Convergence, its sibling).
   Components consume ONLY tier-2 semantic tokens.
   ========================================================================== */

@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('./fonts/fraunces-wght.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Fraunces Variable';
  font-style: italic; font-weight: 100 900; font-display: swap;
  src: url('./fonts/fraunces-wght-italic.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Newsreader Variable';
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('./fonts/newsreader-wght.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Newsreader Variable';
  font-style: italic; font-weight: 100 900; font-display: swap;
  src: url('./fonts/newsreader-wght-italic.woff2') format('woff2-variations');
}

/* --------------------------------------------------------------------------
   1 · Tokens — Tier 1 primitives (identical to The ReThink family)
       Tier 2 semantic: LIGHT default (the worksheet), dark on toggle.
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  --paper-50:  oklch(0.977 0.009 85);
  --paper-100: oklch(0.955 0.013 84);
  --paper-200: oklch(0.925 0.017 82);
  --paper-300: oklch(0.880 0.020 80);

  --ink-950: oklch(0.215 0.016 60);
  --ink-800: oklch(0.320 0.020 58);
  --ink-600: oklch(0.455 0.022 57);
  --ink-400: oklch(0.610 0.020 60);
  --ink-300: oklch(0.700 0.016 62);

  --night-975: oklch(0.160 0.012 66);
  --night-950: oklch(0.185 0.014 65);
  --night-900: oklch(0.225 0.016 63);
  --night-800: oklch(0.275 0.018 62);

  --dawn-200: oklch(0.880 0.085 80);
  --dawn-300: oklch(0.840 0.110 75);
  --dawn-500: oklch(0.720 0.140 65);
  --dawn-600: oklch(0.620 0.130 55);
  --dawn-700: oklch(0.505 0.110 50);

  /* Two restrained companion hues for the scenario lines only — clay for the
     pessimistic line, sage for the optimistic. Never used for decoration. */
  --clay-600: oklch(0.560 0.105 35);
  --clay-300: oklch(0.740 0.085 38);
  --sage-600: oklch(0.560 0.085 155);
  --sage-300: oklch(0.760 0.080 152);

  /* Tier 2 — semantic (LIGHT default) */
  --surface:        var(--paper-50);
  --surface-deep:   var(--paper-100);
  --surface-raised: var(--paper-100);
  --surface-inset:  var(--paper-200);

  --ink:       var(--ink-950);
  --ink-muted: var(--ink-600);
  --ink-faint: var(--ink-400);

  --accent:        var(--dawn-600);
  --accent-strong: var(--dawn-700);
  --accent-soft:   var(--dawn-300);

  --rule:        color-mix(in oklch, var(--ink-950) 14%, transparent);
  --rule-strong: color-mix(in oklch, var(--ink-950) 40%, transparent);
  --highlight:   color-mix(in oklch, var(--dawn-300) 30%, transparent);
  --focus:       var(--dawn-600);

  --chart-grid:  color-mix(in oklch, var(--ink-950) 9%, transparent);
  --chart-axis:  var(--ink-400);
  --ln-trad: var(--ink-400);
  --ln-pess: var(--clay-600);
  --ln-base: var(--dawn-600);
  --ln-opt:  var(--sage-600);

  --font-display: 'Fraunces Variable', Georgia, 'Times New Roman', serif;
  --font-body:    'Newsreader Variable', Georgia, 'Times New Roman', serif;
  --font-figures: 'Fraunces Variable', Georgia, serif;

  --text-xs:   0.72rem;
  --text-sm:   0.9rem;
  --text-base: 1.125rem;
  --text-md:   1.406rem;
  --text-lg:   1.758rem;
  --text-xl:   2.197rem;
  --text-2xl:  2.747rem;
  --text-3xl:  clamp(2.5rem, 1.6rem + 3.5vw, 3.433rem);
  --text-4xl:  clamp(2.75rem, 1.5rem + 5vw, 4.292rem);

  --space-1: 0.25rem;  --space-2: 0.5rem;  --space-3: 0.75rem;  --space-4: 1rem;
  --space-6: 1.5rem;   --space-8: 2rem;    --space-12: 3rem;    --space-16: 4rem;
  --space-24: 6rem;    --space-32: 8rem;

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;

  --shadow-1: 0 1px 2px oklch(0.215 0.016 60 / 0.05);
  --shadow-2: 0 2px 8px oklch(0.215 0.016 60 / 0.07), 0 1px 2px oklch(0.215 0.016 60 / 0.05);
}

[data-theme='dark'] {
  color-scheme: dark;

  --surface:        var(--night-950);
  --surface-deep:   var(--night-975);
  --surface-raised: var(--night-900);
  --surface-inset:  var(--night-800);

  --ink:       var(--paper-100);
  --ink-muted: var(--ink-300);
  --ink-faint: oklch(0.520 0.018 62);

  --accent:        var(--dawn-300);
  --accent-strong: var(--dawn-200);
  --accent-soft:   var(--dawn-500);

  --rule:        color-mix(in oklch, var(--paper-100) 15%, transparent);
  --rule-strong: color-mix(in oklch, var(--paper-100) 42%, transparent);
  --highlight:   color-mix(in oklch, var(--dawn-500) 28%, transparent);
  --focus:       var(--dawn-300);

  --chart-grid:  color-mix(in oklch, var(--paper-100) 9%, transparent);
  --chart-axis:  var(--ink-faint);
  --ln-trad: oklch(0.560 0.018 62);
  --ln-pess: var(--clay-300);
  --ln-base: var(--dawn-300);
  --ln-opt:  var(--sage-300);

  --shadow-1: 0 1px 2px oklch(0.1 0.01 60 / 0.25);
  --shadow-2: 0 2px 10px oklch(0.1 0.01 60 / 0.35), 0 1px 2px oklch(0.1 0.01 60 / 0.25);
}

/* --------------------------------------------------------------------------
   2 · Base (shared family furniture)
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  font-optical-sizing: auto;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 580;
  font-variation-settings: 'SOFT' 40, 'WONK' 0;
  line-height: 1.2;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}
h1 { font-size: var(--text-2xl); line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: var(--text-xl);  line-height: 1.2;  letter-spacing: -0.01em; }
h3 { font-size: var(--text-lg);  line-height: 1.3; }

p, ul, ol { margin: 0 0 var(--space-4); }
img, svg { max-width: 100%; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
  transition: color 150ms ease;
}
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }

::selection { background: var(--highlight); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

hr, .dawn-rule {
  border: 0; height: 1px;
  margin: var(--space-16) auto;
  background: linear-gradient(90deg,
    var(--rule) 0%, var(--rule) 38%,
    var(--accent) 50%,
    var(--rule) 62%, var(--rule) 100%);
}

.dawn-text {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent-strong), var(--accent) 55%, var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.h-orn { font-size: 0.6em; margin-left: 0.4em; opacity: 0.85; vertical-align: 0.08em; }

.wrap { max-width: 72rem; margin-inline: auto; padding-inline: var(--space-4); }
@media (min-width: 48rem) { .wrap { padding-inline: var(--space-8); } }

.section { padding-block: var(--space-12); }
@media (min-width: 48rem) { .section { padding-block: var(--space-16); } }

.measure { max-width: 42rem; margin-inline: auto; }
.measure h2:not(:first-child) { margin-top: var(--space-12); }
.measure h3:not(:first-child) { margin-top: var(--space-8); }

.band {
  background: var(--surface-raised);
  border-block: 1px solid var(--rule);
  padding-block: var(--space-8);
}

.kicker {
  font-family: var(--font-display);
  font-weight: 500;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin: 0 0 var(--space-3);
}

.standfirst { font-size: var(--text-md); line-height: 1.45; color: var(--ink-muted); font-style: italic; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 30;
  background: var(--surface-raised); color: var(--ink);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--rule); border-radius: var(--radius-sm);
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }

/* Header / footer */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in oklch, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--space-2) var(--space-4);
  min-height: 56px; padding-block: var(--space-2);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--ink); text-decoration: none; }
.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
@media (min-width: 48rem) { .site-nav { gap: var(--space-6); } }
.site-nav a {
  font-size: var(--text-sm); letter-spacing: 0.01em;
  color: var(--ink-muted); text-decoration: none;
}
.site-nav a:hover {
  color: var(--accent-strong);
  text-decoration: underline; text-underline-offset: 0.35em; text-decoration-thickness: 1px;
}
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-muted); cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.theme-toggle:hover { background: var(--surface-inset); color: var(--ink); }
.theme-toggle .icon-sun { display: none; }
[data-theme='dark'] .theme-toggle .icon-sun { display: block; }
[data-theme='dark'] .theme-toggle .icon-moon { display: none; }
.no-js .theme-toggle { display: none; }

.site-footer {
  margin-top: var(--space-16);
  background: var(--surface-deep);
  border-top: 1px solid var(--rule);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}
.footer-inner { padding-block: var(--space-8); display: grid; gap: var(--space-3); }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* Hero + Overturn */
.hero { padding-block: var(--space-16) var(--space-8); }
@media (min-width: 48rem) { .hero { padding-block: var(--space-24) var(--space-12); } }
.hero-sub { max-width: 42rem; font-size: var(--text-md); line-height: 1.5; color: var(--ink-muted); }
.hero-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }

.overturn { display: grid; gap: var(--space-3); font-family: var(--font-display); margin: 0; }
.overturn h1, .overturn p { margin: 0; }
.overturn-old {
  position: relative; align-self: start; justify-self: start;
  text-decoration: none; color: var(--ink);
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  transition: color 900ms ease 300ms;
}
.overturn-old::after {
  /* one bar per wrapped line: a repeating gradient tiled to the line box,
     revealed left-to-right by animating clip-path (scaleX only drew one bar
     across the whole element, so wraps past line 1 went unstruck). */
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(to bottom,
    transparent 0, transparent calc(50% - 0.045em),
    var(--accent) calc(50% - 0.045em), var(--accent) calc(50% + 0.045em),
    transparent calc(50% + 0.045em), transparent 1lh);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 700ms cubic-bezier(0.65, 0, 0.35, 1);
}
.overturn-new {
  opacity: 0; transform: translateY(0.5em);
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  transition: opacity 800ms ease 750ms, transform 800ms ease 750ms;
}
.overturn.is-turned .overturn-old        { color: var(--ink-faint); }
.overturn.is-turned .overturn-old::after { clip-path: inset(0 0 0 0); }
.overturn.is-turned .overturn-new        { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .overturn-old, .overturn-old::after, .overturn-new { transition: none; }
}
.no-js .overturn .overturn-old        { color: var(--ink-faint); }
.no-js .overturn .overturn-old::after { clip-path: inset(0 0 0 0); }
.no-js .overturn .overturn-new        { opacity: 1; transform: none; }

.hero-overturn { max-width: 52rem; margin-block: var(--space-6) var(--space-8); }
.hero-overturn .overturn-old { font-size: var(--text-xl); font-weight: 500; line-height: 1.2; }
.hero-overturn .overturn-new { font-size: var(--text-3xl); font-weight: 590; line-height: 1.06; letter-spacing: -0.01em; }
@media (min-width: 64rem) {
  .hero-overturn .overturn-new { font-size: var(--text-4xl); line-height: 1.02; }
}

.thesis-chip {
  display: inline-block;
  font-family: var(--font-display);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  font-size: var(--text-sm);
  color: var(--accent);
  border: 1px solid color-mix(in oklch, var(--accent) 45%, transparent);
  border-radius: 999px;
  padding: 0.1em 0.8em;
}

/* --------------------------------------------------------------------------
   3 · The notice band — the standing disclaimer, part of the design
   -------------------------------------------------------------------------- */
.band-notice { border-left: none; }
.band-notice .fine-print-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
  font-size: var(--text-base);
  color: var(--accent-strong);
  margin: 0 0 var(--space-2);
}
.band-notice p:last-child { margin: 0; color: var(--ink-muted); font-size: var(--text-base); }

/* --------------------------------------------------------------------------
   4 · Panels & inputs — the worksheet
   -------------------------------------------------------------------------- */
.panel-grid { display: grid; gap: var(--space-6); margin-block: var(--space-6); }
@media (min-width: 56rem) { .panel-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

.panel {
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-1);
}
.panel h3 { font-size: var(--text-md); margin-bottom: var(--space-4); }
.panel-note { font-size: var(--text-sm); color: var(--ink-faint); margin: var(--space-3) 0 0; }

input[type='number'] {
  font-family: var(--font-figures);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  width: 7.5rem;
  font-variant-numeric: tabular-nums;
}
input[type='number']:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--highlight); }

.money-grid { display: grid; gap: var(--space-3); grid-template-columns: 1fr 1fr; }
@media (max-width: 30rem) { .money-grid { grid-template-columns: 1fr; } }
.money-grid label {
  display: grid; gap: var(--space-1);
  font-size: var(--text-sm); color: var(--ink-muted);
  font-family: var(--font-display);
}
.money-grid input { width: 100%; }

.expense-list { display: grid; gap: var(--space-2); }
.exp-row {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
  border-top: 1px solid var(--rule);
  padding-top: var(--space-2);
}
.exp-row:first-child { border-top: 0; padding-top: 0; }
.exp-name { font-family: var(--font-display); font-size: var(--text-sm); color: var(--ink); display: grid; }
.exp-blurb { font-family: var(--font-body); font-size: var(--text-xs); color: var(--ink-faint); font-weight: 400; }
.exp-field { white-space: nowrap; font-size: var(--text-sm); color: var(--ink-muted); }
.exp-field input { width: 6rem; }

.as-cls {
  display: inline-block; margin-left: 0.5em;
  font-family: var(--font-display);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.05em;
  font-size: var(--text-xs);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 0 0.6em;
  vertical-align: 0.1em;
  white-space: nowrap;
}
.as-sticky    { color: var(--ln-pess); border-color: color-mix(in oklch, var(--ln-pess) 50%, transparent); }
.as-deflating { color: var(--ln-opt);  border-color: color-mix(in oklch, var(--ln-opt) 50%, transparent); }

.slider-row {
  display: grid; gap: var(--space-2);
  font-family: var(--font-display); font-size: var(--text-sm); color: var(--ink-muted);
  margin-top: var(--space-4);
}
.slider-row strong { color: var(--ink); font-size: var(--text-base); }
input[type='range'] { width: 100%; accent-color: var(--accent); }

.radio-list { display: grid; gap: var(--space-2); }
.radio-list label { font-size: var(--text-sm); color: var(--ink-muted); }
.radio-list strong { color: var(--ink); }
.radio-inline { display: inline-flex; flex-wrap: wrap; gap: var(--space-3); margin-left: var(--space-2); }
.radio-inline label { white-space: nowrap; }
input[type='radio'] { accent-color: var(--accent); }

.btn-ghost {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: var(--space-1) var(--space-4);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}
.btn-ghost:hover { color: var(--accent-strong); border-color: var(--accent); }

/* --------------------------------------------------------------------------
   5 · Scenario cards
   -------------------------------------------------------------------------- */
.scenario-cards { display: grid; gap: var(--space-4); margin-block: var(--space-8); }
@media (min-width: 56rem) { .scenario-cards { grid-template-columns: 1fr 1fr 1fr; } }
.scenario {
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--rule);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
}
.scenario h3 { font-size: var(--text-base); margin-bottom: var(--space-2); }
.scenario p { font-size: var(--text-sm); color: var(--ink-muted); margin: 0; }
.sc-pess { border-top-color: var(--ln-pess); }
.sc-base { border-top-color: var(--ln-base); }
.sc-opt  { border-top-color: var(--ln-opt); }

/* --------------------------------------------------------------------------
   6 · Readout + charts
   -------------------------------------------------------------------------- */
.readout-panel { margin-block: var(--space-6); box-shadow: var(--shadow-2); background: var(--surface-deep); }
.index-label {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-6);
}
.index-label .kicker { margin: 0; }

.readout-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr 1fr; }
@media (min-width: 56rem) { .readout-grid { grid-template-columns: repeat(4, 1fr); } }
.ro-cell {
  border-top: 3px solid var(--rule);
  padding-top: var(--space-3);
}
.ro-trad { border-top-color: var(--ln-trad); }
.ro-pess { border-top-color: var(--ln-pess); }
.ro-base { border-top-color: var(--ln-base); }
.ro-opt  { border-top-color: var(--ln-opt); }
.ro-name {
  font-family: var(--font-display);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin: 0 0 var(--space-1);
}
.ro-age { margin: 0; display: grid; }
.ro-age strong {
  font-family: var(--font-figures);
  font-weight: 590;
  font-size: var(--text-2xl);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.ro-note { font-size: var(--text-xs); color: var(--ink-faint); }
.readout-basket {
  margin: var(--space-6) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule);
  font-size: var(--text-base);
  color: var(--ink-muted);
}

.chart-block { margin-block: var(--space-8); }
.chart-block h3 { font-size: var(--text-md); margin-bottom: var(--space-1); }
.chart-block .panel-note { margin: 0 0 var(--space-3); max-width: 42rem; }
.chart {
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.chart svg { display: block; width: 100%; height: auto; }

.ch-grid { stroke: var(--chart-grid); stroke-width: 1; }
.ch-tick { font-family: var(--font-body); font-size: 12px; fill: var(--chart-axis); }
.ch-annot { font-family: var(--font-display); font-size: 12px; font-weight: 560; fill: var(--ink-muted); }
.ch-anchor { stroke: var(--rule-strong); stroke-width: 1; stroke-dasharray: 2 4; }
.ch-line { stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.ch-trad { stroke: var(--ln-trad); stroke-dasharray: 6 5; stroke-width: 1.75; }
.ch-pess { stroke: var(--ln-pess); }
.ch-base { stroke: var(--ln-base); stroke-width: 2.75; }
.ch-opt  { stroke: var(--ln-opt); stroke-dasharray: 1 0; }
.ch-dot  { stroke: var(--surface); stroke-width: 1.5; }
circle.ch-trad { fill: var(--ln-trad); } circle.ch-pess { fill: var(--ln-pess); }
circle.ch-base { fill: var(--ln-base); } circle.ch-opt  { fill: var(--ln-opt); }

.chart-legend {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6);
  justify-content: center;
  margin: var(--space-2) 0 var(--space-8);
  font-size: var(--text-sm); color: var(--ink-muted);
  font-family: var(--font-display);
}
.lg::before {
  content: ""; display: inline-block;
  width: 1.6em; height: 3px; border-radius: 2px;
  margin-right: 0.45em; vertical-align: 0.22em;
}
.lg-trad::before { background: var(--ln-trad); }
.lg-pess::before { background: var(--ln-pess); }
.lg-base::before { background: var(--ln-base); }
.lg-opt::before  { background: var(--ln-opt); }

/* --------------------------------------------------------------------------
   7 · Tables & fine print (family furniture)
   -------------------------------------------------------------------------- */
.method-table-wrap { overflow-x: auto; margin: var(--space-4) 0; }
.method-table {
  width: 100%; min-width: 40rem;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.method-table th, .method-table td {
  text-align: left; vertical-align: top;
  padding: var(--space-3) var(--space-4) var(--space-3) 0;
  border-bottom: 1px solid var(--rule);
}
.method-table th {
  font-family: var(--font-display);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
  font-weight: 500;
  color: var(--ink-muted);
}
.method-table .th-sub { display: block; font-variant-caps: normal; letter-spacing: 0; font-size: var(--text-xs); color: var(--ink-faint); }
.method-table td { color: var(--ink-muted); }
.method-table td:first-child { color: var(--ink); font-family: var(--font-display); font-weight: 560; }
.method-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.assumption-table input[type='number'] { width: 5.2rem; font-size: var(--text-sm); }
.as-note { font-size: var(--text-xs); line-height: 1.55; min-width: 18rem; }
.as-note em { color: var(--ink); }

.detail-table { margin-block: var(--space-8); }
.detail-table summary {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--accent);
  cursor: pointer;
}
.detail-table summary:hover { color: var(--accent-strong); }

.fine-print {
  background: var(--surface-inset);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin: var(--space-12) 0;
  font-size: var(--text-sm);
}
.fine-print .fine-print-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
  font-size: var(--text-base);
  margin: 0 0 var(--space-2);
}
.fine-print ul { padding-left: 1.1em; margin: 0; }
.fine-print li { margin-bottom: var(--space-2); }
.fine-print p { margin: 0 0 var(--space-3); }
.fine-print p:last-child { margin: 0; }

/* --------------------------------------------------------------------------
   8 · The lens + bridge
   -------------------------------------------------------------------------- */
.lens-list { padding-left: 1.2em; }
.lens-list li { margin-bottom: var(--space-4); color: var(--ink-muted); }
.lens-list li::marker { color: var(--accent); }

.pillar-bridge {
  background: var(--surface-deep);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: var(--space-8) var(--space-6);
  max-width: 48rem;
  margin-inline: auto;
}
.pillar-bridge h2 { margin-top: 0; }
.pillar-bridge p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   9 · Motion discipline
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
