:root {
  /* Surfaces (Light: Warm Archival Paper) */
  --bg-canvas: #f8f7f4;
  --bg-surface: #ffffff;
  --bg-subtle: #efede8;
  --border-subtle: #dedad2;
  --border-strong: #8a857c;

  /* Typography & accents */
  --text-primary: #141413;
  --text-secondary: #4a4843;
  --text-muted: #5e5b55;
  --accent-primary: #0f4c81;
  --accent-hover: #0a365c;
  --accent-foreground: #ffffff;
  --status-positive: #0d6e4f;
  --status-warning: #8a5000;
  --status-negative: #b42318;

  /* Chart series (CVD-safe, light) */
  --chart-1: #0072b2;
  --chart-2: #c85200;
  --chart-3: #00825f;
  --chart-4: #9e4b7a;
  --chart-5: #a66e00;
  --chart-6: #4e5968;

  /* Fluid type 375 → 1280 */
  --text-display: clamp(2rem, 1.586rem + 1.77vw, 3rem);
  --text-h1: clamp(1.625rem, 1.366rem + 1.1vw, 2.25rem);
  --text-h2: clamp(1.312rem, 1.131rem + 0.77vw, 1.75rem);
  --text-h3: clamp(1.125rem, 1.021rem + 0.44vw, 1.375rem);
  --text-kpi: clamp(1.75rem, 1.543rem + 0.88vw, 2.25rem);
  --text-body: clamp(1rem, 0.974rem + 0.11vw, 1.062rem);
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;

  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Schibsted Grotesk", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  --content: 1200px;
  --pad-x: clamp(1.15rem, 3.5vw, 2.5rem);
  --radius: 0;
  --glow: color-mix(in srgb, var(--accent-primary) 22%, transparent);
}

[data-theme="dark"] {
  --bg-canvas: #0e1014;
  --bg-surface: #161920;
  --bg-subtle: #1f242e;
  --border-subtle: #2b313e;
  --border-strong: #687387;

  --text-primary: #f3f4f6;
  --text-secondary: #c4c9d4;
  --text-muted: #9aa2b1;
  --accent-primary: #58a6ff;
  --accent-hover: #79baff;
  --accent-foreground: #0e1014;
  --status-positive: #34d399;
  --status-warning: #f5b74b;
  --status-negative: #f87171;

  --chart-1: #56b4e9;
  --chart-2: #e69f00;
  --chart-3: #2cc59b;
  --chart-4: #d98cb8;
  --chart-5: #f0e442;
  --chart-6: #94a3b8;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-canvas: #0e1014;
    --bg-surface: #161920;
    --bg-subtle: #1f242e;
    --border-subtle: #2b313e;
    --border-strong: #687387;
    --text-primary: #f3f4f6;
    --text-secondary: #c4c9d4;
    --text-muted: #9aa2b1;
    --accent-primary: #58a6ff;
    --accent-hover: #79baff;
    --accent-foreground: #0e1014;
    --status-positive: #34d399;
    --status-warning: #f5b74b;
    --status-negative: #f87171;
    --chart-1: #56b4e9;
    --chart-2: #e69f00;
    --chart-3: #2cc59b;
    --chart-4: #d98cb8;
    --chart-5: #f0e442;
    --chart-6: #94a3b8;
  }
}

.tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
