/* FinPlan design tokens (v5): the Savings v3 look, calm.
   Night (cyan and violet on deep navy) and Day; "auto" follows the system.
   [data-theme="light"] is the old plain light set, kept only so PDF export can draw its charts on white.
   © In-Transit LLC. All rights reserved. */
:root {
  color-scheme: light;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-display: "Inter Display", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, monospace;
  --r: 10px; --r-sm: 6px;
  /* Day (the default when the system is light) */
  --bg: #eaf1fb; --bg-2: #ffffff; --sticky: #ffffff;
  --surface: rgba(255, 255, 255, .82); --surface-2: rgba(240, 246, 255, .95); --surface-3: rgba(10, 92, 255, .09);
  --line: rgba(10, 92, 255, .2); --line-2: rgba(10, 92, 255, .34); --edge: #5f6f94;
  --ink: #12182b; --ink-2: #3d4863; --ink-3: #515b78;
  --accent: #0a5cff; --accent-2: #00a9d6; --btn-end: #0078ad; --accent-ink: #ffffff; --accent-soft: rgba(10, 92, 255, .12);
  --glow: radial-gradient(60vmax 50vmax at 8% -10%, rgba(10, 92, 255, .14), transparent 60%), radial-gradient(50vmax 45vmax at 100% 10%, rgba(0, 169, 214, .14), transparent 60%), radial-gradient(55vmax 45vmax at 60% 110%, rgba(155, 107, 255, .12), transparent 60%);
  --good: #036a45; --good-bg: rgba(4, 122, 80, .12); --bad: #b41f3b; --bad-bg: rgba(204, 40, 69, .09); --warn: #8a4f00;
  --c-p: #5f6f94; --c-1: #00a9d6; --c-2: #0a5cff; --c-3: #a15c00; --c-4: #047a50;
  --s-1: #0a5cff; --s-2: #a15c00; --s-3: #7a3fe0;
  --band-1: rgba(10, 92, 255, .05); --band-2: rgba(0, 169, 214, .05); --band-3: rgba(161, 92, 0, .06);
  --grid: rgba(10, 92, 255, .1); --track: rgba(10, 92, 255, .12);
  --shadow: 0 14px 44px rgba(20, 60, 140, .14), inset 0 1px 0 #fff; --shadow-lg: 0 18px 48px -14px rgba(20, 60, 140, .3);
  --ring: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent);
}
/* Night: chosen, or "auto" on a dark system */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]):not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #03050c; --bg-2: #09101f; --sticky: #0b1226;
    --surface: rgba(12, 20, 42, .58); --surface-2: rgba(28, 44, 84, .58); --surface-3: rgba(60, 100, 190, .22);
    --line: rgba(96, 196, 255, .17); --line-2: rgba(96, 196, 255, .32); --edge: #7592ba;
    --ink: #eaeefb; --ink-2: #b4c0da; --ink-3: #8795b3;
    --accent: #22e6ff; --accent-2: #9b6bff; --btn-end: #9b6bff; --accent-ink: #021018; --accent-soft: rgba(34, 230, 255, .13);
    --glow: radial-gradient(60vmax 50vmax at 8% -10%, rgba(155, 107, 255, .22), transparent 60%), radial-gradient(50vmax 45vmax at 100% 10%, rgba(34, 230, 255, .14), transparent 60%), radial-gradient(55vmax 45vmax at 60% 110%, rgba(255, 61, 240, .10), transparent 60%);
    --good: #35ffb1; --good-bg: rgba(53, 255, 177, .12); --bad: #ff5577; --bad-bg: rgba(255, 85, 119, .13); --warn: #ffc247;
    --c-p: #7592ba; --c-1: #22e6ff; --c-2: #9b6bff; --c-3: #ffc247; --c-4: #35ffb1;
    --s-1: #22e6ff; --s-2: #ffc247; --s-3: #9b6bff;
    --band-1: rgba(34, 230, 255, .05); --band-2: rgba(155, 107, 255, .06); --band-3: rgba(255, 194, 71, .05);
    --grid: rgba(96, 196, 255, .12); --track: rgba(120, 170, 255, .14);
    --shadow: 0 10px 30px rgba(0, 0, 0, .35); --shadow-lg: 0 18px 50px -14px rgba(0, 0, 0, .75);
  }
}
:root[data-theme="night"] {
  color-scheme: dark;
  --bg: #03050c; --bg-2: #09101f; --sticky: #0b1226;
  --surface: rgba(12, 20, 42, .58); --surface-2: rgba(28, 44, 84, .58); --surface-3: rgba(60, 100, 190, .22);
  --line: rgba(96, 196, 255, .17); --line-2: rgba(96, 196, 255, .32); --edge: #7592ba;
  --ink: #eaeefb; --ink-2: #b4c0da; --ink-3: #8795b3;
  --accent: #22e6ff; --accent-2: #9b6bff; --btn-end: #9b6bff; --accent-ink: #021018; --accent-soft: rgba(34, 230, 255, .13);
  --glow: radial-gradient(60vmax 50vmax at 8% -10%, rgba(155, 107, 255, .22), transparent 60%), radial-gradient(50vmax 45vmax at 100% 10%, rgba(34, 230, 255, .14), transparent 60%), radial-gradient(55vmax 45vmax at 60% 110%, rgba(255, 61, 240, .10), transparent 60%);
  --good: #35ffb1; --good-bg: rgba(53, 255, 177, .12); --bad: #ff5577; --bad-bg: rgba(255, 85, 119, .13); --warn: #ffc247;
  --c-p: #7592ba; --c-1: #22e6ff; --c-2: #9b6bff; --c-3: #ffc247; --c-4: #35ffb1;
  --s-1: #22e6ff; --s-2: #ffc247; --s-3: #9b6bff;
  --band-1: rgba(34, 230, 255, .05); --band-2: rgba(155, 107, 255, .06); --band-3: rgba(255, 194, 71, .05);
  --grid: rgba(96, 196, 255, .12); --track: rgba(120, 170, 255, .14);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35); --shadow-lg: 0 18px 50px -14px rgba(0, 0, 0, .75);
}
/* Plain light: PDF export only (js/ui/pdf.js sets it while it draws the charts) */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff; --bg-2: #ffffff; --sticky: #ffffff; --surface: #ffffff; --surface-2: #f1f3f6; --surface-3: #e8ebf0; --line: #e4e7ec; --line-2: #d5dae2; --edge: #8a94a6;
  --ink: #0b1220; --ink-2: #4a5568; --ink-3: #8a94a6;
  --accent: #10b981; --accent-2: #6366f1; --accent-ink: #ffffff; --accent-soft: rgba(16, 185, 129, .12); --glow: none;
  --good: #059669; --good-bg: rgba(16, 185, 129, .12); --bad: #e11d48; --bad-bg: rgba(225, 29, 72, .09); --warn: #b45309;
  --c-p: #94a3b8; --c-1: #10b981; --c-2: #6366f1; --c-3: #f59e0b; --c-4: #ec4899;
  --s-1: #10b981; --s-2: #f59e0b; --s-3: #6366f1;
  --band-1: rgba(16, 185, 129, .05); --band-2: rgba(99, 102, 241, .05); --band-3: rgba(245, 158, 11, .06);
  --grid: #edf0f4; --track: #e8ebf0; --shadow: none; --shadow-lg: none;
}
