/* Drie lagen: primitief -> semantisch -> component.
   Alleen de semantische laag wisselt van waarde in donkere modus. */

:root {
  /* --- Primitief --- */
  --slate-950: #0b1220;
  --slate-900: #131c2e;
  --slate-800: #25324a;
  --slate-600: #475569;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-50: #f8fafc;
  --white: #ffffff;

  --blue-700: #1d4ed8;
  --blue-300: #9dbaff;
  --red-700: #b42318;
  --red-300: #fda29b;
  --amber-700: #b54708;
  --amber-300: #fdb022;
  --yellow-700: #854a0e;
  --green-700: #027a48;

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

  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 18px; --radius-pill: 999px;

  /* Schaal 1.25 */
  --text-xs: 13px; --text-sm: 15px; --text-md: 17px;
  --text-lg: 21px; --text-xl: 26px; --text-2xl: 33px;
  --text-3xl: 41px; --text-4xl: 52px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shadow-sm: 0 1px 2px rgb(11 18 32 / .06);
  --shadow-md: 0 8px 24px -12px rgb(11 18 32 / .18);

  /* --- Semantisch (licht) --- */
  --fg: var(--slate-950);
  --fg-muted: var(--slate-600);
  --fg-inverse: var(--white);
  --bg: var(--white);
  --bg-surface: var(--slate-50);
  --bg-inverse: var(--slate-950);
  --line: var(--slate-200);
  --accent: var(--blue-700);
  --accent-contrast: var(--white);
  --impact-critical: var(--red-700);
  --impact-serious: var(--amber-700);
  --impact-moderate: var(--yellow-700);
  --impact-minor: var(--slate-600);
  --positive: var(--green-700);
  --focus: var(--blue-700);
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #f1f5f9;
    --fg-muted: var(--slate-400);
    --fg-inverse: var(--slate-950);
    --bg: var(--slate-950);
    --bg-surface: var(--slate-900);
    --bg-inverse: var(--white);
    --line: var(--slate-800);
    --accent: var(--blue-300);
    --accent-contrast: var(--slate-950);
    --impact-critical: var(--red-300);
    --impact-serious: var(--amber-300);
    --impact-moderate: var(--amber-300);
    --impact-minor: var(--slate-400);
    --positive: #6ce9a6;
    --focus: var(--blue-300);
    --shadow-md: 0 8px 24px -12px rgb(0 0 0 / .6);
  }
}

/* --- Component --- */
:root {
  --button-bg: var(--bg-inverse);
  --button-fg: var(--fg-inverse);
  --field-bg: var(--bg);
  --field-border: var(--line);
  --card-bg: var(--bg-surface);
  --card-border: var(--line);
  --badge-radius: var(--radius-pill);
}
