/* ============================================================
   TUL  |  tul-tokens-v1.css  -  THE FAMILY TOKEN SHEET  (DF-03a, 2026-10-08)

   One palette, one set of steps, one file. Until this sheet the family's
   palette was written out by hand in nine :root blocks (nlps-core.html is
   PASTED into the TALIA pages, the gateway and the sign-ins restate it) and
   drifted: three canvas blacks, a label grey under the 7:1 small text wants,
   no faint, no spacing, radius or motion steps. Design review 2026-10-06
   section 2.3; Nick 2026-10-07 "Go with your recs on all".

   LINKED LAST in <head>, after every pasted <style> and every app sheet, so
   at equal specificity its values win over the pasted :root blocks (a sheet
   linked first would lose to them; talia-ui-v2.css wraps its own tokens in
   :where(:root) for that reason). TALIA's pages link "/tul-tokens-v1.css",
   the gateway's link their own "tul-tokens-v1.css".

   COPIES: byte for byte at the root and in tul/ (tests/test_tul_tokens.js
   fails on a copy that drifts, on a page of TALIA or the gateway that does
   not link it last, and on a value that moves a page beyond the approved
   moves). The other apps join as they adopt it (DF-03b TITAN, DF-03c TERRA /
   TAVI / TYR, DF-03d SUBZ / CLIENT / TEL / BOX): copy this file into the
   app folder and add it to the test's COPIES list. Change it HERE, then copy.

   WHAT MOVES where it is linked (the only moves; the rest equals the values
   the pages already carry):
     - the label grey: --muted takes --ink-3 #9c958d (6.1:1 on the card, was
       #8f8981 at 5.2:1) - every secondary line, label and placeholder;
     - one black: --bg is --s0 #0e0e0f on the gateway and the sign-in, which
       were #0b0b0c, and their quiet divider --line-soft is the family's
       #222226 (was #1e1e21);
     - the hairline is DF-01's value, unchanged here, so nothing moves twice;
     - the voice (DS-04, Nick's D2, 2026-10-20): --btn-case / --btn-track and
       --label-case / --label-track say sentence case; only a sheet that reads
       them changes (the register kernel's table heads, TALIA's buttons ...).

   SCREEN ONLY for every colour: a page's print palette is its own, and an
   @media print block in a page is never overridden by this sheet. The steps
   (radius, spacing, heights, motion) hold in every medium.

   LIGHT by default, dark by choice: a sibling
   :root[data-tul-theme="light"] inside the same @media screen. The theme
   kernel sets that attribute unless the person has stored dark. Dark stays
   the cascade default (the bare :root). Portals keep the kit's own light
   and do not use this attribute. Do not use data-theme (TITAN print).

   NEW NAMES (nothing on TALIA or the gateway reads them yet; a page adopts
   them as it is next worked on): surfaces --s0..--s3; ink --ink-2 / --ink-3 /
   --ink-4 (disabled only) / --faint (the faintest text a person still reads,
   AA on the card and the input fill); brand --tan / --taupe / --taupe-deep /
   --taupe-wash (hover, focus, selection - taupe itself stays scarce);
   status --ok / --attn / --bad / --info, each with a -soft tint; radii
   --r-ctl / --r-card / --r-pill; shadows --sh-1 (pressed) / --sh-2
   (floating); spacing --sp-1..--sp-7; heights --h-ctl / --h-row / --h-target
   (the glove target); breakpoints --bp-*; focus --focus / --focus-ring;
   motion --dur-1..--dur-4 and --ease. The page's own --r is not touched.

   THE AGENTS' MARKS (AG-1, Nick D-377 / D-382, 2026-11-17): each agent's disc
   colour and the ink of its two letters, light and dark, on names of their
   OWN - --ag-titan / -talia / -terra / -tyr / -tel / -tul, each with -ink,
   and --ag-other / --ag-other-ink (today's grey mark) for an agent with no
   colour. NEVER the status names (--info / --attn / --ok / --bad): blue,
   amber and green already mean information, attention and good. Which mark
   an agent wears is the roster's (tul-ai-team-v1.js); the letters clear
   4.5:1 on their disc in both themes (tests/test_agent_marks.js).

   THE WORKSPACE BOARD (WS-2a, D-376 ruling 8 - the mockup's values, new names
   only, so no page moves): --tile-edge (a tile's hairline on the board - the
   dark divider is too faint there), --board-dot (Free's dotted canvas), and
   the sticky note - --note-yellow / -pink / -blue / -green, --note-ink, the
   marks on the paper (--note-mark), its wash (--note-wash) and shadow
   (--note-shadow) - the same in both themes: paper stays paper.

   Breakpoints: a custom property cannot be read inside @media, so the --bp-*
   values are the numbers to write in a media query, named in one place.

   No fonts, no font sizes, no url(), no @import: it loads nothing.
   ============================================================ */

/* ---- 1. Steps: every medium ---- */
:root{
  --r-ctl:4px; --r-card:8px; --r-pill:999px;
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:24px; --sp-6:32px; --sp-7:48px;
  --h-ctl:36px; --h-row:44px; --h-target:48px;
  --bp-phone:640px; --bp-drawer:820px; --bp-laptop:1100px;
  --dur-1:120ms; --dur-2:160ms; --dur-3:240ms; --dur-4:400ms;
  --ease:cubic-bezier(.2,.7,.2,1);
}

/* ---- 2. Colour: screen only ---- */
@media screen{
  :root{
    /* surfaces: canvas, card, input / raised, hover / selected */
    --s0:#0e0e0f; --s1:#161618; --s2:#1c1c1f; --s3:#202024;
    /* hairlines: the control boundary (3:1, DF-01) and the quiet divider */
    --line:#6c6761; --line-soft:#222226;
    /* ink */
    --ink:#f0ede9; --ink-bright:#f7f4f0; --ink-2:#cfc9c2; --ink-3:#9c958d; --ink-4:#6f6a64; --faint:#8a847d;
    /* brand */
    --tan:#cfc3b0; --taupe:#a89f93; --taupe-deep:#847e78; --taupe-wash:rgba(168,159,147,.14);
    /* status */
    --ok:#6db98a; --ok-soft:rgba(109,185,138,.13);
    --attn:#c8a25f; --attn-soft:rgba(200,162,95,.13);
    --bad:#cf7b7b; --bad-soft:rgba(207,123,123,.13);
    --info:#7da3c4; --info-soft:rgba(125,163,196,.13);
    /* focus: the indicator colour and the ring around it */
    --focus:var(--taupe); --focus-ring:0 0 0 3px var(--taupe-wash);
    /* elevation: hairlines first; a shadow only when something is pressed or floats */
    --sh-1:0 1px 2px rgba(0,0,0,.4); --sh-2:0 18px 44px -18px rgba(0,0,0,.66);
    /* voice (DS-04, Nick's D2 2026-10-20: sentence case): what a button and a label / table head read for their case
       and tracking - a sheet that reads them keeps today's capitals as its fallback, and print keeps its own */
    --btn-case:none; --btn-track:.01em; --label-case:none; --label-track:.04em;
    /* the agents' marks (AG-1): a disc and the ink of its two letters - never the status names */
    --ag-titan:#7da3c4; --ag-titan-ink:#161618; --ag-talia:#c8a25f; --ag-talia-ink:#161618; --ag-terra:#6db98a; --ag-terra-ink:#161618;
    --ag-tyr:#a89f93; --ag-tyr-ink:#161618; --ag-tel:#f0ede9; --ag-tel-ink:#161618; --ag-tul:#cfc3b0; --ag-tul-ink:#161618;
    --ag-other:var(--s2); --ag-other-ink:var(--ink-2);
    /* the Workspace board (WS-2a, D-376 ruling 8): a tile's edge on the board, Free's dot, and the sticky note's paper - the
       papers, their ink, marks, wash and shadow the same in both themes (paper stays paper) */
    --tile-edge:#2c2c31; --board-dot:#242428;
    --note-yellow:#f7e8a4; --note-pink:#f5cdc6; --note-blue:#cde1f0; --note-green:#d1e7cc; --note-ink:#1c1916;
    --note-mark:rgba(28,25,22,.66); --note-wash:rgba(255,255,255,.4); --note-shadow:0 1px 1px rgba(0,0,0,.12),0 10px 16px -10px rgba(0,0,0,.4);

    /* the names the apps already use, on the sheet (TALIA's pasted core, the gateway, talia-ui-v2.css) */
    --bg:var(--s0); --bg2:var(--s1); --paper:var(--s1); --bg3:var(--s2); --soft:var(--s3);
    --ink-soft:var(--ink-2); --muted:var(--ink-3);
    --brand:var(--tan); --accent:var(--taupe); --accent-deep:var(--taupe-deep); --accent-glow:var(--taupe-wash);
    --good:var(--ok); --warn:var(--attn); --steel:var(--info);
    --good-soft:var(--ok-soft); --warn-soft:var(--attn-soft); --steel-soft:var(--info-soft);
  }
  /* Opt-in light. Same names as the dark :root above. A page sets
     data-tul-theme="light" on <html>. Absent, the dark block stands. */
  :root[data-tul-theme="light"]{
    color-scheme:light;
    --s0:#f4f1ec; --s1:#fffcf8; --s2:#ebe6df; --s3:#e2dcd4;
    --line:#5c574f; --line-soft:#d4cfc7;
    --ink:#1c1916; --ink-bright:#1c1916; --ink-2:#3a342f; --ink-3:#4e4842; --ink-4:#8a847c; --faint:#5a544d;
    --tan:#6b5e4e; --taupe:#5e564e; --taupe-deep:#564f48; --taupe-wash:rgba(94,86,78,.14);
    --ok:#1b6b3c; --ok-soft:rgba(27,107,60,.12);
    --attn:#7a4e0c; --attn-soft:rgba(122,78,12,.12);
    --bad:#9d3535; --bad-soft:rgba(157,53,53,.12);
    --info:#245680; --info-soft:rgba(36,86,128,.12);
    --focus:var(--taupe); --focus-ring:0 0 0 3px var(--taupe-wash);
    --sh-1:0 1px 2px rgba(28,25,22,.08); --sh-2:0 18px 44px -18px rgba(28,25,22,.18);
    --btn-case:none; --btn-track:.01em; --label-case:none; --label-track:.04em;
    --ag-titan:#245680; --ag-titan-ink:#fffcf8; --ag-talia:#7a4e0c; --ag-talia-ink:#fffcf8; --ag-terra:#1b6b3c; --ag-terra-ink:#fffcf8;
    --ag-tyr:#5e564e; --ag-tyr-ink:#fffcf8; --ag-tel:#1c1916; --ag-tel-ink:#fffcf8; --ag-tul:#6b5e4e; --ag-tul-ink:#fffcf8;
    --ag-other:var(--s2); --ag-other-ink:var(--ink-2);
    --tile-edge:#d4cfc7; --board-dot:#d9d3ca;
    --note-yellow:#f7e8a4; --note-pink:#f5cdc6; --note-blue:#cde1f0; --note-green:#d1e7cc; --note-ink:#1c1916;
    --note-mark:rgba(28,25,22,.66); --note-wash:rgba(255,255,255,.4); --note-shadow:0 1px 1px rgba(0,0,0,.12),0 10px 16px -10px rgba(0,0,0,.4);
    --bg:var(--s0); --bg2:var(--s1); --paper:var(--s1); --bg3:var(--s2); --soft:var(--s3);
    --ink-soft:var(--ink-2); --muted:var(--ink-3);
    --brand:var(--tan); --accent:var(--taupe); --accent-deep:var(--taupe-deep); --accent-glow:var(--taupe-wash);
    --good:var(--ok); --warn:var(--attn); --steel:var(--info);
    --good-soft:var(--ok-soft); --warn-soft:var(--attn-soft); --steel-soft:var(--info-soft);
  }
}

/* ---- 3. Motion: gated once ---- */
@media (prefers-reduced-motion: reduce){
  :root{ --dur-1:0ms; --dur-2:0ms; --dur-3:0ms; --dur-4:0ms; }
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}
