/* Canonical design tokens. Product identity must use these semantic roles. */
:root {
  --font-body: 'Inter Variable', 'Noto Sans SC Variable', sans-serif;
  --font-code: 'JetBrains Mono Variable', 'Noto Sans SC Variable', monospace;
  --weight-regular: 400;
  --weight-strong: 600;
  --text-small: .875rem;
  --text-body: 1rem;
  --text-title: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem);
  --leading-body: 1.7;
  --leading-title: 1.3;
  --tracking-body: 0em;
  --tracking-title: -.025em;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --radius-control: .5rem;
  --radius-panel: 1rem;
  --content-max: 84rem;
  --reading-max: 65ch;
  --target-min: 2.75rem;
  --motion-feedback: 120ms;
  --motion-reveal: 180ms;
  --motion-ease: cubic-bezier(.2, 0, 0, 1);
  --motion-distance: .25rem;
  --canvas: #f4f6fa;
  --surface: #ffffff;
  --surface-muted: #e9edf5;
  --text: #172238;
  --text-muted: #536078;
  --border: #7b879d;
  --accent: #2449c9;
  --accent-hover: #183aaf;
  --on-accent: #ffffff;
  --success: #14633b;
  --error: #b42332;
  --focus: #2449c9;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --canvas: #111722;
  --surface: #1a2332;
  --surface-muted: #263246;
  --text: #edf2fc;
  --text-muted: #b2bfd4;
  --border: #64748c;
  --accent: #a7bbff;
  --accent-hover: #c6d3ff;
  --on-accent: #14224b;
  --success: #80dba8;
  --error: #ffabb4;
  --focus: #b7c8ff;
  color-scheme: dark;
}
/* CSS-only system fallback, including when bootstrap is blocked or JS is off. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --canvas: #111722;
    --surface: #1a2332;
    --surface-muted: #263246;
    --text: #edf2fc;
    --text-muted: #b2bfd4;
    --border: #64748c;
    --accent: #a7bbff;
    --accent-hover: #c6d3ff;
    --on-accent: #14224b;
    --success: #80dba8;
    --error: #ffabb4;
    --focus: #b7c8ff;
    color-scheme: dark;
  }
}
