:root {
  /* Light mode palette (isping.me inspired airy sky-blue & crisp white) */
  --bg-page: #f4f7fc;
  --bg-hero-glow-left: rgba(196, 220, 255, 0.55);
  --bg-hero-glow-right: rgba(208, 228, 255, 0.42);
  --bg-card: #ffffff;
  --bg-panel: #ffffff;
  --bg-subtle: #f7f9fc;
  --bg-pill-nav: rgba(255, 255, 255, 0.86);
  --bg-nav-active: #111827;
  --ink-nav-active: #ffffff;
  --bg-input: #ffffff;
  --bg-error-banner: #fff1f0;
  --border-error-banner: #ffccc7;

  /* Ink & borders */
  --ink-primary: #111827;
  --ink-secondary: #374151;
  --ink-muted: #6b7280;
  --ink-faint: #9ca3af;
  --border-card: #e5ebf4;
  --border-subtle: #eef2f7;
  --border-strong: #d5dfec;

  /* Brand & action colors */
  --brand-green-bg: #e7f8ef;
  --brand-green-ink: #169c53;
  --accent-blue: #1e6ef0;
  --accent-blue-hover: #145ad1;
  --accent-blue-ink: #ffffff;
  --focus-ring: #1e6ef0;

  /* Semantic badge & status colors */
  --ok-bg: #e7f8ef;
  --ok-ink: #138a49;
  --warn-bg: #fff4db;
  --warn-ink: #b96b00;
  --warn-solid: #e8a317;
  --danger-bg: #ffecec;
  --danger-ink: #cf2e2e;
  --neutral-pill-bg: #edf1f7;
  --neutral-pill-ink: #4b5563;

  /* 5-dot risk severity meter */
  --dot-1: #19a95b;
  --dot-2: #84cc16;
  --dot-3: #eab308;
  --dot-4: #f97316;
  --dot-5: #ef4444;
  --dot-off: #e2e8f0;

  /* Pastel metric icon tiles */
  --ico-blue-bg: #e8f3ff;
  --ico-blue-fg: #1b86e6;
  --ico-purple-bg: #f1e8ff;
  --ico-purple-fg: #8451f5;
  --ico-amber-bg: #fff3d6;
  --ico-amber-fg: #d97706;
  --ico-indigo-bg: #e8ebff;
  --ico-indigo-fg: #4f46e5;
  --ico-sky-bg: #e0f2fe;
  --ico-sky-fg: #0284c7;
  --ico-teal-bg: #dcf7ef;
  --ico-teal-fg: #0d9488;
  --ico-orange-bg: #ffeed6;
  --ico-orange-fg: #dd7300;
  --ico-red-bg: #ffeaea;
  --ico-red-fg: #d43a3a;
  --ico-green-bg: #e6f8ee;
  --ico-green-fg: #189e55;

  /* Elevation */
  --shadow-nav: 0 4px 18px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 10px 30px -14px rgba(15, 35, 75, 0.09), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-search: 0 0 0 1px rgba(59, 130, 246, 0.14), 0 8px 24px -8px rgba(56, 130, 246, 0.22);
  --shadow-modal: 0 24px 60px rgba(15, 23, 42, 0.22);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Spacing & geometry */
  --wrap-main: 880px;
  --wrap-footer: 1040px;
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Motion */
  --dur-micro: 120ms;
  --dur-short: 200ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-page: #0c111d;
  --bg-hero-glow-left: rgba(30, 64, 175, 0.22);
  --bg-hero-glow-right: rgba(14, 116, 144, 0.16);
  --bg-card: #131b2b;
  --bg-panel: #162033;
  --bg-subtle: #1a253b;
  --bg-pill-nav: rgba(19, 27, 43, 0.9);
  --bg-nav-active: #e5edf9;
  --ink-nav-active: #0c111d;
  --bg-input: #0f1624;
  --bg-error-banner: rgba(239, 68, 68, 0.14);
  --border-error-banner: rgba(239, 68, 68, 0.36);

  --ink-primary: #f1f5fb;
  --ink-secondary: #cbd5e1;
  --ink-muted: #94a3b8;
  --ink-faint: #64748b;
  --border-card: #243149;
  --border-subtle: #1e2a40;
  --border-strong: #324361;

  --brand-green-bg: rgba(22, 163, 74, 0.2);
  --brand-green-ink: #4ade80;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #60a5fa;
  --accent-blue-ink: #081225;
  --focus-ring: #60a5fa;

  --ok-bg: rgba(22, 163, 74, 0.18);
  --ok-ink: #4ade80;
  --warn-bg: rgba(245, 158, 11, 0.18);
  --warn-ink: #fbbf24;
  --warn-solid: #d97706;
  --danger-bg: rgba(239, 68, 68, 0.18);
  --danger-ink: #f87171;
  --neutral-pill-bg: #22304a;
  --neutral-pill-ink: #cbd5e1;
  --dot-off: #2a3954;

  --ico-blue-bg: rgba(59, 130, 246, 0.16);
  --ico-blue-fg: #60a5fa;
  --ico-purple-bg: rgba(139, 92, 246, 0.18);
  --ico-purple-fg: #a78bfa;
  --ico-amber-bg: rgba(245, 158, 11, 0.16);
  --ico-amber-fg: #fbbf24;
  --ico-indigo-bg: rgba(99, 102, 241, 0.18);
  --ico-indigo-fg: #818cf8;
  --ico-sky-bg: rgba(14, 165, 233, 0.16);
  --ico-sky-fg: #38bdf8;
  --ico-teal-bg: rgba(20, 184, 166, 0.16);
  --ico-teal-fg: #2dd4bf;
  --ico-orange-bg: rgba(249, 115, 22, 0.16);
  --ico-orange-fg: #fb923c;
  --ico-red-bg: rgba(239, 68, 68, 0.16);
  --ico-red-fg: #f87171;
  --ico-green-bg: rgba(34, 197, 94, 0.16);
  --ico-green-fg: #4ade80;

  --shadow-nav: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 12px 32px -12px rgba(0, 0, 0, 0.45);
  --shadow-search: 0 0 0 1px rgba(96, 165, 250, 0.25), 0 10px 26px -10px rgba(59, 130, 246, 0.32);
}
