:root {
  /* ===== Brand (CLAUDE.md §17) =====
     Zeee Blue confirmed against the logo artwork, not just the spec. */
  --brand-blue: #0B4CFD;
  --brand-blue-dark: #0A3FD1;
  --brand-blue-soft: rgba(11, 76, 253, 0.10);
  --book-yellow: #E3A423;
  --ink: #111111;
  --paper: #FFFFFF;

  /* ===== Default: Dark mode ===== */
  --bg: #0E0E10;
  --surface: #17171A;
  --surface-elevated: #212125;
  --text-primary: #F5F5F6;
  --text-secondary: #A1A1AA;
  --text-tertiary: #71717A;
  --border: #27272A;
  --border-strong: #3F3F46;
  --shadow-color: 0 0 0;
  --shadow-strength: 0.4;

  /* ===== Language colors (mode-agnostic) ===== */
  --lang-en: #3B82F6;
  --lang-es: #F97316;
  --lang-fr: #A855F7;
  --lang-de: #22C55E;
  --lang-it: #EC4899;
  --lang-pt: #EAB308;

  /* ===== Semantic colors (mode-agnostic) ===== */
  --success: #22C55E;
  --warning: #EAB308;
  --danger: #EF4444;
  --info: var(--brand-blue);

  /* The Voju rainbow is retired (§17). These names remain only so any
     stray reference resolves to solid brand blue rather than nothing. */
  --gradient-rainbow: var(--brand-blue);
  --gradient-rainbow-soft: transparent;

  /* ===== Type ===== */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Type scale (1.25 ratio) */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;

  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 1.75;

  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ===== Spacing (4px base) ===== */
  --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;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ===== Radii ===== */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;

  /* ===== Shadows ===== */
  --shadow-sm: 0 1px 2px rgba(var(--shadow-color), 0.1);
  --shadow-md: 0 4px 6px rgba(var(--shadow-color), 0.15);
  --shadow-lg: 0 10px 20px rgba(var(--shadow-color), 0.2);
  --shadow-xl: 0 20px 40px rgba(var(--shadow-color), 0.25);

  /* ===== Layout ===== */
  --container-max: 1280px;
  --container-narrow: 720px;
  --container-prose: 640px;

  --header-height: 72px;

  /* ===== Transitions ===== */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Light mode override ===== */
[data-theme="light"] {
  --bg: #FAFAFA;
  --surface: var(--paper);
  --surface-elevated: var(--paper);
  --text-primary: var(--ink);
  --text-secondary: #52525B;
  --text-tertiary: #71717A;
  --border: #E4E4E7;
  --border-strong: #D4D4D8;
  --shadow-color: 24 24 27;
  --shadow-strength: 0.08;
}

/* Respect OS preference if user hasn't chosen */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #FAFAFA;
    --surface: var(--paper);
    --surface-elevated: var(--paper);
    --text-primary: var(--ink);
    --text-secondary: #52525B;
    --text-tertiary: #71717A;
    --border: #E4E4E7;
    --border-strong: #D4D4D8;
    --shadow-color: 24 24 27;
    --shadow-strength: 0.08;
  }
}
