/* ============================================================
   RESERVD DESIGN TOKENS — "Daylight" (Phase 6 premium light redesign)

   Replaces the dark "Steel" development theme. The whole logged-in app is
   light; there is no half-dark state. Legacy token names (--good/--warn/
   --danger/--accent/--surface-2 …) are kept as aliases so every screen
   adopts the system without per-page colour rules.

   Principles
   - Cool white canvas, white surfaces, hairline borders; depth from one
     subtle elevation step, never heavy shadows. One card level only.
   - Steel is the single accent: brand, focus, primary action, selection.
     #5F8FB5 is the brand mark colour (non-text only, 3.4:1); text and
     controls use the deeper steels below (all ≥ 4.5:1).
   - Money is neutral ink. Colour carries meaning only:
       --safe      genuinely safe / healthy
       --attention needs attention or a decision
       --risk      blocked / overdue / serious
       --info      informational / historical / audit
   - Every text colour here is WCAG AA (≥ 4.5:1) on --surface, --bg and
     --surface-2 (verified in Phase 6).

   Breakpoints (media queries can't read custom properties — use these values):
     phone ≤ 599px · tablet 600–899px (bottom nav) · desktop ≥ 900px (sidebar)
     content max width 1120px
   ============================================================ */
:root,
:root[data-theme="light"]{
  /* surfaces */
  --bg:#F6F8FB;               /* canvas — very subtle cool white */
  --surface:#FFFFFF;          /* cards, sidebar, sheets */
  --surface-2:#F1F4F8;        /* secondary: inputs at rest, grouped rows, hover */
  --surface-3:#E7ECF2;        /* pressed / selected / track */
  --line:#E6EBF1;             /* hairlines */
  --line-strong:#D3DBE5;      /* input borders, dividers that must read */

  /* ink */
  --ink:#0F172A;              /* figures, titles   17.9:1 */
  --ink-muted:#475569;        /* body / labels      7.6:1 */
  --ink-faint:#5F6B7C;        /* meta, captions     5.4:1 */

  /* steel — the single accent */
  --brand:#5F8FB5;            /* brand mark, bars, active indicators (non-text) */
  --accent:#36668E;           /* links, selected text, focus  6.1:1 */
  --accent-strong:#2C5A80;    /* primary button fill (white text 7.3:1) */
  --accent-hover:#234B6C;     /* primary button hover */
  --accent-ink:#FFFFFF;       /* text on the primary fill */
  --accent-soft:#EAF1F7;      /* selected nav, subtle steel wash */
  --steel:var(--accent);
  --steel-strong:var(--accent-strong);

  /* semantic — status only, never decorative, never on plain money */
  --good:#17754C;      --good-soft:#E8F5EE;      /* = --safe */
  --warn:#9A5B0B;      --warn-soft:#FDF4E4;      /* = --attention */
  --danger:#B42318;    --danger-soft:#FDECEA;    /* = --risk */
  --info:#4A5A6E;      --info-soft:#EEF2F6;      /* informational / historical */
  --safe:var(--good);  --safe-soft:var(--good-soft);
  --attention:var(--warn); --attention-soft:var(--warn-soft);
  --risk:var(--danger); --risk-soft:var(--danger-soft);
  --safe-fill:#2E9E6B;        /* Safe to Save bar segment */

  /* Cash Line segments (light) */
  --cl-protected:#3E5C7A;
  --cl-operating:#7FA6C6;
  --cl-retained:#A9C1D6;
  --cl-allocated:#C8D6E4;
  --cl-held-a:#E3E9F0; --cl-held-b:#CFD9E4;
  --cl-unallocated:#EEF2F6;

  /* elevation — one quiet step for cards; sheets / menus / toasts lift */
  --shadow-sm:0 1px 2px rgba(15,23,42,.04);
  --shadow-md:0 1px 2px rgba(15,23,42,.04), 0 6px 20px -8px rgba(15,23,42,.08);
  --shadow-lg:0 2px 6px rgba(15,23,42,.06), 0 24px 56px -12px rgba(15,23,42,.18);
  --shadow:var(--shadow-md);
  --scrim:rgba(15,23,42,.32);

  /* focus */
  --focus-ring:0 0 0 2px var(--surface), 0 0 0 4px var(--accent);

  color-scheme:light;
}

:root{
  /* radius */
  --r-xs:6px;   /* tiny tags */
  --r-sm:10px;  /* inputs, small controls */
  --r-md:12px;  /* buttons (non-pill), tiles */
  --r-lg:16px;  /* cards, section surfaces */
  --r-xl:22px;  /* sheets, hero */
  --r-pill:999px;

  /* spacing (4-point) */
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:24px; --sp-6:32px; --sp-7:48px; --sp-8:64px;

  /* type scale — Geist Sans; money always tabular */
  --fs-display:52px;    /* the one headline figure per screen */
  --fs-figure-l:30px;
  --fs-figure-m:21px;
  --fs-h1:28px;         /* page title */
  --fs-h2:18px;         /* section heading */
  --fs-body:15px;
  --fs-sm:14px;
  --fs-xs:13px;         /* helper / meta — the smallest running text */
  --fs-label:12px;      /* compact labels and chips (sentence case) */

  --font-sans:'Geist Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono:'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* motion — restrained; zeroed under prefers-reduced-motion (app.css) */
  --ease:cubic-bezier(.2,.7,.2,1);
  --t-fast:.12s; --t-med:.2s;

  /* shell metrics */
  --appbar-h:60px;
  --bottomnav-h:64px;
  --sidebar-w:248px;
  --content-max:1120px;
  --touch:44px;
}
