/* Design tokens. Light is the default; dark overrides the same names. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  /* Vendored: static/vendor/inter/InterVariable.woff2 (SIL OFL 1.1). */
  src: local("Inter Variable"), local("Inter"), url("../vendor/inter/InterVariable.woff2") format("woff2");
}

:root {
  color-scheme: light;

  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e8ef;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #5b6b82; /* faint: darkened from #94A3B8, which gave 2.6:1 */

  --accent: #0284c7;
  --accent-strong: #0369a1; /* buttons and links: white on it is 5.9:1 */
  --accent-soft: #e0f2fe;
  --on-accent: #ffffff;

  --sidebar: #0b1220;
  --sidebar-text: #c7d2e1;
  --sidebar-muted: #8696ad;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-line: rgba(255, 255, 255, 0.08);
  --sidebar-current: rgba(56, 189, 248, 0.16);

  --green: #16a34a;
  --green-soft: #dcfce7;
  --green-text: #15803d;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --amber-text: #b45309;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --red-text: #b91c1c;
  --violet: #7c3aed;
  --violet-soft: #ede9fe;
  --violet-text: #6d28d9;
  --slate: #64748b;
  --slate-soft: #e8edf3;
  --slate-text: #475569;

  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-pop: 0 12px 32px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.08);
  --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
  --backdrop: rgba(11, 18, 32, 0.5);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 14px;
  --fs-md: 16px;
  --fs-lg: 20px;
  --fs-xl: 28px;

  --r-control: 6px;
  --r-card: 10px;

  /* 4 px grid */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;

  --sidebar-w: 232px;
  --topbar-h: 68px; /* the brand band and the top bar share it */
  --row-h: 36px;
  --t: 150ms;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0b1220;
  --surface: #111a2b;
  --surface-2: #162036;
  --border: #22304a;
  --border-strong: #33456a;
  --text: #e6edf7;
  --text-2: #a9b6ca;
  --text-3: #8191a8; /* faint: lightened from #6B7A90, which gave 4.0:1 */

  --accent: #38bdf8;
  --accent-strong: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --on-accent: #04202e;

  --sidebar: #080e1a;

  --green: #22c55e;
  --green-soft: rgba(74, 222, 128, 0.16);
  --green-text: #4ade80;
  --amber: #f59e0b;
  --amber-soft: rgba(251, 191, 36, 0.16);
  --amber-text: #fbbf24;
  --red: #ef4444;
  --red-soft: rgba(248, 113, 113, 0.16);
  --red-text: #f87171;
  --violet: #8b5cf6;
  --violet-soft: rgba(167, 139, 250, 0.16);
  --violet-text: #a78bfa;
  --slate: #94a3b8;
  --slate-soft: rgba(148, 163, 184, 0.16);
  --slate-text: #a9b6ca;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
  --backdrop: rgba(2, 6, 14, 0.66);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t: 0ms;
  }
}
