/* MARCUS - the operator's inbox.
 *
 * CONSOLE v3, THE DISPATCH BOARD (Fable design pass, 2026-09-28; spec in
 * RUN_STATE/design/console_v3_spec.md). Navy ground, one orange, Sora + Epilogue, no
 * monospace. The token NAMES below are still the 2026-09-20 SK Sentinel port's; the
 * VALUES are the v3 navy set (section 1.1 of the spec). History of the port follows.
 *
 * THE DESIGN SYSTEM WAS PORTED, 1:1, FROM SK SENTINEL (owner's call, 2026-09-20).
 * Source of truth: `SK  Sentinel/demo/frontend/src/theme.css` + `src/desk.css`. Every
 * colour, radius, shadow, easing curve, type size and button shape below is that file's,
 * carried over by VALUE. Only the SK Sentinel NAME and LOGOS were excluded -- Marcus keeps
 * its own wordmark and its own content.
 *
 * THE STRUCTURE IS WORKIZ'S (owner's call, 2026-09-21), and nothing of the skin was traded
 * for it: `SWITCHBOARD/WORKIZ_MESSAGE_SPEC.md` is the recon this page's shape follows --
 * an inbox of conversation rows (name, time, preview, state), a thread pane with the
 * person at the top and the composer at the bottom. Not one hue, family, radius or shadow
 * was added to pay for it; every rule below resolves to a token that was already here.
 *
 * ONE PAGE (owner, 2026-09-24): "a little control panel on the side on inbox to have
 * settings in it will be fine. So we can maybe merge it." `.desk` holds the inbox (or Test
 * Marcus in its place) and `.ctlpanel` beside it: a 340px column above 1100px, a drawer
 * from the topbar at and below it. The separate settings page and its three-column
 * `.wrap` / `.rail` / `.center` / `.side` shell are gone.
 *
 * TOKEN NAMES ARE MARCUS'S, VALUES ARE SK SENTINEL'S. The two systems name the same roles
 * differently and one name collides outright: SK's `--ink*` are SURFACES, Marcus's `--ink*`
 * are TEXT. Renaming Marcus's tokens would have rewritten console.js's stylesheet contract
 * and eight WCAG guards in tests/test_console_static.py for no pixel gained, so the map is:
 *
 *   SURFACES   --bg <- SK --ink     --panel  <- SK --ink-2   (rails, cards)
 *              --panel2 <- SK --ink-4 (nested/hover)   --bubble <- SK --ink-3
 *   HAIRLINES  --line, --hairline <- SK --line      --line-strong <- SK --line-2
 *   TEXT       --ink <- SK --text   --ink-2, --dim <- SK --text-2   --faint <- SK --text-3
 *   ACCENT     --amber <- SK --amber   --amber-hi <- SK --amber-2
 *              --on-amber <- SK --on-accent   --amber-ink <- SK --ember (amber as SMALL
 *              TEXT, which on this ground is the full-strength hue)
 *   SEMANTIC   --ok <- SK --green  --warn <- SK --yellow  --bad <- SK --red
 *              --held <- SK --blue   --on-bad <- SK --on-accent, as the ink on a solid
 *              --bad fill (NEO-144)
 *   PRIMITIVES --radius/--radius-s/--radius-l, --shadow-sm/--shadow/--shadow-lg,
 *              --ease/--t/--t-fast, --font/--font-h  are SK's own names and values.
 *
 * TWO THEMES, NIGHT BY DEFAULT (2026-09-28, DESIGN_SYSTEM.md migration step 1). Night is
 * SK Sentinel's dark, refined; Daylight is a high-contrast light theme for the sun, set
 * by `theme-boot.js` and still a preview. The reasoning and every before/after value are
 * in the tokens block below. Every ratio, in both themes, is computed from this
 * stylesheet by tests/test_console_static.py.
 *
 * WHAT DID NOT COME ACROSS, and why (three, all deliberate):
 *   1. The focus ring stays 2px, not SK's 3px -- three NEO-certified rules pin the width
 *      and a ring is behaviour, not skin.
 *   2. Inputs stay at 16px, not SK's 14px -- anything smaller makes iOS zoom the console.
 *   3. SK's inputs suppress the focus ring entirely and keep only an amber border. The
 *      amber border IS ported; the ring stays on top of it. A ring is the indicator and
 *      a border is a hint, and suppressing the indicator is the one thing a11y never
 *      trades away -- tests/test_console_static.py fails the build if it reappears.
 *
 * State badges still always carry TEXT: colour is never the only signal on this board.
 */

/* ------------------------------------------------------------------ self-hosted type
 * Sora (body) + Epilogue (headings), the same two families SK Sentinel self-hosts, copied
 * from its `public/fonts/webfonts` as the four subsets this console can actually use.
 * Declared inline below rather than pulled in from a second stylesheet, and never from a
 * font host: the CSP is `default-src 'none'; font-src 'self'`, so a third-party origin
 * here would be blocked -- silently, in production only, with the board quietly falling
 * back to system type and nobody being told.
 * Both files are VARIABLE (Sora wght 100-800, Epilogue wght 100-900), which is why one
 * @font-face per subset covers every weight instead of Google's ten.
 * The vietnamese subsets were NOT copied -- 44KB for glyphs this board has no source for;
 * they fall back to the system stack rather than not rendering. */
@font-face{font-family:'Sora';font-style:normal;font-weight:100 800;font-display:swap;
  src:url("fonts/sora-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,
    U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Sora';font-style:normal;font-weight:100 800;font-display:swap;
  src:url("fonts/sora-latin-ext.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,
    U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,
    U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Epilogue';font-style:normal;font-weight:100 900;font-display:swap;
  src:url("fonts/epilogue-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,
    U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Epilogue';font-style:normal;font-weight:100 900;font-display:swap;
  src:url("fonts/epilogue-latin-ext.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,
    U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,
    U+2C60-2C7F,U+A720-A7FF}


/* ------------------------------------------------------------------ tokens
 *
 * TWO THEMES, ONE TOKEN SET (DESIGN_SYSTEM.md "Graphite & Signal", migration step 1,
 * 2026-09-28). Night is plain `:root` and is the default; Daylight is the
 * `:root[data-theme="daylight"]` block under it, for direct sun on a phone in a truck.
 *
 * The ruling this replaces (2026-09-20: one theme, dark) named its own condition for light
 * to come back: "a real light block WITH a control that sets it and guards that measure
 * it". All three now exist: `theme-boot.js` writes `data-theme` on <html> before this
 * sheet is parsed (the CSP forbids an inline bootstrap), the Auto / Daylight / Night
 * control is in Controls > Devices, and tests/test_console_static.py measures every text
 * token on every surface AND every (ink, fill) pair the rules below actually paint, in
 * BOTH themes.
 *
 * DAYLIGHT IS A PREVIEW. The control is shown only while `theme-boot.js` carries
 * `PREVIEW = true`; set it false and every device is back on Night with no CSS revert.
 * The Auto default and the one-tap app-bar toggle wait for a NEO Daylight pass at 390
 * and 1280 (review change 4).
 *
 * ROLE TOKENS ARE THE SOURCE OF TRUTH (`--surface-*`, `--text-*`, `--accent*`, the
 * semantic set). The old names further down are ALIASES, kept so console.js, the demo
 * and every guard keep working until migration step 11 retires them. Night moved by
 * exactly these swaps (step 1's list; everything else is value for value):
 *     --bg     #0B0B0C -> --surface-0 #0C0E11     --panel  #131315 -> --surface-1 #13161A
 *     --bubble #1A1A1D -> --surface-2 #1B1F25     --panel2 #262628 -> --surface-3 #262B32
 *     --line   #2C2C30 -> #2A3038                 --line-strong #3A3A40 -> --line-control #687280
 *     --ink    #FDFDFD -> --text-1 #F2F4F7        --ink-2/--dim #B8B8BE -> --text-2 #BAC1CB
 *     --faint  #8C8C96 -> --text-3 #939CA8        --amber-hi #FFCE02 -> --accent-hover #FFB829
 *     --amber-tint #332813 -> --accent-tint #2B2210
 *     --on-amber/--on-bad #151517 -> --on-accent/--on-danger #121418
 *     --scrim-ink rgba(0,0,0,.6) -> --scrim rgba(6,8,10,.62)
 * NOT moved in Night at step 1, on purpose: the semantic hues keep today's values
 * (--danger #FF8A80, --success #35D07F, --caution #FFCE02, --info #4FB3FF and their
 * tints). The spec's Night semantics (#FF7D73 / #40D98F / #EBCB4B / #72B8FF) would put
 * WAITING (6.73:1) BELOW HELD (7.77:1) on the same row, which is the NEO-57 order
 * inverted; they wait for the badge step, where that ordering is re-seated. The
 * eleven source hues are the owner's (2026-09-21) and do not move in Night at all.
 */
:root{
  color-scheme:light;
  --logo-on-dark:block; --logo-on-light:none;    /* which lockup cut shows (2026-10-21) */

  /* ---- role tokens, Night = THE DISPATCH BOARD (console v3, Fable pass 2026-09-28) ----
   * Navy is the room, orange is the hand (`~/.claude/rules/html-deliverable.md`: navy
   * #070D1A + orange #FF8A3D, never a light screen). Five navy tints step the surfaces
   * up; two faint radial glows on <body> give the ground depth. Every ratio below is
   * re-measured by tests/test_console_static.py on the RESOLVED token. */
  --surface-0:#EEF1F5;     /* page ground (plus the two glows on body)   */
  --surface-1:#FFFFFF;     /* app bar, tab bar, rail, composer            */
  --surface-2:#F5F6F8;     /* cards, rows on hover, inputs                */
  --surface-3:#E9EDF2;     /* customer bubble, raised chips, quiet pills  */
  --surface-4:#D9DEE5;     /* pressed / selected segment                  */
  --surface-5:#C4CCD8;     /* fact dot off, timing "waited"               */
  --marcus:#FFF3E6;        /* Marcus's bubble and the draft quote         */
  --line:#D9DEE5;          /* hairline (rgba(160,190,255,.09) on s1)      */
  --line-control:#7B8491;  /* the boundary of a control, >= 3:1           */
  --line-3:#AEB7C4;        /* dashed affordance                           */
  --scrim:rgba(13,16,21,.45);
  --glass:rgba(255,255,255,.94);     /* the app bar over the page, where blur is supported */
  --glass-2:rgba(255,255,255,.96);   /* the tab bar */
  --gloss:0 0 0 transparent;   /* the highlight on the orange mark */
  --led-halo:rgba(61,220,151,.18); --led-halo-lo:rgba(61,220,151,.14); --led-halo-hi:rgba(61,220,151,.32);
  --led-halo-bad:rgba(255,107,107,.2); --led-halo-acc:rgba(224,136,47,.22);
  --glow-warm:transparent;
  --glow-cool:transparent;

  --text-1:#0D1320;
  --text-2:#3A4555;
  --text-3:#4F5B6C;        /* the lowest text tone: >= 5:1 on every surface */

  --accent:#E0882F;        /* the one orange: fill, selection, what needs him */
  --accent-hover:#E99A4A;
  --accent-hover-2:#F0A960;
  --accent-deep:#B86A1C;
  --on-accent:#1A1206;     /* text on an orange fill (8.2:1) */
  --accent-text:#8F5700;   /* orange as WORDS */
  --accent-stroke:#B86A1C; /* orange as a BOUNDARY (selected, pressed, focused field) */
  --accent-edge:#B86A1C;
  --accent-tint:#FFF3E6;   /* rgba(255,138,61,.12) on s2, as a solid the guards can read */
  --accent-line:#F0C08F;
  --accent-glow:transparent;
  --focus:#8F5700;
  --owner-tint:#E5EFFA;

  --danger:#B42318;        --danger-tint:#FDECEA;   --danger-ink:var(--danger);
  --on-danger:#FFFFFF;     /* NEO-144: never white on the red */
  --success:#11703D;       --success-tint:#E3F4EA;  --success-ink:var(--success);
  --caution:#735600;       --caution-tint:#FFF4D1;  --caution-ink:var(--caution);
  --info:#1C5DA6;          --info-tint:#E5EFFA;     --info-ink:var(--info);

  /* The source strip's ink. Night: the ground, >= 4.5 on all twelve fills (voice is the
   * one between 4.5 and 5.0, the owner-locked hue). Daylight: white on darkened fills. */
  /* Paper for things that must stay paper in any theme: the QR code a phone camera reads
   * and the customer's email, shown on the white it was written for. */
  --paper:#FFFFFF;
  --paper-ink:#000000;

  /* The primary button: the orange gradient with its glow. Tokens, not literals, so
   * Daylight paints them its own way. */
  --primary-fill:var(--accent);
  --primary-fill-hover:var(--accent-hover);
  --primary-edge:var(--accent-edge);
  --primary-glow:0 1px 2px rgba(16,24,40,.12);
  --primary-glow-hover:0 2px 6px rgba(16,24,40,.16);
  --danger-glow:0 1px 2px rgba(16,24,40,.12);
  --lift-up:0 -8px 20px rgba(16,24,40,.08);
  --lift-up-sm:0 -4px 12px rgba(16,24,40,.08);

  /* ---- ROOM PALETTE TOKENS, for the control room below ----
   * The room wore navy/orange before the rest of the board did; now it is the same pair.
   * Kept as names so `.crview`'s `--cr-*` map stays a one-line fold. */
  --room-bg:#070D1A;
  --room-card:#0E1628;
  --room-card2:#15203A;
  --room-line:#24314F;
  --room-ink:#F2F5FA;
  --room-dim:#B4BED0;
  --room-amber:#FF8A3D;
  --room-on-amber:#070D1A;
  --room-bad:#FF8A80;
  --room-bad-bg:#3A1518;
  --room-ok:#35D07F;
  --room-ok-bg:#10281E;

  /* ---- the old names, as aliases of the roles (retired at migration step 11) ---- */
  --bg:var(--surface-0);
  --panel:var(--surface-1);
  --bubble:var(--surface-2);
  --panel2:var(--surface-3);
  --hairline:var(--line);
  --line-strong:var(--line-control);
  --ink:var(--text-1);
  --ink-2:var(--text-2);
  --dim:var(--text-2);
  --faint:var(--text-3);
  --amber:var(--accent);
  --amber-hi:var(--accent-hover);
  --amber-ink:var(--accent-text);
  --amber-tint:var(--accent-tint);
  --amber-line:var(--accent-line);
  --on-amber:var(--on-accent);
  --ok:var(--success);       --ok-bg:var(--success-tint);
  --warn:var(--caution);     --warn-bg:var(--caution-tint);  --warn-line:#C7BB99;
  --bad:var(--danger);       --bad-bg:var(--danger-tint);    --bad-line:#E1A7A3;
  --on-bad:var(--on-danger);
  --held:var(--info);        --held-bg:var(--info-tint);
  --ok-ink:var(--success-ink); --bad-ink:var(--danger-ink);
  --warn-ink:var(--caution-ink); --held-ink:var(--info-ink);
  --scrim-ink:var(--scrim);

  /* THE CHANNEL HUES: the eleven of 2026-09-21 (min pairwise dE76 32.2, pinned in
   * tests/test_console_lsa_surface.py -- "none of them moved"). v3 draws each as a 40px
   * tile: the hue as ink on its own dark tint (`--tile-*`, measured >= 4.5:1 below). The
   * spec's brighter six (1.1) wait on the owner: moving them re-points that guard. */
  --s-website:#1F6FC0;
  --s-messenger:#B45200;
  --s-whatsapp:#177E47;
  --s-workiz_sms:#8A6800;
  --s-thumbtack:#7D3FA6;
  --s-lsa:#007C75;
  --s-angi:#537900;
  --s-yelp:#D1263D;
  --s-instagram:#BE339D;
  --s-voice:#3F4FE0;
  --s-sweeper:#676F7B;
  --s-unknown:#676F7B;
  /* the tile fills: the hue at 14% on s2, as solids the guards can measure */
  --tile-website:var(--s-website);
  --tile-messenger:var(--s-messenger);
  --tile-whatsapp:var(--s-whatsapp);
  --tile-workiz_sms:var(--s-workiz_sms);
  --tile-thumbtack:var(--s-thumbtack);
  --tile-lsa:var(--s-lsa);
  --tile-angi:var(--s-angi);
  --tile-yelp:var(--s-yelp);
  --tile-instagram:var(--s-instagram);
  --tile-voice:var(--s-voice);  /* the owner-locked voice blue clears 4.5 only on the ground */
  --tile-sweeper:var(--s-sweeper);
  --tile-unknown:var(--s-unknown);

  /* type - Sora body, Epilogue headings. `--mono` survives as a name only and resolves
   * to Sora: NO MONOSPACE anywhere he looks (owner, 2026-09-23). */
  --font:'Sora',-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  --font-h:'Epilogue','Sora',-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  --mono:var(--font);

  /* primitives (console v3 1.3) */
  --shadow-sm:0 1px 2px rgba(16,24,40,.06);
  --shadow:0 12px 32px rgba(16,24,40,.14);
  --shadow-lg:0 24px 64px rgba(16,24,40,.18);
  --radius:12px; --radius-s:10px; --radius-l:14px; --radius-xl:16px;
  --ease:cubic-bezier(.2,.8,.2,1); --ease-in:cubic-bezier(.4,0,1,1); --t-fast:140ms; --t:220ms;

  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:24px; --sp-6:32px;
  --tap:44px;
  --fs-1:12.5px; --fs0:13.5px; --fs1:15px; --fs2:17px; --fs3:20px; --fs4:24px; --fs5:30px;
  --top-h:60px; --tab-h:64px;
  /* ---- THE FRAME (concept A, 2026-10-22): navy around the light work. These feed the
   * FRAME SCOPE rule below (.topbar, .screens, .tabbar, .ctl-head, .deck > .sec), which
   * re-declares the role tokens and the aliases from them; Daylight sets them light. ---- */
  --fr-surface-0:#070D1A; --fr-surface-1:#070D1A; --fr-surface-2:#101B33; --fr-surface-3:#182542;
  --fr-surface-4:#1F3152; --fr-surface-5:#28407A; --fr-line:#182542; --fr-line-control:#6E7FA3;
  --fr-text-1:#FFFFFF; --fr-text-2:#C5CEDD; --fr-text-3:#9AA6BD;
  --fr-accent-text:#FFA566; --fr-poly-accent-text:#FF8F66; --fr-accent-tint:#2A2130;
  --fr-glass:rgba(7,13,26,.96);
  --fr-danger:#FF6B6B; --fr-danger-tint:#2A151E; --fr-danger-ink:#FF9A9A; --fr-on-danger:#1A0505;
  --fr-success:#3DDC97; --fr-success-tint:#12302B; --fr-success-ink:#6BE8B3;
  --fr-caution:#FFC857; --fr-caution-tint:#302A1E; --fr-caution-ink:#FFD98A;
  --fr-info:#6FB3FF; --fr-info-tint:#1E3452; --fr-info-ink:#9CCBFF;
  --fr-warn-line:#4A3A1E; --fr-bad-line:#52222A; --fr-shadow-sm:0 1px 2px rgba(0,0,0,.5);
  /* ---- POLY MARCUS'S OWN ORANGE (concept A: one flat accent per company). Read only by
   * `:root[data-co="poly"]` after the Daylight block. ---- */
  --poly-accent:#EC5C24; --poly-accent-hover:#F07A4A; --poly-accent-hover-2:#F49470;
  --poly-accent-deep:#C4471A; --poly-on-accent:#1A0F08; --poly-accent-text:#A63A0D;
  --poly-accent-stroke:#C4471A; --poly-accent-tint:#FFEDE6; --poly-accent-line:#F5B49A;
  --poly-marcus:#FFEDE6; --poly-led-halo-acc:rgba(236,92,36,.22);
  --on-tile:#FFFFFF;       /* the letter/icon on a solid channel tile, >= 5:1 on every hue */
}

/* DAYLIGHT. Only role tokens and the few theme-bound primitives are redefined here; every
 * alias above re-resolves through them. Primary text >= 16:1, secondary >= 8:1, nothing a
 * person reads below 5:1 (DESIGN_SYSTEM.md section 3, re-measured by the guards). */
:root[data-theme="daylight"]{
  color-scheme:light;
  --logo-on-dark:none;  --logo-on-light:block;   /* the light-cut lockup (2026-10-21) */

  --surface-0:#ECEEF1;
  --surface-1:#FFFFFF;
  --surface-2:#F5F6F8;
  --surface-3:#E4E7EB;
  --line:#D3D8DE;
  --line-control:#7B8491;
  --scrim:rgba(13,16,21,.45);
  --glass:rgba(255,255,255,.88);
  --glass-2:rgba(255,255,255,.94);

  --text-1:#0D1015;
  --text-2:#394250;
  --text-3:#56606D;

  --accent-text:#8F4300;   /* orange #FF8A3D is 2.3:1 on white: a fill here, never words */
  --accent-stroke:#B85A12;
  --accent-edge:#B85A12;
  --accent-tint:#FFE9D9;
  --accent-line:#F0B48A;
  --focus:#8F4300;
  --owner-tint:#E6EFFA;

  --danger:#B42318;        --danger-tint:#FDECEA;
  --on-danger:#FFFFFF;
  --success:#11703D;       --success-tint:#E3F4EA;
  --caution:#735600;       --caution-tint:#FFF4D1;
  --info:#1C5DA6;          --info-tint:#E5EFFB;
  --danger-ink:var(--danger); --success-ink:var(--success);
  --caution-ink:var(--caution); --info-ink:var(--info);
  --surface-4:#D8DEE6; --surface-5:#C4CCD8; --marcus:#E6EFFA; --line-3:#B8C2D0;
  --warn-line:#C7BB99;     /* the caution colour at 40% on white */
  --bad-line:#E1A7A3;      /* the danger colour at 40% on white  */


  /* The spec's Daylight primary: flat amber, a darker edge, no coloured glow. */
  --primary-fill:var(--accent);
  --primary-fill-hover:var(--accent-hover);
  --primary-edge:var(--accent-edge);
  --primary-glow:0 1px 2px rgba(16,24,40,.12);
  --primary-glow-hover:0 2px 6px rgba(16,24,40,.16);
  --danger-glow:0 1px 2px rgba(16,24,40,.12);
  --lift-up:0 -8px 20px rgba(16,24,40,.08);
  --lift-up-sm:0 -4px 12px rgba(16,24,40,.08);
  --shadow-sm:0 1px 2px rgba(16,24,40,.06);
  --shadow:0 12px 32px rgba(16,24,40,.14);
  --shadow-lg:0 24px 64px rgba(16,24,40,.18);

  /* The same eleven hues, darkened so WHITE strip ink clears 5:1 on every fill (review
   * change 3; the first set had six fills between 4.61 and 4.99). */
  --s-website:#1F6FC0;
  --s-messenger:#B45200;
  --s-whatsapp:#177E47;
  --s-workiz_sms:#8A6800;
  --s-thumbtack:#7D3FA6;
  --s-lsa:#007C75;
  --s-angi:#537900;
  --s-yelp:#D1263D;
  --s-instagram:#BE339D;
  --s-voice:#3F4FE0;
  --s-sweeper:#676F7B;
  --s-unknown:#676F7B;
  /* the frame is light in Daylight too (sun on a phone): the whole page stays light */
  --fr-surface-0:#FFFFFF; --fr-surface-1:#FFFFFF; --fr-surface-2:#F5F6F8; --fr-surface-3:#E4E7EB;
  --fr-surface-4:#D8DEE6; --fr-surface-5:#C4CCD8; --fr-line:#D3D8DE; --fr-line-control:#7B8491;
  --fr-text-1:#0D1015; --fr-text-2:#394250; --fr-text-3:#56606D;
  --fr-accent-text:#8F4300; --fr-poly-accent-text:#A63A0D; --fr-accent-tint:#FFE9D9;
  --fr-glass:rgba(255,255,255,.94);
  --fr-danger:#B42318; --fr-danger-tint:#FDECEA; --fr-danger-ink:#B42318; --fr-on-danger:#FFFFFF;
  --fr-success:#11703D; --fr-success-tint:#E3F4EA; --fr-success-ink:#11703D;
  --fr-caution:#735600; --fr-caution-tint:#FFF4D1; --fr-caution-ink:#735600;
  --fr-info:#1C5DA6; --fr-info-tint:#E5EFFB; --fr-info-ink:#1C5DA6;
  --fr-warn-line:#C7BB99; --fr-bad-line:#E1A7A3; --fr-shadow-sm:0 1px 2px rgba(16,24,40,.06);
}

/* POLY MARCUS'S ORANGE (concept A). On :root itself, so every alias of the accent re-resolves
 * and modals, the scrim and toasts outside #view-console follow. After the Daylight block. */
:root[data-co="poly"]{
  --accent:var(--poly-accent); --accent-hover:var(--poly-accent-hover);
  --accent-hover-2:var(--poly-accent-hover-2); --accent-deep:var(--poly-accent-deep);
  --on-accent:var(--poly-on-accent); --accent-text:var(--poly-accent-text);
  --accent-stroke:var(--poly-accent-stroke); --accent-edge:var(--poly-accent-stroke);
  --accent-tint:var(--poly-accent-tint); --accent-line:var(--poly-accent-line);
  --focus:var(--poly-accent-text); --marcus:var(--poly-marcus);
  --led-halo-acc:var(--poly-led-halo-acc); --fr-accent-text:var(--fr-poly-accent-text);
}

/* THE FRAME SCOPE (concept A, 2026-10-22). Custom properties cascade, so the frame wears
 * navy by re-declaring the ROLE tokens from --fr-* and the ALIAS block verbatim (an alias
 * is resolved where it is declared, so it must be re-declared here to follow), plus the
 * inherited text colour. Every child inherits; no per-child rule. */
.topbar,.screens,.tabbar,.ctl-head,.deck > .sec{
  color-scheme:dark;
  --surface-0:var(--fr-surface-0);
  --surface-1:var(--fr-surface-1);
  --surface-2:var(--fr-surface-2);
  --surface-3:var(--fr-surface-3);
  --surface-4:var(--fr-surface-4);
  --surface-5:var(--fr-surface-5);
  --line:var(--fr-line);
  --line-control:var(--fr-line-control);
  --text-1:var(--fr-text-1);
  --text-2:var(--fr-text-2);
  --text-3:var(--fr-text-3);
  --danger:var(--fr-danger);
  --danger-tint:var(--fr-danger-tint);
  --danger-ink:var(--fr-danger-ink);
  --on-danger:var(--fr-on-danger);
  --success:var(--fr-success);
  --success-tint:var(--fr-success-tint);
  --success-ink:var(--fr-success-ink);
  --caution:var(--fr-caution);
  --caution-tint:var(--fr-caution-tint);
  --caution-ink:var(--fr-caution-ink);
  --info:var(--fr-info);
  --info-tint:var(--fr-info-tint);
  --info-ink:var(--fr-info-ink);
  --warn-line:var(--fr-warn-line);
  --bad-line:var(--fr-bad-line);
  --shadow-sm:var(--fr-shadow-sm);
  --accent-text:var(--fr-accent-text); --accent-tint:var(--fr-accent-tint);
  --accent-stroke:var(--accent); --focus:var(--fr-accent-text);
  --glass:var(--fr-glass); --glass-2:var(--fr-glass);
  --primary-fill:var(--accent);
  --primary-fill-hover:var(--accent-hover);
  --primary-edge:var(--accent-edge);
  --bg:var(--surface-0);
  --panel:var(--surface-1);
  --bubble:var(--surface-2);
  --panel2:var(--surface-3);
  --hairline:var(--line);
  --line-strong:var(--line-control);
  --ink:var(--text-1);
  --ink-2:var(--text-2);
  --dim:var(--text-2);
  --faint:var(--text-3);
  --amber:var(--accent);
  --amber-hi:var(--accent-hover);
  --amber-ink:var(--accent-text);
  --amber-tint:var(--accent-tint);
  --amber-line:var(--accent-line);
  --on-amber:var(--on-accent);
  --ok:var(--success);
  --ok-bg:var(--success-tint);
  --warn:var(--caution);
  --warn-bg:var(--caution-tint);
  --bad:var(--danger);
  --bad-bg:var(--danger-tint);
  --on-bad:var(--on-danger);
  --held:var(--info);
  --held-bg:var(--info-tint);
  --ok-ink:var(--success-ink);
  --bad-ink:var(--danger-ink);
  --warn-ink:var(--caution-ink);
  --held-ink:var(--info-ink);
  --scrim-ink:var(--scrim);
  color:var(--ink);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;background:var(--bg);color:var(--ink);
  background-image:radial-gradient(1200px 600px at 20% -10%,var(--glow-warm),transparent 60%),
    radial-gradient(900px 500px at 110% 10%,var(--glow-cool),transparent 60%);
  background-attachment:fixed;
  font:14px/1.55 var(--font);
  font-variant-numeric:tabular-nums;
  -webkit-font-smoothing:antialiased;
  -webkit-text-size-adjust:100%;
}
h1,h2,h3{margin:0;font-family:var(--font-h);font-weight:700;letter-spacing:-.012em}
button,input,textarea,select{font:inherit;color:inherit}
/* NEO-163 (2026-09-22): a text field under 16px makes iOS Safari zoom the page in on tap and
   leave it zoomed. Every field the console draws -- sign-in, the take-over box, Test Marcus --
   clears the floor. */
input,textarea{font-size:16px}
a{color:var(--amber-ink);text-decoration:none}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-radius:6px}
/* The conversation list is a focus TARGET (the skip link and Escape-out-of-a-thread land
 * there), not a control. The global ring is right for a button and wrong on a full-height
 * column: a full-height amber box on an amber-accent console reads as an error state
 * (NEO-17). It stays visible -- inset, and in the quieter amber line colour. */
#main:focus-visible{outline:2px solid var(--amber-line);outline-offset:-2px}
/* The conversation pane is a focus TARGET too (NEO-79: opening a thread on a phone left
 * the reply box 407px under the fold, and focusing the panel is what scrolls it into
 * view). Same reasoning as #main directly above, and the same quiet inset ring -- the
 * global 2px amber band drawn OUTSIDE this node would put a full-height error-coloured
 * box around the whole conversation, which is NEO-17 all over again. Its own rule, so
 * #main's is not touched. */
#threadview:focus-visible{outline:2px solid var(--amber-line);outline-offset:-2px}
[hidden]{display:none !important}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-thumb{background:var(--line-strong);border-radius:8px}
::-webkit-scrollbar-track{background:transparent}

/* --------------------------------------------------------------- type scale
 * SK's h1 / h2 / h3, which is what these three classes are for. */
.t-display{font:800 22px/1.2 var(--font-h);letter-spacing:-.012em}
.t-head{font:700 16px/1.3 var(--font-h);letter-spacing:-.012em}
.t-label{font:700 12px/1 var(--font-h);letter-spacing:.1em;text-transform:uppercase;
  color:var(--faint)}
.t-mono{font-family:var(--mono);font-size:12px;font-variant-numeric:tabular-nums}
/* NO MONOSPACE, ANYWHERE HE LOOKS (owner, 2026-09-23). A browser draws <code> in its own
 * monospace unless told otherwise; here it is the body face on a tinted chip. */
code{font-family:inherit;font-size:.92em;font-variant-numeric:tabular-nums;
  padding:1px 5px;border-radius:5px;background:var(--panel2);color:var(--ink-2)}
.t-dim{color:var(--dim)}
.t-faint{color:var(--faint)}

/* --------------------------------------------------------------- app frame */
#app{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}

/* THE APP BAR (console v3, S5): 60px + the phone's safe top. The mark and the word, the
 * crumb (>= 1024px), the health pill, the Needs-you button with the one number, the
 * drawer's way in (< 1100px). Sticky, translucent navy, a hairline under it. */
.topbar{
  display:flex;align-items:center;gap:10px;
  /* NEO-1 @2026-09-28 (console v3): the bar can never be wider than the screen. Its own
     min-width:0 lets it shrink with the page; overflow-x:clip cuts anything that would
     still poke past the edge without making the bar a scroller (sticky stays sticky). */
  min-width:0;max-width:100%;overflow-x:clip;
  min-height:calc(var(--top-h) + env(safe-area-inset-top,0px));
  padding:env(safe-area-inset-top,0px) 14px 0 16px;
  background:var(--panel);border-bottom:1px solid var(--line);
  position:sticky;top:0;z-index:20;
  box-shadow:var(--shadow-sm);
}
@supports (backdrop-filter:blur(1px)){
  .topbar{background:var(--glass);backdrop-filter:blur(14px)}
}
.brand{display:inline-flex;align-items:center;gap:10px;background:none;border:0;padding:0;
  cursor:pointer;color:var(--ink);min-height:var(--tap)}
.mark{width:34px;height:34px;border-radius:11px;flex:none;display:grid;place-items:center;
  background:linear-gradient(145deg,var(--accent-hover),var(--accent-deep));color:var(--on-amber);
  box-shadow:0 8px 22px -8px var(--accent-glow),var(--gloss) inset}
.mark .i{width:22px;height:22px;stroke-width:2.1}
.wordmark{font:800 15px/1 var(--font-h);letter-spacing:.18em}
.wordmark b{color:var(--amber-ink);font-weight:800}
/* THE LOCKUP (owner's pick 2026-10-21: G4 GDMKC, P4 Poly Marcus): eight images, one shown --
 * the company on screen (#view-console[data-co]), the theme (daylight = the light cut), and
 * the shield-only cut on a narrow bar. */
/* On Poly the rail's Room goes too: GDMKC's tools are hidden there (owner, 2026-10-21). */
#view-console[data-co="poly"] [data-go="room"]{display:none}
.brandlogo{display:none;height:28px;width:auto;max-width:none;flex:none}
#view-console:not([data-co="poly"]) .brandlogo.co-gdmkc.wide.on-dark,
#view-console[data-co="poly"] .brandlogo.co-poly.wide.on-dark{display:var(--logo-on-dark)}
#view-console:not([data-co="poly"]) .brandlogo.co-gdmkc.wide.on-light,
#view-console[data-co="poly"] .brandlogo.co-poly.wide.on-light{display:var(--logo-on-light)}
@media(max-width:639px){
  #view-console .brandlogo.wide{display:none !important}
  #view-console:not([data-co="poly"]) .brandlogo.co-gdmkc.narrow.on-dark,
  #view-console[data-co="poly"] .brandlogo.co-poly.narrow.on-dark{display:var(--logo-on-dark)}
  #view-console:not([data-co="poly"]) .brandlogo.co-gdmkc.narrow.on-light,
  #view-console[data-co="poly"] .brandlogo.co-poly.narrow.on-light{display:var(--logo-on-light)}
}
.spacer{flex:1}
.who{font-size:12px;color:var(--dim);overflow-wrap:anywhere}
/* THE SESSION LINE ("andrey - 12h session", #whoami) lives in Controls beside Sign out
   (v3 S5). One line, an ellipsis when the row is short of room: `overflow-wrap:anywhere`
   on an unconstrained flex child is what stacked it one letter per line at 412px
   (NEO-1 @2026-09-28). Below 1024px an app bar carries no session line at all. */
#whoami{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  overflow-wrap:normal}
@media(max-width:1023px){ .topbar .who{display:none} }
/* Which surface he is on, in words. The crumb is drawn beside the word at and above
   1024px; on a phone the tab bar under his thumb says it instead. */
.surface{display:none;font:600 var(--fs0)/1 var(--font);color:var(--ink);
  margin-left:2px;padding-left:12px;border-left:1px solid var(--line-control)}
/* THE HEALTH PILL: a breathing green LED and "All systems normal"; red with the word when
   the mirror alerts, the worker is silent or the kill switch is down. */
.health{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 12px 0 10px;
  border-radius:999px;background:var(--bubble);border:1px solid var(--line);
  font:500 var(--fs0)/1 var(--font);color:var(--ink-2);white-space:nowrap;flex:none}
.health .long{display:none}
.health.bad{background:var(--bad-bg);border-color:var(--bad-line);color:var(--bad-ink)}
.health.unknown{color:var(--faint)}
.led{width:8px;height:8px;border-radius:50%;background:var(--ok);flex:none;
  box-shadow:0 0 0 3px var(--led-halo)}
.led.breathe{animation:breathe 2.2s ease-in-out infinite}
.led.bad{background:var(--bad);box-shadow:0 0 0 3px var(--led-halo-bad)}
.led.acc{background:var(--amber);box-shadow:0 0 0 3px var(--led-halo-acc)}
.led.off{background:transparent;border:1.5px solid var(--faint);box-shadow:none}
@keyframes breathe{0%,100%{box-shadow:0 0 0 2px var(--led-halo-lo)}
  50%{box-shadow:0 0 0 6px var(--led-halo-hi)}}
/* THE NEEDS-YOU BUTTON: orange tint with the one number in a solid orange disc; quiet
   navy with a grey disc when nothing needs him. Pressed = the filter is on. */
.needsbtn{display:inline-flex;align-items:center;gap:8px;min-height:var(--tap);padding:0 10px;
  border-radius:12px;background:var(--amber-tint);border:1px solid var(--amber-line);
  color:var(--amber-ink);font:600 var(--fs0)/1 var(--font);white-space:nowrap;cursor:pointer;
  flex:none;transition:transform var(--t-fast) var(--ease),background var(--t-fast) var(--ease)}
.needsbtn:active{transform:scale(.97)}
.needsbtn .n{background:var(--amber);color:var(--on-amber);border-radius:999px;min-width:24px;
  height:24px;display:grid;place-items:center;font-size:13px;font-weight:700;padding:0 7px;
  font-variant-numeric:tabular-nums}
.needsbtn.zero{background:var(--bubble);border-color:var(--line);color:var(--ink-2)}
.needsbtn.zero .n{background:var(--surface-4);color:var(--ink-2)}
.needsbtn[aria-pressed="true"]{border-color:var(--accent-stroke)}
.needsbtn .lbl{display:none}
.topbar .btn.panelbtn{padding:0 12px}
.topbar .btn.panelbtn .count{color:var(--amber-ink)}
/* THE BOTTOM TAB BAR (< 1024px): three 56px tabs, the lit one on an orange tint, the
   Needs-you badge in solid orange. Hidden behind an open conversation and the Control
   Room, which carry their own way back. */
.tabbar{display:flex;flex:none;background:var(--panel);border-top:1px solid var(--line);
  padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px));position:sticky;bottom:0;z-index:18}
@supports (backdrop-filter:blur(1px)){
  .tabbar{background:var(--glass-2);backdrop-filter:blur(14px)}
}
.tabgo{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:3px;min-height:56px;border:0;background:none;color:var(--faint);cursor:pointer;
  font:600 12px/1 var(--font);border-radius:14px;position:relative;
  transition:color var(--t-fast) var(--ease),background var(--t-fast) var(--ease)}
.tabgo .i{width:24px;height:24px}
.tabgo:hover{color:var(--ink)}
.tabgo[aria-current="page"]{color:var(--amber-ink);background:var(--amber-tint)}
.tbadge{position:absolute;top:5px;left:calc(50% + 6px);background:var(--amber);color:var(--on-amber);
  font-size:11.5px;font-weight:700;min-width:19px;height:19px;border-radius:10px;display:grid;
  place-items:center;padding:0 5px;box-shadow:0 0 0 2px var(--panel);font-variant-numeric:tabular-nums}
/* THE RAIL (>= 1024px): the same screens, 84px wide, fixed to the left edge. */
.screens{display:none}
#view-console[data-view="thread"] .tabbar,#view-console[data-view="room"] .tabbar,
#view-console[data-view="test"] .tabbar{display:none}
.signout-row{display:flex;align-items:center;gap:var(--sp-2);margin-top:var(--sp-5);
  padding-top:var(--sp-3);border-top:1px solid var(--line)}
/* THE LIVE STRIP (v3 S10): a 52px band under the app bar and the banners. Orange is
   "Marcus is talking"; quiet is the faint tone with an unlit LED. The chips scroll
   sideways on a phone with no bar. Hidden behind an open conversation on a phone. */
.live{display:flex;align-items:center;gap:10px;min-height:52px;padding:0 0 0 16px;
  border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,var(--bubble),transparent)}
.live .lbl{display:flex;align-items:center;gap:8px;font:600 11.5px/1 var(--font);
  letter-spacing:.1em;text-transform:uppercase;color:var(--faint);flex:none}
.live .quietline{display:flex;align-items:center;gap:8px;color:var(--faint);
  font-size:var(--fs0);white-space:nowrap;padding-right:16px}
.chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:8px 16px 8px 0;
  flex:1;min-width:0}
.chips::-webkit-scrollbar{display:none}
.lchip{flex:none;display:inline-flex;align-items:center;gap:9px;min-height:36px;
  padding:0 12px 0 6px;border-radius:12px;background:var(--amber-tint);
  border:1px solid var(--amber-line);color:var(--ink);font:500 var(--fs0)/1 var(--font);
  cursor:pointer;animation:rise var(--t) var(--ease) both}
.lchip.waiting{background:var(--panel2);border-color:var(--line-strong)}
.lchip .chd.sm{width:26px;height:26px;border-radius:8px}
.lchip .chd.sm .i{width:15px;height:15px;stroke-width:2}
.lchip .who{font-weight:600}
.lchip .stage{color:var(--amber-ink)}
.lchip.waiting .stage{color:var(--faint)}
.lchip .secs{color:var(--faint);min-width:34px;text-align:right;font-variant-numeric:tabular-nums}
.ribs{display:inline-flex;flex-direction:column;gap:3px;flex:none}
.ribs i{display:block;width:14px;height:3px;border-radius:2px;background:var(--amber);
  opacity:.25;animation:rib 1.2s var(--ease) infinite}
.ribs i:nth-child(4){animation-delay:0ms}.ribs i:nth-child(3){animation-delay:150ms}
.ribs i:nth-child(2){animation-delay:300ms}.ribs i:nth-child(1){animation-delay:450ms}
@keyframes rib{0%,100%{opacity:.25}12%,88%{opacity:1}}
#view-console[data-view="room"] .live,#view-console[data-view="test"] .live{display:none}
@media(max-width:1023px){
  #view-console[data-view="thread"] .live,#view-console[data-view="controls"] .live{display:none}
}

/* The Controls control carries the queue's count, so an unanswered Q-n is visible from
   the inbox while the drawer that holds the queue is shut. */
.count{font-size:12px;color:var(--faint);font-variant-numeric:tabular-nums}

/* Segmented tabs - the CONTROL PANEL sections. The frame is SK's `.seg`; the selected state is
 * SK's `.rail a.active`, which is how that design system paints the nav item you are
 * standing on: an amber wash in dark. */
.tabs{display:inline-flex;gap:2px;background:var(--panel2);border:1px solid var(--line);
  border-radius:11px;padding:3px;margin-bottom:var(--sp-5)}
.tab{
  display:inline-flex;align-items:center;gap:6px;
  background:none;border:0;border-radius:8px;
  padding:0 12px;min-height:30px;cursor:pointer;
  color:var(--faint);font:600 12px/1 var(--font);letter-spacing:.02em;
  transition:background var(--t-fast) var(--ease),color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}
.tab:hover{background:var(--panel);color:var(--ink)}
.tab:active{transform:scale(.98)}
/* SK Sentinel's dark selected-tab: a tint and the amber hue, not a solid amber slab with
 * a glow. This was three rules -- a light base, a `[data-theme="dark"]` override and a
 * `@media(prefers-color-scheme:dark)` duplicate of the override. With one theme it is one
 * rule, and the duplicated pair NEO-151 could not reach is gone with it. */
.tab[aria-selected="true"]{background:var(--amber-tint);color:var(--amber-ink);
  box-shadow:none}
.tab .count{font-size:12px;color:var(--faint);font-variant-numeric:tabular-nums}
.tab[aria-selected="true"] .count{color:var(--amber-ink);opacity:1}

/* THE STOP (v3 S9): a 60px HOLD button in the Danger zone. `--p` (0..1, set by
 * holdToKill) drives the red fill from the left and the ring's conic sweep; the label
 * sits above the fill. It lives in the CONTROL PANEL, apart from the conversations (HIG:
 * destructive actions are never adjacent to routine ones). The KILLED banner stays above
 * everything. `.killbtn:hover` keeps the measured red-on-dark pair (NEO-144). */
.killbtn{
  position:relative;display:flex;align-items:center;justify-content:center;gap:10px;
  width:100%;min-height:60px;padding:0 16px;cursor:pointer;overflow:hidden;
  background:var(--bad-bg);color:var(--bad);border:1px solid var(--bad-line);
  border-radius:16px;font:700 var(--fs2)/1.2 var(--font);letter-spacing:.01em;
  box-shadow:var(--shadow-sm);user-select:none;-webkit-user-select:none;
  touch-action:none;
  transition:background var(--t-fast) var(--ease),box-shadow var(--t-fast) var(--ease)}
.killbtn:hover{background:var(--bad);color:var(--on-bad);border-color:var(--bad);
  box-shadow:var(--shadow)}
.killbtn .fill{position:absolute;inset:0;background:var(--bad);opacity:.85;
  transform:scaleX(var(--p,0));transform-origin:left;transition:transform 60ms linear}
.killbtn .lbl{position:relative;z-index:1;display:inline-flex;align-items:center;gap:10px;
  min-width:0;text-align:center}
.killbtn.holding .lbl{color:var(--on-bad)}
.killbtn .ring{width:26px;height:26px;border-radius:50%;flex:none;display:grid;place-items:center;
  background:conic-gradient(var(--bad) calc(var(--p,0) * 360deg),var(--surface-5) 0)}
.killbtn .ring::after{content:"";width:16px;height:16px;border-radius:50%;background:var(--panel)}
.killbtn.holding .ring{background:conic-gradient(var(--on-bad) calc(var(--p,0) * 360deg),var(--surface-5) 0)}
.killbtn[disabled]{opacity:.45;cursor:not-allowed}
.killbtn[disabled]:hover{background:var(--bad-bg);color:var(--bad);
  border-color:var(--bad-line);box-shadow:var(--shadow-sm)}
.danger{margin:var(--sp-4) 0 var(--sp-3);padding:14px 16px;border-radius:var(--radius-l);
  border:1px solid var(--bad-line);background:var(--danger-tint)}
.danger h3{display:flex;align-items:center;gap:8px;margin:0;color:var(--bad-ink);
  font:600 var(--fs2)/1.2 var(--font-h)}
.danger-list{margin:8px 0 14px;padding-left:18px;color:var(--ink-2);font-size:var(--fs0)}
.danger-list li{margin:3px 0}
.danger .ctl-killhint{margin:10px 0 0}
.stopped{display:flex;gap:12px;align-items:center;padding:12px 14px;margin:10px 0 0;
  border-radius:14px;background:var(--bad-bg);border:1px solid var(--bad-line);color:var(--ink)}
.stopped .i{color:var(--bad-ink);flex:none}
.stopped b{display:block;font-family:var(--font-h);color:var(--bad-ink)}
.stopped span{color:var(--ink-2);font-size:var(--fs0)}
/* THE HEALTH HERO (v3 S9) */
.hero{display:flex;align-items:center;gap:12px;padding:14px;margin:0 0 var(--sp-3);
  border-radius:var(--radius-l);background:var(--panel);border:1px solid var(--line)}
.hero .big-led{width:44px;height:44px;border-radius:14px;flex:none;display:grid;place-items:center;
  background:var(--ok-bg);color:var(--ok-ink)}
.hero.bad .big-led{background:var(--bad-bg);color:var(--bad-ink)}
.hero.unknown .big-led{background:var(--panel2);color:var(--faint)}
.hero-words{min-width:0;flex:1}
.hero-title{margin:0;font:600 var(--fs3)/1.2 var(--font-h);color:var(--ink)}
.hero.bad .hero-title{color:var(--bad-ink)}
.hero-sub{margin:2px 0 0;color:var(--faint);font-size:var(--fs0);overflow-wrap:anywhere}
.sysnotes{list-style:none;margin:0 0 var(--sp-3);padding:10px 14px;border-radius:var(--radius-l);
  background:var(--panel);border:1px solid var(--line)}
.sysnote{color:var(--faint);font-size:var(--fs0);overflow-wrap:anywhere}
.sysnote + .sysnote{margin-top:6px}
.hero-fold{flex:none;position:relative}
.hero-fold > summary{list-style:none;cursor:pointer;width:40px;min-height:40px;padding:0}
.hero-fold > summary::-webkit-details-marker{display:none}
.hero-fold .sigline{position:absolute;right:0;top:44px;z-index:5;width:min(360px,80vw);
  background:var(--panel2);border-radius:var(--radius-s);box-shadow:var(--shadow)}
/* CHANNEL ROWS (v3 S9) */
.hand .card-head{gap:10px;flex-wrap:nowrap}
.hand .nmbox{min-width:0;flex:1}
.hand .nm{font:600 var(--fs1)/1.2 var(--font-h);color:var(--ink)}
.hand .st{color:var(--faint);font-size:var(--fs-1);margin-top:2px;display:flex;align-items:center;gap:6px;
  overflow-wrap:anywhere}
.hand .card-head .tag{display:none}
.hand .card-body{padding:10px 12px 12px}
.hand.ro .card-body .hint{margin:0}
/* THE ALERTS SWITCH (v3 S9): a 48x28 track, green when on */
.switch{margin-left:auto;width:48px;height:28px;border-radius:999px;background:var(--surface-4);
  border:1px solid var(--line-strong);position:relative;flex:none;cursor:pointer;padding:0}
.switch::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;
  background:var(--ink-2);transition:transform var(--t-fast) var(--ease),background var(--t-fast)}
.switch[aria-checked="true"]{background:var(--ok-bg);border-color:var(--ok)}
.switch[aria-checked="true"]::after{transform:translateX(20px);background:var(--ok)}
.switch[disabled]{opacity:.45;cursor:not-allowed}

/* --------------------------------------------------------------- banners
 * Above BOTH surfaces. An alarm is not a setting: the day every hand is muted, the man
 * reading his inbox has to see it without opening another page. */
.banner{display:flex;gap:10px;align-items:flex-start;padding:11px var(--sp-5);
  font-size:13px;border-bottom:1px solid transparent}
.banner .mark{font-weight:800}
.banner.killed{background:var(--bad-bg);border-bottom-color:var(--bad-line);
  color:var(--bad)}
.banner.killed b{color:var(--bad);font-family:var(--font-h)}
/* R2: a stop a restart forgets ("NOT persistent") is solid red, louder than one that sticks */
.banner.killed.memory-only{background:var(--bad);color:var(--on-bad);
  border-bottom-color:var(--bad)}
.banner.killed.memory-only b{color:var(--on-bad)}
/* the phone-alerts banner is a way to the fix: a tap opens Controls > Devices (NEO-4) */
#banner-alerts{cursor:pointer;min-height:44px}
.banner.shadow{background:var(--warn-bg);border-bottom-color:var(--warn-line);
  color:var(--warn)}
.banner.shadow b{color:var(--warn);font-family:var(--font-h)}
/* W2-D1: the demo page's SAMPLE DATA banner. Sticky under the topbar (top:0, z 20), so a
 * scroll on a phone never takes it away; z 19 keeps it over the composer (18) and the tab
 * bar (15) and under the topbar, so it covers nothing. Never dismissible. */
#banner-demo{position:sticky;top:calc(var(--top-h) + env(safe-area-inset-top,0px));z-index:19;
  font-weight:600}
#banner-demo b{font-size:14px;letter-spacing:.02em}
#banner-demo .sub{font-weight:400}
.banner.blind{background:var(--bad-bg);border-bottom-color:var(--bad-line);
  color:var(--bad)}
.banner.blind b{color:var(--bad);font-family:var(--font-h)}
/* W2-37: "Install Marcus" - the browser's own install offer, asked once; not an alarm */
.banner.install{background:var(--panel2);border-bottom-color:var(--line);color:var(--ink);
  align-items:center;flex-wrap:wrap}
.banner.install .install-words{flex:1 1 200px}
/* The signals strip. Operator telemetry, so it is in the control panel -- but always on
   there, so "everything is fine" is a thing he can SEE rather than infer from the
   absence of a banner. */
.sigline{font:500 12px/1.5 var(--font);color:var(--dim);padding:7px var(--sp-5);
  border-bottom:1px solid var(--line);word-break:break-word;
  font-variant-numeric:tabular-nums}
.sigline .bad{color:var(--bad)}
.sigline .warn{color:var(--warn)}
.sigline .ok{color:var(--ok)}

/* ============================================================ THE INBOX
 * The main page, and the only thing on it. Workiz's two-pane shape: the conversations on
 * the left, the conversation on the right, both on screen at once -- which the board this
 * replaces could not do at any width (it hid the list to show the thread). */
.inbox{flex:1;display:grid;grid-template-columns:352px minmax(0,1fr);
  align-items:stretch;min-height:0}
.inbox-list{background:var(--panel);border-right:1px solid var(--line);
  padding:var(--sp-4) var(--sp-4) var(--sp-5);overflow:auto;min-width:0}
.inbox-head{display:flex;align-items:center;gap:var(--sp-2);margin-bottom:var(--sp-3)}
.inbox-head .count{margin-left:auto;font-size:12px;color:var(--faint)}
/* A filter set on another page must never silently empty this one. */
.filterline{display:flex;align-items:center;gap:var(--sp-2);flex-wrap:wrap;
  margin:0 0 var(--sp-3);padding:8px 10px;border-radius:var(--radius-s);
  background:var(--amber-tint);border:1px solid var(--amber-line);
  color:var(--ink-2);font-size:12.5px}
/* `clip`, not `hidden` (2026-09-24): `hidden` makes a scroll container, and a sticky
   composer inside one sticks to a box that never scrolls -- i.e. not at all. `clip` still
   stops sideways overflow and makes none. `hidden` stays first for engines without clip. */
.inbox-thread{display:flex;flex-direction:column;min-width:0;min-height:0;
  overflow:hidden;overflow:clip}
.thread-pane{display:flex;flex-direction:column;min-height:0;flex:1}
/* The header the owner asked for: the person, the source, and the few facts worth the
   space. Sticky, because scrolling a long conversation must never lose who it is with. */
.thread-head{background:var(--panel);border-bottom:1px solid var(--line);flex:none}
/* LIVE 2026-09-29 (his phone, 412px, "Unnamed lead #317" + the muted chip): with
   `flex-wrap:nowrap` and a name that may break ANYWHERE (NEO-75), the name's flex floor
   was one letter, so the chip took the row and the name stood one letter per line. Now
   the row WRAPS -- the name keeps the first line beside the chevron and the tile and the
   chips drop to a second line when they do not fit -- and the name box has a floor of
   twelve characters, so it can never be squeezed thinner than a readable word. */
.thread-head .card-head{border-bottom:0;padding-bottom:6px;flex-wrap:wrap;row-gap:6px;
  min-height:60px;background:var(--glass);border-bottom:1px solid var(--line)}
/* THE STICKY BAR (v3 S7): tile, name over the job, the number, the tag, Call. */
.thread-head .whobox{display:flex;flex-direction:column;min-width:min(12ch,100%);
  flex:1 1 12ch}
.thread-head .card-head > .badge{flex:none;max-width:100%;min-width:0}
.thread-head .card-head > .badge > span{overflow-wrap:anywhere}
.thread-head .whobox .job{font-size:var(--fs-1);color:var(--faint);white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}
/* the name WRAPS (NEO-75), never an ellipsis; the job line under it may clip */
.thread-head .card-head .tag{display:none}
.thread-head .btn.icon.call{color:var(--ok-ink);border-color:var(--ok-bg);
  background:var(--ok-bg);text-decoration:none}
.thread-head .backbtn .lbl{display:none}
/* THE WORK ORDER (v3 S7): the thread opens like a ticket. */
.wo{padding:12px var(--sp-4) 10px;animation:rise var(--t) var(--ease)}
.wo .top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px}
.wo .wo-job{margin:2px 0 6px;font:600 var(--fs3)/1.25 var(--font-h);letter-spacing:-.015em;
  color:var(--ink);overflow-wrap:anywhere}
.wo .line{display:flex;align-items:center;gap:8px;color:var(--ink-2);font-size:var(--fs0);
  padding:4px 0;flex-wrap:wrap;min-width:0}
.wo .line .i{color:var(--faint)}
.wo .line a{color:var(--ink);text-decoration:none;font-weight:600}
.wo .line a:hover{color:var(--amber-ink)}
.wo .line .hint{font-size:var(--fs-1);color:var(--faint)}
.wo .win{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.wo .win .pill{height:28px}
.dots{display:inline-flex;gap:4px;margin-right:2px;vertical-align:middle}
.dots i{width:8px;height:8px;border-radius:50%;background:var(--surface-5);display:block}
.dots i.on{background:var(--ok)}
/* THE DETAILS FOLD: the ids and the quiet facts, behind one line. */
.wo-details{padding:0 var(--sp-4) 10px}
.wo-sum{list-style:none;cursor:pointer;color:var(--faint);font-size:var(--fs-1);
  display:inline-flex;align-items:center;gap:4px;min-height:var(--tap);font-weight:600}
.wo-sum::-webkit-details-marker{display:none}
.wo-sum .i{transition:transform var(--t-fast) var(--ease)}
.wo-details[open] > .wo-sum .i{transform:rotate(180deg)}
.facts{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 14px;
  padding:6px 0 4px;font-size:var(--fs-1);color:var(--ink-2);
  font-variant-numeric:tabular-nums}
.facts > span{display:contents}
.facts b{font-weight:500;color:var(--faint)}
.facts span span{overflow-wrap:anywhere}
/* PAUSE / PLAY (owner, 2026-09-28): one row at the foot of the work order. Quiet Pause
   while Marcus is on; the paused note plus a big orange Play when he is off. */
.wo-pause{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px;
  padding-top:10px;border-top:1px solid var(--line)}
.wo-pause .hint{font-size:var(--fs-1);color:var(--faint);flex:1 1 200px}
/* LIVE 2026-09-29 (his phone): as a flex box the note's two spans became two squeezed
   columns ("Paused - you're handling | - you wrote to"). It is ONE sentence: a block, the
   icon and both spans inline, wrapping wherever the width says. */
.wo-pause .pausenote{display:block;flex:1 1 200px;min-width:0;
  font:600 var(--fs0)/1.4 var(--font);color:var(--ink);overflow-wrap:anywhere}
.wo-pause .pausenote .i{width:16px;height:16px;color:var(--dim);display:inline-block;
  vertical-align:-3px;margin-right:6px}
.wo-pause .pausenote .why{font-weight:500;color:var(--dim)}
.wo-pause .pausenote .why::before{content:" - "}
.btn.playbtn{min-height:52px;padding:0 22px;font-size:var(--fs2);border-radius:14px}
.btn.playbtn .i{width:22px;height:22px}
.badge.paused{background:var(--panel2);color:var(--ink);border-color:var(--line-strong)}
.wo-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-top:8px}
.wo-tools .hint{font-size:var(--fs-1);color:var(--faint);flex:1 1 200px}
.thread-body{flex:1;overflow:auto;padding:var(--sp-5) var(--sp-4);min-height:0}
.thread-empty{flex:1;display:flex;align-items:center;justify-content:center;
  padding:var(--sp-6)}

/* --------------------------------------------------------------- cards
 * SK's `.card` -- surface step, hairline, 14px radius, the small shadow on every one of
 * them. The header strip is SK's `.panel .ph`: no fill, a hairline under it, and the
 * label in the quiet tone. */
.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);
  margin-bottom:var(--sp-3);overflow:hidden;box-shadow:var(--shadow-sm)}
.card-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:12px var(--sp-4) 10px;border-bottom:1px solid var(--line)}
.card-body{padding:var(--sp-4)}
.card + .t-label{margin-top:var(--sp-5)}

/* THE SOURCE TAG. The owner's one requirement for a conversation window: "the only thing
 * that messaging window will have tags from exactly what source it came from". It carries
 * the swatch AND the platform's name, on the row and again at the top of the thread --
 * six of the eleven platforms are separated by hue, and all eleven by the word. */
.tag{display:inline-flex;align-items:center;gap:6px;
  padding:3px 8px;border-radius:5px;background:var(--panel2);
  font:800 10px/1.4 var(--font);letter-spacing:.08em;text-transform:uppercase;
  color:var(--ink-2)}
.tag .dot{width:7px;height:7px;border-radius:50%}
.dot{width:10px;height:10px;border-radius:3px;flex:none;background:var(--s-sweeper)}

/* SK's `.tag` family: a tint of the semantic hue behind the hue itself, no border. Four
 * fates, four fills, and every one of them carries the WORD as well as the colour. */
.badge{display:inline-flex;align-items:center;gap:5px;min-height:26px;padding:0 10px;
  border-radius:999px;background:var(--panel2);border:1px solid transparent;
  font:600 var(--fs-1)/1 var(--font);letter-spacing:0;
  color:var(--dim)}
.badge .i{width:14px;height:14px;stroke-width:2}
.badge.act{background:var(--amber);color:var(--on-amber)}
.badge.typing{background:var(--amber-tint);color:var(--amber-ink);border-color:var(--amber-line)}
.badge.quiet{background:var(--panel2);color:var(--dim)}
.badge.ok{color:var(--ok);background:var(--ok-bg)}
.badge.warn{color:var(--warn);background:var(--warn-bg)}
.badge.bad{color:var(--bad);background:var(--bad-bg)}
.badge.held{color:var(--held);background:var(--held-bg)}
/* WAITING: the customer wrote last and nobody answered (NEO-57). It borrows the bad-state
   paint deliberately -- 7.48 on this ground, louder than HELD's 7.30 -- and that is the
   one place this file's "red is killed or destructive" law is bent, because the
   alternative was a sixth colour on a row that already carries a source dot and sometimes
   HELD. It carries the WORD, so colour is never the only channel. */
.badge.waiting{color:var(--bad);background:var(--bad-bg);border-color:var(--bad-line)}
/* NEO-78, the two states the board had no word for.
   UNCONFIRMED: the transport raised and we may not claim delivery OR failure. It takes
   SK's YELLOW because "we do not know" is exactly what amber is for here -- never the
   green of a success and never the red of a failure, which is the distinction that was
   argued for and the reason it is not rounded either way.
   WITH THE HAND: not an error and not an answer - a reply sitting in a queue a phone has
   to pull. Deliberately NOT a sixth hue: this file's law is that red means killed or
   destructive, and a queued reply is neither. It keeps SK's NEUTRAL chip paint with a
   strong border, so it reads as a state rather than an alarm, and it carries the WORD
   like every other badge here. */
.badge.unconfirmed{color:var(--warn);background:var(--warn-bg)}
.badge.hand{color:var(--ink-2);border:1px solid var(--line-strong);background:var(--panel2)}

/* --------------------------------------------------- conversation rows (v3, S3)
 * tile | name + channel word, job, snippet, pills | time + dot. No fill at rest, a navy
 * wash on hover, the open one outlined; 6px apart, ~96px each, rising in with a stagger.
 * The source strip of 2026-09-23 is retired: the TILE is the source's colour and the
 * channel WORD sits under the name, so the eleven platforms are still told apart by the
 * word and not only the hue. */
.thread-row{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:8px 12px;
  align-items:start;width:100%;text-align:left;cursor:pointer;
  padding:12px 12px;margin-bottom:6px;border-radius:var(--radius-l);
  background:transparent;border:1px solid transparent;color:var(--ink);
  animation:rise var(--t) var(--ease) both;
  transition:background var(--t-fast) var(--ease),border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease)}
.thread-row:hover{background:var(--bubble);border-color:var(--line)}
.thread-row:active{transform:scale(.99)}
.thread-row[aria-current="true"]{border-color:var(--accent-stroke);background:var(--panel2)}
.thread-row.here{background:var(--panel2);border-color:var(--line-strong)}
@keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.thread-row .mid{min-width:0}
.thread-row .line1{display:flex;align-items:baseline;gap:8px;min-width:0;flex-wrap:wrap}
.thread-row .who2{font:600 var(--fs2)/1.25 var(--font-h);letter-spacing:-.012em;min-width:0;
  overflow-wrap:anywhere}
/* the channel word: "Google LSA - GDMKC" and the ledger's own number, quiet */
.src-bar{display:inline-flex;align-items:baseline;gap:6px;min-width:0;
  font:500 var(--fs-1)/1.3 var(--font);color:var(--faint)}
.src-bar .src-no{font-variant-numeric:tabular-nums;opacity:.85;flex:none}
.src-bar .src-name{min-width:0;overflow-wrap:anywhere}
.thread-row .job,.thread-row .ctx{color:var(--dim);font-size:var(--fs0);margin-top:2px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.thread-row .snip{display:flex;gap:5px;align-items:baseline;min-width:0;margin-top:3px}
.thread-row .snip-by{color:var(--dim);font-weight:500;font-size:var(--fs0);flex:none}
.thread-row .snippet{min-width:0;color:var(--faint);font-size:var(--fs0);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.thread-row .snippet.english{margin-top:2px;font-family:var(--font)}
/* THE PILL ROW HAS THE WHOLE ROW (owner, 2026-09-28): the pills and the needs line sit
   under the middle column AND the time column (`grid-column:2/-1`, their own grid rows),
   so they no longer squeeze beside the timestamp; a long set wraps to a clean second
   line with a 6px gap and nothing clips (the row's `min-width:0` is on the cell). */
.thread-row .pills{display:flex;gap:6px 6px;margin-top:0;flex-wrap:wrap;align-items:center;
  grid-column:2/-1;min-width:0;max-width:100%}
.thread-row .pills > *{flex:none;max-width:100%}
.thread-row .pills > .badge,.thread-row .pills > .pill{white-space:nowrap}
.thread-row .right{display:flex;flex-direction:column;align-items:flex-end;gap:8px;
  color:var(--faint);font-size:var(--fs-1);white-space:nowrap;padding-top:2px;
  font-variant-numeric:tabular-nums}
.thread-row .dot-need{width:9px;height:9px;border-radius:50%;background:var(--amber);
  box-shadow:0 0 0 3px var(--amber-tint)}
.chd .ring{position:absolute;inset:-3px;border-radius:15px;border:2px solid var(--amber);
  opacity:.9;animation:breathe2 1.6s ease-in-out infinite}
@keyframes breathe2{0%,100%{opacity:.35}50%{opacity:1}}
/* The same name span, same class, in the open-thread header (console.js appends it into
 * .card-head), where the identical overhang lived unmeasured (NEO-75). */
.card-head .who2{min-width:0;overflow-wrap:anywhere;font-family:var(--font-h);
  font-weight:700;font-size:16px;letter-spacing:-.012em}
.thread-no{font-weight:700;font-size:13px;color:var(--ink-2);
  font-variant-numeric:tabular-nums}
.row-meta{display:inline-flex;gap:var(--sp-3);align-items:center;
  font-size:12px;color:var(--faint);font-variant-numeric:tabular-nums}

/* --------------------------------------------------------------- transcript
 * A messaging app's bubbles: the customer on the left, us on the right, the sender named
 * above and the DELIVERY STATE under. SK's `.icard` surface and hairline, with the 3px
 * coloured spine that says what kind of thing this is. */
.msg{display:flex;flex-direction:column;align-items:flex-start;
  margin-bottom:var(--sp-2);min-width:0;animation:rise var(--t) var(--ease) both}
.msg.first{margin-top:var(--sp-3)}
.msg.out,.msg.owner{align-items:flex-end}
.msg .role{padding-bottom:4px;font:800 12px/1.6 var(--font);letter-spacing:.08em;
  text-transform:uppercase;color:var(--faint);display:flex;align-items:center;gap:6px;
  margin:0 6px}
/* RUNS (v3 S8): the sender line is drawn on the first bubble of a run only */
.msg:not(.first) .role{display:none}
/* SPEAKING CORNERS: the customer's bubble points left, ours point right */
.msg .bub{max-width:82%;background:var(--bubble);border:1px solid var(--line);
  border-radius:18px;border-bottom-left-radius:6px;
  padding:11px var(--sp-4);white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;
  line-height:1.5;box-shadow:var(--shadow-sm)}
.msg.out .bub,.msg.owner .bub{border-bottom-left-radius:18px;border-bottom-right-radius:6px}
.msg.out .bub{background:var(--marcus);border-color:var(--held-bg)}
.msg.owner .bub{background:var(--owner-tint);border-color:var(--amber-line)}
.msg.held .bub{border-color:var(--held);background:var(--held-bg)}
.day{text-align:center;color:var(--faint);font:600 var(--fs-1)/1 var(--font);
  letter-spacing:.06em;text-transform:uppercase;margin:12px 0 6px}
.msg .note .i.del{color:var(--ok-ink);stroke-width:2}
.msg .note .del{color:var(--ok-ink);font-weight:600}
/* THE ONE THING THAT MUST SURVIVE THE MOVE. A reply that never reached the customer is
 * drawn UNSENT: a dashed bubble, the fate's own word as a badge, and the sentence that
 * says what to do about it -- on the message, in the thread, where the man reading the
 * conversation is. The mode that caused it moved to settings; the truth about whether
 * these bytes went out did not, and cannot. He lost days to a chat bubble whose every
 * reply was a silent draft. */
.msg.unsent .bub{border-style:dashed}
.msg.unsent.bad .bub{border-color:var(--bad);border-left-color:var(--bad);
  background:var(--bad-bg)}
.msg.unsent.unconfirmed .bub{border-color:var(--warn);border-left-color:var(--warn);
  background:var(--warn-bg)}
.msg.unsent.hand .bub{border-color:var(--line-strong);
  border-left-color:var(--line-strong)}
.msg.unsent.held .bub{border-color:var(--held);background:transparent}
.msg .note{margin-top:6px;display:flex;align-items:center;gap:var(--sp-2);
  flex-wrap:wrap;font-size:12px;color:var(--faint);max-width:82%}
.msg.out .note,.msg.owner .note{justify-content:flex-end}
.msg .note.bad{color:var(--bad)}
.msg .why{color:var(--dim)}
/* THE OWNER READS ENGLISH (owner ruling 2026-09-26): the English of a Spanish message, right
 * under its bubble, in the page's own plain type -- a line he reads, never a code. */
.msg .english{margin-top:4px;max-width:82%;font:400 13px/1.5 var(--font);color:var(--dim);
  white-space:pre-wrap;overflow-wrap:anywhere}
.english .english-label{font-weight:700;color:var(--faint)}
.english .english-words.none{font-style:italic}
.card-body .english{margin-top:6px;font:400 13px/1.5 var(--font);color:var(--dim);
  overflow-wrap:anywhere}
.thread-row .snippet.english{margin-top:2px;font-family:var(--font)}

/* --------------------------------------------------------------- live follow (2026-09-27)
 * "Marcus is thinking... 3.2s" under the last message, a word and a dot on the card that is
 * thinking, a toast when Marcus starts answering, and the decision record collapsed under
 * each Marcus message. Every rule resolves to a token already here; the body face only. */
.thinkrow{display:flex;align-items:center;justify-content:flex-end;gap:var(--sp-2);
  margin:0 0 var(--sp-4);font:600 13px/1.5 var(--font);color:var(--amber-ink)}
.thinkrow.waiting{color:var(--dim)}
.thinkrow-time{font-variant-numeric:tabular-nums;color:var(--ink-2)}
.thinkrow-mark,.livedot-mark{width:8px;height:8px;border-radius:50%;flex:none;
  background:var(--amber);animation:livepulse 1.2s var(--ease) infinite}
.thinkrow.waiting .thinkrow-mark,.livedot.waiting .livedot-mark{background:var(--faint)}
@keyframes livepulse{0%,100%{opacity:1}50%{opacity:.35}}
.livedot{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;
  color:var(--amber-ink)}
.livedot.waiting{color:var(--dim)}
.livetoasts{position:fixed;z-index:25;right:var(--sp-4);
  top:calc(var(--topbar-h,64px) + var(--sp-2));display:flex;flex-direction:column;
  gap:var(--sp-2);width:min(380px,calc(100vw - 2 * var(--sp-4)))}
.livetoast{display:flex;align-items:center;flex-wrap:wrap;gap:var(--sp-2);
  padding:10px 12px;border-radius:var(--radius-s);background:var(--panel2);
  border:1px solid var(--amber-line);box-shadow:var(--shadow);color:var(--ink);
  font-size:13px}
.livetoast-words{flex:1 1 180px;min-width:0;overflow-wrap:anywhere}
.livealerts .hint{flex-basis:100%}
.msg .tele{margin-top:6px;max-width:82%;font-size:12px;color:var(--faint)}
.msg .tele-sum{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2);
  cursor:pointer;padding:4px 0;justify-content:flex-end;list-style:none}
.msg .tele-sum::-webkit-details-marker{display:none}
/* NEO-2@2026-09-27lf: the open/closed mark the flex summary lost. A chevron drawn with two
 * borders (no glyph, no font of its own): pointing right closed, down open. */
.msg .tele-chev{width:7px;height:7px;flex:none;margin-right:2px;
  border-right:2px solid var(--dim);border-bottom:2px solid var(--dim);
  transform:rotate(-45deg);transition:transform var(--t-fast) var(--ease)}
.msg .tele[open] > .tele-sum .tele-chev{transform:rotate(45deg)}
.msg .tele-what{color:var(--dim)}
.msg .tele-private{padding:1px 6px;border-radius:5px;background:var(--panel2);
  color:var(--faint);font-size:11px}
.msg .tele-body{margin-top:8px;padding:12px 14px;border-radius:var(--radius);
  background:var(--panel);border:1px solid var(--line);display:flex;
  flex-direction:column;gap:8px;text-align:left}
/* THE RECORD BODY (v3 S11): outcome pill + model, the four-colour timing bar with its
   legend, then a key/value grid; the refused draft is quoted in the draft's blue. */
.msg .tele-out{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--ink)}
.msg .tele-model{font-weight:600;color:var(--ink-2);overflow-wrap:anywhere}
.tbar-time{display:flex;height:6px;border-radius:4px;overflow:hidden;background:var(--bubble)}
.tbar-time i{display:block;height:100%}
.tbar-time .w,.tele-key .w{background:var(--surface-5)}
.tbar-time .b,.tele-key .b{background:var(--amber)}
.tbar-time .c,.tele-key .c{background:var(--held)}
.tbar-time .e,.tele-key .e{background:var(--ok)}
.tele-legend{display:flex;gap:12px;flex-wrap:wrap;margin-top:6px;color:var(--faint);
  font-size:11.5px}
.tele-key{display:inline-flex;align-items:center;gap:5px}
.tele-key i{display:inline-block;width:8px;height:8px;border-radius:2px}
.msg .tele-grid{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 14px}
.msg .tele-line{display:contents}
.msg .tele-k{font-weight:500;color:var(--faint)}
.msg .tele-v,.msg .tele-thought{color:var(--dim);overflow-wrap:anywhere}
.msg .tele-quote .tele-v{padding:8px 12px;border-radius:12px;border:1px dashed var(--held);
  background:var(--held-bg);color:var(--ink-2);white-space:pre-wrap}
.msg .tele-thought{white-space:pre-wrap;font-size:13px;line-height:1.5}
.msg .tele-wait{color:var(--dim);font-style:italic}
.msg .tele-wait.bad{color:var(--bad);font-style:normal}

/* --------------------------------------------------------------- composer */
/* THE REPLY BOX FLOATS (owner, 2026-09-24: "that reply as Marcus take over window should
   float at the bottom of my screen when I scroll"). Sticky, not fixed: it stays in the
   flow, so at the end of the conversation it rests in its own place and never covers the
   last message. Under the topbar (20) and the control-panel drawer (30). The safe-area
   inset keeps Send clear of a phone's home bar. */
.composer{border-top:1px solid var(--line);padding:var(--sp-4);background:var(--panel2);
  flex:none;position:sticky;bottom:var(--kb,0px);z-index:15;
  padding-bottom:calc(var(--sp-4) + env(safe-area-inset-bottom, 0px));
  box-shadow:var(--lift-up)}
/* A focused control is scrolled clear of the floating box (review item 1). */
html{scroll-padding-bottom:var(--composer-h,0px);
  scroll-padding-top:var(--topbar-h,64px)}                      /* NEO-12 */
.composer-note{padding:var(--sp-2) var(--sp-4) 0;background:var(--panel2);
  border-top:1px solid var(--line)}
.composer-note .hint{display:block;overflow-wrap:anywhere}
.needs-where{margin-left:auto;font-size:12px;font-weight:700;color:var(--ink-2)}
.composer .replystatus{margin:var(--sp-2) 0 0;font-size:13px;color:var(--dim);
  overflow-wrap:anywhere}
.composer .replystatus:empty{display:none}
.composer .replystatus.good{color:var(--ok)}
.composer .replystatus.bad{color:var(--bad)}
.composer .newmsg{display:flex;margin:0 auto var(--sp-3);min-height:var(--tap);
  border-color:var(--amber-line);color:var(--amber-ink)}
.composer textarea{
  width:100%;min-height:46px;resize:vertical;
  background:var(--panel);color:var(--ink);
  border:1px solid var(--line-strong);border-radius:var(--radius-s);
  padding:10px 12px;
  /* 16px, the same floor .field input/.field textarea carry below and for the same
     reason: anything smaller makes iOS zoom the whole console on focus. SK Sentinel sets
     14px here and cannot afford that on a phone. The composer is the one box he types in
     all day and it sat at 13px (NEO-60) because console.js appends it as a SIBLING of its
     label, outside the .field selector that protects every other input on the page. */
  font-size:16px;line-height:1.5;
  transition:border-color var(--t-fast) var(--ease);
}
.composer textarea:focus{border-color:var(--accent-stroke)}
.composer textarea::placeholder{color:var(--faint);opacity:.85}
/* v3 S6: ONE ROW. The box grows from one line; the mic and Send sit at its foot, on the
   same row; the mode note above it carries an LED. The Send keeps its word on a wide
   screen and becomes a round orange disc on a phone (the word stays for a reader). */
.composer-box{display:flex;align-items:flex-end;gap:var(--sp-2)}
.composer-box textarea{flex:1;min-width:0;border-radius:23px;padding:12px 16px}
.composer-foot{display:flex;align-items:center;gap:var(--sp-2);flex:none;flex-wrap:nowrap}
.composer .btn.send,.composer .btn.mic{min-height:46px;border-radius:23px;padding:0 16px}
.composer .btn.mic{background:var(--panel2)}
.composer .btn.mic[aria-pressed="true"]{background:var(--bad-bg);border-color:var(--bad-line);
  color:var(--bad-ink)}
.composer .btn.mic .lbl,.composer .btn.send .lbl{white-space:nowrap}
.wave{display:none;gap:3px;align-items:center;height:14px}
.composer .btn.mic[aria-pressed="true"] .wave{display:inline-flex}
.wave i{display:block;width:3px;height:4px;background:var(--bad-ink);border-radius:2px;
  animation:wavebar .9s ease-in-out infinite}
.wave i:nth-child(2){animation-delay:.15s}.wave i:nth-child(3){animation-delay:.3s}
.wave i:nth-child(4){animation-delay:.45s}
@keyframes wavebar{0%,100%{height:4px}50%{height:14px}}
.composer-note{display:flex;align-items:center;gap:8px}
.composer-note .led{width:8px;height:8px;flex:none}
.composer-note .led.info{background:var(--held);box-shadow:0 0 0 3px var(--held-bg)}
.composer-note .led.warn{background:var(--warn);box-shadow:0 0 0 3px var(--warn-bg)}
.hint{font-size:12px;color:var(--dim)}

/* --------------------------------------------------------------- NEEDS YOU, in words
 * (owner, 2026-09-24) One sentence on the card; on the conversation, each thing that
 * needs him with the buttons that resolve it. Every button here wraps rather than
 * pushing the page sideways, and is the full tap token on every width. */
.thread-row .needline{display:flex;align-items:center;gap:8px;margin-top:0;min-width:0;
  grid-column:2/-1}
.thread-row .needline .badge{flex:none}
.needsay{font-size:var(--fs0);line-height:1.45;color:var(--ink);min-width:0;
  overflow-wrap:anywhere}
.thread-row .needsay{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* No inner scroll box (v3 S7 retired the inner cap and its scroll cue): the box is
   one row of the pane at its natural height; the pane scrolls. */
.needs{margin:0 var(--sp-4) var(--sp-3);padding:var(--sp-3);border:1px solid var(--bad);
  border-radius:var(--radius-s);background:var(--bad-bg)}
.thread-pane > .needs{margin-top:var(--sp-3);flex:none}
.needs-head{display:flex;align-items:center;gap:var(--sp-2);flex-wrap:wrap}
.need-item{padding-top:var(--sp-3)}
.need-item + .need-item{margin-top:var(--sp-3);border-top:1px solid var(--line)}
.need-say{margin:0 0 var(--sp-2);font-size:14px;line-height:1.5;color:var(--ink);
  overflow-wrap:anywhere}
/* W2-13: the customer's own words under a veto, quoted, never bold */
.need-said{margin:0 0 var(--sp-2);font-size:13px;line-height:1.5;color:var(--ink-2);
  overflow-wrap:anywhere}
.need-said-label{color:var(--dim)}
.need-said q{font-style:italic}
/* 1.05.20 10.2 (W4 F3): why a checked item was kept, in the edge's plain words */
.evidence-line{margin:0 0 var(--sp-2);font-size:13px;line-height:1.5;color:var(--ink-2);
  overflow-wrap:anywhere}
/* 1.05.20 fb_10b (5_1 item 2, NEO-3@2026-09-26lead): what he needs to enter a not-yet-written
   lead into Workiz -- plain words in the body font (NEO_VERDICT 2026-09-23) */
.lead-fact{margin:0 0 var(--sp-1);font-size:13px;line-height:1.5;color:var(--ink-2);
  overflow-wrap:anywhere}
/* 1.05.20 10.1 (D_3): Unmute on the STOP chip, and its confirm line under the bar */
.thread-head .card-head > .btn.unmute{flex:none}
.unmute-confirm{margin:0;padding:var(--sp-2) var(--sp-4) var(--sp-3);
  background:var(--bad-bg);border-bottom:1px solid var(--bad-line)}
.unmute-say{margin:0 0 var(--sp-2);font-size:14px;line-height:1.5;color:var(--bad-ink);
  font-weight:600;overflow-wrap:anywhere}
.unmute-confirm .btn{min-height:var(--tap)}
/* W2-35 / S-4: the phone-alerts count line and the per-device red lines */
.push-count{margin:0 0 var(--sp-2);color:var(--ink-2)}
.push-failing,.push-cap{margin:var(--sp-2) 0}
/* W2-12: the booking funnel tile. NEO-2@2026-09-29: no table -- a seven-column table was
   619px wide in a 305-355px tile and hid failed / stuck / waiting off-screen. Each span is a
   caption and a row of chips that WRAPS inside the tile, so every number is on screen at
   390 and at 1280 in the 340px Controls column. */
.funnel-span{padding:var(--sp-3) var(--sp-4) 0}
.funnel-span + .funnel-span{padding-top:var(--sp-2)}
.funnel-cap{margin:0 0 var(--sp-2);font-size:13px;line-height:1.3;color:var(--ink-2);
  overflow-wrap:anywhere}
.funnel-when{font-weight:600;color:var(--ink)}
.funnel-proposed{font-variant-numeric:tabular-nums}
.funnel-chips{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none;
  min-width:0;max-width:100%}
.funnel-chip{display:inline-flex;align-items:baseline;gap:6px;min-width:0;max-width:100%;
  padding:4px 10px;border:1px solid var(--line);border-radius:999px;background:var(--panel2);
  font-size:13px;line-height:1.3;color:var(--ink-2);white-space:nowrap}
.funnel-chip .funnel-n{font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums}
.funnel-chip.bad{border-color:var(--bad-line);background:var(--bad-bg);color:var(--bad-ink)}
.funnel-chip.bad .funnel-n{color:var(--bad-ink)}
.funnel-list{padding:var(--sp-3) var(--sp-4) 0}
.funnel-row{padding:4px 0}
/* NEO-7: a long stuck-booking line wraps inside the tile, never clipped at the edge */
.funnel-row .btn{white-space:normal;height:auto;max-width:100%;text-align:left}
.funnel > .hint{padding:var(--sp-3) var(--sp-4) var(--sp-4);margin:0}
/* W2-16: one card per day, the text exactly as pushed */
.summary{margin-bottom:var(--sp-3)}
.summary-text{margin:0;padding:0 12px 12px;font-size:14px;line-height:1.5;white-space:pre-line;
  overflow-wrap:anywhere;color:var(--ink)}
.need-acts{display:flex;flex-wrap:wrap;gap:var(--sp-2)}
.need-answer{margin-bottom:var(--sp-2)}
/* the move picker is a tap target too (NEO-4, 2026-09-27) */
.need-answer select{min-height:var(--tap);box-sizing:border-box}
.needs .btn,.pending-acts .btn,.composer .btn{min-height:var(--tap)}
/* Marcus asks you / the after-hours emergency (2026-09-26): plain rows, 44px targets, wraps
   at 390px -- the brief keeps its own line breaks */
.askowner-brief{margin:0 0 var(--sp-2);white-space:pre-line;overflow-wrap:anywhere;
  font-size:14px;line-height:1.5;color:var(--ink)}
.askowner-q{margin:0 0 var(--sp-2);font-size:15px;line-height:1.5;overflow-wrap:anywhere}
.askowner textarea{width:100%;box-sizing:border-box;min-height:var(--tap);resize:vertical}
.askowner-asis{display:flex;align-items:center;gap:var(--sp-2);min-height:var(--tap);
  margin-bottom:var(--sp-2);font-size:14px;cursor:pointer}
.askowner-asis input{width:22px;height:22px;flex:0 0 auto}
.emergency-head{margin:0 0 var(--sp-2);display:flex;align-items:center;gap:var(--sp-2);
  flex-wrap:wrap}
.emergency-line{font-size:14px;line-height:1.5;overflow-wrap:anywhere;margin-bottom:4px}
.emergency input[type=text],.emergency input[type=datetime-local]{width:100%;
  box-sizing:border-box;min-height:var(--tap)}
.card .emergency + .composer-foot .btn{min-height:var(--tap)}

/* The draft Marcus wants to send, in the conversation (inline Review). Dashed amber:
 * it is his words and it has NOT gone anywhere yet. */
.msg.pending .bub{border-style:dashed;border-left-style:solid}
.pending-acts{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--sp-2);
  margin-top:var(--sp-2);max-width:100%}
.pending-edit{width:min(100%,560px);min-height:110px;resize:vertical;
  background:var(--panel);color:var(--ink);border:1px dashed var(--accent-stroke);
  border-radius:var(--radius-s);padding:10px 12px;font-size:16px;line-height:1.5}
.msg.pending.done .note{max-width:100%}

/* ============================================================ THE CONTROL PANEL
 * What the settings page held, beside the inbox (2026-09-24). A 340px column on a wide
 * screen -- sticky under the topbar and scrolling on its own, so eleven hand cards never
 * stretch the conversation list to their height -- and a drawer from the topbar at and
 * below 1100px (the media block at the bottom), where a third column would squeeze the
 * conversation under a readable width. */
.desk{display:grid;grid-template-columns:minmax(0,1fr) 340px;align-items:start;
  min-height:0}
.desk > .inbox,.desk > .testview{grid-column:1;grid-row:1;min-width:0}
.ctlpanel{grid-column:2;grid-row:1;min-width:0;background:var(--panel);
  border-left:1px solid var(--line);padding:var(--sp-4);
  position:sticky;top:64px;max-height:calc(100vh - 64px);max-height:calc(100dvh - 64px);
  overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
.ctlpanel:focus-visible{outline:2px solid var(--amber-line);outline-offset:-2px}
/* NEO-1@2026-09-30ctl: the wide-screen Controls press rings the column for a moment */
.ctlpanel.flash{animation:ctlflash 1.2s ease-out}
@keyframes ctlflash{0%,40%{box-shadow:inset 0 0 0 2px var(--amber-line)}
  100%{box-shadow:inset 0 0 0 2px transparent}}
.ctl-head{display:flex;align-items:center;gap:var(--sp-2);margin-bottom:var(--sp-3)}
/* The drawer's own controls: only drawn where the panel IS a drawer. */
.btn.panelbtn,.btn.ctlclose{display:none}
.ctlpanel .sigline{padding:8px 10px;margin:0 0 var(--sp-3);border:1px solid var(--line);
  border-radius:var(--radius-s);background:var(--bg)}
.ctlpanel .t-label{margin:var(--sp-4) 0 var(--sp-2)}
.ctlpanel .card{margin-bottom:var(--sp-2)}
.ctlpanel .card-head{padding:9px 12px 7px}
.ctlpanel .card-body{padding:10px 12px}
/* Two numbers first thing: the conversations the record flags, and Q-n + B-n + D-n. */
.ctl-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--sp-2);
  margin-bottom:var(--sp-3)}
.stat{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;
  min-height:var(--tap);padding:9px 12px;cursor:pointer;text-align:left;
  background:var(--panel2);border:1px solid var(--line);border-radius:var(--radius-s);
  transition:border-color var(--t-fast) var(--ease),background var(--t-fast) var(--ease)}
.stat:hover{border-color:var(--line-strong)}
.stat[aria-pressed="true"]{border-color:var(--accent-stroke);background:var(--amber-tint)}
.stat-n{font:700 var(--fs5)/1 var(--font-h);color:var(--ink);font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.stat-n.acc{color:var(--amber-ink)}
span.stat{cursor:default}
.stat-l{font-size:12px;line-height:1.3;color:var(--dim);overflow-wrap:anywhere}
.ctl-actions{display:flex;flex-wrap:wrap;gap:var(--sp-2)}
.ctl-actions > *{flex:1 1 120px}
.ctl-killhint{margin:6px 0 var(--sp-3)}
.ctl-livehint{margin:0 0 var(--sp-3)}
/* Four sections in 308px: an even grid, and a count may drop under its word rather than
   push the strip wider than the panel. */
.ctlpanel .tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;
  margin:0 0 var(--sp-2)}
.ctlpanel .tab{justify-content:center;flex-wrap:wrap;gap:3px;padding:4px;min-width:0}

/* --------------------------------------------------------------- source filter
 * The eleven sources and ALL, as chips in the panel. */
.sources{display:flex;flex-wrap:wrap;gap:6px}
.source{
  display:inline-flex;align-items:center;gap:8px;max-width:100%;
  padding:6px 12px;min-height:36px;
  background:var(--panel);border:1px solid var(--line);border-radius:999px;cursor:pointer;
  color:var(--ink-2);text-align:left;font-weight:600;font-size:13px;
  transition:background var(--t-fast) var(--ease),color var(--t-fast) var(--ease);
}
.source:hover{background:var(--panel2);color:var(--ink)}
.source[aria-pressed="true"]{border-color:var(--accent-stroke);background:var(--amber-tint);
  color:var(--ink)}
/* The one chip that is not a source: it clears the filter. Its swatch is an outline
   rather than a fill, because it stands for every hue at once and for none of them. No
   new component, no new token: a modifier on `.dot`. */
.source.all .dot{background:none;border:1.5px solid var(--line-strong)}
.source .n{margin-left:auto;font-size:12px;color:var(--faint);
  font-variant-numeric:tabular-nums}
.source .mode{font-size:10px;font-weight:800;letter-spacing:.08em;
  text-transform:uppercase}
.mode-shadow{color:var(--warn)}
.mode-first-touch{color:var(--held)}
.mode-live{color:var(--ok)}
.pill.mode-shadow{border-color:var(--warn)}
.pill.mode-first-touch{border-color:var(--held)}
.pill.mode-live{border-color:var(--ok)}
/* THE OWNER MUST NEVER AGAIN SEE "Live" WHILE NOTHING IS READING (workiz_sms reader gap,
   2026-09-27): plain words, not the shouty mode badge -- muted, not uppercase, not bold. */
.mode-disconnected{color:var(--faint);font-weight:400;letter-spacing:0;text-transform:none}

.legend{padding:0;margin-bottom:var(--sp-3);color:var(--dim);line-height:1.7;
  font-size:12.5px}
.legend b{font-weight:700}
.kbd{display:inline-block;min-width:20px;padding:2px 6px;margin-right:6px;
  border:1px solid var(--line-strong);border-radius:5px;background:var(--panel2);
  font:700 10px/1.5 var(--font);color:var(--ink-2);text-align:center}

/* devices - one row per machine, the home the device-trust lane's list/enrol/revoke
   patch lands in. Same card vocabulary as everything else here. */
.devrow{display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:9px 0;border-bottom:1px solid var(--hairline)}
.devrow:last-child{border-bottom:0}
.devrow .n{margin-left:auto;font-size:12px;color:var(--faint)}

/* --------------------------------------------------------------- controls
 * THE BUTTON SYSTEM (console v3, S2): 46px, 13px radius, an icon beside every word.
 * primary = the orange gradient with its glow (the ONE thing on a screen that needs him);
 * secondary = a raised navy tint; quiet = no fill; danger = the red fill with dark ink
 * (NEO-144); icon = a 46px circle; big = the 56px full-width thumb button. */
.btn{
  --tap:46px;   /* v3: a button is 46px; every other control keeps the 44px token */
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:var(--tap);padding:0 18px;border-radius:13px;cursor:pointer;
  background:var(--panel2);color:var(--ink);border:1px solid var(--line-strong);
  font:600 var(--fs1)/1 var(--font);letter-spacing:0;box-shadow:none;white-space:nowrap;
  transition:transform var(--t-fast) var(--ease),background var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),border-color var(--t-fast) var(--ease);
}
.btn .i{width:20px;height:20px;flex:none}
.btn:hover{background:var(--surface-4);box-shadow:var(--shadow-sm)}
.btn:active{transform:scale(.97)}
.btn[disabled]{opacity:.55;cursor:not-allowed;box-shadow:none;transform:none}
.btn[disabled]:hover{background:var(--panel2);box-shadow:none}
.btn.primary{background:var(--primary-fill);
  color:var(--on-amber);border-color:var(--primary-edge);
  box-shadow:var(--primary-glow)}
.btn.primary:hover{background:var(--primary-fill-hover);
  box-shadow:var(--primary-glow-hover)}
.btn.primary[disabled]:hover{background:var(--primary-fill)}
.btn.quiet{background:transparent;border-color:transparent;color:var(--dim);
  box-shadow:none}
.btn.quiet:hover{background:var(--panel2);color:var(--ink);box-shadow:none}
.btn.danger{background:var(--bad);color:var(--on-bad);border-color:var(--bad);
  box-shadow:var(--danger-glow)}
.btn.danger:hover{background:var(--bad);filter:brightness(1.08)}
.btn.big{min-height:56px;font-size:var(--fs2);border-radius:16px;width:100%}
.btn.icon{width:46px;min-height:46px;padding:0;border-radius:50%}
.btn.icon.sm{width:40px;min-height:40px}
.btn.block{width:100%;min-height:var(--tap)}
.btn.small{min-height:var(--tap);padding:0 14px;font-size:var(--fs0)}
/* The way back out of a conversation. It is the phone's affordance -- on a wide screen
   the list never left the screen, so there is nothing to go back to. Escape still closes
   a thread at every width. */
.backbtn{display:none}
/* The skip link is real, not decorative: it is the first tab stop and it is only visible
 * when focused, so a keyboard operator can jump straight to the conversations and a mouse
 * one never sees it. */
#skip{position:absolute;left:-9999px;top:var(--sp-2);z-index:50}
#skip:focus{left:var(--sp-2);background:var(--panel);border-color:var(--accent-stroke);
  box-shadow:var(--shadow)}

/* per-hand mode switch - SK's `.seg`, sized for three words instead of three icons */
/* v3 S9: the segmented control -- three equal cells, an icon and the word each, the
   pressed cell in its mode's own tint (yellow Shadow, blue Review, green Live). */
.modeswitch{display:grid;grid-template-columns:1fr 1fr 1fr;border:1px solid var(--line);border-radius:12px;
  background:var(--panel2);padding:3px;gap:3px;width:100%;
  overflow:hidden}
.modeswitch button{background:none;border:0;border-radius:9px;
  padding:0 8px;min-height:40px;cursor:pointer;color:var(--faint);
  font:600 var(--fs0)/1 var(--font);display:inline-flex;align-items:center;justify-content:center;gap:6px;
  transition:background var(--t-fast) var(--ease),color var(--t-fast) var(--ease)}
.modeswitch button:hover{background:var(--panel);color:var(--ink)}
.modeswitch button[aria-pressed="true"]{background:var(--surface-4);
  color:var(--ink);box-shadow:var(--shadow-sm)}
.modeswitch button[aria-pressed="true"].seg-live{background:var(--ok-bg);color:var(--ok-ink)}
.modeswitch button[aria-pressed="true"].seg-first-touch{background:var(--held-bg);color:var(--held-ink)}
.modeswitch button[aria-pressed="true"].seg-shadow{background:var(--warn-bg);color:var(--warn-ink)}
.modeswitch button[disabled]{opacity:.4;cursor:not-allowed}
/* The group clips (overflow:hidden, above) to keep its rounded corners, and the global
   ring at outline-offset:2px is drawn OUTSIDE the button, so it was cut to a 2-6px sliver
   on every mode button including LIVE (NEO-59). Same ring, drawn inside the clip -- the
   treatment #main:focus-visible already uses. Any clipping container is now irrelevant. */
.modeswitch button:focus-visible{outline-offset:-2px}

.field{display:block;margin-bottom:var(--sp-4)}
.field > span{display:block;margin-bottom:6px;font:700 11px/1 var(--font);
  letter-spacing:.09em;text-transform:uppercase;color:var(--faint)}
.field input,.field textarea{
  width:100%;min-height:var(--tap);background:var(--panel2);color:var(--ink);
  border:1px solid var(--line-strong);border-radius:var(--radius-s);padding:10px 12px;
  font-size:16px;  /* 16px: anything smaller makes iOS zoom the whole console on focus */
  transition:border-color var(--t-fast) var(--ease);
}
/* SK's inputs go amber on focus. SK also suppresses the focus ring on them; this one
 * keeps the ring ON TOP of the amber border -- a border is a hint, a ring is the
 * indicator, and removing it is the one thing a11y never trades away. */
.field input:focus,.field textarea:focus{border-color:var(--accent-stroke)}
.field input::placeholder,.field textarea::placeholder{color:var(--faint);opacity:.85}
.field .help{margin-top:6px;font-size:12px;color:var(--faint)}

/* --------------------------------------------------------------- audit table
 * SK's `table.t`: uppercase quiet headers, hairline rows, a wash on hover. */
.table-scroll{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-family:var(--font);font-size:13px;
  font-variant-numeric:tabular-nums}
th{position:sticky;top:0;background:var(--panel2);text-align:left;
  padding:9px var(--sp-4);border-bottom:1px solid var(--line);
  font:700 11px/1 var(--font);letter-spacing:.08em;text-transform:uppercase;
  color:var(--faint);white-space:nowrap}
td{padding:10px var(--sp-4);border-bottom:1px solid var(--hairline);
  vertical-align:top;color:var(--ink-2)}
td.when{white-space:nowrap;color:var(--faint)}
td.detail{min-width:16rem;overflow-wrap:anywhere;color:var(--dim)}
tr:hover td{background:var(--panel2)}

/* --------------------------------------------------------------- empty + status */
.empty{padding:var(--sp-6) var(--sp-5);text-align:center;color:var(--dim);
  border:1px dashed var(--line-strong);border-radius:var(--radius);background:var(--panel)}
.empty .t-head{color:var(--ink);margin-bottom:8px}
#status{padding:10px var(--sp-5);font-size:12px;
  border-top:1px solid var(--line);background:var(--panel);color:var(--dim);
  font-variant-numeric:tabular-nums}
#status.bad{color:var(--bad)}
#status.good{color:var(--ok)}

/* --------------------------------------------------------------- login */
.login-wrap{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;   /* NEO-18 */
  padding:var(--sp-5);
  background:radial-gradient(1200px 600px at 50% 0%, var(--panel2), var(--bg))}
.login{width:100%;max-width:392px;background:var(--panel);
  border:1px solid var(--line);border-radius:var(--radius-l);padding:var(--sp-6);
  box-shadow:var(--shadow-lg)}
.login h1{margin-bottom:var(--sp-2)}
.login .lede{color:var(--dim);margin:0 0 var(--sp-5);font-size:13px;line-height:1.55}
.login .error{margin-top:var(--sp-3);padding:10px var(--sp-3);border-radius:var(--radius-s);
  background:var(--bad-bg);border:1px solid var(--bad-line);color:var(--bad);
  font-size:13px}

/* --------------------------------------------------------------- modal */
.scrim{position:fixed;inset:0;z-index:40;display:flex;align-items:center;
  justify-content:center;padding:var(--sp-4);background:var(--scrim-ink);
  backdrop-filter:blur(2px)}
.modal{width:100%;max-width:420px;background:var(--panel);
  border:1px solid var(--line);border-radius:var(--radius-l);padding:var(--sp-6);
  box-shadow:var(--shadow-lg)}
.modal h2{margin-bottom:var(--sp-2)}
.modal p{margin:0 0 var(--sp-4);color:var(--dim);font-size:13px;line-height:1.55}
.modal-foot{display:flex;flex-wrap:wrap;gap:var(--sp-2);justify-content:flex-end;margin-top:var(--sp-4)}
.modal-foot .btn{min-height:var(--tap)}                                    /* NEO-19 */

/* --------------------------------------------------------------- responsive */
@media(max-width:1180px){
  .inbox{grid-template-columns:304px minmax(0,1fr)}
}
@media(max-width:1100px){
  /* THE PANEL BECOMES A DRAWER. Below this width a third column would leave the
     conversation too narrow to read, so the inbox takes the whole page and the panel
     slides over it from the right when the topbar's Controls button opens it. Fixed,
     full height, its own scroll; 100% wide on a phone, so it can never push the page
     sideways. */
  .desk{grid-template-columns:minmax(0,1fr)}
  .ctlpanel{display:none;position:fixed;top:0;right:0;bottom:0;z-index:30;
    width:400px;max-width:100%;max-height:none;border-left:1px solid var(--line-strong);
    box-shadow:var(--shadow-lg)}
  .ctlpanel.open{display:block}
  /* NEO-3 (round 2, 2026-09-28): only the drawer's Close is drawn here. The topbar's own
     Controls trigger (#panelbtn) stays hidden at every width -- below 1024 the tab bar
     has Controls and from 1024 the rail does, so the old button was a clipped "Cont..."
     fragment on a phone that Tab could still reach. */
  .btn.ctlclose{display:inline-flex}
}
/* EACH PANE SCROLLS ON ITS OWN (owner, 2026-09-26: "When I'm scrolling down inside the
   inbox it's scrolling down all the way down inside messaging window"). Wider than a phone
   the console is exactly one screen tall: the topbar and any banner at the top, and under
   them the conversation list, the conversation and the control panel, each its own
   scroller. The reply box is the conversation pane's last row, so it stays at the bottom
   without floating. `overscroll-behavior:contain`: a wheel that reaches the end of one pane
   stops there and never scrolls another. A phone (820px and under) keeps the page as its
   one scroller and none of this applies to it. */
@media(min-width:821px){
  #view-console:not([hidden]){display:flex;flex-direction:column;
    height:100vh;height:100dvh;overflow:hidden}
  #view-console > .desk{flex:1 1 auto;min-height:0;grid-template-rows:minmax(0,1fr);
    align-items:stretch}
  .desk > .inbox{grid-template-rows:minmax(0,1fr);min-height:0}
  .desk > .crview{min-height:0;overflow-y:auto;overscroll-behavior:contain}
  .inbox-list,.thread-body,.testlog{overflow-y:auto;overscroll-behavior:contain}
  /* NEO-1: with a Needs box the pane is header / needs / messages / note / composer in one
     screen. The composer and the note never shrink, so Send never leaves the pane; the
     messages keep a floor (260px, or 45% of a short pane); the Needs box is its natural
     height (v3 S7) and the pane scrolls as the last resort. */
  .thread-pane > .thread-head,.thread-pane > .composer-note,
  .thread-pane > .composer{flex:none}
  /* NEO-2/3 (round 2): the messages' floor is what the screen has left after the topbar,
     one banner, the header, the note, the composer and the Needs box's own floor (~600px),
     never more than 260px and never under 96px -- so on a short screen it is the MESSAGES
     that yield, first to the Needs box's floor and then to the composer. */
  .thread-pane > .thread-body{flex:1 1 0;min-height:96px;
    min-height:max(96px,min(260px,calc(100vh - 600px)));
    min-height:max(96px,min(260px,calc(100dvh - 600px)))}
  /* The Needs box is its natural height (v3 S7): the pane below scrolls for it. */
  .thread-pane > .needs{flex:none}
  /* Last resort (two banners on a 700px screen): the pane scrolls, so Send is never out of
     reach. With the floors above it has nothing to scroll at any single-banner height. */
  .thread-pane{overflow-y:auto;overscroll-behavior:contain}
  .composer textarea{min-height:56px}
}
/* A short wide screen (1366x768, 1280x720): the composer is compacted so the messages and
   the Needs box both keep something readable. */
@media(min-width:821px) and (max-height:820px){
  .composer{padding-top:var(--sp-3)}
  /* the label stays a label for screen readers (the phone's NEO-11 pattern); the
     placeholder says what the box is */
  .composer .t-label{position:absolute;width:1px;height:1px;overflow:hidden;
    clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
  .composer textarea{min-height:var(--tap)}
  .composer-foot{margin-top:0}
  /* NEO-5 (round 3): with a banner on a 700-720px screen the messages' floor yields
     first (60px at 700, 180px at 820) so the Needs box's buttons stay on screen; since
     v3 S7 the box has no floor or cap of its own. */
  .thread-pane > .thread-body{min-height:60px;
    min-height:max(60px,min(260px,calc(100vh - 640px)));
    min-height:max(60px,min(260px,calc(100dvh - 640px)))}
  /* NEO-6: when the page's own banner already says it (KILLED, or every hand in SHADOW),
     the composer's mode line repeats it -- it goes on a short screen and gives its ~30-50px
     back. It stays in the page as the box's description (aria-describedby). The Send
     button still says "(will be held)" / is off. */
  #banner-killed:not([hidden]) ~ .desk .thread-pane > .composer-note,
  #banner-shadow:not([hidden]) ~ .desk .thread-pane > .composer-note{display:none}
  /* NEO-9@2026-09-26is: the phone-alerts banner took the same ~32px, and the mode line was
     cut at the top at 700-720. It goes here too -- but this banner does not say the mode,
     so the Send button says it instead. A STOP thread keeps its note: that warning has no
     other place on screen. */
  #banner-alerts:not([hidden]) ~ .desk .thread-pane > .composer-note:not(.stop){display:none}
  #banner-alerts:not([hidden]) ~ .desk .composer-foot .btn[data-mode="sends"]::after{
    content:" - goes to the customer"}
  #banner-alerts:not([hidden]) ~ .desk .composer-foot .btn[data-mode="held"]::after{
    content:" (held, not sent)"}
}
@media(min-width:1101px){
  .ctlpanel{position:relative;top:auto;max-height:none;min-height:0}
}
/* NEO-5@2026-09-29: at 1101-1366 the desk is list (486px at 1280, the owner's ruling) +
   conversation + the 340px Controls column, which leaves the conversation ~370px and the
   reply box 105px beside Dictate and Send. The box takes the whole row here and the two
   buttons drop under it, right-aligned; the wide cards stay exactly as ruled. From 1367 up
   the column is wide enough and the one-row shape (v3 S6) is back. */
@media(min-width:1101px) and (max-width:1600px){
  .composer-box{flex-wrap:wrap}
  .composer-box textarea{flex:1 1 100%;width:100%}
  .composer-box .composer-foot{margin-left:auto}
}
/* v3 S5: at and above 1024px the tab bar becomes the rail, the crumb and the health
   pill's long words are drawn, and the conversation list widens to 420px. */
@media(min-width:1024px){
  .tabbar{display:none}
  .screens{display:flex;flex-direction:column;gap:6px;position:fixed;left:0;top:0;bottom:0;
    width:84px;z-index:21;background:var(--panel);border-right:1px solid var(--line);
    padding:14px 8px calc(14px + env(safe-area-inset-bottom,0px))}
  .screens .mark{margin:0 auto 14px}
  .screens .tabgo{flex:none;min-height:66px}
  .screens .tabgo.bottom{margin-top:auto}
  #view-console:not([hidden]){padding-left:84px}
  .surface{display:inline-block}
  .health .long{display:inline}.health .short{display:none}
  .needsbtn .lbl{display:inline}
  /* THE LIST COLUMN (owner, 2026-09-28, on the v3 demo): "the thread cards need to be a
     little bit wider" -- the pills and the deck's buttons had no room at 420. It scales
     with the screen: 400px at 1024 (a 940px desk after the rail), 486px at 1280, 560px
     from 1474 up; the conversation keeps at least ~540px beside it at every width. */
  .inbox{grid-template-columns:clamp(400px,38vw,560px) minmax(0,1fr)}
}
@media(max-width:820px){
  /* PAUSE / PLAY: the big orange Play takes the whole width of the work order on a phone. */
  .btn.playbtn{width:100%}
  /* THE INBOX ON A PHONE. One column: the list, and the conversation instead of the
     list once one is open, with a real way back. Two 352px panes side by side on a
     390px screen is the shape that made the old board show no thread at all. */
  .inbox{grid-template-columns:minmax(0,1fr)}
  .inbox-list{border-right:0;padding:var(--sp-4)}
  .inbox-thread{display:none}
  .inbox.open .inbox-list{display:none}
  .inbox.open .inbox-thread{display:flex}
  /* NEO-167 (2026-09-22, his phone): the Test Marcus surface wears .inbox-thread for its bubbles
     and sits outside .inbox, so the rule above hid it on every phone. It is its own page. */
  .testview:not([hidden]){display:flex}
  .backbtn{display:inline-flex}
  .msg .bub,.msg .note,.msg .tele{max-width:100%}
  .msg .tele-sum{min-height:var(--tap)}
  /* NEO-1@2026-09-27lf: THE TOAST ON A PHONE sits just above the floating reply box, never
     over the thread's name and Back; the conversation's end grows by its height
     (`--toast-room`, set by `toastRoom`) so it never covers the newest message either. */
  .livetoasts{top:auto;left:var(--sp-4);right:var(--sp-4);width:auto;
    bottom:var(--toast-bottom,calc(var(--composer-h,0px) + var(--kb,0px) + var(--sp-2)))}
  .thread-body{padding:var(--sp-4);padding-bottom:calc(var(--sp-4) + var(--toast-room,0px))}

  /* The source chips grow to the tap token on a phone. */
  .source{min-height:var(--tap);padding:8px 14px}
  /* The keyboard legend goes: a phone has no j/k. The hand-mode glossary STAYS, because
   * it is the only place the console explains what shadow / first-touch / live mean and
   * a phone is where an operator is least able to look it up. A heading with nothing
   * under it is the defect this replaces (NEO-12), so the heading leaves with its list. */
  .keys-label,.keys-legend{display:none}
  /* One tap token, honoured by every control on the board and not just the source pills
     (NEO-13). 32px buttons are a miss on a phone held one-handed at 6am. */
  .modeswitch button,.tab,.killbtn{min-height:var(--tap)}
  /* NEO-1 @2026-09-24: on a phone the Controls button is the ONLY way into the settings,
   * so it gets the tap token too -- and so do its two topbar neighbours. */
  #panelbtn,#signout,#needsyou{min-height:var(--tap)}
  /* The floating reply box costs screen on a phone, so it is kept short there; the box
     still grows as he types (resize) and every control keeps the 44px tap token. */
  .composer{padding-top:var(--sp-3)}
  .composer textarea{min-height:var(--tap)}
  .composer-foot{margin-top:0}
  .topbar{gap:8px;padding-left:12px;padding-right:10px}
  .banner,.sigline,#status{padding-left:var(--sp-4);padding-right:var(--sp-4)}
  .login{padding:var(--sp-5)}
}

@media(max-width:480px){
  /* NEO-11 @2026-09-24: THE FLOATING BOX, COMPACT. Pinned it ate 34-47% of a phone. Here
   * only the box and its buttons float: the label is kept for screen readers but not
   * drawn (the placeholder says what the box is), the mode note already sits in the flow
   * above, and the box is one line that grows to three as he types (`growBox`). At rest:
   * 8 + 44 + 8 + 44 + 8 = ~113px, about 13% of an iPhone 13 and 17% of an iPhone SE. */
  .composer{padding:var(--sp-2) var(--sp-4);
    padding-bottom:calc(var(--sp-2) + env(safe-area-inset-bottom, 0px));
    box-shadow:var(--lift-up-sm)}
  .composer .t-label{position:absolute;width:1px;height:1px;overflow:hidden;
    clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
  .composer textarea{min-height:var(--tap);max-height:96px;resize:none;
    padding:9px 12px;line-height:1.5}
  .composer-foot{margin-top:0;gap:var(--sp-2)}
  .composer .newmsg{margin-bottom:var(--sp-2)}
  /* the round Send and mic: 46px discs, the word kept for a screen reader */
  .composer .btn.send,.composer .btn.mic{width:46px;padding:0;border-radius:50%}
  .composer .btn.send .lbl,.composer .btn.mic .lbl{position:absolute;width:1px;height:1px;
    overflow:hidden;clip:rect(0 0 0 0)}
  .composer .btn.mic[aria-pressed="true"]{width:auto;padding:0 14px;border-radius:23px}
}

@media(prefers-reduced-motion:reduce){
  /* The iteration count is the strobe fix (design review change 5): a 0.01ms duration
   * on an `infinite` animation repaints a random phase every frame. Every loop also
   * names its static end state here, so nothing depends on where a cut-short cycle
   * happened to stop. */
  *{transition-duration:0.01ms !important;animation-duration:0.01ms !important;
    animation-iteration-count:1 !important}
  .msg .tele-chev{transition:none}
  .thinkrow-mark,.livedot-mark{animation:none;opacity:1}
  .chd .ring{animation:none;opacity:.9}
  .led.breathe{animation:none;box-shadow:0 0 0 3px var(--led-halo)}
  /* NEO-1@2026-09-30ctl: a still ring for the moment the press holds it (console.js) */
  .ctlpanel.flash{animation:none;box-shadow:inset 0 0 0 2px var(--amber-line)}
  .wave i{animation:none;height:10px}
  .ribs i{animation:none;opacity:.8}
}

/* --------------------------------------------------------------- print
 * SK's print block: white ground, dark ink, no chrome. An audit tab printed on a dark
 * console wastes a cartridge and reads worse. */
@media print{
  body{background:#FFFFFF;color:#151517}
  .topbar,.ctlpanel,#skip,#status,.composer,.tabbar,.screens{display:none !important}
  .desk,.inbox{display:block}
  .inbox-list,.thread-body{overflow:visible;padding:0}
  .card{box-shadow:none;border-color:#DDDDDD}
}

/* ---- Test Marcus (2026-09-22): the owner as a customer, same bubbles as the thread ---- */
.testview{min-height:0}
.testview .testhint{margin:0;padding:0 var(--sp-4) var(--sp-4)}
.testlog{flex:1 1 auto;min-height:160px;overflow:auto;padding:var(--sp-4);display:flex;
  flex-direction:column;gap:var(--sp-4)}
.testcompose{display:flex;gap:var(--sp-2);padding:var(--sp-4);border-top:1px solid var(--line);
  flex:none}
.testcompose textarea{flex:1 1 auto;min-width:0;min-height:44px;resize:vertical}
.teststatus{margin:0;padding:0 var(--sp-4) var(--sp-4);flex:none}
.teststatus.bad{color:var(--bad)}
.teststatus.warn{color:var(--warn)}
.devrows{display:flex;flex-direction:column;gap:var(--sp-2);margin:var(--sp-2) 0}
.devrow .btn{margin-left:var(--sp-2)}

/* ---- A phone for Marcus (2026-09-24): the link, its QR code, and a phone asking ---- */
.phoneasks{margin:0;padding:var(--sp-3) var(--sp-4);background:var(--amber-tint);
  border-bottom:1px solid var(--amber-line)}
.phoneask + .phoneask{margin-top:var(--sp-3)}
.phoneask-say{display:block;margin-bottom:var(--sp-2);font-weight:700;color:var(--ink);
  overflow-wrap:anywhere}
.phoneasks .btn{min-height:var(--tap)}
.addphone .steps{margin:0 0 var(--sp-3);padding-left:20px;color:var(--ink-2)}
.addphone .linkline{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2);
  margin-bottom:var(--sp-3)}
.addphone .consolelink{overflow-wrap:anywhere;font-weight:700}
.addphone .btn{min-height:var(--tap)}
.addphone .qr{display:block;max-width:100%;height:auto;margin-bottom:var(--sp-2);
  border-radius:6px}
.qr .qr-paper{fill:var(--paper)}
.qr .qr-ink{fill:var(--paper-ink)}
.waiting{margin-top:var(--sp-2);font-weight:700;color:var(--amber-ink)}
.a2hs{display:none}
@media(max-width:820px){ .a2hs{display:block;margin-top:var(--sp-3)} }
.trustnote{margin-top:var(--sp-2);font-size:13px;color:var(--dim);overflow-wrap:anywhere}
/* THE THEME (migration step 1): Auto / Daylight / Night in Controls > Devices while Daylight
 * is a preview. Real buttons; the choice is carried by aria-pressed AND a check mark in the
 * label, never by the tint alone. */
.themepick{display:flex;flex-wrap:wrap;gap:var(--sp-2);margin-top:var(--sp-3)}
.themepick .btn{flex:1 1 0;min-width:96px;min-height:var(--tap);box-shadow:none}
.themepick .btn[aria-pressed="true"]{background:var(--amber-tint);color:var(--ink);
  border-color:var(--accent-stroke)}
/* FU-J: the Workiz team as tap-to-pick tech buttons on a booking's approve (phone-first:
 * full tap height, wraps, the pick carried by aria-pressed and the accent border). */
.techpick{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2);margin:var(--sp-2) 0}
.techpick-label{flex:1 0 100%;font-size:var(--fs0)}
.techpick .btn{min-height:var(--tap);box-shadow:none}
.techpick .btn[aria-pressed="true"]{background:var(--amber-tint);color:var(--ink);
  border-color:var(--accent-stroke)}
.trustnote.bad{color:var(--bad)}
.trustnote.ok{color:var(--ok)}

/* ---- Marcus's own words (2.0, M1/M2): labelled, links and long numbers flagged ---- */
.modeltext{margin:var(--sp-2) 0;padding:var(--sp-2) var(--sp-3);border-left:3px solid var(--warn);
  background:var(--warn-bg);border-radius:var(--radius-s);overflow-wrap:anywhere}
.modellabel{display:block;margin-bottom:4px;font:800 12px/1.4 var(--font);
  letter-spacing:.08em;text-transform:uppercase;color:var(--warn)}
.modelwords{white-space:pre-wrap}
mark.flag{background:var(--bad-bg);color:var(--bad);font-weight:700;border-radius:3px;
  padding:0 3px;text-decoration:underline dotted;overflow-wrap:anywhere}

/* ---- B5 + A5 (2.0): the window on a booking card, and the fleet send hold ---- */
.window-state.ok span:last-child{color:var(--ok);font-weight:700}
.window-state.bad span:last-child{color:var(--bad);font-weight:700}
/* The appointment time, first line of a booking card: what he is approving, at a glance. */
.booking-when{font:700 18px/1.3 var(--font-h);color:var(--ink);margin-bottom:10px}
.window-refusal{margin:var(--sp-2) 0;color:var(--bad);font-weight:700;overflow-wrap:anywhere}
/* §64: an emergency approve held for the customer's words since the request, on the card he
 * tapped -- the words, then "I've read it - approve" (the one control that sends the ack). */
.unread-ack{margin:var(--sp-2) 0;padding:var(--sp-2) var(--sp-3);border-left:3px solid var(--accent);
  background:var(--accent-tint);border-radius:var(--radius-s);overflow-wrap:anywhere}
.unread-ack .window-refusal{margin-top:0}
.unread-ack .btn{min-height:var(--tap)}
/* NEO-7: the mark stays inline with the words; only the button takes its own row. */
.banner.hold{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:10px;
  row-gap:var(--sp-2);align-items:start;background:var(--bad-bg);
  border-bottom-color:var(--bad-line);color:var(--bad)}
.banner.hold b{color:var(--bad);font-family:var(--font-h)}
.banner.hold .btn{grid-column:2;justify-self:start}
/* NEO-3: a copied draft's words stay, greyed, with Copy again. */
.copied-words{margin:var(--sp-2) 0;padding:var(--sp-2) var(--sp-3);opacity:.7;
  border-left:3px solid var(--line-strong);background:var(--panel2);border-radius:var(--radius-s);
  overflow-wrap:anywhere}
.copied-words .modelwords{display:block;margin-bottom:var(--sp-2);white-space:pre-wrap}
.fact-origins{margin:var(--sp-2) 0}
.fact.unproven{color:var(--bad)}

/* ---- THE CONTROL ROOM (2026-09-26): MasterQuote's owner view, in the inbox's place ----
 * Its own designed pair, solid hex, the owner's internal-tool palette: navy #070D1A
 * ground, amber #FF8A3D accent -- RESTORED (2026-09-27) after design review D1 folded it
 * into the console's Graphite & Signal role tokens; see the `--room-*` block above for
 * why. The `--cr-*` names now reach navy/orange through those `--room-*` tokens rather
 * than inlined hex, so the D1 fold is a one-line change again the day the owner clears
 * it: repoint each `--cr-*` at a role token instead. Every control is the 44px tap
 * token; nothing is wider than the screen. Contrast of each pair is asserted in
 * tests/test_mq_admin_proxy.py. */
.crview{--cr-bg:var(--room-bg);--cr-card:var(--room-card);--cr-card2:var(--room-card2);
  --cr-line:var(--room-line);--cr-ink:var(--room-ink);--cr-dim:var(--room-dim);
  --cr-amber:var(--room-amber);--cr-on-amber:var(--room-on-amber);
  --cr-bad:var(--room-bad);--cr-bad-bg:var(--room-bad-bg);--cr-ok:var(--room-ok);
  --cr-ok-bg:var(--room-ok-bg);
  background:var(--cr-bg);color:var(--cr-ink);min-width:0;min-height:60vh;
  padding:var(--sp-4);display:flex;flex-direction:column;gap:var(--sp-3);
  overflow-wrap:anywhere}
.crview[hidden]{display:none}
.desk > .crview{grid-column:1;grid-row:1}
.cr-top{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2)}
.cr-title{color:var(--cr-ink);min-width:0}
.cr-main{display:flex;flex-direction:column;gap:var(--sp-3);min-width:0}
.cr-main:focus-visible{outline:2px solid var(--cr-amber);outline-offset:2px}
.crview .btn{min-height:var(--tap);background:var(--cr-card2);color:var(--cr-ink);
  border-color:var(--cr-line);box-shadow:none}
.crview .btn:hover{background:var(--cr-line)}
.crview .btn.quiet{background:transparent;border-color:transparent;color:var(--cr-dim)}
.crview .btn.quiet:hover{background:var(--cr-card2);color:var(--cr-ink)}
.crview .btn.primary{background:var(--cr-amber);color:var(--cr-on-amber);
  border-color:var(--cr-amber)}
.crview .btn.primary:hover{background:var(--cr-amber);filter:brightness(1.06)}
.crview :focus-visible{outline:2px solid var(--cr-amber);outline-offset:2px}
.cr-tabs{display:flex;flex-wrap:wrap;gap:var(--sp-2)}
.cr-tabs[hidden]{display:none}
.cr-tab,.cr-chip{display:inline-flex;align-items:center;gap:6px;min-height:var(--tap);
  padding:0 16px;border-radius:999px;cursor:pointer;background:var(--cr-card);
  color:var(--cr-dim);border:1px solid var(--cr-line);font:700 14px/1 var(--font)}
.cr-tab[aria-pressed="true"],.cr-chip[aria-pressed="true"]{background:var(--cr-amber);
  color:var(--cr-on-amber);border-color:var(--cr-amber)}
.cr-chips{display:flex;flex-wrap:wrap;gap:6px}
.cr-badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;
  font:700 12px/1.4 var(--font);background:var(--cr-card2);color:var(--cr-ink);
  border:1px solid var(--cr-line)}
.cr-badge.bad{background:var(--cr-bad-bg);color:var(--cr-bad);border-color:var(--cr-bad)}
.cr-card{background:var(--cr-card);border:1px solid var(--cr-line);border-radius:12px;
  padding:var(--sp-4);min-width:0;display:flex;flex-direction:column;gap:var(--sp-2)}
.cr-h{font:700 16px/1.3 var(--font-h);color:var(--cr-ink);margin:0}
.cr-big{font-size:22px}
.cr-p{margin:0;color:var(--cr-dim);font-size:15px;line-height:1.5}
/* POLY MARCUS (2026-10-21): drawn with the inbox's own classes; these are the only shapes it
 * adds -- the "keep it as a rule" tick, the answer and rule fields, and a rule's words. */
.pm-check{display:flex;align-items:center;gap:var(--sp-2);min-height:var(--tap);
  font-size:15px;color:var(--ink);cursor:pointer}
.pm-check input{width:22px;height:22px;accent-color:var(--amber)}
.pm-answer,.pm-rule{width:100%;min-width:0}
.pm-rule-words{margin:0;font-size:16px;line-height:1.5;color:var(--ink);white-space:pre-wrap}
.pmrules{display:flex;flex-direction:column;gap:var(--sp-3);margin-top:var(--sp-5)}
#pmrulesbody{display:flex;flex-direction:column;gap:var(--sp-3)}
.cr-sub{display:block;color:var(--cr-dim);font-size:14px;line-height:1.4}
.cr-hint{margin:0;color:var(--cr-dim);font-size:13px;line-height:1.45}
.cr-name{display:block;font:700 16px/1.3 var(--font-h);color:var(--cr-ink)}
.cr-subject{margin:0;color:var(--cr-ink);font-weight:700;font-size:15px}
.cr-empty{padding:var(--sp-4);border:1px dashed var(--cr-line);border-radius:12px;
  text-align:center}
.cr-fault .cr-h{color:var(--cr-bad)}
.cr-fault.off .cr-h{color:var(--cr-amber)}
.cr-fault .btn{align-self:flex-start}
.cr-status{display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:4px;
  min-height:var(--tap);padding:10px 14px;border-radius:12px;text-align:left;
  font:600 14px/1.45 var(--font);border:1px solid var(--cr-line);max-width:100%}
.cr-status.ok{background:var(--cr-ok-bg);color:var(--cr-ok);border-color:var(--cr-ok-bg)}
.cr-status.bad{background:var(--cr-bad-bg);color:var(--cr-bad);border-color:var(--cr-bad);
  cursor:pointer}
.cr-status.unknown{background:var(--cr-card);color:var(--cr-dim)}
.cr-redlist{margin:var(--sp-2) 0 0;padding-left:20px;color:var(--cr-bad);font-size:14px;
  line-height:1.5}
.cr-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:var(--sp-2)}
.cr-tile{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;
  min-height:var(--tap);padding:12px 14px;border-radius:12px;background:var(--cr-card);
  border:1px solid var(--cr-line);color:var(--cr-ink);text-align:left}
.cr-tile-n{font:800 26px/1.1 var(--font-h);font-variant-numeric:tabular-nums}
.cr-tile-l{font-size:13px;line-height:1.35;color:var(--cr-dim)}
.cr-tile.muted .cr-tile-n{color:var(--cr-dim)}
.cr-unanswered{cursor:pointer}
.cr-unanswered.bad{border-color:var(--cr-bad);background:var(--cr-bad-bg)}
.cr-unanswered.bad .cr-tile-n,.cr-unanswered.bad .cr-tile-l{color:var(--cr-bad)}
.cr-step{display:flex;flex-direction:column;gap:4px;padding:6px 0}
.cr-step-top{display:flex;justify-content:space-between;gap:var(--sp-2);font-size:15px}
.cr-step-n{font-weight:700;font-variant-numeric:tabular-nums}
.cr-step-m{font-size:12.5px;color:var(--cr-dim)}
.cr-bar{height:12px;border-radius:6px;background:var(--cr-card2);overflow:hidden}
.cr-fill{display:block;height:100%;background:var(--cr-amber);border-radius:6px}
/* THE FUNNEL DRAWING (2026-10-11): the Deed Funnel's narrowing bands, in the room's own colours */
.cr-fsvg{display:block;max-width:100%;height:auto;margin:var(--sp-2) auto 0}
.cr-fsvg text{font-family:var(--font);fill:var(--cr-ink);font-variant-numeric:tabular-nums}
.cr-f-amber{--cr-ftone:var(--cr-amber)}
.cr-f-green{--cr-ftone:var(--cr-ok)}
.cr-f-blue{--cr-ftone:var(--cr-dim)}
.cr-fstop-amber{stop-color:var(--cr-amber)}
.cr-fstop-green{stop-color:var(--cr-ok)}
.cr-fstop-blue{stop-color:var(--cr-dim)}
.cr-fband path{stroke:var(--cr-ftone);stroke-opacity:.75}
.cr-fneck{fill:var(--cr-ftone);fill-opacity:.12;stroke:none}
.cr-fsvg .cr-fcnt{font-size:27px;font-weight:700;letter-spacing:-.6px}
.cr-fsvg .cr-fcnt.muted{fill:var(--cr-dim)}
.cr-fsvg .cr-flab{font-size:14px;font-weight:700;letter-spacing:.5px;text-transform:uppercase}
.cr-fsvg .cr-fsub{font-size:12px;fill:var(--cr-dim)}
.cr-fsvg .cr-fkept{font-size:20px;font-weight:700}
.cr-fsvg .cr-fkeptl{font-size:12.5px;fill:var(--cr-dim)}
.cr-fsvg .cr-fkeptin{font-size:12.5px;font-weight:700;fill:var(--cr-dim)}
.cr-fband.door{cursor:pointer}
.cr-fband.door:hover path,.cr-fband.door:focus-visible path{stroke-opacity:1;stroke-width:2.5}
.cr-fband.door:hover .cr-flab{fill:var(--cr-ftone)}
.cr-fhint{color:var(--cr-dim);font-size:12.5px;text-align:center}
.cr-archived{color:var(--cr-dim);font-size:13px}
.cr-row,.cr-person{display:flex;flex-wrap:wrap;align-items:center;gap:6px var(--sp-3);
  width:100%;min-height:var(--tap);padding:10px 12px;border-radius:10px;cursor:pointer;
  background:var(--cr-card2);border:1px solid var(--cr-line);color:var(--cr-ink);
  text-align:left;font:15px/1.4 var(--font)}
.cr-row .cr-row-main{flex:1 1 auto;min-width:0}
.cr-row .cr-row-n{font-weight:700;font-variant-numeric:tabular-nums}
.cr-person{flex-direction:column;align-items:flex-start}
.cr-list{display:flex;flex-direction:column;gap:var(--sp-2);
  scroll-margin-top:120px}   /* clears the sticky topbar when paging brings it into view */
.cr-meta{display:flex;flex-wrap:wrap;gap:6px;align-items:center;color:var(--cr-dim);
  font-size:13px}
.cr-table th{background:var(--cr-card2);color:var(--cr-dim);font-size:12px}
.cr-table td{color:var(--cr-ink);border-bottom-color:var(--cr-line)}
.crview tr:hover td{background:var(--cr-card2)}
.cr-search{display:flex;gap:var(--sp-2);flex-wrap:wrap}
.cr-input,.cr-note{flex:1 1 200px;min-width:0;min-height:var(--tap);font-size:16px;
  padding:10px 12px;border-radius:10px;background:var(--cr-card);color:var(--cr-ink);
  border:1px solid var(--cr-line);box-sizing:border-box}
.cr-note{width:100%;min-height:88px;resize:vertical;font-family:var(--font)}
.cr-input::placeholder,.cr-note::placeholder{color:var(--cr-dim)}
.cr-pager{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2)}
.cr-acts{display:flex;flex-wrap:wrap;gap:var(--sp-2)}
.cr-said{margin:0;font-size:14px;color:var(--cr-dim)}
.cr-said.bad{color:var(--cr-bad)}
.cr-said.ok{color:var(--cr-ok)}
.cr-done{border-color:var(--cr-ok-bg)}
.cr-unreadable{margin:0;padding:8px 12px;border-radius:8px;background:var(--cr-bad-bg);
  color:var(--cr-bad);font-weight:700;font-size:14px}
.cr-merge{border-color:var(--cr-amber)}
.cr-cand{display:flex;flex-direction:column;gap:6px;padding:8px 0;
  border-top:1px solid var(--cr-line)}
.cr-when{margin:0;font:700 17px/1.3 var(--font-h);color:var(--cr-ink)}
.cr-booking{display:flex;flex-direction:column;gap:4px;padding:6px 0}
.cr-concerns{margin:0;padding:8px 12px;border-left:3px solid var(--cr-amber);
  background:var(--cr-card2);border-radius:6px;color:var(--cr-ink);font-size:14px}
.cr-concerns b{color:var(--cr-amber)}
.cr-mail{display:flex;flex-direction:column;gap:6px;padding:10px 12px;border-radius:10px;
  background:var(--cr-card2);border:1px solid var(--cr-line);max-width:92%}
.cr-mail.in{align-self:flex-start;border-left:3px solid var(--cr-amber)}
.cr-mail.out{align-self:flex-end}
.cr-mail .btn{align-self:flex-start}
.cr-mail-who{font-size:12.5px;color:var(--cr-dim)}
.cr-copylabel{margin:0;align-self:flex-start;padding:4px 10px;border-radius:999px;
  background:var(--cr-amber);color:var(--cr-on-amber);font:800 12px/1.4 var(--font);
  letter-spacing:.04em;text-transform:uppercase}
/* The customer's email as the customer saw it, on the white it was written for. */
.cr-frame{display:block;width:100%;max-width:100%;min-height:65vh;
  border:1px solid var(--cr-line);border-radius:10px;background:var(--paper)}
.cr-timeline{margin:0;padding-left:20px;color:var(--cr-dim);font-size:14px;line-height:1.6}
.cr-loading{padding:var(--sp-2) 0}
.cr-short{display:none}
@media(max-width:420px){
  .cr-long{display:none}
  .cr-short{display:inline}
}
@media(max-width:480px){
  .crview{padding:var(--sp-3)}
  .cr-mail{max-width:100%}
  .cr-tab,.cr-chip{padding:0 12px}
}

/* ============================================================ CONSOLE v3 PRIMITIVES (S2)
 * The icon (`.i`), the pill family, the channel tile (`.chd`) and the section label. Every
 * state carries a WORD and an icon; colour is never the only channel. */
.sprite{position:absolute;width:0;height:0;overflow:hidden}
.i{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;
  stroke-linecap:round;stroke-linejoin:round}
.i.s16{width:16px;height:16px}.i.s18{width:18px;height:18px}.i.s24{width:24px;height:24px}
.i.s28{width:28px;height:28px;stroke-width:1.6}
.pill{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;
  border-radius:999px;font:600 var(--fs-1)/1 var(--font);white-space:nowrap;
  border:1px solid transparent}
.pill .i{width:14px;height:14px;stroke-width:2}
.pill.act{background:var(--amber);color:var(--on-amber)}
.pill.wait{background:var(--bad-bg);color:var(--bad-ink);border-color:var(--bad-line)}
.pill.ok{background:var(--ok-bg);color:var(--ok-ink)}
.pill.held{background:var(--held-bg);color:var(--held-ink)}
.pill.typing{background:var(--amber-tint);color:var(--amber-ink);border-color:var(--amber-line)}
.pill.quiet{background:var(--panel2);color:var(--dim)}
.pill.warn{background:var(--warn-bg);color:var(--warn-ink)}
.pill.mode{background:transparent;border-color:var(--line-strong);color:var(--faint);height:24px}
.pill.mode.live{color:var(--ok-ink);border-color:var(--ok-ink)}
.pill.mode.review,.pill.mode.first-touch{color:var(--held-ink);border-color:var(--held-ink)}
.pill.mode.shadow{color:var(--warn-ink);border-color:var(--warn-ink)}
.pill.private{background:var(--panel2);color:var(--faint);height:22px;font-size:11.5px}
/* THE CHANNEL TILE: 40px, the channel's hue at 14% as the fill and the hue as the ink.
 * The owner's six get a generic mark; the other five get their initial. */
.chd{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;flex:none;
  position:relative;background:var(--tile-unknown);color:var(--on-tile)}
.chd .i{width:20px;height:20px;stroke-width:1.9}
.chd .ini{font:700 15px/1 var(--font-h);color:currentColor}
.chd.ch-lsa{background:var(--tile-lsa);color:var(--on-tile)}
.chd.ch-thumbtack{background:var(--tile-thumbtack);color:var(--on-tile)}
.chd.ch-workiz_sms{background:var(--tile-workiz_sms);color:var(--on-tile)}
.chd.ch-website{background:var(--tile-website);color:var(--on-tile)}
.chd.ch-messenger{background:var(--tile-messenger);color:var(--on-tile)}
.chd.ch-whatsapp{background:var(--tile-whatsapp);color:var(--on-tile)}
.chd.ch-angi{background:var(--tile-angi);color:var(--on-tile)}
.chd.ch-yelp{background:var(--tile-yelp);color:var(--on-tile)}
.chd.ch-instagram{background:var(--tile-instagram);color:var(--on-tile)}
.chd.ch-voice{background:var(--tile-voice);color:var(--on-tile)}
/* Poly Marcus's own SMS (2026-10-21): not GDMKC's Workiz mark; the phone hue, initial S.
 * No --s-pm_sms swatch: the eleven are pinned pairwise-distinct (test_console_lsa_surface). */
.chd.ch-pm_sms{background:var(--tile-voice);color:var(--on-tile)}
.chd.ch-sweeper{background:var(--tile-sweeper);color:var(--on-tile)}
.chd.sm{width:32px;height:32px;border-radius:10px}
.chd.sm .i{width:17px;height:17px}
.sec{display:flex;align-items:center;gap:10px;padding:18px 16px 10px;
  font:600 11.5px/1 var(--font);letter-spacing:.12em;text-transform:uppercase;color:var(--faint)}
.sec .n{background:var(--panel2);color:var(--dim);border-radius:999px;padding:4px 8px;
  font-size:11.5px;letter-spacing:0}
.sec .spacer{flex:1}

/* ============================================================ THE NEEDS-YOU DECK (v3, S4)
 * Two raised cards above the list; orange edge, a 56px primary in the thumb zone. */
.deck{margin:0 0 var(--sp-3)}
.deck .sec{padding:6px 4px 10px}
.need{position:relative;border-radius:var(--radius-xl);padding:16px 16px 14px;
  background:linear-gradient(160deg,var(--surface-4),var(--surface-2) 60%);
  border:1px solid var(--amber-line);box-shadow:var(--shadow-lg),0 0 40px -18px var(--accent-glow);
  animation:rise var(--t) var(--ease) both;overflow:hidden;color:var(--ink)}
.need::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;
  background:var(--amber);border-radius:4px 0 0 4px}
.need + .need{margin-top:10px}
.need .hd{display:flex;align-items:center;gap:10px;margin-bottom:10px;min-width:0}
.need .whobox{min-width:0;flex:1}
.need .hd .who{font:600 var(--fs2)/1.2 var(--font-h);overflow-wrap:anywhere}
.need .hd .sub{color:var(--faint);font-size:var(--fs-1);margin-top:2px;overflow-wrap:anywhere}
.need .hd .t{margin-left:auto;color:var(--faint);font-size:var(--fs-1);white-space:nowrap;
  font-variant-numeric:tabular-nums;flex:none}
.need .verb{display:inline-flex;align-items:center;gap:6px;color:var(--amber-ink);
  font-weight:600;font-size:var(--fs0);margin-bottom:8px}
.need .q{margin:2px 0 4px;font:600 var(--fs2)/1.35 var(--font-h);overflow-wrap:anywhere}
.need .acts{display:flex;gap:10px;margin-top:14px}
.need .acts .btn.big{flex:1;min-width:0}
.need .acts .btn.icon.open{width:56px;min-height:56px;border-radius:16px;flex:none}
.need .row2{display:flex;gap:8px;margin-top:8px;flex-wrap:wrap}
.need .row2 .btn{flex:1 1 150px;min-width:0;font-size:var(--fs0)}   /* wraps, never squeezes (2026-09-28) */
.onebyone{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;
  min-height:var(--tap);margin-top:12px;border-radius:12px;border:1px dashed var(--line-3);
  background:transparent;color:var(--dim);font:600 var(--fs0)/1 var(--font);cursor:pointer}
.onebyone:hover{border-color:var(--amber-line);color:var(--amber-ink)}

/* ============================================================ ONE AT A TIME (v3, S12)
 * The Needs-you queue as a full screen over the inbox: a 60px bar (back, "Needs you",
 * Show later), the segmented progress, "2 of 4", the card sliding in, the swipe hint, and
 * the actions in the thumb zone (Later - secondary - primary). Keys A / L / Esc. */
.approve{display:flex;flex-direction:column;min-height:0;flex:1;min-width:0}
.approve .abar{display:flex;align-items:center;gap:8px;min-height:60px;padding:0 10px 0 6px;
  background:var(--glass);border-bottom:1px solid var(--line);flex:none}
.approve .abar .whobox{min-width:0;flex:1;display:flex;flex-direction:column}
.approve .abar b{font:600 var(--fs2)/1.2 var(--font-h);color:var(--ink)}
.approve .abar span{color:var(--faint);font-size:var(--fs-1)}
.prog{display:flex;gap:4px;padding:10px 16px 0}
.prog i{flex:1;height:4px;border-radius:3px;background:var(--surface-4)}
.prog i.on{background:var(--amber)}
.prog i.done{background:var(--ok)}
.approve .count{padding:6px 16px 0;color:var(--faint);font-size:var(--fs0);display:flex;
  align-items:center;gap:8px}
.approve .count b{color:var(--ink);font-family:var(--font-h)}
.approve .ascroll{padding:12px 16px 16px;flex:1;min-height:0;overflow-y:auto}
.approve .need{animation:slidein var(--t) var(--ease) both;touch-action:pan-y;
  transition:transform 200ms var(--ease)}
.approve .need.dragging{transition:none;cursor:grabbing}
.swipehint{color:var(--faint);font-size:var(--fs-1);text-align:center;padding:10px 0 0}
.approve .afoot{flex:none;display:flex;gap:10px;padding:10px 16px calc(12px + env(safe-area-inset-bottom,0px));
  border-top:1px solid var(--line);background:var(--glass-2);position:sticky;bottom:0;z-index:15}
.approve .afoot .btn.big{flex:1;min-width:0}
.approve .afoot .btn.later{flex:none;width:auto;padding:0 18px}
.approve .afoot .btn.big:not(.primary):not(.later){flex:0 0 auto;width:auto;padding:0 16px}
.approve .afoot .btn.icon.open{width:56px;min-height:56px;border-radius:16px;flex:none}
/* NEO-9 (2026-09-29): the global-card footer (Later + "Answer Q-n" + "OK, noted") has two
 * fixed-width buttons eating the row, leaving the flexible primary too little space at phone
 * widths -- min-width:0 let it shrink below its own text ("OK, noted" -> "OK, no"). Below
 * 430px, a footer with 3+ buttons wraps and the primary takes its own full row instead. The
 * two-button footer (Later + primary) is untouched at every width. */
@media(max-width:430px){
  .approve .afoot:has(> .btn:nth-of-type(3)){flex-wrap:wrap}
  .approve .afoot:has(> .btn:nth-of-type(3)) > .btn.big.primary{flex:1 1 100%}
}
.need .quick{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0 2px}
.need .quick .qk{border-radius:999px}
.done-art{padding:48px 24px;text-align:center;animation:rise var(--t) var(--ease)}
.done-art .ok-ring{width:84px;height:84px;border-radius:50%;margin:0 auto 16px;display:grid;
  place-items:center;background:var(--ok-bg);border:2px solid var(--ok);color:var(--ok-ink);
  animation:pop 420ms var(--ease)}
.done-art .ok-ring .i{width:40px;height:40px;stroke-width:2.2}
.done-art h3{margin:0 0 6px;font:600 var(--fs4)/1.2 var(--font-h);color:var(--ink)}
.done-art p{color:var(--faint);margin:0 0 20px}
/* live bug 1.05.17: a count above 0 with nothing drawn is a fault, said in red, never the ring */
.done-art.lost h3{color:var(--bad)}
/* the rest of a card's items (the count is items, a card is one conversation) */
.need .need-more{margin:0 0 var(--sp-2);font-size:13px;line-height:1.5;color:var(--ink-2);
  overflow-wrap:anywhere}
.need.global .need-answer{display:block;margin:6px 0 2px}
/* the countdown toast: a draining bar under the words while Undo is still there */
.livetoast{position:relative;overflow:hidden}
.livetoast .bar{position:absolute;left:0;bottom:0;height:3px;width:100%;background:var(--amber);
  transform-origin:left;animation:drain 5s linear forwards}
@keyframes drain{to{transform:scaleX(0)}}
@keyframes slidein{from{opacity:0;transform:translateX(40px)}to{opacity:1;transform:none}}
@keyframes pop{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.08)}100%{transform:scale(1);opacity:1}}
@media(min-width:1024px){
  .approve{max-width:640px;margin:0 auto;width:100%}
}
@media(max-width:1023px){
  #view-console[data-view="approve"] .live{display:none}
}

/* ============================================================ EMPTY STATES + MOTION (v3, S13)
 * The garage mark over every empty state; `rise` on cards and rows, `slidein` for the
 * next approval, `collapse` for a card that resolved, `pop` for the all-clear ring, the
 * breathing LED, the ribs, the hold ring, the undo drain. Reduced motion stills all of it. */
.empty .art{display:flex;justify-content:center;margin:0 0 12px;color:var(--faint);opacity:.7}
.i.s96{width:96px;height:96px;stroke-width:1.2}
.empty .empty-go{margin-top:14px}
.thread-empty .empty{border:0;background:transparent}
@keyframes collapse{to{opacity:0;transform:scale(.96);max-height:0;margin:0;padding-top:0;padding-bottom:0}}
.need.done{animation:collapse var(--t) var(--ease-in) forwards;overflow:hidden;pointer-events:none}
@media(prefers-reduced-motion:reduce){
  .msg,.wo,.hand,.approve .need,.done-art,.done-art .ok-ring,.need,.thread-row{animation:none}
  .killbtn .fill,.approve .need,.switch::after,.wo-sum .i{transition:none}
  .livetoast .bar{animation:none;transform:scaleX(1)}
  .need.done{animation:none;display:none}
}

/* HV-00 (W3): "Marcus handled N" -- its own row under the needs box, quiet, green edge:
   what Marcus retired on this thread, one plain reason each, an Undo beside it. */
.handled{margin:0 var(--sp-4) var(--sp-3);padding:var(--sp-3);border:1px solid var(--ok);
  border-radius:var(--radius-s);background:var(--ok-bg)}
.thread-pane > .handled{margin-top:var(--sp-3);flex:none}
.handled-item{padding-top:var(--sp-2)}
.handled-item + .handled-item{margin-top:var(--sp-2);border-top:1px solid var(--line)}
.handled-say{margin:0 0 var(--sp-2);font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.handled .btn{min-height:var(--tap)}
/* HV-H9: Marcus's note on an item it looked at and kept; and the Controls toggle. */
.heavy-look{margin:0 0 var(--sp-2);font-size:13px;line-height:1.5;color:var(--ink-2);
  overflow-wrap:anywhere}
/* I6 (F4): the escalated item's "Marcus looked at this first" block: his masked words */
.heavy-first{margin:0 0 var(--sp-2)}
.heavy-first .heavy-look{margin-bottom:var(--sp-1)}
.heavy{margin-top:var(--sp-4)}
.heavy > .hint{margin-bottom:var(--sp-3)}
.heavy .card{margin-bottom:var(--sp-3)}
.modeswitch.two{grid-template-columns:1fr 1fr}
/* W3-04: the effective mode -- Stopped under the kill switch, and the one-line reason when
   the edge runs a hand other than as the switch was set. */
.mode-stopped{color:var(--bad)}
.pill.mode-stopped{border-color:var(--bad)}
.effective-why{margin-bottom:var(--sp-2)}

/* ================================================================ CONCEPT A, "DISPATCH BOARD"
 * The owner's pick (2026-10-21). The look comes from the tokens (light work, navy FRAME
 * SCOPE, one flat accent per company); these are the few shapes the concept changes on
 * existing classes. No colour is written here -- every value is a token. */

/* the two navy bands: the Controls head and the Needs-you label bleed to the column edge */
.ctl-head{margin:calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4)) var(--sp-3);
  padding:10px var(--sp-4);min-height:52px;background:var(--panel);color:var(--ink)}
.ctl-head .t-head{color:var(--ink)}
.deck > .sec{margin:0 calc(-1 * var(--sp-4)) 12px;padding:11px var(--sp-4);
  background:var(--panel);color:var(--ink);border-bottom:3px solid var(--accent)}
.deck > .sec .n{background:var(--accent);color:var(--on-accent)}

/* a needs-you card: white, a hairline, the company colour as a bar across the top */
.need{background:var(--surface-1);border:1px solid var(--line);box-shadow:var(--shadow-sm);
  border-radius:var(--radius)}
.need::before{left:0;right:0;top:0;bottom:auto;width:auto;height:4px;border-radius:0}

/* the open conversation in the list: the company tint and a bar on its left edge */
.thread-row{position:relative}
.thread-row.here{background:var(--accent-tint);border-color:transparent}
.thread-row.here::before{content:"";position:absolute;left:0;top:10px;bottom:10px;width:4px;
  border-radius:0 3px 3px 0;background:var(--accent)}

/* buttons: the secondary is white with an ink edge; the primary is the flat accent */
.btn{background:var(--surface-1);border-color:var(--text-2)}
.btn:hover{background:var(--surface-2)}
.btn.quiet{background:transparent;border-color:transparent}
.btn.quiet:hover{background:var(--surface-3)}

/* the top bar's Needs-you button is the solid accent; its count a navy disc */
.needsbtn{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.needsbtn .n{background:var(--fr-surface-0);color:var(--fr-text-1)}
.needsbtn.zero{background:var(--bubble);border-color:var(--line);color:var(--ink-2)}

/* the tab bar: the current tab is white with an accent notch above it */
.tabgo[aria-current="page"]{color:var(--ink);background:transparent}
.tabgo[aria-current="page"] .i{color:var(--accent)}
.tabbar .tabgo[aria-current="page"]::before{content:"";position:absolute;top:-6px;left:50%;
  transform:translateX(-50%);width:28px;height:3px;border-radius:0 0 3px 3px;background:var(--accent)}
.screens .tabgo[aria-current="page"]{background:var(--surface-2)}

/* the destructive press is an outline in the danger colour, not a red slab (concept A) */
.btn.danger{background:var(--surface-1);color:var(--danger);border-color:var(--danger)}
.btn.danger:hover{background:var(--danger-tint);filter:none}

/* the Controls band names whose controls these are; the status card wears its state's tint */
.ctl-co{color:var(--dim);font:600 var(--fs0)/1 var(--font)}
.hero{background:var(--ok-bg);border-color:var(--ok-bg)}
.hero .big-led{background:var(--ok);color:var(--on-tile)}
.hero.bad{background:var(--bad-bg);border-color:var(--bad-line)}
.hero.bad .big-led{background:var(--bad);color:var(--on-bad)}
.hero.unknown{background:var(--panel);border-color:var(--line)}

/* NEO F1 (2026-10-22, older than the redesign): on a wide screen the floating reply box
   covered the line above it; the line now floats with it. */
@media(min-width:821px){
  .thread-pane > .composer-note{position:sticky;bottom:var(--composer-h,0px);z-index:15}
}
/* a two-step confirm inside a Needs-you card takes its own full line under the buttons */
.need .acts{flex-wrap:wrap}
.need .acts .unmute-confirm{flex:1 1 100%;order:-1}

/* flat: no gradient anywhere on the board */
.mark{background:var(--accent);box-shadow:none}
.live{background:var(--bubble)}
.login-wrap{background:var(--bg)}

@media print{
  .deck > .sec,.ctl-head{margin:0;background:none}
}
