@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;

  /* River Ledger color system */
  --color-paper: #f1efe6;
  --color-surface: #faf8f0;
  --color-ink: #17251e;
  --color-muted: #5d665f;
  --color-forest: #315b4c;
  --color-forest-dark: #244338;
  --color-clay: #a34e31;
  --color-water: #7f9da0;
  --color-land: #d8d8c3;
  --color-line: #bfc3b9;
  --color-focus: #d68c34;
  --color-night: #091416;
  --color-night-text: #edf0e4;
  --color-review: #8a5a18;
  --color-review-bg: #f4e6c7;
  --color-error: #8f2f28;
  --color-success: #315b4c;
  --color-overlay: rgb(9 20 22 / 0.7);

  /* Scientific systems remain semantically independent. */
  --science-low: #a50026;
  --science-low-mid: #ef6548;
  --science-mid: #fee08b;
  --science-high-mid: #91cf60;
  --science-high: #006837;
  --science-uncertainty: #6d6b78;

  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Source Sans 3", "Avenir Next", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --step--1: clamp(0.78rem, 0.74rem + 0.12vw, 0.86rem);
  --step-0: clamp(1rem, 0.96rem + 0.18vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.08rem + 0.48vw, 1.48rem);
  --step-2: clamp(1.55rem, 1.3rem + 1vw, 2.2rem);
  --step-3: clamp(2.15rem, 1.7rem + 1.8vw, 3.3rem);
  --step-4: clamp(3rem, 2.2rem + 3.2vw, 5.5rem);
  --step-5: clamp(4.1rem, 2.7rem + 5.8vw, 8.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --section-space: clamp(3.5rem, 6vw, 6rem);

  --page-gutter: clamp(1rem, 4vw, 3.5rem);
  --measure: 68ch;
  --page-max: 90rem;
  --content-max: 76rem;
  /* Canonical publication geometry, measured from the approved source-sink page. */
  --publication-narrative-max: 76rem;
  --publication-visual-max: 90rem;
  --publication-control-rail: 15rem;
  --publication-hero-min: 82svh;
  --publication-section-space: 3rem;
  --publication-related-space: 2rem;
  --radius-small: 0.2rem;
  --rule: 1px solid var(--color-line);
  --shadow-float: 0 14px 44px rgb(23 37 30 / 0.12);

  --motion-fast: 140ms;
  --motion-medium: 320ms;
  --motion-slow: 800ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-fast: 0ms;
    --motion-medium: 0ms;
    --motion-slow: 0ms;
  }
}
