/* Design tokens. Dark is the default identity; light follows the OS or the manual toggle.
   Contrast for every text/background pair is verified by tests/unit/contrast.test.mjs. */
:root {
  color-scheme: dark;
  --background: #07080a;
  --surface: #0e1014;
  --surface-elevated: #151922;
  --text-primary: #eef1f5;
  --text-secondary: #b7bfcb;
  --text-muted: #8f99a8;
  --border: #262c36;
  --border-strong: #6b7686;
  --accent: #7ee8c0;
  --accent-ink: #04140d;
  --success: #5ee38a;
  --warning: #f5c04a;
  --error: #ff7a7a;
  --focus: #8ac7ff;

  --font-display: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;

  --fs-display: clamp(3.25rem, 11vw + 0.5rem, 9.5rem);
  --fs-display-2: clamp(2.4rem, 6vw + 0.5rem, 5.5rem);
  --fs-h2: clamp(2rem, 4vw + 0.5rem, 3.75rem);
  --fs-h3: clamp(1.15rem, 1vw + 0.9rem, 1.5rem);
  --fs-body: clamp(1rem, 0.25vw + 0.95rem, 1.125rem);
  --fs-lead: clamp(1.1rem, 0.6vw + 1rem, 1.35rem);
  --fs-label: 0.75rem;

  --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: 4.5rem; --space-9: 7rem;
  --radius-sm: 4px; --radius-md: 10px; --radius-pill: 999px;
  --shadow-1: 0 1px 0 rgb(255 255 255 / 4%) inset, 0 12px 32px -16px rgb(0 0 0 / 70%);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --background: #f6f7f9;
  --surface: #ffffff;
  --surface-elevated: #eceff4;
  --text-primary: #0d1117;
  --text-secondary: #3b4453;
  --text-muted: #566070;
  --border: #ccd2dc;
  --border-strong: #707a8a;
  --accent: #00694c;
  --accent-ink: #ffffff;
  --success: #15713a;
  --warning: #8a5a00;
  --error: #b42323;
  --focus: #0050c8;
  --shadow-1: 0 1px 0 rgb(255 255 255 / 70%) inset, 0 12px 28px -18px rgb(15 25 45 / 35%);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --background: #f6f7f9;
    --surface: #ffffff;
    --surface-elevated: #eceff4;
    --text-primary: #0d1117;
    --text-secondary: #3b4453;
    --text-muted: #566070;
    --border: #ccd2dc;
    --border-strong: #707a8a;
    --accent: #00694c;
    --accent-ink: #ffffff;
    --success: #15713a;
    --warning: #8a5a00;
    --error: #b42323;
    --focus: #0050c8;
    --shadow-1: 0 1px 0 rgb(255 255 255 / 70%) inset, 0 12px 28px -18px rgb(15 25 45 / 35%);
  }
}
