/* tokens.css: the design language's variables (Draft 9, _System/design-language/tokens.css) and gaudims' own, for
   tasks, canvas and notes. Variables only (on :root, and --ink on the two surfaces that draw people's things, at the
   end): no base rules and no parts, so loading it changes nothing on its own.
   The parts are in shared.css. Edit shared/tokens.css, never the copies (shared/sync.sh copies it into each app).
   Each page loads it first, then shared.css, then its app.css. (2026-11-16)

   Until an app's own redesign task removes its :root block, that app.css sets --bg, --ink, --hover, --ui and the
   rest itself, and those win (they load later). */

:root {
  /* ---------- Draft 9, verbatim apart from the typeface ---------- */
  /* Type */
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;   /* gaudims' typeface: never the system font */
  --size: 14px;          /* each surface sets its own one size; see the "One size per surface" table */
  --lead: 1.5;           /* line height on screen; print uses 1.4 */
  --w-text: 400;
  --w-strong: 500;       /* the only other weight */

  /* Paper */
  --bg: #fff;            /* paper */
  --ink: #141414;        /* text, rules under section heads, the active tick */
  --mute: #6e6e6e;       /* second voice: secondary lines, idle nav (5.1:1 on white) */
  --rule: #e6e6e6;       /* hairlines between rows, link underlines at rest */
  --tick: #c9c9c9;       /* idle ticks, separator dots */
  --tile: #f4f4f3;       /* the one fill: item tiles */
  --wait: #eeeeee;       /* where a still sits before it loads */
  --signal: #c4352b;     /* the one signal colour: broken, overdue, failed. Always beside a word (5.4:1 on white) */
  --select: #f4f4f3;     /* a selected row: the tile grey */
  --btn-hover: #333333;  /* the button under the pointer */
  --hover: #fafafa;      /* a table row under the pointer */
  --tint-mix: 22%;       /* how much accent goes into a tint; more on dark paper so the hue survives */

  /* Accents: vivid colours that name a kind of thing. Strong, so always small: a swatch, a bar, a thin rule, a light
     tint. Never for importance, never for text. */
  --a-blue: #2563eb;
  --a-green: #2e9e4f;
  --a-clay: #e0662b;
  --a-straw: #e8b400;
  --a-heather: #8b4fd6;
  --a-teal: #0e9aa7;
  --a-rose: #e0457b;
  --a-sand: #a9743a;
  --a-slate: #64748b;
  --a-stone: #8a8a86;

  /* Viewer: the one dark surface, for looking at stills and film (a board on Night) */
  --night: #0b0b0b;
  --night-ink: #e8e8e6;
  --night-mute: #8e8c88;
  --night-rule: #2a2a2a;  /* hairlines on night */
  --night-wait: #1a1a1a;  /* where a still sits before it loads, on night */
  --veil: rgba(0, 0, 0, .6);   /* the label sitting on a frame */

  /* Space: six steps, nothing between them */
  --s-hair: 2px;         /* stacked lines in a list of links */
  --s-gap: 6px;          /* between stills */
  --s-line: 12px;        /* inside a row, under a heading */
  --s-gutter: 24px;      /* page edge */
  --s-col: 48px;         /* between notes and column; between groups */
  --s-section: 112px;    /* between sections */

  /* Motion on screens. gaudims keeps its own three speeds (--fast, --mid, --slow on --ease, below); these are the
     design language's, kept so its parts can be read against it. */
  --m-fade: 320ms;
  --m-move: 560ms;
  --m-ease: cubic-bezier(.35, 0, .1, 1);

  /* Motion in video */
  --v-fade: 267ms;
  --v-move: 600ms;
  --v-ease: cubic-bezier(.2, 0, 0, 1);

  /* Corners: nearly invisible. Stills stay square */
  --radius: 2px;
  --radius-small: 1px;

  /* How much accent goes behind a status word, and into a row under the pointer or selected */
  --chip-mix: 18%;
  --row-hover-mix: 5%;
  --row-sel-mix: 11%;

  /* Layout */
  --notes: 220px;
  --col: 880px;

  /* ---------- gaudims ---------- */
  /* The old names the apps' rules still use, on the one typeface: they take it once an app drops its own :root. */
  --ui: var(--font);
  --text: var(--font);

  /* Six text sizes. The logo and the sign-in poster are outside the scale. */
  --t-title: 38px;       /* page titles: an area, folder or board name */
  --t-head: 22px;        /* section heads */
  --t-name: 17px;        /* task names in the list and flow */
  --t-body: 14px;        /* rows, controls, panels and body text */
  --t-small: 12px;       /* labels and small print */
  --t-write: 18px;       /* the note writing page, its title the same size in 500 */

  /* Area colours 1 to 8, as stored on areas, folders and tasks (1 red to 8 pink), drawn as the nearest accent. */
  --a1: var(--a-clay); --a2: var(--a-sand); --a3: var(--a-straw); --a4: var(--a-green);
  --a5: var(--a-teal); --a6: var(--a-blue); --a7: var(--a-heather); --a8: var(--a-rose);

  /* Status, in every view: Ready, Doing, Waiting on N, Blocked (Done is grey) */
  --st-ready: var(--a-green); --st-doing: var(--a-blue); --st-wait: var(--a-straw); --st-blocked: var(--a-clay);

  /* Priority marks: today's red, amber and grey (Christian's pick: colour for importance, here only) */
  --pri-high: #b8473a; --pri-medium: #c98a5a; --pri-low: #a3a3a3;

  /* Other people, live: one colour each (picked from their account id), the same on everyone's screen */
  --live-1: #c2410c; --live-2: #1d4ed8; --live-3: #047857; --live-4: #7e22ce; --live-5: #be123c; --live-6: #0e7490;

  /* Today's motion: three speeds on one curve; nothing moves under reduced motion */
  --ease: cubic-bezier(.2, .7, .2, 1); --fast: .18s; --mid: .32s; --slow: .5s;

  /* ---------- Colours for what people make ----------
     Board items, notes and exports read these by name (ink, muted, paper, c1 to c8: resolveColor in canvas's io.js),
     and note backgrounds and rhyme tints use them, so they keep today's exact values in both themes. Interface CSS
     never uses them: it uses --ink, --mute, --rule, --tick, --tile. */
  --k-ink: #1a1a1a;
  --muted: #737373;
  --node-bg: #ececec;    /* "paper" on a board */
  --c1: #f2b8b8; --c2: #f3cc9f; --c3: #e9dc8a; --c4: #badca6;
  --c5: #a6dccf; --c6: #b0ccf1; --c7: #cdbff3; --c8: #ecb9dc;
}

/* ---------- Dark: Draft 9's dark paper, and the dark values of gaudims' own ----------
   shared.js keeps data-theme on <html> at the resolved 'light' or 'dark' at all times (Auto follows the system
   there), so the media block only matters before it runs. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211; --ink: #e8e8e6; --mute: #8e8c88; --rule: #2a2a29; --tick: #4d4d4a;
    --tile: #1c1c1b; --select: #1c1c1b; --wait: #1f1f1e; --signal: #e0675a; --btn-hover: #c9c9c6; --hover: #171716; --tint-mix: 36%;
    --chip-mix: 30%; --row-hover-mix: 8%; --row-sel-mix: 16%;
    color-scheme: dark;
    --pri-high: #e0705f; --pri-medium: #d9a15e; --pri-low: #6e6e6e;
    --k-ink: #e8e8e8; --muted: #8f8f8f; --node-bg: #222222;
    --c1: #6e2f2f; --c2: #6d4524; --c3: #5f561c; --c4: #2f5128;
    --c5: #1f4e46; --c6: #264264; --c7: #41326b; --c8: #5e2c52;
  }
}
:root[data-theme="dark"] {
  --bg: #121211; --ink: #e8e8e6; --mute: #8e8c88; --rule: #2a2a29; --tick: #4d4d4a;
  --tile: #1c1c1b; --select: #1c1c1b; --wait: #1f1f1e; --signal: #e0675a; --btn-hover: #c9c9c6; --hover: #171716; --tint-mix: 36%;
  --chip-mix: 30%; --row-hover-mix: 8%; --row-sel-mix: 16%;
  color-scheme: dark;
  --pri-high: #e0705f; --pri-medium: #d9a15e; --pri-low: #6e6e6e;
  --k-ink: #e8e8e8; --muted: #8f8f8f; --node-bg: #222222;
  --c1: #6e2f2f; --c2: #6d4524; --c3: #5f561c; --c4: #2f5128;
  --c5: #1f4e46; --c6: #264264; --c7: #41326b; --c8: #5e2c52;
}

/* Surfaces that draw people's things (a board's stage, the note editor) take today's ink, not the interface's. */
.stage, .ne { --ink: var(--k-ink); }
