/* Design tokens. Dark is the default look; light is applied by system preference or explicit choice. */
:root {
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", ui-monospace, Consolas, monospace;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

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

  --sidebar-w: 232px;
  --topbar-h: 64px;
  --bottomnav-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Accents (shared by both themes, tuned per theme below) */
  --yellow: #f5c84c;
  --purple: #9d7bff;

  /* Dark theme (default) */
  --bg: #0b0b0d;
  --surface: #151518;
  --surface-2: #1d1d21;
  --surface-3: #26262b;
  --border: #2a2a30;
  --text: #f4f4f5;
  --text-2: #b4b4bd;
  --muted: #7c7c86;
  --primary: #f4f4f5;
  --on-primary: #0b0b0d;
  --up: #34d399;
  --up-soft: rgba(52, 211, 153, .14);
  --down: #f87171;
  --down-soft: rgba(248, 113, 113, .14);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .14);
  --focus: rgba(157, 123, 255, .55);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f4f6;
    --surface: #ffffff;
    --surface-2: #f1f1f4;
    --surface-3: #e7e7ec;
    --border: #e3e3e8;
    --text: #111114;
    --text-2: #3f3f46;
    --muted: #71717a;
    --primary: #111114;
    --on-primary: #ffffff;
    --up: #059669;
    --up-soft: rgba(5, 150, 105, .12);
    --down: #dc2626;
    --down-soft: rgba(220, 38, 38, .1);
    --warn: #b45309;
    --warn-soft: rgba(217, 119, 6, .12);
    --yellow: #d4a017;
    --purple: #7c5cf0;
    --shadow: 0 1px 2px rgba(17, 17, 20, .04), 0 8px 24px rgba(17, 17, 20, .06);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f4f4f6;
  --surface: #ffffff;
  --surface-2: #f1f1f4;
  --surface-3: #e7e7ec;
  --border: #e3e3e8;
  --text: #111114;
  --text-2: #3f3f46;
  --muted: #71717a;
  --primary: #111114;
  --on-primary: #ffffff;
  --up: #059669;
  --up-soft: rgba(5, 150, 105, .12);
  --down: #dc2626;
  --down-soft: rgba(220, 38, 38, .1);
  --warn: #b45309;
  --warn-soft: rgba(217, 119, 6, .12);
  --yellow: #d4a017;
  --purple: #7c5cf0;
  --shadow: 0 1px 2px rgba(17, 17, 20, .04), 0 8px 24px rgba(17, 17, 20, .06);
  color-scheme: light;
}
