/* tokens (rd-pilot, RD4, RD5, RD43): the one shared source of Katski's look, linked FIRST on
   every page (templates/base.html and the standalone pages: login, setup, chats/open,
   chats/embed). Unlayered.

   The two token blocks below are static/crm.css's own, copied: its Light block on `:root` and
   its Dark block on `html[data-theme="dark"]` (crm.css's html[data-crm] and data-crm-chat
   blocks, lines 30-59). tests/test_rd_tokens.py holds them equal, declaration by declaration,
   until chat 1 agrees that crm.css reads this file instead (owed, RD4). A CRM page never
   carries data-theme and crm.css's own blocks (0,1,1) beat `:root`, so this file moves no CRM
   pixel.

   Then the ONE shared block (RD280): ten names on a bare `html`, Dark keyed on data-theme and
   data-crm-theme, the only rules past the copied blocks that reach a CRM page.

   Then the platform-only tokens, scoped `html:not([data-crm],[data-crm-chat])` (RD43; the
   chat frame inside a CRM page's panel is CRM ground too): radii (every radius goes through
   one, so a sharp look is one block away, RD9), the CRM's mono and focus, the attention tones,
   the scrollbar and the Dark values of the status set (the Light ones stay in katski.css's
   pinned U1 block). A page is Dark only when it says so (RD7, RD41): base.html writes
   data-theme. Every colour literal of the platform lives in this file. No em dash. */

/* General Sans, self-hosted (static/fonts/general-sans, Fontshare's ITF Free Font Licence), the
   same four files crm.css names */
@font-face { font-family: "General Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/general-sans/GeneralSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "General Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/general-sans/GeneralSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "General Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/general-sans/GeneralSans-Semibold.woff2") format("woff2"); }
@font-face { font-family: "General Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/general-sans/GeneralSans-Bold.woff2") format("woff2"); }

/* ---- Light: crm.css's Light block, copied (held equal by tests/test_rd_tokens.py) ---- */
:root{
  --font:"General Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  /* role colours: CS purple, editor blue (Paul), approver teal, admin gold */
  --cs:#7b52d6; --ed:#2f6fe0; --ap:#1b8c84; --ad:#a87d1e; --red:#d4283a;
  /* Light: also what a page shows before a mode is known */
  --canvas:#f2f2f5; --surface:#fff; --chrome:#fbfbfd; --ink:#1d1d1f; --ink-2:#6e6e73; --ink-3:#8e8e93;
  --line:#e2e2e7; --line-2:#d1d1d6; --hover:#ebebf0; --colbg:rgba(255,255,255,.55); --colline:rgba(0,0,0,.05);
  --card-base:#ffffff; --ma:7%; --mb:15%; --shine:rgba(255,255,255,.85); --grain:image-set(url("crm/grain-on-light.png") 1x,url("crm/grain-on-light-1p25x.png") 1.25x,url("crm/grain-on-light-1p5x.png") 1.5x,url("crm/grain-on-light-2x.png") 2x); --stage-ink:#000;
  --pill:rgba(255,255,255,.8); --pill-line:rgba(0,0,0,.07);
  --shadow:0 1px 2px rgba(0,0,0,.05),0 6px 18px -8px rgba(0,0,0,.12); --shadow-hi:0 2px 4px rgba(0,0,0,.06),0 12px 28px -10px rgba(0,0,0,.18);
  --pop:#fff; --pop-shadow:0 0 0 1px rgba(0,0,0,.06),0 16px 44px -10px rgba(0,0,0,.22);
  --side-bg:rgba(255,255,255,.8); --side-line:rgba(0,0,0,.08); --side-hover:rgba(0,0,0,.045); --side-on:#e6e8f2; --side-ink:#1d1d1f;
  --side-shadow:0 1px 2px rgba(0,0,0,.04),0 12px 30px -12px rgba(0,0,0,.14);
  --side-solid:#fcfcfd;   /* the menu's ground as it shows on the canvas: its pinned head and foot */
  color-scheme:light;
}
/* ---- Dark: crm.css's Dark block, copied (held equal by tests/test_rd_tokens.py) ---- */
html[data-theme="dark"]{
  --canvas:#17181c; --surface:#1d1e23; --chrome:#1a1b20; --ink:#f2f2f4; --ink-2:#a3a3ad; --ink-3:#7c7c86;
  --line:#2b2c33; --line-2:#3a3b44; --hover:#26272e; --colbg:rgba(255,255,255,.025); --colline:rgba(255,255,255,.05);
  --card-base:#202127; --ma:16%; --mb:30%; --shine:rgba(255,255,255,.07); --grain:image-set(url("crm/grain-on-dark.png") 1x,url("crm/grain-on-dark-1p25x.png") 1.25x,url("crm/grain-on-dark-1p5x.png") 1.5x,url("crm/grain-on-dark-2x.png") 2x); --stage-ink:#fff;
  --pill:rgba(255,255,255,.07); --pill-line:rgba(255,255,255,.08);
  --shadow:0 1px 0 rgba(255,255,255,.04) inset,0 8px 24px -10px rgba(0,0,0,.6); --shadow-hi:0 1px 0 rgba(255,255,255,.05) inset,0 14px 32px -10px rgba(0,0,0,.75);
  --pop:#232429; --pop-shadow:0 0 0 1px rgba(255,255,255,.07),0 18px 50px -10px rgba(0,0,0,.7);
  --side-bg:#0f1015; --side-line:rgba(255,255,255,.12); --side-hover:rgba(255,255,255,.05); --side-on:#262a3b; --side-ink:#e7e7ee;
  --side-shadow:0 12px 32px -12px rgba(0,0,0,.7);
  --side-solid:#0f1015;
  color-scheme:dark;
}

/* ---- shared (RD280): the ten names EVERY page can read, a CRM page and the chat frame inside a
   panel too (asked by the crm lane, C301): THE main button's fill and its words, good and bad on
   a number with their soft grounds, and the alarm tag (rule 41, RD276). Weak on purpose: a bare
   `html` (0,0,1) for Light, and for Dark one rule keyed on BOTH switches, a platform page's
   data-theme and a CRM page's (and the chat frame's) data-crm-theme. So crm.css's own copies
   (html[data-crm], until the crm lane deletes them) and the platform blocks below keep winning,
   with the same values, and no page moves. Only these ten: nothing outside the platform scope or
   crm.css reads them on a CRM page (--red-bg stays platform only, katski.css reads it unscoped).
   tests/test_rd_tokens.py holds the values equal to the platform blocks' and to crm.css's. ---- */
html{
  --btn-fill:linear-gradient(145deg,#2c2a87,#3b74d9); --btn-fill-ink:#fff;
  --good:#137a3e; --good-soft:#e7f4ec; --bad:#cf222e; --bad-soft:#fdecec;
  --alarm-fill:linear-gradient(180deg,rgba(255,244,245,.96),rgba(253,228,231,.96));
  --alarm-edge:linear-gradient(145deg,#f4a0a9,var(--red) 55%,#a51c31);
  --alarm-ink:#a3162a;
  --alarm-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 8px 16px -10px rgba(190,30,50,.6);
}
html[data-theme="dark"],html[data-crm-theme="dark"]{
  --good:#4fd08a; --good-soft:#1f3229; --bad:#ff6b6b; --bad-soft:#3a2526;
  --alarm-fill:linear-gradient(180deg,rgba(74,32,39,.96),rgba(54,25,31,.96));
  --alarm-edge:linear-gradient(145deg,#ff9aa6,var(--red) 55%,#7a1f2c);
  --alarm-ink:#ffb6bf;
  --alarm-shadow:inset 0 1px 0 rgba(255,255,255,.09),0 8px 16px -10px rgba(0,0,0,.85);
}

/* ---- platform only: never on a CRM page or the chat frame inside one ---- */
html:not([data-crm],[data-crm-chat]){
  /* radii (DESIGN-SYSTEM 2.7): the CRM's three plus the fixed steps it repeats */
  --rc:20px; --rcol:24px; --rpage:16px;
  --r-pill:99px;   /* pills, count badges */
  --r-tile:14px;   /* KPI tiles, media tiles, toast */
  --r-menu:14px;   /* menus and popovers */
  --r-seg:12px;    /* a segmented control's track, menu items */
  --r-ctl:10px;    /* buttons, fields */
  --r-item:9px;    /* small buttons, menu rows, a segment's pressed part */
  --r-sm:6px;      /* kbd, small badges */
  --mono:ui-monospace,"SF Mono","Cascadia Mono",Menlo,Consolas,monospace;
  --focus:var(--ed);
  /* attention tones (crm.css:1432): amber = needs someone, green = it arrived */
  --warn:#b3410f; --ok:#2f9467;
  /* scrollbar thumb at rest and on hover (crm.css:1132 names them --sb / --sb-hi; here
     --scroll, because katski.css's status classes already use --sb for their soft band) */
  --scroll:rgba(0,0,0,.16); --scroll-hi:rgba(0,0,0,.38);
  /* a pressed segment's lift (crm.css:155) */
  --seg-shadow:0 1px 2px rgba(0,0,0,.14);
  /* rd-pilot phase 2, the shell (RD10, RD44) */
  --r-side:22px;   /* the floating menu (crm.css:101, 34 px squircle) */
  /* the Katski blue gradient (DESIGN-SYSTEM 2.6: crm.css's brand mark, panel logo, send):
     one pair, the same in Light and Dark */
  --brand-a:#2c2a87; --brand-b:#3b74d9;
  --brand-grad:linear-gradient(145deg,var(--brand-a),var(--brand-b));
  --brand-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 1px 2px rgba(0,0,0,.2),0 6px 16px -6px rgba(59,116,217,.75);
  --on-fill:#fff;  /* words and marks on a filled colour (the brand mark, a badge, a lit stop) */
  /* rd-match-b (RD188, rule 30, RD220): THE main button, the one filled button of a view: the
     logo's blue, the same in Light and Dark, white words at weight 600 (4.48:1 at the light
     corner, about 7:1 under the words, mid-gradient). Never the ink. Its edge (none here), its
     hover (a touch lighter, never a grey). data-mainbtn="plain" on <html> swaps all five for the
     no-fill variant (the block after the Dark one). */
  --btn-fill:var(--brand-grad); --btn-fill-ink:var(--on-fill); --btn-fill-line:transparent;
  --btn-fill-hover:var(--btn-fill); --btn-fill-lift:brightness(1.08);
  --scrim:rgba(10,10,10,.55);   /* what darkens the page under the tour */
  /* the Katski panel's status set (crm.css:630-635, the CRM panel's Light set); Dark below */
  --panel-st-working:#2f6fe0; --panel-st-waiting:#b7791f; --panel-st-ready:#8650c8; --panel-st-done:#5b5fc7;
  --panel-st-back:#c8384f; --panel-st-limit:#5b6b80; --panel-st-idle:#8e8e93;
  --panel-st-working-soft:#e3edfd; --panel-st-waiting-soft:#fbf0dc; --panel-st-ready-soft:#f1e7fb;
  --panel-st-done-soft:#ebebf8; --panel-st-back-soft:#fbe5e8; --panel-st-limit-soft:#e9edf2; --panel-st-idle-soft:#efefef;
  /* root-level copies the panel's chat reads: inside .ag-chat, static/kpanel.css points --ink at
     --ag-ink, so --ag-ink reads this copy (computed here on <html>, inherited as its value), never
     --ink itself (crm.css:657 writes literals for the same reason) */
  --chat-ink:var(--ink);
  --chat-strip:var(--canvas);   /* the chat's status line ground (crm.css:659 Light #f2f2f5) */
  /* rd-pilot phase 3, the components (RD11, RD12; DESIGN-SYSTEM 6.2 onwards) */
  --ring:color-mix(in oklab,var(--focus) 16%,transparent);  /* a focused field's soft halo */
  --modal-shadow:0 20px 60px rgba(0,0,0,.3);   /* crm.css:532 .modal */
  --backdrop:rgba(0,0,0,.3);                   /* crm.css:533 .modal::backdrop */
  --toast-bg:#1d1d1f; --toast-ink:#fff;        /* crm.css:526: the inverted toast */
  --toast-act:rgba(255,255,255,.16);           /* its action pill */
  --toast-shadow:0 10px 30px rgba(0,0,0,.3);
  /* destructive: wine words on a soft wine ground (RD13: wine = out, never a stock red) */
  --danger:var(--st-back); --danger-soft:var(--st-back-soft);
  --danger-hi:color-mix(in oklab,var(--st-back) 16%,var(--surface));
  /* the CRM's notes (crm.css:395-396, DESIGN-SYSTEM 3.18): gate amber, gate error wine */
  --alert-warn:#c27a2c; --alert-err:#b53a55;
  --knob:#fff; --knob-shadow:0 1px 2px rgba(0,0,0,.25);   /* a switch's knob (crm.css:274) */
  /* words and badges laid over a picture (a media tile): the same in both modes */
  --media-scrim:rgba(23,23,23,.72); --media-play:rgba(23,23,23,.55);
  --st-on:var(--on-fill);       /* the words on a filled status pill (n-pill) */
  /* RD30 (Paul's rules 7-10): the ONE accent beside the base colours: the key number (spend) and
     the chosen period, one key column per table. Never a status, never a button, never admin
     gold (--ad). Light is the logo's blue (RD228, Paul 2026-11-14 "1. Blue": every copper and
     red pair read as too close to him, and a bad number is red now; was copper #ad4a20), its
     swatch and chart line --key-line the logo's own #3b74d9. Dark keeps the gold. */
  --key:#2a5bd7; --key-line:#3b74d9; --key-soft:#e9effc; --key-fill:#2a5bd7; --on-key:#fff;
  /* rd-shell (RD23): glass, for bars that float over scrolling content only (the top bar, a
     page's sticky bar, a sticky table head): a slightly blue, see-through ground blurred by
     --glass-blur, a hairline under it, a lift once content scrolls under. --glass-solid is the
     ground where backdrop-filter is missing. Words on glass keep AA over the busiest content
     that can sit under it (tests/test_rd_shell.py). */
  /* rd-match-a (RD187, RD200): the values are Performance's (static/perf.css's token block),
     the top bar IS its bar: --glass, --glass-blur, --glass-shadow, --glass-hover and
     --glass-on-shadow took its values; --glass-edge (the heavier bottom edge), --glass-hover-ring,
     --bar-ink and --bar-ink-3 (the bar's words and its quiet marks) are its tokens, new here */
  /* OL11 (Paul 2026-11-19): .74 -> .62 and blur 22 -> 18 px, the same step as topbar.css's --tb-glass */
  --glass:rgba(208,221,250,.62); --glass-solid:#dce5f8;
  --glass-line:rgba(60,90,165,.24); --glass-edge:rgba(45,75,150,.46);
  --glass-blur:blur(18px) saturate(1.8);
  --glass-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 14px 30px -16px rgba(30,60,130,.6);
  --bar-ink:#36405c; --bar-ink-3:#66708f;
  /* RD32 (rules 5, P2): the bar's own steps: the track behind a segmented switch, the chosen
     item (a clearly raised pill), and hover, a lighter step of the tint, never grey */
  /* RD31 (rule 21d): an armed delete, the CRM brief page's red, the same in both modes */
  --del-fill:#e24a4a; --del-fill-hi:#ce4343; --on-del:#fff;
  --glass-track:rgba(30,50,110,.1); --glass-on:#fff;
  --glass-on-shadow:0 1px 2px rgba(0,0,0,.12),0 0 0 1px var(--pill-line);
  --glass-hover:rgba(255,255,255,.55); --glass-hover-ring:rgba(255,255,255,.6);
  /* the quiet words on a tinted bar (--ink-2 misses AA there); a table's sticky head and total
     row keep the lighter glass, or a white table would carry two blue bands at rest */
  --glass-ink-2:#565762; --glass-head:rgba(246,248,255,.84); --glass-head-solid:#f6f7fb;
  /* good and bad on a number (RD229, Paul 2026-11-14: "we could try to use green for the good
     numbers. And red for bad."; this replaces RD80's pair, PA18's blue pays / wine burns and
     RD225's crimson): a good number is green, a bad one red, in Light and in Dark. Their soft
     grounds carry a verdict chip. Light: 5.4:1 / 5.4:1 on --surface, 4.8:1 / 4.8:1 on --canvas
     and on the soft ground; 0.27 and 0.35 OKLab from --key. katski.css's own .delta-good /
     .delta-bad (older pages) keep their pins until the one-look round. */
  --good:#137a3e; --good-soft:#e7f4ec; --bad:#cf222e; --bad-soft:#fdecec;
  /* rd-redtag (RD276-RD278, Paul 2026-11-15 "2. Gradient edge"): ONE red outside the CRM, the
     CRM's --red (the :root block above, #d4283a in Light and Dark); katski.css's older brick
     #b04a3a and its ground #f7e9e6 left. --red-bg is its soft ground in the mode's own surface.
     The alarm tag or box (an error, a refusal, something important; DESIGN-SYSTEM 6.56): a soft
     glassy red fill (--alarm-fill, on the padding box), a red gradient edge (--alarm-edge, on the
     border box under a 1 px transparent border, 1.5 px at the foot), an inset top highlight and a
     small soft lift (--alarm-shadow), deep red words (--alarm-ink, 6.4:1 and up on the fill). Never a
     filled red. Dark below. */
  --red-bg:color-mix(in oklab,var(--red) 10%,var(--surface));
  --alarm-fill:linear-gradient(180deg,rgba(255,244,245,.96),rgba(253,228,231,.96));
  --alarm-edge:linear-gradient(145deg,#f4a0a9,var(--red) 55%,#a51c31);
  --alarm-ink:#a3162a;
  --alarm-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 8px 16px -10px rgba(190,30,50,.6);
  /* the ground behind a video or a picture that does not fill its frame (a letterbox), and
     the play mark on a small poster: the same in both modes */
  --media-ground:#141518;
  /* rd-b4b2 (RD125, DESIGN-SYSTEM 6.47): the person radar on /avatars (its shape, marks and meters)
     and its one risk axis; Light = the values katski.css drew */
  --radar:#0d6e9c; --radar-soft:#dfeaf1; --radar-fill:rgba(13,110,156,.11);
  --radar-risk:#c25e2a; --radar-risk-soft:#f3ded4;
  /* rd-b4d (RD141, DESIGN-SYSTEM 6.52): the ground under a person's own page in a frame (a Sandbox
     tab): white in Light and Dark, as a browser draws a page that sets no background */
  --frame-ground:#fff;
  /* rd-b4d (RD143, DESIGN-SYSTEM 6.53): the CRM chat's own ground, head, accent and bubbles
     (crm.css:742-751, --crm-chat-*), for the full chat page (/chats/{T}), so it reads as the chat
     frame in the panel; Dark below */
  --chat-bg:#f4f5f9; --chat-head:#fbfbfd; --chat-acc:#3b74d9;
  --chat-bubble:color-mix(in oklab,var(--ed) 11%,#fff); --chat-bubble-edge:color-mix(in oklab,var(--ed) 24%,#fff);
  --chat-soft:color-mix(in oklab,var(--ed) 14%,#fff);
  /* rd-b6 (RD161): the Store columns (once /meta's, now the Published ads page's), a faint warm
     tint so they never read as Meta columns (meta-analytics AM5): words, the cell ground, its
     hover, the head band and a tag's edge; Light = the values the old /meta page's sheet drew
     (deleted in perf-dash M10b2); Dark below */
  --store:#8a5a2b; --store-soft:#fbf7f0; --store-soft-hi:#f4efe6; --store-band:#f6f0e6; --store-line:#eadfcd;
}
@supports (corner-shape:squircle){html:not([data-crm],[data-crm-chat]){--rc:34px;--rcol:40px;--rpage:28px;--r-side:34px}}
html:not([data-crm],[data-crm-chat])[data-theme="dark"]{
  --warn:#ffb070; --ok:#5cc596;
  --scroll:rgba(255,255,255,.15); --scroll-hi:rgba(255,255,255,.36);
  /* the status set in Dark (RD13: same meanings, icon + colour + word, blue = in, wine = out,
     no stock green or red). Words reach WCAG AA (4.5:1 and up) on --surface, --canvas and on
     their own soft ground; the soft grounds are 10 % of the colour on --surface. Light lives
     in katski.css's U1 block (STATUS-TOKENS.md, pinned there). */
  --st-working:#5090ff; --st-working-soft:#222939;
  --st-waiting:#ef9a4c; --st-waiting-soft:#322a27;
  --st-ready:#cda4fb;   --st-ready-soft:#2f2b39;
  --st-done:#d9dcff;    --st-done-soft:#303139;
  --st-back:#ff9eb2;    --st-back-soft:#342b31;
  --st-limit:#8ea6c6;   --st-limit-soft:#282c33;
  --st-idle:#8f8f98;    --st-idle-soft:#28292f;
  /* the Katski panel in Dark: the platform's own Dark status set above (crm.css keeps the
     panel's warm set there; read once here, so the panel and the page agree) */
  --panel-st-working:var(--st-working); --panel-st-waiting:var(--st-waiting); --panel-st-ready:var(--st-ready);
  --panel-st-done:var(--st-done); --panel-st-back:var(--st-back); --panel-st-limit:var(--st-limit);
  --panel-st-idle:var(--st-idle);
  --panel-st-working-soft:var(--st-working-soft); --panel-st-waiting-soft:var(--st-waiting-soft);
  --panel-st-ready-soft:var(--st-ready-soft); --panel-st-done-soft:var(--st-done-soft);
  --panel-st-back-soft:var(--st-back-soft); --panel-st-limit-soft:var(--st-limit-soft);
  --panel-st-idle-soft:var(--st-idle-soft);
  --chat-strip:var(--surface);  /* crm.css:665 Dark #1d1e23 */
  /* rd-pilot phase 3: the toast inverts (crm.css:527, 531); a filled status pill reads dark
     words on the Dark set's light colours */
  --toast-bg:#f2f2f4; --toast-ink:#1d1d1f; --toast-act:rgba(0,0,0,.08);
  --toast-shadow:0 10px 30px rgba(0,0,0,.6);
  --modal-shadow:0 0 0 1px rgba(255,255,255,.07),0 24px 70px rgba(0,0,0,.7);
  --backdrop:rgba(0,0,0,.55);
  --knob-shadow:0 1px 2px rgba(0,0,0,.5);
  --st-on:var(--canvas);
  /* RD30: the accent in Dark, warm gold (RD24: the key number instead of white) */
  --key:#e3b44e; --key-line:#e3b44e; --key-soft:#2e281a; --key-fill:#e3b44e; --on-key:#231b00;
  /* rd-match-a (RD200): Performance's Dark glass, its colour at .72, not its .56: at .56 --ink
     over a white picture under the bar is 2.99:1 (RD23 holds AA there; a page outside the CRM
     carries pictures under its bars, Performance does not); over the canvas the two differ by
     a few levels */
  --glass:rgba(42,50,76,.72); --glass-solid:#1c1e26;
  --glass-blur:blur(22px) saturate(1.8);  /* OL11: Dark keeps its blur; only Light's moved to 18 px */
  --glass-line:rgba(150,175,255,.13); --glass-edge:rgba(150,175,255,.30);
  --glass-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 16px 34px -14px rgba(0,0,0,.8);
  --bar-ink:var(--ink-2); --bar-ink-3:var(--ink-3);
  --glass-track:rgba(255,255,255,.06); --glass-on:rgba(255,255,255,.13);
  --glass-on-shadow:0 1px 2px rgba(0,0,0,.12),0 0 0 1px var(--pill-line);
  --glass-hover:rgba(150,175,255,.08); --glass-hover-ring:rgba(150,175,255,.06);
  --glass-ink-2:#a3a3ad; --glass-head:rgba(30,33,44,.8); --glass-head-solid:#1c1e26;
  /* good green and bad red in Dark (RD229; AA on --surface, --canvas and the soft ground; 0.17
     and 0.18 OKLab from the gold) */
  --good:#4fd08a; --good-soft:#1f3229; --bad:#ff6b6b; --bad-soft:#3a2526;
  /* rd-redtag (RD277): the alarm tag in Dark, a deep wine glass with the same red edge going
     dark at its foot and light rose words (8.3:1 and up on the fill); --red and --red-bg as in Light */
  --alarm-fill:linear-gradient(180deg,rgba(74,32,39,.96),rgba(54,25,31,.96));
  --alarm-edge:linear-gradient(145deg,#ff9aa6,var(--red) 55%,#7a1f2c);
  --alarm-ink:#ffb6bf;
  --alarm-shadow:inset 0 1px 0 rgba(255,255,255,.09),0 8px 16px -10px rgba(0,0,0,.85);
  /* rd-b4b2 (RD124, DESIGN-SYSTEM 6.46): the seven beat categories in Dark (katski.css :root holds
     the Light values): the same hues a step lighter, AA on --surface and --canvas; CTA the ink */
  --cat-hook:#f0915e; --cat-problem:#8aaee6; --cat-agitate:#f08a78; --cat-proof:#6fc3aa;
  --cat-demo:#d4bf62; --cat-offer:#c3a0e8; --cat-cta:var(--ink);
  --radar:#62b4e2; --radar-soft:#26323b; --radar-fill:rgba(98,180,226,.16);
  --radar-risk:#f0915e; --radar-risk-soft:#3b2c24;
  /* rd-b4d (RD143): the CRM chat's Dark set (crm.css:748-751) */
  --chat-bg:#202228; --chat-head:#1a1b20; --chat-acc:#4a82e6;
  --chat-bubble:color-mix(in oklab,var(--ed) 26%,#1d1e23); --chat-bubble-edge:color-mix(in oklab,var(--ed) 40%,#1d1e23);
  --chat-soft:color-mix(in oklab,var(--ed) 30%,#1d1e23);
  /* rd-b6 (RD161): /meta's Store columns in Dark (the words 8:1 on their own ground) */
  --store:#d9ab78; --store-soft:#25231f; --store-soft-hi:#2c2924; --store-band:#29261f; --store-line:#4a3f30;
}
/* rd-match-b (RD188, RD221): the second main button, kept ready and not shown: with
   data-mainbtn="plain" on <html> (nothing in a template sets it) the main button has no fill, as
   Performance's "Open profile": the surface, a --line-2 hairline, --ink words; its hover the
   shared hover ground. Light and Dark alike, through the mode's own tokens. */
html:not([data-crm],[data-crm-chat])[data-mainbtn="plain"]{
  --btn-fill:var(--surface); --btn-fill-ink:var(--ink); --btn-fill-line:var(--line-2);
  --btn-fill-hover:var(--hover); --btn-fill-lift:none;
}
