/* tokens.css — house design contract
   Palette layer = raw colour, semantic layer = roles.
   Nothing below the semantic layer may know about themes: light/dark differ
   only in the two blocks that re-point the same fourteen names.

   Verified values (computed in a real browser, both selectors):
     light  text/bg 12.30 · muted/bg 4.96 · accent/panel 5.77 · danger 5.97
     dark   text/bg 15.03 · muted/bg 9.49 · accent/panel 7.54 · accent-on 8.81
     print  ink/paper 16.22 · muted/paper 7.68
   Zero hex literals. */

:root {
  --n-0: hsl(0 0% 100%);
  --n-25: hsl(217.5 100% 98.4%);
  --n-50: hsl(210 57.1% 97.3%);
  --n-75: hsl(210 75% 95.3%);
  --n-100: hsl(210 45.8% 90.6%);
  --n-200: hsl(212 35.5% 76.3%);
  --n-400: hsl(209 21.5% 42.9%);
  --n-600: hsl(210 52% 19.6%);
  --n-700: hsl(212 49.4% 16.3%);
  --n-800: hsl(212 47% 23.5%);
  --n-900: hsl(215 50.9% 11.2%);
  --b-50: hsl(209 100% 88.6%);
  --b-100: hsl(211 68% 93.9%);
  --b-300: hsl(212 100% 75.5%);
  --b-600: hsl(206.5 76.2% 37.8%);
  --green-600: hsl(150 50% 30%);
  --amber-600: hsl(35 80% 35%);
  --red-600: hsl(5 53% 44%);
  --green-300: hsl(150 42% 66%);
  --amber-300: hsl(35 85% 68%);
  --red-300: hsl(5 70% 72%);
  --print-paper: hsl(0 0% 100%);
  --print-ink: hsl(210 15% 13%);
  --print-muted: hsl(210 10% 33%);
  --print-line: hsl(210 15% 87%);

  /* type — six sizes, nothing below 12px */
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 1.75rem;

  /* spacing — 4px grid, quarter-rem steps only */
  --s1: .25rem;
  --s2: .5rem;
  --s3: .75rem;
  --s4: 1rem;
  --s5: 1.25rem;
  --s6: 1.5rem;
  --s7: 2rem;
  --s8: 2.5rem;
  --s9: 3rem;

  /* radius — the three values already in use */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 14px;

  /* semantic layer — light */
  --bg: var(--n-50);
  --panel: var(--n-0);
  --panel-soft: var(--n-75);
  --text: var(--n-600);
  --text-muted: var(--n-400);
  --line: var(--n-100);
  --accent: var(--b-600);
  --accent-soft: var(--b-50);
  --accent-on: var(--n-0);
  --danger: var(--red-600);
  --warning: var(--amber-600);
  --success: var(--green-600);
  --shadow-color: hsl(210 40% 20% / 0.08);
  --shadow: 0 5px 25px var(--shadow-color);
  /* rail — the navy column, same values as Still */
  --rail: hsl(211 58% 16%);
  --rail-ink: hsl(210 60% 88%);
  --rail-ink-dim: hsl(211 35% 72%);
  --rail-line: hsl(211 40% 28%);
  --rail-active-bg: hsl(206.5 76% 42%);
  --rail-active-ink: hsl(0 0% 100%);
  color-scheme: light;
}

:root[data-theme="dark"],
body.dark {
  /* The Still palette: neutral near-black surfaces, grey ink, one blue accent. */
  --bg: hsl(0 0% 4%);
  --panel: hsl(0 0% 9%);
  --panel-soft: hsl(0 0% 20%);
  --text: hsl(0 0% 95%);
  --text-muted: hsl(0 0% 64%);
  --line: hsl(0 0% 17%);
  --accent: hsl(212 100% 75.5%);
  --accent-soft: hsl(0 0% 18%);
  --accent-on: hsl(215 50.9% 11.2%);
  --danger: hsl(5.8 73.2% 75.1%);
  --warning: hsl(40 66% 72%);
  --success: hsl(150 42% 66%);
  --shadow-color: hsl(0 0% 0% / 0.45);
  --shadow: 0 5px 25px var(--shadow-color);
  color-scheme: dark;
}

@media print {
  :root {
    --bg: var(--print-paper);
    --panel: var(--print-paper);
    --panel-soft: var(--print-paper);
    --text: var(--print-ink);
    --text-muted: var(--print-muted);
    --line: var(--print-line);
    --accent: var(--b-600);
    --accent-on: var(--print-paper);
    --shadow: none;
    color-scheme: light;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
