/* Katski v2 (worker-pages-v2): the design system as one stylesheet, loaded
   by templates/base.html on every page AFTER katski.css, kpanel.css and the
   page's own sheet. Spec: tasks/features/worker-pages-v2/DESIGN.md; it is the
   approved W2 prototype's proto/static/v2.css, applied page by page (W3).
   Structure taken from next-shadcn-admin-dashboard (shadcn/ui sidebar-07 +
   dashboard-01 blocks) and 21st.dev components, rebuilt in plain CSS for
   Jinja (no build chain). Every new class is `ui-*`, so nothing collides with
   the older sheets while pages move over one by one. Status colours, icons
   and the Katski panel's surface are NOT here: they are katski.css's
   ui-status-colors block (STATUS-TOKENS.md), used as they are through
   macros/status.html. The draft review page (rv-*, the stepper) is not here
   yet: it waits for Paul's second look. Sharp corners, no stock green / red,
   no em dash anywhere. */

/* ===================================================================== 0. tokens */
:root {
  --ui-font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* type scale: 16 px base (was 13.5 px), one step per role */
  --ui-fs-xs: .8125rem;   /* 13 px: timestamps, ids, counts in a pill. The floor. */
  --ui-fs-sm: .875rem;    /* 14 px: sub-lines, labels' hints, table heads */
  --ui-fs-md: .9375rem;   /* 15 px: dense lists and table cells, nav items */
  --ui-fs-base: 1rem;     /* 16 px: body, inputs, buttons in forms */
  --ui-fs-lg: 1.125rem;   /* 18 px: card titles, empty-state titles */
  --ui-fs-xl: 1.25rem;    /* 20 px: section titles */
  --ui-fs-2xl: 1.75rem;   /* 28 px: the page title */
  /* spacing: a 4 px grid */
  --ui-1: 4px; --ui-2: 8px; --ui-3: 12px; --ui-4: 16px; --ui-5: 20px; --ui-6: 24px;
  --ui-8: 32px; --ui-10: 40px; --ui-12: 48px; --ui-16: 64px;
  /* neutrals (shadcn neutral, warmed one step to sit with the sidebar) */
  --ui-fg: #0a0a0a;
  --ui-body: #262626;
  --ui-muted-fg: #636363;      /* 5.9:1 on white, 5.4:1 on the sidebar */
  --ui-faint: #8a8a8a;         /* icons and chevrons only, never text */
  --ui-border: #e5e5e3;
  --ui-line: #efefed;          /* rules between rows */
  --ui-input: #d4d4d2;
  --ui-ring: #a3a3a3;
  --ui-hover: #f7f7f5;         /* a row or a ghost button under the pointer */
  --ui-head: #fafaf9;          /* a table's head band, a plain group head */
  --ui-tile: #f1f1ef;          /* the ground of a picture that is not there */
  /* mk-f3b B8 O1 (b2.css:118 .pg2, mock.css:16 --paper): the pages' paper ground; the
     panels on it (tables, cards, the set head) stay white */
  --ui-ground: #f6f6f4;
  /* mk-f3b B8 O9 (b2.css:230 .noimg2): the No cut yet tile's diagonal hatch */
  --ui-hatch-a: #f1eee8; --ui-hatch-b: #ebe8e1;
  --ui-primary: #171717;
  --ui-primary-hover: #2e2e2e;
  --ui-primary-fg: #fafafa;
  --ui-brand: #c25e2a;         /* Katski's orange: the logo and the focus ring only */
  --ui-shadow-sm: 0 1px 2px rgb(0 0 0 / .05);
  --ui-shadow-lg: 0 12px 32px -8px rgb(0 0 0 / .18), 0 2px 6px rgb(0 0 0 / .06);
  --ui-sidebar-w: 248px;
  --ui-header-h: 56px;
  --ui-content-w: 1120px;
}

/* rd-pilot (RD5, RD8, RD43, RD46): outside the CRM every --ui-* name points at the shared
   tokens (static/tokens.css, the CRM's own), so the v2 pieces take the CRM's palette, font and
   type steps, Light and Dark, without touching a rule. The :root values above stay as they are
   (tests pin some); this block wins by weight. A CRM page and the chat frame inside its panel
   (data-crm-chat) keep the old values: this sheet loads last on every page. The type steps are
   the CRM's px (DESIGN-SYSTEM 2.8); the root stays 16 px, so rem sizes keep theirs. */
html:not([data-crm],[data-crm-chat]) {
  --ui-font: var(--font);
  --ui-fs-xs: 13px;      /* hints, crumbs, th, counts: the CRM's smallest body step */
  --ui-fs-sm: 13.5px;    /* chips, labels' hints */
  --ui-fs-md: 14px;      /* buttons, fields, table body, menu rows */
  --ui-fs-base: 15px;    /* body */
  --ui-fs-lg: 16.5px;    /* card titles */
  --ui-fs-xl: 20px;      /* section titles, dialog heads */
  --ui-fs-2xl: 26px;     /* the page title */
  --ui-fg: var(--ink);
  --ui-body: var(--ink);
  --ui-muted-fg: var(--ink-2);
  --ui-faint: var(--ink-3);
  --ui-border: var(--line);
  --ui-line: var(--line);
  --ui-input: var(--line-2);
  --ui-ring: var(--ink-3);
  --ui-hover: var(--hover);
  --ui-head: var(--chrome);
  --ui-tile: var(--hover);
  --ui-ground: var(--canvas);
  --ui-hatch-a: var(--hover); --ui-hatch-b: var(--line);
  --ui-primary: var(--ink);
  --ui-primary-hover: color-mix(in oklab, var(--ink) 86%, var(--canvas));
  --ui-primary-fg: var(--canvas);
  --ui-brand: var(--focus);    /* the focus ring: the CRM's editor blue (DESIGN-SYSTEM 2.4) */
  --ui-shadow-sm: var(--shadow);
  --ui-shadow-lg: var(--pop-shadow);
  --ui-sidebar-w: 256px;
  --ui-header-h: 58px;
}
/* the body as the CRM's (crm.css:74): General Sans 15 px on the canvas */
html.v2:not([data-crm],[data-crm-chat]) body { font-family: var(--font); font-size: 15px; line-height: 1.45;
  color: var(--ink); background: var(--canvas); }
/* the Light / Dark switch at the menu's foot (base.html, data-theme-pick): crm.css:150-156's
   segment, on tokens; phase 2 gives the whole menu the CRM look */
html:not([data-crm],[data-crm-chat]) .ui-theme { display: flex; margin: 0 0 8px; padding: 3px;
  background: var(--side-hover); border-radius: var(--r-seg); }
html:not([data-crm],[data-crm-chat]) .ui-theme button { flex: 1; display: inline-flex; align-items: center;
  justify-content: center; gap: 6px; padding: 6px 8px; border: 0; border-radius: var(--r-item); background: none;
  font: inherit; font-size: 13px; line-height: 1.45; font-weight: 500; color: var(--ink-2); cursor: pointer; }
html:not([data-crm],[data-crm-chat]) .ui-theme button:hover { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-theme button[aria-pressed="true"] { background: var(--surface); color: var(--ink);
  box-shadow: var(--seg-shadow); }
html:not([data-crm],[data-crm-chat]) .ui-theme .ui-i { width: 15px; height: 15px; stroke-width: 2.25;
  stroke-linecap: butt; stroke-linejoin: miter; }
html:not([data-crm],[data-crm-chat]) .ui-theme-note { margin: -2px 4px 8px; font-size: 12.5px; line-height: 1.4;
  color: var(--ink-2); }
@media (min-width: 768px) {
  html:not([data-crm],[data-crm-chat])[data-menu="folded"] .ui-theme { flex-direction: column; gap: 2px; }
  html:not([data-crm],[data-crm-chat])[data-menu="folded"] .ui-theme button { padding: 6px 0; }
  html:not([data-crm],[data-crm-chat])[data-menu="folded"] .ui-theme button > span,
  html:not([data-crm],[data-crm-chat])[data-menu="folded"] .ui-theme-note { display: none; }
}

/* the root on every page: 16 px (was 13.5 px), Geist, the white page */
html.v2, html.v2 body { font-size: 16px; font-family: var(--ui-font); color: var(--ui-fg); background: var(--ui-ground);
  -webkit-font-smoothing: antialiased; }
html.v2 [hidden] { display: none !important; }
html.v2 :focus-visible { outline: 2px solid var(--ui-brand); outline-offset: 2px; }
/* the element resets, only where v2 has arrived: the sidebar, the header, the
   Katski panel and a moved page's content (base.html `content_base` =
   ui-content). A page not moved yet sits in `.content` and keeps its own
   links, margins and line height. */
html.v2 :is(.ui-sidebar, .ui-header, .ui-content, .kp) { line-height: 1.5; }
html.v2 :is(.ui-sidebar, .ui-header, .ui-content, .kp) a { color: inherit; text-decoration: none; }
html.v2 :is(.ui-sidebar, .ui-header, .ui-content, .kp) a:hover { color: inherit; text-decoration: none; }
html.v2 :is(.ui-sidebar, .ui-header, .ui-content, .kp) :is(h1, h2, h3, h4) { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
html.v2 :is(.ui-sidebar, .ui-header, .ui-content, .kp) p { margin: 0; }
.ui-i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.ui-i-sm { width: 16px; height: 16px; }
.ui-i-lg { width: 22px; height: 22px; }
.ui-muted { color: var(--ui-muted-fg); }
.ui-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ui-sp { flex: 1; }
.ui-dot { color: var(--ui-faint); padding: 0 .35em; }

/* ===================================================================== 1. app shell
   AppSidebar | SidebarInset (SiteHeader + page) | the Katski panel (aside#kp) */
.ui-shell { display: flex; height: 100vh; overflow: hidden; }
.ui-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--ui-ground); }
.ui-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; }
.ui-content { max-width: var(--ui-content-w); margin: 0 auto; padding: 32px 32px 96px; }
.ui-content.ui-wide { max-width: none; }

/* ---- release E part 1, E9: ONE scroll model on every shell page (base.html's
   body.ui-shelled). The document never scrolls: html and body fill the screen
   and hide their overflow, the shell is the screen's height (dvh, so a phone's
   address bar never makes it taller than what shows). The shell, the content
   pane and the main column are positioned, so an absolutely placed element
   inside them (a hidden file input, a screen-reader label like .pk-sr) is
   held by them and never stretches the document past the shell into white
   (Paul's Ready to publish at 1920 wide). Only the content pane (.ui-scroll),
   the menu's own list and the Katski panel's own parts scroll. */
html:has(> body.ui-shelled), body.ui-shelled { height: 100%; overflow: hidden; }
body.ui-shelled .ui-shell { position: relative; height: 100vh; height: 100dvh; }
body.ui-shelled .ui-main { position: relative; min-height: 0; }
body.ui-shelled .ui-scroll { position: relative; min-height: 0; }

/* ---- sidebar (shadcn Sidebar: groups, icon + label items, NavUser foot) */
.ui-sidebar { width: var(--ui-sidebar-w); flex: none; display: flex; flex-direction: column; overflow-y: auto;
  background: var(--zone-side); border-right: 1px solid var(--zone-side-border); padding: 12px; }
.ui-brand { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px; margin-bottom: 8px;
  font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--ui-fg); }
.ui-brand-mark { width: 28px; height: 28px; display: grid; place-items: center; background: var(--ui-brand);
  color: #fff; font-size: 15px; font-weight: 700; }
.ui-nav-label { font-size: var(--ui-fs-xs); font-weight: 500; color: var(--ui-muted-fg); padding: 16px 12px 6px; }
.ui-nav-item { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px;
  font-size: var(--ui-fs-md); color: var(--ui-body); transition: background .12s; }
.ui-nav-item .ui-i { color: #525252; }
.ui-nav-item:hover { background: #ebebe6; }
.ui-nav-item.active { background: #e4e4df; color: var(--ui-fg); font-weight: 600; box-shadow: inset 3px 0 0 var(--ui-fg); }
.ui-nav-item.active .ui-i { color: var(--ui-fg); }
.ui-nav-item .n-pill { margin-left: auto; }
.ui-nav-w { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the tails kept from the old menu: the Agent count, the REF tag, a parked
   page's "Coming soon" (katski.css .nav-soon, sharp and muted) */
.ui-nav-item .nav-badge { margin-left: auto; border-radius: 0; font-family: var(--ui-font); font-size: var(--ui-fs-xs); }
.ui-nav-item .nav-ref-tag { margin-left: auto; font-family: var(--ui-font); font-size: 12px; color: var(--ui-muted-fg); }
/* a parked page: the label on top, its small "Coming soon" badge under it, so
   no label is cut short in the 248 px sidebar */
.ui-nav-item:has(.nav-soon) { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; column-gap: 12px;
  row-gap: 2px; align-items: center; height: auto; min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.ui-nav-item:has(.nav-soon) > .ui-i { grid-row: 1 / span 2; }
.ui-nav-item:has(.nav-soon) > .ui-nav-w { grid-column: 2; grid-row: 1; }
.ui-nav-item:has(.nav-soon) > .nav-badge, .ui-nav-item:has(.nav-soon) > .nav-ref-tag { grid-column: 3; grid-row: 1; margin-left: 0; }
.ui-nav-item .nav-soon { grid-column: 2; grid-row: 2; justify-self: start; margin-left: 0; font-size: 11px; font-weight: 500;
  line-height: 1.4; padding: 0 5px; }
.ui-nav-item .ui-nav-n { margin-left: auto; font-size: var(--ui-fs-xs); color: var(--ui-muted-fg); }
.ui-nav-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--zone-side-border); }
.ui-user { display: flex; align-items: center; gap: 10px; padding: 8px; color: var(--ui-fg); }
.ui-user:hover { background: #ebebe6; }
.ui-user-name { display: block; font-size: var(--ui-fs-md); font-weight: 500; line-height: 1.3; }
.ui-user-role { display: block; font-size: var(--ui-fs-xs); color: var(--ui-muted-fg); }
.ui-user .ui-i { margin-left: auto; color: var(--ui-faint); }
.ui-av { width: 32px; height: 32px; flex: none; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 13px; font-weight: 600; color: #fff; background: var(--c, #3a3a3a); }
.ui-av.sm { width: 24px; height: 24px; font-size: 11px; }
/* platform-tags (C210-C213, Paul 11-09): a person's chip that shows their 4-letter tag
   (users.crm_tag, app/person_mark.py) is the same coloured chip grown into a pill: the
   chip's height, as wide as the tag, caps in the page font, letter-spaced. The initials
   fallback keeps its circle. One block for every person chip: .av (ui.avatar), .ui-av (the
   menu's user mark, the review page's read-only line), .ag-av (a Katski message's head).
   Width and radius are !important on purpose: a page sizes its circle in its own scope
   (.tm-v2 #team-people .av, .st-v2 .st-me .av, .kw .kw-whois .av) and a tag must stay as
   wide as its letters there too; the height and the letter size stay the page's. */
:is(.av, .ui-av, .ag-av).av-tag, .kp .ag-chat .ag-av.av-tag { min-width: 0;
  padding: 0 .5em 0 .56em; font-family: var(--ui-font); font-weight: 700;
  letter-spacing: .06em; line-height: 1; white-space: nowrap;
  width: auto !important; border-radius: 999px !important; }
.av-14.av-tag { height: 14px; font-size: 7.5px; }
.av-16.av-tag { font-size: 8.5px; }
.av-18.av-tag { font-size: 9px; }
.av-22.av-tag { font-size: 10px; }
.av-26.av-tag { font-size: 10.5px; }
.av-28.av-tag { font-size: 11px; }
.av-34.av-tag { font-size: 12.5px; }
.ui-av.av-tag { font-size: 12px; }
.ui-av.sm.av-tag { font-size: 10px; }
.ag-av.av-tag, .kp .ag-chat .ag-av.av-tag { font-size: 9px; }
/* the review page's read-only line is a .ui-alert, whose first track is the 20 px icon's:
   its chip (a 24 px circle, or a tag's pill) takes the room it needs */
.ui-alert.rv-readonly { grid-template-columns: auto minmax(0, 1fr); }
/* a pill is wider than the circle was: on the Team table a name ("Hassan", "Paul you")
   keeps its line, so the content-laid table gives the Person column the room */
.tm-v2 #team-people .ta-pn { white-space: nowrap; }

/* ---- header (shadcn SiteHeader: the trail on the left, the bar's few controls on the right) */
.ui-header { height: var(--ui-header-h); flex: none; display: flex; align-items: center; gap: 12px; padding: 0 24px;
  border-bottom: 1px solid var(--ui-border); background: #fff; }
.ui-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--ui-fs-md); color: var(--ui-muted-fg); }
.ui-crumbs > a { flex: none; white-space: nowrap; }
.ui-crumbs a:hover { color: var(--ui-fg); text-decoration: underline; text-underline-offset: 3px; }
.ui-crumbs b { color: var(--ui-fg); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-crumbs .ui-i { width: 14px; height: 14px; color: var(--ui-faint); }
.ui-header .ui-sync { font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); white-space: nowrap; }
.ui-header .ui-sync .st-chip { font-size: var(--ui-fs-sm); }
.ui-header .ui-menu-btn { display: none; }
/* the older header pieces that stay in the bar (an admin's MCP and Claude
   pills, the team ring, the panel toggle); how they give way to the trail:
   "mockup fix B15" at the end of this sheet */
.ui-header .pill { height: 34px; border-radius: 0; font-size: var(--ui-fs-sm); white-space: nowrap; }
.ui-header .pill .dot { flex: none; }
.ui-header .kp-toggle { height: 36px; font-size: var(--ui-fs-md); }
/* a sync that stopped: the wine state, its words (Sync failed / stalled: which source) */
.ui-header .ui-sync-alarm { font-size: var(--ui-fs-sm); white-space: nowrap; }

/* ===================================================================== 2. page head */
.ui-page-head { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 32px; }
.ui-page-head h1 { font-size: var(--ui-fs-2xl); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.ui-titlerow { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.ui-lead { margin-top: 8px; font-size: var(--ui-fs-base); color: var(--ui-muted-fg); max-width: 680px; }
.ui-meta { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; font-size: var(--ui-fs-md);
  color: var(--ui-muted-fg); }
.ui-meta a:hover { color: var(--ui-fg); text-decoration: underline; text-underline-offset: 3px; }
.ui-page-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ===================================================================== 3. sections
   Three kinds, told apart by colour and space, never by another box:
   - a section: 3 px ink rule on top, a 20 px heading, 48 px above it;
   - a state group: katski.css .band-head (its soft tint + the state colour's rule);
   - a plain group inside a list: .ui-group (head band in --ui-head). */
.ui-section { margin-top: 48px; }
.ui-section:first-child { margin-top: 0; }
.ui-section-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; border-top: 3px solid var(--ui-fg);
  padding-top: 14px; margin-bottom: 16px; }
.ui-section-head h2 { font-size: var(--ui-fs-xl); font-weight: 600; }
.ui-section-head .ui-count { font-size: var(--ui-fs-md); color: var(--ui-muted-fg); font-variant-numeric: tabular-nums; }
.ui-section-head .ui-sub { flex-basis: 100%; font-size: var(--ui-fs-md); color: var(--ui-muted-fg); }
.ui-section-head .ui-page-actions { margin-left: auto; }

/* ===================================================================== 4. buttons (shadcn Button) */
.ui-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  font: 500 var(--ui-fs-md)/1 var(--ui-font); border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  text-decoration: none; transition: background .12s, border-color .12s, color .12s; border-radius: 0; }
.ui-btn-primary, html.v2 a.ui-btn-primary { background: var(--ui-primary); color: var(--ui-primary-fg); }
.ui-btn-primary:hover, html.v2 a.ui-btn-primary:hover { background: var(--ui-primary-hover); color: var(--ui-primary-fg); }
.ui-btn-outline { background: #fff; border-color: var(--ui-input); color: var(--ui-fg); box-shadow: var(--ui-shadow-sm); }
.ui-btn-outline:hover { background: var(--ui-hover); border-color: var(--ui-ring); }
.ui-btn-ghost { background: transparent; color: var(--ui-fg); }
/* mk-f3-sf (B8 O1): --ui-hover is invisible on the paper ground (delta E 0.35); b2's hover for
   a quiet button with no border, mock.css:86 (.icon-btn under the pointer: --lit-bg, mock.css:19) */
.ui-btn-ghost:hover { background: var(--ui-lit, #f9efe7); color: var(--ui-fg); }
.ui-btn-wine { background: #fff; border-color: #dcb7bd; color: var(--st-back); }
.ui-btn-wine:hover { background: var(--st-back-soft); }
.ui-btn-lg { height: 48px; padding: 0 22px; font-size: var(--ui-fs-base); }
.ui-btn-sm { height: 34px; padding: 0 12px; font-size: var(--ui-fs-sm); }
.ui-btn-icon { width: 40px; padding: 0; }
.ui-btn-sm.ui-btn-icon { width: 34px; }
.ui-btn[disabled] { opacity: .45; pointer-events: none; }
.ui-link { color: var(--ui-fg); text-decoration: underline; text-decoration-color: #c4c4c4; text-underline-offset: 3px;
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.ui-link:hover { text-decoration-color: var(--ui-fg); }
.ui-inline { display: inline; margin: 0; }

/* ===================================================================== 5. cards */
.ui-card { background: #fff; border: 1px solid var(--ui-border); }
.ui-card-body { padding: 24px; }
.ui-card-head { padding: 20px 24px 0; }
.ui-card-head h3 { font-size: var(--ui-fs-lg); font-weight: 600; }

/* the start cards (dashboard-01 SectionCards anatomy): one choice each, one button each */
.ui-start { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ui-start-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px;
  background: #fff; border: 1px solid var(--ui-border); }
.ui-start-card.is-primary { border: 2px solid var(--ui-fg); padding: 23px; }
.ui-start-ico { width: 44px; height: 44px; display: grid; place-items: center; background: var(--zone-side);
  color: var(--ui-fg); margin-bottom: 8px; }
.ui-start-card h2 { font-size: var(--ui-fs-xl); font-weight: 600; }
.ui-start-card p { font-size: var(--ui-fs-base); color: var(--ui-muted-fg); flex: 1; margin-bottom: 12px; }
.ui-start-more { margin-top: 14px; font-size: var(--ui-fs-md); color: var(--ui-muted-fg); }
.ui-start-more .ui-link { font-weight: 500; }

/* ===================================================================== 6. table (dashboard-01 DataTable) */
.ui-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
.ui-table-wrap { background: #fff; border: 1px solid var(--ui-border); overflow-x: auto; }
table.ui-table { width: 100%; border-collapse: collapse; font-size: var(--ui-fs-md); }
.ui-table th { text-align: left; font-weight: 500; font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); background: var(--ui-head);
  height: 44px; padding: 0 16px; border-bottom: 1px solid var(--ui-border); white-space: nowrap; }
.ui-table td { padding: 14px 16px; border-bottom: 1px solid var(--ui-line); vertical-align: middle; }
.ui-table tbody tr:last-child td { border-bottom: 0; }
.ui-table tbody tr { cursor: pointer; }
.ui-table tbody tr:hover td { background: var(--ui-hover); }
.ui-table .num { text-align: right; font-variant-numeric: tabular-nums; font-size: var(--ui-fs-md); }
/* rd-b4b2 (RD127): a number column's header keeps the other headers' size (only cells take 14 px) */
.ui-table th.num { font-size: var(--ui-fs-sm); }
.ui-table .ui-when { color: var(--ui-muted-fg); white-space: nowrap; }
.ui-cell-title { font-size: var(--ui-fs-base); font-weight: 500; color: var(--ui-fg); }
tr:hover .ui-cell-title, .ui-row:hover .ui-row-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #b5b5b5; }
.ui-cell-sub { margin-top: 2px; font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); }
.ui-type { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

/* view tabs over a list (Ads Manager's tab row; shadcn Tabs, line variant) */
.ui-utabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ui-border); margin-bottom: 16px; overflow-x: auto; }
.ui-utab { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; font-size: var(--ui-fs-md);
  font-weight: 500; color: var(--ui-muted-fg); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ui-utab:hover { color: var(--ui-fg); }
.ui-utab.on { color: var(--ui-fg); border-bottom-color: var(--ui-fg); }
.ui-utab .ui-n { font-size: var(--ui-fs-xs); color: var(--ui-muted-fg); font-variant-numeric: tabular-nums; }
/* a small toggle (shadcn ToggleGroup / segmented Tabs) */
.ui-seg { display: inline-flex; padding: 3px; background: #efefec; }
.ui-seg button, .ui-seg a { border: 0; background: transparent; height: 32px; padding: 0 12px; font: 500 var(--ui-fs-sm) var(--ui-font);
  color: #525252; cursor: pointer; display: inline-flex; align-items: center; }
.ui-seg .on { background: #fff; color: var(--ui-fg); box-shadow: var(--ui-shadow-sm); }

/* a dropdown made of <details> (shadcn DropdownMenu), links only, no script */
.ui-menu { position: relative; }
.ui-menu > summary { list-style: none; cursor: pointer; }
.ui-menu > summary::-webkit-details-marker { display: none; }
.ui-menu > summary .ui-chev { color: var(--ui-faint); width: 16px; height: 16px; }
.ui-menu[open] > summary { background: var(--ui-hover); }
.ui-menu-list { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; min-width: 240px; max-height: 60vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--ui-border); box-shadow: var(--ui-shadow-lg); padding: 4px; }
.ui-menu-list.right { left: auto; right: 0; }
.ui-menu-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: var(--ui-fs-md); color: var(--ui-body); }
.ui-menu-list a:hover { background: var(--ui-hover); color: var(--ui-fg); }
.ui-menu-list a.on { font-weight: 600; color: var(--ui-fg); }
.ui-menu-list a .ui-n { margin-left: auto; font-size: var(--ui-fs-xs); color: var(--ui-muted-fg); font-variant-numeric: tabular-nums; }
.ui-menu-list .ui-menu-label { font-size: var(--ui-fs-xs); color: var(--ui-muted-fg); padding: 10px 10px 4px; }
.ui-menu-list hr { border: 0; border-top: 1px solid var(--ui-line); margin: 4px 0; }

/* ===================================================================== 7. list rows
   One row per thing: picture, title + one sub-line, its state, a chevron.
   No columns of tags. Groups inside a list: .band-head (a state) or .ui-group. */
.ui-list { background: #fff; border: 1px solid var(--ui-border); }
.ui-list .band-head { border-bottom: 1px solid var(--ui-line); }
.ui-list .band-head h3 { font-size: var(--ui-fs-lg); }
.ui-list .band-head .n-pill { margin-left: 2px; }
.ui-group { display: flex; align-items: center; gap: 10px; padding: 11px 16px 11px 20px; background: var(--ui-head);
  border-bottom: 1px solid var(--ui-line); font-size: var(--ui-fs-lg); font-weight: 600; }
.ui-group .ui-count { font-size: var(--ui-fs-md); font-weight: 400; color: var(--ui-muted-fg); }
.ui-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 18px; align-items: center; gap: 16px;
  padding: 12px 16px 12px 20px; border-bottom: 1px solid var(--ui-line); color: inherit; }
.ui-row:last-child { border-bottom: 0; }
.ui-row:hover { background: var(--ui-hover); }
.ui-row-title { font-size: var(--ui-fs-base); font-weight: 500; color: var(--ui-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-row-sub { margin-top: 2px; font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; display: flex; align-items: center; gap: 0; }
.ui-row-sub .tico { margin-right: 6px; }
.ui-row-state { text-align: right; font-size: var(--ui-fs-md); }
.ui-row-state .st-chip { font-size: var(--ui-fs-md); }
.ui-row-state .ui-when { font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); white-space: nowrap; }
.ui-row-state .st-stage { display: block; font-size: var(--ui-fs-sm); margin-top: 2px; max-width: 260px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.ui-row-chev { color: var(--ui-faint); }
/* a draft's picture: the cut's frame, else the type's colour with the title's letter */
.ui-thumb { width: 44px; height: 56px; position: relative; overflow: hidden; display: grid; place-items: center;
  background: var(--ui-tile); color: #fff; font-weight: 700; font-size: 18px; }
.ui-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--ui-tile); }
.ui-thumb.is-type { background: var(--tc, #5d5d5d); }
.ui-list-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--ui-border);
  font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); }

/* ===================================================================== 8. empty state (shadcn Empty) */
.ui-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 48px 24px;
  background: #fff; border: 1px dashed var(--ui-input); }
.ui-list .ui-empty, .ui-table-wrap .ui-empty { border: 0; }
.ui-empty-ico { width: 48px; height: 48px; display: grid; place-items: center; background: var(--zone-side); color: var(--ui-fg);
  margin-bottom: 10px; }
.ui-empty h3 { font-size: var(--ui-fs-lg); font-weight: 600; }
.ui-empty p { color: var(--ui-muted-fg); max-width: 440px; }
.ui-empty-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; justify-content: center; }

/* ===================================================================== 9. forms (shadcn Field) */
.ui-field { display: grid; gap: 6px; }
.ui-field + .ui-field { margin-top: 16px; }
.ui-label { font-size: var(--ui-fs-md); font-weight: 500; color: var(--ui-body); }
.ui-label .ui-hint { font-weight: 400; color: var(--ui-muted-fg); margin-left: 6px; }
.ui-desc { font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); }
.ui-input, .ui-textarea, .ui-select { width: 100%; font: 400 var(--ui-fs-base)/1.5 var(--ui-font); color: var(--ui-fg); background: #fff;
  border: 1px solid var(--ui-input); border-radius: 0; padding: 9px 12px; box-shadow: var(--ui-shadow-sm); }
.ui-input, .ui-select { height: 44px; }
.ui-textarea { min-height: 88px; resize: vertical; }
.ui-input:focus, .ui-textarea:focus, .ui-select:focus { outline: none; border-color: var(--ui-ring); box-shadow: 0 0 0 3px rgb(163 163 163 / .35); }
.ui-input::placeholder, .ui-textarea::placeholder { color: #8f8f8f; }
.ui-error { display: flex; gap: 8px; align-items: flex-start; color: var(--st-back); font-size: var(--ui-fs-sm); }
/* radio cards */
.ui-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ui-choice { position: relative; display: block; padding: 14px 16px 14px 46px; background: #fff; border: 1px solid var(--ui-input); cursor: pointer; }
.ui-choice:hover { border-color: var(--ui-ring); }
.ui-choice input { position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; accent-color: var(--ui-primary); }
.ui-choice b { display: block; font-size: var(--ui-fs-base); font-weight: 500; }
.ui-choice span { display: block; font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); }
.ui-choice:has(input:checked) { border-color: var(--ui-fg); box-shadow: inset 0 0 0 1px var(--ui-fg); }

/* an alert in a state (the st-alert of katski.css, at v2 sizes) */
.ui-alert { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 16px 18px;
  background: var(--sb); border-left: 4px solid var(--sc); }
.ui-alert > .sico { width: 20px; height: 20px; margin-top: 2px; }
.ui-alert b { color: var(--ui-fg); font-weight: 600; }
.ui-alert .ui-quote { margin-top: 8px; padding-left: 12px; border-left: 3px solid var(--sc); color: var(--ui-fg); font-size: var(--ui-fs-base); }
.ui-alert .ui-desc { margin-top: 8px; }
.ui-alert .ui-alert-act { align-self: center; }
/* a few lines in one state (warnings, Renar's habits): icon + words in the state colour */
.ui-lines { display: grid; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; font-size: var(--ui-fs-md); }
.ui-lines .st-line { color: var(--sc); }

/* ===================================================================== 11. media tiles (Meta's media library grid) */
.ui-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 16px; }
.ui-tile { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ui-border);
  color: inherit; transition: border-color .12s, box-shadow .12s; }
.ui-tile:hover { border-color: var(--ui-ring); box-shadow: var(--ui-shadow-lg); }
.ui-tile.selected { border-color: var(--ui-fg); box-shadow: inset 0 0 0 1px var(--ui-fg); }
.ui-tile-media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; display: grid; place-items: center;
  background: var(--ui-tile); color: var(--ui-faint); }
.ui-tile-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ui-tile-media .ui-ph { display: grid; justify-items: center; gap: 6px; padding: 12px; font-size: var(--ui-fs-xs); text-align: center; }
.ui-tile-media .ui-ph .tico { width: 28px; height: 28px; opacity: .55; }
.ui-tile-type { position: absolute; left: 8px; top: 8px; z-index: 1; font-size: 12px; font-weight: 500; color: #fff;
  background: rgb(23 23 23 / .72); padding: 2px 8px; }
.ui-tile-new { position: absolute; left: 8px; top: 34px; z-index: 1; font-size: 12px; font-weight: 600; color: var(--ui-fg);
  background: #fff; padding: 1px 7px; }
.ui-tile-dur { position: absolute; right: 8px; bottom: 8px; z-index: 1; font-size: 12px; font-weight: 500; color: #fff;
  background: rgb(23 23 23 / .72); padding: 1px 7px; font-variant-numeric: tabular-nums; }
.ui-tile-play { position: absolute; z-index: 1; width: 40px; height: 40px; border-radius: 50%; background: rgb(23 23 23 / .55);
  display: grid; place-items: center; }
.ui-tile-play svg { width: 16px; height: 16px; fill: #fff; margin-left: 2px; }
.ui-tile-body { padding: 10px 12px 12px; }
.ui-tile-title { font-size: var(--ui-fs-md); font-weight: 500; color: var(--ui-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-tile-sub { margin-top: 2px; font-size: var(--ui-fs-xs); color: var(--ui-muted-fg); }
.ui-tile-star { position: absolute; right: 8px; top: 8px; z-index: 2; margin: 0; }
.ui-tile-star button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: rgb(255 255 255 / .92);
  color: var(--ui-fg); cursor: pointer; opacity: 0; transition: opacity .12s; }
.ui-tile-star button.on { opacity: 1; }
.ui-tile-star button.on svg { fill: currentColor; }
.ui-tile-wrap:hover .ui-tile-star button, .ui-tile-star button:focus-visible { opacity: 1; }
.ui-tile-wrap { position: relative; }
.ui-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.ui-filters .ui-btn { height: 36px; font-size: var(--ui-fs-sm); }
.ui-filters .ui-btn.on { border-color: var(--ui-fg); box-shadow: inset 0 0 0 1px var(--ui-fg); }
.ui-filters .ui-btn .ui-n { color: var(--ui-muted-fg); font-weight: 400; font-variant-numeric: tabular-nums; }
.ui-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 20px; font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); }
.ui-picked a.ui-btn { height: 30px; }

/* ===================================================================== 12. Meta feed preview (what Ads Manager shows beside an ad) */
.ui-feed { width: 264px; flex: none; align-self: flex-start; background: #fff; border: 1px solid var(--ui-border); font-size: var(--ui-fs-sm); }
.ui-feed-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.ui-feed-av { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--ui-brand);
  color: #fff; font-weight: 700; font-size: 13px; }
.ui-feed-name { font-weight: 600; font-size: var(--ui-fs-sm); line-height: 1.2; }
.ui-feed-sp { font-size: 12px; color: var(--ui-muted-fg); }
.ui-feed-text { margin: 0 12px 10px; color: var(--ui-fg); line-height: 1.45; max-height: calc(1.45em * 3); overflow: hidden;
  white-space: pre-line; }
.ui-feed-media { position: relative; background: #111; aspect-ratio: 9 / 16; display: grid; place-items: center; color: #bdbdbd; overflow: hidden; }
.ui-feed-media.s { aspect-ratio: 4 / 5; background: var(--ui-tile); color: var(--ui-faint); }
.ui-feed-media video, .ui-feed-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ui-feed-foot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #f2f2f0; }
.ui-feed-foot b { display: block; font-size: var(--ui-fs-sm); font-weight: 600; line-height: 1.3; }
.ui-feed-foot span { display: block; font-size: 12px; color: var(--ui-muted-fg); }
.ui-feed-cta { margin-left: auto; flex: none; font-size: 13px; font-weight: 600; padding: 7px 12px; background: #e2e2df; color: var(--ui-fg); }

/* an ad inside an ad set: fields on the left, the feed preview on the right (Ads Manager's ad editor) */
.ui-ad { display: flex; gap: 24px; padding: 24px; background: #fff; border: 1px solid var(--ui-border); }
.ui-ad + .ui-ad { margin-top: 16px; }
.ui-ad-body { flex: 1; min-width: 0; }
.ui-ad-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.ui-ad-title { font-size: var(--ui-fs-lg); font-weight: 600; }
.ui-ad-title:hover { text-decoration: underline; text-underline-offset: 3px; }

/* sticky action bar at the foot of a work page */
.ui-actionbar { position: sticky; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 32px -32px -96px; padding: 14px 32px; background: rgb(255 255 255 / .96); border-top: 1px solid var(--ui-border);
  backdrop-filter: blur(6px); }
.ui-actionbar .ui-barname { font-weight: 500; }

/* dialog (shadcn Dialog) */
dialog.ui-dialog { border: 1px solid var(--ui-border); border-radius: 0; padding: 0; width: min(540px, calc(100vw - 32px));
  box-shadow: 0 20px 50px rgb(0 0 0 / .2); color: var(--ui-fg); }
dialog.ui-dialog::backdrop { background: rgb(0 0 0 / .45); }
.ui-dialog-head { padding: 22px 24px 0; }
.ui-dialog-head h3 { font-size: var(--ui-fs-lg); font-weight: 600; }
.ui-dialog-head p { color: var(--ui-muted-fg); margin-top: 6px; }
.ui-dialog-body { padding: 18px 24px; }
.ui-dialog-foot { padding: 0 24px 22px; display: flex; justify-content: flex-end; gap: 10px; }

/* ---- Make an ad (W3 phase 2): pieces the prototype drew inline */
.ui-row-main { min-width: 0; }
.ui-row-main > span { display: block; }
.ui-row-main > .ui-row-sub { display: flex; }
.ui-group h3 { font-size: var(--ui-fs-lg); font-weight: 600; margin: 0; }
.ui-swatch { width: 10px; height: 10px; flex: none; background: var(--tc, #5d5d5d); }
/* a button among a dropdown's links (Edit, About the ad types) */
.ui-menu-list .ui-menu-btn, .ui-menu-list form { display: block; width: 100%; margin: 0; }
.ui-menu-list .ui-menu-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0;
  background: none; text-align: left; font: 400 var(--ui-fs-md) var(--ui-font); color: var(--ui-body); cursor: pointer; }
.ui-menu-list .ui-menu-btn:hover { background: var(--ui-hover); color: var(--ui-fg); }
.ui-menu-list .ui-menu-wine { color: var(--st-back); }
.ui-menu-list .ui-menu-wine:hover { background: var(--st-back-soft); color: var(--st-back); }
.ui-section-head .ui-menu-list { min-width: 260px; }
/* the Ideas list: the add form, one idea a row, its edit form under it */
.ui-idea-form { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; cursor: default; }
.ui-idea-form:hover { background: transparent; }
.ui-idea-form textarea.ui-input { height: 44px; min-height: 44px; resize: none; overflow: hidden; line-height: 24px; }
.ui-row-note { display: flex; align-items: center; gap: 12px; cursor: default; font-size: var(--ui-fs-md); }
.ui-row-note:hover { background: transparent; }
.ui-idea { grid-template-columns: 20px minmax(0, 1fr) auto; cursor: default; }
.ui-idea .ui-row-state { display: flex; align-items: center; gap: 6px; }
.ui-row-main > .ui-idea-note { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ui-idea-sub { white-space: normal; flex-wrap: wrap; }
.ui-idea.removed .ui-idea-note, .ui-idea.made .ui-idea-note { color: var(--ui-body); font-weight: 400; }
.ui-idea-more > summary { color: var(--ui-muted-fg); }
.ui-idea-edit { grid-column: 2 / -1; display: grid; gap: 12px; padding: 4px 0 6px; }
.ui-idea-edit[hidden] { display: none; }
.ui-idea-edit .ui-field + .ui-field { margin-top: 0; }
.ui-idea-editfoot { display: flex; gap: 8px; }
/* the ideas keep their hooks (mk-count, mk-imade): read here in the v2 look */
.ui-seg .mk-count { font: inherit; color: inherit; margin-left: .3em; }
.ui-idea-sub .mk-imade a { color: var(--ui-fg); text-decoration: underline; text-decoration-color: #c4c4c4; text-underline-offset: 3px; }
.ui-idea-sub .mk-imade a:hover { text-decoration-color: var(--ui-fg); }

/* ===================================================================== 13. the Katski panel (shadcn Sheet; its look tokens are
   kpanel.css + STATUS-TOKENS.md). v2 only sets sizes and the composer: the
   21st.dev AI prompt box, the words box and its buttons in ONE white box. */
html.v2 .kp { font-size: 15px; }
html.v2 .kp .kp-head { height: var(--ui-header-h); }
html.v2 .kp .kp-t { font-size: 17px; }
html.v2 .kp .kp-logo { background: var(--ui-brand); }
html.v2 .kp .kp-citem { padding: 9px 10px; }
html.v2 .kp .ag-chat[data-drawer] { font-size: 15px; line-height: 1.55; }
html.v2 .kp .ag-msg { font-size: 15px; }
html.v2 .kp .ag-reply { padding: 12px 16px 16px; }
html.v2 .kp .ag-box { background: #fff; border: 1px solid var(--k-border); border-bottom: 0; box-shadow: none; }
html.v2 .kp .ag-msgbox { font-size: 15px; border: 0 !important; box-shadow: none !important; background: transparent; min-height: 76px; }
html.v2 .kp .ag-rfoot { background: #fff; border: 1px solid var(--k-border); border-top: 0; padding: 6px 8px 8px; gap: 6px; }
html.v2 .kp .ag-typenote { font-size: 12px; color: var(--k-ink-muted); }
html.v2 .kp .ag-rfoot .rv-btn { height: 34px; border-radius: 0; font-size: 14px; }
html.v2 .kp .ag-rfoot .rv-primary { height: 34px; border-radius: 0; background: var(--ui-primary); color: #fff; font-size: 14px; padding: 0 14px; }

/* ===================================================================== 14. bridge: older page parts inside a v2 page
   W3 deletes each block below as its page's parts are rebuilt in ui-*.
   For now they only move the old parts onto the v2 scale and palette. */
/* Katski's name in the conversation (the panel, the review page): a word, not a boxed mono tag */
html.v2 .kp .ag-chip, html.v2 .rv .ag-chip { font: 600 14px var(--ui-font); letter-spacing: 0; text-transform: none; color: var(--ui-fg);
  background: none; border: 0; padding: 0; }

/* ===================================================================== 14b. the draft review page (W3 phase 3)
   The approved redo (Paul 2026-10-19): the live page restyled on review.css's
   markup, the cut in a top row, the beats one by one at full width. */
/* the draft review page (review.css), Paul 2026-10-19: the live page's layout
   and flow, restyled. The head; the steps as a tab row; then on the Ad stage
   the cut in a TOP ROW (the player; beside it the version's column: the
   switcher, voice and music, the notes, To weigh, the References), then
   every beat one by one at full width with its pieces inside. An imported
   cut takes the same flow. Built for a full-screen 1920 x 1080 desktop, the
   Katski panel open or closed. */
html.v2 .rv { font-size: var(--ui-fs-md); }
html.v2 .rv-v2 { padding-top: 24px; max-width: 1680px; }
html.v2 .rv-surface, html.v2 .rv-box { border-radius: 0; }
html.v2 .rv-ad.rv-boxed { background: transparent; padding: 0; }
html.v2 .rv-box { background: #fff; border: 1px solid var(--ui-border); }
html.v2 .rv-btn { border-radius: 0; height: 36px; font-size: var(--ui-fs-sm); }
html.v2 .rv-btn-sm { height: 32px; }
html.v2 .rv-primary { border-radius: 0; background: var(--ui-primary); color: #fff; }
html.v2 .rv-link { color: var(--ui-fg); text-decoration: underline; text-decoration-color: #c4c4c4; text-underline-offset: 3px; }
html.v2 .rv-field, html.v2 .rv textarea, html.v2 .rv select { border-radius: 0; font-size: var(--ui-fs-md); }
html.v2 .rv-v2 .ag-frame { display: block; }
html.v2 .rv-v2 .rv-mono, html.v2 .rv-v2 .rv-cid { font-family: var(--ui-font); letter-spacing: 0; }
html.v2 .rv-v2 .rv-micro, html.v2 .rv-v2 .rv-pl { font: 500 var(--ui-fs-xs) var(--ui-font); letter-spacing: 0; text-transform: none;
  color: var(--ui-muted-fg); }
html.v2 .rv-v2 .rv-mark { font: 500 12px var(--ui-font); letter-spacing: 0; padding: 1px 7px; border-color: var(--ui-border); color: var(--ui-body); }
html.v2 .rv-v2 .rv-mark-acc { border-color: #c4c4c4; color: var(--ui-fg); }
/* ---- head */
html.v2 .rv-head-v2 { margin-bottom: 20px; }
html.v2 .rv-head-v2 .rv-hmain { flex: 1; min-width: 0; }
html.v2 .rv-head-v2 .rv-title { font-size: var(--ui-fs-2xl); font-weight: 600; letter-spacing: -0.02em; margin: 0; flex: 0 1 auto; min-width: 0; }
html.v2 .rv-head-v2 .rv-tbtn { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: text;
  display: inline-flex; align-items: center; gap: 10px; text-align: left; max-width: none; width: auto; }
html.v2 .rv-head-v2 .rv-tbtn .tx { max-width: none; white-space: normal; overflow: visible; text-overflow: clip; }
/* rd-reds2 (RD266): the read-only title (another person's draft, no rename button) wraps like the
   renamable one; review.css's nowrap made it run past a 390 px pane in the look's 26 px type */
html.v2 .rv-head-v2 .rv-title > .tx { white-space: normal; }
html.v2 .rv-head-v2 .rv-tbtn .pen { color: var(--ui-faint); opacity: 0; transition: opacity .12s; }
html.v2 .rv-head-v2 .rv-tbtn:hover .pen, html.v2 .rv-head-v2 .rv-tbtn:focus-visible .pen { opacity: 1; }
html.v2 .rv-head-v2 .as-typewrap { position: relative; display: inline-flex; align-items: center; gap: 2px; }
html.v2 .rv-head-v2 .as-caret { height: 26px; width: 26px; color: var(--ui-muted-fg); }
html.v2 .rv-head-v2 .rv-for { color: var(--ui-muted-fg); }
html.v2 .rv-head-v2 .rv-headface { color: var(--ui-fg); }
html.v2 .rv-head-v2 .rv-headsaid { flex-basis: 100%; }
html.v2 .rv-head-v2 .rv-headsaid:empty { display: none; }
/* ---- the steps: the Ad sets page's tab row, each tab its number */
/* ---- the Ad stage's top row: the cut, the version's column beside it */
html.v2 .rv-v2 .rv-adgrid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; }
html.v2 .rv-v2 .rv-adgrid .rv-player { position: static; background: #fff; border: 1px solid var(--ui-border); padding: 16px; }
html.v2 .rv-v2 .rv-adgrid .rv-screen { width: 270px; }
html.v2 .rv-v2 .rv-adgrid .rv-player button { white-space: nowrap; }
html.v2 .rv-v2 .rv-adgrid .rv-adside { padding: 0; min-width: 0; }
html.v2 .rv-v2 .rv-adgrid .rv-box-set, html.v2 .rv-v2 .rv-adgrid .as-impside { padding: 20px 24px; gap: 16px; background: #fff; border: 1px solid var(--ui-border); }
html.v2 .rv-v2 .rv-adgrid .rv-vrow { padding-bottom: 12px; border-bottom: 1px solid var(--ui-line); }
html.v2 .rv-v2 .rv-adgrid .rv-vtab { font-size: var(--ui-fs-md); padding: 8px 12px; }
html.v2 .rv-v2 .rv-adgrid .rv-vtab, html.v2 .rv-v2 .rv-adgrid .rv-vtab * { font-family: var(--ui-font) !important; letter-spacing: 0; }
html.v2 .rv-v2 .rv-adgrid .rv-vtab .st-chip { font-size: var(--ui-fs-sm); }
html.v2 .rv-v2 .rv-adgrid .rv-vtab .rv-fin { text-transform: lowercase; }
html.v2 .rv-v2 .rv-adgrid .rv-sline, html.v2 .rv-v2 .rv-adgrid .rv-sound { font-size: var(--ui-fs-md); }
html.v2 .rv-v2 .rv-adgrid .rv-sline .k { color: var(--ui-muted-fg); }
html.v2 .rv-v2 .rv-adgrid label, html.v2 .rv-v2 .rv-adgrid .rv-k { font-size: var(--ui-fs-md); }
html.v2 .rv-v2 .rv-adgrid textarea { max-width: 880px; }
html.v2 .rv-v2 .rv-adgrid select { max-width: 300px; }
html.v2 .as-origin { border-left: 3px solid #c4c4c4; padding: 2px 0 2px 14px; }
html.v2 .as-origin .l1 { font-size: var(--ui-fs-base); font-weight: 600; color: var(--ui-fg); }
html.v2 .as-origin .l2, html.v2 .as-scriptline { font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); }
html.v2 .as-scriptline a { color: var(--ui-fg); text-decoration: underline; text-decoration-color: #c4c4c4; text-underline-offset: 3px; }
html.v2 .as-quiet { gap: 8px; padding-top: 16px; border-top-color: var(--ui-line); }
html.v2 .as-q { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--ui-input);
  background: #fff; font: 500 var(--ui-fs-sm) var(--ui-font); color: var(--ui-fg); cursor: pointer; }
html.v2 .as-q:hover { background: var(--ui-hover); }
/* ---- the beats, one by one, at full width (a made ad: four columns) */
html.v2 .rv-ad .rv-rows { margin-top: 40px; border-top: 3px solid var(--ui-fg); }
html.v2 .rv-rhead { padding: 16px 0 0; min-width: 0; }
html.v2 .rv-rtools { margin: 0 0 14px; gap: 10px; }
html.v2 .rv-rtitle { font-size: var(--ui-fs-xl); font-weight: 600; letter-spacing: -0.01em; margin-right: 0; }
html.v2 .rv-count { font: 400 var(--ui-fs-md) var(--ui-font); color: var(--ui-muted-fg); }
html.v2 .rv-rhead .rv-said { margin-left: 0; }
html.v2 .rv-rcols, html.v2 .rv-row { column-gap: 20px;
  grid-template-columns: 48px minmax(220px, 1.1fr) minmax(280px, 1.6fr) minmax(140px, .75fr) minmax(200px, 1fr); }
html.v2 .rv-nocap .rv-rcols, html.v2 .rv-nocap .rv-row { grid-template-columns: 48px minmax(220px, 1.1fr) minmax(280px, 1.6fr) minmax(240px, 1.2fr); }
html.v2 .rv-rcols { background: var(--ui-head); border: 1px solid var(--ui-border); padding: 10px 0; }
html.v2 .rv-rcols > div { font: 500 var(--ui-fs-sm) var(--ui-font); letter-spacing: 0; text-transform: none; color: var(--ui-muted-fg); }
html.v2 .rv-hbeat { padding-left: 16px; }
html.v2 .rv-syncall .rv-link { font: 500 var(--ui-fs-sm) var(--ui-font); }
html.v2 .rv-row { min-width: 0; border: 1px solid var(--ui-border); border-top: 0; padding: 0 16px 0 0;
  background-image: linear-gradient(90deg, var(--ui-head) 0, var(--ui-head) 48px, transparent 48px); }
html.v2 .rv-rows > .rv-row + .rv-row { border-top: 2px solid #d9d9d6; }
html.v2 .rv-row:hover { background-color: var(--ui-hover); box-shadow: inset 3px 0 0 #c4c4c4; }
html.v2 .rv-row.rv-now { box-shadow: inset 3px 0 0 var(--ui-fg); }
html.v2 .rv-row.rv-now .rv-bno { background: var(--ui-fg); color: #fff; border-color: var(--ui-fg); }
html.v2 .rv-c-line, html.v2 .rv-c-pieces, html.v2 .rv-c-cap, html.v2 .rv-c-fb { padding: 16px 0; }
html.v2 .rv-bhead { padding-top: 16px; gap: 8px; }
html.v2 .rv-bno { width: 28px; height: 28px; border: 1.5px solid #c4c4c4; font: 600 var(--ui-fs-sm) var(--ui-font); color: var(--ui-fg); background: #fff; }
html.v2 .rv-bplay { width: 28px; height: 28px; border-color: var(--ui-input); background: #fff; }
html.v2 .rv-bplay.on { background: var(--ui-fg); border-color: var(--ui-fg); }
html.v2 .rv-tag { font: 600 12px var(--ui-font); letter-spacing: .04em; color: var(--ui-body); padding: 0; border: 0; background: none; gap: 6px; }
html.v2 .rv-tag i { width: 8px; height: 8px; }
html.v2 .rv-btop { margin-bottom: 8px; }
html.v2 .rv-fv { font-size: var(--ui-fs-md); line-height: 1.5; color: var(--ui-fg); }
html.v2 .rv-c-line > .rv-fld .rv-fv { font-size: var(--ui-fs-base); font-weight: 500; }
html.v2 .rv-c-pic { margin-top: 10px; }
html.v2 .rv-c-pic .rv-fv, html.v2 .rv-prompts .rv-fv { font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); }
html.v2 .rv-prompts summary { font-size: var(--ui-fs-sm); font-weight: 500; color: var(--ui-fg); text-decoration: underline;
  text-decoration-color: #c4c4c4; text-underline-offset: 3px; cursor: pointer; margin-top: 6px; }
html.v2 .rv-c-voice { font-size: var(--ui-fs-sm); margin-top: 12px; }
html.v2 .rv-c-cap .rv-fv { font-size: var(--ui-fs-sm); font-weight: 500; color: var(--ui-body); }
html.v2 .rv-c-fb { font-size: var(--ui-fs-sm); color: var(--ui-body); line-height: 1.5; }
html.v2 .rv-c-fb .rv-field, html.v2 .rv-c-pieces .rv-field { height: 40px; }
/* a beat's pieces, each its own row inside the beat */
html.v2 .rv-c-pieces { padding-top: 8px; }
html.v2 .rv-piece { grid-template-columns: 64px minmax(0, 1fr); column-gap: 14px; padding: 12px 0; }
html.v2 .rv-piece + .rv-piece { border-top-color: var(--ui-line); }
html.v2 .rv-thumbbtn { width: 64px; }
html.v2 .rv-thumbbtn .rv-thumb, html.v2 .rv-thumb { width: 64px; height: 114px; }
/* a picture that is not on this server: a quiet tile, never broken-image words */
html.v2 .rv-thumb { background: var(--ui-tile); border-color: var(--ui-border); color: transparent; font-size: 0; }
html.v2 .rv-pkind { font-size: var(--ui-fs-md); font-weight: 600; color: var(--ui-fg); }
html.v2 .rv-pid { font-size: var(--ui-fs-xs); color: var(--ui-muted-fg); }
html.v2 .rv-pwhat { font-size: var(--ui-fs-sm); color: var(--ui-body); margin-top: 4px; }
html.v2 .rv-pcost, html.v2 .rv-pmade, html.v2 .rv-pfrom { font-size: var(--ui-fs-xs); color: var(--ui-muted-fg); }
html.v2 .rv-other { border: 1px solid var(--ui-border); border-top: 2px solid #d9d9d6; padding: 16px; }
/* ---- an imported cut's beats: frame, words, timing, feedback, one beat a row */
html.v2 .as-rows { margin-top: 40px; border-top: 3px solid var(--ui-fg); }
html.v2 .as-rhead { padding: 16px 0 0; border: 0; }
html.v2 .as-rhead .rv-rtools { margin-bottom: 14px; }
html.v2 .as-rcols { background: var(--ui-head); border: 1px solid var(--ui-border); padding: 10px 16px; }
html.v2 .as-rcols > div { font: 500 var(--ui-fs-sm) var(--ui-font); letter-spacing: 0; text-transform: none; color: var(--ui-muted-fg); }
html.v2 .as-rcols, html.v2 .as-row { column-gap: 24px; grid-template-columns: 40px 90px minmax(0, 1.6fr) 150px minmax(260px, 1fr); }
html.v2 .rv-row.as-row { border: 1px solid var(--ui-border); border-top: 0; padding: 16px; background-image: none; }
html.v2 .rv-row.as-row:last-of-type { border-bottom: 1px solid var(--ui-border); }
html.v2 .as-frame, html.v2 .as-frame img { width: 90px; height: 160px; }
html.v2 .as-frame { background: var(--ui-tile); }
html.v2 .as-say { font-size: var(--ui-fs-base); line-height: 1.55; color: var(--ui-fg); }
html.v2 .as-show { font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); margin-top: 8px; }
html.v2 .as-show .k { font: 600 12px var(--ui-font); letter-spacing: .04em; color: var(--ui-muted-fg); }
html.v2 .as-tm .rv-mono { font: 500 var(--ui-fs-sm) var(--ui-font); font-variant-numeric: tabular-nums; color: var(--ui-fg); }
html.v2 .as-len { font-size: var(--ui-fs-xs); color: var(--ui-muted-fg); margin-left: 38px; }
html.v2 .as-bid { font: 500 12px var(--ui-font); color: var(--ui-muted-fg); }
html.v2 .rv-mini { width: 30px; height: 30px; border-radius: 0; }
html.v2 .as-fbcell .rv-field { height: 40px; width: 100%; }
/* ---- the version's column: To weigh, then the References at its foot */
html.v2 .rv-v2 .rv-weigh { border-top-color: var(--ui-line); padding-top: 14px; }
html.v2 .rv-weighlist { gap: 10px; }
html.v2 .rv-weighnote { font-size: var(--ui-fs-sm); line-height: 1.5; color: var(--ui-body); border-left: 3px solid #d4d4d2; padding: 2px 0 2px 12px; }
html.v2 .rv-weighk { font-weight: 600; color: var(--ui-fg); }
html.v2 .rv-weighwhy { color: var(--ui-muted-fg); margin-top: 4px; }
html.v2 .rv-v2 .rv-adrefs { background: #fff; border: 1px solid var(--ui-border); padding: 18px 24px 20px; }
html.v2 .rv-v2 .rv-adrefs .rv-refs { margin-top: 0; }
html.v2 .rv-v2 .rv-adrefs .rv-refs-head { gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
html.v2 .rv-v2 .rv-adrefs .rv-refs-head .t { font-size: var(--ui-fs-lg); font-weight: 600; color: var(--ui-fg); }
html.v2 .rv-v2 .rv-adrefs .rv-refs-head .n { font: 400 var(--ui-fs-md) var(--ui-font); color: var(--ui-muted-fg); }
html.v2 .rv-v2 .rv-adrefs .rv-reflist { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 10px; margin-top: 12px; }
html.v2 .rv-v2 .rv-adrefs .rv-ref { background: #fff; border: 1px solid var(--ui-border); margin: 0; }
html.v2 .rv-v2 .rv-adside { gap: 16px; }
html.v2 .rv-v2 .as-impside .rv-adrefs { border: 0; border-top: 1px solid var(--ui-line); padding: 16px 0 0; }
/* Paul 2026-10-19: a beat's why (and the reason Katski kept a piece) sits
   behind a small Why button above the note; a click opens it in place */
html.v2 .rv-whybtn[aria-expanded="true"] { background: var(--ui-hover); color: var(--ui-fg); }
html.v2 .rv-whys .rv-whybtn { margin-bottom: 8px; }
html.v2 .rv-whytext[hidden], html.v2 .rv-weighwhy[hidden], html.v2 .rv-planwhy .why[hidden] { display: none; }
html.v2 .rv-weighd { display: block; margin-top: 4px; }
html.v2 .rv-weighd > .rv-weighwhy { margin-top: 6px; }
html.v2 .rv-planwhy { margin-top: 4px; }
html.v2 .rv-planwhy > .why { margin-top: 6px; }

/* ===================================================================== 15. smaller screens */
@media (max-width: 1280px) {
  .ui-content { padding: 28px 24px 96px; }
  .ui-actionbar { margin: 28px -24px -96px; padding: 12px 24px; }
}
@media (max-width: 1100px) {
  .ui-ad { flex-direction: column; }
  .ui-feed { width: 100%; max-width: 320px; }
}
@media (max-width: 767px) {
  html.v2 .ui-sidebar { position: fixed; z-index: 70; left: 0; top: 0; bottom: 0; width: 288px; display: none; box-shadow: var(--ui-shadow-lg); }
  html.ui-nav-open .ui-sidebar { display: flex; }
  html.ui-nav-open .ui-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgb(0 0 0 / .35); }
  .ui-header .ui-menu-btn { display: inline-flex; margin-left: -8px; }
  .ui-header { padding: 0 16px; gap: 8px; }
  .ui-header .ui-sync, .ui-header .pill, .ui-header .kp-toggle { display: none; }
  /* the page's own name only (its trail: "mockup fix B15" at the end of this sheet) */
  .ui-crumbs > a, .ui-crumbs > .ui-i { display: none; }
  .ui-content { padding: 20px 16px 96px; }
  .ui-page-head { margin-bottom: 24px; }
  .ui-page-head h1 { font-size: 24px; }
  .ui-page-actions { margin-left: 0; width: 100%; }
  .ui-section { margin-top: 36px; }
  .ui-start { grid-template-columns: 1fr; }
  .ui-start-card { padding: 20px; }
  .ui-start-card.is-primary { padding: 19px; }
  .ui-row { grid-template-columns: 40px minmax(0, 1fr) 16px; gap: 12px; padding: 12px; }
  .ui-row .ui-thumb { width: 40px; height: 52px; }
  .ui-row-state { grid-column: 2; grid-row: 2; text-align: left; margin-top: -6px; }
  .ui-row-state .st-stage { max-width: none; }
  .ui-row-chev { grid-column: 3; grid-row: 1 / span 2; }
  .ui-table.ui-stack thead { display: none; }
  .ui-table.ui-stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px;
    border-bottom: 1px solid var(--ui-line); }
  .ui-table.ui-stack td { display: block; padding: 0; border: 0; }
  .ui-table.ui-stack td.ui-hide-sm { display: none; }
  .ui-table.ui-stack td.ui-st { grid-column: 1 / -1; }
  .ui-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ui-ad { padding: 16px; }
  .ui-actionbar { margin: 24px -16px -96px; padding: 12px 16px; }
  .ui-actionbar .ui-barname, .ui-actionbar .ui-desc { display: none; }
  .ui-actionbar .ui-btn { flex: 1; }
  .ui-filters { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; }
  .ui-filters .ui-menu-list { position: fixed; left: 16px; right: 16px; top: auto; }
  .ui-alert { grid-template-columns: 20px minmax(0, 1fr); }
  .ui-alert .ui-alert-act { grid-column: 2; justify-self: start; margin-top: 8px; }
  html.v2 body:has(.ui-actionbar) .kp-fab { bottom: 84px; }
  .ui-idea-form { grid-template-columns: 1fr; }
  .ui-idea-form .ui-btn { justify-self: start; }
  .ui-idea { grid-template-columns: 20px minmax(0, 1fr); }
  .ui-idea .ui-row-state { grid-column: 2; grid-row: 2; }
  .ui-idea-edit { grid-column: 1 / -1; }
  /* the review page: one column, the player first, each beat stacked */
  html.v2 .rv-v2 { padding-top: 20px; }
  html.v2 .rv-v2 .rv-adgrid { grid-template-columns: minmax(0, 1fr); }
  html.v2 .rv-v2 .rv-adgrid .rv-player { justify-self: center; }
  html.v2 .rv-v2 .rv-adgrid .rv-screen { width: min(300px, calc(100vw - 64px)); }
  html.v2 .rv-v2 .rv-adgrid .rv-box-set, html.v2 .rv-v2 .rv-adgrid .as-impside { padding: 16px; }
  html.v2 .rv-hacts { margin-left: 0; }
  html.v2 .rv-rcols, html.v2 .as-rcols { display: none; }
  html.v2 .rv-row, html.v2 .rv-nocap .rv-row { grid-template-columns: 40px minmax(0, 1fr); padding-right: 12px;
    background-image: linear-gradient(90deg, var(--ui-head) 0, var(--ui-head) 40px, transparent 40px); }
  html.v2 .rv-row > .rv-c-line, html.v2 .rv-row > .rv-c-pieces, html.v2 .rv-row > .rv-c-cap, html.v2 .rv-row > .rv-c-fb { grid-column: 2; }
  html.v2 .rv-row > .rv-c-pieces, html.v2 .rv-row > .rv-c-cap, html.v2 .rv-row > .rv-c-fb { padding-top: 0; }
  html.v2 .as-row { grid-template-columns: 72px minmax(0, 1fr); column-gap: 14px; padding: 12px; }
  html.v2 .as-frame, html.v2 .as-frame img { width: 72px; height: 128px; }
  html.v2 .rv-v2 .rv-adrefs .rv-reflist { grid-template-columns: minmax(0, 1fr); }
  html.v2 .rv-v2 .rv-adrefs { padding: 16px; }
  html.v2 .rv-v2 .rv-sel { max-width: 100%; flex-wrap: wrap; }
  html.v2 .rv-v2 .rv-sel .rv-select { max-width: 100%; min-width: 0; }
}
.ui-scrim { display: none; }

/* ===================================================================== 16. pages moved in phases 6 to 9
   W3 phases 6 to 9: Published ads, the Swipe file, Ad frameworks, Avatars,
   My account, My workspace, a chat and the admin pages. Each page keeps its
   markup hooks (ids, data-*, the classes its script and its tests read);
   these rules put those parts on the v2 scale, type and palette, and the
   page's template uses the ui-* parts above where the system has them. A
   number or a tile is marked by an edge or an outline under the pointer;
   only a row takes the neutral ground (lessons 2026-09-05, 2026-09-18).
   No em dash. */

/* ---- the explainer dialog (phase 6; the old Published ads list it came with was deleted in
   perf-dash M10, RD282; the Event log's dialog and the Published ads page's cards still use it) */
html.v2 .ex-dialog { width: 720px; font-family: var(--ui-font); border-color: var(--ui-border); box-shadow: 0 20px 50px rgb(0 0 0 / .2); }
html.v2 .ex-dialog::backdrop { background: rgb(0 0 0 / .45); }
html.v2 .ex-head { padding: 18px 24px; border-bottom-color: var(--ui-border); }
html.v2 .ex-top h3 { font-size: var(--ui-fs-lg); font-weight: 600; }
html.v2 .ex-x { width: 32px; height: 32px; font-size: 22px; color: var(--ui-muted-fg); }
html.v2 .ex-x:hover { color: var(--ui-fg); border-color: var(--ui-input); }
html.v2 .ex-x:focus-visible, html.v2 .ex-got:focus-visible { outline-color: var(--ui-brand); }
html.v2 .ex-chip { padding: 2px 8px; font: 600 var(--ui-fs-xs) var(--ui-font); letter-spacing: .02em; }
html.v2 .ex-when { font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); }
html.v2 .ex-who { color: var(--ui-body); }
html.v2 .ex-result { font: 600 30px/1 var(--ui-font); font-variant-numeric: tabular-nums; }
html.v2 .ex-lead { margin: 18px 24px 0; font-size: var(--ui-fs-base); line-height: 1.55; }
html.v2 .ex-block { margin: 14px 24px 0; border-color: var(--ui-border); }
html.v2 .ex-bh { padding: 8px 14px; font: 600 var(--ui-fs-xs) var(--ui-font); letter-spacing: .03em; }
html.v2 .ex-row { padding: 8px 14px; font-size: var(--ui-fs-md); border-top-color: var(--ui-line); }
html.v2 .ex-row b { font: 600 var(--ui-fs-md) var(--ui-font); font-variant-numeric: tabular-nums; }
html.v2 .ex-row.eq { background: var(--ui-head); border-top-color: var(--ui-border); }
html.v2 .ex-row.eq b { font-size: var(--ui-fs-base); }
html.v2 .ex-verdict, html.v2 .ex-why, html.v2 .ex-rule p { font-size: var(--ui-fs-md); line-height: 1.55; }
html.v2 .ex-verdict { padding: 10px 14px 12px; border-top-color: var(--ui-line); }
html.v2 .ex-why { padding: 10px 14px 12px; }
html.v2 .ex-rule { grid-template-columns: 150px minmax(0, 1fr); padding: 10px 14px; border-top-color: var(--ui-line); }
html.v2 .ex-rule h4 { font: 600 var(--ui-fs-xs)/1.5 var(--ui-font); letter-spacing: .02em; text-transform: none; color: var(--ui-muted-fg); }
html.v2 .ex-actions { padding: 18px 24px 0; }
html.v2 .ex-got { height: 40px; padding: 0 18px; font: 500 var(--ui-fs-md)/1 var(--ui-font); color: var(--ui-primary-fg);
  background: var(--ui-primary); border: 0; }
html.v2 .ex-got:hover { background: var(--ui-primary-hover); box-shadow: none; }

/* ---- the Swipe file (phase 7): moved to the rd-b4b block (the library page, DESIGN-SYSTEM 6.44) */

/* ---- Ad frameworks (phase 7): moved to the rd-b4b2 block (DESIGN-SYSTEM 6.45) */

/* ---- Avatars (phase 7): moved to the rd-b4b2 block (DESIGN-SYSTEM 6.47) */
/* ===================================================================== end of 16 */
/* ==== W3 phase 4 start: Ad sets, one ad set, Ready to publish (templates/packages/)
   The approved W2 prototype's bridges (proto v2.css section 14, "the Ad sets
   page"): the fields packages.css draws (static/packages.js reads their
   names and data-*), at the v2 type. Then what the live pages add: the start
   card in the panel, Ready to publish's queue, glance and settings. */
html.v2 .pk-input, html.v2 .pk-textarea, html.v2 .pk-select { border-radius: 0; font-size: var(--ui-fs-base); }
html.v2 .pk-label { font-size: var(--ui-fs-md); font-weight: 500; }
html.v2 .pk-link { color: var(--ui-fg); text-decoration: underline; text-decoration-color: #c4c4c4; text-underline-offset: 3px; }
html.v2 .pk-field { display: grid; gap: 6px; }
html.v2 .pk-copy .pk-field + .pk-field { margin-top: 12px; }
html.v2 .pk-texts + .pk-texts { margin-top: 12px; }
html.v2 .pk-addrow { margin-top: 10px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: var(--ui-fs-sm); }
html.v2 .pk-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
html.v2 .pk-hint { color: var(--ui-muted-fg); font-size: var(--ui-fs-sm); }
html.v2 .pk-v2 .pk-textarea { max-height: 232px; overflow-y: auto; }
/* a long primary text's fold (release-b-followups F7) still opens to most of the screen */
html.v2 .pk-v2 .pk-fold textarea { max-height: 70vh; }
html.v2 .pk-v2 .pk-copy { margin-top: 4px; }
html.v2 .pk-grid2 > .pk-field + .pk-field { margin-top: 0; }
/* a v2 select keeps the field's chevron (ui-select's white ground would drop it) */
html.v2 .ui-select.pk-select { appearance: none; padding-right: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }

/* ---- the list: the refusal above the tabs */
.pk-said-alert { margin-bottom: 20px; }

/* ---- one ad set */
html.v2 .pk-v2 .pk-othernote { margin-top: 16px; max-width: 640px; }
html.v2 .pk-v2 .pk-othernote[hidden] { display: none; }
html.v2 .pk-v2 .pk-pagef { margin-top: 12px; }
html.v2 .pk-v2 .pk-review { margin: 0 0 16px; }
form.ui-alert-act { margin: 0; }
/* the panel's card when the set has no chat yet (or its batch's chat) */
html.v2 .kp .ui-empty.pk-chatempty { display: flex; border: 0; background: transparent; padding: 32px 20px; color: var(--ui-body); }
html.v2 .kp .pk-chatempty .pk-chatico { background: #fff; font-weight: 700; }
html.v2 .kp .pk-chatempty .pk-makerchat { margin-top: 12px; font-size: var(--ui-fs-sm); }
html.v2 .kp .pk-chatempty .ui-link { text-decoration: underline; text-decoration-color: #c4c4c4; text-underline-offset: 3px; }

/* the open set: a v2 section, its ads as the feed shows them, the settings beside */

html.v2 .pk-v2 .pk-warn { color: var(--st-back); font-size: var(--ui-fs-sm); }
/* an ad's name on Meta and every id: Geist in grey, never a mono tag (DESIGN.md section 2) */

html.v2 .pk-v2 .pk-adname { font-family: var(--ui-font); font-size: var(--ui-fs-xs); color: var(--ui-muted-fg);
  background: var(--ui-head); border-top-color: var(--ui-line); }
/* planning's ruling 6: Link and URL tags on a 1920 screen with no scroll inside the rail */

html.v2 .pk-v2 :is(.pk-namebox, .pk-asked, .pk-fixed) { background: var(--ui-head); border-color: var(--ui-border); font-size: var(--ui-fs-sm); }

/* the dialogs: v2's dialog, the Add ads picks as radio cards with a box */
html.v2 .pk-dialog .pk-pick { display: block; padding: 12px 16px 12px 46px; }
html.v2 .pk-dialog .pk-pick span { color: var(--ui-muted-fg); }
html.v2 .pk-dialog .pk-said { margin-right: auto; align-self: center; }
@media (max-width: 767px) {
  html.v2 .pk-grid2 { grid-template-columns: 1fr; }
}
/* ==== W3 phase 4 end */
/* ==== W3 phase 8 start: My account, My workspace, a chat page
   My account (templates/account.html, team-access's ta-* hooks): You and
   Change password are two v2 sections side by side, the role and the admins
   as label + words (no mono caps), the username grey Geist text, the "What a
   worker opens" dialog on the v2 type. My workspace keeps its own sheet
   (static/workspace.css, on the v2 tokens). A chat page (templates/chats/
   page.html): the page head and, while the panel is folded, the one filled
   button that opens it. No em dash. */
.ta-v2 #ta-account { max-width: none; }
.ta-v2 .ta-acct { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: start; }
/* a .ta-card is a v2 section: the 3 px ink rule on top, the 20 px title, no box */
.ta-v2 .ta-card { margin-top: 48px; padding: 14px 0 0; background: none; border: 0; border-top: 3px solid var(--ui-fg); box-shadow: none; }
.ta-v2 .ta-acct > .ta-card { margin-top: 0; }
.ta-v2 .ta-card .ta-card-t { margin: 0 0 16px; font-size: var(--ui-fs-xl); font-weight: 600; line-height: 1.25; color: var(--ui-fg); }
.ta-v2 .ta-me { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; }
.ta-v2 .ta-pn { font-size: var(--ui-fs-lg); font-weight: 600; color: var(--ui-fg); }
.ta-v2 .ta-pu { font: 400 var(--ui-fs-sm) var(--ui-font); color: var(--ui-muted-fg); margin-top: 0; }
.ta-v2 .ta-kv { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 0; align-items: stretch; font-size: var(--ui-fs-base);
  color: var(--ui-body); border-top: 1px solid var(--ui-line); }
.ta-v2 .ta-kv > span { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; min-height: 48px; padding: 8px 0; border-bottom: 1px solid var(--ui-line); }
.ta-v2 .ta-kv .k { font: 500 var(--ui-fs-md) var(--ui-font); letter-spacing: 0; color: var(--ui-muted-fg); }
.ta-v2 .ta-role { font-size: var(--ui-fs-base); }
.ta-v2 .ta-role.worker { color: var(--ui-body); }
.ta-v2 .ta-kvlink { margin-left: 0; font-size: var(--ui-fs-md); }
.ta-v2 .ta-card form { margin: 0; max-width: 520px; }
/* the v2 field on team-access's ta-field: label above, 44 px input, 16 px text */
.ta-v2 .ta-field { display: grid; gap: 6px; margin: 0 0 16px; }
.ta-v2 .ta-field label { margin: 0; font-size: var(--ui-fs-md); font-weight: 500; color: var(--ui-body); }
.ta-v2 .ta-field input:not([type=radio]):not([type=file]) { height: 44px; padding: 9px 12px; font: 400 var(--ui-fs-base)/1.5 var(--ui-font);
  color: var(--ui-fg); background: #fff; border: 1px solid var(--ui-input); box-shadow: var(--ui-shadow-sm); }
.ta-v2 .ta-field input:focus { border-color: var(--ui-ring); box-shadow: 0 0 0 3px rgb(163 163 163 / .35); }
.ta-v2 .ta-submit { margin-top: 8px; height: 44px; }
.ta-v2 .ta-said { margin: 0 0 32px; padding: 12px 16px; font-size: var(--ui-fs-md); max-width: 760px; border-left-width: 4px;
  background: var(--ui-head); }
.ta-v2 .ta-said.bad { background: var(--st-back-soft); }
.ta-v2 dialog.ta-modal { border-color: var(--ui-border); box-shadow: var(--ui-shadow-lg); color: var(--ui-fg); }
.ta-v2 .ta-modal .ta-mhead:not(.wine) { padding: 20px 24px 8px; background: #fff; border-bottom: 0; font-size: var(--ui-fs-lg); font-weight: 600;
  color: var(--ui-fg); }
.ta-v2 .ta-modal .ta-blk { padding: 12px 24px; border-bottom: 0; font-size: var(--ui-fs-base); line-height: 1.5; color: var(--ui-body); }
.ta-v2 .ta-modal .ta-blk:last-of-type { padding-bottom: 24px; }
.ta-v2 .ta-modal .ta-blk h4 { margin: 0 0 4px; font: 600 var(--ui-fs-md) var(--ui-font); letter-spacing: 0; text-transform: none;
  color: var(--ui-fg); }
.ta-v2 .ta-modal .ta-gap { margin-top: 8px; }
.ta-v2 .ta-modal .ta-x { width: 34px; height: 34px; font-size: 20px; }

/* a chat page: the head is the v2 page head; the archived note is an idle alert */
.kc-content .kc-reads a.ui-link { text-decoration: underline; text-decoration-color: #c4c4c4; text-underline-offset: 3px; }
.kc-content .kc-reads a.ui-link:hover { text-decoration-color: var(--ui-fg); }
.kc-content .kc-archived { margin: 0 0 24px; font-size: var(--ui-fs-md); color: var(--ui-body); }
.kc-content .kc-folded { margin: 0 0 24px; }
.kc-content .kc-openkp { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; font: 500 var(--ui-fs-md)/1 var(--ui-font);
  color: var(--ui-primary-fg); background: var(--ui-primary); border: 0; border-radius: 0; cursor: pointer; }
.kc-content .kc-openkp:hover { background: var(--ui-primary-hover); }
.kc-content .kc-openkp:focus-visible { outline: 2px solid var(--ui-brand); outline-offset: 2px; }

@media (max-width: 767px) {
  .ta-v2 .ta-acct { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .ta-v2 .ta-kv { grid-template-columns: 88px minmax(0, 1fr); }
  .ta-v2 .ta-submit, .kc-content .kc-openkp { width: 100%; justify-content: center; }
  .ta-v2 .ui-page-actions .ui-btn, .kc-content .ui-page-actions .ui-btn { width: 100%; }
  .ta-v2 .ui-page-actions form, .kc-content .ui-page-actions form { flex: 1; }
}
/* ==== W3 phase 8 end */
/* ==== W3 phase 9 start: Admin dashboard, Settings
   The Admin dashboard (templates/team.html, team-access's ta-* hooks under
   `.tm-v2`): the pool line as a quiet state line, People as a v2 table over
   the full width that fits its column at every width (a fixed layout, words
   wrap; below 860 px of column each row stacks: name and menu, role and
   state, the connections, the last sign-in), Team Claude plans and Use by
   person as two v2 sections side by side, the row menus as the v2 dropdown,
   the dialogs on the v2 type. The table heads keep train 3's words in the
   markup (tests read them) and read in sentence case here. Settings
   (templates/settings.html, `.st-v2`) and Products
   (templates/settings_products.html + partials/product_map.html, `.pm-v2`):
   v2 sections, v2 fields (label above, 44 px input, help below), one filled
   button per form. Only these pages carry the scope classes; the header's
   team ring and its popover keep katski.css's ta-* look. No em dash. */

/* ---- the Admin dashboard */
.tm-v2 .ta-head { margin-bottom: 24px; }
.tm-v2 .ta-head .ui-meta { margin-top: 6px; }
.tm-v2 .ta-poolrow { margin: 0; }
.tm-v2 .ta-poolrow .ta-pool { gap: 12px; padding: 14px 18px; font-size: var(--ui-fs-md); line-height: 1.45; color: var(--ui-body);
  background: var(--ui-head); border: 0; border-left: 4px solid var(--ta-ok); }
.tm-v2 .ta-poolrow .ta-pool:has(.ta-sq-near) { border-left-color: var(--ta-near); }
.tm-v2 .ta-poolrow .ta-pool.full { color: var(--ta-full); background: var(--ta-full-bg); border-left-color: var(--ta-full); }
.tm-v2 .ta-pool b { font-weight: 600; }
.tm-v2 .ta-sq { width: 10px; height: 10px; }
.tm-v2 .tm-people { margin-top: 40px; }

/* the two tables: train 3's head words, set in sentence case; no row opens anything */
.tm-v2 .ta-tbl th { font: 500 var(--ui-fs-sm)/1.3 var(--ui-font); letter-spacing: 0; color: var(--ui-muted-fg); text-transform: lowercase;
  height: 44px; padding: 0 12px; background: var(--ui-head); border-bottom: 1px solid var(--ui-border); }
.tm-v2 .ta-tbl th::first-letter { text-transform: uppercase; }
.tm-v2 .ta-tbl td { padding: 14px 12px; font-size: var(--ui-fs-md); line-height: 1.4; color: var(--ui-body);
  border-bottom: 1px solid var(--ui-line); overflow-wrap: break-word; }
.tm-v2 .ta-tbl tbody tr:last-child td { border-bottom: 0; }
.tm-v2 .ta-tbl tbody tr { cursor: default; }
.tm-v2 .ta-tbl tbody tr:hover td { background: var(--ui-hover); }
.tm-v2 .ta-tbl tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--ui-fg); }

/* People: a fixed layout, so nothing pushes the table past its column */
.tm-v2 .tm-wrap { overflow: visible; container: tmpeople / inline-size; }
.tm-v2 #team-people { table-layout: fixed; }
.tm-v2 #team-people th:nth-child(1) { width: 21%; padding-left: 16px; }
.tm-v2 #team-people th:nth-child(2) { width: 9%; }
.tm-v2 #team-people th:nth-child(3) { width: 18%; }
.tm-v2 #team-people th:nth-child(5) { width: 12%; }
.tm-v2 #team-people th:nth-child(6) { width: 56px; }
.tm-v2 #team-people td:first-child { padding-left: 16px; }
.tm-v2 #team-people .ta-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tm-v2 #team-people .ta-person > div { min-width: 0; }
.tm-v2 #team-people .av { width: 32px; height: 32px; font-size: 12px; }
.tm-v2 #team-people .ta-pn { font-size: var(--ui-fs-base); font-weight: 500; line-height: 1.3; color: var(--ui-fg); }
.tm-v2 #team-people .ta-pu { margin-top: 2px; font: 400 var(--ui-fs-sm)/1.3 var(--ui-font); color: var(--ui-muted-fg); }
.tm-v2 .ta-you { margin-left: 8px; font-size: var(--ui-fs-xs); font-weight: 400; color: var(--ui-muted-fg); }
.tm-v2 #team-people tr.off .ta-pn, .tm-v2 #team-people tr.off .ta-role { color: var(--ui-muted-fg); }
.tm-v2 #team-people .ta-role { font-size: var(--ui-fs-md); font-weight: 400; color: var(--ui-body); }
.tm-v2 #team-people .ta-role.admin { font-weight: 500; color: var(--ui-fg); }
.tm-v2 #team-people .st-chip { font-size: var(--ui-fs-md); white-space: normal; align-items: flex-start; }
.tm-v2 #team-people .st-chip::before { margin-top: .2em; }
.tm-v2 .ta-tbl .ta-sub { margin-top: 2px; font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); }
/* a connection: its name in a narrow grey column, the state and its sub line beside it */
.tm-v2 .cx-cell .cx-line { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 0 10px; align-items: baseline; }
.tm-v2 .cx-cell .cx-line + .cx-line { margin-top: 8px; }
.tm-v2 .cx-cell .cx-label { min-width: 0; font: 500 var(--ui-fs-sm)/1.4 var(--ui-font); color: var(--ui-muted-fg); }
.tm-v2 .cx-cell .cx-state { min-width: 0; font-size: var(--ui-fs-md); gap: 2px; }
.tm-v2 .cx-cell .st-chip { white-space: normal; }
.tm-v2 .cx-cell .cx-sub { font-size: var(--ui-fs-xs); line-height: 1.4; color: var(--ui-muted-fg); }
.tm-v2 .ta-tbl .ta-quiet { font-size: var(--ui-fs-md); line-height: 1.4; color: var(--ui-muted-fg); }
.tm-v2 #team-people .tm-seen { white-space: normal; }
.tm-v2 #team-people .tm-act { padding: 8px 10px 8px 0; text-align: right; }

/* the row menus (person, plan): the v2 dropdown */
.tm-v2 .ta-kebab { color: var(--ui-muted-fg); border-color: transparent; }
.tm-v2 .ta-kebab:hover, .tm-v2 .ta-kebab.on { color: var(--ui-fg); background: var(--ui-hover); border-color: var(--ui-border); }
.tm-v2 .ta-menu { top: calc(100% + 4px); min-width: 260px; padding: 4px; background: #fff; border: 1px solid var(--ui-border);
  box-shadow: var(--ui-shadow-lg); font-family: var(--ui-font); }
.tm-v2 .ta-mi { padding: 8px 10px; font: 400 var(--ui-fs-md)/1.35 var(--ui-font); color: var(--ui-body); }
.tm-v2 .ta-mi small { margin-top: 2px; font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); }
.tm-v2 .ta-mi:hover:not([disabled]), .tm-v2 .ta-mi:focus-visible { color: var(--ui-fg); background: var(--ui-hover); box-shadow: none; }
.tm-v2 .ta-mi.wine, .tm-v2 .ta-mi.wine:hover:not([disabled]) { color: var(--st-back); box-shadow: none; }
.tm-v2 .ta-mi[disabled], .tm-v2 .ta-mi[disabled] small { color: #a3a3a3; }
.tm-v2 .ta-msep { margin: 4px 0; border-top-color: var(--ui-line); }

/* People in a narrow column (the panel open at 1440, a phone): each row stacks */
@container tmpeople (max-width: 859px) {
  .tm-v2 #team-people, .tm-v2 #team-people tbody { display: block; width: 100%; }
  .tm-v2 #team-people thead { display: none; }
  .tm-v2 #team-people tr { display: grid; grid-template-columns: 44px auto minmax(0, 1fr) auto;
    grid-template-areas: "who who who act" ". role st st" ". cx cx cx" ". seen seen seen"; gap: 8px 16px; padding: 14px 12px 14px 16px;
    border-bottom: 1px solid var(--ui-line); }
  .tm-v2 #team-people tr:last-child { border-bottom: 0; }
  .tm-v2 #team-people tr:hover { background: var(--ui-hover); }
  .tm-v2 #team-people td, .tm-v2 #team-people tbody tr:hover td { display: block; padding: 0; border: 0; background: none; box-shadow: none; }
  .tm-v2 #team-people td.tm-who { grid-area: who; padding: 0; }
  .tm-v2 #team-people td.tm-act { grid-area: act; padding: 0; }
  .tm-v2 #team-people td.tm-role { grid-area: role; }
  .tm-v2 #team-people td.tm-st { grid-area: st; }
  .tm-v2 #team-people td.cx-cell { grid-area: cx; }
  .tm-v2 #team-people td.tm-seen { grid-area: seen; font-size: var(--ui-fs-sm); }
  .tm-v2 #team-people td.tm-seen::before { content: "Last signed in: "; }
}

/* Team Claude plans and Use by person: two sections side by side, stacked when narrow */
.tm-v2 .tm-below { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 48px; margin-top: 48px;
  align-items: start; }
.tm-v2 .tm-below > .ui-section { margin-top: 0; min-width: 0; }
.tm-v2 .ta-empty { padding: 0; font-size: var(--ui-fs-base); color: var(--ui-muted-fg); }
.tm-v2 .ta-pcard { padding: 16px 0 18px; border-top: 1px solid var(--ui-line); }
.tm-v2 .ui-section-head + .ta-pcard { padding-top: 0; border-top: 0; }
.tm-v2 .ta-pcard:last-child { padding-bottom: 0; }
.tm-v2 .ta-pcard-h { gap: 10px; margin-bottom: 14px; }
.tm-v2 .ta-pname { font: 600 var(--ui-fs-lg)/1.3 var(--ui-font); color: var(--ui-fg); border-bottom: 0; text-decoration: none; }
.tm-v2 .ta-pname:hover, .tm-v2 .ta-pname:focus-visible { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #b5b5b5; }
.tm-v2 .ta-next { font: 400 var(--ui-fs-sm) var(--ui-font); color: var(--ui-muted-fg); }
.tm-v2 .ta-pstate { gap: 8px; font: 500 var(--ui-fs-md) var(--ui-font); color: var(--ui-body); }
.tm-v2 .ta-pstate.full { color: var(--ta-full); }
.tm-v2 .ta-pcard-m { gap: 24px; }
.tm-v2 .mt-lab { font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); }
.tm-v2 .mt-num { font-size: var(--ui-fs-lg); font-weight: 600; color: var(--ui-fg); }
.tm-v2 .mt-num.est { font-size: var(--ui-fs-sm); font-weight: 400; color: var(--ui-muted-fg); }
.tm-v2 .mt-track { height: 8px; margin-top: 6px; }
.tm-v2 .mt-sub { margin-top: 6px; font-size: var(--ui-fs-xs); color: var(--ui-muted-fg); white-space: normal; }
.tm-v2 .ta-pcard-f { margin-top: 14px; font-size: var(--ui-fs-xs); color: var(--ui-muted-fg); }
.tm-v2 .tm-usewrap { overflow: visible; }
.tm-v2 #team-use { table-layout: fixed; }
.tm-v2 #team-use th:first-child { width: 30%; }
.tm-v2 #team-use td { vertical-align: top; }
.tm-v2 #team-use .ta-person { gap: 10px; }
.tm-v2 #team-use .ta-pn { font-size: var(--ui-fs-md); font-weight: 500; color: var(--ui-fg); }
.tm-v2 #team-use .av { width: 24px; height: 24px; font-size: 10px; }
.tm-v2 .ta-share .bar { background: var(--ui-tile); }
.tm-v2 .ta-share .bar span { background: var(--ui-faint); }
.tm-v2 .ta-share .n { font-weight: 600; color: var(--ui-fg); }

/* the dashboard's dialogs: the v2 dialog (phase 8 sets the head and blocks under .ta-v2) */
.tm-v2 .ta-modal .ta-mhead.wine { padding: 16px 24px; font-size: var(--ui-fs-lg); font-weight: 600; }
.tm-v2 .ta-mfoot { gap: 10px; padding: 8px 24px 24px; background: #fff; border-top: 0; }
.tm-v2 .ta-modal .ta-blk ol { padding-left: 20px; }
.tm-v2 .ta-modal .ta-blk li + li { margin-top: 4px; }
.tm-v2 .ta-modal .ta-blk code { font-size: var(--ui-fs-sm); background: var(--ui-head); border-color: var(--ui-border); }
.tm-v2 .ta-modal .ta-quiet { font-size: var(--ui-fs-md); color: var(--ui-muted-fg); }
.tm-v2 .ta-modal .ta-said { margin: 0 0 16px; }
.tm-v2 .ta-field textarea { width: 100%; min-height: 88px; padding: 9px 12px; font: 400 var(--ui-fs-sm)/1.5 var(--mono, monospace);
  color: var(--ui-fg); background: #fff; border: 1px solid var(--ui-input); box-shadow: var(--ui-shadow-sm); }
.tm-v2 .ta-field textarea:focus { border-color: var(--ui-ring); box-shadow: 0 0 0 3px rgb(163 163 163 / .35); }
.tm-v2 .ta-field .ta-flabel { margin: 0 0 6px; font: 500 var(--ui-fs-md) var(--ui-font); color: var(--ui-body); }
.tm-v2 .ta-seg { justify-self: start; padding: 3px; gap: 0; background: #efefec; }
.tm-v2 .ta-seg span { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; font: 500 var(--ui-fs-md) var(--ui-font);
  color: #525252; }
.tm-v2 .ta-seg input:checked + span { color: var(--ui-fg); font-weight: 600; background: #fff; box-shadow: var(--ui-shadow-sm); }
.tm-v2 .ta-linkbox { padding: 8px 8px 8px 12px; background: var(--ui-head); border: 1px solid var(--ui-border); }
.tm-v2 .ta-mtbl th { font: 500 var(--ui-fs-sm) var(--ui-font); letter-spacing: 0; color: var(--ui-muted-fg); text-transform: lowercase; }
.tm-v2 .ta-mtbl th::first-letter { text-transform: uppercase; }
.tm-v2 .ta-mtbl td { font-size: var(--ui-fs-md); }

@media (max-width: 767px) {
  .tm-v2 .tm-people { margin-top: 32px; }
  .tm-v2 .tm-below { gap: 36px; margin-top: 36px; }
  .tm-v2 .ui-section-head .ui-page-actions { width: auto; margin-left: auto; }
  .tm-v2 .ui-section-head .ui-page-actions .ui-btn { width: auto; }
  .tm-v2 .ta-pcard-m { gap: 16px; }
}

/* ---- Settings: rd-settings moved the page to the shared settings section (ui-set, DESIGN-SYSTEM 6.30)
   in the platform-redesign rd-settings block at the end of this file */
/* Products: the count loud while an id has no line, a count that is behind: a bad number (rule 39, RD261) */
.st-v2 .pm-loud, .pm-v2 .pm-loud { font: 600 var(--ui-fs-md) var(--ui-font); letter-spacing: 0; color: var(--bad); background: none;
  border: 0; padding: 0; text-transform: none; }

/* ---- Products (the plan map editor) */
.pm-v2 .pm-pagehead { margin-bottom: 24px; }
.pm-v2 .pm { background: none; border: 0; font-family: var(--ui-font); }
.pm-v2 .pm-head { gap: 16px; padding: 0 0 20px; border: 0; background: none; }
.pm-v2 .pm-count { align-items: baseline; gap: 16px; }
.pm-v2 .pm-quiet { font-size: var(--ui-fs-md); font-weight: 500; color: var(--ui-body); }
.pm-v2 .pm-total { font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); }
.pm-v2 .pm-warn { font: 600 var(--ui-fs-md) var(--ui-font); letter-spacing: 0; color: var(--bad); background: none; border: 0;
  padding: 0; text-transform: none; }
.pm-v2 .pm-notice { padding: 12px 16px; font-size: var(--ui-fs-md); color: var(--ui-body); background: var(--ui-head);
  border-left: 4px solid var(--st-done); }
.pm-v2 .pm-notice.is-bad { color: var(--ui-body); background: var(--st-back-soft); border-left-color: var(--st-back); }
.pm-v2 .pm-h { flex-basis: 100%; margin: 0 0 4px; font-size: var(--ui-fs-md); font-weight: 600; color: var(--ui-fg); }
.pm-v2 .pm-lines, .pm-v2 .pm-addid { gap: 8px 12px; padding: 16px 0; border: 0; border-top: 3px solid var(--ui-fg); background: none; }
.pm-v2 .pm-addid { margin-bottom: 24px; border-top-width: 1px; border-top-color: var(--ui-border); }
.pm-v2 .pm-line { gap: 10px; height: 40px; padding: 0 6px 0 12px; background: #fff; border: 1px solid var(--ui-input); }
.pm-v2 .pm-line:hover, .pm-v2 .pm-line:focus-within { border-color: var(--ui-ring); }
.pm-v2 .pm-line-name { font: 500 var(--ui-fs-md) var(--ui-font); color: var(--ui-fg); }
.pm-v2 .pm-slug, .pm-v2 .pm-line-n { font: 400 var(--ui-fs-xs) var(--ui-font); color: var(--ui-muted-fg); }
.pm-v2 .pm-add input, .pm-v2 .pm-addid input, .pm-v2 .pm-addid select { height: 40px; padding: 0 10px; font: 400 var(--ui-fs-md) var(--ui-font);
  color: var(--ui-fg); background: #fff; border: 1px solid var(--ui-input); border-radius: 0; box-shadow: var(--ui-shadow-sm); }
.pm-v2 .pm-add .ui-btn, .pm-v2 .pm-addid .ui-btn { height: 40px; }
.pm-v2 .pm-scroll { background: #fff; border: 1px solid var(--ui-border); }
.pm-v2 .pm-tbl { font-family: var(--ui-font); }
.pm-v2 .pm-tbl col.c-where { width: 86px; }
.pm-v2 .pm-tbl col.c-id { width: 168px; }
.pm-v2 .pm-tbl col.c-line { width: 136px; }
.pm-v2 .pm-tbl col.c-kind { width: 152px; }
.pm-v2 .pm-tbl col.c-fam { width: 112px; }
.pm-v2 .pm-tbl col.c-phys { width: 96px; }
.pm-v2 .pm-tbl col.c-units { width: 64px; }
.pm-v2 .pm-tbl col.c-by { width: 132px; }
.pm-v2 .pm-tbl col.c-act { width: 76px; }
.pm-v2 .pm-tbl th { height: 44px; padding: 0 6px; font: 500 var(--ui-fs-sm)/1.3 var(--ui-font); letter-spacing: 0; color: var(--ui-muted-fg);
  text-transform: lowercase; background: var(--ui-head); border-bottom: 1px solid var(--ui-border); }
.pm-v2 .pm-tbl th::first-letter { text-transform: uppercase; }
.pm-v2 .pm-tbl td { height: 52px; padding: 6px; font-size: var(--ui-fs-md); color: var(--ui-body); border-bottom: 1px solid var(--ui-line); }
.pm-v2 .pm-tbl td:first-child, .pm-v2 .pm-tbl th:first-child { padding-left: 16px; }
.pm-v2 .pm-tbl select, .pm-v2 .pm-units { height: 36px; padding: 0 6px; font: 400 var(--ui-fs-sm) var(--ui-font); color: var(--ui-fg);
  background: #fff; border: 1px solid var(--ui-input); border-radius: 0; }
.pm-v2 .pm-units { width: 100%; text-align: right; }
.pm-v2 .pm-group td { height: 44px; font-size: var(--ui-fs-md); font-weight: 600; color: var(--ui-fg); background: var(--ui-head); }
.pm-v2 .pm-group-n { font: 400 var(--ui-fs-sm) var(--ui-font); color: var(--ui-muted-fg); margin-left: 8px; }
.pm-v2 .pm-group-unassigned .pm-group td { color: var(--st-back); }
.pm-v2 tr.pm-row:hover td { background: var(--ui-hover); }
.pm-v2 .pm-row:hover td:first-child { box-shadow: inset 3px 0 0 var(--ui-fg); }
.pm-v2 .pm-row.is-unassigned td:first-child { box-shadow: inset 3px 0 0 var(--st-back); }
.pm-v2 .pm-row.is-no-kind td:first-child { box-shadow: inset 3px 0 0 var(--st-waiting); }
.pm-v2 .pm-id { font: 400 var(--ui-fs-sm) var(--ui-font); color: var(--ui-muted-fg); }
.pm-v2 .pm-where { color: var(--ui-muted-fg); font-size: var(--ui-fs-sm); }
.pm-v2 .pm-tag { font: 600 var(--ui-fs-xs) var(--ui-font); letter-spacing: 0; padding: 0; background: none; border: 0; }
.pm-v2 .pm-tag.is-unassigned { color: var(--st-back); background: none; }
.pm-v2 .pm-tag.is-no-kind { color: var(--st-waiting); background: none; }
.pm-v2 .pm-tag.is-twin { color: var(--ui-muted-fg); margin-left: 6px; }
.pm-v2 .pm-na { color: var(--ui-faint); }
.pm-v2 .pm-by-name { font-size: var(--ui-fs-sm); color: var(--ui-body); }
.pm-v2 .pm-agent, .pm-v2 .pm-when { font: 400 var(--ui-fs-xs) var(--ui-font); color: var(--ui-muted-fg); }
.pm-v2 .pm-tbl .pm-save { height: 32px; padding: 0 12px; font-size: var(--ui-fs-sm); }
.pm-v2 tr.pm-row.is-dirty td { background: var(--ui-hover); }

@media (max-width: 767px) {
  .pm-v2 .ui-page-actions .ui-btn { width: 100%; }
  .pm-v2 .pm-addid input[name=external_id] { width: 100%; }
  .pm-v2 .pm-head { flex-wrap: wrap; }
  .pm-v2 .pm-line { width: 100%; height: auto; min-height: 40px; flex-wrap: wrap; padding: 6px 6px 6px 12px; }
  .pm-v2 .pm-line-name { flex: 1 1 100%; min-width: 0; }
  .pm-v2 .pm-add { width: 100%; }
  .pm-v2 .pm-add input { flex: 1; min-width: 0; }
}
/* ==== W3 phase 9 end */
/* ==== W3 phase 8b start: Batches and one batch (templates/batches/)
   The batch pages on the v2 parts: the page head, the Batches / Trash tab
   row, a v2 table per group, the alerts, and the sections (rules, the lock,
   the grid, the list of ideas, the settings) split by their ink rule and
   space. static/batch.css keeps the batch's own pieces (the ideas, the small
   forms, the review grid's cards) on the same tokens. */
.bt-v2 > .ui-alert { margin-bottom: 16px; }
.bt-v2 .bt-said-alert { margin-bottom: 20px; }
.bt-v2 .ui-table .bt-angles { color: var(--ui-body); max-width: 360px; }
/* katski.css's .num is mono 12 px; a v2 table's numbers are Geist (DESIGN.md section 2) */
.bt-v2 .ui-table .num { font-family: var(--ui-font); }
.bt-v2 .ui-page-actions .bt-new > summary { display: inline-flex; }
/* the lock: the section head carries Lock the list on its right */
.bt-v2 .bt-lock .ui-section-head { margin-bottom: 0; }
.bt-v2 form.ui-inline { display: inline-flex; }
/* a section that folds: its head is the summary; the list of ideas and the settings */
.bt-v2 details.ui-section > summary.ui-section-head { cursor: pointer; }
.bt-v2 details.ui-section:not([open]) > summary.ui-section-head { margin-bottom: 0; }
.bt-v2 .bt-settingsbody .bt-row:first-child { margin-top: 0; }
.bt-v2 .bt-settingsbody .ui-field + .ui-field { margin-top: 0; }
/* the grid is a section; its head's sub-line says what the cards wait for */
.bt-v2 .bt-grid .ui-section-head { margin-bottom: 20px; }
@media (max-width: 767px) {
  .bt-v2 .ui-page-actions .bt-new, .bt-v2 .ui-page-actions .bt-new > summary { width: 100%; }
  .bt .bt-new[open] .bt-pop { position: static; width: auto; }
  .bt .bt-two { grid-template-columns: 1fr; }
  .bt .bt-two .ui-field + .ui-field { margin-top: 16px; }
  .bt .bt-sethead { padding: 12px; }
  .bt .bt-ad { padding: 12px; gap: 8px; }
  .bt .bt-admain { min-width: 0; flex-basis: 100%; }
  .bt .bt-tools { margin-left: -12px; }
  .bt .bt-addsetform { padding: 16px; }
  .bt .bt-addsetform .ui-field { flex-basis: 100%; }
  .bt .bt-narrow, .bt .bt-setpick { width: 100%; }
  .bt .bt-filters { margin-top: 24px; }
  .bt .bt-setname { min-width: 0; flex-basis: calc(100% - 40px); }
  .bt .bt-setwhere { flex-basis: 100%; padding-left: 40px; }
  .bt-v2 .bt-lock .ui-section-head .ui-page-actions { order: 9; }
  .bt-v2 .bt-lock .ui-page-actions .ui-btn { width: 100%; }
  .bt-v2 .bt-lock form.ui-inline { display: flex; width: 100%; }
}
/* ==== W3 phase 8b end */
/* ==== W3 phase 5 start: Content bank (templates/bank.html)
   rd-bank (RD14, DESIGN-SYSTEM 6.33): the body in the CRM look, Light and Dark, on the tokens only.
   Weight `html main.bank-page ...` (0,2,2 and up) beats the phase 3 components (0,2,1) and
   katski.css's Bank rules (0,2,0), which stay as they are because tests read them there.
   The markup keeps the Bank's old hook classes (tests and bank.js read them). */
html main.bank-page { --bk-pad: 32px; --bk-bar-h: 0px; }   /* rd-match-b: the filter line no longer sticks */
/* a "--" (no length yet) stays two hyphens: General Sans would draw it as one long dash */
html main.bank-page :is(.def-grid, .audio-len) { font-variant-ligatures: none; }
html main.bank-page .bk-head { margin-bottom: 20px; }
html main.bank-page .bk-new { color: var(--ink); font-weight: 600; }
html main.bank-page .bk-upload .bk-file { height: auto; padding: 8px; }
html main.bank-page .av-refuse { margin: 0 0 20px; padding: 14px 16px; background: var(--danger-soft); border: 0;
  border-radius: var(--r-tile); }
html main.bank-page .av-refuse .t { font-size: 14.5px; font-weight: 600; color: var(--danger); }
html main.bank-page .av-refuse p { font-size: 14px; color: var(--ink); }

/* the filter line (rd-match-b, RD189, rule 16a; was the glass bar of 6.25): a plain line under the
   title like Performance's Top ads, no ground, no box, not sticky; the filters left, the count, a
   quiet Trash and the pager right. Its height and margin are the old bar's, so the grid starts
   where it did. */
html main.bank-page .bk-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start;
  gap: 8px 16px; margin: 0 0 24px; padding: 12px 0 13px; }   /* 13: the old bar's 1 px edge */
html main.bank-page .bank-filters { min-width: 0; margin: 0; }
html main.bank-page .bank-filters .ui-filters { margin: 0; align-items: center; }
html main.bank-page .filter-bar, html main.bank-page .tag-bar { display: contents; }
html main.bank-page .bk-bar-end { display: flex; align-items: center; gap: 10px; min-height: 38px; }
html main.bank-page .bk-bar-end .ui-meta { margin: 0; font-size: 13.5px; color: var(--ink-2); white-space: nowrap;
  font-variant-numeric: tabular-nums; }
html main.bank-page .bk-bar-end .ui-btn-ghost { background: none; border: 1px solid transparent; color: var(--ink-2); }
html main.bank-page .bk-bar-end .ui-btn-ghost:hover { background: var(--hover); color: var(--ink); }
html main.bank-page .bk-bar-end .ui-muted { color: var(--ink-2); }

/* the dropdowns: the menu's rows (6.15) */
html main.bank-page .bk-type .ui-menu-list { min-width: 280px; }
html main.bank-page .ui-menu-list.tchips { min-width: 260px; }
html main.bank-page .ui-menu-list .tfam { display: block; margin: 5px 0 0; padding-top: 5px; border-top: 1px solid var(--line); }
html main.bank-page .ui-menu-list :is(.tpill, .tchip) { display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  background: none; border: 0; border-radius: var(--r-item); box-shadow: none; font-size: 14px; font-weight: 400; line-height: 1.3;
  color: var(--ink); white-space: nowrap; text-decoration: none; }
html main.bank-page .ui-menu-list :is(.tpill, .tchip):hover { background: var(--hover); color: var(--ink); }
html main.bank-page .ui-menu-list :is(.tpill, .tchip).on { background: none; color: var(--ink); font-weight: 600; }
html main.bank-page .ui-menu-list :is(.tpill, .tchip).on:hover { background: var(--hover); }
html main.bank-page .ui-menu-list :is(.tpill, .tchip) .tn { order: 2; margin-left: auto; font: 400 12px var(--font); color: var(--ink-3);
  font-variant-numeric: tabular-nums; }
html main.bank-page .ui-menu-list .tchip.extra { display: none; }
html main.bank-page .tgroup.open .ui-menu-list .tchip.extra { display: flex; }
html main.bank-page .ui-menu-list .tmore { display: block; margin: 4px 10px 6px; padding: 0; background: none; border: 0;
  font: 500 13.5px var(--font); color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2);
  text-underline-offset: 3px; cursor: pointer; }
html main.bank-page .ui-menu-list .tmore:hover, html main.bank-page .ui-menu-list .tmore:focus-visible { text-decoration-color: var(--ink); }

/* a filter you picked: the removable chip (6.8) on one line under the row */
html main.bank-page .tag-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 13.5px; color: var(--ink); }
html main.bank-page .fchip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px 0 13px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-pill); box-shadow: none;
  font-size: 13.5px; font-weight: 600; line-height: 1; color: var(--ink); white-space: nowrap; text-decoration: none; }
html main.bank-page .fchip:hover { background: var(--hover); border-color: var(--line-2); color: var(--ink); }
html main.bank-page .fchip .ui-i { width: 14px; height: 14px; color: var(--ink-2); }
html main.bank-page .tag-picked .ui-link { font-size: 13.5px; font-weight: 500; color: var(--ink); }

/* the grid: media tiles (6.12), the picture leads; a tall picture keeps most of itself at 4:5 */
html main.bank-page .bank-layout { gap: 20px; }
html main.bank-page .bank-grid-wrap { min-width: 0; }
html main.bank-page .bank-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
html main.bank-page .bank-thumb { height: auto; aspect-ratio: 4 / 5; display: grid; place-items: center; overflow: hidden;
  border-bottom: 0; background: var(--hover); color: var(--ink-3); }
html main.bank-page .bank-thumb .ui-ph { color: var(--ink-3); }
html main.bank-page .bank-thumb .bk-ph-video { padding-top: 76px; }
html main.bank-page :is(.tag-badge, .dur-pill) { z-index: 1; padding: 2px 8px; border-radius: var(--r-sm); font-family: var(--font);
  font-size: 12px; font-weight: 500; line-height: 1.4; letter-spacing: 0; color: var(--on-fill); background: var(--media-scrim); }
html main.bank-page .tag-badge { top: 8px; right: auto; left: 8px; }
html main.bank-page .dur-pill { right: 8px; bottom: 8px; font-variant-numeric: tabular-nums; }
html main.bank-page .badge-new { top: 36px; right: auto; left: 8px; z-index: 1; padding: 2px 8px; border-radius: var(--r-sm); font-size: 12px;
  font-weight: 600; line-height: 1.4; letter-spacing: 0; color: var(--on-fill); background: var(--ed); }
html main.bank-page .play-mark { z-index: 1; width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 0; color: var(--on-fill);
  background: var(--media-play); opacity: 1; }
html main.bank-page .bank-thumb.audio-face { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; background: var(--hover); color: var(--ink); }
html main.bank-page .audio-face .audio-len { font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--ink-2);
  font-variant-numeric: tabular-nums; }
html main.bank-page .bank-cell .ui-tile-sub .bank-id { font: inherit; }
html main.bank-page .bank-cell .bank-used { display: inline; margin: 0; font-size: inherit; color: inherit; }
html main.bank-page .bank-cell:hover .ui-tile-star button { opacity: 1; }
html main.bank-page .ui-tile-star .star-toggle .ui-i { width: 16px; height: 16px; }
html main.bank-page .ui-tile-star .star-toggle.on .ui-i { fill: currentColor; }

/* the side panel: the floating panel's look (6.14), laid in the page; the slot scrolls and clips */
html main.bank-page .bank-panel-slot { top: calc(var(--bk-bar-h) + 16px); max-height: calc(100vh - var(--ui-header-h) - var(--bk-bar-h) - 32px);
  background: var(--surface); border: 1px solid var(--side-line); border-radius: var(--r-side); box-shadow: var(--side-shadow);
  scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
@supports (corner-shape: squircle) {
  html main.bank-page :is(.bank-panel-slot, .trash-list) { corner-shape: squircle; }
}
html main.bank-page .bank-panel { background: none; border: 0; border-radius: 0; font-size: 14px; color: var(--ink); }
html main.bank-page :is(.panel-media, .panel-still, .panel-audio, .panel-thumb) { background: var(--hover); border-bottom: 0; }
html main.bank-page .panel-media :is(video, img) { display: block; width: 100%; height: 400px; object-fit: contain; background: var(--hover); }
html main.bank-page .panel-thumb { height: 200px; color: var(--ink-3); }
html main.bank-page .thumb-label { color: var(--ink-2); }
html main.bank-page .panel-audio .audio-what { font-size: 14px; font-weight: 600; color: var(--ink); }
html main.bank-page .media-note { padding: 10px 20px; font-size: 13px; line-height: 1.5; color: var(--ink-2); background: var(--hover); border: 0; }
html main.bank-page .media-note.bad { color: var(--ink); background: var(--danger-soft); }
html main.bank-page .bk-pbody { padding: 16px 20px 20px; }
html main.bank-page .bk-phead { display: flex; align-items: center; gap: 8px; }
html main.bank-page .bk-pid { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--ink); }
html main.bank-page .bank-panel .col-chip { padding: 3px 9px; border: 0; border-radius: var(--r-pill); background: var(--hover); font-family: var(--font);
  font-size: 12px; font-weight: 500; line-height: 1.3; letter-spacing: 0; color: var(--ink-2); }
html main.bank-page .bank-panel .detail-close { display: grid; place-items: center; width: 32px; height: 32px; margin: -4px -6px -4px auto; border-radius: var(--r-pill);
  font-size: 20px; line-height: 1; color: var(--ink-2); }
html main.bank-page .bank-panel .detail-close:hover { background: var(--hover); color: var(--ink); }
html main.bank-page .title-form { gap: 8px; margin: 10px 0 0 -9px; }
html main.bank-page .panel-title-input, html main.bank-page .panel-title { font-family: var(--font); font-size: 18px; font-weight: 600; line-height: 1.3;
  letter-spacing: -.01em; color: var(--ink); }
html main.bank-page .panel-title-input { padding: 3px 8px; background: transparent; border: 1px solid transparent; border-radius: var(--r-item); }
html main.bank-page .panel-title-input:hover { border-color: var(--line-2); }
html main.bank-page .panel-title-input:focus { background: var(--surface); border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px var(--ring); }
html main.bank-page .def-grid { grid-template-columns: 96px minmax(0, 1fr); gap: 10px 12px; margin: 16px 0 18px; font-size: 14px; line-height: 1.45; color: var(--ink); }
html main.bank-page .def-key { color: var(--ink-2); }
html main.bank-page .bk-by { display: flex; align-items: center; gap: 6px; }
html main.bank-page .bk-pair a { color: var(--ink); }
html main.bank-page .bank-panel a:not([class]) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
/* yes / no and the origin: the segmented control (6.6) */
html main.bank-page .seg-yn { gap: 2px; padding: 3px; background: var(--hover); border-radius: var(--r-seg); }
html main.bank-page .yn, html main.bank-page .yn + .yn { height: 30px; padding: 0 12px; background: transparent; border: 0; border-radius: var(--r-item); font-family: var(--font);
  font-size: 13.5px; font-weight: 500; color: var(--ink-2); box-shadow: none; cursor: pointer; }
html main.bank-page .origin-cell .yn { flex: 1 1 auto; padding: 0 6px; }
html main.bank-page .yn:hover { color: var(--ink); box-shadow: none; }
html main.bank-page .yn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--seg-shadow); }
/* section labels, tags, fields */
html main.bank-page .bank-panel .microlabel, html main.bank-page .bk-plabel { margin: 0 0 8px; font-family: var(--font); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0; color: var(--ink-2); }
html main.bank-page .ptags-head { margin-bottom: 8px; }
html main.bank-page .ptags-head .microlabel { margin: 0; }
html main.bank-page .ptags-edit { font-size: 13px; font-weight: 500; color: var(--ink-2); border-bottom-color: var(--line-2); }
html main.bank-page .ptags-edit:hover { color: var(--ink); border-bottom-color: var(--ink); }
html main.bank-page .ptags { gap: 6px; margin-bottom: 16px; }
html main.bank-page .ptags .tchip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px 0 9px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-pill); box-shadow: none; font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: none; }
html main.bank-page .ptags .tchip::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: var(--r-pill); background: var(--kind, var(--ink-3)); }
html main.bank-page .ptags .tchip:hover { background: var(--hover); border-color: var(--line-2); color: var(--ink); }
html main.bank-page :is(.ptags-none, .used-note) { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
html main.bank-page .ptags-none { margin-bottom: 8px; }
html main.bank-page :is(.bank-input, .prompt-text) { width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-ctl);
  font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--ink); }
html main.bank-page :is(.bank-input, .prompt-text) { padding: 8px 12px; }
html main.bank-page :is(.bank-input, .prompt-text)::placeholder { color: var(--ink-3); }
html main.bank-page :is(.bank-input, .prompt-text):hover { border-color: var(--ink-3); }
html main.bank-page :is(.bank-input, .prompt-text):focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px var(--ring); }
html main.bank-page .prompt-text[readonly] { background: var(--hover); color: var(--ink-2); }
html main.bank-page .bank-line { gap: 10px; margin: 0 0 12px; }
html main.bank-page .bank-line .microlabel { margin: 0; white-space: nowrap; }
html main.bank-page .bank-line select { flex: 1; min-width: 0; width: auto; }
html main.bank-page .prompt-box { gap: 8px; margin-bottom: 16px; }
html main.bank-page .bk-prompt-acts { display: flex; gap: 8px; }
html main.bank-page .bk-grow { flex: 1; }
html main.bank-page .bk-description { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--ink); }
/* "Used in ads": a quiet row per ad; the edge answers a hover, never a tint */
html main.bank-page .used-ads { margin: 0 0 18px; }
html main.bank-page .used-row { align-items: center; gap: 8px; min-height: 38px; padding: 6px 12px; margin-bottom: 6px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-ctl); font-size: 13.5px; }
html main.bank-page .used-row:hover { border-color: var(--ink-3); }
html main.bank-page .used-name { font-weight: 500; color: var(--ink); }
html main.bank-page .used-status { font-size: 13px; color: var(--ink-2); }
html main.bank-page .used-open { font-size: 13px; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line-2); }
html main.bank-page .used-open:hover { color: var(--ink); border-bottom-color: var(--ink); }
/* the buttons down the panel */
html main.bank-page .bk-gap { margin-top: 10px; }
html main.bank-page .bk-gap-s { margin-top: 6px; }
html main.bank-page .bk-wide-link { display: flex; justify-content: center; align-items: center; width: 100%; text-decoration: none; }
html main.bank-page .bk-off, html main.bank-page .bk-off:hover { background: var(--surface); opacity: .5; cursor: default; }
html main.bank-page .bank-panel .btn-wide { width: 100%; justify-content: center; }
html main.bank-page .del-form { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
html main.bank-page .del-form .btn-del:hover { background: var(--danger-hi); border-color: transparent; color: var(--danger); }
html main.bank-page .trash-note { margin: 12px 0 8px; padding: 12px 14px; background: var(--hover); border: 0; border-radius: var(--r-tile); }
html main.bank-page .trash-note p { font-size: 14px; color: var(--ink); }

/* the pager: on the bar's right end (rule 16a); the trash has no bar, so it sits right under its list */
html main.bank-page .bank-grid-wrap > .ui-pager { display: flex; justify-content: flex-end; margin-top: 14px; }

/* the trash: one list (a row per asset: thumb, name and id, when, Restore) */
html main.bank-page .trash-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile); overflow: hidden; box-shadow: var(--shadow); }
html main.bank-page .trash-row { grid-template-columns: 56px minmax(0, 1.2fr) minmax(0, 1.6fr) auto; gap: 16px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); box-shadow: none; }
html main.bank-page .trash-row:last-child { border-bottom: 0; }
html main.bank-page .trash-row:hover { background: var(--hover); box-shadow: none; }
html main.bank-page .trash-row.selected { background: var(--hover); box-shadow: inset 0 0 0 1px var(--ink); }
html main.bank-page .trash-thumb { width: 56px; height: 56px; background: var(--hover); border-radius: var(--r-item); overflow: hidden; }
html main.bank-page .trash-what { gap: 2px; }
html main.bank-page .trash-label { font-size: 14.5px; font-weight: 500; color: var(--ink); }
html main.bank-page .trash-what .bank-id { font-family: var(--font); font-size: 13px; font-weight: 400; color: var(--ink-2); }
html main.bank-page .trash-when { font-size: 13.5px; line-height: 1.5; color: var(--ink); }
html main.bank-page .trash-held { color: var(--ink); font-weight: 600; }
html main.bank-page .trash-who { color: var(--ink-2); }

@media (max-width: 1280px) {
  html main.bank-page { --bk-pad: 24px; }
}
@media (max-width: 767px) {
  html main.bank-page .bk-bar { grid-template-columns: minmax(0, 1fr); }
  html main.bank-page .bk-bar-end { flex-wrap: wrap; }
  html main.bank-page .bank-layout { flex-direction: column; }
  html main.bank-page .bank-grid-wrap { width: 100%; }
  html main.bank-page .bank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  html main.bank-page .bank-panel-slot { width: 100%; position: static; max-height: none; }
  html main.bank-page .trash-row { grid-template-columns: 56px minmax(0, 1fr); }
  html main.bank-page .trash-when, html main.bank-page .trash-row form { grid-column: 2; }
}
/* ==== W3 phase 5 end */
/* ==== rd-b4b start: the library page (DESIGN-SYSTEM 6.44, RD120-RD122)
   The Bank's recipe (6.33) as SHARED pieces, so a second library page (the swipe file) draws
   the same bar, grid and side panel from one set of rules: `.ui-libbar` (a `.ui-bar`: the
   filters left, the count and the page's buttons right), `.ui-lib` (the grid beside the panel),
   `.ui-lib-grid` (4:5 tiles), `.ui-lib-panel` (the side panel laid in the page) and the
   panel's parts (`.ui-lib-pbody` ... `.ui-lib-foot`). Tokens only; sizes in :where() so a
   page may tune one. The Bank keeps its own 6.33 rules (the pilot, same values) until the
   polishing round folds it onto these. */
html:not([data-crm],[data-crm-chat]) main:has(.ui-libbar) { --lib-pad: 32px; --lib-bar-h: 62px; }
html:not([data-crm],[data-crm-chat]) main:has(.ui-libbar .ui-picked) { --lib-bar-h: 106px; }
/* the glass bar (6.25), full bleed over the pane; words on it are --ink (RD71) */
html:not([data-crm],[data-crm-chat]) .ui-bar.ui-libbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start;
  gap: 8px 16px; margin: 0 calc(var(--lib-pad) * -1) 24px; padding: 12px var(--lib-pad); }
html:not([data-crm],[data-crm-chat]) .ui-libbar-main { min-width: 0; }
html:not([data-crm],[data-crm-chat]) .ui-libbar-main > .ui-filters { margin: 0; align-items: center; flex-wrap: nowrap; }
html:not([data-crm],[data-crm-chat]) .ui-libbar-main > .ui-picked { margin: 10px 0 0; }
html:not([data-crm],[data-crm-chat]) .ui-libbar-end { display: flex; align-items: center; gap: 10px; min-height: 38px; }
html:not([data-crm],[data-crm-chat]) .ui-libbar-end .ui-meta { margin: 0; font-size: 13.5px; color: var(--ink); white-space: nowrap;
  font-variant-numeric: tabular-nums; }
html:not([data-crm],[data-crm-chat]) .ui-libbar-end .ui-btn-ghost { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-libbar-end .ui-btn-ghost:hover { background: var(--surface); border-color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-libbar-end .ui-muted { color: var(--ink-2); }
/* rd-match-c (RD240): the library bar is a plain line now, so the top bar lifts as on every page */
/* a words box in the bar: a field at the filter buttons' height, its icon inside */
html:not([data-crm],[data-crm-chat]) .ui-lib-search { position: relative; display: flex; align-items: center; margin: 0; flex: none; }
html:not([data-crm],[data-crm-chat]) .ui-lib-search > .ui-i { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
html:not([data-crm],[data-crm-chat]) .ui-lib-search .ui-input { width: 260px; height: 38px; padding: 0 12px 0 36px; font-size: 14px;
  border-radius: var(--r-pill); }

/* the grid beside the panel */
html:not([data-crm],[data-crm-chat]) .ui-lib { display: flex; gap: 20px; align-items: flex-start; }
/* an open panel can always scroll fully into view, even over a short grid */
html:not([data-crm],[data-crm-chat]) .ui-lib:has(.ui-lib-panel > *) { min-height: calc(100vh - var(--ui-header-h) - var(--lib-bar-h, 0px) - 16px); }
html:not([data-crm],[data-crm-chat]) .ui-lib-main { flex: 1; min-width: 0; }
html:not([data-crm],[data-crm-chat]) .ui-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
html:not([data-crm],[data-crm-chat]) .ui-lib-grid > .ui-tile-wrap { display: flex; }
html:not([data-crm],[data-crm-chat]) .ui-lib-grid .ui-tile { flex: 1; min-width: 0; }
html:not([data-crm],[data-crm-chat]) .ui-lib-grid .ui-tile-media { height: auto; aspect-ratio: 4 / 5; background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .ui-lib-grid .ui-tile.selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-lib-grid .ui-tile-star .ui-i,
html:not([data-crm],[data-crm-chat]) .ui-lib-grid .ui-tile-star svg { width: 14px; height: 14px; }

/* the side panel: the floating panel's look (6.14) laid in the page, sticky under the bar */
html:not([data-crm],[data-crm-chat]) .ui-lib-panel { width: 440px; flex: none; position: sticky; top: calc(var(--lib-bar-h, 0px) + 16px);
  max-height: calc(100vh - var(--ui-header-h) - var(--lib-bar-h, 0px) - 32px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--side-line); border-radius: var(--r-side); box-shadow: var(--side-shadow);
  scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-lib-panel:not(:has(> *)) { display: none; }
@supports (corner-shape: squircle) {
  html:not([data-crm],[data-crm-chat]) .ui-lib-panel { corner-shape: squircle; }
}
html:not([data-crm],[data-crm-chat]) .ui-lib-media { background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .ui-lib-media :is(video, img) { display: block; width: 100%; height: 400px; object-fit: contain; background: var(--hover); }
html:not([data-crm],[data-crm-chat]) :where(.ui-lib-pbody) { padding: 16px 20px 20px; }
html:not([data-crm],[data-crm-chat]) .ui-lib-pbody { font-size: 14px; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-lib-phead { display: flex; align-items: center; gap: 8px; }
html:not([data-crm],[data-crm-chat]) .ui-lib-pid { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-lib-kind { padding: 3px 9px; border: 0; border-radius: var(--r-pill); background: var(--hover); font-family: var(--font);
  font-size: 12px; font-weight: 500; line-height: 1.3; letter-spacing: 0; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-lib-x { display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; background: none;
  border: 0; border-radius: var(--r-pill); font-size: 20px; line-height: 1; color: var(--ink-2); text-decoration: none; cursor: pointer; }
html:not([data-crm],[data-crm-chat]) .ui-lib-x:hover { background: var(--hover); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-lib-phead .ui-lib-x { margin: -4px -6px -4px 0; }
html:not([data-crm],[data-crm-chat]) .ui-lib-title { display: block; width: 100%; font-family: var(--font); font-size: 18px; font-weight: 600; line-height: 1.3;
  letter-spacing: -.01em; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) textarea.ui-lib-title { padding: 3px 8px; margin-left: -9px; background: transparent; border: 1px solid transparent;
  border-radius: var(--r-item); resize: none; }
html:not([data-crm],[data-crm-chat]) textarea.ui-lib-title:hover { border-color: var(--line-2); }
html:not([data-crm],[data-crm-chat]) textarea.ui-lib-title:focus { background: var(--surface); border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px var(--ring); }
/* a quiet note on a soft ground (who it is from, a trash note); `.is-err` the CRM gate's error tint */
html:not([data-crm],[data-crm-chat]) .ui-lib-note { margin: 12px 0 0; padding: 10px 14px; background: var(--hover); border: 0; border-radius: var(--r-tile);
  font-size: 13.5px; line-height: 1.5; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-lib-note.is-err { background: color-mix(in oklab, var(--alert-err) 14%, var(--surface)); }
html:not([data-crm],[data-crm-chat]) .ui-lib-note p { margin: 0; font-size: 14px; color: var(--ink); }
/* sections, their labels, quiet words */
html:not([data-crm],[data-crm-chat]) .ui-lib-sec { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-lib-label { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--font); font-size: 12.5px;
  font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-lib-label .by { font-family: var(--font); font-size: 12.5px; font-weight: 400; letter-spacing: 0;
  text-transform: none; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-lib-label .ui-link { margin-left: auto; padding: 0; background: none; border: 0; font-family: var(--font);
  font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-2); cursor: pointer; }
html:not([data-crm],[data-crm-chat]) .ui-lib-label .ui-link:hover { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-lib-quiet { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
/* facts: a key column and its values (the Bank's def-grid) */
html:not([data-crm],[data-crm-chat]) .ui-lib-facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px 12px; font-size: 14px; line-height: 1.45; }
html:not([data-crm],[data-crm-chat]) .ui-lib-facts .k { font-size: 14px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-lib-facts .v { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-lib-facts .v.none { color: var(--ink-3); }
/* tags: 28 px pills with a kind dot (--kind, else --ink-3) */
html:not([data-crm],[data-crm-chat]) .ui-lib-tags { display: flex; flex-wrap: wrap; gap: 6px; }
html:not([data-crm],[data-crm-chat]) .ui-lib-tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px 0 9px; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r-pill); box-shadow: none; font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: none; }
html:not([data-crm],[data-crm-chat]) .ui-lib-tag::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: var(--r-pill); background: var(--kind, var(--ink-3)); }
html:not([data-crm],[data-crm-chat]) a.ui-lib-tag:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
/* a quiet row (a draft that uses it): the edge answers a hover, never a tint */
html:not([data-crm],[data-crm-chat]) .ui-lib-row { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 12px; margin-bottom: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); font-size: 13.5px; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-lib-row:hover { border-color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-lib-row a { font-weight: 500; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); }
html:not([data-crm],[data-crm-chat]) .ui-lib-row a:hover { border-bottom-color: var(--ink); }
/* the buttons at the panel's foot, side by side */
html:not([data-crm],[data-crm-chat]) .ui-lib-foot { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-lib-foot > :is(.ui-btn, form) { flex: 1; margin: 0; }
html:not([data-crm],[data-crm-chat]) .ui-lib-foot :is(.ui-btn) { width: 100%; justify-content: center; }
html:not([data-crm],[data-crm-chat]) .ui-lib-wide { width: 100%; justify-content: center; }

/* ---- the swipe file on the library pieces (templates/swipe.html, swipe/_card.html, _panel.html).
   Its own parts only: the faces of an item with no picture, the read state, the words of a read
   item. The picker's preview on a draft page draws the same panel (`.swipe-page.sw-prev`). */
html:not([data-crm],[data-crm-chat]) main.swipe-page .sw-head { margin-bottom: 20px; }
/* the CTA beat's ink (katski.css --cat-cta is a Light literal) follows the theme */
html:not([data-crm],[data-crm-chat]) .swipe-page { --cat-cta: var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-filters .sw-starpill .ui-i { width: 16px; height: 16px; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-filters .sw-starpill.on .ui-i { fill: currentColor; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-tagmenu { min-width: 260px; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-notice { margin-bottom: 20px; }
html:not([data-crm],[data-crm-chat]) .swipe-page .av-refuse { margin: 0 0 12px; padding: 12px 14px; background: color-mix(in oklab, var(--alert-err) 14%, var(--surface));
  border: 0; border-radius: var(--r-tile); }
html:not([data-crm],[data-crm-chat]) .swipe-page .av-refuse .t { font-size: 14px; font-weight: 600; color: var(--ink); }
/* faces: a platform's name, or the notes it was saved as */
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-face { position: relative; display: grid; place-items: center; overflow: hidden; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-face img { width: 100%; height: 100%; object-fit: cover; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-face.plat .g { font: 600 13.5px var(--font); letter-spacing: .04em; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-face.text { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  gap: 6px; padding: 40px 14px 34px; color: var(--ink); text-align: left; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-face.text .k { font-size: 12px; font-weight: 500; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-face.text .b { font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-face.text .n { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); display: -webkit-box;
  -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-face.text .p { position: absolute; left: 14px; right: 14px; bottom: 10px; font-size: 12px;
  color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-face .sw-state { position: absolute; left: 8px; bottom: 8px; z-index: 1; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-face .sw-badge { position: absolute; top: 8px; left: 8px; z-index: 1; padding: 2px 8px; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-face .sw-dur { position: absolute; right: 8px; bottom: 8px; z-index: 1; padding: 2px 8px; font-variant-numeric: tabular-nums; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-face .sw-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center;
  width: 40px; height: 40px; margin: -20px 0 0 -20px; z-index: 1; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-face .sw-play svg { width: 14px; height: 14px; }
/* a tile's sub-line: id, where it stands, who added it at the end */
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-meta { display: flex; align-items: center; min-width: 0; margin-top: 4px; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-meta .sw-id { flex: none; white-space: nowrap; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-meta .sw-mw { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-meta .sw-by { margin-left: auto; padding-left: 8px; display: inline-flex; flex: none; }
/* the star: on a card the shared tile star (6.12); in the panel's head an outline pill */
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-starform { margin: 0; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-star { cursor: pointer; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-star.on svg { fill: currentColor; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-star svg { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-star-panel { margin-left: auto; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-star-panel .sw-star { width: auto; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 10px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-pill); font-family: var(--font); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-star-panel .sw-star:hover { background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-star-panel .sw-star svg { width: 14px; height: 14px; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-star-word { font-size: 13.5px; font-weight: 500; }
/* the panel: a phone's bar (shown only on a phone), the read parts */
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-phonebar { display: none; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-media.still img { max-height: 400px; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-textface { padding: 20px 20px 18px; background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-textface .k { font-size: 12px; font-weight: 500; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-textface .b { margin-top: 6px; font-size: 16.5px; font-weight: 600; line-height: 1.3; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-textface .p { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-title { display: block; margin: 10px 0 0; }
html:not([data-crm],[data-crm-chat]) .swipe-page :is(.sw-from, .sw-run) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px;
  font-size: 13.5px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-from a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-from a:hover { text-decoration-color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-run .days-pill { font-family: var(--font); letter-spacing: 0; padding: 2px 9px; border: 0; border-radius: var(--r-pill); background: var(--hover);
  font-size: 12.5px; font-weight: 500; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-readline { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-readline .sw-state { flex: none; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-fail .t { display: flex; margin-bottom: 4px; font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-fail .acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-fail .acts form { margin: 0; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-desc { margin: 12px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-desc.sw-first { margin: 0; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-beatslabel { margin: 14px 0 8px; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-beats { border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-beat { display: grid; grid-template-columns: 64px 72px minmax(0, 1fr); gap: 8px; align-items: baseline;
  padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-beat:first-child { border-top: 0; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-beat .beat-time { white-space: nowrap; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-beat .beat-text { font-size: 13.5px; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-said { position: relative; max-height: 132px; overflow: hidden; font-size: 14px; line-height: 1.6; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-said::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px;
  background: linear-gradient(transparent, var(--surface)); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-said.open { max-height: none; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-said.open::after { display: none; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-said .t { margin-right: 4px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-more { margin-top: 6px; padding: 0; background: none; border: 0; font: 500 13px var(--font); color: var(--ink);
  cursor: pointer; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-post { font-size: 14px; line-height: 1.5; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-counts { margin-top: 6px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
html:not([data-crm],[data-crm-chat]) .swipe-page :is(.sw-tagform, .sw-noteform) { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-tagform[hidden] { display: none; }
html:not([data-crm],[data-crm-chat]) .swipe-page :is(.sw-tagform, .sw-noteform) .ui-textarea { flex: 1; min-width: 0; min-height: 36px; padding: 7px 12px;
  font-size: 14px; resize: vertical; field-sizing: content; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-seg { flex-wrap: wrap; margin: 0; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-seg button { cursor: pointer; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-note { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
html:not([data-crm],[data-crm-chat]) .swipe-page .ui-lib-label + .sw-note { padding-top: 0; border-top: 0; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-note .who { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; font-size: 12.5px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-note .who b { font-weight: 600; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-agent { font-size: 12px; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-used .sw-cid { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-used .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-used .nt { color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .swipe-page .trash-note .trash-held { margin-bottom: 4px; font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .swipe-page .trash-note form { margin: 10px 0 0; }
/* the attach on an item with no file (SP10): the file input stays out of sight */
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-attach p { margin: 6px 0 10px; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-attachform { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-attachfile { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-attachsaid { font-size: 13px; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-attachsaid.bad { color: var(--danger); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-attachlimit { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
/* the trash: the shared list of rows */
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-trash .trash-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-trash .trash-row.selected { background: var(--hover); box-shadow: inset 0 0 0 1px var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-trash .sw-tthumb.text { background: var(--hover); color: var(--ink-2); font-size: 11px; font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-trash form { margin: 0; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-trashsub { white-space: normal; flex-wrap: wrap; }
/* the Add box: a card under the bar holding the References box (review/_refs.html, review.js).
   review.css belongs to the parked ad-making pages, so its rules are not restyled there: the few
   that reach this box are met here, on the tokens. */
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox { margin: 0 0 24px; padding: 0; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox { --rv-wine: var(--danger); --rv-wine-bg: var(--danger-soft); --rv-wine-edge: var(--line-2);
  --rv-ro-bg: var(--hover); --rv-op: var(--ed); --rv-rowhover: var(--hover); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox[hidden] { display: none; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addhead { display: flex; align-items: center; gap: 12px; padding: 16px 14px 0 20px; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addhead .t { font-size: 16.5px; font-weight: 600; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addhead .sw-sub { font-size: 13.5px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addhead .ui-lib-x { margin-left: auto; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-refs { margin: 14px 20px 18px; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-refadd { padding: 14px; gap: 10px; border: 1.5px dashed var(--line-2); border-radius: var(--r-tile); background: none; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-refadd.drag { border-style: solid; border-color: var(--focus); box-shadow: 0 0 0 3px var(--ring); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-field { min-height: 38px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-ctl); font-family: var(--font); font-size: 14px; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-field::placeholder { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-field:hover { border-color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-field:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px var(--ring); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-btn { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r-pill); font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-btn:hover:not(:disabled) { background: var(--hover); border-color: var(--line-2); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-reflimit { font-size: 13px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-reflist { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-tile); overflow: hidden; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-ref { border-top: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-ref:first-child { border-top: 0; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-ref:hover { box-shadow: none; background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-refthumb { background: var(--hover); border: 0; border-radius: var(--r-item); overflow: hidden; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-refthumb .dur { background: var(--media-scrim); color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox :is(.rv-refsrc .rv-mono, .rv-refwhat .step, .rv-refwhat a) { color: var(--ed); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-refx { border-radius: var(--r-pill); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addbox .rv-refx:hover { background: var(--hover); border-color: transparent; }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addfoot { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addfoot .sp { flex: 1; }

@media (max-width: 1280px) {
  html:not([data-crm],[data-crm-chat]) main:has(.ui-libbar) { --lib-pad: 24px; }
}
@media (max-width: 767px) {
  html:not([data-crm],[data-crm-chat]) .ui-bar.ui-libbar { grid-template-columns: minmax(0, 1fr); }
  html:not([data-crm],[data-crm-chat]) .ui-libbar-main > .ui-filters { flex-wrap: wrap; }
  html:not([data-crm],[data-crm-chat]) .ui-libbar-end { flex-wrap: wrap; }
  html:not([data-crm],[data-crm-chat]) .ui-lib-search { flex: 1 0 220px; }
  html:not([data-crm],[data-crm-chat]) .ui-lib-search .ui-input { width: 100%; font-size: 16px; }
  html:not([data-crm],[data-crm-chat]) .ui-lib { flex-direction: column; }
  html:not([data-crm],[data-crm-chat]) .ui-lib-main { width: 100%; }
  html:not([data-crm],[data-crm-chat]) .ui-lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  html:not([data-crm],[data-crm-chat]) .ui-lib-grid .ui-tile-star button { opacity: 1; }
  /* the swipe panel is a sheet over the whole screen, its phone bar on top */
  html:not([data-crm],[data-crm-chat]) .swipe-page .ui-lib-panel { position: fixed; inset: 0; z-index: 60; width: auto; max-height: none; border: 0; border-radius: 0; }
  html:not([data-crm],[data-crm-chat]) .swipe-page .sw-phonebar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 3; height: 48px;
    padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
  html:not([data-crm],[data-crm-chat]) .swipe-page .sw-phonebar a { color: var(--ink); text-decoration: none; }
  html:not([data-crm],[data-crm-chat]) .swipe-page .sw-phonebar .sp { flex: 1; }
  html:not([data-crm],[data-crm-chat]) .swipe-page .sw-phonebar .sw-phonex { margin-left: 8px; font-size: 20px; }
  html:not([data-crm],[data-crm-chat]) .swipe-page .sw-phead .ui-lib-x { display: none; }
  html:not([data-crm],[data-crm-chat]) .swipe-page .sw-beat { grid-template-columns: 64px minmax(0, 1fr); }
  html:not([data-crm],[data-crm-chat]) .swipe-page .sw-beat .beat-text { grid-column: 1 / -1; }
  html:not([data-crm],[data-crm-chat]) .swipe-page :is(.sw-tagform, .sw-noteform) .ui-textarea, html:not([data-crm],[data-crm-chat]) .swipe-page textarea.ui-lib-title { font-size: 16px; }
  html:not([data-crm],[data-crm-chat]) .swipe-page .sw-trash .trash-row { grid-template-columns: 40px minmax(0, 1fr); }
  html:not([data-crm],[data-crm-chat]) .swipe-page .sw-trash form { grid-column: 2; }
  html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addhead .sw-sub { display: none; }
  html:not([data-crm],[data-crm-chat]) .swipe-page .sw-addfoot { flex-wrap: wrap; }
}
/* ==== rd-b4b end */

/* ==== rd-b4b2 start: an index beside a detail, beat categories in Dark, the Ad frameworks page
   (DESIGN-SYSTEM 6.45-6.47; RD123-RD129). Tokens only; sizes in :where() where a page may tune. */
/* 6.45 the index list: a rounded list card whose rows are pills that light on hover and carry the
   open item's ring (the library tile's selected look, 6.44), its head a title and a count, its foot
   a quiet line. Markup: .ui-list.ui-index > .ui-index-head + rows .ui-index-row + .ui-index-foot */
html:not([data-crm],[data-crm-chat]) .ui-index { background: var(--surface); border: 1px solid var(--line); border-radius: var(--rpage);
  box-shadow: var(--shadow); overflow: hidden; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) :where(.ui-index-head) { display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 18px 20px 12px; }
html:not([data-crm],[data-crm-chat]) .ui-index-head { background: transparent; border: 0; border-bottom: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-index-head h3 { margin: 0; font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-index-head .ui-count { font-size: 13px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
html:not([data-crm],[data-crm-chat]) :where(.ui-index-row) { display: block; margin: 4px 8px; padding: 12px 14px; }
html:not([data-crm],[data-crm-chat]) .ui-index-row { border: 0; border-radius: var(--r-tile); color: var(--ink); text-decoration: none;
  background: transparent; box-shadow: none; transition: background .12s; }
html:not([data-crm],[data-crm-chat]) .ui-index-row:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
html:not([data-crm],[data-crm-chat]) .ui-index-row:focus-visible { outline: none; box-shadow: var(--ring); }
html:not([data-crm],[data-crm-chat]) :is(.ui-index-row.selected, .ui-index-row[aria-current="true"]) { background: var(--hover);
  box-shadow: inset 0 0 0 1px var(--ink); }
html:not([data-crm],[data-crm-chat]) :where(.ui-index-foot) { padding: 12px 20px 16px; }
html:not([data-crm],[data-crm-chat]) .ui-index-foot { border-top: 1px solid var(--line); font: 400 13px/1.5 var(--font); letter-spacing: 0;
  text-transform: none; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-index .ui-empty { margin: 0; border: 0; }
@supports (corner-shape: squircle) {
  html:not([data-crm],[data-crm-chat]) .ui-index { corner-shape: squircle; }
}

/* 6.46 the beat category: katski.css's --cat-* are Light values; Dark gets its own steps (AA on
   --surface and --canvas), the CTA beat the theme's ink. tokens.css holds the values. The tag
   itself (macros/ui.html beat_cat): words 12.5 px 600 in the category colour, small caps, a 9 px
   rounded swatch. */
html:not([data-crm],[data-crm-chat]) .fw-page .beat-cat { display: flex; align-items: center; gap: 7px;
  font: 600 12.5px/1.3 var(--font); letter-spacing: .04em; text-transform: uppercase; }
html:not([data-crm],[data-crm-chat]) .fw-page .cat-swatch { width: 9px; height: 9px; border-radius: 3px; }

/* ---- Ad frameworks (/frameworks): the glass bar (6.44) with the words box and Highlight's
   toggles, the index (6.45) beside the open framework on a card (6.10) */
html:not([data-crm],[data-crm-chat]) .fw-page .ui-lib-search .ui-input { width: 340px; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-count { font-size: 13.5px; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-legend { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-legend-l { margin-right: 4px; font-size: 13.5px; color: var(--glass-ink-2); }
html:not([data-crm],[data-crm-chat]) .fw-page .legend-chip { height: 38px; padding: 0 14px; gap: 8px; font-size: 14px; font-weight: 500; }
html:not([data-crm],[data-crm-chat]) .fw-page .legend-chip .cat-swatch { width: 9px; height: 9px; border-radius: 3px; box-shadow: none; }
html:not([data-crm],[data-crm-chat]) .fw-page .legend-chip.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .fw-page .legend-name { font: inherit; letter-spacing: 0; }

html:not([data-crm],[data-crm-chat]) .fw-page .fw-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 24px; align-items: start; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-side { gap: 0; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-row-top { display: flex; align-items: baseline; gap: 8px; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-id { font: 500 12.5px var(--mono); letter-spacing: 0; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-stat { font: 400 12.5px var(--font); color: var(--ink-3); font-variant-numeric: tabular-nums; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-name,
html:not([data-crm],[data-crm-chat]) .fw-page .fw-row.selected .fw-name { margin-top: 3px; font-size: 15px; font-weight: 600; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-row.selected .fw-id { color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-brand { margin-top: 2px; font-size: 13.5px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-spine { display: flex; gap: 3px; height: 8px; margin-top: 12px; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-spine .seg { flex: 1; min-width: 4px; border-radius: 3px; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-spine .seg.note { background: transparent; border: 1px dashed var(--line-2); }

html:not([data-crm],[data-crm-chat]) .fw-page .fw-detail { min-width: 0; padding: 24px 28px 28px; }
@supports (corner-shape: squircle) {
  html:not([data-crm],[data-crm-chat]) .fw-page .fw-detail { corner-shape: squircle; }
}
html:not([data-crm],[data-crm-chat]) .fw-page .fw-detail-head { align-items: flex-start; margin: 0 0 4px; padding: 0; border: 0; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-detail-head h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.015em; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-detail-head .ui-meta { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-head-meta { display: block; margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-draftword { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; letter-spacing: -.005em; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-body { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; padding: 0;
  margin-top: 20px; align-items: start; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-media-card { position: sticky; top: calc(var(--lib-bar-h, 62px) + 16px); padding: 0;
  background: transparent; border: 0; box-shadow: none; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-media { position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  background: var(--media-ground); border-radius: var(--r-tile); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-nomedia { display: grid; place-items: center; background: var(--hover); color: var(--ink-2); font-size: 13.5px; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-cover .play-btn { width: 52px; height: 52px; background: var(--media-play); border: 0;
  box-shadow: none; backdrop-filter: blur(6px); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-cover .play-tri { border-left-color: var(--on-fill); margin-left: 4px; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-cover:hover .play-btn { background: var(--media-scrim); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-cover:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-tile); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-media-meta { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-media-nums { margin-top: 4px; font: 400 12.5px var(--mono); letter-spacing: 0; color: var(--ink-3); }

html:not([data-crm],[data-crm-chat]) .fw-page .fw-beats .card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 0 0 4px; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-beats .card-head .fw-h3 { margin: 0; }
html:not([data-crm],[data-crm-chat]) .fw-page .beat-hint { margin-left: auto; font-size: 13px; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-beat { display: grid; grid-template-columns: 36px 180px minmax(0, 1fr); gap: 12px;
  align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); background: transparent; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-beat:last-of-type { border-bottom: 0; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-beat .beat-time { font: 400 12.5px var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-bucket { display: block; margin: 4px 0 0 16px; font: 500 12px var(--font); letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-beat .beat-text { max-width: 720px; font-size: 14.5px; line-height: 1.55; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-beat.is-note .beat-text { color: var(--ink-2); font-style: italic; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-foot { max-width: 820px; margin-top: 24px; padding: 14px 0 0; border-top: 1px solid var(--line);
  font: 400 13.5px/1.55 var(--font); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .fw-page .detail-lower { padding: 0; margin-top: 28px; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-notes { padding: 0; margin: 0; background: transparent; border: 0; box-shadow: none; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-note-grid { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 16px; margin: 0;
  font-size: 14.5px; }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-note-key { font: 600 12.5px var(--mono); letter-spacing: 0; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-note-text { max-width: 720px; font-size: 14.5px; line-height: 1.55; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .fw-page .fw-note-src { max-width: 720px; margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
@media (max-width: 1100px) {
  html:not([data-crm],[data-crm-chat]) .fw-page .fw-layout,
  html:not([data-crm],[data-crm-chat]) .fw-page .fw-body { grid-template-columns: minmax(0, 1fr); }
  html:not([data-crm],[data-crm-chat]) .fw-page .fw-media-card { position: static; max-width: 320px; }
}
@media (max-width: 767px) {
  html:not([data-crm],[data-crm-chat]) .fw-page .ui-lib-search { flex: 1 0 220px; }
  html:not([data-crm],[data-crm-chat]) .fw-page .ui-lib-search .ui-input { width: 100%; font-size: 16px; }
  html:not([data-crm],[data-crm-chat]) .fw-page .ui-libbar { grid-template-columns: minmax(0, 1fr); }
  html:not([data-crm],[data-crm-chat]) .fw-page .fw-legend { flex-wrap: wrap; }
  html:not([data-crm],[data-crm-chat]) .fw-page .fw-beat { grid-template-columns: 30px minmax(0, 1fr); }
  html:not([data-crm],[data-crm-chat]) .fw-page .fw-beat .beat-text { grid-column: 1 / -1; }
}
/* ---- Avatars (/avatars): the roster as media tiles (6.12), the open person on a card (6.10),
   the radar on its own tokens (6.47), the counting rules and the section editor as dialogs (6.13) */
html:not([data-crm],[data-crm-chat]) .av-page .av-intro { margin: 8px 0 0; max-width: 760px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .av-page .av-copyall { display: flex; align-items: center; gap: 8px; margin-left: auto; }
html:not([data-crm],[data-crm-chat]) .av-page .av-copyone { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
html:not([data-crm],[data-crm-chat]) .av-page .av-copysaid { font-size: 13px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .av-page .av-copysaid.bad { color: var(--danger); }
html:not([data-crm],[data-crm-chat]) .av-page .av-copy.copied { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .av-page .av-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px;
  margin: 0 0 32px; padding: 0; border: 0; }
html:not([data-crm],[data-crm-chat]) .av-page .av-cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
html:not([data-crm],[data-crm-chat]) .av-page .av-tile { display: block; flex: 1 0 auto; padding: 0; transform: none; }
html:not([data-crm],[data-crm-chat]) .av-page .av-tile .av-face { display: block; background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .av-page .av-tile img { display: block; width: 100%; height: auto; border: 0; border-bottom: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .av-page .av-tilename { display: block; margin: 0; padding: 10px 12px 0; font-size: 14px; font-weight: 600;
  line-height: 1.35; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .av-page .av-tileid { display: block; margin: 0; padding: 3px 12px 12px; font: 400 13px var(--font);
  letter-spacing: 0; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .av-page .av-tileid i { font-style: normal; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .av-page .av-copyone .ui-btn { align-self: flex-start; }

/* the open person */
html:not([data-crm],[data-crm-chat]) .av-page .av-profile { padding: 28px 32px 24px; }
@supports (corner-shape: squircle) {
  html:not([data-crm],[data-crm-chat]) .av-page .av-profile { corner-shape: squircle; }
}
html:not([data-crm],[data-crm-chat]) .av-page .av-head { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
html:not([data-crm],[data-crm-chat]) .av-page .av-portrait .av-face { border-radius: var(--r-tile); overflow: hidden; background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .av-page .av-portrait img { border: 1px solid var(--line); border-radius: var(--r-tile); }
html:not([data-crm],[data-crm-chat]) .av-page .av-basis { margin: 10px 0 0; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .av-page .av-idline { display: flex; align-items: center; flex-wrap: wrap; gap: 0; margin-bottom: 10px;
  font-size: 14px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .av-page .av-id { font: 600 14px var(--mono); letter-spacing: 0; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .av-page :is(.av-kind, .av-chip),
html:not([data-crm],[data-crm-chat]) .av-page .av-kind.layer { padding: 0; font: 400 14px var(--font); letter-spacing: 0; text-transform: none;
  color: var(--ink-2); background: none; border: 0; }
html:not([data-crm],[data-crm-chat]) .av-page .av-idline > :is(.av-kind, .av-chip)::before { content: "\00b7"; padding: 0 .5em; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .av-page .av-editall { margin-left: auto; }
html:not([data-crm],[data-crm-chat]) .av-page .av-editall[aria-pressed="true"] { color: var(--ink); background: var(--hover); border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink); }
html:not([data-crm],[data-crm-chat]) .av-page .av-profile h2 { margin: 0 0 10px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .av-page .av-oneline { max-width: 62ch; margin: 0 0 18px; font-size: 16.5px; line-height: 1.5; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .av-page :is(.av-leadhead, .av-fb h3, .av-keyhead h3) { margin: 0; font-size: 15px; font-weight: 600;
  letter-spacing: -.005em; text-transform: none; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .av-page .av-fbhead { display: flex; align-items: center; gap: 10px; min-height: 32px; margin-bottom: 6px; }
html:not([data-crm],[data-crm-chat]) .av-page .av-lead p { max-width: 70ch; font-size: 15px; line-height: 1.65; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .av-page .av-edit { margin-left: auto; }

/* the radar and its key */
html:not([data-crm],[data-crm-chat]) .av-page .av-radar { gap: 40px; margin: 32px 0 8px; padding: 28px 0 8px; border-top: 1px solid var(--line);
  border-bottom: 0; }
html:not([data-crm],[data-crm-chat]) .av-page .av-plot .ring { fill: none; stroke: var(--line); }
html:not([data-crm],[data-crm-chat]) .av-page .av-plot .ring.outer { stroke: var(--line-2); }
html:not([data-crm],[data-crm-chat]) .av-page .av-plot .spoke { stroke: var(--line); }
html:not([data-crm],[data-crm-chat]) .av-page .av-plot .axnum { font-family: var(--font); font-size: 12px; fill: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .av-page .av-plot .shape { fill: var(--radar-fill); stroke: var(--radar); }
html:not([data-crm],[data-crm-chat]) .av-page .av-plot .vx { fill: var(--radar); stroke: var(--surface); }
html:not([data-crm],[data-crm-chat]) .av-page .av-keyhead { display: flex; align-items: baseline; gap: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line-2); }
html:not([data-crm],[data-crm-chat]) .av-page .av-scale { margin-left: auto; font: 500 12.5px var(--font); letter-spacing: .04em; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .av-page .av-krow { grid-template-columns: 14px minmax(0, 1fr) 120px 44px; gap: 12px; padding: 12px 0 12px 4px;
  border-bottom: 1px solid var(--line); border-left: 0; }
html:not([data-crm],[data-crm-chat]) .av-page .av-mark { border-radius: 3px; background: var(--radar); }
html:not([data-crm],[data-crm-chat]) .av-page .av-mark.riskm { background: var(--radar-risk); }
html:not([data-crm],[data-crm-chat]) .av-page .av-mark.gapm { background: transparent; border: 1.5px dashed var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .av-page .av-klab .l { font-size: 15px; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .av-page .av-klab .l .n { margin-right: 6px; font: 400 12.5px var(--font); font-style: normal; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .av-page .av-klab .raw { font-size: 13px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .av-page .av-meter { height: 7px; border-radius: var(--r-pill); overflow: hidden; background: var(--radar-soft); }
html:not([data-crm],[data-crm-chat]) .av-page .av-meter i { border-radius: var(--r-pill); background: var(--radar); }
html:not([data-crm],[data-crm-chat]) .av-page .av-meter.riskm { background: var(--radar-risk-soft); }
html:not([data-crm],[data-crm-chat]) .av-page .av-meter.riskm i { background: var(--radar-risk); }
html:not([data-crm],[data-crm-chat]) .av-page .av-val { font-size: 16.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
html:not([data-crm],[data-crm-chat]) .av-page .av-unm { font-size: 12.5px; letter-spacing: .04em; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .av-page .av-unm i { border-top-color: var(--ink-3); }

/* the sections */
html:not([data-crm],[data-crm-chat]) .av-page .av-facts { gap: 0 48px; }
html:not([data-crm],[data-crm-chat]) .av-page .av-fb { padding: 22px 0 18px; border-top: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .av-page .av-fb h4 { margin: 14px 0 6px; font-size: 15px; font-weight: 600; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .av-page :is(.av-fb p, .av-fb li) { font-size: 14.5px; line-height: 1.6; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .av-page .av-fb strong { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .av-page .av-fb a { color: var(--ink); border-bottom-color: var(--line-2); }
html:not([data-crm],[data-crm-chat]) .av-page .av-quotes li { border-left: 2px solid var(--line-2); }
html:not([data-crm],[data-crm-chat]) .av-page :is(.av-quotes .cite, .av-fb code, .av-note code) { font: 400 12.5px var(--mono); letter-spacing: 0; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .av-page .av-table th { font: 500 13px var(--font); letter-spacing: 0; text-transform: none; color: var(--ink-2);
  border-bottom: 1px solid var(--line-2); }
html:not([data-crm],[data-crm-chat]) .av-page .av-table td { font-size: 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .av-page .av-note { margin: 18px 0 0; padding-top: 14px; font-size: 13px; color: var(--ink-3); border-top: 1px solid var(--line); }
/* a section's marks (rule 19: a status tag is flat, a soft tint, a hairline edge, small caps) */
html:not([data-crm],[data-crm-chat]) .av-page .av-pend { font-size: 13px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .av-page .av-pend i { padding: 2px 8px; font: 600 11.5px/1.5 var(--font); letter-spacing: .04em;
  color: var(--st-waiting); background: var(--st-waiting-soft); border: 1px solid var(--line); border-radius: var(--r-pill); }
html:not([data-crm],[data-crm-chat]) .av-page .av-pend.look i { color: var(--st-back); background: var(--st-back-soft); }
html:not([data-crm],[data-crm-chat]) .av-page .av-pend.landed i { color: var(--st-idle); background: var(--st-idle-soft); }
html:not([data-crm],[data-crm-chat]) .av-page .av-fb.look { padding-left: 14px; box-shadow: inset 3px 0 0 var(--st-back); }
html:not([data-crm],[data-crm-chat]) .av-page .av-looknote { font-size: 13.5px; color: var(--st-back); }
html:not([data-crm],[data-crm-chat]) .av-page .av-warnline { padding: 10px 14px; font-size: 13.5px; line-height: 1.55; color: var(--ink);
  background: var(--st-waiting-soft); border: 1px solid var(--line); border-radius: var(--r-tile); }
html:not([data-crm],[data-crm-chat]) .av-page .av-was { background: var(--hover); border: 1px solid var(--line); border-radius: var(--r-tile); }
html:not([data-crm],[data-crm-chat]) .av-page .av-empty { padding: 40px 24px; }

/* the counting rules and the editor: the shared dialog (6.13) at their own widths */
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog.av-modal { width: min(620px, calc(100vw - 32px)); max-width: none; padding: 0; }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog.av-editor { width: min(760px, calc(100vw - 32px)); }
html:not([data-crm],[data-crm-chat]) .av-modal .av-modalhead { display: flex; align-items: center; gap: 12px; padding: 22px 24px 14px;
  border-bottom: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .av-modal .av-modalhead h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em;
  text-transform: none; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .av-modal .av-modalhead h3 .sec { margin-left: 6px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .av-modal .av-modalx { margin-left: auto; }
html:not([data-crm],[data-crm-chat]) .av-modal .av-rules { padding: 8px 24px 0; }
html:not([data-crm],[data-crm-chat]) .av-modal .av-rules li { border-bottom: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .av-modal .av-rules .n { font-style: normal; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .av-modal .av-rules .a { font-size: 15px; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .av-modal :is(.av-rules .r, .av-modalnotes p) { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .av-modal .av-modalnotes { padding: 4px 24px 0; }
html:not([data-crm],[data-crm-chat]) .av-modal .av-modalfoot { padding: 14px 24px 20px; font: 400 13px var(--font); letter-spacing: 0; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .av-editor .av-editbody { padding: 18px 24px 4px; }
html:not([data-crm],[data-crm-chat]) .av-editor .av-ta { min-height: 330px; padding: 12px 14px; font: 400 13px/1.62 var(--mono); }
html:not([data-crm],[data-crm-chat]) .av-editor .av-editnote { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .av-editor .av-editnote code { font: 400 12.5px var(--mono); color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .av-editor .av-what summary { font-size: 13px; color: var(--ink); border-bottom-color: var(--line-2); }
html:not([data-crm],[data-crm-chat]) .av-editor .av-what li { font-size: 13.5px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .av-editor .av-what li::before { background: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .av-editor .av-editfoot { gap: 8px; margin-top: 16px; padding: 16px 24px 20px; border-top: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .av-editor .av-editfoot .who { font-size: 13px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .av-editor :is(.av-refuse, .av-warned) { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-tile); }
html:not([data-crm],[data-crm-chat]) .av-editor .av-refuse { background: var(--danger-soft); }
html:not([data-crm],[data-crm-chat]) .av-editor .av-refuse .t { color: var(--danger); }
html:not([data-crm],[data-crm-chat]) .av-editor .av-warned { background: var(--st-waiting-soft); }
html:not([data-crm],[data-crm-chat]) .av-editor :is(.av-refuse, .av-warned) .t { font-size: 14px; font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .av-editor :is(.av-refuse, .av-warned) p { font-size: 13.5px; color: var(--ink); }
@media (max-width: 1100px) {
  html:not([data-crm],[data-crm-chat]) .av-page .av-head { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 767px) {
  html:not([data-crm],[data-crm-chat]) .av-page .av-roster { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 24px; }
  html:not([data-crm],[data-crm-chat]) .av-page .av-tilename { padding: 8px 8px 0; font-size: 13.5px; }
  html:not([data-crm],[data-crm-chat]) .av-page .av-tileid { padding: 2px 8px 8px; }
  html:not([data-crm],[data-crm-chat]) .av-page .av-profile { padding: 20px 16px; }
  html:not([data-crm],[data-crm-chat]) .av-page .av-head { grid-template-columns: minmax(0, 1fr); }
  html:not([data-crm],[data-crm-chat]) .av-page .av-portrait { max-width: 220px; }
  html:not([data-crm],[data-crm-chat]) .av-page .av-facts { grid-template-columns: minmax(0, 1fr); }
}
/* ==== rd-b4b2 end */
/* ==== module builder start: the merge of train 3 + 4 */
/* an admin who is not a batch set's owner: the master's chat note above it (fix G) */
.pk-ownchat { display: grid; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--ui-line); }
.pk-ownchat p { margin: 0; }
/* "+ agent" beside a person (the attribution contract), grey words */
.pk-agent { font-size: var(--ui-fs-xs); white-space: nowrap; }
/* ==== module builder end */
/* ==== release E part 2, lane M (P4) start: the menu (the lit item in the accent, the fold
   button, the open campaign, set and ad nested under My campaigns), the header's ONE
   labelled trail and the siblings strip under the header (M8, M9, M10; templates/base.html
   and templates/macros/home.html draw them). The nested items are nav.sub's (its markup is
   the katski-sandbox's); these rules reach only the My campaigns list, data-nav-sub
   "campaigns", so the Sandbox's own rules sit beside them. Sharp corners. */
html.v2 { --ui-accent: #c25e2a; --ui-accent-text: #a4511f; --ui-lit: #f9efe7; }
/* the lit item: filled in the accent, its icon in the accent, never the faint grey */
.ui-sidebar .ui-nav-item.active { background: var(--ui-lit); color: var(--ui-accent-text); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--ui-accent); }
.ui-sidebar .ui-nav-item.active .ui-i { color: var(--ui-accent); }
/* mk-fix S1 (b2.js:323, b2.css:94 .m2-item.path): while a nested campaign, set or ad is the
   lit item, My campaigns is its path: the label bold in the ink, no lit background */
.ui-sidebar .ui-nav-item.is-lit:not(.active) { color: var(--ui-fg); font-weight: 600; }
/* the brand row: the logo, then the fold button at the top of the menu */
.ui-brand-row { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.ui-brand-row .ui-brand { flex: 1; min-width: 0; margin-bottom: 0; }
.ui-fold { width: 34px; height: 34px; flex: none; display: inline-grid; place-items: center; padding: 0; border: 0;
  background: none; color: #525252; cursor: pointer; }
.ui-fold:hover { background: #ebebe6; color: var(--ui-fg); }
/* the open campaign > set > ad under My campaigns, each with its level word before its name */
.ui-sidebar .ui-nav-sub[data-nav-sub="campaigns"] { display: flex; flex-direction: column; gap: 1px;
  margin: 2px 0 6px 21px; padding-left: 8px; border-left: 1px solid #d6d2ca; }
.ui-sidebar [data-nav-sub="campaigns"] .ui-nav-sub { display: flex; flex-direction: column; gap: 1px;
  margin: 1px 0 2px 10px; padding-left: 8px; border-left: 1px solid #d6d2ca; }
.ui-sidebar [data-nav-sub="campaigns"] .ui-nav-row { display: flex; align-items: center; min-width: 0; }
.ui-sidebar [data-nav-sub="campaigns"] .ui-nav-child { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px;
  min-height: 34px; padding: 7px 10px; font-size: var(--ui-fs-sm); color: #3f3c35; }
.ui-sidebar [data-nav-sub="campaigns"] .ui-nav-child:hover { background: #ebebe6; color: var(--ui-fg); }
.ui-sidebar [data-nav-sub="campaigns"] .ui-nav-child .ui-nav-w { min-width: 0; white-space: normal; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.ui-sidebar [data-nav-sub="campaigns"] .ui-nav-child[data-nav-key]::before { flex: none; font-size: var(--ui-fs-xs);
  font-weight: 400; color: var(--ui-muted-fg); }
.ui-sidebar [data-nav-sub="campaigns"] .ui-nav-child[data-nav-key="campaign"]::before { content: "campaign:"; }
.ui-sidebar [data-nav-sub="campaigns"] .ui-nav-child[data-nav-key="set"]::before { content: "set:"; }
.ui-sidebar [data-nav-sub="campaigns"] .ui-nav-child[data-nav-key="ad"]::before { content: "ad:"; }
.ui-sidebar [data-nav-sub="campaigns"] .ui-nav-child.is-lit .ui-nav-w { color: var(--ui-fg); font-weight: 600; }
.ui-sidebar [data-nav-sub="campaigns"] .ui-nav-child.active { background: var(--ui-lit); color: var(--ui-accent-text);
  font-weight: 600; box-shadow: inset 3px 0 0 var(--ui-accent); }
.ui-sidebar [data-nav-sub="campaigns"] .ui-nav-child.active::before { color: var(--ui-accent-text); }
/* folded: icons only, the page name beside an item when the pointer or the focus is on it
   (base.html's script puts its height in --ui-tip-y), the lit item kept; a phone keeps its
   sheet */
@media (min-width: 768px) {
  html[data-menu="folded"] .ui-sidebar { width: 64px; padding: 12px 8px; overflow-x: hidden; }
  html[data-menu="folded"] .ui-brand-row { flex-direction: column; gap: 8px; }
  html[data-menu="folded"] .ui-brand { font-size: 0; gap: 0; padding: 0; justify-content: center; }
  html[data-menu="folded"] .ui-nav-label { height: 1px; padding: 0; margin: 10px 6px; font-size: 0;
    background: var(--zone-side-border); }
  html[data-menu="folded"] .ui-sidebar .ui-nav-item { display: flex; justify-content: center; gap: 0; height: 40px;
    min-height: 40px; padding: 0; }
  html[data-menu="folded"] .ui-sidebar .ui-nav-item > :not(.ui-i):not(.ui-nav-w) { display: none; }
  html[data-menu="folded"] .ui-sidebar .ui-nav-item .ui-nav-w { position: fixed; left: 72px; top: var(--ui-tip-y, -200px);
    z-index: 90; transform: translateY(-50%); padding: 5px 10px; background: var(--ui-fg); color: #fff;
    font-size: var(--ui-fs-sm); font-weight: 500; white-space: nowrap; overflow: visible; pointer-events: none; opacity: 0; }
  html[data-menu="folded"] .ui-sidebar .ui-nav-item:is(:hover, :focus-visible) .ui-nav-w { opacity: 1; }
  html[data-menu="folded"] .ui-sidebar :is(.ui-nav-sub, [data-nav-sub]) { display: none; }
  html[data-menu="folded"] .ui-nav-foot .ui-user { justify-content: center; padding: 8px 0; }
  html[data-menu="folded"] .ui-nav-foot .ui-user > :not(.ui-av) { display: none; }
  /* mk-fix B6 (folded, the My campaigns badge hid) is replaced by RD37: folded, every count
     sits on its icon's corner ("rd-menu: the folded menu's counts", below) */
  /* mk-fix S1 (b2.css:114 .m2.min .m2-item.path): folded, the nested items hide, so My
     campaigns on the open campaign's path shows lit */
  html[data-menu="folded"] .ui-sidebar .ui-nav-item.is-lit { background: var(--ui-lit); color: var(--ui-accent-text);
    box-shadow: inset 3px 0 0 var(--ui-accent); }
  html[data-menu="folded"] .ui-sidebar .ui-nav-item.is-lit .ui-i { color: var(--ui-accent); }
}
/* the trail: My campaigns > campaign: <name> > set: <name> > ad: <name>, one row, the level
   words muted, the names strong, the page's own last. How it keeps its width and which
   part gives way first: "mockup fix B15" at the end of this sheet */
.ui-trail-step > .ui-i { flex: none; }
.ui-trail-step > a, .ui-trail-step > .ui-trail-plain { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0;
  padding: 4px 6px; white-space: nowrap; }
.ui-crumbs .ui-trail-step > a:hover { background: var(--ui-lit); color: var(--ui-accent-text); text-decoration: none; }
.ui-trail-lv { font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); }
.ui-crumbs .ui-trail-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ui-body); font-weight: 500; }
.ui-crumbs .ui-trail-step.is-here .ui-trail-nm { color: var(--ui-fg); font-weight: 650; }
.ui-trail-step.is-here > a { box-shadow: inset 0 -2px 0 var(--ui-accent); }
/* the siblings strip: the set's ads as small pictures with their state, the current one
   lit, its place, Prev / Next */
.ui-sibs { flex: none; display: flex; align-items: center; gap: 14px; min-width: 0; height: 56px; padding: 0 24px;
  border-bottom: 1px solid var(--ui-border); background: var(--ui-head); overflow: hidden; }
.ui-sibs-pos { flex: none; font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); white-space: nowrap; }
.ui-sibs-row { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; padding: 4px; list-style: none;
  overflow: hidden; }
.ui-sibs-row > li { flex: none; }
.ui-sib { position: relative; display: block; width: 40px; height: 40px; background: var(--ui-tile);
  outline: 1px solid var(--ui-border); outline-offset: -1px; }
.ui-sib img, .ui-sib .ui-sib-blank { display: block; width: 100%; height: 100%; object-fit: cover; }
.ui-sib:hover { outline: 2px solid var(--ui-fg); outline-offset: 1px; }
.ui-sib.is-here { outline: 2px solid var(--ui-accent); outline-offset: 1px; }
.ui-sib-st { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; display: grid; place-items: center;
  background: #fff; box-shadow: 0 0 0 1px var(--ui-border); }
.ui-sib-st .sico { width: 12px; height: 12px; vertical-align: 0; }
.ui-sibs-go { flex: none; display: flex; gap: 8px; margin-left: auto; }
.ui-sibs-prev .ui-i { transform: scaleX(-1); }
.ui-sibs .is-off { opacity: .45; box-shadow: none; cursor: default; }
@media (max-width: 767px) {
  /* the team ring on a phone: its circle only (the words stay in its aria-label and its
     popover), so the trail and the tour button fit a 390px header */
  .ui-header .ta-tp .ta-tp-w, .ui-header .ta-tp .ta-tp-chev { display: none; }
  .ui-fold { display: none; }   /* a phone keeps its sheet menu: nothing to fold */
  /* the page's own part alone, its level word kept (b2-x-phone-campaign) */
  .ui-trail-step:not(.is-here) { display: none; }
  .ui-trail-step.is-here > .ui-i { display: none; }
  .ui-sibs { gap: 10px; padding: 0 16px; }
  .ui-sibs-row { display: none; }
}
/* the people page's ONE Tag field (M2): the person, their tag, Save, the hint under them */
.ta-tagform { display: grid; grid-template-columns: minmax(0, 300px) 120px auto; align-items: end; gap: 12px 16px;
  margin-top: 20px; }
.ta-tagform .ui-field + .ui-field { margin-top: 0; }
.ta-tagform .ui-btn { height: 44px; justify-self: start; }
.ta-tagform .ui-desc { grid-column: 1 / -1; }
@media (max-width: 767px) {
  .ta-tagform { grid-template-columns: minmax(0, 1fr) 96px; }
  .ta-tagform .ui-btn { grid-column: 1 / -1; }
}
/* ==== release E part 2, lane M (P4) end */
/* ==== mockup fix round, lane Y (pages), phase B1: B15 the top bar, B16 the menu */
/* B15 (b2-9c "Make an ad" whole, b2-1a / b2-8a the four parts whole at 1920 beside the open
   panel, b2-x-phone-campaign): the trail keeps its own width and starts at its own left. The
   status chips sit in one group right of it (.ui-hd-st, base.html) that takes what the trail
   leaves. When they do not fit, they give way in steps (base.html's script measures the bar
   and sets data-hd-fit, a list of the steps taken, on it):
     1. every chip but the sync alarm folds to its icon (Take the tour its compass, the
        Katski toggle its panel icon, the team plan its ring, the Claude pill its dot, the
        operators pill its count): each keeps its link, title, aria-label and data-tour id;
     2. the sync alarm's words end in "..." (its icon and its title stay);
     3. the sync alarm is its icon;
   and only then the trail, its EARLY parts first:
     4. the early parts' level words go to screen readers only (each link's title keeps them);
     5. My campaigns gives way (it is the lit menu item);
     then the early names end in "..." (My campaigns, the campaign, the set, in that order);
   the page's own part stays whole. */
.ui-header > .ui-crumbs { flex: 0 1 auto; min-width: 0; }
.ui-hd-st { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.ui-hd-st > :is(.st-chip, .ui-sync, .pill, .ta-tp, .tour-btn, .kp-toggle) { flex: none; box-sizing: border-box; }
/* the words of the text chips: one line, ending in "..." when cut; the icon stands outside
   the words, so a chip folded to its icon shows no stray letter */
.ui-hd-st > :is(.st-chip, .ui-sync, .pill) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-hd-st > .st-chip { position: relative; padding-left: 1.5em; line-height: 34px; }
.ui-hd-st > .st-chip::before { position: absolute; left: 0; top: 50%; margin-top: -.5em; }
.ui-hd-st > .pill { line-height: 32px; padding-top: 0; padding-bottom: 0; }
.ui-hd-st > .pill-link { position: relative; padding-left: 23px; }
.ui-hd-st > .pill-link .dot { position: absolute; left: 11px; top: 50%; margin-top: -3px; }
/* step 1 */
/* the plain Meta sync line ("Meta synced 14:02") is short: it keeps its words whole (a cut
   "Meta no..." says nothing) and leaves the bar only at step 3; its title keeps the time */
.ui-header[data-hd-fit~="3"] .ui-hd-st > .ui-sync { display: none; }
/* the operators pill folds to its number, whole: its words wrap under it, out of the box */
.ui-header[data-hd-fit~="1"] .ui-hd-st > .pill:not(.pill-link) { width: calc(3ch + 24px); padding: 0 11px; white-space: normal;
  text-overflow: clip; text-align: center; overflow-wrap: anywhere; }
.ui-header[data-hd-fit~="1"] .ui-hd-st > .pill-link { width: 36px; padding: 0; color: transparent; }
.ui-header[data-hd-fit~="1"] .ui-hd-st > .pill-link .dot { left: 14px; }
.ui-header[data-hd-fit~="1"] .ui-hd-st .ta-tp :is(.ta-tp-w, .ta-tp-chev) { display: none; }
.ui-header[data-hd-fit~="1"] .ui-hd-st > .ta-tp { padding: 4px 8px; }
.ui-header[data-hd-fit~="1"] .ui-hd-st > :is(.tour-btn, .kp-toggle) { width: 36px; padding: 0; justify-content: center; }
.ui-header[data-hd-fit~="1"] .ui-hd-st > :is(.tour-btn, .kp-toggle) > span { position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* steps 2 and 3 */
.ui-header[data-hd-fit~="2"] .ui-hd-st > .st-chip { flex: 0 1 auto; min-width: 1.5em; }
.ui-header[data-hd-fit~="3"] .ui-hd-st > .st-chip { flex: none; width: 1.5em; }
.ui-header[data-hd-fit~="3"] .ui-hd-st { min-width: min-content; }
/* the trail: one row from its own left; the early parts shrink first, the page's own part
   never before the bar itself runs out */
.ui-crumbs .ui-trail { display: flex; align-items: center; justify-content: flex-start; min-width: 0; margin: 0;
  padding: 0; list-style: none; overflow: hidden; }
.ui-trail-step { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 0 1 auto; overflow: hidden; }
.ui-trail-step:first-child { flex-shrink: 8; }
.ui-trail-step.lv-campaign { flex-shrink: 4; min-width: 4.5em; }
.ui-trail-step.lv-set { flex-shrink: 2; min-width: 4em; }
.ui-trail-step.is-here { flex: none; min-width: 0; max-width: 100%; }
.ui-trail-step > :is(a, .ui-trail-plain) > .ui-trail-lv { flex: 0 1 auto; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; }
.ui-crumbs .ui-trail-step .ui-trail-nm { flex: 0 40 auto; }
.ui-trail-step > a:focus-visible { outline-offset: -2px; }
/* steps 4 and 5 */
.ui-header[data-hd-fit~="4"] .ui-trail-step:not(.is-here) .ui-trail-lv { position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ui-header[data-hd-fit~="5"] .ui-trail-step:first-child:not(.is-here) { display: none; }
.ui-header[data-hd-fit~="5"] .ui-trail-step:first-child:not(.is-here) + .ui-trail-step > .ui-i { display: none; }
/* a page with no trail (Make an ad, a draft with no home): its own name, marked as the trail's
   current part is (b2-9c) */
.ui-crumbs > b:last-child { padding: 4px 6px; color: var(--ui-fg); font-weight: 650;
  box-shadow: inset 0 -2px 0 var(--ui-accent); }
/* a phone (b2-x-phone-campaign): the menu button, then the page's own part whole from its
   start; the chips (their icons: the bar's pills and the Katski toggle stay off a phone's bar,
   its Katski bar is at the foot) beside it when they fit, on a row of their own under it when
   they do not, the sync alarm's words then filling that row */
@media (max-width: 767px) {
  .ui-header { height: auto; min-height: var(--ui-header-h); flex-wrap: wrap; align-items: center; row-gap: 0;
    padding-top: 6px; padding-bottom: 6px; }
  .ui-header > .ui-crumbs { max-width: calc(100% - 40px); min-height: 44px; }
  .ui-header > .ui-hd-st { min-width: min-content; min-height: 44px; }
  .ui-hd-st > :is(.ui-sync, .pill, .kp-toggle) { display: none; }
  .ui-hd-st > .st-chip { flex: 1 1 auto; width: 1.5em; max-width: max-content; }
  .ui-hd-st > .tour-btn { width: 34px; padding: 0; justify-content: center; }
}
/* B16 (mockup silent, Paul's default 10-21): no menu item ever squeezes into the next. The
   items keep their own height (a parked page's "Coming soon" tag under its name included)
   and scroll between the brand row, held at the top, and the person's card, held at the foot
   (b2-x-1440-campaign), at any screen height, folded or not, on the phone's sheet too */
.ui-sidebar > * { flex-shrink: 0; }
html.v2 .ui-sidebar { padding-top: 0; padding-bottom: 0; }
.ui-sidebar > .ui-brand-row { position: sticky; top: 0; z-index: 2; margin-bottom: 0; padding: 12px 0 8px;
  background: var(--zone-side); }
.ui-sidebar > .ui-nav-foot { position: sticky; bottom: 0; z-index: 2; padding-bottom: 12px; background: var(--zone-side); }
/* ==== worker-mcp-self-connect A7 start (prototype screens 1 and 2)
   My account, Connect your AI (templates/account.html, partials/mcp_guide.html): the
   Connections row look; the key reveal and the code boxes take Settings' API token values.
   The Admin dashboard's MCP column (partials/team_people.html): a seven column table, the
   On / Off pair a small ta-seg. Sharp corners, no new colour. */
.ta-v2 .wm-sec .ck-list { max-width: none; }
.ta-v2 .wm-key { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(130px, .8fr) minmax(0, 1.6fr) auto; gap: 14px; align-items: center; }
.ta-v2 .wm-prefix { color: var(--ui-body); }
.ta-v2 .wm-when { font-size: var(--ui-fs-sm); color: var(--ui-muted-fg); }
.ta-v2 .wm-form { display: flex; flex-direction: row; align-items: flex-end; gap: 12px; max-width: 760px; margin-top: 16px; }
.ta-v2 .wm-form .ui-field { flex: 1; margin: 0; }
.ta-v2 .wm-form .ui-btn { height: 44px; }
.ta-v2 .wm-reveal { margin: 0 0 20px; max-width: 760px; padding: 14px 16px; background: var(--ui-head); border-left: 4px solid var(--st-waiting); }
.ta-v2 .wm-revl { display: flex; gap: 10px; align-items: baseline; margin-bottom: 10px; font-size: var(--ui-fs-md); color: var(--ui-body); }
.ta-v2 .wm-revl b { color: var(--ui-fg); font-weight: 600; }
.ta-v2 .wm-linkbox { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--ui-border); padding: 8px 8px 8px 12px; }
.ta-v2 .wm-linkbox .mono { flex: 1; font: 500 var(--ui-fs-sm)/1.5 var(--mono, monospace); color: var(--ui-fg); overflow-wrap: anywhere; }
.ta-v2 .wm-once { margin-top: 10px; font-size: var(--ui-fs-md); color: var(--ui-fg); font-weight: 500; }
.ta-v2 .wm-osrow { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.ta-v2 .wm-oslabel { font: 500 var(--ui-fs-md) var(--ui-font); color: var(--ui-muted-fg); }
.ta-v2 .wm-os button { height: 34px; padding: 0 14px; font: 500 var(--ui-fs-md) var(--ui-font); color: var(--ui-muted-fg); background: none; border: 0; cursor: pointer; }
.ta-v2 .wm-os button.on { color: var(--ui-fg); font-weight: 600; background: #fff; box-shadow: var(--ui-shadow-sm); }
.ta-v2 .wm-apps { margin-bottom: 8px; }
.ta-v2 .wm-apps .ui-utab { border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; font-family: var(--ui-font); }
.ta-v2 .wm-apps .ui-utab.on { border-bottom-color: var(--ui-fg); }
.ta-v2 .wm-steps { max-width: 900px; }
.ta-v2 .wm-steps > li { margin-bottom: 14px; }
.ta-v2 .wm-steps code, .ta-v2 .wm-need code { font: 400 var(--ui-fs-sm) var(--mono, monospace); background: var(--ui-head); border: 1px solid var(--ui-border); padding: 0 4px; }
.ta-v2 .wm-codebox { position: relative; margin: 8px 0 0; }
.ta-v2 .wm-code { margin: 0; padding: 12px 88px 12px 14px; font: 400 var(--ui-fs-xs)/1.5 var(--mono, monospace); color: var(--ui-body);
  background: var(--ui-head); border: 1px solid var(--ui-border); white-space: pre-wrap; overflow-wrap: anywhere; }
.ta-v2 .wm-copy { position: absolute; top: 6px; right: 6px; background: #fff; }
.ta-v2 .wm-first { margin-top: 8px; }
.ta-v2 .wm-firstl { display: block; font: 500 var(--ui-fs-sm) var(--ui-font); color: var(--ui-muted-fg); }
.ta-v2 .wm-first .wm-code { font: 500 var(--ui-fs-md)/1.5 var(--ui-font); color: var(--ui-fg); background: #fff; }
.ta-v2 .wm-need { margin: 4px 0 12px; }
.ta-v2 .wm-can { max-width: 900px; }
.ta-v2 .wm-can-t { margin: 0 0 10px; font-size: 16px; font-weight: 600; color: var(--ui-fg); }
.ta-v2 .wm-kv { grid-template-columns: 112px minmax(0, 1fr); }
.ta-v2 .wm-offline { font-size: var(--ui-fs-base); font-weight: 500; color: var(--ui-fg); margin-bottom: 6px; }
@media (max-width: 767px) {
  .ta-v2 .wm-key { grid-template-columns: minmax(0, 1fr) auto; }
  .ta-v2 .wm-form { flex-direction: column; align-items: stretch; }
}

/* the Admin dashboard's MCP column: seven columns now */
.tm-v2 #team-people th:nth-child(1) { width: 18%; }
.tm-v2 #team-people th:nth-child(2) { width: 8%; }
.tm-v2 #team-people th:nth-child(3) { width: 13%; }
.tm-v2 #team-people th:nth-child(4) { width: 25%; }
.tm-v2 #team-people th:nth-child(5) { width: 16%; }
.tm-v2 #team-people th:nth-child(6) { width: 11%; }
.tm-v2 #team-people th:nth-child(7) { width: 56px; }
.tm-v2 .ta-tbl th.wm-keep { text-transform: none; }          /* MCP, an acronym */
.tm-v2 .wm-mcpform { margin: 0; }
.tm-v2 .wm-sw span { height: 30px; padding: 0 12px; font-size: var(--ui-fs-sm); }
/* two submit buttons, not radios: the dashboard's live poll swaps the People box, which holds
   no field to type or tick in (test_tao_live_dash d1); the pressed one reads as checked */
.tm-v2 .wm-sw button { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; }
.tm-v2 .wm-sw button[aria-pressed="true"] span { color: var(--ui-fg); font-weight: 600; background: #fff; box-shadow: var(--ui-shadow-sm); }
.tm-v2 .wm-sw button[aria-pressed="true"] { cursor: default; }
.tm-v2 .wm-mcpcell .ta-sub { margin-top: 6px; }
@container tmpeople (max-width: 859px) {
  .tm-v2 #team-people tr { grid-template-areas: "who who who act" ". role st st" ". cx cx cx" ". mcp mcp mcp" ". seen seen seen"; }
  .tm-v2 #team-people td.wm-mcpcell { grid-area: mcp; }
}
/* ==== worker-mcp-self-connect A7 end */

/* worker-mcp-self-connect WM15d (prototype screen 2): the Admin dashboard's DISCORD cell */
.tm-v2 .wm-dcoff { margin: 0 0 12px; }
.tm-v2 .wm-chrow { display: flex; align-items: center; gap: 8px; margin: 0; }
.tm-v2 .wm-chsel { height: 34px; min-width: 0; flex: 1 1 auto; max-width: 170px; padding: 0 8px; font-size: var(--ui-fs-sm); }
.tm-v2 .wm-tag { font: 500 var(--ui-fs-xs) var(--ui-font); color: var(--ui-muted-fg); border: 1px solid var(--ui-border); padding: 1px 6px; background: var(--ui-head); }
.tm-v2 .wm-dccell .ta-sub { margin-top: 6px; }
.tm-v2 .wm-fail { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.tm-v2 .wm-fail .st-chip { font-size: var(--ui-fs-sm); }
.tm-v2 .wm-fail .cx-sub { font-size: var(--ui-fs-xs); line-height: 1.4; color: var(--ui-muted-fg); }
/* MCP + DISCORD together (the merge): eight columns */
.tm-v2 .wm-dcwrap #team-people th:nth-child(1) { width: 16%; }
.tm-v2 .wm-dcwrap #team-people th:nth-child(2) { width: 9%; }
.tm-v2 .wm-dcwrap #team-people th:nth-child(3) { width: 10%; }
.tm-v2 .wm-dcwrap #team-people th:nth-child(4) { width: 21%; }
.tm-v2 .wm-dcwrap #team-people th:nth-child(5) { width: 12%; }
.tm-v2 .wm-dcwrap #team-people th:nth-child(6) { width: 18%; }
.tm-v2 .wm-dcwrap #team-people th:nth-child(7) { width: 10%; }
.tm-v2 .wm-dcwrap #team-people th:nth-child(8) { width: 56px; }
@container tmpeople (max-width: 859px) {
  .tm-v2 #team-people tr { grid-template-areas: "who who who act" ". role st st" ". cx cx cx" ". mcp mcp mcp" ". dc dc dc" ". seen seen seen"; }
  .tm-v2 #team-people td.wm-dccell { grid-area: dc; }
}
/* meta-numbers-switch: the Admin dashboard's META NUMBERS column (the third): nine columns */
.tm-v2 .wm-dcwrap #team-people th:nth-child(1) { width: 13%; }
.tm-v2 .wm-dcwrap #team-people th:nth-child(2) { width: 8%; }
.tm-v2 .wm-dcwrap #team-people th:nth-child(3) { width: 10%; }
.tm-v2 .wm-dcwrap #team-people th:nth-child(4) { width: 8%; }
.tm-v2 .wm-dcwrap #team-people th:nth-child(5) { width: 19%; }
.tm-v2 .wm-dcwrap #team-people th:nth-child(6) { width: 13%; }
.tm-v2 .wm-dcwrap #team-people th:nth-child(7) { width: 12%; }
.tm-v2 .wm-dcwrap #team-people th:nth-child(8) { width: 8%; }
.tm-v2 .wm-dcwrap #team-people th:nth-child(9) { width: 56px; }
.tm-v2 .mn-form { margin: 0; }
.tm-v2 .mn-cell .ta-sub { margin-top: 6px; }
@container tmpeople (max-width: 859px) {
  .tm-v2 #team-people tr { grid-template-areas: "who who who act" ". role st st" ". mn mn mn" ". cx cx cx" ". mcp mcp mcp" ". dc dc dc" ". seen seen seen"; }
  .tm-v2 #team-people td.mn-cell { grid-area: mn; }
}
/* CRM polish C120 (tasks/features/crm/decisions.md): while the menu folds or opens with an
   animation (a sheet that gives .ui-sidebar a width transition: the CRM's), base.html's script
   lifts it out of the row and slides the page by transform, so the page is laid out once, not on
   every frame; the spacer holds the page where its new width puts it. Gone when the move ends. */
html.ui-menu-moving .ui-sidebar { transition: none !important; }
html.ui-menu-lift .ui-shell::before { content: ""; flex: none; width: var(--ui-menu-space, 0px); }
html.ui-menu-lift .ui-sidebar { position: absolute; left: 0; top: 0; bottom: 0; z-index: 3; contain: layout paint; }
/* ==== platform-redesign phase 2: the shell (rd-pilot, RD10, RD44, RD47)
   The CRM's frame on every page outside the CRM: the floating menu, the top row, the Katski
   panel's colours. A marked copy of static/crm.css's own rules (each part names its crm.css
   lines), on the shared tokens (static/tokens.css), never a colour literal. Every rule carries
   html:not([data-crm],[data-crm-chat]) (0,1,1, the weight of crm.css's html[data-crm]), so a
   CRM page and the chat frame inside its panel never take one: this sheet loads last on every
   page. Owed (RD44): one shared block crm.css and this sheet both read. From 768 px the menu
   floats; a phone keeps Katski's sheet menu, in these colours. No em dash. */

/* the palette's accent names: the lit and current marks of the older shell rules (the trail,
   the siblings strip, the lit menu item, a ghost button's ground) take the CRM's ink and
   hover instead of Katski's orange */
html.v2:not([data-crm],[data-crm-chat]) { --ui-accent: var(--ink); --ui-accent-text: var(--ink); --ui-lit: var(--hover); }

/* ---- the menu: colours at every width (crm.css:121-140) ---- */
html:not([data-crm],[data-crm-chat]) body .ui-sidebar { color: var(--side-ink); line-height: 1.45; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-label { font-size: 13px; font-weight: 500; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-item { position: relative; gap: 12px; height: 38px; min-height: 38px;
  padding: 0 12px; border-radius: var(--r-seg); color: var(--side-ink); font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: none; box-shadow: none; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-item .ui-i { width: 20px; height: 20px; flex: none; stroke-width: 1.75;
  color: inherit; }
/* Katski's icons are sharp; the CRM's (lucide's own) have their rounded corners (crm.css:128-129) */
html:not([data-crm],[data-crm-chat]) body .ui-sidebar :is([href="/bank"],[href="/crm"],[href="/workspace"]) .ui-i rect { rx: 2px; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar [href="/frameworks"] .ui-i rect { rx: 1px; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-item:hover { background: var(--side-hover); }
/* the lit item: the soft pill. My campaigns while its campaign, set or ad is the lit child is
   that child's path (mk-fix S1): ink at 600, no pill, so one item is lit */
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-item.active { background: var(--side-on); color: var(--ink);
  font-weight: 500; box-shadow: none; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-item.is-lit:not(.active) { color: var(--ink); font-weight: 600;
  box-shadow: none; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-item:is(.active, .is-lit) .ui-i { color: inherit; }
/* the counts and tags, the CRM's soft pill (crm.css:132-141): a status count keeps its colour
   (macros/status.html n-pill), the CRM item's badge takes the person's role colour, the Agent
   count and "Coming soon" are quiet */
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-item > .n-pill { margin-left: auto; display: inline-block; min-width: 0;
  height: auto; font-size: 12px; font-weight: 600; border-radius: var(--r-pill); padding: 0 7px; line-height: 19px; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-item > .nav-crm { background: var(--a, var(--cs)); color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .nav-crm[data-role="strategist"] { --a: var(--cs); }
html:not([data-crm],[data-crm-chat]) .nav-crm[data-role="editor"] { --a: var(--ed); }
html:not([data-crm],[data-crm-chat]) .nav-crm[data-role="approver"] { --a: var(--ap); }
html:not([data-crm],[data-crm-chat]) .nav-crm[data-role="admin"] { --a: var(--ad); }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-item .nav-badge { border-radius: var(--r-pill); font-family: inherit;
  font-size: 12px; font-weight: 600; line-height: 19px; padding: 0 7px; background: var(--hover); color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-item .nav-soon { border-radius: var(--r-pill); font-family: inherit;
  font-size: 11px; color: var(--ink-3); background: var(--side-hover); border: 0; padding: 0 7px; line-height: 18px; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-item .nav-ref-tag { font-family: inherit; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-item:has(.nav-soon) { grid-template-columns: 20px minmax(0, 1fr) auto;
  height: auto; min-height: 44px; padding-top: 5px; padding-bottom: 5px; align-content: center;
  row-gap: 1px; }
/* the nested lists under an item (Katski Sandbox's tabs, My campaigns' campaign > set > ad),
   crm.css:143-147 */
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-sub { border-left-color: var(--side-line); }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-child { color: var(--side-ink); border-radius: var(--r-ctl); box-shadow: none; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-child:hover { background: var(--side-hover); color: var(--ink); box-shadow: none; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-child.active { background: var(--side-on); color: var(--ink); font-weight: 500;
  box-shadow: none; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-child .ui-i { color: inherit; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-child[data-nav-key]::before { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-act button { border-radius: var(--r-item); }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-act button:hover { outline: 0; background: var(--side-hover); color: var(--ink); }
/* the brand, the fold button (crm.css:104-114) */
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-brand { display: flex; align-items: center; gap: 11px; height: auto; padding: 0;
  margin: 0; color: var(--ink); font-size: 19px; font-weight: 600; letter-spacing: -.01em; min-width: 0; flex: 1; white-space: nowrap; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-brand-mark { width: 38px; height: 38px; border-radius: var(--r-seg); flex: none;
  display: grid; place-items: center; color: var(--on-fill); font-weight: 700; font-size: 17px; letter-spacing: 0;
  background: var(--brand-grad); box-shadow: var(--brand-shadow); }
@supports (corner-shape: squircle) {
  html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-brand-mark { corner-shape: squircle; }
}
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-fold { width: 32px; height: 32px; border-radius: var(--r-item); border: 0;
  background: none; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-fold:hover { background: var(--side-hover); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-fold .ui-i { width: 18px; height: 18px; stroke-width: 1.75; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-fold rect { rx: 2px; }
/* the foot: Light / Dark, then the person (crm.css:148-156). Outside the CRM a person is their
   4-letter tag pill (C210-C212), sat where the CRM draws its user icon; the up-down mark goes,
   as on a CRM page */
html:not([data-crm],[data-crm-chat]) body .ui-sidebar > .ui-nav-foot { margin-top: auto; padding: 14px 0 10px; border-top: 0;
  display: flex; flex-direction: column; gap: 6px; background: var(--side-solid); }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-theme { margin: 0; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-theme-note { margin: -2px 12px 2px; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-user { display: flex; align-items: center; gap: 12px; padding: 6px 12px;
  font-size: 14.5px; font-weight: 500; color: var(--side-ink); white-space: nowrap; border-radius: var(--r-seg); }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-user:hover { background: var(--side-hover); }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-user > .ui-i { display: none; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-user .ui-av { width: 28px; height: 28px; font-size: 11px; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-user .ui-av.av-tag { height: 24px; font-size: 11px; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-user-name { display: block; font-size: 14.5px; font-weight: 500; line-height: 1.45; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-user-role { display: block; color: var(--ink-3); font-size: 12.5px;
  font-weight: 500; line-height: 1.45; }
/* the phone's sheet (< 768 px): Katski's own, on the menu's ground */
@media (max-width: 767px) {
  html:not([data-crm],[data-crm-chat]) body .ui-sidebar { background: var(--side-solid); border-right-color: var(--side-line);
    box-shadow: var(--side-shadow); padding-left: 10px; padding-right: 10px; }
}

/* ---- the menu from 768 px: the floating panel (crm.css:99-103) and its folded rail
   (crm.css:159-173) ---- */
@media (min-width: 768px) {
  html:not([data-crm],[data-crm-chat]) body .ui-sidebar { width: 256px; margin: 10px 0 10px 10px; height: calc(100vh - 20px);
    display: flex; flex-direction: column; padding: 0 10px; border-radius: var(--r-side); background: var(--side-bg);
    border: 1px solid var(--side-line); box-shadow: var(--side-shadow); overflow: hidden auto;
    transition: width .25s cubic-bezier(.2, .8, .2, 1); scrollbar-width: none; }
  @supports (corner-shape: squircle) {
    html:not([data-crm],[data-crm-chat]) body .ui-sidebar { corner-shape: squircle; }
  }
  html:not([data-crm],[data-crm-chat]) body .ui-sidebar > .ui-brand-row { display: flex; align-items: center; gap: 8px; margin: 0;
    padding: 14px 2px 4px 4px; background: var(--side-solid); }
  html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-fold { margin-left: auto; }
  html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-nav-label { padding: 0 12px; margin: 16px 0 5px; white-space: nowrap; }

  html:not([data-crm],[data-crm-chat])[data-menu="folded"] body .ui-sidebar { width: 76px; padding: 0 10px; }
  html:not([data-crm],[data-crm-chat])[data-menu="folded"] body .ui-sidebar > .ui-brand-row { flex-direction: column; gap: 8px;
    padding: 14px 0 4px; }
  html:not([data-crm],[data-crm-chat])[data-menu="folded"] body .ui-sidebar .ui-brand { flex: none; gap: 0; font-size: 0;
    justify-content: center; }
  html:not([data-crm],[data-crm-chat])[data-menu="folded"] body .ui-sidebar .ui-fold { margin: 0; }
  html:not([data-crm],[data-crm-chat])[data-menu="folded"] body .ui-sidebar .ui-nav-label { height: 1px; margin: 10px 12px; padding: 0;
    font-size: 0; background: var(--side-line); }
  html:not([data-crm],[data-crm-chat])[data-menu="folded"] body .ui-sidebar .ui-nav-item { justify-content: center; gap: 0; padding: 0;
    width: 44px; height: 44px; min-height: 44px; margin: 1px auto; }
  /* folded, the nested lists hide, so My campaigns on the open campaign's path takes the pill */
  html:not([data-crm],[data-crm-chat])[data-menu="folded"] body .ui-sidebar .ui-nav-item.is-lit { background: var(--side-on);
    color: var(--ink); box-shadow: none; }
  /* the item's name beside it under the pointer or the focus (base.html puts its height in
     --ui-tip-y) */
  html:not([data-crm],[data-crm-chat])[data-menu="folded"] body .ui-sidebar .ui-nav-item .ui-nav-w { left: 96px; border-radius: var(--r-item);
    background: var(--ink); color: var(--canvas); font-size: 13px; }
  html:not([data-crm],[data-crm-chat])[data-menu="folded"] body .ui-sidebar .ui-user { justify-content: center; padding: 6px 0; }
}

/* ---- the top row: the header as the CRM's .top (crm.css:190-205) ---- */
html:not([data-crm],[data-crm-chat]) .ui-header { gap: 12px; padding: 0 22px 0 18px; background: var(--canvas);
  border-bottom: 1px solid var(--line); }
/* the page's place, read like a CRM tab: 14.5 px 500; the page's own part in ink with the 2 px
   ink bar on the row's rule (the crumbs reach over the rule by 1 px); the earlier parts ink-2,
   a hover pill behind them */
html:not([data-crm],[data-crm-chat]) .ui-header > .ui-crumbs { align-self: stretch; margin-bottom: -1px; gap: 2px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-crumbs > a { padding: 6px 10px; border-radius: var(--r-item); color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-crumbs > a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
html:not([data-crm],[data-crm-chat]) .ui-crumbs .ui-i { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-crumbs b { font-weight: 500; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-crumbs > b:last-child { align-self: stretch; display: block; line-height: 58px; padding: 0 12px;
  font-weight: 500; color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
/* the campaign trail (macros/home.html trail): the same tab look; the classes the fit script
   reads stay as they are */
html:not([data-crm],[data-crm-chat]) .ui-crumbs .ui-trail { align-self: stretch; align-items: stretch; }
html:not([data-crm],[data-crm-chat]) .ui-trail-step { align-items: center; }
html:not([data-crm],[data-crm-chat]) .ui-trail-step > :is(a, .ui-trail-plain) { align-items: baseline; padding: 6px 10px;
  border-radius: var(--r-item); color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-crumbs .ui-trail-step > a:hover { background: var(--hover); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-trail-lv { font-size: 13px; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-crumbs .ui-trail-nm { color: inherit; font-weight: 500; }
html:not([data-crm],[data-crm-chat]) .ui-trail-step.is-here > :is(a, .ui-trail-plain) { align-self: stretch; align-items: center;
  border-radius: 0; color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-crumbs .ui-trail-step.is-here > a:hover { background: none; }
html:not([data-crm],[data-crm-chat]) .ui-crumbs .ui-trail-step.is-here .ui-trail-nm { color: var(--ink); font-weight: 500; }
/* the right group: quiet words and the CRM's ghost buttons (crm.css:211-218 .btn.ghost) */
html:not([data-crm],[data-crm-chat]) .ui-hd-st { gap: 6px; }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-sync { font-size: 13.5px; color: var(--ink-3); }
/* a sync that stopped: the wine state on its soft ground, icon + colour + word (RD13) */
html:not([data-crm],[data-crm-chat]) .ui-hd-st > .st-chip { font-size: 13.5px; font-weight: 500; line-height: 32px;
  padding: 0 12px 0 calc(11px + 1.5em); border-radius: var(--r-pill); background: var(--st-back-soft); }
html:not([data-crm],[data-crm-chat]) .ui-hd-st > .st-chip::before { left: 11px; }
html:not([data-crm],[data-crm-chat]) .ui-header[data-hd-fit~="2"] .ui-hd-st > .st-chip { min-width: calc(1.5em + 23px); }
html:not([data-crm],[data-crm-chat]) .ui-header[data-hd-fit~="3"] .ui-hd-st > .st-chip { width: calc(1.5em + 23px); }
html:not([data-crm],[data-crm-chat]) .ui-header :is(.pill, .tour-btn, .kp-toggle, .ta-tp) { height: 36px; border: 1px solid transparent;
  border-radius: var(--r-pill); background: none; box-shadow: none; color: var(--ink-2); font-family: var(--font);
  font-size: 14px; font-weight: 500; }
html:not([data-crm],[data-crm-chat]) .ui-header :is(.tour-btn, .kp-toggle) { gap: 7px; padding: 0 14px; line-height: 1; }
html:not([data-crm],[data-crm-chat]) .ui-header :is(.pill-link, .tour-btn, .kp-toggle, .ta-tp):hover,
html:not([data-crm],[data-crm-chat]) .ui-header :is(.kp-toggle[aria-expanded="true"], .ta-tp.on) { background: var(--hover);
  border-color: transparent; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-header :is(.tour-btn, .kp-toggle) svg { width: 15px; height: 15px; }
html:not([data-crm],[data-crm-chat]) .ui-hd-st > .pill { line-height: 34px; padding: 0 14px; }
html:not([data-crm],[data-crm-chat]) .ui-hd-st > .pill-link { padding-left: 28px; }
html:not([data-crm],[data-crm-chat]) .ui-hd-st > .pill-link .dot { left: 14px; }
html:not([data-crm],[data-crm-chat]) .ui-header .pill-chev { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-header .dot-grey { background: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-header[data-hd-fit~="1"] .ui-hd-st > .pill-link { width: 36px; padding: 0; }
html:not([data-crm],[data-crm-chat]) .ui-header[data-hd-fit~="1"] .ui-hd-st > .pill-link .dot { left: 14px; }
html:not([data-crm],[data-crm-chat]) .ui-header[data-hd-fit~="1"] .ui-hd-st > :is(.tour-btn, .kp-toggle) { width: 36px; padding: 0; }
/* the team plan's ring: a quiet pill, its rings on the tokens; a full plan in the wine state */
html:not([data-crm],[data-crm-chat]) .ui-header .ta-tp { gap: 8px; padding: 0 12px 0 8px; }
html:not([data-crm],[data-crm-chat]) .ui-header[data-hd-fit~="1"] .ui-hd-st > .ta-tp { padding: 0 8px; }
html:not([data-crm],[data-crm-chat]) .ui-header .ta-tp.full { color: var(--st-back); background: var(--st-back-soft); }
html:not([data-crm],[data-crm-chat]) .ui-header .ta-tp-chev { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ta-ring .tr, html:not([data-crm],[data-crm-chat]) .ta-tp.full .ta-ring .tr { stroke: var(--line-2); }
html:not([data-crm],[data-crm-chat]) .ta-tp[data-tip]::after { border-radius: var(--r-item); background: var(--ink); color: var(--canvas); }
html:not([data-crm],[data-crm-chat]) .ta-pop { background: var(--pop); border-color: var(--line); border-radius: var(--r-menu);
  box-shadow: var(--pop-shadow); color: var(--ink); }
/* the siblings strip under the row (macros/home.html strip) */
html:not([data-crm],[data-crm-chat]) .ui-sibs { padding: 0 22px 0 18px; background: var(--canvas); border-bottom-color: var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-sibs-pos { font-size: 13px; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-sib { border-radius: var(--r-item); outline-color: var(--line); background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .ui-sib :is(img, .ui-sib-blank) { border-radius: inherit; }
html:not([data-crm],[data-crm-chat]) .ui-sib:hover { outline: 2px solid var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-sib.is-here { outline: 2px solid var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-sib-st { border-radius: var(--r-pill); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
@media (max-width: 767px) {
  html:not([data-crm],[data-crm-chat]) .ui-header { padding: 6px 16px; }
  html:not([data-crm],[data-crm-chat]) .ui-header > .ui-crumbs { margin-bottom: 0; }
  html:not([data-crm],[data-crm-chat]) .ui-crumbs > b:last-child { line-height: 44px; }
  html:not([data-crm],[data-crm-chat]) .ui-header .ui-menu-btn { border-radius: var(--r-item); color: var(--ink-2); }
  html:not([data-crm],[data-crm-chat]) .ui-sibs { padding: 0 16px; }
}

/* ---- the Katski panel: folded, the thin rail in the CRM's colours (crm.css:178-188) ---- */
html:not([data-crm],[data-crm-chat])[data-kp="closed"] .kp#kp { background: var(--chrome); border-left-color: var(--line); color: var(--ink);
  box-shadow: none; }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-rail { background: transparent; gap: 10px; padding: 16px 0; }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-rail .kp-btn { color: var(--ink-2); border-radius: var(--r-ctl); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-rail .kp-btn:hover { background: var(--hover); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-rail [data-kp-toggle] { width: 34px; height: 34px; }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-rail [data-kp-toggle]:hover { background: none; filter: brightness(1.08); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-rail .kp-logo { width: 34px; height: 34px; border-radius: calc(var(--r-ctl) + 1px); background: var(--brand-grad);
  color: var(--on-fill); font-weight: 700; font-size: 15px; }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-rail [data-kp-open-tab] { width: 34px; height: 34px; border: 1px solid var(--line-2);
  background: var(--surface); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-rail [data-kp-open-tab]:hover { background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-rail .kp-railsep { background: var(--line); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-vlabel { color: var(--ink-3); }

/* ---- the Katski panel open (crm.css:623-655): its own colour tokens point at the CRM's, so its
   markup and behaviour stay Katski's; the status set is the CRM panel's in Light and the
   platform's own in Dark (tokens.css --panel-st-*) ---- */
html:not([data-crm],[data-crm-chat]) .kp#kp {
  --kc-bg: var(--chrome); --kc-bar: var(--chrome); --kc-side: var(--chrome); --kc-line: var(--line);
  --kc-hover: var(--hover); --kc-lit: var(--hover); --kc-raise: var(--surface); --kc-accent: var(--ed);
  --kc-ink: var(--ink); --kc-body: var(--ink); --kc-muted: var(--ink-2); --kc-faint: var(--ink-3); --kc-mono: var(--mono);
  --kp-ring: var(--focus);
  --st-working: var(--panel-st-working); --st-waiting: var(--panel-st-waiting); --st-ready: var(--panel-st-ready);
  --st-done: var(--panel-st-done); --st-back: var(--panel-st-back); --st-limit: var(--panel-st-limit); --st-idle: var(--panel-st-idle);
  --st-working-soft: var(--panel-st-working-soft); --st-waiting-soft: var(--panel-st-waiting-soft);
  --st-ready-soft: var(--panel-st-ready-soft); --st-done-soft: var(--panel-st-done-soft); --st-back-soft: var(--panel-st-back-soft);
  --st-limit-soft: var(--panel-st-limit-soft); --st-idle-soft: var(--panel-st-idle-soft);
  border-left-color: var(--line); box-shadow: none; font-family: var(--font);
}
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-head { background: var(--chrome); border-bottom-color: var(--line); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-head .kp-t { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-head .kp-logo { width: 30px; height: 30px; border-radius: var(--r-ctl);
  background: var(--brand-grad); color: var(--on-fill); font-weight: 700; }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-head .kp-btn { border-radius: var(--r-item); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-head .kp-btn:hover { background: var(--hover); color: var(--ink); }
/* the panel's own bright words and warm hovers, drawn for its dark brown, read in the ink */
html:not([data-crm],[data-crm-chat]) .kp#kp :is(.kp-colt, .kp-btitle, .kp-bempty h2, .kp-afoot b, .kp-cr.kp-cur) { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .kp#kp :is(.kp-wbtn, .kp-cr, .kp-crback, .kp-rail .kp-btn, .kp-colnew, .kp-sgchip):hover {
  background: var(--hover); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-wbtn[aria-pressed="true"] { background: var(--surface); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-2); }
html:not([data-crm],[data-crm-chat]) .kp#kp :is(button.kp-chev, .kp-cpen, .kp-campen):hover { background: var(--hover); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .kp#kp:not([data-kp-view="list"]) .kp-cl[data-kp-shown] > .kp-crow,
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-ckid[aria-current="true"] { background: var(--hover); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-sgchip.kp-run { border-color: var(--line-2); background: var(--hover); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-cragent { border-color: var(--line-2); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-cragent:hover { background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .kp#kp :is(.kp-newsend, .kp-crensave, .kp-sggo) { background: var(--brand-b); color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .kp#kp :is(.kp-newsend, .kp-sggo):hover { background: var(--ed); color: var(--on-fill); }
@media (min-width: 768px) {
  html:not([data-crm],[data-crm-chat])[data-kp-w="full"] .kp#kp .kp-colh { color: var(--ink); }
}
/* the home chat inside the panel (crm.css:657-672): its own tokens on the CRM's values. --ink
   is the chat's own there (static/kpanel.css: --ink = --ag-ink), so --ag-ink reads the root
   copy --chat-ink (tokens.css), never --ink */
html:not([data-crm],[data-crm-chat]) .kp#kp .ag-chat {
  --ag-canvas: var(--chrome); --ag-head: var(--chrome); --ag-strip: var(--chat-strip); --ag-foot: var(--chrome);
  --ag-raised: var(--surface); --ag-hover: var(--hover); --ag-line: var(--line-2); --ag-rule: var(--line);
  --ag-ink: var(--chat-ink); --ag-body: var(--chat-ink); --ag-muted: var(--ink-2); --ag-faint: var(--ink-3);
  --ag-bubble: var(--hover); --ag-bubble-ink: var(--chat-ink); --ag-bubble-edge: transparent;
  --ag-send: var(--brand-grad); --ag-accent: var(--ed); --ag-stop: var(--red); --ag-err: var(--red);
  --border-btn: var(--line-2); --border-input: var(--line-2);
  --hover-border: color-mix(in oklab, var(--line-2) 50%, var(--ink-3));
  --accent: var(--brand-b); --accent-hover: var(--ed); --accent-text: var(--ed);
  --accent-soft: color-mix(in oklab, var(--ed) 22%, var(--surface)); --amber-bg: color-mix(in oklab, var(--ed) 14%, var(--surface));
  --agent-bg: var(--hover); --agent-text: var(--chat-ink); --amber-border: var(--line-2);
  --rv-op: var(--panel-st-working); --rv-blue-edge: color-mix(in oklab, var(--ed) 30%, var(--surface));
  --kt-stopped: var(--panel-st-back); --kt-failed: var(--panel-st-back);
  --st-working: var(--panel-st-working); --st-waiting: var(--panel-st-waiting); --st-ready: var(--panel-st-ready);
  --st-done: var(--panel-st-done); --st-back: var(--panel-st-back); --st-limit: var(--panel-st-limit); --st-idle: var(--panel-st-idle);
  --st-working-soft: var(--panel-st-working-soft); --st-waiting-soft: var(--panel-st-waiting-soft);
  --st-ready-soft: var(--panel-st-ready-soft); --st-done-soft: var(--panel-st-done-soft); --st-back-soft: var(--panel-st-back-soft);
  --st-limit-soft: var(--panel-st-limit-soft); --st-idle-soft: var(--panel-st-idle-soft);
  font-family: var(--font);
}
html:not([data-crm],[data-crm-chat]) .kp#kp .ag-chat :is(.ag-katski .ag-text b, .ag-bubble .ag-bhd, .ag-bubble .ag-btnname, .ag-more:hover) {
  color: var(--ag-ink); }
html:not([data-crm],[data-crm-chat]) .kp#kp .ag-chat .ag-bubble :is(.ag-btnname, .ag-ntag, .ag-more) { background: var(--ag-raised);
  border-color: var(--ag-line); }
html:not([data-crm],[data-crm-chat]) .kp#kp .ag-chat .ag-nchip { background: var(--ag-hover); border-color: var(--ag-line); }
/* the composer (section 13 above draws it on white): the surface, a token radius, the send
   button as the CRM's primary */
html.v2:not([data-crm],[data-crm-chat]) .kp .ag-box { background: var(--surface); border-color: var(--line-2);
  border-radius: var(--r-ctl) var(--r-ctl) 0 0; }
html.v2:not([data-crm],[data-crm-chat]) .kp .ag-rfoot { background: var(--surface); border-color: var(--line-2);
  border-radius: 0 0 var(--r-ctl) var(--r-ctl); }
html.v2:not([data-crm],[data-crm-chat]) .kp .ag-rfoot .rv-btn { border-radius: var(--r-pill); }
html.v2:not([data-crm],[data-crm-chat]) .kp .ag-rfoot .rv-primary { border-radius: var(--r-pill); background: var(--btn-fill); color: var(--btn-fill-ink);
  box-shadow: inset 0 0 0 1px var(--btn-fill-line); font-weight: 600; }
html.v2:not([data-crm],[data-crm-chat]) .kp .ag-rfoot .rv-primary:hover { background: var(--btn-fill-hover); filter: var(--btn-fill-lift); }
html.v2:not([data-crm],[data-crm-chat]) .kp .ag-typenote { color: var(--ink-3); }
/* Make an ad's New brief view inside the panel (kpanel.css kp-bview, makead.css #kp-brief):
   its head, empty state and read-only box in the same colours, never the Ember brown */
html:not([data-crm],[data-crm-chat]) .kp#kp :is(.kp-btitle, .kp-bempty h2) { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-bk { border-radius: var(--r-ctl); background: var(--brand-grad); color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .kp#kp #kp-brief .mkb-box { background: var(--surface); color: var(--ink); border-color: var(--line-2);
  border-radius: var(--rpage); }
html:not([data-crm],[data-crm-chat]) .kp#kp #kp-brief .mkb-boxh { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .kp#kp #kp-brief .mkb-boxh b { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .kp#kp #kp-brief .mkb-tag { background: var(--hover); border-color: var(--line-2); color: var(--ink);
  border-radius: var(--r-pill); }
html:not([data-crm],[data-crm-chat]) .kp#kp #kp-brief .mkb-tag :is(.mkb-k, .mkb-x) { color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .kp#kp #kp-brief .mkb-tag .mkb-x:hover { background: var(--line-2); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .kp#kp #kp-brief .mkb-said { color: var(--red); }
html:not([data-crm],[data-crm-chat]) .kp#kp #kp-brief .mkb-count { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .kp#kp #kp-brief .mkb-attach { border-radius: var(--r-item); color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .kp#kp #kp-brief .mkb-attach:hover { background: var(--hover); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .kp#kp #kp-brief .mkb-cook { border-radius: var(--r-pill); background: var(--brand-b); color: var(--on-fill);
  font-family: var(--font); }
html:not([data-crm],[data-crm-chat]) .kp#kp #kp-brief .mkb-cook:hover { background: var(--ed); }
html:not([data-crm],[data-crm-chat]) .kp#kp #kp-brief .mkb-cook:disabled { background: var(--hover); color: var(--ink-3); }
/* ==== platform-redesign phase 2: the shell, end */
/* ==== platform-redesign phase 3: components (rd-pilot, RD11, RD12, RD13, RD47)
   The ui-* set in the CRM's look (DESIGN-SYSTEM 3.2-3.21, composed as its 5.1 table says), Light
   and Dark through the shared tokens (static/tokens.css), never a colour literal, every radius a
   token. Spec for pages: DESIGN-SYSTEM.md section 6.2 onwards. Every rule carries
   html:not([data-crm],[data-crm-chat]), so no CRM page and no chat frame inside its panel takes
   one. Two weights on purpose: sizes (height, padding, font size) sit in :where() at 0,1,1, so a
   page's own tuning (".pk-x .ui-btn { height: 44px }", 0,2,0) keeps its size beside its own
   fields; the look (ground, border, radius, colour) sits at 0,2,1 and wins over the older v2
   values (sharp, white, orange). The continuous corner (corner-shape) is set per component in
   one @supports at the end. No em dash. */

/* ---- buttons (crm.css:211-220 .btn): pill, 38 px, 14 px 500 ---- */
html:not([data-crm],[data-crm-chat]) :where(.ui-btn) { height: 38px; padding: 0 16px; gap: 7px; font-size: 14px; }
html:not([data-crm],[data-crm-chat]) :where(.ui-btn-sm) { height: 32px; padding: 0 12px; gap: 6px; font-size: 13px; }
html:not([data-crm],[data-crm-chat]) :where(.ui-btn-lg) { height: 44px; padding: 0 22px; font-size: 15px; }
html:not([data-crm],[data-crm-chat]) :where(.ui-btn-icon) { width: 38px; padding: 0; }
html:not([data-crm],[data-crm-chat]) :where(.ui-btn-icon.ui-btn-lg) { width: 44px; }
html:not([data-crm],[data-crm-chat]) .ui-btn { font-family: var(--font); font-weight: 500; line-height: 1.45; border-radius: var(--r-pill);
  border: 1px solid transparent; background: transparent; color: var(--ink); box-shadow: none;
  transition: background .15s, border-color .15s, color .15s, opacity .15s; }
html:not([data-crm],[data-crm-chat]) .ui-btn.ui-btn-sm.ui-btn-icon { width: 32px; }
html:not([data-crm],[data-crm-chat]) .ui-btn .ui-i { width: 16px; height: 16px; }
html:not([data-crm],[data-crm-chat]) .ui-btn:hover { background: var(--hover); color: var(--ink); }
/* primary: THE main button (rd-match-b, RD188, rule 30): the --btn-fill token, never the ink;
   hover a touch lighter */
html:not([data-crm],[data-crm-chat]) .ui-btn.ui-btn-primary { background: var(--btn-fill); border-color: var(--btn-fill-line); color: var(--btn-fill-ink);
  font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .ui-btn.ui-btn-primary:hover { background: var(--btn-fill-hover); color: var(--btn-fill-ink); filter: var(--btn-fill-lift); }
/* outline: the CRM's plain .btn, surface and a --line-2 edge */
html:not([data-crm],[data-crm-chat]) .ui-btn.ui-btn-outline { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-btn.ui-btn-outline:hover { background: var(--hover); border-color: var(--line-2); }
/* ghost: no edge, --ink-2; hover and pressed --hover + ink */
html:not([data-crm],[data-crm-chat]) .ui-btn.ui-btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-btn.ui-btn-ghost:hover,
html:not([data-crm],[data-crm-chat]) .ui-btn.ui-btn-ghost:is([aria-pressed="true"], [aria-expanded="true"], .on) { background: var(--hover); color: var(--ink); }
/* wine: destructive, wine words on a soft wine ground, a stronger ground under the pointer */
html:not([data-crm],[data-crm-chat]) .ui-btn.ui-btn-wine { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
html:not([data-crm],[data-crm-chat]) .ui-btn.ui-btn-wine:hover { background: var(--danger-hi); color: var(--danger); }
html:not([data-crm],[data-crm-chat]) .ui-btn:is([disabled], [aria-disabled="true"]) { opacity: .45; cursor: default; }
html:not([data-crm],[data-crm-chat]) .ui-btn:is([disabled], [aria-disabled="true"]):hover { opacity: .45; }
html:not([data-crm],[data-crm-chat]) .ui-link { color: var(--ink); text-decoration-color: var(--line-2); }
html:not([data-crm],[data-crm-chat]) .ui-link:hover { text-decoration-color: var(--ink); }

/* ---- fields (crm.css:536-540 modal field, :1435-1437 settings field) ---- */
html:not([data-crm],[data-crm-chat]) :where(.ui-input, .ui-select) { height: 38px; padding: 0 12px; font-size: 14px; }
html:not([data-crm],[data-crm-chat]) :where(.ui-textarea, textarea.ui-input) { height: auto; min-height: 88px; padding: 8px 12px; font-size: 14px;
  line-height: 1.5; }
html:not([data-crm],[data-crm-chat]) :where(.ui-select) { padding-right: 34px; }
html:not([data-crm],[data-crm-chat]) :is(.ui-input, .ui-textarea, .ui-select) { font-family: var(--font); color: var(--ink);
  background-color: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-ctl); box-shadow: none;
  transition: border-color .15s, box-shadow .15s; }
html:not([data-crm],[data-crm-chat]) :is(.ui-input, .ui-textarea, .ui-select):hover { border-color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) :is(.ui-input, .ui-textarea, .ui-select):focus { outline: none; border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--ring); }
html:not([data-crm],[data-crm-chat]) :is(.ui-input, .ui-textarea)::placeholder { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) :is(.ui-input, .ui-textarea, .ui-select):is([disabled], [readonly]) { background-color: var(--hover);
  border-color: var(--line); color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) :is(.ui-input, .ui-textarea, .ui-select):is(.is-error, [aria-invalid="true"]) { border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft); }
/* the select: no native arrow, a chevron drawn by two gradients in --ink-3 */
html:not([data-crm],[data-crm-chat]) .ui-select { -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
html:not([data-crm],[data-crm-chat]) .ui-field { gap: 6px; }
html:not([data-crm],[data-crm-chat]) .ui-label { font-size: 14px; font-weight: 500; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-label .ui-hint { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-desc { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-error { font-size: 13.5px; font-weight: 500; color: var(--danger); }
/* radio cards (section 9): the field's edge and radius; the picked one the ink edge */
html:not([data-crm],[data-crm-chat]) .ui-choice { background: var(--surface); border-color: var(--line-2); border-radius: var(--r-ctl); }
html:not([data-crm],[data-crm-chat]) .ui-choice:hover { border-color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-choice input { accent-color: var(--brand-b); }
html:not([data-crm],[data-crm-chat]) .ui-choice span { color: var(--ink-2); }

/* ---- checkbox and switch: native inputs drawn as the CRM's .cb / .sw (crm.css:273-283) ---- */
html:not([data-crm],[data-crm-chat]) input.ui-check { -webkit-appearance: none; appearance: none; display: inline-grid; place-items: center;
  flex: none; width: 17px; height: 17px; margin: 0; border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); cursor: pointer; vertical-align: -3px; transition: background .15s, border-color .15s; }
html:not([data-crm],[data-crm-chat]) input.ui-check:hover { border-color: var(--ink-3); }
/* rule 39 (RD260): a ticked box takes the main button's blue, like a pressed chip, words on it in the button's ink */
html:not([data-crm],[data-crm-chat]) input.ui-check:checked { background: var(--btn-fill) border-box; border-color: var(--btn-fill-line); }
html:not([data-crm],[data-crm-chat]) input.ui-check:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--btn-fill-ink);
  border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
html:not([data-crm],[data-crm-chat]) input.ui-check:indeterminate { background: var(--btn-fill) border-box; border-color: var(--btn-fill-line); }
html:not([data-crm],[data-crm-chat]) input.ui-check:indeterminate::after { content: ""; width: 8px; height: 2px; background: var(--btn-fill-ink); }
html:not([data-crm],[data-crm-chat]) input.ui-switch { -webkit-appearance: none; appearance: none; position: relative; flex: none;
  width: 32px; height: 19px; margin: 0; border: 0; border-radius: var(--r-pill); background: var(--line-2); cursor: pointer;
  vertical-align: middle; transition: background .15s; }
html:not([data-crm],[data-crm-chat]) input.ui-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px;
  border-radius: var(--r-pill); background: var(--knob); box-shadow: var(--knob-shadow); transition: transform .15s; }
html:not([data-crm],[data-crm-chat]) input.ui-switch:hover { background: color-mix(in oklab, var(--line-2) 70%, var(--ink-3)); }
html:not([data-crm],[data-crm-chat]) input.ui-switch:checked { background: var(--ed); }
html:not([data-crm],[data-crm-chat]) input.ui-switch:checked::after { transform: translateX(13px); }
html:not([data-crm],[data-crm-chat]) :is(input.ui-check, input.ui-switch):disabled { opacity: .45; cursor: default; }
/* a labelled check or switch: words and control on one line (crm.css:1151 .ctog) */
html:not([data-crm],[data-crm-chat]) .ui-checkrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink);
  cursor: pointer; }
html:not([data-crm],[data-crm-chat]) .ui-toggle { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px 0 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface); font-size: 14px; font-weight: 500;
  color: var(--ink); cursor: pointer; }
html:not([data-crm],[data-crm-chat]) .ui-toggle:hover { background: var(--hover); }

/* ---- segmented control (crm.css:150-156 .crm-theme, :1062-1064 .seg2) ---- */
html:not([data-crm],[data-crm-chat]) :where(.ui-seg) { padding: 3px; gap: 2px; }
html:not([data-crm],[data-crm-chat]) :where(.ui-seg) :where(button, a) { height: 30px; padding: 0 12px; font-size: 13.5px; }
html:not([data-crm],[data-crm-chat]) .ui-seg { background: var(--hover); border-radius: var(--r-seg); }
html:not([data-crm],[data-crm-chat]) .ui-seg :is(button, a) { font-family: var(--font); font-weight: 500; color: var(--ink-2);
  border-radius: var(--r-item); background: transparent; box-shadow: none; text-decoration: none; transition: color .15s, background .15s; }
html:not([data-crm],[data-crm-chat]) .ui-seg :is(button, a):hover { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-seg :is(button, a):is(.on, [aria-pressed="true"], [aria-selected="true"], [aria-current="page"]) {
  background: var(--surface); color: var(--ink); box-shadow: var(--seg-shadow); }

/* ---- underline tabs: ui-utabs / ui-utab, the CRM's .tab (crm.css:191-203) ---- */
html:not([data-crm],[data-crm-chat]) :where(.ui-utabs) { gap: 2px; }
html:not([data-crm],[data-crm-chat]) :where(.ui-utab) { height: 44px; padding: 0 12px; gap: 8px; font-size: 14.5px; }
html:not([data-crm],[data-crm-chat]) .ui-utab { position: relative; isolation: isolate; font-weight: 500; color: var(--ink-2);
  border-bottom: 0; margin-bottom: 0; text-decoration: none; }
html:not([data-crm],[data-crm-chat]) .ui-utab::before { content: ""; position: absolute; inset: 7px 2px; z-index: -1; border-radius: var(--r-item);
  background: var(--hover); opacity: 0; transition: opacity .15s; }
html:not([data-crm],[data-crm-chat]) .ui-utab:hover { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-utab:hover::before { opacity: 1; }
html:not([data-crm],[data-crm-chat]) .ui-utab:is(.on, [aria-selected="true"], [aria-current="page"]) { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-utab:is(.on, [aria-selected="true"], [aria-current="page"])::after { content: ""; position: absolute;
  left: 0; right: 0; bottom: -1px; height: 2px; border-radius: var(--r-sm); background: var(--ink); pointer-events: none; }
html:not([data-crm],[data-crm-chat]) .ui-utab .ui-i { width: 16px; height: 16px; opacity: .8; }
html:not([data-crm],[data-crm-chat]) .ui-utab .ui-n { font-size: 12px; font-weight: 600; color: var(--ink-3); background: var(--hover);
  border-radius: var(--r-pill); padding: 0 7px; line-height: 19px; }

/* ---- filter bar, toolbar, removable chips (crm.css .fbtn / .fchip, DESIGN-SYSTEM 3.7) ---- */
html:not([data-crm],[data-crm-chat]) :where(.ui-filters, .ui-toolbar) { gap: 8px 10px; }
html:not([data-crm],[data-crm-chat]) .ui-filters .ui-btn { height: 38px; padding: 0 14px; font-size: 14px; background: var(--surface);
  border-color: var(--line-2); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-filters .ui-btn:is(:hover, [aria-expanded="true"]) { background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .ui-filters .ui-menu[open] > summary.ui-btn { background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .ui-filters .ui-btn.on { border-color: var(--ink); box-shadow: none; }
html:not([data-crm],[data-crm-chat]) .ui-filters .ui-btn .ui-n { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-filters .ui-btn.on .ui-n { min-width: 19px; padding: 0 6px; border-radius: var(--r-pill);
  background: var(--btn-fill); color: var(--btn-fill-ink); box-shadow: inset 0 0 0 1px var(--btn-fill-line); font-size: 12px; font-weight: 600; line-height: 19px; text-align: center; }
html:not([data-crm],[data-crm-chat]) .ui-picked { gap: 8px; font-size: 13.5px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-picked a.ui-btn { height: 34px; padding: 0 12px; font-size: 13.5px; font-weight: 600;
  background: var(--surface); border-color: var(--line-2); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-picked a.ui-btn:hover { background: var(--hover); }
/* the chip: key, value, its own x (crm.css .fchip / .fcb / .fk / .fx; .fclr) */
html:not([data-crm],[data-crm-chat]) .ui-chip { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 4px 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface); font-size: 13.5px; font-weight: 600;
  color: var(--ink); white-space: nowrap; transition: opacity .15s; }
html:not([data-crm],[data-crm-chat]) .ui-chip .ui-chip-k { font-weight: 500; color: var(--ink-3); margin-right: 2px; }
html:not([data-crm],[data-crm-chat]) .ui-chip .ui-chip-x { display: grid; place-items: center; width: 24px; height: 24px; margin-left: 2px;
  padding: 0; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-3); cursor: pointer; text-decoration: none; }
html:not([data-crm],[data-crm-chat]) .ui-chip .ui-chip-x:hover { background: var(--hover); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-chip .ui-chip-x .ui-i { width: 14px; height: 14px; }
html:not([data-crm],[data-crm-chat]) .ui-chip.going { opacity: .4; }
html:not([data-crm],[data-crm-chat]) .ui-chip-clear { border: 0; background: none; padding: 0 6px; font: inherit; font-size: 13.5px;
  font-weight: 500; color: var(--ink-2); cursor: pointer; text-decoration: none; }
html:not([data-crm],[data-crm-chat]) .ui-chip-clear:hover { color: var(--ink); }

/* ---- table (crm.css:360-364, 584-590 .tablewrap table) + the total row (lesson 2026-09-18) ---- */
html:not([data-crm],[data-crm-chat]) .ui-table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--rpage);
  box-shadow: none; }
html:not([data-crm],[data-crm-chat]) :where(table.ui-table) { font-size: 14px; }
html:not([data-crm],[data-crm-chat]) :where(.ui-table th) { height: 42px; padding: 0 14px; font-size: 13px; }
html:not([data-crm],[data-crm-chat]) :where(.ui-table td) { padding: 10px 14px; }
html:not([data-crm],[data-crm-chat]) .ui-table th { font-weight: 500; color: var(--ink-2); background: transparent;
  border-bottom: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-table td { border-bottom: 1px solid var(--line); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-table tbody tr:last-child td { border-bottom: 0; }
html:not([data-crm],[data-crm-chat]) .ui-table tbody tr:is(:hover, :focus-visible) td { background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .ui-table .num { font-family: var(--font); font-variant-numeric: tabular-nums; }
html:not([data-crm],[data-crm-chat]) .ui-table :is(.ui-when, .ui-cell-sub) { color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-table .ui-cell-title { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-table .ui-blank { color: var(--ink-3); }
/* the total row: last in tbody (tr.ui-total) or the tfoot; 600, the stronger rule above it */
html:not([data-crm],[data-crm-chat]) .ui-table :is(tr.ui-total, tfoot tr) td { font-weight: 600; color: var(--ink); background: transparent;
  border-top: 1px solid var(--line-2); border-bottom: 0; }
html:not([data-crm],[data-crm-chat]) .ui-table tbody tr.ui-total:hover td { background: transparent; }
html:not([data-crm],[data-crm-chat]) tr:hover .ui-cell-title { text-decoration-color: var(--ink-3); }

/* ---- card (neutral: surface, line, radius, --shadow; a hover only lifts, never tints) ---- */
html:not([data-crm],[data-crm-chat]) .ui-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--rpage);
  box-shadow: var(--shadow); color: var(--ink); transition: box-shadow .2s; }
html:not([data-crm],[data-crm-chat]) :is(a.ui-card, button.ui-card, .ui-card[tabindex], .ui-card.is-link):hover { box-shadow: var(--shadow-hi); }
html:not([data-crm],[data-crm-chat]) :where(.ui-card-head) { padding: 18px 20px 0; }
html:not([data-crm],[data-crm-chat]) :where(.ui-card-body) { padding: 18px 20px 20px; }
html:not([data-crm],[data-crm-chat]) .ui-card-head h3 { font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-card-head p { margin-top: 4px; font-size: 13.5px; color: var(--ink-2); }
/* the start cards: the same card; the first choice an ink edge */
html:not([data-crm],[data-crm-chat]) .ui-start-card { background: var(--surface); border-color: var(--line); border-radius: var(--rpage);
  box-shadow: var(--shadow); }
html:not([data-crm],[data-crm-chat]) .ui-start-card.is-primary { border: 1px solid var(--ink); padding: 24px; }
html:not([data-crm],[data-crm-chat]) .ui-start-ico { background: var(--hover); color: var(--ink); border-radius: var(--r-ctl); }

/* ---- KPI tile (crm.css .wl-kpi grown on the card): the number where the eye lands ---- */
html:not([data-crm],[data-crm-chat]) .ui-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
html:not([data-crm],[data-crm-chat]) .ui-kpi { display: flex; flex-direction: column; min-width: 0; padding: 16px 18px 15px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-tile); box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
  transition: box-shadow .2s; }
html:not([data-crm],[data-crm-chat]) :is(a.ui-kpi, button.ui-kpi, .ui-kpi[tabindex]):hover { box-shadow: var(--shadow-hi); }
html:not([data-crm],[data-crm-chat]) .ui-kpi-label { font-size: 13.5px; font-weight: 500; line-height: 1.35; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-kpi-value { margin-top: 6px; font-size: 27px; font-weight: 600; line-height: 1.15; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-kpi-sub { margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--ink-2);
  font-variant-numeric: tabular-nums; }
html:not([data-crm],[data-crm-chat]) .ui-kpi.is-warn .ui-kpi-value { color: var(--bad); }

/* ---- media tile (Meta's media library card on the neutral card) ---- */
html:not([data-crm],[data-crm-chat]) .ui-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile);
  overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .2s, border-color .15s; }
html:not([data-crm],[data-crm-chat]) .ui-tile:hover { border-color: var(--line); box-shadow: var(--shadow-hi); }
html:not([data-crm],[data-crm-chat]) .ui-tile.selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink), var(--shadow); }
html:not([data-crm],[data-crm-chat]) .ui-tile-media { background: var(--hover); color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-tile-body { padding: 10px 12px 12px; }
html:not([data-crm],[data-crm-chat]) .ui-tile-title { font-size: 14px; font-weight: 500; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-tile-sub { font-size: 13px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) :is(.ui-tile-type, .ui-tile-dur) { font-size: 12px; color: var(--on-fill); background: var(--media-scrim);
  border-radius: var(--r-sm); }
html:not([data-crm],[data-crm-chat]) .ui-tile-new { font-size: 12px; color: var(--on-fill); background: var(--ed); border-radius: var(--r-sm); }
html:not([data-crm],[data-crm-chat]) .ui-tile-play { border-radius: var(--r-pill); background: var(--media-play); }
html:not([data-crm],[data-crm-chat]) .ui-tile-play svg { fill: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .ui-tile-star button { border-radius: var(--r-pill); background: color-mix(in oklab, var(--surface) 92%, transparent);
  color: var(--ink); box-shadow: var(--seg-shadow); }
html:not([data-crm],[data-crm-chat]) .ui-tile-star button:hover { background: var(--surface); }

/* ---- dialog (crm.css:532-540 .modal) ---- */
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog { border: 0; border-radius: var(--rpage); background: var(--surface); color: var(--ink);
  box-shadow: var(--modal-shadow); }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog::backdrop { background: var(--backdrop); }
html:not([data-crm],[data-crm-chat]) :where(.ui-dialog-head) { padding: 24px 24px 0; }
html:not([data-crm],[data-crm-chat]) :where(.ui-dialog-body) { padding: 16px 24px; }
html:not([data-crm],[data-crm-chat]) :where(.ui-dialog-foot) { padding: 4px 24px 24px; gap: 8px; }
html:not([data-crm],[data-crm-chat]) .ui-dialog-head :is(h2, h3) { font-size: 20px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-dialog-head p { color: var(--ink-2); }

/* ---- drawer / side sheet: the floating panel (the menu's and the tree's look, 10 px off the window) ---- */
html:not([data-crm],[data-crm-chat]) .ui-drawer { position: fixed; z-index: 70; top: 10px; right: 10px; bottom: 10px;
  width: min(480px, calc(100vw - 20px)); display: flex; flex-direction: column; overflow: hidden; background: var(--surface);
  border: 1px solid var(--side-line); border-radius: var(--r-side); box-shadow: var(--side-shadow), var(--pop-shadow); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-drawer[hidden] { display: none; }
html:not([data-crm],[data-crm-chat]) .ui-drawer.is-static { position: relative; z-index: auto; top: auto; right: auto; bottom: auto; }
html:not([data-crm],[data-crm-chat]) .ui-drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 14px 12px 20px;
  border-bottom: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-drawer-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
html:not([data-crm],[data-crm-chat]) .ui-drawer-body { flex: 1; min-height: 0; overflow: auto; padding: 18px 20px; }
html:not([data-crm],[data-crm-chat]) .ui-drawer-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px;
  border-top: 1px solid var(--line); }

/* ---- menu and popover (crm.css .cm, static/crm_menu.js; DESIGN-SYSTEM 3.14) ---- */
html:not([data-crm],[data-crm-chat]) .ui-menu[open] > summary { background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .ui-menu > summary .ui-chev { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-menu-list { padding: 5px; background: var(--pop); border: 0; border-radius: var(--r-menu);
  box-shadow: var(--pop-shadow); }
html:not([data-crm],[data-crm-chat]) :where(.ui-menu-list a, .ui-menu-list button) { padding: 7px 10px; font-size: 14px; }
html:not([data-crm],[data-crm-chat]) .ui-menu-list :is(a, button) { border-radius: var(--r-item); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-menu-list :is(a, button):hover { background: var(--hover); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-menu-list :is(a, button).on { font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .ui-menu-list .ui-i { color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-menu-list .ui-n { font-size: 12px; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-menu-list .ui-menu-label { padding: 8px 10px 4px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-menu-list hr { border-top-color: var(--line); margin: 5px 4px; }
html:not([data-crm],[data-crm-chat]) .ui-menu-list .is-danger { color: var(--danger); }
html:not([data-crm],[data-crm-chat]) .ui-menu-list .is-danger:hover { background: var(--danger-soft); color: var(--danger); }
/* a popover: any floating box of content (a picker, a short form, a hover card) */
html:not([data-crm],[data-crm-chat]) .ui-pop { padding: 14px 16px; background: var(--pop); border-radius: var(--r-menu);
  box-shadow: var(--pop-shadow); color: var(--ink); font-size: 14px; }
html:not([data-crm],[data-crm-chat]) .ui-pop h4 { margin: 0 0 4px; font-size: 14.5px; font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .ui-pop p { margin: 0; color: var(--ink-2); }
@keyframes ui-pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
html:not([data-crm],[data-crm-chat]) :is(.ui-menu[open] > .ui-menu-list, .ui-pop.on) { animation: ui-pop-in .14s cubic-bezier(.2, .8, .2, 1); }

/* ---- toast (crm.css:526-531 .toast): inverted, bottom centre ---- */
html:not([data-crm],[data-crm-chat]) .ui-toast { position: fixed; z-index: 80; left: 50%; bottom: 24px; max-width: min(680px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 14px; padding: 11px 18px; border-radius: var(--r-tile); background: var(--toast-bg);
  color: var(--toast-ink); box-shadow: var(--toast-shadow); font-size: 14px; line-height: 1.4; opacity: 0; pointer-events: none;
  transform: translate(-50%, 20px); transition: opacity .2s, transform .2s; }
html:not([data-crm],[data-crm-chat]) .ui-toast.on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
html:not([data-crm],[data-crm-chat]) .ui-toast.is-static { position: relative; left: auto; bottom: auto; opacity: 1; transform: none; }
html:not([data-crm],[data-crm-chat]) .ui-toast-act { border: 0; border-radius: var(--r-pill); padding: 4px 12px; background: var(--toast-act);
  color: inherit; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none; }

/* ---- tooltip: the folded menu's tip (ink ground, canvas words) on any control ---- */
html:not([data-crm],[data-crm-chat]) .ui-has-tip { position: relative; }
html:not([data-crm],[data-crm-chat]) .ui-tip { position: absolute; z-index: 90; left: 50%; bottom: calc(100% + 8px); width: max-content;
  max-width: 260px; padding: 5px 10px; border-radius: var(--r-item); background: var(--ink); color: var(--canvas); font-size: 13px;
  font-weight: 500; line-height: 1.4; white-space: normal; pointer-events: none; opacity: 0; transform: translate(-50%, 2px);
  transition: opacity .12s, transform .12s; }
html:not([data-crm],[data-crm-chat]) .ui-tip.is-below { bottom: auto; top: calc(100% + 8px); }
html:not([data-crm],[data-crm-chat]) :is(.ui-has-tip:hover, .ui-has-tip:focus-within) > .ui-tip,
html:not([data-crm],[data-crm-chat]) .ui-tip.on { opacity: 1; transform: translate(-50%, 0); }

/* ---- empty state (crm.css:305 .empty): dashed, no fill, words that say what is missing ---- */
/* rd-bank: a list's ground on the tokens (it stayed #fff, so in Dark the empty state inside one drew a white block);
   only a list holding just an empty state rounds here: a list of rows rounds with its own page */
html:not([data-crm],[data-crm-chat]) .ui-list { background: var(--surface); border-color: var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-list:has(> .ui-empty:only-child) { border-radius: var(--r-tile); }
html:not([data-crm],[data-crm-chat]) .ui-empty { background: transparent; border: 1.5px dashed var(--line-2); border-radius: calc(var(--rc) - 6px);
  color: var(--ink-2); font-size: 14.5px; }
html:not([data-crm],[data-crm-chat]) :is(.ui-list, .ui-table-wrap, .ui-card) .ui-empty { border: 0; }
html:not([data-crm],[data-crm-chat]) .ui-empty-ico { background: var(--hover); color: var(--ink-2); border-radius: var(--r-tile); }
html:not([data-crm],[data-crm-chat]) .ui-empty h3 { font-size: 16.5px; font-weight: 600; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-empty p { color: var(--ink-2); }

/* ---- pager (macros/pager.html, rule 16a, DESIGN-SYSTEM 6.19): the range in quiet text, plain
   page numbers with no outline, the current page in a small raised box, arrows at each side. It
   sits at the right end of the filter line. ---- */
html:not([data-crm],[data-crm-chat]) .ui-pager { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 3px; margin-left: auto;
  font-family: var(--font); font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
html:not([data-crm],[data-crm-chat]) .ui-pager.ui-pager-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
html:not([data-crm],[data-crm-chat]) .ui-pager-n { margin-right: 8px; white-space: nowrap; }
html:not([data-crm],[data-crm-chat]) .ui-pg { display: inline-grid; place-items: center; box-sizing: border-box; min-width: 32px; height: 32px; padding: 0 7px;
  border: 1px solid transparent; border-radius: var(--r-item); background: none; color: var(--ink-2);
  font-size: 13.5px; font-weight: 500; line-height: 1; text-decoration: none; }
html:not([data-crm],[data-crm-chat]) a.ui-pg:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
html:not([data-crm],[data-crm-chat]) .ui-pg.on { background: var(--surface); border-color: var(--line-2); color: var(--ink); font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .ui-pg[aria-disabled] { opacity: .32; cursor: default; }
html:not([data-crm],[data-crm-chat]) .ui-pg svg { width: 14px; height: 14px; }
html:not([data-crm],[data-crm-chat]) .ui-pager-gap { padding: 0 4px; }
html:not([data-crm],[data-crm-chat]) .ui-pager-per { margin: 0 0 0 12px; white-space: nowrap; }
html:not([data-crm],[data-crm-chat]) .ui-pager-per label { display: inline-flex; align-items: center; gap: 6px; }
html:not([data-crm],[data-crm-chat]) .ui-pager-per select { -webkit-appearance: none; appearance: none; height: 32px; padding: 0 28px 0 10px;
  font-family: var(--font); font-size: 13.5px; color: var(--ink); background-color: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-item); cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
html:not([data-crm],[data-crm-chat]) .ui-pager-per select:hover { border-color: var(--ink-3); }

/* ---- alert (crm.css .gate, .gate.err, .importhint; DESIGN-SYSTEM 3.18) ----
   neutral by default; a status class (s-back, s-idle...) keeps its soft band and colour; the
   named tones are the CRM's notes. No left rule, a soft ground and a radius instead. */
html:not([data-crm],[data-crm-chat]) .ui-alert { padding: 12px 16px; gap: 4px 12px; border: 1px solid transparent; border-left: 0;
  border-radius: var(--r-tile); background: var(--sb, var(--hover)); color: var(--ink); font-size: 14px; line-height: 1.45; }
html:not([data-crm],[data-crm-chat]) .ui-alert > .sico { width: 18px; height: 18px; margin-top: 1px; }
html:not([data-crm],[data-crm-chat]) .ui-alert > .ui-i { width: 18px; height: 18px; margin-top: 1px; color: var(--sc, var(--ink-2)); }
html:not([data-crm],[data-crm-chat]) .ui-alert b { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-alert .ui-quote { border-left-color: var(--sc, var(--line-2)); border-left-width: 2px; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-alert.ui-alert-warn { --sc: var(--alert-warn); background: color-mix(in oklab, var(--alert-warn) 12%, var(--surface)); }
html:not([data-crm],[data-crm-chat]) .ui-alert.ui-alert-err { --sc: var(--alert-err); background: color-mix(in oklab, var(--alert-err) 14%, var(--surface)); }
html:not([data-crm],[data-crm-chat]) .ui-alert.ui-alert-info { --sc: var(--ed); background: color-mix(in oklab, var(--ed) 9%, var(--surface));
  border-color: color-mix(in oklab, var(--ed) 22%, transparent); }
html:not([data-crm],[data-crm-chat]) .ui-alert:is(.ui-alert-warn, .ui-alert-err, .ui-alert-info) > .ui-i { color: var(--sc); }

/* ---- status chips (the 10-19 system, macros/status.html): the round shape here, outside the
   pinned U1 block; colours stay the U1 block's (Light) and tokens.css's (Dark, RD49) ---- */
html:not([data-crm],[data-crm-chat]) .st-chip.lg { border-radius: var(--r-pill); padding: 5px 14px; font-size: 15px; }
html:not([data-crm],[data-crm-chat]) .n-pill { border-radius: var(--r-pill); color: var(--st-on); font-size: 12px; padding: 0 7px;
  min-width: 22px; height: 20px; }

/* ---- the older katski.css families (its phase 3 block): their pointer states that change a
   ground live here, beside the ui-* ones ---- */
html:not([data-crm],[data-crm-chat]) .btn:hover { background: var(--hover); border-color: var(--line-2); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .btn-primary:hover { background: var(--btn-fill-hover); border-color: var(--btn-fill-line); color: var(--btn-fill-ink); filter: var(--btn-fill-lift); }
html:not([data-crm],[data-crm-chat]) :is(.btn-del, .btn-wine):hover { background: var(--danger-hi); border-color: transparent; color: var(--danger); }
html:not([data-crm],[data-crm-chat]) .tbl tbody tr:hover { background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .chip:hover { background: var(--hover); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .pill-link:hover { background: var(--hover); border-color: var(--line); color: var(--ink); }

/* ---- the continuous corner on every component that sits on a squircle-sized token ---- */
@supports (corner-shape: squircle) {
  html:not([data-crm],[data-crm-chat]) :is(.ui-table-wrap, .ui-card, .ui-start-card, dialog.ui-dialog, .ui-drawer, .ui-empty) { corner-shape: squircle; }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-crm],[data-crm-chat]) :is(.ui-btn, .ui-input, .ui-textarea, .ui-select, .ui-seg *, .ui-utab, .ui-utab::before, .ui-card, .ui-kpi,
    .ui-tile, .ui-toast, .ui-tip, .ui-chip, input.ui-switch, input.ui-switch::after, input.ui-check, .ui-menu-list, .ui-pop) {
    transition: none; animation: none; }
}
/* ==== platform-redesign phase 3: components, end */
/* crm-publish: the Publishing count, a quiet pill in the mockup's look */
html body .ui-sidebar .n-pill.nav-publishing { background: #fff; color: #1d1d1f; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
html[data-crm-theme="dark"] body .ui-sidebar .n-pill.nav-publishing { background: rgba(255,255,255,.1); color: #f2f2f4; box-shadow: none; }
/* the redesign lane, at the merge of 8d9f72f4: outside the CRM the same pill on the shared tokens, so it
   follows Light / Dark there (the rule above reads data-crm-theme, which only a CRM page carries) */
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .n-pill.nav-publishing { background: var(--surface); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line); }

/* ==== rd-shell: the Admin tag (RD21, RD64; DESIGN-SYSTEM 6.23). The menu is shared with the
   CRM, so this block is NOT scoped off the CRM pages: the one allowed CRM difference (RD1,
   RD21). It reads only --ink-3, which both token sets define. A quiet grey lock + "Admin" at a
   row's right end (or once on a group's label), no fill, 11 px words and a 10 px lock, sized so
   the longest admin label ("Review and publish") keeps its whole line in the 256 px panel. A
   row that also carries a count shows the lock alone, the word kept for screen readers and in
   the title (RD64). Hidden on the folded rail. */
.ui-sidebar .ui-nav-admin { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 500; line-height: 1; letter-spacing: 0; color: var(--ink-3); white-space: nowrap; }
.ui-sidebar .ui-nav-admin .ui-nav-lock { width: 10px; height: 10px; flex: none; }
.ui-sidebar :is(.n-pill, .nav-badge, .nav-ref-tag, .ui-nav-badge) ~ .ui-nav-admin { margin-left: 4px; }
.ui-sidebar :is(.n-pill, .nav-badge, .nav-ref-tag, .ui-nav-badge) ~ .ui-nav-admin .ui-nav-admin-w { position: absolute;
  width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* the menu's own item and label rules weigh 0,3,2 (html[...] body .ui-sidebar .x); these match
   it and come later (ui.css is the last sheet on every page). On a tagged row the 12 px gap
   becomes margins (12 after the icon, 6 after the label) and the right padding drops to 4, so
   "Review and publish" + "Admin" fit with 2 px to spare. */
html body .ui-sidebar :is(.ui-nav-item, .ui-nav-child):has(> .ui-nav-admin) { gap: 0; padding-right: 4px; }
html body .ui-sidebar :is(.ui-nav-item, .ui-nav-child):has(> .ui-nav-admin) > .ui-i { margin-right: 12px; }
html body .ui-sidebar :is(.ui-nav-item, .ui-nav-child):has(> .ui-nav-admin) > .ui-nav-w { margin-right: 6px; }
/* rd-menu-ship (RD21, RD38): where a whole group is admin-only (Business, Admin) the tag sits once
   on its label, at the right end; no token, so it reads the same on both shells */
html body .ui-sidebar .ui-nav-label:has(> .ui-nav-admin) { display: flex; align-items: center; padding-right: 4px; }
@media (min-width: 768px) {
  html[data-menu="folded"] .ui-sidebar .ui-nav-admin { display: none; }
  html[data-menu="folded"] body .ui-sidebar :is(.ui-nav-item, .ui-nav-child):has(> .ui-nav-admin) > .ui-i { margin-right: 0; }
}
/* ==== rd-shell: the Admin tag, end */
/* ==== rd-menu: the folded menu's counts (RD37, Paul 11-11: "The number of active items should
   be at top right on the icon"; RD176; DESIGN-SYSTEM 6.26). NOT scoped off the CRM pages: the
   menu is shared, so this one block draws every page's folded counts, Light and Dark. Folded,
   each count of a row (My campaigns, Review and publish, Publishing, the CRM, any .nav-badge)
   leaves the row's flow and sits as a small number on the top right corner of its icon, so
   every icon keeps one centre line. It keeps its own fill (a status count its status colour,
   the CRM its role colour, Publishing its quiet pill); a 2 px ring in the rail's ground parts
   it from the icon. The item is 44 px square and its 20 px icon spans 12-32 px, so a badge
   whose left edge is at 23 px and whose bottom is at 19 px covers the icon's corner, never its
   middle, and grows to the right: two digits end near 46 px, well inside the 76 px rail. The
   menu's id (#ui-sidebar) outranks crm.css's folded dot rule (crm.css:165, 0,5,2) and its
   soft pill (crm.css:130) by selector, so crm.css is not edited. Unfolded nothing changes. */
@media (min-width: 768px) {
  html[data-menu="folded"] body #ui-sidebar .ui-nav-item { position: relative; }
  html[data-menu="folded"] body #ui-sidebar .ui-nav-item > :is(.n-pill, .nav-badge) { display: block; position: absolute;
    top: 3px; left: 23px; right: auto; margin: 0; box-sizing: border-box; width: auto; min-width: 16px; height: 16px;
    padding: 0 4px; border: 0; border-radius: 99px; font-family: inherit; font-size: 10.5px; font-weight: 600;
    line-height: 16px; letter-spacing: 0; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 2px var(--side-bg); pointer-events: none; }
  /* Publishing's quiet pill keeps its hairline inside the ring */
  html[data-menu="folded"] body #ui-sidebar .ui-nav-item > .n-pill.nav-publishing {
    box-shadow: inset 0 0 0 1px var(--side-line), 0 0 0 2px var(--side-bg); }
  /* on the lit item the ring takes the lit pill's ground, so it reads as a cut, not a halo */
  html[data-menu="folded"] body #ui-sidebar .ui-nav-item:is(.active, .is-lit) > :is(.n-pill, .nav-badge) {
    box-shadow: 0 0 0 2px var(--side-on); }
  html[data-menu="folded"] body #ui-sidebar .ui-nav-item:is(.active, .is-lit) > .n-pill.nav-publishing {
    box-shadow: inset 0 0 0 1px var(--side-line), 0 0 0 2px var(--side-on); }
}
/* ==== rd-menu: the folded menu's counts, end */
/* ==== rd-menu2: the menu's "there is more" fade (RD184; DESIGN-SYSTEM 6.27). The fade only
   (Paul 11-14, "Roomy + scroll": the rows keep their height and the menu scrolls). NOT scoped
   off the CRM pages, like the block above: one block draws every page's menu. When the list is
   longer than its box, a soft fade of the menu's ground over the last 24 px above the pinned
   foot says there is more. It is the foot's own ::before, its opacity run by the menu's scroll
   (a scroll-driven animation): seen while the list can still scroll down, gone over the last
   24 px of it, and never there when nothing scrolls (the timeline is inactive, so the resting
   opacity 0 holds). A browser without scroll timelines shows no fade, as before. The ground is
   --side-solid, the colour the pinned head and foot already paint. */
@keyframes ui-menu-more { from { opacity: 1; } to { opacity: 0; } }
@supports (animation-timeline: scroll()) {
  @media (min-width: 768px) {
    html body #ui-sidebar > .ui-nav-foot::before { content: ""; position: absolute; left: 0; right: 0;
      bottom: 100%; height: 24px; pointer-events: none; opacity: 0;
      background: linear-gradient(to bottom, transparent, var(--side-solid));
      animation: ui-menu-more linear both; animation-timeline: scroll(nearest block);
      animation-range: calc(100% - 24px) 100%; }
  }
}
/* ==== rd-menu2: the menu's fade, end */
/* ==== rd-shell: the accent and glass bars (RD22-RD24, RD64-RD72; DESIGN-SYSTEM 6.24, 6.25).
   Scoped off the CRM like phase 3; colours only through tokens.css (--key*, --glass*). */

/* ---- the accent: one kind of thing per view. A table's key column (header + numbers), the KPI
   tile that matters, a filled or soft key pill. Never a button (primary actions stay ink),
   never a status. Set C ("none") makes each of these exactly today's ink look. */
html:not([data-crm],[data-crm-chat]) .ui-table :is(th, td).is-key { color: var(--key); font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .ui-kpi.is-key .ui-kpi-value { color: var(--key); }
html:not([data-crm],[data-crm-chat]) :where(.ui-key-pill) { height: 24px; padding: 0 10px; font-size: 12.5px; }
html:not([data-crm],[data-crm-chat]) .ui-key-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill);
  background: var(--key-fill); color: var(--on-key); font-weight: 600; line-height: 1; white-space: nowrap; }
html:not([data-crm],[data-crm-chat]) .ui-key-pill.is-soft { background: var(--key-soft); color: var(--key); }
/* a live count: a small --ok dot before the number (RD24); the number keeps its own colour */
html:not([data-crm],[data-crm-chat]) .ui-dot-live { display: inline-block; width: 8px; height: 8px; margin-right: 7px; flex: none;
  vertical-align: .06em; border-radius: var(--r-pill); background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok) 20%, transparent); }

/* ---- glass: only a bar that floats over scrolling content (never a card or a panel). The ground
   is --glass-solid; where the browser blurs, --glass with --glass-blur; with reduced
   transparency asked for, solid again. The top bar sits above the content pane (the pane
   scrolls, not the page, release E9), so its glass shows the canvas; a page's sticky bar and a
   sticky table head sit inside the pane and show the content passing under them. */
html:not([data-crm],[data-crm-chat]) .ui-header { position: relative; z-index: 3; background: var(--glass-solid);
  border-bottom-color: var(--glass-line); }
html:not([data-crm],[data-crm-chat]) .ui-bar { position: sticky; top: 0; z-index: 12; display: flex; align-items: center;
  flex-wrap: wrap; }
html:not([data-crm],[data-crm-chat]) :where(.ui-bar) { gap: 8px 12px; padding: 10px 32px 12px; }
html:not([data-crm],[data-crm-chat]) :is(.ui-bar, .page-bar) { background: var(--glass-solid); border-bottom: 1px solid var(--glass-line); }
/* a sticky table head: the wrap clips instead of scrolling sideways (a scroll box would hold
   the head), the cells stick under the page's bar (`--ui-sticky-top`, 0 by default) and draw
   their rule as an inset line, so it travels with them */
html:not([data-crm],[data-crm-chat]) .ui-table-wrap.is-sticky { overflow: clip; }
html:not([data-crm],[data-crm-chat]) .ui-table-wrap.is-sticky thead th { position: sticky; top: var(--ui-sticky-top, 0px); z-index: 2;
  background: var(--glass-solid); border-bottom-color: transparent; box-shadow: inset 0 -1px 0 var(--glass-line); }
@supports (backdrop-filter: blur(1px)) {
  html:not([data-crm],[data-crm-chat]) :is(.ui-header, .ui-bar, .page-bar, .ui-table-wrap.is-sticky thead th) {
    background: var(--glass); backdrop-filter: var(--glass-blur); }
}
@supports (-webkit-backdrop-filter: blur(1px)) and (not (backdrop-filter: blur(1px))) {
  html:not([data-crm],[data-crm-chat]) :is(.ui-header, .ui-bar, .page-bar, .ui-table-wrap.is-sticky thead th) {
    background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); }
}
@media (prefers-reduced-transparency: reduce) {
  html:not([data-crm],[data-crm-chat]) :is(.ui-header, .ui-bar, .page-bar, .ui-table-wrap.is-sticky thead th) {
    background: var(--glass-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
/* the lift: --glass-shadow shows once content has scrolled under a bar (the first 24 px of the
   pane's scroll), CSS only. A page's own bar lifts with its pane (scroll(nearest)); the top
   bar reads the pane's named timeline (timeline-scope on .ui-main) and stays flat when the page
   has a bar of its own, so two shadows never stack. Without scroll timelines: the hairline
   alone. Not motion (it follows the scroll), so reduced motion keeps it. */
@keyframes ui-glass-lift { to { box-shadow: var(--glass-shadow); } }
@supports (animation-timeline: scroll()) {
  html:not([data-crm],[data-crm-chat]) :is(.ui-bar, .page-bar) { animation: ui-glass-lift linear both;
    animation-timeline: scroll(nearest block); animation-range: 0 24px; }
  html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-main { timeline-scope: --ui-pane; }
  html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-scroll { scroll-timeline: --ui-pane block; }
  html:not([data-crm],[data-crm-chat]) .ui-header { animation: ui-glass-lift linear both;
    animation-timeline: --ui-pane; animation-range: 0 24px; }
  html:not([data-crm],[data-crm-chat]) .ui-main:has(> .ui-scroll > :is(.ui-bar, .page-bar)) > .ui-header { animation: none; }
}
/* ==== rd-shell: the accent and glass bars, end */
/* ==== platform-redesign rd-settings: the settings section (DESIGN-SYSTEM 6.30-6.32) and the Settings page
   The CRM's settings pattern (crm.css:1445-1455 .disc-set + .ds-row) for every platform page that
   sets things: a titled section (.ui-setsec, its head the old .ui-section-head without the 3 px ink
   rule), a rounded surface card (.ui-set) of rows (.ui-set-row: label and help at the left, the
   control at the right; .ui-set-stack puts it under), a heading row (.ui-set-h), a foot with the
   form's one primary action (.ui-set-foot), a value (.ui-set-val), an on / off word with its dot
   (.ui-set-state) and a secret or command box (.ui-secret). Rows draw their line ABOVE as a 1 px
   shadow and the card clips, so the first row of any nesting (a form, a list) never doubles the
   card's edge. Sizes in :where() (0,1,1), the look at 0,2,1 and up, tokens only. No em dash. */
html:not([data-crm],[data-crm-chat]) :where(.ui-setsec) { margin-top: 44px; }
html:not([data-crm],[data-crm-chat]) :is(.ui-setsec, .ui-setbox) > .ui-section-head { gap: 4px 12px; margin: 0 0 14px; padding: 0 2px; border-top: 0; }
html:not([data-crm],[data-crm-chat]) :is(.ui-setsec, .ui-setbox) > .ui-section-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) :is(.ui-setsec, .ui-setbox) > .ui-section-head .ui-count { font-size: 14px; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) :is(.ui-setsec, .ui-setbox) > .ui-section-head .ui-sub { flex: 0 0 100%; max-width: none; padding-right: min(200px, 20%); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-set { display: block; margin: 0; overflow: clip; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--rpage); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) :where(.ui-set-row) { gap: 24px; padding: 16px 20px; }
html:not([data-crm],[data-crm-chat]) .ui-set-row { display: flex; align-items: center; margin: 0; box-shadow: 0 -1px 0 var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-set-row.ui-set-stack { flex-direction: column; align-items: stretch; gap: 8px; }
html:not([data-crm],[data-crm-chat]) .ui-set-l { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
html:not([data-crm],[data-crm-chat]) .ui-set .ui-set-t { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-set .ui-set-sub { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-set .ui-set-val { margin: 2px 0 1px; font-size: 22px; font-weight: 600; line-height: 1.2;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) :where(.ui-set-r) { width: 360px; gap: 8px; }
html:not([data-crm],[data-crm-chat]) :where(.ui-set-r.ui-set-wide) { width: 520px; }
html:not([data-crm],[data-crm-chat]) .ui-set-r { flex: none; max-width: 100%; display: flex; align-items: center; justify-content: flex-end; }
html:not([data-crm],[data-crm-chat]) .ui-set-r.ui-field { display: grid; justify-content: stretch; align-items: stretch; }
html:not([data-crm],[data-crm-chat]) .ui-set-r > :is(.ui-input, .ui-textarea, .ui-select) { flex: 1 1 auto; width: 100%; min-width: 0; }
html:not([data-crm],[data-crm-chat]) .ui-set .ui-set-h { margin: 0; padding: 18px 20px 2px; font-size: 13px; font-weight: 600; letter-spacing: 0;
  text-transform: none; color: var(--ink-2); box-shadow: 0 -1px 0 var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-set-h + .ui-set-row { box-shadow: none; }
html:not([data-crm],[data-crm-chat]) :where(.ui-set-foot) { gap: 8px; padding: 14px 20px; }
html:not([data-crm],[data-crm-chat]) .ui-set-foot { display: flex; align-items: center; justify-content: flex-end; margin: 0;
  background: var(--chrome); box-shadow: 0 -1px 0 var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-set .ui-set-state { display: inline-flex; align-items: center; gap: 7px; margin: 2px 0;
  font-size: 13.5px; font-weight: 500; line-height: 1.4; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-set-state > i { flex: none; width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-set .ui-set-state.on { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-set-state.on > i { background: var(--ok); }
/* a secret or a command: monospace on the soft ground, the whole value selected by one click */
html:not([data-crm],[data-crm-chat]) :is(.ui-secret, :where(.ui-codebox > pre)) { display: block; margin: 0; padding: 12px 14px; font: 400 13px/1.6 var(--mono);
  white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; color: var(--ink);
  background: var(--hover); border: 1px solid transparent; border-radius: var(--r-ctl); }
html:not([data-crm],[data-crm-chat]) .ui-secret.ui-secret-new { font-weight: 500; background: color-mix(in oklab, var(--ed) 9%, var(--surface));
  border-color: color-mix(in oklab, var(--ed) 22%, transparent); }
@supports (corner-shape: squircle) {
  html:not([data-crm],[data-crm-chat]) .ui-set { corner-shape: squircle; }
}

/* ---- a person's own Claude keys (macros/claude_keys.html), on /settings and My account ---- */
html:not([data-crm],[data-crm-chat]) .ck-key { border-color: var(--line); }
html:not([data-crm],[data-crm-chat]) .ck-name { font-size: 15px; font-weight: 600; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ck-add > summary { color: var(--ink); font-size: 14.5px; font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .ck-add > summary:hover { color: var(--ink-2); }
/* inside a settings card: each key a row, "+ Add another account" a row that opens */
html:not([data-crm],[data-crm-chat]) .ui-set .ck-list { margin: 0; padding: 0; max-width: none; list-style: none; }
html:not([data-crm],[data-crm-chat]) .ui-set .ck-key { gap: 16px; padding: 14px 20px; border: 0; box-shadow: 0 -1px 0 var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-set .ck-key:last-child { border: 0; }
html:not([data-crm],[data-crm-chat]) .ui-set .ck-key .cx-state { font-size: 14px; }
html:not([data-crm],[data-crm-chat]) .ui-set .ck-add { margin: 0; padding: 0; border: 0; box-shadow: 0 -1px 0 var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-set .ck-add > summary { display: flex; align-items: center; min-height: 52px; padding: 0 20px;
  cursor: pointer; list-style: none; transition: background .15s; }
html:not([data-crm],[data-crm-chat]) .ui-set .ck-add > summary::-webkit-details-marker { display: none; }
html:not([data-crm],[data-crm-chat]) .ui-set .ck-add > summary:hover { color: var(--ink); background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .ui-set .ck-add[open] > summary { margin: 0; }
html:not([data-crm],[data-crm-chat]) .ui-set :is(div.ck-add, .ck-add[open]) { padding-bottom: 20px; }
html:not([data-crm],[data-crm-chat]) .ui-set div.ck-add { padding-top: 4px; box-shadow: none; }
html:not([data-crm],[data-crm-chat]) .ui-set .ck-form { gap: 14px; margin: 4px 20px 0; max-width: 640px; }
html:not([data-crm],[data-crm-chat]) .ck-form .ui-field + .ui-field { margin-top: 0; }
html:not([data-crm],[data-crm-chat]) .ui-set :is(.ck-full, .ck-none) { margin: 0; padding: 14px 20px; box-shadow: 0 -1px 0 var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-set div.ck-add + .ck-none { padding-top: 0; box-shadow: none; }

/* ---- the Settings page (templates/settings.html, .st-v2): one calm column ---- */
html:not([data-crm],[data-crm-chat]) .ui-content.st-v2 { max-width: 1024px; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-head { margin-bottom: 36px; }
html:not([data-crm],[data-crm-chat]) .st-v2 .ui-setsec:first-of-type { margin-top: 0; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-said { margin: 0 0 14px; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-msg { margin-bottom: 28px; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-said.ok > .ui-i { color: var(--ok); }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-claude > .ui-set + .st-said { margin: 14px 0 0; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-me { justify-content: flex-start; gap: 14px; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-me .ui-set-t { font-size: 16.5px; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-inline { display: flex; align-items: center; gap: 8px; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-inline .ui-input { flex: 1 1 auto; min-width: 0; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-tokens { margin: 0; padding: 0; list-style: none; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-tok-id { font: 500 13.5px var(--mono); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-tok-label { margin-left: 10px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-token.is-off :is(.st-tok-id, .st-tok-label, .ui-set-state) { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .st-v2 #stuck-parts .st-stuck-logs { max-width: 760px; margin: -6px 2px 14px; font-size: 14px;
  line-height: 1.5; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-mono { font: 400 13px/1.55 var(--mono); }
html:not([data-crm],[data-crm-chat]) .st-v2 .pub-form .ui-textarea.st-mono { min-height: 200px; }
html:not([data-crm],[data-crm-chat]) .st-v2 .pub-form textarea[rows="2"] { min-height: 64px; }
html:not([data-crm],[data-crm-chat]) .st-v2 .pub-form .ui-set-stack > .ui-desc { margin: 0; }
html:not([data-crm],[data-crm-chat]) .st-v2 .ui-set .ui-count.ui-set-t { font-variant-numeric: tabular-nums; }
html:not([data-crm],[data-crm-chat]) .st-v2 .ui-set .pm-loud.ui-set-t { color: var(--danger); }
html:not([data-crm],[data-crm-chat]) .st-v2 .ui-set-r.ui-page-actions { margin: 0; }
/* the "How to get it" dialog on the CRM dialog (6.13); its older .st-* look (katski.css) undone */
html:not([data-crm],[data-crm-chat]) .st-v2 dialog.st-modal { width: min(560px, calc(100vw - 32px)); max-width: none; padding: 0; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-mhead { display: flex; align-items: center; gap: 12px; padding: 22px 20px 0 24px;
  background: none; border: 0; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-mhead h3 { flex: 1; margin: 0; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-x { flex: none; margin-left: auto; font-size: 0; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-mbody { padding: 8px 24px 24px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-mbody h4 { margin: 18px 0 6px; font: 600 14.5px var(--font); letter-spacing: 0; text-transform: none;
  color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-mbody h4:first-child { margin-top: 6px; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-mbody ol { margin: 0; padding-left: 20px; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-mbody li + li { margin-top: 4px; }
html:not([data-crm],[data-crm-chat]) .st-v2 .st-mbody code { padding: 1px 5px; font: 400 13px var(--mono); color: var(--ink); background: var(--hover);
  border: 0; border-radius: var(--r-sm); }
@media (max-width: 860px) {
  html:not([data-crm],[data-crm-chat]) .ui-set-row:not(.ui-set-stack) { flex-wrap: wrap; }
  html:not([data-crm],[data-crm-chat]) .ui-set-row > .ui-set-l { flex-basis: 100%; }
  html:not([data-crm],[data-crm-chat]) .ui-set-r { width: 100%; }
  html:not([data-crm],[data-crm-chat]) .st-v2 .ui-page-actions form { flex: 1; }
}
/* a phone: the touch size (44 px) for a settings card's fields and its form buttons */
@media (max-width: 767px) {
  html:not([data-crm],[data-crm-chat]) .ui-set :is(.ui-input, .ui-select, .ui-btn:not(.ui-btn-sm)) { height: 44px; }
  html:not([data-crm],[data-crm-chat]) .ui-set .st-inline { flex-wrap: wrap; }
  html:not([data-crm],[data-crm-chat]) .ui-set .st-inline .ui-input { flex-basis: 100%; }
  html:not([data-crm],[data-crm-chat]) .ui-set .st-inline .ui-btn { flex: 1; }
  html:not([data-crm],[data-crm-chat]) .ui-set-foot .ui-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-crm],[data-crm-chat]) .ui-set .ck-add > summary { transition: none; }
}
/* ==== platform-redesign rd-settings, end */
/* ==== platform-redesign rd-ads (RD80): what is left of the old Published ads list's look. The list
   and its page bar were deleted in perf-dash M10 and their rules left this sheet with RD282; this
   pair stays, Home's and the explainer's numbers read it (.delta-good / .delta-bad, PA18).
   Good and bad on a number: katski.css's two pinned Light rules stay as they are; on a platform
   page the colour reads the token, so Dark has its own AA pair. */
html:not([data-crm],[data-crm-chat]) .delta-good { color: var(--good); }
html:not([data-crm],[data-crm-chat]) .delta-bad { color: var(--bad); }
/* ==== platform-redesign rd-ads, end */

/* ==== rd-rulings (RD32, rules 4, 5, P2): a glass bar's chosen item and its hovers. The chosen item
   is a clearly raised pill, hover is a lighter step of the bar's own tint (never grey), a control
   stays on its own white ground. Sits last so it beats each page's own bar rules. ==== */
html:not([data-crm],[data-crm-chat]) :is(.ui-header, .ui-bar, .page-bar) { --ink-2: var(--glass-ink-2); }
html:not([data-crm],[data-crm-chat]) :is(.ui-table-wrap.is-sticky thead th, .ap-page .ap-tbl thead th, .ap-page .ap-tbl tfoot td) { --glass: var(--glass-head); --glass-solid: var(--glass-head-solid); }
html:not([data-crm],[data-crm-chat]) .ui-crumbs > b:last-child,
html:not([data-crm],[data-crm-chat]) .ui-crumbs .ui-trail-step.is-here > :is(a, .ui-trail-plain) { align-self: center; height: 34px; line-height: 34px; padding: 0 14px;
  border-radius: var(--r-item); background: var(--glass-on); box-shadow: var(--glass-on-shadow); }
html:not([data-crm],[data-crm-chat]) .ui-crumbs .ui-trail-step.is-here > a:hover { background: var(--glass-on); }
html:not([data-crm],[data-crm-chat]) .ui-crumbs > a:hover,
html:not([data-crm],[data-crm-chat]) .ui-crumbs .ui-trail-step > a:hover,
html:not([data-crm],[data-crm-chat]) .ui-header :is(.pill-link, .tour-btn, .kp-toggle, .ta-tp):hover,
html:not([data-crm],[data-crm-chat]) .ui-header :is(.kp-toggle[aria-expanded="true"], .ta-tp.on) { background: var(--glass-hover); }
html:not([data-crm],[data-crm-chat]) .ui-bar .ui-seg { background: var(--glass-track); }
html:not([data-crm],[data-crm-chat]) .ui-bar .ui-btn.ui-btn-outline:hover { background: var(--surface); border-color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) :is(.ui-bar, .page-bar) a.ui-pg:hover { background: var(--glass-hover); }
html:not([data-crm],[data-crm-chat]) :is(.ui-bar, .page-bar) .ui-pg.on { background: var(--glass-on); border-color: transparent; box-shadow: var(--glass-on-shadow); }
/* ==== rd-rulings glass bars, end ==== */

/* ==== rd-rulings (RD31, rule 21d, DESIGN-SYSTEM 6.35): the delete. A class added to the button it
   sits on; static/ui_del.js arms it. The hidden copy of the armed words shares the words' cell,
   so the control keeps its size and nothing moves under the pointer. ==== */
html:not([data-crm],[data-crm-chat]) .ui-del { display: inline-grid; grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 6px; }
html:not([data-crm],[data-crm-chat]) .ui-del > svg { grid-column: 1; grid-row: 1; flex: none; }
html:not([data-crm],[data-crm-chat]) .ui-del > .ui-del-w { grid-column: 2; grid-row: 1; text-align: center; }
html:not([data-crm],[data-crm-chat]) .ui-del::after { content: attr(data-arm); grid-column: 2; grid-row: 1; height: 0; overflow: hidden; visibility: hidden; }
html:not([data-crm],[data-crm-chat]) .ui-del.ui-del-x { grid-template-columns: auto; width: 32px; height: 32px; padding: 0; border-radius: var(--r-item); }
html:not([data-crm],[data-crm-chat]) .ui-del.ui-del-x::after { content: none; }
html:not([data-crm],[data-crm-chat]) .ui-del.is-armed, html:not([data-crm],[data-crm-chat]) .ui-del.is-armed:hover { background: var(--del-fill); border-color: transparent; color: var(--on-del); }
html:not([data-crm],[data-crm-chat]) .ui-del.is-armed:hover { background: var(--del-fill-hi); }
html:not([data-crm],[data-crm-chat]) .ui-del.is-armed > svg { animation: ui-del-turn .2s ease-out; }
@keyframes ui-del-turn { from { transform: rotate(-90deg); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { html:not([data-crm],[data-crm-chat]) .ui-del.is-armed > svg { animation: none; } }
/* ==== rd-rulings delete, end ==== */
/* ==== rd-b4a: the settings-style pages after the pilot (RD110-RD119; DESIGN-SYSTEM 6.36-6.40)
   Shared pieces the settings pattern (6.30) lacked, built for My account and kept for every page
   like it: the page itself (.ui-setpage: one calm column), a person row (.ui-set-person), a row
   whose label and field are siblings (.ui-set-pair), a key and value list (.ui-kv), a row of
   controls (.ui-inline), a code box with its Copy button (.ui-codebox), button tabs, and the
   connection row of macros/connections.html (.cx-row) inside a settings card. The older wrappers
   tests and the tour read (.ta-card, .ta-said, .ta-modal parts) stay in the markup and lose their
   own look here. Sizes in :where() (0,1,1), the look at 0,2,1 and up, tokens only. No em dash. */
html:not([data-crm],[data-crm-chat]) .ui-content.ui-setpage { max-width: 1024px; }
html:not([data-crm],[data-crm-chat]) .ui-setpage .ui-page-head { margin-bottom: 36px; }
html:not([data-crm],[data-crm-chat]) .ui-setpage .ui-setsec { margin-top: 0; margin-bottom: 44px; }
html:not([data-crm],[data-crm-chat]) .ui-setpage .ui-page-head + .ui-alert { margin: 0 0 28px; }
html:not([data-crm],[data-crm-chat]) .ui-setpage :is(.ui-setsec, .ui-setbox) > .ui-alert { margin: 0 0 14px; }
html:not([data-crm],[data-crm-chat]) .ui-setsec .ta-card-t { margin: 0; }
/* an older card that only wraps a settings section; an older message line inside a ui-alert */
html:not([data-crm],[data-crm-chat]) :is(.ta-card, .cx-sec):has(> .ui-setsec) { margin: 0; padding: 0; background: none; border: 0;
  box-shadow: none; }
html:not([data-crm],[data-crm-chat]) .ui-alert > .ta-said { margin: 0; padding: 0; font-size: inherit; color: inherit; background: none; border: 0; }
html:not([data-crm],[data-crm-chat]) .ui-alert.is-ok > .ui-i { color: var(--ok); }

/* a person at the top of a card: the avatar, the name, the username under it */
html:not([data-crm],[data-crm-chat]) .ui-set-row.ui-set-person { gap: 14px; justify-content: flex-start; }
html:not([data-crm],[data-crm-chat]) .ui-set-person > .ui-set-l > :first-child { font-size: 16.5px; font-weight: 600; line-height: 1.3; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-set-person > .ui-set-l > :nth-child(2) { margin: 0; font: 400 13.5px/1.4 var(--font); color: var(--ink-2); }
/* a row whose label and field are siblings: the label is the row's title, the field the control column */
html:not([data-crm],[data-crm-chat]) .ui-set-pair > label { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 15px; font-weight: 600;
  line-height: 1.35; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) :where(.ui-set-pair > :is(.ui-input, .ui-select, .ui-textarea)) { width: 360px; }
html:not([data-crm],[data-crm-chat]) .ui-set-pair > :is(.ui-input, .ui-select, .ui-textarea) { flex: none; max-width: 100%; }

/* key and value: a quiet key column, each pair on its own hairline (an older .ta-kv inside a
   connection row reads the same) */
html:not([data-crm],[data-crm-chat]) :is(.ui-kv, .cx-row .ta-kv) { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 0;
  align-items: stretch; margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink); border: 0; }
html:not([data-crm],[data-crm-chat]) :is(.ui-kv, .cx-row .ta-kv) > span { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px;
  min-height: 40px; padding: 8px 0; border: 0; box-shadow: 0 -1px 0 var(--line); }
html:not([data-crm],[data-crm-chat]) :is(.ui-kv, .cx-row .ta-kv) > span:nth-child(-n+2) { box-shadow: none; }
html:not([data-crm],[data-crm-chat]) :is(.ui-kv, .cx-row .ta-kv) > .k { padding-right: 16px; font: 500 13.5px var(--font); letter-spacing: 0; text-transform: none;
  color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-kv .ta-role { font-size: 14px; font-weight: 600; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-kv .ui-link { font-size: 13.5px; }

/* a row of controls: the first one takes the room, the rest keep their size */
html:not([data-crm],[data-crm-chat]) .ui-inline { display: flex; flex-direction: row; align-items: flex-end; gap: 8px; }
html:not([data-crm],[data-crm-chat]) .ui-inline > :first-child { flex: 1 1 auto; min-width: 0; }
html:not([data-crm],[data-crm-chat]) .ui-inline > .ui-secret { align-self: stretch; }
/* a code box with its Copy button in the corner (the box is the secret box, 6.32) */
html:not([data-crm],[data-crm-chat]) .ui-codebox { position: relative; margin: 8px 0 0; }
html:not([data-crm],[data-crm-chat]) .ui-codebox > pre { padding-right: 84px; }
html:not([data-crm],[data-crm-chat]) .ui-codebox > .ui-btn { position: absolute; top: 6px; right: 6px; }
/* underline tabs that are buttons (a panel switch on the page) */
html:not([data-crm],[data-crm-chat]) .ui-utabs > button.ui-utab { background: none; border: 0; border-radius: 0; font-family: inherit; cursor: pointer; }

/* ---- a connection (macros/connections.html row, partials/mcp_guide.html) inside a settings card:
   the head is a row (name and what it pays for at the left, the state at the right), the body
   under it keeps the row's 20 px sides; a Claude key list or an add form inside it runs edge to
   edge like on /settings (6.32) */
html:not([data-crm],[data-crm-chat]) .ui-set .cx-row { margin: 0; padding: 0; border: 0; box-shadow: 0 -1px 0 var(--line); }
html:not([data-crm],[data-crm-chat]) :where(.ui-set .cx-row > .cx-head) { gap: 24px; padding: 16px 20px; }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-row > .cx-head { display: flex; align-items: center; flex-wrap: nowrap; margin: 0; }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-name { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-what { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-head > .cx-state { flex: 0 1 auto; max-width: 360px; align-items: flex-end; text-align: right; }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-row .cx-sub { font-size: 13px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-row > .cx-body { display: flex; flex-direction: column; gap: 12px; padding: 0 0 20px; }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-body > :not(.ck-list, .ck-add, .ck-full, .ck-none, .ck-form) { margin: 0 20px; }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-body > .ck-form { margin: 4px 20px 0; }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-body > :is(.ck-add, .ck-full, .ck-none):last-child { margin-bottom: -20px; }
html:not([data-crm],[data-crm-chat]) .ui-set .ck-add > :not(summary, .ck-form) { margin: 12px 20px 0; }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-row :is(.cx-note, .ta-quiet) { max-width: 760px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-row .cx-steps { max-width: 760px; padding-left: 22px; font-size: 14.5px; line-height: 1.6; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-row .cx-steps > li + li { margin-top: 4px; }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-row code { padding: 1px 5px; font: 400 13px var(--mono); color: var(--ink); background: var(--hover);
  border: 0; border-radius: var(--r-sm); }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-row .cx-mono { font: 400 13.5px var(--mono); }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-row .gm-unlocks > span { padding: 2px 10px; font-size: 13px; color: var(--ink); background: var(--hover);
  border-radius: var(--r-pill); }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-acts { display: flex; gap: 8px; margin-bottom: 0; }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-more:not(.ck-add) { margin: 0 20px; padding: 0; border: 0; }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-more:not(.ck-add) > summary { width: fit-content; font-size: 14.5px; font-weight: 600; color: var(--ink);
  cursor: pointer; }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-more:not(.ck-add) > summary:hover { color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-more:not(.ck-add)[open] > :not(summary) { margin: 12px 0 0; }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-row .cx-form { display: grid; gap: 14px; max-width: 640px; }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-form .ta-field { margin: 0; }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-form input[type=file] { font-size: 14px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-given .cx-line { padding: 12px 0; border-top: 0; box-shadow: 0 -1px 0 var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-given .cx-label { font-size: 14.5px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-given .cx-label b { color: var(--ink); }
/* Connect your AI (account.html, partials/mcp_guide.html): its parts on the pieces above */
html:not([data-crm],[data-crm-chat]) .ui-set .wm-reveal { display: flex; flex-direction: column; gap: 10px; }
html:not([data-crm],[data-crm-chat]) .ui-set .wm-revl { display: flex; gap: 10px; align-items: baseline; font-size: 14px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-set .wm-revl b { font-weight: 600; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-set .wm-once { margin: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-set .wm-key .wm-prefix { color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-set .wm-key .wm-when { flex: 1 1 auto; font-size: 13.5px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-set .wm-form { max-width: 640px; }
html:not([data-crm],[data-crm-chat]) .ui-set .wm-offline { font-size: 15px; font-weight: 500; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-set .wm-osrow { display: flex; align-items: center; gap: 12px; }
html:not([data-crm],[data-crm-chat]) .ui-set .wm-oslabel { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-set .wm-steps > li + li { margin-top: 12px; }
html:not([data-crm],[data-crm-chat]) .ui-set .wm-first { margin-top: 8px; }
html:not([data-crm],[data-crm-chat]) .ui-set .wm-firstl { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-set .cx-row > .wm-can { padding: 16px 20px 12px; }
html:not([data-crm],[data-crm-chat]) .ui-set .wm-can-t { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--ink); }
@media (max-width: 860px) {
  html:not([data-crm],[data-crm-chat]) .ui-set-pair > label { flex-basis: 100%; }
  html:not([data-crm],[data-crm-chat]) .ui-set-pair > :is(.ui-input, .ui-select, .ui-textarea) { width: 100%; }
  html:not([data-crm],[data-crm-chat]) .ui-set .cx-row > .cx-head { flex-wrap: wrap; }
  html:not([data-crm],[data-crm-chat]) .ui-set .cx-head > .cx-state { align-items: flex-start; text-align: left; }
  html:not([data-crm],[data-crm-chat]) :is(.ui-kv, .cx-row .ta-kv) { grid-template-columns: 104px minmax(0, 1fr); }
}
@media (max-width: 767px) {
  html:not([data-crm],[data-crm-chat]) .ui-setpage .ui-page-actions form { flex: 1; }
  html:not([data-crm],[data-crm-chat]) .ui-inline { flex-wrap: wrap; }
}
/* the CRM dialog (6.13) on the older team-access dialog parts: no tinted head band, no rules */
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog.ta-modal { width: min(540px, calc(100vw - 32px)); max-width: none; }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-mhead { display: flex; align-items: center; gap: 12px; padding-right: 20px; font-size: inherit;
  font-weight: 600; color: var(--ink); background: none; border: 0; }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-mhead > h3 { flex: 1; margin: 0; }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-blk { font-size: 15px; line-height: 1.55; color: var(--ink-2); border: 0; }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-blk + .ta-blk { padding-top: 0; }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-blk h4 { margin: 0 0 6px; font: 600 14.5px var(--font); letter-spacing: 0; text-transform: none;
  color: var(--ink); }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-mfoot { display: flex; justify-content: flex-end; background: none; border: 0; }
/* ==== rd-b4a, end ==== */
/* ==== rd-b4a2: Products, the 403 page, sign in and setup (RD114-RD119; DESIGN-SYSTEM 6.4, 6.9, 6.41-6.43)
   Shared pieces these pages lacked, kept for every page like them: the table's fixed layout, a
   one-line cell that ends in "..." (rule 22), a group header row on its own band (rule 23), a
   flagged row (its first cell's edge in its state's colour), a row with unsaved changes, and the
   small field beside a small button. Sizes in :where() (0,1,1), the look at 0,2,1 and up, tokens
   only. No em dash. */
html:not([data-crm],[data-crm-chat]) .ui-table.ui-table-fixed { table-layout: fixed; }
html:not([data-crm],[data-crm-chat]) .ui-table td.ui-cut { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html:not([data-crm],[data-crm-chat]) :where(.ui-table tr.ui-group-row > td) { height: 40px; padding: 8px 14px; font-size: 14px; }
html:not([data-crm],[data-crm-chat]) .ui-table tr.ui-group-row > td { font-weight: 600; color: var(--sc, var(--ink)); background: var(--sb, var(--canvas));
  border-bottom: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-table tbody tr.ui-group-row:is(:hover, :focus-visible) > td { background: var(--sb, var(--canvas)); }
html:not([data-crm],[data-crm-chat]) .ui-table tr.ui-group-row .ui-count { margin-left: 6px; font-weight: 500; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-table tr.ui-flag > td:first-child { box-shadow: inset 3px 0 0 var(--sc, var(--ink)); }
html:not([data-crm],[data-crm-chat]) .ui-table tbody tr.is-dirty > td { background: var(--hover); }
html:not([data-crm],[data-crm-chat]) :where(.ui-input-sm, .ui-select-sm) { height: 32px; padding: 0 10px; font-size: 13px; }
html:not([data-crm],[data-crm-chat]) :where(.ui-select-sm) { padding-right: 30px; }
html:not([data-crm],[data-crm-chat]) .ui-input.num { text-align: right; font-variant-numeric: tabular-nums; }
/* Products (/settings/products): the map's column widths, nothing else */
html:not([data-crm],[data-crm-chat]) .pm-page .pm-cols { min-width: 1180px; }
html:not([data-crm],[data-crm-chat]) .pm-page .pm-cols col.c-where { width: 92px; }
html:not([data-crm],[data-crm-chat]) .pm-page .pm-cols col.c-id { width: 170px; }
html:not([data-crm],[data-crm-chat]) .pm-page .pm-cols col.c-line { width: 150px; }
html:not([data-crm],[data-crm-chat]) .pm-page .pm-cols col.c-kind { width: 160px; }
html:not([data-crm],[data-crm-chat]) .pm-page .pm-cols col.c-fam { width: 124px; }
html:not([data-crm],[data-crm-chat]) .pm-page .pm-cols col.c-phys { width: 108px; }
html:not([data-crm],[data-crm-chat]) .pm-page .pm-cols col.c-units { width: 80px; }
html:not([data-crm],[data-crm-chat]) .pm-page .pm-cols col.c-by { width: 150px; }
html:not([data-crm],[data-crm-chat]) .pm-page .pm-cols col.c-act { width: 84px; }
html:not([data-crm],[data-crm-chat]) .pm-page :where(.pm-cols td) { padding: 8px 10px; }
html:not([data-crm],[data-crm-chat]) .pm-page :where(.pm-cols th) { padding: 0 10px; }
html:not([data-crm],[data-crm-chat]) .pm-page .ui-setsec { margin: 0 0 40px; }
html:not([data-crm],[data-crm-chat]) .pm-page .pm-map > .ui-alert { margin: 0 0 28px; }
/* the whole-page empty state (the 403 page): the shared empty, set in the content column with a
   page title; an older lock box inside its icon tile (.ta-biglock, tests read it) loses its box */
html:not([data-crm],[data-crm-chat]) .ui-empty.ui-empty-page { max-width: 600px; margin: 72px auto 0; }
html:not([data-crm],[data-crm-chat]) :where(.ui-empty.ui-empty-page) { padding: 48px 32px 40px; }
html:not([data-crm],[data-crm-chat]) .ui-empty-page h1 { margin: 10px 0 2px; font-size: 22px; font-weight: 600; letter-spacing: -.01em;
  line-height: 1.3; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-empty-page p { margin: 0; font-size: 15px; line-height: 1.55; }
html:not([data-crm],[data-crm-chat]) .ui-empty-ico > .ta-biglock { display: contents; }
/* a signed-out page (sign in, the setup link): the canvas, one calm card, the Katski mark. The
   setup card keeps its older class (.ta-setup-card, tests read it) and reads as the card */
html:not([data-crm],[data-crm-chat]) .ui-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  box-sizing: border-box; background: var(--canvas); }
html:not([data-crm],[data-crm-chat]) .ui-auth > :is(.ui-auth-card, .ta-setup-card) { width: 400px; max-width: 100%; box-sizing: border-box;
  padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--rpage); box-shadow: var(--shadow); }
html:not([data-crm],[data-crm-chat]) .ui-auth .ui-auth-brand { display: flex; align-items: center; gap: 11px; padding: 0; margin: 0 0 28px; }
html:not([data-crm],[data-crm-chat]) .ui-auth-brand .ui-brand-mark { width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border-radius: var(--r-seg); color: var(--on-fill); font-size: 17px; font-weight: 700; background: var(--brand-grad);
  box-shadow: var(--brand-shadow); }
html:not([data-crm],[data-crm-chat]) .ui-auth-brand .brand-name { font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-auth-brand .brand-sub { align-self: center; padding-top: 4px; font-size: 13px; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-auth h2 { margin: 0 0 6px; font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3;
  color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-auth h2 + p { margin: 0 0 22px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-auth p .mono { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-auth form { display: grid; gap: 16px; margin: 0; }
html:not([data-crm],[data-crm-chat]) .ui-auth .ui-field { margin: 0; }
html:not([data-crm],[data-crm-chat]) .ui-auth .ui-field > label { display: block; margin: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-auth form > .ui-btn { width: 100%; margin-top: 6px; }
html:not([data-crm],[data-crm-chat]) .ui-auth .ui-alert { margin: 0 0 18px; }
html:not([data-crm],[data-crm-chat]) .ui-auth .ta-link { font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: underline;
  text-decoration-color: var(--line-2); text-underline-offset: 3px; border: 0; }
html:not([data-crm],[data-crm-chat]) .ui-auth .ta-link:hover { text-decoration-color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-auth .ta-tag { text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); }
@supports (corner-shape: squircle) {
  html:not([data-crm],[data-crm-chat]) :is(.ui-auth > .ui-auth-card, .ui-auth > .ta-setup-card, .ui-auth-brand .ui-brand-mark) { corner-shape: squircle; }
}
/* a file field: the browser's grey button takes the shared outline button's look, Light and Dark; 27 px
   with -3 px above and below, so it takes the 21 px the browser's own button took and nothing moves */
html:not([data-crm],[data-crm-chat]) input[type=file]::file-selector-button { height: 27px; margin: -3px 10px -3px 0; padding: 0 12px;
  font: 500 13px var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-pill); cursor: pointer; transition: background-color .15s; }
html:not([data-crm],[data-crm-chat]) input[type=file]:enabled:hover::file-selector-button { background: var(--hover); }
/* ==== rd-b4a2, end ==== */
/* ==== rd-b4c: the Admin dashboard after the pilot (RD130-RD139; DESIGN-SYSTEM 6.48-6.50)
   /team (templates/team.html + partials/team_*.html, `.tm-page`) on the settings pattern: one
   column of titled sections (6.30, 6.36), People, Generation keys and Use by person as
   `ui-table`s, the team Claude plans as rows of one `ui-set` card, the pool line and the answers
   as `ui-alert`s, the row menus on the shared menu (6.15), the dialogs on the shared dialog (6.13).
   New shared pieces: the role tag (`.ui-role`, 6.48), a segmented control of radios (`.ui-seg >
   label`, 6.49) and the team plan meter on tokens (6.50). The older team-access classes tests
   and the poll read (.ta-pcard, .ta-role, .ta-menu, .ta-mi, .ta-pool) stay in the markup and
   take these looks. The phase 9 `.tm-v2` rules above no longer reach the page. Sizes in
   :where() (0,1,1), the look at 0,2,1 and up, tokens only. No em dash. */

/* ---- the page: the settings column, wide enough for People's nine columns */
html:not([data-crm],[data-crm-chat]) .ui-content.ui-setpage.tm-page { max-width: 1280px; }
html:not([data-crm],[data-crm-chat]) .tm-page .tm-below { display: block; }
html:not([data-crm],[data-crm-chat]) .tm-page .tm-below > .ui-section { margin-top: 0; min-width: 0; }
html:not([data-crm],[data-crm-chat]) .tm-page .ui-setsec > .ui-sub { margin: -6px 0 14px; max-width: 900px; font-size: 14px; line-height: 1.5;
  color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .tm-page .ui-section-head .ui-page-actions { margin-left: auto; }

/* ---- an older pool line inside a ui-alert reads as the alert's words (the page and the popover) */
html:not([data-crm],[data-crm-chat]) .ui-alert > .ta-pool { display: block; margin: 0; padding: 0; font-size: inherit; line-height: inherit;
  color: inherit; background: none; border: 0; }
html:not([data-crm],[data-crm-chat]) .ui-alert > .ta-pool > .ta-sq { display: none; }
html:not([data-crm],[data-crm-chat]) .ui-alert > .ta-pool b { color: inherit; font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .ui-alert > p { margin: 0; }

/* ---- 6.48 the role tag: flat, a soft tint of the role colour, a hairline, small caps (rules 19, 20).
   A CRM role takes its colour (is-cs purple, is-ed blue, is-admin the CRM's admin gold); a platform
   role is not a CRM role: on /team Admin reads in the admin colour and Worker stays quiet grey (RD36,
   which replaces RD130's colours); an older .ta-role on /team is one */
html:not([data-crm],[data-crm-chat]) :where(.ui-role, .tm-page .ta-role) { height: 22px; padding: 0 8px; font-size: 11.5px; }
html:not([data-crm],[data-crm-chat]) :is(.ui-role, .tm-page .ta-role) { --role: var(--ink-3); display: inline-flex; align-items: center;
  font-family: var(--font); font-weight: 600; line-height: 1; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  color: color-mix(in oklab, var(--role) 84%, var(--ink)); background: color-mix(in oklab, var(--role) 10%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--role) 28%, var(--surface)); border-radius: var(--r-sm); }
html:not([data-crm],[data-crm-chat]) .ui-role.is-cs { --role: var(--cs); }
html:not([data-crm],[data-crm-chat]) .ui-role.is-ed { --role: var(--ed); }
html:not([data-crm],[data-crm-chat]) :is(.ui-role.is-admin, .tm-page .ta-role.admin) { --role: var(--ad); }
html:not([data-crm],[data-crm-chat]) .tm-page tr.off .ta-role { --role: var(--ink-3); }

/* ---- 6.49 a segmented control of radios: label > input + span, the pressed part as 6.6 */
html:not([data-crm],[data-crm-chat]) .ui-seg > label { position: relative; display: inline-flex; margin: 0; }
html:not([data-crm],[data-crm-chat]) .ui-seg > label > input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
html:not([data-crm],[data-crm-chat]) :where(.ui-seg > label > span) { height: 30px; padding: 0 12px; font-size: 13.5px; }
html:not([data-crm],[data-crm-chat]) .ui-seg > label > span { display: inline-flex; align-items: center; font-family: var(--font); font-weight: 500;
  color: var(--ink-2); background: transparent; border-radius: var(--r-item); box-shadow: none; cursor: pointer;
  transition: color .15s, background .15s; }
html:not([data-crm],[data-crm-chat]) .ui-seg > label:hover > span { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-seg > label > input:checked + span { color: var(--ink); background: var(--surface); box-shadow: var(--seg-shadow); }
html:not([data-crm],[data-crm-chat]) .ui-seg > label > input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
/* a pair of submit buttons with a word inside (the On / Off switches): the word takes no box of its own */
html:not([data-crm],[data-crm-chat]) .ui-seg > button > span { display: inline; padding: 0; font: inherit; color: inherit; background: none;
  box-shadow: none; }
html:not([data-crm],[data-crm-chat]) .ui-seg > button[aria-pressed="true"] { cursor: default; }

/* ---- 6.50 the team plan meter and its square, on the status tokens (Light and Dark) */
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .mt { --fill: var(--st-working); --tr: var(--st-working-soft); }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .mt-near { --fill: var(--st-waiting); --tr: var(--st-waiting-soft); }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .mt-full { --fill: var(--st-back); --tr: var(--st-back-soft); }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .mt-track { height: 8px; margin-top: 6px; border-radius: var(--r-pill); }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .mt-track span { border-radius: var(--r-pill); }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .mt-none .mt-track { background: repeating-linear-gradient(45deg, var(--line-2) 0 3px,
  var(--hover) 3px 6px); }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .mt-lab { font-size: 13px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .mt-num { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--ink); }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .mt-num.est { font-size: 13px; font-weight: 400; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .mt-sub { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .ta-sq { border-radius: 2px; }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .ta-sq-ok { background: var(--st-working); }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .ta-sq-near { background: var(--st-waiting); }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .ta-sq-full { background: var(--st-back); }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .ta-sq-none { background: repeating-linear-gradient(45deg, var(--ink-3) 0 2px,
  transparent 2px 4px); outline-color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .ta-pstate { gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) :is(.tm-page, .ta-pop) .ta-pstate.full { color: var(--st-back); }

/* ---- the three tables: the shared table; head words in sentence case, cells top-aligned words */
/* train 3's head words stay upper case in the markup (tests read them) and read in sentence case */
html:not([data-crm],[data-crm-chat]) .tm-page .ta-tbl th { font-family: var(--font); font-size: 13px; font-weight: 500; letter-spacing: 0;
  text-transform: lowercase; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-tbl th::first-letter { text-transform: uppercase; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-tbl th.wm-keep { text-transform: none; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-tbl tbody tr:hover td:first-child { box-shadow: none; }
html:not([data-crm],[data-crm-chat]) :where(.tm-page .ta-tbl td) { padding: 14px 12px; font-size: 14px; line-height: 1.4; }
html:not([data-crm],[data-crm-chat]) :where(.tm-page .ta-tbl th) { padding: 0 12px; }
html:not([data-crm],[data-crm-chat]) :where(.tm-page .ta-tbl :is(th, td):first-child) { padding-left: 20px; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-tbl td { overflow-wrap: break-word; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-tbl tbody tr { cursor: default; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-tbl .ta-sub { margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-tbl .ta-quiet { font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-tbl .st-chip { white-space: normal; align-items: flex-start; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-person > div { min-width: 0; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-tbl .ta-pn { font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-tbl .ta-pu { margin-top: 2px; font-family: var(--font); font-size: 13px; line-height: 1.3; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-you { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .tm-page tr.off :is(.ta-pn, .ta-pu) { color: var(--ink-3); }

/* People: a fixed layout over the column; the menu may leave the table's box */
html:not([data-crm],[data-crm-chat]) .tm-page .tm-wrap { overflow: visible; container: tmpeople / inline-size; }
html:not([data-crm],[data-crm-chat]) .tm-page #team-people { table-layout: fixed; width: 100%; }
html:not([data-crm],[data-crm-chat]) .tm-page #team-people th:nth-child(1) { width: 14%; }
html:not([data-crm],[data-crm-chat]) .tm-page #team-people th:nth-child(2) { width: 7.5%; }
html:not([data-crm],[data-crm-chat]) .tm-page #team-people th:nth-child(3) { width: 12%; }
html:not([data-crm],[data-crm-chat]) .tm-page #team-people th:nth-child(4) { width: 10%; }
html:not([data-crm],[data-crm-chat]) .tm-page #team-people th:nth-child(5) { width: 20%; }
html:not([data-crm],[data-crm-chat]) .tm-page #team-people th:nth-child(6) { width: 11%; }
html:not([data-crm],[data-crm-chat]) .tm-page #team-people th:nth-child(7) { width: 13.5%; }
html:not([data-crm],[data-crm-chat]) .tm-page #team-people th:nth-child(8) { width: 8%; }
html:not([data-crm],[data-crm-chat]) .tm-page #team-people th:nth-child(9) { width: 56px; }
html:not([data-crm],[data-crm-chat]) .tm-page #team-people .tm-act { padding: 8px 12px 8px 0; text-align: right; }
html:not([data-crm],[data-crm-chat]) .tm-page :is(.mn-form, .wm-mcpform, .wm-chrow) { margin: 0; }
html:not([data-crm],[data-crm-chat]) .tm-page :is(.wm-mcpcell, .wm-dccell, .mn-cell) .ta-sub { margin-top: 6px; }
/* a connection: its name in a narrow quiet column, the state and its sub line beside it */
html:not([data-crm],[data-crm-chat]) .tm-page .cx-cell .cx-line { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 0 10px;
  align-items: baseline; }
html:not([data-crm],[data-crm-chat]) .tm-page .cx-cell .cx-line + .cx-line { margin-top: 8px; }
html:not([data-crm],[data-crm-chat]) .tm-page .cx-cell .cx-label { min-width: 0; font-size: 13px; font-weight: 500; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .tm-page .cx-cell .cx-state { min-width: 0; gap: 2px; font-size: 13.5px; }
html:not([data-crm],[data-crm-chat]) .tm-page .cx-cell .cx-sub { font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
/* the Discord cell: a small select, its auto / picked word a flat tag */
html:not([data-crm],[data-crm-chat]) .tm-page .wm-chrow { display: flex; align-items: center; gap: 8px; }
html:not([data-crm],[data-crm-chat]) .tm-page .wm-chsel { flex: 1 1 auto; min-width: 0; max-width: 170px; }
html:not([data-crm],[data-crm-chat]) .tm-page .wm-tag { padding: 1px 7px; font: 500 12px var(--font); color: var(--ink-2); background: var(--hover);
  border: 1px solid var(--line); border-radius: var(--r-sm); }
html:not([data-crm],[data-crm-chat]) .tm-page .wm-fail { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
html:not([data-crm],[data-crm-chat]) .tm-page .wm-fail .cx-sub { font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }

/* the row menus (person, plan, key) on the shared menu (6.15) */
html:not([data-crm],[data-crm-chat]) .tm-page .ta-kebab { color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-kebab.on { color: var(--ink); background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-menu.ui-menu-list { z-index: 60; min-width: 260px; text-align: left; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-menu .ta-mi { display: block; width: 100%; font-family: var(--font); line-height: 1.35;
  text-align: left; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-menu .ta-mi:is(:hover, :focus-visible) { background: var(--hover); box-shadow: none; outline: 0; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-menu .ta-mi small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-menu .ta-mi.wine { color: var(--danger); }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-menu .ta-mi.wine:is(:hover, :focus-visible) { color: var(--danger); background: var(--danger-soft); }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-menu .ta-mi[disabled],
html:not([data-crm],[data-crm-chat]) .tm-page .ta-menu .ta-mi[disabled] small { color: var(--ink-3); background: none; cursor: not-allowed; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-menu .ta-msep { margin: 4px 0; border: 0; border-top: 1px solid var(--line); }

/* the tag form: one settings row in its own card under People */
html:not([data-crm],[data-crm-chat]) .tm-page .tm-tagset { margin-top: 14px; }
html:not([data-crm],[data-crm-chat]) .tm-page .tm-tagset .ta-tagfield { flex: none; width: 104px; }

/* Generation keys: Test and the menu at the row's end */
html:not([data-crm],[data-crm-chat]) .tm-page #team-keys th:last-child { width: 140px; }
html:not([data-crm],[data-crm-chat]) .tm-page #team-keys .tk-act { padding-right: 12px; text-align: right; white-space: nowrap; }

/* the team Claude plans: rows of one settings card (6.30) */
html:not([data-crm],[data-crm-chat]) .tm-page .tm-plancards > .ta-pcard { padding: 16px 20px 18px; border: 0; box-shadow: 0 -1px 0 var(--line); }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-pcard-h { gap: 10px; margin-bottom: 14px; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-pname { font: 600 15px/1.35 var(--font); color: var(--ink); border: 0; }
html:not([data-crm],[data-crm-chat]) .tm-page button.ta-pname:is(:hover, :focus-visible) { text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-next { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-pcard-m { gap: 24px; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-pcard-f { margin-top: 14px; font-size: 13px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .tm-page .ui-set .ta-empty { margin: 0; font-size: 14px; color: var(--ink-2); }

/* Use by person */
html:not([data-crm],[data-crm-chat]) .tm-page #team-use { table-layout: fixed; width: 100%; }
html:not([data-crm],[data-crm-chat]) .tm-page #team-use th:first-child { width: 30%; }
html:not([data-crm],[data-crm-chat]) .tm-page #team-use td { vertical-align: top; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-share .bar { height: 6px; background: var(--hover); border-radius: var(--r-pill); overflow: hidden; }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-share .bar span { background: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .tm-page .ta-share .n { font-weight: 600; color: var(--ink); }

/* the dialogs: the older head, blocks and foot on the shared dialog; a block's tables and code */
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-blk ol { margin: 0; padding-left: 20px; }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-blk li + li { margin-top: 4px; }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-blk code { padding: 1px 5px; font: 400 13px var(--mono); color: var(--ink);
  background: var(--hover); border: 0; border-radius: var(--r-sm); }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-blk .ta-quiet { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-blk .ta-quiet + .ta-quiet { margin-top: 8px; }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-field { margin: 0 0 14px; }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-field:last-child { margin-bottom: 0; }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-field .ui-textarea { width: 100%; }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-field .ui-seg { justify-self: start; width: fit-content; }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-mtbl { width: 100%; }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-mtbl .r { text-align: right; white-space: nowrap; }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-said { margin: 0 0 14px; padding: 10px 14px; font-size: 14px; color: var(--danger);
  background: var(--danger-soft); border: 0; border-radius: var(--r-ctl); }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-mhead.wine > h3 { color: var(--danger); }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-linkbox { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px;
  background: var(--hover); border: 0; border-radius: var(--r-ctl); }
html:not([data-crm],[data-crm-chat]) dialog.ui-dialog .ta-linkbox .mono { flex: 1; min-width: 0; font: 400 13px/1.5 var(--mono); color: var(--ink);
  overflow-wrap: anywhere; user-select: all; }

/* People in a narrow column (the Katski panel open at 1440, a phone): each row stacks */
@container tmpeople (max-width: 859px) {
  html:not([data-crm],[data-crm-chat]) .tm-page #team-people, html:not([data-crm],[data-crm-chat]) .tm-page #team-people tbody { display: block; width: 100%; }
  html:not([data-crm],[data-crm-chat]) .tm-page #team-people thead { display: none; }
  html:not([data-crm],[data-crm-chat]) .tm-page #team-people tr { display: grid; grid-template-columns: 44px auto minmax(0, 1fr) auto;
    grid-template-areas: "who who who act" ". role st st" ". mn mn mn" ". cx cx cx" ". mcp mcp mcp" ". dc dc dc" ". seen seen seen";
    gap: 8px 16px; padding: 14px 12px 14px 20px; box-shadow: 0 -1px 0 var(--line); }
  html:not([data-crm],[data-crm-chat]) .tm-page #team-people tr:first-child { box-shadow: none; }
  html:not([data-crm],[data-crm-chat]) .tm-page #team-people td { display: block; padding: 0; border: 0; }
  html:not([data-crm],[data-crm-chat]) .tm-page #team-people td.tm-who { grid-area: who; }
  html:not([data-crm],[data-crm-chat]) .tm-page #team-people td.tm-act { grid-area: act; padding: 0; }
  html:not([data-crm],[data-crm-chat]) .tm-page #team-people td.tm-role { grid-area: role; }
  html:not([data-crm],[data-crm-chat]) .tm-page #team-people td.tm-st { grid-area: st; }
  html:not([data-crm],[data-crm-chat]) .tm-page #team-people td.mn-cell { grid-area: mn; }
  html:not([data-crm],[data-crm-chat]) .tm-page #team-people td.cx-cell { grid-area: cx; }
  html:not([data-crm],[data-crm-chat]) .tm-page #team-people td.wm-mcpcell { grid-area: mcp; }
  html:not([data-crm],[data-crm-chat]) .tm-page #team-people td.wm-dccell { grid-area: dc; }
  html:not([data-crm],[data-crm-chat]) .tm-page #team-people td.tm-seen { grid-area: seen; font-size: 13px; }
  html:not([data-crm],[data-crm-chat]) .tm-page #team-people td.tm-seen::before { content: "Last signed in: "; }
}
/* ==== rd-b4c, end ==== */
/* ==== rd-b4c step 2: the usage ring's popover (partials/team_usage.html, GET /team/usage), RD139
   It rides in the top bar of every page, so it is restyled only under the platform scope: a CRM
   page keeps katski.css's look to the pixel. CSS only (the markup is the CRM's too). The menu's
   ground (6.15) holds a quiet head, the pool line on the alert's look (6.20, 6.31), the plans'
   meters (6.50), the shares as small tables with the CRM's quiet group heads. No em dash. */
html:not([data-crm],[data-crm-chat]) .ta-pop { font-family: var(--font); }
html:not([data-crm],[data-crm-chat]) .ta-pop > .ta-mhead { padding: 14px 12px 4px 18px; font-size: 15px; font-weight: 600; color: var(--ink);
  background: none; border: 0; }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-x { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; font-size: 18px;
  line-height: 1; color: var(--ink-2); border: 0; border-radius: var(--r-item); }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-x:hover { color: var(--ink); background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-blk { padding: 12px 18px; font-size: 14px; line-height: 1.5; color: var(--ink); border-bottom: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-blk:last-child { border-bottom: 0; }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-blk h4 { margin: 0 0 8px; font: 600 11.5px var(--font); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-pool { gap: 10px; padding: 11px 14px; font-size: 14px; line-height: 1.45; color: var(--ink);
  background: var(--hover); border: 0; border-radius: var(--r-tile); }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-pool.full { color: var(--ink); background: color-mix(in oklab, var(--alert-err) 14%, var(--surface)); }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-pool b { color: var(--ink); font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-pop-reset { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-pop-plan + .ta-pop-plan { border-top-color: var(--line); }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-pop-ph { font-size: 14.5px; font-weight: 600; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-next { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ta-pop :is(.ta-pop-f, .ta-pop-why) { font-size: 12.5px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-mtbl { font-size: 13.5px; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-mtbl td { padding: 7px 0; border-bottom: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-mtbl tr:last-child td { border-bottom: 0; }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-mtbl td.r { color: var(--ink-2); font-variant-numeric: tabular-nums; }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-mtbl td.r b { color: var(--ink); font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-person { gap: 8px; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-quiet { font-size: 13.5px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-link { font-size: 14px; font-weight: 500; color: var(--ink); border-bottom: 0; text-decoration: underline;
  text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
html:not([data-crm],[data-crm-chat]) .ta-pop .ta-link:hover { text-decoration-color: var(--ink); }
/* ==== rd-b4c step 2, end ==== */
/* ==== rd-b4d: Katski Sandbox and the chat page after the pilot (RD140-RD149; DESIGN-SYSTEM 6.36,
   6.45, 6.51-6.53). Every rule under the platform scope, every colour a token. */
/* ---- 6.45 extended: a row of the index list that is not a link (a trash row) takes no hover */
html:not([data-crm],[data-crm-chat]) div.ui-index-row { cursor: default; }
html:not([data-crm],[data-crm-chat]) div.ui-index-row:hover { background: transparent; }
/* ---- /sandbox: the settings column (6.36), each list the shared index list (6.45) with the
   tab rows' own grid (icon, title and line, state, chevron); katski.css's sb-* colours re-pointed */
html:not([data-crm],[data-crm-chat]) .ui-index.sb-list { padding: 4px 0; }
html:not([data-crm],[data-crm-chat]) .sb-row.ui-index-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto 18px;
  align-items: center; gap: 14px; border-bottom: 0; box-shadow: none; }
html:not([data-crm],[data-crm-chat]) a.sb-row:hover .sb-row-title { text-decoration: none; }
html:not([data-crm],[data-crm-chat]) .sb-row-ico { color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .sb-row-title { font-size: 15px; font-weight: 600; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .sb-row-sub { margin-top: 2px; font-size: 13px; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .sb-row:is(.is-muted, .is-trash) .sb-row-title { font-weight: 500; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .sb-row-state { font-size: 13px; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .sb-row-chev { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .sb-none { margin: 0; font-size: 14px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .sb-frozen { color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .sb-who-frozen { font-size: 12.5px; color: var(--ink-3); }
/* a page answer (6.31): the shared alert; katski.css's left rule and ground off */
html:not([data-crm],[data-crm-chat]) .ui-alert.sb-said { border: 0; font-size: 14px; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .sb-listpage .ui-alert.sb-said { margin: 0 0 28px; }
/* ---- 6.52 /sandbox/{tab}: a framed page under its bar. The bar is a calm row on the canvas (no
   ground, no rule), the frame a rounded box on the page's own white ground (--frame-ground), 16 px
   in from the content's edges; what is inside the frame is the person's own page */
html:not([data-crm],[data-crm-chat]) .sb-bar { min-height: 64px; padding: 12px 24px 12px 28px; background: transparent; border-bottom: 0; }
html:not([data-crm],[data-crm-chat]) .sb-title { font-size: 20px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .sb-rename > summary .sb-pen { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .sb-renameform { padding: 10px; background: var(--pop); border: 0; border-radius: var(--r-tile);
  box-shadow: var(--pop-shadow); }
html:not([data-crm],[data-crm-chat]) .sb-renameform .ui-input { height: 34px; border-radius: var(--r-ctl); }
html:not([data-crm],[data-crm-chat]) .sb-id { font-size: 13px; color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) :is(.sb-temp, .sb-data, .sb-readonly) { font-size: 13.5px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .sb-lock { color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .sb-lock.is-on { color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .sb-shell > .ui-alert.sb-said { margin: 0 16px 12px; }
html:not([data-crm],[data-crm-chat]) :is(.sb-frame, .sb-shot) { margin: 0 16px 16px; width: auto; border: 1px solid var(--line);
  border-radius: var(--rpage); overflow: clip; box-shadow: var(--shadow); }
html:not([data-crm],[data-crm-chat]) .sb-frame { background: var(--frame-ground); }
html:not([data-crm],[data-crm-chat]) .sb-shot { background: var(--surface); }
html:not([data-crm],[data-crm-chat]) .sb-shot-when { padding: 10px 20px; font-size: 13px; color: var(--ink-3); background: var(--chrome);
  border-bottom: 1px solid var(--line); }
html:not([data-crm],[data-crm-chat]) .sb-shot-img { background: var(--frame-ground); }
html:not([data-crm],[data-crm-chat]) .sb-line { font-size: 18px; font-weight: 600; color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .sb-sub { font-size: 14px; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .sb-dialog p { color: var(--ink-2); }
@supports (corner-shape:squircle) {
  html:not([data-crm],[data-crm-chat]) :is(.sb-frame, .sb-shot) { corner-shape: squircle; }
}
/* ---- 6.53 the full chat page (/chats/{T}): the chat in the page's panel reads as the CRM chat
   frame (crm.css:742-798, html[data-crm-chat]) in the page's Light or Dark. Scoped to this page
   by its own block (#kc-page, templates/chats/page.html): the panel's chat on every other
   platform page keeps the pilot's look (RD45), and agent.css / review.css are not touched.
   rd-b5b (RD155): an ad set's page (#pk-page, /packages/{id}) draws the same chat in the same
   panel slot (kpanel_chat, review/_katski.html), so the scope takes it too */
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat {
  --ag-canvas: var(--chat-bg); --ag-head: var(--chat-head); --ag-strip: var(--hover); --ag-foot: var(--chat-bg);
  --ag-bubble: var(--chat-bubble); --ag-bubble-edge: var(--chat-bubble-edge);
  --ag-send: var(--chat-acc); --ag-accent: var(--chat-acc);
  --hover-border: var(--ink-3); --accent: var(--chat-acc); --accent-hover: var(--ed); --accent-text: var(--chat-acc);
  --accent-soft: var(--chat-soft); --amber-bg: var(--chat-soft); --agent-text: var(--ink-2);
}
/* an ad set's page before its chat starts (pk-chatstart, a short block): the panel's own ground,
   so the chat ground never stops halfway down the panel */
html:not([data-crm],[data-crm-chat]):has(#pk-page) .kp#kp .ag-chat.pk-chatstart { --ag-canvas: var(--chrome); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat .ag-bubble :is(.ag-fbq, .ag-nby, .ag-picsnote, .ag-btag i) { color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat .ag-bubble :is(.ag-btnname, .ag-ntag) { background: var(--surface);
  border-color: var(--line-2); color: var(--ag-ink); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat .ag-more:hover { background: var(--hover); color: var(--ag-ink); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat .ag-block .ag-nstate.ag-nloud { background: var(--hover); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat .ag-table th { background: var(--hover); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat .ag-newbelow:hover { background: var(--surface); border-color: var(--line-2); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat .ag-box:hover { border-color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat :is(.ag-box:focus-within, .ag-box.ag-dropping) { border-color: var(--chat-acc); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat .ag-msgbox::placeholder { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat .ag-send:disabled { background: var(--line-2); color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat :is(.ag-rensave:hover, .ag-icard .ag-icgo:hover) { background: var(--ed);
  color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat :is(.ag-tstg, .ag-icard) {
  --kc-line: var(--line); --kc-hover: var(--hover); --kc-lit: var(--hover); --kc-raise: var(--surface); --kc-accent: var(--chat-acc);
  --kc-ink: var(--ag-ink); --kc-body: var(--ag-ink); --kc-muted: var(--ink-2); --kc-faint: var(--ink-3); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat :is(.ag-tstg .ag-tsh b, .ag-tstg .ag-tsfoot b, .ag-tstg .ag-tsopen:hover, .ag-icard .ag-ict) {
  color: var(--ag-ink); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat .ag-tstg :is(.kp-sgchip.kp-run, .kp-sgchip:hover) { background: var(--hover);
  border-color: var(--line-2); color: var(--ag-ink); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat .ag-tstg .kp-sgline.kp-run { background: var(--hover); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat .ag-tstg .kp-sgsep { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]):has(#kc-page, #pk-page, #rv-page) .kp#kp .ag-chat .ag-tstg .kp-sggo:hover { background: var(--ed); color: var(--on-fill); }
/* the page's own main area: the shared head; the older v2 lines (ui.css 1195-1201) on tokens */
html:not([data-crm],[data-crm-chat]) .kc-content .kc-reads a.ui-link { text-decoration-color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .kc-content .kc-reads a.ui-link:hover { text-decoration-color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .kc-content .kc-openkp { height: 40px; border-radius: var(--r-pill); background: var(--btn-fill);
  color: var(--btn-fill-ink); font: 600 14px/1 var(--font); box-shadow: inset 0 0 0 1px var(--btn-fill-line); }
html:not([data-crm],[data-crm-chat]) .kc-content .kc-openkp:hover { background: var(--btn-fill-hover); filter: var(--btn-fill-lift); }
html:not([data-crm],[data-crm-chat]) .kc-content .kc-openkp:focus-visible { outline: none; box-shadow: var(--ring); }

/* ==== rd-b6 (RD162, DESIGN-SYSTEM 6.55): a parked "Coming soon" page on the tokens
   Home (/), /business, /agent, /events, /notes carry `ui-parked` on their main area
   (content_class). katski.css already points its neutral names at the tokens (rd-pilot RD5); this
   block points the names that still meant the old Katski at the shared set too, inside these pages
   only, so their Light matches the converted pages and their Dark follows: the old orange accent
   becomes the Katski blue (links, chart line), status words the platform's status set, money the
   validated pair (blue pays, wine burns), and the old mono tags take the CRM's type and a radius.
   No markup change but the scope class and one key-number class. No colour literal. */
html:not([data-crm],[data-crm-chat]) .ui-parked {
  --accent: var(--ed);
  --accent-hover: color-mix(in oklab, var(--ed) 85%, var(--ink));
  --accent-text: var(--ed);
  --accent-link-hover: color-mix(in oklab, var(--ed) 85%, var(--ink));
  --accent-soft: color-mix(in oklab, var(--ed) 30%, var(--surface));
  --amber-bg: var(--st-waiting-soft);
  --amber-border: color-mix(in oklab, var(--st-waiting) 30%, var(--surface));
  --agent-bg: var(--hover);
  --agent-text: var(--ink-2);
  --weak-bg: var(--st-waiting-soft);
  --badge-bg: var(--hover);
  --fw-sel-bg: var(--side-on);
  --green: var(--ok);
  --green-bg: color-mix(in oklab, var(--ok) 13%, var(--surface));
  /* --red and --red-bg: the one red of tokens.css here too, no longer the wine (rd-redtag, RD278) */
  --blue: var(--st-working);
  --blue-bg: var(--st-working-soft);
  --purple: var(--st-ready);
  --purple-bg: var(--st-ready-soft);
  /* rd-b5b (RD153): the ad-set accents (katski.css, neutral, never a state) on the ink steps,
     so set A's tile and band stay seen on the Dark surface */
  --set-1: var(--ink);
  --set-2: var(--ink-3);
  --set-3: var(--line-2);
  /* rd-b5b (RD155): a card's three review marks (katski.css publish-review) on the status set:
     to look at the working blue, fine the done indigo (it was a stock green), a note the waiting amber */
  --rv-todo: var(--st-working); --rv-todo-soft: var(--st-working-soft);
  --rv-fine: var(--st-done); --rv-fine-soft: var(--st-done-soft);
  --rv-note: var(--st-waiting); --rv-note-soft: var(--st-waiting-soft); --rv-note-ink: var(--st-waiting);
}
/* the key number (rule 7, RD30): Spend on Home's tile */
html:not([data-crm],[data-crm-chat]) .ui-parked .kpi-tile.is-key .kpi-value { color: var(--key); }
/* money: blue pays, wine burns (RD80), never the stock green / red */
html:not([data-crm],[data-crm-chat]) .ui-parked .roas-good { color: var(--good); }
html:not([data-crm],[data-crm-chat]) .ui-parked .roas-bad { color: var(--bad); }
html:not([data-crm],[data-crm-chat]) .ui-parked .fx-warn { color: var(--warn); }
html:not([data-crm],[data-crm-chat]) .ui-parked .nav-badge { color: var(--ink-2); border-radius: var(--r-pill); }
/* the old mono tags and labels: the CRM's type, 11 px at least, small rounded corners */
html:not([data-crm],[data-crm-chat]) .ui-parked :is(.microlabel, .type-chip, .col-chip, .src-chip, .evl-cat, .ext-badge, .nav-badge) {
  font-family: var(--font); font-size: 11px; letter-spacing: .04em; }
html:not([data-crm],[data-crm-chat]) .ui-parked :is(.type-chip, .col-chip, .src-chip, .evl .src-chip, .evl-cat, .ext-badge) {
  border-radius: var(--r-sm); }
/* the event log (/events): a rounded card like .card, its Add button the primary pill, the
   toast the shared inverted toast */
html:not([data-crm],[data-crm-chat]) .ui-parked .evl { border-color: var(--line); border-radius: var(--rpage);
  box-shadow: var(--shadow); }
html:not([data-crm],[data-crm-chat]) .ui-parked :is(.evl-add, .evl-form .evl-act button.go) { background: var(--btn-fill);
  border-color: var(--btn-fill-line); color: var(--btn-fill-ink); border-radius: var(--r-pill); padding: 7px 16px; font-size: 14px; font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .ui-parked :is(.evl-add, .evl-form .evl-act button.go):hover { background: var(--btn-fill-hover); filter: var(--btn-fill-lift); }
html:not([data-crm],[data-crm-chat]) .ui-parked .evl-act button:not(.go) { border-radius: var(--r-pill); }
html:not([data-crm],[data-crm-chat]) .ui-parked .evl-toast { background: var(--toast-bg); color: var(--toast-ink);
  box-shadow: var(--toast-shadow); border-radius: var(--r-tile); }
html:not([data-crm],[data-crm-chat]) .ui-parked .evl-toast button { color: var(--toast-ink); }
/* /agent's "Got it" in a dialog: the primary pill's words follow the mode */
html:not([data-crm],[data-crm-chat]) .ui-parked .ex-got { color: var(--btn-fill-ink); border-radius: var(--r-pill); }
html:not([data-crm],[data-crm-chat]) .ui-parked .split-bar span { color: var(--on-fill); }
/* "Underused" (/business) and a FIX suggestion: the waiting colour, not the links' blue */
html:not([data-crm],[data-crm-chat]) .ui-parked :is(.st-underused, .type-fix) { color: var(--st-waiting); }
html:not([data-crm],[data-crm-chat]) .ui-parked .av-empty { border-radius: var(--rpage); }
/* rd-b5b (RD153): a campaign's page (/batches/{id}) in the parked scope. batch.css keeps its one
   radius (the round Play, test-held), so the cards' and boxes' corners live here: a card and the
   set's head box the tile radius, the picture's top corners inside the card's 2 px state border,
   the menus' pop and the add-set form the menu radius, the who-tag a pill */
html:not([data-crm],[data-crm-chat]) .ui-parked .bt :is(.bt-card, .bt-pcard, .bt-settop) { border-radius: var(--r-tile); }
html:not([data-crm],[data-crm-chat]) .ui-parked .bt :is(.bt-card, .bt-pcard) > .bt-media {
  border-radius: calc(var(--r-tile) - 2px) calc(var(--r-tile) - 2px) 0 0; }
html:not([data-crm],[data-crm-chat]) .ui-parked .bt :is(.bt-pop, .bt-addsetform) { border-radius: var(--r-menu); }
html:not([data-crm],[data-crm-chat]) .ui-parked .bt .ui-menu-list .bt-pop { border-radius: 0; }
html:not([data-crm],[data-crm-chat]) .ui-parked .bt .bt-seg { border-radius: var(--r-seg); }
html:not([data-crm],[data-crm-chat]) .ui-parked .bt .bt-seg button { border-radius: var(--r-item); }
html:not([data-crm],[data-crm-chat]) .ui-parked .bt .bt-who { border-radius: var(--r-pill); }
/* the set's letter tile (katski.css, batch.css, packages.css): its letter in the surface colour on
   the set's ink step, the light set C's in ink, Light and Dark */
html:not([data-crm],[data-crm-chat]) .ui-parked .set-tile { color: var(--surface); border-radius: var(--r-ctl); }
html:not([data-crm],[data-crm-chat]) .ui-parked :is(.set-c .set-tile, .set-tile.set-c) { color: var(--set-1); }
/* rd-b5b (RD155): the ad-set pages (/packages/{id}, /publish; packages.css keeps its sharp
   rules, test-held), rounded here: the boxes and an ad's card the tile radius, the destination
   choices and the folds the item radius, the fields and the small marks the control and small
   radii, the outline buttons and filter chips a pill. The sticky action bar at the foot is the
   shared glass (rule 4), not a 96 % white. */
html:not([data-crm],[data-crm-chat]) .ui-parked :is(.rc-card, .rc-head, .rc-bar, .rc-dl, .pk-alert, .pk-run, .pk-names,
  #pk-page > .ui-alert) { border-radius: var(--r-tile); }
html:not([data-crm],[data-crm-chat]) .ui-parked :is(.pk-choice, .pk-pick, .pk-fold, .pk-fixed, .pk-namebox,
  .pk-asked) { border-radius: var(--r-item); }
html:not([data-crm],[data-crm-chat]) .ui-parked :is(.pk-input, .pk-textarea, .pk-select, .rc-note,
  .rc-card .pk-fbtext) { border-radius: var(--r-ctl); }
html:not([data-crm],[data-crm-chat]) .ui-parked :is(.pk-btn, .rc-chipf) { border-radius: var(--r-pill); }
html:not([data-crm],[data-crm-chat]) .ui-parked :is(.rc-mk, .rc-badge, .rc-hk button, .rc-dl-st, .pk-dur,
  .pk-htile, .pk-hookmark) { border-radius: var(--r-sm); }
html:not([data-crm],[data-crm-chat]) .ui-parked .ui-actionbar { background: var(--glass);
  border-top-color: var(--glass-line); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
/* rd-b5c (RD157): Make an ad (/drafts, main.mk) in the parked scope. board.css keeps its sharp
   rule for a page that is not parked (test-held: board.css holds no radius but 0), so the brief's
   corners live here: a step's box, the done line, the static and hooks boxes, the Working now block
   and the dialogs the tile and page radii; the step number, fields and the seg's ends the control
   radius; a choice, a picked tag and the drop zone the item radius; a chip a pill; the small marks
   the small radius. The type tag (katski.css .mk-type, mono 9.5 px) takes the CRM's type at 11 px
   and its border mixes with the surface, not white. */
html:not([data-crm],[data-crm-chat]) .ui-parked.mk :is(.mkb-step, .mkb-done, .mkb-static, .mkb-hkflow, .mk-live,
  .as-tblock, .mks-type, .mkr-pvfile) { border-radius: var(--r-tile); }
html:not([data-crm],[data-crm-chat]) .ui-parked.mk :is(dialog.mkm, dialog.as-modal) { border-radius: var(--rpage); overflow: hidden; }
html:not([data-crm],[data-crm-chat]) .ui-parked.mk :is(.mkb-num, .mkb-picker .ui-select, .mkb-select .ui-select,
  .mkr-search input, .mkr-filter.ui-select, .mkb-hknb, .mkr-pick, .mkb-browse, .mkm-x, .as-x) { border-radius: var(--r-ctl); }
html:not([data-crm],[data-crm-chat]) .ui-parked.mk .mkb-segb:first-child { border-radius: var(--r-ctl) 0 0 var(--r-ctl); }
html:not([data-crm],[data-crm-chat]) .ui-parked.mk .mkb-segb:last-child { border-radius: 0 var(--r-ctl) var(--r-ctl) 0; }
html:not([data-crm],[data-crm-chat]) .ui-parked.mk :is(.mkb-opt, .mkb-stsize, .mkb-pk, .mkb-drop, .mkr-row, .mks-pic,
  .mkr-tabs button) { border-radius: var(--r-item); }
html:not([data-crm],[data-crm-chat]) .ui-parked.mk :is(.mkb-chip, .mkb-ref) { border-radius: var(--r-pill); }
html:not([data-crm],[data-crm-chat]) .ui-parked.mk :is(.mkb-htile, .mkb-hbody, .mkb-pk .mkb-x, .mkr-pic, .mk-type,
  .as-pl, .as-nosample, .mk-thumb) { border-radius: var(--r-sm); }
html:not([data-crm],[data-crm-chat]) .ui-parked.mk .mk-type { font-family: var(--font); font-size: 11px;
  border-color: color-mix(in srgb, var(--tc) 38%, var(--surface)); }
/* rd-b5c (RD170): a draft's page (/drafts/{C}, main.rv-v2) in the parked scope, the Idea stage
   whole. review.css and ui.css's html.v2 .rv-* rules also draw done pages and the CRM's chat frame,
   so their white literals stay in the sheets and the colour is set here, scoped to this page's main:
   the stage tabs' numbers (a white square, the done one's words white on the ink) and the boxes,
   rows and fields that were white. */
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 .ui-steptabs .ui-utab .n { background: var(--surface);
  border-color: var(--line-2); border-radius: var(--r-sm); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 .ui-steptabs .ui-utab.done .n { background: var(--ui-fg);
  border-color: var(--ui-fg); color: var(--surface); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 .ui-steptabs .ui-utab.on .n { border-color: var(--ui-fg); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 :is(.rv-box, .rv-adgrid .rv-player, .rv-adgrid .rv-box-set,
  .rv-adgrid .as-impside, .rv-adrefs, .rv-adrefs .rv-ref, .rv-bno, .rv-bplay,
  .rv-rows:not(.as-rows) .rv-row:not(.as-row)) { background-color: var(--surface); }
/* rd-b5c2 (RD171-RD175): the rest of a draft's page, stage by stage. Every rule is scoped to the
   page's own root (#rv-page inside the parked main), so the done pages that share review.css and
   ui.css's html.v2 .rv-* rules (the chat page, an ad set, Review and publish, the Swipe file's
   preview) and the CRM's chat frame never see it; the id also outweighs the sheets' rules without
   a chain of classes. review.css keeps its sharp rule (.rv * at 0 !important, test-held), so the
   corners are set here with !important, by family: a box the tile radius, a dialog the page
   radius, a button a pill (DESIGN-SYSTEM 6.3), a field the control radius, a row or a picture the
   item radius, a small mark the small radius. */
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page {
  --rv-wine: var(--danger); --rv-wine-bg: var(--danger-soft);
  --rv-wine-edge: color-mix(in oklab, var(--danger) 30%, var(--surface));
  --rv-ro-bg: var(--hover); --rv-op: var(--good); --rv-rowhover: var(--hover);
}
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-box, .rv-surface, .rv-player, .rv-box-set,
  .as-impside, .rv-adrefs, .rv-refadd, .rv-reflist, .rv-hkcard, .rv-hkadd, .rv-hkcol,
  .rv-hklines .rv-hkband, .rv-hkfvh, .rv-planside) { border-radius: var(--r-tile) !important; }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-modal { border-radius: var(--rpage) !important; overflow: hidden; }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-btn, .rv-primary, .ui-btn, .as-titlebtn, .rv-chip) { border-radius: var(--r-pill) !important; }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-field, .rv-select, .ui-input, .ui-select,
  textarea, select, input:not([type]), input[type="text"], input[type="url"], input[type="search"],
  input[type="number"], .rv-lockedline, .as-pop, .as-q) { border-radius: var(--r-ctl) !important; }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-ref, .rv-refthumb, .rv-thumb, .rv-screen,
  .rv-take, .rv-pwin, .rv-picbig, .rv-picthumb, .rv-trythumb, .rv-askplayer, .rv-mvideo, .as-frame,
  .rv-tone, .rv-hkpic .rv-ptile, .rv-pbtn, .rv-x) { border-radius: var(--r-item) !important; }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.ui-steptabs .ui-utab .n, .rv-mark, .rv-badge,
  .rv-tag, .rv-face, .rv-hchip, .rv-fwbadge, .rv-bno, .rv-bplay, .rv-lplay, .rv-mini, .rv-dur, .rv-rmk,
  .rv-pnewtag, .rv-refthumb .dur, .rv-hkmark, .rv-hktile, .rv-hkbt, .rv-hkchg b, .rv-picn, .as-caret,
  .rv-lines mark.chg) { border-radius: var(--r-sm) !important; }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-bigplay, .rv-piczoom, .rv-hkarr, .rv-hkdot,
  .st-chip, .n-pill) { border-radius: var(--r-pill) !important; }
/* a beat's category swatch: 6.46's 3 px, half the small radius */
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-tag i { border-radius: calc(var(--r-sm) / 2) !important; }
/* rd-b5c2 step 1 (RD171): the Script stage. Play and the page's primary buttons take the CRM's
   primary (ink fill, canvas words); the warm greys, row edges and the read-only ground the
   neutral set; a changed word the waiting soft ground; a playing line the working soft one; the
   white words on a lit line number or Play the words-on-fill colour; the voice and plan
   dialogs the shared dialog shadow and backdrop. */
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-primary:not(.ui-btn) { background: var(--btn-fill);
  border-color: var(--btn-fill-line); color: var(--btn-fill-ink); font-weight: 600; }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-primary:not(.ui-btn):hover { background: var(--btn-fill-hover); filter: var(--btn-fill-lift); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-primary:not(.ui-btn) .est {
  border-left-color: color-mix(in oklab, var(--btn-fill-ink) 45%, transparent); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-link, .rv-prompts summary) { text-decoration-color: var(--line-2); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-mark-acc { border-color: var(--line-2); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-rows > .rv-row + .rv-row, .rv-other) { border-top-color: var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-row:not(.as-row):hover { box-shadow: inset 3px 0 0 var(--line-2); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-bno { border-color: var(--line-2); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-row.rv-now .rv-bno { background-color: var(--ink);
  border-color: var(--ink); color: var(--canvas); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-bplay.on { background-color: var(--accent);
  border-color: var(--accent); color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-weighnote { border-left-color: var(--line-2); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-face { background: var(--surface); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-badge { color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-tag { border-color: color-mix(in srgb, var(--c) 35%, var(--surface)); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-skel { background: linear-gradient(90deg, var(--hover) 0%,
  var(--chrome) 50%, var(--hover) 100%); background-size: 200% 100%; }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-lines mark.chg { background: var(--st-waiting-soft); color: inherit; }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-vbar { background: var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-row.rv-beatplaying, .rv-rows:not(.as-rows) .rv-row.rv-beatplaying) {
  background-color: var(--st-working-soft); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-modal { background: var(--surface); color: var(--ink);
  box-shadow: var(--modal-shadow); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-modal::backdrop { background: var(--backdrop); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-reloadnote { box-shadow: var(--pop-shadow); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-refthumb { background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-refthumb .dur { background: var(--media-scrim); color: var(--on-fill); }
/* rd-b5c2 step 2 (RD172): the Ad stage. The player's and the takes' black grounds the media
   ground, the big Play and a take's mark the media scrim with words on fill, the screen's notes
   (none yet, failed) a step off the media ground (the failed one mixed with the danger colour), the scrub and the beat strip the
   neutral set with the accent's soft mix while a beat plays, a lit window or new tag the accent
   with words on fill, the take rows' warm edges --line, the note fields --surface and the focus
   ring --ring, the model picker's tiles, pop and switch rounded (models.css is shared, so here). */
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-screen, .rv-screen video, .rv-screen img.rv-still,
  .rv-screen .rv-twoup img, .rv-thumb, .rv-take, .rv-mvideo, .rv-askplayer, .rv-trythumb, .as-frame,
  .rv-player.rv-big) { background: var(--media-ground); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-bigplay { background: var(--media-play);
  border-color: color-mix(in oklab, var(--on-fill) 85%, transparent); color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-tplay, .rv-dur) { background: var(--media-play); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-dur, .rv-takeno, .rv-takenone) { color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-screenmsg { background: color-mix(in oklab, var(--on-fill) 6%, var(--media-ground)); color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-screenmsg .s { color: color-mix(in oklab, var(--on-fill) 72%, transparent); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-screenmsg.rv-failed { background: color-mix(in oklab, var(--danger) 16%, var(--media-ground)); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-screenmsg.rv-failed .t, .rv-screenmsg.rv-failed .s) { color: color-mix(in oklab, var(--on-fill) 88%, var(--danger)); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-player.rv-big .rv-ptime { color: color-mix(in oklab, var(--on-fill) 82%, transparent); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-scrub::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--accent) var(--at, 0%), var(--line) var(--at, 0%)); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-scrub::-moz-range-track { background: var(--line); }
/* RD287: the clip dialog's bar keeps the band over the part of the clip the ad uses. The two
   rules above (RD172) outweighed review.css's `.rv-mscrub.rv-haswin` track, so since the look
   the band was gone: the used part read like any played part (tests/test_clip_window.py,
   recheck B1; a browser test no gate ran). The band is see-through ink over the fill: darker
   than the played part in Light, lighter in Dark; the unplayed rest stays plain. */
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-mscrub.rv-haswin::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, transparent var(--ws, 0%), color-mix(in oklab, var(--ink) 42%, transparent) var(--ws, 0%),
      color-mix(in oklab, var(--ink) 42%, transparent) var(--we, 0%), transparent var(--we, 0%)),
    linear-gradient(90deg, var(--accent) var(--at, 0%), var(--line) var(--at, 0%)); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-mscrub.rv-haswin::-moz-range-track {
  background: linear-gradient(90deg, transparent var(--ws, 0%), color-mix(in oklab, var(--ink) 42%, transparent) var(--ws, 0%),
      color-mix(in oklab, var(--ink) 42%, transparent) var(--we, 0%), transparent var(--we, 0%)),
    linear-gradient(90deg, var(--accent) var(--at, 0%), var(--line) var(--at, 0%)); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-seg { background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-segfill { background: var(--line-2); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-seg.rv-segplaying { background: color-mix(in oklab, var(--accent) 22%, var(--surface)); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-pwin, .rv-rows:not(.as-rows) .rv-pwin) { background: var(--surface); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-pwin.on, .rv-rows:not(.as-rows) .rv-pwin.on, .rv-pnewtag) {
  background: var(--accent); border-color: var(--accent); color: var(--on-fill); }
/* rd-match-b (RD222): a beat's Remake is one of many on the page, so it is never the filled main
   button: the outline button's look */
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-rmk { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-adinfo .ui-btn-primary { color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.as-rhead, .rv-row.as-row) { border-bottom-color: var(--line); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .as-origin { border-left-color: var(--line-2); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(textarea.rv-fbin, #ag-copynote, .as-q) { background: var(--surface); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(textarea.rv-fbin, #ag-copynote):focus { box-shadow: 0 0 0 3px var(--ring); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .as-pop { box-shadow: var(--pop-shadow); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.gm-mini, .gm-need) { border-radius: var(--r-ctl) !important; }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .gm-pop { border-radius: var(--r-menu) !important; overflow: hidden; }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.gm-track, .gm-track::after, .gm-i) { border-radius: var(--r-pill) !important; }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.gm-opt .pref, .rv-vswitch .rv-vtab) { border-radius: var(--r-sm) !important; }
/* rd-b5c2 step 3 (RD173): the Picture stage and the hooks views. A picture's ground the media
   ground, its marks on the scrim, the zoom and the arrows the pop; a thumb, a picture being made
   (the hatch) and the more tile the neutral set. The hooks views' old orange (#b5531f) the Katski
   blue `--ed` (as Make an ad's hook tiles, RD157), their warm tints a soft mix of it or the
   neutral set, their warm greys --line-2 / --chrome / --hover, white words on the ink --canvas and
   on a colour --on-fill; a hook picture's purple tile the ready soft pair. */
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-picbig:not(.rv-picempty) { background: var(--media-ground); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-picbig.rv-picempty { border-radius: var(--r-tile) !important; }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-picof { background: var(--media-scrim); color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-piczoom, .rv-hkarr) { background: var(--pop); color: var(--ink); box-shadow: var(--pop-shadow); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-picthumb { background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-picn { color: var(--canvas); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-picmaking { background: repeating-linear-gradient(135deg, var(--hover) 0 10px, var(--line) 10px 20px); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-picmore .rv-picthumb { background: var(--chrome); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-picacts .ui-btn-primary { color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-hkmark { background: var(--surface); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-hklines .rv-hkband, .rv-hkband:not(.rv-hklines *)) { background: color-mix(in oklab, var(--ed) 8%, var(--surface)); border-left-color: var(--ed); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-hklines .rv-hkshared, .rv-hkgrp-shared .rv-hkband:not(.rv-hklines *)) { background: var(--hover); border-left-color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-hklines .rv-hkbt, .rv-hklines .rv-hktile) { background: var(--ed); color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-hkbt:not(.rv-hklines *), .rv-hktile:not(.rv-hklines *)) { color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-hklines .rv-hkcard:not(.on) .rv-hktile { background: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-hkcard { border-color: var(--line-2); background: var(--surface); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-hkcard.on { border-color: var(--ink); box-shadow: inset 0 4px 0 var(--ed); background: color-mix(in oklab, var(--ed) 5%, var(--surface)); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-hkadd { border-color: var(--line-2); background: var(--chrome); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-hklines .rv-hkchg b, .rv-hkchg b:not(.rv-hklines *)) { color: var(--canvas); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-hklines form.rv-hkline:focus-within { background: color-mix(in oklab, var(--ed) 5%, var(--surface)); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-hktab:hover { background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-hktab.on, .rv-hktab.on b) { color: var(--canvas); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-hktab.on .sico { background: var(--canvas); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-hkpvl { background: linear-gradient(var(--media-scrim), transparent); color: var(--on-fill); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-hkpvl .rv-hkof { color: color-mix(in oklab, var(--on-fill) 88%, transparent); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-hkarr:hover { background: var(--surface); color: var(--accent-text); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-hkkey .rv-hksw.rv-hksw-s:not(.rv-hklines *), .rv-hkdot) { background: var(--line-2); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-hkfvh, .rv-hkfvr:hover) { background: var(--chrome); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-hkfvr.on { background: var(--hover); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-hkcol.on { background: color-mix(in oklab, var(--ed) 5%, var(--surface)); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page :is(.rv-hkpic .rv-ptile, .rv-rows:not(.as-rows) .rv-hkpic .rv-ptile) { background: var(--st-ready-soft); border-color: color-mix(in oklab, var(--st-ready) 25%, var(--surface)); }

/* ==== rd-match-a (RD187, rules 28 and 29; DESIGN-SYSTEM 6.25): the top bar IS Performance's bar
   (static/perf.css `.perf .top`, `.tabs`, `.tab`): one floating glass card 10 px from the top of
   the page area and 16 px from its sides, 60 px high, radius 22, the glass ground with its blur,
   the hairline, the heavier bottom edge and the shadow. The pane scrolls UNDER it (rule 4): the
   bar floats over the pane, and the pane keeps the bar's room (--ui-header-h, 80 px = 10 + 60 +
   10) as its own top padding, so every sticky thing inside the pane (a page's own bar, a sticky
   panel, a table head) sticks 10 px under the bar by this one rule. A page with the siblings
   strip keeps the strip in the column under the bar and its pane starts under the strip.
   Colours only through tokens.css (--glass*, --bar-ink*). ==== */
/* the pane keeps its scrollbar's gutter whether it scrolls or not (Performance's pane does,
   `.perf{scrollbar-gutter:stable}`), so the bar is the same width on every page; --ui-sb-w is
   the scrollbar's width (katski.css `::-webkit-scrollbar`, 10 px) and the bar stops before it */
html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-main { --ui-header-h: calc(var(--tb-top) * 2 + var(--tb-h)); --ui-sb-w: var(--tb-gutter); }
html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-main > .ui-scroll { padding-top: var(--ui-header-h);
  scroll-padding-top: var(--ui-header-h); scrollbar-gutter: stable; }
html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-main > .ui-sibs { margin-top: var(--ui-header-h); }
html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-main:has(> .ui-sibs) > .ui-scroll { padding-top: 0; }
/* OL10: every number and colour is THE bar's (static/topbar.css); the ground stays tokens.css's
   --glass, which in Dark is Performance's colour at .72 (RD200: AA over a picture under the bar) */
html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-main > .ui-header { position: absolute; top: var(--tb-top); left: var(--tb-in); right: calc(var(--tb-in) + var(--ui-sb-w));
  z-index: 20; box-sizing: border-box; height: var(--tb-h); min-height: 0; margin: 0; padding: 0 var(--tb-pad); gap: var(--tb-gap); flex-wrap: nowrap;
  border: 1px solid var(--tb-line); border-bottom: 1.5px solid var(--tb-edge); border-radius: var(--tb-r);
  box-shadow: var(--tb-shadow); animation: none; }
@supports (corner-shape: squircle) {
  html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-main > .ui-header { border-radius: var(--tb-r-sq); corner-shape: squircle; } }
/* what passes under the bar never shows above it (perf.css `.perf .top::before`) */
html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-main > .ui-header::before { content: ""; position: absolute; left: -17px;
  right: -17px; top: -12px; height: 11px; background: var(--canvas); }
/* the left end: the place, drawn as Performance's tabs. A page's own name (or the trail's last
   part) is the raised pill; a parent before it is a tab at rest, the way back (rule 12) */
html:not([data-crm],[data-crm-chat]) .ui-header > .ui-crumbs { align-self: center; margin: 0; gap: 4px; font-size: 14.5px;
  font-weight: 500; color: var(--bar-ink); }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs .ui-trail { align-self: center; align-items: center; gap: 4px; }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs > a, html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs > b:last-child,
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs .ui-trail-step > :is(a, .ui-trail-plain) { align-self: center; box-sizing: border-box;
  height: 40px; padding: 0 15px; border-radius: 12px; background: none; box-shadow: none; font-size: 14.5px;
  font-weight: 500; color: var(--bar-ink); text-decoration: none; white-space: nowrap; }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs > a, html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs > b:last-child { display: block; line-height: 40px;
  overflow: hidden; text-overflow: ellipsis; }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs .ui-trail-step > :is(a, .ui-trail-plain) { display: flex; align-items: center; line-height: normal; }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs .ui-trail-step:not(.is-here) .ui-trail-nm { font-weight: 500; color: inherit; }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs .ui-trail-lv { color: var(--bar-ink-3); }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs > a:hover,
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs .ui-trail-step:not(.is-here) > a:hover { color: var(--ink);
  background: var(--glass-hover); box-shadow: inset 0 0 0 1px var(--glass-hover-ring); }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs > b:last-child,
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs .ui-trail-step.is-here > :is(a, .ui-trail-plain),
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs .ui-trail-step.is-here > a:hover { color: var(--tb-on-ink); font-weight: 600;
  background: var(--tb-on); box-shadow: var(--tb-on-shadow); }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs .ui-trail-step.is-here .ui-trail-nm { font-weight: 600; color: var(--tb-on-ink); }
/* the place's icon: its row's icon in the left menu (base.html copies it), 16 px; the arrows
   between the parts are the bar's quiet marks */
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs .ui-i.ui-place-i { width: 16px; height: 16px; margin-right: 8px;
  color: currentColor; opacity: .8; }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs > a > .ui-place-i, html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs > b:last-child > .ui-place-i { display: inline-block; vertical-align: -3px; }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs > .ui-i, html:not([data-crm],[data-crm-chat]) .ui-header .ui-crumbs .ui-trail-step > .ui-i { width: 14px; height: 14px;
  color: var(--bar-ink-3); }
/* the right end: a sync alarm (the wine chip it was, in the bar while something is wrong) and the
   status button; its menu holds the rest */
html:not([data-crm],[data-crm-chat]) .ui-header > .ui-hd-st { position: relative; gap: 8px; }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-hd-stbtn { flex: none; display: inline-grid; place-items: center; width: 36px;
  height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--bar-ink); cursor: pointer; }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-hd-stbtn .ui-i { width: 18px; height: 18px; }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-hd-stbtn:hover,
html:not([data-crm],[data-crm-chat]) .ui-header .ui-hd-stbtn[aria-expanded="true"] { color: var(--ink); background: var(--glass-hover);
  box-shadow: inset 0 0 0 1px var(--glass-hover-ring); }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-hd-menu { position: absolute; top: calc(100% + 18px); right: -2px; z-index: 30;
  display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-width: 280px; padding: 6px;
  border-radius: var(--r-menu); background: var(--pop); box-shadow: var(--pop-shadow); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-hd-menu[hidden] { display: none; }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-hd-menu > :is(.ui-sync, .pill, .ta-tp, .tour-btn) { display: flex;
  align-items: center; justify-content: flex-start; gap: 9px; box-sizing: border-box; width: 100%; height: 38px;
  margin: 0; padding: 0 12px; border: 0; border-radius: var(--r-item); background: none; box-shadow: none;
  font-family: var(--font); font-size: 14px; font-weight: 500; line-height: 1; color: var(--ink); text-align: left;
  white-space: nowrap; }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-hd-menu > :is(.ui-sync, .pill:not(.pill-link)) { color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-hd-menu > :is(.pill-link, .ta-tp, .tour-btn):hover,
html:not([data-crm],[data-crm-chat]) .ui-header .ui-hd-menu > .ta-tp.on { background: var(--hover); color: var(--ink); }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-hd-menu > .ta-tp.full { color: var(--st-back); background: var(--st-back-soft); }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-hd-menu > .pill-link .pill-chev,
html:not([data-crm],[data-crm-chat]) .ui-header .ui-hd-menu > .ta-tp .ta-tp-chev { margin-left: auto; }
html:not([data-crm],[data-crm-chat]) .ui-header .ui-hd-menu > .tour-btn svg { width: 16px; height: 16px; }
/* in the menu every row keeps its words: the bar's fit steps (mockup fix B15) fold only what
   stands on the bar itself */
html:not([data-crm],[data-crm-chat]) .ui-header .ui-hd-menu .ta-tp :is(.ta-tp-w, .ta-tp-chev) { display: inline; }
/* a phone: the same card, in the column instead of over the pane (the pane starts 10 px under
   it), so it may wrap as the bar did before (mockup fix B15, b2-x-phone-campaign): the menu
   button and the place whole from its start, the alarm and the status button beside them when
   they fit, on a row of their own under them when they do not */
@media (max-width: 767px) {
  html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-main { --ui-header-h: 10px; }
  html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-main > .ui-header { position: relative; top: auto; left: auto;
    right: auto; flex: none; margin: 10px 16px 0; height: auto; min-height: 60px; padding: 8px 10px; gap: 4px 8px;
    flex-wrap: wrap; }
  html:not([data-crm],[data-crm-chat]) .ui-header .ui-menu-btn { margin-left: 0; border-radius: 12px; color: var(--bar-ink); }
}
/* ==== rd-match-a: the top bar, end ==== */
/* ==== rd-match-b (RD188, RD189, rules 6, 28 and 30; DESIGN-SYSTEM 6.1, 6.30): the pilot reads as
   Performance. The bar's one main action (base.html's bar_action block) sits right after the
   place; the settings pages start at the bar's inner left edge, as Performance's title does; a
   person with a picture is drawn by it, as Performance draws people. No colour literal. ==== */
html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-main { --ui-bar-in: 26px; }   /* the bar's 16 px inset and its 10 px padding */
html:not([data-crm],[data-crm-chat]) .ui-header > .ui-hd-act { flex: none; display: flex; align-items: center; gap: 8px; }
/* the settings column (Settings, Account, Products): its title and cards on the bar's inner left
   edge; the cards keep their 960 px measure, so a form never stretches across the window */
@media (min-width: 768px) {
  html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-content:is(.st-v2, .ui-setpage) { margin-left: 0;
    padding-left: var(--ui-bar-in); max-width: calc(960px + var(--ui-bar-in) + 32px); }
  html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-content.pm-page { padding-left: var(--ui-bar-in); }
  /* the Admin dashboard's people table is eight columns wide: /team keeps its own 1280 px
     measure (rd-b4c), on the same edge; at 960 its names broke in the middle of a word */
  html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-content.ui-setpage.tm-page {
    max-width: calc(1280px + var(--ui-bar-in) + 32px); }
}
/* a person's picture (perf-dash PD41-PD44 as static/perf.css draws it): round, a hairline ring,
   a fixed box so nothing moves when it loads; the chip stays the fallback */
html:not([data-crm],[data-crm-chat]) :is(.ui-av-pic, .av-pic) { display: block; flex: none; box-sizing: border-box; padding: 1.5px;
  border: 1.5px solid var(--line-2); border-radius: 50%; object-fit: cover; background: var(--hover); background-clip: content-box; }
html:not([data-crm],[data-crm-chat]) body .ui-sidebar .ui-user .ui-av-pic { width: 28px; height: 28px; }
/* ==== rd-match-b, end ==== */
/* ==== rd-match-c (RD240-RD259; Paul's yes to the look, 2026-11-14): every converted page as the
   pilot. The edge: a page's title and content start at the bar's inner left edge (x 292 at
   1920, Performance's title), and a wide page ends at its inner right edge; a column keeps its
   measure. The library bar (the swipe file, the frameworks): the Bank's plain filter line, no
   ground, no box, not sticky. No colour literal. ==== */
@media (min-width: 768px) {
  /* a page that is one whole-page notice (the 403 page, 6.18) keeps it in the middle of the pane;
     a full-bleed frame (a Sandbox tab, .sb-page) keeps no padding and puts its own head row on
     the edge instead */
  html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-content:not(:has(> .ui-empty-page), .sb-page) { margin-left: 0; padding-left: var(--ui-bar-in); }
  html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-content.sb-page .sb-bar { padding-left: var(--ui-bar-in); }
  html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-content.ui-wide { padding-right: var(--ui-bar-in); }
}
html:not([data-crm],[data-crm-chat]) main:has(.ui-libbar) { --lib-bar-h: 0px; }
/* body .ui-content: beats the glass's :is(... thead th) in the @supports blocks */
html:not([data-crm],[data-crm-chat]) body .ui-content .ui-bar.ui-libbar { position: static; z-index: auto; margin: 0 0 24px; padding: 12px 0 13px;
  background: none; border-bottom: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; animation: none;
  --ink-2: inherit; }
html:not([data-crm],[data-crm-chat]) .ui-libbar-end .ui-meta { color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-libbar-end .ui-btn-ghost { background: none; border-color: transparent; color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .ui-libbar-end .ui-btn-ghost:hover { background: var(--hover); border-color: transparent; color: var(--ink); }
/* ==== rd-match-c, end ==== */
/* ==== rd-match-d ==== */
/* RD249: the ad set page's step bar (.ui-actionbar, Mark Ready) stays in view while the long page
   scrolls, so it stays sticky, but as Performance's bar: a floating glass card 10 px off the pane's
   foot, the top bar's line, edge, shadow and radius, its words starting at the bar's inner edge
   (x 292 at 1920), not a strip glued to the window's foot and both sides */
@media (min-width: 768px) {
  html:not([data-crm],[data-crm-chat]) .ui-parked .ui-actionbar { bottom: 10px; margin: 28px -10px -86px;
    padding: 10px 10px 10px 9px; border: 1px solid var(--glass-line); border-bottom: 1.5px solid var(--glass-edge);
    border-radius: 22px; box-shadow: var(--glass-shadow); }
}
/* RD252: an ad's sibling strip under the bar (Ad 2 of 3, the thumbnails, Prev / Next) is a plain
   line, as the Bank's filter line: no hairline under it, its words at the bar's inner left edge and
   Next at the content's right edge (the bar's inner edges, x 292 at 1920) */
@media (min-width: 768px) {
  html:not([data-crm],[data-crm-chat]) body.ui-shelled .ui-main > .ui-sibs { padding: 0 calc(var(--ui-bar-in) + var(--ui-sb-w)) 0 var(--ui-bar-in);
    border-bottom-color: transparent; }
}
/* RD253 (rule 39, "ticks blue"): on a draft's page a reached step's number is a done mark, so it
   takes the main button's blue instead of the ink square (a white square in Dark); the open step
   keeps its outline, a step not reached its grey ring */
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 .ui-steptabs .ui-utab.done .n { background: var(--btn-fill);
  border-color: transparent; color: var(--btn-fill-ink); }
/* RD254: the ad stage's one step, Approve vN, is the main button (rule 38), not review.css's flat
   accent fill (the copper of its day, a flat blue since RD228) */
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-adinfo .ui-btn-primary { background: var(--btn-fill);
  border-color: var(--btn-fill-line); color: var(--btn-fill-ink); }
html:not([data-crm],[data-crm-chat]) .ui-parked.rv-v2 #rv-page .rv-adinfo .ui-btn-primary:hover { background: var(--btn-fill-hover);
  border-color: var(--btn-fill-line); color: var(--btn-fill-ink); filter: var(--btn-fill-lift); }
/* ==== rd-match-d, end ==== */

/* ==== rd-match-e ==== */
/* rule 39 (RD260): a ticked or mixed box that is disabled keeps more of its blue than the .45 of
   an empty one, so the tick still reads on the dark ground */
html:not([data-crm],[data-crm-chat]) input.ui-check:is(:checked, :indeterminate):disabled { opacity: .62; }
/* RD265: a parked page (Home, /agent, /events, /notes, /business) is a `main.content` column, which
   RD242's edge rule (on .ui-content) never reached: from 768 px up it starts at the bar's inner left
   edge too (x 292 at 1920), keeps its own max-width, left-aligned, and the top room of a converted page */
@media (min-width: 768px) {
  html:not([data-crm],[data-crm-chat]) body.ui-shelled main.content.ui-parked { margin-left: 0; padding-top: 32px; padding-left: var(--ui-bar-in); }
}
/* RD264: /events carries Add an event in the bar, so the log's head drops its own copy and its
   title (the page's h1 says it) on this page only; both stay in the DOM for an HTMX swap */
html:not([data-crm],[data-crm-chat]) body:has(.ui-hd-act .evl-bar-add) #event-log .evl-head :is(.evl-title, .evl-add) { display: none; }
html:not([data-crm],[data-crm-chat]) .ui-parked .evl-pagehead { margin-bottom: 24px; }
html:not([data-crm],[data-crm-chat]) .ui-parked .evl-pagehead h1 { margin: 0; line-height: 1.2; }
/* ==== rd-match-e, end ==== */
/* ==== chat VIII (master #8) ==== */
/* RD268 (rule 39, one filled button a view; the bar's twin of costs-team's CT94 rule in katski.css):
   while the Event log's form is open its own Add event / Save is the filled one, so the bar's
   "Add an event" reads as an outline until the form closes */
html:not([data-crm],[data-crm-chat]) body:has(#evl-form-slot .evl-form) .ui-hd-act .ui-btn.evl-bar-add { background: var(--surface); border-color: var(--line-2); color: var(--ink); font-weight: 500; filter: none; }
html:not([data-crm],[data-crm-chat]) body:has(#evl-form-slot .evl-form) .ui-hd-act .ui-btn.evl-bar-add:hover { background: var(--surface); border-color: var(--ink-3); }
/* ==== chat VIII, end ==== */
/* ==== chat IX ==== */
/* RD275: New chat's composer in the Katski panel (the + button). Its foot kept the old dark brown
   ground of static/kpanel.css in Light and in Dark, with "Attach files" and the Ctrl+Enter note
   dark on it. Outside the CRM the foot takes the chat's own foot ground (as --ag-foot does on a
   chat page) and its words the look's inks. */
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-newcompose { background: var(--chrome); border-top-color: var(--line); }
html:not([data-crm],[data-crm-chat]) .kp#kp :is(.kp-newbox, .kp-newbox:focus) { border-color: var(--line-2); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-newnote { color: var(--ink-3); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-newattach { color: var(--ink-2); }
html:not([data-crm],[data-crm-chat]) .kp#kp .kp-newattach:hover { background: var(--hover); color: var(--ink); }
/* ==== chat IX, end ==== */
/* ==== rd-redtag ==== */
/* RD276, RD277 (Paul 2026-11-15, "2. Gradient edge (Recommended)"; DESIGN-SYSTEM 6.56): a red tag or
   box that shows an error, a refusal or something important is the alarm look, in the manner of the
   bar's glass: a soft glassy red fill on the padding box, a red gradient edge on the border box (a
   1 px transparent border, 1.5 px at the foot), an inset highlight and a small lift, deep red words
   (tokens.css --alarm-*). Never a filled red. Given to: the bar's sync alarm; an error alert
   (ui-alert-err) and a refusal alert (an s-back alert with role alert: "Not done", "Not made",
   "Not saved", "Not changed"); the Event log form's error; the refused-save box (av-refuse: the
   Bank, a swipe's panel, the avatar editor, the review page's swipe preview); a dialog's refusal
   line. A status (an s-back chip or alert that names a state: Sent back, Failed, a note) keeps
   rule 37's look; plain red words stay words. */
html:not([data-crm],[data-crm-chat]) :is(#sync-pill.ui-sync-alarm, .ui-alert.ui-alert-err, .ui-alert.s-back[role="alert"], .evl-err,
  .av-refuse, dialog.ui-dialog .ta-said:not(.ok)) {
  --sc: var(--alarm-ink);
  border: 1px solid transparent; border-bottom-width: 1.5px;
  background: var(--alarm-fill) padding-box, var(--alarm-edge) border-box;
  box-shadow: var(--alarm-shadow); color: var(--alarm-ink); }
html:not([data-crm],[data-crm-chat]) :is(.ui-alert.ui-alert-err, .ui-alert.s-back[role="alert"]) :is(b, .sico, .ui-i) { --sc: var(--alarm-ink); color: var(--alarm-ink); }
html:not([data-crm],[data-crm-chat]) .av-refuse .t { color: var(--alarm-ink); }
/* the older boxes take the platform's shape with it: a radius and the alert's padding */
html:not([data-crm],[data-crm-chat]) .evl-err { padding: 9px 14px; border-radius: var(--r-ctl); font-size: 13.5px; font-weight: 500; }
html:not([data-crm],[data-crm-chat]) .av-refuse { border-radius: var(--r-tile); }
/* ==== rd-redtag, end ==== */
/* ==== rd-open (RD350 to RD359) ==== */
/* rule 46 (a) (Paul 2026-11-16, "Yes, soft blue on all four (Recommended)"): the item you have open
   or picked on the Content bank, the swipe file, Ad frameworks and Avatars takes My campaigns'
   ticked row (static/campaigns.css, rd-camp: the key's soft tint, 6% of --key in --surface, 9% in
   --hover under the pointer; Dark's --key is the gold, so Dark's tint is gold as there) instead of
   the ink ring (RD123 to RD129, RD305). A row (the index rows, the trash rows) takes the tint alone,
   as My campaigns' row has no edge. A tile that holds a picture (a Bank or swipe tile, an avatar)
   takes the tint on its frame and caption, and its edge is My campaigns' selection chip's key
   edge made firmer (70% of --key-line in --line-2, the chip has 45%) and drawn 2 px like the ring
   it replaces, so a picked tile still reads at a glance over a full picture, in Dark too. Keyboard
   focus keeps its own ring. */
html:not([data-crm],[data-crm-chat]) :is(.ui-index-row.selected, .ui-index-row[aria-current="true"]),
html main.bank-page .trash-row.selected,
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-trash .trash-row.selected {
  background: color-mix(in oklab, var(--key) 6%, var(--surface)); box-shadow: none; }
html:not([data-crm],[data-crm-chat]) :is(.ui-index-row.selected, .ui-index-row[aria-current="true"]):hover,
html main.bank-page .trash-row.selected:hover,
html:not([data-crm],[data-crm-chat]) .swipe-page .sw-trash .trash-row.selected:hover {
  background: color-mix(in oklab, var(--key) 9%, var(--hover)); }
html:not([data-crm],[data-crm-chat]) :is(.ui-index-row.selected, .ui-index-row[aria-current="true"]):focus-visible { box-shadow: var(--ring); }
html:not([data-crm],[data-crm-chat]) :is(.bank-grid .ui-tile, .ui-lib-grid .ui-tile, .av-page .av-tile).selected {
  --rd-open-edge: color-mix(in oklab, var(--key-line) 70%, var(--line-2));
  background: color-mix(in oklab, var(--key) 6%, var(--surface)); border-color: var(--rd-open-edge);
  box-shadow: inset 0 0 0 1px var(--rd-open-edge), var(--shadow); }
html:not([data-crm],[data-crm-chat]) :is(.bank-grid .ui-tile, .ui-lib-grid .ui-tile, .av-page .av-tile).selected:hover {
  border-color: var(--rd-open-edge); box-shadow: inset 0 0 0 1px var(--rd-open-edge), var(--shadow-hi); }
/* ==== rd-open, end ==== */
/* ==== rd-centre (RD360-RD363; rule 48 (a), Paul 2026-11-16): with the Katski panel closed, a
   page's column that is narrower than the pane sits in the CENTRE of the space beside the menu,
   not on the bar's inner left edge (RD188, RD242, RD265 keep that edge while the panel is open).
   Keyed on <html data-kp="closed">, which base.html's pre-paint script sets before the first
   paint, so a page never loads on the left and jumps. Only the left margin changes (auto, as the
   kit's own `.ui-content` margin): the measure and the padding stay, so a column only shifts
   sideways, and a column as wide as the pane does not move at all. Not a wide page (`ui-wide`),
   a full-bleed frame (`sb-page`), the one-notice page (already centred), the CRM, or a
   `main.content` page that is not parked (Published ads, Performance). No colour. ==== */
@media (min-width: 768px) {
  html[data-kp="closed"]:not([data-crm],[data-crm-chat]) body.ui-shelled :is(
    .ui-content:not(.sb-page, :has(> .ui-empty-page)), main.content.ui-parked) {
    margin-left: auto; margin-right: auto; }
  /* one-look-centre (Paul 2026-11-17, "all pages should be central"): a wide page (`ui-wide`) is
     no longer left out above. A wide page that fills the pane (the Bank, Swipe file, People,
     My campaigns, Products) has nothing to share out, so auto margins leave it where it is; a
     wide page with a cap, the draft's page (`.rv-v2`, 1680 px: a draft, New draft), now sits in
     the centre once the pane is wider than its cap (the menu folded, or a wider screen). */
  /* one-look (Paul 2026-11-17, "Goals, team pay. Etc. all pages should be central"): the CRM's
     frame (templates/crm/_base_crm.html: the CRM, the money pages, Performance, Published ads,
     Publishing) is base.html's frame with `data-crm`, which the rule above leaves out, so a
     column there kept its left edge on any pane wider than it. The frame's own page columns take
     the same margins: the money frame's `.mpage` (Goals, Team pay, Costs, Profitability and any
     page a lane adds on money/_base_money.html; 1600 px), the CRM's page column `.page-in` (a
     brief, a file, the trash, the Briefs overview: in the pane beside the folder tree) and
     Editing rules' document. A full-width view (the board, the table, Performance) has no such
     column and does not move. A brief centres too since OL8 (Paul 2026-11-17, "Lets center the
     brief page as well actually"; OL7 had kept it left). */
  html[data-kp="closed"][data-crm] body.ui-shelled main.crm :is(.mpage, .page-in, .rules-doc) {
    margin-left: auto; margin-right: auto; }
}
/* ==== rd-centre, end ==== */
