/* Design tokens — Brand Book v2.1 (docs/design/brand-book.html). */
:root,
[data-theme="light"] {
  --color-bg: #f8f9fc;
  --color-bg-mesh: radial-gradient(ellipse 70% 45% at 15% -5%, rgba(94, 92, 230, 0.07), transparent),
    radial-gradient(ellipse 50% 35% at 92% 8%, rgba(124, 110, 216, 0.05), transparent);
  --color-surface: rgba(255, 255, 255, 0.92);
  --color-surface-solid: #ffffff;
  --color-surface-elevated: #ffffff;
  --color-border: rgba(15, 23, 42, 0.08);
  --color-border-strong: rgba(15, 23, 42, 0.14);

  --color-text: #111827;
  --color-text-secondary: #4b5563;
  --color-text-muted: #9ca3af;
  --color-text-inverse: #ffffff;

  --color-accent-1: #5e5ce6;
  --color-accent-2: #6d6ae8;
  --color-accent-3: #7c78ea;
  --gradient-accent: linear-gradient(160deg, #5e5ce6 0%, #7c6ee4 100%);
  --gradient-accent-hover: linear-gradient(160deg, #5452d4 0%, #6e62d8 100%);
  --color-accent-muted: rgba(94, 92, 230, 0.08);
  --color-accent-subtle: rgba(94, 92, 230, 0.04);

  --color-success: #059669;
  --color-success-bg: rgba(5, 150, 105, 0.1);
  --color-warning: #d97706;
  --color-warning-bg: rgba(217, 119, 6, 0.1);
  --color-error: #dc2626;
  --color-error-bg: rgba(220, 38, 38, 0.08);
  --color-info: #2563eb;
  --color-info-bg: rgba(37, 99, 235, 0.08);

  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-md: 0 4px 20px rgba(17, 24, 39, 0.06);
  --shadow-lg: 0 12px 40px rgba(17, 24, 39, 0.08);
  --shadow-accent: 0 4px 14px rgba(94, 92, 230, 0.22);
  --toggle-bg: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] {
  --color-bg: #0c0c10;
  --color-bg-mesh: radial-gradient(ellipse 60% 40% at 12% 0%, rgba(94, 92, 230, 0.12), transparent),
    radial-gradient(ellipse 45% 35% at 88% 15%, rgba(124, 110, 216, 0.06), transparent);
  --color-surface: rgba(22, 22, 28, 0.88);
  --color-surface-solid: #16161c;
  --color-surface-elevated: #1e1e26;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.12);

  --color-text: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --color-text-inverse: #0f172a;

  --color-accent-muted: rgba(124, 120, 232, 0.14);
  --color-accent-subtle: rgba(124, 120, 232, 0.06);

  --color-success-bg: rgba(5, 150, 105, 0.12);
  --color-warning-bg: rgba(217, 119, 6, 0.15);
  --color-error-bg: rgba(220, 38, 38, 0.12);
  --color-info-bg: rgba(37, 99, 235, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-accent: 0 4px 20px rgba(94, 92, 230, 0.2);
  --toggle-bg: rgba(22, 22, 28, 0.95);
}

:root {
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.3125rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  --transition: 0.15s ease;
  --transition-slow: 0.25s ease;
  --focus-ring: 0 0 0 3px var(--color-accent-muted);
  --color-accent-solid: #5e5ce6;
}
