/* Series design tokens — the single source for every tool's palette.
   Superset of all tools' custom properties; unused tokens cost nothing.
   Theme resolution: OS preference via media query; the viewer's explicit
   data-theme wins in both directions. */

/* House width tiers — max-width caps by ROLE (pick a name, not a number):
   form=forms · focus=reading column · instrument=playable artefact ·
   board=multi-column board · band=full-bleed band.
   Theme-independent (not in theme blocks); NOT usable in @media (custom props
   don't resolve there — breakpoints stay raw px). */
:root{
  --w-form:720px; --w-focus:820px; --w-instrument:1160px; --w-board:1240px; --w-band:1760px;
}
/* Motion: fast = feedback, base = a thing moving, slow = a surface. */
:root{--dur-fast:120ms;--dur-base:200ms;--dur-slow:320ms;--ease-out:cubic-bezier(.2,.8,.2,1);--ease-inout:cubic-bezier(.4,0,.2,1)}

:root{
  /* Tell the UA the page supports both schemes, so it paints the OS-correct canvas
     (and native controls/scrollbars) from the FIRST frame — without this the browser
     defaults to a light canvas and flashes white before the dark --bg paints on load
     (esp. Safari). data-theme forces the exact scheme below so the toggle still wins. */
  color-scheme: light dark;
  --bg:#FBFBFA; --grid:transparent; --card:#F4F4F1; --border:#D9D9D5;
  --ink:#111111; --muted:#6B6B68; --accent:#1F4FD8; --accent-ink:#1A44C2;
  --brand:#E2231A; --brand-text:#D62015; --brand-on:#FFFFFF; --data:#1F4FD8;
  --accent2:#B04E1E; --hl:rgba(31,79,216,.16); --err:#B3403A; --track:#EDF0EE;
  --st-done:#1D7A3E; --st-doing:#1F4FD8; --st-risk:#9A6A00; --st-blocked:#B3403A;
  --st-done-ink:#1C753C; --st-doing-ink:#1A44C2; --st-risk-ink:#8E6200; --st-blocked-ink:#B3403A;
  --shadow:none;
  --thumb:#F1F5F3;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#121212; --grid:transparent; --card:#1A1A19; --border:#2E2E2C;
    --ink:#F1F1EE; --muted:#8F8F8A; --accent:#7C97FF; --accent-ink:#93A8FF;
    --brand:#FF4B3E; --brand-text:#FF4B3E; --brand-on:#121212; --data:#7C97FF;
    --accent2:#E06A2E; --hl:rgba(124,151,255,.28); --err:#E07A72; --track:#232E37;
    --st-done:#3FA163; --st-doing:#7C97FF; --st-risk:#B9880F; --st-blocked:#D96A61;
    --st-done-ink:#55AC75; --st-doing-ink:#93A8FF; --st-risk-ink:#BE9122; --st-blocked-ink:#DD7B73;
    --shadow:none;
    --thumb:#151C23;
  }
}
:root[data-theme="dark"]{
  color-scheme: dark;
  --bg:#121212; --grid:transparent; --card:#1A1A19; --border:#2E2E2C;
  --ink:#F1F1EE; --muted:#8F8F8A; --accent:#7C97FF; --accent-ink:#93A8FF;
    --brand:#FF4B3E; --brand-text:#FF4B3E; --brand-on:#121212; --data:#7C97FF;
  --accent2:#E06A2E; --hl:rgba(124,151,255,.28); --err:#E07A72; --track:#232E37;
  --st-done:#3FA163; --st-doing:#7C97FF; --st-risk:#B9880F; --st-blocked:#D96A61;
  --st-done-ink:#55AC75; --st-doing-ink:#93A8FF; --st-risk-ink:#BE9122; --st-blocked-ink:#DD7B73;
  --shadow:none;
  --thumb:#151C23;
}
:root[data-theme="light"]{
  color-scheme: light;
  --bg:#FBFBFA; --grid:transparent; --card:#F4F4F1; --border:#D9D9D5;
  --ink:#111111; --muted:#6B6B68; --accent:#1F4FD8; --accent-ink:#1A44C2;
  --brand:#E2231A; --brand-text:#D62015; --brand-on:#FFFFFF; --data:#1F4FD8;
  --accent2:#B04E1E; --hl:rgba(31,79,216,.16); --err:#B3403A; --track:#EDF0EE;
  --st-done:#1D7A3E; --st-doing:#1F4FD8; --st-risk:#9A6A00; --st-blocked:#B3403A;
  --st-done-ink:#1C753C; --st-doing-ink:#1A44C2; --st-risk-ink:#8E6200; --st-blocked-ink:#B3403A;
  --shadow:none;
  --thumb:#F1F5F3;
}
