/* Alpha Factor VAE 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.
   Palette leans blue and gold for a markets-adjacent feel while staying
   colourblind-safe when paired with shape and pattern cues in the charts. */

:root,
[data-theme="dark"] {
  --bg: #0A0F1C;
  --surface: #141B2E;
  --surface-2: #1C2540;
  --surface-3: #2A3452;
  --text: #F5F5F4;
  --text-secondary: #CBD5E1;
  --text-tertiary: #94A3B8;
  --accent: #60A5FA;
  --accent-strong: #93C5FD;
  --accent-muted: rgba(96, 165, 250, 0.20);
  --accent-faint: rgba(96, 165, 250, 0.08);
  --border: rgba(245, 245, 244, 0.08);
  --border-strong: rgba(245, 245, 244, 0.20);
  --focus-ring-colour: #FBBF24;
  --ok: #4ADE80;
  --warn: #FBBF24;
  --err: #F87171;
  --heatmap-start: #0A0F1C;
  --heatmap-end: #60A5FA;
  --series-0: #60A5FA;
  --series-1: #FBBF24;
  --series-2: #34D399;
  --series-3: #F472B6;
  --series-4: #A78BFA;
  --series-5: #FB7185;
  --series-6: #38BDF8;
  --series-7: #FDBA74;
  --series-8: #C084FC;
}

[data-theme="light"] {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;
  --surface-3: #E2E8F0;
  --text: #0F172A;
  --text-secondary: #334155;
  --text-tertiary: #475569;
  --accent: #1D4ED8;
  --accent-strong: #1E40AF;
  --accent-muted: rgba(29, 78, 216, 0.15);
  --accent-faint: rgba(29, 78, 216, 0.06);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.20);
  --focus-ring-colour: #B45309;
  --ok: #15803D;
  --warn: #B45309;
  --err: #B91C1C;
  --heatmap-start: #FFFFFF;
  --heatmap-end: #1D4ED8;
  --series-0: #1D4ED8;
  --series-1: #B45309;
  --series-2: #15803D;
  --series-3: #BE185D;
  --series-4: #6D28D9;
  --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;
  }
}
