:root {
  color-scheme: light dark;

  /* Typography */
  --font-sans: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Fluid Type Scale (max <= 2.5x min for WCAG 1.4.4 zoom compliance) */
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: clamp(1.1875rem, 1.05rem + 0.5vw, 1.4375rem);
  --text-2xl: clamp(1.5rem, 1.25rem + 1.2vw, 2.25rem);
  --text-hero: clamp(2.125rem, 1.5rem + 2.4vw, 3.625rem);

  /* Spacing & Layout */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --container-max: 74rem;
  --header-height: 4.5rem;

  /* Radii */
  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-pill: 9999px;

  /* Light Palette (>= 4.5:1 text contrast, >= 3:1 UI borders) */
  --color-bg: #f8fafc;
  --color-bg-elevated: #ffffff;
  --color-bg-subtle: #eff4fb;
  --color-header-bg: rgba(248, 250, 252, 0.84);
  --color-fg: #0f172a;
  --color-fg-muted: #475569;
  --color-primary: #1d4ed8;
  --color-primary-hover: #1e40af;
  --color-on-primary: #ffffff;
  --color-accent: #c2410c;
  --color-on-accent: #ffffff;
  --color-accent-soft: #ffedd5;
  --color-accent-soft-fg: #9a3412;
  --color-border: #cbd5e1;
  --color-border-subtle: #e2e8f0;
  --color-success: #15803d;
  --color-success-bg: #dcfce7;
  --color-error: #b91c1c;
  --color-error-bg: #fee2e2;
  --color-focus: #1d4ed8;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 32px -12px rgba(15, 23, 42, 0.14), 0 4px 10px -4px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0b1120;
    --color-bg-elevated: #111827;
    --color-bg-subtle: #172033;
    --color-header-bg: rgba(11, 17, 32, 0.84);
    --color-fg: #f1f5f9;
    --color-fg-muted: #cbd5e1;
    --color-primary: #3b82f6;
    --color-primary-hover: #60a5fa;
    --color-on-primary: #061224;
    --color-accent: #fb923c;
    --color-on-accent: #0f172a;
    --color-accent-soft: #431407;
    --color-accent-soft-fg: #fdba74;
    --color-border: #475569;
    --color-border-subtle: #1e293b;
    --color-success: #4ade80;
    --color-success-bg: #052e16;
    --color-error: #fca5a5;
    --color-error-bg: #450a0a;
    --color-focus: #60a5fa;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 14px 36px -12px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.65);
  }
}
