/* Chinchilla Lite design tokens.
   Dark is the default, light is toggled via [data-theme="light"].
   All text on bg pairs verified at 4.5 to 1 or better, all UI pairs at 3 to 1. */

:root,
[data-theme="dark"] {
  --bg: #0B0D12;
  --surface: #161A23;
  --surface-2: #1F2432;
  --surface-3: #2B3142;
  --text: #F5F5F4;
  --text-secondary: #C7C2BD;
  --text-tertiary: #9CA3AF;
  --accent: #34D399;
  --accent-strong: #6EE7B7;
  --accent-muted: rgba(52, 211, 153, 0.18);
  --accent-faint: rgba(52, 211, 153, 0.08);
  --border: rgba(245, 245, 244, 0.08);
  --border-strong: rgba(245, 245, 244, 0.18);
  --focus-ring-colour: #60A5FA;
  --ok: #4ADE80;
  --warn: #FBBF24;
  --err: #F87171;
  --heatmap-start: #0B0D12;
  --heatmap-end: #34D399;
  --series-0: #34D399;
  --series-1: #60A5FA;
  --series-2: #F59E0B;
  --series-3: #A78BFA;
  --series-4: #F472B6;
  --series-5: #FB7185;
  --series-6: #38BDF8;
  --series-7: #FBBF24;
  --series-8: #C084FC;
}

[data-theme="light"] {
  --bg: #FAFAF9;
  --surface: #FFFFFF;
  --surface-2: #F5F5F4;
  --surface-3: #E7E5E4;
  --text: #0F172A;
  --text-secondary: #334155;
  --text-tertiary: #475569;
  --accent: #047857;
  --accent-strong: #065F46;
  --accent-muted: rgba(4, 120, 87, 0.15);
  --accent-faint: rgba(4, 120, 87, 0.06);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.18);
  --focus-ring-colour: #1D4ED8;
  --ok: #15803D;
  --warn: #B45309;
  --err: #B91C1C;
  --heatmap-start: #FFFFFF;
  --heatmap-end: #047857;
  --series-0: #047857;
  --series-1: #1D4ED8;
  --series-2: #B45309;
  --series-3: #6D28D9;
  --series-4: #BE185D;
  --series-5: #B91C1C;
  --series-6: #0369A1;
  --series-7: #A16207;
  --series-8: #7C3AED;
}

:root {
  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-display: 36px;
  --fs-h1: 28px;
  --fs-h2: 20px;
  --fs-h3: 16px;
  --fs-body: 14px;
  --fs-small: 12px;
  --fs-micro: 11px;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --ls-tight: -0.02em;
  --ls-wide: 0.06em;

  --lh-tight: 1.1;
  --lh-normal: 1.5;
  --lh-relaxed: 1.7;

  --step-xs: 0.75rem;
  --step-sm: 0.875rem;
  --step-md: 1rem;
  --step-lg: 1.25rem;
  --step-xl: 1.5rem;

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

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.22);

  --focus-ring-width: 3px;
  --focus-ring-offset: 2px;

  --t-fast: 120ms;
  --t-med: 150ms;
  --t-slow: 260ms;
  --easing: cubic-bezier(0.2, 0.8, 0.2, 1);

  --page-max: 1280px;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-fast: 1ms;
    --t-med: 1ms;
    --t-slow: 1ms;
  }
}
