/* Colour and size tokens. Source of truth for colours: src/tokens.ts (tested). */

:root {
  color-scheme: light dark;

  --bg: #f6f3ec;
  --surface: #fffdf8;
  --surface-raised: #fffdf8;
  --text: #1f1a15;
  --muted: #5c554b;
  --faint: #6f675c;
  --line: rgba(31, 26, 21, 0.14);
  --line-soft: rgba(31, 26, 21, 0.08);
  --accent: #2f5a8f;
  --on-accent: #ffffff;
  --success: #3c6548;
  --warning-bg: #f6e8c6;
  --warning-text: #5a4414;
  --danger: #8f3b2f;
  --data-blue: #2f5a8f;
  --data-red: #8f3b2f;
  --grid: #e3ddd1;
  --focus: #2f5a8f;

  --font: "Golos Text", "PT Root UI", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-reading: 16px;
  --line-reading: 1.6;
  --text-ui: 14px;
  --text-meta: 13px;
  --h1: 28px;
  --h2: 22px;
  --h3: 18px;
  --line-heading: 1.3;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --radius: 8px;
  --radius-small: 6px;
  --tap: 44px;
  --reading-width: 44rem;
  --motion: 180ms;
  --ease: ease-out;
}

:root:not([data-theme="light"]) {
  @media (prefers-color-scheme: dark) {
    color-scheme: dark;
    --bg: #241f1a;
    --surface: #2e2822;
    --surface-raised: #39322b;
    --text: #efe7da;
    --muted: #c0b5a4;
    --faint: #a59a88;
    --line: rgba(239, 231, 218, 0.16);
    --line-soft: rgba(239, 231, 218, 0.1);
    --accent: #e2b26f;
    --on-accent: #241f1a;
    --success: #9fcc9a;
    --warning-bg: #3d3222;
    --warning-text: #f0dcaa;
    --danger: #ec9286;
    --data-blue: #8aa3ec;
    --data-red: #ec9286;
    --grid: #3a3229;
    --focus: #e2b26f;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #241f1a;
  --surface: #2e2822;
  --surface-raised: #39322b;
  --text: #efe7da;
  --muted: #c0b5a4;
  --faint: #a59a88;
  --line: rgba(239, 231, 218, 0.16);
  --line-soft: rgba(239, 231, 218, 0.1);
  --accent: #e2b26f;
  --on-accent: #241f1a;
  --success: #9fcc9a;
  --warning-bg: #3d3222;
  --warning-text: #f0dcaa;
  --danger: #ec9286;
  --data-blue: #8aa3ec;
  --data-red: #ec9286;
  --grid: #3a3229;
  --focus: #e2b26f;
}

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