/* ProChart design tokens — cut verbatim out of static/style.css so /download and
   /legal render in the same palette, type ramp and radii as the application.
   Loaded first (before style.css / policy.css / download.css) on every page.
   `color-scheme: light` is deliberate: the app ships no dark theme, so the UA
   must not auto-invert form controls, scrollbars or canvases. */

:root {
  color-scheme: light;
  /* ProChart palette */
  --c-brand-900:#16233f; --c-brand-800:#1e2d4a; --c-brand-700:#2a3c5e;
  --c-accent:#2563eb; --c-accent-hover:#1d4ed8; --c-accent-active:#1e40af;
  --c-accent-soft:rgba(37,99,235,.14); --c-accent-tint:#eef4ff;
  --c-bg:#f4f6fb; --c-surface:#fff; --c-surface-2:#f8faff;
  --c-border:#e4eaf3; --c-border-strong:#cdd9ea; --c-control-border:#7d8ba0;
  --c-text:#1a2233; --c-text-muted:#5b667a; --c-text-faint:#3d4b63;
  --c-on-brand:#fff; --c-on-brand-muted:#9fb2cf;
  --c-success:#187a45; --c-success-bg:#e6f4ea;
  --c-warn:#8a5000; --c-danger:#c0392b; --c-danger-bg:#fdecea;
  --c-dirty-border:#8a5000; --c-dirty-bg:#fffaf0;
  --c-focus-on-dark:#60a5fa;
  --action-hover:rgba(26,34,51,.04); --action-selected:rgba(37,99,235,.12);
  --shadow-sm:0 1px 2px rgba(16,24,42,.06);
  --shadow-md:0 6px 18px rgba(16,24,42,.12);
  --shadow-lg:0 18px 48px rgba(16,24,42,.20);
  --r-sm:6px; --r-md:8px; --r-lg:12px;
  /* Type scale — one ramp replacing ~16 ad-hoc sizes (fractional / near values
     collapsed to the nearest step). */
  --text-2xs:9px; --text-xs:11px; --text-sm:12px; --text-base:13px;
  --text-md:14px; --text-lg:16px; --text-xl:19px; --text-2xl:24px;
  --ease:cubic-bezier(.4,0,.2,1);
  --font:"Public Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  /* Field-type colour coding */
  --ft-text:#2563eb; --ft-checkbox:#187a45; --ft-textarea:#7c3aed;
  --ft-date:#8a5000; --ft-signature:#c0392b; --ft-drawing:#08758f; --ft-selected:#8a5a00;
  --target-min:24px; --target-comfort:40px;
  /* Snap-guide line + preview-mockup palette (single-sourced here, not inlined) */
  --guide-line:#ff2d92;
  --pv-field-border:#aaa; --pv-drawing-border:#888;
  --pv-bg:rgba(255,255,255,.65); --pv-readonly-bg:rgba(235,235,235,.7);
  --pv-readonly-text:#555; --pv-bottombar-bg:#f3f4f6;

  /* Legacy aliases — keep existing rules (payment popup, preview, context menu,
     guides, etc.) and any leftover markup styled correctly. */
  --bg:var(--c-bg); --surface:var(--c-surface); --border:var(--c-border);
  --text:var(--c-text); --muted:var(--c-text-muted);
  --primary:var(--c-accent); --primary-dark:var(--c-accent-hover);
  --danger:var(--c-danger);
  --field-text:var(--ft-text); --field-checkbox:var(--ft-checkbox);
  --field-textarea:var(--ft-textarea); --field-date:var(--ft-date);
  --field-signature:var(--ft-signature); --field-selected:var(--ft-selected);

  /* ── Readable-surface tokens (design handoff 2026-09) ─────────────────────
     Added for the upload / analyze / checkout readability pass. `--c-text-faint`
     above was retuned #667085 → #3d4b63 (the old value is 3.9:1 on white and
     fails AA); every other name here is new, so no existing rule changes. */
  --c-ink:#111a2b;                 /* primary text on readable surfaces */
  --c-text-secondary:#2f3b50;      /* secondary copy, status bar, overlines */
  --c-text-deemph:#5b667a;         /* reviewed rows / lock icon only */
  --c-primary:#1d4ed8; --c-primary-hover:#1e40af;   /* upload/analyze/checkout primary + links */
  --c-accent-deep:#1e3a6b; --c-accent-border:#93b4e8;
  --c-accent-tint-2:#dfebff; --c-accent-tint-3:#eaf1fe;
  --c-pill-idle:#31456b; --c-pill-label:#cddcf2; --c-pill-num:#e4ecf9;
  --c-border-hair:#eef1f7; --c-dropzone-border:#8a9cb8; --c-track:#e9edf5;
  --c-success-text:#146138; --c-success-border:#8dc7a5;
  --c-warn-text:#7a3e00; --c-warn-border:#d8a24a;
  --c-warn-bg:#fff7ed; --c-warn-track:#f6e2c6;
  --c-danger-deep:#a5281a; --c-danger-text:#8c231a; --c-danger-border:#d98b82;
}

