/* ===== 00-tokens.css ===== */
/* =====================================================================
   Creative Desk v9 "Mission Deck": tokens (DESIGN.md 2.2 to 2.4)
   Instruments on ink, work on paper, one colour for go.
   Every Atelier colour token in ui.css stays. Network swaps stay.
   Nothing here touches a network token: html.ui9 (0,1,1) stays below
   :root.nbtheme (0,2,0), and the v9 names are new.
   ===================================================================== */

/* ---- 2.2 pinned: today these differ by accident between theme states.
   --sans and --mono are pinned too, because in dark an inline plain :root
   on ai, chat and live ties ui.css and wins with "Inter var". ---- */
html.ui9, html.ui9[data-theme="light"], html.ui9[data-theme="dark"] {
  --shell-h: 52px;
  --radius: 12px; --radius-sm: 8px; --r: 12px;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---- 2.3 new ---- */
html.ui9, html.ui9[data-theme="light"] {
  /* layout */
  --rail-w: 224px;
  --gut: 14px;
  --bar-h: 50px;
  /* the bezel */
  --bezel: #16130e;
  --bezel-2: #201c15;
  --bezel-3: #2c271e;
  --bezel-well: #0c0a06;
  --bezel-line: rgba(244,239,228,.085);
  --bezel-line-2: rgba(244,239,228,.16);
  --on-bezel: #f4efe4;
  --on-bezel-dim: #b4ab9b;
  --on-bezel-faint: #948b7b;
  --bezel-cast: rgba(22,19,14,.26);
  /* light on ink. Fixed in both themes. */
  --led: #ff5a22; --led-soft: rgba(255,90,34,.20);
  --lamp-ok: #57d68d; --lamp-work: #ffb21a; --hazard: #ffb21a; --claude: #ffc98f;
  --go: linear-gradient(120deg, #ff4d1a, #ff7a1a 55%, #ffb21a);
  --go-ink: #1c0f04;
  /* paper */
  --sheet-top: #f8f5ee;
  --hair: #ebe4d6;
  --hover: rgba(22,19,14,.04);
  --mat: #e8e1d3;
  --gauge-track: rgba(22,19,14,.10);
  /* shape */
  --r-cap: 4px; --r-key: 7px; --r-card: 10px; --r-ticket: 12px; --r-panel: 14px; --r-bezel: 16px;
  --e1: 0 1px 0 rgba(22,19,14,.03);
  --e2: 0 10px 28px -14px rgba(22,19,14,.40), 0 2px 6px rgba(22,19,14,.08);
  /* motion */
  --ease: cubic-bezier(.2,.7,.2,1);
  --t1: 110ms; --t2: 170ms; --t3: 240ms;
}
html.ui9[data-theme="dark"] {
  /* layout and motion again: this block must stand alone */
  --rail-w: 224px; --gut: 14px; --bar-h: 50px;
  --r-cap: 4px; --r-key: 7px; --r-card: 10px; --r-ticket: 12px; --r-panel: 14px; --r-bezel: 16px;
  --ease: cubic-bezier(.2,.7,.2,1); --t1: 110ms; --t2: 170ms; --t3: 240ms;
  --lamp-ok: #57d68d; --lamp-work: #ffb21a; --hazard: #ffb21a; --claude: #ffc98f; --go-ink: #1c0f04;
  /* the bezel LIFTS above the sheet in dark, so the screen still reads as set into a device */
  --bezel: #211d16; --bezel-2: #2b261d; --bezel-3: #383227; --bezel-well: #100e0a;
  --bezel-line: rgba(243,238,228,.08); --bezel-line-2: rgba(243,238,228,.16);
  --on-bezel: #f3eee4; --on-bezel-dim: #bcb3a3;
  --on-bezel-faint: #a0978a;
  --bezel-cast: rgba(0,0,0,.55);
  --led: #ff6a3d; --led-soft: rgba(255,106,61,.22);
  --go: linear-gradient(120deg, #ff5a26, #ff8a2a 55%, #ffc24a);
  --sheet-top: #15110b;
  --hair: #231f1a; --hover: rgba(243,238,228,.05); --mat: #1c1915;
  --gauge-track: rgba(243,238,228,.12);
  --e1: 0 0 0 transparent;
  --e2: 0 14px 34px -14px rgba(0,0,0,.8), 0 2px 6px rgba(0,0,0,.5);
}
/* --bar-h and friends can be set per page by a package with html.ui9.page-NAME (0,2,1 ties the
   theme blocks, and page fragments load later, so a package always wins). */

/* the give-way ladder's token steps (3.9) */
@media (max-width: 1240px) {
  html.ui9, html.ui9[data-theme="light"], html.ui9[data-theme="dark"] { --rail-w: 204px; }
}
@media (max-width: 860px) {
  html.ui9, html.ui9[data-theme="light"], html.ui9[data-theme="dark"] { --rail-w: 0px; --shell-h: 50px; }
}

/* ---- 2.4 drifted pages: tokens forced by page class ---- */

/* ai, chat, live, todo, api-docs: blue and navy in dark. ui.css loads first on these pages, so their
   inline :root[data-theme=dark] wins. The Atelier dark block again, at (0,3,1). */
html.ui9:is(.page-ai, .page-chat, .page-live, .page-todo, .page-api-docs)[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0c0a; --surface: #171512; --surface-2: #211e19; --elevated: #1c1a16;
  --paper: #171512;
  --line: #2b2721; --line-strong: #3d372e;
  --text: #f3eee4; --text-dim: #b3aa99; --text-faint: #7f7768;
  --ink: #f3eee4; --dim: #b3aa99; --faint: #7f7768;
  --inkbar: #070605; --inkbar-text: #f3eee4; --inkbar-dim: #8f8676;
  --accent: #ff6a3d; --accent-soft: #3a1c10; --accent-text: #ff9d7a;
  --accent-2: #ffc24a;
  --grad: linear-gradient(120deg, #ff5a26, #ff8a2a 55%, #ffc24a);
  --primary-bg: #f3eee4; --primary-text: #12100c;
  --live: #57d68d;   --live-bg: #12291b;
  --approved: #7ea2ff; --approved-bg: #172342;
  --review: #ffc24a; --review-bg: #33260b;
  --rejected: #ff7a5c; --rejected-bg: #3a1710;
  --draft: #b3aa99;  --draft-bg: #2b2721;
  --archived: #9a9282; --archived-bg: #26221d;
  --adplexity: #4fd4e6; --adplexity-bg: #0e3036;
  --crawler: #b197fc; --crawler-bg: #261d45;
  --ok: #57d68d; --okbg: #12291b; --okink: #7ee2a8;
  --badbg: #3a1710; --badink: #ffab96;
  --warnbg: #33260b; --warnline: #5c4512; --warnink: #ffd98a;
  --infobg: #241b12; --infoline: #3f3020; --infoink: #f1d5b5;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 2px 6px rgba(0,0,0,.45), 0 16px 34px -16px rgba(0,0,0,.7);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.5), 0 22px 48px -14px rgba(0,0,0,.7), 0 50px 100px -30px rgba(0,0,0,.8);
}
/* api-docs */
html.ui9.page-api-docs, html.ui9.page-api-docs[data-theme="light"], html.ui9.page-api-docs[data-theme="dark"] {
  --card: var(--surface); --code: var(--surface-2); --acc: var(--accent);
}

/* research: the fuchsia win token */
html.ui9.page-research, html.ui9.page-research[data-theme="light"], html.ui9.page-research[data-theme="dark"] {
  --win: var(--accent); --win-bg: var(--accent-soft);
}

/* adsmanager: ClickFlare's violet becomes the warm second accent */
html.ui9.page-adsmanager, html.ui9.page-adsmanager[data-theme="light"], html.ui9.page-adsmanager[data-theme="dark"] {
  --cf: color-mix(in srgb, var(--accent-2) 8%, var(--surface));
  --cf-head: color-mix(in srgb, var(--accent-2) 18%, var(--surface));
  --cf-text: var(--review);
}

/* live, ai, chat: page-only status tokens map to the Atelier ones */
html.ui9.page-live, html.ui9.page-live[data-theme="light"], html.ui9.page-live[data-theme="dark"] {
  --bar: var(--accent-soft);
  --wait: var(--review); --wait-bg: var(--review-bg); --bad: var(--rejected); --bad-bg: var(--rejected-bg);
}
html.ui9:is(.page-ai, .page-chat), html.ui9:is(.page-ai, .page-chat)[data-theme="light"], html.ui9:is(.page-ai, .page-chat)[data-theme="dark"] {
  --wait: var(--review); --wait-bg: var(--review-bg); --bad: var(--rejected); --bad-bg: var(--rejected-bg);
}

/* swipe, swipe_tools */
html.ui9:is(.page-swipe, .page-swipe_tools), html.ui9:is(.page-swipe, .page-swipe_tools)[data-theme="light"], html.ui9:is(.page-swipe, .page-swipe_tools)[data-theme="dark"] {
  --dim: var(--text-dim); --faint: var(--text-faint); --okbg: var(--live-bg);
  --warn: var(--review); --warnbg: var(--review-bg); --bad: var(--rejected); --badbg: var(--rejected-bg);
}

/* the cool pages with no data-theme of their own read a warm body once boot sets it */
html.ui9:is(.page-todo, .page-links, .page-swipe, .page-swipe_tools) body { font: 400 13px/1.45 var(--sans); }

/* ===== 01-base.css ===== */
/* =====================================================================
   v9 base: the shared language every screen gets for free (DESIGN.md
   2.5 to 2.8, 3.7, 4.1, 5, 6.6). Every rule starts html.ui9, so the layer
   is inert when the class is absent.

   Rule of thumb in this file: shape and type apply to every key, field and
   table. `display` is only ever set through :where(), at zero specificity,
   so a page's own state rule (.meta-only, .nb-only, inline style) still
   wins. Colour on a key is left to the page wherever the colour means
   something (Launch, on/off, danger).
   ===================================================================== */

/* ---- 6.6: the ground ------------------------------------------------- */
/* the sheet catches the light from the bezel: a page bar repaints this, pages with none still get it.
   The ink layer only shows in the scrollbar gutter, so the bar reaches the window edge on a short page. */
html.ui9 {
  scrollbar-gutter: stable; -webkit-text-size-adjust: 100%;
  background: linear-gradient(var(--bezel), var(--bezel)) 0 0 / 100% var(--shell-h) no-repeat,
              linear-gradient(var(--sheet-top), var(--bg)) 0 var(--shell-h) / 100% var(--bar-h) no-repeat, var(--bg);
}
/* A fixed layer stops at the gutter, so the strip stayed undimmed beside it. While one is up the gutter goes: a page that
   really scrolls keeps its scrollbar, and on a short page the 11px move happens under the scrim. Overlay scrollbars never see this. */
html.ui9:has(.scrim.show, .modal.show, .drawer.show, .sheet.show, .sheet.open, aside.panel.show, .ovl.open, .ui-pal.show, .ui-sheet.show) { scrollbar-gutter: auto; }
/* corner ticks off: root style recalc 161ms to 15ms at 1,500 cards */
html.ui9.ui-shell :is(.card, .panel, .stat, .list, .mpick, .ui-tile, .ui-pop, .ui-pal-box) { background-image: none !important; }
html.ui9 body {
  background-image: none !important; background-attachment: scroll !important; background-color: transparent !important;
  min-height: 100vh; padding-top: var(--shell-h) !important; font-family: var(--sans); font-size: 13px; line-height: 1.45;
}
html.ui9 [hidden] { display: none !important; }
/* backdrop-filter count 0, cards included: every place the app declares one */
html.ui9 :is(.topbar, .top, header.top, .ui-nav, .scrim, .ui-pal, .ui-sheet, .rail, .selbar, .select-check, .type-badge, .todo-badge, .ver-count, .play-badge div, .drop-hint) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
/* no card entry animation, no hover tilt */
html.ui9 :is(.card, .tpl) { animation: none !important; }
html.ui9.page-index .card:hover { transform: none !important; }
html.ui9 .tile:hover { transform: none; }
html.ui9 .btn:active { transform: translateY(.5px); }
html.ui9 :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html.ui9 .sw { min-width: 34px; min-height: 19px; }
html.ui9 .sw:focus-visible { outline-offset: 3px; border-radius: 999px; }

/* ---- 2.5: type. Nothing under 10px. Nothing gets bigger. ---------------
   Serif is Claude's alone. --serif is pinned to the real serif now, so every
   place ui.css used it by accident goes back to Geist here. */
html.ui9 :is(h1, h2, #pageTitle, .topbar .brand > span:last-child, .modal-head b, .grid-head h2, .sheet > header b, .authcard h2) {
  font-family: var(--sans) !important; font-style: normal !important;
}
html.ui9 :is(.secthead, .sect > summary, .dayhead, .nm, .ttl, .grp .hd, .cfhead b, .formsec-head, .vcard h2, .tpl .copy, .card-name,
  .brand-name, .rail .brand b, .drawer h2, .drawer input#dName, .card > header h2, .card > header b, .topbar h1) {
  font-family: var(--sans) !important; font-style: normal;
}
html.ui9 .authgate::before { font-family: var(--sans); font-style: normal; }
/* the arrow before page titles is gone */
html.ui9 :is(#pageTitle, .head h1, .topbar h1)::before { content: none; }
html.ui9 .topbar .brand, html.ui9 .top .brand {
  display: inline-flex; align-items: center; gap: 8px; font: 600 15px/1.2 var(--sans); letter-spacing: -.015em; white-space: nowrap; color: var(--text);
}
html.ui9 :is(#pageTitle, .topbar .brand > span:last-child, .topbar h1, header.top h1, .head h1, .top > b) {
  font-size: 15px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; margin: 0;
}
html.ui9 .card > header :is(h2, b) { font-size: 14px; font-weight: 600; letter-spacing: -.012em; line-height: 1.25; }
html.ui9 :is(.modal-head b, .sheet > header b, .sheet > header h2, aside.panel > header h2) { font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
html.ui9 .grid-head h2 { font-size: 15px; line-height: 1.2; letter-spacing: -.015em; }
html.ui9 .step-no {
  font: 500 10.5px/1 var(--mono); letter-spacing: 0; margin-right: 0; padding: 4px 5px; border-radius: var(--r-cap);
  background: var(--surface-2) !important; color: var(--text-dim) !important;
}
html.ui9 :is(.secthead, .sect > summary, .formsec-head) { font-size: 13px; font-weight: 600; letter-spacing: -.012em; }
html.ui9 :is(.dayhead, .grp .hd, .cfhead b) { font-size: 13px; font-weight: 600; }
html.ui9.page-oneclick .tpl .nm, html.ui9.page-oneclick .topbar h1 { font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
html.ui9.page-oneclick .tpl .copy { font-size: 13px; }
html.ui9.page-templates :is(.vcard h2, .vcard .nm) { font-size: 15px; font-weight: 600; }
html.ui9.page-research .ttl, html.ui9.page-score tbody tr:nth-child(1) .nm { font-size: 13px; font-weight: 600; }
/* HUD: data labels only. ui.css forces 10.5px with !important */
html.ui9 :is(table th, label.f, .field > label, .lbl, .stat span, .mpick-h, .help-cap, .kpis .k span, .group-h) {
  font-family: var(--mono) !important; font-size: 10px !important; font-weight: 500; letter-spacing: .085em !important; text-transform: uppercase;
}
html.ui9 .v9-hud { font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--text-dim); }
html.ui9 .help { font-size: 12px; line-height: 1.4; color: var(--text-dim); }
/* inside Claude's serif every number is mono: the serif's 1 reads as l */
html.ui9 .v9-num { font: 500 .78em/1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
html.ui9 .v9-serif { font-family: var(--serif); font-weight: 400; letter-spacing: 0; }

/* ---- 2.6 / 2.7: surfaces. A ring, no blur. Thousands cost nothing. ------ */
/* not aside.panel: that is a drawer (see the drawer rule below). :where keeps this at 0,3,1, so html.ui9.page-x .card still wins */
html.ui9:not(.page-index) :is(.card, .panel):where(:not(aside)) { border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: none; }
html.ui9:not(.page-index) .card > header { border-bottom-color: var(--hair); }
html.ui9 .list { border-radius: var(--r-card); }
html.ui9 .note { border-radius: var(--r-key); }
html.ui9 .chip { border-radius: var(--r-key); }
html.ui9 :is(.tag, .vbadge) { border-radius: var(--r-cap); }
html.ui9 .pill { border-radius: 5px; }
html.ui9 .tile { border-radius: var(--r-card); }

/* ---- 3.7: one rule for every page bar ----------------------------------
   Sticky, never hides, solid, no blur, no bottom border. One row at 1100 and
   up. Below that it may wrap, and then it grows rather than spills. */
html.ui9 :is(body > .topbar, body > .top, body > header.top, .main > .topbar, .wrap > .head, body > .v9-bar) {
  position: sticky; top: var(--shell-h); z-index: 30; min-height: var(--bar-h); height: auto;
  padding: 9px var(--gut) 8px; gap: 8px; margin: 0; border: 0; box-shadow: none;
  background: linear-gradient(var(--sheet-top), var(--bg));
}
:where(html.ui9 :is(body > .topbar, body > .top, body > header.top, .wrap > .head, body > .v9-bar)) { display: flex; align-items: center; }
html.ui9 body > .v9-bar { flex-wrap: wrap; }
/* Live, AI and To-do keep their bar inside .wrap: it runs edge to edge and sits hard under the nav like the rest */
html.ui9 .wrap > .head { margin-left: calc(-1 * var(--gut)); margin-right: calc(-1 * var(--gut)); }
html.ui9:is(.page-live, .page-ai, .page-todo) .wrap { padding-top: 0; }
/* the sheet starts on one line on every page: the bar's own 8px bottom padding plus this. A package that sets its own top padding keeps to it. */
html.ui9.page-smartnews .acctbar { margin-top: 4px; }
/* Snapchat keeps its yellow bar and black ink */
html.ui9.page-snapchat body > .top { background: var(--yellow, #fffc00); color: #000; }
/* hidden, kept in the DOM: #themeLabel is written to */
html.ui9 :is(.topbar, .top, header.top) :is(img.themed-logo, .sep) { display: none; }
html.ui9 :is(#themeToggle, #themeBtn) { display: none !important; }
html.ui9 .v9-back { display: none !important; }
/* ui.css:288 hides by href, which also hides real actions. Back links stay gone. */
html.ui9.ui9-ready :is(a.btn[href="index.html"], a.btn[href="launch.html"], a.btn[href^="logs.html"], a.btn[href^="links.html"], a.btn[href^="research.html"], a.btn[href^="score.html"]):not(.v9-back) { display: inline-flex; }
/* ui.css:281's fixed 60px must not leak */
html.ui9 table th { top: calc(var(--shell-h) + var(--bar-h)); }

/* ---- 4.1: page frame. One left edge. ----------------------------------- */
html.ui9 .wrap { max-width: 1500px; margin-left: 0; margin-right: auto; padding-top: 4px; padding-left: var(--gut); padding-right: var(--gut); }

/* ---- 4.1: keys. Buttons are ink. Colour means go. ---------------------- */
:where(html.ui9 .btn) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
html.ui9 .btn {
  min-height: 32px; padding: 0 11px; border: 0; border-radius: var(--r-key); font: 500 12.5px/1.15 var(--sans); text-decoration: none;
  transition: box-shadow var(--t1), background var(--t1), color var(--t1), transform var(--t1), filter var(--t1);
}
html.ui9 .btn:not(.btn-primary, .primary, .btn-danger, .danger, .btn-ghost, .btn-on, .btn-off, .go) {
  background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line);
}
html.ui9 .btn:not(.btn-primary, .primary, .btn-danger, .danger, .btn-ghost, .btn-on, .btn-off, .go):hover {
  background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong);
}
html.ui9 .btn svg { flex: none; }
html.ui9 :is(.btn-sm, .btn.sm) { min-height: 27px; padding: 0 9px; font-size: 12px; border-radius: 6px; }
/* ink on every screen, the network colour only on the launchers and their rules */
html.ui9:not(.page-launch, .page-tiktok, .page-snapchat, .page-smartnews, .page-rules, .page-tt_rules, .page-sc_rules) :is(.btn-primary, .btn.primary) {
  background: var(--primary-bg); color: var(--primary-text); border: 0; box-shadow: 0 1px 0 rgba(0,0,0,.25);
}
html.ui9:not(.page-launch, .page-tiktok, .page-snapchat, .page-smartnews, .page-rules, .page-tt_rules, .page-sc_rules) :is(.btn-primary, .btn.primary):hover {
  background: var(--primary-bg); color: var(--primary-text); box-shadow: 0 1px 0 rgba(0,0,0,.25); filter: brightness(1.25);
}
html.ui9[data-theme="dark"]:not(.page-launch, .page-tiktok, .page-snapchat, .page-smartnews, .page-rules, .page-tt_rules, .page-sc_rules) :is(.btn-primary, .btn.primary):hover { filter: brightness(.92); }
html.ui9:is(.page-launch, .page-tiktok, .page-snapchat, .page-smartnews, .page-rules, .page-tt_rules, .page-sc_rules) .btn-primary { box-shadow: 0 1px 0 rgba(0,0,0,.2); }
html.ui9 .btn.btn-ghost { background: none; box-shadow: none; color: var(--text-dim); }
html.ui9 .btn.btn-ghost:hover { background: var(--hover); color: var(--text); box-shadow: none; }
html.ui9 .btn.btn-danger:not(#btnLaunch, #run) { background: none; color: var(--rejected); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rejected) 45%, transparent); }
html.ui9 .btn.btn-danger:not(#btnLaunch, #run):hover { background: var(--rejected); color: #fff; }
html.ui9 .btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
html.ui9 .btn.on:not(.btn-primary) { box-shadow: inset 0 0 0 1.5px var(--text); }

/* joined keys: the segmented control of the whole product. .tabs gets the same look. */
html.ui9:not(.page-snapchat) :is(.seg, .typeseg, .tabs), html.ui9.page-snapchat .wrap :is(.seg, .typeseg, .tabs) {
  padding: 2px; gap: 1px; border: 0; border-radius: var(--r-key); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line);
}
html.ui9:not(.page-snapchat) :is(.seg, .typeseg, .tabs) button, html.ui9.page-snapchat .wrap :is(.seg, .typeseg, .tabs) button {
  min-height: 26px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; box-shadow: none;
  font: 500 12.5px/1.15 var(--sans); color: var(--text-dim); transition: background var(--t1), color var(--t1);
}
html.ui9:not(.page-snapchat) :is(.seg, .typeseg, .tabs) button:hover, html.ui9.page-snapchat .wrap :is(.seg, .typeseg, .tabs) button:hover { background: var(--hover); color: var(--text); }
html.ui9:not(.page-snapchat):not(.page-index) :is(.seg, .typeseg, .tabs) button.on,
html.ui9.page-index :is(.typeseg, .tabs) button.on, html.ui9.page-snapchat .wrap :is(.seg, .typeseg, .tabs) button.on {
  background: var(--primary-bg); color: var(--primary-text); box-shadow: none;
}
html.ui9 .seg-logo button { padding: 0 7px; }

/* ---- 4.1: fields -------------------------------------------------------- */
html.ui9 :is(.input, select.input, textarea.input) {
  border: 0; border-radius: var(--r-key); background-color: var(--surface); color: var(--text); font-family: var(--sans); font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--t1);
}
html.ui9 :is(input.input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"]), select.input) { min-height: 32px; padding-top: 0; padding-bottom: 0; }
html.ui9 textarea.input { padding: 8px 10px; line-height: 1.45; }
html.ui9 :is(.input:hover, select.input:hover) { box-shadow: inset 0 0 0 1px var(--line-strong); }
/* a field's ring is its focus mark: the global outline on top of it drew two. Boxes and sliders keep the outline: a native one shows no ring. */
html.ui9 :where(.input, input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"]), select, textarea):focus-visible { outline: 0; }
html.ui9 :is(.input, input, select, textarea):focus-visible {
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent) !important;
}
html.ui9 select.input {
  appearance: none; -webkit-appearance: none; padding-left: 10px; padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23978d7b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 12px;
}
html.ui9 label.f { line-height: 1; color: var(--text-dim); margin-bottom: 6px; }

/* ---- 4.1: table language ------------------------------------------------ */
html.ui9 table th {
  height: 31px; padding-top: 6px; padding-bottom: 6px; color: var(--text-dim); white-space: nowrap; vertical-align: middle;
  border-bottom: 0 !important; box-shadow: inset 0 -2px 0 var(--text);
}
html.ui9 table td { border-bottom-color: var(--hair); }
html.ui9:not(.page-states) table td { height: 38px; }
html.ui9 :is(td.num, th.num) { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
html.ui9 td.num { font-weight: 500; letter-spacing: -.01em; }
html.ui9 tr:hover td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
html.ui9 :is(td, .kpi .v, .stat b):is(.good, .pos), html.ui9 :is(td, .kpi .v, .stat b) :is(.good, .pos) { color: var(--live); }
html.ui9 :is(td, .kpi .v, .stat b):is(.bad, .poor, .neg), html.ui9 :is(td, .kpi .v, .stat b) :is(.bad, .poor, .neg) { color: var(--rejected); }
/* cost.html pins the name column under 900 with its own shadow, which took the head rule off that one cell */
@media (max-width: 899px) {
  html.ui9.page-cost .hscroll thead th:first-child { box-shadow: 1px 0 0 var(--line), inset 0 -2px 0 var(--text); }
}

/* ---- 4.1: readout band. Mono value, HUD label, hairlines, no tile shadow.
   Each cell draws its own dividers, so the empty cells of a wrapped last row stay plain band.
   Cells have no ground of their own: a later cell's background would paint over the shadow before it. */
html.ui9:is(.page-cost, .page-score, .page-logs) .stats, html.ui9 .kpis {
  gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden;
}
html.ui9:is(.page-cost, .page-score, .page-logs) .stats > .stat, html.ui9 .kpis > .kpi {
  min-height: 48px; padding: 6px 12px; margin: 0; border: 0; border-radius: 0; box-shadow: 1px 0 0 var(--hair), 0 1px 0 var(--hair); background: none;
}
html.ui9 .kpis > .kpi.cf { background: var(--cf, var(--surface)); box-shadow: inset 1px 0 0 var(--hair), inset 0 1px 0 var(--hair), 1px 0 0 var(--hair), 0 1px 0 var(--hair); }   /* it has a ground, so it redraws what it covers */
html.ui9:is(.page-cost, .page-score, .page-logs) .stats > .stat b, html.ui9 .kpis > .kpi .v {
  font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 0;
}
html.ui9 .kpis > .kpi :is(.l, .k) { font: 500 10px/1.2 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--text-dim); }
html.ui9 .kpis > .kpi .s { font-size: 11.5px; color: var(--text-dim); }
html.ui9 #tiles:empty { display: none; }

/* ---- 4.1: drawers, sheets, modals. Above the bar (nav z 39). ------------ */
html.ui9 :is(.sheet, .modal) { border: 0; border-radius: var(--r-panel); background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); }
html.ui9 :is(.drawer, aside.panel) { border: 0; border-radius: 0; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); }
html.ui9 :is(.sheet > header, .modal-head, aside.panel > header) { border-bottom-color: var(--hair); }
html.ui9 .scrim { background: rgba(12,10,6,.52); }
html.ui9 .drawer-foot { position: sticky; bottom: 0; z-index: 2; }

/* ---- 5: the robotic DNA, as shared parts -------------------------------- */
/* corner brackets. Hero surfaces only. Host needs room for them, or --bi: 4px to sit inside. */
html.ui9 .v9-hero { position: relative; }
html.ui9 .v9-hero::after {
  content: ""; position: absolute; inset: var(--bi, -5px); pointer-events: none; z-index: 1;
  --c: var(--led); --l: 13px; --w: 1.5px;
  background:
    linear-gradient(var(--c),var(--c)) 0 0/var(--l) var(--w), linear-gradient(var(--c),var(--c)) 0 0/var(--w) var(--l),
    linear-gradient(var(--c),var(--c)) 100% 0/var(--l) var(--w), linear-gradient(var(--c),var(--c)) 100% 0/var(--w) var(--l),
    linear-gradient(var(--c),var(--c)) 0 100%/var(--l) var(--w), linear-gradient(var(--c),var(--c)) 0 100%/var(--w) var(--l),
    linear-gradient(var(--c),var(--c)) 100% 100%/var(--l) var(--w), linear-gradient(var(--c),var(--c)) 100% 100%/var(--w) var(--l);
  background-repeat: no-repeat;
}
/* keycaps: only where a shortcut really exists */
html.ui9 .v9-kc {
  display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--r-cap);
  font: 500 10px/1 var(--mono); letter-spacing: 0; text-transform: none; white-space: nowrap;
  color: var(--text-dim); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line-strong);
}
/* segmented bar: one part, used only for a real quantity. Set --on (0 to 100) or a child <i> width. */
html.ui9 .v9-segbar {
  --c: var(--hazard); --track: rgba(244,239,228,.14); position: relative; display: block; height: 8px; transform: skewX(-18deg);
  background: repeating-linear-gradient(90deg, var(--track) 0 3px, transparent 3px 5px);
}
html.ui9 .v9-segbar > i {
  position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(90deg, var(--c) 0 3px, transparent 3px 5px);
  transition: width var(--t3) var(--ease);
}
/* recessed readout well: the instrument cluster, same part on every railed screen */
html.ui9 .v9-well {
  position: relative; flex: none; margin: 0 0 8px; padding: 10px 11px 11px; border-radius: var(--r-card); color: var(--on-bezel);
  background-color: var(--bezel-well);
  background-image: linear-gradient(rgba(244,239,228,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(244,239,228,.03) 1px, transparent 1px);
  background-size: 12px 12px; background-position: -1px -1px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.85), 0 1px 0 rgba(244,239,228,.06);
}
html.ui9 .v9-well-h {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--on-bezel-dim); white-space: nowrap;
}
html.ui9 .v9-well-h b { font-weight: 500; color: var(--hazard); }
/* the live mark: anything that touches real ads carries it */
html.ui9 .v9-live { position: relative; }
html.ui9 .v9-live::before {
  content: ""; display: inline-block; flex: none; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; vertical-align: 1px;
  background: var(--led); box-shadow: 0 0 0 2px var(--led-soft);
}
html.ui9 .v9-live-mark { display: inline-block; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--led); box-shadow: 0 0 0 2px var(--led-soft); }
/* icons and platform marks from the sprite */
html.ui9 .v9-i { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
html.ui9 .v9-lg { width: 16px; height: 16px; flex: none; display: block; border-radius: 4px; }
html.ui9 .v9-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* hovercard.js injects violet. Warm, wherever the card shows. */
html.ui9 #cdHoverCard .cdh-act { background: var(--go); color: var(--go-ink); box-shadow: none; border-radius: var(--r-key); }
/* skeleton while a host is empty */
@keyframes v9-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---- 2.8: motion -------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html.ui9 .ui-nav { view-transition-name: v9-dock; }
  html.ui9 .v9-rail, html.ui9.page-index .rail { view-transition-name: v9-rail; }
  html.ui9::view-transition-old(root), html.ui9::view-transition-new(root) { animation-duration: 170ms; }
  html.ui9::view-transition-group(v9-dock), html.ui9::view-transition-group(v9-rail) { animation-duration: 0s; }
}
@media (prefers-reduced-motion: reduce) {
  html.ui9 *, html.ui9 *::before, html.ui9 *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

/* ---- 3.8: phones. Do not regress ui.css 739-762. ------------------------- */
html.ui9.page-todo .bulk:not(.show) { transform: translateX(-50%) translateY(calc(100% + 90px)); }
/* AI chat: 1fr has a min-content floor, so one wide answer table pushed the whole page sideways. It scrolls in its own box. */
@media (max-width: 820px) {
  html.ui9.page-chat .app { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  html.ui9 { scrollbar-gutter: auto; }
  html.ui9 body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  html.ui9 :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"]), select, textarea) { font-size: 16px !important; }
  html.ui9 .v9-kc { display: none; }
  /* To-do: the bulk bar wraps tall here, so a fixed 120px no longer hides it, and shown it clears the thumb bar */
  html.ui9.page-todo .bulk { bottom: calc(68px + env(safe-area-inset-bottom)); }
  /* a readout band of two columns never ends on a bare cell */
  html.ui9:is(.page-cost, .page-score, .page-logs) .stats > .stat:last-child:nth-child(odd), html.ui9 .kpis > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  /* page bars are not sticky here, and they go opaque */
  html.ui9 :is(body > .topbar, body > .top, body > header.top, .main > .topbar, .wrap > .head, body > .v9-bar) { position: static; background: var(--bg); }
  html.ui9.page-snapchat body > .top { background: var(--yellow, #fffc00); }
}

/* ===== 02-shell.css ===== */
/* =====================================================================
   v9 shell: the bar, paper tab, telemetry, Sync key, plate, panel, notes,
   popovers, rail shell, phone bars and the give-way ladder (DESIGN.md 3).
   Port of mocks/final/final.css onto the real markup.

   The bar never moves and never hides. Everything from the command box
   rightwards keeps one x on every screen: .dk-right is right-aligned, its
   keys have fixed widths, and only the tabs can give.
   ===================================================================== */

html.ui9 :is(.ui-nav, .ui-pal, .ui-sheet, .v9-pop, .v9-note, .dk-thumb, .v9-rail),
html.ui9 :is(.ui-nav, .ui-pal, .ui-sheet, .v9-pop, .v9-note, .dk-thumb, .v9-rail) *,
html.ui9 :is(.ui-nav, .ui-pal, .ui-sheet, .v9-pop, .v9-note, .dk-thumb, .v9-rail) *::before,
html.ui9 :is(.ui-nav, .ui-pal, .ui-sheet, .v9-pop, .v9-note, .dk-thumb, .v9-rail) *::after { box-sizing: border-box; }
html.ui9 :is(.ui-nav, .ui-pal, .v9-pop, .v9-note, .dk-thumb, .v9-rail, .ui-sheet) :focus-visible { outline-color: var(--led); }
/* resets at low specificity, so every part below wins without a fight */
html.ui9 :where(.ui-nav, .ui-pal, .ui-sheet, .v9-pop, .dk-thumb) :where(button:not(.ui-gbtn, .ui-menu)) { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
html.ui9 :where(.ui-nav, .ui-pal, .ui-sheet, .v9-pop, .dk-thumb) :where(a:not(.ui-item, .ui-gbtn)) { color: inherit; text-decoration: none; }
html.ui9 :is(.ui-nav, .ui-pal, .v9-pop, .v9-note) .v9-kc {
  color: var(--on-bezel-dim); background: linear-gradient(#2e291f, #231f17);
  box-shadow: inset 0 1px 0 rgba(244,239,228,.10), inset 0 0 0 1px rgba(0,0,0,.25), 0 1px 0 rgba(0,0,0,.55);
}

/* ---- first paint: ink before anything has run. The bar has no pop-in. ----
   If ui9.js never runs, the old menus come back after a beat and stay usable. */
html.ui9:not(.ui9-ready) body::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: var(--shell-h); z-index: 38; background: var(--bezel);
}
@keyframes v9-show { to { visibility: visible; } }
html.ui9:not(.ui9-ready) .ui-nav > * { visibility: hidden; animation: v9-show 0s linear 1.2s forwards; }

/* ---- the faceplate ------------------------------------------------------ */
html.ui9 .ui-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 39; height: var(--shell-h);
  display: flex; align-items: center; gap: 0; margin: 0; padding: 0; border: 0;
  background: var(--bezel); color: var(--on-bezel); font: 400 13px/1.2 var(--sans); letter-spacing: -.003em; box-shadow: 0 5px 12px -7px var(--bezel-cast);
}
/* the paper is a screen set into the bezel: concave corners, no layout cost.
   The left one sits at the window edge. A rail draws its own at its inner edge. */
html.ui9 .ui-nav::before, html.ui9 .ui-nav::after {
  content: ""; position: absolute; top: 100%; bottom: auto; width: var(--r-bezel); height: var(--r-bezel); opacity: 1; animation: none; pointer-events: none;
  background: radial-gradient(circle at 100% 100%, transparent calc(var(--r-bezel) - .5px), var(--bezel) var(--r-bezel));
}
html.ui9 .ui-nav::before { left: 0; right: auto; }
html.ui9 .ui-nav::after { left: auto; right: 0; transform: scaleX(-1); }
@media (min-width: 861px) {
  html.ui9 :is(.v9-rail, .page-index .rail)::before {
    content: ""; position: fixed; top: var(--shell-h); left: var(--rail-w); width: var(--r-bezel); height: var(--r-bezel); pointer-events: none;
    background: radial-gradient(circle at 100% 100%, transparent calc(var(--r-bezel) - .5px), var(--bezel) var(--r-bezel));
  }
}
/* the scan line: 1px under the bar, only while work runs */
html.ui9 .dk-scan { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; overflow: hidden; pointer-events: none; }
html.ui9 :is(.ui-nav.busy, .ui-nav.v9-hold) .dk-scan::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 34%; left: -34%;
  background: linear-gradient(90deg, transparent, var(--led), var(--hazard), transparent); animation: v9-scan 1.25s linear infinite;
}
@keyframes v9-scan { to { left: 100%; } }

/* brand: always as wide as the rail, so tabs always sit over paper */
html.ui9 .ui-nav .ui-brand {
  flex: none; width: var(--rail-w); height: 100%; align-items: center; gap: 9px; margin: 0; padding-left: 14px;
  font: 600 13.5px/1 var(--sans); letter-spacing: -.012em; color: var(--on-bezel); white-space: nowrap; text-decoration: none;
}
html.ui9 .ui-nav .ui-brand span { color: var(--on-bezel); }
html.ui9 .ui-brand em { font-style: normal; }
html.ui9 .ui-logo {
  position: relative; flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--go);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 0 1px rgba(0,0,0,.3);
}
html.ui9 .ui-logo::after { inset: 6.5px; border-radius: 4px; border: 2px solid rgba(255,255,255,.94); border-right-color: transparent; transform: rotate(-20deg); }

/* the shell's old parts, gone only once the new ones are in place */
html.ui9.ui9-ready .ui-nav :is(.ui-groups, .ui-classic, .ui-spacer) { display: none !important; }
html.ui9.ui9-ready .ui-nav .ui-menu { display: none; }

/* destinations: you-are-here is structural. The active tab is cut from the sheet itself. */
html.ui9 .dk-tabs { flex: 1 1 auto; min-width: 0; align-self: flex-end; display: flex; align-items: flex-end; gap: 1px; height: 42px; padding-left: 16px; }
html.ui9 .dk-tab {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px 3px; border-radius: 10px 10px 0 0;
  font: 500 13px/1.45 var(--sans); color: var(--on-bezel-dim); white-space: nowrap; text-decoration: none;
  transition: color var(--t1), background var(--t1);
}
html.ui9 .dk-tab > span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html.ui9 .dk-tab:hover { color: var(--on-bezel); background: rgba(244,239,228,.06); }
html.ui9 .dk-tab:focus-visible { outline-offset: -3px; border-radius: 10px 10px 0 0; }
html.ui9 .dk-tab.on { --paper-tab: var(--tab-paper, var(--sheet-top)); background: var(--paper-tab); color: var(--text); font-weight: 600; }
/* ::after is both shoulders. ::before carries the tab's paper down through the bar's cast shadow, so no line runs under the tab. */
html.ui9 .dk-tab.on::after {
  content: ""; position: absolute; pointer-events: none; left: -10px; right: -10px; bottom: 0; height: 10px;
  background: radial-gradient(circle at 0 0, transparent 9.6px, var(--paper-tab) 10px) left / 10px 10px no-repeat,
              radial-gradient(circle at 100% 0, transparent 9.6px, var(--paper-tab) 10px) right / 10px 10px no-repeat;
}
html.ui9 .dk-tab.on::before {
  content: ""; position: absolute; pointer-events: none; left: -10px; right: -10px; top: 100%; height: 12px; background: linear-gradient(var(--paper-tab), transparent);
  -webkit-mask: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); mask: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
}
html.ui9 .dk-tab .dk-tick { position: absolute; left: 12px; right: 12px; top: 0; height: 2px; border-radius: 0 0 2px 2px; background: var(--go); opacity: 0; }
html.ui9[data-theme="dark"] .dk-tab.on .dk-tick { opacity: 1; }
/* the temporary tab gives first, so the right cluster never moves */
html.ui9 .dk-tab.v9-this { flex: 0 1 auto; min-width: 66px; }
html.ui9 .dk-tab[data-ux-shed] { display: none; }
html.ui9 .dk-tab[data-ux-role="admin"] { display: none; }
html.ui9.v9-admin .dk-tab[data-ux-role="admin"], html.ui9 .dk-tab.on[data-ux-role="admin"] { display: inline-flex; }
/* Snapchat's bar is yellow: the tab is cut from the same sheet */
html.ui9.page-snapchat { --tab-paper: var(--yellow, #fffc00); }
html.ui9.page-snapchat .dk-tab.on { color: #000; }

/* ---- the right cluster --------------------------------------------------- */
html.ui9 .dk-right { flex: none; display: flex; align-items: center; gap: 4px; margin-left: auto; padding-right: 8px; height: 100%; }

/* the agent prompt: the one way to reach every other screen */
html.ui9 .ui-nav .ui-cmd {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 32px; width: 206px; min-width: 0; margin: 0 2px 0 0; padding: 0 6px 0 10px;
  border: 0; border-radius: 8px; background: var(--bezel-2); box-shadow: inset 0 0 0 1px var(--bezel-line); color: var(--on-bezel-dim);
  font: 400 12.5px/1 var(--sans); cursor: pointer; transition: box-shadow var(--t1), color var(--t1);
}
html.ui9 .ui-nav .ui-cmd:hover { background: var(--bezel-2); box-shadow: inset 0 0 0 1px var(--bezel-line-2); color: var(--on-bezel); }
html.ui9 .ui-cmd .v9-caret { color: var(--led); font: 600 13px/1 var(--mono); font-style: normal; }
html.ui9 .ui-nav .ui-cmd span { flex: 1; display: block; text-align: left; white-space: nowrap; overflow: hidden; font: inherit; letter-spacing: 0; }
html.ui9 .ui-nav .ui-cmd span em { font-style: normal; }
html.ui9 .ui-nav .ui-cmd.v9-short span em { display: none; }
html.ui9 .ui-nav .ui-cmd kbd { padding: 0 4px; border: 0; font: 500 10px/1 var(--mono); }

/* telemetry: the one recessed display. Lamp and Pacific clock. Everything else is behind a click. */
html.ui9 .dk-tele {
  flex: none; display: inline-flex; align-items: center; gap: 9px; height: 32px; padding: 0 11px 0 10px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--bezel-well); box-shadow: inset 0 1px 2px rgba(0,0,0,.8), 0 1px 0 rgba(244,239,228,.055);
  font: 500 11px/1 var(--mono); color: var(--on-bezel-dim); white-space: nowrap;
}
html.ui9 .dk-tele:hover, html.ui9 .dk-tele[aria-expanded="true"] { box-shadow: inset 0 1px 2px rgba(0,0,0,.8), 0 0 0 1px var(--bezel-line-2); }
html.ui9 .ui-nav .ui-status { display: inline-flex; align-items: center; gap: 7px; width: 56px; height: auto; margin: 0; padding: 0; border: 0; border-radius: 0; font: inherit; color: inherit; letter-spacing: 0; }
html.ui9 .ui-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--lamp-ok); box-shadow: 0 0 0 2.5px rgba(87,214,141,.16), 0 0 8px rgba(87,214,141,.7); animation: none; }
html.ui9 .ui-status b { position: relative; top: 1px; font-weight: 500; font-size: 10px; letter-spacing: .1em; color: var(--on-bezel); }   /* top: on the clock's baseline */
/* WORKING is one letter longer than ONLINE: no tracking, so both are 42px and the word holds still when a run starts */
html.ui9 .ui-nav.busy .ui-status b, html.ui9 .ui-nav.v9-hold .ui-status b::after { letter-spacing: 0; }
html.ui9 :is(.ui-nav.busy, .ui-nav.v9-hold) .ui-status i { background: var(--lamp-work); box-shadow: 0 0 0 2.5px rgba(255,178,26,.2), 0 0 9px rgba(255,178,26,.9); animation: v9-pulse 1s ease-in-out infinite; }
/* between two requests of a run the shell writes ONLINE: the key still says work is going on */
html.ui9 .ui-nav.v9-hold .ui-status b { font-size: 0; }
html.ui9 .ui-nav.v9-hold .ui-status b::after { content: "WORKING"; font-size: 10px; }
@keyframes v9-pulse { 50% { opacity: .35; } }
html.ui9 .dk-sep { width: 1px; height: 14px; background: var(--bezel-line-2); }
html.ui9 .dk-clk { display: inline-flex; align-items: baseline; gap: 5px; }
html.ui9 .dk-clk em { font-style: normal; font-size: 10px; letter-spacing: .08em; color: var(--on-bezel-faint); }
html.ui9 .dk-clk b { font-weight: 500; color: var(--on-bezel); font-variant-numeric: tabular-nums; }

/* sync: compact, sized to its real use, with its age. Fixed width: the age must not move anything. */
html.ui9 .dk-sync {
  flex: none; display: none; align-items: center; gap: 5px; height: 32px; width: 119px; padding: 0 5px 0 8px; border: 0; border-radius: var(--r-key); cursor: pointer;
  color: var(--on-bezel); font: 500 13px/1 var(--sans); white-space: nowrap; overflow: hidden; transition: background var(--t1);
}
html.ui9.v9-admin .dk-sync { display: inline-flex; }
html.ui9 .dk-sync:hover, html.ui9 .dk-sync[aria-expanded="true"] { background: rgba(244,239,228,.075); }
html.ui9 .dk-sync .v9-i { color: var(--on-bezel-dim); }
html.ui9 .dk-sync em { font: 500 10.5px/1 var(--mono); font-style: normal; color: var(--on-bezel-dim); display: inline-flex; align-items: center; gap: 5px; }
html.ui9 .dk-sync em.stale { color: var(--hazard); }
html.ui9 .dk-sync.run .tx { display: none; }
html.ui9 .dk-sync.run .v9-i { color: var(--hazard); animation: v9-spin 1s linear infinite; }
html.ui9 .dk-sync .v9-segbar { width: 26px; flex: none; }
html.ui9 .dk-sync.run { gap: 4px; }
html.ui9 .dk-sync.run em { gap: 4px; }
@keyframes v9-spin { to { transform: rotate(360deg); } }

/* LAUNCH: two ink keys on one orange plate. The only colour on the faceplate, the same part everywhere.
   It never takes a network colour, so nothing here reads --accent or --grad. */
html.ui9 .v9-plate {
  flex: none; display: inline-flex; align-items: center; gap: 3px; height: 38px; padding: 3px; border-radius: 11px; background: var(--go);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 8px 20px -12px #ff6a1a; font-family: var(--sans);
}
html.ui9:not(.v9-can-launch) .v9-plate { display: none; }
html.ui9 .v9-plate-l { padding: 0 6px 0 8px; font-weight: 700; font-size: 12.5px; line-height: 1; letter-spacing: -.005em; color: var(--go-ink); white-space: nowrap; }
html.ui9 .v9-plate .v9-plate-k {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 7px; border: 0; border-radius: 8px; background: #16130e; color: #f4efe4; cursor: pointer;
  font: 600 12.5px/1 var(--sans); white-space: nowrap; text-decoration: none; transition: background var(--t1), transform var(--t1);
}
html.ui9 .v9-plate .v9-plate-k:hover { background: #2e2920; color: #f4efe4; }
html.ui9 .v9-plate .v9-plate-k:active { transform: translateY(1px); }
html.ui9 .v9-plate .v9-plate-k.here { box-shadow: inset 0 0 0 1.5px rgba(244,239,228,.45); }
html.ui9 .v9-plate :focus-visible { outline-color: #16130e; outline-offset: 1px; }
html.ui9 .v9-plate .v9-plate-m { width: 22px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--go-ink); cursor: pointer; }
html.ui9 .v9-plate .v9-plate-m:hover { background: rgba(22,19,14,.14); }
html.ui9 .v9-plate .v9-plate-m[aria-expanded="true"] { background: rgba(22,19,14,.14); }
html.ui9 .v9-plate-m .v9-i { width: 13px; height: 13px; stroke-width: 2; transition: transform var(--t1); }
html.ui9 .v9-plate-m[aria-expanded="true"] .v9-i { transform: rotate(180deg); }

html.ui9 .ui-nav button.ui-ico { flex: none; display: grid; place-items: center; width: 30px; height: 32px; margin: 0; padding: 0; border: 0; border-radius: var(--r-key); color: var(--on-bezel-dim); background: none; cursor: pointer; }
html.ui9 .ui-nav button.ui-ico:hover { background: rgba(244,239,228,.075); color: var(--on-bezel); }

/* ---- ink popovers ---------------------------------------------------------- */
html.ui9 .v9-pop {
  position: fixed; z-index: 240; display: none; padding: 6px; border-radius: 12px; background: var(--bezel-2); color: var(--on-bezel); font: 400 13px/1.3 var(--sans);
  box-shadow: 0 0 0 1px var(--bezel-line-2), var(--shadow-lg); transform-origin: top right;
}
html.ui9 .v9-pop.show { display: block; animation: v9-popin var(--t2) var(--ease); }
@keyframes v9-popin { from { opacity: 0; transform: translateY(-4px) scale(.985); } }
html.ui9 .v9-pop .v9-hud { color: var(--on-bezel-dim); padding: 8px 10px 6px; display: flex; justify-content: space-between; gap: 10px; }
html.ui9 .v9-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; text-align: left; color: var(--on-bezel); }
html.ui9 .v9-row:hover, html.ui9 .v9-row:focus-visible { background: rgba(244,239,228,.075); }
html.ui9 .v9-row small { display: block; font-weight: 400; font-size: 11.5px; color: var(--on-bezel-dim); margin-top: 1px; }
html.ui9 .v9-row .v9-grow { flex: 1; min-width: 0; }
html.ui9 .v9-row em { font: 500 10.5px/1 var(--mono); font-style: normal; color: var(--on-bezel-dim); }
html.ui9 .v9-hr { height: 1px; background: var(--bezel-line); margin: 5px 4px; }

/* activity window: the clock's detail, the day bar, who did what */
html.ui9 #v9Activity { width: 348px; max-width: calc(100vw - 16px); }
html.ui9 .v9-day { display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; height: 10px; margin: 2px 10px 4px; transform: skewX(-18deg); }
html.ui9 .v9-day i { background: rgba(244,239,228,.14); }
html.ui9 .v9-day i.on { background: var(--led); }
html.ui9 .v9-day-l { display: flex; justify-content: space-between; padding: 3px 10px 6px; font: 500 10px/1 var(--mono); color: var(--on-bezel-dim); }
html.ui9 .v9-act { max-height: min(340px, 50vh); overflow-y: auto; scrollbar-color: var(--bezel-3) transparent; }
html.ui9 .v9-act-r { display: flex; gap: 9px; padding: 7px 8px; border-top: 1px solid var(--bezel-line); }
html.ui9 .v9-act-r .who { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 500 10px/1 var(--mono); background: var(--bezel-3); color: var(--on-bezel); }
html.ui9 .v9-act-r .who.cl { background: var(--go); color: var(--go-ink); }
html.ui9 .v9-act-r .tx { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
html.ui9 .v9-act-r b { font-weight: 500; }
html.ui9 .v9-act-r small { display: block; color: var(--on-bezel-dim); font-size: 11.5px; }
html.ui9 .v9-act-r .tm { font: 500 10.5px/1.4 var(--mono); color: var(--on-bezel-dim); }
html.ui9 .v9-act-none { padding: 10px 10px 8px; font-size: 12.5px; color: var(--on-bezel-dim); border-top: 1px solid var(--bezel-line); }

/* a note hung from the control that fired it. Page toasts stay at the bottom. */
html.ui9 .v9-note {
  position: fixed; z-index: 245; max-width: 340px; padding: 8px 12px; border-radius: 9px; background: var(--bezel-2); color: var(--on-bezel); opacity: 0; pointer-events: none;
  font: 400 12.5px/1.35 var(--sans); box-shadow: 0 0 0 1px var(--bezel-line-2), var(--e2); transform: translateY(-3px);
  transition: opacity var(--t2), transform var(--t2) var(--ease), visibility 0s linear var(--t2); visibility: hidden;
}
html.ui9 .v9-note.show { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity var(--t2), transform var(--t2) var(--ease); }
html.ui9 .v9-note::before { content: ""; position: absolute; top: -4px; right: var(--tip, 22px); width: 9px; height: 9px; background: inherit; transform: rotate(45deg); box-shadow: -1px -1px 0 var(--bezel-line-2); }
html.ui9 .v9-note.above::before { top: auto; bottom: -4px; box-shadow: 1px 1px 0 var(--bezel-line-2); }
html.ui9 .v9-note.bad { box-shadow: 0 0 0 1px color-mix(in srgb, var(--led) 55%, transparent), var(--e2); }
html.ui9 .v9-note.bad::before { box-shadow: -1px -1px 0 color-mix(in srgb, var(--led) 55%, transparent); }
html.ui9 .v9-note.bad.above::before { box-shadow: 1px 1px 0 color-mix(in srgb, var(--led) 55%, transparent); }
html.ui9 .v9-note b { font-weight: 500; color: var(--claude); font-family: var(--mono); font-size: 12px; }
html.ui9 .v9-note button { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; color: var(--claude); text-decoration: underline; text-underline-offset: 2px; margin-left: 8px; }
html.ui9 .v9-note a { color: var(--claude); }

/* ---- All screens + agent prompt (⌘K). One surface replaces five menus and the
   palette. The blueprint grid lives here and in the readout wells, nowhere else. */
html.ui9 .ui-pal {
  z-index: 400; align-items: flex-start; justify-content: center; padding: clamp(14px, 7vh, 64px) 16px 16px; background: rgba(12,10,6,.52);
}
html.ui9 .ui-pal.show { animation: none; }
html.ui9.ui-shell .ui-pal .ui-pal-box {
  position: relative; width: min(1000px, 100%); max-height: calc(100vh - 2 * clamp(14px, 7vh, 64px)); min-height: 0; display: flex; flex-direction: column; overflow: visible;
  color: var(--on-bezel); border: 0; border-radius: var(--r-panel); background-color: var(--bezel);
  background-image: linear-gradient(rgba(244,239,228,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(244,239,228,.03) 1px, transparent 1px) !important;
  background-size: 24px 24px !important; background-position: -1px -1px !important; background-repeat: repeat !important;
  box-shadow: 0 0 0 1px var(--bezel-line-2), var(--shadow-lg); animation: v9-palin var(--t3) var(--ease);
}
@keyframes v9-palin { from { opacity: 0; transform: translateY(8px) scale(.985); } }
html.ui9 .ui-pal-in { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 14px 0 20px; border-bottom: 1px solid var(--bezel-line); flex: none; }
html.ui9 .ui-pal-in::before { color: var(--led); font: 600 16px/1 var(--mono); animation: none; }
html.ui9 .ui-pal-in input {
  flex: 1; min-width: 0; height: 100%; border: 0 !important; outline: 0; background: none; color: var(--on-bezel);
  font: 400 15px/1 var(--mono); letter-spacing: -.025em; caret-color: var(--led); box-shadow: none !important;
}
html.ui9 .ui-pal .ui-pal-in input:focus-visible { box-shadow: none !important; outline: 0; }
html.ui9 .ui-pal-in input::placeholder { color: var(--on-bezel-faint); opacity: 1; }
html.ui9 .ui-pal-in kbd {
  flex: none; display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border: 0; border-radius: var(--r-cap); font: 500 10px/1 var(--mono);
  color: var(--on-bezel-dim); background: linear-gradient(#2e291f, #231f17);
  box-shadow: inset 0 1px 0 rgba(244,239,228,.10), inset 0 0 0 1px rgba(0,0,0,.25), 0 1px 0 rgba(0,0,0,.55);
}
html.ui9 .v9-pal-ctx { font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--on-bezel-dim); padding: 5px 7px; border-radius: 5px; background: rgba(244,239,228,.07); white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
html.ui9 .v9-pal-x { display: none; }
html.ui9 .v9-pal-body { overflow: auto; flex: 1; min-height: 0; padding: 12px 14px 6px; scrollbar-color: var(--bezel-3) transparent; }
/* with nothing typed the plan shows and the shell's list stays out of sight */
html.ui9 .v9-plan, html.ui9 .v9-results { display: none; }
html.ui9 .ui-pal-box.v9-empty .v9-plan { display: block; }
html.ui9 .ui-pal-box.v9-typing .v9-results { display: flex; flex-direction: column; }
html.ui9 .ui-pal-box:is(.v9-empty, .v9-answer) .ui-pal-list { display: none; }
html.ui9 .ui-pal-box.v9-typing :is(.ui-pal-list, .v9-hits) { display: contents; }
html.ui9 .v9-pal-h { font: 500 10px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--on-bezel-dim); padding: 4px 6px 8px; }
html.ui9 .v9-do { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px 12px; }
html.ui9 .v9-do > :is(button, a) { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 9px; border-radius: 9px; background: rgba(244,239,228,.07); font-weight: 500; font-size: 13px; white-space: nowrap; transition: background var(--t1); }
html.ui9 .v9-do > :is(button, a):hover { background: rgba(244,239,228,.13); }
html.ui9 .v9-do em { font: 500 10.5px/1 var(--mono); font-style: normal; color: var(--on-bezel-dim); }
html.ui9 .v9-do .v9-i { color: var(--on-bezel-dim); }
html.ui9 .v9-cols { display: grid; grid-template-columns: 1.15fr 1.05fr .95fr .9fr .95fr; border-top: 1px solid var(--bezel-line); }
html.ui9 .v9-col { padding: 12px 6px 8px; border-left: 1px solid var(--bezel-line); min-width: 0; }
html.ui9 .v9-col:first-child { border-left: 0; }
html.ui9 .v9-scr { position: relative; display: block; border-radius: 8px; transition: background var(--t1); }
html.ui9 .v9-scr:hover, html.ui9 .v9-scr:focus-within { background: rgba(244,239,228,.085); }
html.ui9 .v9-scr > a { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 5px 26px 5px 7px; border-radius: 8px; text-align: left; }
html.ui9 .v9-scr > a:focus-visible { outline-offset: -2px; }
html.ui9 .v9-scr > a > span { min-width: 0; flex: 1; }
html.ui9 .v9-scr b { display: block; font-weight: 500; font-size: 13px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9 .v9-scr small { display: block; font-size: 11px; line-height: 1.3; color: var(--on-bezel-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9 .v9-scr.here b::after { content: "here"; margin-left: 7px; font: 500 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--hazard); }
/* the longest name with HERE beside it needs the star's room, so the star gives way on this one row */
html.ui9 .v9-scr.here > a { padding-right: 18px; }
html.ui9 .v9-scr.here:is(:hover, :focus-within) b::after { opacity: 0; }
html.ui9 .v9-scr[data-ux-role="admin"] { display: none; }
html.ui9.v9-admin .v9-scr[data-ux-role="admin"] { display: block; }
html.ui9 .v9-scr .v9-star { position: absolute; right: 4px; top: 50%; margin-top: -11px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; color: var(--on-bezel-dim); opacity: 0; }
html.ui9 .v9-scr:hover .v9-star, html.ui9 .v9-scr .v9-star:focus-visible, html.ui9 .v9-scr .v9-star.on { opacity: 1; }
html.ui9 .v9-scr .v9-star:hover { background: rgba(244,239,228,.12); color: var(--on-bezel); }
html.ui9 .v9-scr .v9-star.on { color: var(--hazard); }
html.ui9 .v9-scr .v9-star.on .v9-i { fill: currentColor; }
html.ui9 .v9-scr .v9-star .v9-i { width: 13px; height: 13px; }

/* results: the shell's rows and ours read as one list. Order is by CSS, so the shell's nodes never move:
   a question to Claude, Do now matches, pages and actions, Find in the Library, then Ask. */
html.ui9 .v9-hit[data-ux-k="do"] { order: 1; }
html.ui9 .ui-pal-it { order: 2; }
html.ui9 .v9-hit[data-ux-k="find"] { order: 3; }
html.ui9 .ui-pal-it.ask { order: 4; }
html.ui9 .ui-pal-box:not(.v9-ask-last) .ui-pal-it.ask:first-child { order: 0; }
html.ui9 .ui-pal-empty { order: 5; }
html.ui9 .ui-pal-list { overflow: visible; padding: 0; }
html.ui9 :is(.ui-pal-it, .v9-hit) { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 5px 10px; border-radius: 8px; cursor: pointer; color: var(--on-bezel); background: none; width: 100%; text-align: left; }
html.ui9 :is(.ui-pal-it, .v9-hit):hover, html.ui9 :is(.ui-pal-it, .v9-hit).sel { background: rgba(244,239,228,.085); }
html.ui9 :is(.ui-pal-it, .v9-hit).sel { box-shadow: inset 2px 0 0 var(--led); }
html.ui9 .ui-pal-it i, html.ui9 .v9-hit .ic { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: rgba(244,239,228,.06); color: var(--on-bezel-dim); flex: none; font-style: normal; font-size: 12px; }
html.ui9 .ui-pal-it > div, html.ui9 .v9-hit .tx { flex: 1; min-width: 0; }
html.ui9 .ui-pal-it b, html.ui9 .v9-hit b { display: block; font: 500 13.5px/1.25 var(--sans); color: var(--on-bezel); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9 .ui-pal-it span, html.ui9 .v9-hit small { display: block; font-size: 11.5px; line-height: 1.3; color: var(--on-bezel-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9 .ui-pal-it.ask i { background: var(--go); color: var(--go-ink); }
html.ui9 .ui-pal-empty { padding: 26px 12px; text-align: center; color: var(--on-bezel-dim); font-size: 13px; }
/* Claude's answer: the only serif in the product, numbers in mono */
html.ui9 .ui-pal-ans { overflow: visible; padding: 6px 8px 10px; color: var(--on-bezel); font-size: 13px; }
html.ui9 .ui-pal-q { font: 500 12px/1.4 var(--mono); color: var(--on-bezel-dim); margin-bottom: 10px; letter-spacing: -.01em; }
html.ui9 .ui-pal-q::before { content: "> "; color: var(--led); }
html.ui9 .ui-pal-a { font: 400 19px/1.36 var(--serif); letter-spacing: 0; color: var(--on-bezel); max-width: 720px; }
html.ui9 .ui-pal-a::before { content: "\25C6  CLAUDE \25B8"; display: block; margin-bottom: 8px; font: 600 10px/1 var(--mono); letter-spacing: .09em; color: var(--hazard); }
html.ui9 .ui-pal-a p { margin: 0; }
html.ui9 .ui-pal-a p + p { margin-top: 8px; }
html.ui9 .ui-pal-a ul { margin: 6px 0 0; padding-left: 18px; }
html.ui9 .ui-pal-a li { margin: 3px 0; }
html.ui9 .ui-pal-a b { font-weight: 400; color: var(--claude); }
html.ui9 .ui-pal-a a { color: var(--on-bezel); text-decoration: underline; text-underline-offset: 3px; font-weight: 400; }
html.ui9 .ui-pal-a .num { font: 500 .78em/1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
html.ui9 .ui-pal-think { display: flex; align-items: center; gap: 9px; font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--on-bezel-dim); }
html.ui9 .ui-pal-think i { width: 5px; height: 5px; border-radius: 1px; background: var(--led); margin: 0 !important; }
html.ui9 .ui-pal-meta { margin-top: 12px; font: 500 10px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--on-bezel-dim); }
html.ui9 .ui-pal-meta a { margin-left: 12px; color: var(--on-bezel); text-decoration: underline; text-underline-offset: 2px; }
html.ui9 .ui-pal-err { color: var(--claude); font-size: 13px; }
html.ui9 .ui-pal-foot { display: flex; align-items: center; justify-content: flex-start; gap: 14px; min-height: 38px; padding: 7px 20px; border-top: 1px solid var(--bezel-line); font: 400 12px/1.3 var(--sans); letter-spacing: 0; text-transform: none; color: var(--on-bezel-dim); flex: none; flex-wrap: wrap; }
html.ui9 .ui-pal-foot span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
html.ui9 .ui-pal-foot .v9-grow { flex: 1; }
html.ui9 .ui-pal-foot :is(a, button) { font: inherit; color: inherit; text-decoration: underline; text-decoration-color: var(--bezel-line-2); text-underline-offset: 2px; white-space: nowrap; }
html.ui9 .ui-pal-foot :is(a, button):hover { color: var(--on-bezel); }

/* ---- the fallback sheet behind the hamburger, restyled ---------------------- */
html.ui9 .ui-sheet { background: rgba(12,10,6,.52); }
html.ui9 .ui-sheet-in { background: var(--bezel); color: var(--on-bezel); box-shadow: 0 0 0 1px var(--bezel-line-2), var(--shadow-lg); }
html.ui9 .ui-sheet .ui-brand { color: var(--on-bezel); font: 600 13.5px/1 var(--sans); gap: 9px; }
html.ui9 .ui-sheet-x { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: rgba(244,239,228,.07); color: var(--on-bezel); }
html.ui9 .ui-sheet .ui-cmd.ui-cmd-wide { background: var(--bezel-2); color: var(--on-bezel-dim); border: 0; box-shadow: inset 0 0 0 1px var(--bezel-line); border-radius: 9px; height: 42px !important; margin-bottom: 14px; display: flex; align-items: center; gap: 9px; }
html.ui9 .ui-sheet .ui-cmd.ui-cmd-wide span { color: var(--on-bezel-dim); font: 400 13px/1 var(--sans); letter-spacing: 0; }
html.ui9 .ui-sheet .ui-spark { color: var(--led); -webkit-text-fill-color: var(--led); background: none; font-size: 13px; }
html.ui9 .ui-sheet-gt { color: var(--on-bezel-dim); font-size: 10px !important; font-weight: 500; letter-spacing: .085em !important; }
html.ui9.ui-shell .ui-sheet .ui-tile { background: var(--bezel-2); border: 0; box-shadow: inset 0 0 0 1px var(--bezel-line); color: var(--on-bezel); border-radius: 9px; min-height: 58px; }
html.ui9 .ui-tile b { font: 500 13px/1.2 var(--sans); }
html.ui9 .ui-tile span { font-size: 11px; color: var(--on-bezel-dim); }
html.ui9.ui-shell .ui-sheet .ui-tile.on { background: var(--bezel-3); box-shadow: inset 0 0 0 1px var(--led); }
html.ui9 .ui-sheet-classic { color: var(--on-bezel-dim); }

/* ---- the rail shell. A rail only where a screen has instruments to hold. ----- */
html.ui9 .v9-rail {
  position: fixed; top: var(--shell-h); left: 0; bottom: 0; z-index: 38; width: var(--rail-w); display: flex; flex-direction: column; padding: 2px 8px 0;
  overflow: hidden auto; background: var(--bezel); color: var(--on-bezel); font: 400 13px/1.3 var(--sans);
  box-shadow: 5px 12px 12px -7px var(--bezel-cast); scrollbar-color: var(--bezel-3) transparent;
}
html.ui9 .v9-rail-h { display: flex; align-items: center; justify-content: space-between; height: 24px; padding: 0 8px; font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--on-bezel-dim); }
html.ui9 .v9-rail-item {
  display: flex; align-items: center; gap: 9px; width: 100%; height: 29px; padding: 0 8px; border: 0; border-radius: var(--r-key); background: none; cursor: pointer; text-align: left;
  font: 450 13px/1 var(--sans); color: var(--on-bezel-dim); white-space: nowrap; text-decoration: none; transition: background var(--t1), color var(--t1);
}
html.ui9 .v9-rail-item:hover { background: rgba(244,239,228,.06); color: var(--on-bezel); }
html.ui9 .v9-rail-item.on { background: rgba(244,239,228,.095); color: var(--on-bezel); box-shadow: inset 0 1px 0 rgba(244,239,228,.06); }
html.ui9 .v9-rail-foot { position: sticky; bottom: 0; margin-top: auto; margin-inline: -8px; padding: 4px 8px 6px; background: linear-gradient(transparent, var(--bezel) 10px); display: flex; gap: 2px; flex: none; }
/* the Library's real rail joins the L. The rest of its look is 10-library. */
@media (min-width: 861px) {
  html.ui9.page-index .rail { width: var(--rail-w); top: var(--shell-h); height: calc(100vh - var(--shell-h)); background: var(--bezel); color: var(--on-bezel); box-shadow: 5px 12px 12px -7px var(--bezel-cast); }
  /* one L: the rail comes after the nav in the DOM, so at the same z it covers the bar's cast. Its own cast is set 12px down so it cannot bleed up into the bar. Drawers stay at 40+. */
  html.ui9 .v9-rail, html.ui9.page-index .rail { z-index: 39; }
}

/* ---- phone bars --------------------------------------------------------------- */
html.ui9 .dk-thumb { display: none; }

/* ---- 3.9: how the bar gives way. Fixed order. Never the brand mark, Sync or the plate. */
@media (max-width: 1430px) {
  /* the owner's 13-inch screen: the temporary tab's longest names still fit whole */
  html.ui9 .dk-tab { padding-left: 10px; padding-right: 10px; }
  html.ui9 .dk-tab .dk-tick { left: 10px; right: 10px; }
}
@media (max-width: 1400px) {
  html.ui9 .ui-nav .ui-cmd { width: 176px; }
  html.ui9 .ui-nav .ui-cmd span em { display: none; }   /* the whole label is 148px: never cut it mid-word */
}
@media (max-width: 1370px) {
  html.ui9 .ui-nav .ui-cmd { width: 44px; padding: 0; justify-content: center; }
  html.ui9 .ui-nav .ui-cmd :is(span, kbd) { display: none; }
}
@media (max-width: 1240px) {
  html.ui9 .dk-tele .ui-status b { display: none; }
  html.ui9 .ui-nav .ui-status { width: auto; }
}
@media (max-width: 1200px) {
  html.ui9.v9-admin .dk-tab[data-ux-tab="live"]:not(.on) { display: none; }
}
@media (max-width: 1150px) {
  html.ui9 .v9-plate-k .tx { display: none; }
  html.ui9 .v9-plate .v9-plate-k { padding: 0 7px; }
}
@media (max-width: 1000px) {
  html.ui9 .ui-brand .w1 { display: none; }
  html.ui9 .ui-nav .ui-brand { width: 88px; }
  html.ui9 .dk-tele { display: none; }
  html.ui9 .dk-tabs { padding-left: 6px; }
}
/* a railed screen keeps the brand block as wide as its rail, so the paper tab still lands on paper */
@media (min-width: 861px) and (max-width: 1000px) {
  html.ui9:is(.page-index, .page-cost, .page-launch, .page-tiktok, .page-snapchat, .page-smartnews) .ui-nav .ui-brand { width: var(--rail-w); }
  html.ui9:is(.page-index, .page-cost, .page-launch, .page-tiktok, .page-snapchat, .page-smartnews) .dk-tabs { padding-left: 16px; }
}
/* the block above costs 116px, and a temporary tab needs it: Ads Manager waits in All screens. Not in the 3.9 table. */
@media (min-width: 861px) and (max-width: 900px) {
  html.ui9.v9-admin:is(.page-index, .page-cost, .page-launch, .page-tiktok, .page-snapchat, .page-smartnews) .dk-tab[data-ux-tab="adsmanager"]:not(.on) { display: none; }
}
@media (max-width: 860px) {
  html.ui9 .ui-nav::before { left: 0; }
  html.ui9 .ui-nav .ui-brand { width: auto; padding-left: 4px; }
  html.ui9 .ui-brand .w1 { display: inline; }
  html.ui9.ui9-ready .ui-nav .ui-menu { display: flex; flex: none; width: 34px; height: 34px; margin-left: 6px; padding: 11px 10px; border-radius: 8px; background: none; }
  html.ui9 .ui-menu span { background: var(--on-bezel-dim); height: 1.5px; }
  /* the Library has one menu button, and it is the page's own: the rail is off-canvas from #menuBtn */
  html.ui9.ui9-ready.page-index .ui-nav .ui-menu { display: none; }
  html.ui9 .ui-nav .menu-btn { flex: none; width: 34px; height: 34px; margin-left: 6px; border: 0; border-radius: 8px; background: none; color: var(--on-bezel-dim); }
  html.ui9 .ui-nav .menu-btn svg { width: 14px; height: 14px; }
  html.ui9 .dk-tabs, html.ui9 .ui-nav .v9-plate { display: none; }
  html.ui9 .dk-right { margin-left: auto; }
  html.ui9 .ui-nav .ui-cmd { width: 36px; height: 34px; margin: 0; }
  html.ui9 .ui-cmd .v9-caret { font-size: 15px; }
  html.ui9 .dk-sync { width: auto; min-width: 0; padding: 0 7px; }
  html.ui9 .dk-sync .tx { display: none; }
  /* the ink dock moves under the thumb */
  html.ui9 .dk-thumb {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 38; display: flex; height: calc(58px + env(safe-area-inset-bottom));
    padding: 4px 6px env(safe-area-inset-bottom); background: var(--bezel); color: var(--on-bezel-dim);
    border-radius: var(--r-bezel) var(--r-bezel) 0 0; box-shadow: 0 -10px 24px -14px rgba(12,10,6,.5); font-family: var(--sans);
  }
  html.ui9 .dk-thumb > :is(a, button) { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-height: 48px; padding-bottom: 7px; border-radius: 9px; font-size: 10.5px; font-weight: 500; color: inherit; }
  html.ui9 .dk-thumb .v9-i { width: 19px; height: 19px; }
  html.ui9 .dk-thumb .on { color: var(--on-bezel); }
  html.ui9 .dk-thumb .on .v9-i { color: var(--led); }
  html.ui9 .dk-thumb .go { color: var(--on-bezel); }
  html.ui9 .dk-thumb .go .cap { width: 34px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: var(--go); color: var(--go-ink); }
  html.ui9 .dk-thumb .go .v9-i { width: 15px; height: 15px; stroke-width: 2; }
  html.ui9:not(.v9-can-launch) .dk-thumb .go, html.ui9:not(.v9-admin) .dk-thumb [data-ux-role="admin"] { display: none; }
  html.ui9 #v9ThumbGo { width: 220px; transform-origin: bottom center; }
  html.ui9 .toast { bottom: 74px; }
  html.ui9 .ui-pal { padding: 8px; }
  html.ui9.ui-shell .ui-pal .ui-pal-box { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  html.ui9 .v9-pal-ctx, html.ui9 .ui-pal-in kbd { display: none; }
  html.ui9 .v9-pal-x { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 8px; background: rgba(244,239,228,.07); color: var(--on-bezel); }
  html.ui9 .v9-cols { grid-template-columns: 1fr 1fr; }
  html.ui9 .v9-col { padding-left: 2px; padding-right: 2px; border-left: 0; border-top: 1px solid var(--bezel-line); }
  html.ui9 .v9-col:nth-child(-n+2) { border-top: 0; }
  html.ui9 .v9-scr small { display: none; }
  html.ui9 .v9-scr > a { padding-right: 7px; }
  html.ui9 .v9-scr .v9-star { display: none; }
  html.ui9 .ui-pal-foot .v9-hint { display: none; }
}
/* a tablet: three columns, so Claude is not left alone on a third row */
@media (min-width: 600px) and (max-width: 860px) {
  html.ui9 .v9-cols { grid-template-columns: repeat(3, 1fr); }
  html.ui9 .v9-col:nth-child(3) { border-top: 0; }
  html.ui9 .v9-col:is(:nth-child(2), :nth-child(3), :nth-child(5)) { border-left: 1px solid var(--bezel-line); }
}

/* ---- 7.5 reduced motion: no scan, no pulse ------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html.ui9 :is(.ui-nav.busy, .ui-nav.v9-hold) .dk-scan::after { display: none; }
  html.ui9 :is(.ui-nav.busy, .ui-nav.v9-hold) .ui-status i { animation: none; }
  html.ui9 .dk-sync.run .v9-i { animation: none; }
}

/* ===== 03-fixes.css ===== */
/* =====================================================================
   v9 ship-first fixes (DESIGN.md 6.6). The only file not scoped html.ui9:
   it is scoped html.ui-shell, so these reach everyone on day one, whatever
   look they use. Tokens that exist only under html.ui9 carry a literal
   fallback, because here they may be undefined.
   ===================================================================== */

/* Overlays under the nav. The drawer X landed on Classic. Sheets, drawers, scrims and toasts are all 40+. */
html.ui-shell .ui-nav { z-index: 39; }
html.ui-shell.page-snapchat .sheet { z-index: 41; }
html.ui-shell.page-snapchat .scrim { z-index: 40; }

/* Drawer preview 2px tall: 418x2 to 418x261 */
html.ui-shell .drawer-body > * { flex-shrink: 0; }

/* ACTIVE looked like paused, because NewsBreak red is close to danger red. It changes shape, not just colour. */
html.ui-shell:is(.page-launch, .page-tiktok) #btnLaunch.btn-danger,
html.ui-shell.page-smartnews #run.btn-danger {
  height: 52px; color: #ffcf5c; box-shadow: none; border: 5px solid transparent; font-size: 13.5px;
  background: linear-gradient(#16130e, #16130e) padding-box,
              repeating-linear-gradient(-45deg, var(--hazard, #ffb21a) 0 8px, #16130e 8px 16px) border-box !important;
}
html.ui-shell:is(.page-launch, .page-tiktok) #btnLaunch.btn-danger:hover,
html.ui-shell.page-smartnews #run.btn-danger:hover { color: #ffcf5c; border-color: transparent; box-shadow: none; filter: brightness(1.15); }
html.ui-shell:is(.page-launch, .page-tiktok) #btnLaunch.btn-danger::after,
html.ui-shell.page-smartnews #run.btn-danger::after { content: " \B7  spends now"; font-weight: 500; }

/* Selection bar under the header. On a phone it is a fixed dock at the bottom: ui.css 749. */
@media (min-width: 761px) {
  html.ui-shell.page-index .selbar { top: calc(var(--shell-h) + var(--topbar-h, 64px) + 8px); }
}

/* Review under the bar */
html.ui-shell:is(.page-launch, .page-smartnews) .side { top: calc(var(--shell-h) + 72px); }
html.ui-shell.page-snapchat .side { top: calc(var(--shell-h) + 67px); }
/* the restored Launch log wraps SmartNews' bar to two rows under 1100 in the previous look: Review stays clear of it */
@media (max-width: 1100px) { html.ui-shell:not(.ui9).page-smartnews .side { top: calc(var(--shell-h) + 116px); } }

/* Real actions hidden: ui.css:288 hides by href. Back links stay hidden, these four come back. */
html.ui-shell.page-todo a.btn[href="index.html"],
html.ui-shell.page-oneclick a.btn[href="launch.html"],
html.ui-shell.page-states a.btn[href^="score.html"],
html.ui-shell:is(.page-launch, .page-smartnews, .page-tiktok) a.btn[href^="logs.html"],
html.ui-shell.page-index a.btn[href="launch.html"] { display: inline-flex; }

/* Scoreboard sticky header: the card clipped it, and the top ignored the shell.
   A head can stick to the page only if the wrapper stops scrolling, and that is safe only where the whole
   table fits: it is about 1230px wide. Below that the wrapper keeps its sideways scroll and the head stays put,
   because every column being reachable beats a sticky head. */
html.ui-shell.page-score .card { overflow: clip; }
@media (min-width: 1360px) {
  html.ui-shell.page-score .card > div { overflow: visible !important; }
  html.ui-shell.page-score table th { top: calc(var(--shell-h) + 66px); }
  html.ui9.page-score table th { top: calc(var(--shell-h) + var(--bar-h)); }
}
@media (max-width: 1359px) { html.ui-shell.page-score table th { position: static; } }

/* SmartNews had no colour on the Scoreboard */
html.ui-shell .pfk.smartnews { background: #0099eb; }

/* The html grid stopped short of the window on short pages */
html.ui-shell body { min-height: 100vh; }

/* Review landed behind the band */
html.ui-shell.page-index #grid { scroll-margin-top: calc(var(--shell-h) + var(--topbar-h, 64px) + 12px); }

/* the way back into v9 from the previous look: warm ink, not violet. It lives in the nav's flow and never floats:
   a fixed chip covered 1-Click #save, Schedules #pSave and ClickFlare's copy key. The ring lifts it off the ink nav. */
html.ui-shell .v9-newlook {
  display: inline-flex; align-items: center; flex: none; height: 26px; margin-left: 4px; padding: 0 10px; border-radius: 7px; white-space: nowrap;
  background: #16130e; color: #f4efe4; font: 600 11px/1 system-ui, -apple-system, "Segoe UI", sans-serif; text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(244,239,228,.22);
}
html.ui-shell .v9-newlook:hover { color: #f4efe4; box-shadow: inset 0 0 0 1px rgba(244,239,228,.5); }
/* a small phone has no room for it and the brand word: the logo stays */
@media (max-width: 380px) { html.ui-shell .ui-nav:has(> .v9-newlook) .ui-brand span { display: none; } }

/* ===== 10-library.css ===== */
/* =====================================================================
   v9 Library: the wall (DESIGN.md 4.2, 6.8). Layout is all here, keyed to
   the blocking html.ui9 class. 10-library.js only adds chrome. Every rule
   starts html.ui9.page-index.
   ===================================================================== */

html.ui9.page-index { --bar-h: 99px; --art-min: 172px; --room-side: 468px; }
html.ui9.page-index[data-ux-wall="s"] { --art-min: 142px; }
html.ui9.page-index[data-ux-wall="l"] { --art-min: 214px; }

/* the veil covers the app until the user is known. It paints the L, and it waits for the chrome, so the
   old layout never flashes. If ui9.js fails it lifts on its own. */
html.ui9.page-index .bootveil {
  background: linear-gradient(var(--bezel), var(--bezel)) 0 0 / 100% var(--shell-h) no-repeat,
              linear-gradient(var(--bezel), var(--bezel)) 0 0 / var(--rail-w) 100% no-repeat, var(--bg);
}
html.ui9.page-index:not(.ui9-ready) .bootveil { display: block; animation: v9-lib-veil 0s linear 3s forwards; }
@keyframes v9-lib-veil { to { visibility: hidden; } }

/* ---- the frame: the rail is fixed, so the page is one column ------------ */
html.ui9.page-index .app { display: block; min-height: 0; }
html.ui9.page-index .main { display: block; min-width: 0; }
html.ui9.page-index body { padding-left: var(--rail-w); }

/* ---- the rail: ink, one L with the bar ---------------------------------- */
html.ui9.page-index .rail {
  position: fixed; left: 0; bottom: 0; display: flex; flex-direction: column; gap: 0; padding: 2px 8px 0; border: 0;
  overflow: hidden auto; scrollbar-width: none; font: 400 13px/1.3 var(--sans);
}
html.ui9.page-index .rail::-webkit-scrollbar { display: none; }
html.ui9.page-index .rail .brand { display: none; }
html.ui9.page-index .rail .brand + .nav-group .nav-head { display: none; }
html.ui9.page-index .rail .nav-group { flex: none; display: flex; flex-direction: column; gap: 0; margin-bottom: 6px; position: relative; }
html.ui9.page-index .rail .nav-head {
  display: flex; align-items: center; justify-content: space-between; height: 24px; padding: 0 8px; margin: 4px 0 0;
  font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--on-bezel-dim);
}
html.ui9.page-index .rail .nav-head .v9-n { letter-spacing: 0; color: var(--on-bezel-faint); margin-left: auto; }
/* block, so a long campaign name gets its ellipsis: the name is a bare text node */
html.ui9.page-index .rail .nav-item:not(.nav-hidden), html.ui9.page-index #boardList > .nav-item.nav-hidden:nth-child(-n+8):not(.v9-out), html.ui9.page-index #boardList > .nav-item.v9-show {
  position: relative; display: block; width: 100%; height: 29px; flex: none; padding: 0 50px 0 23px; border-radius: var(--r-key); background: none;
  font: 450 13px/29px var(--sans); color: var(--on-bezel-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left;
  transition: background var(--t1), color var(--t1);
}
html.ui9.page-index .rail .nav-item:hover { background: rgba(244,239,228,.06); color: var(--on-bezel); }
html.ui9.page-index .rail .nav-item.active { background: rgba(244,239,228,.095); color: var(--on-bezel); font-weight: 450; box-shadow: inset 0 1px 0 rgba(244,239,228,.06); }
html.ui9.page-index .rail .nav-item .dot { position: absolute; left: 8px; top: 12px; width: 6px; height: 6px; border-radius: 50%; }
html.ui9.page-index .rail .nav-item > svg, html.ui9.page-index .rail .nav-item > img { position: absolute; left: 6px; top: 7px; width: 15px; height: 15px; }
html.ui9.page-index .rail #sourceList .nav-item { padding-left: 28px; }
html.ui9.page-index .rail .nav-item .count {
  position: absolute; right: 8px; top: 0; margin: 0; padding: 0; background: none; border-radius: 0;
  font: 500 11px/29px var(--mono); letter-spacing: -.01em; color: var(--on-bezel-faint); font-variant-numeric: tabular-nums;
}
html.ui9.page-index .rail .nav-item.active .count { background: none; color: var(--on-bezel-dim); }
/* the rename pencil takes the count's place on hover, for those who may rename */
html.ui9.page-index .rail .nav-item .edit { position: absolute; right: 4px; top: 4px; color: var(--on-bezel-dim); }
html.ui9.page-index .rail .nav-item .edit:hover { background: rgba(244,239,228,.12); color: var(--on-bezel); }
html.ui9.page-index .rail .nav-item:hover .edit, html.ui9.page-index .rail .nav-item .edit:focus-visible { display: inline-flex; }
html.ui9.page-index .rail .nav-item:hover:has(.edit) .count { visibility: hidden; }
html.ui9.page-index body.viewer .rail .nav-item:hover .count { visibility: visible; }
html.ui9.page-index .rail .nav-more {
  display: flex; align-items: center; gap: 6px; width: 100%; height: 26px; padding: 0 8px; margin: 0; border-radius: var(--r-key); background: none;
  font: 450 12px/1 var(--sans); color: var(--on-bezel-faint);
}
html.ui9.page-index .rail .nav-more svg { display: none; }
html.ui9.page-index .rail .nav-more:hover { background: rgba(244,239,228,.06); color: var(--on-bezel); }
/* folding: the page keeps 3, the rail shows 8 (7 on a short window). nth-child so the first paint is right. */
@media (max-height: 799px) {
  html.ui9.page-index #boardList > .nav-item.nav-hidden:nth-child(8):not(.v9-show) { display: none; }
}
html.ui9.page-index #boardList > .nav-item.active { background: rgba(244,239,228,.095); color: var(--on-bezel); }
html.ui9.page-index #boardList > .nav-item:hover { background: rgba(244,239,228,.06); color: var(--on-bezel); }
html.ui9.page-index #boardList > .nav-item.v9-out, html.ui9.page-index #boardList > .nav-more.v9-out { display: none; }
/* + New campaign sits at the end of the Campaigns head */
html.ui9.page-index .rail .add-board {
  position: absolute; right: 8px; top: 7px; width: 18px; height: 18px; padding: 0; display: grid; place-items: center; border: 0; border-radius: var(--r-cap);
  background: none; color: var(--on-bezel-dim); font-size: 0; line-height: 0; overflow: hidden;
}
html.ui9.page-index .rail .add-board::before { content: "+"; font: 500 14px/1 var(--mono); }
html.ui9.page-index .rail .add-board:hover { background: rgba(244,239,228,.1); color: var(--on-bezel); border-color: transparent; }
html.ui9.page-index .rail .nav-head .v9-n { margin-right: 22px; }
html.ui9.page-index body.viewer .rail .nav-head .v9-n { margin-right: 0; }
html.ui9.page-index .v9-camp-q {
  display: flex; align-items: center; gap: 7px; height: 28px; margin: 2px 0 4px; padding: 0 8px; border-radius: var(--r-key);
  background: rgba(244,239,228,.04); box-shadow: inset 0 0 0 1px var(--bezel-line); color: var(--on-bezel-faint);
}
html.ui9.page-index .v9-camp-q:focus-within { box-shadow: inset 0 0 0 1px var(--bezel-line-2), 0 0 0 2px var(--led-soft); }
html.ui9.page-index .v9-camp-q .v9-i { width: 13px; height: 13px; }
html.ui9.page-index .v9-camp-q input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; font: 400 12.5px/1 var(--sans); color: var(--on-bezel); }
html.ui9.page-index .v9-camp-q input::placeholder { color: var(--on-bezel-faint); opacity: 1; }
html.ui9.page-index .v9-camp-q input:focus-visible { box-shadow: none !important; }
html.ui9.page-index .v9-camp-none { padding: 4px 8px; font-size: 12px; color: var(--on-bezel-faint); }

/* foot: Tools, Activity, Help, sign out. Sticky, so a long campaign list cannot push them away. */
html.ui9.ui9-ready.page-index .rail .rail-foot {
  position: sticky; bottom: 0; flex: none; margin: auto -8px 0; padding: 12px 8px 7px; display: flex; flex-direction: row; align-items: center; gap: 2px;
  background: linear-gradient(transparent, var(--bezel) 11px); z-index: 2;
}
html.ui9.ui9-ready.page-index .rail-foot .foot-group { display: none; }
html.ui9.ui9-ready.page-index .rail-foot .foot-help { display: flex; gap: 2px; flex: none; }
html.ui9.ui9-ready.page-index .rail-foot .foot-bar { display: flex; gap: 0; padding: 0; border: 0; flex: none; }
html.ui9.ui9-ready.page-index .rail-foot :is(.help-btn, #logoutBtn) {
  position: relative; flex: none; width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border: 0; border-radius: var(--r-key); background: none; color: var(--on-bezel-dim);
}
html.ui9.page-index .rail-foot :is(.help-btn, #logoutBtn):hover { background: rgba(244,239,228,.07); color: var(--on-bezel); }
html.ui9.ui9-ready.page-index .rail-foot #logoutBtn span { display: none; }
html.ui9.page-index .rail-foot #logoutBtn svg { opacity: 1; width: 15px; height: 15px; }
html.ui9.page-index .rail-foot .help-btn svg { width: 15px; height: 15px; }
html.ui9.page-index .rail-foot #helpBtn { font: 500 13px/1 var(--sans); }
html.ui9.page-index .v9-tools-btn {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 8px; border: 0; border-radius: var(--r-key); background: none;
  font: 450 13px/1 var(--sans); color: var(--on-bezel-dim); cursor: pointer;
}
html.ui9.page-index .v9-tools-btn:hover, html.ui9.page-index .v9-tools-btn[aria-expanded="true"] { background: rgba(244,239,228,.07); color: var(--on-bezel); }

/* the well: what you can act on now. It flips to the selection. It never shows an all-time total. */
html.ui9.page-index .rail .v9-well { display: block; width: 100%; flex: none; margin: 2px 0 8px; border: 0; text-align: left; font: inherit; color: var(--on-bezel); transition: box-shadow var(--t1); }
html.ui9.page-index .rail button.v9-well { cursor: pointer; }
html.ui9.page-index .rail button.v9-well:hover, html.ui9.page-index .rail button.v9-well[aria-expanded="true"] { box-shadow: inset 0 1px 3px rgba(0,0,0,.85), 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-index .v9-well-m { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; margin-top: 9px; }
html.ui9.page-index .v9-well-n { font: 500 24px/1 var(--mono); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
html.ui9.page-index .v9-well-st { display: flex; padding-right: 2px; }
html.ui9.page-index .v9-well-st img { width: 28px; height: 36px; object-fit: cover; object-position: 50% 26%; border-radius: 5px; margin-left: -12px; box-shadow: 0 0 0 2px var(--bezel-well); }
html.ui9.page-index .v9-well-st img:first-child { margin-left: 0; }
html.ui9.page-index .v9-well-p { margin-top: 7px; font-size: 11.5px; line-height: 1.35; color: var(--on-bezel-dim); }
html.ui9.page-index .v9-well-g { display: grid; grid-template-columns: 1.15fr .8fr .85fr; gap: 4px; margin-top: 9px; }
html.ui9.page-index .v9-well-g b { display: block; font: 500 14px/1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
html.ui9.page-index .v9-well-g span { display: block; margin-top: 5px; font: 500 10px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--on-bezel-dim); }

/* ---- the command band: one row of tools, one board of statuses ---------- */
html.ui9.page-index .main > .topbar { display: flex; flex-flow: row wrap; align-items: center; gap: 0 7px; padding: 9px var(--gut) 7px; }
html.ui9.page-index :is(.topbar-row, .filter-row) { display: contents; }
html.ui9.page-index .main > .topbar::after { content: ""; order: 10; flex: 0 0 100%; height: 0; }
html.ui9.page-index .topbar-row > :is(.spacer, #selPill, #usClock) { display: none; }
html.ui9.ui9-ready.page-index :is(#tbLaunch, #tbAdmin) { display: none; }
html.ui9.page-index .search.search-lead {
  order: 1; flex: 1 1 190px; min-width: 190px; max-width: none; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 11px; border: 0; border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); color: var(--text-dim); cursor: text; transition: box-shadow var(--t1);
}
html.ui9.page-index .search.search-lead:hover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); }
html.ui9.page-index .search.search-lead:focus-within { border: 0; box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 3px var(--led-soft); }
html.ui9.page-index .search-lead svg:not(.v9-i) { width: 15px; height: 15px; }
html.ui9.page-index .search-lead input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; font: 400 13px/1 var(--sans); color: var(--text); }
html.ui9.page-index .search-lead input:focus-visible { box-shadow: none !important; }
html.ui9.page-index .search-lead input::placeholder { color: var(--text-dim); opacity: .78; }
html.ui9.page-index #search:placeholder-shown { text-overflow: ellipsis; }
html.ui9.page-index #typeFilter { order: 2; flex: none; align-self: center; height: 34px; align-items: stretch; }
html.ui9.page-index #typeFilter > span { margin: 5px 3px !important; }
html.ui9.page-index #typeFilter:empty { min-width: 296px; }
/* the three shapes are pictures here. The real label stays as the name a screen reader gets. */
html.ui9.page-index #typeFilter button:nth-child(n+6) { width: 28px; padding: 0; display: inline-grid; place-items: center; align-content: center; font-size: 0; }
html.ui9.page-index #typeFilter button:nth-child(n+6)::before { content: ""; display: block; border: 1.5px solid currentColor; border-radius: 2px; }
html.ui9.page-index #typeFilter button:nth-child(6)::before { width: 8px; height: 14px; }
html.ui9.page-index #typeFilter button:nth-child(7)::before { width: 14px; height: 8px; }
html.ui9.page-index #typeFilter button:nth-child(8)::before { width: 11px; height: 11px; }
html.ui9.page-index .topbar .btn { min-height: 34px; height: 34px; flex: none; }
html.ui9.page-index #v9SortBtn { display: none; order: 3; }
html.ui9.page-index #v9SortBtn .v9-i:last-child { width: 11px; height: 11px; }
html.ui9.page-index #v9SortBtn .v9-i:first-child { display: none; }
html.ui9.page-index #v9FiltersBtn { order: 4; position: relative; }
html.ui9.page-index #v9FiltersBtn .v9-badge {
  display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 5px; background: var(--primary-bg); color: var(--primary-text);
  font: 500 10.5px/1 var(--mono);
}
html.ui9.page-index #v9FiltersBtn.v9-busy::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hazard); box-shadow: 0 0 0 2px var(--led-soft); animation: v9-lib-pulse 1.1s ease-in-out infinite;
}
@keyframes v9-lib-pulse { 50% { opacity: .35; } }
html.ui9.page-index #selectBtn { order: 5; }
html.ui9.page-index #selectBtn::before {
  content: ""; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
html.ui9.page-index body.selectmode #selectBtn { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
html.ui9.page-index body.selectmode #selectBtn::before { display: none; }
html.ui9.page-index #uploadBtn { order: 6; }
html.ui9.page-index #uploadBtn svg { width: 14px; height: 14px; }
html.ui9.page-index .topbar #v9UpMore { order: 7; margin-left: -6px; width: 26px; padding: 0; border-radius: 0 var(--r-key) var(--r-key) 0; box-shadow: inset 1px 0 0 rgba(128,118,100,.45); }
html.ui9.page-index .topbar #v9UpMore .v9-i { width: 11px; height: 11px; }
html.ui9.ui9-ready.page-index .topbar #uploadBtn { border-radius: var(--r-key) 0 0 var(--r-key); }
html.ui9.page-index body.viewer #v9UpMore { display: none; }
html.ui9.ui9-ready.page-index .filter-row > .datefilter, html.ui9.ui9-ready.page-index .filter-row > #hoverSound, html.ui9.ui9-ready.page-index .topbar-row > #driveBtn, html.ui9.ui9-ready.page-index .topbar-row > .help-btn { display: none; }

/* the status board: twelve joined keys, number over word, each a small level meter */
html.ui9.page-index #statusFilters {
  order: 11; flex: 1 1 0; min-width: 0; display: flex; flex-wrap: nowrap; gap: 0; margin-top: 7px; min-height: 42px; overflow: hidden;
  background: var(--surface); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line);
}
html.ui9.page-index #statusFilters:empty { background: linear-gradient(100deg, var(--surface-2) 30%, var(--bg) 50%, var(--surface-2) 70%) 0 0 / 240% 100%; animation: v9-shimmer 1.6s linear infinite; }
html.ui9.page-index .chip {
  position: relative; flex: 1 1 auto; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 5px 4px; align-content: center; min-width: 0; height: 42px; padding: 0 8px 1px 9px;
  border: 0; border-radius: 0; background: none; text-align: left; white-space: nowrap; overflow: hidden; font: 450 11px/1 var(--sans); letter-spacing: 0; color: var(--text-dim);
  transition: background var(--t1), color var(--t1);
}
html.ui9.page-index #statusFilters .chip:first-child { max-width: 140px; }
html.ui9.page-index #statusFilters .chip:only-child { flex: 0 0 120px; }
html.ui9.page-index .chip + .chip { box-shadow: inset 1px 0 0 var(--hair); }
html.ui9.page-index .chip .count { grid-row: 1; grid-column: 1 / -1; opacity: 1; font: 500 13.5px/1 var(--mono); letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
html.ui9.page-index .chip .count.vsub { display: none; }
html.ui9.page-index .chip .dot { grid-row: 2; grid-column: 1; align-self: center; width: 5px; height: 5px; border-radius: 1.5px; }
html.ui9.page-index .chip::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--p, 0) * 100%); min-width: 3px; background: var(--mc, var(--line-strong)); opacity: .85; }
html.ui9.page-index .chip:hover { background: var(--hover); color: var(--text); border: 0; }
html.ui9.page-index .chip:focus-visible { outline-offset: -3px; }
html.ui9.page-index .chip.active { background: var(--primary-bg); color: var(--primary-text); box-shadow: none; }
html.ui9.page-index .chip.active .count { color: inherit; }
html.ui9.page-index .chip.active + .chip { box-shadow: none; }
html.ui9.page-index .chip.active::after { opacity: 0; }
/* order follows use. Chips carry no status class: their dot says which is which. */
html.ui9.page-index .chip:has(.dot[style*="--winning"]) { order: 1; }
html.ui9.page-index .chip:has(.dot[style*="--live"]) { order: 2; }
html.ui9.page-index .chip:has(.dot[style*="--draft"]) { order: 5; }
/* :has here too, or the Draft rule above outranks it: Not live carries the draft dot */
html.ui9.page-index .chip:has(.dot):is([title*="not currently live"], [title*="not running on"]) { order: 3; }
html.ui9.page-index .chip:has(.dot)[title*="To-do list"] { order: 4; }
html.ui9.page-index .chip:has(.dot[style*="--review"]):not([title*="To-do"]) { order: 6; }
html.ui9.page-index .chip:has(.dot[style*="--approved"]) { order: 7; }
html.ui9.page-index .chip:has(.dot[style*="--rejected"]) { order: 8; }
html.ui9.page-index .chip:has(.dot[style*="--archived"]) { order: 9; }
html.ui9.page-index .chip:has(.dot[style*="--adplexity"]) { order: 10; }
html.ui9.page-index .chip:has(.dot[style*="--crawler"]) { order: 11; }

/* sort: one click, not a menu. Five keys beside the board. */
html.ui9.page-index #sortSeg { order: 12; flex: none; display: flex; align-items: stretch; align-self: stretch; height: auto; margin: 7px 0 0 1px; padding: 3px; border-radius: var(--r-card); }
html.ui9.page-index #sortSeg::before { content: "Sort"; align-self: center; padding: 0 7px 0 8px; font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--text-dim); }
html.ui9.page-index #sortSeg button { min-height: 0; padding: 0 8px; font-size: 12px; }
html.ui9.page-index #sortSeg [data-sort="conv"], html.ui9.page-index #sortSeg [data-sort="status"] { font-size: 0; }
html.ui9.page-index #sortSeg [data-sort="conv"]::before { content: "Conv."; font-size: 12px; }
html.ui9.page-index #sortSeg [data-sort="status"]::before { content: "Status"; font-size: 12px; }

/* ---- the info line, then the wall ---------------------------------------- */
html.ui9.page-index .content {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: 26px auto; column-gap: 16px; align-items: center; padding: 0 var(--gut) 96px;
}
html.ui9.page-index .grid-head { grid-row: 1; grid-column: 1; display: flex; align-items: center; gap: 8px; height: 26px; min-width: 0; margin: 0; white-space: nowrap; }
html.ui9.page-index #gridLabel { margin: 0; font: 600 13px/1 var(--sans) !important; letter-spacing: -.012em; }
html.ui9.page-index #gridLabel .n { font: 500 12px/1 var(--mono); letter-spacing: -.02em; color: var(--text-dim); }
html.ui9.page-index .grid-head .view-chip { flex: 0 1 auto; display: inline-flex; flex-direction: row; align-items: baseline; gap: 6px; max-width: 320px; padding: 0; border-radius: 0; background: none; color: var(--text); }
html.ui9.page-index .grid-head .view-chip b { font: 600 13px/1 var(--sans); letter-spacing: -.012em; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-index .grid-head .view-chip span { display: none; }
/* one heading: the slice says what it is, the page's word goes, its count stays */
html.ui9.page-index .grid-head .view-chip:not([hidden]) + #gridLabel { font-size: 0 !important; color: var(--text-dim); }
html.ui9.page-index .grid-head .view-chip:not([hidden]) + #gridLabel .n { font-size: 12px; }
html.ui9.page-index #stats {
  grid-row: 1; grid-column: 2; display: flex; align-items: baseline; gap: 14px; min-width: 0; margin: 0; overflow: hidden; color: var(--text-dim); font-size: 12px; white-space: nowrap; border: 0; background: none;
}
/* the read failed: the page says so in .content, and nothing else may still look like it is loading */
html.ui9.page-index .main:has(.content > .empty) :is(#statusFilters:empty, #typeFilter:empty) { display: none; }
html.ui9.page-index .content:has(#grid .empty) #stats { visibility: hidden; }
html.ui9.page-index #stats:empty { height: 12px; background: linear-gradient(100deg, var(--surface-2) 30%, var(--bg) 50%, var(--surface-2) 70%) 0 0 / 240% 100%; border-radius: 3px; max-width: 340px; animation: v9-shimmer 1.6s linear infinite; }
html.ui9.page-index #stats .stat {
  order: 3; flex: none; display: inline-flex; flex-direction: row; align-items: baseline; gap: 4px; width: auto; padding: 0; border: 0; border-radius: 4px; background: none; color: inherit; overflow: visible; cursor: default; font: 400 12px/1 var(--sans);
}
html.ui9.page-index #stats .stat::before { display: none; }
html.ui9.page-index #stats .stat-clickable { cursor: pointer; }
html.ui9.page-index #stats [data-stat="spend"] { order: 1; }
html.ui9.page-index #stats [data-stat="conversions"] { order: 2; }
html.ui9.page-index #stats .stat:first-child { order: 4; }
html.ui9.page-index #stats .stat .value { order: 0; margin: 0; font: 500 12.5px/1 var(--mono); letter-spacing: -.025em; color: var(--text); font-variant-numeric: tabular-nums; }
html.ui9.page-index #stats .stat .label { order: 1; font: 400 12px/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text-dim); }
html.ui9.page-index #stats .stat .label::after { content: none; }
html.ui9.page-index #stats .stat .meta { display: none; }
html.ui9.page-index #stats [data-stat="spend"] .label { font-size: 0; }
html.ui9.page-index #stats [data-stat="spend"] .label::before { content: "spent"; font-size: 12px; }
html.ui9.page-index #stats .stat:first-child .label { text-transform: lowercase; }
html.ui9.page-index #stats [data-stat="conversions"] .label { text-transform: lowercase; }
html.ui9.page-index #stats button.stat-clickable:hover .value, html.ui9.page-index #stats .stat.active .value { color: var(--accent-text); }
html.ui9.page-index #stats .stat.active .label { color: var(--accent-text); }
html.ui9.page-index #stats .stat:focus-visible { outline-offset: 2px; }

html.ui9.page-index .v9-vopts { grid-row: 1; grid-column: 3; display: inline-flex; align-items: center; gap: 1px; padding: 1px; border-radius: var(--r-key); }
html.ui9.page-index .v9-vopts button { width: 24px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px; background: none; font: 500 10.5px/1 var(--mono); color: var(--text-dim); cursor: pointer; }
html.ui9.page-index .v9-vopts button:hover { color: var(--text); background: var(--hover); }
html.ui9.page-index .v9-vopts button[aria-pressed="true"] { color: var(--text); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
html.ui9.page-index .v9-vopts .v9-gap { width: 1px; height: 12px; margin: 0 4px; background: var(--line-strong); }
html.ui9.page-index .v9-vopts .v9-i { width: 15px; height: 15px; }

/* the wall: a plain grid, one uniform 4:3, pictures edge to edge. Never masonry: 29s per resize at 1,200 cards. */
html.ui9.page-index #grid {
  grid-row: 2; grid-column: 1 / -1; grid-template-columns: repeat(auto-fill, minmax(var(--art-min), 1fr)); gap: 10px; align-items: start; margin-top: 6px; min-width: 0;
  scroll-margin-top: calc(var(--shell-h) + var(--bar-h) + 12px);
}
/* loading, no JS: the same tiles, shimmering through a mask */
html.ui9.page-index #grid:empty { display: block; min-height: 560px; }
html.ui9.page-index #grid:empty::before {
  content: ""; display: block; height: 560px;
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--bg) 50%, var(--surface-2) 70%) 0 0 / 240% 100%; animation: v9-shimmer 1.6s linear infinite;
  -webkit-mask: linear-gradient(90deg, #000 calc(100% - 10px), transparent 0) 0 0 / calc((100% + 10px) / 6) 100%, linear-gradient(#000 calc(100% - 10px), transparent 0) 0 0 / 100% 190px;
  -webkit-mask-composite: source-in;
  mask: linear-gradient(90deg, #000 calc(100% - 10px), transparent 0) 0 0 / calc((100% + 10px) / 6) 100%, linear-gradient(#000 calc(100% - 10px), transparent 0) 0 0 / 100% 190px;
  mask-composite: intersect;
}
html.ui9.page-index #grid .card {
  position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-card); overflow: clip; background: var(--surface); box-shadow: 0 0 0 1px var(--line);
  text-align: left; cursor: pointer; transform: none; transition: box-shadow var(--t1);
  content-visibility: auto; contain-intrinsic-size: auto 181px; scroll-margin: calc(var(--shell-h) + var(--bar-h) + 8px) 0 16px;
}
html.ui9.page-index #grid .card:hover { box-shadow: 0 0 0 1px var(--line-strong); border: 0; }
html.ui9.page-index #grid .card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-card); }
html.ui9.page-index #grid .card.selected { box-shadow: 0 0 0 2px var(--accent); }
html.ui9.page-index #grid .card.selected:not(:focus-visible) { outline: 0; }
html.ui9.page-index #grid .thumb { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 0; background: var(--mat); overflow: hidden; }
html.ui9.page-index #grid .thumb :is(img, video) { width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; transform: none; transition: none; }
html.ui9.page-index[data-ux-fit="whole"] #grid .thumb :is(img, video) { object-fit: contain; object-position: 50% 50%; }
html.ui9.page-index #grid .card:hover .thumb :is(img, video) { transform: none; }
html.ui9.page-index #grid .thumb .ph b { font-size: 24px; }
/* gated on ready: if ui9.js fails the page's own badges and foot are all the card has */
html.ui9.ui9-ready.page-index #grid .status-pill, html.ui9.ui9-ready.page-index #grid .play-badge { display: none; }
/* a video with no poster: the frame shows if it can be read, and this drawn tile sits behind it if not */
html.ui9.page-index #grid .thumb:not(:has(img, .ph)) {
  isolation: isolate; background-color: var(--mat); background-image: linear-gradient(var(--hair) 1px, transparent 1px), linear-gradient(90deg, var(--hair) 1px, transparent 1px); background-size: 12px 12px; background-position: -1px -1px;
}
html.ui9.page-index #grid .thumb:not(:has(img, .ph))::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: 20px; height: 20px; margin: -10px 0 0 -10px; background: var(--text-faint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* the viewfinder: thin brackets settle inside the picture on the one card you are on.
   Inside, because opening .card took scroll frames from 33ms to 217-250ms. */
html.ui9.page-index #grid .card:hover .thumb::after, html.ui9.page-index #grid .card:focus-visible .thumb::after, html.ui9.page-index #grid .card.selected .thumb::after {
  content: ""; position: absolute; inset: 6px; pointer-events: none; --c: #fffaf0; --l: 14px; --w: 1.5px;
  background:
    linear-gradient(var(--c),var(--c)) 0 0/var(--l) var(--w), linear-gradient(var(--c),var(--c)) 0 0/var(--w) var(--l),
    linear-gradient(var(--c),var(--c)) 100% 0/var(--l) var(--w), linear-gradient(var(--c),var(--c)) 100% 0/var(--w) var(--l),
    linear-gradient(var(--c),var(--c)) 0 100%/var(--l) var(--w), linear-gradient(var(--c),var(--c)) 0 100%/var(--w) var(--l),
    linear-gradient(var(--c),var(--c)) 100% 100%/var(--l) var(--w), linear-gradient(var(--c),var(--c)) 100% 100%/var(--w) var(--l);
  background-repeat: no-repeat; animation: v9-lib-lock var(--t2) var(--ease);
}
html.ui9.page-index #grid .card:hover .thumb::after, html.ui9.page-index #grid .card:focus-visible .thumb::after { filter: drop-shadow(0 0 1.5px rgba(10,8,5,.95)); }
html.ui9.page-index #grid .card.selected .thumb::after { --c: var(--accent); }
@keyframes v9-lib-lock { from { opacity: 0; transform: scale(1.04); } }
html.ui9.page-index #grid .vf {
  position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; justify-content: center; padding: 4px 6px; border-radius: 5px; opacity: 0; pointer-events: none;
  background: rgba(16,13,9,.8); color: var(--on-bezel); font: 500 10px/1 var(--mono); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; transition: opacity var(--t1);
}
html.ui9.page-index #grid .card:hover .vf, html.ui9.page-index #grid .card:focus-visible .vf { opacity: 1; }
html.ui9.page-index.ui9-scoped #grid .vf { display: none; }

/* bare art: only VIDEO and the variation count sit on the picture. Winning is one orange sticker. */
html.ui9.ui9-ready.page-index #grid .type-badge { display: none; }
html.ui9.ui9-ready.page-index #grid .card:is(.is-video, .is-gif) .type-badge {
  position: absolute; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 5px; border-radius: 5px; background: rgba(16,13,9,.72); color: var(--on-bezel);
  font: 500 10px/1 var(--mono); letter-spacing: .03em;
}
html.ui9.page-index #grid .type-badge .v9-i { width: 10px; height: 10px; fill: currentColor; }
html.ui9.page-index #grid .card:hover .type-badge, html.ui9.page-index body.selectmode #grid .card .type-badge, html.ui9.page-index #grid .card.selected .type-badge { left: 30px; }
html.ui9.page-index #grid .ver-count {
  position: absolute; top: 6px; right: 6px; left: auto; bottom: auto; display: inline-flex; align-items: center; min-width: 0; height: 18px; padding: 0 5px; border-radius: 5px; background: rgba(16,13,9,.72); color: var(--on-bezel);
  font: 500 10px/1 var(--mono); letter-spacing: .03em;
}
html.ui9.page-index #grid .ver-count.has-live { background: rgba(16,13,9,.72); }
html.ui9.page-index #grid .ver-count.has-live::before { content: ""; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%; background: var(--lamp-ok); }
html.ui9.page-index #grid .win-badge {
  position: absolute; top: 7px; right: 7px; left: auto; width: 13px; height: 13px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; font-size: 0; line-height: 0;
  background: var(--go); box-shadow: 0 0 0 2px rgba(255,250,240,.92), 0 1px 4px rgba(90,30,0,.5);
}
html.ui9.page-index #grid .card.v9-win .ver-count { right: 26px; }
html.ui9.page-index #grid .todo-badge {
  position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: 5px; background: rgba(16,13,9,.72); color: var(--hazard);
  font: 500 10px/1 var(--mono); letter-spacing: .03em;
}
html.ui9.page-index #grid .card:hover .todo-badge, html.ui9.page-index #grid .card:focus-visible .todo-badge { opacity: 0; }
html.ui9.page-index #grid .qlgo {
  right: 6px; bottom: 26px; width: 24px; height: 24px; border-radius: 6px; background: rgba(16,13,9,.72); color: var(--on-bezel); box-shadow: none; font-size: 0; transform: none; transition: opacity var(--t1), background var(--t1);
}
html.ui9.page-index #grid .qlgo .v9-i { width: 13px; height: 13px; }
html.ui9.page-index #grid .card:hover .qlgo, html.ui9.page-index #grid .card:focus-visible .qlgo, html.ui9.page-index #grid .qlgo:focus-visible { opacity: 1; }
html.ui9.page-index #grid .qlgo:hover { background: var(--go); color: var(--go-ink); }
@media (hover: none) { html.ui9.page-index body:not(.selectmode) #grid .card:not(.selected):hover .select-check { display: none; } }
html.ui9.page-index #grid .select-check {
  top: 6px; left: 6px; z-index: 3; width: 20px; height: 20px; border: 0; border-radius: 5px; background: rgba(16,13,9,.55); box-shadow: inset 0 0 0 1.5px var(--on-bezel);
}
html.ui9.page-index #grid .card:hover .select-check, html.ui9.page-index body.selectmode #grid .card .select-check, html.ui9.page-index #grid .card.selected .select-check { display: grid; }
html.ui9.page-index #grid .card.selected .select-check { background: var(--accent); border: 0; box-shadow: 0 0 0 1.5px var(--surface); }
html.ui9.page-index #grid .sel-order { top: 6px; left: 6px; z-index: 4; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; background: var(--accent); color: #fff; font: 600 10.5px/20px var(--mono); justify-content: center; }
html.ui9.page-index #grid .card.selected .sel-order.is-main { padding: 0 6px; background: var(--accent); }
html.ui9.page-index #grid .card.selected:has(.sel-order.is-main) .select-check { box-shadow: none; }
@media (hover: none) { html.ui9.page-index #grid .card.selected .sel-order { height: 26px; line-height: 26px; } }
html.ui9.page-index body.selectmode #grid .card.selected .type-badge { left: 56px; }

/* caption: two lines. Status dot, name, platform. Then the figures, at rest. */
html.ui9.page-index #grid .card-body { padding: 5px 8px 6px; }
html.ui9.page-index #grid .card-name { display: flex; align-items: center; gap: 6px; min-width: 0; height: 16px; font: 500 12.5px/16px var(--sans) !important; letter-spacing: -.008em; color: var(--text); }
html.ui9.page-index #grid .card-name .v9-nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-index #grid .card-name .sd { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--draft)); }
html.ui9.page-index #grid .card-name .plats { flex: none; display: flex; gap: 2px; }
html.ui9.page-index #grid .card-name .plats > :nth-child(n+3) { display: none; }
html.ui9.page-index #grid .card-name .plat { width: 14px; height: 14px; border-radius: 3.5px; font-size: 0; }
html.ui9.page-index #grid .card-name .plat-logo :is(svg, img) { width: 14px; height: 14px; display: block; }
html.ui9.ui9-ready.page-index #grid :is(.card-meta, .card-tags) { display: none; }
html.ui9.ui9-ready.page-index #grid .card-foot { display: none; }
/* wraps inside a one-line box: a figure that cannot fit drops out whole. A number cut in half would read as a different number. */
html.ui9.page-index #grid .v9-fig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 9px; height: 15px; margin-top: 1px; font-size: 10.5px; line-height: 15px; color: var(--text-dim); white-space: nowrap; overflow: hidden; }
html.ui9.page-index #grid .v9-fig b { font: 500 11px/15px var(--mono); letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
html.ui9.page-index #grid .v9-fig .lead { margin-right: auto; }
html.ui9.page-index #grid .v9-fig .v9-w { font: 450 10.5px/15px var(--sans); }
html.ui9.page-index #grid .v9-fig .v9-v { font: 500 10.5px/15px var(--mono); letter-spacing: -.02em; color: var(--text-faint); }
html.ui9.page-index[data-ux-wall="s"] #grid .v9-fig { gap: 6px; }
html.ui9.page-index[data-ux-wall="s"] #grid .v9-fig .v9-cpa { display: none; }
/* honesty: with a Traffic source or Converted-in-N-days on, the page's numbers are per source and the card's are
   lifetime. The card's go, and the page's own line takes their place. */
html.ui9.ui9-ready.page-index.ui9-scoped #grid .v9-fig { display: none; }
/* the same caption language as the wall: the number, then a quiet word. The status word stays a word. */
html.ui9.ui9-ready.page-index.ui9-scoped #grid .card-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; height: 15px; margin: 1px 0 0; padding: 0; border: 0; font-size: 10.5px; line-height: 15px; color: var(--text-dim); }
html.ui9.page-index.ui9-scoped #grid .ctr-mini { display: inline-flex; align-items: baseline; gap: 3px; font: 500 11px/15px var(--mono); letter-spacing: -.03em; color: var(--text); white-space: nowrap; }
html.ui9.page-index.ui9-scoped #grid .ctr-mini .k { order: 1; font: 400 10.5px/15px var(--sans); letter-spacing: 0; text-transform: lowercase; color: var(--text-dim); }
html.ui9.page-index.ui9-scoped #grid .ctr-mini.v9-word .k { font: 400 11px/15px var(--sans); text-transform: none; }
html.ui9.page-index.ui9-scoped #grid .ver { font: 500 10.5px/15px var(--mono); color: var(--text-faint); white-space: nowrap; overflow: hidden; }

html.ui9.page-index .grid-sentinel { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 0 4px !important; font-size: 12px !important; color: var(--text-dim) !important; }
html.ui9.page-index .grid-sentinel::before {
  content: ""; width: 92px; height: 8px; transform: skewX(-18deg); background: linear-gradient(90deg, var(--accent) var(--p, 0%), var(--gauge-track) 0);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 5px); mask: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 5px);
}
/* nothing found: a drawn plate, so the void reads as an answer */
html.ui9.page-index #grid .empty {
  max-width: 460px; margin: 44px auto 0; padding: 40px 24px 36px; text-align: center; color: var(--text-dim); font-size: 13px; border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--line);
  background-color: var(--surface); background-image: linear-gradient(var(--hair) 1px, transparent 1px), linear-gradient(90deg, var(--hair) 1px, transparent 1px); background-size: 14px 14px; background-position: -1px -1px;
}
html.ui9.page-index #grid .empty svg { width: 28px; height: 28px; margin-bottom: 10px; opacity: .55; }
html.ui9.page-index #grid .empty h3 { margin: 0 0 4px; font: 600 14px/1.3 var(--sans); color: var(--text); }

/* ---- the hover card: same timing, warm ----------------------------------- */
html.ui9.page-index #cdHoverCard { background: var(--bezel); border-radius: var(--r-card); box-shadow: 0 0 0 1px rgba(244,239,228,.1), 0 26px 70px rgba(0,0,0,.55); }
html.ui9.page-index #cdHoverCard .cdh-media { background: var(--bezel-well); }
html.ui9.page-index #cdHoverCard .cdh-bar { font: 500 12.5px/1.35 var(--sans); color: var(--on-bezel); }
html.ui9.page-index #cdHoverCard .cdh-sub { font: 500 10.5px/1 var(--mono); color: var(--on-bezel-dim); }
html.ui9.page-index #cdHoverCard .cdh-fill { background: var(--led); }
html.ui9.page-index #cdHoverCard .cdh-act { font-size: 0; padding: 0 9px; height: 24px; display: inline-flex; align-items: center; }
html.ui9.page-index #cdHoverCard .cdh-act::before { content: "1-click"; font: 600 11.5px/1 var(--sans); }

/* ---- paper popovers: Filters, Upload ------------------------------------- */
html.ui9.page-index .v9-pop.v9-paper { padding: 10px; background: var(--surface); color: var(--text); border-radius: 11px; box-shadow: 0 0 0 1px var(--line-strong), var(--e2); }
html.ui9.page-index .v9-pop.v9-paper .v9-hud { display: block; padding: 3px 4px 8px; color: var(--text-dim); }
html.ui9.page-index .v9-pop.v9-paper :is(input, select):focus-visible { outline: 0; }
html.ui9.page-index .v9-flt-row { display: flex; align-items: center; gap: 8px; padding: 3px 4px; font-size: 12.5px; color: var(--text-dim); }
html.ui9.page-index .v9-flt-row > .v9-flt-l { flex: 0 0 70px; }
html.ui9.page-index .v9-pop .datefilter { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--text-dim); font-size: 12.5px; flex-wrap: wrap; }
html.ui9.page-index .v9-pop .datefilter.on { background: none; border: 0; color: var(--text); }
html.ui9.page-index .v9-pop .datefilter :is(input, select) {
  height: 30px; min-width: 0; padding: 0 8px; border: 0; border-radius: var(--r-key); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font: 400 12.5px/1 var(--sans);
}
html.ui9.page-index .v9-pop #fltDate { flex: 1; }
html.ui9.page-index .v9-pop #fltLaunched { width: 52px; text-align: center; -moz-appearance: textfield; }
html.ui9.page-index .v9-pop #fltRecentKind { min-width: 124px; width: 124px; }
/* the machined select, the same as Campaign in the Room */
html.ui9.page-index :is(.v9-pop .datefilter, #usersModal) select {
  appearance: none; -webkit-appearance: none; padding-left: 10px; padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23978d7b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 12px;
}
html.ui9.page-index .v9-pop .launchfilter .lf-l { font-weight: 400; font-size: 12.5px; color: var(--text-dim); }
html.ui9.page-index .v9-pop .launchfilter.on .lf-l { color: var(--text); }
html.ui9.page-index .v9-pop .datefilter button { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--text-dim); font-size: 15px; line-height: 1; cursor: pointer; }
html.ui9.page-index .v9-pop .datefilter button:hover { background: var(--hover); color: var(--text); }
html.ui9.page-index .v9-pop .lf-busy { flex: 1 0 100%; font: 400 11.5px/1.35 var(--sans); color: var(--text-dim); white-space: normal; }
html.ui9.page-index .v9-pop .lf-busy a { color: var(--accent-text); }
html.ui9.page-index .v9-flt-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0 0; }
html.ui9.page-index .v9-flt-foot .btn { min-height: 27px; height: 27px; }
html.ui9.page-index #hoverSound { font-size: 0; gap: 0; margin-left: 0; padding-left: 4px; }
html.ui9.page-index #hoverSound::after { content: attr(data-ux-label); font: 500 12px/1 var(--sans); }
html.ui9.page-index .v9-pop #driveBtn { width: 100%; justify-content: flex-start; min-height: 34px; height: 34px; color: var(--text); }
html.ui9.page-index .v9-pop #driveBtn svg { width: 15px; height: 15px; }

/* ---- Tools: the rail's long list, in one ink popover ---------------------- */
html.ui9.page-index .v9-tools { display: block; max-height: calc(100vh - 110px); overflow: auto; scrollbar-width: none; }
html.ui9.page-index .v9-tool-g:not(:has(button:not([style*="none"]))) { display: none; }
html.ui9.page-index .v9-tools .theme-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px; min-height: 29px; padding: 0 10px; border: 0; border-radius: var(--r-key); background: none; color: var(--on-bezel); font: 450 13px/1.2 var(--sans); text-align: left; filter: none; cursor: pointer;
}
html.ui9.page-index .v9-tools .theme-toggle svg { width: 15px; height: 15px; opacity: .7; }
html.ui9.page-index .v9-tools .theme-toggle:hover { background: rgba(244,239,228,.075); color: var(--on-bezel); }

/* ---- Ready to launch: the queue as a panel, so it can never push the wall --- */
html.ui9.ui9-ready.page-index #launchQueue:not(.show) { display: none; }
html.ui9.page-index #launchQueue { grid-row: 3; grid-column: 1 / -1; }
html.ui9.page-index #launchQueue.v9-pop {
  left: calc(var(--rail-w) + 4px); top: calc(var(--shell-h) + 4px); width: 440px; max-width: calc(100vw - 24px); max-height: calc(100vh - var(--shell-h) - 20px); overflow: auto; padding: 14px 12px 0;
  border-radius: var(--r-panel); background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-lg); transform-origin: top left;
}
html.ui9.page-index #launchQueue.v9-pop.show { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 9px; align-items: baseline; }
html.ui9.page-index #launchQueue::before { content: attr(data-ux-n); grid-row: 1; grid-column: 1; padding-left: 4px; font: 500 22px/1 var(--mono); letter-spacing: -.04em; }
html.ui9.page-index #launchQueue::after { content: "Ready to launch"; grid-row: 1; grid-column: 2; font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--text-dim); }
html.ui9.page-index #launchQueue > div {
  grid-row: 2; grid-column: 1 / -1; display: flex; flex-direction: column; min-width: 0; margin: 7px 0 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important;
  font-size: 12.5px !important; line-height: 1.45; color: var(--text-dim) !important;
}
html.ui9.page-index #launchQueue > div > div:first-child { display: contents !important; }
html.ui9.page-index #launchQueue > div > div:first-child > span:empty, html.ui9.page-index #launchQueue #queueToggle { display: none; }
html.ui9.page-index #launchQueue > div > div:first-child > span { margin: 0 4px 8px; color: var(--text-dim) !important; }
html.ui9.page-index #launchQueue > div > div:first-child > span::first-letter { text-transform: uppercase; }
html.ui9.page-index #queueRows, html.ui9.page-index #queueRows[hidden] { display: block !important; order: 2; }
html.ui9.page-index #queueRows > div:first-child { margin: 0 0 6px !important; gap: 3px !important; }
html.ui9.page-index #queueRows > div:first-child > span { gap: 3px !important; }
html.ui9.page-index #launchQueue .btn.btn-sm { min-height: 24px; padding: 0 6px !important; border: 0; border-radius: 5px; font: 500 11.5px/1 var(--sans) !important; }
html.ui9.page-index #launchQueue [data-qsrc].btn-ghost, html.ui9.page-index #launchQueue #queueViewAll { background: var(--surface-2); color: var(--text-dim); }
/* up on the panel's top line, so it costs the list no row */
html.ui9.page-index #launchQueue #queueViewAll { position: absolute; right: 12px; top: 11px; background: none; }
html.ui9.page-index #launchQueue #queueViewAll:hover { background: var(--hover); color: var(--text); }
/* a row at rest is a name, one proof line and a chevron. The keys come up on the row you are on. */
html.ui9.page-index #launchQueue [data-qrow] {
  position: relative; display: grid !important; grid-template-columns: 40px minmax(0, 1fr) auto auto auto; grid-template-rows: auto auto; gap: 0 8px !important; align-items: center; min-height: 44px; padding: 2px 26px 2px 4px !important; border: 0 !important; border-radius: var(--radius-sm);
}
html.ui9.page-index #launchQueue [data-qrow]::after {
  content: ""; position: absolute; right: 8px; top: calc(50% - 6px); width: 12px; height: 12px; background: var(--text-faint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4.5 3l3 3-3 3' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4.5 3l3 3-3 3' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
html.ui9.page-index #launchQueue [data-qrow]:hover { background: var(--hover); }
html.ui9.page-index #launchQueue [data-qrow] > img, html.ui9.page-index #launchQueue [data-qrow] > span:first-child { grid-row: 1 / 3; grid-column: 1; width: 40px !important; height: 40px !important; object-fit: cover; object-position: 50% 26%; border-radius: 6px !important; }
html.ui9.page-index #launchQueue [data-qrow] > span:nth-of-type(1):not(:first-child), html.ui9.page-index #launchQueue [data-qrow] > img + span { grid-row: 1; grid-column: 2; align-self: end; max-width: none !important; font-size: 13px; font-weight: 500 !important; line-height: 1.25; color: var(--text); }
html.ui9.page-index #launchQueue [data-qrow] > img + span + span { grid-row: 2; grid-column: 2 / -1; align-self: start; min-width: 0; font-size: 11.5px; line-height: 1.3; color: var(--text-dim) !important; }
html.ui9.page-index #launchQueue [data-qrow] .btn, html.ui9.page-index #launchQueue [data-qrow] .btn.btn-primary {
  grid-row: 1; align-self: center; min-width: 0; max-width: 0; min-height: 23px; padding: 0 !important; overflow: hidden; opacity: 0; font-size: 11.5px !important; background: none; color: var(--text-dim); box-shadow: none; filter: none; white-space: nowrap;
}
html.ui9.page-index #launchQueue [data-qrow] .btn:hover { background: var(--surface-2); color: var(--text); }
html.ui9.page-index #launchQueue [data-qrow]:is(:hover, :focus-within) { padding-right: 4px !important; }
html.ui9.page-index #launchQueue [data-qrow]:is(:hover, :focus-within)::after { opacity: 0; }
html.ui9.page-index #launchQueue [data-qrow]:is(:hover, :focus-within) .btn { max-width: 110px; padding: 0 7px !important; opacity: 1; }
html.ui9.page-index #launchQueue [data-qrow]:is(:hover, :focus-within) [data-qx] { width: 24px; padding: 0 !important; }
html.ui9.page-index #launchQueue #queueMore { display: inline-block; margin: 6px 4px 0; font-size: 12px; color: var(--text-dim); }
html.ui9.page-index #launchQueue #queueMore:hover { color: var(--text); }
/* the panel's main action: a mark, the words, the count at the right edge */
html.ui9.page-index #launchQueue [data-qnet] {
  order: 3; position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 9px; width: 100%; height: 44px; min-height: 44px !important; margin: 0; padding: 0 8px !important; border-radius: 0; background: var(--surface); color: var(--text); font: 500 13px/1 var(--sans) !important; flex: none;
}
html.ui9.page-index #launchQueue [data-qnet] > span { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-index #launchQueue [data-qnet] > b { font: 500 12px/1 var(--mono); letter-spacing: -.02em; color: var(--text-dim); font-variant-numeric: tabular-nums; }
html.ui9.page-index #launchQueue [data-qnet] .v9-lg { flex: none; width: 18px; height: 18px; }
html.ui9.page-index #launchQueue [data-qnet]:hover { background: linear-gradient(var(--hover), var(--hover)), var(--surface); }
/* both stay in reach however long the list is */
html.ui9.page-index #launchQueue [data-qnet]:first-of-type { margin-top: 6px; box-shadow: 0 -1px 0 var(--hair); }
html.ui9.page-index #launchQueue [data-qnet]:first-of-type:not(:last-of-type) { bottom: 44px; }
html.ui9.page-index .v9-q-x { display: none; }
@media (hover: none) and (min-width: 861px) {
  html.ui9.page-index #launchQueue [data-qrow] { padding-right: 4px !important; }
  html.ui9.page-index #launchQueue [data-qrow]::after { display: none; }
  html.ui9.page-index #launchQueue [data-qrow] .btn, html.ui9.page-index #launchQueue [data-qrow] .btn.btn-primary { max-width: 110px; padding: 0 7px !important; opacity: 1; }
  html.ui9.page-index #launchQueue [data-qrow] [data-qx] { width: 24px; padding: 0 !important; }
}

/* ---- the selection dock: floats on the paper, carries the same plate ------ */
html.ui9.page-index .selbar {
  position: fixed; z-index: 90; top: auto; bottom: 16px; left: calc(var(--rail-w) + (100vw - var(--rail-w)) / 2); transform: translateX(-50%); flex-wrap: nowrap; gap: 6px; width: max-content; height: 56px; margin: 0; padding: 0 8px 0 9px; max-width: calc(100vw - var(--rail-w) - 28px);
  border: 0; border-radius: var(--r-panel); background: var(--bezel); color: var(--on-bezel); box-shadow: 0 0 0 1px var(--bezel-line-2), var(--shadow-lg); white-space: nowrap;
  animation: v9-lib-rise var(--t3) var(--ease);
}
@keyframes v9-lib-rise { from { opacity: 0; transform: translate(-50%, 16px); } }
html.ui9.page-index:not(.ui9-ready) .selbar { height: auto; padding: 6px 8px; flex-wrap: wrap; }
html.ui9.page-index .selbar .spacer { display: none; }
html.ui9.page-index .v9-sd-th { order: 1; display: flex; flex: none; }
html.ui9.page-index .v9-sd-th:empty { display: none; }
html.ui9.page-index .v9-sd-th img { width: 30px; height: 38px; max-width: none; flex: none; object-fit: cover; object-position: 50% 26%; border-radius: 5px; box-shadow: 0 0 0 2px var(--bezel); }
html.ui9.page-index .v9-sd-th img + img { margin-left: -14px; }
html.ui9.page-index .v9-sd-n { order: 2; flex: none; padding: 0 8px 0 7px; line-height: 1.2; }
html.ui9.page-index .selbar .v9-sd-n #selCount { display: block; font: 600 13px/1.2 var(--sans); color: var(--on-bezel); }
html.ui9.page-index .v9-sd-n small { display: block; font: 500 10.5px/1.3 var(--mono); color: var(--on-bezel-dim); letter-spacing: -.01em; }
html.ui9.page-index .v9-sd-n small:empty { display: none; }
html.ui9.page-index .selbar #revChip { order: 3; max-width: 190px; overflow: hidden; text-overflow: ellipsis; color: var(--hazard); font-size: 12px; min-height: 30px; }
html.ui9.page-index .v9-sd-sep { flex: none; width: 1px; height: 26px; margin: 0 3px; background: var(--bezel-line-2); }
html.ui9.page-index .v9-sd-sep.a { order: 4; }
html.ui9.page-index .v9-sd-sep.b { order: 7; }
html.ui9.page-index .selbar .v9-plate-slot { order: 5; display: contents; }
html.ui9.page-index .selbar .v9-plate { order: 5; }
html.ui9.page-index:not(.v9-can-launch) .v9-sd-sep.a { display: none; }
html.ui9.page-index .selbar :is(.btn, .selmore > .btn) {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; min-height: 36px; padding: 0 9px; border: 0; border-radius: var(--radius-sm); background: none; box-shadow: none; font: 500 12.5px/1 var(--sans); color: var(--on-bezel-dim);
}
html.ui9.page-index .selbar :is(.btn, .selmore > .btn):hover { background: rgba(244,239,228,.08); color: var(--on-bezel); filter: none; }
html.ui9.page-index .selbar #selQuick { order: 6; font-size: 0; gap: 6px; }
html.ui9.page-index .selbar #selQuick::before {
  content: ""; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M13 2L4.5 12.5h6L11 22l8.5-10.5h-6L13 2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M13 2L4.5 12.5h6L11 22l8.5-10.5h-6L13 2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
html.ui9.page-index .selbar #selQuick::after { content: "1-click"; font: 500 12.5px/1 var(--sans); }
html.ui9.page-index .selbar .selmore { order: 10; position: relative; flex: none; }
/* nothing ticked: the keys stay real, they just rest. Orange means go. */
html.ui9.page-index .selbar.v9-none .v9-plate { opacity: .45; }
html.ui9.page-index .selbar.v9-none :is(#selQuick, .selmore[data-for]) { opacity: .5; }
html.ui9.page-index .selbar .selmore[data-for="selBoard"] { order: 8; }
html.ui9.page-index .selbar .selmore[data-for="selStatus"] { order: 9; }
html.ui9.page-index .selbar .selmore[data-for] > .btn { font-size: 0; gap: 0; }
html.ui9.page-index .selbar .selmore[data-for] > .btn::before { font: 500 12.5px/1 var(--sans); }
html.ui9.page-index .selbar .selmore[data-for="selBoard"] > .btn::before { content: "Move"; }
html.ui9.page-index .selbar .selmore[data-for="selStatus"] > .btn::before { content: "Status"; }
html.ui9.page-index .selbar .selmore .caret { display: none; }
html.ui9.page-index .selbar #selClear { order: 11; }
html.ui9.page-index body.viewer #selMoreBtn { display: inline-flex !important; }
html.ui9.page-index .selbar .selmore-menu {
  position: absolute; top: auto; bottom: calc(100% + 12px); left: auto; right: 0; z-index: 2; min-width: 216px; max-height: min(460px, calc(100vh - 130px)); overflow: auto; flex-direction: column; gap: 1px; padding: 6px; border: 0; border-radius: var(--r-ticket);
  background: var(--bezel-2); color: var(--on-bezel); box-shadow: 0 0 0 1px var(--bezel-line-2), var(--shadow-lg);
}
html.ui9.page-index .selbar .selmore-menu > :is(button, select, .btn) {
  display: flex; width: 100%; align-items: center; justify-content: flex-start; min-height: 32px; height: 32px; padding: 0 10px; border: 0; border-radius: var(--r-key); background: none; box-shadow: none; color: var(--on-bezel); font: 450 13px/1.2 var(--sans); text-align: left; cursor: pointer;
}
html.ui9.page-index .selbar .selmore-menu > [style*="display: none"] { display: none; }
html.ui9.page-index .selbar .selmore-menu > :is(button, .btn):hover { background: rgba(244,239,228,.075); color: var(--on-bezel); }
html.ui9.page-index .selbar .selmore-menu select { appearance: none; -webkit-appearance: none; }
html.ui9.page-index .selbar .selmore-menu select option { color: var(--bezel); background: #fff; }
html.ui9.page-index .selbar .selmore-menu .is-placeholder { color: var(--on-bezel-faint); pointer-events: none; }
html.ui9.page-index .selbar .selmore-menu .selmore-head { padding: 7px 10px 4px; color: var(--on-bezel-dim); font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; }
html.ui9.page-index .selbar .selmore-menu #selDelete { color: color-mix(in srgb, var(--rejected) 45%, var(--on-bezel)); background: none; box-shadow: none; }
html.ui9.page-index .selbar .selmore-menu #selAi { font-size: 0; }
html.ui9.page-index .selbar .selmore-menu #selAi::before { content: "AI variations"; font: 450 13px/1.2 var(--sans); }
html.ui9.page-index .selbar .selmore-menu #selDelete:hover { background: var(--rejected); color: #fff; }
html.ui9.page-index .selbar .selmore-menu .v9-sd-menu-sep { min-height: 1px; height: 1px; margin: 4px; background: var(--bezel-line); }
html.ui9.page-index body:not(.is-admin):not(.can-delete) .selbar .v9-sd-menu-sep.del, html.ui9.page-index body.viewer .selbar .v9-sd-menu-sep.del { display: none; }
html.ui9.page-index .selbar .selmore-menu button.btn-primary#selOnly { color: var(--hazard); }
/* a toast must not hide under the dock */
html.ui9.page-index body.selectmode .toast { bottom: 84px; }
html.ui9.page-index .toast { background: var(--bezel); color: var(--on-bezel); font: 500 13px/1.3 var(--sans); box-shadow: 0 0 0 1px var(--bezel-line-2), var(--shadow-lg); border-radius: var(--r-ticket); }

/* ---- the Viewing Room: the whole ad on an ink wall ------------------------- */
html.ui9.page-index #scrim { background: rgba(12,10,6,.46); }
@media (min-width: 861px) {
  html.ui9.page-index .drawer {
    top: 8px; right: 8px; bottom: 8px; height: auto; width: min(1040px, calc(100vw - 16px)); max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) var(--room-side); grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; outline: 0;
    border-radius: var(--r-panel); background: linear-gradient(90deg, var(--bezel-well) calc(100% - var(--room-side)), var(--surface) 0); box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-lg);
    transform: translateX(14px); opacity: 0; visibility: hidden; transition: transform var(--t3) var(--ease), opacity var(--t2), visibility 0s linear var(--t3);
  }
  html.ui9.page-index .drawer.show { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  /* .d-preview sits inside the scrolling .drawer-body, but its containing block is the drawer, so the picture stays on the wall */
  html.ui9.page-index .drawer .d-preview {
    position: absolute; left: 0; top: 0; bottom: 0; width: calc(100% - var(--room-side)); aspect-ratio: auto; display: grid; place-items: center; padding: 22px 22px 46px; border: 0; border-radius: 0; overflow: hidden;
    color: var(--on-bezel); background: radial-gradient(70% 56% at 50% 14%, color-mix(in srgb, var(--led) 17%, var(--bezel-well)), transparent 74%), var(--bezel-well);
  }
  html.ui9.page-index .drawer .drawer-head { position: absolute; right: 10px; top: 10px; z-index: 3; padding: 0; border: 0; background: none; display: block; }
  html.ui9.page-index .drawer .drawer-body { grid-row: 1; grid-column: 2; min-height: 0; overflow: auto; }
  html.ui9.page-index .drawer .drawer-foot { grid-row: 2; grid-column: 2; }
  html.ui9.page-index .drawer > div:not(.drawer-head, .drawer-body, .drawer-foot, .v9-room-nav, .v9-room-size) { grid-column: 2; grid-row: 1; }
}
html.ui9.page-index .drawer .d-preview { grid-template-rows: minmax(0, 1fr); }
html.ui9.page-index .drawer .d-preview.v9-wide { grid-template-rows: none; }
html.ui9.page-index .drawer .d-preview.v9-wide :is(img, video) { width: 100% !important; height: auto !important; }
html.ui9.page-index .drawer .d-preview :is(img, video) { max-width: 100%; max-height: 100%; width: auto !important; height: 100% !important; object-fit: contain; border-radius: var(--radius-sm); background: none !important; box-shadow: 0 22px 50px -16px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.06); }
html.ui9.page-index .drawer .d-preview .ph { border-radius: var(--radius-sm); }
html.ui9.page-index .drawer .drawer-head > :not(.close) { display: none; }
html.ui9.page-index .drawer .drawer-head strong:only-of-type:not(:has(+ .type-badge)) { display: none; }
html.ui9.page-index .drawer .close { width: 32px; height: 32px; margin: 0; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--text-dim); }
html.ui9.page-index .drawer .close:hover { background: var(--hover); color: var(--text); }
html.ui9.page-index .drawer .drawer-body { display: flex; flex-direction: column; gap: 11px; padding: 14px 18px 14px; }
/* order: name, status, readout, why, campaign, traffic, tags, copy, versions. Details folds the rest. */
html.ui9.page-index .drawer .d-name-row { order: 1; padding-right: 34px; }
html.ui9.page-index .drawer input#dName { width: 100%; padding: 2px 0; border: 0; outline: 0; border-radius: 4px; background: none; font: 600 15px/1.25 var(--sans) !important; letter-spacing: -.012em; color: var(--text); }
html.ui9.page-index .drawer input#dName:focus-visible { box-shadow: 0 0 0 2px var(--led-soft) !important; }
html.ui9.page-index .drawer .v9-d-sub { order: 2; display: flex; align-items: center; gap: 6px; margin-top: -9px; font-size: 12px; color: var(--text-dim); min-width: 0; white-space: nowrap; overflow: hidden; }
html.ui9.page-index .drawer .v9-d-sub .v9-lg { width: 14px; height: 14px; }
html.ui9.page-index .drawer .v9-d-sub .v9-win { color: var(--accent-text); font-weight: 500; }
html.ui9.page-index .drawer .dmeta { order: 3; margin: -8px 0 0; font-size: 11.5px; color: var(--text-faint); }
html.ui9.page-index .drawer .dmeta b { font-weight: 500; }
html.ui9.page-index .drawer .field { order: 40; gap: 6px; margin: 0; }
html.ui9.page-index .drawer .field > label { line-height: 1.2; color: var(--text-dim); }
html.ui9.page-index .drawer .field > label span { font-family: var(--sans); letter-spacing: 0; }
html.ui9.page-index .drawer .field:has(#dStatus) { order: 4; }
html.ui9.page-index .drawer .field:has(#dStatus) > label { display: none; }
html.ui9.page-index .drawer #dStatus { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; }
html.ui9.page-index .drawer #dStatus button { padding: 0 2px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-index .drawer #dStatus button.on { color: #fff; }
html.ui9.page-index[data-theme="dark"] .drawer #dStatus button.on { color: var(--bezel-well); }
html.ui9.page-index .drawer .win-toggle { align-self: flex-start; margin: 0; min-height: 27px; padding: 0 9px; border: 0; border-radius: 6px; background: var(--surface-2); color: var(--text-dim); font: 500 12px/1 var(--sans); display: inline-flex; align-items: center; gap: 6px; }
html.ui9.page-index .drawer .win-toggle span { width: 8px; height: 8px; border-radius: 50%; font-size: 0; background: var(--line-strong); }
html.ui9.page-index .drawer .win-toggle.on { background: var(--accent-soft); color: var(--accent-text); border: 0; }
html.ui9.page-index .drawer .win-toggle.on span { background: var(--go); }
html.ui9.page-index .drawer .win-toggle:hover { background: var(--hover); color: var(--text); border: 0; }
/* Performance opens up so its parts can sit in different places: the readout up top, the per-variation table in Details */
html.ui9.page-index .drawer .field:has(.perf-grid) { display: contents; }
html.ui9.page-index .drawer .field:has(.perf-grid) > label { display: none; }
html.ui9.page-index .drawer .perf-grid {
  order: 5; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 10px; margin: 0; padding: 11px 12px 8px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; color: var(--on-bezel);
  background-color: var(--bezel-well); background-image: linear-gradient(rgba(244,239,228,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(244,239,228,.03) 1px, transparent 1px); background-size: 12px 12px; background-position: -1px -1px;
}
html.ui9.page-index .drawer .perf-cell { padding: 0; border: 0; border-radius: 0; background: none; min-width: 0; }
html.ui9.page-index .drawer .perf-cell:nth-child(3) { order: 1; }
html.ui9.page-index .drawer .perf-cell:nth-child(4) { order: 2; }
html.ui9.page-index .drawer .perf-cell:nth-child(2) { order: 3; }
html.ui9.page-index .drawer .perf-cell:nth-child(1) { order: 4; }
html.ui9.page-index .drawer .perf-cell label { display: block; font: 500 10px/1 var(--mono) !important; letter-spacing: .07em !important; text-transform: uppercase; color: var(--on-bezel-dim); margin-bottom: 6px; white-space: nowrap; }
html.ui9.page-index .drawer .perf-cell :is(input, .ptotal) { width: 100%; padding: 0; border: 0; background: none; font: 500 16px/1.1 var(--mono); letter-spacing: -.035em; color: var(--on-bezel); font-variant-numeric: tabular-nums; }
html.ui9.page-index .drawer .perf-cell input:focus-visible { box-shadow: 0 2px 0 var(--led) !important; }
html.ui9.page-index .drawer .ctr-meter {
  --live: var(--lamp-ok); --text: var(--on-bezel); position: relative;
  order: 5; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 14px; margin: -11px 0 0; padding: 0 12px 10px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); border: 0; color: var(--on-bezel);
  background-color: var(--bezel-well); background-image: linear-gradient(rgba(244,239,228,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(244,239,228,.03) 1px, transparent 1px); background-size: 12px 12px; background-position: -1px -1px;
}
html.ui9.page-index .drawer .ctr-meter .row { display: flex; flex: 1 1 auto; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 !important; }
/* the page sets the colour: green at target. On ink that is the lamp green, set above as --live. */
html.ui9.page-index .drawer .ctr-meter .big { font: 500 13px/1.2 var(--mono); letter-spacing: -.03em; }
html.ui9.page-index .drawer .ctr-meter .big::before { content: "CTR "; font: 500 10px/1 var(--mono); letter-spacing: .085em; color: var(--on-bezel-dim); }
html.ui9.page-index .drawer .ctr-meter .tgt { font: 400 11.5px/1.3 var(--sans); color: var(--on-bezel-dim); }
html.ui9.page-index .drawer .ctr-meter .tgt b { font-weight: 500; }
html.ui9.page-index .drawer .ctr-meter .bar { position: absolute; left: 12px; right: 12px; bottom: 5px; height: 2px; margin: 0; border-radius: 0; background: rgba(244,239,228,.14); }
html.ui9.page-index .drawer .ctr-meter .bar i { border-radius: 0; background: var(--on-bezel-dim); }
html.ui9.page-index .drawer .ctr-meter:has(.big[style*="--live"]) .bar i { background: var(--live); }
html.ui9.page-index .drawer .field:has(#dWhy) { order: 6; }
html.ui9.page-index .drawer .field:has(#dRec) { order: 7; }
html.ui9.page-index .drawer .field:has(#dWhy) > label, html.ui9.page-index .drawer .field:has(#dRec) > label { display: none; }
html.ui9.page-index .drawer :is(#dWhyBtn, #dRecBtn) {
  position: relative; width: 100%; height: 36px; min-height: 36px; justify-content: flex-start; padding: 0 10px; font-size: 0; gap: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); color: var(--text); border: 0;
}
html.ui9.page-index .drawer #dWhyBtn::before { content: "Why it wins"; font: 500 13px/1 var(--sans); }
html.ui9.page-index .drawer #dRecBtn::before { content: "Recreate this video"; font: 500 13px/1 var(--sans); }
html.ui9.page-index .drawer :is(#dWhyBtn, #dRecBtn)::after { content: "Uses Claude"; position: absolute; right: 10px; top: 13px; font: 500 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
html.ui9.page-index .drawer .field:has(#dBoard) { order: 8; }
html.ui9.page-index body.viewer .drawer .field:is(:has(#dBoard), :has(#dPlat)) { display: none; }
html.ui9.page-index .drawer .field:has(#dPlat) { order: 9; }
html.ui9.page-index .drawer #dPlat { flex-wrap: wrap; gap: 1px; }
html.ui9.page-index .drawer #dPlat button { flex: 0 0 auto; padding: 0 8px; font-size: 12px; }
html.ui9.page-index .drawer #dPlat button.on { color: #fff; }
html.ui9.page-index .drawer .field:has(#dTags) { order: 10; }
html.ui9.page-index .drawer .tag-edit { margin: 0; gap: 4px; }
html.ui9.page-index .drawer .tag-edit:empty { display: none; }
html.ui9.page-index .drawer .field:has(#dAdPrimary) { order: 11; }
html.ui9.page-index .drawer textarea.input { font: 400 13px/1.45 var(--sans); }
html.ui9.page-index .drawer .field:has(.versions) { order: 13; }
html.ui9.page-index .drawer .versions { gap: 4px; }
html.ui9.page-index .drawer #dSizes { order: 14; min-height: 32px; flex: none; }
html.ui9.page-index .drawer .input { min-height: 32px; font-size: 12.5px; }
html.ui9.page-index .drawer .v9-d-more {
  order: 20; display: flex; align-items: center; gap: 6px; width: 100%; padding: 9px 0 0; border: 0; box-shadow: 0 -1px 0 var(--hair); background: none; font: 500 12.5px/1.2 var(--sans); color: var(--text-dim); cursor: pointer; text-align: left;
}
html.ui9.page-index .drawer .v9-d-more:hover { color: var(--text); }
html.ui9.page-index .drawer .v9-d-more .v9-i { width: 12px; height: 12px; transition: transform var(--t2) var(--ease); }
html.ui9.page-index .drawer.v9-more-open .v9-d-more .v9-i { transform: rotate(90deg); }
/* Details: links, ad IDs, research, per-variation numbers */
html.ui9.page-index .drawer .field:is(:has(#dFinalLink), :has(#dNbAdId), :has(#dMetaAdId), :has(#dAdAccount)), html.ui9.page-index .drawer .vperf, html.ui9.page-index .drawer .v9-d-fold { order: 30; }
html.ui9.page-index .drawer:not(.v9-more-open) .field:is(:has(#dFinalLink), :has(#dNbAdId), :has(#dMetaAdId), :has(#dAdAccount)), html.ui9.page-index .drawer:not(.v9-more-open) .vperf, html.ui9.page-index .drawer:not(.v9-more-open) .v9-d-fold { display: none; }
html.ui9.page-index .drawer .drawer-foot { position: relative; z-index: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 10px 18px 12px; border: 0; background: var(--surface); box-shadow: inset 0 1px 0 var(--line); }
html.ui9.page-index .drawer .drawer-foot .btn { flex: none; min-width: 0; height: 34px; min-height: 34px; }
html.ui9.page-index .drawer .drawer-foot .v9-plate { flex: none; }
html.ui9.page-index .drawer .v9-room-plate .v9-plate-k.v9-wait { opacity: .5; cursor: default; }
html.ui9.page-index .drawer #dQuick { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); font-size: 0; gap: 0; }
html.ui9.page-index .drawer #dQuick:hover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); filter: none; }
html.ui9.page-index .drawer #dQuick::before { content: "1-click"; font: 500 12.5px/1 var(--sans); }
html.ui9.page-index .drawer #dDownload, html.ui9.page-index .drawer .v9-d-menu-btn { width: 34px; padding: 0; background: none; box-shadow: none; color: var(--text-dim); font-size: 0; }
html.ui9.page-index .drawer #dDownload:hover, html.ui9.page-index .drawer .v9-d-menu-btn:hover { background: var(--hover); color: var(--text); filter: none; }
html.ui9.page-index .drawer #dDownload::before {
  content: ""; width: 15px; height: 15px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v12m0 0l-5-5m5 5l5-5M4 20h16'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v12m0 0l-5-5m5 5l5-5M4 20h16'/%3E%3C/svg%3E") center / contain no-repeat;
}
html.ui9.page-index .drawer .v9-d-menu {
  position: absolute; right: 18px; bottom: calc(100% + 6px); min-width: 196px; display: none; flex-direction: column; gap: 1px; padding: 6px; border-radius: var(--r-ticket); background: var(--bezel-2); color: var(--on-bezel); box-shadow: 0 0 0 1px var(--bezel-line-2), var(--e2);
}
html.ui9.page-index .drawer .v9-d-menu.show { display: flex; }
html.ui9.page-index .drawer .v9-d-menu .btn { justify-content: flex-start; width: 100%; height: 32px; min-height: 32px; background: none; box-shadow: none; color: var(--on-bezel); font: 450 13px/1 var(--sans); }
html.ui9.page-index .drawer .v9-d-menu .btn:hover { background: rgba(244,239,228,.075); color: var(--on-bezel); }
html.ui9.page-index .drawer .v9-d-menu #dDel { color: color-mix(in srgb, var(--rejected) 45%, var(--on-bezel)); background: none; box-shadow: none; }
html.ui9.page-index .drawer .v9-d-menu #dAi { font-size: 0; }
html.ui9.page-index .drawer .v9-d-menu #dAi::before { content: "AI variations"; font: 450 13px/1 var(--sans); }
html.ui9.page-index .drawer .v9-d-menu #dDel:hover { background: var(--rejected); color: #fff; }
html.ui9.page-index .drawer .v9-room-nav { position: absolute; left: 12px; bottom: 11px; z-index: 2; display: flex; align-items: center; gap: 6px; font: 500 11px/1 var(--mono); color: var(--on-bezel-dim); }
html.ui9.page-index .drawer .v9-room-nav button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius-sm); background: rgba(244,239,228,.1); color: var(--on-bezel); cursor: pointer; }
html.ui9.page-index .drawer .v9-room-nav button:hover:not(:disabled) { background: rgba(244,239,228,.2); }
html.ui9.page-index .drawer .v9-room-nav button:disabled { opacity: .35; cursor: default; }
html.ui9.page-index .drawer .v9-room-nav button:focus-visible { outline-color: var(--led); }
html.ui9.page-index .drawer .v9-room-size { position: absolute; right: calc(var(--room-side) + 14px); bottom: 19px; z-index: 2; font: 500 11px/1 var(--mono); color: var(--on-bezel-dim); }

/* ---- Sync: the real modal, dressed as an ink window hung under the key ----- */
html.ui9.page-index #nbScrim { background: transparent; }
html.ui9.page-index #nbModal {
  --surface: var(--bezel-2); --surface-2: var(--bezel-3); --elevated: var(--bezel-2); --bg: var(--bezel); --line: var(--bezel-line-2); --line-strong: var(--bezel-line-2); --hair: var(--bezel-line);
  --text: var(--on-bezel); --text-dim: var(--on-bezel-dim); --text-faint: var(--on-bezel-faint); --accent-soft: rgba(244,239,228,.1); --accent-text: var(--on-bezel); --hover: rgba(244,239,228,.07);
  --primary-bg: var(--on-bezel); --primary-text: var(--bezel-well);
  top: calc(var(--shell-h) - 2px); left: auto; right: var(--v9-sync-r, 14px); width: 344px; max-width: calc(100vw - 16px); max-height: calc(100vh - var(--shell-h) - 10px); transform: translateY(-4px);
  border: 0; border-radius: var(--r-ticket); background: var(--bezel); color: var(--on-bezel); box-shadow: 0 0 0 1px var(--bezel-line-2), var(--shadow-lg); scrollbar-color: var(--bezel-3) transparent;
}
html.ui9.page-index #nbModal.show { transform: none; }
html.ui9.page-index #nbModal .modal-head { padding: 11px 8px 6px 13px; border: 0; }
html.ui9.page-index #nbModal #nbTitle { font: 500 10px/1 var(--mono) !important; letter-spacing: .085em; text-transform: uppercase; color: var(--on-bezel-dim); }
html.ui9.page-index #nbModal .modal-head .close { width: 24px; height: 24px; font-size: 16px; color: var(--on-bezel-dim); }
html.ui9.page-index #nbModal .modal-head .close:hover { background: rgba(244,239,228,.08); color: var(--on-bezel); }
html.ui9.page-index #nbModal .modal-body { padding: 2px 10px 11px; gap: 8px; font-size: 12.5px; }
html.ui9.page-index #nbModal #nbSubtitle { order: 0; margin: 0 3px; font-size: 12px !important; color: var(--on-bezel-dim) !important; }
/* the plain sentence goes. The one that names a single creative stays. */
html.ui9.page-index #nbModal #nbSubtitle:not(:has(b)) { display: none; }
html.ui9.page-index #nbModal #nbPlatform { order: 1; align-self: stretch !important; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 0; background: none; box-shadow: none; }
html.ui9.page-index #nbModal #nbPlatform[style*="none"] { display: none; }
html.ui9.page-index #nbModal #nbPlatform button {
  display: grid; grid-template-columns: 16px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: center; align-content: center; height: 40px; padding: 0 9px; text-align: left; border-radius: var(--radius-sm); background: rgba(244,239,228,.05); color: var(--on-bezel); font: 500 13px/1.15 var(--sans);
}
html.ui9.page-index #nbModal #nbPlatform button[style*="none"] { display: none; }
html.ui9.page-index #nbModal #nbPlatform button .v9-lg { grid-row: 1 / 3; }
html.ui9.page-index #nbModal #nbPlatform button em { grid-column: 2; font: 500 10.5px/1.2 var(--mono); font-style: normal; color: var(--on-bezel-dim); }
html.ui9.page-index #nbModal #nbPlatform button em:empty { display: none; }
html.ui9.page-index #nbModal #nbPlatform button em.stale { color: var(--hazard); }
html.ui9.page-index #nbModal #nbPlatform button:hover { background: rgba(244,239,228,.09); color: var(--on-bezel); }
html.ui9.page-index #nbModal #nbPlatform button.on { background: rgba(244,239,228,.13); color: var(--on-bezel); box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-index #nbModal #nbPresets { order: 2; align-self: stretch; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; background: none; box-shadow: none; }
html.ui9.page-index #nbModal #nbPresets button { min-height: 28px; padding: 0 9px; border-radius: var(--r-key); background: rgba(244,239,228,.06); color: var(--on-bezel-dim); font: 500 12px/1 var(--sans); }
html.ui9.page-index #nbModal #nbPresets button:hover { color: var(--on-bezel); background: rgba(244,239,228,.1); }
html.ui9.page-index #nbModal #nbPresets button.on { background: var(--on-bezel); color: var(--bezel-well); }
html.ui9.page-index #nbModal .nb-range { order: 3; gap: 6px; }
html.ui9.page-index #nbModal:not(.v9-range) :is(.nb-range, #nbRangeNote) { display: none; }
html.ui9.page-index #nbModal .nb-date { font: 500 10px/1 var(--mono); letter-spacing: .07em; color: var(--on-bezel-dim); gap: 4px; }
html.ui9.page-index #nbModal .input { background: rgba(244,239,228,.05); color: var(--on-bezel); color-scheme: dark; font-size: 12.5px; }
html.ui9.page-index #nbModal .nbhint { order: 4; color: var(--on-bezel-dim); }
html.ui9.page-index #nbModal .nbhint:empty { display: none; }
html.ui9.page-index #nbModal .acctbox { order: 5; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: rgba(244,239,228,.05); }
/* picker not loaded: the page syncs every account, so that is what the line says, on one line */
html.ui9.page-index #nbModal .acctbox:has(#nbAcctList:empty) { padding: 2px 3px; background: none; }
html.ui9.page-index #nbModal .acctbox:has(#nbAcctList:empty) .acctbox-head { align-items: center; flex-wrap: nowrap; }
html.ui9.page-index #nbModal .acctbox:has(#nbAcctList:empty) .acctbox-sub, html.ui9.page-index #nbModal .acctbox:has(#nbAcctList:empty) #nbAcctList { display: none; }
html.ui9.page-index #nbModal .acctbox:has(#nbAcctList:empty) #nbAcctTitle { font-size: 0; font-weight: 400; }
html.ui9.page-index #nbModal .acctbox:has(#nbAcctList:empty) #nbAcctTitle::before { content: "All accounts"; font-size: 12.5px; color: var(--on-bezel-dim); }
html.ui9.page-index #nbModal .acctlink { background: none; color: var(--on-bezel); padding: 2px 0; text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
html.ui9.page-index #nbModal .acc-check { order: 6; color: var(--on-bezel-dim); font-size: 12px; }
html.ui9.page-index #nbModal > .modal-body > .acc-check { display: block; }
html.ui9.page-index #nbModal > .modal-body > .acc-check > span { display: none; }
html.ui9.page-index #nbModal > .modal-body > .acc-check input { margin: 0 5px 0 0; vertical-align: -2px; }
html.ui9.page-index #nbModal .acc-check input { accent-color: var(--led); }
html.ui9.page-index #nbModal #nbFetchFiles, html.ui9.page-index #nbModal #snImport { order: 7; }
html.ui9.page-index #nbModal .d-nbsync { background: rgba(244,239,228,.05); border: 0; color: var(--on-bezel-dim); font-size: 12px; font-weight: 500; }
html.ui9.page-index #nbModal #nbRun { order: 8; height: 38px; min-height: 38px; font: 600 13px/1 var(--sans); background: var(--on-bezel); color: var(--bezel-well); filter: none; }
html.ui9.page-index #nbModal #nbRun:hover:not(:disabled) { filter: brightness(.94); }
html.ui9.page-index #nbModal #nbRun:disabled { opacity: .6; }
html.ui9.page-index #nbModal #nbResult { order: 9; }
html.ui9.page-index #nbModal .v9-sync-last { order: 9; margin: 0 3px; font-size: 12px; line-height: 1.4; color: color-mix(in srgb, var(--rejected) 45%, var(--on-bezel)); }
html.ui9.page-index #nbModal .nbres-err { color: color-mix(in srgb, var(--rejected) 45%, var(--on-bezel)); }
html.ui9.page-index #nbModal .nbres-why { background: rgba(244,239,228,.1); color: var(--on-bezel); }

/* dark: bezel and sheet are close in value, so the sheet's edge gets a hairline. Tokens stay as they are. */
@media (min-width: 861px) {
  html.ui9.page-index[data-theme="dark"] :is(.main > .topbar, .content) { box-shadow: inset 1px 0 0 var(--line); }
}

/* ---- the fold ladder ------------------------------------------------------- */
@media (max-width: 1320px) {
  html.ui9.page-index #v9SortBtn { display: inline-flex; }
  html.ui9.page-index #sortSeg {
    position: absolute; right: var(--gut); top: 48px; z-index: 5; display: none; flex-direction: column; height: auto; margin: 0; padding: 6px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong), var(--e2);
  }
  html.ui9.page-index #sortSeg.v9-open { display: flex; }
  html.ui9.page-index #sortSeg::before { display: none; }
  html.ui9.page-index #sortSeg button { justify-content: flex-start; height: 30px; padding: 0 10px; text-align: left; }
  html.ui9.page-index #sortSeg [data-sort="conv"], html.ui9.page-index #sortSeg [data-sort="status"] { font-size: 12px; }
  html.ui9.page-index #sortSeg [data-sort="conv"]::before, html.ui9.page-index #sortSeg [data-sort="status"]::before { content: none; }
}
@media (max-width: 1240px) {
  /* a review adds a long chip: the dock must stay whole, so the chip says only that, and the thumbnails give way. Its title keeps the detail. */
  html.ui9.page-index .selbar #revChip { font-size: 0; gap: 0; }
  html.ui9.page-index .selbar #revChip::before { content: "Reviewing \2715"; font: 500 12px/1 var(--sans); }
  html.ui9.page-index .selbar:has(#revChip:not([style*="none"])) .v9-sd-th { display: none; }
}
@media (max-width: 1130px) {
  html.ui9.page-index .topbar .btn .v9-tx { display: none; }
  html.ui9.page-index #typeFilter button { padding: 0 7px; }
  html.ui9.page-index .topbar .btn { padding: 0 9px; }
  html.ui9.page-index body:not(.selectmode) #selectBtn, html.ui9.page-index #uploadBtn { font-size: 0; gap: 0; }
}
@media (max-width: 1040px) {
  /* two rows of six, each key on one line: all twelve show, and a mouse needs no sideways scroll */
  html.ui9.page-index { --bar-h: 121px; }
  html.ui9.page-index #statusFilters { flex-wrap: wrap; min-height: 64px; }
  html.ui9.page-index .chip { flex: 1 1 calc(100% / 6 - 1px); grid-template-columns: auto auto minmax(0, 1fr); grid-template-rows: auto; align-items: center; gap: 0 5px; height: 32px; padding: 0 8px; }
  html.ui9.page-index .chip .count { grid-row: 1; grid-column: 1; }
  html.ui9.page-index .chip .dot { grid-row: 1; grid-column: 2; }
  html.ui9.page-index #statusFilters .chip:first-child { max-width: none; }
  html.ui9.page-index #statusFilters .chip:only-child { max-width: 140px; }
  html.ui9.page-index #typeFilter > span, html.ui9.page-index #typeFilter button:nth-child(n+6) { display: none; }
  html.ui9.page-index #stats .stat:first-child, html.ui9.page-index #stats .stat:last-child { display: none; }
  html.ui9.page-index { --room-side: 50%; }
}
@media (max-width: 1000px) {
  html.ui9.page-index .search.search-lead { flex-basis: 140px; min-width: 140px; }
  html.ui9.page-index .search-lead .v9-kc { display: none; }
  html.ui9.page-index .selbar .v9-sd-n small { display: none; }
  html.ui9.page-index .selbar .v9-sd-sep { display: none; }
  html.ui9.page-index .selbar { gap: 2px; }
}
@media (max-width: 860px) {
  html.ui9.page-index body { padding-left: 0; }
  html.ui9.page-index .bootveil { background: linear-gradient(var(--bezel), var(--bezel)) 0 0 / 100% var(--shell-h) no-repeat, var(--bg); }
  /* the rail comes in from the left, above the thumb bar */
  html.ui9.page-index .rail {
    position: fixed; z-index: 170; left: 0; top: var(--shell-h); bottom: 0; width: 248px; max-width: 82vw; height: auto; background: var(--bezel); color: var(--on-bezel); box-shadow: 5px 0 12px -7px var(--bezel-cast);
    transform: translateX(-102%); transition: transform var(--t3) var(--ease); padding-bottom: env(safe-area-inset-bottom);
  }
  html.ui9.page-index .rail.open { transform: none; }
  html.ui9.page-index .rail-scrim { z-index: 165; inset: var(--shell-h) 0 0 0; background: rgba(12,10,6,.4); }
  /* row one: search and Upload. Row two: type, sort, filters, select. The strip swipes. The band scrolls away. */
  html.ui9.page-index .main > .topbar { position: relative; top: auto; padding: 8px 12px 6px; background: none; row-gap: 6px; }
  html.ui9.page-index .main > .topbar::after { display: none; }
  html.ui9.page-index .search.search-lead { order: 1; flex: 1 1 calc(100% - 46px); min-width: 0; }
  html.ui9.page-index .search-lead .v9-kc { display: none; }
  html.ui9.page-index #uploadBtn { order: 2; width: 38px; padding: 0; font-size: 0; gap: 0; }
  html.ui9.ui9-ready.page-index .topbar #uploadBtn { border-radius: var(--r-key); }
  html.ui9.page-index .topbar #v9UpMore { display: none; }
  html.ui9.page-index #typeFilter { order: 3; flex: 1 1 0; min-width: 0; align-self: auto; }
  html.ui9.page-index #typeFilter button { flex: 1; justify-content: center; padding: 0 3px; font-size: 12px; }
  html.ui9.page-index #v9SortBtn { order: 4; }
  html.ui9.page-index #v9SortBtn :is(.v9-sl, .v9-i:last-child) { display: none; }
  html.ui9.page-index #v9SortBtn .v9-i:first-child { display: block; }
  html.ui9.page-index #v9FiltersBtn { order: 5; }
  html.ui9.page-index #selectBtn { order: 6; }
  html.ui9.page-index body:not(.selectmode) #selectBtn { width: 36px; padding: 0; font-size: 0; gap: 0; }
  html.ui9.page-index { --bar-h: 99px; }
  html.ui9.page-index #statusFilters { order: 7; flex: 0 0 calc(100% + 24px); max-width: none; min-height: 42px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; border-radius: 0; box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); scroll-snap-type: x proximity; }
  html.ui9.page-index #statusFilters::-webkit-scrollbar { display: none; }
  html.ui9.page-index .chip { flex: 0 0 auto; min-width: 82px; height: 42px; padding: 0 10px; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 5px 4px; align-items: stretch; scroll-snap-align: start; }
  html.ui9.page-index .chip .count { grid-column: 1 / -1; }
  html.ui9.page-index .chip .dot { grid-row: 2; grid-column: 1; }
  html.ui9.page-index #sortSeg { top: 92px; right: 12px; }
  html.ui9.page-index .content { grid-template-columns: minmax(0, 1fr); padding: 8px 12px 24px; }
  html.ui9.page-index .grid-head { display: none; }
  html.ui9.page-index #stats { grid-column: 1; overflow-x: auto; scrollbar-width: none; }
  html.ui9.page-index #stats::-webkit-scrollbar { display: none; }
  html.ui9.page-index #stats .stat:first-child, html.ui9.page-index #stats .stat:last-child { display: inline-flex; }
  html.ui9.page-index .v9-vopts { display: none; }
  html.ui9.page-index #grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  html.ui9.page-index #grid:empty::before {
    -webkit-mask: linear-gradient(90deg, #000 calc(100% - 8px), transparent 0) 0 0 / calc((100% + 8px) / 2) 100%, linear-gradient(#000 calc(100% - 8px), transparent 0) 0 0 / 100% 190px; -webkit-mask-composite: source-in;
    mask: linear-gradient(90deg, #000 calc(100% - 8px), transparent 0) 0 0 / calc((100% + 8px) / 2) 100%, linear-gradient(#000 calc(100% - 8px), transparent 0) 0 0 / 100% 190px; mask-composite: intersect;
  }
  html.ui9.page-index #grid .select-check { width: 26px; height: 26px; }
  html.ui9.page-index #grid .card:hover .select-check { display: none; }
  html.ui9.page-index body.selectmode #grid .card .select-check, html.ui9.page-index #grid .card.selected .select-check { display: grid; }
  html.ui9.page-index #grid .card:hover .thumb::after, html.ui9.page-index #grid .card:hover .vf, html.ui9.page-index #grid .card:hover .qlgo { display: none; }
  /* the dock: one line, above the thumb bar. More opens above it. */
  html.ui9.page-index .selbar {
    left: 8px; right: 8px; top: auto; bottom: calc(66px + env(safe-area-inset-bottom)); width: auto; max-width: none; height: 52px; transform: none; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; animation: none; border-radius: var(--r-panel);
  }
  html.ui9.page-index .selbar::-webkit-scrollbar { display: none; }
  html.ui9.page-index .selbar > * { flex: none !important; }
  html.ui9.page-index .selbar .v9-plate-k .tx, html.ui9.page-index .selbar .v9-plate-l, html.ui9.page-index .v9-sd-sep { display: none; }
  html.ui9.page-index .selbar .v9-plate .v9-plate-k { padding: 0 7px; }
  html.ui9.page-index .selbar .selmore { position: static; }
  html.ui9.page-index .selbar .selmore-menu { position: fixed; left: 8px; right: 8px; bottom: calc(126px + env(safe-area-inset-bottom)); top: auto; z-index: 161; min-width: 0; }
  html.ui9.page-index body.selectmode .toast { bottom: calc(126px + env(safe-area-inset-bottom)); }
  @media (max-width: 430px) {
    html.ui9.page-index .v9-sd-th { display: none; }
    html.ui9.page-index .selbar :is(.btn, .selmore > .btn) { padding: 0 7px; }
    html.ui9.page-index .selbar #selQuick::after { content: none; }
  }
  /* the Room: picture on top, fields under it, the foot pinned */
  html.ui9.page-index .drawer {
    top: 6px; left: 6px; right: 6px; bottom: 6px; width: auto; max-width: none; height: auto; display: flex; flex-direction: column; overflow: auto; z-index: 210; border-radius: var(--r-panel); background: var(--surface);
    transform: translateY(14px); opacity: 0; visibility: hidden; transition: transform var(--t3) var(--ease), opacity var(--t2), visibility 0s linear var(--t3);
  }
  html.ui9.page-index .drawer.show { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  html.ui9.page-index #scrim { z-index: 205; }
  html.ui9.page-index .drawer .drawer-head { position: absolute; right: 8px; top: 8px; z-index: 3; padding: 0; border: 0; background: none; }
  html.ui9.page-index .drawer .drawer-head .close { color: var(--on-bezel); background: rgba(16,13,9,.6); }
  html.ui9.page-index .drawer .drawer-body { flex: none; overflow: visible; padding: 0 14px 14px; }
  html.ui9.page-index .drawer .d-preview { order: 0; flex: none; height: 42vh; margin: 0 -14px; aspect-ratio: auto; padding: 12px 12px 44px; display: grid; place-items: center; border: 0; border-radius: 0; background: radial-gradient(70% 56% at 50% 14%, color-mix(in srgb, var(--led) 17%, var(--bezel-well)), transparent 74%), var(--bezel-well); }
  html.ui9.page-index .drawer .d-name-row { padding-right: 0; }
  html.ui9.page-index .drawer input#dName { font-size: 16px !important; }
  html.ui9.page-index .drawer .drawer-foot { position: sticky; bottom: 0; }
  html.ui9.page-index .drawer .v9-room-nav { position: absolute; left: 10px; top: calc(42vh - 38px); bottom: auto; }
  html.ui9.page-index .drawer .v9-room-size { display: none; }
  html.ui9.page-index .drawer .drawer-foot .v9-plate-k .tx { display: inline; }
  html.ui9.page-index .drawer .drawer-foot .v9-plate-l { display: none; }
  html.ui9.page-index .drawer .drawer-foot { padding: 8px 10px; }
  html.ui9.page-index .drawer #dDownload { display: none; }
  html.ui9.page-index #nbModal { top: calc(var(--shell-h) + 6px); left: 8px; right: 8px; width: auto; max-height: calc(100vh - var(--shell-h) - 76px); transform: none; }
  html.ui9.page-index #launchQueue.v9-pop { left: 8px; right: 8px; top: calc(var(--shell-h) + 6px); width: auto; max-width: none; max-height: calc(100vh - var(--shell-h) - 76px); }
  /* a phone has no hover: the keys stay, on the name's line. The proof line may take two lines. The Review keys stay in reach. */
  html.ui9.page-index #launchQueue > div > div:first-child > span { display: none; }
  html.ui9.page-index #launchQueue [data-qrow] { padding-right: 4px !important; gap: 0 5px !important; }
  html.ui9.page-index #launchQueue #queueViewAll { position: static; margin-left: auto; }
  html.ui9.page-index #launchQueue [data-qrow]::after { display: none; }
  html.ui9.page-index #launchQueue [data-qrow] .btn, html.ui9.page-index #launchQueue [data-qrow] .btn.btn-primary { flex: 0 0 auto; max-width: none; height: 28px; min-height: 28px; padding: 0 7px !important; opacity: 1; box-shadow: inset 0 0 0 1px var(--hair); }
  html.ui9.page-index #launchQueue [data-qrow] [data-qx] { width: 28px; padding: 0 !important; box-shadow: none; }
  html.ui9.page-index #launchQueue [data-qrow] > img + span + span { white-space: normal !important; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  html.ui9.page-index .v9-q-x:not([hidden]) {
    position: fixed; z-index: 241; right: 14px; top: calc(var(--shell-h) + 12px); display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); cursor: pointer;
  }
  html.ui9.page-index .v9-q-x .v9-i { width: 14px; height: 14px; }
  html.ui9.page-index #cdHoverCard { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html.ui9.page-index #grid .card .thumb::after { animation: none; }
  html.ui9.page-index .selbar { animation: none; }
  html.ui9.page-index :is(#grid:empty::before, #stats:empty, #statusFilters:empty) { animation: none; }
  html.ui9.page-index #v9FiltersBtn.v9-busy::after { animation: none; }
}

/* ===== 20-launcher.css ===== */
/* v9 Launcher (DESIGN.md 4.3, 6.8): the sequence and the ticket.
   Rail: what you chose and what is left. Form: the real form, one column, every step open.
   Ticket: what will be made, and the go button.
   Layout is all here, keyed to the blocking html.ui9 class. The enhancer only adds chrome.
   Red and blue come from var(--accent) and var(--grad), so a platform switch flips them. The plate never does. */

html.ui9.page-launch { --bar-h: 50px; --ticket-w: 340px; }
@media (max-width: 1240px) { html.ui9.page-launch { --ticket-w: 300px; } }

/* ---- the L: CSS reserves the rail before any script runs ---- */
html.ui9.page-launch body { padding-left: var(--rail-w); }
html.ui9.page-launch body::after { content: ""; position: fixed; top: var(--shell-h); left: 0; bottom: 0; z-index: 37; width: var(--rail-w); background: var(--bezel); pointer-events: none; }

/* ---- page bar: switch, Launch/Manage, spacer, One step, links ---- */
html.ui9.page-launch body > .topbar > .brand { display: none; }
html.ui9.page-launch body > .topbar { flex-wrap: nowrap; }
html.ui9.page-launch #segPlatform { order: 1; margin: 0 !important; flex: none; }
html.ui9.page-launch body > .topbar > .tabs { order: 2; flex: none; }
html.ui9.page-launch body > .topbar > .spacer { order: 3; flex: 1 1 0; min-width: 0; }
html.ui9.page-launch .v9-newer { order: 4; color: var(--review); }
html.ui9.page-launch .v9-one { order: 5; }
html.ui9.page-launch body > .topbar > a { order: 6; background: none; box-shadow: none; color: var(--text-dim); }
html.ui9.page-launch body > .topbar > a:hover { background: var(--hover); color: var(--text); }
html.ui9.page-launch #segPlatform button { display: inline-flex; align-items: center; gap: 6px; }
html.ui9.page-launch #segPlatform button svg { width: 16px; height: 16px; border-radius: 4px; }
html.ui9.page-launch #segPlatform button:is([data-p="newsbreak"], [data-p="meta"])::after { font: 500 12.5px/1 var(--sans); }
html.ui9.page-launch #segPlatform button[data-p="newsbreak"]::after { content: "NewsBreak"; }
html.ui9.page-launch #segPlatform button[data-p="meta"]::after { content: "Meta"; }
html.ui9.page-launch #segPlatform button[data-href] { padding: 0 6px; opacity: .55; }
html.ui9.page-launch #segPlatform button[data-href]:hover { opacity: 1; }
html.ui9.page-launch #segPlatform button[data-p="tiktok"] { margin-left: 5px; }
html.ui9.page-launch .v9-one { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12.5px; color: var(--text-dim); cursor: pointer; white-space: nowrap; }
html.ui9.page-launch .v9-one input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
html.ui9.page-launch .v9-one[hidden], html.ui9.page-launch.v9-manage .v9-one { display: none; }

/* ---- the sheet ---- */
html.ui9.page-launch .wrap { max-width: none; margin: 0; padding: 4px var(--gut) 18px; }
html.ui9.page-launch .cols { grid-template-columns: minmax(0, 1fr) var(--ticket-w); gap: 12px; }
html.ui9.page-launch #viewLaunch { position: relative; }

/* the form: section cards, every step open */
html.ui9.page-launch .cols > div:first-child > section.card {
  position: relative; margin: 0 0 8px; overflow: clip; background: var(--surface); scroll-margin-top: calc(var(--shell-h) + var(--bar-h) + 6px);
}
html.ui9.page-launch .cols > div:first-child > section.card:last-child { margin-bottom: 0; }
html.ui9.page-launch .cols > div:first-child > section.card > header {
  flex-wrap: nowrap; gap: 9px; min-height: 40px; padding: 0 12px 0 14px; border-bottom: 0; background: none;
}
html.ui9.page-launch .cols .card > header .hint { font-size: 12px; font-weight: 400; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
html.ui9.page-launch .cols .card > header h2 { white-space: nowrap; }
html.ui9.page-launch .cols .card > header .spacer { flex: 1 1 0; min-width: 8px; }
html.ui9.page-launch .cols .card > header .btn { flex: none; }
html.ui9.page-launch .cols .card > .body { padding: 0 14px 13px; }
/* the location list hangs below its field: it must not stop at the card's edge or under the next step */
html.ui9.page-launch .cols > div:first-child > section.card:has(.locresults.show) { overflow: visible; z-index: 5; }
/* the chip: 01, 02. Green once the step looks filled. */
html.ui9.page-launch .step-no { display: block; width: auto; height: auto; flex: none; white-space: nowrap; letter-spacing: .02em; }
/* 01-base's sans list carries !important and an id, so the mono chip the spec asks for needs one too */
html.ui9.page-launch #viewLaunch .step-no { font-family: var(--mono) !important; }
html.ui9.page-launch .cols .step-no::before { content: "0"; }
html.ui9.page-launch section.v9-ok .step-no { background: var(--live-bg) !important; color: var(--live) !important; }
/* the colour spine stays: the step you are in */
html.ui9.page-launch section.v9-here::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; z-index: 1; background: var(--grad); }
/* the header value is for folded steps only */
html.ui9.page-launch .v9-sumv { display: none; flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* fields: same parts, tighter rhythm */
html.ui9.page-launch .cols .field { margin: 10px 0 0; min-width: 0; }
html.ui9.page-launch .cols .field:last-child { margin-bottom: 0; }
html.ui9.page-launch .cols .body > .field:first-child, html.ui9.page-launch .cols .body > .row:first-child, html.ui9.page-launch #campExistingNote[style*="none"] + .field { margin-top: 0; }
html.ui9.page-launch .cols .field .field { border: 0; }
html.ui9.page-launch .cols :is(.row, .row3) { gap: 10px; margin-top: 10px; }
html.ui9.page-launch .cols :is(.row, .row3) > .field { margin-top: 0; }
html.ui9.page-launch .cols .body > :is(.row, .row3):first-child { margin-top: 0; }
html.ui9.page-launch .cols .help { margin-top: 4px; font-size: 12px; line-height: 1.35; }
html.ui9.page-launch .cols .help:empty { display: none; }
html.ui9.page-launch .cols label.f .muted { font-family: var(--sans); font-size: 11.5px; letter-spacing: 0; color: var(--text-dim); }
/* .field > label is a HUD label in the core; these are sentences */
html.ui9.page-launch .field > label.switchrow { gap: 8px; font-family: var(--sans) !important; font-size: 12.5px !important; letter-spacing: 0 !important; text-transform: none; line-height: 1.35; color: var(--text-dim); align-items: baseline; }
html.ui9.page-launch .switchrow b { font-weight: 500; color: var(--text); }
html.ui9.page-launch .switchrow input { width: 14px; height: 14px; margin: 0; flex: none; align-self: center; }
html.ui9.page-launch .cols .seg { max-width: 100%; flex-wrap: wrap; }

/* Destination: search beside the list, Recent under it */
html.ui9.page-launch #selAcct { width: 100%; }
html.ui9.page-launch .field:has(> #selAcct) { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 6px; align-items: start; }
html.ui9.page-launch .field:has(> #selAcct) > :not(input, select) { grid-column: 1 / -1; }
html.ui9.page-launch .field:has(> #selAcct) > input.input { margin: 0 !important; max-width: none !important; }
html.ui9.page-launch .field:has(> #selAcct) > #selAcct:first-of-type { grid-column: auto; }
/* the account line rides in the step header, in place of the hint: one line of its text, the rest a key away. Red text is never folded. */
html.ui9.page-launch.v9-built .field:has(> #selOrg) > .help { display: none; }
/* until the enhancer has moved them they take no room, so nothing jumps. If ui9.js never comes they return after 3s. */
html.ui9.page-launch:not(.v9-built) :is(.field:has(> #selOrg) > .help, #acctHelp, .field:has(> #selAcct) > .meta-only) { max-height: 0; margin: 0 !important; overflow: hidden; visibility: hidden; animation: v9l-reveal 0s 3s forwards; }
html.ui9.page-launch .cols .card > header:has(> #acctHelp) > .hint { display: none; }
html.ui9.page-launch .cols .card > header:has(> #acctHelp) > .spacer { flex: 0 0 8px; }
html.ui9.page-launch .cols .card > header > #acctHelp { order: 0; flex: 1 1 0; min-width: 0; margin: 0; font-size: 12px; font-weight: 400; line-height: 18px; color: var(--text-dim); }
html.ui9.page-launch #acctHelp:not(.v9-aopen, .v9-aurgent) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-launch #acctHelp:not(.v9-aopen, .v9-aurgent) br { display: none; }
html.ui9.page-launch #acctHelp:not(.v9-aopen, .v9-aurgent) br + span::before { content: " "; }
html.ui9.page-launch .cols .card > header:has(> .v9-aopen, > .v9-aurgent) { flex-wrap: wrap; padding-bottom: 6px; }
html.ui9.page-launch .cols .card > header > :is(.v9-aopen, .v9-aurgent) { order: 9; flex: 1 1 100%; }
html.ui9.page-launch .v9-amore { flex: none; height: 18px; padding: 0 2px; border: 0; background: none; cursor: pointer; font: 450 12px/18px var(--sans); color: var(--text-dim); }
html.ui9.page-launch .v9-amore:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
html.ui9.page-launch .v9-amore[hidden] { display: none; }
/* + More accounts moved up to the Recent row: what stays behind is the note and the list it opens */
html.ui9.page-launch .field:has(> #selAcct) > .meta-only { margin-top: 0 !important; }
html.ui9.page-launch #multiAcctNote:not(:empty) { display: block; margin-top: 4px; }
html.ui9.page-launch .v9-recent { display: flex; align-items: center; gap: 8px; margin-top: 9px; min-width: 0; }
html.ui9.page-launch .v9-recent[hidden] { display: none; }
html.ui9.page-launch .v9-rcl { display: flex; align-items: center; gap: 5px; flex: 1 1 0; min-width: 0; overflow: hidden; }
html.ui9.page-launch .v9-morebox { flex: none; margin-left: auto; }
html.ui9.page-launch #multiAcctBtn { padding-left: 0; }
html.ui9.page-launch .v9-recent .v9-hud { margin-right: 4px; flex: none; }
html.ui9.page-launch .v9-rc {
  flex: 0 1 auto; min-width: 44px; max-width: 190px; height: 26px; padding: 0 9px; border: 0; border-radius: 6px; cursor: pointer; font: 500 12px/1 var(--sans);
  color: var(--text-dim); background: var(--surface-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background var(--t1), color var(--t1);
}
html.ui9.page-launch .v9-rc:hover { color: var(--text); }
html.ui9.page-launch .v9-rc.on { background: var(--primary-bg); color: var(--primary-text); }
html.ui9.page-launch:not(.v9-built) .cols > div:first-child > section.card:first-child > .body { padding-bottom: 48px; }

/* Creatives: one-row picker bar. The rest sits under Filters, still inside .cols. */
html.ui9.page-launch .pickbar { gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
html.ui9.page-launch .pickbar .input { flex: 0 1 auto; width: auto !important; min-width: 0; }
html.ui9.page-launch .pickbar #cSearch { order: 1; flex: 1 1 200px; }
html.ui9.page-launch #cType { order: 2; }
html.ui9.page-launch #cBoard { order: 3; max-width: 170px; }
html.ui9.page-launch .v9-cfilt { order: 4; gap: 5px; }
html.ui9.page-launch .v9-cfilt[aria-expanded="true"] { box-shadow: inset 0 0 0 1.5px var(--text); }
html.ui9.page-launch .v9-cfilt i { min-width: 15px; height: 15px; padding: 0 3px; border-radius: 4px; display: inline-grid; place-items: center; font: 500 10px/1 var(--mono); background: var(--primary-bg); color: var(--primary-text); }
html.ui9.page-launch .v9-cfilt i[hidden] { display: none; }
html.ui9.page-launch #cOnlySel { order: 5; }
html.ui9.page-launch #cNone { order: 6; }
html.ui9.page-launch :is(#cShape, #cStatus, #cTag, #cAll, #cReload, #cSound) { order: 8; }
html.ui9.page-launch .pickbar::after { content: ""; order: 7; flex: 0 0 100%; height: 0; }
html.ui9.page-launch .pickbar:not(.v9-open) :is(#cShape, #cStatus, #cTag, #cAll, #cReload, #cSound) { display: none; }
html.ui9.page-launch:not(.v9-built) .pickbar :is(#cShape, #cStatus, #cTag, #cAll, #cReload, #cSound) { display: none; }
/* fixed rows, not aspect-ratio: tiles collapse otherwise */
html.ui9.page-launch #cGrid {
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); grid-auto-rows: 118px; gap: 7px; max-height: 243px; padding: 1px; margin: -1px; overflow: hidden auto; scrollbar-gutter: stable; align-items: stretch;
}
html.ui9.page-launch #cGrid > .empty { grid-column: 1 / -1; align-self: center; padding: 20px; color: var(--text-dim); }
html.ui9.page-launch .tile { height: auto; border: 0; border-radius: var(--r-key); background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); }
html.ui9.page-launch .tile:hover { box-shadow: 0 0 0 1px var(--line-strong); }
html.ui9.page-launch .tile.sel { border: 0; box-shadow: 0 0 0 2px var(--accent); }
html.ui9.page-launch .tile:focus-visible { outline-offset: 1px; }
html.ui9.page-launch .tile > :is(img, video, .ph) { height: 92px; object-fit: cover; object-position: 50% 26%; }
html.ui9.page-launch .tile .ph { font-size: 15px; }
html.ui9.page-launch .tile .cap { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; padding: 0 7px; background: none; color: var(--text); font-size: 11.5px; font-weight: 500; line-height: 26px; }
html.ui9.page-launch .tile .tick { top: 5px; right: auto; left: 5px; width: 18px; height: 18px; border: 0; border-radius: 4px; background: rgba(16,13,9,.55); box-shadow: inset 0 0 0 1.5px var(--on-bezel); }
html.ui9.page-launch .tile.sel .tick { background: var(--accent); box-shadow: none; }
html.ui9.page-launch .tile .vbadge { top: auto; left: auto; right: 5px; bottom: 31px; padding: 2px 4px; font: 500 10px/1.1 var(--mono); letter-spacing: 0; background: rgba(16,13,9,.72); }
html.ui9.page-launch .gridfoot { justify-content: flex-start; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--text-dim); }
html.ui9.page-launch .gridfoot:empty { display: none; }
html.ui9.page-launch #verBar { margin-top: 8px !important; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
html.ui9.page-launch #verBar .muted { margin: 0 !important; font-size: 12px; color: var(--text-dim); }
html.ui9.page-launch #selCount { font: 500 11px/1 var(--mono); color: var(--text-dim); white-space: nowrap; }

/* search box beside the list it narrows */
html.ui9.page-launch :is(#tplWrap, #campExisting .field):has(> .pickfilter) { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); column-gap: 6px; }
html.ui9.page-launch :is(#tplWrap, #campExisting .field):has(> .pickfilter) > :is(label, .help) { grid-column: 1 / -1; }
html.ui9.page-launch .field:has(> #selRefAd) { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); column-gap: 6px; }
html.ui9.page-launch .field:has(> #selRefAd) > :is(label, .help) { grid-column: 1 / -1; }
html.ui9.page-launch .pickfilter { margin: 0 !important; }

/* NewsBreak targeting and the shared bits */
html.ui9.page-launch .locpick { padding: 9px 10px; margin-top: 4px; border: 0; border-radius: var(--r-key); box-shadow: inset 0 0 0 1px var(--hair); background: none; }
html.ui9.page-launch .locpick .locrow > b { font: 500 10px/1.8 var(--mono); letter-spacing: .085em; color: var(--text-dim); }
html.ui9.page-launch .locchip, html.ui9.page-launch .geochip { border-radius: var(--r-cap); padding: 2px 7px; font-size: 12px; font-weight: 500; }
html.ui9.page-launch .tokchip { height: 20px; padding: 0 6px; border: 0; border-radius: var(--r-cap); font: 500 11px/1 var(--mono); background: var(--surface-2); color: var(--text-dim); }
html.ui9.page-launch .tokchip:hover { color: var(--text); }
html.ui9.page-launch .nbtok .tokhint { font: 500 10px/1 var(--mono); letter-spacing: .085em; color: var(--text-dim); }
html.ui9.page-launch .recentsel { margin-top: 5px; font-size: 12px; }
html.ui9.page-launch .cols .note { padding: 8px 10px; font-size: 12.5px; }
/* NewsBreak red is an alarm here: an information note stays neutral, so an error is the only thing that looks like one */
html.ui9.nbtheme.page-launch .note-info { background: var(--surface-2); color: var(--text); }
html.ui9.nbtheme.page-launch .note-info :is(b, a) { color: inherit; }
html.ui9.page-launch #nbScratchWrap > label.f { margin-top: 12px !important; }
html.ui9.page-launch #nbScratchWrap > label.f:first-child { margin-top: 0 !important; }
html.ui9.page-launch #nbScratchWrap .muted { color: var(--text-dim); }
html.ui9.page-launch .asset { gap: 10px; }
html.ui9.page-launch .apreview { width: 62px; height: 50px; border-radius: var(--r-key); border: 0; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface-2); }
html.ui9.page-launch .apreview .muted { color: var(--text-dim); }
html.ui9.page-launch .ameta .help { margin-top: 0; }
/* the Brand logo sheet sets this list out in full: here it is two lines and the two keys */
html.ui9.page-launch #logoHelp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 12px; line-height: 1.35; }
html.ui9.page-launch .logo-acts { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 6px; }
html.ui9.page-launch .logo-acts .btn { flex: none; padding: 0 7px; }
html.ui9.page-launch #logoUploadBtn { margin-left: 0; }

/* Meta's real panels: open by default, each header shows the chosen value. The chevron tidies. */
html.ui9.page-launch .mpanel { margin-top: 10px; padding: 0; border-radius: 9px; background: none; box-shadow: 0 0 0 1px var(--hair); overflow: clip; }
html.ui9.page-launch .mpanel > .ph { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px 0 12px; background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); color: var(--text); font-size: 12.5px; font-weight: 600; }
html.ui9.page-launch .mpanel > .ph > span:first-child { flex: none; white-space: nowrap; }
html.ui9.page-launch .mpanel > .ph .muted { display: none; }
html.ui9.page-launch .mpanel > .ph .chev { order: -1; margin: 0; font-size: 10px; color: var(--text-dim); }
html.ui9.page-launch .v9-val { margin-left: auto; min-width: 0; font: 400 12px/1.2 var(--sans); color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-launch .mpanel > .pb { padding: 10px 12px 12px; border-radius: 0; background: none; }
html.ui9.page-launch .mpanel > .pb > :first-child, html.ui9.page-launch .mpanel > .pb > .field:first-child { margin-top: 0; }
html.ui9.page-launch .meta-more { border-top: 0; margin-top: 0; padding-top: 0; }
html.ui9.page-launch #placeBar.meta-more.show { display: inline-flex; align-items: center; gap: 8px; }
html.ui9.page-launch .meta-more code { font-size: 11px; }
/* radio cards: machined, and two across */
html.ui9.page-launch .mcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; align-items: start; }
html.ui9.page-launch .mcgroup { grid-column: 1 / -1; margin: 4px 0 0; font: 500 10px/1 var(--mono); letter-spacing: .085em; color: var(--text-dim); }
html.ui9.page-launch .mcard { padding: 7px 9px; gap: 8px; border: 0; border-radius: var(--r-key); box-shadow: inset 0 0 0 1px var(--line); }
html.ui9.page-launch .mcard:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
html.ui9.page-launch .mcard.on { padding: 7px 9px; border: 0; box-shadow: inset 0 0 0 1.5px var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
html.ui9.page-launch .mcard .t { display: block; margin-bottom: 2px; font-size: 12.5px; font-weight: 600; }
html.ui9.page-launch .mcard .d { font-size: 11.5px; line-height: 1.3; }
html.ui9.page-launch .mcard .dot { width: 14px; height: 14px; margin-top: 2px; border: 0; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
html.ui9.page-launch .mcard.on .dot { background: transparent; box-shadow: inset 0 0 0 4px var(--accent); }
html.ui9.page-launch .mcard .dot::after { content: none; }
html.ui9.page-launch .mcard { position: relative; }
html.ui9.page-launch .mcard:has(.badge) { padding-bottom: 24px; }
html.ui9.page-launch .mcard .badge { position: absolute; right: 6px; bottom: 5px; margin: 0; padding: 2px 5px; border-radius: var(--r-cap); font-size: 10px; font-weight: 600; }
/* the Meta panels: what can share a row does */
@media (min-width: 861px) {
  html.ui9.page-launch .pb:has(> .row3 #mBilling) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  html.ui9.page-launch .pb:has(> .row3 #mBilling) > .row3 { display: contents; }
  html.ui9.page-launch .pb:has(#mSpecialCat), html.ui9.page-launch .pb:has(#mMultiAds) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; }
  html.ui9.page-launch .pb:is(:has(#mSpecialCat), :has(#mMultiAds)) > * { grid-column: 1 / -1; }
  html.ui9.page-launch .pb > .row:has(#mSpecialCat), html.ui9.page-launch .pb > .field:has(> #mMultiAds) { grid-column: 1; grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-launch .pb > .row:has(#mSpendCap), html.ui9.page-launch .pb > .field:has(> #mAdvCreative) { grid-column: 2; grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-launch .row3 > .field:has(#geoSearch) { order: 5; grid-column: 1 / -1; }
}

/* Ad copy: the fields, and the ad as it will read in the feed beside them */
html.ui9.page-launch .cols > div:first-child > section.card:nth-child(5) > .body { display: grid; grid-template-columns: minmax(0, 1fr) 262px; column-gap: 14px; align-items: start; }
html.ui9.page-launch .cols > div:first-child > section.card:nth-child(5) > .body > * { grid-column: 1; min-width: 0; }
html.ui9.page-launch .cols > div:first-child > section.card:nth-child(5) > .body > .v9-feed { grid-column: 2; grid-row: 1 / span 12; position: sticky; top: calc(var(--shell-h) + var(--bar-h) + 6px); margin-top: 0; }
html.ui9.page-launch .v9-feed > .v9-hud { display: block; margin-bottom: 6px; }
html.ui9.page-launch .v9-adcard { border-radius: var(--r-card); overflow: hidden; background: var(--elevated); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
html.ui9.page-launch .v9-adcard .h { display: flex; align-items: center; gap: 6px; padding: 8px 10px; font-size: 11.5px; color: var(--text-dim); }
html.ui9.page-launch .v9-adcard .h .m { flex: none; }
html.ui9.page-launch .v9-adcard .h .v9-lg { width: 14px; height: 14px; }
html.ui9.page-launch .v9-adcard .h b { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
html.ui9.page-launch .v9-adcard .h > span:last-child { margin-left: auto; flex: none; }
html.ui9.page-launch .v9-adcard .p { padding: 0 10px 7px; font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
html.ui9.page-launch .v9-adcard .p[hidden] { display: none; }
html.ui9.page-launch .v9-adcard .t { padding: 0 10px 7px; font-size: 14px; font-weight: 600; line-height: 1.25; letter-spacing: -.012em; overflow-wrap: anywhere; }
html.ui9.page-launch .v9-adcard .pic { aspect-ratio: 16 / 10; background: var(--mat); }
html.ui9.page-launch .v9-adcard .pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; display: block; }
html.ui9.page-launch .v9-adcard .pic img[hidden] { display: none; }
html.ui9.page-launch .v9-adcard .ft { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
html.ui9.page-launch .v9-adcard .d { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.3; color: var(--text-dim); overflow-wrap: anywhere; }
html.ui9.page-launch .v9-adcard .c { flex: none; height: 26px; padding: 0 9px; border-radius: 6px; display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; color: #fff; background: var(--accent); }
html.ui9.page-launch .v9-adcard .ph { color: var(--text-dim); font-weight: 400; }
html.ui9.page-launch.nbtheme .v9-adcard .t { order: 0; }
html.ui9.page-launch:not(.nbtheme) .v9-adcard { display: flex; flex-direction: column; }
html.ui9.page-launch:not(.nbtheme) .v9-adcard .pic { order: 2; }
html.ui9.page-launch:not(.nbtheme) .v9-adcard .t { order: 3; padding: 8px 10px 0; font-size: 13px; }
html.ui9.page-launch:not(.nbtheme) .v9-adcard .ft { order: 4; }
html.ui9.page-launch:not(.nbtheme) .v9-adcard .h, html.ui9.page-launch:not(.nbtheme) .v9-adcard .p { order: 1; }

/* ---- one step at a time ---- */
html.ui9.page-launch.v9-onestep .cols > div:first-child > section.card > header { cursor: pointer; }
html.ui9.page-launch.v9-onestep .cols > div:first-child > section.card:not(.v9-open) > .body { display: none; }
html.ui9.page-launch.v9-onestep .cols > div:first-child > section.card:not(.v9-open) .v9-sumv { display: block; }
html.ui9.page-launch.v9-onestep .cols > div:first-child > section.card:not(.v9-open) > header :is(.hint, .spacer, .btn, #selCount) { display: none; }

/* ---- the ticket ---- */
html.ui9.page-launch .side {
  position: sticky; top: calc(var(--shell-h) + var(--bar-h) + 4px); display: flex; flex-direction: column; min-width: 0; overflow: visible;
  max-height: calc(100vh - var(--shell-h) - var(--bar-h) - 16px);
}
html.ui9.page-launch .side > section.card:last-child {
  --bi: -4px; flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; margin: 0 !important; overflow: visible; background: var(--surface); border-radius: var(--r-ticket);
}
html.ui9.page-launch .side > section.card:last-child::after { --c: var(--accent); --l: 12px; }
html.ui9.page-launch .side > section.card:last-child > header { display: none; }
html.ui9.page-launch .side > section.card:last-child > .body { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 0; }
html.ui9.page-launch .side :is(#urlSlot, section.card:last-child > .body > .note) { display: none; }
html.ui9.page-launch.v9-built .side > section.card:first-child, html.ui9.page-launch.v9-built #sumList { display: none; }
/* before the enhancer: the ticket holds its shape. If ui9.js never comes, what it hides comes back after 3s. */
@keyframes v9l-reveal { to { max-height: 60vh; visibility: visible; overflow: auto; margin-bottom: 8px; padding: 6px 0; } }
/* .card takes no animation in the core, so its two children carry it */
html.ui9.page-launch:not(.v9-built) .side > section.card:first-child { border: 0; margin: 0; background: none; }
html.ui9.page-launch:not(.v9-built) .side > section.card:first-child > *,
html.ui9.page-launch:not(.v9-built) #cardCampaign .field:has(> #mStatus) { max-height: 0; margin: 0; padding: 0; overflow: hidden; visibility: hidden; border: 0; animation: v9l-reveal 0s 3s forwards; }
html.ui9.page-launch:not(.v9-built) #sumList { padding: 12px 14px; visibility: hidden; min-height: 300px; animation: v9l-reveal 0s 3s forwards; }
html.ui9.page-launch:not(.v9-built) #viewLaunch > .presetbar { position: absolute; z-index: 2; top: 0; right: 0; width: var(--ticket-w); }

/* the core's palette uses this class name too: this one is on the ticket */
html.ui9.page-launch .side .v9-plan { display: block; }
html.ui9.page-launch:not(.v9-built) #btnLaunch { width: calc(100% - 28px) !important; margin: 0 14px 12px !important; flex: none; }
html.ui9.page-launch .v9-ttop { flex: 0 1 auto; min-height: 72px; overflow: hidden auto; padding: 12px 14px 10px; scrollbar-width: thin; }
html.ui9.page-launch .presetbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0 0 8px; border: 0; border-radius: 0; box-shadow: none; background: none; border-bottom: 1px solid var(--hair);
}
html.ui9.page-launch:not(.v9-built) .presetbar { padding: 12px 14px 8px; }
html.ui9.page-launch .presetbar .f { font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--text-dim); }
html.ui9.page-launch .presetbar #presetSel { flex: 1 1 calc(100% - 118px); width: 0 !important; min-width: 0 !important; height: 30px; min-height: 30px; font-size: 12.5px; }
html.ui9.page-launch #presetApply { flex: none; height: 30px; }
html.ui9.page-launch #presetSave { order: 5; }
html.ui9.page-launch #presetDel { order: 6; }
html.ui9.page-launch #presetNote { order: 7; }
html.ui9.page-launch :is(#presetSave, #presetDel) { height: 22px; min-height: 22px; padding: 0 5px; font-size: 12px; font-weight: 450; }
html.ui9.page-launch #presetSave { margin-left: -5px; }
html.ui9.page-launch #presetNote { flex: 1 1 100%; font-size: 12px !important; line-height: 1.3; color: var(--text-dim); }
html.ui9.page-launch #presetNote:empty { display: none; }
/* no preset chosen: one row, and nothing to delete. Chosen: Delete keeps its distance from Save. */
html.ui9.page-launch .presetbar.v9-pnone #presetDel { display: none; }
html.ui9.page-launch .presetbar.v9-pnone #presetSel { flex: 1 1 0; }
html.ui9.page-launch .presetbar.v9-pnone #presetSave { order: 3; height: 30px; min-height: 30px; margin-left: -2px; }
html.ui9.page-launch .presetbar:not(.v9-pnone) #presetDel { margin-left: auto; }

html.ui9.page-launch .v9l-thumbs { display: flex; gap: 4px; margin-top: 10px; }
html.ui9.page-launch .v9l-thumbs[hidden] { display: none; }
html.ui9.page-launch .v9l-thumbs > * { flex: 0 0 auto; width: 46px; height: 52px; border-radius: 5px; object-fit: cover; object-position: 50% 26%; box-shadow: 0 0 0 1px var(--line); }
html.ui9.page-launch .v9l-thumbs span { display: grid; place-items: center; background: var(--surface-2); font: 500 11px/1 var(--mono); color: var(--text-dim); }
html.ui9.page-launch .v9l-acct { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 14px; font-weight: 600; letter-spacing: -.012em; min-width: 0; }
html.ui9.page-launch .v9l-acct span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
html.ui9.page-launch .v9l-acct.miss { color: var(--review); font-weight: 500; }
html.ui9.page-launch .v9l-struct { margin-top: 4px; font: 500 12px/1.35 var(--mono); letter-spacing: -.02em; color: var(--text); }
html.ui9.page-launch .v9l-struct i { font-style: normal; color: var(--text-dim); padding: 0 1px; }
html.ui9.page-launch .v9l-rows { margin: 9px 0 0; border-top: 1px solid var(--hair); }
html.ui9.page-launch .v9l-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-height: 25px; padding: 4px 0 3px; border-bottom: 1px solid var(--hair); font-size: 12.5px; }
html.ui9.page-launch .v9l-rows dt { flex: none; color: var(--text-dim); font-size: 12px; white-space: nowrap; }
html.ui9.page-launch .v9l-rows dd { margin: 0; min-width: 0; text-align: right; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-launch .v9l-rows dd.mono { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
html.ui9.page-launch .v9l-left { margin-top: 9px; }
html.ui9.page-launch .v9l-left .v9-hud { color: var(--review); margin-bottom: 6px; }
html.ui9.page-launch .v9l-need { display: flex; flex-wrap: wrap; gap: 4px; }
html.ui9.page-launch .v9l-need button { height: 24px; padding: 0 8px; border: 0; border-radius: 6px; cursor: pointer; font: 500 12px/1 var(--sans); color: var(--review); background: var(--review-bg); }
html.ui9.page-launch .v9l-need button:hover { text-decoration: underline; text-underline-offset: 2px; }
html.ui9.page-launch .v9l-ok { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; font-weight: 500; color: var(--live); }
html.ui9.page-launch .v9l-ok .v9-i { width: 14px; height: 14px; stroke-width: 2.2; }

/* perforation: the boarding pass, alive again */
html.ui9.page-launch .v9-perf { position: relative; flex: none; height: 16px; }
html.ui9.page-launch .v9-perf::before { content: ""; position: absolute; left: 13px; right: 13px; top: 7.5px; border-top: 1.5px dashed var(--line-strong); }
html.ui9.page-launch .v9-perf i { position: absolute; top: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
html.ui9.page-launch .v9-perf i:first-child { left: -8.5px; clip-path: inset(0 0 0 8px); }
html.ui9.page-launch .v9-perf i:last-child { right: -8.5px; clip-path: inset(0 8px 0 0); }

/* the stub: the status, the words, the button. It never scrolls. */
html.ui9.page-launch .v9-stub { position: relative; flex: none; padding: 2px 14px 12px; }
html.ui9.page-launch .v9-stub > .field { margin: 0; }
html.ui9.page-launch .v9-stub > .field > label.f { display: none; }
html.ui9.page-launch #mStatus { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 34px; }
html.ui9.page-launch #mStatus button { justify-content: center; min-height: 30px; }
html.ui9.page-launch #mStatus button[data-v="ACTIVE"].on { background: var(--hazard); color: var(--go-ink); }
html.ui9.page-launch #mStatusHelp { margin: 7px 1px 0; font-size: 12px; line-height: 1.35; color: var(--text-dim); }
html.ui9.page-launch .v9-expo { margin: 3px 1px 0; font-size: 12px; line-height: 1.35; font-weight: 550; color: var(--text); }
html.ui9.page-launch .v9-expo[hidden] { display: none; }
/* the pinned stub's failure row. Above 1100 the record is in the ticket itself, so there is nothing to point at. */
html.ui9.page-launch .v9-why { display: none; }
html.ui9.page-launch #btnLaunch {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 46px; margin-top: 8px !important; padding: 0 12px; border: 0; border-radius: 9px;
  background: var(--grad); color: #fff; font: 600 14px/1 var(--sans); letter-spacing: -.01em; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 rgba(22,19,14,.3); transition: filter var(--t1);
}
html.ui9.page-launch #btnLaunch:hover { color: #fff; filter: brightness(1.07); }
html.ui9.page-launch #btnLaunch:disabled { opacity: .75; background: var(--grad); color: #fff; }
html.ui9.page-launch #btnLaunch.btn-danger { height: 52px; border: 5px solid transparent; font-size: 13.5px; box-shadow: none; color: #ffcf5c; }
html.ui9.page-launch #btnLaunch.btn-danger:hover { color: #ffcf5c; }
/* Save as 1-click sits after the stub, not in it: the stub is pinned at 1100 and under */
html.ui9.page-launch .v9-qlslot { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: -8px; padding: 0 14px 7px; }
html.ui9.page-launch .v9-qlslot .v9-one { margin-right: auto; }
html.ui9.page-launch #btnQlSave { display: block; width: auto !important; min-height: 0; height: 24px; margin: 0 !important; padding: 0 2px; font-size: 12px; font-weight: 450; color: var(--text-dim); }
html.ui9.page-launch #btnQlSave:hover { background: none; color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
html.ui9.page-launch #qlSaveOut { flex: 0 1 auto; min-height: 0; overflow: auto; padding: 0 14px; }
html.ui9.page-launch #qlSaveOut:empty { display: none; }
/* the same segments as the rail, at -18deg. A real quantity: the run's share done. */
html.ui9.page-launch #progBar {
  flex: none; height: 6px; margin: 0 14px 10px; border-radius: 0; overflow: hidden; background: repeating-linear-gradient(90deg, var(--gauge-track) 0 10px, transparent 10px 12px); transform: skewX(-18deg);
}
html.ui9.page-launch #progBar > i { display: block; height: 100%; border-radius: 0; background: repeating-linear-gradient(90deg, var(--accent) 0 10px, transparent 10px 12px); }
html.ui9.page-launch #progList { flex: 0 1 auto; min-height: 0; margin: 0; padding: 0 14px; max-height: 200px; overflow: hidden auto; scrollbar-width: thin; }
html.ui9.page-launch #progList:empty { display: none; }
html.ui9.page-launch #progList li { padding: 5px 0; gap: 7px; font-size: 12.5px; border-bottom-color: var(--hair); }
html.ui9.page-launch #runResult { flex: 0 1 auto; min-height: 0; overflow: auto; padding: 0 14px; }
html.ui9.page-launch #runResult:not(:empty) { padding-bottom: 12px; }
html.ui9.page-launch #runResult .note { font-size: 12px; line-height: 1.4; }

/* once it has gone out, the button is gone: no armed hazard beside "created" */
html.ui9.page-launch .v9-donecard { padding: 2px 1px 0; }
html.ui9.page-launch .v9-donecard[hidden] { display: none; }
html.ui9.page-launch .v9-donecard b { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; letter-spacing: -.012em; }
html.ui9.page-launch .v9-donecard b .v9-i { width: 16px; height: 16px; stroke-width: 2.2; color: var(--live); }
html.ui9.page-launch .v9-donecard.part b .v9-i { color: var(--review); }
html.ui9.page-launch .v9-donecard p { margin: 3px 0 0; font-size: 12px; line-height: 1.35; color: var(--text-dim); }
html.ui9.page-launch .v9l-acts { display: flex; gap: 6px; margin-top: 9px; }
html.ui9.page-launch .v9l-acts .btn { flex: 1; }
html.ui9.page-launch .side.v9-done :is(.v9-stub > .field, .v9-expo, #btnLaunch, #btnQlSave) { display: none; }
html.ui9.page-launch .side.v9-done #progList { flex: none; max-height: 120px; }
html.ui9.page-launch .side.v9-was :is(#runResult, #progBar, #progList) { display: none; }
/* a clean run: the stub says it once. Only the page's plain success line and the run log go: its warnings never do. */
html.ui9.page-launch .side:is(.v9-clean, .v9-fail, .v9-failwas) :is(#progBar, #progList) { display: none; }
html.ui9.page-launch .side.v9-clean #runResult > .note-ok { display: none; }
html.ui9.page-launch .side.v9-done #runResult { overflow: visible; flex: none; }
/* the upsell is one key under Launch another */
html.ui9.page-launch .side.v9-done #runResult > .note:has(> #qlSaveBtn) { display: block !important; margin: 0 !important; padding: 0; border: 0; background: none; box-shadow: none; }
html.ui9.page-launch .side.v9-done #runResult > .note:has(> #qlSaveBtn) > span { display: none; }
html.ui9.page-launch .side.v9-long #runResult > .note:has(> #qlSaveBtn) { margin-top: 6px !important; }
/* quiet: the focal point here is what was created */
html.ui9.page-launch .side.v9-done #qlSaveBtn { display: block; width: 100%; height: 30px; min-height: 30px; margin: 0 !important; background: none; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); font-weight: 500; }
html.ui9.page-launch .side.v9-done #qlSaveBtn:hover { background: var(--hover); }
/* a failure, a part failure, a warning or a dialog is what you read now: the plan folds to who and what, and the record gets the room */
@media (min-width: 1101px) {
  html.ui9.page-launch .side:is(.v9-long, .v9-fail, :has(#runResult #qlName), :has(#qlSaveOut > *)) .v9-ttop { flex: none; max-height: 72px; overflow: hidden; padding-bottom: 6px; }
  html.ui9.page-launch .side:is(.v9-long, .v9-fail, :has(#runResult #qlName), :has(#qlSaveOut > *)) :is(.presetbar, .v9l-thumbs, .v9l-rows, .v9l-left, .v9l-ok) { display: none; }
  html.ui9.page-launch .side:is(.v9-long, .v9-fail, :has(#runResult #qlName), :has(#qlSaveOut > *)) .v9l-acct { margin-top: 0; }
  html.ui9.page-launch .side:is(.v9-long, .v9-fail, :has(#runResult #qlName)) #runResult { flex: 1 1 auto; min-height: 0; overflow: hidden auto; scrollbar-width: thin; }
  html.ui9.page-launch .side.v9-failwas #runResult { flex: none; max-height: 120px; overflow: hidden auto; scrollbar-width: thin; }
}
html.ui9.page-launch .side.v9-fail #runResult .note-err { font-size: 12.5px; }
/* every pick went out, so the grid has nothing to show: that is not an error */
html.ui9.page-launch .cols:has(.side.v9-done) #selCount { visibility: hidden; }
html.ui9.page-launch .cols:has(.side.v9-done) #cGrid { grid-auto-rows: auto; }
html.ui9.page-launch .cols:has(.side.v9-done) #cGrid > .empty { min-height: 56px; padding: 0; display: grid; place-items: center; font-size: 0; }
html.ui9.page-launch .cols:has(.side.v9-done) #cGrid > .empty::before { content: "These went out. Pick more, or press Launch another."; font-size: 12.5px; color: var(--text-dim); }
html.ui9.page-launch .cols:has(.side.v9-done.v9-part) #cGrid > .empty::before { content: "Picks cleared. See the ticket for what did not go out."; }
/* the toast is on the button now, not twice */
html.ui9.page-launch.v9-toastnote #toast { visibility: hidden; }

/* ---- rail: the sequence on ink ---- */
html.ui9.page-launch .v9l-ro { margin-top: 2px; }
html.ui9.page-launch .v9l-seqbar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; height: 9px; transform: skewX(-18deg); margin: 10px 2px 11px; }
html.ui9.page-launch .v9l-seqbar i { background: rgba(244,239,228,.13); transition: background var(--t3); }
html.ui9.page-launch .v9l-seqbar i.on { background: var(--lamp-ok); }
html.ui9.page-launch .v9l-n { display: grid; grid-template-columns: .8fr .9fr 1.2fr; gap: 4px; }
html.ui9.page-launch .v9l-n > div { min-width: 0; }
html.ui9.page-launch .v9l-n span { display: block; margin-top: 5px; font: 500 10px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--on-bezel-dim); white-space: nowrap; }
html.ui9.page-launch .v9l-n b { display: block; font: 500 15px/1 var(--mono); letter-spacing: -.035em; color: var(--on-bezel); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-launch .v9l-mro .v9l-n { grid-template-columns: auto auto minmax(0, 1fr); gap: 4px 9px; }
html.ui9.page-launch .v9l-n b small { font-size: 11px; color: var(--on-bezel-dim); letter-spacing: -.01em; }
html.ui9.page-launch .v9l-seq { flex: none; position: relative; margin: 0; padding: 2px 0 6px; list-style: none; }
html.ui9.page-launch .v9l-seq li { position: relative; }
html.ui9.page-launch .v9l-seq li:not(:last-child)::before { content: ""; position: absolute; left: 14.5px; top: 25px; bottom: -7px; width: 1px; background: var(--bezel-line-2); z-index: 0; }
html.ui9.page-launch .v9l-seq li.done:not(:last-child)::before { background: var(--lamp-ok); opacity: .55; }
html.ui9.page-launch .v9l-b {
  position: relative; z-index: 1; display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 10px; align-items: center; width: 100%; min-height: 44px; padding: 5px 8px;
  border: 0; border-radius: var(--r-key); background: none; cursor: pointer; text-align: left; color: var(--on-bezel-dim); transition: background var(--t1), color var(--t1);
}
html.ui9.page-launch .v9l-b:hover { background: rgba(244,239,228,.06); color: var(--on-bezel); }
html.ui9.page-launch .v9l-led { grid-row: 1 / 3; align-self: start; margin-top: 3px; width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; background: var(--bezel); box-shadow: inset 0 0 0 1.5px var(--on-bezel-faint); }
html.ui9.page-launch .v9l-b b { font: 500 13px/1.25 var(--sans); }
html.ui9.page-launch .v9l-b small { font-size: 11.5px; line-height: 1.3; color: var(--on-bezel-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-launch .v9l-seq li.done .v9l-led { background: var(--lamp-ok); box-shadow: 0 0 8px rgba(87,214,141,.5); color: var(--bezel-well); }
html.ui9.page-launch .v9l-seq li.done .v9l-led::after { content: ""; width: 6px; height: 3px; border-left: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg) translate(.5px, -1px); }
html.ui9.page-launch .v9l-seq li.todo small { color: var(--hazard); }
html.ui9.page-launch .v9l-seq li.here .v9l-b { background: rgba(244,239,228,.095); color: var(--on-bezel); box-shadow: inset 0 1px 0 rgba(244,239,228,.06); }
html.ui9.page-launch .v9l-seq li.here:not(.done) .v9l-led { box-shadow: inset 0 0 0 1.5px var(--on-bezel), 0 0 0 3px rgba(244,239,228,.1); }
html.ui9.page-launch .v9l-seq li.here:not(.done) .v9l-led::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--on-bezel); }
html.ui9.page-launch .v9l-seq li.go .v9l-led { box-shadow: none; background: transparent; color: var(--on-bezel-faint); }
html.ui9.page-launch .v9l-seq li.go .v9l-led::after { content: ""; width: 0; height: 0; margin-left: 2px; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
html.ui9.page-launch .v9l-seq li.go.armed .v9l-led { color: var(--lamp-ok); }
html.ui9.page-launch .v9l-seq li.go.armed .v9l-b { color: var(--on-bezel); }
html.ui9.page-launch .v9l-seq li.go.sent .v9l-led { background: var(--lamp-ok); color: var(--bezel-well); }
html.ui9.page-launch .v9l-seq li.go.sent .v9l-led::after { width: 6px; height: 3px; margin: 0; border: 0; border-left: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg) translate(.5px, -1px); }
/* a launch that failed: the rail says so, in amber, until the next change */
html.ui9.page-launch [data-ux-left].v9l-bad { color: var(--lamp-work); }
html.ui9.page-launch .v9-rail:has(li.failed) .v9l-seqbar i.on { background: var(--lamp-work); }
html.ui9.page-launch .v9l-seq li.go.failed .v9l-led { color: var(--lamp-work); }
html.ui9.page-launch .v9l-seq li.go.failed .v9l-b { color: var(--on-bezel); }
html.ui9.page-launch .v9l-seq li.go.failed small { color: var(--lamp-work); }
/* Manage: the sequence means nothing beside live campaigns. Who you are looking at, and the way back. */
html.ui9.page-launch:not(.v9-manage) :is(.v9l-mro, .v9l-back) { display: none; }
html.ui9.page-launch.v9-manage :is(.v9l-ro, .v9l-seq, .v9l-agent) { display: none; }
html.ui9.page-launch.v9-manage .v9l-mro { display: block; margin-top: 2px; }
html.ui9.page-launch.v9-manage .v9l-back { display: grid; margin-top: 6px; color: var(--on-bezel); }
html.ui9.page-launch .v9l-back .v9l-led { background: none; box-shadow: none; color: var(--on-bezel-dim); }
html.ui9.page-launch .v9l-back .v9l-led::after { content: ""; width: 0; height: 0; margin-right: 2px; border-right: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
html.ui9.page-launch .v9l-mname { margin: 9px 2px 11px; font: 500 14px/1.25 var(--sans); letter-spacing: -.012em; color: var(--on-bezel); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-launch .v9l-mro .v9l-n { grid-template-columns: 1fr .7fr 1.2fr; }
html.ui9.page-launch .v9l-mro .v9l-n[hidden] { display: none; }
html.ui9.page-launch .v9l-mro .v9l-n span { letter-spacing: .03em; }
html.ui9.page-launch .v9l-agent { flex: none; margin: auto 0 10px; padding: 8px 10px 9px; border-radius: 9px; background: var(--bezel-2); box-shadow: inset 0 0 0 1px var(--bezel-line); }
html.ui9.page-launch .v9l-agent .v9-hud { color: var(--on-bezel-dim); }
html.ui9.page-launch .v9l-agent p { margin: 5px 0 0; font-size: 15px; line-height: 1.2; color: var(--on-bezel); }
@media (max-height: 800px) {
  html.ui9.page-launch .v9l-b { min-height: 42px; padding-block: 3px; }
  html.ui9.page-launch .v9l-agent { display: none; }
  html.ui9.page-launch .v9l-thumbs > * { height: 44px; }
}

/* ---- Final check: leads with the money, the confirm lands where Launch was ---- */
html.ui9.page-launch #treeSheet {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; grid-template-rows: auto auto minmax(0, 1fr) auto; width: min(860px, calc(100vw - var(--rail-w) - 24px)); max-height: none; overflow: hidden; column-gap: 8px;
}
html.ui9.page-launch #treeSheet { transition: opacity var(--t2); }
html.ui9.page-launch #treeSheet:not([style*="top"]) { max-height: 92vh; }
html.ui9.page-launch #treeSheet > header { display: contents; }
html.ui9.page-launch #treeSheet > header .spacer { display: none; }
html.ui9.page-launch .v9-fc { grid-row: 1; grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 13px 16px; background: var(--bezel); color: var(--on-bezel); }
html.ui9.page-launch .v9-fc .v { font: 450 30px/1 var(--mono); letter-spacing: -.05em; white-space: nowrap; font-variant-numeric: tabular-nums; }
html.ui9.page-launch .v9-fc .v.txt { font: 600 15px/1.2 var(--sans); letter-spacing: -.012em; }
html.ui9.page-launch .v9-fc small { display: block; margin-top: 5px; font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--on-bezel-dim); white-space: nowrap; }
html.ui9.page-launch .v9-fc p { flex: 1; min-width: 0; margin: 0; font-size: 13px; line-height: 1.35; color: var(--on-bezel-dim); }
html.ui9.page-launch .v9-fc p b { font-weight: 550; color: var(--on-bezel); }
html.ui9.page-launch .v9-fc p b.hot { color: var(--hazard); }
html.ui9.page-launch #treeSheet.v9-hot .v9-fc { box-shadow: inset 0 0 0 2px var(--hazard); }
html.ui9.page-launch #treeTitle { grid-row: 2; grid-column: 1; align-self: center; padding: 8px 0 8px 14px; font-size: 13px; font-weight: 600; letter-spacing: -.012em; white-space: nowrap; }
html.ui9.page-launch .v9-fcsub { grid-row: 2; grid-column: 2; align-self: center; margin: 0; padding: 6px 0; font-size: 12px; line-height: 1.3; color: var(--text-dim); min-width: 0; }
/* the ink header has the count: read by the enhancer, not printed a second time */
html.ui9.page-launch #treeCount { display: none; }
html.ui9.page-launch .v9-fcedit { grid-row: 2; grid-column: 3; align-self: center; }
html.ui9.page-launch #treeAi { grid-row: 2; grid-column: 4; align-self: center; }
html.ui9.page-launch #treeExpand { grid-row: 2; grid-column: 5; align-self: center; margin-right: 10px; }
html.ui9.page-launch #treeSheet > .sheet-body { grid-row: 3; grid-column: 1 / -1; min-height: 0; display: flex; flex-direction: column; padding: 0 14px 4px; box-shadow: inset 0 1px 0 var(--hair), inset 0 -1px 0 var(--line); }
html.ui9.page-launch #treeSheet > .sheet-body > * { flex: none; }
html.ui9.page-launch #treeSheet > .sheet-body > .note-info { display: none; }
html.ui9.page-launch #treeSheet.v9-warnold #treeWarn { display: none; }
html.ui9.page-launch .v9-fcwarn[hidden] { display: none; }
html.ui9.page-launch :is(#treeWarn, .v9-fcwarn) { order: -1; position: sticky; top: 0; z-index: 3; margin: 0 -14px 1px !important; padding: 6px 14px; border-radius: 0; background: var(--review-bg); font-size: 12.5px; line-height: 1.4; }
html.ui9.page-launch .geoauto { display: flex; align-items: center; gap: 8px; margin: 0; padding: 1px 0 2px; font-size: 12px; line-height: 1.3; border-radius: 0; background: none; }
html.ui9.page-launch .geoauto input { margin: 0; }
html.ui9.page-launch #treeCancel { grid-row: 4; grid-column: 1 / 3; justify-self: end; align-self: center; }
html.ui9.page-launch #treeLaunch {
  grid-row: 4; grid-column: 3 / -1; justify-self: end; position: relative; width: var(--v9-lw, 312px); max-width: 100%; height: 46px; margin: 8px 14px 12px 0; overflow: hidden; border: 0; border-radius: 9px;
  background: var(--grad); color: #fff; font: 600 14px/1 var(--sans); box-shadow: none;
}
html.ui9.page-launch #treeLaunch:hover { filter: brightness(1.07); color: #fff; }
html.ui9.page-launch #treeSheet.v9-hot #treeLaunch {
  height: 52px; color: #ffcf5c; border: 5px solid transparent; font-size: 13.5px;
  background: linear-gradient(#16130e, #16130e) padding-box, repeating-linear-gradient(-45deg, var(--hazard) 0 8px, #16130e 8px 16px) border-box;
}
/* dark: #16130e is the sheet's own ground, so the core lifts to the bezel and the object stays solid. See patches/launch.md 4. */
html.ui9.page-launch[data-theme="dark"] #btnLaunch.btn-danger, html.ui9.page-launch[data-theme="dark"] #treeSheet.v9-hot #treeLaunch {
  color: #ffd777; background: linear-gradient(var(--bezel-3), var(--bezel-3)) padding-box, repeating-linear-gradient(-45deg, var(--hazard) 0 8px, var(--bezel-3) 8px 16px) border-box !important;
}
html.ui9.page-launch[data-theme="dark"] #btnLaunch.btn-danger:hover { color: #ffd777; }
html.ui9.page-launch #treeSheet.v9-hot #treeLaunch::after { content: " \B7  spends now"; font-weight: 500; }
/* armed after a beat: a double click on Launch can never fall through to this button */
html.ui9.page-launch #treeLaunch.arming { pointer-events: none; }
html.ui9.page-launch #treeLaunch.arming::before { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.28); transform-origin: right; animation: v9l-arm 450ms linear forwards; }
@keyframes v9l-arm { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* the tree */
html.ui9.page-launch #treeBody .tnode { margin: 0; border: 0; border-radius: 0; overflow: visible; }
html.ui9.page-launch #treeBody .thead { gap: 8px; padding: 4px 0; background: none; border-bottom: 1px solid var(--hair); }
html.ui9.page-launch #treeBody .thead .tw { width: 56px; font: 500 10px/1 var(--mono); letter-spacing: .06em; color: var(--text-dim); }
html.ui9.page-launch #treeBody .thead .cnt { font: 500 11px/1 var(--mono); color: var(--text-dim); }
html.ui9.page-launch #treeBody > .tnode > .thead .cnt { display: none; }
html.ui9.page-launch #treeBody .tbud { text-align: right; font-variant-numeric: tabular-nums; }
html.ui9.page-launch .v9-spend { flex: none; min-width: 88px; margin-left: auto; text-align: right; font: 500 12px/1 var(--mono); color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* one money column: the row is a grid, so a Meta cost cap cannot push the daily spend onto a line of its own */
@media (min-width: 1101px) {
  html.ui9.page-launch #treeBody .thead:has(> .tfield [data-k="setname"]) { display: grid; grid-template-columns: 16px 56px minmax(160px, 1fr) 110px 150px 44px 88px; align-items: end; flex-wrap: nowrap; }
  html.ui9.page-launch:not(.nbtheme) #treeBody .thead:has(> .tfield [data-k="setname"]) { grid-template-columns: 16px 56px minmax(160px, 1fr) 110px 150px 110px 44px 88px; }
  html.ui9.page-launch #treeBody .thead:has(> .tfield [data-k="setname"]) > :not(.tfield) { align-self: center; }
  html.ui9.page-launch #treeBody .thead:has(> .tfield [data-k="setname"]) > .tfield { min-width: 0; flex: none !important; }
  html.ui9.page-launch #treeBody .thead:has(> .tfield [data-k="setname"]) .cnt { text-align: right; white-space: nowrap; }
  html.ui9.page-launch #treeBody .thead:has(> .tfield [data-k="setname"]) .v9-spend { min-width: 0; margin: 0; }
  /* the first ad set's labels head the column: the rest keep theirs for a screen reader only */
  html.ui9.page-launch #treeBody .tnode[data-s] ~ .tnode[data-s] > .thead .tfield > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
/* the ad name already carries the creative's: in a lean row the label is for a screen reader */
html.ui9.page-launch #treeSheet.v9-lean #treeBody .tad > .tfield:has(> [data-k="adname"]) > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
html.ui9.page-launch #treeSheet.v9-lean #treeBody .tad { align-items: center; }
html.ui9.page-launch #treeSheet.v9-lean #treeBody .tthumb { width: 32px; height: 32px; }
/* lean: an ad row with nothing of its own is one line. Focus it, tick an own box or press Edit copy per ad and the boxes are there, values and all.
   .v9-rowopen comes from the enhancer, not :focus: moving focus inside the row drops :focus for a moment, the box hides, and Chrome then refuses the focus. */
html.ui9.page-launch #treeSheet.v9-lean #treeBody .tad:not(.v9-rowopen):not(:has(.towncopy input:checked, :is([data-k="adhead"], [data-k="adprim"], [data-k="adlink"]):not(:placeholder-shown))) .tfield:has(> :is([data-k="adhead"], [data-k="adprim"], [data-k="adlink"])) { display: none; }
html.ui9.page-launch:not(.nbtheme) #treeBody textarea[data-k="adprim"] { min-height: 58px; line-height: 16px; }
html.ui9.page-launch .v9-spend[hidden] { display: none; }
html.ui9.page-launch #treeBody .tkids { padding: 0 0 0 14px; }
html.ui9.page-launch #treeBody .tnode .tnode .tkids { padding-left: 18px; }
html.ui9.page-launch #treeBody .tnode.off { opacity: .5; }
html.ui9.page-launch #treeBody .tads { gap: 0; margin: 0; }
html.ui9.page-launch #treeBody .tad { gap: 6px 8px; padding: 3px 0; border-top: 0; border-bottom: 1px solid var(--hair); }
html.ui9.page-launch #treeBody .tthumb { width: 44px; height: 44px; border: 0; border-radius: 5px; box-shadow: 0 0 0 1px var(--line); }
html.ui9.page-launch #treeBody .tthumb .muted { font-size: 10px; }
html.ui9.page-launch #treeBody .tfield > span { font: 450 11px/1.2 var(--sans); letter-spacing: 0; color: var(--text-dim); text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-launch #treeBody :is(.tfield input, .tfield textarea, .tfield select, .tbud) { min-height: 26px; padding: 3px 6px; border: 0; border-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; }
html.ui9.page-launch #treeBody .thead input[type="text"] { font-weight: 500; }
html.ui9.page-launch #treeBody input[type="checkbox"] { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
html.ui9.page-launch #treeBody .towncopy { font-size: 11.5px; }

/* every other sheet: same parts */
html.ui9.page-launch .sheet > header { gap: 6px; padding: 10px 14px; }
html.ui9.page-launch .sheet:not(#treeSheet) .sheet-body { padding: 12px 14px 16px; }
html.ui9.page-launch .sheet .note-info { font-size: 12.5px; }

/* ---- Manage: pill, name, stats first. Actions quiet at rest, still there. ---- */
html.ui9.page-launch #viewManage > .card { overflow: clip; }
html.ui9.page-launch #viewManage > .card > header {
  position: sticky; top: calc(var(--shell-h) + var(--bar-h)); z-index: 20; gap: 6px; min-height: 46px; padding: 7px 12px; background: var(--surface); box-shadow: 0 1px 0 var(--hair);
}
html.ui9.page-launch #viewManage > .card > header .hint { display: none; }
html.ui9.page-launch #viewManage > .card > header .spacer { min-width: 4px; }
html.ui9.page-launch #viewManage > .card > header .input { width: auto; }
html.ui9.page-launch #viewManage > .card > header input[type="search"] { max-width: 130px !important; margin-right: 0 !important; }
html.ui9.page-launch #mAcct { max-width: 220px !important; }
html.ui9.page-launch:not(.nbtheme) #mAcct { max-width: 170px !important; }
html.ui9.page-launch #mWindow { max-width: 130px; }
html.ui9.page-launch #viewManage > .card > header h2 { margin-right: 2px; white-space: nowrap; }
html.ui9.page-launch #viewManage > .card > header .btn { padding: 0 8px; }
html.ui9.page-launch #viewManage > .card > .body { padding: 10px 12px 12px; }
html.ui9.page-launch #viewManage .acc-check { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-dim); white-space: nowrap; }
html.ui9.page-launch #mNote { font-size: 12.5px; }
html.ui9.page-launch #mNote:empty { display: none; }
/* the tree is a table: rows on a hairline, one set of columns for campaigns, ad sets and ads, so spend reads down the page */
html.ui9.page-launch { --mg-st: 68px; --mg-d: 104px; --mg-s: 292px; --mg-a: 60px 66px; }
html.ui9.page-launch.nbtheme { --mg-a: 50px 32px 100px 30px 40px 42px; }
html.ui9.page-launch #mTree .node { margin: 0; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; box-shadow: none; background: none; overflow: visible; }
html.ui9.page-launch #mTree .kids { padding: 0; }
html.ui9.page-launch #mTree .sub { margin: 0; border: 0; border-top: 1px solid var(--hair); border-radius: 0; box-shadow: none; }
html.ui9.page-launch #mTree .sub .kidrows { padding: 0; }
html.ui9.page-launch #mTree :is(.node, .sub) > .hd, html.ui9.page-launch #mTree .kidrow { position: relative; flex-wrap: wrap; gap: 0 6px; min-height: 40px; padding: 3px 4px 3px 8px; background: none; font-size: 12.5px; border-top: 0; transition: background var(--t1); }
html.ui9.page-launch #mTree .sub > .hd { padding-left: 24px; }
html.ui9.page-launch #mTree .kidrow { padding-left: 74px; border-top: 1px solid var(--hair); }
html.ui9.page-launch #mTree :is(.hd, .kidrow):hover { background: var(--hover); }
html.ui9.page-launch #mTree .nm { order: 1; font-weight: 500; flex: 1 1 200px; min-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui9.page-launch #mTree .tree :is(.node, .sub)[data-n] > .hd .nm::before { content: ""; display: inline-block; margin: 0 7px 1px 0; border-left: 5px solid var(--text-dim); border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; transition: transform var(--t1); }
html.ui9.page-launch #mTree .tree :is(.node, .sub).open[data-n] > .hd .nm::before { transform: rotate(90deg); }
html.ui9.page-launch #mTree .hd > .muted, html.ui9.page-launch #mTree .kidrow > .muted { order: 2; font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-launch #mTree .pill { order: 0; min-width: 62px; text-align: center; }
html.ui9.page-launch #mTree .pill.stat { order: 3; min-width: 0; background: none; border: 0; box-shadow: none; padding: 0 2px; text-align: left; font: 500 12px/1.2 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
html.ui9.page-launch #mTree .pill.stat::before, html.ui9.page-launch #mTree .pill.stat::after { content: none; }
html.ui9.page-launch #mTree .pill.stat b { font-weight: 600; }
html.ui9.page-launch #mTree .pill.stat small { font: inherit; color: var(--text-dim); }
/* mapped is bookkeeping, not an alarm: NewsBreak red stays off it */
html.ui9.page-launch #mTree .nm ~ .pill:not(.stat) { order: 2; flex: none; }
html.ui9.page-launch #mTree .pill.map { background: var(--surface-2); color: var(--text-dim); }
html.ui9.page-launch #mTree .kidrow > [data-copyid] { order: 2; max-width: var(--mg-d); direction: rtl; text-align: left; }
html.ui9.page-launch #mTree .kidrow img, html.ui9.page-launch #mTree .kidrow > span[style*="width:40px"] { position: absolute; left: 26px; top: 4px; width: 40px; height: 32px; border-radius: 4px; }
html.ui9.page-launch #mTree .btn { order: 5; min-height: 24px; height: 24px; padding: 0 6px; font-size: 12px; font-weight: 450; color: var(--text-dim); opacity: .55; transition: opacity var(--t1), background var(--t1); }
html.ui9.page-launch #mTree .btn:hover { color: var(--text); }
html.ui9.page-launch #mTree :is(.hd, .kidrow):is(:hover, :focus-within) .btn, html.ui9.page-launch #mTree .nbnote.has { opacity: 1; }
@media (hover: none) { html.ui9.page-launch #mTree .btn { opacity: 1; } }
html.ui9.page-launch #mTree .nbnote.has { color: var(--rejected); }
/* Delete stays apart from Pause */
html.ui9.page-launch #mTree .nbdel { order: 7; }
html.ui9.page-launch #mTree .nbdel:hover { color: var(--rejected); background: var(--rejected-bg); }
html.ui9.page-launch #mTree .nbnoteline { margin: 0 8px 6px 24px; }
/* the note key: the page's words without the emoji. 12px is set here because the button's own size is 0. */
html.ui9.page-launch #mTree .nbnote { gap: 0; font-size: 0; }
html.ui9.page-launch #mTree .nbnote::before { content: "Note"; font-size: 12px; }
html.ui9.page-launch #mTree .nbnote.has::after { content: "\2022"; margin-left: 3px; font-size: 12px; }
html.ui9.page-launch #mTree .nbnoteline > b:first-child { font-size: 0; }
html.ui9.page-launch #mTree .nbnoteline > b:first-child::before { content: "Note: "; font-size: 12px; }
html.ui9.page-launch .v9-mhead { display: none; }
html.ui9.page-launch #mTree .pill.stat[data-ux-cells] > i { display: none; }
/* the cells: above 1000 the numbers stand in their own columns under one head */
@media (min-width: 1001px) {
  html.ui9.page-launch #viewManage .body:has(#mTree .tree .pill.stat) > .v9-mhead {
    position: sticky; top: calc(var(--shell-h) + var(--bar-h) + var(--mh-top, 46px)); z-index: 6; display: grid; grid-template-columns: var(--mg-st) minmax(0, 1fr) var(--mg-d) var(--mg-s) var(--mg-a); column-gap: 6px; align-items: center; height: 26px; margin: -10px -12px 0; padding: 0 16px 0 20px;
    font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--text-dim); background: var(--surface); border-bottom: 1px solid var(--line);
  }
  html.ui9.page-launch .v9-mhead .k { display: grid; grid-template-columns: 72px 44px 72px 48px 56px; text-align: right; }
  html.ui9.page-launch #mTree .tree .pill.stat[data-ux-cells] { flex: none; display: grid; grid-template-columns: 72px 44px 72px 48px 56px; width: var(--mg-s); padding: 0; text-align: right; }
  html.ui9.page-launch #mTree .pill.stat[data-ux-cells] > span { grid-row: 1; white-space: nowrap; }
  html.ui9.page-launch #mTree .pill.stat [data-ux-k="conv"] { grid-column: 2; }
  html.ui9.page-launch #mTree .pill.stat [data-ux-k="rev"] { grid-column: 3; }
  html.ui9.page-launch #mTree .pill.stat [data-ux-k="roas"] { grid-column: 4; }
  html.ui9.page-launch #mTree .pill.stat [data-ux-k="cpa"] { grid-column: 5; }
  html.ui9.page-launch #mTree .pill.stat[data-ux-cells] small { font-size: 0; }
  html.ui9.page-launch #mTree .tree :is(.hd > .muted, .kidrow > .muted) { flex: 0 0 var(--mg-d); width: var(--mg-d); }
  html.ui9.page-launch #mTree .tree .hd > .pill:first-child, html.ui9.page-launch #mTree .tree .kidrow > .pill:not(.stat, .map):not(.nm ~ .pill) { flex: 0 0 var(--mg-st); width: var(--mg-st); box-sizing: border-box; }
}
/* every action on the row, each in its own column, so Edit is one x down the page */
@media (min-width: 1241px) {
  html.ui9.page-launch #mTree .tree :is(.node, .sub) > .hd, html.ui9.page-launch #mTree .tree .kidrow { display: grid; grid-template-columns: var(--mg-st) minmax(0, 1fr) var(--mg-d) var(--mg-s) var(--mg-a); align-items: center; }
  html.ui9.page-launch #mTree .tree :is(.hd, .kidrow) > * { grid-row: 1; }
  html.ui9.page-launch #mTree .tree :is(.hd, .kidrow) > .pill:not(.nm ~ .pill) { grid-column: 1; justify-self: start; }
  html.ui9.page-launch #mTree .tree :is(.hd, .kidrow) > .nm { grid-column: 2; }
  html.ui9.page-launch #mTree .tree :is(.hd, .kidrow) > .muted:not(.nm ~ .pill) { grid-column: 3; }
  html.ui9.page-launch #mTree .tree :is(.hd, .kidrow) > .pill.stat { grid-column: 4; }
  /* mapped is bookkeeping: it sits under the detail, in the detail's column, so the name keeps its whole cell */
  html.ui9.page-launch #mTree .tree :is(.hd, .kidrow) > :is(.nm ~ .pill:not(.stat), .nm ~ .mono:not([data-copyid])) { grid-column: 3; justify-self: start; align-self: end; width: auto; min-width: 0; height: auto; padding: 0; background: none; box-shadow: none; border: 0; font: 500 10.5px/13px var(--mono); letter-spacing: -.01em; color: var(--text-dim); }
  html.ui9.page-launch #mTree .tree :is(.hd, .kidrow) > .pill.pend:is(.nm ~ .pill) { color: var(--review); }
  html.ui9.page-launch #mTree .tree :is(.hd, .kidrow):has(> :is(.nm ~ .pill:not(.stat), .nm ~ .mono:not([data-copyid]))) > :is(.muted:not(.nm ~ .mono:not([data-copyid]))) { align-self: start; line-height: 16px; }
  html.ui9.page-launch #mTree .tree .btn { padding: 0 2px; justify-self: stretch; }
  html.ui9.page-launch #mTree .tree :is(.nbtoggle, .mtoggle) { grid-column: 5; }
  html.ui9.page-launch #mTree .tree :is(.nbaddad, .mcopy, .mstates) { grid-column: 6; }
  html.ui9.page-launch #mTree .tree .nbtpl { grid-column: 7; }
  html.ui9.page-launch #mTree .tree .nbedit { grid-column: 8; }
  html.ui9.page-launch #mTree .tree .nbnote { grid-column: 9; }
  html.ui9.page-launch #mTree .tree .nbdel { grid-column: 10; }
}
/* narrower: the same columns, and the actions take a second line of their own. NewsBreak's six need 1346 to keep a 180px ad name. */
@media (min-width: 1241px) and (max-width: 1345px) {
  html.ui9.page-launch.nbtheme { --mg-a: 0px; }
  html.ui9.page-launch.nbtheme #mTree .tree :is(.node, .sub) > .hd, html.ui9.page-launch.nbtheme #mTree .tree .kidrow { display: flex; }
  html.ui9.page-launch.nbtheme #mTree .tree :is(.hd, .kidrow)::after { content: ""; order: 4; flex: 0 0 100%; height: 0; }
  html.ui9.page-launch.nbtheme #mTree .tree :is(.hd, .kidrow) > .btn:first-of-type { margin-left: var(--mg-st); }
  html.ui9.page-launch.nbtheme #mTree .tree :is(.nbtoggle, .mtoggle) { width: 56px; justify-content: flex-start; }
  /* no action columns here, so no last gap: the head's right edge is the numbers' */
  html.ui9.page-launch.nbtheme #viewManage .body:has(#mTree .tree .pill.stat) > .v9-mhead { grid-template-columns: var(--mg-st) minmax(0, 1fr) var(--mg-d) var(--mg-s); }
  /* flex here: no shared cell, so detail and mapped stand side by side */
  html.ui9.page-launch.nbtheme #mTree .tree :is(.hd, .kidrow) > :is(.nm ~ .pill:not(.stat), .nm ~ .mono:not([data-copyid]), .muted) { align-self: center; }
  html.ui9.page-launch.nbtheme #mTree .nm { flex-basis: 120px; }
}
@media (max-width: 1240px) {
  html.ui9.page-launch, html.ui9.page-launch.nbtheme { --mg-a: 0px; }
  html.ui9.page-launch #mTree .tree :is(.hd, .kidrow)::after { content: ""; order: 4; flex: 0 0 100%; height: 0; }
  html.ui9.page-launch #mTree .tree :is(.hd, .kidrow) > .btn:first-of-type { margin-left: var(--mg-st); }
  html.ui9.page-launch #mTree .tree :is(.nbtoggle, .mtoggle) { width: 56px; justify-content: flex-start; }
  html.ui9.page-launch #viewManage .body:has(#mTree .tree .pill.stat) > .v9-mhead { grid-template-columns: var(--mg-st) minmax(0, 1fr) var(--mg-d) var(--mg-s); }
  /* the name gives way before the numbers do: stats never fall to the actions' line */
  html.ui9.page-launch #mTree .nm { flex-basis: 120px; }
}
/* 1140 and under: name and numbers keep line one, under their head. Detail and mapped lead the actions' line. */
@media (max-width: 1140px) {
  html.ui9.page-launch #mTree .tree :is(.hd, .kidrow) > :is(.muted, .nm ~ .pill:not(.stat), [data-copyid]) { order: 5; flex: 0 1 auto; width: auto; max-width: none; min-width: 0; }
  html.ui9.page-launch #mTree .tree .btn { order: 6; }
  html.ui9.page-launch #mTree .tree .nbdel { order: 8; }
}
@media (min-width: 861px) and (max-width: 1140px) {
  html.ui9.page-launch #mTree .tree :is(.hd, .kidrow) > :is(.muted, [data-copyid]):not(.nm ~ .mono:not([data-copyid])) { margin-left: var(--mg-st); }
  html.ui9.page-launch #mTree .tree :is(.hd, .kidrow):has(> .muted, > [data-copyid]) > .btn:first-of-type { margin-left: 0; }
}
@media (min-width: 1001px) and (max-width: 1140px) {
  html.ui9.page-launch #viewManage .body:has(#mTree .tree .pill.stat) > .v9-mhead { grid-template-columns: var(--mg-st) minmax(0, 1fr) var(--mg-s); }
  html.ui9.page-launch .v9-mhead > span:nth-child(3) { display: none; }
}

/* ---- responsive ---- */
@media (max-width: 1320px) {
  html.ui9.page-launch .cols > div:first-child > section.card:nth-child(5) > .body { grid-template-columns: minmax(0, 1fr) 220px; }
}
@media (max-width: 1240px) {
  /* six figures of spend fit the narrower rail whole */
  html.ui9.page-launch .v9l-mro .v9l-n { column-gap: 6px; }
  html.ui9.page-launch .v9l-mro .v9l-n b { font-size: 13.5px; }
  html.ui9.page-launch .v9l-mro .v9l-n span { letter-spacing: .02em; }
  html.ui9.page-launch .cols > div:first-child > section.card:nth-child(5) > .body { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-launch .cols > div:first-child > section.card:nth-child(5) > .body > .v9-feed { grid-column: 1; grid-row: auto; position: static; max-width: 300px; margin-top: 10px; }
  html.ui9.page-launch .mcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  html.ui9.page-launch .cols { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-launch .side { position: static !important; max-height: none; }
  html.ui9.page-launch .v9-ttop { overflow: visible; }
  html.ui9.page-launch .side > section.card:last-child::after, html.ui9.page-launch .v9-perf { display: none; }
  html.ui9.page-launch .wrap { padding-bottom: 96px; }
  html.ui9.page-launch body > .topbar { flex-wrap: wrap; }
  html.ui9.page-launch:not(.v9-built) #viewLaunch > .presetbar { position: static; width: auto; }
  /* launch must always be reachable: the stub pins to the bottom of the screen */
  html.ui9.page-launch .v9-stub {
    position: fixed; z-index: 35; left: var(--rail-w); right: 0; bottom: 0; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 2px 10px; align-items: center; padding: 10px 14px;
    background: var(--surface); box-shadow: 0 -1px 0 var(--line), 0 -14px 22px -16px rgba(22,19,14,.4);
  }
  /* the help line is the same message as the exposure line, and the bar is short: the exposure line stays, the moment it is true */
  html.ui9.page-launch #mStatusHelp { display: none; }
  html.ui9.page-launch .v9-stub > .field { order: 1; }
  html.ui9.page-launch #btnLaunch { order: 2; height: 40px; margin-top: 0 !important; }
  html.ui9.page-launch .v9-expo { order: 3; grid-column: 1 / -1; margin: 4px 1px 0; font-size: 11.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.ui9.page-launch .v9-donecard { order: 4; }
  html.ui9.page-launch:has(#btnLaunch.btn-danger) .wrap { padding-bottom: 116px; }
  html.ui9.page-launch .v9-qlslot { margin: 8px 0 0; padding: 0 14px 10px; }
  html.ui9.page-launch #btnQlSave { height: 28px; }
  html.ui9.page-launch #btnLaunch.btn-danger { height: 42px; }
  html.ui9.page-launch .v9-donecard { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; }
  html.ui9.page-launch .v9-donecard p { display: none; }
  html.ui9.page-launch .v9l-acts { margin: 0; }
  html.ui9.page-launch .toast { bottom: 74px; }
  /* a failed or part-failed run: what happened, on the bar you are looking at, and the way to the reasons */
  html.ui9.page-launch .side:is(.v9-fail, .v9-part) .v9-why:not([hidden]) { order: 0; grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; margin-bottom: 6px; padding: 2px 4px 2px 10px; border-radius: var(--r-key); background: var(--rejected-bg); color: var(--rejected); font-size: 13px; }
  html.ui9.page-launch .side.v9-part .v9-why:not([hidden]) { background: var(--review-bg); color: var(--text); }
  html.ui9.page-launch .v9-why b { min-width: 0; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.ui9.page-launch .v9-why .btn { flex: none; color: inherit; }
  html.ui9.page-launch:has(.side:is(.v9-fail, .v9-part)) .wrap { padding-bottom: 136px; }
  html.ui9.page-launch:has(.side:is(.v9-fail, .v9-part)):has(#btnLaunch.btn-danger) .wrap { padding-bottom: 156px; }
  html.ui9.page-launch #runResult { scroll-margin-top: calc(var(--shell-h) + var(--bar-h) + 12px); outline: none; }
  html.ui9.page-launch #treeSheet { width: auto; left: 12px; right: 12px; top: 12px; bottom: 12px; max-height: none; transform: none; }
  html.ui9.page-launch #progList { max-height: none; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  html.ui9.page-launch #treeSheet { left: calc(var(--rail-w) + 12px); }
  html.ui9.page-launch #segPlatform button:is([data-p="newsbreak"], [data-p="meta"])::after { font-size: 12px; }
}
@media (max-width: 860px) {
  html.ui9.page-launch body::after { display: none; }
  /* the rail folds to a thin band: where you are, what is left */
  html.ui9.page-launch .v9-rail { position: sticky; top: var(--shell-h); z-index: 30; display: block; width: auto; height: auto; bottom: auto; padding: 0 12px 8px; overflow: visible; border-radius: 0 0 var(--r-bezel) var(--r-bezel); box-shadow: 0 6px 14px -8px rgba(22,19,14,.4); }
  html.ui9.page-launch .v9l-ro { margin: 0; padding: 4px 0 0; background: none; box-shadow: none; }
  html.ui9.page-launch .v9l-n, html.ui9.page-launch .v9l-agent { display: none; }
  html.ui9.page-launch .v9l-seqbar { margin: 7px 2px 0; }
  html.ui9.page-launch .v9l-seq { display: flex; gap: 2px; padding: 6px 0 0; overflow-x: auto; scrollbar-width: none; }
  html.ui9.page-launch .v9l-seq li { flex: 0 0 auto; }
  html.ui9.page-launch .v9l-seq li::before { display: none; }
  html.ui9.page-launch .v9l-b { display: flex; align-items: center; gap: 6px; width: auto; min-height: 30px; padding: 0 8px; }
  html.ui9.page-launch .v9l-b small { display: none; }
  html.ui9.page-launch .v9l-led { margin: 0; align-self: center; flex: none; }
  html.ui9.page-launch .cols > div:first-child > section.card { scroll-margin-top: 128px; }
  html.ui9.page-launch .cols :is(.row, .row3) { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-launch .field:has(> #selAcct) { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
  html.ui9.page-launch .pickbar #cSearch { flex-basis: 100%; }
  html.ui9.page-launch .cols .card > header .hint { display: none; }
  html.ui9.page-launch .toast { bottom: 134px; }
  /* launch stays under the thumb */
  html.ui9.page-launch .v9-stub { left: 0; bottom: calc(58px + env(safe-area-inset-bottom)); grid-template-columns: 112px minmax(0, 1fr); padding: 8px 12px; }
  html.ui9.page-launch #mStatus { height: 40px; }
  html.ui9.page-launch #mStatus button { padding: 0 2px; font-size: 12px; }
  html.ui9.page-launch .wrap { padding-bottom: 150px; }
  html.ui9.page-launch:has(#btnLaunch.btn-danger) .wrap { padding-bottom: 170px; }
  html.ui9.page-launch #treeSheet { left: 8px; right: 8px; top: 8px; bottom: 8px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  html.ui9.page-launch .v9-fc { flex-wrap: wrap; gap: 8px 16px; }
  html.ui9.page-launch #treeTitle { grid-column: 1; grid-row: 2; }
  html.ui9.page-launch .v9-fcedit { grid-column: 2; grid-row: 2; justify-self: end; margin-right: 10px; }
  html.ui9.page-launch .v9-fcsub { display: none; }
  html.ui9.page-launch #treeAi { grid-column: 1; grid-row: 3; justify-self: start; margin-left: 8px; }
  html.ui9.page-launch #treeExpand { grid-column: 2; grid-row: 3; justify-self: end; }
  html.ui9.page-launch #treeSheet { grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
  html.ui9.page-launch #treeSheet > .sheet-body { grid-row: 4; }
  html.ui9.page-launch #treeCancel { grid-row: 5; grid-column: 1; justify-self: start; margin-left: 8px; }
  html.ui9.page-launch #treeLaunch { grid-row: 5; grid-column: 2; width: auto; justify-self: stretch; margin: 8px 8px 8px 0; }
  html.ui9.page-launch #treeBody .thead .tw { width: auto; }
  html.ui9.page-launch #viewManage > .card > header { position: static; flex-wrap: wrap; }
}
/* A phone gets the page's own sentence, in words. */
@media (max-width: 860px) {
  html.ui9.page-launch #mTree :is(.node, .sub) > .hd, html.ui9.page-launch #mTree .kidrow { row-gap: 3px; padding-top: 6px; padding-bottom: 6px; }
  html.ui9.page-launch #mTree .sub > .hd { padding-left: 16px; }
  html.ui9.page-launch #mTree .kidrow { padding-left: 24px; }
  html.ui9.page-launch #viewManage > .card > header input[type="search"] { flex: 1 1 120px; max-width: none !important; }
  /* no room beside the step's keys: the account line takes its own line under them */
  html.ui9.page-launch .cols .card > header:has(> #acctHelp) { flex-wrap: wrap; padding-bottom: 4px; }
  html.ui9.page-launch .cols .card > header > #acctHelp { order: 9; flex: 1 1 0; min-width: 120px; }
  html.ui9.page-launch .cols .card > header > .v9-amore { order: 10; }
  html.ui9.page-launch #renameOrg { order: 11; }
  html.ui9.page-launch .cols .card > header:has(> #acctHelp) > .spacer { flex: 1 1 8px; }
  html.ui9.page-launch #mTree .kidrow img, html.ui9.page-launch #mTree .kidrow > span[style*="width:40px"] { display: none; }
  html.ui9.page-launch #mTree .nm { flex: 1 1 calc(100% - 80px); }
  html.ui9.page-launch #mTree .pill.stat { order: 3; flex: 1 1 100%; white-space: normal; line-height: 1.35; }
  html.ui9.page-launch #mTree .pill.stat[data-ux-cells] > i { display: inline; }
  html.ui9.page-launch #mTree .tree .hd > .muted, html.ui9.page-launch #mTree .tree .kidrow > .muted { margin-left: 0; }
  html.ui9.page-launch #mTree .tree :is(.hd, .kidrow) > .btn:first-of-type { margin-left: 0; }
  html.ui9.page-launch #mTree .btn { min-height: 30px; height: 30px; }
  /* the bar has no room for it: it waits at the end of the ticket */
  html.ui9.page-launch .v9l-mro { padding: 6px 0 0; background: none; box-shadow: none; }
  html.ui9.page-launch .v9l-mro .v9-well-h { display: none; }
  html.ui9.page-launch .v9l-mname { margin: 0; }
  html.ui9.page-launch.v9-manage .v9l-back { display: flex; width: auto; margin-top: 4px; }
}
@media (max-width: 560px) {
  html.ui9.page-launch #cGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 276px; }
}
/* a 16px field stops iOS zooming and nothing else needs it: a mouse at tablet width keeps fields under the section titles */
@media (max-width: 860px) and (pointer: fine) {
  html.ui9.page-launch :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"]), select, textarea) { font-size: 13px !important; }
}
@media (min-width: 481px) and (max-width: 860px) {
  html.ui9.page-launch #treeBody :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"]), select, textarea) { font-size: 13px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html.ui9.page-launch #treeLaunch.arming::before { display: none; }
}

/* NewsBreak red already means the platform and danger: on a field it read as an error. Focus is neutral there. */
html.ui9.page-launch.nbtheme :is(.input, input, select, textarea):focus-visible { outline: 2px solid var(--text); outline-offset: 1px; box-shadow: none !important; }

/* emoji on real keys: the enhancer copies the page's words without it into data-ux-t. Title and name stay. */
html.ui9.page-launch :is(#btnQlSave, #treeAi, #mJournal, #mDayCost, #cSound)[data-ux-t] { font-size: 0; }
html.ui9.page-launch :is(#btnQlSave, #treeAi, #mJournal, #mDayCost, #cSound)[data-ux-t]::before { content: attr(data-ux-t); font-size: 12px; }
html.ui9.page-launch #treeAi[data-ux-t] { display: inline-flex; align-items: center; gap: 5px; }
html.ui9.page-launch #treeAi[data-ux-t]::after {
  content: ""; order: -1; width: 13px; height: 13px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4l1.7 5.3L19 11l-5.3 1.7L12 18l-1.7-5.3L5 11l5.3-1.7z' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4l1.7 5.3L19 11l-5.3 1.7L12 18l-1.7-5.3L5 11l5.3-1.7z' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ===== 21-launchers.css ===== */
/* v9 SmartNews, TikTok, Snapchat launchers (DESIGN.md 4.3, 4.22, 6.9): the same sequence and ticket as the main launcher.
   Rail: what you chose and what is left. Form: the real form, one column, every step open. Ticket: what will be made, and the go button.
   Layout is all here, keyed to the blocking html.ui9 class. The enhancer only adds chrome.
   Each keeps its own composition: SmartNews runs its stripe and a landscape feed card, TikTok its audience gauge and a phone,
   Snapchat its yellow bar, creatives first as 9:16 film, and the 7x24 grid. Identity stays on the bar and the go button. */

html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) { --bar-h: 50px; --ticket-w: 340px; --side-top: calc(var(--shell-h) + var(--bar-h) + 4px); }
html.ui9.page-smartnews { --side-top: calc(var(--shell-h) + var(--bar-h) + 7px); --acc-h: 88px; }
html.ui9.page-tiktok { --side-top: calc(var(--shell-h) + var(--bar-h) + 7px); }
@media (max-width: 1240px) { html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) { --ticket-w: 300px; } }

/* ---- the L: CSS reserves the rail before any script runs ---- */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body { padding-left: var(--rail-w); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body::after { content: ""; position: fixed; top: var(--shell-h); left: 0; bottom: 0; z-index: 37; width: var(--rail-w); background: var(--bezel); pointer-events: none; }

/* ---- page bar: switch, Launch/Manage, spacer, links ---- */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > :is(.brand, .logo, .tag, .ptclock) { display: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) { flex-wrap: nowrap; height: auto; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > .seg { order: 1; margin: 0; flex: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > .tabs { order: 2; flex: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > .spacer { order: 3; flex: 1 1 0; min-width: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-newer { order: 4; color: var(--review); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > button.btn { order: 5; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > a { order: 6; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > :is(a, #cSound) { background: none; box-shadow: none; color: var(--text-dim); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > :is(a, #cSound):hover { background: var(--hover); color: var(--text); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > .seg button { display: inline-flex; align-items: center; gap: 6px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > .seg button svg { width: 16px; height: 16px; border-radius: 4px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > .seg button:is([data-href="launch.html"], [data-href="launch.html?p=meta"], .on)::after { font: 500 12.5px/1 var(--sans); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > .seg button[data-href="launch.html"]::after { content: "NewsBreak"; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > .seg button[data-href="launch.html?p=meta"]::after { content: "Meta"; }
html.ui9.page-smartnews body > .topbar > .seg button.on::after { content: "SmartNews"; }
html.ui9.page-tiktok body > .top > .seg button.on::after { content: "TikTok"; }
html.ui9.page-snapchat body > .top > .seg button.on::after { content: "Snapchat"; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > .seg button:not(.on, [data-href^="launch.html"]) { padding: 0 6px; opacity: .55; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > .seg button:not(.on, [data-href^="launch.html"]):hover { opacity: 1; }
/* SmartNews: its four colours run under the bar, the same place they always did */
html.ui9.page-smartnews body > .topbar::after { z-index: 1; }
/* TikTok: its own stripe in the same place, black to red */
html.ui9.page-tiktok body > .top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; z-index: 1; background: var(--grad); }
html.ui9.page-tiktok #viewLaunch, html.ui9.page-tiktok #viewManage { padding-top: 7px; }
/* Snapchat: the yellow bar, black ink in both themes */
html.ui9.page-snapchat body > .top { color: #000; }
html.ui9.page-snapchat body > .top > :is(.seg, .tabs) { padding: 2px; gap: 1px; border: 0; border-radius: var(--r-key); background: rgba(0,0,0,.09); box-shadow: none; }
html.ui9.page-snapchat body > .top > :is(.seg, .tabs) button { min-height: 26px; padding: 0 9px; border-radius: 5px; font: 500 12.5px/1.15 var(--sans); line-height: 1.15; color: rgba(0,0,0,.72); opacity: 1; }
html.ui9.page-snapchat body > .top > .seg button:not(.on, [data-href^="launch.html"]) { padding: 0 6px; opacity: .7; }
html.ui9.page-snapchat body > .top > :is(.seg, .tabs) button:hover { background: rgba(0,0,0,.08); color: #000; }
html.ui9.page-snapchat body > .top > :is(.seg, .tabs) button.on { background: #000; color: var(--yellow, #fffc00); opacity: 1; }
html.ui9.page-snapchat body > .top > a.top-link { display: inline-flex; align-items: center; min-height: 27px; padding: 0 9px; border-radius: 6px; font: 500 12px/1 var(--sans); color: rgba(0,0,0,.78) !important; background: none; }
html.ui9.page-snapchat body > .top > a.top-link:hover { background: rgba(0,0,0,.09); color: #000 !important; }
html.ui9.page-snapchat body > .top :focus-visible { outline: 2px solid #000; outline-offset: 1px; }

/* ---- the sheet ---- */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .wrap { max-width: none; margin: 0; padding: 4px var(--gut) 18px; }
html.ui9.page-snapchat .wrap { max-width: 1500px; font: 400 14px/1.45 var(--sans); }
html.ui9.page-smartnews .wrap, html.ui9.page-tiktok #viewLaunch, html.ui9.page-snapchat .cols { display: grid; grid-template-columns: minmax(0, 1fr) var(--ticket-w); gap: 12px; align-items: start; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #viewLaunch { position: relative; }
html.ui9.page-smartnews #manageTab { max-width: none !important; margin: 0 !important; padding: 4px var(--gut) 18px !important; }
html.ui9.page-tiktok #viewManage { max-width: none; display: block !important; }
html.ui9.page-tiktok #viewManage[style*="none"] { display: none !important; }

/* the form: step cards, every step open */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#launchCol, #viewLaunch > div:first-child, .cols > div:first-child) > :is(.card, section.card), html.ui9.page-smartnews .acctbar {
  position: relative; margin: 0 0 8px; overflow: clip; background: var(--surface); scroll-margin-top: calc(var(--shell-h) + var(--bar-h) + 6px);
}
html.ui9.page-snapchat .cols > div:first-child { display: flex; flex-direction: column; min-width: 0; }
html.ui9.page-snapchat .cols > div:first-child > .card:has(#cGrid) { order: -1; }
html.ui9.page-snapchat .cols > div:first-child > .note.warn { order: -2; margin: 0 0 8px; padding: 7px 10px; border-radius: var(--r-key); font-size: 12.5px; font-weight: 500; background: var(--review-bg); color: var(--warnink); border: 0; }
/* it says everything is paused: while Active is chosen that is not true, so it steps aside */
html.ui9.page-snapchat .cols:has(#lRun.danger) > div:first-child > .note.warn { display: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#launchCol, #viewLaunch > div:first-child) > :is(.card, section.card):last-child { margin-bottom: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .cols > div:first-child > .card:last-child { margin-bottom: 8px; }
/* SmartNews and Snapchat steps have a bare h2: the same 40px head as the other launchers */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#launchCol, .cols > div:first-child) > .card { padding: 0 14px 13px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#launchCol, .cols > div:first-child) > .card > h2 { display: flex; align-items: center; gap: 9px; min-height: 40px; margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -.012em; white-space: nowrap; min-width: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#launchCol, .cols > div:first-child) > .card > h2 .muted { font: 400 12px/1.2 var(--sans) !important; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#launchCol, .cols > div:first-child) .sub { margin: -2px 0 9px; font-size: 12px; line-height: 1.4; color: var(--text-dim); }
html.ui9.page-tiktok #viewLaunch > div:first-child > section.card > header { flex-wrap: nowrap; gap: 9px; min-height: 40px; padding: 0 12px 0 14px; border-bottom: 0; background: none; }
html.ui9.page-tiktok #viewLaunch .card > header h2 { font-size: 14px; font-weight: 600; letter-spacing: -.012em; white-space: nowrap; }
html.ui9.page-tiktok #viewLaunch .card > header .hint { font-size: 12px; font-weight: 400; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
html.ui9.page-tiktok #viewLaunch .card > header .spacer { flex: 1 1 0; min-width: 8px; }
html.ui9.page-tiktok #viewLaunch .card > header .btn { flex: none; }
html.ui9.page-tiktok #viewLaunch .card > .body { padding: 0 14px 13px; }
html.ui9.page-tiktok #connNote { margin-bottom: 8px !important; }
html.ui9.page-tiktok #selCount { font: 500 11px/1 var(--mono); color: var(--text-dim); white-space: nowrap; }
/* a hanging list must not stop at the card's edge or under the next step */
html.ui9.page-tiktok #viewLaunch > div:first-child > section.card:has(.picklist.show) { overflow: visible; z-index: 5; }
/* the chip: 01, 02. Green once the step looks filled. */
html.ui9.page-tiktok #viewLaunch .step-no { display: block; width: auto; height: auto; flex: none; white-space: nowrap; }
html.ui9.page-tiktok #viewLaunch .step-no::before { content: "0"; }
html.ui9.page-smartnews .step { display: block; flex: none; width: auto; height: auto; margin: 0; padding: 4px 5px; border-radius: var(--r-cap); font-size: 0; line-height: 1; background: var(--surface-2); color: var(--text-dim); }
html.ui9.page-smartnews .step::before { font: 500 10.5px/1 var(--mono); }
html.ui9.page-smartnews #launchCol > .card:nth-child(1) .step::before { content: "02"; }
html.ui9.page-smartnews #launchCol > .card:nth-child(2) .step::before { content: "03"; }
html.ui9.page-smartnews #launchCol > .card:nth-child(3) .step::before { content: "04"; }
html.ui9.page-smartnews #launchCol > .card:nth-child(4) .step::before { content: "05"; }
html.ui9.page-snapchat .cols > div:first-child > .card > h2::before { flex: none; padding: 4px 5px; border-radius: var(--r-cap); font: 500 10.5px/1 var(--mono); background: var(--surface-2); color: var(--text-dim); }
html.ui9.page-snapchat .cols > div:first-child > .card:has(#cGrid) > h2::before { content: "01"; }
html.ui9.page-snapchat .cols > div:first-child > .card:has(#lAcct) > h2::before { content: "02"; }
html.ui9.page-snapchat .cols > div:first-child > .card:has(#segStructure) > h2::before { content: "03"; }
html.ui9.page-snapchat .cols > div:first-child > .card:has(#lHeadline) > h2::before { content: "04"; }
html.ui9.page-snapchat .cols > div:first-child > .card.v9-notes > h2::before { content: none; }
html.ui9.page-smartnews .v9-ok .step, html.ui9.page-tiktok section.v9-ok .step-no { background: var(--live-bg) !important; color: var(--live) !important; }
html.ui9.page-snapchat .cols > div:first-child > .card.v9-ok > h2::before { background: var(--live-bg); color: var(--live); }
/* the colour spine stays: the step you are in */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-here::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; z-index: 1; background: var(--grad); }
html.ui9.page-snapchat .v9-here::before { background: var(--text); }

/* fields: same parts, tighter rhythm */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #launchCol .field, html.ui9.page-tiktok #viewLaunch .field, html.ui9.page-snapchat .cols .field { margin: 10px 0 0; min-width: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #viewLaunch .row, html.ui9.page-smartnews #launchCol .row, html.ui9.page-snapchat .cols .row { gap: 10px; margin-top: 10px; }
html.ui9.page-tiktok #viewLaunch .row > .field { margin-top: 0; }
html.ui9.page-tiktok #viewLaunch .body > .field:first-child, html.ui9.page-tiktok #viewLaunch .inner > .field:first-child, html.ui9.page-tiktok #viewLaunch .inner > .row:first-child { margin-top: 0; }
html.ui9.page-smartnews #launchCol .field:first-of-type { margin-top: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .help:empty { display: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #launchCol .help, html.ui9.page-tiktok #viewLaunch .help, html.ui9.page-snapchat .cols .help { margin-top: 4px; font-size: 12px; line-height: 1.35; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) label.f .muted { font-family: var(--sans); font-size: 11.5px; letter-spacing: 0; color: var(--text-dim); text-transform: none; }
html.ui9.page-smartnews label.f .muted { line-height: 1; }
/* a muted word in a label stands 2px taller than the caps beside it. One floor for every label in a row, so all its inputs start level. */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .row > div > label.f { display: block; min-height: 12px; }
html.ui9.page-snapchat label[for="lPixel"] { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-snapchat #lCopies { max-width: 120px; }
/* sentences, not field labels */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(.chk, .switch, .ck) { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; line-height: 1.35; color: var(--text-dim); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(.chk, .switch, .ck) b { font-weight: 500; color: var(--text); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(.chk, .switch, .ck) input { width: 14px; height: 14px; margin: 0; flex: none; align-self: center; accent-color: var(--accent); }
html.ui9.page-tiktok .field > label.switch { font-family: var(--sans) !important; font-size: 12.5px !important; letter-spacing: 0 !important; text-transform: none; }
html.ui9.page-tiktok .switch + .switch { margin-top: 5px; }
html.ui9.page-smartnews .secthead { margin: 12px 0 6px; padding-top: 10px; border-top: 1px solid var(--hair); font-size: 13px; font-weight: 600; letter-spacing: -.012em; text-transform: none; color: var(--text); }
html.ui9.page-smartnews .secthead .muted { font-size: 12px; font-weight: 400 !important; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .note { padding: 8px 10px; font-size: 12.5px; }
/* a platform colour is not an alarm: an information note stays neutral */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .note-info, html.ui9.page-snapchat .note.info { background: var(--surface-2); color: var(--text); border: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .note-info :is(b, a) { color: inherit; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #launchCol .seg, html.ui9.page-tiktok #viewLaunch .seg, html.ui9.page-snapchat .segx { max-width: 100%; flex-wrap: wrap; }
html.ui9.page-smartnews .dim { opacity: .5; }
html.ui9.page-smartnews #launchCol details summary.f { display: list-item !important; margin: 0; }
html.ui9.page-smartnews #launchCol code, html.ui9.page-tiktok #viewLaunch .help b, html.ui9.page-smartnews .help code { font-size: 11px; }
/* status lives on the ticket now: the real control stays here, unmoved, so presets still sweep it */
html.ui9.page-smartnews.v9-built #campCard .row:has(> div > #launchStatus) { display: none; }

/* SmartNews: Destination is the account bar. It sits beside the ticket, at a fixed height, so nothing has to measure it. */
html.ui9.page-smartnews .acctbar { max-width: none; margin: 7px calc(var(--ticket-w) + 12px + var(--gut)) 8px var(--gut); height: var(--acc-h); padding: 0 14px; display: block; border: 1px solid var(--line); border-radius: var(--r-card); }
html.ui9.page-smartnews.v9-built .acctbar > div:has(> label[for="acct"]) label.f { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
html.ui9.page-smartnews .acctbar > div:has(> label[for="acct"]) .row { flex-wrap: nowrap; gap: 6px; margin: 0; }
html.ui9.page-smartnews #acctRefresh { flex: none; }
html.ui9.page-smartnews .v9-acch { display: flex; align-items: center; gap: 9px; height: 40px; min-width: 0; }
html.ui9.page-smartnews .v9-acch h2 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -.012em; white-space: nowrap; }
html.ui9.page-smartnews .v9-acch .hint { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
html.ui9.page-smartnews .v9-acch .v9-recent { flex: 1 1 0; justify-content: flex-end; margin: 0; }
html.ui9.page-smartnews:not(.v9-built) .acctbar > div:has(> label[for="acct"]) { padding-top: 22px; }
html.ui9.page-smartnews .v9-acch .step::before { content: "01"; }
html.ui9.page-smartnews .side { margin-top: calc(-8px - var(--acc-h) - 8px); }
/* the preset row lands on the ticket; until then it waits at the same spot, and works there if ui9.js never comes */
html.ui9.page-smartnews:not(.v9-built) .acctbar { overflow: visible; }
html.ui9.page-smartnews:not(.v9-built) .side { margin-top: calc(-8px - var(--acc-h) - 8px + 62px); }
html.ui9.page-smartnews:not(.v9-built) .acctbar > .launch-only { position: absolute; top: -1px; left: calc(100% + 12px); width: var(--ticket-w); }
html.ui9.page-smartnews.v9-manage .acctbar, html.ui9.page-smartnews body:has(#connectCard:not([style*="none"])) .acctbar { margin-right: var(--gut); }
html.ui9.page-smartnews body:has(#connectCard:not([style*="none"])) .side { margin-top: 0; }
html.ui9.page-smartnews #connectCard { margin: 0 var(--gut) 8px !important; max-width: none !important; padding: 12px 14px; }

/* Destination elsewhere: search beside the list */
html.ui9.page-tiktok .field:has(> #selAcct), html.ui9.page-tiktok .field:has(> #selCampaign), html.ui9.page-tiktok .field:has(> #selAdgroup) { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 6px; align-items: start; }
html.ui9.page-tiktok .field:has(> :is(#selAcct, #selCampaign, #selAdgroup)) > :is(label, .help) { grid-column: 1 / -1; }
html.ui9.page-tiktok :is(#fAcct, #fCampaign, #fAdgroup) { margin: 0 !important; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-recent { display: flex; align-items: center; gap: 5px; margin-top: 9px; min-width: 0; overflow: hidden; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-recent[hidden] { display: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-recent .v9-hud { margin-right: 4px; flex: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-rc { flex: 0 1 auto; min-width: 44px; max-width: 190px; height: 26px; padding: 0 9px; border: 0; border-radius: 6px; cursor: pointer; font: 500 12px/1 var(--sans); color: var(--text-dim); background: var(--surface-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background var(--t1), color var(--t1); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-rc:hover { color: var(--text); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-rc.on { background: var(--primary-bg); color: var(--primary-text); }

/* Creatives: one-row picker bar. The rest sits under Filters, still in the form. */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .pickbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 9px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .pickbar :is(.input, select, input) { flex: 0 1 auto; width: auto !important; min-width: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .pickbar :is(#q, #cSearch) { order: 1; flex: 1 1 200px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #cType { order: 2; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #cBoard { order: 3; max-width: 170px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-cfilt { order: 4; gap: 5px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-cfilt[aria-expanded="true"] { box-shadow: inset 0 0 0 1.5px var(--text) !important; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-cfilt i { min-width: 15px; height: 15px; padding: 0 3px; border-radius: 4px; display: inline-grid; place-items: center; font: 500 10px/1 var(--mono); background: var(--primary-bg); color: var(--primary-text); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-cfilt i[hidden] { display: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #cOnlySel { order: 5; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #cNone { order: 6; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .pickbar :is(#cShape, #cStatus, #cTag, #cAll, #cReload, #cSound) { order: 8; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .pickbar::after { content: ""; order: 7; flex: 0 0 100%; height: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat).v9-built .pickbar:not(.v9-open) :is(#cShape, #cStatus, #cTag, #cAll, #cReload, #cSound) { display: none; }
/* before the enhancer they take no room; if ui9.js never comes they come back after 3s, because Filters will not */
@keyframes v9l-reveal-k { to { max-width: 260px; min-height: 27px; padding: 0 9px; visibility: visible; } }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat):not(.v9-built) .pickbar :is(#cShape, #cStatus, #cTag, #cAll, #cReload, #cSound) { max-width: 0; min-width: 0; min-height: 0; padding: 0; overflow: hidden; visibility: hidden; animation: v9l-reveal-k 0s 3s forwards; }
/* fixed rows, not aspect-ratio: tiles collapse otherwise */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #cGrid { grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); grid-auto-rows: 118px; gap: 7px; max-height: 249px; padding: 4px; margin: -4px; overflow: hidden auto; scrollbar-gutter: stable; align-items: stretch; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #cGrid > :is(.empty, .muted) { grid-column: 1 / -1; align-self: center; padding: 20px; text-align: center; color: var(--text-dim); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .tile { height: auto; aspect-ratio: auto; border: 0; border-radius: var(--r-key); background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .tile:hover { box-shadow: 0 0 0 1px var(--line-strong); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .tile.sel { border: 0; box-shadow: 0 0 0 2px var(--accent); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .tile:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .tile > :is(img, video, .ph) { height: 92px; object-fit: cover; object-position: 50% 26%; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .tile .ph { font-size: 15px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .tile .cap { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; padding: 0 7px; background: none; color: var(--text); font-size: 11.5px; font-weight: 500; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .tile .tick { top: 5px; right: auto; left: 5px; width: 18px; height: 18px; border: 0; border-radius: 4px; background: rgba(16,13,9,.55); box-shadow: inset 0 0 0 1.5px var(--on-bezel); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .tile.sel .tick { background: var(--accent); box-shadow: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .tile .vbadge { top: auto; left: auto; right: 5px; bottom: 31px; padding: 2px 4px; font: 500 10px/1.1 var(--mono); letter-spacing: 0; background: rgba(16,13,9,.72); color: #fff; }
/* Snapchat: creatives are 9:16 film, not squares */
html.ui9.page-snapchat #cGrid { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); grid-auto-rows: 196px; max-height: 206px; }
html.ui9.page-snapchat .tile > :is(img, video, .ph) { height: 170px; object-position: 50% 30%; }
html.ui9.page-snapchat .tile.sel { box-shadow: 0 0 0 2px var(--text); }
html.ui9.page-snapchat .tile.sel .tick { background: var(--yellow, #fffc00); }
html.ui9.page-snapchat .tile.sel .tick svg { stroke: #000; }
html.ui9.page-snapchat .tile .vbadge { bottom: 31px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(.gridfoot, #cFoot) { display: flex; justify-content: flex-start; align-items: center; gap: 8px; margin-top: 8px !important; font-size: 12px; color: var(--text-dim); text-align: left !important; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(.gridfoot, #cFoot):empty { display: none; }

/* ---- TikTok: its long form, sections as hairline panels. details.sect stays. ---- */
html.ui9.page-tiktok details.sect { margin-top: 10px; border: 0; border-radius: 9px; background: none; box-shadow: 0 0 0 1px var(--hair); overflow: clip; }
html.ui9.page-tiktok details.sect > summary { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px 0 12px; font-size: 12.5px; font-weight: 600; color: var(--text); background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); }
html.ui9.page-tiktok details.sect > summary::before { content: "\25B8"; font-size: 10px; color: var(--text-dim); }
html.ui9.page-tiktok details.sect[open] > summary::before { content: "\25BE"; }
html.ui9.page-tiktok details.sect > summary .muted { font-size: 12px; font-weight: 400; }
html.ui9.page-tiktok details.sect .inner { padding: 10px 12px 12px; }
html.ui9.page-tiktok .field[style*="surface-2"] { padding: 9px 10px !important; border-radius: 9px !important; background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)) !important; }
html.ui9.page-tiktok .chip { padding: 2px 7px; border-radius: var(--r-cap); font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--text); }
html.ui9.page-tiktok #viewLaunch summary[style*="accent-text"] { color: var(--text-dim) !important; }
html.ui9.page-tiktok .picklist { border: 0; border-radius: var(--r-key); box-shadow: 0 0 0 1px var(--line), var(--e2); }
html.ui9.page-tiktok .bcbox { border: 0; border-radius: var(--r-key); background: none; box-shadow: 0 0 0 1px var(--hair); }
html.ui9.page-tiktok .warn { font-size: 12px; }

/* the saved-URL picker builds bare buttons, so it gets the small key */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#launchCol, #viewLaunch, .cols) div[style*="gap: 7px"] > select { min-width: 120px !important; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#launchCol, #viewLaunch, .cols) div[style*="gap: 7px"] > button { min-height: 27px; padding: 0 9px !important; border: 0; border-radius: 6px; cursor: pointer; font: 500 12px/1.15 var(--sans) !important; color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#launchCol, #viewLaunch, .cols) div[style*="gap: 7px"] > button:hover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); }

/* ---- SmartNews bits ---- */
html.ui9.page-smartnews .states button, html.ui9.page-smartnews .days button { border: 0; border-radius: var(--r-cap); background: var(--surface-2); color: var(--text-dim); font: 500 12px/1 var(--sans); padding: 5px 7px; }
html.ui9.page-smartnews .states button:hover, html.ui9.page-smartnews .days button:hover { color: var(--text); }
html.ui9.page-smartnews .states button.on, html.ui9.page-smartnews .days button.on { background: var(--primary-bg); color: var(--primary-text); }
html.ui9.page-smartnews .picklist { border: 0; border-radius: var(--r-key); box-shadow: inset 0 0 0 1px var(--hair); }
html.ui9.page-smartnews .row { display: flex; flex-wrap: wrap; }

/* ---- Snapchat: its global select and input rules, brought to the same keys ---- */
html.ui9.page-snapchat .wrap :is(select, input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"]), textarea), html.ui9.page-snapchat .sheet :is(select, input:not([type="checkbox"], [type="radio"])) {
  min-height: 32px; padding: 0 10px; border: 0; border-radius: var(--r-key); background-color: var(--surface); color: var(--text); font: 400 13px/1.3 var(--sans); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--t1);
}
html.ui9.page-snapchat .wrap :is(select, input:not([type="checkbox"], [type="radio"]), textarea):hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
html.ui9.page-snapchat :is(.wrap, .sheet) select {
  appearance: none; -webkit-appearance: none; padding-right: 26px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23978d7b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 12px;
}
html.ui9.page-snapchat .wrap textarea { padding: 8px 10px; }
html.ui9.page-snapchat .wrap input[type="checkbox"] { accent-color: var(--text); }
html.ui9.page-snapchat label.f { margin-bottom: 6px; font-weight: 500; }
html.ui9.page-snapchat .row > div { min-width: 150px; }
html.ui9.page-snapchat .cols .row { align-items: flex-start; }
html.ui9.page-snapchat .cols .row:has(> .btn) { align-items: flex-end; }
/* .sub is both the page's help line and its tree row: the help line lost its pill to that clash */
html.ui9.page-snapchat p.sub { border: 0; border-radius: 0; background: none; }
html.ui9.page-snapchat .pickbar .btn { min-height: 27px; padding: 0 9px; font-size: 12px; border-radius: 6px; }
html.ui9.page-snapchat .pickbar :is(#cOnlySel, #cNone, #cReload, #cSound) { background: none; box-shadow: none; color: var(--text-dim); }
html.ui9.page-snapchat .pickbar :is(#cOnlySel, #cNone, #cReload, #cSound):hover { background: var(--hover); color: var(--text); box-shadow: none; }
html.ui9.page-snapchat #cOnlySel.on { background: var(--primary-bg); color: var(--primary-text); }
html.ui9.page-snapchat .v9-st button { opacity: 1; line-height: 1.15; }
html.ui9.page-snapchat .wrap a:not(.btn) { color: var(--accent-text); font-weight: 500; border-bottom-width: 1px; }
html.ui9.page-snapchat .wrap .btn { color: var(--text); }
html.ui9.page-snapchat .wrap .btn.primary { background: var(--primary-bg); color: var(--primary-text); box-shadow: none; }
html.ui9.page-snapchat .wrap .btn.primary:hover { filter: brightness(1.2); }
html.ui9.page-snapchat .wrap .btn.go, html.ui9.page-snapchat .sheet .btn.go { background: var(--primary-bg); color: var(--primary-text); box-shadow: none; }
html.ui9.page-snapchat .segx { padding: 2px; gap: 1px; border: 0; border-radius: var(--r-key); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); display: inline-flex; }
html.ui9.page-snapchat .segx button { min-height: 26px; padding: 0 9px; border-radius: 5px; font: 500 12.5px/1.15 var(--sans); color: var(--text-dim); box-shadow: none; }
html.ui9.page-snapchat .segx button:hover { background: var(--hover); color: var(--text); }
html.ui9.page-snapchat .segx button.on { background: var(--primary-bg); color: var(--primary-text); box-shadow: none; }
html.ui9.page-snapchat .muted { font-size: 12px; font-weight: 400; }
html.ui9.page-snapchat .wrap .muted[style*="margin-top:8px"] { line-height: 1.4; color: var(--text-dim); }
/* the 7x24: drag-painted, and the one big instrument on this page */
html.ui9.page-snapchat .daypart { font: 500 10px/1 var(--mono); color: var(--text-dim); gap: 2px; }
html.ui9.page-snapchat .daypart .dd { font-weight: 500; }
html.ui9.page-snapchat .daypart button { min-height: 0; height: 18px; padding: 0; border: 0; border-radius: 2px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); }
html.ui9.page-snapchat .daypart button:hover { box-shadow: inset 0 0 0 1px var(--text-dim); }
html.ui9.page-snapchat .daypart button.on { background: var(--primary-bg); box-shadow: none; }
html.ui9.page-snapchat #daypartWrap .btn { min-height: 27px; padding: 0 9px; font-size: 12px; }
html.ui9.page-snapchat .rhit { border: 0; border-radius: var(--r-cap); background: var(--surface-2); color: var(--text); }
html.ui9.page-snapchat .rchip { border-radius: var(--r-cap); background: var(--surface-2); color: var(--text); font-weight: 500; }
html.ui9.page-snapchat .v9-notes { display: block; }
html.ui9.page-snapchat .v9-notes > h2 { font-weight: 600; }
html.ui9.page-snapchat #padState { font-family: var(--mono) !important; font-size: 10.5px !important; }
html.ui9.page-snapchat #padText { margin-top: 0 !important; background: var(--surface) !important; font: 400 13px/1.45 var(--sans) !important; box-shadow: inset 0 0 0 1px var(--line); border: 0 !important; border-radius: var(--r-key) !important; padding: 8px 10px !important; min-height: 72px; }

/* Ad copy: the fields, and the ad as it will read beside them */
html.ui9.page-smartnews #copyCard, html.ui9.page-snapchat .cols > div:first-child > .card:has(#lHeadline) { display: grid; grid-template-columns: minmax(0, 1fr) 262px; column-gap: 14px; align-items: start; }
html.ui9.page-smartnews #copyCard > *, html.ui9.page-snapchat .cols > div:first-child > .card:has(#lHeadline) > * { grid-column: 1; min-width: 0; }
html.ui9.page-smartnews #copyCard > h2, html.ui9.page-snapchat .cols > div:first-child > .card:has(#lHeadline) > h2 { grid-column: 1 / -1; }
html.ui9.page-tiktok #viewLaunch > div:first-child > section.card:nth-of-type(5) > .body { display: grid; grid-template-columns: minmax(0, 1fr) 214px; column-gap: 14px; align-items: start; }
html.ui9.page-tiktok #viewLaunch > div:first-child > section.card:nth-of-type(5) > .body > * { grid-column: 1; min-width: 0; }
html.ui9.page-snapchat .cols > div:first-child > .card:has(#lHeadline) { grid-template-columns: minmax(0, 1fr) 214px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-feed { grid-column: 2 !important; grid-row: 2 / span 12; position: sticky; top: var(--side-top); margin-top: 0; }
html.ui9.page-tiktok .v9-feed { grid-row: 1 / span 20; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-feed > .v9-hud { display: block; margin-bottom: 6px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard { border-radius: var(--r-card); overflow: hidden; background: var(--elevated); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard .h { display: flex; align-items: center; gap: 6px; padding: 8px 10px; font-size: 11.5px; color: var(--text-dim); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard .h .m { flex: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard .h .v9-lg { width: 14px; height: 14px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard .h b { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard .h > span:last-child { margin-left: auto; flex: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard .t { padding: 0 10px 7px; font-size: 14px; font-weight: 600; line-height: 1.25; letter-spacing: -.012em; overflow-wrap: anywhere; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard .pic { aspect-ratio: 16 / 9; background: var(--mat); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard .pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; display: block; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard .pic img[hidden] { display: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard .ft { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard .d { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.3; color: var(--text-dim); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard .c { flex: none; max-width: 100%; height: 26px; padding: 0 9px; border-radius: 6px; display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; color: #fff; background: var(--accent); white-space: nowrap; overflow: hidden; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard .c:empty { display: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard .ph { color: var(--text-dim); font-weight: 400; }
/* TikTok and Snapchat: the phone. Words sit on the picture, the way they will on the screen. */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard.v { position: relative; aspect-ratio: 9 / 16; background: var(--mat); color: #fff; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard.v .pic { position: absolute; inset: 0; aspect-ratio: auto; background: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard.v .pic::after { content: ""; position: absolute; inset: 38% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.74) 46%, rgba(0,0,0,.88)); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard.v .h, html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard.v .t, html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard.v .ft { position: absolute; left: 0; right: 0; z-index: 1; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard.v .ph, html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard.v .h, html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard.v .h b { color: #fff; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard.v .h { bottom: 92px; padding: 0 10px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard.v .h > span:last-child { font-size: 10.5px; opacity: .85; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard.v .t { bottom: 46px; max-height: 46px; padding: 0 10px; font-size: 12px; font-weight: 500; line-height: 1.25; overflow: hidden; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard.v .ft { bottom: 8px; padding: 0 10px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard.v .d { display: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-adcard.v .c { flex: 1; justify-content: center; }
html.ui9.page-snapchat .v9-adcard.v .c { background: var(--yellow, #fffc00); color: #000; }

/* ---- the ticket ---- */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(.side, aside.rail) { position: sticky; top: var(--side-top); display: flex; flex-direction: column; min-width: 0; overflow: visible; max-height: calc(100vh - var(--side-top) - 20px); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9t { --bi: -3px; flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; margin: 0 !important; padding: 0; overflow: visible; background: var(--surface); border-radius: var(--r-ticket); }
html.ui9.page-tiktok #viewLaunch .v9t > .body { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 0; }
html.ui9.page-tiktok .v9t > header, html.ui9.page-tiktok.v9-built .v9t .field:has(> label #sideTreeCount) { display: none; }
html.ui9.page-smartnews .v9t > h2, html.ui9.page-smartnews.v9-built #sum, html.ui9.page-smartnews.v9-built .side > .card:first-child, html.ui9.page-snapchat.v9-built .side > .card:first-child, html.ui9.page-tiktok.v9-built #sumList { display: none; }
html.ui9.page-snapchat.v9-built .v9t > .row { display: none; }
html.ui9.page-tiktok #urlSlot { display: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-ttop { flex: 0 1 auto; min-height: 72px; overflow: hidden auto; padding: 12px 14px 10px; scrollbar-width: thin; }
html.ui9.page-tiktok .v9-ttop { padding-bottom: 8px; }
/* before the enhancer: the ticket holds its shape. If ui9.js never comes, what it hides comes back after 3s. */
@keyframes v9l-reveal-x { to { max-height: 60vh; visibility: visible; overflow: auto; } }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat):not(.v9-built) :is(#sum, #sumList, #sideTree) { max-height: 0; overflow: hidden; visibility: hidden; animation: v9l-reveal-x 0s 3s forwards; }
html.ui9.page-smartnews:not(.v9-built) .side > .card, html.ui9.page-snapchat:not(.v9-built) .side > .card, html.ui9.page-tiktok:not(.v9-built) aside.rail .card { padding: 12px 14px; margin: 0 0 8px; }
/* the notes pad leaves the ticket for the form: it takes no room until then, and comes back if ui9.js never lands */
@keyframes v9l-reveal-pad { to { max-height: 60vh; padding: 12px 14px; margin: 0 0 8px; visibility: visible; overflow: auto; } }
html.ui9.page-snapchat:not(.v9-built) .side > .card:last-child { max-height: 0; padding: 0; margin: 0; overflow: hidden; visibility: hidden; animation: v9l-reveal-pad 0s 3s forwards; }

html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .presetbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 0 8px; border-bottom: 1px solid var(--hair); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .presetbar label.f { margin: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .presetbar .row { display: contents; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .presetbar #preset { flex: 1 1 calc(100% - 118px) !important; width: 0 !important; min-width: 0; height: 30px; min-height: 30px; font-size: 12.5px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #presetApply { flex: none; height: 30px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#presetSave, #presetDel) { min-height: 22px; height: 22px; padding: 0 5px; font-size: 12px; font-weight: 450; background: none !important; box-shadow: none !important; color: var(--text-dim) !important; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#presetSave, #presetDel):hover { color: var(--text) !important; text-decoration: underline; text-underline-offset: 2px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #presetSave { order: 5; margin-left: -5px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #presetDel { order: 6; }

html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-plan { display: block; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-thumbs { display: flex; gap: 4px; margin-top: 10px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-plan > .v9l-thumbs:first-child { margin-top: 0; }
html.ui9.page-smartnews .v9-plan > .v9l-thumbs:first-child { margin-top: 10px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-thumbs[hidden] { display: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-thumbs > * { flex: 0 0 auto; width: 46px; height: 52px; border-radius: 5px; object-fit: cover; object-position: 50% 26%; box-shadow: 0 0 0 1px var(--line); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-thumbs span { display: grid; place-items: center; background: var(--surface-2); font: 500 11px/1 var(--mono); color: var(--text-dim); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-acct { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 14px; font-weight: 600; letter-spacing: -.012em; min-width: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-acct span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-acct.miss { color: var(--review); font-weight: 500; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-struct { margin-top: 4px; font: 500 12px/1.35 var(--mono); letter-spacing: -.02em; color: var(--text); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-struct i { font-style: normal; color: var(--text-dim); padding: 0 1px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-rows { margin: 9px 0 0; border-top: 1px solid var(--hair); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-height: 25px; padding: 4px 0 3px; border-bottom: 1px solid var(--hair); font-size: 12.5px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-rows dt { flex: none; color: var(--text-dim); font-size: 12px; white-space: nowrap; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-rows dd { margin: 0; min-width: 0; text-align: right; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9t .v9l-rows dd.mono { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-rows dd.warn { color: var(--rejected); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-left { margin-top: 9px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-left .v9-hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--review); margin-bottom: 6px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-left .v9-segbar { --c: var(--hazard); --track: var(--gauge-track); flex: none; width: 64px; height: 7px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-need { display: flex; flex-wrap: wrap; gap: 4px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-need button { height: 24px; padding: 0 8px; border: 0; border-radius: 6px; cursor: pointer; font: 500 12px/1 var(--sans); color: var(--review); background: var(--review-bg); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-need button:hover { text-decoration: underline; text-underline-offset: 2px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-ok { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; font-weight: 500; color: var(--live); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-ok .v9-i { width: 14px; height: 14px; stroke-width: 2.2; }
/* what gets made: the page's own tree, one tap away. TikTok and Snapchat have no review sheet, so this is their look before Launch. */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-tree { margin-top: 9px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-tree > summary { display: flex; align-items: center; gap: 6px; min-height: 24px; cursor: pointer; font-size: 12px; font-weight: 500; color: var(--text-dim); list-style: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-tree > summary::-webkit-details-marker { display: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-tree > summary::before { content: "\25B8"; font-size: 10px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-tree[open] > summary::before { content: "\25BE"; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-tree > summary:hover { color: var(--text); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-tree :is(.sidetree, #sideTree) { max-height: 170px; margin: 4px 0 0 !important; overflow-y: auto; font-size: 12px; scrollbar-width: thin; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #sideTree :is(.t-c, .stc) { margin: 5px 0 2px; font-weight: 600; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #sideTree :is(.t-g, .sts) { margin: 2px 0 1px 10px; font-weight: 500; color: var(--text-dim); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #sideTree :is(.t-a, .sta) { margin: 0 0 0 20px; color: var(--text-dim); opacity: 1; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* TikTok: how many people, right on the ticket */
html.ui9.page-tiktok #audPanel { margin: 10px 0 0 !important; padding-top: 9px; border-top: 1px solid var(--hair); }
html.ui9.page-tiktok #audPanel > label.f { margin-bottom: 7px; }
html.ui9.page-tiktok #audPanel .bar { height: 8px; margin: 0 !important; border-radius: 0; background: repeating-linear-gradient(90deg, var(--line-strong) 0 3px, transparent 3px 5px); transform: skewX(-18deg); }
html.ui9.page-tiktok #audBar { background: repeating-linear-gradient(90deg, var(--accent) 0 3px, transparent 3px 5px) !important; }
html.ui9.page-tiktok #audPanel > div:last-child { margin-top: 7px !important; }
html.ui9.page-tiktok #audRange { font: 500 12.5px/1.2 var(--mono) !important; letter-spacing: -.02em; }

/* perforation: the boarding pass, alive again */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-perf { position: relative; flex: none; height: 16px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-perf::before { content: ""; position: absolute; left: 13px; right: 13px; top: 7.5px; border-top: 1.5px dashed var(--line-strong); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-perf i { position: absolute; top: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-perf i:first-child { left: -8.5px; clip-path: inset(0 0 0 8px); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-perf i:last-child { right: -8.5px; clip-path: inset(0 8px 0 0); }

/* the stub: the status, the words, the button. It never scrolls. */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-stub { position: relative; flex: none; padding: 2px 14px 12px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-stub > .field { margin: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-stub > .field > label.f { display: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#segStatus, .v9-st) { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 34px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#segStatus, .v9-st) button { justify-content: center; min-height: 30px; }
html.ui9.page-tiktok #segStatus button[data-v="ENABLE"].on, html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-st button[data-ux-st="ACTIVE"].on { background: var(--hazard); color: var(--go-ink); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#statusHelp, #activeWarn, .v9-sthelp) { margin: 7px 1px 0; font-size: 12px; line-height: 1.35; font-weight: 400; color: var(--text-dim); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-expo { margin: 3px 1px 0; font-size: 12px; line-height: 1.35; font-weight: 550; color: var(--text); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-expo[hidden], html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-sthelp[hidden] { display: none; }
/* one warning, not three: the kept line holds two rows beside the amount, and its title has every word */
@media (min-width: 1101px) { html.ui9.page-smartnews #activeWarn { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(.v9-stub, .v9-extras) > .switch, html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(.v9-stub, .v9-extras) > label.v9-mk { display: flex; align-items: baseline; gap: 7px; margin: 6px 1px 0 !important; padding: 0 !important; font-size: 12px !important; font-weight: 400 !important; line-height: 1.35; color: var(--text-dim); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(.v9-stub, .v9-extras) .switch b { font-weight: 400; color: var(--text-dim); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(.v9-stub, .v9-extras) .switch .muted { color: var(--text-dim); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(.v9-stub, .v9-extras) input[type="checkbox"] { width: 14px !important; height: 14px; margin: 0; flex: none; align-self: center; accent-color: var(--text); min-height: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#run, #btnLaunch, #lRun) {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 46px; margin-top: 8px !important; padding: 0 12px !important; border: 0; border-radius: 9px;
  background: var(--grad); color: #fff; font: 600 14px/1 var(--sans); letter-spacing: -.01em; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 rgba(22,19,14,.3); transition: filter var(--t1);
}
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#run, #btnLaunch, #lRun):hover { color: #fff; filter: brightness(1.07); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#run, #btnLaunch, #lRun):disabled { opacity: .75; }
/* SmartNews keeps #0099eb: white on it reads at 3:1, so the words go dark */
html.ui9.page-smartnews #run:not(.btn-danger), html.ui9.page-smartnews #run:not(.btn-danger):hover { color: var(--go-ink); }
html.ui9.page-smartnews .v9-adcard .c { color: var(--go-ink); }
/* Snapchat: yellow can never carry white */
html.ui9.page-snapchat .wrap #lRun { background: var(--yellow, #fffc00); color: #000; box-shadow: inset 0 0 0 1.5px #000; }
html.ui9.page-snapchat .wrap #lRun:hover { color: #000; }
/* ACTIVE changes shape. 03-fixes holds this for #btnLaunch and #run; #lRun is added here from its own .danger. */
html.ui9.page-snapchat .wrap #lRun.danger {
  height: 52px; color: #ffcf5c; box-shadow: none; border: 5px solid transparent; font-size: 13.5px;
  background: linear-gradient(#16130e, #16130e) padding-box, repeating-linear-gradient(-45deg, var(--hazard) 0 8px, #16130e 8px 16px) border-box !important;
}
html.ui9.page-snapchat .wrap #lRun.danger:hover { color: #ffcf5c; filter: brightness(1.15); }
html.ui9.page-snapchat .wrap #lRun.danger::after { content: " \B7  spends now"; font-weight: 500; white-space: pre; }
html.ui9.page-tiktok #btnLaunch.btn-danger, html.ui9.page-smartnews #run.btn-danger { height: 52px; border: 5px solid transparent; font-size: 13.5px; box-shadow: none; color: #ffcf5c; }
html.ui9.page-tiktok #btnLaunch.btn-danger:hover, html.ui9.page-smartnews #run.btn-danger:hover { color: #ffcf5c; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#btnLaunch.btn-danger, #run.btn-danger)::after { white-space: pre; }
html.ui9.page-tiktok #btnLaunch.btn-danger, html.ui9.page-smartnews #run.btn-danger, html.ui9.page-snapchat .wrap #lRun.danger { padding: 0 8px !important; }
/* dark: the ticket is near the fill, so the button takes a raised body and darker gaps. It stays the loudest thing here. */
html.ui9[data-theme="dark"]:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#btnLaunch.btn-danger, #run.btn-danger, #lRun.danger, .sheet.v9-hot #rvGo) {
  background: linear-gradient(var(--bezel-3), var(--bezel-3)) padding-box, repeating-linear-gradient(-45deg, var(--hazard) 0 8px, var(--bezel-well) 8px 16px) border-box !important;
}
html.ui9.page-tiktok #btnQlSave { display: block; width: auto !important; min-height: 0; height: 24px; margin: 5px 0 -3px auto !important; padding: 0 2px; background: none !important; box-shadow: none !important; font-size: 12px; font-weight: 450; color: var(--text-dim); }
html.ui9.page-tiktok #btnQlSave:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
html.ui9.page-tiktok #qlSaveOut { flex: 0 1 auto; min-height: 0; overflow: auto; padding: 0 14px; }
html.ui9.page-tiktok #qlSaveOut:empty { display: none; }
html.ui9.page-tiktok #progBar { flex: none; height: 10px; margin: 0 14px 10px; border-radius: 0; background: repeating-linear-gradient(90deg, var(--line-strong) 0 3px, transparent 3px 5px); transform: skewX(-18deg); }
html.ui9.page-tiktok #progBar > i { background: repeating-linear-gradient(90deg, var(--accent) 0 3px, transparent 3px 5px); }
/* the box only exists for the kept record: on a run its two lists are children of the ticket */
html.ui9.page-tiktok .v9-rec { display: contents; }
html.ui9.page-tiktok #progList { flex: 0 1 auto; min-height: 0; margin: 0; padding: 0 14px; max-height: 200px; }
html.ui9.page-tiktok #progList:empty { display: none; }
html.ui9.page-tiktok #progList li { padding: 5px 0; gap: 7px; font-size: 12.5px; border-bottom-color: var(--hair); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#out, #lOut, #runResult) { flex: 0 1 auto; min-height: 0; overflow: auto; margin: 0 !important; padding: 0 14px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#out, #lOut, #runResult):not(:empty) { padding-bottom: 12px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#out, #lOut, #runResult) .note { font-size: 12px; line-height: 1.4; margin: 0 0 6px; font-weight: 400; }
html.ui9.page-smartnews #out .prog { max-height: 180px; overflow: auto; margin: 0; }
html.ui9.page-smartnews #out .prog li { font-size: 12px; }
html.ui9.page-snapchat #lOut .prog { max-height: 180px; }
html.ui9.page-snapchat #lOut .prog li { padding: 5px 0; font-size: 12.5px; border-bottom-color: var(--hair); }
html.ui9.page-snapchat #lOut .bar { height: 10px; margin: 6px 0; border-radius: 0; background: repeating-linear-gradient(90deg, var(--line-strong) 0 3px, transparent 3px 5px); transform: skewX(-18deg); }
html.ui9.page-snapchat #lOut .bar > i { background: repeating-linear-gradient(90deg, var(--text) 0 3px, transparent 3px 5px); }

/* once it has gone out, the button is gone: no armed hazard beside "created" */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-donecard { padding: 2px 1px 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-donecard[hidden] { display: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-donecard b { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; letter-spacing: -.012em; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-donecard b .v9-i { width: 16px; height: 16px; stroke-width: 2.2; color: var(--live); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-donecard.part b .v9-i { color: var(--review); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-donecard p { margin: 3px 0 0; font-size: 12px; line-height: 1.35; color: var(--text-dim); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-acts { display: flex; gap: 6px; margin-top: 9px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-acts .btn { flex: 1; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9t.v9-done :is(.v9-st, #segStatus, .v9-stub > .field, .v9-stub > .switch, .v9-stub > .v9-mk, .v9-sthelp, #activeWarn, .v9-expo, #btnLaunch, #run, #lRun, #btnQlSave, .v9-extras) { display: none !important; }
/* it went out: the ticket says that one thing. What it was stays as a line above; what is missing is for the next one. */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9t.v9-done :is(.v9l-left, .v9l-ok, .v9l-rows, .v9-tree, #audPanel) { display: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9t.v9-done .v9-ttop { flex: none; }
/* the page's own record stays until the next launch rewrites it, under its own head, so it never reads as this form's result */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-lastrun { display: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9t.v9-was .v9-lastrun { display: block; flex: none; margin: 0 14px 7px; padding-top: 9px; border-top: 1px solid var(--hair); color: var(--text-dim); }
@media (min-width: 1101px) {
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9t.v9-was :is(#out, #lOut) { flex: 0 0 auto; max-height: clamp(72px, calc(100vh - 640px), 112px); }
  /* TikTok's record is two lists. One box, which gives way on a short window so the plan keeps its money rows and Still needed. */
  html.ui9.page-tiktok .v9t.v9-was .v9-rec { display: block; flex: 0 0 auto; min-height: 0; max-height: clamp(72px, calc(100vh - 660px), 196px); overflow: auto; scrollbar-width: thin; }
  html.ui9.page-tiktok .v9t.v9-was .v9-rec > :is(#progList, #runResult) { max-height: none; overflow: visible; }
}
/* something runs on past the edge: the box says so */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(.v9-ttop, #out, #lOut, #runResult, #progList, #sideTree, .v9-rec).v9-more { -webkit-mask-image: linear-gradient(#000 calc(100% - 18px), transparent); mask-image: linear-gradient(#000 calc(100% - 18px), transparent); }
/* the toast is on the button now, not twice */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat).v9-toastnote #toast, html.ui9.page-smartnews body > .v9-tn { visibility: hidden; }

/* ---- rail: the sequence on ink ---- */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-ro { margin-top: 2px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seqbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; height: 9px; transform: skewX(-18deg); margin: 10px 2px 11px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seqbar i { background: rgba(244,239,228,.13); transition: background var(--t3); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seqbar i.on { background: var(--lamp-ok); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-n { display: grid; grid-template-columns: .8fr .9fr 1.2fr; gap: 4px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-n > div { min-width: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-n span { display: block; margin-top: 5px; font: 500 10px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--on-bezel-dim); white-space: nowrap; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-n b { display: block; font: 500 15px/1 var(--mono); letter-spacing: -.035em; color: var(--on-bezel); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-n b small { font-size: 11px; color: var(--on-bezel-dim); letter-spacing: -.01em; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq { flex: none; position: relative; margin: 0; padding: 2px 0 6px; list-style: none; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li { position: relative; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li:not(:last-child)::before { content: ""; position: absolute; left: 14.5px; top: 25px; bottom: -7px; width: 1px; background: var(--bezel-line-2); z-index: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li.done:not(:last-child)::before { background: var(--lamp-ok); opacity: .55; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-b { position: relative; z-index: 1; display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 10px; align-items: center; width: 100%; min-height: 44px; padding: 5px 8px; border: 0; border-radius: var(--r-key); background: none; cursor: pointer; text-align: left; color: var(--on-bezel-dim); transition: background var(--t1), color var(--t1); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-b:hover { background: rgba(244,239,228,.06); color: var(--on-bezel); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-led { grid-row: 1 / 3; align-self: start; margin-top: 3px; width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; background: var(--bezel); box-shadow: inset 0 0 0 1.5px var(--on-bezel-faint); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-b b { font: 500 13px/1.25 var(--sans); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-b small { font-size: 11.5px; line-height: 1.3; color: var(--on-bezel-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li.done .v9l-led { background: var(--lamp-ok); box-shadow: 0 0 8px rgba(87,214,141,.5); color: var(--bezel-well); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li.done .v9l-led::after { content: ""; width: 6px; height: 3px; border-left: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg) translate(.5px, -1px); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li.todo small { color: var(--hazard); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat).v9-manage .v9l-seq li.todo small { color: var(--on-bezel-dim); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li.here .v9l-b { background: rgba(244,239,228,.095); color: var(--on-bezel); box-shadow: inset 0 1px 0 rgba(244,239,228,.06); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li.here:not(.done) .v9l-led { box-shadow: inset 0 0 0 1.5px var(--on-bezel), 0 0 0 3px rgba(244,239,228,.1); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li.here:not(.done) .v9l-led::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--on-bezel); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li.go .v9l-led { box-shadow: none; background: transparent; color: var(--on-bezel-faint); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li.go .v9l-led::after { content: ""; width: 0; height: 0; margin-left: 2px; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li.go.armed .v9l-led { color: var(--lamp-ok); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li.go.armed .v9l-b { color: var(--on-bezel); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li.go.sent .v9l-led { background: var(--lamp-ok); color: var(--bezel-well); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li.go.sent .v9l-led::after { width: 6px; height: 3px; margin: 0; border: 0; border-left: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg) translate(.5px, -1px); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li.go.sent.part .v9l-led { background: var(--hazard); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-well-h b.v9-allsent { color: var(--lamp-ok); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-agent { flex: none; margin: auto 0 10px; padding: 8px 10px 9px; border-radius: 9px; background: var(--bezel-2); box-shadow: inset 0 0 0 1px var(--bezel-line); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-agent .v9-hud { color: var(--on-bezel-dim); }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-agent p { margin: 5px 0 0; font-size: 15px; line-height: 1.2; color: var(--on-bezel); }
@media (max-height: 800px) {
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-b { min-height: 42px; padding-block: 3px; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-agent { display: none; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-thumbs > * { height: 44px; }
}

/* ---- SmartNews Final check: leads with the money, the confirm lands where Launch was ---- */
html.ui9.page-smartnews #sheetHost .scrim:has(#rvGo) { display: block; padding: 0; overflow: hidden; }
html.ui9.page-smartnews #sheetHost .sheet:has(#rvGo) {
  position: fixed; left: auto; right: 12px; top: 12px; bottom: 12px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; grid-template-rows: auto auto minmax(0, 1fr) auto; width: min(860px, calc(100vw - var(--rail-w) - 24px)); padding: 0; overflow: hidden; column-gap: 8px; outline: 0;
}
html.ui9.page-smartnews #sheetHost .sheet:has(#rvGo) > header { display: contents; }
html.ui9.page-smartnews #sheetHost .sheet:has(#rvGo) > header .spacer { display: none; }
html.ui9.page-smartnews .v9-fc { grid-row: 1; grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 13px 16px; background: var(--bezel); color: var(--on-bezel); }
html.ui9.page-smartnews .v9-fc .v { font: 450 30px/1 var(--mono); letter-spacing: -.05em; white-space: nowrap; font-variant-numeric: tabular-nums; }
html.ui9.page-smartnews .v9-fc .v.txt { font: 600 15px/1.2 var(--sans); letter-spacing: -.012em; }
html.ui9.page-smartnews .v9-fc small { display: block; margin-top: 5px; font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--on-bezel-dim); white-space: nowrap; }
html.ui9.page-smartnews .v9-fc p { flex: 1; min-width: 0; margin: 0; font-size: 13px; line-height: 1.35; color: var(--on-bezel-dim); }
html.ui9.page-smartnews .v9-fc p b { font-weight: 550; color: var(--on-bezel); }
html.ui9.page-smartnews .v9-fc p b.hot { color: var(--hazard); }
html.ui9.page-smartnews .sheet.v9-hot .v9-fc { box-shadow: inset 0 0 0 2px var(--hazard); }
html.ui9.page-smartnews #sheetHost .sheet:has(#rvGo) > header > b { grid-row: 2; grid-column: 1 / 3; align-self: center; padding: 8px 0 8px 14px; font-size: 13px; font-weight: 600; letter-spacing: -.012em; white-space: nowrap; }
html.ui9.page-smartnews #rvAi { grid-row: 2; grid-column: 3; align-self: center; }
html.ui9.page-smartnews #sheetHost .sheet > header > label.chk { grid-row: 2; grid-column: 4 / -1; align-self: center; margin: 0 14px 0 0 !important; white-space: nowrap; }
html.ui9.page-smartnews #sheetHost .sheet:has(#rvGo) > .body { grid-row: 3; grid-column: 1 / -1; min-height: 0; overflow: auto; padding: 8px 14px; box-shadow: inset 0 1px 0 var(--hair), inset 0 -1px 0 var(--line); }
html.ui9.page-smartnews #rvCancel { grid-row: 4; grid-column: 1 / 3; justify-self: end; align-self: center; }
html.ui9.page-smartnews #rvGo { grid-row: 4; grid-column: 3 / -1; justify-self: end; position: relative; width: var(--v9-lw, 312px); max-width: 100%; height: 46px; margin: 12px 14px 12px 0; overflow: hidden; border: 0; border-radius: 9px; background: var(--grad); color: var(--go-ink); font: 600 14px/1 var(--sans); box-shadow: none; }
html.ui9.page-smartnews #rvGo:hover { filter: brightness(1.07); color: var(--go-ink); }
html.ui9.page-smartnews .sheet.v9-hot #rvGo { height: 52px; color: #ffcf5c; border: 5px solid transparent; font-size: 13.5px; background: linear-gradient(#16130e, #16130e) padding-box, repeating-linear-gradient(-45deg, var(--hazard) 0 8px, #16130e 8px 16px) border-box; }
html.ui9.page-smartnews .sheet.v9-hot #rvGo:hover { color: #ffcf5c; }
html.ui9.page-smartnews .sheet.v9-hot #rvGo::after { content: " \B7  spends now"; font-weight: 500; white-space: pre; }
/* armed after a beat: a double click on Launch can never fall through to this button */
html.ui9.page-smartnews #rvGo.arming { pointer-events: none; }
html.ui9.page-smartnews #rvGo.arming::before { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.28); transform-origin: right; animation: v9l-arm 450ms linear forwards; }
@keyframes v9l-arm { from { transform: scaleX(1); } to { transform: scaleX(0); } }
html.ui9.page-smartnews .rg { margin-bottom: 8px; border: 0; border-radius: var(--r-key); box-shadow: 0 0 0 1px var(--hair); }
html.ui9.page-smartnews .rg > .hd { gap: 8px; padding: 6px 8px; background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); border-radius: var(--r-key) var(--r-key) 0 0; }
html.ui9.page-smartnews .rg > .hd .input { min-height: 28px; font-size: 12.5px; }
html.ui9.page-smartnews .ra { grid-template-columns: 16px 44px minmax(0, 1fr); gap: 8px; padding: 7px 8px; border-top-color: var(--hair); }
html.ui9.page-smartnews .ra img, html.ui9.page-smartnews .ra .ph2 { width: 44px; height: 44px; border-radius: 5px; }
html.ui9.page-smartnews .ra .flds .input { min-height: 28px; padding: 3px 7px; font-size: 12.5px; }
html.ui9.page-smartnews .ra .nm { font-weight: 500; }
html.ui9.page-smartnews .ra input[type="checkbox"], html.ui9.page-smartnews .rg > .hd input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--accent); }
html.ui9.page-smartnews .input.long { box-shadow: inset 0 0 0 1.5px var(--rejected); }
html.ui9.page-smartnews .input.filled { box-shadow: inset 0 0 0 1.5px var(--live); }
/* the Manage edit sheet: same shell, plain */
html.ui9.page-smartnews .sheet.narrow { padding-bottom: 8px; }
html.ui9.page-smartnews .sheet > header b { font-size: 14px; font-weight: 600; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .sheet > header, html.ui9.page-snapchat .sheethd { gap: 6px; padding: 10px 14px; }
html.ui9.page-snapchat .sheethd b { font-size: 14px; font-weight: 600; }
html.ui9.page-tiktok .sheet .bd, html.ui9.page-snapchat .sheetbody { padding: 12px 14px 16px; }
html.ui9.page-snapchat .bgmulti { border: 0; border-radius: var(--r-key); box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
html.ui9.page-snapchat .mini { min-height: 24px; padding: 0 7px; border: 0; border-radius: 5px; font: 450 12px/1 var(--sans); background: none; color: var(--text-dim); }
html.ui9.page-snapchat .mini:hover { background: var(--hover); color: var(--text); }
html.ui9.page-snapchat .mini.danger { color: var(--text-dim); }
html.ui9.page-snapchat .mini.danger:hover { background: var(--rejected-bg); color: var(--rejected); }

/* ---- Manage: pill, name, stats first. Actions quiet at rest, still there. ---- */
html.ui9.page-tiktok #viewManage > .card { overflow: clip; }
html.ui9.page-tiktok #viewManage > .card > header { position: sticky; top: calc(var(--shell-h) + var(--bar-h) + 3px); z-index: 20; gap: 6px; min-height: 46px; padding: 7px 12px; background: var(--surface); box-shadow: 0 1px 0 var(--hair); }
html.ui9.page-tiktok #viewManage > .card > header .hint { display: none; }
html.ui9.page-tiktok #viewManage > .card > header .spacer { min-width: 4px; flex: 1 1 4px; }
html.ui9.page-tiktok #viewManage > .card > header .input { width: auto; }
html.ui9.page-tiktok #viewManage > .card > header h2 { font-size: 14px; font-weight: 600; margin-right: 2px; white-space: nowrap; }
html.ui9.page-tiktok #mAcct { max-width: 200px !important; }
html.ui9.page-tiktok #mQuery { max-width: 130px; }
html.ui9.page-tiktok #viewManage > .card > .body { padding: 10px 12px 12px; }
html.ui9.page-tiktok #mTree .node { margin-bottom: 6px; border: 0; border-radius: var(--r-key); box-shadow: 0 0 0 1px var(--line); }
html.ui9.page-tiktok #mTree .sub { margin-top: 6px; border: 0; border-radius: var(--r-key); box-shadow: 0 0 0 1px var(--hair); }
html.ui9.page-tiktok #mTree :is(.node, .sub) > .hd { flex-wrap: wrap; row-gap: 3px; gap: 8px; min-height: 40px; padding: 5px 8px 5px 10px; background: none; }
html.ui9.page-tiktok #mTree .node > .hd { background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); }
html.ui9.page-tiktok #mTree .kidrow { flex-wrap: wrap; row-gap: 3px; gap: 8px; min-height: 42px; padding: 5px 0; border-top-color: var(--hair); font-size: 12.5px; }
html.ui9.page-tiktok #mTree .nm { order: 1; font-weight: 500; flex: 1 1 200px; min-width: 120px; }
html.ui9.page-tiktok #mTree .hd > .muted, html.ui9.page-tiktok #mTree .kidrow > .muted { order: 2; font-size: 12px; color: var(--text-dim); }
html.ui9.page-tiktok #mTree .pill { order: 0; }
html.ui9.page-tiktok #mTree .pill.stat { order: 3; background: none; border: 0; box-shadow: none; padding: 0 2px; font: 500 12px/1.2 var(--mono); letter-spacing: -.02em; }
html.ui9.page-tiktok #mTree .pill.stat b { font-weight: 600; }
html.ui9.page-tiktok #mTree .nm ~ .pill:not(.stat) { order: 4; }
html.ui9.page-tiktok #mTree .pill.map { background: var(--surface-2); color: var(--text-dim); }
html.ui9.page-tiktok #mTree .btn { order: 5; min-height: 24px; height: 24px; padding: 0 6px; font-size: 12px; font-weight: 450; color: var(--text-dim); background: none; box-shadow: none; }
html.ui9.page-tiktok #mTree .btn:hover { color: var(--text); background: var(--hover); }
html.ui9.page-tiktok #mTree .kidrow img { width: 40px; height: 32px; border-radius: 4px; }
html.ui9.page-tiktok .notebox { border-left-color: var(--text-dim); }
/* SmartNews: rows in a tree */
html.ui9.page-smartnews #manageTab .card { padding: 10px 12px 12px; }
html.ui9.page-smartnews .mbar { gap: 8px; align-items: flex-end; margin-bottom: 8px; }
html.ui9.page-smartnews .mbar label.chk { margin: 0 0 7px !important; }
html.ui9.page-smartnews #mTotals { font: 500 12px/1.3 var(--mono) !important; letter-spacing: -.02em; }
html.ui9.page-smartnews #manageTab .note { margin: 0 0 8px; }
html.ui9.page-smartnews .node { border-top-color: var(--hair); }
html.ui9.page-smartnews .node > .row1 { gap: 8px; min-height: 40px; padding-block: 5px; }
html.ui9.page-smartnews .node.l-c > .row1 { font-weight: 500; }
html.ui9.page-smartnews .tw { border: 0; border-radius: 4px; background: var(--surface-2); font-size: 10px; }
html.ui9.page-smartnews .node .nm2 { font-weight: 500; }
html.ui9.page-smartnews .stat2 { gap: 8px; padding: 0 2px; border-radius: 0; background: none; font: 500 12px/1.2 var(--mono); letter-spacing: -.02em; }
html.ui9.page-smartnews .stat2 b { font-weight: 600; }
html.ui9.page-smartnews .node > .row1 .stat2 { margin-left: auto; }
html.ui9.page-smartnews .node > .row1 .acts { flex: none; width: 212px; margin-left: 0; justify-content: flex-end; }
html.ui9.page-smartnews .acts .btn { min-height: 24px; padding: 0 6px; font-size: 12px; font-weight: 450; color: var(--text-dim); background: none; box-shadow: none; }
html.ui9.page-smartnews .acts .btn:hover { color: var(--text); background: var(--hover); }
html.ui9.page-smartnews .pill { padding: 2px 6px; font-size: 10px; font-weight: 600; }
/* no emoji in the row: the word, same button, same title */
html.ui9.page-smartnews .acts [data-act="note"] { font-size: 0; }
html.ui9.page-smartnews .acts [data-act="note"]::after { content: "Note"; font-size: 12px; }
/* stats, then actions, each in its own column on one right edge, so numbers read straight down. The width is the widest set: Resume, Edit, Submit, Note, Delete. */
@media (min-width: 1101px) {
  html.ui9.page-smartnews .node > .row1 .acts { flex-wrap: nowrap; gap: 2px; width: 244px; }
  html.ui9.page-smartnews .node > .row1 .stat2 { flex: none; }
  html.ui9.page-smartnews .node > .row1 .stat2 > * { text-align: right; }
  html.ui9.page-smartnews .node > .row1 .stat2 > :nth-child(1) { min-width: 8ch; }
  html.ui9.page-smartnews .node > .row1 .stat2 > :nth-child(2) { min-width: 7ch; }
  html.ui9.page-smartnews .node > .row1 .stat2 > :nth-child(3) { min-width: 10ch; }
  html.ui9.page-smartnews .node > .row1 .stat2 > :nth-child(4) { min-width: 8ch; }
  html.ui9.page-smartnews .node > .row1 .stat2 > :nth-child(5) { min-width: 5ch; }
}
/* room for all of it: one line a row, the name gives way and keeps its title */
@media (min-width: 1340px) {
  html.ui9.page-smartnews .node > .row1 { flex-wrap: nowrap; }
  html.ui9.page-smartnews .node > .row1 > .pill { flex: none; }
  html.ui9.page-smartnews .node > .row1 > .nm2 { flex: 0 1000000 auto; min-width: 96px; }
  /* last to give way, and only once the name is down to its floor */
  html.ui9.page-smartnews .node > .row1 > :is(.ids, .dlv, .muted) { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
}
/* less room: the two columns stay where they are, and only the words beside them take a second line. Nothing is cut. */
@media (min-width: 1101px) and (max-width: 1339px) {
  html.ui9.page-smartnews .node > .row1 { position: relative; row-gap: 2px; padding-right: 604px; }
  html.ui9.page-smartnews .node > .row1 > .nm2 { max-width: 100%; }
  html.ui9.page-smartnews .node > .row1 > :is(.stat2, .acts) { position: absolute; top: 50%; translate: 0 -50%; margin: 0; }
  html.ui9.page-smartnews .node > .row1 > .stat2 { right: 256px; }
  html.ui9.page-smartnews .node > .row1 > .acts { right: 4px; }
}
/* narrow: the row wraps as it always did. The actions keep one line and the stats stay inside the row. */
@media (max-width: 1100px) {
  html.ui9.page-smartnews .node > .row1 .acts { width: auto; }
}
@media (max-width: 560px) {
  html.ui9.page-smartnews .node > .row1 .stat2 { flex-wrap: wrap; margin-left: 0; }
}
/* Snapchat */
html.ui9.page-snapchat #viewManage .card { padding: 0 14px 13px; overflow: clip; }
html.ui9.page-snapchat #viewManage .card > h2 { display: flex; align-items: center; min-height: 40px; margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -.012em; }
html.ui9.page-snapchat #viewManage .sub { margin: -2px 0 9px; font-size: 12px; line-height: 1.4; color: var(--text-dim); }
html.ui9.page-snapchat #viewManage .card + .card { margin-top: 8px; }
html.ui9.page-snapchat #viewManage .row { align-items: flex-end; gap: 8px; margin: 0 0 8px !important; }
html.ui9.page-snapchat .node { margin-bottom: 6px; border: 0; border-radius: var(--r-key); box-shadow: 0 0 0 1px var(--line); }
html.ui9.page-snapchat .hd { gap: 8px; min-height: 40px; padding: 5px 8px 5px 10px; font-size: 12.5px; }
html.ui9.page-snapchat .hd .nm { font-weight: 500; }
/* stats, then quiet actions, on one right edge, so a column reads straight down */
html.ui9.page-snapchat :is(.hd, .adrow) > .pill { order: 0; }
html.ui9.page-snapchat :is(.hd, .adrow) > :is(.nm, span:not(.pill, .muted, .stat)) { order: 1; }
html.ui9.page-snapchat :is(.hd, .adrow) > .muted { order: 2; }
html.ui9.page-snapchat :is(.hd, .adrow) > .stat { order: 3; margin-left: auto; }
html.ui9.page-snapchat :is(.hd, .adrow) > .mini { order: 4; }
html.ui9.page-snapchat :is(.hd, .adrow):not(:has(> .stat)) > .mini.scstat { margin-left: auto; }
html.ui9.page-snapchat .mini.scstat { min-width: 58px; justify-content: center; }
html.ui9.page-snapchat .kids { padding: 6px 8px 8px; border-top-color: var(--hair); background: none; }
html.ui9.page-snapchat div.sub { border: 0; border-radius: var(--r-key); box-shadow: 0 0 0 1px var(--hair); background: none; margin: 6px 0 0; }
html.ui9.page-snapchat div.sub .hd { padding: 5px 8px; }
html.ui9.page-snapchat .adrow { gap: 8px; min-height: 40px; padding: 5px 8px; border-top-color: var(--hair); font-size: 12.5px; }
html.ui9.page-snapchat .stat { font: 500 12px/1.2 var(--mono); letter-spacing: -.02em; }
html.ui9.page-snapchat .stat b { font-weight: 600; color: var(--text); }
html.ui9.page-snapchat .pill { padding: 2px 6px; font-size: 10px; font-weight: 600; }
html.ui9.page-snapchat td { padding: 7px 10px 7px 0; font-weight: 400; border-top-color: var(--hair); font-size: 12.5px; }
html.ui9.page-snapchat th { padding: 0 10px 6px 0; font-weight: 500; }

/* ---- responsive ---- */
@media (max-width: 1320px) {
  html.ui9.page-smartnews #copyCard { grid-template-columns: minmax(0, 1fr) 220px; }
}
@media (max-width: 1240px) {
  html.ui9.page-smartnews #copyCard, html.ui9.page-snapchat .cols > div:first-child > .card:has(#lHeadline), html.ui9.page-tiktok #viewLaunch > div:first-child > section.card:nth-of-type(5) > .body { grid-template-columns: minmax(0, 1fr); }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-feed { grid-column: 1 !important; grid-row: auto; position: static; max-width: 214px; margin-top: 10px; }
  html.ui9.page-smartnews .v9-feed { max-width: 300px; }
}
@media (max-width: 1100px) {
  html.ui9.page-smartnews .wrap, html.ui9.page-tiktok #viewLaunch, html.ui9.page-snapchat .cols { grid-template-columns: minmax(0, 1fr); }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(.side, aside.rail) { position: static !important; max-height: none; margin-top: 0; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-ttop { overflow: visible; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9t::after, html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-perf { display: none; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .wrap { padding-bottom: 112px; }
  html.ui9.page-smartnews #manageTab { padding-bottom: 112px !important; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) { flex-wrap: wrap; }
  html.ui9.page-smartnews .acctbar { margin-right: var(--gut); }
  html.ui9.page-smartnews:not(.v9-built) .acctbar { height: auto; padding-bottom: 12px; }
  html.ui9.page-smartnews:not(.v9-built) .acctbar > .launch-only { position: static; width: auto; margin-top: 8px; }
  /* launch must always be reachable: the stub pins to the bottom of the screen */
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-stub { position: fixed; z-index: 35; left: var(--rail-w); right: 0; bottom: 0; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 2px 10px; align-items: center; padding: 10px 14px; background: var(--surface); box-shadow: 0 -1px 0 var(--line), 0 -14px 22px -16px rgba(22,19,14,.4); }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat).v9-manage .v9-stub { display: none; }
  /* the exposure stays beside the button, whole, on its own row. The rest of the stub lives at the foot of the ticket here. */
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-stub .v9-expo { grid-column: 1 / -1; grid-row: 2; margin: 5px 0 0; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-extras:not(:empty) { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--hair); }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-extras > :first-child { margin-top: 0 !important; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-extras #btnQlSave { margin: 6px 0 0 !important; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9t.v9-was :is(#out, #lOut, #runResult, #progList) { max-height: none; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#run, #btnLaunch, #lRun) { height: 40px; margin-top: 0 !important; }
  html.ui9.page-tiktok #btnLaunch.btn-danger, html.ui9.page-smartnews #run.btn-danger, html.ui9.page-snapchat .wrap #lRun.danger { height: 42px; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-donecard { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-donecard p { display: none; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-acts { margin: 0; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #toast { bottom: 96px; }
  html.ui9.page-smartnews #sheetHost .sheet:has(#rvGo) { width: auto; left: 12px; right: 12px; top: 12px; bottom: 12px; }
}
@media (min-width: 1101px) and (max-width: 1240px) {
  /* the ticket is 300 wide here: the longest label keeps 8px off the stripes, with room for two-digit counts */
  html.ui9.page-tiktok #btnLaunch.btn-danger, html.ui9.page-smartnews #run.btn-danger, html.ui9.page-snapchat .wrap #lRun.danger { font-size: 12.5px; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  html.ui9.page-smartnews #sheetHost .sheet:has(#rvGo) { left: calc(var(--rail-w) + 12px); }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > .seg button:is([data-href="launch.html"], [data-href="launch.html?p=meta"], .on)::after { font-size: 12px; }
}
@media (max-width: 860px) {
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body::after { display: none; }
  /* the rail folds to a thin band: where you are, what is left */
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-rail { position: sticky; top: var(--shell-h); z-index: 30; display: block; width: auto; height: auto; bottom: auto; padding: 0 12px 8px; overflow: visible; border-radius: 0 0 var(--r-bezel) var(--r-bezel); box-shadow: 0 6px 14px -8px rgba(22,19,14,.4); }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-ro { margin: 0; padding: 4px 0 0; background: none; box-shadow: none; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-n, html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-agent { display: none; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seqbar { margin: 7px 2px 0; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq { display: flex; gap: 2px; padding: 6px 0 0; overflow-x: auto; scrollbar-width: none; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li { flex: 0 0 auto; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-seq li::before { display: none; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-b { display: flex; align-items: center; gap: 6px; width: auto; min-height: 30px; padding: 0 8px; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-b small { display: none; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9l-led { margin: 0; align-self: center; flex: none; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#launchCol, #viewLaunch > div:first-child, .cols > div:first-child) > :is(.card, section.card), html.ui9.page-smartnews .acctbar { scroll-margin-top: 128px; }
  html.ui9.page-tiktok #viewLaunch .row, html.ui9.page-tiktok #viewLaunch .row.three { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-tiktok .field:has(> :is(#selAcct, #selCampaign, #selAdgroup)) { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .pickbar :is(#q, #cSearch) { flex-basis: 100%; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#launchCol, .cols > div:first-child) > .card > h2 .muted { display: none; }
  html.ui9.page-smartnews #launchCol > .card > h2 #pickCount, html.ui9.page-snapchat #selCount { display: inline !important; }
  html.ui9.page-tiktok #viewLaunch .card > header .hint { display: none; }
  html.ui9.page-smartnews .v9-acch .hint { display: none; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #toast { bottom: 156px; }
  /* the rail band holds this top, so the bar scrolls away under it, and stays the box its stripe needs */
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) { position: relative; top: 0; z-index: 1; }
  /* launch stays under the thumb */
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-stub { left: 0; bottom: calc(58px + env(safe-area-inset-bottom)); grid-template-columns: 112px minmax(0, 1fr); padding: 8px 12px; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#segStatus, .v9-st) { height: 40px; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) :is(#segStatus, .v9-st) button { padding: 0 2px; font-size: 12px; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .wrap { padding-bottom: 168px; }
  html.ui9.page-smartnews #manageTab { padding-bottom: 168px !important; }
  html.ui9.page-smartnews #sheetHost .sheet:has(#rvGo) { left: 8px; right: 8px; top: 8px; bottom: 8px; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
  html.ui9.page-smartnews .v9-fc { flex-wrap: wrap; gap: 8px 16px; }
  html.ui9.page-smartnews #sheetHost .sheet:has(#rvGo) > header > b { grid-column: 1 / -1; grid-row: 2; }
  html.ui9.page-smartnews #rvAi { grid-column: 1 / -1; grid-row: 3; justify-self: start; margin-left: 8px; }
  html.ui9.page-smartnews #sheetHost .sheet > header > label.chk { grid-column: 1 / -1; grid-row: 3; justify-self: end; margin-right: 10px !important; }
  html.ui9.page-smartnews #sheetHost .sheet:has(#rvGo) > .body { grid-row: 4; }
  html.ui9.page-smartnews #rvCancel { grid-row: 5; grid-column: 1; justify-self: start; margin-left: 8px; }
  html.ui9.page-smartnews #rvGo { grid-row: 5; grid-column: 2; width: auto; justify-self: stretch; margin: 8px 8px 8px 0; }
  html.ui9.page-tiktok #viewManage > .card > header { position: static; flex-wrap: wrap; }
}

@media (max-width: 400px) {
  /* a phone holds one word in the switch: the page you are on */
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > .seg button:not(.on)::after { content: none !important; }
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) body > :is(.topbar, .top) > .seg button:not(.on) { padding: 0 6px; }
}
/* a phone: the label takes two lines inside a shorter key pair, so the words never leave the button */
@media (max-width: 440px) {
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) .v9-stub { grid-template-columns: 96px minmax(0, 1fr); }
  html.ui9.page-tiktok #btnLaunch.btn-danger, html.ui9.page-smartnews #run.btn-danger, html.ui9.page-snapchat .wrap #lRun.danger { flex-direction: column; gap: 2px; height: 48px; padding: 0 8px !important; font-size: 12.5px; line-height: 1.1; white-space: normal; }
  html.ui9.page-tiktok #btnLaunch.btn-danger::after, html.ui9.page-smartnews #run.btn-danger::after, html.ui9.page-snapchat .wrap #lRun.danger::after { content: "spends now"; font-size: 11px; line-height: 1; white-space: nowrap; }
  html.ui9.page-smartnews .sheet.v9-hot #rvGo { padding: 0 6px; font-size: 12.5px; }
}
@media (max-width: 560px) {
  html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #cGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 276px; }
  html.ui9.page-snapchat #cGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 400px; }
}
@media (prefers-reduced-motion: reduce) {
  html.ui9.page-smartnews #rvGo.arming::before { display: none; }
}

/* ---- small things ---- */
/* closed sheets wait just off screen: their big shadows must not lie on the paper */
html.ui9:is(.page-tiktok, .page-snapchat) .sheet:not(.show) { box-shadow: none; }
/* focus reads as focus. Red rings read as a failed field, and a red tile ring reads as selected. */
/* !important because 01-base's accent ring has it. This selector is the more specific of the two, so it wins. */
html.ui9.page-tiktok :is(.input, input, select, textarea):focus-visible { box-shadow: 0 0 0 2px var(--text) !important; }
html.ui9.page-snapchat:not([data-theme="dark"]) :is(.wrap, .sheet) :focus-visible { outline-color: var(--text); }
/* yellow on paper is too faint to find a field by */
html.ui9.page-snapchat:not([data-theme="dark"]) :is(.input, input, select, textarea):focus-visible { box-shadow: 0 0 0 2px var(--text) !important; }
/* no emoji in chrome: the state words stay, read from the page's own label */
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #cSound[data-ux-say] { font-size: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #cSound[data-ux-say]::before { content: attr(data-ux-say); font-size: 12px; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #presetDel { font-size: 0; }
html.ui9:is(.page-smartnews, .page-tiktok, .page-snapchat) #presetDel::after { content: "Delete"; font-size: 12px; }
/* dark: a black mark on a dark switch needs a tile to stand on */
html.ui9[data-theme="dark"]:is(.page-smartnews, .page-snapchat) body > :is(.topbar, .top) > .seg button[data-href="tiktok.html"] { opacity: .8; }
html.ui9[data-theme="dark"].page-smartnews body > .topbar > .seg button[data-href="tiktok.html"] svg { background: var(--bezel-3); }

/* ===== 30-cost.css ===== */
/* =====================================================================
   v9 Cost: the ledger (DESIGN.md 4.4, 6.8). An instrument rail on ink, one
   ledger on paper. Layout is CSS keyed to html.ui9, so it holds before
   ui9.js runs. html.v9-cost-on means the enhancer has moved the nodes.
   ===================================================================== */
html.ui9.page-cost { --bar-h: 52px; --ax-l: 16px; --ax-u: 60px; --act-w: 118px; --pill-w: 58px; }

/* ---- the rail ---- */
html.ui9.page-cost .v9-rail { gap: 6px; padding: 3px 8px 8px; scrollbar-width: none; }
html.ui9.page-cost .v9-rail::-webkit-scrollbar { display: none; }

/* platform switch, in evidence order. The word shows only on the one you are on */
html.ui9.page-cost #pfTabs { flex: none; display: flex !important; gap: 2px !important; margin: 0 !important; padding: 3px; border-radius: 10px; background: var(--bezel-2); box-shadow: inset 0 0 0 1px var(--bezel-line); }
html.ui9.page-cost #pfTabs [data-pf="newsbreak"] { order: 1; }
html.ui9.page-cost #pfTabs [data-pf="meta"] { order: 2; }
html.ui9.page-cost #pfTabs [data-pf="smartnews"] { order: 3; }
html.ui9.page-cost #pfTabs [data-pf="snapchat"] { order: 4; }
html.ui9.page-cost #pfTabs .btn {
  flex: none; min-width: 34px; min-height: 30px; height: 30px; padding: 0 6px; border: 0; border-radius: var(--r-key); gap: 7px; background: none; box-shadow: none;
  color: var(--on-bezel-dim); font: 600 12.5px/1 var(--sans); opacity: .82; transition: background var(--t1), opacity var(--t1);
}
html.ui9.page-cost #pfTabs .btn:hover { background: var(--bezel-3); color: var(--on-bezel); opacity: 1; box-shadow: none; }
html.ui9.page-cost #pfTabs .btn.on { flex: 1; min-width: 0; background: var(--bezel-3); color: var(--on-bezel); border: 0; opacity: 1; box-shadow: inset 0 1px 0 rgba(244,239,228,.07); }
html.ui9.page-cost.v9-cost-on #pfTabs .btn .v9-w { display: none; }
html.ui9.page-cost.v9-cost-on #pfTabs .btn.on .v9-w { display: inline; }
html.ui9.page-cost #pfTabs .btn:focus-visible { outline-color: var(--led); }

/* the hero: ROAS against break-even. This screen's one pair of brackets. */
html.ui9.page-cost .v9-rwell { --bi: 4px; margin: 0; padding: 12px 13px 9px; transition: opacity var(--t2); }
html.ui9.page-cost .v9-rwell::after { --l: 9px; opacity: .85; }
html.ui9.page-cost.v9-no-tiles .v9-rwell:not(.v9-skel) { display: none; }
html.ui9.page-cost .v9-rwell.v9-busy { opacity: .55; }
html.ui9.page-cost .v9-fig { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin: 10px 0 7px; }
html.ui9.page-cost .v9-fv { font: 450 38px/.95 var(--mono); letter-spacing: -.06em; color: var(--on-bezel); font-variant-numeric: tabular-nums; white-space: nowrap; }
html.ui9.page-cost .v9-fv small { font-size: 22px; letter-spacing: -.02em; color: var(--on-bezel-dim); }
html.ui9.page-cost .v9-pl { min-width: 0; text-align: right; font: 500 14px/1.05 var(--mono); letter-spacing: -.03em; white-space: nowrap; color: var(--on-bezel-dim); }
html.ui9.page-cost .v9-pl.dn { color: color-mix(in srgb, var(--led) 62%, var(--on-bezel)); }
html.ui9.page-cost .v9-pl.up { color: color-mix(in srgb, var(--lamp-ok) 72%, var(--on-bezel)); }
html.ui9.page-cost .v9-pl small { display: block; margin-top: 4px; font: 500 10px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--on-bezel-dim); }
html.ui9.page-cost .v9-say { margin: 0 0 9px; font-size: 12px; line-height: 1.32; color: color-mix(in srgb, var(--on-bezel) 88%, var(--on-bezel-dim)); }
/* the svg scales its text with it, so the width and the type move together: 10px labels at 182 and at 260 */
html.ui9.page-cost .v9-ruler { --rw: 182; display: block; width: 100%; height: auto; overflow: visible; }
html.ui9.page-cost .v9-ruler .tk { stroke: var(--bezel-line-2); stroke-width: 1; }
html.ui9.page-cost .v9-ruler .be { stroke: var(--on-bezel); stroke-width: 1.5; }
html.ui9.page-cost .v9-ruler .lo { fill: var(--led); opacity: .6; }
html.ui9.page-cost .v9-ruler .hi { fill: var(--lamp-ok); opacity: .6; }
html.ui9.page-cost .v9-ruler text { font: 500 calc(10.05px * 200 / var(--rw)) var(--mono); fill: var(--on-bezel-dim); letter-spacing: .02em; }
html.ui9.page-cost .v9-ruler text.bk { fill: var(--on-bezel); }
html.ui9.page-cost .v9-ruler .nd { fill: var(--hazard); stroke: none; }
html.ui9.page-cost .v9-ruler .ns { stroke: var(--hazard); stroke-width: 1.5; }
html.ui9.page-cost .v9-ruler .pt { fill: var(--on-bezel); stroke: var(--bezel-well); stroke-width: 2; }
html.ui9.page-cost .v9-basis { margin-top: 7px; font: 500 10px/1.25 var(--mono); letter-spacing: .01em; color: var(--on-bezel-dim); }
html.ui9.page-cost .v9-basis span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-cost .v9-scope { color: color-mix(in srgb, var(--on-bezel) 72%, var(--on-bezel-dim)); }
/* no ROAS to read: the instruments give way to what the platform does report */
html.ui9.page-cost.v9-no-roas .v9-ruler, html.ui9.page-cost.v9-no-roas .v9-verts-h span:nth-child(2), html.ui9.page-cost.v9-no-roas .vert b { display: none; }
html.ui9.page-cost.v9-no-roas .v9-fv { font-size: 24px; letter-spacing: -.04em; color: var(--on-bezel-dim); }
html.ui9.page-cost.v9-no-roas .vert { grid-template-columns: minmax(0, 1fr); }
/* still reading: the shape holds, nothing claims a number */
html.ui9.page-cost .v9-rwell.v9-skel .v9-fv, html.ui9.page-cost .v9-rwell.v9-skel .v9-pl, html.ui9.page-cost .v9-rwell.v9-skel .v9-say { color: transparent; border-radius: 4px; background: linear-gradient(90deg, var(--bezel-2), var(--bezel-3), var(--bezel-2)) 0 0 / 200% 100%; animation: v9-shimmer 1.6s linear infinite; }
html.ui9.page-cost .v9-rwell.v9-skel .v9-pl small { color: transparent; }

/* totals, 2 across. ROAS is the well's, so its tile folds away there */
html.ui9.page-cost #tiles { flex: none; grid-template-columns: 1fr 1fr; margin: 0; border: 0; border-radius: 10px; background: var(--bezel-2); box-shadow: inset 0 0 0 1px var(--bezel-line); }
html.ui9.page-cost #tiles .stat { flex-direction: column-reverse; align-items: stretch; justify-content: flex-end; gap: 6px; min-width: 0; min-height: 0; padding: 8px 11px; box-shadow: 1px 0 0 var(--bezel-line), 0 1px 0 var(--bezel-line); }
html.ui9.page-cost #tiles .stat span { display: block; color: var(--on-bezel-dim); line-height: 1; letter-spacing: .07em !important; white-space: nowrap; }
html.ui9.page-cost #tiles .stat b { display: block; font: 500 15px/1 var(--mono); letter-spacing: -.035em; color: var(--on-bezel); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-cost #tiles .stat b.v9-long { font-size: 13px; }
html.ui9.page-cost #tiles .stat:nth-child(1) { order: 1; }
html.ui9.page-cost #tiles .stat:nth-child(4) { order: 2; }
html.ui9.page-cost #tiles .stat:nth-child(2) { order: 3; }
html.ui9.page-cost #tiles .stat:nth-child(3) { order: 4; }
html.ui9.page-cost #tiles .stat:nth-child(n+6) { order: 5; }
html.ui9.page-cost.v9-cost-on #tiles .stat:nth-child(5) { display: none; }
/* Snapchat's count of rows: the ledger's head says it, and the rail needs the room. A phone keeps it, closing the band */
@media (min-width: 861px) { html.ui9.page-cost.v9-cost-on #tiles .stat:nth-child(8) { display: none; } }
@media (max-width: 860px) {
  html.ui9.page-cost.v9-cost-on #tiles .stat:last-child:nth-child(odd) { grid-column: auto; }
  html.ui9.page-cost.v9-cost-on #tiles .stat:nth-child(8):last-child { grid-column: 1 / -1; }
}

/* Where it went: the verticals, as share of the money */
html.ui9.page-cost .v9-verts-h { flex: none; margin-top: 1px; height: auto; padding: 7px 7px 2px; }
html.ui9.page-cost .v9-verts-h:has(+ #verts:empty), html.ui9.page-cost .v9-verts-h:has(+ #verts[style*="none"]) { display: none; }
html.ui9.page-cost #verts { flex: none; flex-direction: column; flex-wrap: nowrap; gap: 0; margin: 0; }
html.ui9.page-cost .vert {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; align-items: center; width: 100%; min-width: 0; padding: 5px 7px;
  border: 0; border-radius: var(--r-sm, 8px); background: none; box-shadow: none; color: var(--on-bezel); text-align: left; transition: background var(--t1);
}
html.ui9.page-cost .vert::before { content: none; }
html.ui9.page-cost .vert.on * { color: inherit; }
html.ui9.page-cost .vert:hover { background: rgba(244,239,228,.06); border: 0; }
html.ui9.page-cost .vert.on { background: rgba(244,239,228,.1); border: 0; box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-cost .vert:focus-visible { outline-color: var(--led); outline-offset: -1px; }
html.ui9.page-cost .vert .vn { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 13px/1.1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--on-bezel); }
html.ui9.page-cost .vert .vn i { margin-left: 2px; font: 500 10.5px/1 var(--mono); color: var(--on-bezel-dim); }
html.ui9.page-cost .vert b { display: block; font: 500 12.5px/1 var(--mono); letter-spacing: -.025em; font-variant-numeric: tabular-nums; color: var(--on-bezel-dim); }
html.ui9.page-cost .vert b.good { color: color-mix(in srgb, var(--lamp-ok) 72%, var(--on-bezel)); }
html.ui9.page-cost .vert b.bad { color: color-mix(in srgb, var(--led) 62%, var(--on-bezel)); }
html.ui9.page-cost .vert .v9-segbar { grid-column: 1 / -1; height: 5px; --c: var(--led); }
html.ui9.page-cost .vert .vs { grid-column: 1 / -1; font: 500 10.5px/1.15 var(--mono); letter-spacing: -.02em; color: var(--on-bezel-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
html.ui9.page-cost .vert .vs em { font-weight: 500; color: inherit; }
html.ui9.page-cost .vert .vs .pl { color: color-mix(in srgb, var(--lamp-ok) 72%, var(--on-bezel)); }
html.ui9.page-cost .vert .vs .mi { color: color-mix(in srgb, var(--led) 62%, var(--on-bezel)); }
html.ui9.page-cost .vert:has(.v9-vs) .vs:not(.v9-vs) { display: none; }
/* spend, P/L, CPA: never cut. It breaks between figures, not inside one */
html.ui9.page-cost .vert .v9-vs { white-space: normal; overflow: visible; }
html.ui9.page-cost .vert .v9-seg { white-space: nowrap; }

/* Claude's voice: the one serif on this screen, and only when a reminder is due */
html.ui9.page-cost .v9-agent { position: sticky; bottom: 0; z-index: 1; display: block; flex: none; width: 100%; margin: auto 0 0; padding: 8px 10px 9px; border: 0; border-radius: 9px; background: var(--bezel-2); box-shadow: inset 0 0 0 1px var(--bezel-line); color: var(--on-bezel); cursor: pointer; text-align: left; transition: box-shadow var(--t1); }
html.ui9.page-cost .v9-agent:hover { box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-cost .v9-agent::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 18px; background: linear-gradient(transparent, var(--bezel)); pointer-events: none; }
html.ui9.page-cost .v9-agent[hidden] { display: none; }
@media (min-width: 1321px) {
  /* the rail's last 8px: rows pass behind the reminder, so none shows cut in half under it */
  html.ui9.page-cost .v9-agent::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; background: var(--bezel); }
}
html.ui9.page-cost .v9-agent .v9-hud { display: flex; align-items: center; gap: 6px; color: var(--on-bezel-dim); }
html.ui9.page-cost .v9-agent .v9-hud i { width: 6px; height: 6px; border-radius: 50%; background: var(--rejected); box-shadow: 0 0 7px var(--rejected); }
html.ui9.page-cost .v9-agent .v9-hud b { margin-left: auto; font-weight: 500; letter-spacing: 0; text-transform: none; }
html.ui9.page-cost .v9-agent p { margin: 5px 0 0; font: 400 15.5px/1.18 var(--serif); color: var(--on-bezel); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
html.ui9.page-cost.v9-pf-meta .v9-agent { display: none; }

/* ---- the page bar ---- */
html.ui9.page-cost body > .topbar { flex-wrap: nowrap; gap: 8px; }
html.ui9.page-cost .topbar .brand { display: none; }   /* #pageTitle is still written; the rail and the tab say where you are */
html.ui9.page-cost #viewTabs { order: 1; flex: none; display: inline-flex !important; gap: 1px !important; margin: 0 !important; padding: 2px; border-radius: var(--r-key); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); }
html.ui9.page-cost #viewTabs .btn { min-height: 28px; padding: 0 10px; border: 0; border-radius: 5px; background: none; box-shadow: none; color: var(--text-dim); font: 500 12.5px/1 var(--sans); }
html.ui9.page-cost #viewTabs .btn:hover { background: var(--hover); color: var(--text); box-shadow: none; }
html.ui9.page-cost #viewTabs .btn.on { background: var(--primary-bg); border: 0; color: var(--primary-text); box-shadow: none; }
html.ui9.page-cost.v9-pf-meta #viewTabs [data-v="copy"], html.ui9.page-cost.v9-pf-meta #viewTabs [data-v="notes"] { display: none; }
html.ui9.page-cost #viewTabs .rem-dot { top: 3px; right: 3px; width: 8px; height: 8px; border: 0; box-shadow: 0 0 0 2px var(--surface); }
html.ui9.page-cost #viewTabs .btn.on .rem-dot { box-shadow: 0 0 0 2px var(--primary-bg); }
html.ui9.page-cost .v9-find { order: 2; position: relative; flex: 0 1 216px; min-width: 110px; display: block; }
html.ui9.page-cost .v9-find .v9-i { position: absolute; left: 9px; top: 9px; width: 14px; height: 14px; color: var(--text-dim); pointer-events: none; }
html.ui9.page-cost .v9-find input { width: 100%; height: 32px; padding: 0 30px 0 29px; }
html.ui9.page-cost .v9-find input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; background: var(--text-dim); cursor: pointer;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat; }
html.ui9.page-cost .v9-find input:placeholder-shown::-webkit-search-cancel-button { display: none; }   /* or the empty field keeps a slot for it and the placeholder clips */
html.ui9.page-cost .v9-find .v9-kc { position: absolute; right: 7px; top: 7px; pointer-events: none; }
html.ui9.page-cost .v9-find:focus-within .v9-kc, html.ui9.page-cost .v9-find:has(input:not(:placeholder-shown)) .v9-kc { display: none; }
html.ui9.page-cost:is(.v9-view-copy, .v9-view-notes) .v9-find, html.ui9.page-cost.v9-picker .v9-find { display: none; }
html.ui9.page-cost .topbar .spacer { order: 3; flex: 1 1 0; min-width: 0; }
html.ui9.page-cost .v9-rng { order: 4; flex: none; display: inline-flex; align-items: center; gap: 1px; height: 32px; padding: 2px; border-radius: var(--r-key); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); }
html.ui9.page-cost .v9-rng .btn { min-height: 28px; padding: 0 9px; border: 0; border-radius: 5px; background: none; box-shadow: none; color: var(--text-dim); font: 500 12.5px/1 var(--sans); }
html.ui9.page-cost .v9-rng .btn:hover { background: var(--hover); color: var(--text); box-shadow: none; }
html.ui9.page-cost .v9-rng .btn.on { background: var(--primary-bg); color: var(--primary-text); box-shadow: none; }
html.ui9.page-cost #dLast { width: auto !important; min-height: 28px; height: 28px; padding: 0 22px 0 7px; border-radius: 5px; background-color: transparent; background-position: right 5px center; box-shadow: none; color: var(--text-dim); font: 500 12.5px/1 var(--sans); cursor: pointer; }
html.ui9.page-cost #dLast:hover { background-color: var(--hover); color: var(--text); }
html.ui9.page-cost .v9-dates { order: 5; flex: none; display: inline-flex; align-items: center; height: 32px; padding: 0 3px; border-radius: var(--r-key); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); }
html.ui9.page-cost .v9-dates:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
html.ui9.page-cost .v9-dates label[for="dStart"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
html.ui9.page-cost .v9-dates label[for="dEnd"] { flex: none; width: 14px; overflow: hidden; color: var(--text-dim); font-size: 0 !important; text-align: center; }
html.ui9.page-cost .v9-dates label[for="dEnd"]::after { content: "\2192"; font-size: 12px; }
html.ui9.page-cost :is(#dStart, #dEnd) { width: 116px !important; min-height: 26px; height: 26px; padding: 0 3px; border-radius: 5px; background: none; box-shadow: none; font: 500 12px/1 var(--mono); letter-spacing: -.03em; }
html.ui9.page-cost .topbar > span.muted { order: 6; flex: none; padding: 5px 6px; border-radius: var(--r-cap); background: var(--surface-2); color: var(--text-dim); font: 500 10px/1 var(--mono) !important; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
html.ui9.page-cost .topbar > label:has(#byDay) { order: 7; flex: none; color: var(--text-dim); font-size: 12.5px !important; }
html.ui9.page-cost #byDay { width: 14px !important; height: 14px !important; }
html.ui9.page-cost #refresh { order: 8; flex: none; min-height: 32px; padding: 0 10px; font-size: 12.5px; }
html.ui9.page-cost.v9-view-notes :is(.v9-rng, .v9-dates, .topbar > span.muted, .topbar > label:has(#byDay)) { opacity: .42; }

/* ---- the ledger ---- */
html.ui9.page-cost .wrap { padding-top: 2px; padding-bottom: 28px; }   /* the bar is 2px taller here, so the sheet starts on the same line as every page */
html.ui9.page-cost .card { background: var(--surface); }
html.ui9.page-cost #mainCard { border: 0; box-shadow: 0 0 0 1px var(--line); }
html.ui9.page-cost #crumb { display: flex; align-items: baseline; gap: 8px; min-height: 36px; margin: 0 !important; padding: 6px 12px; font-size: 13px; box-shadow: inset 0 -1px 0 var(--hair); }
html.ui9.page-cost #crumb:empty { display: none; }
html.ui9.page-cost #crumb .btn { min-height: 24px; height: 24px; padding: 0; background: none; box-shadow: none; color: var(--text-dim); font: 450 13px/1 var(--sans); }
html.ui9.page-cost #crumb .btn:hover { color: var(--text); background: none; box-shadow: none; text-decoration: underline; text-underline-offset: 2px; }
html.ui9.page-cost #crumb > span:not(.mono), html.ui9.page-cost #crumb > b { margin-left: 2px !important; font-weight: 600 !important; }
html.ui9.page-cost #crumb .mono { color: var(--text-dim); }
html.ui9.page-cost .v9-manage { align-self: center; margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--text-dim); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); }
html.ui9.page-cost .v9-manage:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
html.ui9.page-cost .v9-manage .v9-i { width: 13px; height: 13px; }

html.ui9.page-cost .card table { border-collapse: separate; border-spacing: 0; }
html.ui9.page-cost .card table th { background: var(--surface); padding: 0 12px; text-align: right; }
html.ui9.page-cost .card table th:first-child { text-align: left; }
html.ui9.page-cost .card table th.on { color: var(--accent-text); }
html.ui9.page-cost .card table th[data-sort]:hover { color: var(--text); }
html.ui9.page-cost th .cnt { display: inline-grid; place-items: center; min-width: 18px; height: 15px; margin-left: 6px; padding: 0 3px; border-radius: 3px; background: var(--surface-2); color: var(--text-dim); font: 500 10px/1 var(--mono); letter-spacing: 0; vertical-align: 0; }
html.ui9.page-cost .card table td { padding: 3px 12px; background: var(--surface); font-size: 13px; line-height: 1.2; transition: background var(--t1); }
html.ui9.page-cost .card table td.num { letter-spacing: -.025em; white-space: nowrap; }
html.ui9.page-cost .card tbody tr:hover > td { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
html.ui9.page-cost .card td.num .good, html.ui9.page-cost .card td.num .bad { font-weight: 600; }
html.ui9.page-cost .card td.num .muted { color: var(--text-faint); }
html.ui9.page-cost tr.lastacct .acctlink { color: #3b82f6 !important; }
html.ui9.page-cost .v9-l1 { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; min-width: 0; vertical-align: middle; white-space: nowrap; }
html.ui9.page-cost .v9-l1 > * { margin: 0; }
/* one left edge for names: the dot follows the name, and keeps its meaning and colour */
html.ui9.page-cost .v9-l1 .acctlink { order: 1; }
html.ui9.page-cost .v9-l1 .ndot { order: 2; }
html.ui9.page-cost .v9-l1 .mono.muted { order: 3; }
html.ui9.page-cost .v9-l1 .ico[data-copytext] { order: 4; }
html.ui9.page-cost .v9-l1 .ico[data-acct] { order: 5; }
html.ui9.page-cost .v9-l1 .v9-rr { display: none; order: 6; }
html.ui9.page-cost .v9-l1 .v9-dl { flex: none; min-width: 112px; }
html.ui9.page-cost .v9-l1 a.ico { color: var(--text-dim); text-decoration: none; }
html.ui9.page-cost .v9-l1 a.ico:hover { color: var(--text); }
html.ui9.page-cost .tw {
  flex: none; width: 18px; height: 18px; margin: 0; padding: 0; border: 0; border-radius: var(--r-cap); background: none; color: var(--text-dim); font-size: 0; display: inline-grid; place-items: center; align-content: center; transition: transform var(--t1), background var(--t1);
}
html.ui9.page-cost .tw::before { content: ""; width: 13px; height: 13px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
html.ui9.page-cost .tw[data-cx]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 8h14M5 12h14M5 16h9'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 8h14M5 12h14M5 16h9'/%3E%3C/svg%3E"); }
html.ui9.page-cost .tw[data-cx].open { transform: none; background: var(--surface-2); color: var(--text); }
html.ui9.page-cost .tw:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
html.ui9.page-cost .tw:disabled { opacity: .35; cursor: default; }
html.ui9.page-cost .ndot { flex: none; margin: 0; }
html.ui9.page-cost .acctlink { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 550 13.5px/1.2 var(--sans); letter-spacing: -.012em; color: var(--text); text-decoration: none; }
html.ui9.page-cost .acctlink:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
html.ui9.page-cost .v9-l1 .mono.muted { flex: 0 1000 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 11px/1.2 var(--mono); letter-spacing: -.01em; color: var(--text-dim); opacity: .78; }
html.ui9.page-cost tr:hover .v9-l1 .mono.muted { opacity: 1; }
html.ui9.page-cost .ico { flex: none; padding: 0 3px; }
html.ui9.page-cost .ico[data-copytext] { margin-left: -4px; color: var(--text-faint); opacity: 0; transition: opacity var(--t1); }
html.ui9.page-cost tr:hover .ico[data-copytext], html.ui9.page-cost .ico[data-copytext]:focus-visible { opacity: 1; }
/* + note keeps one x at rest and on hover: the copy icon takes no room in the line and shows just past the pill */
html.ui9.page-cost tr:has(.nadd) .v9-l1 .ico[data-copytext] { position: relative; left: var(--pill-w); margin-right: -22px; }
html.ui9.page-cost .anote { max-width: none; margin: 0 0 0 25px; font: 400 11.5px/1.3 var(--sans); color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-cost .anote:has(.nadd) { display: inline-block; margin: 0 0 0 7px; vertical-align: middle; overflow: visible; }
html.ui9.page-cost .anote:has(input) { display: block; margin: 2px 0 2px 25px; overflow: visible; }
html.ui9.page-cost .anote.dnote { display: inline-block; flex: 0 1 auto; min-width: 0; margin: 0 0 0 5px; vertical-align: middle; }
html.ui9.page-cost .anote .npen { margin-left: 5px; }
html.ui9.page-cost .anote .nadd { padding: 0 7px; border-radius: 99px; background: none; color: var(--text-dim); font: 400 11px/16px var(--sans); box-shadow: inset 0 0 0 1px var(--line); opacity: 1; }
html.ui9.page-cost .anote:hover .nadd { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
html.ui9.page-cost .anote input { height: 24px; font-size: 12px; border: 0; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--surface); }
html.ui9.page-cost .cname { flex: 0 1 auto; min-width: 0; max-width: none; font-size: 13px; font-weight: 500; letter-spacing: -.008em; }
html.ui9.page-cost tr.lvl-s .cname, html.ui9.page-cost tr.lvl-a .cname { font-size: 12.5px; font-weight: 450; }
html.ui9.page-cost .tgt { flex: none; margin: 0; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: -.01em; border-radius: var(--r-cap); }
html.ui9.page-cost .v9-l1 .sw { flex: none; }
html.ui9.page-cost tr.lvl-s > td, html.ui9.page-cost tr.lvl-a > td { background: color-mix(in srgb, var(--surface-2) 34%, var(--surface)); }
html.ui9.page-cost .card table tr.lvl-s > td, html.ui9.page-cost .card table tr.lvl-a > td { height: 34px; font-size: 12px; }
html.ui9.page-cost .card table tr.lvl-a > td:first-child { color: var(--text-dim); }
html.ui9.page-cost .card tbody tr.lvl-s:hover > td, html.ui9.page-cost .card tbody tr.lvl-a:hover > td { background: color-mix(in srgb, var(--accent) 4%, color-mix(in srgb, var(--surface-2) 34%, var(--surface))); }
/* a turned-off row tints, whichever level. Nothing is hidden: it is still in the report */
html.ui9.page-cost .card tbody tr:has(> td .sw:not(.on)) > td { background: color-mix(in srgb, var(--rejected) 10%, var(--surface)); }
html.ui9.page-cost .card tbody tr:has(> td .sw:not(.on)) > td:first-child { box-shadow: inset 2px 0 0 var(--rejected); }
html.ui9.page-cost tr:has(> td .sw:not(.on)) .cname { color: var(--text-dim); text-decoration: line-through; text-decoration-color: var(--line-strong); }
html.ui9.page-cost .sw { background: var(--line-strong); box-shadow: none; }
html.ui9.page-cost .sw.on { background: var(--live); }
html.ui9.page-cost .swmsg:not(.bad) { display: none; }   /* the note beside the switch says it, with Undo */
html.ui9.page-cost .swmsg.bad { border-radius: var(--r-key); background: var(--rejected); font: 500 13px/1.3 var(--sans); box-shadow: var(--e2); }
html.ui9.page-cost .v9-note button .v9-live-mark { margin-right: 5px; vertical-align: 1px; }
html.ui9.page-cost .card table tr.tot td:first-child { font-family: var(--sans); letter-spacing: -.005em; }
html.ui9.page-cost tr.v9-out { display: none; }
html.ui9.page-cost .v9-none td { padding: 34px 12px !important; color: var(--text-dim); text-align: center !important; font: 400 13px/1.4 var(--sans) !important; }
html.ui9.page-cost .dayhead { padding: 9px 12px 8px; background: var(--surface); border-bottom: 1px solid var(--hair); font-size: 13px; }
html.ui9.page-cost .dayhead .dsum { font: 500 12px/1 var(--mono); letter-spacing: -.02em; }
html.ui9.page-cost .dayhead .dsum b { font-weight: 600; }
html.ui9.page-cost .empty { padding: 44px 16px; color: var(--text-dim); font-size: 13px; }
html.ui9.page-cost #foot { margin: 10px 2px 0 !important; color: var(--text-dim); font-size: 11.5px !important; line-height: 1.5; max-width: 980px; }
html.ui9.page-cost .note-err { background: var(--rejected-bg); color: var(--rejected); }

/* Meta account picker */
html.ui9.page-cost .mpick-wrap { padding: 10px 12px 14px; }
html.ui9.page-cost .mpick-grid { gap: 6px; }
html.ui9.page-cost .mpick { padding: 9px 11px; border: 0; border-radius: var(--r-key); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
html.ui9.page-cost .mpick:hover { box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--hover); }
html.ui9.page-cost .mpick b { font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui9.page-cost .mpick span { font-size: 11px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 900 and up: one sheet, one table, nothing sideways. Open and the switch share one spot ---- */
@media (min-width: 900px) {
  html.ui9.page-cost .card table th:first-child { width: 100%; }   /* the heads hold their place when no row claims the width */
  html.ui9.page-cost .card table td:first-child { width: 100%; max-width: 0; }
  html.ui9.page-cost .card table td[colspan]:first-child { width: auto; max-width: none; }
  html.ui9.page-cost .card table tr { position: relative; }
  html.ui9.page-cost .card table tr > td:first-child { position: static; }
  /* the last column gives up the room the row's right end needs */
  html.ui9.page-cost #table table tr > :last-child:not([colspan]) { padding-right: var(--act-w); }
  html.ui9.page-cost #table .ico[data-acct], html.ui9.page-cost #table .v9-open {
    position: absolute; top: 50%; right: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 3px; height: 24px; margin: -12px 0 0; padding: 0 7px 0 8px; border: 0; border-radius: 6px; background: var(--surface);
    color: var(--text-dim); font: 500 12px/1 var(--sans); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); transition: background var(--t1), color var(--t1), box-shadow var(--t1);
  }
  html.ui9.page-cost #table .ico[data-acct]::before { content: "Open"; }
  html.ui9.page-cost #table tr:hover :is(.ico[data-acct], .v9-open) { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
  html.ui9.page-cost #table :is(.ico[data-acct], .v9-open):hover, html.ui9.page-cost #table tr:hover :is(.ico[data-acct], .v9-open):hover { background: var(--primary-bg); color: var(--primary-text); box-shadow: none; }
  html.ui9.page-cost #table .sw { position: absolute; top: 50%; right: 10px; z-index: 1; margin: -9.5px 0 0; }
  html.ui9.page-cost .v9-am { position: absolute; top: 50%; right: 68px; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; margin-top: -12px; border-radius: 6px; color: var(--text-dim); opacity: .7; }
  html.ui9.page-cost .v9-am .v9-i { width: 14px; height: 14px; }
  html.ui9.page-cost tr:hover .v9-am, html.ui9.page-cost .v9-am:focus-visible { opacity: 1; }
  html.ui9.page-cost .v9-am:hover { background: var(--surface-2); color: var(--text); }
  /* the tree inside a drill-down */
  html.ui9.page-cost .card table tr.lvl-s > td:first-child { padding-left: 34px; }
  html.ui9.page-cost .card table tr.lvl-a > td:first-child { padding-left: 58px; }
  html.ui9.page-cost #table tr.lvl-s:not([data-cxof]) > td:first-child::before, html.ui9.page-cost #table tr.lvl-a:not([data-cxof]) > td:first-child::before { content: ""; position: absolute; top: 0; bottom: 0; left: 20px; width: 1px; background: var(--line-strong); }
  html.ui9.page-cost #table tr.lvl-a:not([data-cxof]) > td:first-child::after { content: ""; position: absolute; top: 0; bottom: 0; left: 44px; width: 1px; background: var(--line-strong); }
  /* the total: pinned to the bottom of the screen, double rule, like a ledger */
  html.ui9.page-cost .card table tr.tot td { position: sticky; bottom: 0; z-index: 4; height: 42px; padding-top: 8px; border-top: 0; border-bottom: 0; background: var(--surface); box-shadow: inset 0 1px 0 var(--text), inset 0 3px 0 var(--surface), inset 0 4px 0 var(--text); font-size: 13px; font-weight: 600; }
  html.ui9.page-cost .card tbody tr.tot:hover > td { background: var(--surface); }
}

/* the break-even axis: one dotted line down the whole ledger. Losers read as a column before you read a number. */
@media (min-width: 1101px) {
  html.ui9.page-cost .card table :is(th, td).v9-ro { min-width: 196px; width: 196px; }
  html.ui9.page-cost .card table td.v9-ro { position: relative; }   /* a th is already sticky, which anchors the same */
  html.ui9.page-cost #table table tr > .v9-ro:last-child { min-width: calc(196px + var(--act-w) - 12px); width: calc(196px + var(--act-w) - 12px); }
  html.ui9.page-cost .card table th.v9-ro::before { content: "1.00\D7"; position: absolute; left: calc(var(--ax-l) + var(--ax-u)); top: 50%; transform: translate(-50%, -50%); color: var(--text-dim); font: 500 10px/1 var(--mono); letter-spacing: 0; text-transform: none; }
  html.ui9.page-cost .card table td.v9-ro::after { content: ""; position: absolute; top: 0; bottom: -1px; left: calc(var(--ax-l) + var(--ax-u)); width: 1px; background: repeating-linear-gradient(var(--line-strong) 0 2px, transparent 2px 5px); }
  html.ui9.page-cost .card table tr.tot td.v9-ro::after { display: none; }
  /* nothing to plot: the column gives its room back */
  html.ui9.page-cost.v9-no-roas .card table td.v9-ro::after, html.ui9.page-cost.v9-no-roas .card table th.v9-ro::before { display: none; }
  html.ui9.page-cost.v9-no-roas .card table :is(th, td).v9-ro, html.ui9.page-cost.v9-no-roas #table table tr > .v9-ro:last-child { min-width: 0; width: auto; }
  html.ui9.page-cost .card table td.v9-ro:is(.v9-up, .v9-dn)::before {
    content: ""; position: absolute; top: 50%; height: 7px; margin-top: -3.5px; pointer-events: none;
    width: calc(max(var(--r) - 1, 1 - var(--r)) * var(--ax-u) + 3.5px);
    background: radial-gradient(circle 3.5px at var(--dx) 50%, var(--c) 96%, transparent 100%), linear-gradient(color-mix(in srgb, var(--c) 55%, transparent), color-mix(in srgb, var(--c) 55%, transparent)) 0 50% / 100% 2px no-repeat;
  }
  html.ui9.page-cost .card table td.v9-ro.v9-dn::before { --c: var(--rejected); --dx: 3.5px; left: calc(var(--ax-l) + var(--r) * var(--ax-u) - 3.5px); }
  html.ui9.page-cost .card table td.v9-ro.v9-up::before { --c: var(--live); --dx: calc(100% - 3.5px); left: calc(var(--ax-l) + var(--ax-u)); }
}

/* ---- Ad copy: the same ledger, grouped by the words ---- */
html.ui9.page-cost #copyWrap .card { border: 0; box-shadow: 0 0 0 1px var(--line); margin-bottom: 12px !important; }
html.ui9.page-cost :is(#copyWrap .card, #notesWrap, #remWrap) > div:first-child:not(.hscroll) {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; padding: 0 12px !important; border-bottom: 0 !important;
  font: 500 10px/1 var(--mono) !important; letter-spacing: .085em; text-transform: uppercase; color: var(--text-dim); box-shadow: inset 0 -2px 0 var(--text);
}
html.ui9.page-cost :is(#notesSub, #remSub) { font: 500 10px/1.2 var(--mono) !important; letter-spacing: .04em; text-transform: none; color: var(--text-dim); text-align: right; }
/* the heavy rule sits under the heads, as on Accounts */
html.ui9.page-cost #copyWrap .card > div:first-child:not(.hscroll) { box-shadow: inset 0 -1px 0 var(--hair); }
html.ui9.page-cost #copyWrap .card table thead th { box-shadow: inset 0 -2px 0 var(--text); }

/* ---- Notes: a journal. Notes left, reminders right, composer folded ---- */
html.ui9.page-cost :is(#notesWrap, #remWrap) { border: 0; box-shadow: 0 0 0 1px var(--line); margin-bottom: 0 !important; }
html.ui9.page-cost .wrap:has(> #notesWrap:not([style*="none"])) { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
html.ui9.page-cost .wrap > #notesWrap { grid-column: 1; grid-row: 1; }
html.ui9.page-cost .wrap > #remWrap { grid-column: 2; grid-row: 1; }
html.ui9.page-cost .wrap:has(> #notesWrap:not([style*="none"])) > #foot { grid-column: 1 / -1; }
html.ui9.page-cost #tNotes thead { display: none; }
html.ui9.page-cost #tNotes table, html.ui9.page-cost #tNotes tbody { display: block; width: 100%; }
html.ui9.page-cost #tNotes tr { display: grid; grid-template-columns: minmax(120px, 176px) minmax(0, 1fr) auto auto; grid-template-rows: auto 1fr; gap: 1px 12px; align-items: start; padding: 8px 12px; border-bottom: 1px solid var(--hair); background: var(--surface); }
html.ui9.page-cost #tNotes tr:hover { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
html.ui9.page-cost #tNotes tr td, html.ui9.page-cost #tNotes tr:hover td { background: none !important; }
html.ui9.page-cost #tNotes tr.lastacct { background: rgba(37, 99, 235, .16); box-shadow: inset 3px 0 0 #3b82f6; }
html.ui9.page-cost #tNotes table { min-width: 0; }
html.ui9.page-cost #tNotes tr > td:first-child { position: static !important; min-width: 0; box-shadow: none; overflow: visible; }
html.ui9.page-cost #tNotes tr:last-child { border-bottom: 0; }
html.ui9.page-cost #tNotes td { display: block; width: auto !important; max-width: none !important; height: auto !important; padding: 0 !important; border: 0; background: none; font: 400 11px/1.35 var(--mono); letter-spacing: -.01em; color: var(--text-dim); }
html.ui9.page-cost #tNotes td:nth-child(2) { grid-area: 1 / 1; }
html.ui9.page-cost #tNotes td:nth-child(3) { grid-area: 2 / 1; white-space: nowrap; }
html.ui9.page-cost #tNotes td:is(:nth-child(1), :nth-child(3), :nth-child(6)) { align-self: start; }
html.ui9.page-cost #tNotes td:nth-child(5) { grid-area: 1 / 2 / 3 / 3; min-width: 0 !important; font: 400 12.5px/1.4 var(--sans); letter-spacing: 0; color: var(--text); overflow-wrap: anywhere; }
html.ui9.page-cost #tNotes td:nth-child(4) { grid-area: 1 / 3 / 2 / 5; justify-self: end; }
html.ui9.page-cost #tNotes td:nth-child(1) { grid-area: 2 / 3; justify-self: end; }
html.ui9.page-cost #tNotes td:nth-child(6) { grid-area: 2 / 4; justify-self: end; white-space: nowrap; }
html.ui9.page-cost #tNotes td:nth-child(6):empty { display: none; }
html.ui9.page-cost #tNotes .acctlink { display: block; font: 550 13px/1.3 var(--sans); }
html.ui9.page-cost #tNotes .mono { display: none; }
html.ui9.page-cost .trend { padding: 2px 7px; border-radius: var(--r-cap); font: 600 12px/1.2 var(--mono); letter-spacing: -.02em; }
html.ui9.page-cost .trend .sofar { font: 500 10.5px/1 var(--mono); opacity: .8; }
html.ui9.page-cost .trend.muted { padding-right: 0; font: 500 11px/1.2 var(--sans); letter-spacing: 0; color: var(--text-dim); }
html.ui9.page-cost .rem-h { padding: 10px 12px 5px; font: 500 10px/1 var(--mono); letter-spacing: .085em; color: var(--text-dim); }
html.ui9.page-cost .rem { gap: 4px; padding: 10px 12px; border-top: 1px solid var(--hair); }
html.ui9.page-cost .rem-h + .rem { border-top: 0; }
html.ui9.page-cost .rem-top { gap: 5px 8px; }
html.ui9.page-cost .rem-top b { font-size: 13px; font-weight: 550; line-height: 1.3; }
/* a reminder that is due, in Claude's voice: a rule at its edge, one line of where it came from, the rest on hover or focus */
html.ui9.page-cost .rem:is(.st-met, .st-plain, .st-unknown) { background: none; box-shadow: inset 2px 0 0 var(--rejected); }
/* the calm column. With a mouse the extra lines wait behind Details, and open below the buttons: nothing a pointer aims at ever moves */
html.ui9.page-cost .v9-remd { display: none; }
@media (hover: hover) {
  html.ui9.page-cost .rem { position: relative; }
  html.ui9.page-cost .rem-acts { order: 1; }
  html.ui9.page-cost .rem :is(.rem-meta ~ .rem-meta, .rem-meta ~ .rem-num, .rem-num ~ .rem-meta) { order: 2; }
  html.ui9.page-cost .rem:not(.v9-rem-open) :is(.rem-meta ~ .rem-meta, .rem-meta ~ .rem-num, .rem-num ~ .rem-meta) { display: none; }
  html.ui9.page-cost .rem:has(> .v9-remd):not(.st-met, .st-plain, .st-unknown) .rem-top { padding-right: 62px; }
  html.ui9.page-cost .v9-remd { position: absolute; top: 6px; right: 8px; display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 3px 0 6px; border: 0; border-radius: var(--r-cap); background: none; color: var(--text-dim); font: 400 12px/1 var(--sans); cursor: pointer; }
  html.ui9.page-cost .v9-remd:hover { background: var(--hover); color: var(--text); }
  html.ui9.page-cost .v9-remd .v9-i { width: 13px; height: 13px; transform: rotate(90deg); transition: transform var(--t1); }
  html.ui9.page-cost .v9-remd[aria-expanded="true"] .v9-i { transform: rotate(-90deg); }
}
html.ui9.page-cost .rem:is(.st-met, .st-plain, .st-unknown) .rem-badge { padding: 0; background: none; }
html.ui9.page-cost .rem-pics img { width: 40px; height: 40px; }
html.ui9.page-cost .rem-acts .btn:not(:first-child) { background: none; box-shadow: none; color: var(--text-dim); padding: 0 5px; }
html.ui9.page-cost .rem-acts .btn:not(:first-child):hover { background: var(--hover); color: var(--text); box-shadow: none; }
html.ui9.page-cost .rem:is(.st-met, .st-plain, .st-unknown) .rem-top { display: block; }
html.ui9.page-cost .rem:is(.st-met, .st-plain, .st-unknown) .rem-top b { display: block; margin-top: 6px; font: 400 16.5px/1.22 var(--serif); letter-spacing: 0; }
html.ui9.page-cost .rem-badge { display: inline-block; padding: 2px 6px; border-radius: var(--r-cap); font: 500 10px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
html.ui9.page-cost .rem-meta { font-size: 12px; line-height: 1.35; }
html.ui9.page-cost .rem-num { font: 500 11.5px/1.3 var(--mono); letter-spacing: -.02em; color: var(--text-dim); }
html.ui9.page-cost .rem-acts { gap: 4px; }
html.ui9.page-cost .rem-acts .btn:first-child { padding: 0 7px; }
html.ui9.page-cost .rem-more { padding: 9px 12px; border-top: 1px solid var(--hair); }
html.ui9.page-cost .rem-more summary { cursor: pointer; font-size: 12px; }
html.ui9.page-cost #remNew { gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--hair); }
html.ui9.page-cost #remText { display: block; min-height: 32px; height: 32px; padding: 6px 9px; resize: none; overflow: hidden; }
html.ui9.page-cost #remText:placeholder-shown:not(:focus) { white-space: nowrap; text-overflow: ellipsis; }
html.ui9.page-cost .rem-bar { gap: 6px; }
html.ui9.page-cost .rem-bar .muted { flex: 1 1 100%; order: 3; color: var(--text-dim); }
html.ui9.page-cost #remNew:is(:focus-within, .drag, :has(#remText:not(:placeholder-shown)), :has(#remShots > *), :has(#remMsg > *), :has(.rem-bar:hover), :has(.rem-bar:active)) #remText { height: auto; min-height: 76px; resize: vertical; overflow: auto; }
/* pressing Add screenshots takes the focus out of the box: the bar and the box's height have to outlive that, or the click lands on nothing */
html.ui9.page-cost #remNew:not(:focus-within, .drag, :has(#remText:not(:placeholder-shown)), :has(#remShots > *), :has(#remMsg > *), :has(.rem-bar:hover), :has(.rem-bar:active)) .rem-bar { display: none; }
html.ui9.page-cost #remMsg:empty { display: none; }
html.ui9.page-cost #remMsg .note { margin: 0; }

/* ---- below 1320 the rail folds to a band above the ledger: real drill rows need the width ---- */
@media (max-width: 1320px) {
  html.ui9.page-cost .v9-rail {
    position: relative; top: auto; bottom: auto; left: auto; z-index: 1; width: auto; height: auto; display: grid; overflow: visible;
    grid-template-columns: 128px minmax(0, 1fr) 300px; grid-template-areas: "pf hero tiles" "v v v"; gap: 6px 8px; padding: 2px 12px 10px; box-shadow: none;
  }
  html.ui9.page-cost .v9-rail::before, html.ui9.page-cost .dk-tab.on::before { display: none; }   /* the tab sits on ink here: no paper to run down into */
  /* the paper's top corners, which the rail's edge took from the nav */
  html.ui9.page-cost .v9-rail::after, html.ui9.page-cost body > .topbar::before { content: ""; position: absolute; width: var(--r-bezel); height: var(--r-bezel); pointer-events: none; }
  html.ui9.page-cost .v9-rail::after { top: 100%; left: 0; background: radial-gradient(circle at 100% 100%, transparent calc(var(--r-bezel) - .5px), var(--bezel) var(--r-bezel)); }
  html.ui9.page-cost body > .topbar::before { top: 0; right: 0; transform: scaleX(-1); background: radial-gradient(circle at 100% 100%, transparent calc(var(--r-bezel) - .5px), var(--bezel) var(--r-bezel)); }
  html.ui9.page-cost #pfTabs { grid-area: pf; flex-direction: column; }
  html.ui9.page-cost #pfTabs .btn, html.ui9.page-cost #pfTabs .btn.on { flex: 1; min-height: 24px; height: auto; justify-content: flex-start; padding: 0 7px; font-size: 12px; font-weight: 500; }
  html.ui9.page-cost.v9-cost-on #pfTabs .btn .v9-w { display: inline; }
  /* the figure left, the sentence in the middle, the ruler at the right edge: the hero fills its frame */
  html.ui9.page-cost .v9-rwell { grid-area: hero; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) 182px; column-gap: 20px; align-items: center; padding: 9px 13px; }
  html.ui9.page-cost .v9-rwell .v9-well-h { grid-column: 1; }
  html.ui9.page-cost .v9-fig { grid-column: 1; margin: 8px 0 4px; gap: 16px; }
  html.ui9.page-cost .v9-basis { grid-column: 1; margin-top: 0; min-width: 0; }
  html.ui9.page-cost .v9-say { grid-column: 2; grid-row: 1 / span 3; margin: 0; font-size: 13px; line-height: 1.35; }
  html.ui9.page-cost .v9-ruler { grid-column: 3; grid-row: 1 / span 3; }
  html.ui9.page-cost.v9-no-roas .v9-rwell { grid-template-columns: auto minmax(0, 1fr); }
  html.ui9.page-cost #tiles { grid-area: tiles; align-content: stretch; }
  html.ui9.page-cost #tiles:has(.stat:nth-child(6)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html.ui9.page-cost .v9-verts-h, html.ui9.page-cost .v9-agent { display: none; }
  html.ui9.page-cost #verts { grid-area: v; flex-direction: row; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  html.ui9.page-cost #verts::-webkit-scrollbar { display: none; }
  html.ui9.page-cost .vert { flex: 1 0 196px; width: auto; padding-inline: 5px; align-content: start; }
  html.ui9.page-cost.v9-no-tiles .v9-rail { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pf"; }
  html.ui9.page-cost.v9-no-tiles #pfTabs { flex-direction: row; max-width: 420px; }
  html.ui9.page-cost.v9-no-tiles #pfTabs .btn, html.ui9.page-cost.v9-no-tiles #pfTabs .btn.on { min-height: 30px; }
  html.ui9.page-cost .v9-find { flex-basis: 170px; }
}
/* with the band folded the tab ends on ink, far from the sheet: a lit key, not a paper tab */
@media (min-width: 861px) and (max-width: 1320px) {
  html.ui9.page-cost { --tab-paper: var(--bezel-3); }
  html.ui9.page-cost .dk-tab.on { border-radius: var(--r-key); color: var(--on-bezel); }
  html.ui9.page-cost .dk-tab.on::after { display: none; }
}
@media (max-width: 1200px) {
  html.ui9.page-cost .v9-find { min-width: 90px; }
  html.ui9.page-cost .v9-find .v9-kc { display: none; }
  html.ui9.page-cost :is(#dStart, #dEnd) { width: 108px !important; }
}
/* below 1100: the axis and the id go, the bar may wrap and then grows. The sentence moves over the ruler */
@media (max-width: 1100px) {
  html.ui9.page-cost { --act-w: 78px; }
  html.ui9.page-cost body > .topbar { flex-wrap: wrap; }
  html.ui9.page-cost .v9-find { flex: 1 1 138px; }
  html.ui9.page-cost .v9-rng .btn { padding: 0 7px; }
  html.ui9.page-cost #viewTabs .btn { padding: 0 8px; }
  html.ui9.page-cost .v9-find input { padding: 0 8px 0 29px; }
  html.ui9.page-cost :is(#dStart, #dEnd) { width: 100px !important; }
  html.ui9.page-cost .topbar .spacer { display: none; }
  html.ui9.page-cost .v9-l1 .mono.muted { display: none; }
  html.ui9.page-cost .v9-l1 .mono.muted:not([data-copytext]) { display: inline; flex: none; }
  html.ui9.page-cost .v9-am { display: none; }
  html.ui9.page-cost .wrap:has(> #notesWrap:not([style*="none"])) { grid-template-columns: minmax(0, 1fr) 300px; }
  html.ui9.page-cost .v9-rwell { grid-template-columns: auto minmax(0, 182px); column-gap: 12px; justify-content: space-between; }
  html.ui9.page-cost .v9-say { grid-column: 2; grid-row: 1; font-size: 12px; line-height: 1.3; }
  html.ui9.page-cost .v9-ruler { grid-column: 2; grid-row: 2 / span 2; }
  html.ui9.page-cost.v9-no-roas .v9-say { grid-row: 1 / span 3; }
}
@media (max-width: 960px) {
  html.ui9.page-cost .v9-rail { grid-template-columns: 116px minmax(0, 1fr) 300px; }
  html.ui9.page-cost .wrap:has(> #notesWrap:not([style*="none"])) { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-cost .wrap > #notesWrap { grid-row: 1; }
  html.ui9.page-cost .wrap > #remWrap { grid-column: 1; grid-row: 2; }
}
/* under 900 the table scrolls in its own box: names pinned, numbers swipe, head and total stay in the table */
@media (max-width: 899px) {
  html.ui9.page-cost .v9-open { display: none; }
  html.ui9.page-cost .v9-l1 { display: flex; }
  html.ui9.page-cost .acctlink { white-space: normal; overflow-wrap: break-word; }
  html.ui9.page-cost .anote .npen { display: none; }
  html.ui9.page-cost .card table td { white-space: normal; }
  html.ui9.page-cost .card table td.num { white-space: nowrap; }
  html.ui9.page-cost .anote, html.ui9.page-cost .anote:has(input) { margin-left: 0; white-space: normal; display: block; }
  html.ui9.page-cost .anote .ntext { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  html.ui9.page-cost .anote:has(.nadd) { margin: 2px 0 0; }
  html.ui9.page-cost .hscroll table { min-width: 620px; }
  html.ui9.page-cost .ico[data-copytext] { opacity: 1; }
  html.ui9.page-cost tr:has(.nadd) .v9-l1 .ico[data-copytext] { left: 0; margin-right: 0; }
  html.ui9.page-cost .hscroll tr.tot > :first-child, html.ui9.page-cost .hscroll tr > :first-child { min-width: 232px; background: var(--surface); }
  html.ui9.page-cost .hscroll tr.lastacct > :first-child { background: color-mix(in srgb, #2563eb 16%, var(--surface)) !important; }
  html.ui9.page-cost .hscroll tr.lvl-s > td:first-child { padding-left: 16px; }
  html.ui9.page-cost .hscroll tr.lvl-a > td:first-child { padding-left: 26px; }
  html.ui9.page-cost .card tbody tr:has(> td .sw:not(.on)) > td:first-child { box-shadow: 1px 0 0 var(--line), inset 2px 0 0 var(--rejected); }
  html.ui9.page-cost #copyWrap .hscroll thead th:first-child { box-shadow: 1px 0 0 var(--line), inset 0 -2px 0 var(--text); }
  /* a campaign reads whole or clamps to two lines. A word breaks only if it is wider than the whole line */
  html.ui9.page-cost #table .cname { flex: 1 1 0; min-width: 120px; overflow-wrap: break-word; word-break: normal; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  /* the bid badge takes its own line under the name, so the pinned column cannot cut it */
  html.ui9.page-cost #table tr:has(.tgt) .v9-l1 { flex-wrap: wrap; row-gap: 2px; }
  html.ui9.page-cost #table tr:has(.tgt) .v9-l1::after { content: ""; order: 1; flex: 0 0 100%; height: 0; }
  html.ui9.page-cost #table .v9-l1 .tgt { order: 2; max-width: calc(100% - 39px); margin-left: 39px; overflow: hidden; text-overflow: ellipsis; }
  html.ui9.page-cost #table tr:has(.sw) .v9-l1 .tgt { max-width: calc(100% - 80px); margin-left: 80px; }
  /* a long bid wraps inside its badge: on touch no title can show the rest, and "max conversion" and "max conversion value" are different bids */
  html.ui9.page-cost #table .v9-l1 .tgt { white-space: normal; text-overflow: clip; overflow-wrap: anywhere; }
  html.ui9.page-cost .hscroll .v9-l1 .mono.muted { display: none; }
  /* thumbs: 32px to touch, drawn the same size */
  html.ui9.page-cost .tw { width: 32px; height: 32px; }
  html.ui9.page-cost .v9-l1 .ico[data-acct] { min-width: 32px; min-height: 32px; display: inline-grid; place-items: center; margin-left: auto; }
}
/* phone and small tablet: readout first, then the one swipeable strip of controls, then the table */
@media (max-width: 860px) {
  html.ui9.page-cost .v9-rail { position: static; grid-template-columns: minmax(0, 1fr) 260px; grid-template-areas: "pf pf" "hero tiles" "v v" "ag ag"; gap: 6px; padding: 8px 12px 12px; }
  html.ui9.page-cost .v9-rail::after, html.ui9.page-cost body > .topbar::before { display: none; }
  html.ui9.page-cost #pfTabs, html.ui9.page-cost.v9-no-tiles #pfTabs { flex-direction: row; flex-wrap: nowrap; max-width: none; }
  html.ui9.page-cost #pfTabs .btn { flex: none; justify-content: center; height: 30px; min-height: 30px; padding: 0; min-width: 34px; }
  html.ui9.page-cost #pfTabs .btn.on { flex: 1; padding: 0 8px; font-size: 12.5px; font-weight: 600; }
  html.ui9.page-cost.v9-cost-on #pfTabs .btn .v9-w { display: none; }
  html.ui9.page-cost.v9-cost-on #pfTabs .btn.on .v9-w { display: inline; }
  html.ui9.page-cost #tiles, html.ui9.page-cost #tiles:has(.stat:nth-child(6)) { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.ui9.page-cost #tiles .stat { padding: 8px 11px !important; gap: 6px; }
  html.ui9.page-cost #tiles .stat b { font-size: 15px !important; }
  html.ui9.page-cost #tiles .stat span { letter-spacing: .07em !important; }
  html.ui9.page-cost .v9-agent { grid-area: ag; display: block; margin: 0; }
  html.ui9.page-cost .v9-agent[hidden], html.ui9.page-cost.v9-pf-meta .v9-agent { display: none; }
  html.ui9.page-cost #verts { flex-direction: row; margin-inline: -4px; }
  html.ui9.page-cost body > .topbar { flex-wrap: nowrap; gap: 6px; padding: 10px 12px 8px; overflow-x: auto; scrollbar-width: none; }
  html.ui9.page-cost body > .topbar::-webkit-scrollbar { display: none; }
  html.ui9.page-cost .v9-rng { order: 2; }
  html.ui9.page-cost .v9-find { order: 3; flex: 0 0 196px; }
  /* a real field keeps 16px, or iOS zooms the page. Drawn at the size of the keys beside it */
  html.ui9.page-cost #dLast { width: 78px !important; min-height: 34px; height: 34px; margin: -3px -14.6px -3px 0; transform: scale(.8125); transform-origin: left center; }
  html.ui9.page-cost :is(#dStart, #dEnd) { width: 152px !important; }
  html.ui9.page-cost .wrap { padding: 0 12px 20px; }
  html.ui9.page-cost #tNotes tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: none; }
  html.ui9.page-cost #tNotes td:nth-child(2) { grid-area: 1 / 1; }
  html.ui9.page-cost #tNotes td:nth-child(4) { grid-area: 1 / 2; }
  html.ui9.page-cost #tNotes td:nth-child(3) { grid-area: 2 / 1; }
  html.ui9.page-cost #tNotes td:nth-child(5) { grid-area: 3 / 1 / 4 / 3; margin-top: 3px; }
  html.ui9.page-cost #tNotes td:nth-child(1) { grid-area: 4 / 1; justify-self: start; margin-top: 3px; }
  html.ui9.page-cost #tNotes td:nth-child(6) { grid-area: 4 / 2; margin-top: 3px; }
  /* the crumb: back and name on one line, Manage on its own */
  html.ui9.page-cost #crumb { flex-wrap: wrap; padding-block: 6px; }
  html.ui9.page-cost #crumb .mono { display: none; }
  html.ui9.page-cost #crumb > :is(span:not(.mono), b) { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.ui9.page-cost .v9-manage { flex: 1 0 100%; margin-left: 0; justify-content: center; height: 32px; }
}
@media (max-width: 700px) {
  html.ui9.page-cost .v9-rwell { display: block; padding: 11px 13px 9px; }
  html.ui9.page-cost .v9-say { margin: 0 0 9px; }
  html.ui9.page-cost .v9-fig { margin: 10px 0 7px; }
  html.ui9.page-cost .v9-basis { margin-top: 7px; }
  html.ui9.page-cost .v9-ruler { --rw: 260; max-width: 260px; }
}
/* a phone: one column */
@media (max-width: 600px) {
  html.ui9.page-cost .v9-rail { display: flex; flex-direction: column; }
  html.ui9.page-cost .v9-rwell { width: 100%; }
}
/* the ledger on a phone: name, and whether it makes money, without a swipe */
@media (max-width: 559px) {
  html.ui9.page-cost .ico[data-copytext] { display: none; }
  html.ui9.page-cost .hscroll:has(#table):not(:has(.sw)) tr > :first-child { width: 170px; min-width: 170px; max-width: 170px; }
  /* the 120px name does not fit that column beside the thumb and the indent: it wraps instead */
  html.ui9.page-cost .hscroll:has(#table):not(:has(.sw)) #table .cname { min-width: 0; }
  html.ui9.page-cost #table .v9-l1:has(.v9-rr) { flex-wrap: wrap; gap: 0 4px; margin-left: -7px; margin-right: -9px; }
  /* line one is the name, clamped to two lines. Line two is ROAS, the dot, and the way in */
  html.ui9.page-cost #table .v9-l1:has(.v9-rr) .acctlink { flex: 1 1 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  html.ui9.page-cost #table .v9-l1:has(.v9-rr)::after { content: ""; order: 2; flex: 0 0 100%; height: 0; }
  html.ui9.page-cost #table .v9-l1 .ico[data-acct] { order: 5; margin-block: -6px; }   /* 32px to touch, without making the line 32px tall */
  html.ui9.page-cost #table .v9-l1 .v9-rr { order: 3; flex: none; display: inline; margin-left: 36px; font: 600 12px/1.3 var(--mono); letter-spacing: -.02em; color: var(--text-dim); }
  html.ui9.page-cost #table .v9-l1 .v9-rr.good { color: var(--live); }
  html.ui9.page-cost #table .v9-l1 .v9-rr.bad { color: var(--rejected); }
  html.ui9.page-cost #table .v9-l1 .ndot { order: 4; align-self: center; margin-left: 6px; }
  html.ui9.page-cost.v9-no-roas #table .v9-l1 .v9-rr, html.ui9.page-cost.v9-no-roas #table .v9-l1::after { display: none; }
}

/* =====================================================================
   Top layout (15 Nov 2026, Harsh): the old order. Totals in one row on top,
   platform and view keys on the left, the verticals as cards beside them.
   These rules sit last so they win over the rail ones above.
   ===================================================================== */
html.ui9.page-cost .wrap > #tiles {
  display: grid !important; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; gap: 10px; width: auto; margin: 4px 0 12px;
  padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; position: static;
}
html.ui9.page-cost .wrap > #tiles .stat {
  order: 0 !important; display: flex !important; flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 8px; min-height: 0;
  padding: 14px 18px !important; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.04);
}
html.ui9.page-cost .wrap > #tiles .stat b { order: 1; font: 650 20px/1.1 var(--mono) !important; letter-spacing: -.035em; color: var(--text); overflow: visible; }
html.ui9.page-cost .wrap > #tiles .stat b.v9-long { font-size: 18px !important; }
html.ui9.page-cost .wrap > #tiles .stat span { order: 2; color: var(--text-dim); font: 600 10.5px/1 var(--mono); letter-spacing: .08em !important; text-transform: uppercase; white-space: nowrap; }
html.ui9.page-cost .wrap > #tiles .stat b.good, html.ui9.page-cost .wrap > #tiles .stat b .good { color: var(--live); }
html.ui9.page-cost .wrap > #tiles .stat b.bad, html.ui9.page-cost .wrap > #tiles .stat b .bad { color: var(--rejected); }

html.ui9.page-cost .wrap > .tabrow { display: flex !important; align-items: flex-start; gap: 14px; position: static; width: auto; padding: 0; margin: 0 0 12px; background: none; overflow: visible; }
html.ui9.page-cost .v9-keys { flex: none; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
html.ui9.page-cost .v9-keys #pfTabs { flex-direction: row !important; flex-wrap: wrap; gap: 6px !important; padding: 0; background: none; box-shadow: none; }
html.ui9.page-cost .v9-keys #pfTabs .btn, html.ui9.page-cost .v9-keys #pfTabs .btn.on {
  flex: none; min-width: 0; height: 34px; min-height: 34px; padding: 0 12px; justify-content: center; border-radius: 9px; opacity: 1;
  background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line); font: 600 13px/1 var(--sans);
}
html.ui9.page-cost .v9-keys #pfTabs .btn:hover { background: var(--hover); color: var(--text); }
html.ui9.page-cost .v9-keys #pfTabs .btn.on { background: var(--primary-bg); color: var(--primary-text); box-shadow: none; }
html.ui9.page-cost.v9-cost-on .v9-keys #pfTabs .btn .v9-w { display: inline !important; }
html.ui9.page-cost .v9-keys #viewTabs { align-self: flex-start; }
html.ui9.page-cost .v9-keys #viewTabs .btn { min-height: 30px; padding: 0 12px; }
html.ui9.page-cost .v9-keys .v9-agent { position: static; margin: 0; background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--text); }
html.ui9.page-cost .v9-keys .v9-agent::before, html.ui9.page-cost .v9-keys .v9-agent::after { content: none; }
html.ui9.page-cost .v9-keys .v9-agent p { color: var(--text); font-size: 14px; }
html.ui9.page-cost .v9-keys .v9-agent .v9-hud { color: var(--text-dim); }

html.ui9.page-cost .wrap > .tabrow #verts { flex: 1 1 0; min-width: 0; display: flex; flex-direction: row !important; flex-wrap: wrap; gap: 10px; margin: 0; overflow: visible; }
html.ui9.page-cost .wrap > .tabrow .vert {
  flex: 0 1 300px; width: auto; min-width: 220px; padding: 12px 16px; gap: 4px 10px; border-radius: 12px; color: var(--text);
  background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.04); cursor: pointer;
}
html.ui9.page-cost .wrap > .tabrow .vert:hover { background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong), 0 2px 6px rgba(0,0,0,.06); }
html.ui9.page-cost .wrap > .tabrow .vert.on { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); box-shadow: 0 0 0 1.5px var(--accent); }
html.ui9.page-cost .wrap > .tabrow .vert .vn { grid-column: 1 / -1; color: var(--text-dim); font: 600 11px/1.1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
html.ui9.page-cost .wrap > .tabrow .vert .vn i { color: var(--text-faint); }
html.ui9.page-cost .wrap > .tabrow .vert b { grid-column: 1 / -1; font: 650 22px/1.15 var(--mono); letter-spacing: -.035em; color: var(--text); }
html.ui9.page-cost .wrap > .tabrow .vert b.good { color: var(--live); }
html.ui9.page-cost .wrap > .tabrow .vert b.bad { color: var(--rejected); }
html.ui9.page-cost .wrap > .tabrow .vert .v9-segbar { display: none; }
/* the page's own two lines are the old card's lines: spend · rev · P/L, then conv · CPA */
html.ui9.page-cost .wrap > .tabrow .vert .vs:not(.v9-vs) { display: block !important; white-space: normal; color: var(--text-dim); font: 500 12.5px/1.35 var(--sans); letter-spacing: 0; }
html.ui9.page-cost .wrap > .tabrow .vert .vs em { color: var(--text); font-weight: 650; font-style: normal; }
html.ui9.page-cost .wrap > .tabrow .vert .vs .pl { color: var(--live); font-weight: 600; }
html.ui9.page-cost .wrap > .tabrow .vert .vs .mi { color: var(--rejected); font-weight: 600; }
html.ui9.page-cost .wrap > .tabrow .vert .v9-vs { display: none !important; }
html.ui9.page-cost.v9-no-roas .wrap > .tabrow .vert b { display: none; }

@media (max-width: 860px) {
  html.ui9.page-cost .wrap > #tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  html.ui9.page-cost .wrap > #tiles .stat { flex-direction: column-reverse; align-items: flex-start; gap: 6px; padding: 10px 12px !important; }
  html.ui9.page-cost .wrap > #tiles .stat b { font-size: 17px !important; }
  html.ui9.page-cost .wrap > .tabrow { flex-direction: column; gap: 10px; }
  html.ui9.page-cost .v9-keys { max-width: none; width: 100%; }
  html.ui9.page-cost .wrap > .tabrow #verts { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  html.ui9.page-cost .wrap > .tabrow .vert { flex: 0 0 240px; }
}
/* Notes view: the page is a two-column grid there. Totals and keys keep the full width on top, notes and reminders sit under them */
html.ui9.page-cost .wrap > :is(#tiles, .tabrow, #crumb) { grid-column: 1 / -1; }
html.ui9.page-cost .wrap > #tiles { grid-row: 1; }
html.ui9.page-cost .wrap > .tabrow { grid-row: 2; }
html.ui9.page-cost .wrap > #notesWrap, html.ui9.page-cost .wrap > #remWrap { grid-row: 3; }
@media (max-width: 960px) {
  html.ui9.page-cost .wrap > #notesWrap { grid-row: 3; }
  html.ui9.page-cost .wrap > #remWrap { grid-row: 4; }
}
html.ui9.page-cost .v9-keys > #pfTabs { order: 1; } html.ui9.page-cost .v9-keys > #viewTabs { order: 2; } html.ui9.page-cost .v9-keys > .v9-agent { order: 3; }

/* ===== 31-adsmanager.css ===== */
/* ==== 31-adsmanager: the switchboard (DESIGN.md 4.5) =========================
   On/off, budgets, ClickFlare money beside platform numbers. Real money, so calm
   and exact. No rail: an ink readout band, then one board that scrolls inside
   itself. The page's ids, markup and handlers are untouched. Everything that
   shapes the page is here, keyed to html.ui9, so it holds from the first paint. */

html.ui9.page-adsmanager { --am-dock: 48px; --am-dock-b: 40px; --am-row: 44px; --am-bid: 64px; scrollbar-gutter: auto; }   /* no reserved strip: the ink reaches the window edge */

/* ---- one column that fills the window: the board takes what is left, so a Claude
   line or the ticked-creatives strip takes height from the board, not from the page.
   Nothing above the bar has overflow: the sticky bar stays a child of body. */
@media (min-width: 861px) {
  html.ui9.page-adsmanager body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  html.ui9.page-adsmanager .wrap {
    flex: 1 1 0; min-height: 470px; width: 100%; max-width: none; margin: 0; display: flex; flex-direction: column; gap: 12px;
    padding: 4px var(--gut) 10px;
  }
  html.ui9.page-adsmanager .wrap > .card { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
  html.ui9.page-adsmanager #tbl { flex: 1 1 0; min-height: 200px; max-height: none; }
  /* the tab above already names the screen: the bar is platform, range, account, reload */
  html.ui9.page-adsmanager .topbar .brand { display: none; }
}
html.ui9.page-adsmanager .wrap > * { margin-bottom: 0; }

/* ---- the bar: page title, platform, spacer, range, account, reload ------------- */
html.ui9.page-adsmanager .topbar { flex-wrap: nowrap; }
html.ui9.page-adsmanager #pfTabs { flex: none; flex-wrap: nowrap; }
/* room for the mark is held from the first paint, so nothing moves when it arrives */
html.ui9.page-adsmanager #pfTabs button { position: relative; padding-left: 28px; }
html.ui9.page-adsmanager #pfTabs button .v9-lg { position: absolute; left: 7px; top: 50%; margin-top: -8px; }
html.ui9.page-adsmanager #pfTabs button .n { display: none; }
html.ui9.page-adsmanager #acct { width: 260px; flex: 0 1 260px; min-width: 150px; text-overflow: ellipsis; }
html.ui9.page-adsmanager #preset { flex: none; width: 128px; }
html.ui9.page-adsmanager #custom .input { width: 132px; padding-left: 8px; padding-right: 4px; font: 500 12px/1 var(--mono); letter-spacing: -.02em; }
html.ui9.page-adsmanager #reload { flex: none; min-height: 32px; border-radius: var(--r-key); }

/* ---- the ink readout band: platform five | tracker five ------------------------ */
html.ui9.page-adsmanager .kpis {
  position: relative; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)) minmax(0, 1.35fr) minmax(0, 1fr); min-height: 46px; border: 0; border-radius: var(--r-card);
  background-color: var(--bezel); color: var(--on-bezel);
  background-image: linear-gradient(rgba(244,239,228,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(244,239,228,.028) 1px, transparent 1px);
  background-size: 12px 12px; background-position: -1px -1px;
  box-shadow: inset 0 0 0 1px var(--bezel-line), 0 1px 0 var(--bezel-cast);
}
html.ui9.page-adsmanager .kpis > .kpi {
  display: flex; flex-direction: column; justify-content: center; gap: 5px; min-height: 46px; padding: 6px 12px; background: none;
  box-shadow: 1px 0 0 var(--bezel-line);
}
html.ui9.page-adsmanager .kpis > .kpi:last-child { box-shadow: none; }
html.ui9.page-adsmanager .kpis > .kpi.cf { background: color-mix(in srgb, var(--hazard) 5%, transparent); box-shadow: 1px 0 0 var(--bezel-line); }
html.ui9.page-adsmanager .kpis > .kpi.cf:last-child { box-shadow: none; }
/* the amber rule: left of it the platform says, right of it the tracker says */
html.ui9.page-adsmanager .kpis > .kpi:not(.cf) + .kpi.cf { box-shadow: inset 2px 0 0 var(--hazard), 1px 0 0 var(--bezel-line); }
html.ui9.page-adsmanager .kpis > .kpi .l { color: var(--on-bezel-dim); line-height: 1; }
html.ui9.page-adsmanager .kpis > .kpi.cf .l { color: var(--hazard); }
html.ui9.page-adsmanager .kpis > .kpi .v { color: var(--on-bezel); font-size: 14px; line-height: 1; }
html.ui9.page-adsmanager .kpis > .kpi .v .pos { color: var(--lamp-ok); font-weight: 500; }
html.ui9.page-adsmanager .kpis > .kpi .v .neg { color: color-mix(in srgb, var(--led) 62%, var(--on-bezel)); font-weight: 500; }
/* where the eye lands: what the money came to. The ground says so whichever way it went. */
html.ui9.page-adsmanager .kpis > .kpi.cf:is(:nth-child(9), :nth-child(10)) { background: color-mix(in srgb, var(--hazard) 12%, transparent); }
html.ui9.page-adsmanager .kpis > .kpi:is(:nth-child(9), :nth-child(10)) .v { font-size: 16px; font-weight: 600; }
html.ui9.page-adsmanager .kpis > .kpi:is(:nth-child(9), :nth-child(10)) .v :is(.pos, .neg) { font-weight: 600; }
html.ui9.page-adsmanager .kpis .spin { width: 11px; height: 11px; border-color: var(--bezel-line-2); border-top-color: var(--hazard); }
/* while the first read is out: the band keeps its height and breathes. An error stops it. */
html.ui9.page-adsmanager .wrap[data-ux-t="load"] > .kpis:empty::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(100deg, transparent 30%, rgba(244,239,228,.05) 50%, transparent 70%) 0 0 / 200% 100%;
  animation: v9-shimmer 1.6s linear infinite;
}

/* ---- the board ------------------------------------------------------------------ */
html.ui9.page-adsmanager .wrap > .card { overflow: visible; background: var(--surface); }   /* hidden clipped #colPop and the brackets */
html.ui9.page-adsmanager .card > header { flex: none; flex-wrap: nowrap; gap: 8px; min-height: 44px; padding: 6px 10px; border-bottom: 0; }
html.ui9.page-adsmanager .card > header .spacer { flex: 1 1 0; min-width: 0; }
html.ui9.page-adsmanager .card > header > :is(#show, #aiTips, #colMenu) { flex: none; }
html.ui9.page-adsmanager #show { width: 140px; }
html.ui9.page-adsmanager #q { flex: 0 1 210px; min-width: 120px; }

/* Campaigns › Ad sets › Ads: a path, because a click on a name walks down it */
html.ui9.page-adsmanager #lvTabs { flex: none; flex-wrap: nowrap; gap: 0; padding: 0; background: none; box-shadow: none; }
html.ui9.page-adsmanager #lvTabs button { position: relative; min-height: 28px; padding: 0 8px; border-radius: var(--r-key); }
html.ui9.page-adsmanager #lvTabs button:focus-visible { outline-offset: -2px; }
html.ui9.page-adsmanager #lvTabs button + button { margin-left: 18px; }
html.ui9.page-adsmanager #lvTabs button + button::before {
  content: "\203A"; position: absolute; left: -13px; top: 50%; width: 8px; margin-top: -9px; font: 400 15px/16px var(--sans); text-align: center; color: var(--text-faint); pointer-events: none;
}
html.ui9.page-adsmanager #lvTabs .n { margin-left: 5px; font: 500 11px/1 var(--mono); letter-spacing: -.02em; opacity: .72; }
html.ui9.page-adsmanager #lvTabs .n:empty { display: none; }
html.ui9.page-adsmanager #lvTabs button.on .n { opacity: .8; }
/* drilled in: the crumbs carry on along the same path and give way before the filters do */
html.ui9.page-adsmanager .chip { flex: 0 1 auto; min-width: 72px; max-width: 250px; height: 26px; padding: 0 3px 0 9px; font: 500 12px/1 var(--sans); background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
html.ui9.page-adsmanager .chip button { width: 20px; height: 20px; padding: 0; border-radius: 4px; flex: none; }
html.ui9.page-adsmanager .chip button:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }

/* AI tips: the sparkle sits in the page's own label, so the word comes from a data attribute
   and "Reading..." still reads while Claude works. */
html.ui9.page-adsmanager #aiTips { font-size: 0; gap: 0; }
html.ui9.page-adsmanager #aiTips::before { content: "\25C6"; margin-right: 6px; font: 400 10px/1 var(--mono); color: var(--accent); }
html.ui9.page-adsmanager #aiTips::after { content: attr(data-ux-label); font: 500 12px/1.15 var(--sans); }
html.ui9.page-adsmanager #aiTips:not([data-ux-label])::after { content: "AI tips"; }

/* Claude's line, on ink like every other instrument */
html.ui9.page-adsmanager .aisum {
  flex: none; margin: 0; padding: 7px 12px; border-radius: 0; font: 400 12.5px/1.4 var(--sans); background: var(--bezel-2); color: var(--on-bezel);
}
html.ui9.page-adsmanager .aisum > b:first-child { margin-right: 8px; font-size: 0; }
html.ui9.page-adsmanager .aisum > b:first-child::before { content: "\25C6  CLAUDE \25B8"; font: 500 10px/1 var(--mono); letter-spacing: .085em; color: var(--claude); white-space: pre; }
html.ui9.page-adsmanager .aisum .dim { color: var(--on-bezel-dim); }

/* ---- the table: 19 columns at 1406 ---------------------------------------------- */
html.ui9.page-adsmanager #tbl { box-shadow: inset 0 1px 0 var(--hair); overscroll-behavior: contain; }
html.ui9.page-adsmanager #t { width: 100%; }
html.ui9.page-adsmanager #t :is(th, td) { padding-left: 7px; padding-right: 7px; }
html.ui9.page-adsmanager #t th { letter-spacing: .05em !important; }   /* heads must not set a number column's width */
html.ui9.page-adsmanager #t th { top: 0; height: 31px; background: var(--surface-2); }
html.ui9.page-adsmanager #t td { height: var(--am-row); padding-top: 0; padding-bottom: 0; font-size: 12.5px; line-height: 16px; }
html.ui9.page-adsmanager #t td.num { letter-spacing: -.04em; }   /* 12.5px, not 13: 13px pushes Meta's ad sets 18px sideways at 1406 */
html.ui9.page-adsmanager #t th.on, html.ui9.page-adsmanager #t th.cf.on { color: var(--text); }
html.ui9.page-adsmanager #t th[data-k]:hover { color: var(--text); }
html.ui9.page-adsmanager #t th[data-k]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* the tracker's columns: warm, opened by the same amber rule as the band */
html.ui9.page-adsmanager #t th.cf { background: var(--cf-head); color: color-mix(in srgb, var(--cf-text) 62%, var(--text)); }
html.ui9.page-adsmanager #t td.cf { background: var(--cf); }
html.ui9.page-adsmanager #t td:not(.cf) + td.cf { box-shadow: inset 1px 0 0 var(--hazard); }
html.ui9.page-adsmanager #t th:not(.cf) + th.cf { box-shadow: inset 1px 0 0 var(--hazard), inset 0 -2px 0 var(--text); }

/* A pinned cell is costly on every repaint, and 200 rows of them took a paint from 0.24s to 0.37s.
   When the table fits there is nothing to pin against, so the rows stand still. Heads and Total stay
   sticky for the vertical scroll. The fragment sets data-ux-fits only after measuring. */
html.ui9.page-adsmanager #tbl[data-ux-fits] #t tbody tr:not(.total) td { position: static; }

/* pinned columns: 42 + 46, then the name. They carry a ground of their own in every row state. */
html.ui9.page-adsmanager #t .stick1 { left: 0; width: 42px; min-width: 42px; max-width: 42px; padding: 0 0 0 14px; }
html.ui9.page-adsmanager #t .stick2 { left: 42px; width: 46px; min-width: 46px; max-width: 46px; padding: 0 6px; }
html.ui9.page-adsmanager #t th.stick1, html.ui9.page-adsmanager #t th.stick2 { background: var(--surface-2); }
html.ui9.page-adsmanager #t :is(th[data-k="name"], td.nmcell, tr.total td:nth-child(3)) { position: sticky; left: 88px; }
html.ui9.page-adsmanager #t th[data-k="name"] { z-index: 4; width: 100%; box-shadow: inset 0 -2px 0 var(--text), inset -1px 0 0 var(--hair); }
html.ui9.page-adsmanager #t td.nmcell { z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--hair); }
html.ui9.page-adsmanager #t tr.total td:nth-child(3) { z-index: 3; }

/* the name takes what the numbers leave, on one line. width and max-width together make it the
   one column that gives way, so 19 columns fit without a sideways scroll. */
html.ui9.page-adsmanager #t td.nmcell { width: 100%; min-width: 172px; max-width: 0; white-space: nowrap; }
html.ui9.page-adsmanager #t .nm { display: block; font-size: 12.5px; font-weight: 500; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal; -webkit-line-clamp: unset; }
html.ui9.page-adsmanager #t .sub { display: block; font-size: 10.5px; line-height: 14px; color: var(--text-dim); letter-spacing: -.01em; }
html.ui9.page-adsmanager #t .sub a { color: inherit; }
html.ui9.page-adsmanager #t .sub a:hover { color: var(--text); }
/* red is a loss on this screen, so nothing here turns red just because the mouse is on it */
html.ui9.page-adsmanager #t .nm a:hover { color: var(--text); text-decoration: underline; }
/* an AI tag rides on the second line, so a tagged row stays 44px */
html.ui9.page-adsmanager #t .aitip {
  float: right; margin: 0 0 0 6px; padding: 0 5px; border-radius: var(--r-cap); font: 500 10px/14px var(--mono); letter-spacing: 0; text-transform: none; white-space: nowrap;
}
html.ui9.page-adsmanager #t .aitip.scale { background: var(--live-bg); color: var(--live); }
html.ui9.page-adsmanager #t .aitip:is(.cut, .pause) { background: var(--rejected-bg); color: var(--rejected); }
html.ui9.page-adsmanager #t .aitip.watch { background: var(--review-bg); color: var(--review); }
html.ui9.page-adsmanager #t .aitip.keep { background: var(--surface-2); color: var(--text-dim); }

/* cells that must not set the column: long words stop at a width, the whole text is on hover */
html.ui9.page-adsmanager #t .pill { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; font: 500 11px/17px var(--sans); padding: 0 6px; border-radius: var(--r-cap); }
/* the normal state is quiet, so a filled pill means something differs */
html.ui9.page-adsmanager #t .pill.g { position: relative; padding: 0 0 0 11px; background: none; color: var(--text-dim); }
html.ui9.page-adsmanager #t .pill.g::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--live); }
html.ui9.page-adsmanager #t td[data-ux-k="bid"] { max-width: calc(var(--am-bid) + 11px); padding-right: 4px; overflow: hidden; color: var(--text-dim); font-size: 11.5px; line-height: 14px; white-space: normal; }
/* two lines inside the 44px row: the bid type on one, the cap on the other */
html.ui9.page-adsmanager #t .v9-am-bid { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; width: var(--am-bid); overflow: hidden; overflow-wrap: anywhere; }
/* the second line is what tells two bids apart, so it is the first line that gives way */
html.ui9.page-adsmanager #t .v9-am-bid2 { display: block; }
html.ui9.page-adsmanager #t .v9-am-bid2 > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui9.page-adsmanager #t .v9-am-bid2 > span + span { color: var(--text); }
html.ui9.page-adsmanager #t .bud { border-bottom-style: dotted; }
html.ui9.page-adsmanager #t .bud:hover { color: var(--text); border-bottom-color: var(--text-dim); }
html.ui9.page-adsmanager #t .bud:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
html.ui9.page-adsmanager #t .bud-in { width: 84px; min-height: 26px; height: 26px; padding: 0 6px; font: 500 12.5px/1 var(--mono); }

/* Total, right under the head. page JS sets its top inline. */
html.ui9.page-adsmanager #t tr.total td { height: 32px; padding-top: 0; padding-bottom: 0; background: var(--surface-2); font-weight: 600; box-shadow: inset 0 -1px 0 var(--line-strong); border-bottom: 0; }
html.ui9.page-adsmanager #t tr.total td.cf { background: var(--cf-head); }
html.ui9.page-adsmanager #t tr.total td:not(.cf) + td.cf { box-shadow: inset 1px 0 0 var(--hazard), inset 0 -1px 0 var(--line-strong); }
html.ui9.page-adsmanager #t tr.total td.num { font-weight: 600; }

/* row states repaint the ground only. Nothing here may change a size: live switches sit in these rows. */
html.ui9.page-adsmanager #t tbody tr:not(.total):hover td { background: color-mix(in srgb, var(--text) 4%, var(--surface)); }
html.ui9.page-adsmanager #t tbody tr:not(.total):hover td.cf { background: color-mix(in srgb, var(--text) 4%, var(--cf)); }
/* ticked is neutral: red is a loss and orange is go, so only the tick itself stays orange */
html.ui9.page-adsmanager #t tbody tr.sel td { background: color-mix(in srgb, var(--text) 7%, var(--surface)); }
html.ui9.page-adsmanager #t tbody tr.sel td.cf { background: color-mix(in srgb, var(--text) 7%, var(--cf)); }
html.ui9.page-adsmanager #t tbody tr.sel:hover td { background: color-mix(in srgb, var(--text) 10%, var(--surface)); }
html.ui9.page-adsmanager #t tbody tr.sel:hover td.cf { background: color-mix(in srgb, var(--text) 10%, var(--cf)); }
html.ui9.page-adsmanager #t tbody tr.sel td.stick1 { box-shadow: inset 2px 0 0 var(--text); }
/* green on the butter ground needs more weight in light to clear 4.5:1 */
html.ui9.page-adsmanager[data-theme="light"] #t td.cf :is(.pos, .good), html.ui9.page-adsmanager[data-theme="light"] #t td.cf:is(.pos, .good) { color: color-mix(in srgb, var(--live) 82%, var(--text)); }
/* a ticked or hovered row darkens the butter ground, so a gain or a loss on it darkens too */
html.ui9.page-adsmanager[data-theme="light"] #t tbody tr:is(.sel, :hover) td.cf :is(.pos, .good), html.ui9.page-adsmanager[data-theme="light"] #t tbody tr:is(.sel, :hover) td.cf:is(.pos, .good) { color: color-mix(in srgb, var(--live) 74%, var(--text)); }
html.ui9.page-adsmanager[data-theme="light"] #t tbody tr:is(.sel, :hover) td.cf :is(.neg, .bad), html.ui9.page-adsmanager[data-theme="light"] #t tbody tr:is(.sel, :hover) td.cf:is(.neg, .bad) { color: color-mix(in srgb, var(--rejected) 80%, var(--text)); }
html.ui9.page-adsmanager[data-theme="light"] #t .pill:not(.g, .a, .r) { color: color-mix(in srgb, var(--draft) 86%, var(--text)); }
html.ui9.page-adsmanager[data-theme="light"] #t .pill.a { color: color-mix(in srgb, var(--review) 84%, var(--text)); }
html.ui9.page-adsmanager[data-theme="light"] #t .pill.r { color: color-mix(in srgb, var(--rejected) 86%, var(--text)); }
/* off reads as off: the name steps back, the switch stays as it is */
html.ui9.page-adsmanager #t tr[data-ux-off] .nm a { color: var(--text-dim); font-weight: 450; }
html.ui9.page-adsmanager #t tr[data-ux-off] .nm a:hover { color: var(--text); }

/* with a name column to spare, the longest bid words stay whole: TARGET_ROAS is 79px. Meta's name
   column is the tight one, and it still has 184px here. */
@media (min-width: 1390px) {
  html.ui9.page-adsmanager { --am-bid: 80px; }
}
/* "total" takes the second line of a lifetime budget: that word alone is what pushed 19 columns past
   the edge on ad sets at 1406 and 1440. Two lines still sit inside the 44px row. */
@media (max-width: 1500px) {
  html.ui9.page-adsmanager #t td[data-ux-k="budget"] { white-space: normal; }
  html.ui9.page-adsmanager #t td.nmcell { min-width: 160px; }   /* Meta's widest range still needed 4px more */
}

/* a touch needs more than 19px of switch */
@media (pointer: coarse) {
  html.ui9.page-adsmanager #t .sw::before { content: ""; position: absolute; inset: -12px -6px; }
}

/* states of the table */
html.ui9.page-adsmanager #t td.empty { height: 176px; border-bottom: 0; padding: 30px 16px; white-space: normal; font-size: 13px; color: var(--text-dim); text-align: center; }
/* the fragment names the state on .wrap (load, none, err), so these cost nothing on a repaint.
   While there are no rows the heads hold their places, and the ghost rows fill the board. */
html.ui9.page-adsmanager .wrap[data-ux-t] #t th[data-k]:not([data-k="name"]) { min-width: 50px; }
html.ui9.page-adsmanager .wrap[data-ux-t] #t th:is([data-k="spend"], [data-k="cpa"], [data-k="profit"], [data-k="roi"]) { min-width: 60px; }
html.ui9.page-adsmanager .wrap[data-ux-t] #t th[data-k="status"] { min-width: 72px; }
html.ui9.page-adsmanager .wrap[data-ux-t] .aisum { display: none; }
html.ui9.page-adsmanager .wrap[data-ux-t="load"] #t td.empty { font: 500 11px/1 var(--mono); letter-spacing: .04em; color: var(--text-dim); }
html.ui9.page-adsmanager .wrap[data-ux-t="load"] #tbl {
  background-image: repeating-linear-gradient(transparent 0 calc(var(--am-row) - 1px), var(--hair) calc(var(--am-row) - 1px) var(--am-row)); background-position: 0 31px;
}
/* no thead and no spinner: the read itself failed. That is an error, and it says so. */
html.ui9.page-adsmanager .wrap[data-ux-t="err"] #t td.empty { color: var(--rejected); font-weight: 500; }
html.ui9.page-adsmanager .wrap[data-ux-t="err"] #t td.empty a { color: inherit; }
html.ui9.page-adsmanager #t tfoot td.more { height: 44px; padding: 6px; position: sticky; left: 0; background: var(--surface); border-bottom: 0; }

/* the tail of the table clears the dock, without moving a row */
html.ui9.page-adsmanager[data-ux-dock] #t { margin-bottom: calc(var(--am-dock) + 8px); }
/* a control that takes the focus is never left under the head, the Total or the dock */
html.ui9.page-adsmanager #tbl { scroll-padding: 67px 0 4px 268px; }
html.ui9.page-adsmanager[data-ux-dock] #tbl { scroll-padding-bottom: calc(var(--am-dock) + 12px); }

/* ---- #note: a 28px status line. Errors stay loud. -------------------------------- */
html.ui9.page-adsmanager #note {
  flex: none; display: flex; flex-wrap: nowrap; align-items: center; gap: 14px; min-height: 28px; margin: 0; padding: 4px 12px; overflow: hidden;
  border: 0; border-top: 1px solid var(--hair); border-radius: 0 0 var(--r-card) var(--r-card); background: none;
  font: 400 11.5px/1.3 var(--sans); color: var(--text-dim); white-space: nowrap;
}
html.ui9.page-adsmanager #note:empty { display: none; }
html.ui9.page-adsmanager #note > span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-adsmanager #note > span:nth-child(2) { flex-shrink: 12; }   /* ClickFlare's field names give way first */
html.ui9.page-adsmanager #note > span:first-child { flex: none; order: -2; font-family: var(--mono); letter-spacing: -.02em; }
/* how old the numbers are is the one part that changes, and it sits beside live switches: always whole,
   right after the date. The standing hint gives way first. */
html.ui9.page-adsmanager #note > span[data-ux-note="age"] { flex: none; order: -1; }
html.ui9.page-adsmanager #note > span[data-ux-note="hint"] { flex: 1 40 0; }
html.ui9.page-adsmanager #note > span + span { position: relative; padding-left: 14px; }
html.ui9.page-adsmanager #note > span + span::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 3px; margin-top: -1.5px; border-radius: 50%; background: var(--line-strong); }
html.ui9.page-adsmanager #note .spin { width: 10px; height: 10px; border-width: 1.5px; margin-right: 3px; }
html.ui9.page-adsmanager #note[data-ux-err] {
  flex-wrap: wrap; row-gap: 3px; white-space: normal; max-height: 86px; overflow: hidden auto; background: var(--rejected-bg);   /* one bad token repeats per account: all of it is there, the board keeps its rows */
  box-shadow: inset 2px 0 0 var(--rejected);
}
html.ui9.page-adsmanager #note[data-ux-err] > span { overflow: visible; white-space: normal; }
html.ui9.page-adsmanager #note[data-ux-err] > span[data-ux-note="err"] { order: -1; flex: 1 1 100%; padding-left: 0; }
html.ui9.page-adsmanager #note[data-ux-err] > span[data-ux-note="err"]::before { display: none; }
html.ui9.page-adsmanager #note .err { color: var(--rejected); font-weight: 600; font-size: 12px; }

/* ---- the bulk bar is the floating ink dock: ticking a row never moves the table ---- */
html.ui9.page-adsmanager #bulk {
  position: fixed; left: 0; right: 0; bottom: var(--am-dock-b); z-index: 45; width: fit-content; max-width: calc(100vw - 28px); min-height: 48px; margin: 0 auto;
  padding: 8px 10px 8px 14px; gap: 8px; flex-wrap: nowrap; border: 0; border-radius: var(--r-panel);
  background: var(--bezel); color: var(--on-bezel); box-shadow: 0 0 0 1px var(--bezel-line-2), var(--shadow-lg);
}
html.ui9.page-adsmanager #bulk.show { animation: v9-am-rise var(--t3) var(--ease); }
@keyframes v9-am-rise { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
html.ui9.page-adsmanager #bulk b { font: 500 13px/1 var(--mono); letter-spacing: -.03em; white-space: nowrap; color: var(--on-bezel); }
html.ui9.page-adsmanager #bulk .spacer { display: none; }
html.ui9.page-adsmanager #bulk .btn { min-height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: var(--r-key); }
html.ui9.page-adsmanager #bulk .btn:not(.btn-on, #bAdd) { background: var(--bezel-2); color: var(--on-bezel); box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-adsmanager #bulk .btn:not(.btn-on, #bAdd):hover { background: var(--bezel-3); color: var(--on-bezel); box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-adsmanager #bAdd { box-shadow: none; }
html.ui9.page-adsmanager #bulk .btn-on { background: var(--go); color: var(--go-ink); box-shadow: none; }
html.ui9.page-adsmanager #bulk .btn-on:hover { color: var(--go-ink); filter: brightness(1.06); }
html.ui9.page-adsmanager #bulk .btn:focus-visible { outline: 2px solid var(--led); outline-offset: 2px; }
html.ui9.page-adsmanager #bulk .btn:disabled { opacity: .45; filter: none; }
html.ui9.page-adsmanager #bulk .v9-live::before { margin-right: 0; }
html.ui9.page-adsmanager #bulk .btn-on.v9-live::before { background: var(--go-ink); box-shadow: none; }
html.ui9.page-adsmanager #bulk .grp { flex: none; gap: 6px; padding-left: 10px; font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--on-bezel-dim); border-left: 1px solid var(--bezel-line-2); }
html.ui9.page-adsmanager #bulk .input { min-height: 30px; font: 500 12.5px/1 var(--sans); letter-spacing: 0; text-transform: none; background-color: var(--bezel-well); color: var(--on-bezel); box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-adsmanager #bulk .input::placeholder { color: var(--on-bezel-faint); }
html.ui9.page-adsmanager #bulk select.input option { background: var(--bezel-2); color: var(--on-bezel); }
html.ui9.page-adsmanager #bulk #bVal { font-family: var(--mono); }
html.ui9.page-adsmanager #bulk .input:focus-visible { box-shadow: inset 0 0 0 1.5px var(--led), 0 0 0 3px var(--led-soft) !important; }

/* the 6s Undo always shows above the dock */
html.ui9.page-adsmanager .toast {
  z-index: 80; max-width: min(620px, calc(100vw - 32px)); padding: 9px 14px; border-radius: var(--r-ticket); background: var(--bezel-2); color: var(--on-bezel);
  font: 500 13px/1.35 var(--sans); box-shadow: 0 0 0 1px var(--bezel-line-2), var(--e2);
}
html.ui9.page-adsmanager .toast button { color: var(--hazard); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
html.ui9.page-adsmanager .toast.bad { background: var(--rejected); color: #fff; box-shadow: var(--e2); }
html.ui9.page-adsmanager .toast.bad button { color: #fff; }
html.ui9.page-adsmanager .toast:not(.show) { pointer-events: none; }
@media (min-width: 861px) { html.ui9.page-adsmanager[data-ux-dock] .toast { bottom: calc(var(--am-dock-b) + var(--am-dock) + 10px); } }
/* on a small screen a raised toast would sit on the confirm's buttons, and the confirm covers the dock anyway */
@media (max-width: 860px) { html.ui9.page-adsmanager[data-ux-dock]:not([data-ux-ask]) .toast { bottom: calc(var(--am-dock-b) + var(--am-dock) + 10px); } }

/* ---- the strip of creatives ticked in the Library ------------------------------- */
html.ui9.page-adsmanager .picks { flex: none; flex-wrap: nowrap; gap: 10px; min-height: 42px; padding: 4px 8px; border: 0; border-radius: var(--r-card); background: var(--accent-soft); font-size: 12.5px; line-height: 1.3; box-shadow: inset 0 0 0 1px var(--line); }
html.ui9.page-adsmanager .picks:not(.show) { display: none; }
html.ui9.page-adsmanager .picks .thumbs { flex: none; }
html.ui9.page-adsmanager .thumbs :is(img, .ph) { width: 30px; height: 30px; border-radius: 5px; }
html.ui9.page-adsmanager .picks b { font-weight: 600; }

/* ---- Columns: two lists side by side, so all 19 fit without a scroller ----------- */
html.ui9.page-adsmanager #colPop {
  z-index: 44; width: min(300px, calc(100vw - 16px)); min-width: 0; max-height: none; padding: 8px; border: 0; border-radius: var(--r-panel); background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--e2);
}
html.ui9.page-adsmanager .menu.open #colPop { grid-template-rows: repeat(13, auto); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0 6px; align-content: start; }
html.ui9.page-adsmanager #colPop .h { font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--text-dim); padding: 6px 6px 6px; }
html.ui9.page-adsmanager #colPop label { font-size: 12.5px; line-height: 1.2; min-height: 26px; padding: 3px 6px; }
html.ui9.page-adsmanager #colPop label:hover { background: var(--hover); }

/* ---- the confirm: it spends money, so it reads like a ticket --------------------- */
html.ui9.page-adsmanager .dlg { border: 0; border-radius: var(--r-panel); background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); }
html.ui9.page-adsmanager .dlg h3 { padding: 13px 16px; font: 600 15px/1.25 var(--sans); letter-spacing: -.015em; border-bottom-color: var(--hair); overflow-wrap: anywhere; }
html.ui9.page-adsmanager .dlg .body { padding: 12px 16px; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
html.ui9.page-adsmanager .dlg .body b { font-weight: 600; font-variant-numeric: tabular-nums; }
html.ui9.page-adsmanager .dlg footer { padding: 10px 16px; border-top-color: var(--hair); }
/* orange is go. The same word keeps the same colour as in the dock: stop is ink, go is orange. The page sets the old colours inline. */
html.ui9.page-adsmanager #dYes[data-ux-tone="off"] { background: var(--bezel) !important; border-color: var(--bezel) !important; color: var(--on-bezel) !important; box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-adsmanager #dYes[data-ux-tone="on"] { background: var(--go) !important; border-color: transparent !important; color: var(--go-ink) !important; }
html.ui9.page-adsmanager .plist .st { font-size: 11.5px; font-weight: 500; }
html.ui9.page-adsmanager .plist .it :is(img, .ph) { border-radius: 5px; }

/* ---- the account finder --------------------------------------------------------- */
html.ui9.page-adsmanager #v9AmAcct { padding: 8px; }
html.ui9.page-adsmanager #v9AmAcct .v9-am-in {
  display: block; width: 100%; height: 32px; padding: 0 10px; border: 0; border-radius: var(--r-key); outline: 0; font: 400 13px/1 var(--sans);
  background: var(--bezel-well); color: var(--on-bezel); box-shadow: inset 0 0 0 1px var(--bezel-line-2);
}
html.ui9.page-adsmanager #v9AmAcct .v9-am-in::placeholder { color: var(--on-bezel-faint); }
html.ui9.page-adsmanager #v9AmAcct .v9-am-in:focus-visible { box-shadow: inset 0 0 0 1.5px var(--led) !important; }
html.ui9.page-adsmanager #v9AmAcct .v9-am-list { max-height: min(380px, 52vh); margin-top: 6px; overflow-y: auto; scrollbar-width: thin; }
html.ui9.page-adsmanager #v9AmAcct .v9-hud { display: block; padding: 8px 8px 5px; color: var(--on-bezel-dim); }
html.ui9.page-adsmanager #v9AmAcct .v9-am-row {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 30px; padding: 4px 8px; border-radius: 6px; text-align: left; font-size: 13px; color: var(--on-bezel);
}
html.ui9.page-adsmanager #v9AmAcct .v9-am-row span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui9.page-adsmanager #v9AmAcct .v9-am-row i { flex: none; font: 500 12px/1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--on-bezel-dim); }
html.ui9.page-adsmanager #v9AmAcct .v9-am-row.act { background: var(--bezel-3); }
html.ui9.page-adsmanager #v9AmAcct .v9-am-row[aria-selected="true"] span { font-weight: 600; }
html.ui9.page-adsmanager #v9AmAcct .v9-am-row[aria-selected="true"]::before { content: ""; flex: none; width: 5px; height: 5px; margin-right: -4px; border-radius: 50%; background: var(--hazard); }
html.ui9.page-adsmanager #v9AmAcct .v9-am-none { padding: 14px 8px; font-size: 12.5px; color: var(--on-bezel-dim); }

/* ---- under 1241 the band goes to two rows of five, one per source: ten across cuts the labels ---- */
@media (max-width: 1240px) {
  html.ui9.page-adsmanager .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  html.ui9.page-adsmanager .kpis > .kpi:nth-child(5) { box-shadow: 0 1px 0 var(--bezel-line); }
  html.ui9.page-adsmanager .kpis > .kpi:not(:nth-child(5n)):not(.cf) { box-shadow: 1px 0 0 var(--bezel-line), 0 1px 0 var(--bezel-line); }
  html.ui9.page-adsmanager .kpis > .kpi:not(.cf) + .kpi.cf { box-shadow: 1px 0 0 var(--bezel-line), inset 0 2px 0 var(--hazard); }
  html.ui9.page-adsmanager .kpis > .kpi.cf { box-shadow: 1px 0 0 var(--bezel-line), inset 0 2px 0 var(--hazard); }
  html.ui9.page-adsmanager .kpis > .kpi.cf:last-child { box-shadow: inset 0 2px 0 var(--hazard); }
  /* the id gives way, so rows from two accounts can be told apart. Click still copies all of it. */
  html.ui9.page-adsmanager #t .sub { display: flex; gap: .35em; white-space: nowrap; }
  html.ui9.page-adsmanager #t .sub .cp { flex: 0 1 9ch; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  html.ui9.page-adsmanager #t .sub a { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
/* ---- under 1101: the bar may wrap, and Profit and ROI stay as near as they can ---- */
@media (max-width: 1100px) {
  html.ui9.page-adsmanager .topbar { flex-wrap: wrap; }
  html.ui9.page-adsmanager .card > header { flex-wrap: wrap; }
  html.ui9.page-adsmanager #t td.nmcell { min-width: 150px; }
  html.ui9.page-adsmanager #t :is(th[data-k="bid"], td[data-ux-k="bid"]) { display: none; }
  html.ui9.page-adsmanager #tbl { scroll-padding-left: 246px; }
  /* sideways scroll is normal here: the pinned edge says so, and digits do not look cut by a fault */
  html.ui9.page-adsmanager #t th[data-k="name"] { box-shadow: inset 0 -2px 0 var(--text), inset -1px 0 0 var(--hair), 4px 0 6px -4px var(--bezel-cast); }
  html.ui9.page-adsmanager #t td.nmcell { box-shadow: 1px 0 0 var(--hair), 4px 0 6px -4px var(--bezel-cast); }
  html.ui9.page-adsmanager #t tr.total td:nth-child(3) { box-shadow: inset 0 -1px 0 var(--line-strong), 4px 0 6px -4px var(--bezel-cast); }
}
/* Profit and ROI are what the row comes to: whenever the table has to scroll sideways they pin to
   the right edge, so they are the last thing to leave the view. With no scroll this does nothing. */
@media (min-width: 641px) {
  html.ui9.page-adsmanager #tbl { scroll-padding-right: 140px; }
  html.ui9.page-adsmanager #t :is(th[data-k="profit"], th[data-k="roi"], td[data-ux-k="profit"], td[data-ux-k="roi"]) { position: sticky; }
  html.ui9.page-adsmanager #t :is(th[data-k="roi"], td[data-ux-k="roi"]) { right: 0; }
  html.ui9.page-adsmanager #t :is(th[data-k="profit"], td[data-ux-k="profit"]) { right: var(--am-roi, 0px); }
  html.ui9.page-adsmanager #t th:is([data-k="profit"], [data-k="roi"]) { z-index: 4; }
  html.ui9.page-adsmanager #t td:is([data-ux-k="profit"], [data-ux-k="roi"]) { z-index: 1; }
  html.ui9.page-adsmanager #t tr.total td:is([data-ux-k="profit"], [data-ux-k="roi"]) { z-index: 3; }
}
/* the pinned edge says the table goes on under it, whenever it does */
@media (min-width: 641px) {
  html.ui9.page-adsmanager #tbl:not([data-ux-fits]) #t th[data-k="profit"] { box-shadow: inset 0 -2px 0 var(--text), -4px 0 6px -4px var(--bezel-cast); }
  html.ui9.page-adsmanager #tbl:not([data-ux-fits]) #t td[data-ux-k="profit"] { box-shadow: -4px 0 6px -4px var(--bezel-cast); }
  html.ui9.page-adsmanager #tbl:not([data-ux-fits]) #t tr.total td[data-ux-k="profit"] { box-shadow: inset 0 -1px 0 var(--line-strong), -4px 0 6px -4px var(--bezel-cast); }
}
/* the status line takes a second row before it hides anything */
@media (min-width: 861px) and (max-width: 1240px) {
  html.ui9.page-adsmanager #note { flex-wrap: wrap; row-gap: 2px; }
}
/* ten across only just fits here: the longest label stays whole */
@media (min-width: 1241px) and (max-width: 1320px) {
  html.ui9.page-adsmanager .kpis > .kpi { padding-left: 9px; padding-right: 8px; }
  html.ui9.page-adsmanager .kpis > .kpi .l { letter-spacing: .06em; }
}
/* the dock in two deliberate rows: what is ticked and what to do, then the budget. Above 900 it only needs this with Add showing. */
@media (min-width: 641px) and (max-width: 900px) {
  html.ui9.page-adsmanager { --am-dock: 88px; }
  html.ui9.page-adsmanager #bulk { flex-wrap: wrap; justify-content: flex-start; }
  html.ui9.page-adsmanager #bulk #bClear { order: 1; margin-left: auto; }
  html.ui9.page-adsmanager #bulk .grp { order: 2; flex: 1 0 100%; padding-left: 0; border-left: 0; }
  html.ui9.page-adsmanager #bulk #bVal { flex: 0 0 120px; }
  html.ui9.page-adsmanager #bulk #bBud { margin-left: auto; }
}
@media (min-width: 901px) and (max-width: 1000px) {
  html.ui9.page-adsmanager[data-ux-add] { --am-dock: 88px; }
  html.ui9.page-adsmanager[data-ux-add] #bulk { flex-wrap: wrap; justify-content: flex-start; }
  html.ui9.page-adsmanager[data-ux-add] #bulk #bClear { order: 1; margin-left: auto; }
  html.ui9.page-adsmanager[data-ux-add] #bulk .grp { order: 2; flex: 1 0 100%; padding-left: 0; border-left: 0; }
  html.ui9.page-adsmanager[data-ux-add] #bulk #bVal { flex: 0 0 120px; }
  html.ui9.page-adsmanager[data-ux-add] #bulk #bBud { margin-left: auto; }
}

/* ---- phones and tablets: the page scrolls, the table swipes in its own box -------- */
@media (max-width: 860px) {
  html.ui9.page-adsmanager { --am-dock-b: calc(66px + env(safe-area-inset-bottom)); }
  /* the page scrolls here, so the page keeps a focused control clear of the dock */
  html.ui9.page-adsmanager[data-ux-dock] { scroll-padding-bottom: calc(var(--am-dock-b) + var(--am-dock) + 12px); }
  html.ui9.page-adsmanager .wrap { display: flex; flex-direction: column; gap: 8px; max-width: none; padding-bottom: 84px; }
  html.ui9.page-adsmanager .wrap > .card { display: block; }
  /* one axis to scroll here: overflow-y stays auto with nothing to scroll, so the head is static */
  html.ui9.page-adsmanager #tbl { max-height: none; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: auto; }
  html.ui9.page-adsmanager #note { flex-wrap: wrap; row-gap: 2px; white-space: normal; overflow: visible; }
  html.ui9.page-adsmanager #note > span, html.ui9.page-adsmanager #note > span:is(:first-child, [data-ux-note="age"], [data-ux-note="hint"]) { overflow: visible; white-space: normal; flex: 1 1 auto; }
  html.ui9.page-adsmanager #note > span + span { padding-left: 0; }
  html.ui9.page-adsmanager #note > span + span::before { display: none; }
  html.ui9.page-adsmanager .picks { flex-wrap: wrap; }
  html.ui9.page-adsmanager #bulk { left: 8px; right: 8px; width: auto; max-width: none; }
}
@media (max-width: 640px) {
  html.ui9.page-adsmanager .topbar .brand { display: none; }
  html.ui9.page-adsmanager #pfTabs { flex: 1 1 100%; }
  html.ui9.page-adsmanager #pfTabs button { flex: 1 1 0; }
  html.ui9.page-adsmanager #preset { flex: 1 1 96px; width: auto; min-width: 0; }
  html.ui9.page-adsmanager #acct { flex: 2 1 130px; width: auto; min-width: 0; }
  /* platform down the left, tracker down the right: each number stays beside its own kind */
  html.ui9.page-adsmanager .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(5, auto); grid-auto-flow: column; }
  html.ui9.page-adsmanager .kpis > .kpi { min-height: 40px; padding: 5px 11px; gap: 4px; box-shadow: 0 1px 0 var(--bezel-line) !important; }
  html.ui9.page-adsmanager .kpis > .kpi.cf { box-shadow: inset 2px 0 0 var(--hazard), 0 1px 0 var(--bezel-line) !important; }
  html.ui9.page-adsmanager .kpis > .kpi:is(:nth-child(5), :nth-child(10)) { box-shadow: none !important; }
  html.ui9.page-adsmanager .kpis > .kpi.cf:nth-child(10) { box-shadow: inset 2px 0 0 var(--hazard) !important; }
  html.ui9.page-adsmanager .card > header { padding: 8px; }
  html.ui9.page-adsmanager #lvTabs { flex: 1 1 100%; }
  html.ui9.page-adsmanager #show { flex: 1 1 120px; width: auto; }
  html.ui9.page-adsmanager #q { flex: 1 1 100%; order: 5; }
  html.ui9.page-adsmanager .card > header .spacer { display: none; }
  html.ui9.page-adsmanager .chip { max-width: 100%; }
  html.ui9.page-adsmanager #t .stick2 { position: static; }
  html.ui9.page-adsmanager #t :is(th[data-k="name"], td.nmcell, tr.total td:nth-child(3)) { left: 42px; }
  html.ui9.page-adsmanager #t td.nmcell { width: 120px; min-width: 120px; max-width: 120px; }
  html.ui9.page-adsmanager #t tr.total td:nth-child(3) { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Spend sits beside every name without a swipe. Budget stays, and stays editable: the word
     "total" takes a second line, which is what made the column 105px wide. */
  html.ui9.page-adsmanager #t :is(th.num, td.num) { padding-left: 5px; padding-right: 5px; }
  html.ui9.page-adsmanager #t td.num { white-space: normal; }
  /* on a phone the first figure sits beside the name: the switch already says on or off */
  html.ui9.page-adsmanager #t :is(th[data-k="status"], td[data-ux-k="status"]) { display: none; }
  html.ui9.page-adsmanager #tbl { scroll-padding-left: 170px; }
  /* the dock on a phone: what is ticked and how to let go, then on and off, then the budget */
  html.ui9.page-adsmanager { --am-dock: 128px; }
  html.ui9.page-adsmanager[data-ux-add] { --am-dock: 168px; }
  html.ui9.page-adsmanager #bulk { padding: 8px 10px; }
  html.ui9.page-adsmanager #bulk.show { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
  html.ui9.page-adsmanager #bulk #bClear { grid-area: 1 / 2; justify-self: end; }
  html.ui9.page-adsmanager #bulk #selN { grid-area: 1 / 1; }
  html.ui9.page-adsmanager #bAdd { grid-column: 1 / -1; white-space: normal; }
  html.ui9.page-adsmanager #bulk .grp { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) 72px auto; align-items: center; padding-left: 0; border-left: 0; }
  html.ui9.page-adsmanager #bulk #bVal { width: 72px !important; min-width: 0; }
  html.ui9.page-adsmanager #bulk #bMode { width: 100%; min-width: 0; }
}

/* ===== 32-live-daily.css ===== */
/* =====================================================================
   P6: Live (the flight board) and Daily (the morning paper). DESIGN 4.6, 4.7.
   Layout is CSS keyed to html.ui9. js/32-live-daily.js only adds chrome.
   ===================================================================== */

/* ======================= LIVE: the flight board ======================= */
html.ui9.page-live {
  --v9-side: 330px; --v9-gap: 14px; --v9-top: calc(var(--shell-h) + var(--bar-h)); --v9-chh: 40px; --v9-ink: var(--bezel); --v9-barw: 68px; --v9-oc: 3; --v9-band: 84px;
  --v9-rule: var(--text); scroll-padding-top: calc(var(--v9-top) + var(--v9-chh) + 31px);
}
html.ui9.page-live[data-theme="dark"] { --v9-ink: var(--bezel-2); --v9-rule: color-mix(in srgb, var(--text) 55%, transparent); }
@media (min-width: 1360px) { html.ui9.page-live { --v9-side: 360px; } }
@media (max-width: 1399px) { html.ui9.page-live { --v9-barw: 44px; } }
@media (max-width: 1240px) { html.ui9.page-live { --v9-side: 300px; --v9-gap: 12px; } }
@media (min-width: 1001px) and (max-width: 1240px) { html.ui9.page-live { --v9-oc: 4; --v9-band: 100px; } }

/* ---- the bar: title and the as-of line on one row ---- */
html.ui9.page-live .wrap > .head { align-items: center; flex-wrap: nowrap; }
html.ui9.page-live .head > div:first-child { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 0 1 auto; }
html.ui9.page-live .head h1 { display: inline-flex; align-items: center; gap: 8px; align-self: center; white-space: nowrap; }
html.ui9.page-live .head .sub { margin: 0; font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
html.ui9.page-live .head .sp { flex: 1 1 8px; min-width: 8px; }
html.ui9.page-live .head .input { width: 230px; flex: 0 1 230px; min-width: 120px; }
html.ui9.page-live #refresh { flex: none; }
/* the lamp: it breathes only while the platforms are being read */
html.ui9.page-live .pulse { width: 8px; height: 8px; background: var(--live); box-shadow: 0 0 0 2px color-mix(in srgb, var(--live) 22%, transparent); animation: none; }
@keyframes v9-live-read { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--live) 8%, transparent); } }
@media (prefers-reduced-motion: no-preference) {
  html.ui9.page-live:has(#main .spin) .pulse { animation: v9-live-read 1.4s ease-in-out infinite; }
}
/* NewsBreak first. Keyboard order is matched in the enhancer. */
html.ui9.page-live #chTabs { flex: none; height: 32px; }
html.ui9.page-live #chTabs [data-ch="all"] { order: 0; }
html.ui9.page-live #chTabs [data-ch="nb"] { order: 1; }
html.ui9.page-live #chTabs [data-ch="meta"] { order: 2; }
html.ui9.page-live #main { display: flex; flex-direction: column; min-width: 0; }
html.ui9.page-live #main > .card:nth-child(2) { order: -1; }

/* ---- the readout band: one ink strip that runs into the hero, and the hero sits over the board. The list stays on paper. ---- */
html.ui9.page-live .kpis { min-height: var(--v9-band); margin: 4px 0 var(--v9-gap); background: var(--v9-ink); border: 0; }
html.ui9.page-live .kpi .k { white-space: nowrap; }
html.ui9.page-live .kpis > .kpi .v { font-size: 16px; line-height: 1.3; }
html.ui9.page-live .kpi .s { line-height: 1.3; }
html.ui9.page-live .kpis > .kpi:not(.next) { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; box-shadow: inset -1px 0 0 var(--bezel-line), inset 0 -1px 0 var(--bezel-line); }
html.ui9.page-live .kpis > .kpi:not(.next) .k { color: var(--on-bezel-faint); }
html.ui9.page-live .kpis > .kpi:not(.next) .v { color: var(--on-bezel); }
html.ui9.page-live .kpis > .kpi:not(.next) .s { color: var(--on-bezel-dim); }
html.ui9.page-live .kpis > .kpi:not(.next) .v .good { color: var(--lamp-ok); }
html.ui9.page-live .kpis > .kpi:not(.next) .v .poor { color: color-mix(in srgb, var(--rejected) 50%, var(--on-bezel)); }

html.ui9.page-live .kpis > .kpi.next {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto; align-content: center; column-gap: 12px; align-items: start;
  min-height: var(--v9-band); padding: 8px 13px; border-radius: 0; color: var(--on-bezel); --bi: 4px;
  background-color: var(--bezel-well);
  background-image: linear-gradient(color-mix(in srgb, var(--on-bezel) 3%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--on-bezel) 3%, transparent) 1px, transparent 1px) !important;
  background-size: 12px 12px; background-position: -1px -1px;
  box-shadow: inset 0 1px 3px var(--bezel-well), inset 0 0 0 1px var(--bezel-line);
}
html.ui9.page-live[data-theme="dark"] .kpis > .kpi.next { box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-live .kpi.next .k { grid-column: 1; color: var(--on-bezel-dim); }
html.ui9.page-live .kpis > .kpi.next .v {
  grid-column: 1; margin-top: 4px; font: 500 12.5px/1.3 var(--sans); letter-spacing: 0; color: var(--on-bezel); white-space: normal; overflow: visible; text-overflow: clip;
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: start;
}
html.ui9.page-live .kpi.next .v .act { margin: 0; }
html.ui9.page-live .v9-nn { min-width: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
html.ui9.page-live .kpi.next .s { grid-column: 1; margin-top: 2px; color: var(--on-bezel-dim); font-size: 11.5px; }
html.ui9.page-live .kpi.next .s a { color: inherit; }
/* the countdown: the one big figure on this screen */
html.ui9.page-live .v9-cd {
  grid-column: 2; grid-row: 1 / 4; align-self: center; padding-right: 3px; color: var(--on-bezel); white-space: nowrap;
  font: 450 30px/1 var(--mono); letter-spacing: -.055em; font-variant-numeric: tabular-nums;
}
html.ui9.page-live .v9-cd i { font-size: 15px; font-style: normal; letter-spacing: -.02em; color: var(--hazard); margin-left: 1px; }
html.ui9.page-live .v9-cd i + b { margin-left: 5px; }
html.ui9.page-live .v9-cd b { font-weight: inherit; }

/* status flaps: a split board's two halves, one word */
html.ui9.page-live .act {
  display: inline-grid; place-items: center; min-width: 36px; height: 17px; margin: 0 7px 0 0; padding: 0 5px; border-radius: 3px; vertical-align: 1px;
  font: 600 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
}
html.ui9.page-live :is(#side > .card:first-child, .kpi.next) .act {
  background: linear-gradient(var(--bezel-3) 0 calc(50% - .5px), var(--bezel-well) calc(50% - .5px) calc(50% + .5px), var(--bezel-3) calc(50% + .5px));
  box-shadow: 0 1px 0 var(--bezel-well);
}
html.ui9.page-live :is(#side > .card:first-child, .kpi.next) .act.on { color: var(--lamp-ok); }
html.ui9.page-live :is(#side > .card:first-child, .kpi.next) .act.off { color: color-mix(in srgb, var(--rejected) 50%, var(--on-bezel)); }
html.ui9.page-live :is(#side > .card:first-child, .kpi.next) .act.stop { color: var(--hazard); }

/* ---- the board: Coming up, on ink, stuck under the bar ---- */
html.ui9.page-live .grid { grid-template-columns: minmax(0, 1fr) var(--v9-side); gap: var(--v9-gap); }
html.ui9.page-live #side {
  position: sticky; top: calc(var(--v9-top) + 4px); max-height: calc(100vh - var(--v9-top) - 12px); overflow: hidden auto; border-radius: var(--r-card); scroll-padding: 40px 0 36px;
  scrollbar-width: thin; scrollbar-color: var(--bezel-3) transparent;
}
html.ui9.page-live .card { margin-bottom: var(--v9-gap); overflow: clip; }
html.ui9.page-live #side .card { margin-bottom: 10px; }
html.ui9.page-live #side .card:last-child { margin-bottom: 0; }
html.ui9.page-live #side > .card:first-child { background: var(--v9-ink); border-color: var(--v9-ink); color: var(--on-bezel); overflow: visible; }
html.ui9.page-live[data-theme="dark"] #side > .card:first-child { border-color: var(--bezel-line-2); }
html.ui9.page-live #side > .card:first-child .card-h {
  position: sticky; top: 0; z-index: 3; min-height: 38px; padding: 8px 13px; border-bottom: 1px solid var(--bezel-line); background: var(--v9-ink); border-radius: var(--r-card) var(--r-card) 0 0;
}
html.ui9.page-live .side .card-h .nm { font-size: 14px; font-weight: 600; letter-spacing: -.012em; }
html.ui9.page-live .side .card-h .day { font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--text-dim); }
html.ui9.page-live #side > .card:first-child .card-h .day { color: var(--on-bezel-dim); }
html.ui9.page-live .tl { padding: 0; }
html.ui9.page-live .tl li { grid-template-columns: 58px minmax(0, 1fr); gap: 9px; padding: 7px 13px; border-top: 1px solid var(--hair); }
html.ui9.page-live .tl li:first-child { border-top: 0; }
html.ui9.page-live #side > .card:first-child .tl li { position: relative; border-top-color: var(--bezel-line); }
html.ui9.page-live .tl .t { font: 500 16px/1.1 var(--mono); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
html.ui9.page-live .tl .t small { margin-top: 3px; font: 500 10.5px/1 var(--mono); letter-spacing: -.01em; color: var(--text-dim); }
html.ui9.page-live #side > .card:first-child .tl .t { color: var(--on-bezel); }
html.ui9.page-live #side > .card:first-child .tl .t small { color: var(--on-bezel-dim); }
html.ui9.page-live #side > .card:first-child .tl li:first-child .t { color: var(--hazard); }
html.ui9.page-live .tl .w .o { font-size: 12.5px; font-weight: 500; line-height: 1.35; }
/* the board says which batch goes off, and that sits at the end of the name: it wraps, and a row may be taller because the board scrolls by itself */
html.ui9.page-live #side > .card:first-child .tl .w .o { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--v9-oc); overflow: hidden; }
html.ui9.page-live .tl .w .m { font-size: 11px; line-height: 1.3; color: var(--text-dim); margin-top: 1px; }
html.ui9.page-live #side > .card:first-child .tl .w .m { color: var(--on-bezel-dim); }
/* several changes on one time: one time, one spine */
html.ui9.page-live #side > .card:first-child .tl li.v9-same { border-top-color: transparent; padding-top: 1px; }
html.ui9.page-live #side > .card:first-child .tl li.v9-same .t, html.ui9.page-live #side > .card:first-child .tl li.v9-same .t small { color: transparent; height: 0; overflow: hidden; }
html.ui9.page-live #side > .card:first-child .tl li.v9-same::before {
  content: ""; position: absolute; left: 17px; top: -8px; bottom: 8px; border-left: 1px solid var(--bezel-line-2);
}
html.ui9.page-live .side .foot {
  padding: 8px 13px; border-top: 1px solid var(--hair); font-size: 11.5px; align-items: center;
}
html.ui9.page-live #side > .card:first-child .foot {
  position: sticky; bottom: 0; z-index: 3; color: var(--on-bezel-dim); background: var(--v9-ink); border-top-color: var(--bezel-line); border-radius: 0 0 var(--r-card) var(--r-card);
}
html.ui9.page-live #side > .card:first-child .foot a { color: var(--on-bezel); }
html.ui9.page-live #side > .card:first-child .empty { color: var(--on-bezel-dim); }
/* guards on paper: the result is the point, so it gets two lines */
html.ui9.page-live #side > .card + .card .tl .t { font-size: 10px; }
html.ui9.page-live #side > .card + .card .tl li { grid-template-columns: 42px minmax(0, 1fr); }
html.ui9.page-live #side > .card + .card .card-h { padding: 8px 13px; min-height: 36px; border-bottom-color: var(--hair); }
html.ui9.page-live #side > .card + .card .act { margin: 0; }
html.ui9.page-live #side > .card + .card .act.on { background: var(--live-bg); color: var(--live); }
html.ui9.page-live #side > .card + .card .tl .w .m { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
html.ui9.page-live #side > .card + .card li[data-ux-g="fail"] .w .m { color: var(--rejected); }
html.ui9.page-live #side > .card + .card li[data-ux-g="stop"] .w .m { color: var(--review); }

/* ---- the running list ---- */
html.ui9.page-live #main .card-h { position: sticky; top: var(--v9-top); z-index: 6; min-height: var(--v9-chh); padding: 6px 12px; gap: 8px; background: var(--surface); border-bottom: 1px solid var(--hair); }
html.ui9.page-live #main .card-h .nm { font-size: 14px; font-weight: 600; letter-spacing: -.012em; }
html.ui9.page-live #main .card-h .day { font-size: 11.5px; color: var(--text-dim); }
html.ui9.page-live #main .card-h .tot { font-size: 12px; gap: 12px; align-items: center; }
html.ui9.page-live #main .card-h .tot b { font: 500 13px/1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
html.ui9.page-live table { table-layout: auto; }
html.ui9.page-live th { background: var(--surface); padding-left: 10px; padding-right: 10px; box-shadow: inset 0 -2px 0 var(--v9-rule); }
html.ui9.page-live table td { height: 34px; padding: 3px 10px; font-size: 12.5px; border-top: 0; border-bottom: 1px solid var(--hair); }
html.ui9.page-live tbody tr:last-child td { border-bottom: 0; }
html.ui9.page-live td.cn { min-width: 200px; }
html.ui9.page-live .cname { flex-wrap: wrap; gap: 3px 7px; font-weight: 500; line-height: 1.3; }
html.ui9.page-live .cname a { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
html.ui9.page-live .dot { width: 7px; height: 7px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--live) 18%, transparent); }
html.ui9.page-live .dot.wait { background: var(--text-faint); box-shadow: none; }
/* an account is a heading in the list, not a filled row */
html.ui9.page-live { --v9-acct: var(--surface-2); }
html.ui9.page-live[data-theme="dark"] { --v9-acct: color-mix(in srgb, var(--text) 5%, var(--surface)); }
html.ui9.page-live tr.acct td { height: 30px; padding-top: 2px; padding-bottom: 2px; background: var(--v9-acct); border-top: 0; border-bottom: 1px solid var(--hair); }
html.ui9.page-live tr.acct:hover td { background: var(--v9-acct); }
/* it wraps: a nowrap name here is what once pushed the money columns out of the card */
html.ui9.page-live tr.acct .an { font-weight: 600; overflow-wrap: anywhere; }
html.ui9.page-live tr.acct .aid { color: var(--text-dim); }
html.ui9.page-live tr.acct .man { color: var(--text-dim); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
html.ui9.page-live tr.acct .man:hover { color: var(--text); text-decoration-color: currentColor; }
html.ui9.page-live tr.acct td.num b { font-weight: 500; }
/* chips are facts, not go: ink on paper, mono time */
html.ui9.page-live .chip { gap: 4px; padding: 1px 6px; border-radius: var(--r-cap); font: 500 10.5px/1.45 var(--mono); letter-spacing: -.02em; background: var(--surface-2); color: var(--text-dim); box-shadow: inset 0 0 0 1px var(--line); }
html.ui9.page-live .chip .v9-i { width: 11px; height: 11px; }
html.ui9.page-live .chip.dis { color: var(--text-dim); box-shadow: none; }
html.ui9.page-live .counts { font-size: 11.5px; color: var(--text-dim); }
/* spend bars: orange segments, one part with the rest of the product */
html.ui9.page-live .bar { --trk: var(--gauge-track); height: 8px; border-radius: 0; overflow: visible; transform: skewX(-18deg); background: repeating-linear-gradient(90deg, var(--trk) 0 3px, transparent 3px 5px); }
html.ui9.page-live .bar i { background: repeating-linear-gradient(90deg, var(--led) 0 3px, transparent 3px 5px); }
/* one left edge for every bar, whatever the amount beside it, so the bars can be compared */
html.ui9.page-live .spend { display: grid; grid-template-columns: var(--v9-barw) minmax(10ch, max-content); justify-content: end; align-items: center; column-gap: 10px; text-align: right; }
html.ui9.page-live .bar { width: var(--v9-barw); }
html.ui9.page-live .dim { color: var(--text-dim); }
html.ui9.page-live .stopped { padding: 7px 12px; border-top: 1px solid var(--hair); font-size: 12px; }
html.ui9.page-live .stopped summary { display: flex; align-items: center; gap: 6px; min-height: 22px; list-style: none; font-weight: 500; color: var(--text); }
html.ui9.page-live .stopped summary::-webkit-details-marker { display: none; }
html.ui9.page-live .stopped summary .v9-i { flex: none; width: 14px; height: 14px; color: var(--text-dim); transform: rotate(-90deg); transition: transform var(--t1); }
html.ui9.page-live .stopped[open] summary .v9-i { transform: none; }
html.ui9.page-live .stopped ul { margin: 5px 0 0; padding: 0; list-style: none; }
html.ui9.page-live .stopped li { display: flex; justify-content: space-between; gap: 16px; margin: 0; padding: 4px 0 4px 20px; border-top: 1px solid var(--hair); font-size: 12px; }
html.ui9.page-live .stopped li .dim { flex: none; max-width: 60%; text-align: right; }
html.ui9.page-live .v9-amt { font: 500 12px/1 var(--mono); font-style: normal; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); }
html.ui9.page-live .err { margin: 10px 12px; border-radius: var(--r-key); font-size: 12.5px; }
html.ui9.page-live .empty { padding: 14px 12px; font-size: 12.5px; }
html.ui9.page-live .spin { border-top-color: var(--text); }

/* ---- the slow read: 7 to 17 seconds on the real app. Nothing jumps when it lands. ---- */
html.ui9.page-live #kpis:empty { display: grid; }
html.ui9.page-live #kpis:empty::before, html.ui9.page-live #kpis:empty::after { content: ""; display: block; min-height: var(--v9-band); }
html.ui9.page-live #kpis:empty::before { background: linear-gradient(100deg, transparent 30%, var(--bezel-line) 50%, transparent 70%) 0 0 / 200% 100%, linear-gradient(90deg, transparent calc(100% - 1px), var(--bezel-line) 0) 0 0 / 20% 100%; }
html.ui9.page-live #kpis:empty::after { background: linear-gradient(100deg, transparent 30%, var(--bezel-line) 50%, transparent 70%) 0 0 / 200% 100%, var(--bezel-well); }
/* the board's own rows show while it waits */
html.ui9.page-live #side:empty { min-height: 420px; background: linear-gradient(100deg, transparent 30%, var(--bezel-line) 50%, transparent 70%) 0 0 / 200% 100%, repeating-linear-gradient(0deg, var(--bezel-line) 0 1px, transparent 1px 58px), var(--v9-ink); }
html.ui9.page-live #main .loading { padding: 11px 12px 0; font-size: 12.5px; }
html.ui9.page-live #main .loading::after {
  content: ""; display: block; height: 340px; margin: 11px -12px 0;
  background: linear-gradient(100deg, transparent 30%, var(--hover) 50%, transparent 70%) 0 0 / 200% 100%, repeating-linear-gradient(var(--surface) 0 33px, var(--hair) 33px 34px);
}
@media (prefers-reduced-motion: no-preference) {
  html.ui9.page-live #kpis:empty::before, html.ui9.page-live #kpis:empty::after, html.ui9.page-live #side:empty, html.ui9.page-live #main .loading::after { animation: v9-shimmer 1.6s linear infinite; }
}

/* one strip above the two columns: its hero lines up with the board, and a neck of ink joins the two into an inverted L */
@media (min-width: 1001px) {
  html.ui9.page-live .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)) var(--v9-side); border-bottom-right-radius: 0; }
  html.ui9.page-live .kpis > .kpi.next { grid-column: 6; }
  html.ui9.page-live #kpis:empty::before { grid-column: 1 / 6; }
  html.ui9.page-live #kpis:empty::after { grid-column: 6; }
  html.ui9.page-live .grid { position: relative; }
  html.ui9.page-live .grid::before { content: ""; position: absolute; right: 0; top: calc(-1 * var(--v9-gap)); width: var(--v9-side); height: calc(var(--v9-gap) + var(--r-card)); background: var(--v9-ink); }
  html.ui9.page-live .grid::after {
    content: ""; position: absolute; right: var(--v9-side); top: calc(-1 * var(--v9-gap)); width: var(--r-card); height: var(--r-card);
    background: radial-gradient(circle at 0 100%, transparent calc(var(--r-card) - .5px), var(--v9-ink) var(--r-card));
  }
  /* one line per campaign, so the rows hold steady. The name takes what is left, and the table can never outgrow the card. */
  html.ui9.page-live td.cn { width: 100%; max-width: 0; }
  html.ui9.page-live .cname { flex-wrap: nowrap; }
  html.ui9.page-live .cname a { flex: 1 1 auto; min-width: 72px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.ui9.page-live .cname a:focus-visible { white-space: normal; }
  html.ui9.page-live .cname .chip { flex: none; }
}
/* no hover here, so no title: a touch screen gets the whole name, and only there do rows grow */
@media (min-width: 1001px) and (hover: none) {
  html.ui9.page-live .cname { flex-wrap: wrap; }
  html.ui9.page-live .cname a { flex: 1 1 160px; white-space: normal; overflow-wrap: anywhere; }
}
@media (hover: none) {
  html.ui9.page-live :is(#side > .card:first-child .tl .w .o, .v9-nn) { display: block; -webkit-line-clamp: none; overflow: visible; }
}
/* the head sticks to the page only where the whole table fits */
@media (min-width: 1360px) {
  html.ui9.page-live .tbl { overflow: visible; }
  html.ui9.page-live #main th { position: sticky; top: calc(var(--v9-top) + var(--v9-chh)); z-index: 5; }
}
@media (max-width: 1359px) { html.ui9.page-live #main th { position: static; } }
@media (max-width: 1240px) {
  html.ui9.page-live .kpi .s { white-space: normal; }
  html.ui9.page-live .kpis > .kpi:not(.next) { justify-content: flex-start; }
}
/* the counts give way to the names. They stay in the name's title. */
@media (min-width: 1001px) and (max-width: 1240px) and (hover: hover) {
  html.ui9.page-live #main table :is(th, td):nth-child(2) { display: none; }
}
/* the hero is too narrow for a name beside the countdown: the countdown takes the top line, the name the full width */
@media (min-width: 1001px) and (max-width: 1240px) {
  html.ui9.page-live .kpis > .kpi.next { grid-template-rows: auto auto auto; align-items: center; }
  html.ui9.page-live .kpis > .kpi.next .v, html.ui9.page-live .kpi.next .s { grid-column: 1 / -1; }
  html.ui9.page-live .v9-cd { grid-row: 1; }
  html.ui9.page-live .v9-nn { -webkit-line-clamp: 3; }
}
@media (max-width: 1000px) {
  html.ui9.page-live { scroll-padding-top: calc(var(--shell-h) + 90px); }
  html.ui9.page-live .wrap > .head { flex-wrap: wrap; }
  html.ui9.page-live .head .sub { white-space: normal; }
  html.ui9.page-live .head > div:first-child { flex: 1 1 100%; }
  html.ui9.page-live .head .sp { display: none; }
  html.ui9.page-live .head .input { flex: 1 1 160px; }
  html.ui9.page-live .grid { grid-template-columns: minmax(0, 1fr); }
  /* the page's job comes first: the board moves above the list, the guards stay after it */
  html.ui9.page-live #side { position: static; max-height: none; overflow: visible; order: -1; }
  html.ui9.page-live #side:not(:empty) { display: contents; }
  html.ui9.page-live #side:empty { min-height: 340px; }
  html.ui9.page-live #side > .card:first-child { order: -1; margin-bottom: 0; max-height: 340px; overflow: hidden auto; scroll-padding: 40px 0 36px; scrollbar-width: thin; scrollbar-color: var(--bezel-3) transparent; }
  html.ui9.page-live #side > .card + .card { order: 1; }
  html.ui9.page-live .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  html.ui9.page-live .kpis > .kpi.next { grid-column: 1 / -1; order: -1; }
  html.ui9.page-live #kpis:empty { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-live #kpis:empty::before { display: none; }
  /* the bar wraps here, so the channel head no longer sticks under it */
  html.ui9.page-live #main .card-h { position: static; }
}
@media (max-width: 1100px) { html.ui9.page-live .kpis > .kpi:not(.next) .v { font-size: 14.5px; } }
@media (max-width: 760px) {
  html.ui9.page-live { scroll-padding-top: calc(var(--shell-h) + 8px); }
  html.ui9.page-live .spend { display: block; }
  html.ui9.page-live .bar { display: none; }
  html.ui9.page-live .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  html.ui9.page-live .kpis > .kpi:not(.next) { grid-column: span 2; }
  html.ui9.page-live .kpis > .kpi:nth-child(n+4):not(.next) { grid-column: span 3; }
}
@media (max-width: 640px) {
  html.ui9.page-live .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.ui9.page-live .kpis > .kpi:not(.next), html.ui9.page-live .kpis > .kpi:nth-child(n+4):not(.next) { grid-column: auto; }
  html.ui9.page-live .kpis > .kpi:nth-child(5) { grid-column: 1 / -1; }
  html.ui9.page-live .head .input { order: 3; flex: 1 1 100%; width: 100%; }
  html.ui9.page-live #refresh { margin-left: auto; }
  html.ui9.page-live .kpis > .kpi .v { font-size: 15px; }
  html.ui9.page-live td.cn { min-width: 0; }
  html.ui9.page-live .cname a { flex-basis: 120px; }
  html.ui9.page-live table td, html.ui9.page-live th { padding-left: 8px; padding-right: 8px; }
  /* the coloured verdict stays on the phone */
  html.ui9.page-live #main table :is(th, td):nth-child(6) { display: table-cell; }
  html.ui9.page-live .v9-cd { font-size: 26px; }
}

/* ====================== DAILY: the morning paper ====================== */
html.ui9.page-nbdaily {
  --v9-top: calc(var(--shell-h) + var(--bar-h)); --v9-dt-h: 37px; --v9-rule: var(--text); --v9-tail: 28px;
  scroll-padding-top: calc(var(--v9-top) + var(--v9-dt-h) + 31px);
}
html.ui9.page-nbdaily[data-theme="dark"] { --v9-rule: color-mix(in srgb, var(--text) 55%, transparent); }

/* the sheet waits for its chrome, so nothing jumps. If ui9.js never arrives the page shows itself after 3s. */
@keyframes v9-dhold { from, to { visibility: hidden; } }
html.ui9.page-nbdaily:not(.v9-dtabs) .wrap > * { animation: v9-dhold 3s step-end; }
html.ui9.page-nbdaily:not(.v9-dtabs) .kpis:empty { display: none; }
html.ui9.page-nbdaily:not(.v9-dtabs) .tbl:has(table:empty) { min-height: 0; }
@media (min-width: 1101px) { html.ui9.page-nbdaily:not(.v9-dtabs) .wrap { padding-top: 130px; } }   /* holds the place of the masthead and tabs while hidden */

/* ---- the bar: one joined day stepper ---- */
html.ui9.page-nbdaily #prev, html.ui9.page-nbdaily #next { min-width: 30px; min-height: 32px; padding: 0 8px; font-size: 15px; font-family: var(--mono); box-shadow: inset 0 0 0 1px var(--line); }
html.ui9.page-nbdaily #refetch { min-height: 32px; }
html.ui9.page-nbdaily #prev { border-radius: var(--r-key) 0 0 var(--r-key); margin-right: -8px; position: relative; z-index: 1; }
html.ui9.page-nbdaily #fDay { border-radius: 0; font-family: var(--mono); font-size: 12.5px; letter-spacing: -.02em; padding-left: 10px; padding-right: 8px; }
html.ui9.page-nbdaily #next { border-radius: 0 var(--r-key) var(--r-key) 0; margin-left: -8px; position: relative; z-index: 1; }
html.ui9.page-nbdaily #fDay:focus-visible, html.ui9.page-nbdaily #prev:focus-visible, html.ui9.page-nbdaily #next:focus-visible { z-index: 2; position: relative; }
/* the page sets the date and its limit when the first status lands: a set width keeps the bar still */
@media (min-width: 761px) { html.ui9.page-nbdaily #fDay { flex: none; width: 128px; } }
/* fields are 16px here, so the date needs more room beside the calendar icon */
@media (min-width: 761px) and (max-width: 860px) { html.ui9.page-nbdaily #fDay { width: 150px; } }
/* the options arrive with the report: a set width keeps the bar still */
@media (min-width: 1001px) { html.ui9.page-nbdaily #fVert { flex: none; width: 190px; } }
@media (max-width: 1000px) { html.ui9.page-nbdaily #fVert { flex: 1 1 160px; min-width: 0; } }
/* gives back the 22px the date took, so Reload wraps no sooner than it did */
@media (min-width: 761px) and (max-width: 860px) { html.ui9.page-nbdaily #fVert { flex-basis: 138px; } }

/* ---- the masthead: the date as the headline, the verdict under it ---- */
html.ui9.page-nbdaily .v9-mast {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 4px 28px; align-items: end; padding: 7px 2px 9px; margin-bottom: 8px;
  border-bottom: 3px double var(--v9-rule);
}
html.ui9.page-nbdaily .v9-mast-k { display: flex; align-items: center; gap: 6px; min-height: 14px; color: var(--text-dim); }
html.ui9.page-nbdaily .v9-mast-k .v9-lg { width: 13px; height: 13px; border-radius: 3px; }
html.ui9.page-nbdaily .v9-mast-d { margin: 3px 0 1px; font: 600 25px/1.15 var(--sans) !important; letter-spacing: -.025em; color: var(--text); min-height: 29px; }
html.ui9.page-nbdaily .v9-mast-v { margin: 0; min-height: 19px; font-size: 13px; line-height: 1.45; color: var(--text); text-wrap: pretty; }
html.ui9.page-nbdaily .v9-mast-v b { font-weight: 600; }
html.ui9.page-nbdaily .v9-mast-v b.up { color: var(--live); }
html.ui9.page-nbdaily .v9-mast-v b.dn { color: var(--rejected); }
/* a failed read: no blank verdict row above the rule. While reading, the row keeps its place. */
html.ui9.page-nbdaily:has(#ins > li.i-bad) :is(.v9-mast-d, .v9-mast-v):empty { display: none; }
html.ui9.page-nbdaily .v9-mast-v em { font: 500 12.5px/1 var(--mono); font-style: normal; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
html.ui9.page-nbdaily .v9-mast-r { display: grid; gap: 0; min-width: 0; align-self: end; }
/* room for two leads of two lines, so a day with shorter ones moves nothing */
@media (min-width: 1101px) { html.ui9.page-nbdaily:not(:has(#kpis:empty):has(#ins > li.i-bad)):not(.v9-dnone) .v9-mast-r { min-height: 86px; } }
html.ui9.page-nbdaily .v9-lead {
  display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 8px; align-items: baseline; width: 100%; min-width: 0; padding: 4px 0; border: 0; background: none; color: var(--text);
  font: 400 12.5px/1.35 var(--sans); text-align: left; cursor: pointer; border-top: 1px solid var(--hair);
}
html.ui9.page-nbdaily .v9-lead:first-child { border-top: 0; }
html.ui9.page-nbdaily .v9-lead b { font: 500 10px/1.3 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--live); white-space: nowrap; }
html.ui9.page-nbdaily .v9-lead[data-ux-lead="bad"] b { color: var(--rejected); }
html.ui9.page-nbdaily .v9-lead span { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
html.ui9.page-nbdaily .v9-lead:hover span { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
/* a new day is being read: the date and the numbers under it change together, and until then they all read as old */
html.ui9.page-nbdaily :is(.v9-mast-d, .v9-mast-v, .v9-mast-r, .kpis, .tbl) { transition: opacity var(--t1); }
html.ui9.page-nbdaily:has(#ins .spin):has(#kpis:not(:empty)) :is(.v9-mast-d, .v9-mast-v, .v9-mast-r, .kpis, .tbl) { opacity: .45; }

/* ---- status: small print under the masthead. It stays: it shows the fetch progress. ---- */
html.ui9.page-nbdaily .status { min-height: 18px; padding: 0 2px 8px; gap: 2px 14px; font-size: 11.5px; line-height: 1.35; color: var(--text-dim); }
html.ui9.page-nbdaily .status b { color: var(--text-dim); font-weight: 600; }
/* one line when nothing is happening. A run in progress or a problem keeps all the room it needs. */
@media (min-width: 1101px) {
  html.ui9.page-nbdaily #status:not(:has(.spin, .dot.err)) { flex-wrap: nowrap; }
  html.ui9.page-nbdaily #status:not(:has(.spin, .dot.err)) > span { flex: none; white-space: nowrap; }
  html.ui9.page-nbdaily #status:not(:has(.spin, .dot.err)) > span:nth-child(2) { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
html.ui9.page-nbdaily .dot { width: 7px; height: 7px; }
html.ui9.page-nbdaily .spin { border-top-color: var(--text); }

/* ---- readout band ---- */
/* no box: newspaper columns under the masthead, closed by one rule */
html.ui9.page-nbdaily .kpis { min-height: 63px; margin-bottom: 10px; background: none; border: 0; border-bottom: 1px solid var(--v9-rule); border-radius: 0; box-shadow: none; }
html.ui9.page-nbdaily .kpis > .kpi { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; min-height: 56px; padding: 6px 12px; }
html.ui9.page-nbdaily .kpis > .kpi:first-child { padding-left: 2px; }
html.ui9.page-nbdaily .kpis > .kpi .v { font-size: 16px; line-height: 1.25; }
html.ui9.page-nbdaily .kpi .s { font-size: 11.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-nbdaily .kpi .s:empty::before { content: "\00a0"; }
html.ui9.page-nbdaily .kpis > .kpi.lo .v { color: var(--rejected); }
html.ui9.page-nbdaily .kpis > .kpi.hi .v { color: var(--live); }
html.ui9.page-nbdaily.v9-dnone .kpis > .kpi.hi .v { color: var(--text); }
/* until the first read lands the band is a skeleton. Only a real failure takes it away. */
html.ui9.page-nbdaily:has(#ins > li.i-bad) .kpis:empty { display: none; }
html.ui9.page-nbdaily .kpis:empty { display: block; background: linear-gradient(100deg, transparent 30%, var(--hover) 50%, transparent 70%) 0 0 / 200% 100%; }
@media (prefers-reduced-motion: no-preference) {
  html.ui9.page-nbdaily:not(:has(#ins > li.i-bad)) .kpis:empty { animation: v9-shimmer 1.6s linear infinite; }
}

/* ---- cards ---- */
html.ui9.page-nbdaily .card { margin-bottom: 12px; overflow: clip; }
html.ui9.page-nbdaily .card > header { padding: 9px 12px; gap: 8px; }
html.ui9.page-nbdaily .card > header .sub { font-size: 11.5px; color: var(--text-dim); }

/* day by day */
html.ui9.page-nbdaily .trend { height: 84px; gap: 3px; padding: 8px 12px 5px; }
/* stacked segments, the same part as every other real quantity here */
html.ui9.page-nbdaily .trend .bar {
  max-width: 26px; border-radius: 0; background: color-mix(in srgb, var(--text-dim) 40%, transparent);
  -webkit-mask: repeating-linear-gradient(0deg, #000 0 3px, transparent 3px 5px); mask: repeating-linear-gradient(0deg, #000 0 3px, transparent 3px 5px);
}
html.ui9.page-nbdaily .trend .bar.cheap { background: color-mix(in srgb, var(--live) 75%, transparent); }
html.ui9.page-nbdaily .trend .bar.dear { background: color-mix(in srgb, var(--review) 75%, transparent); }
html.ui9.page-nbdaily .trend .bar.none { background: color-mix(in srgb, var(--rejected) 65%, transparent); }
html.ui9.page-nbdaily .trend .d b { font: 500 10.5px/1 var(--mono); letter-spacing: -.03em; }
html.ui9.page-nbdaily .trend .d span { font: 500 10px/1 var(--mono); letter-spacing: -.02em; color: var(--text-dim); }
html.ui9.page-nbdaily .trend .d { border-radius: 4px; }
html.ui9.page-nbdaily .trend .d:hover b { color: var(--text); }

/* ---- the section tabs: paper tabs seated on the card below ---- */
html.ui9.page-nbdaily .v9-dpin { display: block; height: 0; }
html.ui9.page-nbdaily .v9-dbar {
  position: sticky; top: var(--v9-top); z-index: 20; display: flex; align-items: flex-end; gap: 2px; height: var(--v9-dt-h); margin-bottom: -1px; padding: 3px 0 0;
  background: var(--bg); box-shadow: inset 0 -1px 0 var(--line);
}
html.ui9.page-nbdaily .v9-dbar button {
  display: inline-flex; align-items: baseline; gap: 6px; height: 34px; padding: 8px 12px 0; border: 0; border-radius: 8px 8px 0 0; background: none; color: var(--text-dim); white-space: nowrap; cursor: pointer;
  font: 500 13px/1.2 var(--sans); transition: background var(--t1), color var(--t1);
}
html.ui9.page-nbdaily .v9-dbar button:hover { color: var(--text); background: var(--hover); }
html.ui9.page-nbdaily .v9-dbar button[aria-selected="true"] { position: relative; background: var(--surface); color: var(--text); font-weight: 600; box-shadow: inset 0 1px 0 var(--line), inset 1px 0 0 var(--line), inset -1px 0 0 var(--line); }
html.ui9.page-nbdaily .v9-dbar button b { font: 500 13px/1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
html.ui9.page-nbdaily .v9-dbar button small { font: 500 11px/1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text-dim); }
html.ui9.page-nbdaily .v9-dbar-read { margin-left: auto; align-self: center; padding-right: 2px; font-size: 11.5px; color: var(--text-dim); display: none; white-space: nowrap; }
html.ui9.page-nbdaily:has(#ins .spin) .v9-dbar-read { display: inline-flex; align-items: center; gap: 6px; }
html.ui9.page-nbdaily .v9-dbar-read .spin { width: 12px; height: 12px; }

/* the tabs hide sibling cards. The nodes stay where they are. */
html.ui9.page-nbdaily.v9-dtabs .card:has(#tConv) > header, html.ui9.page-nbdaily.v9-dtabs .card:has(#tDead) > header { display: none; }
html.ui9.page-nbdaily.v9-dtabs .card:is(:has(#ins), :has(#tConv), :has(#tDead), :has(#tCut)) { border-top-left-radius: 0; border-top-right-radius: 0; }
html.ui9.page-nbdaily.v9-dtabs[data-ux-dtab="conv"] .card:is(:has(#ins), :has(#tDead), :has(#tCut)),
html.ui9.page-nbdaily.v9-dtabs[data-ux-dtab="dead"] .card:is(:has(#ins), :has(#tConv), :has(#tCut)),
html.ui9.page-nbdaily.v9-dtabs[data-ux-dtab="work"] .card:is(:has(#tConv), :has(#tDead)) { display: none; }
html.ui9.page-nbdaily.v9-dtabs[data-ux-dtab="work"] .card:has(#tCut) { border-top-left-radius: var(--r-card); border-top-right-radius: var(--r-card); }
/* a failed read lands in #ins and empties the rest, and an empty day has nothing to sort: whatever the tab, #ins says what happened */
html.ui9.page-nbdaily.v9-dtabs:is(:has(#kpis:empty):has(#ins > li.i-bad), .v9-dnone) .card:has(#ins) { display: block; border-radius: var(--r-card); }
html.ui9.page-nbdaily.v9-dtabs:is(:has(#kpis:empty):has(#ins > li.i-bad), .v9-dnone) .card:has(#ins) > header { display: none; }
html.ui9.page-nbdaily.v9-dtabs:is(:has(#kpis:empty):has(#ins > li.i-bad), .v9-dnone) .card:is(:has(#tConv), :has(#tDead), :has(#tCut)) { display: none; }
html.ui9.page-nbdaily.v9-dtabs:is(:has(#kpis:empty):has(#ins > li.i-bad), .v9-dnone) .v9-dbar { display: none; }

/* ---- what the numbers say: two lanes ---- */
html.ui9.page-nbdaily .ins { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-flow: row dense; gap: 0 28px; padding: 6px 12px 10px; align-items: start; }
html.ui9.page-nbdaily .ins::before, html.ui9.page-nbdaily .ins::after { grid-row: 1; padding: 6px 0 7px; font: 500 10px/1.2 var(--mono); letter-spacing: .085em; text-transform: uppercase; box-shadow: inset 0 -2px 0 currentColor; }
html.ui9.page-nbdaily .ins::before { content: "Working " attr(data-ux-good); grid-column: 1; color: var(--live); }
html.ui9.page-nbdaily .ins::after { content: "Costing you " attr(data-ux-bad); grid-column: 2; color: var(--rejected); }
html.ui9.page-nbdaily .ins:has(> li.muted)::before, html.ui9.page-nbdaily .ins:has(> li.muted)::after,
html.ui9.page-nbdaily:has(#kpis:empty) .ins::before, html.ui9.page-nbdaily:has(#kpis:empty) .ins::after { content: none; }
/* nothing good to say: the one lane takes the whole width */
html.ui9.page-nbdaily .ins:not(:has(> li.i-good, > li.i-info))::before { content: none; }
html.ui9.page-nbdaily .ins:not(:has(> li.i-good, > li.i-info))::after { grid-column: 1 / -1; }
html.ui9.page-nbdaily .ins:not(:has(> li.i-good, > li.i-info)) > li.i-bad { grid-column: 1 / -1; }
html.ui9.page-nbdaily .ins li { position: relative; padding: 6px 0 6px; border-left: 0; border-radius: 0; background: none; border-bottom: 1px solid var(--hair); font-size: 12.5px; line-height: 1.4; }
html.ui9.page-nbdaily .ins li.i-good, html.ui9.page-nbdaily .ins li.i-info { grid-column: 1; }
html.ui9.page-nbdaily .ins li.i-bad { grid-column: 2; }
html.ui9.page-nbdaily .ins li.i-info { color: var(--text-dim); }
html.ui9.page-nbdaily .ins li.muted { grid-column: 1 / -1; border-bottom: 0; }
/* the same error box as Live */
html.ui9.page-nbdaily:has(#kpis:empty) .ins li.i-bad { grid-column: 1 / -1; margin: 4px 0; padding: 12px 14px; border: 0; border-radius: var(--r-key); background: var(--rejected-bg); color: var(--rejected); }
html.ui9.page-nbdaily .v9-ik { font-weight: 600; color: var(--text); }

/* ---- tables: Fits 1406 by narrowing .nm, .copy, .wv ---- */
html.ui9.page-nbdaily .tbl th { background: var(--surface); padding-left: 6px; padding-right: 6px; }
html.ui9.page-nbdaily .tbl th[data-k]:hover { color: var(--text); }
html.ui9.page-nbdaily .tbl th.on { color: var(--text); }
html.ui9.page-nbdaily .tbl table td { height: 40px; padding: 4px 6px; font-size: 12.5px; }
html.ui9.page-nbdaily .tbl td.empty { padding: 14px 12px; color: var(--text-dim); text-align: left; }
html.ui9.page-nbdaily .tbl tbody tr:hover td { background: var(--hover); }
html.ui9.page-nbdaily .nm a:hover, html.ui9.page-nbdaily .path a.acct:hover { color: var(--text); }
html.ui9.page-nbdaily .tbl:has(table:empty) { min-height: 200px; background: linear-gradient(100deg, transparent 30%, var(--hover) 50%, transparent 70%) 0 0 / 200% 100%, repeating-linear-gradient(var(--surface) 0 47px, var(--hair) 47px 48px); }
html.ui9.page-nbdaily:has(#ins > li.i-bad) .tbl:has(table:empty) { min-height: 0; background: none; }
@media (prefers-reduced-motion: no-preference) {
  html.ui9.page-nbdaily:not(:has(#ins > li.i-bad)) .tbl:has(table:empty) { animation: v9-shimmer 1.6s linear infinite; }
}
html.ui9.page-nbdaily :is(#tConv, #tDead) tr > :is(th, td):first-child { width: 54px; min-width: 54px; }
html.ui9.page-nbdaily .thumb { width: 38px; height: 38px; max-width: none; border-radius: 6px; }
html.ui9.page-nbdaily .nm { font-size: 12.5px; font-weight: 500; }
html.ui9.page-nbdaily :is(#tConv, #tDead) :is(.nm, .path) { max-width: 205px; }
html.ui9.page-nbdaily .path { font-size: 11px; color: var(--text-dim); }
html.ui9.page-nbdaily .copy { font-size: 12px; }
html.ui9.page-nbdaily .copy div { max-width: 112px; }
html.ui9.page-nbdaily .copy .d { font-size: 11px; color: var(--text-dim); }
html.ui9.page-nbdaily .tag { display: inline-block; font: 500 10.5px/1.45 var(--sans); padding: 0 5px; margin: 0 2px 1px 0; color: var(--text-dim); }
html.ui9.page-nbdaily .pill { padding: 1px 6px; font: 600 10.5px/1.45 var(--sans); }
/* verdicts are coloured words, on one line each. That day is the one filled pill, and the three start level. */
html.ui9.page-nbdaily .wv { min-width: 146px; }
html.ui9.page-nbdaily .tbl td.wv, html.ui9.page-nbdaily .tbl td:has(> .pill) { vertical-align: top; padding-top: 4px; }
html.ui9.page-nbdaily .wv .pill { padding: 0; background: none; box-shadow: none; font: 600 10.5px/1.3 var(--sans); }
html.ui9.page-nbdaily .wv small { max-width: none; white-space: nowrap; font: 400 10.5px/1.3 var(--sans); font-variant-numeric: tabular-nums; color: var(--text-dim); margin-top: 2px; }
html.ui9.page-nbdaily .muted { color: var(--text-dim); }
html.ui9.page-nbdaily .note { padding: 8px 12px 10px; font-size: 11.5px; color: var(--text-dim); border-radius: 0; }
html.ui9.page-nbdaily .share { width: 76px; height: 8px; border-radius: 0; background: repeating-linear-gradient(90deg, var(--gauge-track) 0 3px, transparent 3px 5px); transform: skewX(-18deg); }
html.ui9.page-nbdaily .share i { border-radius: 0; background: repeating-linear-gradient(90deg, var(--text) 0 3px, transparent 3px 5px); }
html.ui9.page-nbdaily #cutSeg { flex-wrap: wrap; }
html.ui9.page-nbdaily #cutSeg button { padding: 0 8px; }
html.ui9.page-nbdaily #pv { border-radius: var(--r-card); z-index: 100; }

/* Pause and Start: the .sw family. The switch shows what the ad is doing now, the word what pressing does. */
html.ui9.page-nbdaily td.act { position: relative; min-width: 108px; }
html.ui9.page-nbdaily .act .st { margin-bottom: 2px; font-size: 10.5px; line-height: 1.2; color: var(--text-dim); max-width: none; white-space: nowrap; }
/* on is already the green switch: the word stays for screen readers. Every other state keeps it. */
html.ui9.page-nbdaily .act .st.on { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); }
html.ui9.page-nbdaily .act button {
  display: inline-flex; align-items: center; gap: 5px; min-height: 21px; margin: 0 3px 0 0; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--text-dim);
  font: 500 11.5px/1 var(--sans);
}
html.ui9.page-nbdaily .act button::after {
  content: ""; order: -1; flex: none; width: 34px; height: 19px; border-radius: 999px; transition: background-color var(--t1);
  background-repeat: no-repeat; background-size: 15px 15px; background-color: var(--line-strong); background-position: 2px 2px;
  background-image: radial-gradient(circle at 50% 50%, var(--on-bezel) 7px, transparent 7.5px);
}
html.ui9.page-nbdaily .act button.pause::after { background-color: var(--live); background-position: 17px 2px; }
/* one live mark on the column head, as the .sw has none in the mocks: 34 orange dots would shout. Every control still says it in its title. */
html.ui9.page-nbdaily .act button::before { content: none; }
html.ui9.page-nbdaily .tbl th { box-shadow: inset 0 -2px 0 var(--v9-rule); }
html.ui9.page-nbdaily th[data-k="status"]::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; background: var(--led); box-shadow: 0 0 0 2px var(--led-soft);
}
html.ui9.page-nbdaily .act button:hover { color: var(--text); }
html.ui9.page-nbdaily .act button.pause:hover { color: var(--rejected); border: 0; }
html.ui9.page-nbdaily .act button.pause:hover::after { background-color: var(--rejected); }
html.ui9.page-nbdaily .act button.start:hover { color: var(--live); border: 0; }
html.ui9.page-nbdaily .act button.start:hover::after { box-shadow: inset 0 0 0 1px var(--live); }
html.ui9.page-nbdaily .act button:disabled { opacity: .5; cursor: progress; }
/* status not read yet: both words, no claim about the state */
html.ui9.page-nbdaily .act:has(> .pause + .start) button::after { display: none; }
html.ui9.page-nbdaily .act:has(> .pause + .start) button { padding: 0 5px; border-radius: var(--r-cap); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
/* a known role with no launch rights: the server would refuse, so the switch shows the state and takes no press. An unknown role keeps the real control. */
html.ui9.page-nbdaily .act button[aria-disabled="true"] { pointer-events: none; opacity: .5; }
html.ui9.page-nbdaily td.act:has(button[aria-disabled="true"]) { cursor: not-allowed; }

/* the whole table fits: the page scrolls, and the head sticks under the tabs */
@media (min-width: 1400px) {
  html.ui9.page-nbdaily .tbl { overflow: visible; max-height: none !important; }
  html.ui9.page-nbdaily .tbl th { top: calc(var(--v9-top) + var(--v9-dt-h)); z-index: 5; }
  /* nothing scrolls sideways up here, so the text columns give way to the figures: the table can never outgrow the card */
  html.ui9.page-nbdaily :is(#tConv, #tDead) tr > td:nth-child(2) { width: 18%; min-width: 150px; max-width: 0; }
  html.ui9.page-nbdaily :is(#tConv, #tDead) td.copy { width: 12%; min-width: 96px; max-width: 0; }
  html.ui9.page-nbdaily :is(#tConv, #tDead) :is(.nm, .path), html.ui9.page-nbdaily .copy div { max-width: none; }
  html.ui9.page-nbdaily #tCut tr > td:first-child { width: 100%; min-width: 150px; max-width: 0; }
  html.ui9.page-nbdaily #tCut .nm { max-width: none !important; }
}
/* it no longer fits: the table scrolls in its own box, thumb and name stay put */
@media (max-width: 1399px) {
  /* the box ends where the page's scroll ends, so the head can never slide under the tabs while rows still show */
  html.ui9.page-nbdaily .tbl { overflow: auto; max-height: calc(100vh - var(--v9-top) - var(--v9-dt-h) - var(--v9-tail)) !important; scroll-padding: 34px 0 0 270px; }
  html.ui9.page-nbdaily.v9-dtabs[data-ux-dtab="work"] { --v9-tail: 120px; }
  html.ui9.page-nbdaily .wrap { padding-bottom: 14px; }
  html.ui9.page-nbdaily :is(#tConv, #tDead) tr > :is(th, td):nth-child(1) { position: sticky; left: 0; z-index: 1; width: 54px; min-width: 54px; background: var(--surface); }
  html.ui9.page-nbdaily :is(#tConv, #tDead) tr > :is(th, td):nth-child(2) { position: sticky; left: 54px; z-index: 1; background: var(--surface); box-shadow: inset -1px 0 0 var(--line); }
  html.ui9.page-nbdaily :is(#tConv, #tDead) tbody tr:hover > td:nth-child(-n+2) { background: color-mix(in srgb, var(--text) 4%, var(--surface)); }
  html.ui9.page-nbdaily :is(#tConv, #tDead) thead tr > th:nth-child(-n+2) { z-index: 4; }
  html.ui9.page-nbdaily :is(#tConv, #tDead) thead tr > th:nth-child(2) { box-shadow: inset -1px 0 0 var(--line), inset 0 -2px 0 var(--v9-rule); }
}
@media (max-width: 1100px) {
  html.ui9.page-nbdaily .v9-mast { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-nbdaily .topbar .spacer { flex-basis: 0; }
  html.ui9.page-nbdaily .ins { gap: 0 18px; }
}
/* a table that scrolls sideways says so: the far edge fades until the end is reached */
@supports (animation-timeline: scroll(self inline)) {
  @keyframes v9-dedge { 0%, 98% { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); } 100% { -webkit-mask-image: none; mask-image: none; } }
  @media (max-width: 1399px) { html.ui9.page-nbdaily .tbl { animation: v9-dedge linear both; animation-timeline: scroll(self inline); } }
  @media (max-width: 760px) { html.ui9.page-nbdaily .v9-dbar { animation: v9-dedge linear both; animation-timeline: scroll(self inline); } }
}
@supports not (animation-timeline: scroll(self inline)) {
  @media (max-width: 760px) { html.ui9.page-nbdaily .v9-dbar { -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); } }
}
/* the bar wraps from here down: the tabs stop sticking, and money sits beside the name */
@media (max-width: 1000px) {
  html.ui9.page-nbdaily .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html.ui9.page-nbdaily .kpis > .kpi:nth-child(4) { padding-left: 2px; }
}
@media (max-width: 860px) {
  html.ui9.page-nbdaily { scroll-padding-top: calc(var(--shell-h) + 100px); }
  html.ui9.page-nbdaily .v9-dbar { position: static; }
  html.ui9.page-nbdaily .tbl { max-height: none !important; overflow-x: auto; }
  html.ui9.page-nbdaily :is(#tConv, #tDead) tr > :is(th, td):is(:nth-child(4), :nth-child(5)) { display: none; }
  html.ui9.page-nbdaily td.act { min-width: 0; }
  html.ui9.page-nbdaily .act button { position: relative; }
  html.ui9.page-nbdaily .act button::before { content: ""; position: absolute; inset: -12px -6px; width: auto; height: auto; margin: 0; border-radius: 0; background: none; box-shadow: none; }
}
@media (max-width: 760px) {
  html.ui9.page-nbdaily { scroll-padding-top: calc(var(--shell-h) + 8px); }
  html.ui9.page-nbdaily .v9-dbar { overflow-x: auto; scrollbar-width: none; }
  html.ui9.page-nbdaily .v9-dbar button { padding-left: 8px; padding-right: 8px; flex: none; }
  html.ui9.page-nbdaily .v9-mast-d { font-size: 22px; }
  html.ui9.page-nbdaily :is(#tConv, #tDead) :is(.nm, .path) { max-width: 128px; }
  html.ui9.page-nbdaily .ins { grid-template-columns: minmax(0, 1fr); padding-top: 2px; }
  html.ui9.page-nbdaily .ins::before, html.ui9.page-nbdaily .ins::after { grid-column: 1; grid-row: auto; }
  html.ui9.page-nbdaily .ins::before { order: 0; }
  html.ui9.page-nbdaily .ins li.i-good, html.ui9.page-nbdaily .ins li.i-info { grid-column: 1; order: 1; }
  html.ui9.page-nbdaily .ins::after { order: 2; margin-top: 8px; }
  html.ui9.page-nbdaily .ins li.i-bad { grid-column: 1; order: 3; }
  html.ui9.page-nbdaily .topbar .brand { flex: 1 1 100%; }
  html.ui9.page-nbdaily .topbar .spacer { display: none; }
  html.ui9.page-nbdaily #fDay { flex: 1 1 120px; min-width: 150px; width: auto; }
  html.ui9.page-nbdaily #fRange { flex: 1 1 110px; min-width: 0; }
  html.ui9.page-nbdaily #fVert { flex: 1 1 150px; min-width: 0; max-width: none !important; }
}
/* a small phone: the arrows stay beside the date, so it gives up the calendar icon, which a tap on the field replaces */
@media (max-width: 389px) {
  html.ui9.page-nbdaily #fDay { min-width: 0; padding-left: 6px; padding-right: 4px; }
  html.ui9.page-nbdaily #fDay::-webkit-calendar-picker-indicator { display: none; }
}
/* the phone: the band and What's working already hold these lines, so the first ad comes up */
@media (max-width: 640px) {
  html.ui9.page-nbdaily .v9-mast-r { display: none; }
  html.ui9.page-nbdaily .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.ui9.page-nbdaily .kpis > .kpi:nth-child(4) { padding-left: 12px; }
  html.ui9.page-nbdaily .kpis > .kpi:nth-child(odd) { padding-left: 2px; }
  html.ui9.page-nbdaily #status > span:nth-child(2) { display: none; }
  html.ui9.page-nbdaily #status > span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.ui9.page-nbdaily #status > span:has(.spin, .dot.err) { white-space: normal; }
  /* the name, then the money: the switch keeps its state and its full name for screen readers, and gives up the word */
  html.ui9.page-nbdaily :is(#tConv, #tDead) tr > :is(th, td) { padding-left: 4px; padding-right: 4px; }
  html.ui9.page-nbdaily :is(#tConv, #tDead) tr > :is(th, td):nth-child(1) { width: 42px; min-width: 42px; }
  html.ui9.page-nbdaily :is(#tConv, #tDead) tr > :is(th, td):nth-child(2) { left: 42px; }
  html.ui9.page-nbdaily .thumb { width: 34px; height: 34px; }
  html.ui9.page-nbdaily :is(#tConv, #tDead) :is(.nm, .path) { max-width: 96px; }
  html.ui9.page-nbdaily .act .st { max-width: 56px; white-space: normal; }
  html.ui9.page-nbdaily .act button { width: 44px; min-height: 32px; margin: 0; gap: 12px; overflow: hidden; }
  html.ui9.page-nbdaily .act button::before { content: none; }
  html.ui9.page-nbdaily .act:has(> .pause + .start) button { display: flex; width: auto; min-height: 21px; margin-top: 2px; gap: 5px; }
}

/* ===== 33-score-states.css ===== */
/* =====================================================================
   33 Scoreboard, States, ClickFlare (DESIGN.md 4.8, 4.9, 4.22).
   Three screens, three compositions: a league table, an atlas, a wire room.
   ===================================================================== */

/* ---- shared by the three ------------------------------------------- */
html.ui9:is(.page-score, .page-states, .page-clickflare) .wrap { max-width: none; padding-bottom: 40px; }   /* filters, band and table share one right edge at any width */
html.ui9:is(.page-score, .page-states, .page-clickflare) th.on { color: var(--accent-text); }
html.ui9:is(.page-score, .page-clickflare) th[data-k] { cursor: pointer; }
html.ui9:is(.page-score, .page-clickflare) th[data-k]:focus-visible { outline-offset: -3px; }
html.ui9:is(.page-score, .page-states, .page-clickflare) table th:not([data-k]) { cursor: default; }
html.ui9:is(.page-score, .page-states, .page-clickflare) .empty { font-size: 13px; color: var(--text-dim); }
html.ui9:is(.page-score, .page-states, .page-clickflare) .spin { border-color: var(--line-strong); border-top-color: var(--accent); }

/* =====================================================================
   Scoreboard: the league table
   ===================================================================== */
html.ui9.page-score { --bar-h: 50px; }

/* band, one line, table. Grid placement only: nothing moves. */
html.ui9.page-score .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; }
html.ui9.page-score #tiles { grid-column: 1 / -1; grid-row: 1; margin: 0; }
html.ui9.page-score #verdictBar { grid-column: 1; grid-row: 2; }
html.ui9.page-score #asof { grid-column: 2; grid-row: 2; min-width: 0; margin: 0; align-self: center; font-size: 11.5px; color: var(--text-dim); }
html.ui9.page-score .wrap.v9-asof-on #asof { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html.ui9.page-score .wrap > .card { grid-column: 1 / -1; grid-row: 3; }
html.ui9.page-score .wrap > .v9-asof { grid-column: 2; grid-row: 2; }
/* nothing has synced: the page's own sentence is the instruction, so it gets a line of its own */
html.ui9.page-score .wrap.v9-asof-none #asof { grid-column: 1 / -1; grid-row: 3; margin: 0 2px 8px; font-size: 12px; }
html.ui9.page-score .wrap.v9-asof-none #asof:empty { display: none; }
html.ui9.page-score .wrap.v9-asof-none > .card { grid-row: 4; }

/* the band: 44px, winners green, losers red */
html.ui9.page-score .stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); padding-bottom: 6px; }
html.ui9.page-score .stats > .stat { min-height: 38px; padding: 3px 12px 2px; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
html.ui9.page-score .stats > .stat b { line-height: 1.2; }
html.ui9.page-score .stats > .stat span { line-height: 1.2; color: var(--text-dim); }
html.ui9.page-score .stats > .stat:nth-child(2) b { color: var(--live); }
html.ui9.page-score .stats > .stat:nth-child(3) b { color: var(--rejected); }
html.ui9.page-score .stats > .stat:nth-child(-n+3):nth-child(n+2) b { font-size: 17px; font-weight: 600; }
/* Winners and Losers are keys: an arrow at rest, a tint while the table is sorted by them. A cell with a ground redraws its hairlines. */
html.ui9.page-score .stats > [data-ux-verdict] { position: relative; cursor: pointer; transition: background var(--t1); }
html.ui9.page-score .stats > [data-ux-verdict]::after { content: "\2192"; position: absolute; top: 50%; right: 10px; margin-top: -7px; font: 500 10px/14px var(--mono); color: var(--text-dim); }
html.ui9.page-score .stats > [data-ux-verdict]:hover { background: var(--hover); box-shadow: inset 1px 0 0 var(--hair), 1px 0 0 var(--hair), 0 1px 0 var(--hair); }
html.ui9.page-score .stats > [data-ux-verdict]:focus-visible { outline-offset: -3px; }
html.ui9.page-score #tiles[data-ux-on="winners"] > [data-ux-verdict="winners"] { background: color-mix(in srgb, var(--live) 8%, transparent); box-shadow: inset 1px 0 0 var(--hair), 1px 0 0 var(--hair), 0 1px 0 var(--hair); }
html.ui9.page-score #tiles[data-ux-on="losers"] > [data-ux-verdict="losers"] { background: color-mix(in srgb, var(--rejected) 8%, transparent); box-shadow: inset 1px 0 0 var(--hair), 1px 0 0 var(--hair), 0 1px 0 var(--hair); }
/* how the creatives split: winners, still testing, losers. Real counts, across the foot of the band. */
html.ui9.page-score .v9-split { grid-column: 1 / -1; grid-row: 1; align-self: end; position: relative; z-index: 1; height: 6px; margin: 0 1px 1px; overflow: hidden; border-radius: 0 0 var(--r-card) var(--r-card); }
html.ui9.page-score .v9-split[hidden] { display: none; }
html.ui9.page-score .v9-split .v9-segbar { --track: transparent; height: 6px; }
html.ui9.page-score .v9-split i[data-ux-p="win"] { --c: var(--live); }
html.ui9.page-score .v9-split i[data-ux-p="test"] { --c: var(--gauge-track); }
html.ui9.page-score .v9-split i[data-ux-p="lose"] { --c: var(--rejected); }
/* the band holds its place while the first read runs. A failed read has nothing to hold: .v9-read says the read is over. */
html.ui9.page-score .wrap:not(.v9-read) #tiles:empty {
  display: block; height: 46px;
  background: linear-gradient(90deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 200% 100%;
  animation: v9-shimmer 1.6s linear 8;
}

/* one line: the rules and how old the numbers are */
html.ui9.page-score #verdictBar {
  min-height: 28px; margin: 6px 0 6px 2px; gap: 5px !important; font-size: 12px; line-height: 1.2; color: var(--text-dim);
}
html.ui9.page-score #verdictBar b { font-weight: 600; color: var(--text); }
html.ui9.page-score #verdictBar .input {
  width: 56px !important; min-height: 24px; height: 24px; padding: 0 5px !important; font: 500 12px/1 var(--mono); letter-spacing: -.02em; text-align: right;
  appearance: textfield; -moz-appearance: textfield;
}
html.ui9.page-score #verdictBar .input::-webkit-inner-spin-button, html.ui9.page-score #verdictBar .input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
html.ui9.page-score .v9-tip {
  display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: var(--r-cap); background: none; color: var(--text-dim); cursor: help;
}
html.ui9.page-score .v9-tip:hover { background: var(--hover); color: var(--text); }
html.ui9.page-score .v9-tip .v9-i { width: 13px; height: 13px; }
html.ui9.page-score .v9-last { display: inline-flex; align-items: center; gap: 5px; }
html.ui9.page-score .v9-rulekey { display: none; }
html.ui9.page-score .v9-asof { display: inline-flex; align-items: center; gap: 9px; min-height: 28px; margin: 6px 2px 6px 0; white-space: nowrap; font-size: 12px; color: var(--text-dim); }
html.ui9.page-score .v9-asof[hidden] { display: none; }
html.ui9.page-score .v9-ages { display: inline-flex; align-items: center; gap: 10px; }
html.ui9.page-score .v9-age { display: inline-flex; align-items: center; gap: 4px; }
html.ui9.page-score .v9-age .v9-lg { width: 14px; height: 14px; }
html.ui9.page-score .v9-age em { font: 500 11.5px/1 var(--mono); font-style: normal; letter-spacing: -.02em; color: var(--text); }
html.ui9.page-score .v9-age.old em { color: var(--warnink); }
html.ui9.page-score .v9-link {
  display: none; padding: 0; border: 0; background: none; font: 600 12px/1.2 var(--sans); color: var(--accent-text); cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
html.ui9.page-score.v9-admin .v9-link { display: inline; }

/* the table */
html.ui9.page-score .wrap > .card { --bi: 4px; margin: 0; }
html.ui9.page-score .wrap > .card.v9-hero::after { z-index: 6; }
html.ui9.page-score td { padding: 4px 10px; vertical-align: middle; }
html.ui9.page-score th { padding-left: 10px; padding-right: 10px; }
html.ui9.page-score td.num { font-size: 13px; }
html.ui9.page-score #rows td:first-child:not(.empty) { white-space: nowrap; }
html.ui9.page-score thead th:first-child::before { content: "Rank"; }
html.ui9.page-score thead[data-ux-dir="-1"] th.on::after { content: " \2193"; }
html.ui9.page-score thead[data-ux-dir="1"] th.on::after { content: " \2191"; }
html.ui9.page-score td img { display: inline-block; vertical-align: middle; width: 44px; height: 33px; max-width: none; border-radius: var(--r-cap); background: var(--mat); }
/* a picture that will not load stays a plain tile. Only a broken img draws this. */
html.ui9.page-score td img { position: relative; overflow: hidden; }
html.ui9.page-score td img::before { content: ""; position: absolute; inset: 0; background: var(--mat); }
/* when no picture on the board loads at all, a column of blanks says nothing, so the column closes */
html.ui9.page-score .wrap.v9-nothumbs #rows td img { width: 0; opacity: 0; }
html.ui9.page-score .nm { font-size: 13px; font-weight: 600; letter-spacing: -.005em; line-height: 1.3; }
html.ui9.page-score .sub { line-height: 13px; color: var(--text-dim); }
html.ui9.page-score .pfchip { font-size: 11.5px; line-height: 15px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
html.ui9.page-score .pfrow { gap: 1px; }
html.ui9.page-score .pfk { width: 16px; height: 16px; border-radius: var(--r-cap); font: 700 10px/1 var(--sans); }
html.ui9.page-score .pill { padding: 1px 7px; font-size: 10.5px; font-weight: 600; line-height: 14px; letter-spacing: .02em; }

/* rank numerals: a CSS counter, so 1,681 rows cost nothing */
html.ui9.page-score #rows { counter-reset: v9-rank; }
html.ui9.page-score #rows tr { counter-increment: v9-rank; }
html.ui9.page-score #rows td:first-child:not(.empty)::before {
  content: counter(v9-rank); display: inline-block; vertical-align: middle; box-sizing: border-box; width: 34px; margin-right: 6px; text-align: center;
  font: 500 12px/22px var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text-dim);
}
/* ui.css hands out a podium by row position. Here it has to be earned: off unless the head says the rows are ranked by merit.
   data-ux-pod is how many of the top three really have a figure in the sorted column. */
html.ui9.page-score #rows tr:nth-child(-n+3):not(:hover) td { background: none; }
html.ui9.page-score #rows tr:nth-child(-n+3) td:first-child { box-shadow: none; }
html.ui9.page-score thead:is([data-ux-pod="1"], [data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(1) td,
html.ui9.page-score thead:is([data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(2) td,
html.ui9.page-score thead[data-ux-pod="3"] + #rows tr:nth-child(3) td { background: color-mix(in srgb, #d4a017 5%, transparent); }
html.ui9.page-score thead:is([data-ux-pod="1"], [data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(1) td:first-child::before,
html.ui9.page-score thead:is([data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(2) td:first-child::before,
html.ui9.page-score thead[data-ux-pod="3"] + #rows tr:nth-child(3) td:first-child::before {
  height: 22px; font: 600 13px/22px var(--mono); color: var(--go-ink); clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);   /* a -18deg plate: the edge leans, the numeral stays upright */
}
html.ui9.page-score thead:is([data-ux-pod="1"], [data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(1) td:first-child::before { background: #d4a017; }
html.ui9.page-score thead:is([data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(2) td:first-child::before { background: #a7adb8; }
html.ui9.page-score thead[data-ux-pod="3"] + #rows tr:nth-child(3) td:first-child::before { background: #b87333; }
html.ui9.page-score #rows td.empty { padding: 56px 16px; background: none; box-shadow: none; }

/* Desktop: one ledger. Fixed columns come from the head alone, so 1,681 rows are not measured, every row is the same height,
   a big figure cannot push Verdict out of the card, and sorting moves nothing sideways. */
@media (min-width: 761px) {
  html.ui9.page-score .wrap > .card table { table-layout: fixed; }
  html.ui9.page-score thead th:first-child, html.ui9.page-score #rows td:first-child:not(.empty) { padding-left: 20px; padding-right: 6px; }
  html.ui9.page-score thead th:first-child { width: 110px !important; }
  html.ui9.page-score .wrap.v9-nothumbs thead th:first-child { width: 66px !important; }
  html.ui9.page-score thead th:nth-child(3) { width: 74px; }
  html.ui9.page-score thead th:nth-child(4) { width: 268px; }
  html.ui9.page-score thead th:nth-child(5) { width: 112px; }
  html.ui9.page-score thead th:nth-child(6) { width: 64px; }
  html.ui9.page-score thead th:nth-child(7) { width: 88px; }
  html.ui9.page-score thead th:nth-child(8) { width: 68px; }
  html.ui9.page-score thead th:nth-child(9) { width: 72px; }
  html.ui9.page-score thead th:nth-child(10) { width: 166px; }
  html.ui9.page-score .nm, html.ui9.page-score .sub { max-width: 100%; }
  html.ui9.page-score .pfchip { white-space: normal; }
  html.ui9.page-score #rows td { height: 42px; }
  html.ui9.page-score thead:is([data-ux-pod="1"], [data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(1) td,
  html.ui9.page-score thead:is([data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(2) td,
  html.ui9.page-score thead[data-ux-pod="3"] + #rows tr:nth-child(3) td { height: 48px; }
  html.ui9.page-score thead:is([data-ux-pod="1"], [data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(1) td:first-child { box-shadow: inset 4px 0 0 #d4a017; }
  html.ui9.page-score thead:is([data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(2) td:first-child { box-shadow: inset 4px 0 0 #a7adb8; }
  html.ui9.page-score thead[data-ux-pod="3"] + #rows tr:nth-child(3) td:first-child { box-shadow: inset 4px 0 0 #b87333; }
  /* the promotion line: under it you are off the podium. Default sort only, where the three above it are the biggest spenders. */
  html.ui9.page-score thead[data-ux-k="spend"][data-ux-dir="-1"][data-ux-pod="3"] + #rows tr:nth-child(3) td { box-shadow: inset 0 -2px 0 var(--text); }
  html.ui9.page-score thead[data-ux-k="spend"][data-ux-dir="-1"][data-ux-pod="3"] + #rows tr:nth-child(3) td:first-child { box-shadow: inset 4px 0 0 #b87333, inset 0 -2px 0 var(--text); }
}

/* Under 1360 the wrapper scrolls sideways (core keeps it), so Verdict, the point of the screen, pins to the right edge.
   It needs a solid ground of its own on every kind of row. */
@media (min-width: 761px) and (max-width: 1359px) {
  html.ui9.page-score .wrap > .card table { min-width: 1152px; }
  html.ui9.page-score :is(thead th, #rows td):nth-child(10) { position: sticky; top: auto; right: 0; z-index: 2; background: var(--surface); }
  html.ui9.page-score thead th:nth-child(10) { width: 104px; box-shadow: -1px 0 0 var(--line), inset 0 -2px 0 var(--text); }
  html.ui9.page-score #rows td:nth-child(10) { box-shadow: -1px 0 0 var(--line), inset 0 -1px 0 var(--hair); }
  html.ui9.page-score #rows tr:hover td:nth-child(10) { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
  html.ui9.page-score thead:is([data-ux-pod="1"], [data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(1) td:nth-child(10),
  html.ui9.page-score thead:is([data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(2) td:nth-child(10),
  html.ui9.page-score thead[data-ux-pod="3"] + #rows tr:nth-child(3) td:nth-child(10) { background: color-mix(in srgb, #d4a017 5%, var(--surface)); }
  html.ui9.page-score thead[data-ux-k="spend"][data-ux-dir="-1"][data-ux-pod="3"] + #rows tr:nth-child(3) td:nth-child(10) { box-shadow: -1px 0 0 var(--line), inset 0 -2px 0 var(--text); }
  html.ui9.page-score thead th:nth-child(4) { width: 250px; }
  html.ui9.page-score thead th:nth-child(5) { width: 100px; }
  html.ui9.page-score thead th:nth-child(6) { width: 60px; }
  html.ui9.page-score thead th:nth-child(7) { width: 80px; }
  html.ui9.page-score thead th:nth-child(8) { width: 66px; }
  html.ui9.page-score thead th:nth-child(9) { width: 68px; }
}
/* the "how much more" line: a pointer can reach it on the pill's title, a finger cannot, so touch keeps it and a wider column */
@media (min-width: 761px) and (max-width: 1359px) and (hover: hover) {
  html.ui9.page-score #rows td:nth-child(10) .sub { display: none; }
}
@media (min-width: 761px) and (max-width: 1359px) and (hover: none) {
  html.ui9.page-score thead th:nth-child(10) { width: 162px; }
  html.ui9.page-score .wrap > .card table { min-width: 1210px; }
}
@media (min-width: 761px) and (max-width: 1200px) {
  html.ui9.page-score :is(thead th, #rows td):nth-child(8) { display: none; }
  html.ui9.page-score .wrap > .card table { min-width: 1086px; }
}
@media (min-width: 761px) and (max-width: 1200px) and (hover: none) { html.ui9.page-score .wrap > .card table { min-width: 1144px; } }
@media (min-width: 761px) and (max-width: 900px) { html.ui9.page-score .wrap > .card table { min-width: 1012px; } }
@media (min-width: 761px) and (max-width: 900px) and (hover: none) { html.ui9.page-score .wrap > .card table { min-width: 1070px; } }

/* the one line becomes two when it no longer fits */
@media (max-width: 1080px) {
  html.ui9.page-score .wrap { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-score #verdictBar { margin-bottom: 0; }
  html.ui9.page-score .wrap > .v9-asof, html.ui9.page-score #asof { grid-column: 1; grid-row: 3; margin-top: 2px; }
  html.ui9.page-score .wrap > .card { grid-row: 4; }
  html.ui9.page-score .wrap.v9-asof-none #asof { grid-row: 4; }
  html.ui9.page-score .wrap.v9-asof-none > .card { grid-row: 5; }
}
@media (max-width: 860px) {
  html.ui9.page-score .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* A phone: rows reach the eye on the first screen. The band is one swipe row, the rules wait behind a key,
   and every row is a small score card, so the numbers need no sideways swipe. The heads stay, as a strip of sort keys. */
@media (max-width: 760px) {
  html.ui9.page-score .stats {
    grid-template-columns: none; grid-template-rows: 38px; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none;
  }
  html.ui9.page-score .stats::-webkit-scrollbar { display: none; }
  html.ui9.page-score .stats > .stat:last-child:nth-child(odd) { grid-column: auto; }
  html.ui9.page-score .stats > .stat { min-width: 104px; white-space: nowrap; }
  html.ui9.page-score .wrap > .v9-asof { grid-row: 2; display: flex; flex-wrap: wrap; row-gap: 2px; margin: 2px 2px; }
  html.ui9.page-score .wrap > .v9-asof[hidden] { display: none; }
  html.ui9.page-score #verdictBar { grid-row: 3; margin: 0 2px 8px; }
  html.ui9.page-score .wrap:not(.v9-rules-open) #verdictBar { display: none !important; }
  html.ui9.page-score .v9-last { flex: 1 1 100%; }
  html.ui9.page-score .v9-rulekey { display: inline-flex; margin-left: auto; }
  html.ui9.page-score .wrap > .card { --bi: 3px; }
  html.ui9.page-score table, html.ui9.page-score thead, html.ui9.page-score tbody { display: block; }
  html.ui9.page-score thead tr { display: flex; padding: 0 12px; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -2px 0 var(--text); }
  html.ui9.page-score thead tr::-webkit-scrollbar { display: none; }
  html.ui9.page-score thead th { flex: 1 0 auto; box-shadow: none; }
  html.ui9.page-score thead th:not([data-k]) { display: none; }
  html.ui9.page-score #rows tr {
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; gap: 0; padding: 7px 10px 8px; border-bottom: 1px solid var(--hair);
  }
  html.ui9.page-score #rows tr:last-child { border-bottom: 0; }
  html.ui9.page-score #rows td { display: block; height: auto; padding: 0; border: 0; background: none; box-shadow: none; min-width: 0; }
  html.ui9.page-score #rows td.hidesm { display: none; }
  html.ui9.page-score #rows td.empty { grid-column: 1 / -1; padding: 56px 16px; }
  html.ui9.page-score #rows td:nth-child(1) { grid-column: 1 / 4; grid-row: 1 / 4; align-self: start; }
  html.ui9.page-score #rows td:first-child:not(.empty)::before { margin-right: 2px; }
  html.ui9.page-score #rows td:nth-child(2) { grid-column: 4 / 10; grid-row: 1; min-height: 35px; padding-right: 6px; }
  /* the verdict's two parts are grid items of the card: the pill by the name, the "how much more" line in a row of its own */
  html.ui9.page-score #rows td:nth-child(10) { display: contents; }
  html.ui9.page-score #rows td:nth-child(10) > :not(.sub) { grid-column: 10 / -1; grid-row: 1; justify-self: end; align-self: start; }
  html.ui9.page-score #rows td:nth-child(10) > .sub { grid-column: 4 / -1; grid-row: 3; max-width: 100% !important; margin-top: 3px; line-height: 13px; }
  html.ui9.page-score #rows td:nth-child(4) { grid-column: 4 / -1; grid-row: 2; margin-top: 3px; }
  /* one platform: the figures below already say this, so only its mark stays, under the verdict */
  html.ui9.page-score #rows td:nth-child(4):not(:has(.pfchip + .pfchip, .muted)) { grid-column: 10 / -1; grid-row: 1; justify-self: end; align-self: end; margin: 0; }
  html.ui9.page-score #rows td:nth-child(4):not(:has(.pfchip + .pfchip, .muted)) .pfchip { display: flex; width: 16px; overflow: hidden; white-space: nowrap; }
  html.ui9.page-score #rows td:nth-child(5) { grid-column: 1 / 4; grid-row: 4; }
  html.ui9.page-score #rows td:nth-child(6) { grid-column: 4 / 7; grid-row: 4; }
  html.ui9.page-score #rows td:nth-child(7) { grid-column: 7 / 10; grid-row: 4; }
  html.ui9.page-score #rows td:nth-child(9) { grid-column: 10 / -1; grid-row: 4; }
  html.ui9.page-score #rows td.num { margin-top: 6px; text-align: left; font-size: 12.5px; white-space: nowrap; }
  html.ui9.page-score #rows td.num::before { display: block; margin-bottom: 2px; font: 500 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
  html.ui9.page-score #rows td:nth-child(5)::before { content: "Spend"; }
  html.ui9.page-score #rows td:nth-child(6)::before { content: "Conv"; }
  html.ui9.page-score #rows td:nth-child(7)::before { content: "CPA"; }
  html.ui9.page-score #rows td:nth-child(9)::before { content: "ROAS"; }
  html.ui9.page-score .nm, html.ui9.page-score .sub { max-width: 100%; }
  html.ui9.page-score .pfchip { white-space: normal; }
  /* the podium on a card: the same plates, a left edge and the tint, the promotion line as the row's foot */
  html.ui9.page-score thead:is([data-ux-pod="1"], [data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(1) td,
  html.ui9.page-score thead:is([data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(2) td,
  html.ui9.page-score thead[data-ux-pod="3"] + #rows tr:nth-child(3) td { background: none; }
  html.ui9.page-score thead:is([data-ux-pod="1"], [data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(1) { background: color-mix(in srgb, #d4a017 5%, transparent); box-shadow: inset 3px 0 0 #d4a017; }
  html.ui9.page-score thead:is([data-ux-pod="2"], [data-ux-pod="3"]) + #rows tr:nth-child(2) { background: color-mix(in srgb, #d4a017 5%, transparent); box-shadow: inset 3px 0 0 #a7adb8; }
  html.ui9.page-score thead[data-ux-pod="3"] + #rows tr:nth-child(3) { background: color-mix(in srgb, #d4a017 5%, transparent); box-shadow: inset 3px 0 0 #b87333; }
  html.ui9.page-score thead[data-ux-k="spend"][data-ux-dir="-1"][data-ux-pod="3"] + #rows tr:nth-child(3) { border-bottom: 2px solid var(--text); }
}

/* =====================================================================
   States: the atlas
   ===================================================================== */
html.ui9.page-states { --bar-h: 50px; }
html.ui9.page-states #fMetric { width: 246px; }   /* the segment's width, so the swap moves nothing */
html.ui9.page-states .v9-metric { display: inline-flex; flex: none; }
html.ui9.page-states .v9-metric + #fMetric { display: none; }

/* the sheet: map and its table side by side, then the matrix, then the angles */
html.ui9.page-states .wrap:has(> .v9-atlas) { display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 31vw, 436px); gap: 14px; }
html.ui9.page-states .wrap:has(> .v9-atlas) > .cols { display: contents; }
html.ui9.page-states .wrap > .card, html.ui9.page-states .cols > .card { min-width: 0; margin: 0; }
html.ui9.page-states .wrap:has(> .v9-atlas) > .v9-atlas { grid-column: 1; grid-row: 1; }
html.ui9.page-states .wrap:has(> .v9-atlas) .cols > .card:first-child { grid-column: 2; grid-row: 1; }
html.ui9.page-states .wrap:has(> .v9-atlas) > .card:not(.v9-atlas) { grid-column: 1 / -1; grid-row: 2; }
html.ui9.page-states .wrap:has(> .v9-atlas) .cols > .card:last-child { grid-column: 1 / -1; grid-row: 3; }
html.ui9.page-states .wrap:has(> .v9-atlas) > #foot { grid-column: 1 / -1; grid-row: 4; margin: 0 2px; }
/* no state rows at all: the two tables have nothing to say, so they close and the hero takes the width */
html.ui9.page-states .wrap.v9-nostate:has(> .v9-atlas) > .v9-atlas { grid-column: 1 / -1; }
html.ui9.page-states .wrap.v9-nostate .cols > .card { display: none; }
html.ui9.page-states #foot { font-size: 12px; color: var(--text-dim); }

/* First paint: the map is built by the enhancer, so its place is held until then. If the enhancer never runs, the place closes. */
html.ui9.page-states .wrap:not(:has(> .v9-atlas))::before {
  content: ""; display: block; height: 456px; margin-bottom: 14px; border-radius: var(--r-panel); background: var(--bezel); animation: v9-atlas-gone 1ms linear 3s forwards;
}
html.ui9.page-states .wrap:not(:has(> .v9-atlas)) > .card { margin-bottom: 14px; }
html.ui9.page-states .wrap:not(:has(> .v9-atlas)) > .cols { visibility: hidden; animation: v9-atlas-show 1ms linear 3s forwards; }
@keyframes v9-atlas-gone { to { height: 0; margin-bottom: 0; opacity: 0; } }
@keyframes v9-atlas-show { to { visibility: visible; } }

/* the hero. The bezel comes down onto the sheet here and nowhere else, as a chart table. */
html.ui9.page-states .v9-atlas {
  display: flex; align-items: stretch; gap: 18px; padding: 14px 18px 14px 16px; border: 0; border-radius: var(--r-panel); overflow: visible;
  background: var(--bezel); color: var(--on-bezel); box-shadow: 0 0 0 1px var(--bezel-line-2);
}
html.ui9.page-states .v9-atlas > * { position: relative; }
html.ui9.page-states .v9-contour {
  position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; fill: none; stroke: var(--on-bezel); stroke-width: 1; opacity: .055; pointer-events: none;
}
html.ui9.page-states .v9-atlas .v9-hud { color: var(--on-bezel-dim); }

html.ui9.page-states .v9-atlas-side { flex: 1 1 230px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
html.ui9.page-states .v9-atlas.is-none .v9-atlas-fig b, html.ui9.page-states .v9-atlas.is-none .v9-segbar { display: none; }
html.ui9.page-states .v9-atlas.is-none .v9-atlas-fig p { margin-top: 10px; font-size: 15px; font-weight: 600; }
html.ui9.page-states .v9-atlas-fig small a { color: var(--on-bezel); text-decoration: underline; text-underline-offset: 2px; }
html.ui9.page-states .v9-atlas-fig b { display: block; margin: 8px 0 2px; font: 450 38px/1 var(--mono); letter-spacing: -.06em; font-variant-numeric: tabular-nums; min-height: 38px; color: var(--on-bezel); }
html.ui9.page-states .v9-atlas-fig p { margin: 0 0 9px; font-size: 13px; line-height: 1.3; color: var(--on-bezel); }
html.ui9.page-states .v9-atlas-fig small { display: block; margin-top: 8px; font-size: 11.5px; line-height: 1.35; color: var(--on-bezel-dim); }
html.ui9.page-states .v9-atlas-read { min-height: 112px; padding-top: 12px; border-top: 1px solid var(--bezel-line-2); }
html.ui9.page-states .v9-atlas-read:empty { display: none; }
html.ui9.page-states .v9-atlas-read .v9-hud { display: flex; justify-content: space-between; gap: 8px; }
html.ui9.page-states .v9-atlas-read h3 { margin: 7px 0 8px; font: 600 15px/1.2 var(--sans); letter-spacing: -.015em; color: var(--on-bezel); }
html.ui9.page-states .v9-atlas-read p { margin: 0; font-size: 12px; line-height: 1.35; color: var(--on-bezel-dim); }
html.ui9.page-states .v9-atlas-read dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin: 0; }
html.ui9.page-states .v9-atlas-read dt { font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--on-bezel-dim); }
html.ui9.page-states .v9-atlas-read dd { margin: 4px 0 0; font: 500 14px/1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--on-bezel); }
html.ui9.page-states .v9-atlas-read .on dt { color: var(--hazard); }
html.ui9.page-states .v9-atlas-ends { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: start; padding-top: 11px; border-top: 1px solid var(--bezel-line-2); }
html.ui9.page-states .v9-atlas-ends:empty { display: none; }
html.ui9.page-states .v9-atlas-ends > div { min-width: 0; }
html.ui9.page-states .v9-atlas-ends .v9-hud { display: block; margin-bottom: 4px; }
html.ui9.page-states .v9-atlas-ends button {
  display: flex; align-items: baseline; justify-content: space-between; gap: 6px; width: 100%; min-height: 21px; padding: 2px 0; border: 0; background: none; color: var(--on-bezel); cursor: pointer; font-size: 12px; text-align: left;
}
html.ui9.page-states .v9-atlas-ends button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui9.page-states .v9-atlas-ends button em { flex: none; font: 500 11.5px/1 var(--mono); font-style: normal; letter-spacing: -.03em; color: var(--on-bezel-dim); }
html.ui9.page-states .v9-atlas-ends button:hover span { text-decoration: underline; text-underline-offset: 2px; }
html.ui9.page-states .v9-atlas-key { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font: 500 10px/1 var(--mono); letter-spacing: .02em; color: var(--on-bezel-dim); }
html.ui9.page-states .v9-atlas-key[hidden] { display: none; }
html.ui9.page-states .v9-atlas-key i { width: 16px; height: 10px; border-radius: 2px; }
html.ui9.page-states .v9-atlas-key span { margin: 0 2px; }
html.ui9.page-states .v9-atlas-key span:nth-of-type(2) { margin-right: 10px; }

/* the tiles. Heat on ink comes from the lamp colours, in the same four quarters as the matrix. */
html.ui9.page-states .v9-atlas {
  --h1: color-mix(in srgb, var(--lamp-ok) 80%, var(--bezel-2));
  --h2: color-mix(in srgb, var(--lamp-ok) 34%, var(--bezel-2));
  --h3: color-mix(in srgb, var(--hazard) 46%, var(--bezel-2));
  --h4: color-mix(in srgb, var(--rejected) 66%, var(--bezel-2));
}
html.ui9.page-states .v9-map { flex: 0 1 590px; min-width: 0; max-width: 590px; align-self: flex-start; display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); grid-template-rows: repeat(8, auto); gap: 4px; }
html.ui9.page-states .v9-tile {
  aspect-ratio: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; border: 0; border-radius: var(--r-cap);
  background: transparent; box-shadow: inset 0 0 0 1px var(--bezel-line-2); color: var(--on-bezel-faint); cursor: pointer; transition: box-shadow var(--t1);
}
html.ui9.page-states .v9-tile b { font: 500 12px/1 var(--mono); letter-spacing: 0; }
html.ui9.page-states .v9-tile span { font: 500 10px/1 var(--mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
html.ui9.page-states .v9-tile span:empty { display: none; }
html.ui9.page-states .v9-tile.has { background: var(--bezel-3); box-shadow: none; color: var(--on-bezel-dim); }
html.ui9.page-states .v9-tile.c1 { background: var(--h1); color: var(--go-ink); }
html.ui9.page-states .v9-tile.c2 { background: var(--h2); color: var(--on-bezel); }
html.ui9.page-states .v9-tile.c3 { background: var(--h3); color: var(--on-bezel); }
html.ui9.page-states .v9-tile.c4 { background: var(--h4); color: var(--on-bezel); }
html.ui9.page-states .v9-tile:hover, html.ui9.page-states .v9-tile.hot { box-shadow: inset 0 0 0 1.5px var(--on-bezel); }
html.ui9.page-states .v9-tile.pin { box-shadow: inset 0 0 0 2px var(--on-bezel), 0 0 0 2px var(--hazard); }
html.ui9.page-states .v9-tile:focus-visible { outline: 2px solid var(--on-bezel); outline-offset: 1px; box-shadow: none; }
html.ui9.page-states .v9-atlas-key i.c1 { background: var(--h1); }
html.ui9.page-states .v9-atlas-key i.c2 { background: var(--h2); }
html.ui9.page-states .v9-atlas-key i.c3 { background: var(--h3); }
html.ui9.page-states .v9-atlas-key i.c4 { background: var(--h4); }
html.ui9.page-states .v9-atlas-key i.none { box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-states .v9-atlas.is-wait .v9-tile {
  background: linear-gradient(90deg, var(--bezel-2) 30%, var(--bezel-3) 50%, var(--bezel-2) 70%) 0 0 / 200% 100%; box-shadow: none; animation: v9-shimmer 1.6s linear infinite;
}

/* By state and By angle: 420px scrollers with heads that stick inside them */
html.ui9.page-states .cols > .card { display: flex; flex-direction: column; }
html.ui9.page-states .cols > .card > div { flex: 1 1 auto; min-height: 0; max-height: 420px; }
html.ui9.page-states .wrap:has(> .v9-atlas) .cols > .card:first-child { height: 100%; overflow: hidden; }
html.ui9.page-states .wrap:has(> .v9-atlas) .cols > .card:first-child > div { flex: 1 1 0; }
html.ui9.page-states .cols table th { position: sticky; top: 0; z-index: 2; background: var(--surface); }
html.ui9.page-states .cols td { padding: 7px 11px; font-size: 12.5px; }
html.ui9.page-states .cols td.nm { font-weight: 500; }
html.ui9.page-states .cols tr.v9-on td { background: color-mix(in srgb, var(--text) 6%, transparent); }
html.ui9.page-states .cols tr.v9-on td:first-child { box-shadow: inset 2px 0 0 var(--text); }
html.ui9.page-states .cols .good { font-weight: 500; }
html.ui9.page-states .cols .bad { font-weight: 500; }

/* the matrix */
html.ui9.page-states .card > header { min-height: 44px; padding: 8px 14px; flex-wrap: wrap; }
html.ui9.page-states .card > header .sub { font-size: 12px; color: var(--text-dim); }
html.ui9.page-states .card > header .spacer { flex: 1; }
html.ui9.page-states .legend { padding: 0; font-size: 11px; color: var(--text-dim); gap: 10px; }
html.ui9.page-states .mx.v9-few { max-height: none; }
html.ui9.page-states .mx tbody th, html.ui9.page-states .mx thead th:first-child {
  background: var(--surface); box-shadow: inset 0 -1px 0 var(--hair), 1px 0 0 var(--line);
}
html.ui9.page-states .mx tbody th {
  height: auto; padding: 5px 10px; font-family: var(--sans) !important; font-size: 12px !important; font-weight: 500; letter-spacing: 0 !important; text-transform: none; color: var(--text);
  max-width: 264px;
}
html.ui9.page-states .mx thead th:first-child { box-shadow: inset 0 -2px 0 var(--text), 1px 0 0 var(--line); }
html.ui9.page-states .mx thead th { z-index: 3; }
html.ui9.page-states .mx thead th:first-child { z-index: 4; }
/* the map's two-letter codes: readable heads, and more of the matrix on one screen. The full name stays in the title. */
html.ui9.page-states .mx thead th[data-ux-code] { min-width: 64px; text-align: center; }
html.ui9.page-states .mx thead th[data-ux-code]::after { content: attr(data-ux-code); }
/* in the default cut nothing sits under No state, so that column waits for Show all */
html.ui9.page-states .mx.v9-nocol :is(thead th, tbody td):nth-child(2) { display: none; }
html.ui9.page-states .mx td { padding: 4px 8px; font-family: var(--mono); letter-spacing: -.02em; }
html.ui9.page-states .mx .cell b { font-size: 12px; font-weight: 500; line-height: 1.25; }
html.ui9.page-states .mx .cell span { font-size: 10.5px; line-height: 1.2; color: var(--text-dim); }
/* heat survives the row hover */
html.ui9.page-states .mx tr td.c1 { background: color-mix(in srgb, var(--live) 26%, transparent); }
html.ui9.page-states .mx tr td.c2 { background: color-mix(in srgb, var(--live) 15%, transparent); }
html.ui9.page-states .mx tr td.c3 { background: color-mix(in srgb, var(--review) 14%, transparent); }
html.ui9.page-states .mx tr td.c4 { background: color-mix(in srgb, var(--rejected) 16%, transparent); }

/* dark: the red tile gives its text room */
html.ui9.page-states[data-theme="dark"] .v9-atlas { --h3: color-mix(in srgb, var(--hazard) 42%, var(--bezel-2)); --h4: color-mix(in srgb, var(--rejected) 60%, var(--bezel-well)); }

/* beside the table the panel keeps its width, so state names stay whole and the map gives way */
@media (min-width: 1321px) {
  html.ui9.page-states .wrap:not(.v9-nostate) .v9-atlas-side { flex: 0 0 272px; }
  html.ui9.page-states .wrap:not(.v9-nostate) .v9-map { flex: 1 1 0; }
}
/* a big monitor: the map and the table share the extra width, and the table fills the hero's height */
@media (min-width: 1500px) {
  html.ui9.page-states .wrap:has(> .v9-atlas) { grid-template-columns: minmax(0, 1fr) minmax(436px, 34vw); }
  html.ui9.page-states .v9-map { max-width: 720px; }
  html.ui9.page-states .wrap:not(.v9-nostate) .v9-atlas-side { flex: 1 0 272px; }
  html.ui9.page-states .wrap:not(.v9-nostate) .v9-map { flex: 0 1 720px; }
  html.ui9.page-states .wrap:has(> .v9-atlas) .cols > .card:first-child > div { max-height: none; }
}

/* narrower: the map takes the whole width, the two tables sit under the matrix */
@media (max-width: 1320px) {
  html.ui9.page-states .wrap:has(> .v9-atlas) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  html.ui9.page-states .wrap:has(> .v9-atlas) > .v9-atlas { grid-column: 1 / -1; }
  html.ui9.page-states .wrap:has(> .v9-atlas) .cols > .card:first-child { grid-column: 1; grid-row: 3; height: auto; }
  html.ui9.page-states .wrap:has(> .v9-atlas) .cols > .card:first-child > div { flex: 1 1 auto; }
  html.ui9.page-states .wrap:has(> .v9-atlas) .cols > .card:last-child { grid-column: 2; grid-row: 3; }
}
@media (max-width: 1000px) {
  html.ui9.page-states .wrap:has(> .v9-atlas) { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-states .wrap:has(> .v9-atlas) .cols > .card:last-child { grid-column: 1; grid-row: 4; }
  html.ui9.page-states .wrap:has(> .v9-atlas) > #foot { grid-row: 5; }
}
@media (max-width: 900px) { html.ui9.page-states .v9-atlas-ends { display: none; } }
@media (max-width: 760px) {
  html.ui9.page-states .wrap:not(:has(> .v9-atlas))::before { height: 620px; }
  html.ui9.page-states .v9-atlas { flex-direction: column; gap: 12px; padding: 12px; }
  html.ui9.page-states .v9-atlas-side { display: contents; }
  html.ui9.page-states .v9-atlas-fig { order: 1; }
  html.ui9.page-states .v9-map { order: 2; flex: none; width: 100%; gap: 3px; }
  html.ui9.page-states .v9-atlas-key { order: 3; }
  html.ui9.page-states .v9-atlas-read { order: 4; min-height: 0; }
  html.ui9.page-states .v9-atlas-ends { order: 5; flex: none; display: grid; }
  html.ui9.page-states .mx tbody th, html.ui9.page-states .mx thead th:first-child { max-width: 148px; }
  html.ui9.page-states .cols td, html.ui9.page-states .cols th { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 520px) {
  html.ui9.page-states .v9-tile span { display: none; }
  html.ui9.page-states .v9-tile b { font-size: 10px; }
  html.ui9.page-states .cols :is(td, th) { padding-left: 6px; padding-right: 6px; }
  /* two lines of a label: many start the same way. The clamp sits on the inner span, so the th stays a cell and keeps its sticky left edge. */
  html.ui9.page-states .mx tbody th { min-width: 132px; white-space: normal; line-height: 1.2; }
  html.ui9.page-states .mx tbody th .v9-lbl { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
}
@media (hover: none) { html.ui9.page-states #legend > span:last-child { display: none; } }

/* =====================================================================
   ClickFlare: the wire room
   ===================================================================== */
html.ui9.page-clickflare { --bar-h: 50px; --wire-h: 54px; }
html.ui9.page-clickflare .topbar label { font-size: 12.5px !important; font-weight: 500 !important; }
html.ui9.page-clickflare .topbar input[type="checkbox"] { accent-color: var(--accent); }
html.ui9.page-clickflare .v9-tz {
  display: inline-flex; align-items: center; height: 24px; padding: 0 7px; border-radius: var(--r-cap); background: var(--surface-2); color: var(--text-dim);
  font: 500 10px/1 var(--mono); letter-spacing: .085em; white-space: nowrap;
}
html.ui9.page-clickflare .v9-tz { min-width: 38px; justify-content: center; }
html.ui9.page-clickflare .v9-tz:empty { visibility: hidden; }   /* holds its place: the filters do not move when it arrives */
html.ui9.page-clickflare #new { min-width: 124px; justify-content: center; }   /* the longest of its three names */
html.ui9.page-clickflare #ws { width: 170px; text-overflow: ellipsis; }   /* a set width: the list arrives late and a long name must not move the bar */
/* before the first paint names a tab, the one on its way shows as chosen */
html.ui9.page-clickflare #tabs:not(:has(.on)) [data-ux-cur] { background: var(--primary-bg); color: var(--primary-text); }
/* buttons are ink: the inline accent fills go */
html.ui9.page-clickflare :is(#new, #pSave) { background: var(--primary-bg) !important; color: var(--primary-text) !important; box-shadow: 0 1px 0 rgba(0,0,0,.25); }
html.ui9.page-clickflare :is(#new, #pSave):hover { box-shadow: 0 1px 0 rgba(0,0,0,.25); filter: brightness(1.25); }
html.ui9.page-clickflare[data-theme="dark"] :is(#new, #pSave):hover { filter: brightness(.92); }

/* the page never scrolls on a desktop: the wire does */
html.ui9.page-clickflare .wrap { padding-bottom: 12px; }
html.ui9.page-clickflare .wrap > .card { margin: 0; overflow: hidden; }
/* --cf-bar and --cf-wire are the real heights, from the one ResizeObserver in the fragment. Until it runs, the usual ones. */
html.ui9.page-clickflare .tbl { max-height: calc(100vh - var(--shell-h) - var(--cf-bar, var(--bar-h)) - 4px - var(--cf-wire, var(--wire-h)) - 14px); }
html.ui9.page-clickflare td.empty { padding: 72px 16px; font-size: 13px; }

/* the head of the wire is ink: what this tab is, and what the rows below add up to */
html.ui9.page-clickflare .card > header {
  position: relative; min-height: var(--wire-h); padding: 7px 0 7px 14px; gap: 2px 14px; flex-wrap: wrap; align-items: center; border: 0; background: var(--bezel); color: var(--on-bezel);
}
html.ui9.page-clickflare .card > header h2 { color: var(--on-bezel); font-size: 14px; }
html.ui9.page-clickflare .card > header .sub { flex: 1 1 200px; min-width: 0; font-size: 12px; color: var(--on-bezel-dim); }
html.ui9.page-clickflare .v9-wire { display: flex; flex: none; margin-left: auto; align-self: stretch; }
html.ui9.page-clickflare .v9-wire[hidden] { display: none; }
html.ui9.page-clickflare .v9-wire > div { display: flex; flex-direction: column; justify-content: center; gap: 5px; min-width: 104px; padding: 0 14px; box-shadow: -1px 0 0 var(--bezel-line-2); text-align: right; }
html.ui9.page-clickflare .v9-wire .v9-hud { color: var(--on-bezel-dim); }
html.ui9.page-clickflare .v9-wire b { font: 500 15px/1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--on-bezel); white-space: nowrap; }
/* 01-base sets sans !important through an :is() that holds an id, so this rule needs an id's weight too: #t never matches here, it only adds weight */
html.ui9.page-clickflare .card > header .v9-wire:is(.v9-wire, #t) b { font-family: var(--mono) !important; font-size: 15px; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
html.ui9.page-clickflare .v9-wire b.pos { color: var(--lamp-ok); }
html.ui9.page-clickflare .v9-wire b.neg { color: color-mix(in srgb, var(--rejected) 55%, var(--on-bezel)); }
/* Each total stands on its own column: read it, then look straight down. The fragment measures the heads, and .v9-cols is on
   only while every column fits. Without it (a phone, or a table that scrolls sideways) the band stays a plain row. */
html.ui9.page-clickflare .card > header:has(> .v9-wire.v9-cols) { flex-wrap: nowrap; padding-right: calc(100% - var(--wire-l, 100%) + 14px); }
html.ui9.page-clickflare .card > header:has(> .v9-wire.v9-cols) .sub { flex: 0 1 auto; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.25; }
html.ui9.page-clickflare .v9-wire.v9-cols { position: absolute; inset: 0; display: block; margin: 0; pointer-events: none; }
html.ui9.page-clickflare .v9-wire.v9-cols > div { position: absolute; top: 0; bottom: 0; min-width: 0; box-sizing: border-box; padding: 0 11px; align-items: flex-end; box-shadow: none; pointer-events: auto; }
html.ui9.page-clickflare .v9-wire.v9-cols > [data-ux-t="cr"] { align-items: flex-start; text-align: left; white-space: nowrap; }
html.ui9.page-clickflare .card > header .v9-wire.v9-cols:is(.v9-wire, #t) b { font-size: 13px; }
html.ui9.page-clickflare .v9-wire.v9-cols > [data-ux-t="p"] { background: var(--bezel-2); }   /* profit is the loud column, and that starts up here */
html.ui9.page-clickflare .card > header .v9-wire.v9-cols:is(.v9-wire, #t) [data-ux-t="p"] b { font-size: 15px; font-weight: 600; }

/* rows: names ink, URLs faint mono, profit the loud column */
html.ui9.page-clickflare td { padding: 4px 11px; }
html.ui9.page-clickflare th { padding-left: 11px; padding-right: 11px; }
html.ui9.page-clickflare .nm { font-size: 13px; font-weight: 600; letter-spacing: -.005em; line-height: 1.3; }
html.ui9.page-clickflare .url { max-width: min(520px, 30vw); font: 400 11px/1.3 var(--mono); letter-spacing: -.02em; color: var(--text-dim); }
html.ui9.page-clickflare tbody tr:hover .url { color: var(--text); }
html.ui9.page-clickflare td.num { font-size: 13px; }
html.ui9.page-clickflare td.hide-sm { white-space: nowrap; }
html.ui9.page-clickflare td.pos, html.ui9.page-clickflare td.neg { font-weight: 600; }
html.ui9.page-clickflare tr td.pos { background: color-mix(in srgb, var(--live) 8%, transparent); }
html.ui9.page-clickflare tr td.neg { background: color-mix(in srgb, var(--rejected) 8%, transparent); }
html.ui9.page-clickflare th[data-k="p"] { color: var(--text); }
html.ui9.page-clickflare th[data-k="p"].on { color: var(--accent-text); }
html.ui9.page-clickflare tbody tr.on td { background: var(--accent-soft); }
html.ui9.page-clickflare .copy {
  min-height: 26px; padding: 0 9px; border: 0; border-radius: 6px; background: var(--surface); color: var(--text); font: 500 12px/1 var(--sans);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); transition: box-shadow var(--t1);
}
html.ui9.page-clickflare .copy:hover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); }
/* the row already opens the editor, so the right edge stays quiet until the pointer is on that row */
@media (hover: hover) {
  html.ui9.page-clickflare #t tbody .copy { background: none; box-shadow: none; color: var(--text-dim); }
  html.ui9.page-clickflare #t tbody tr:hover .copy, html.ui9.page-clickflare #t tbody .copy:focus-visible { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); }
  html.ui9.page-clickflare #t tbody tr .copy:hover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); }
}
html.ui9.page-clickflare .tag { font-size: 10.5px; font-weight: 500; background: var(--surface-2); color: var(--text-dim); }

/* the editor: one treatment, footer pinned */
html.ui9.page-clickflare aside.panel { width: min(560px, 100vw); border: 0; border-radius: 0; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); }
html.ui9.page-clickflare aside.panel > header { min-height: 50px; padding: 9px 16px; background: var(--surface); }
/* one worded close, Cancel in the footer: this one is the icon key */
html.ui9.page-clickflare #pClose { width: 28px; height: 28px; min-height: 0; padding: 0; justify-content: center; }
html.ui9.page-clickflare #pClose .v9-i { pointer-events: none; }
html.ui9.page-clickflare aside.panel .body { padding: 14px 16px; gap: 14px; }
html.ui9.page-clickflare aside.panel > footer { padding: 10px 16px; border-top-color: var(--hair); background: var(--surface); }
html.ui9.page-clickflare #pMsg { font-size: 12.5px; }
html.ui9.page-clickflare .f { gap: 6px; line-height: 1.2; }
html.ui9.page-clickflare label.f { margin: 0; }
html.ui9.page-clickflare div.f { font: 500 10px/1.2 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--text-dim); }
html.ui9.page-clickflare :is(label.f, div.f) .hint {
  display: block; font: 400 11.5px/1.35 var(--sans) !important; letter-spacing: 0 !important; text-transform: none; color: var(--text-dim);
}
html.ui9.page-clickflare :is(label.f, div.f) .input { font-weight: 400; letter-spacing: 0; text-transform: none; }
html.ui9.page-clickflare label.f:has(> input[type="checkbox"]) {
  font: 500 12.5px/1.3 var(--sans) !important; letter-spacing: 0 !important; text-transform: none; color: var(--text);
}
html.ui9.page-clickflare .picker { border: 0; border-radius: var(--r-key); padding: 8px; background: var(--surface-2); text-transform: none; letter-spacing: 0; }
html.ui9.page-clickflare .picked { font: 400 12.5px/1.3 var(--sans); }
html.ui9.page-clickflare .picked .it input { min-height: 28px; padding: 0 6px; font: 500 12px/1 var(--mono); }
html.ui9.page-clickflare .picked .it button { width: 26px; height: 26px; border-radius: var(--r-cap); color: var(--text-dim); }
html.ui9.page-clickflare .picked .it button:hover { background: var(--hover); color: var(--text); }
html.ui9.page-clickflare .results { border-top: 1px solid var(--line); }
html.ui9.page-clickflare .results:empty { border: 0; }
html.ui9.page-clickflare .results div { padding: 6px; font: 400 12.5px/1.3 var(--sans); border-radius: var(--r-cap); }
html.ui9.page-clickflare .results div:hover { background: var(--hover); }
html.ui9.page-clickflare .link { background: var(--surface-2); border-radius: var(--r-key); font: 400 11.5px/1.4 var(--mono); letter-spacing: -.02em; text-transform: none; }

/* a narrower bar keeps its controls on one row: the sub line already says UTC */
@media (max-width: 1199px) {
  html.ui9.page-clickflare #q { width: 120px !important; }
  html.ui9.page-clickflare #ws { width: 130px; }
  html.ui9.page-clickflare .v9-tz { display: none; }
  html.ui9.page-clickflare .topbar { gap: 8px; }
}
/* the thumb bar takes its 60px off the window */
@media (max-width: 860px) {
  html.ui9.page-clickflare .tbl { max-height: calc(100vh - var(--shell-h) - var(--cf-bar, var(--bar-h)) - 4px - var(--cf-wire, var(--wire-h)) - 14px - 60px - env(safe-area-inset-bottom)); }
}
/* a phone: the page scrolls, totals fold to two rows, and profit stays on the row */
@media (max-width: 760px) {
  html.ui9.page-clickflare .tbl { max-height: none; }
  html.ui9.page-clickflare .card > header { padding: 8px 12px 0; }
  html.ui9.page-clickflare .card > header .sub { flex-basis: 100%; }
  html.ui9.page-clickflare .v9-wire { flex: 1 1 100%; margin: 6px -12px 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); box-shadow: 0 -1px 0 var(--bezel-line-2); }
  html.ui9.page-clickflare .v9-wire > div { grid-column: span 2; min-width: 0; min-height: 46px; padding: 6px 10px; text-align: left; box-shadow: 1px 0 0 var(--bezel-line-2), 0 1px 0 var(--bezel-line-2); }
  html.ui9.page-clickflare .v9-wire > div:nth-child(n+4) { grid-column: span 3; }
  html.ui9.page-clickflare .card > header .v9-wire:is(.v9-wire, #t) b { font-size: 14px; }
  html.ui9.page-clickflare .url { max-width: calc(100vw - 210px); }
  /* the main action sits on the title row, and the last filter takes what is left of its row */
  html.ui9.page-clickflare .topbar .brand { order: -2; }
  html.ui9.page-clickflare #new { order: -1; margin-left: auto; }
  html.ui9.page-clickflare #ws { flex: 1 1 0; width: auto; min-width: 0; }
  html.ui9.page-clickflare #q { flex: 1 1 0; width: auto !important; min-width: 0; }
}
@media (max-width: 640px) {
  html.ui9.page-clickflare #t :is(th, td):nth-child(3) { display: none; }
  html.ui9.page-clickflare #t :is(th, td):nth-child(5) { display: table-cell; }
  /* the whole row opens the editor, so its Edit key can go on a phone */
  html.ui9.page-clickflare #t td:has(> [data-edit]), html.ui9.page-clickflare #t thead th:last-child:not([data-k]) { display: none; }
  html.ui9.page-clickflare #t td { padding-left: 8px; padding-right: 8px; }
  html.ui9.page-clickflare #t th { padding-left: 8px; padding-right: 8px; }
  html.ui9.page-clickflare .nm { font-size: 12.5px; }
}

/* ===== 40-rules-schedules.css ===== */
/* =====================================================================
   40 Rules (x3) and Schedules (DESIGN.md 4.11, 4.12).
   Two compositions: a signal board with a running ticker beside it,
   and an ink 24-hour rail over one section at a time.
   Placement is CSS keyed to html.ui9 (first paint). If ui9.js never runs,
   the form still sits under the lists and every section still shows.
   ===================================================================== */

/* ---- accents: rules is Meta blue, not NewsBreak red. No cyan. tt_rules and sc_rules keep their tokens. ---- */
html.ui9.page-rules, html.ui9.page-rules[data-theme="light"] {
  --accent: #0866ff; --accent-2: #3d8bff; --accent-text: #0653cc; --accent-soft: #e7f0ff;
  --grad: linear-gradient(135deg, #0866ff, #0653cc);
}
html.ui9.page-rules[data-theme="dark"] {
  --accent: #4d94ff; --accent-2: #8ab8ff; --accent-text: #8ab8ff; --accent-soft: #0e2a56;
  --grad: linear-gradient(135deg, #2f7bf0, #1c62d6);
}
/* yellow carries near-black ink, and a focus ring it can be seen by */
html.ui9.page-sc_rules :focus-visible { outline-color: var(--accent-text); }
html.ui9.page-sc_rules :is(.tpltab.on, .v9-rs-new) { color: #16160f; }

/* =====================================================================
   The bar
   ===================================================================== */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .topbar .brand .pill { display: none; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .topbar .brand > span:not(.pill, .sep) {
  font: 600 15px/1.2 var(--sans); letter-spacing: -.015em;
}
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .pf-switch {
  display: inline-flex; flex: none; gap: 1px; padding: 2px; border: 0; border-radius: var(--r-key); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line);
}
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .pf-switch a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 9px 0 6px; border-radius: 5px;
  font: 500 12.5px/1 var(--sans); color: var(--text-dim); text-decoration: none; white-space: nowrap;
  transition: background var(--t1), color var(--t1);
}
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .pf-switch a:hover { background: var(--hover); color: var(--text); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .pf-switch a.on { background: var(--primary-bg); color: var(--primary-text); box-shadow: none; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .pf-switch .v9-lg { width: 15px; height: 15px; border-radius: 3.5px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .pf-switch .v9-n { font: 500 10.5px/1 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .pf-switch .v9-n:empty { display: none; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .pf-switch a.on .v9-n { color: inherit; opacity: .72; }
/* NewsBreak has guards, not rules, and they are admin only */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules):not(.v9-admin) .v9-rs-nb { display: none !important; }
/* the server refuses rule writes without launcher access, so no primary key that leads nowhere */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules):not(.v9-can-launch) :is(.v9-rs-new, .v9-rs-tpls, .v9-rs-empty > p, .v9-rs-empty > [data-ux-new]) { display: none; }

/* the checker's light: a readout, not a key */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-cron {
  display: inline-flex; align-items: center; gap: 7px; min-height: 27px; padding: 0 9px; border-radius: 6px; white-space: nowrap; cursor: default;
  font: 500 12px/1 var(--sans); letter-spacing: 0; color: var(--text-dim);
}
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-cron i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-cron[data-ux-state="ok"] i { background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-cron[data-ux-state="bad"] { color: var(--rejected); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-cron[data-ux-state="bad"] i { background: var(--rejected); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rejected) 22%, transparent); }

/* =====================================================================
   The board: rules left, the ticker of what they did right.
   Grid placement only: nothing has to move for the first paint.
   ===================================================================== */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap {
  display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 12px; padding-bottom: 40px;
}
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap > * { grid-column: 1 / -1; margin: 0 0 10px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap > .v9-rs-well { grid-row: 1; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap > #cronBar { grid-row: 2; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap > #cronNote { grid-row: 3; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap > .card:has(#ruleList) { grid-row: 4; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap > .card:has(#logList) { grid-row: 5; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap > .card:has(#formTitle) { grid-row: 6; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap > .card:has(#tplHead) { grid-row: 7; }
/* the how-to only speaks when the status could not be read. The red bar says the same thing on its own. Hidden while loading, so nothing jumps. */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #cronNote { display: none; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules).v9-cron-unknown #cronNote { display: block; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #cronBar.ok { display: none !important; }
/* green folded away; red runs the full width, tinted so it does not read as the orange of go */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #cronBar.bad {
  margin: 0 0 10px; padding: 8px 12px; border-radius: var(--r-key); background: var(--rejected-bg); color: var(--rejected); font-size: 12.5px; font-weight: 500;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rejected) 45%, transparent);
}
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #cronBar .croncmd { background: color-mix(in srgb, var(--rejected) 14%, transparent); color: inherit; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #cronBar .croncopy { background: var(--rejected); color: var(--rejected-bg); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .card { overflow: clip; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .card > header { min-height: 36px; padding: 6px 12px; gap: 8px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .card > header h2 { flex: none; }

@media (min-width: 1321px) {
  /* the page never scrolls here: without the gutter the bar and the drawer reach the window edge */
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) { scrollbar-gutter: auto; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap { grid-template-columns: minmax(0, 1fr) 372px; padding-bottom: 4px; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap > :is(.card:has(#ruleList), .card:has(#logList)) {
    grid-row: 4; display: flex; flex-direction: column; min-height: 0; height: calc(100vh - var(--shell-h) - var(--bar-h) - 14px);
  }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap > .card:has(#ruleList) { grid-column: 1; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap > .card:has(#logList) { grid-column: 2; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) :is(.card:has(#ruleList), .card:has(#logList)) > .body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) :is(#ruleList, #logList) { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
  /* once the form has gone to the drawer the board fills the window exactly, a red bar or not: no page scroll, so Edit's scroll-to-top moves nothing */
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap:not(:has(#rName)) {
    grid-template-rows: auto auto auto minmax(0, 1fr); height: calc(100vh - var(--shell-h) - var(--bar-h)); min-height: 480px;
  }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap:not(:has(#rName)) > :is(.card:has(#ruleList), .card:has(#logList)) { height: auto; }
  /* a long migrate list must not eat the rules: it scrolls in its own box and its key stays in view */
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #migrateBar { flex: none; max-height: 38vh; overflow-y: auto; scrollbar-width: thin; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #migrateGo { position: sticky; bottom: 0; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #ruleList { min-height: 120px; }
}
@media (max-width: 1320px) {
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) :is(#ruleList, #logList) { max-height: none; overflow: visible; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #logList { scroll-margin-top: calc(var(--shell-h) + var(--bar-h) + 90px); }
  /* nothing sticks in here, and its range menu has to clear the card on a short log */
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .card:has(#logList) { overflow: visible; }
}

/* ---- the readout: one instrument over the board. Everything in it is read off nodes already painted. ---- */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules, .page-schedules) .v9-rs-well { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: center; height: 44px; margin: 0 0 10px; padding: 0; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules, .page-schedules) .v9-rs-well > div { display: flex; align-items: center; gap: 9px; min-width: 0; height: 24px; padding: 0 14px; white-space: nowrap; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules, .page-schedules) .v9-rs-well > div + div { box-shadow: inset 1px 0 0 var(--bezel-line-2); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules, .page-schedules) .v9-rs-well .v9-hud { flex: none; font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--on-bezel-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules, .page-schedules) .v9-rs-well b { font: 500 15px/1 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--on-bezel); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules, .page-schedules) .v9-rs-well b.v9-lamp { color: var(--lamp-work); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules, .page-schedules) .v9-rs-well small { font: 500 11px/1 var(--mono); letter-spacing: -.02em; color: var(--on-bezel-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules, .page-schedules) .v9-rs-well .v9-segbar { --c: var(--lamp-ok); flex: 0 1 110px; min-width: 0; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules, .page-schedules)[data-theme="dark"] .v9-rs-well { background-color: var(--bezel); box-shadow: inset 0 1px 3px rgba(0,0,0,.6), 0 0 0 1px var(--bezel-line-2); }
@media (max-width: 600px) {
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules, .page-schedules) .v9-rs-well > div { flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; height: 32px; padding: 0 10px; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules, .page-schedules) .v9-rs-well :is(.v9-w, .v9-segbar, small) { display: none; }
}

/* ---- Your rules ---- */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .card:has(#ruleList) > .body { padding: 0; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-sum { display: inline-flex; align-items: center; gap: 4px; font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-sum b { font-weight: 500; font-size: 12.5px; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-sum i { width: 8px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-sum .v9-rs-e, html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-sum .v9-rs-e b { color: var(--rejected); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #ruleCount { padding: 0; border: 0; background: none; color: var(--text-dim); font: 500 10px/1 var(--mono); letter-spacing: .04em; }
/* the on and off counts already say it */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .card > header:has(.v9-rs-sum:not(:empty)) #ruleCount { display: none; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #migrateBar .note { margin: 8px 12px !important; }

html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #ruleList { display: flex; flex-direction: column; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule {
  position: relative; flex: none; order: 0; margin: 0; border: 0; border-radius: 0; box-shadow: inset 0 -1px 0 var(--hair); background: none; transition: background var(--t1);
}
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule:hover { border: 0; box-shadow: inset 0 -1px 0 var(--hair); background: var(--hover); }
/* red is a failure and nothing else: a spine on the row that needs you */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule:not(.off):has(.sumline.v9-bad) { box-shadow: inset 2px 0 0 var(--rejected), inset 0 -1px 0 var(--hair); }
/* on-rules on top. Off rules keep their own order under the divider. */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.off { order: 2; opacity: 1; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-sep { order: 1; flex: none; padding: 8px 12px 4px; box-shadow: inset 0 -1px 0 var(--line-strong); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-sep .v9-hud { color: var(--text-dim); }

html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule > .hd {
  display: grid; grid-template-columns: 34px 9px minmax(0, 25%) minmax(0, 1fr) 52px auto 13px; align-items: center;
  grid-template-areas: "sw dot nm rd ev ac ch" "sw .  su su su ac ch"; column-gap: 9px; row-gap: 3px; padding: 7px 8px 7px 12px;
}
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule > .hd:focus-visible { outline-offset: -2px; border-radius: 4px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .switch { grid-area: sw; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .adot { grid-area: dot; width: 8px; height: 8px; box-shadow: none; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .adot:is(.off, .bud) { background: var(--text-faint); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .nm { grid-area: nm; min-width: 0; max-width: none; font: 500 13px/1.3 var(--sans) !important; letter-spacing: -.008em; color: var(--text); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .tag { grid-area: ev; justify-self: end; padding: 0; background: none; font: 500 11px/1.3 var(--mono); letter-spacing: -.02em; color: var(--text-dim); white-space: nowrap; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .sumline { grid-area: su; font-size: 11.5px; line-height: 1.3; color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .sumline.v9-acted { color: var(--text); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .sumline.v9-bad { color: var(--rejected); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.off .sumline.v9-bad { color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .iwrap { grid-area: ac; gap: 0; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .chev { grid-area: ch; width: 13px; height: 13px; margin: 0; }
/* IF ... THEN ...: the sentence the rule is */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule > .hd > .desc {
  grid-area: rd; display: flex; align-items: baseline; gap: 5px; min-width: 0; padding: 0; overflow: hidden; white-space: nowrap;
  font-size: 12.5px; line-height: 1.3; color: var(--text);
}
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc .v9-k { flex: none; font: 500 10px/1 var(--mono); font-style: normal; letter-spacing: .06em; color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc .v9-if { display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc .v9-if .v9-k { margin: 0 2px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc :is(.v9-c, .v9-then, .v9-win) { white-space: nowrap; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc .v9-win { flex: none; font: 400 11.5px/1 var(--sans); letter-spacing: 0; color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc .v9-then { flex: none; font-weight: 600; color: var(--text); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc .v9-then.on { color: var(--live); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc .v9-of { flex: 0 1000 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.off .nm { color: var(--text-dim); font-weight: 450 !important; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.off .adot { background: var(--line-strong); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.off > .hd > .desc { color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.off .v9-then { color: var(--text-dim); }
/* open: the whole sentence, then the account and scope */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.open { background: var(--hover); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.open > .hd { align-items: start; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.open .nm { white-space: normal; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.open > .hd > .desc { display: block; white-space: normal; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.open .desc :is(.v9-if, .v9-win, .v9-then, .v9-of) { display: inline; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.open .desc > .v9-k { margin: 0 2px 0 5px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.open .desc > .v9-k:first-child { margin-left: 0; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.open .desc > :is(.v9-win, .v9-of) { margin-left: 3px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.open .sumline { white-space: normal; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .foot { padding: 0 12px 8px 73px; gap: 6px; font-size: 11.5px; color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .foot > :not(.tag) { display: none; }   /* the line above already says it, whole */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .foot .tag { padding: 2px 6px; background: var(--surface-2); font-size: 11px; line-height: 1.2; color: var(--text-dim); }

/* the on/off switch: the .sw of the whole product */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .switch { width: 34px; height: 19px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .switch::after { top: 2px; left: 2px; width: 15px; height: 15px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .switch.on::after { transform: translateX(15px); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .switch:focus-visible { outline-offset: 3px; }

/* row keys: quiet. Run now gets the live mark and nothing else: it must not invite. */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .ibtn { position: relative; width: 27px; height: 27px; border-radius: 6px; color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .ibtn svg { width: 14px; height: 14px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .ibtn:hover { background: var(--surface-2); color: var(--text); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .ibtn.danger:hover { background: var(--rejected-bg); color: var(--rejected); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .ibtn.v9-live::before { position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; margin: 0; box-shadow: 0 0 0 1.5px var(--led-soft); }
/* with a mouse the keys wait for the row, so the sentence gets the width and the board goes quiet. On touch nothing hovers: they stay in the row. */
@media (hover: hover) and (min-width: 861px) {
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule > .hd { grid-template-columns: 34px 9px 210px minmax(0, 1fr) 52px 13px; grid-template-areas: "sw dot nm rd ev ch" "sw .  su su su ch"; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .iwrap {
    position: absolute; top: 9px; right: 26px; z-index: 1; opacity: 0; pointer-events: none; background: linear-gradient(var(--hover), var(--hover)), var(--surface); transition: opacity var(--t1);
  }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule:is(:hover, :focus-within, .open) .iwrap { opacity: 1; pointer-events: auto; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.open > .hd > .desc { padding-right: 88px; }
}
/* on touch nothing hovers, so the keys stay on show: they take the second line, beside the result, and the sentence keeps the first line whole */
@media (hover: none) and (min-width: 861px) {
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule > .hd { grid-template-columns: 34px 9px 210px minmax(0, 1fr) auto 52px 13px; grid-template-areas: "sw dot nm rd rd ev ch" "sw .  su su ac ac ch"; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .iwrap { justify-self: end; }
}
/* the narrowest two-column widths: the sentence keeps its room, the ticker and the name give a little */
@media (hover: hover) and (min-width: 1321px) and (max-width: 1405px) {
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule > .hd { grid-template-columns: 34px 9px 186px minmax(0, 1fr) 52px 13px; }
}
@media (hover: none) and (min-width: 1321px) and (max-width: 1405px) {
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule > .hd { grid-template-columns: 34px 9px 186px minmax(0, 1fr) auto 52px 13px; }
}
/* and the narrowest one-column widths, the same way */
@media (hover: hover) and (min-width: 861px) and (max-width: 930px) {
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule > .hd { grid-template-columns: 34px 9px 170px minmax(0, 1fr) 52px 13px; }
}
@media (hover: none) and (min-width: 861px) and (max-width: 930px) {
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule > .hd { grid-template-columns: 34px 9px 170px minmax(0, 1fr) auto 52px 13px; }
}
/* the sentence runs to two lines here, so over it the keys would hide words: they keep a place on the second line, as on touch, and only their showing waits for the row */
@media (hover: hover) and (min-width: 861px) and (max-width: 1023px) {
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule > .hd { grid-template-columns: 34px 9px 210px minmax(0, 1fr) auto 52px 13px; grid-template-areas: "sw dot nm rd rd ev ch" "sw .  su su ac ac ch"; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .iwrap { position: static; justify-self: end; background: none; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .sumline { white-space: normal; overflow: visible; text-overflow: clip; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule.open > .hd > .desc { padding-right: 0; }
}
@media (hover: hover) and (min-width: 861px) and (max-width: 930px) {
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule > .hd { grid-template-columns: 34px 9px 170px minmax(0, 1fr) auto 52px 13px; }
}
/* here the longest sentences no longer fit one line: they run on to a second, as an open row does, so nothing is cut and short rules stay one line */
@media (min-width: 861px) and (max-width: 1023px) {
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule > .hd > .desc { display: block; white-space: normal; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc :is(.v9-if, .v9-win, .v9-then, .v9-of) { display: inline; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc > .v9-k { margin: 0 2px 0 5px; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc > .v9-k:first-child { margin-left: 0; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc > :is(.v9-win, .v9-of) { margin-left: 3px; }
}
@media (min-width: 1321px) and (max-width: 1405px) {
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap { grid-template-columns: minmax(0, 1fr) 320px; }
}

/* loading: rows of nothing, not a spinner on a blank board */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #ruleList > .empty:has(.spin) {
  height: 300px; margin-left: 64px; padding: 0; color: transparent; font-size: 0;
  background: linear-gradient(90deg, transparent 0, var(--hover) 45%, transparent 90%) 0 0 / 200% 100%,
              repeating-linear-gradient(transparent 0 8px, var(--surface-2) 8px 20px, transparent 20px 28px, var(--surface-2) 28px 38px, transparent 38px 49px, var(--hair) 49px 50px);
  animation: v9-shimmer 1.6s linear infinite;
}
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #ruleList > .empty:has(.spin) .spin { display: none; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .empty { padding: 28px 12px; font-size: 13px; color: var(--text-dim); }

/* empty: one line, a few templates that really work here, + New rule */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-empty { display: grid; justify-items: center; gap: 8px; padding: 44px 16px 48px; text-align: center; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-empty > b { font: 600 15px/1.2 var(--sans); letter-spacing: -.015em; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-empty > p { margin: 0; font-size: 12.5px; color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-tpls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0 6px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-tpls button {
  display: grid; gap: 3px; width: 220px; padding: 10px 12px; border: 0; border-radius: var(--r-card); background: var(--surface); color: var(--text); text-align: left; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); font: inherit; transition: box-shadow var(--t1);
}
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-tpls button:hover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-tpls b { font: 500 13px/1.25 var(--sans); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-tpls span { font-size: 11.5px; line-height: 1.35; color: var(--text-dim); }

/* ---- Actions taken: the ticker ---- */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .card:has(#logList) > header { flex-wrap: wrap; row-gap: 6px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .card:has(#logList) > header .spacer { display: none; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #logQ { flex: 1 1 110px; width: auto; min-width: 0 !important; min-height: 27px; padding: 0 8px; font-size: 12px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .card:has(#logList) > header .ddx { flex: 0 0 112px; width: 112px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .card:has(#logList) > header .ddx-btn { min-height: 27px; font-size: 12px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .card:has(#logList) > header .ddx-menu { left: auto; right: 0; width: 176px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #logFilterChip { order: 1; flex: 1 1 100%; min-width: 0; font-size: 12px; font-weight: 500 !important; color: var(--accent-text); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #logFilterName { overflow-wrap: anywhere; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #logFilterClear { min-height: 22px; font-size: 11.5px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #logCustom { order: 2; flex: 1 1 100%; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) #logCustom .input { flex: 1 1 0; min-width: 0; font-size: 12px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .card:has(#logList) > .body { padding: 0; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .logrow {
  grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ru wh" "ob ac"; gap: 2px 10px; padding: 7px 12px; border: 0; box-shadow: inset 0 -1px 0 var(--hair); font-size: 12.5px; align-items: start;
}
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .logrow:hover { background: var(--hover); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .logrow > :nth-child(1) { grid-area: wh; justify-self: end; font-size: 10.5px !important; line-height: 16px; letter-spacing: -.02em; white-space: nowrap; color: var(--text-dim) !important; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .logrow > :nth-child(2) { grid-area: ru; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500 !important; line-height: 16px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .logrow > :nth-child(3) { grid-area: ob; min-width: 0; overflow-wrap: anywhere; font-size: 12px; line-height: 1.3; color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .logrow > :nth-child(3) :is(.mono, br) { display: none; }   /* the id is in the row's title, and search still finds it */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .logrow > :nth-child(4) { grid-area: ac; justify-self: end; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .logrow .pill { display: inline-block; max-width: 130px; padding: 2px 6px; border: 0; font: 500 10.5px/1.25 var(--sans); letter-spacing: 0; white-space: normal; text-align: right; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .showall { margin: 6px 8px 8px; width: calc(100% - 16px); padding: 7px; border: 0; border-radius: var(--r-key); background: none; color: var(--text); font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .showall:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }

/* =====================================================================
   The drawer. Above the bar. The only brackets on these three screens.
   ===================================================================== */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd-scrim { position: fixed; inset: 0; z-index: 60; display: none; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd-scrim.show { display: block; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(560px, 100vw); --bi: 5px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); transform: translateX(105%); visibility: hidden; outline: 0;
  transition: transform var(--t3) var(--ease), visibility 0s linear var(--t3);
}
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd.show { transform: none; visibility: visible; transition: transform var(--t3) var(--ease); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd.v9-hero::after { z-index: 5; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd-in { display: flex; flex-direction: column; height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
/* the foot sits on the window's edge whether the form is short or long */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) :is(.v9-rd-in > .card, .v9-rd-in > .card > .body, .v9-rd-in > .card > .body > form) { display: flex; flex: 1 0 auto; flex-direction: column; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .card { margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .card > header { position: sticky; top: 0; z-index: 3; min-height: 50px; padding: 8px 14px 8px 16px; border-bottom: 1px solid var(--hair); background: var(--surface); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .card > header h2 { font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd-x { display: grid; place-items: center; width: 32px; height: 32px; margin-right: -4px; border: 0; border-radius: var(--r-key); background: none; color: var(--text-dim); cursor: pointer; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd-x:hover { background: var(--hover); color: var(--text); }
/* templates: one folded line at the top of the form */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .card .card > header { position: static; min-height: 40px; padding: 6px 16px; flex-wrap: nowrap; border-bottom: 1px solid var(--hair); background: var(--surface-2); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .card .card > header h2 { font-size: 13px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd #tplHead > span[style] { font-size: 11.5px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd #tplCount { flex: none; padding: 2px 6px; background: var(--surface); font: 500 10.5px/1.2 var(--mono); letter-spacing: -.02em; color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd #tplChev { width: 24px; height: 24px; color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd #tplBody { padding: 10px 16px; border-bottom: 1px solid var(--hair); background: var(--surface-2); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .tpltabs { gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .tpltab { flex: none; padding: 0 8px; min-height: 26px; border: 0; border-radius: 5px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font: 500 12px/1 var(--sans); color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .tpltab:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .tpltab.on { background: var(--accent); color: #fff; box-shadow: none; }
html.ui9.page-sc_rules .v9-rd .tpltab.on { color: #16160f; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .tplgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 300px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .tplcard { gap: 3px; padding: 9px 10px; border: 0; border-radius: var(--r-key); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .tplcard:hover { transform: none; border: 0; box-shadow: inset 0 0 0 1px var(--line-strong); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .tplcard b { gap: 6px; font-size: 12.5px; font-weight: 500; line-height: 1.25; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .tplcard b i { font-size: 13px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .tplcard span { font-size: 11.5px; line-height: 1.35; color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .tplcard .tpltag { margin-top: 2px; padding: 1px 5px; border-radius: var(--r-cap); background: var(--surface-2); color: var(--text-dim); font: 500 10px/1.3 var(--sans); }
/* the sections: hairlines, not boxes in boxes */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .card > .body { padding: 0; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .formsec { margin: 0; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; background: none; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .formsec-head { margin: 0 0 12px; gap: 7px; font-size: 13px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .formsec-head .n { width: 18px; height: 18px; border-radius: var(--r-cap); background: var(--surface-2); color: var(--text-dim); font: 500 10.5px/1 var(--mono); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .formsec-head b { font-size: 13px; font-weight: 600; letter-spacing: -.012em; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .formsec-head .sub { font-size: 11.5px; font-weight: 400; color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .field { margin-bottom: 10px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .row { gap: 10px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .formsec .row, html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .formsec .row3 { margin-bottom: 10px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .row3 { display: flex; flex-wrap: wrap; gap: 0 10px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .row3 > .field { flex: 1 1 0; min-width: 0; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .row3 > .field:has(#rName) { flex: 1 1 100%; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd #rAvWrap { flex: 0 0 84px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .formsec > .row3:last-child, html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .formsec > .row:last-child { margin-bottom: 0; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .formsec > .row3:last-child > .field, html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .formsec > .row:last-child > .field { margin-bottom: 0; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .scopebox { max-height: 132px; border: 0; border-radius: var(--r-key); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .scopebox label { min-width: 0; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .help { font-size: 11.5px; color: var(--text-dim); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .seg { display: inline-flex; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .cond { grid-template-columns: minmax(0, 1fr) 62px 104px 28px; gap: 6px; margin-bottom: 6px; padding: 0; border: 0; background: none; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .cond .input { box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .cond .cond-x { width: 28px; height: 28px; border-radius: 6px; color: var(--text-dim); font-size: 15px; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .cond .cond-x:hover { background: var(--rejected-bg); color: var(--rejected); }
/* the last section is at the foot of the drawer: its menus open upward, clear of the Save row */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .formsec:has(#rAction) .ddx-menu { top: auto; bottom: calc(100% + 6px); }
/* Save stays in reach however long the form is */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .form-actions {
  position: sticky; bottom: 0; z-index: 2; gap: 9px; min-height: 56px; margin-top: auto; padding: 10px 16px; border-top: 1px solid var(--hair); background: var(--surface);
}
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .form-actions label { font-size: 12.5px !important; font-weight: 500 !important; }
/* dressed selects: the same key as .input */
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .ddx-btn {
  min-height: 32px; padding: 0 9px 0 10px; border: 0; border-radius: var(--r-key); background: var(--surface); color: var(--text); font: 400 13px/1.2 var(--sans);
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--t1);
}
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .ddx-btn:hover { border: 0; box-shadow: inset 0 0 0 1px var(--line-strong); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .ddx.open .ddx-btn { border: 0; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--accent); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .ddx-menu { padding: 4px; border: 0; border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--line), var(--e2); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .ddx-menu button { padding: 7px 9px; border-radius: 5px; font-size: 12.5px; font-weight: 450; color: var(--text); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .ddx-menu button:hover { background: var(--hover); }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .ddx-menu button.sel { background: var(--accent-soft); color: var(--accent-text); font-weight: 500; }
html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .note { font-size: 12.5px; }

/* ---- the bar and the board give way ---- */
@media (max-width: 1320px) {
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .wrap > .card:has(#ruleList) { margin-bottom: 12px; }
}
@media (max-width: 1100px) {
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .topbar { flex-wrap: wrap; }
}
@media (max-width: 860px) {
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .pf-switch { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .pf-switch::-webkit-scrollbar { display: none; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .pf-switch.v9-more { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .topbar .brand { order: -2; flex: 1 1 calc(100% - 110px); }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rs-new { order: -1; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .topbar .spacer { display: none; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-cron { padding-left: 2px; flex: 1 1 auto; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule > .hd {
    grid-template-columns: 34px minmax(0, 1fr) auto 13px;
    grid-template-areas: "sw nm ev ch" "rd rd rd rd" "su su su su" "ac ac ac ac";
  }
  /* one line of switch and name, then the sentence the width of the row */
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .adot { display: none; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .switch { align-self: start; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) :is(.pf-switch a, #runAll, .v9-rs-new) { min-height: 36px; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule > .hd > .desc { display: block; white-space: normal; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc :is(.v9-if, .v9-win, .v9-then, .v9-of) { display: inline; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc > .v9-k { margin: 0 2px 0 5px; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc > .v9-k:first-child { margin-left: 0; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .desc > :is(.v9-win, .v9-of) { margin-left: 3px; }
  /* the keys wait behind a tap on the row: fifty rules stay a list, and Run now does not sit under the thumb */
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule:not(.open) .iwrap { display: none; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .sumline { white-space: normal; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule:not(.open) .sumline { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .iwrap { justify-content: flex-end; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .ibtn { width: 36px; height: 34px; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .rule .foot { padding-left: 12px; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .switch { position: relative; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .toast { bottom: calc(70px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .switch::before { content: ""; position: absolute; inset: -12px -6px; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd { width: 100vw; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .row, html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .row3 { grid-template-columns: minmax(0, 1fr); }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .tplgrid { grid-template-columns: minmax(0, 1fr); }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .row3 { flex-direction: column; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .row3 > .field, html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd #rAvWrap { flex: none; width: 100%; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .cond { grid-template-columns: minmax(0, 1fr) 58px 82px 28px; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd #tplHead > span[style] { display: none; }
  html.ui9:is(.page-rules, .page-tt_rules, .page-sc_rules) .v9-rd .form-actions { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}

/* =====================================================================
   Schedules: the 24-hour rail
   ===================================================================== */
html.ui9.page-schedules { --r24-n: 268px; --r24-d: 84px; }
/* the bar is added by the enhancer: its room is held from the first paint */
html.ui9.page-schedules:not(.ui9-ready) .wrap { padding-top: calc(var(--bar-h) + 4px); }
/* and the rail's, so the table does not jump when it arrives. The room is only held while ui9.js is on its way: once the shell is up it
   goes, and if the script never runs it lets go by itself, so a failed load keeps its content at the top. */
html.ui9.page-schedules:not(.ui9-ready) .wrap.stack { padding-top: calc(var(--bar-h) + 4px + 290px); animation: v9-r24-room 1ms linear 700ms forwards; }
@keyframes v9-r24-room { to { padding-top: calc(var(--bar-h) + 4px); } }
html.ui9.page-schedules .wrap.stack { gap: 10px; padding-bottom: 40px; }
html.ui9.page-schedules body > .v9-bar { flex-wrap: nowrap; }
html.ui9.page-schedules .v9-bar .spacer { flex: 1; }
html.ui9.page-schedules .v9-stabs { display: inline-flex; flex: 0 1 auto; min-width: 0; }
html.ui9.page-schedules .v9-stabs button { display: inline-flex; align-items: center; gap: 6px; flex: none; white-space: nowrap; }
html.ui9.page-schedules .v9-stabs .v9-n { font: 500 11px/1 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text-dim); }
html.ui9.page-schedules .v9-stabs .v9-n:empty { display: none; }
html.ui9.page-schedules .v9-stabs button.on .v9-n { color: inherit; opacity: .72; }
html.ui9.page-schedules .v9-stabs button.v9-bad::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rejected); }
/* the two new-job keys */
html.ui9.page-schedules :is(#add, #pSave) { background: var(--primary-bg); color: var(--primary-text); box-shadow: 0 1px 0 rgba(0,0,0,.25); }
html.ui9.page-schedules :is(#add, #pSave):hover { background: var(--primary-bg); color: var(--primary-text); box-shadow: 0 1px 0 rgba(0,0,0,.25); filter: brightness(1.25); }
html.ui9.page-schedules[data-theme="dark"] :is(#add, #pSave):hover { filter: brightness(.92); }

/* the shouted failure stays on top of every tab */
html.ui9.page-schedules #alertBar {
  margin: 0 !important; padding: 8px 12px !important; border-radius: var(--r-key) !important; background: var(--rejected-bg) !important; color: var(--rejected) !important; font-size: 12.5px; font-weight: 500 !important; line-height: 1.4; overflow-wrap: anywhere;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rejected) 45%, transparent);
}

/* the hero: an instrument set into the paper. Orange means this is the time it goes live. */
html.ui9.page-schedules .v9-r24 {
  --bi: 4px; margin: 0; padding: 10px 12px 12px; border-radius: var(--r-card); color: var(--on-bezel); background-color: var(--bezel-well);
  background-image: linear-gradient(rgba(244,239,228,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(244,239,228,.03) 1px, transparent 1px);
  background-size: 12px 12px; background-position: -1px -1px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.85), 0 0 0 1px var(--line);
}
/* the bezel lifts in dark: the instrument must not sink into the page */
html.ui9.page-schedules[data-theme="dark"] .v9-r24 { background-color: var(--bezel); box-shadow: inset 0 1px 3px rgba(0,0,0,.6), 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-schedules .v9-r24-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 18px; margin: 0 2px 6px; }
html.ui9.page-schedules .v9-r24 .v9-hud { color: var(--on-bezel-dim); }
html.ui9.page-schedules .v9-r24-h > .v9-hud { flex: none; }
html.ui9.page-schedules .v9-r24-nx { flex: 0 1 auto; min-width: 0; }
html.ui9.page-schedules .v9-r24-next { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; font-size: 12px; color: var(--on-bezel-dim); }
html.ui9.page-schedules .v9-r24-next b { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: var(--on-bezel); }
html.ui9.page-schedules .v9-r24-next em { flex: none; font: 500 11.5px/1 var(--mono); font-style: normal; letter-spacing: -.02em; color: var(--on-bezel-dim); }
html.ui9.page-schedules .v9-r24-next em:last-child { color: var(--hazard); }
html.ui9.page-schedules .v9-r24-b { position: relative; }
html.ui9.page-schedules .v9-r24-ax { position: relative; height: 18px; margin: 0 var(--r24-d) 0 var(--r24-n); }
html.ui9.page-schedules .v9-r24-ax span { position: absolute; top: 2px; transform: translateX(-50%); font: 500 10px/1 var(--mono); color: var(--on-bezel-faint); }
html.ui9.page-schedules .v9-r24-ax span.v9-hide { opacity: 0; }
html.ui9.page-schedules .v9-r24-row {
  display: grid; grid-template-columns: var(--r24-n) minmax(0, 1fr) var(--r24-d); align-items: center; width: 100%; height: 24px; padding: 0; border: 0; border-radius: 4px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background var(--t1);
}
html.ui9.page-schedules .v9-r24-row:hover { background: rgba(244,239,228,.05); }
html.ui9.page-schedules .v9-r24-row:focus-visible { outline: 2px solid var(--led); outline-offset: -1px; }
html.ui9.page-schedules .v9-r24-n { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 12px 0 4px; font-size: 12.5px; line-height: 1.2; color: var(--on-bezel); }
html.ui9.page-schedules .v9-r24-n span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui9.page-schedules .v9-r24-n i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: rgba(244,239,228,.16); }
html.ui9.page-schedules .v9-r24-row.now .v9-r24-n i { background: var(--led); box-shadow: 0 0 0 2px var(--led-soft); }
html.ui9.page-schedules .v9-r24-row.bad .v9-r24-n i { width: 8px; height: 8px; margin: 0 -1px; background: none; box-shadow: inset 0 0 0 2px var(--hazard); }   /* a failure changes shape, not just hue */
html.ui9.page-schedules .v9-r24-row.bad .v9-r24-d { color: var(--hazard); }
html.ui9.page-schedules .v9-r24-row.ghost .v9-r24-n { color: var(--on-bezel-faint); }
html.ui9.page-schedules .v9-r24-tr { position: relative; display: block; height: 100%; box-shadow: inset 0 -1px 0 rgba(244,239,228,.07); }
html.ui9.page-schedules .v9-r24-tr::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(244,239,228,.09) 0 1px, transparent 1px 12.5%);
}
html.ui9.page-schedules .v9-r24-seg { position: absolute; top: 7px; bottom: 7px; border-radius: 2px; background: var(--led); box-shadow: 0 0 8px -1px color-mix(in srgb, var(--led) 60%, transparent); }
html.ui9.page-schedules .v9-r24-seg.idle { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--led) 55%, transparent) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--led) 50%, transparent); }
html.ui9.page-schedules .v9-r24-row.ghost .v9-r24-seg { background: none; box-shadow: inset 0 0 0 1px var(--on-bezel-faint); }
html.ui9.page-schedules .v9-r24-off { position: absolute; top: 5px; bottom: 5px; width: 2px; margin-left: -1px; background: var(--on-bezel-dim); }
html.ui9.page-schedules .v9-r24-t { position: absolute; top: 50%; font: 500 10.5px/1 var(--mono); letter-spacing: -.03em; color: var(--on-bezel-dim); white-space: nowrap; }
html.ui9.page-schedules .v9-r24-t.out-l { transform: translate(calc(-100% - 5px), -50%); }
html.ui9.page-schedules .v9-r24-t.out-r { transform: translate(5px, -50%); }
html.ui9.page-schedules .v9-r24-t.in-l { transform: translate(4px, -50%); color: var(--go-ink); }
html.ui9.page-schedules .v9-r24-t.in-r { transform: translate(calc(-100% - 4px), -50%); color: var(--go-ink); }
html.ui9.page-schedules .v9-r24-t.on-idle { color: var(--on-bezel-dim); }
html.ui9.page-schedules .v9-r24-row.ghost .v9-r24-t { color: var(--on-bezel-faint); }
html.ui9.page-schedules .v9-r24-d { padding-left: 10px; font: 500 10.5px/1 var(--mono); letter-spacing: -.02em; color: var(--on-bezel-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-schedules .v9-r24-row.ghost .v9-r24-d { color: var(--on-bezel-faint); }
html.ui9.page-schedules .v9-r24-now {
  position: absolute; top: 0; bottom: 0; width: 1px; pointer-events: none; background: var(--on-bezel);
  left: calc(var(--r24-n) + (100% - var(--r24-n) - var(--r24-d)) * var(--p, 0));
}
html.ui9.page-schedules .v9-r24-now span {
  position: absolute; top: 0; left: 0; transform: translateX(calc(-50% + var(--fx, 0px))); padding: 2px 4px; border-radius: 3px; background: var(--on-bezel); color: var(--bezel-well);
  font: 500 10px/1 var(--mono); white-space: nowrap;
}
html.ui9.page-schedules .v9-r24-now span b { font-weight: 500; }
/* no jobs, or the read failed: the instrument stays, with one line in it */
html.ui9.page-schedules .v9-r24-none { position: relative; z-index: 1; display: grid; justify-items: center; align-content: center; gap: 10px; min-height: 124px; }
html.ui9.page-schedules .v9-r24-none p { margin: 0; padding: 0 8px; background: var(--bezel-well); font-size: 14px; color: var(--on-bezel); }
html.ui9.page-schedules[data-theme="dark"] .v9-r24-none p { background: var(--bezel); }
html.ui9.page-schedules .v9-r24-warn { color: var(--hazard); font-size: 12px; }
html.ui9.page-schedules .v9-r24.v9-r24-old .v9-r24-b { opacity: .45; }

/* one scroller: the page. The inline max-heights go, heads stick under the bar. */
html.ui9.page-schedules .card { margin: 0; overflow: clip; }
html.ui9.page-schedules .card > header { min-height: 38px; padding: 6px 12px; gap: 8px; }
html.ui9.page-schedules .card > header .sub { font-size: 12px; color: var(--text-dim); }
html.ui9.page-schedules .tbl { max-height: none !important; overflow: visible; }
/* the NewsBreak link lands on #guards: the tab's top is the place, with its head and band in view */
html.ui9.page-schedules #guards { scroll-margin-top: 100vh; }
/* the head has nothing to say over a one-line empty row */
html.ui9.page-schedules .tbl:has(tbody td.empty[colspan]) thead { display: none; }
html.ui9.page-schedules .tbl + .tbl { border-top: 8px solid var(--bg); }
html.ui9.page-schedules .tbl table th { top: calc(var(--shell-h) + var(--bar-h)); z-index: 2; padding-left: 10px; padding-right: 10px; }
html.ui9.page-schedules td { padding: 6px 10px; font-size: 12.5px; }
html.ui9.page-schedules tbody tr:hover td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
html.ui9.page-schedules tbody tr.v9-r24-hit td { background: var(--accent-soft); }
html.ui9.page-schedules .nm { font-weight: 500; }
html.ui9.page-schedules .pill { padding: 2px 6px; border: 0; font: 500 10.5px/1.25 var(--sans); letter-spacing: 0; }
html.ui9.page-schedules .mono { font-size: 11.5px; letter-spacing: -.02em; }
html.ui9.page-schedules td .muted { color: var(--text-dim); }
html.ui9.page-schedules .msg { max-width: 360px; font-size: 11.5px; line-height: 1.35; color: var(--text-dim); }
/* a long unbroken name wraps, so a table can never push its keys out of the card */
html.ui9.page-schedules :is(#jobs, #guards, #cjobs, #logs, #glogs) :is(.nm, .muted, .msg), html.ui9.page-schedules #logs td:nth-child(2), html.ui9.page-schedules #glogs td:is(:nth-child(2), :nth-child(3)) { overflow-wrap: anywhere; }
html.ui9.page-schedules :is(#jobs, #guards, #cjobs) .nm { max-width: 320px; }
html.ui9.page-schedules :is(#jobs, #guards) div.msg { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
html.ui9.page-schedules #jobs td:nth-child(2) .muted { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui9.page-schedules #jobs td:nth-child(2) .muted { color: var(--text); }
/* names first, ids as reference */
html.ui9.page-schedules #jobs td:nth-child(2) .mono, html.ui9.page-schedules #guards td:nth-child(2) { font-size: 11px; color: var(--text-dim); }
html.ui9.page-schedules #jobs td:nth-child(4) { font: 500 12.5px/1 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
html.ui9.page-schedules :is(#jobs, #guards) td:last-child:not([colspan]) { white-space: nowrap; text-align: right; }
html.ui9.page-schedules td .btn-sm + .btn-sm { margin-left: 2px; }
html.ui9.page-schedules :is(#jobs, #guards) td:last-child > * { vertical-align: middle; }
/* Disable and Enable are a switch. The word stays for readers and the handler; it reads data-tog. */
html.ui9.page-schedules .btn.v9-swk {
  position: relative; width: 34px; min-width: 34px; height: 19px; min-height: 19px; margin: 0 6px; padding: 0; border-radius: 999px; background: var(--line-strong); box-shadow: none; color: transparent; font-size: 0; transition: background var(--t1);
}
html.ui9.page-schedules .btn.v9-swk:hover { background: var(--line-strong); box-shadow: none; color: transparent; }
html.ui9.page-schedules .btn.v9-swk::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform var(--t1); }
html.ui9.page-schedules .btn.v9-swk.on, html.ui9.page-schedules .btn.v9-swk.on:hover { background: var(--live); }
html.ui9.page-schedules .btn.v9-swk.on::after { transform: translateX(15px); }
html.ui9.page-schedules .btn.v9-swk:focus-visible { outline-offset: 3px; border-radius: 999px; }
/* Log and Edit are icons. Run now keeps its words and the live mark. */
html.ui9.page-schedules .btn.v9-ik { width: 27px; min-height: 27px; padding: 0; background: none; box-shadow: none; color: var(--text-dim); }
html.ui9.page-schedules .btn.v9-ik:hover { background: var(--surface-2); box-shadow: none; color: var(--text); }
html.ui9.page-schedules .btn.v9-live::before { margin-right: 0; }
html.ui9.page-schedules .btn .spin { width: 12px; height: 12px; }
html.ui9.page-schedules :is(#logs, #glogs, #cjobs) td { vertical-align: top; }
html.ui9.page-schedules :is(#logs, #glogs) td:first-child { font: 500 11.5px/1.5 var(--mono); letter-spacing: -.02em; white-space: nowrap; color: var(--text-dim); }
/* a failed run carries the same spine as a failing rule */
html.ui9.page-schedules :is(#logs, #glogs, #cjobs) tr:has(.p-fail) td:first-child { box-shadow: inset 2px 0 0 var(--rejected); }
/* a break between days: the log reads as days, not one long run of OK */
html.ui9.page-schedules tr.v9-logday td, html.ui9.page-schedules tbody tr.v9-logday:hover td { padding: 10px 10px 4px; background: var(--surface-2); border-bottom: 1px solid var(--hair); }
html.ui9.page-schedules tr.v9-logday .v9-hud { color: var(--text-dim); }
/* Claude tasks: plain words, and the raw cron stays in the title */
html.ui9.page-schedules #cjobs td.mono.v9-cron-w { font: 450 12.5px/1.3 var(--sans); letter-spacing: 0; white-space: nowrap; }
html.ui9.page-schedules .card > .note { padding: 8px 12px; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; background: var(--surface-2); font-size: 12px; color: var(--text-dim); }
html.ui9.page-schedules .copy { min-height: 22px; padding: 0 7px; border: 0; border-radius: 5px; background: none; box-shadow: inset 0 0 0 1px var(--line); font-size: 11px; font-weight: 500; }
html.ui9.page-schedules .v9-stale { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: var(--r-cap); background: var(--review-bg); color: var(--review); font: 500 11px/1 var(--sans); white-space: nowrap; }
html.ui9.page-schedules #cjobs td:last-child { white-space: nowrap; }
html.ui9.page-schedules #cjobs td:last-child .mono { font-size: 10.5px; }
/* all on: the column says nothing */
html.ui9.page-schedules .tbl:has(#cjobs.v9-allon) :is(th, td):nth-child(3) { display: none; }
@media (min-width: 1101px) {
  html.ui9.page-schedules #cjobs td:is(:nth-child(4), :nth-child(5)) { white-space: nowrap; }
  html.ui9.page-schedules #jobs td:nth-child(6) { white-space: nowrap; }
  html.ui9.page-schedules #jobs td:nth-child(5) { min-width: 92px; }
}
html.ui9.page-schedules .empty { padding: 28px 12px; font-size: 13px; color: var(--text-dim); }
/* not an admin: one line, and the server stays the guard */
html.ui9.page-schedules.v9-sched-denied .v9-stabs { opacity: .45; }
html.ui9.page-schedules.v9-sched-denied :is(#add, .v9-r24, .v9-rs-well, .card > header, .card > .note) { display: none; }
html.ui9.page-schedules.v9-sched-denied .card { margin-top: 10px; }
html.ui9.page-schedules.v9-sched-denied .tbl + .tbl { display: none; }
html.ui9.page-schedules.v9-sched-denied td.empty { padding: 96px 16px; font-size: 14px; text-align: center; }

/* #panel: above the bar, out of the tab order while closed */
html.ui9.page-schedules #panel { border: 0; border-radius: 0; visibility: hidden; transition: transform var(--t3) var(--ease), visibility 0s linear var(--t3); }
html.ui9.page-schedules #panel.show { visibility: visible; transition: transform var(--t3) var(--ease); }
html.ui9.page-schedules #panel > header { min-height: 50px; padding: 8px 14px 8px 16px; }
html.ui9.page-schedules #pClose { width: 32px; min-height: 32px; padding: 0; background: none; box-shadow: none; color: var(--text-dim); }
html.ui9.page-schedules #pClose:hover { background: var(--hover); box-shadow: none; color: var(--text); }
html.ui9.page-schedules #panel .body { gap: 11px; padding: 14px 16px; }
html.ui9.page-schedules #panel .f { gap: 6px; }
html.ui9.page-schedules #panel > footer { padding: 10px 16px; border-top-color: var(--hair); }
html.ui9.page-schedules #panel :is(.f .input, .f select) { font-family: var(--sans); font-size: 13px; letter-spacing: 0; text-transform: none; }
html.ui9.page-schedules #panel .input.mono { font-family: var(--mono); letter-spacing: -.02em; }
html.ui9.page-schedules #panel .hint { font-family: var(--sans); font-size: 11.5px; letter-spacing: 0; text-transform: none; color: var(--text-dim); }
html.ui9.page-schedules #fDays { gap: 3px; }
html.ui9.page-schedules #fDays label {
  position: relative; display: inline-grid; place-items: center; min-width: 40px; height: 28px; padding: 0 6px; border-radius: 5px; background: var(--surface); color: var(--text-dim);
  box-shadow: inset 0 0 0 1px var(--line); font: 500 12px/1 var(--sans); letter-spacing: 0; text-transform: none; cursor: pointer;
}
html.ui9.page-schedules #fDays label:has(input:checked) { background: var(--primary-bg); color: var(--primary-text); box-shadow: none; }
html.ui9.page-schedules #fDays label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
html.ui9.page-schedules #fDays input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
html.ui9.page-schedules #pDel { color: var(--rejected); }

@media (max-width: 1240px) {
  html.ui9.page-schedules { --r24-n: 200px; --r24-d: 76px; }
  html.ui9.page-schedules .msg { max-width: 260px; }
}
@media (max-width: 1100px) {
  html.ui9.page-schedules #jobs td:nth-child(2) .muted { max-width: 170px; }
  html.ui9.page-schedules td { padding-left: 8px; padding-right: 8px; }
  html.ui9.page-schedules .tbl table th { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 680px) {
  html.ui9.page-schedules body > .v9-bar { flex-wrap: wrap; }
  html.ui9.page-schedules .v9-stabs { flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
  html.ui9.page-schedules .v9-stabs::-webkit-scrollbar { display: none; }
  html.ui9.page-schedules .v9-bar .spacer { display: none; }
}
/* every row is a ticket here: no sideways tables. Run now stays on the ticket, unlike a rule row's: here the page asks before it runs, so a stray thumb stops at the confirm. */
@media (max-width: 900px) {
  html.ui9.page-schedules :is(#jobs, #guards, #logs, #glogs) { display: block; }
  html.ui9.page-schedules #cjobs { display: flex; flex-direction: column; }
  html.ui9.page-schedules #cjobs tr:has(.p-fail) { order: -1; }
  html.ui9.page-schedules .tbl:has(:is(#jobs, #guards, #logs, #glogs, #cjobs)) thead { display: none; }
  html.ui9.page-schedules .tbl:has(:is(#jobs, #guards, #logs, #glogs, #cjobs)) table { display: block; }
  html.ui9.page-schedules :is(#jobs, #guards, #logs, #glogs, #cjobs) tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 9px 12px; border-bottom: 1px solid var(--hair); }
  html.ui9.page-schedules :is(#jobs, #guards, #logs, #glogs, #cjobs) td { display: block; min-width: 0; height: auto; padding: 0; border: 0; }
  html.ui9.page-schedules :is(#jobs, #guards, #logs, #glogs, #cjobs) td[colspan] { flex: 1 1 100%; }
  html.ui9.page-schedules :is(#logs, #glogs, #cjobs) tr:has(.p-fail) { box-shadow: inset 2px 0 0 var(--rejected); }
  html.ui9.page-schedules :is(#logs, #glogs, #cjobs) tr:has(.p-fail) td:first-child { box-shadow: none; }
  html.ui9.page-schedules tr.v9-logday { padding: 8px 12px 4px; background: var(--surface-2); }
  html.ui9.page-schedules tr.v9-logday td, html.ui9.page-schedules tbody tr.v9-logday:hover td { padding: 0; border: 0; background: none; }
  html.ui9.page-schedules :is(#logs, #glogs) tr { gap: 3px 10px; padding: 7px 12px; }
  /* Run log: the job, then when, action and result on one line, then what happened */
  html.ui9.page-schedules #logs td:nth-child(2) { order: -1; flex: 1 1 100%; font-weight: 500; }
  html.ui9.page-schedules #logs td:nth-child(6) { order: 1; flex: 1 1 100%; }
  html.ui9.page-schedules #glogs td:nth-child(2) { order: -2; flex: 1 1 100%; font-weight: 500; }
  html.ui9.page-schedules #glogs td:nth-child(3) { order: -1; flex: 1 1 100%; color: var(--text-dim); }
  html.ui9.page-schedules #glogs td:nth-child(5) { order: 1; flex: 1 1 100%; }
  html.ui9.page-schedules #cjobs td:first-child { flex: 1 1 100%; }
  html.ui9.page-schedules #cjobs td:nth-child(5):not(:empty)::before { content: "Next "; color: var(--text-dim); }
  html.ui9.page-schedules #cjobs td:nth-child(6) { flex: 1 1 100%; }
  html.ui9.page-schedules :is(#jobs, #guards, #cjobs) .nm { max-width: none; }
  html.ui9.page-schedules .tbl { overflow-x: auto; }
  html.ui9.page-schedules .tbl table th { top: 0; }
  html.ui9.page-schedules :is(#jobs, #guards) td:is(:first-child, :nth-child(2)) { flex: 1 1 100%; min-width: 0; }
  html.ui9.page-schedules #jobs td:nth-child(7) { flex: 1 1 100%; min-width: 0; }
  html.ui9.page-schedules #guards td:is(:nth-child(3), :nth-child(5)) { flex: 1 1 100%; min-width: 0; }
  html.ui9.page-schedules #guards td:nth-child(2) { flex: 0 1 auto; }     /* campaign and Every share a line */
  html.ui9.page-schedules #guards td:nth-child(3) { order: 1; }
  html.ui9.page-schedules #guards td:nth-child(5) { order: 2; }
  html.ui9.page-schedules #guards td:last-child { order: 3; }
  html.ui9.page-schedules :is(#jobs, #guards) td:last-child:not([colspan]) { flex: 1 1 100%; display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-height: 36px; }
  html.ui9.page-schedules #jobs td:nth-child(2) .muted, html.ui9.page-schedules .msg { max-width: none; white-space: normal; }
  html.ui9.page-schedules .btn.v9-ik { width: 36px; min-height: 36px; }
  html.ui9.page-schedules :is(.v9-stabs button, #reload, #add, td .btn-sm:not(.v9-swk)) { min-height: 36px; }
  html.ui9.page-schedules .v9-stabs.v9-more { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); }
  html.ui9.page-schedules .btn.v9-swk::before { content: ""; position: absolute; inset: -12px -6px; }
}
@media (max-width: 760px) {
  html.ui9.page-schedules { --r24-n: 0px; --r24-d: 0px; }
  html.ui9.page-schedules .v9-r24-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n d" "t t"; height: auto; padding: 5px 0 6px; row-gap: 3px; }
  html.ui9.page-schedules .v9-r24-n { grid-area: n; }
  html.ui9.page-schedules .v9-r24-d { grid-area: d; }
  html.ui9.page-schedules .v9-r24-tr { grid-area: t; height: 14px; }
  html.ui9.page-schedules .v9-r24-seg { top: 3px; bottom: 3px; }
  html.ui9.page-schedules .v9-r24-t { display: none; }
  /* rows stack here: the flag stays on the axis and each track carries its own mark, so no name is struck through */
  html.ui9.page-schedules .v9-r24-now { bottom: auto; height: 18px; }
  html.ui9.page-schedules .v9-r24-tr::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--p, 0) * 100%); width: 1px; background: var(--on-bezel); pointer-events: none; }
  html.ui9.page-schedules .v9-r24-next b { display: none; }
  html.ui9.page-schedules .tbl { -webkit-overflow-scrolling: touch; }
}

/* ===== 41-links-logs.css ===== */
/* =====================================================================
   41 Links and Log (DESIGN.md 4.13, 4.14). Each has a composition of its
   own: Log is a tape with a spine, Links is a directory under an ink cap.
   ===================================================================== */

/* ===================== Log: the flight recorder ===================== */
html.ui9.page-logs { --bar-h: 50px; }
html.ui9.page-logs body > .topbar { padding: 8px var(--gut); flex-wrap: wrap; row-gap: 8px; }
html.ui9.page-logs .topbar .spacer { min-width: 0; }
html.ui9.page-logs .topbar #fSearch { flex: 0 1 170px; min-width: 0; }
html.ui9.page-logs #fCustom .input { width: 136px !important; }
html.ui9.page-logs #reload { min-height: 32px; }

/* one 34px strip inside the bar: value over label, the band's own language */
html.ui9.page-logs #stats { margin: 0; }
html.ui9.page-logs .wrap > #stats:empty { display: none; }
html.ui9.page-logs .topbar #stats { display: flex; flex: 0 1 auto; min-width: 0; height: 34px; margin-left: 6px; }
html.ui9.page-logs .topbar #stats > .stat {
  display: flex; flex-direction: column; justify-content: center; flex: 1 1 auto; min-height: 0; padding: 0 10px; white-space: nowrap;
}
html.ui9.page-logs .topbar #stats > .stat b { font-size: 13px; line-height: 14px; }
html.ui9.page-logs .topbar #stats > .stat span { line-height: 12px; color: var(--text-dim); }
html.ui9.page-logs .topbar #stats:empty { border-color: transparent; background: none; }
html.ui9.page-logs:has(#list .spin) .topbar #stats:empty {
  width: 404px; border-color: var(--line); animation: v9-shimmer 1.6s linear infinite;
  background: linear-gradient(90deg, var(--surface) 30%, var(--mat) 50%, var(--surface) 70%) 0 0 / 200% 100%;
}
/* Failed is a key, so it looks like one: a chip set into the band, clear of the band's hairlines */
html.ui9.page-logs .topbar #stats > .stat[data-ux-failed] {
  margin: 3px; padding: 0 8px; border-radius: var(--r-cap); cursor: pointer; transition: background var(--t1), box-shadow var(--t1);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rejected) 35%, transparent);
}
html.ui9.page-logs .topbar #stats > .stat[data-ux-failed]:hover { background: var(--hover); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rejected) 60%, transparent); }
html.ui9.page-logs .topbar #stats > .stat[data-ux-failed][aria-pressed="true"] { background: var(--rejected-bg); box-shadow: inset 0 0 0 1.5px var(--rejected); }
html.ui9.page-logs .topbar #stats > .stat[data-ux-failed]:focus-visible { outline-offset: 1px; }

/* the tape lies straight on the paper: no card round it */
html.ui9.page-logs .wrap > .card { margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
html.ui9.page-logs .wrap > .card > header { flex-wrap: nowrap; min-height: 27px; padding: 0; gap: 8px; border: 0; }
/* the page's name is in the bar: this one only labels the section */
html.ui9.page-logs .wrap > .card > header h2 { font: 500 12.5px/1.2 var(--sans); letter-spacing: 0; color: var(--text-dim); }
html.ui9.page-logs #csv { margin-right: -10px; }   /* its text, not its ghost ground, ends on the row edge */
html.ui9.page-logs #countNote { font: 500 12px/1 var(--mono) !important; letter-spacing: -.01em; color: var(--text-dim) !important; font-variant-numeric: tabular-nums; }
html.ui9.page-logs .card .body { padding: 1px 0 0; }

/* the spine */
html.ui9.page-logs #list { --gutter: 86px; --spine: 76px; --row: 38px; --gap: 5px; }
html.ui9.page-logs .grp { position: relative; margin: 0 0 var(--gap); padding-left: var(--gutter); border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
html.ui9.page-logs .grp::before { left: var(--spine); top: 0; bottom: calc(-1 * var(--gap)); width: 1px; background: var(--line-strong); }
html.ui9.page-logs .grp:last-child::before { bottom: calc(100% - var(--row) / 2); }
html.ui9.page-logs .grp:has(+ .v9-lday)::before { bottom: -15px; }
/* dots by result: a whole launch, a mixed one, one where nothing went */
html.ui9.page-logs .grp::after {
  box-sizing: border-box; left: calc(var(--spine) - 4px); top: calc(var(--row) / 2 - 4.5px); width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--live); background: var(--bg);
}
html.ui9.page-logs .grp[data-ux-res="ok"]::after { background: var(--live); border-color: var(--live); box-shadow: 0 0 0 2px var(--bg); }
html.ui9.page-logs .grp[data-ux-res="part"]::after { background: var(--bg); border-color: var(--review); box-shadow: 0 0 0 2px var(--bg); }
html.ui9.page-logs .grp[data-ux-res="bad"]::after { background: var(--rejected); border-color: var(--rejected); box-shadow: 0 0 0 2px var(--bg); }

/* day dividers: the date sits in the gutter, so a divider costs 10px, not a row */
html.ui9.page-logs .v9-lday { position: relative; height: 0; margin-top: 10px; }
html.ui9.page-logs .v9-lday:first-child { margin-top: 0; }
html.ui9.page-logs .v9-lday::after { content: ""; position: absolute; left: 0; right: 0; top: -5px; height: 1px; background: var(--line); }
html.ui9.page-logs .v9-lday:first-child::after { content: none; }
html.ui9.page-logs .v9-lday b, html.ui9.page-logs .v9-lday span { position: absolute; left: 0; width: calc(var(--spine) - 10px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-logs .v9-lday b { top: 5px; width: calc(var(--spine) - 6px); font: 600 12px/14px var(--sans); letter-spacing: -.015em; color: var(--text); }
html.ui9.page-logs .v9-lday span { top: 20px; font: 500 10.5px/12px var(--mono); color: var(--text-dim); }

/* one line per launch, columns held so the eye can run down them */
html.ui9.page-logs .grp > .hd {
  display: grid; grid-template-columns: 16px minmax(0, 1fr) 86px minmax(0, 168px) 52px 76px 62px 112px 12px; column-gap: 10px; align-items: center;
  min-height: var(--row); padding: 0 12px 0 11px; border-radius: var(--r-key); background: var(--surface); box-shadow: 0 0 0 1px var(--line);
  font: 500 13px/1.25 var(--sans); transition: box-shadow var(--t1), background var(--t1);
}
html.ui9.page-logs .grp > .hd:hover { box-shadow: 0 0 0 1px var(--line-strong); }
html.ui9.page-logs .grp > .hd:focus-visible { outline-offset: 1px; }
html.ui9.page-logs .grp > .hd > * { grid-row: 1; }
html.ui9.page-logs .grp > .hd .plogo { grid-column: 1; }
html.ui9.page-logs .plogo svg { width: 16px; height: 16px; border-radius: 4px; }
html.ui9.page-logs .grp > .hd .nm { grid-column: 2; font-weight: 500; color: var(--text); }
html.ui9.page-logs .grp > .hd .v9-actor { grid-column: 3; justify-self: start; }
html.ui9.page-logs .grp > .hd > .muted:not(.mono) { grid-column: 4; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 400; color: var(--text-dim) !important; }
html.ui9.page-logs .grp > .hd > .pill { padding: 0; background: none; font: 500 12px/1 var(--mono); letter-spacing: -.02em; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
html.ui9.page-logs .grp > .hd > .pill.on { grid-column: 5; color: var(--text); }
html.ui9.page-logs .grp > .hd > .pill.off { grid-column: 6; color: var(--text-dim); }
html.ui9.page-logs .grp > .hd > .pill.err { grid-column: 7; color: var(--rejected); }
html.ui9.page-logs .grp > .hd > .mono { grid-column: 8; text-align: right; font: 500 11.5px/1 var(--mono); letter-spacing: -.02em; color: var(--text-dim) !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* the chevron turns on .grp.open */
html.ui9.page-logs .grp > .hd::after {
  content: ""; grid-column: 9; grid-row: 1; justify-self: center; width: 6px; height: 6px; margin-top: -3px;
  border: solid var(--text-faint); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform var(--t1) var(--ease);
}
html.ui9.page-logs .grp.open > .hd::after { transform: translateY(3px) rotate(-135deg); }
html.ui9.page-logs .grp.open > .hd { border-radius: var(--r-key) var(--r-key) 0 0; background: var(--surface-2); }

/* who pressed Launch. Claude's third of the log stands out. */
html.ui9.page-logs .v9-actor { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; font: 500 11.5px/1 var(--sans); color: var(--text-dim); white-space: nowrap; }
html.ui9.page-logs .v9-actor .tx { overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-logs .v9-actor i { font: 500 10.5px/1 var(--mono); font-style: normal; opacity: .75; }
html.ui9.page-logs .v9-actor.is-claude { padding: 4px 6px 4px 5px; border-radius: var(--r-cap); background: var(--bezel); color: var(--claude); }
html.ui9.page-logs .v9-actor .v9-i { width: 11px; height: 11px; }
/* --bezel is nearly the row's own colour in dark: one step up, and a thread of Claude's colour */
html.ui9.page-logs[data-theme="dark"] .v9-actor.is-claude { background: var(--bezel-3); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--claude) 28%, transparent); }

/* an open launch */
html.ui9.page-logs .grp .rows { margin: 0; border: 0; border-radius: 0 0 var(--r-key) var(--r-key); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
html.ui9.page-logs .grp.open { margin-bottom: calc(var(--gap) + 4px); }
html.ui9.page-logs .grp.open::before { bottom: calc(-1 * var(--gap) - 4px); }
html.ui9.page-logs .grp.open:last-child::before { bottom: calc(100% - var(--row) / 2); }
html.ui9.page-logs .grp.open:has(+ .v9-lday)::before { bottom: -19px; }
html.ui9.page-logs .row { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 76px 212px; gap: 12px; min-height: 40px; padding: 6px 34px 6px 37px; border-top: 1px solid var(--hair); font-size: 12.5px; line-height: 1.3; }
html.ui9.page-logs .row:first-child { border-top: 0; }
html.ui9.page-logs .row > div { min-width: 0; overflow-wrap: anywhere; }
html.ui9.page-logs .row .muted { color: var(--text-dim); }
html.ui9.page-logs .row .pill { display: inline-block; padding: 3px 6px; font: 500 10px/1 var(--mono); letter-spacing: .04em; border-radius: var(--r-cap); }
html.ui9.page-logs .row .mono { font-size: 11px; line-height: 1.35; letter-spacing: -.02em; }
/* the times run down the head's own time column: its right edge is 12px padding, the chevron and the gap in */
html.ui9.page-logs .row > .mono { text-align: right; }
html.ui9.page-logs .row[data-ux-noid] .mono br { display: none; }
html.ui9.page-logs .errline { font-size: 12px; line-height: 1.35; }

html.ui9.page-logs #list .empty { padding: 44px 12px; border-radius: var(--r-card); background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--text-dim); font-size: 13px; }
/* an empty tape is still the tape: a stub of spine, one hollow dot, the words where a launch would sit */
html.ui9.page-logs #list .empty:not(:has(.spin)) { position: relative; margin-left: var(--gutter); padding: 14px 16px; border-radius: var(--r-key); text-align: left; }
html.ui9.page-logs #list .empty:not(:has(.spin))::before { content: ""; position: absolute; left: calc(var(--spine) - var(--gutter)); top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
html.ui9.page-logs #list .empty:not(:has(.spin))::after {
  content: ""; position: absolute; box-sizing: border-box; left: calc(var(--spine) - var(--gutter) - 4px); top: calc(50% - 4.5px); width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--line-strong); background: var(--bg); box-shadow: 0 0 0 2px var(--bg);
}
html.ui9.page-logs #list .empty[style*="rejected"]::after { border-color: var(--rejected); }
/* loading: the tape's shape, not a spinner in a hole */
html.ui9.page-logs #list .empty:has(.spin) {
  height: 420px; padding: 0; color: transparent; box-shadow: none; animation: v9-shimmer 1.6s linear infinite; margin-left: var(--gutter);
  background:
    linear-gradient(90deg, transparent 30%, color-mix(in srgb, var(--surface) 70%, transparent) 50%, transparent 70%) 0 0 / 200% 100%,
    repeating-linear-gradient(var(--mat) 0 var(--row), transparent var(--row) calc(var(--row) + var(--gap)));
}
html.ui9.page-logs #list .empty .spin { display: none; }

@media (max-width: 1320px) {
  html.ui9.page-logs .grp > .hd { grid-template-columns: 16px minmax(0, 1fr) 84px minmax(0, 128px) 46px 70px 56px 108px 12px; column-gap: 8px; }
  html.ui9.page-logs .row { padding-right: 32px; }
  html.ui9.page-logs .topbar #fSearch { flex-basis: 130px; }
}
@media (max-width: 1320px) and (min-width: 1100px) {
  html.ui9.page-logs .topbar #stats > .stat { padding: 0 7px; }
}
@media (max-width: 1160px) and (min-width: 1100px) {
  html.ui9.page-logs .topbar #fSearch { flex-basis: 96px; }
  html.ui9.page-logs .topbar select.input { padding-right: 22px; background-position: right 5px center; }
}
/* custom dates need the room, so the strip takes its own line */
html.ui9.page-logs .topbar:has(#fCustom[style*="inline-flex"]) #stats { order: 20; flex: 1 0 100%; margin-left: 0; }

@media (max-width: 1099px) {
  html.ui9.page-logs .topbar #stats { order: 20; flex: 1 0 100%; margin-left: 0; }
  html.ui9.page-logs .topbar .spacer { display: none; }
  html.ui9.page-logs .topbar .brand { margin-right: auto; }
  html.ui9.page-logs .topbar #fSearch { flex: 0 1 170px; min-width: 90px; }
  html.ui9.page-logs .row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 72px 190px; }
}
@media (max-width: 860px) { html.ui9.page-logs .topbar #fSearch { flex: 1 1 90px; } }
/* two lines a launch: the name keeps the room */
@media (max-width: 1000px) {
  html.ui9.page-logs .grp > .hd { grid-template-columns: 16px auto minmax(0, 1fr) auto auto auto auto 12px; row-gap: 6px; padding-top: 8px; padding-bottom: 8px; }
  html.ui9.page-logs .grp > .hd .nm { grid-column: 2 / 7; }
  html.ui9.page-logs .grp > .hd > .mono { grid-column: 7; grid-row: 1; }
  html.ui9.page-logs .grp > .hd::after { grid-column: 8; }
  html.ui9.page-logs .grp > .hd .v9-actor { grid-column: 2; grid-row: 2; }
  html.ui9.page-logs .grp > .hd > .muted:not(.mono) { grid-column: 3; grid-row: 2; }
  html.ui9.page-logs .grp > .hd > .pill { grid-row: 2; text-align: left; }
  html.ui9.page-logs .grp > .hd > .pill.on { grid-column: 4; }
  html.ui9.page-logs .grp > .hd > .pill.off { grid-column: 5; }
  html.ui9.page-logs .grp > .hd > .pill.err { grid-column: 6; }
  html.ui9.page-logs #list { --row: 54px; }
  html.ui9.page-logs .grp::after { top: 11.5px; }
  html.ui9.page-logs .grp:last-child::before { bottom: calc(100% - 20px); }
}
@media (max-width: 760px) {
  html.ui9.page-logs body > .topbar { padding: 8px var(--gut); align-items: stretch; }
  html.ui9.page-logs .topbar .brand { flex: 1 0 100%; }
  html.ui9.page-logs .topbar #fDays, html.ui9.page-logs .topbar #fPlatform { flex: 1 1 40%; min-width: 0; }
  html.ui9.page-logs .topbar #fOnly { flex: 0 0 auto; }
  html.ui9.page-logs .topbar #fSearch { flex: 1 1 90px; width: auto; min-width: 0; }
  html.ui9.page-logs #fCustom { flex: 1 0 100%; min-width: 0; }
  html.ui9.page-logs #fCustom .input { flex: 1 1 0; width: auto !important; min-width: 0; }
  /* three cells over two: no bare cell, no clipped label */
  html.ui9.page-logs .topbar #stats { display: grid; grid-template-columns: repeat(6, 1fr); height: auto; }
  html.ui9.page-logs .topbar #stats > .stat { grid-column: span 2; min-height: 34px; }
  html.ui9.page-logs .topbar #stats > .stat[data-ux-failed] { min-height: 28px; }
  html.ui9.page-logs .topbar #stats > .stat:nth-child(n+4) { grid-column: span 3; }
  /* the day takes a line of its own: there is no gutter to lend */
  html.ui9.page-logs #list { --gutter: 18px; --spine: 6px; }
  html.ui9.page-logs .v9-lday { display: flex; align-items: baseline; gap: 8px; height: auto; margin: 12px 0 6px var(--gutter); }
  html.ui9.page-logs .v9-lday:first-child { margin-top: 2px; }
  html.ui9.page-logs .v9-lday::after { content: none; }
  html.ui9.page-logs .v9-lday b, html.ui9.page-logs .v9-lday span { position: static; width: auto; }
  html.ui9.page-logs .grp:has(+ .v9-lday)::before { bottom: -42px; }
  html.ui9.page-logs .grp.open:has(+ .v9-lday)::before { bottom: -46px; }
  /* every line wraps, nothing clips: the counts flow, so the widest launch cannot push the page */
  html.ui9.page-logs .grp > .hd { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 5px; }
  html.ui9.page-logs .grp > .hd .plogo { order: 1; }
  html.ui9.page-logs .grp > .hd .nm { order: 2; flex: 1 1 calc(100% - 46px); min-width: 0; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  html.ui9.page-logs .grp > .hd::after { order: 3; flex: none; }
  html.ui9.page-logs .grp > .hd > .muted:not(.mono) { order: 4; flex: 1 0 100%; padding-left: 24px; white-space: normal; font-size: 12px; }
  html.ui9.page-logs .grp > .hd > .muted:not(.mono):empty { display: none; }
  html.ui9.page-logs .grp > .hd .v9-actor { order: 5; margin-left: 24px; max-width: 45%; }
  html.ui9.page-logs .grp > .hd > .pill { order: 6; }
  html.ui9.page-logs .grp > .hd > .mono { order: 7; margin-left: auto; }
  html.ui9.page-logs .row { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 9px 12px; }
  html.ui9.page-logs .row > .mono { text-align: left; }
  /* the header holds one line: the keys are text-sized here */
  html.ui9.page-logs .wrap > .card > header { gap: 6px; }
  html.ui9.page-logs .wrap > .card > header h2 { font-size: 13px; white-space: nowrap; }
  html.ui9.page-logs .wrap > .card > header .spacer { flex: 1 1 0; min-width: 0; }
  html.ui9.page-logs #countNote { white-space: nowrap; }
  html.ui9.page-logs :is(#expandAll, #csv) { flex: none; padding: 0 6px; font-size: 12px; white-space: nowrap; }
  html.ui9.page-logs #csv { margin-right: -6px; }
}
/* the count and both keys need the line, even as "500 ads of 2000" at 320. The bar already says Launch log: the heading stays for screen readers. */
@media (max-width: 480px) {
  html.ui9.page-logs .wrap > .card > header h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* ===================== Links: the directory ===================== */
html.ui9.page-links { --bar-h: 50px; }
html.ui9.page-links body > .top { flex-wrap: nowrap; }
html.ui9.page-links .top > .muted { display: none; font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
html.ui9.page-links .top > b { white-space: nowrap; }
html.ui9.page-links #fQ { width: 230px; min-width: 0 !important; flex: 0 1 230px; }
html.ui9.page-links #fVert { flex: 0 1 auto; max-width: 170px; min-width: 0; }
/* its width comes from its options, which arrive with the rows: held, so nothing beside it moves */
@media (min-width: 861px) { html.ui9.page-links #fVert { width: 153px; flex: 0 0 153px; } }
/* the chips stand in for the select, which stays as their real control */
html.ui9.page-links .v9-pchips ~ #fPlat { display: none; }
html.ui9.page-links .v9-pchips { display: inline-flex; flex: none; min-height: 32px; }
html.ui9.page-links .v9-pchips button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
html.ui9.page-links .v9-pchips .v9-lg { width: 14px; height: 14px; }
html.ui9.page-links .v9-pchips .n { display: inline-block; min-width: 3ch; font: 500 11px/1 var(--mono); letter-spacing: -.02em; color: var(--text-dim); font-variant-numeric: tabular-nums; }
html.ui9.page-links .v9-pchips button.on .n { color: inherit; opacity: .75; }
html.ui9.page-links .v9-lk-group { flex: none; }
/* one pressed language in the bar */
html.ui9.page-links .v9-lk-group.on, html.ui9.page-links .v9-lk-group.on:hover { background: var(--primary-bg); color: var(--primary-text); box-shadow: none; }

/* first paint: the strip holds its place. If the enhancer never runs, the place closes and the real card comes back. */
html.ui9.page-links:not(.v9-lk-built) .wrap::before {
  content: "Switch a ClickFlare offer"; display: flex; align-items: center; height: 44px; padding: 0 14px; border-radius: var(--r-card) var(--r-card) 0 0;
  background: var(--bezel); color: var(--on-bezel); font: 600 13px/1 var(--sans); letter-spacing: -.012em; overflow: hidden; animation: v9-lk-gone 1ms linear 3s forwards;
}
html.ui9.page-links:not(.v9-lk-built) .cfcard { max-height: 0; margin: 0; padding: 0; border: 0; overflow: hidden; visibility: hidden; animation: v9-lk-back 1ms linear 3s forwards; }
/* the chips arrive with the enhancer: their room is held so the search does not jump */
html.ui9.page-links:not(.v9-lk-built) #fPlat { opacity: 0; animation: v9-lk-plat 1ms linear 3s forwards; }
@media (min-width: 861px) {
  html.ui9.page-links:not(.v9-lk-built) #fPlat { flex: none; width: var(--v9-chips); }
  html.ui9.page-links:not(.v9-lk-built) #fVert { margin-right: var(--v9-groupkey); animation: v9-lk-vert 1ms linear 3s forwards; }
}
html.ui9.page-links { --v9-chips: 453px; --v9-groupkey: 124px; }
@media (max-width: 1100px) { html.ui9.page-links { --v9-chips: 238px; } }
@keyframes v9-lk-plat { to { width: auto; opacity: 1; } }
@keyframes v9-lk-vert { to { margin-right: 0; } }
@keyframes v9-lk-gone { to { height: 0; opacity: 0; } }
@keyframes v9-lk-back { to { max-height: 2000px; padding: 14px 16px; margin-bottom: 16px; visibility: visible; } }

/* the ink strip: the directory's cap, and one of the two doors to the switch */
html.ui9.page-links .v9-cfstrip {
  --bi: 4px; display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-card) var(--r-card) 0 0; cursor: pointer; text-align: left;
  background: var(--bezel); color: var(--on-bezel); font: 500 12.5px/1 var(--sans); transition: background var(--t1);
}
html.ui9.page-links .v9-cfstrip:hover { background: var(--bezel-2); }
html.ui9.page-links .v9-cfstrip:focus-visible { outline-offset: 1px; }
html.ui9.page-links .v9-cfstrip .t { flex: none; font-size: 13px; font-weight: 600; letter-spacing: -.012em; }
html.ui9.page-links .v9-cfstrip .d { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 400; color: var(--on-bezel-dim); }
html.ui9.page-links .v9-cfstrip:has(.nx:not([hidden])) .d { display: none; }
html.ui9.page-links .v9-cfstrip .sp { flex: 1 1 0; min-width: 8px; }
html.ui9.page-links .v9-cfstrip .nx { flex: 0 10 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--on-bezel-dim); }
html.ui9.page-links .v9-cfstrip .nx b { font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--on-bezel-faint); margin-right: 3px; }
html.ui9.page-links .v9-cfstrip .pn { flex: none; display: inline-flex; align-items: center; gap: 6px; font: 500 11.5px/1 var(--mono); color: var(--hazard); white-space: nowrap; }
html.ui9.page-links .v9-cfstrip .pn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hazard); }
html.ui9.page-links .v9-cfstrip > .v9-i { width: 13px; height: 13px; color: var(--on-bezel-dim); }

/* the switch: the real .cfcard, as an ink drawer, its fields laid out as a board */
html.ui9.page-links.v9-lk-built .cfcard {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 46; display: flex; flex-direction: column; width: min(540px, 100vw); margin: 0; padding: 0; border: 0; border-radius: 0;
  background: var(--bezel); color: var(--on-bezel); color-scheme: dark; box-shadow: var(--shadow-lg); overflow: hidden; overscroll-behavior: contain;
  transform: translateX(100%); visibility: hidden; transition: transform var(--t3) var(--ease), visibility 0s linear var(--t3);
}
html.ui9.page-links.v9-lk-built .cfcard.v9-open { transform: none; visibility: visible; transition: transform var(--t3) var(--ease), visibility 0s; }
html.ui9.page-links .cfcard:focus { outline: 0; }
html.ui9.page-links .v9-lk-scrim { position: fixed; inset: 0; z-index: 45; }
html.ui9.page-links .v9-lk-scrim:not(.show) { display: none; }
html.ui9.page-links.v9-lk-built .cfhead { position: relative; flex: none; display: block; margin: 0; padding: 14px 52px 12px 16px; border-bottom: 1px solid var(--bezel-line); }
html.ui9.page-links .cfhead b { display: block; font: 600 15px/1.2 var(--sans) !important; letter-spacing: -.015em; color: var(--on-bezel); }
html.ui9.page-links .cfhead .muted { display: block; margin-top: 3px; font-size: 12px; line-height: 1.3; color: var(--on-bezel-dim); }
html.ui9.page-links .v9-cf-x { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r-key); background: none; color: var(--on-bezel-dim); cursor: pointer; }
html.ui9.page-links .v9-cf-x:hover { background: var(--bezel-2); color: var(--on-bezel); }
html.ui9.page-links .v9-cf-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px 16px; overscroll-behavior: contain; }
html.ui9.page-links .cfcard .lbl { margin-bottom: 6px; line-height: 1; color: var(--on-bezel-dim) !important; }
html.ui9.page-links.v9-lk-built .cfcard .input {
  width: 100%; background-color: rgba(244,239,228,.07); color: var(--on-bezel); box-shadow: inset 0 0 0 1px var(--bezel-line-2);
}
html.ui9.page-links.v9-lk-built .cfcard .input:hover { box-shadow: inset 0 0 0 1px rgba(244,239,228,.3); }
/* ui.css sets the background shorthand on .cfcard .input, which takes the core caret with it */
html.ui9.page-links.v9-lk-built .cfcard select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23b4ab9b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 12px;
}
html.ui9.page-links.v9-lk-built .cfcard select.input option { color: var(--on-bezel); background: var(--bezel-2); }
html.ui9.page-links .v9-cf-pick { display: flex; align-items: flex-end; gap: 8px; }
html.ui9.page-links .v9-cf-pick > div { flex: 1 1 0 !important; min-width: 0 !important; }
/* keys on ink */
html.ui9.page-links .cfcard .btn:not(.primary) { background: rgba(244,239,228,.07); color: var(--on-bezel); box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-links .cfcard .btn:not(.primary):hover { background: rgba(244,239,228,.12); color: var(--on-bezel); box-shadow: inset 0 0 0 1px rgba(244,239,228,.3); }
html.ui9.page-links .cfcard .btn.primary { background: var(--on-bezel); color: var(--bezel-well); box-shadow: none; }
html.ui9.page-links .cfcard .btn.primary:hover { background: var(--on-bezel); color: var(--bezel-well); filter: brightness(1.06); box-shadow: none; }

/* the board: what it points at, an arrow, what it will point at */
html.ui9.page-links .v9-cf-board { display: grid; grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); align-items: stretch; gap: 6px; margin-top: 12px; }
html.ui9.page-links .v9-cf-cur { display: flex; flex-direction: column; gap: 7px; min-height: 92px; margin: 0; }
html.ui9.page-links .v9-cf-val { font: 500 13px/1.3 var(--sans); color: var(--on-bezel); overflow-wrap: anywhere; }
html.ui9.page-links .v9-cf-val.dim { color: var(--on-bezel-dim); }
html.ui9.page-links .v9-cf-sub { font-size: 11.5px; line-height: 1.3; color: var(--on-bezel-dim); }
html.ui9.page-links .v9-cf-sub:empty { display: none; }
html.ui9.page-links .v9-cf-arrow { display: grid; place-items: center; color: var(--hazard); pointer-events: none; }
html.ui9.page-links .v9-cf-board > div:last-child {
  display: flex; flex-direction: column; justify-content: center; flex: none !important; min-width: 0 !important; padding: 10px 11px 11px; border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--bezel-line-2); background: var(--bezel-2);
}
/* the whole name of what is picked: a closed select cuts it */
html.ui9.page-links .v9-cf-full { font: 500 13px/1.3 var(--sans); color: var(--on-bezel); overflow-wrap: anywhere; }
html.ui9.page-links .v9-cf-full[hidden] { display: none; }
html.ui9.page-links .v9-cf-board .v9-cf-full { margin-top: 8px; }
html.ui9.page-links .v9-cf-pick + .v9-cf-full { margin-top: 6px; font-size: 12px; font-weight: 400; color: var(--on-bezel-dim); }
html.ui9.page-links .v9-cf-when { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px; margin-top: 12px; }
html.ui9.page-links #cfMsg { flex: 1 0 100%; max-height: 30vh; margin: 0 !important; overflow-y: auto; overscroll-behavior: contain; font-size: 12px; line-height: 1.35; color: var(--on-bezel-dim); }
html.ui9.page-links #cfMsg:empty, html.ui9.page-links #cfMsg.v9-dup { display: none; }
html.ui9.page-links #cfMsg span { color: color-mix(in srgb, var(--rejected) 42%, var(--on-bezel)) !important; }

/* the log of switches */
html.ui9.page-links .v9-cf-jh { margin-top: 18px; padding-bottom: 7px; color: var(--on-bezel-dim); }
html.ui9.page-links .v9-cf-none { padding: 8px 0; border-top: 1px solid var(--bezel-line); font-size: 12.5px; line-height: 1.3; color: var(--on-bezel-dim); }
html.ui9.page-links .v9-cf-none[hidden] { display: none; }
html.ui9.page-links #cfJobs { margin-top: 0 !important; }
html.ui9.page-links.v9-lk-built .cfjob { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; column-gap: 8px; row-gap: 2px; align-items: start; padding: 8px 0; border-top: 1px solid var(--bezel-line); font-size: 12.5px; line-height: 1.3; color: var(--on-bezel); }
html.ui9.page-links .cfjob > * { grid-column: 2; min-width: 0; overflow-wrap: anywhere; }
html.ui9.page-links .cfjob .st { grid-column: 1; grid-row: 1; padding-top: 2px; font: 500 10px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--on-bezel-dim); }
html.ui9.page-links .cfjob .st.pending { color: var(--hazard); }
html.ui9.page-links .cfjob .st.done { color: var(--lamp-ok); }
html.ui9.page-links .cfjob .st.failed { color: color-mix(in srgb, var(--rejected) 42%, var(--on-bezel)); }
html.ui9.page-links .cfjob .muted { font-size: 11.5px; color: var(--on-bezel-dim); }
html.ui9.page-links .cfjob .muted:empty, html.ui9.page-links .cfjob > span[style] { display: none; }
html.ui9.page-links .cfjob .mini { grid-column: 3; grid-row: 1 / span 3; align-self: start; background: none; color: var(--on-bezel); border: 0; box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-links .cfjob .mini:hover { background: rgba(244,239,228,.1); }

/* footer pinned. Schedule is the primary. Switch now moves live traffic, so it is the quiet one, and marked. */
html.ui9.page-links .v9-cf-foot { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--bezel-line); background: var(--bezel-2); }
html.ui9.page-links .v9-cf-foot #cfNow { margin-right: auto; }

/* the directory: a table cut for 44px rows, its head under the bar */
html.ui9.page-links #list, html.ui9.page-links #v9Lp { overflow: visible; }
html.ui9.page-links:not(.v9-lk-grouped) #v9Lp, html.ui9.page-links #list:not(:has(table)) + #v9Lp { display: none; }
html.ui9.page-links.v9-lk-grouped #list:has(table) { display: none; }
html.ui9.page-links :is(#list, #v9Lp) table {
  table-layout: fixed; border-collapse: separate; border-spacing: 0; overflow: visible; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-card) var(--r-card); background: var(--surface); font-size: 13px;
}
html.ui9.page-links :is(#list, #v9Lp) th { position: sticky; z-index: 2; padding: 0 10px; background: var(--surface); box-shadow: none; }
/* one rule across the head, not a shadow per cell, which breaks at the joins at 150%. In dark, full ink outshone the rows. */
html.ui9.page-links :is(#list, #v9Lp) th::after { content: ""; position: absolute; left: -1px; right: -1px; bottom: 0; height: 2px; background: var(--text); }
html.ui9.page-links[data-theme="dark"] :is(#list, #v9Lp) th::after { background: color-mix(in srgb, var(--text) 45%, var(--surface)); }
html.ui9.page-links :is(#list, #v9Lp) td { height: 44px; padding: 0 10px; vertical-align: middle; line-height: 1.25; }
html.ui9.page-links #list tr:last-child td { border-bottom: 0; }
html.ui9.page-links #list th:nth-child(1) { width: 124px; }
html.ui9.page-links #list th:nth-child(2) { width: 118px; }
html.ui9.page-links #list th:nth-child(3) { width: 14.5%; }
html.ui9.page-links #list th:nth-child(5) { width: 160px; }
html.ui9.page-links #list th:nth-child(6) { width: 26%; }
html.ui9.page-links #list th:nth-child(7) { width: 66px; }
html.ui9.page-links #list td:nth-child(1) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12px/1.2 var(--mono); letter-spacing: -.02em; color: var(--text-dim); font-variant-numeric: tabular-nums; }
html.ui9.page-links #list td:nth-child(1) .muted { display: inline; margin-left: 8px; font: 500 11px/1 var(--mono); color: var(--text-dim); }
/* a date is said once, and a new day is ruled off, as the Log does */
html.ui9.page-links #list tr[data-ux-same] td:nth-child(1) { color: var(--text-faint); }
html.ui9.page-links #list tr:has(+ tr[data-ux-day]) td { border-bottom-color: var(--line-strong); }
html.ui9.page-links #list td:nth-child(3), html.ui9.page-links #list td:nth-child(4) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui9.page-links #list td:nth-child(3) { font-size: 12.5px; color: var(--text-dim); }
html.ui9.page-links #list td:nth-child(4) { font-weight: 500; }
/* platform colours stay on launchers: here a platform is its mark and its name */
html.ui9.page-links .plat { position: relative; display: inline-block; padding: 0; border-radius: 0; background: none !important; color: var(--text-dim) !important; font: 400 12.5px/16px var(--sans); white-space: nowrap; }
html.ui9.page-links .plat:has(svg) { padding-left: 22px; }
html.ui9.page-links .plat .v9-lg { position: absolute; left: 0; top: 0; }
/* a ghost until the row is under the hand; unset is a dim dash */
html.ui9.page-links .vsel {
  width: 100%; min-height: 28px; padding: 0 4px 0 6px; margin-left: -6px; border: 0; border-radius: 6px; font: 400 12.5px/1 var(--sans); color: var(--text-dim); text-overflow: ellipsis;
  appearance: none; -webkit-appearance: none; background: none; cursor: pointer; transition: box-shadow var(--t1);
}
html.ui9.page-links tr:hover .vsel, html.ui9.page-links .vsel:focus-visible {
  color: var(--text); padding-right: 20px; box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23978d7b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 5px center / 12px;
}
html.ui9.page-links .vsel option { color: var(--text); background: var(--surface); }
html.ui9.page-links .vsel:has(option[value=""]:checked) { color: var(--text-faint); }
@media (hover: none) { html.ui9.page-links .vsel { box-shadow: inset 0 0 0 1px var(--line); } }
/* the link: the address reads, the query fades */
html.ui9.page-links .urllink { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--text-dim); text-decoration: none; }
html.ui9.page-links .urllink svg { width: 13px; height: 13px; color: var(--text-faint); transition: color var(--t1); }
html.ui9.page-links .urllink:hover svg { color: var(--text); }
html.ui9.page-links .url { display: block; flex: 1 1 auto; min-width: 0; max-width: none; font: 400 12px/1.3 var(--mono); letter-spacing: -.02em; color: var(--text-dim); }
html.ui9.page-links .url i { font-style: normal; color: var(--text-faint); }
html.ui9.page-links tr:hover .url { color: var(--text); }
html.ui9.page-links tr:hover .url i { color: var(--text-dim); }
/* grouped, the address is the row's one thing to read */
html.ui9.page-links #v9Lp .v9-lp-r .url { color: var(--text); }
html.ui9.page-links #v9Lp .v9-lp-r .url i { color: var(--text-dim); }
html.ui9.page-links .mini { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 0 9px; border: 0; border-radius: 6px; background: var(--surface); color: var(--text-dim); font: 500 12px/1 var(--sans); box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer; text-decoration: none; }
/* always there, only raised when the row is under the hand */
html.ui9.page-links tr:is(:hover, :focus-within) .mini { color: var(--text); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); }
html.ui9.page-links tr .mini:hover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); }
html.ui9.page-links #list > .muted, html.ui9.page-links .v9-lp-foot { margin: 8px 2px 0 !important; font-size: 12px; color: var(--text-dim); }
html.ui9.page-links #list .empty { padding: 14px 16px; text-align: left; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-card) var(--r-card); background: var(--surface); color: var(--text-dim); font-size: 13px; line-height: 1.5; }
html.ui9.page-links #list .empty b { color: var(--text); font-weight: 600; }
html.ui9.page-links #list .empty code { font: 500 12px/1 var(--mono); }
html.ui9.page-links #list .empty .muted { overflow-wrap: anywhere; font-size: 12px; }
/* loading: rows, not a word in a hole */
html.ui9.ui9-ready.page-links:not(.v9-lk-painted) #list .empty {
  height: 440px; padding: 0; color: transparent; animation: v9-shimmer 1.6s linear infinite;
  background:
    linear-gradient(90deg, transparent 30%, var(--hover) 50%, transparent 70%) 0 0 / 200% 100%,
    repeating-linear-gradient(transparent 0 43px, var(--hair) 43px 44px), var(--surface);
}
/* the page's toast, in the deck's shape */
html.ui9.page-links .toast { z-index: 47; border-radius: var(--r-key); background: var(--primary-bg); color: var(--primary-text); font-size: 12.5px; box-shadow: var(--e2); }

/* by landing page: 220 rows become 51 */
html.ui9.page-links #v9Lp th:nth-child(1) { width: 92px; }
html.ui9.page-links #v9Lp th:nth-child(3) { width: 112px; }
html.ui9.page-links #v9Lp th:nth-child(4) { width: 96px; }
html.ui9.page-links #v9Lp th:nth-child(5) { width: 70px; }
html.ui9.page-links #v9Lp th:nth-child(6) { width: 104px; }
html.ui9.page-links #v9Lp td.d { white-space: nowrap; font: 500 12px/1.2 var(--mono); letter-spacing: -.02em; color: var(--text-dim); font-variant-numeric: tabular-nums; }
html.ui9.page-links #v9Lp td.u { padding-right: 6px; }
html.ui9.page-links .v9-lp-tg { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; text-align: left; }
html.ui9.page-links .v9-lp-tg::before {
  content: ""; flex: none; width: 6px; height: 6px; margin: -3px 3px 0 2px; border: solid var(--text-faint); border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); transition: transform var(--t1) var(--ease);
}
html.ui9.page-links .v9-lp-tg[aria-expanded="true"]::before { transform: rotate(45deg); }
html.ui9.page-links .v9-lp-tg .url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui9.page-links #v9Lp td.p { white-space: nowrap; }
html.ui9.page-links #v9Lp td.p > span { display: inline-block; margin-right: 4px; vertical-align: middle; }
html.ui9.page-links #v9Lp td.c { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
html.ui9.page-links .v9-lp-open { width: 28px; padding: 0; }
html.ui9.page-links .v9-lp-open svg { width: 13px; height: 13px; }
/* a child is lighter than its parent, and starts under the address, not under the chevron */
html.ui9.page-links #v9Lp .v9-lp-s td { height: 34px; background: color-mix(in srgb, var(--surface-2) 40%, var(--surface)); font-size: 12.5px; }
html.ui9.page-links #v9Lp .v9-lp-s td:is(.s, .a) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui9.page-links #v9Lp .v9-lp-s td.s { padding-left: 30px; }
html.ui9.page-links #v9Lp .v9-lp-s td.a { color: var(--text-dim); }
html.ui9.page-links #v9Lp tbody:last-of-type tr:last-child td { border-bottom: 0; }

@media (min-width: 1560px) { html.ui9.page-links .top > .muted { display: block; } }
@media (max-width: 1240px) {
  html.ui9.page-links .v9-cfstrip .d { display: none; }
  html.ui9.page-links #fQ { flex-basis: 190px; }
}
/* a chip is its mark and its count where names will not fit: the name stays for screen readers and the title */
@media (max-width: 1100px) and (min-width: 861px), (max-width: 560px) {
  html.ui9.page-links .v9-pchips .tx { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (max-width: 1100px) and (min-width: 861px) {
  html.ui9.page-links .top > .spacer { display: none; }
  html.ui9.page-links #fQ { flex: 1 1 160px; }
}
@media (max-width: 1100px) {
  html.ui9.page-links .v9-pchips, html.ui9.page-links:not(.v9-lk-built) #fPlat { order: 1; }
  html.ui9.page-links .top > .spacer { order: 2; }
  html.ui9.page-links #fQ { order: 3; }
  html.ui9.page-links #fVert { order: 4; }
  html.ui9.page-links .v9-lk-group { order: 5; }
  html.ui9.page-links .top > b { order: 0; }
}
/* bar on two rows, always the same two, so the head knows where to stick */
@media (max-width: 860px) {
  html.ui9.page-links { --bar-h: 97px; }
  html.ui9.page-links body > .top { flex-wrap: wrap; row-gap: 8px; column-gap: 8px; }
  html.ui9.page-links .top > .spacer { flex: 1 0 0; }
  html.ui9.page-links #fQ { flex: 1 1 200px; }
  html.ui9.page-links #fVert { flex: 0 1 170px; }
}
@media (max-width: 860px) and (min-width: 761px) {
  html.ui9.page-links .top > .spacer { flex-basis: 100%; height: 0; order: 2; }
}
/* the campaign keeps the room: a platform is its mark alone */
@media (max-width: 1180px) {
  html.ui9.page-links #list th:nth-child(1) { width: 112px; }
  html.ui9.page-links #list th:nth-child(2) { width: 68px; }
  html.ui9.page-links #list th:nth-child(5) { width: 140px; }
  html.ui9.page-links #list th:nth-child(6) { width: 22%; }
  html.ui9.page-links #list th:nth-child(7) { width: 64px; }
  html.ui9.page-links :is(#list, #v9Lp) :is(th, td) { padding-left: 8px; padding-right: 8px; }
  html.ui9.page-links #v9Lp .v9-lp-s td.s { padding-left: 28px; }
  html.ui9.page-links #list .plat { width: 16px; height: 16px; padding: 0; overflow: hidden; color: transparent !important; font-size: 0; vertical-align: middle; }
}
@media (max-width: 1000px) { html.ui9.page-links .v9-cfstrip .nx { display: none; } }
@media (max-width: 860px) {
  html.ui9.page-links .toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
  /* a row becomes a card: nothing to swipe, every word readable */
  html.ui9.page-links #list table, html.ui9.page-links #list tbody { display: block; }
  html.ui9.page-links #list tr:first-child { display: none; }
  html.ui9.page-links #list tr { display: grid; grid-template-columns: minmax(0, 1fr) 84px 66px; column-gap: 10px; row-gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--hair); }
  html.ui9.page-links #list tr:last-child { border-bottom: 0; }
  html.ui9.page-links #list tr:has(+ tr[data-ux-day]) { border-bottom-color: var(--line-strong); }
  html.ui9.page-links #list td { display: block; height: auto; padding: 0; border: 0; min-width: 0; background: none !important; }
  html.ui9.page-links #list td:nth-child(2) { grid-column: 1; grid-row: 1; }
  html.ui9.page-links #list .plat { width: auto; height: auto; color: var(--text-dim) !important; font-size: 12.5px; overflow: visible; }
  html.ui9.page-links #list .plat:has(svg) { padding-left: 22px; }
  html.ui9.page-links #list td:nth-child(1) { grid-column: 2 / 4; grid-row: 1; text-align: right; }
  html.ui9.page-links #list td:nth-child(1) .muted { display: inline; margin-left: 6px; }
  html.ui9.page-links #list td:nth-child(4) { grid-column: 1 / -1; grid-row: 2; white-space: normal; overflow-wrap: anywhere; }
  html.ui9.page-links #list td:nth-child(3) { grid-column: 1; grid-row: 3; align-self: center; white-space: normal; }
  html.ui9.page-links #list td:nth-child(5) { grid-column: 2 / 4; grid-row: 3; }
  /* a correction, not a headline. Core holds selects at 16px here so iOS does not zoom: the box keeps that size and is scaled, a leaf, so the 34px tap height stays. */
  html.ui9.page-links #list .vsel {
    width: 123%; max-width: none; min-height: 42px; margin: -4px 0 -4px -23%; padding: 0 22px 0 0; transform: scale(.8125); transform-origin: 100% 50%; box-shadow: none; text-align: right; text-align-last: right;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23978d7b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 4px center / 13px;
  }
  html.ui9.page-links #list td:nth-child(6) { grid-column: 1 / 3; grid-row: 4; align-self: center; overflow: hidden; }
  html.ui9.page-links #list td:nth-child(7) { grid-column: 3; grid-row: 4; justify-self: end; }
  html.ui9.page-links .url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.ui9.page-links .mini { min-height: 34px; padding: 0 12px; }
  html.ui9.page-links .v9-lp-open { width: 34px; padding: 0; }
  html.ui9.page-links .v9-cfstrip .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* by landing page on a phone: the link and its numbers */
  html.ui9.page-links #v9Lp thead { display: none; }
  html.ui9.page-links #v9Lp table, html.ui9.page-links #v9Lp tbody { display: block; }
  html.ui9.page-links #v9Lp tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 10px; row-gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--hair); align-items: center; }
  html.ui9.page-links #v9Lp td { display: block; height: auto; padding: 0; border: 0; background: none !important; min-width: 0; }
  html.ui9.page-links #v9Lp .v9-lp-r td.u { grid-column: 1 / -1; grid-row: 1; }
  html.ui9.page-links #v9Lp .v9-lp-r td.d { grid-column: 1; grid-row: 2; }
  html.ui9.page-links #v9Lp .v9-lp-r td.p { grid-column: 1; grid-row: 3; }
  html.ui9.page-links #v9Lp .v9-lp-r td.c { display: flex; grid-column: 2 / 4; grid-row: 2 / 4; }
  html.ui9.page-links #v9Lp .v9-lp-r td.num { display: none; }
  html.ui9.page-links #v9Lp .v9-lp-s { background: color-mix(in srgb, var(--surface-2) 40%, var(--surface)); }
  html.ui9.page-links #v9Lp .v9-lp-s td { height: auto; }
  html.ui9.page-links #v9Lp .v9-lp-s td.s { grid-column: 1 / -1; padding: 0; white-space: normal; }
  html.ui9.page-links #v9Lp .v9-lp-s td.a { grid-column: 2 / -1; text-align: right; }
}
@media (max-width: 860px) and (min-width: 561px) {
  html.ui9.page-links #list td:nth-child(4) { grid-column: 1; }
  html.ui9.page-links #list td:nth-child(5) { grid-row: 2 / span 2; align-self: center; }
}
@media (max-width: 760px) {
  html.ui9.page-links { --bar-h: 50px; }
  html.ui9.page-links body > .top { align-items: stretch; }
  html.ui9.page-links .top > b { flex: 1 0 100%; }
  html.ui9.page-links .top > .spacer { display: none; }
  html.ui9.page-links .v9-pchips { flex: 1 0 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  html.ui9.page-links .v9-pchips::-webkit-scrollbar { display: none; }
  html.ui9.page-links .v9-pchips button { flex: 1 0 auto; justify-content: center; min-height: 34px; }
  html.ui9.page-links #fQ { flex: 1 0 100%; }
  html.ui9.page-links #fVert { flex: 1 1 0; max-width: none; }
}
@media (max-width: 560px) {
  html.ui9.page-links .v9-cf-board { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-links .v9-cf-arrow { height: 22px; }
  /* four marks and counts share the line: nothing to scroll, nothing cut */
  html.ui9.page-links .v9-pchips { overflow: visible; }
  html.ui9.page-links .v9-pchips button { flex: 1 1 0; min-width: 0; }
  html.ui9.page-links .v9-cf-arrow svg { transform: rotate(90deg); }
  html.ui9.page-links .v9-cf-when { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-links .v9-cf-pick { flex-wrap: wrap; }
  html.ui9.page-links .v9-cf-pick > div { flex: 1 0 100% !important; }
  html.ui9.page-links .v9-cf-pick > .btn { flex: 1 0 100%; }
  html.ui9.page-links .v9-cf-foot .btn { flex: 1 1 0; min-height: 40px; }
  html.ui9.page-links .v9-cf-foot #cfNow { margin-right: 0; }
}

/* ===== 50-assets.css ===== */
/* =====================================================================
   P10: Research (find ads), Swipe and Calculator (the bench), Drive (the log).
   DESIGN 4.10, 4.20, 4.21. Layout is CSS keyed to html.ui9. js/50-assets.js
   only moves nodes into new homes and adds chrome. No new requests.
   ===================================================================== */

/* Held at first paint, until the enhancer has given a node its new home. If ui9.js failed
   the animation runs out after 3s and the node shows where the page put it: nothing is lost. */
@keyframes v9-a-hold { from, to { max-height: 0; min-height: 0; margin: 0; padding: 0; border-width: 0; overflow: hidden; opacity: 0; visibility: hidden; } }
@keyframes v9-a-hide-text { from, to { font-size: 0; } }

/* ============================ RESEARCH ============================== */
/* where a row sticks: under the bar, or under the nav where the bar does not stick */
html.ui9.page-research { --v9-stick: calc(var(--shell-h) + var(--bar-h)); }
/* ---- the bar: title, source tabs, Launcher ---- */
html.ui9.page-research body > header.top { flex-wrap: nowrap; gap: 10px; }
/* same words, no emoji */
html.ui9.page-research body > header.top h1 { font-size: 0 !important; white-space: nowrap; flex: none; }
html.ui9.page-research body > header.top h1::before { content: "Ad Research"; font: 600 15px/1.2 var(--sans); letter-spacing: -.015em; }
html.ui9.page-research body > header.top > .faint { color: var(--text-dim); white-space: nowrap; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* the subtitle names AdPlexity: true on that tab only */
html.ui9.page-research[data-ux-tab]:not([data-ux-tab="ads"]) body > header.top > .faint { display: none; }
html.ui9.page-research body > header.top > #credits { animation: v9-a-hold 3s linear; }
html.ui9.page-research .v9-src { flex: none; display: inline-flex; }
html.ui9.page-research .v9-src button { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
/* the tape: the one detail kept from the old pinned cards */
html.ui9.page-research .v9-tape {
  display: inline-block; padding: 1px 5px 2px; font: 500 10px/1.1 var(--mono); letter-spacing: .03em; font-style: normal; border-radius: 1px; transform: rotate(-2.5deg);
  background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text-dim);
}
html.ui9.page-research .v9-tape.paid { background: var(--review-bg); color: var(--review); }
html.ui9.page-research .v9-src button.on .v9-tape { background: color-mix(in srgb, var(--primary-text) 16%, transparent); color: var(--primary-text); }
html.ui9.page-research .v9-src button.on .v9-tape.paid { background: var(--hazard); color: var(--go-ink); }

html.ui9.page-research .v9-pane:not(.on) { display: none; }

/* ---- the command row: 436px of form down to one line ---- */
html.ui9.page-research #searchPanel {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(170px, 236px) 92px 138px minmax(84px, auto); align-items: center; column-gap: 8px; row-gap: 0;
  margin: 0 0 8px; padding: 11px 12px; overflow: visible;
}
/* Must contain and Exclude stay one row: if ui9.js failed they show as a row of their own, not loose in the grid */
html.ui9.page-research #searchPanel > div:first-child, html.ui9.page-research #searchPanel > .row:nth-child(2), html.ui9.page-research #searchPanel > .row:last-child { display: contents !important; }
/* no row gap until the enhancer has run: the held rows are 0 tall, and their gaps would still open the panel at first paint */
html.ui9.page-research #searchPanel:has(.v9-hudr) { row-gap: 7px; }
html.ui9.page-research #segType { grid-column: 1; grid-row: 1; }
html.ui9.page-research #searchPanel > .row > div:has(#q) { grid-column: 2; grid-row: 1; min-width: 0 !important; }
html.ui9.page-research #searchPanel > .row > div:has(#mode) { grid-column: 3; grid-row: 1; min-width: 0 !important; }
html.ui9.page-research #searchPanel label.f[for="q"], html.ui9.page-research #searchPanel label.f[for="mode"] { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html.ui9.page-research #q, html.ui9.page-research #mode { min-height: 34px; }
html.ui9.page-research #searchPanel > .v9-fbtn { grid-column: 4; grid-row: 1; }
html.ui9.page-research #searchPanel > .v9-hudr { grid-column: 5; grid-row: 1; }
html.ui9.page-research #searchBtn { grid-column: 6; grid-row: 1; align-self: stretch !important; min-height: 34px; }
html.ui9.page-research #searchPanel > div:first-child > .faint { grid-column: 1 / -1; grid-row: 2; font-size: 12px !important; color: var(--text-dim); line-height: 1.3; animation: v9-a-hold 3s linear; }
html.ui9.page-research #searchPanel > :is(.row:nth-child(3), .grid-f, details), html.ui9.page-research #searchPanel > .row:last-child > :not(#searchBtn, .spacer) { grid-column: 1 / -1; margin-top: 8px; animation: v9-a-hold 3s linear; }
html.ui9.page-research #searchPanel > .row:last-child > .spacer { display: none; }
html.ui9.page-research #costHint { animation: v9-a-hide-text 3s linear; }
html.ui9.page-research #searchPanel:has(.v9-hudr) #costHint { display: none; }

/* the Filters key: a count, so what is switched on is never out of sight */
html.ui9.page-research .v9-fbtn { min-height: 34px; padding: 0 8px; gap: 5px; }
html.ui9.page-research .v9-fbtn b { min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-cap); font: 500 10.5px/16px var(--mono); text-align: center; background: var(--primary-bg); color: var(--primary-text); }
html.ui9.page-research .v9-fbtn b:empty { display: none; }

/* readout by Search: what this press can spend, and what this visit has */
html.ui9.page-research .v9-hudr {
  display: flex; flex-direction: column; justify-content: center; gap: 3px; height: 34px; padding: 0 9px; border: 0; border-radius: var(--r-key); cursor: pointer; text-align: left; overflow: hidden; white-space: nowrap;
  font: 500 10px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--on-bezel);
  background-color: var(--bezel-well);
  background-image: linear-gradient(rgba(244,239,228,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(244,239,228,.03) 1px, transparent 1px);
  background-size: 12px 12px; background-position: -1px -1px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.85), 0 1px 0 rgba(244,239,228,.06);
}
html.ui9.page-research .v9-hudr b { font-weight: 500; color: var(--hazard); }
html.ui9.page-research .v9-hudr #credits { display: block; padding: 0; margin: 0; border-radius: 0; background: none; color: var(--on-bezel-dim); font: inherit; letter-spacing: inherit; }

/* ---- under the question: the status line, and Sort (free, so it stays one click away) ---- */
html.ui9.page-research .v9-reshead { display: flex; align-items: center; gap: 10px; }
html.ui9.page-research .v9-reshead:has(#status:not(:empty)), html.ui9.page-research .v9-reshead:has(.v9-sortf:not([hidden])) { margin-bottom: 8px; }
html.ui9.page-research #status { flex: 1 1 auto; min-width: 0; margin: 0 !important; scroll-margin-top: calc(var(--v9-stick) + 12px); }
html.ui9.page-research #status .note { padding: 5px 10px; font-size: 12.5px; line-height: 1.35; }
/* a status is a line of text: only a warning or a failure earns a box */
html.ui9.page-research #status .note-info { padding: 0 2px; border: 0; background: none; box-shadow: none; color: var(--text-dim); }
html.ui9.page-research #qElapsed { font-family: var(--mono); font-variant-numeric: tabular-nums; }
html.ui9.page-research .v9-sortf { flex: none; display: none; align-items: center; gap: 7px; margin-left: auto; }
html.ui9.page-research .v9-sortf label.f { margin: 0; }
html.ui9.page-research .v9-sortf #sort { min-height: 30px; }
html.ui9.page-research .v9-pane:has(#results .card):has(#segType [data-t="ads"].on) .v9-sortf { display: inline-flex; }
/* a search takes 15 to 30 seconds: what is on screen steps back while it runs */
html.ui9.page-research #results { transition: opacity var(--t2) var(--ease); }
html.ui9.page-research .v9-reshead:has(.spin) ~ #results { opacity: .45; }

/* the empty sheet: graph paper, low strength, this page's one room effect. It runs to the fold, and the page's own line and
   the cost note sit on it as one block. The note is a sibling of #results, which the page rewrites, so both share a grid cell. */
html.ui9.page-research #v9Pane-ads.on { display: grid; grid-template-columns: minmax(0, 1fr); }
html.ui9.page-research #v9Pane-ads > #results { grid-column: 1; grid-row: 3; }
html.ui9.page-research #v9Pane-ads > #foot { grid-row: 4; }
html.ui9.page-research #results > .empty {
  position: relative; grid-column: 1 / -1; display: grid; place-items: center; min-height: min(48vh, 400px); padding: 40px 20px; overflow: hidden; border-radius: var(--r-card); color: var(--text-dim); font-size: 13px;
  background:
    linear-gradient(color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px) -1px -1px / 24px 24px,
    linear-gradient(90deg, color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px) -1px -1px / 24px 24px;
  box-shadow: inset 0 0 0 1px var(--hair);
}
html.ui9.page-research #v9Pane-ads > #results > .empty { min-height: max(320px, calc(100vh - var(--shell-h) - var(--bar-h) - var(--v9-rest, 96px))); padding: 40px 20px 136px; font: 600 15px/1.3 var(--sans); letter-spacing: -.015em; color: var(--text); text-align: center; }
html.ui9.page-research .v9-lead { display: none; }
html.ui9.page-research #v9Pane-ads:has(#results > .empty) > .v9-lead { display: block; grid-column: 1; grid-row: 3; place-self: center; z-index: 1; box-sizing: border-box; width: min(420px, calc(100% - 28px)); margin-top: 52px; padding: 10px 0 9px; pointer-events: none; }
html.ui9[data-theme="dark"].page-research #v9Pane-ads > .v9-lead { background-color: var(--bezel); box-shadow: 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-research .v9-lead .v9-well-h { display: block; padding: 0 12px 8px; }
html.ui9.page-research .v9-lead .faint { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: 12px; color: inherit; }
html.ui9.page-research .v9-lead-r { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 1px 12px; font: 500 10px/1.25 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--on-bezel-dim); }
html.ui9.page-research .v9-lead-r + .v9-lead-r { box-shadow: inset 1px 0 0 var(--bezel-line-2); }
html.ui9.page-research .v9-lead-r b { font: 500 13px/1.2 var(--mono); letter-spacing: -.01em; text-transform: none; color: var(--on-bezel); }
/* a search takes 15 to 30 seconds: the sheet shows work, not the invitation just accepted */
html.ui9.page-research #v9Pane-ads > .v9-reshead:has(.spin) ~ #results > .empty { color: transparent; }
html.ui9.page-research #v9Pane-ads:has(.v9-reshead .spin) > .v9-lead { visibility: hidden; }
html.ui9.page-research .v9-reshead:has(.spin) ~ #results > .empty::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, color-mix(in srgb, var(--text) 6%, transparent) 50%, transparent 65%) 0 0 / 200% 100%; animation: v9-shimmer 1.6s linear infinite;
}
/* the sheet is the page: it ends at the fold, with no scroll to nowhere */
html.ui9.page-research .wrap:has(#v9Pane-ads.on #results > .empty), html.ui9.page-research .wrap:has(.v9-pane.on:not(#v9Pane-ads)):not(:has(.v9-pane.on .cardlet)) { padding-bottom: 14px; }
/* the three free sources: the same paper under the form, until something comes back */
html.ui9.page-research .v9-pane.on:not(#v9Pane-ads) { display: flex; flex-direction: column; min-height: calc(100vh - var(--shell-h) - var(--bar-h) - 20px); }
html.ui9.page-research .v9-pane.on:not(#v9Pane-ads):not(:has(.cardlet))::after {
  content: attr(data-ux-hint); flex: 1 1 auto; display: grid; place-items: center; min-height: 240px; padding: 20px; border-radius: var(--r-card); font: 600 15px/1.3 var(--sans); letter-spacing: -.015em; color: var(--text); text-align: center;
  background:
    linear-gradient(color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px) -1px -1px / 24px 24px,
    linear-gradient(90deg, color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px) -1px -1px / 24px 24px;
  box-shadow: inset 0 0 0 1px var(--hair);
}

/* ---- result cards: straight, quiet. The WINNING chip says it; the ring only backs it up, because the default sort makes most of a screen winners. ---- */
html.ui9.page-research #results { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
html.ui9.page-research #results .card, html.ui9.page-research .cardlet { position: relative; overflow: clip; margin: 0; transform: none; transition: box-shadow var(--t1); }
html.ui9.page-research #results .card:nth-child(even), html.ui9.page-research .cardlet:nth-child(even) { transform: none; }
html.ui9.page-research #results .card:hover, html.ui9.page-research .cardlet:hover { transform: none; }
html.ui9.page-research #results .card::before, html.ui9.page-research .cardlet::before { content: none; }
html.ui9.page-research #results .card { cursor: pointer; border-radius: var(--r-card); }
html.ui9.page-research #results .card:hover { border-color: var(--line-strong); }
html.ui9.page-research #results .card.win { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: none; }
html.ui9.page-research #results .card.win:hover { border-color: var(--accent); }
/* the ad is the content here: the whole creative on the mat. A landing page is as tall as the page, so that shows its top. */
html.ui9.page-research #results .card .media { aspect-ratio: 1 / 1; border-radius: 0; background: var(--mat); }
html.ui9.page-research #results .card .media :is(img, video) { object-fit: contain; }
html.ui9.page-research #v9Pane-ads:has(#segType [data-t="lps"].on) #results .card .media img { object-fit: cover; object-position: 50% 0; }
html.ui9.page-research #results .card .body { gap: 5px; padding: 8px 10px 9px; }
html.ui9.page-research #results .card .ttl { font-size: 13.5px; font-weight: 600; line-height: 1.3; letter-spacing: -.005em; }
html.ui9.page-research #results .card .desc { line-height: 1.35; color: var(--text-dim); }
html.ui9.page-research #results .card .desc:empty { display: none; }
html.ui9.page-research .chip { padding: 1px 5px; border-radius: var(--r-cap); font: 500 11px/1.4 var(--mono); letter-spacing: -.01em; background: var(--surface-2); color: var(--text-dim); }
html.ui9.page-research .chip.hot { background: var(--accent-soft); color: var(--accent-text); }
html.ui9.page-research .chip.days { background: var(--live-bg); color: var(--live); }
/* 11px figures on a tint: 4.5:1 in the light look. Dark already clears it. */
html.ui9.page-research:not([data-theme="dark"]) .chip.hot { color: color-mix(in srgb, var(--accent-text) 88%, var(--text)); }
html.ui9.page-research:not([data-theme="dark"]) .chip.days { color: color-mix(in srgb, var(--live) 74%, var(--text)); }
/* no emoji: the badge is rebuilt on every paint, so the word comes from here */
html.ui9.page-research .card .winbadge { top: 6px; left: 6px; padding: 3px 5px; border-radius: var(--r-cap); font-size: 0; line-height: 1; letter-spacing: 0; background: var(--accent); color: var(--go-ink); }
html.ui9.page-research .card .winbadge::before { content: "WINNING"; font: 500 10px/1 var(--mono); letter-spacing: .085em; }
html.ui9.page-research .card .foot { gap: 5px; padding-top: 3px; }
html.ui9.page-research .card .foot .save { margin-left: auto; }
html.ui9.page-research .card .vplay { pointer-events: none; }
html.ui9.page-research #foot { margin-top: 12px !important; font-size: 12px; color: var(--text-dim); }
html.ui9.page-research #foot:empty { display: none; }

/* ---- the three free sources: one form each, then what came back ---- */
/* held until they have their tabs: only the search shows at first paint. !important answers the core rule that stops card animations. */
html.ui9.page-research .wrap > .card { padding: 12px; animation: v9-a-hold 3s linear !important; }
html.ui9.page-research .v9-pane > .card { margin: 0 0 8px !important; padding: 12px; overflow: clip; border-radius: var(--r-card); }
html.ui9.page-research .v9-pane > .card > .row:first-child { margin-top: 0; }
html.ui9.page-research .v9-pane .row { gap: 8px; margin-top: 8px; }
html.ui9.page-research .v9-pane .row > div { min-width: 0; }
html.ui9.page-research .v9-pane label.f { white-space: nowrap; }
html.ui9.page-research .v9-pane label.f .faint { letter-spacing: 0; color: var(--text-dim); }
html.ui9.page-research :is(#boardMsg, #sgMsg, #acMsg) { max-width: 92ch; margin-top: 9px !important; font-size: 12.5px; line-height: 1.45; color: var(--text-dim); }
html.ui9.page-research :is(#boardMsg, #sgMsg, #acMsg) b { color: var(--text); font-weight: 600; }
html.ui9.page-research #sgResults:empty { display: none; }
html.ui9.page-research :is(#sgResults, #acGrid, #peekGrid) { grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); gap: 8px; }
html.ui9.page-research .cardlet { border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--line); border: 0; }
html.ui9.page-research .cardlet img, html.ui9.page-research .cardlet > div[style*="aspect-ratio"] { aspect-ratio: 4 / 5 !important; background: var(--mat) !important; }
/* a tile crops to fit a wall of them: keep the top, where the hook is */
html.ui9.page-research .cardlet img { object-position: 50% 0; }
/* no art: the same frame as its neighbours, so the row holds */
html.ui9.page-research .cardlet:not(:has(img, video, > div[style*="aspect-ratio"]))::before { content: ""; position: static; display: block; width: auto; height: auto; margin: 0; aspect-ratio: 4 / 5; transform: none; background: var(--mat); box-shadow: none; }
html.ui9.page-research .cardlet-b { padding: 7px 8px 8px; font-size: 12.5px; line-height: 1.3; }
html.ui9.page-research .cardlet-b b, html.ui9.page-research .cardlet > div > div:first-child { font-weight: 600; overflow-wrap: anywhere; }
html.ui9.page-research .cardlet .faint { font-size: 11.5px !important; color: var(--text-dim); }
/* selected is ink, as on the platform keys. Orange stays for go. */
html.ui9.page-research .cardlet[style*="outline"] { outline-width: 1.5px !important; outline-color: var(--text) !important; outline-offset: -1px; }
html.ui9.page-research .cardlet[data-uid]:focus-visible { outline: 2px solid var(--text) !important; outline-offset: 2px; }
/* the choose-and-import row stays in reach down a list of 500 */
html.ui9.page-research :is(#acCard, #peekCard) > .row:first-child {
  position: sticky; top: var(--v9-stick); z-index: 3; margin: 0; padding: 7px 0; background: var(--surface);
}
html.ui9.page-research #acCard > .row:first-child { margin-top: -4px; }
html.ui9.page-research #peekCard > .row:first-child { margin-top: -7px; }
html.ui9.page-research #keyNote { margin: 0 0 8px !important; }

/* ---- sheets: Details, and the Filters drawer. One treatment, one close. ---- */
html.ui9.page-research .sheet { border-radius: var(--r-panel) 0 0 var(--r-panel); transition: transform var(--t3) var(--ease), visibility 0s linear 0s; }
html.ui9.page-research .sheet:not(.show) { visibility: hidden; transition: transform var(--t3) var(--ease), visibility 0s linear var(--t3); }
html.ui9.page-research .sheet > header { padding: 10px 12px 10px 14px; flex: none; }
html.ui9.page-research .sheet > header b { min-width: 0; line-height: 1.25; }
html.ui9.page-research .sheet .bd { flex: 1 1 auto; min-height: 0; padding: 12px 14px 14px; font-size: 13px; }
html.ui9.page-research .sheet .bd p { margin: 4px 0 12px; line-height: 1.45; overflow-wrap: anywhere; }
html.ui9.page-research #sheetBody a:not(.btn) { color: var(--text); }
html.ui9.page-research #sheetBody :is(.media, img:first-child) { background: var(--mat); }
html.ui9.page-research #sheetBody :is(.media img, img:first-child) { display: block; margin-inline: auto; }
html.ui9.page-research .v9-fsheet { width: min(460px, 100vw); }
html.ui9.page-research .v9-fsheet .bd { display: flex; flex-direction: column; gap: 14px; }
html.ui9.page-research .v9-fsheet .grid-f { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 10px; margin: 0 !important; }
html.ui9.page-research .v9-fsheet .bd > .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 10px; margin: 0 !important; }
html.ui9.page-research .v9-fsheet .bd > .row > div { min-width: 0 !important; flex: none !important; }
html.ui9.page-research .v9-fsheet .grid-f > div:has(> select.input > option:only-child) { display: none; }
/* a field alone on its row takes the row: its value reads whole */
html.ui9.page-research .v9-fsheet .grid-f > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
html.ui9.page-research .v9-fsheet details { margin: 0 !important; }
html.ui9.page-research .v9-fsheet details > .grid-f { margin-top: 11px !important; }
html.ui9.page-research .v9-fsheet summary { font: 600 13px/1.2 var(--sans) !important; letter-spacing: -.012em; color: var(--text) !important; }
html.ui9.page-research .v9-fsheet label.f { white-space: normal; line-height: 1.25; }
html.ui9.page-research .v9-fsheet label.f span { letter-spacing: 0; }
html.ui9.page-research .v9-fsheet .v9-fcount { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: var(--r-key); background: var(--surface-2); }
html.ui9.page-research .v9-fsheet .v9-fcount label.f { margin: 0; }
html.ui9.page-research .v9-fsheet .v9-fcount select { width: 104px !important; }
html.ui9.page-research .v9-fsheet .v9-fproven { font-size: 13px !important; font-weight: 500 !important; }
html.ui9.page-research .v9-fsheet .v9-ffoot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--hair); font-size: 12px; color: var(--text-dim); }
html.ui9.page-research .scrim { z-index: 40; }

/* ---- narrower ---- */
@media (max-width: 1320px) { html.ui9.page-research body > header.top > .faint { display: none; } }
/* the note in the label does not fit a narrow cell: it stays on the title */
@media (max-width: 1120px) { html.ui9.page-research .v9-pane label.f .faint { display: none; } }
@media (max-width: 1100px) {
  /* the tabs take a second row */
  html.ui9.page-research { --bar-h: 84px; --v9-rest: 140px; }
  html.ui9.page-research body > header.top { flex-wrap: wrap; }
  html.ui9.page-research .v9-src { order: 5; flex: 1 1 100%; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  html.ui9.page-research .v9-src button { flex: 1 0 auto; justify-content: center; }
  html.ui9.page-research #searchPanel { grid-template-columns: auto minmax(0, 1fr) minmax(150px, 210px); }
  html.ui9.page-research #searchPanel > .v9-fbtn { grid-column: 1; grid-row: 2; }
  html.ui9.page-research #searchPanel > .v9-hudr { grid-column: 2 / 3; grid-row: 2; justify-self: end; width: 138px; }
  html.ui9.page-research #searchBtn { grid-column: 3; grid-row: 2; }
  html.ui9.page-research #searchPanel > div:first-child > .faint { grid-row: 3; }
}
/* the bar scrolls away here: a sticky row only clears the nav */
@media (max-width: 760px) { html.ui9.page-research { --v9-stick: var(--shell-h); } }
@media (max-width: 640px) {
  html.ui9.page-research { --v9-rest: 260px; }
  html.ui9.page-research #searchPanel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  html.ui9.page-research #segType { grid-column: 1 / -1; grid-row: 1; display: flex; }
  html.ui9.page-research #segType button { flex: 1; }
  html.ui9.page-research #searchPanel > .row > div:has(#q) { grid-column: 1 / -1; grid-row: 2; }
  html.ui9.page-research #searchPanel > .row > div:has(#mode) { grid-column: 1 / -1; grid-row: 3; }
  html.ui9.page-research #searchPanel > .v9-fbtn { grid-column: 1; grid-row: 4; }
  html.ui9.page-research #searchPanel > .v9-hudr { grid-column: 2; grid-row: 4; justify-self: stretch; width: auto; }
  html.ui9.page-research #searchBtn { grid-column: 1 / -1; grid-row: 5; }
  html.ui9.page-research #searchPanel > div:first-child > .faint { grid-row: 6; }
  html.ui9.page-research #results { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-research :is(#sgResults, #acGrid, #peekGrid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.ui9.page-research .v9-pane .row > div { flex: 1 1 100% !important; }
  html.ui9.page-research .v9-pane .row .input { width: 100% !important; }
  html.ui9.page-research .v9-reshead { flex-wrap: wrap; }
  html.ui9.page-research .v9-pane label.f { white-space: normal; line-height: 1.25; }
}

/* ============================== DRIVE =============================== */
/* the log: one ink strip with a light and the switches, then the table */
html.ui9.page-drive body > .topbar { flex-wrap: nowrap; }
html.ui9.page-drive .topbar .brand > span:last-child { white-space: nowrap; }
html.ui9.page-drive .topbar #count { margin-left: 2px; font: 500 12px/1 var(--mono); letter-spacing: -.01em; color: var(--text-dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
html.ui9.page-drive .topbar #q { width: 260px !important; flex: 0 1 260px; min-width: 120px; }
html.ui9.page-drive .topbar #kind { flex: none; }

html.ui9.page-drive .wrap > .card:first-child {
  display: flex; align-items: center; gap: 12px; min-height: 36px; margin: 0 0 8px; padding: 3px 6px 3px 12px; overflow: visible; border: 0; border-radius: var(--r-card);
  background: var(--bezel); color: var(--on-bezel); --rejected: var(--hazard);
}
html.ui9.page-drive .wrap > .card:first-child > header { flex: 0 1 auto; max-width: 42%; min-width: 0; display: flex; flex-wrap: nowrap; align-items: center; gap: 9px; padding: 0; border: 0; }
html.ui9.page-drive .wrap > .card:first-child > header::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--on-bezel-faint);
}
/* the lamp is neutral until it knows better: green only with the daily upload really on */
html.ui9.page-drive .wrap > .card:first-child:has(#aOn:checked) > header::before { background: var(--lamp-ok); box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--lamp-ok) 18%, transparent), 0 0 8px color-mix(in srgb, var(--lamp-ok) 60%, transparent); }
html.ui9.page-drive .wrap > .card:first-child:has(#auto span[style*="rejected"]) > header::before, html.ui9.page-drive .wrap > .card:first-child[data-ux-bad]:has(#auto) > header::before { border-radius: 2px; background: var(--hazard); box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--hazard) 20%, transparent); }
html.ui9.page-drive .wrap > .card:first-child:has(#auto .spin) > header::before, html.ui9.page-drive .wrap > .card:first-child[data-ux-up]:has(#auto) > header::before {
  background: var(--lamp-work); box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--lamp-work) 20%, transparent);
}
@keyframes v9-a-lamp { 50% { opacity: .4; } }
@media (prefers-reduced-motion: no-preference) {
  html.ui9.page-drive .wrap > .card:first-child[data-ux-up] > header::before { animation: v9-a-lamp 1s ease-in-out infinite; }
}
html.ui9.page-drive .wrap > .card:first-child > header h2 { font: 500 10px/1 var(--mono) !important; letter-spacing: .085em; text-transform: uppercase; color: var(--on-bezel); white-space: nowrap; }
html.ui9.page-drive .wrap > .card:first-child > header h2 { flex: none; }
html.ui9.page-drive #autoSub { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: var(--on-bezel-dim); white-space: nowrap; }
html.ui9.page-drive .v9-drv-more { flex: none; order: 2; height: 24px; padding: 0 8px; border: 0; border-radius: 5px; cursor: pointer; font: 500 12px/1 var(--sans); color: var(--hazard); background: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hazard) 50%, transparent); }
html.ui9.page-drive .v9-drv-more:hover { background: color-mix(in srgb, var(--hazard) 14%, transparent); }
html.ui9.page-drive .v9-drv-more:focus-visible { outline-color: var(--led); }
/* #auto is rewritten on every load: its children join the strip's own row, so the problem key can sit right after the sentence */
html.ui9.page-drive #auto { display: contents; font-size: 12px; line-height: 1.35; color: var(--on-bezel-dim); }
html.ui9.page-drive #auto > span:first-child:not(:has(#aDay)) { order: 1; flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--on-bezel-dim); }
html.ui9.page-drive #auto a { color: var(--on-bezel); }
html.ui9.page-drive #auto .spin { flex: none; border-color: var(--bezel-3); border-top-color: var(--lamp-work); }
html.ui9.page-drive #auto label { order: 3; flex: none; font-size: 12px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; color: var(--on-bezel); cursor: pointer; }
/* on/off is always a switch */
html.ui9.page-drive #auto input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; order: 2; width: 34px; height: 19px; margin: 0; border-radius: 999px; cursor: pointer;
  background: var(--bezel-3); box-shadow: inset 0 0 0 1px var(--bezel-line-2); transition: background var(--t1);
}
html.ui9.page-drive #auto input[type="checkbox"]::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: var(--on-bezel-dim); transition: transform var(--t1), background var(--t1);
}
html.ui9.page-drive #auto input[type="checkbox"]:checked { background: color-mix(in srgb, var(--lamp-ok) 34%, var(--bezel-3)); }
html.ui9.page-drive #auto input[type="checkbox"]:checked::before { transform: translateX(15px); background: var(--lamp-ok); }
html.ui9.page-drive #auto input[type="checkbox"]:focus-visible { outline: 2px solid var(--led); outline-offset: 2px; box-shadow: inset 0 0 0 1px var(--bezel-line-2) !important; }
html.ui9.page-drive #auto > span:last-child:has(#aDay) { order: 4; flex: none; display: inline-flex; align-items: center; gap: 6px; }
html.ui9.page-drive #aDay {
  width: 124px; min-height: 26px; height: 26px; padding: 0 6px !important; color-scheme: dark; font: 500 12px/1 var(--mono); background: var(--bezel-2); color: var(--on-bezel); box-shadow: inset 0 0 0 1px var(--bezel-line-2);
}
html.ui9.page-drive #aDay:focus-visible { box-shadow: inset 0 0 0 1.5px var(--led); }
html.ui9.page-drive #aRun.btn { min-height: 26px; background: var(--bezel-3); color: var(--on-bezel); box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-drive #aRun.btn:hover { background: var(--bezel-2); color: var(--on-bezel); box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-drive #aRun.btn:focus-visible { outline-color: var(--led); }
/* a problem in the last run opens the strip, on request, to its whole sentence */
html.ui9.page-drive .wrap > .card:first-child.v9-open { flex-wrap: wrap; padding-bottom: 8px; }
/* the title takes the slack, so the key just pressed stays where it was */
html.ui9.page-drive .wrap > .card:first-child.v9-open > header { flex: 1 1 auto; max-width: none; }
html.ui9.page-drive .v9-open #auto > span:first-child:not(:has(#aDay)) { flex: 1 1 100%; order: 9; overflow: visible; white-space: normal; }

/* the table */
html.ui9.page-drive .wrap > .card:nth-child(2) { margin: 0; overflow: clip; }
/* the count has gone up to the bar. If ui9.js failed it never moved, and this header comes back with it. */
html.ui9.page-drive .wrap > .card:nth-child(2) > header { animation: v9-a-hold 3s linear; }
html.ui9.page-drive .wrap > .card:nth-child(2) > header:not(:has(#count)) { display: none; }
html.ui9.page-drive #t th:first-child, html.ui9.page-drive #t td:first-child { padding-left: 12px; }
html.ui9.page-drive #t th { background: var(--surface); }
html.ui9.page-drive #t td { height: 34px; padding-top: 3px; padding-bottom: 3px; font-size: 12.5px; line-height: 1.3; }
html.ui9.page-drive #t tbody tr:hover td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
html.ui9.page-drive #t tr.v9-dayline td { box-shadow: inset 0 1px 0 var(--line); }
html.ui9.page-drive .fname { font-weight: 500; color: var(--text); text-decoration: none; overflow-wrap: anywhere; word-break: normal; }
html.ui9.page-drive .fname:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
html.ui9.page-drive td .tag { display: inline-flex; align-items: center; gap: 6px; padding: 0; border-radius: 0; font-size: 12px; font-weight: 450; background: none; color: var(--text-dim); }
html.ui9.page-drive td .tag::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--text-faint); }
html.ui9.page-drive td .tag.auto::before { background: var(--live); }
html.ui9.page-drive td .tag.manual::before { background: var(--accent-2); }
html.ui9.page-drive td .tag.launches::before { background: var(--review); }
html.ui9.page-drive #t td:nth-child(6) { font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
html.ui9.page-drive #t td:nth-child(6) { max-width: 250px; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-drive #t td:nth-child(5) { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
/* row actions: quiet at rest, whole on hover and focus, always whole on touch. Delete stands apart. */
html.ui9.page-drive .acts { width: 1%; padding-right: 8px; }
html.ui9.page-drive .acts button {
  min-height: 24px; margin: 0; padding: 0 8px; border: 0; border-radius: 5px; background: none; font: 500 12px/1 var(--sans); color: var(--text-dim); box-shadow: none;
  transition: color var(--t1), box-shadow var(--t1), background var(--t1);
}
html.ui9.page-drive .acts button.del { margin-left: 16px; }
html.ui9.page-drive #t tr:is(:hover, :focus-within) .acts button { color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); }
html.ui9.page-drive #t tr:is(:hover, :focus-within) .acts button.del { color: var(--rejected); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rejected) 45%, transparent); }
html.ui9.page-drive #t .acts button.del:hover { background: var(--rejected); color: #fff; }
@media (hover: none) {
  html.ui9.page-drive .acts button { color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); min-height: 30px; }
  /* on touch it is always there, but a column of red should not be what a log reads as. Red when pressed; the real confirm follows. */
  html.ui9.page-drive #t tr .acts button.del, html.ui9.page-drive #t tr:is(:hover, :focus-within) .acts button.del { color: var(--text-dim); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
  html.ui9.page-drive #t tr .acts button.del:active { color: var(--rejected); }
}
html.ui9.page-drive #t td.empty { height: 200px; padding: 40px 20px; color: var(--text-dim); text-align: center; }
html.ui9.page-drive #t tbody tr:has(td.empty):hover td { background: none; }
html.ui9.page-drive #t td.empty .btn { display: flex; margin: 10px auto 0; }
/* the read failed: say so where the table would be */
html.ui9.page-drive .wrap > .card:first-child[data-ux-bad] ~ .card .tbl::before { content: "The folders could not be read. Reload the page to try again."; display: block; padding: 60px 20px; font-size: 13px; color: var(--text-dim); text-align: center; }
/* before the first answer, and only then */
html.ui9.page-drive .wrap:has(#auto .spin) #t:empty { display: block; height: 240px; background: repeating-linear-gradient(transparent 0 33px, var(--hair) 33px 34px), linear-gradient(100deg, transparent 35%, color-mix(in srgb, var(--text) 5%, transparent) 50%, transparent 65%) 0 0 / 200% 100%; animation: v9-shimmer 1.6s linear infinite; }

/* the head sticks to the page where the table fits; below that it scrolls in its own box */
@media (min-width: 900px) {
  html.ui9.page-drive .tbl { overflow: visible; }
  html.ui9.page-drive #t th { position: sticky; top: calc(var(--shell-h) + var(--bar-h)); z-index: 2; }
}
@media (max-width: 899px) {
  html.ui9.page-drive #t th { position: static; }
  html.ui9.page-drive #t td:first-child { min-width: 150px; }
  /* the sharing state has no other home: it stays, on two lines if it must */
  html.ui9.page-drive #t td:nth-child(5) { white-space: normal; line-height: 1.2; }
}
/* Made waits, as it already does on a phone: Folder keeps its width and Copy and Delete stay on screen without a sideways swipe */
@media (max-width: 1099px) { html.ui9.page-drive #t :is(th, td):nth-child(6) { display: none; } }
@media (max-width: 860px) { html.ui9.page-drive #aDay { width: 158px; } }
@media (max-width: 480px) {
  html.ui9.page-drive #t :is(th, td):nth-child(2) { display: none; }
  html.ui9.page-drive #t td:first-child { min-width: 120px; }
  html.ui9.page-drive .acts button { padding: 0 7px; }
  html.ui9.page-drive .acts button.del { margin-left: 8px; }
}
@media (max-width: 1240px) {
  html.ui9.page-drive .wrap > .card:first-child { flex-wrap: wrap; row-gap: 3px; padding-right: 8px; }
  html.ui9.page-drive #auto > span:first-child:not(:has(#aDay)) { flex: 1 1 calc(100% - 130px); order: 1; }
  html.ui9.page-drive .wrap > .card:first-child > header { flex: 1 1 100%; }
  html.ui9.page-drive .wrap > .card:first-child { padding-bottom: 6px; }
}
@media (max-width: 760px) {
  html.ui9.page-drive body > .topbar { flex-wrap: wrap; }
  html.ui9.page-drive .topbar #q { flex: 1 1 100%; width: auto !important; order: 3; }
  html.ui9.page-drive .topbar #kind { flex: 1 1 100%; order: 4; }
  html.ui9.page-drive .topbar .spacer { display: none; }
  html.ui9.page-drive #auto label { flex: 1 1 100%; justify-content: space-between; white-space: normal; }
  html.ui9.page-drive #auto input[type="checkbox"] { order: 2; }
  html.ui9.page-drive #auto > span:first-child:not(:has(#aDay)) { overflow: visible; white-space: normal; }
  html.ui9.page-drive #auto > span:last-child:has(#aDay) { flex: 1 1 100%; }
  html.ui9.page-drive #aDay { flex: 1 1 auto; }
  html.ui9.page-drive #t td:first-child { min-width: 130px; }
}

/* ============================ CALCULATOR ============================ */
/* the bench: two columns of figures, the ledger and the verdict stay beside them */
html.ui9.page-swipe_tools { --v9-top: calc(var(--shell-h) + var(--bar-h)); }
html.ui9.page-swipe_tools body > .top { flex-wrap: nowrap; }
html.ui9.page-swipe_tools .wrap > div > p.muted { max-width: none !important; margin: 0 0 8px; font-size: 12px; line-height: 1.4; color: var(--text-dim); }
html.ui9.page-swipe_tools .cols { grid-template-columns: minmax(0, 1fr) minmax(380px, 460px); align-items: start; gap: 10px; margin-top: 0; }
html.ui9.page-swipe_tools .panel { padding: 13px 14px 14px; border-radius: var(--r-card); }
html.ui9.page-swipe_tools .panel h3 { margin: 0; font: 600 14px/1.25 var(--sans); letter-spacing: -.012em; }
html.ui9.page-swipe_tools .panel h4 { grid-column: 1 / -1; margin: 12px 0 -2px; padding-top: 10px; border-top: 1px solid var(--hair); font: 600 13px/1.2 var(--sans); letter-spacing: -.012em; text-transform: none; color: var(--text); }
html.ui9.page-swipe_tools .cols > .panel:first-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; align-content: start; gap: 8px 12px; }
/* title and keys on one line, and the two panels share a bottom edge */
html.ui9.page-swipe_tools #v-calc .cols > .panel:first-child { align-self: stretch; }
html.ui9.page-swipe_tools .cols > .panel:first-child > h3 { align-self: center; }
/* the right head sits level with the left one, which shares its line with the keys */
html.ui9.page-swipe_tools .cols > .panel:last-child > h3 { display: flex; align-items: center; min-height: 27px; }
html.ui9.page-swipe_tools #v-brief .cols > .panel:last-child > h3 { min-height: 32px; }
html.ui9.page-swipe_tools .cols > .panel:first-child > .rowbtns { justify-content: flex-end; margin: 0 !important; }
html.ui9.page-swipe_tools label.f { display: block; margin: 0; line-height: 1.2; color: var(--text-dim); }
html.ui9.page-swipe_tools label.f :is(input, textarea, select) {
  display: block; width: 100%; min-height: 32px; margin-top: 6px; padding: 0 10px; border: 0; border-radius: var(--r-key); background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line);
  font: 400 13px/1.3 var(--sans); letter-spacing: 0; transition: box-shadow var(--t1);
}
html.ui9.page-swipe_tools #v-calc label.f input { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
html.ui9.page-swipe_tools label.f :is(input, textarea)::placeholder { color: var(--text-faint); font-family: var(--sans); font-weight: 400; letter-spacing: 0; }
html.ui9.page-swipe_tools label.f :is(input, textarea):hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
html.ui9.page-swipe_tools label.f :is(input, textarea):focus-visible, html.ui9.page-swipe_tools textarea.brief:focus-visible { outline: none; }
html.ui9.page-swipe_tools label.f textarea { min-height: 60px; padding: 7px 10px; resize: vertical; }
/* results stay in view while typing. Sticky here is below the bar, and short of the fold. */
html.ui9.page-swipe_tools .cols > .panel:last-child { position: sticky; top: calc(var(--v9-top) + 4px); max-height: calc(100vh - var(--v9-top) - 12px); overflow-y: auto; }
/* the verdict is a status light in a well */
html.ui9.page-swipe_tools .verdict {
  overflow-wrap: anywhere; display: flex; align-items: flex-start; gap: 10px; min-height: 50px; margin: 9px 0 10px; padding: 9px 12px 10px; border-radius: var(--r-card); font: 500 13px/1.4 var(--sans); color: var(--on-bezel);
  background-color: var(--bezel-well);
  background-image: linear-gradient(rgba(244,239,228,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(244,239,228,.03) 1px, transparent 1px);
  background-size: 12px 12px; background-position: -1px -1px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.85), 0 1px 0 rgba(244,239,228,.06);
}
html.ui9.page-swipe_tools .verdict::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--on-bezel-faint); }
html.ui9.page-swipe_tools .verdict.idle { font-weight: 400; font-size: 12.5px; color: var(--on-bezel-dim); }
html.ui9.page-swipe_tools .verdict.good::before { background: var(--lamp-ok); box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--lamp-ok) 18%, transparent), 0 0 9px color-mix(in srgb, var(--lamp-ok) 65%, transparent); }
/* shape as well as colour: a miss is a square lamp */
html.ui9.page-swipe_tools .verdict.bad::before { border-radius: 2px; background: var(--hazard); box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--hazard) 20%, transparent), 0 0 9px color-mix(in srgb, var(--hazard) 60%, transparent); }
html.ui9[data-theme="dark"].page-swipe_tools .verdict { background-color: var(--bezel); box-shadow: none; }
/* set like the Cost ledger */
html.ui9.page-swipe_tools #cRows { border-top: 2px solid var(--text); }
html.ui9.page-swipe_tools .res { align-items: center; gap: 10px; min-height: 35px; padding: 4px 0; border-bottom: 1px solid var(--hair); }
html.ui9.page-swipe_tools .res .k { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 9px; min-width: 0; }
html.ui9.page-swipe_tools .res .k b { display: inline; font-size: 13px; font-weight: 500; }
html.ui9.page-swipe_tools .res .k span { font-size: 11.5px; color: var(--text-dim); }
html.ui9.page-swipe_tools .res .v { min-width: 0; white-space: normal; overflow-wrap: anywhere; font: 500 13px/1.2 var(--mono); letter-spacing: -.01em; font-variant-numeric: tabular-nums; text-align: right; }
html.ui9.page-swipe_tools .res:last-child { border-top: 2px solid var(--text); border-bottom: 0; margin-top: -1px; }
html.ui9.page-swipe_tools .res:last-child .v { font-size: 16px; letter-spacing: -.03em; }
html.ui9.page-swipe_tools .res .v.pos { color: var(--live); }
html.ui9.page-swipe_tools:not([data-theme="dark"]) .res .v.pos { color: color-mix(in srgb, var(--live) 88%, var(--text)); }
html.ui9.page-swipe_tools .res .v.neg { color: var(--rejected); }
html.ui9.page-swipe_tools #v-calc .cols > .panel:last-child > p.muted { margin: 8px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--text-dim); }
/* one sentence: each formula is already printed on its own row, and all of them are on the title. Held to a line until the enhancer has trimmed it. */
@keyframes v9-a-clamp { from, to { max-height: 1.45em; overflow: hidden; } }
html.ui9.page-swipe_tools #v-calc .cols > .panel:last-child > p.muted:not([title]) { animation: v9-a-clamp 3s linear; }

/* the brief */
html.ui9.page-swipe_tools #v-brief .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
html.ui9.page-swipe_tools #v-brief .cols > .panel:first-child > :is(.plats, #bChecks, label.f:nth-of-type(1)) { grid-column: 1 / -1; }
/* the one primary action sits in the head, as Try example numbers does: in view without a scroll */
html.ui9.page-swipe_tools #v-brief .cols > .panel:first-child > h3 { grid-column: 1; grid-row: 1; }
html.ui9.page-swipe_tools #v-brief .cols > .panel:first-child > .rowbtns { grid-column: 2; grid-row: 1; justify-content: flex-end; }
html.ui9.page-swipe_tools .plats { gap: 5px; margin-top: 0; }
html.ui9.page-swipe_tools .plats label { gap: 6px; min-height: 28px; padding: 0 9px; border: 0; border-radius: var(--r-key); font: 500 12.5px/1 var(--sans); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
html.ui9.page-swipe_tools .plats label:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--text); }
html.ui9.page-swipe_tools .check { margin-top: 5px; font-size: 12.5px; line-height: 1.4; }
html.ui9.page-swipe_tools textarea.brief:placeholder-shown { background: var(--surface); }
html.ui9.page-swipe_tools textarea.brief { min-height: 300px; height: calc(100vh - var(--v9-top) - 182px); margin-top: 8px; border: 0; border-radius: var(--r-key); font: 400 12.5px/1.6 var(--mono); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 1040px) {
  html.ui9.page-swipe_tools .cols { grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); }
  html.ui9.page-swipe_tools #v-brief .cols { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-swipe_tools #v-brief .cols > .panel:last-child { position: static; max-height: none; }
}
@media (max-width: 860px) {
  html.ui9.page-swipe_tools .cols { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-swipe_tools .cols > .panel:last-child { position: static; max-height: none; overflow: visible; }
  html.ui9.page-swipe_tools body > .top { flex-wrap: wrap; }
  html.ui9.page-swipe_tools textarea.brief { height: 320px; }
  /* one column: the ledger falls below the form, so the verdict is pinned above the thumb bar while typing. Moved, not copied: calc() writes to it by id. */
  html.ui9.page-swipe_tools body > .verdict { position: fixed; left: 14px; right: 14px; bottom: calc(72px + env(safe-area-inset-bottom) + 8px); z-index: 20; min-height: 0; margin: 0; padding: 7px 10px; box-shadow: inset 0 1px 3px rgba(0,0,0,.85), 0 0 0 1px var(--bezel-line-2); }
  html.ui9.page-swipe_tools body > .verdict::before { margin-top: 5px; }
  html.ui9.page-swipe_tools body > .verdict.idle, html.ui9.page-swipe_tools:has(#v-brief:not([style*="none"])) body > .verdict { display: none; }
  html.ui9.page-swipe_tools:has(body > .verdict:not(.idle)) .wrap { padding-bottom: 64px; }
}
@media (max-width: 640px) { html.ui9.page-swipe_tools #v-calc .cols > .panel:first-child { align-items: end; } }
@media (max-width: 480px) {
  html.ui9.page-swipe_tools .cols > .panel:first-child > .rowbtns { grid-column: 1 / -1; justify-content: flex-start; }
  html.ui9.page-swipe_tools #v-brief .cols > .panel:first-child { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-swipe_tools #v-brief .cols > .panel:first-child > .rowbtns { grid-column: 1; grid-row: auto; justify-content: flex-start; }
}

/* ================================ SWIPE ============================= */
/* both pages set .btn inline-block in their own style block: an anchor then loses its centring */
html.ui9:is(.page-swipe, .page-swipe_tools) .btn { display: inline-flex; box-sizing: border-box; }
html.ui9.page-swipe body > .top { flex-wrap: nowrap; }
html.ui9.page-swipe body > .top #q { flex: 0 1 300px; min-width: 150px !important; }
html.ui9.page-swipe .top .btn { flex: none; }
html.ui9.page-swipe .top > b, html.ui9.page-swipe #tabs button { white-space: nowrap; }
/* plain words: the words come from here so they are right at first paint */
/* the field shows its own ring: no second one around it */
html.ui9:is(.page-swipe, .page-swipe_tools, .page-research, .page-drive) .input:focus-visible { outline: none; }
html.ui9.page-drive .input:not(#aDay):focus-visible { box-shadow: inset 0 0 0 1.5px var(--accent); }
html.ui9.page-swipe .top a[href="swipe_tools.html"] { font-size: 0; }
html.ui9.page-swipe .top a[href="swipe_tools.html"]::before { content: "Calculator and brief"; font-size: 12px; }

/* ---- one strip: filters, the top categories, then what is loaded ---- */
html.ui9.page-swipe #v-library { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; column-gap: 10px; align-items: center; }
html.ui9.page-swipe #v-library > :is(#grid, #libEmpty, div:last-child) { grid-column: 1 / -1; }
/* relative: the hidden labels are absolute, and must stay inside this strip's own scroller */
html.ui9.page-swipe .filters { position: relative; grid-column: 1; grid-row: 1; flex-wrap: nowrap; gap: 6px; min-width: 0; margin: 0; min-height: 44px; overflow-x: auto; scrollbar-width: none; }
html.ui9.page-swipe .filters::-webkit-scrollbar { display: none; }
html.ui9.page-swipe .filters .f { flex: none; gap: 6px; }
html.ui9.page-swipe .filters #btnClear { flex: none; }
html.ui9.page-swipe .filters .f span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html.ui9.page-swipe .filters .f:has(#fSort) span { position: static; width: auto; height: auto; clip-path: none; margin-left: 4px; font: 500 10px/1 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--text-dim); }
html.ui9.page-swipe .filters .input { max-width: 150px; min-height: 30px; font-size: 12.5px; font-weight: 450; }
html.ui9.page-swipe #chips { grid-column: 2; grid-row: 1; flex-wrap: nowrap; gap: 4px; min-width: 0; margin: 0; padding-right: 18px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); }
html.ui9.page-swipe #chips::-webkit-scrollbar { display: none; }
html.ui9.page-swipe .chip { flex: none; min-height: 26px; padding: 0 8px; border: 0; border-radius: var(--r-key); font: 500 12px/1 var(--sans); background: none; color: var(--text-dim); box-shadow: inset 0 0 0 1px var(--line); transition: color var(--t1), box-shadow var(--t1); }
html.ui9.page-swipe .chip:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
html.ui9.page-swipe .chip.on { background: var(--primary-bg); color: var(--primary-text); box-shadow: none; }
html.ui9.page-swipe #v-library > .meta-row { grid-column: 3; grid-row: 1; flex-wrap: nowrap; gap: 6px; margin: 0; white-space: nowrap; }
html.ui9.page-swipe #v-library > .meta-row .spacer { display: none; }
html.ui9.page-swipe #v-library > .meta-row :is(.btn, a) { flex: none; }
/* a long advertiser or domain cuts here: the whole name is on the title */
html.ui9.page-swipe #count { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12px/1.2 var(--mono); letter-spacing: -.01em; color: var(--text-dim); font-variant-numeric: tabular-nums; }
/* a drill-down names what it is filtered to: that line gets a row of its own, so it can never squeeze the filters or push Export away */
html.ui9.page-swipe #v-library[data-ux-drill] > .meta-row { grid-column: 1 / -1; grid-row: 2; justify-content: flex-end; }
html.ui9.page-swipe #v-library[data-ux-drill] > .meta-row #count { margin-right: auto; }

/* ---- the wall ---- */
html.ui9.page-swipe .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 2px; }
html.ui9.page-swipe #grid:empty { display: none; }
/* while the first read runs. Finite: a read that never answers must not shimmer for ever. */
html.ui9.page-swipe #v-library:not([data-ux-failed]):has(#grid:empty):has(#libEmpty[style*="none"]) #grid { display: block; height: 340px; border-radius: var(--r-card); background: linear-gradient(100deg, transparent 35%, color-mix(in srgb, var(--text) 5%, transparent) 50%, transparent 65%) 0 0 / 200% 100%, var(--mat); animation: v9-shimmer 1.6s linear 12; }
/* the read failed: the strip stays, so Refresh is one press away, and the sheet says what happened */
html.ui9.page-swipe #v-library[data-ux-failed]:has(#grid:empty) #grid { display: block; height: 240px; padding: 104px 20px 0; border-radius: var(--r-card); animation: none; background: none; box-shadow: inset 0 0 0 1px var(--hair); font-size: 13px; color: var(--text-dim); text-align: center; }
html.ui9.page-swipe #v-library[data-ux-failed]:has(#grid:empty) #grid::before { content: "The library did not load. Press Refresh swipes to try again."; }
html.ui9.page-swipe #v-library[data-ux-failed]:has(#grid:empty) #count { visibility: hidden; }
html.ui9.page-swipe .card { border-radius: var(--r-card); overflow: clip; }
html.ui9.page-swipe .card:hover { border-color: var(--line-strong); }
html.ui9.page-swipe .card .shot { background: var(--mat); }
html.ui9.page-swipe .card .shot .noimg { padding: 16px; font-size: 13px; color: var(--text-dim); }
html.ui9.page-swipe .pill { top: 7px; padding: 3px 5px; border: 0; border-radius: var(--r-cap); font: 500 10px/1 var(--mono); letter-spacing: .03em; background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line); pointer-events: none; }
html.ui9.page-swipe .pill.left { left: 7px; }
html.ui9.page-swipe .pill.right { right: 7px; background: var(--bezel); color: var(--on-bezel); box-shadow: none; }
html.ui9.page-swipe .card .bd { gap: 6px; padding: 9px 11px 10px; }
html.ui9.page-swipe .adv { font: 500 10px/1.25 var(--mono); letter-spacing: .05em; color: var(--text-dim); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
html.ui9.page-swipe .headline { font-size: 13.5px; font-weight: 600; line-height: 1.3; letter-spacing: -.005em; }
html.ui9.page-swipe .card .headline { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
html.ui9.page-swipe .headline:hover { text-decoration: underline; text-underline-offset: 2px; }
html.ui9.page-swipe .tagrow { gap: 4px; }
html.ui9.page-swipe .tagrow:empty { display: none; }
html.ui9.page-swipe .tag { padding: 1px 5px; border-radius: var(--r-cap); font-size: 11px; font-weight: 500; background: var(--surface-2); color: var(--text-dim); }
html.ui9.page-swipe .tag:not(.dim) { background: var(--live-bg); color: var(--live); }
html.ui9.page-swipe .card .stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; align-items: end; gap: 8px 4px; padding-top: 7px; border-top: 1px solid var(--hair); }
/* tags vary, so the figures, the landing box and the keys are hung from the bottom: they line up across a row */
html.ui9.page-swipe .card .stats { margin-top: auto; }
html.ui9.page-swipe .card .cardbtns { margin-top: 0; }
html.ui9.page-swipe .card .stats div span { font-size: 10px; line-height: 1.2; color: var(--text-dim); }
html.ui9.page-swipe .card .stats div:first-child span { white-space: nowrap; }
html.ui9.page-swipe .card .stats div b { display: block; margin-top: 2px; font: 500 11px/1.2 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
html.ui9.page-swipe .lpbox { padding: 7px 9px; border: 0; border-radius: var(--r-key); font-size: 12px; line-height: 1.35; background: var(--surface-2); overflow-wrap: anywhere; }
html.ui9.page-swipe .lpbox > .muted:first-child { color: var(--text-dim); font-size: 11.5px; }
html.ui9.page-swipe .lpbox:not([style]) > .muted:first-child { font-size: 0; }
html.ui9.page-swipe .lpbox:not([style]) > .muted:first-child::before { content: "Landing page"; font-size: 11.5px; }
html.ui9.page-swipe .lpbox .dom { font: 500 11.5px/1.3 var(--mono); letter-spacing: -.01em; }
html.ui9.page-swipe .lpbox a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
/* a page capture is as tall as the page: a thumbnail of its top beside the domain. A click still opens the whole of it. */
html.ui9.page-swipe .card .lpbox:has(img) { position: relative; min-height: 62px; padding-right: 82px; }
html.ui9.page-swipe .card .lpbox img { position: absolute; top: 7px; right: 9px; display: block; width: 64px; height: 48px; margin: 0; border: 0; border-radius: var(--r-cap); object-fit: cover; object-position: top; box-shadow: 0 0 0 1px var(--line); }
html.ui9.page-swipe .cardbtns { gap: 5px; }
html.ui9.page-swipe #btnMore { min-width: 140px; }

/* ---- the empty state, designed first: this is what the owner sees on live ---- */
html.ui9.page-swipe #libEmpty { position: relative; isolation: isolate; padding: 0; color: var(--text-dim); }
/* the wall it will become: empty frames at the size real cards take, fading out behind the hero */
html.ui9.page-swipe .v9-sw-ghosts { position: absolute; z-index: -1; inset: 2px 0 auto; display: none; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; height: min(64vh, 540px); overflow: hidden; pointer-events: none; -webkit-mask-image: linear-gradient(#000 15%, transparent); mask-image: linear-gradient(#000 15%, transparent); }
html.ui9.page-swipe .v9-sw-ghosts i { position: relative; display: block; height: 300px; border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); }
html.ui9.page-swipe .v9-sw-ghosts i::before { content: ""; position: absolute; inset: 1px 1px 110px; border-radius: 9px 9px 0 0; background: var(--mat); opacity: .55; }
html.ui9[data-theme="dark"].page-swipe .v9-sw-ghosts i::before { opacity: .9; }
html.ui9.page-swipe .v9-sw-ghosts i::after { content: ""; position: absolute; left: 12px; right: 40%; bottom: 70px; height: 9px; border-radius: 2px; background: var(--mat); box-shadow: 0 18px 0 var(--mat); opacity: .8; }
html.ui9.page-swipe #libEmpty[style*="none"] { display: none; }
html.ui9.page-swipe .v9-sw-none { display: grid; place-items: center; gap: 10px; padding: 56px 20px; font-size: 13px; }
html.ui9.page-swipe .v9-sw-hero { display: none; }
html.ui9.page-swipe .v9-sw-hero {
  position: relative; max-width: 620px; margin: 64px auto 40px; padding: 30px 34px 26px; text-align: center; border-radius: var(--r-card); background: var(--surface); box-shadow: 0 0 0 1px var(--line); --bi: -6px;
}
html.ui9.page-swipe .v9-sw-hero h2 { margin: 8px 0 6px; font: 600 15px/1.25 var(--sans); letter-spacing: -.015em; color: var(--text); }
html.ui9.page-swipe .v9-sw-hero p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-dim); }
html.ui9.page-swipe .v9-sw-hero p b { font-weight: 500; color: var(--text); }
html.ui9.page-swipe .v9-sw-hero code { font: 500 12px/1.3 var(--mono); letter-spacing: -.01em; color: var(--text); }
html.ui9.page-swipe .v9-sw-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; }
/* a truly empty library, with nothing filtered: the hero, no filter strip. A filter or a drill-down that found nothing keeps its strip and a way out. */
html.ui9.page-swipe:has(#q:placeholder-shown) #v-library:not([data-ux-drill]):has(.v9-sw-hero):has(#libEmpty:not([style*="none"])):has(#fPlat option[value=""]:checked):has(#fNiche option[value=""]:checked):has(#fFormat option[value=""]:checked):has(#fDays option[value=""]:checked) :is(.filters, .meta-row, #chips) { display: none; }
html.ui9.page-swipe:has(#q:placeholder-shown) #v-library:not([data-ux-drill]):has(.v9-sw-hero):has(#libEmpty:not([style*="none"])):has(#fPlat option[value=""]:checked):has(#fNiche option[value=""]:checked):has(#fFormat option[value=""]:checked):has(#fDays option[value=""]:checked) .v9-sw-hero { display: block; }
html.ui9.page-swipe:has(#q:placeholder-shown) #v-library:not([data-ux-drill]):has(.v9-sw-hero):has(#libEmpty:not([style*="none"])):has(#fPlat option[value=""]:checked):has(#fNiche option[value=""]:checked):has(#fFormat option[value=""]:checked):has(#fDays option[value=""]:checked) .v9-sw-ghosts { display: grid; }
html.ui9.page-swipe:has(#q:placeholder-shown) #v-library:not([data-ux-drill]):has(.v9-sw-hero):has(#libEmpty:not([style*="none"])):has(#fPlat option[value=""]:checked):has(#fNiche option[value=""]:checked):has(#fFormat option[value=""]:checked):has(#fDays option[value=""]:checked) .v9-sw-none { display: none; }

/* ---- Collections, Advertisers, Destinations ---- */
html.ui9.page-swipe .wrap > div > p.muted { margin: 2px 0 8px; font-size: 12px; color: var(--text-dim); }
html.ui9.page-swipe #v-collections > .meta-row { margin: 2px 0 8px; min-height: 32px; }
html.ui9.page-swipe table.rt { border: 1px solid var(--line); border-radius: var(--r-card); overflow: clip; font-size: 12.5px; border-collapse: separate; border-spacing: 0; }
html.ui9.page-swipe .rt th { position: static; padding-left: 12px; padding-right: 12px; background: var(--surface); }
html.ui9.page-swipe .rt td { padding: 5px 12px; border-bottom: 1px solid var(--hair); line-height: 1.35; }
html.ui9.page-swipe .rt td b { font-weight: 500; }
html.ui9.page-swipe .rt tr.click:hover td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
html.ui9.page-swipe .rt tr.click:focus-visible { outline-offset: -2px; }
html.ui9.page-swipe :is(#advRows, #domRows) td:is(:nth-child(2), :nth-child(3)), html.ui9.page-swipe #domRows td:nth-child(4), html.ui9.page-swipe #colList td:nth-child(2) { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
/* figures line up on their units, heads with them */
html.ui9.page-swipe :is(#advRows, #domRows) td:is(:nth-child(2), :nth-child(3)), html.ui9.page-swipe #domRows td:nth-child(4), html.ui9.page-swipe #colList td:nth-child(2),
html.ui9.page-swipe table:has(#advRows) th:is(:nth-child(2), :nth-child(3)), html.ui9.page-swipe table:has(#domRows) th:is(:nth-child(2), :nth-child(3), :nth-child(4)), html.ui9.page-swipe #colList th:nth-child(2) { text-align: right; }
html.ui9.page-swipe #advRows td:nth-child(3), html.ui9.page-swipe table:has(#advRows) th:nth-child(3), html.ui9.page-swipe #domRows td:nth-child(4), html.ui9.page-swipe table:has(#domRows) th:nth-child(4), html.ui9.page-swipe #colList :is(td, th):nth-child(2) { padding-right: 20px; }
html.ui9.page-swipe .rt td.muted { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
/* the platform list has no spaces: left alone it sets the width of the page */
html.ui9.page-swipe #advRows td:nth-child(4), html.ui9.page-swipe #domRows td:nth-child(5) { min-width: 120px; overflow-wrap: anywhere; font-size: 12px; color: var(--text-dim); }
html.ui9.page-swipe #colAds h3 { margin: 10px 0 8px !important; font: 600 14px/1.25 var(--sans); letter-spacing: -.012em; }
html.ui9.page-swipe #colAds { margin-top: 10px !important; }
html.ui9.page-swipe .empty { padding: 56px 20px; color: var(--text-dim); }

/* ---- windows ---- */
html.ui9.page-swipe .ovl { background: rgba(12,10,6,.52); padding: 24px 14px; }
html.ui9.page-swipe .modal { padding: 16px 18px 0; max-height: calc(100vh - 48px); overflow: auto; }
html.ui9.page-swipe .modal h3 { margin: 0 0 4px; font: 600 15px/1.25 var(--sans); letter-spacing: -.015em; }
html.ui9.page-swipe .modal .muted { font-size: 12px; line-height: 1.4; color: var(--text-dim); }
html.ui9.page-swipe .frow { gap: 8px; margin-top: 9px; }
html.ui9.page-swipe .frow > label { gap: 5px; min-width: 130px; font: 500 10px/1.2 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--text-dim); }
html.ui9.page-swipe .frow :is(input, select, textarea) {
  min-height: 32px; padding: 0 10px; border: 0; border-radius: var(--r-key); background-color: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line);
  font: 400 13px/1.3 var(--sans); letter-spacing: 0; text-transform: none;
}
html.ui9.page-swipe .frow select {
  appearance: none; -webkit-appearance: none; padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23978d7b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 12px;
}
html.ui9.page-swipe .frow :is(input, select, textarea):focus-visible { outline: none; }
html.ui9.page-swipe .frow textarea { min-height: 62px; padding: 7px 10px; }
html.ui9.page-swipe .frow :is(input, textarea)::placeholder { color: var(--text-faint); }
html.ui9.page-swipe .paste { margin-top: 9px; padding: 12px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-key); font-size: 12px; color: var(--text-dim); }
html.ui9.page-swipe .note { margin-top: 9px; padding: 7px 10px; font-size: 12px; }
html.ui9.page-swipe .mfoot { position: sticky; bottom: 0; z-index: 2; gap: 6px; margin: 12px -18px 0; padding: 10px 18px; background: var(--surface); border-top: 1px solid var(--hair); }
html.ui9.page-swipe .detail-media { background: var(--bezel-well); border-radius: var(--r-key); }
html.ui9.page-swipe .kv { grid-template-columns: 130px minmax(0, 1fr); gap: 4px 12px; font-size: 12.5px; }
html.ui9.page-swipe .kv span { color: var(--text-dim); }
html.ui9.page-swipe .kv a { color: var(--text); }
html.ui9.page-swipe #detailBody p { font-size: 13px; line-height: 1.5; }
html.ui9.page-swipe .popover { border: 0; border-radius: var(--r-card); padding: 8px; box-shadow: 0 0 0 1px var(--line), var(--e2); max-height: min(257px, 50vh); overflow: auto; scroll-margin: 8px; }
html.ui9.page-swipe .popover .ci { padding: 6px; border-radius: var(--r-cap); font-size: 12.5px; overflow-wrap: anywhere; }
html.ui9.page-swipe .popover .ci:hover { background: var(--hover); }
html.ui9.page-swipe .toast { border-radius: var(--r-key); font-size: 13px; background: var(--bezel); color: var(--on-bezel); box-shadow: var(--e2); }

@media (max-width: 1320px) {
  html.ui9.page-swipe #v-library { grid-template-columns: minmax(0, 1fr) auto; }
  html.ui9.page-swipe #chips { display: none; }
  html.ui9.page-swipe #v-library > .meta-row { grid-column: 2; }
  html.ui9.page-swipe .filters .input { max-width: 124px; }
  html.ui9.page-swipe body > .top #q { flex: 0 1 200px; min-width: 120px !important; }
}
@media (max-width: 1160px) {
  html.ui9.page-swipe #v-library { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  html.ui9.page-swipe #v-library > .meta-row { grid-column: 1; grid-row: 2; justify-content: flex-end; }
  html.ui9.page-swipe #v-library > .meta-row #count { margin-right: auto; }
}
@media (max-width: 1100px) {
  html.ui9.page-swipe body > .top { flex-wrap: wrap; }
  html.ui9.page-swipe body > .top #q { flex: 1 1 200px; }
  html.ui9.page-swipe .top .spacer { flex: 1 1 100%; height: 0; }
}
/* inputs are 16px here: a value needs its own width, and the strip swipes, with the same fade as #chips to say there is more */
@media (max-width: 860px) {
  html.ui9.page-swipe .filters .input { max-width: none; width: auto; }
  html.ui9.page-swipe .filters { padding-right: 18px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); }
}
@media (max-width: 640px) {
  html.ui9.page-swipe body > .top #q { flex: 1 1 100%; }
  html.ui9.page-swipe #v-library > .meta-row { flex-wrap: wrap; white-space: normal; }
  html.ui9.page-swipe .grid { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-swipe .v9-sw-hero { margin-top: 18px; padding: 22px 18px 18px; }
  html.ui9.page-swipe .v9-sw-keys .btn { flex: 1 1 100%; }
  html.ui9.page-swipe .rt { display: block; overflow-x: auto; }
  html.ui9.page-swipe .kv { grid-template-columns: 110px minmax(0, 1fr); }
  html.ui9.page-swipe .toast { bottom: calc(72px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); }
}
/* Import and Save share one row, so the wall starts sooner. The Calculator stays in All screens. */
@media (max-width: 480px) { html.ui9.page-swipe .top a[href="swipe_tools.html"] { display: none; } }

/* ===== 51-ai.css ===== */
/* =====================================================================
   P11: AI Studio (the briefing), AI chat (the console), API docs.
   DESIGN 4.18, 4.19, 4.22. Layout is CSS keyed to html.ui9.
   js/51-ai.js only adds chrome.
   ===================================================================== */

/* ======================= AI STUDIO: the briefing ======================= */
html.ui9.page-ai { --v9-gap: 12px; --v9-title: 104px; }
html.ui9.page-ai body { line-height: 1.45; }

/* ---- the bar: title, tabs, spacer, the Claude lamp. One row at 1100 and up, from CSS alone: the tabs ride up
   over the sticky .head, so nothing moves and nothing jumps. ---- */
html.ui9.page-ai .wrap > .head { flex-wrap: nowrap; align-items: center; }
html.ui9.page-ai .head > div:first-child { flex: none; min-width: 0; }
html.ui9.page-ai .head h1 { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; cursor: default; }
html.ui9.page-ai .head h1 .v9-i { width: 14px; height: 14px; color: var(--text-dim); }
html.ui9.page-ai .head h1:not(.v9-t) { visibility: hidden; animation: v9-show 0s linear 1.2s forwards; }
html.ui9.page-ai .head .sub { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html.ui9.page-ai .head .sp { flex: 1 1 8px; min-width: 8px; }
html.ui9.page-ai #keyChip {
  flex: none; gap: 7px; height: 26px; max-width: 100%; padding: 0 9px; border: 0; border-radius: var(--r-key); background: none; white-space: nowrap;
  font: 500 11px/1 var(--mono); letter-spacing: -.01em; color: var(--text-dim); box-shadow: inset 0 0 0 1px var(--line);
}
html.ui9.page-ai #keyChip .dot { flex: none; width: 6px; height: 6px; background: var(--live); box-shadow: 0 0 0 2px color-mix(in srgb, var(--live) 22%, transparent); }
html.ui9.page-ai #keyChip .dot.off { background: var(--rejected); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rejected) 22%, transparent); }
html.ui9.page-ai #tabs { flex-wrap: nowrap; width: max-content; max-width: 100%; margin: 6px 0 var(--v9-gap); }
html.ui9.page-ai #tabs button { flex: none; }
/* nine tabs and the lamp share the row from 1100, so the tabs tighten before anything is cut */
@media (min-width: 1100px) and (max-width: 1240px) { html.ui9.page-ai { --v9-title: 94px; } html.ui9.page-ai #tabs button { padding: 0 7px; } }
@media (min-width: 1100px) {
  html.ui9.page-ai #tabs {
    position: sticky; top: calc(var(--shell-h) + 10px); z-index: 31; max-width: calc(100% - var(--v9-title) - 258px);
    margin: calc(10px - var(--bar-h)) 0 14px var(--v9-title);
  }
  /* a long model name must not reach the tabs: the whole line is in the title */
  html.ui9.page-ai #keyChip { max-width: 252px; overflow: hidden; }
}
@media (max-width: 1099px) {
  html.ui9.page-ai #tabs { overflow-x: auto; scrollbar-width: none; }
  html.ui9.page-ai #tabs button:focus-visible { outline-offset: -2px; }
  html.ui9.page-ai #tabs::-webkit-scrollbar { display: none; }
}
/* under 1100 the tabs have their own row. On a long brief that row is what must stay in reach, not the title.
   Cards pass under a real full-width band, so it stops the pointer as well as the eye: a click on blank band lands on
   #view and does nothing. It is #view's own first box (#view is rewritten, its ::before is not), lifted behind the keys,
   6px proud of them above and below. Focus stops clear of it too. */
@media (min-width: 761px) and (max-width: 1099px) {
  html.ui9.page-ai { --v9-band: 42px; scroll-padding-top: calc(var(--shell-h) + var(--v9-band) + 8px); }
  html.ui9.page-ai .wrap > .head { position: static; }
  html.ui9.page-ai #tabs { position: sticky; top: calc(var(--shell-h) + 6px); z-index: 29; }
  html.ui9.page-ai #view::before {
    content: ""; display: block; position: sticky; top: var(--shell-h); z-index: 28; height: var(--v9-band);
    margin: calc(-6px - var(--v9-band)) calc(-1 * var(--gut)) 6px; background: var(--bg);
  }
}

/* ---- what every tab shares ---- */
html.ui9.page-ai #view { font-size: 13px; }
html.ui9.page-ai .card { padding: 13px 14px; margin-bottom: var(--v9-gap); background: var(--surface); }
html.ui9.page-ai .card h2 { margin: 0 0 3px; font-size: 14px; font-weight: 600; letter-spacing: -.012em; line-height: 1.25; }
html.ui9.page-ai .card h3 { margin: 14px 0 5px; font: 500 10px/1.2 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--text-dim); }
html.ui9.page-ai .card h3 .faint { font: inherit; color: var(--text-dim); }
html.ui9.page-ai .faint { color: var(--text-dim); font-size: 12px; line-height: 1.4; }
/* an intro keeps a reading measure, however wide the window */
html.ui9.page-ai #view .card > .faint:first-of-type { max-width: 720px; }
html.ui9.page-ai .bar { gap: 8px; margin-bottom: 10px; }
html.ui9.page-ai ul { margin: 3px 0 0; padding-left: 15px; }
html.ui9.page-ai li { margin: 2px 0; }
html.ui9.page-ai li::marker { color: var(--text-faint); }
html.ui9.page-ai label.faint, html.ui9.page-ai .bar > label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; line-height: 1.2; color: var(--text-dim); }
html.ui9.page-ai input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: var(--primary-bg); }
html.ui9.page-ai .v9-fig { font: 500 .93em/1 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
html.ui9.page-ai .spin { border-color: var(--line-strong); border-top-color: var(--text); }
html.ui9.page-ai .empty { padding: 24px 10px; font-size: 13px; color: var(--text-dim); }
html.ui9.page-ai .err { border-radius: var(--r-key); background: var(--rejected-bg); color: var(--rejected); font-size: 12.5px; line-height: 1.4; }
/* on ink the tone needs a little of the ink's own light to reach 4.5:1 */
html.ui9.page-ai #view > .err { color: color-mix(in srgb, var(--rejected) 76%, var(--on-bezel)); }
html.ui9.page-ai .err a { color: inherit; text-decoration: underline; }
html.ui9.page-ai .toast { border-radius: var(--r-key); font-size: 12.5px; font-weight: 500; z-index: 50; }

/* loading: a page of nothing is a sheet about to fill, not a lone spinner */
html.ui9.page-ai #view > .empty:only-child:has(> .spin) {
  height: 208px; padding: 0; border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 200% 100%;
  animation: v9-shimmer 1.6s linear infinite;
}
html.ui9.page-ai #view > .empty:only-child > .spin { display: none; }

/* USES CLAUDE: anything that spends on the Anthropic key says so. A pseudo-element, so the page's own label writes never touch it. */
html.ui9.page-ai :is([data-mk], #wPrev, #wRun, #wGo, #sGo, #tNew, #tAll)::after {
  content: "USES CLAUDE"; flex: none; margin-left: 2px; padding-left: 7px; border-left: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  font: 500 10px/1.3 var(--mono); letter-spacing: .06em; opacity: .78;
}

/* ---- Morning brief. The first card is a strip: filters, how it is made, the switch. ---- */
html.ui9.page-ai #view > .card:has(#bAuto) { padding: 0; margin-bottom: 8px; border: 0; background: none; box-shadow: none; }
html.ui9.page-ai .card:has(#bAuto) > .bar { flex-wrap: nowrap; min-height: 30px; }
html.ui9.page-ai .card:has(#bAuto) > .bar > div:not(.v9-moods) { min-width: 0; flex: 0 1 auto; }
html.ui9.page-ai .card:has(#bAuto) h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
html.ui9.page-ai .card:has(#bAuto) > .bar .faint:not(label) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui9.page-ai .card:has(#bAuto) label { flex: none; white-space: nowrap; }
html.ui9.page-ai .v9-moods { flex: none; display: flex; padding: 2px; gap: 1px; border-radius: var(--r-key); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); }
html.ui9.page-ai .v9-moods button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 9px; border: 0; border-radius: var(--r-cap); background: none; cursor: pointer;
  font: 500 12.5px/1.15 var(--sans); color: var(--text-dim); transition: background var(--t1), color var(--t1);
}
html.ui9.page-ai .v9-moods button:hover { background: var(--hover); color: var(--text); }
html.ui9.page-ai .v9-moods button[aria-pressed="true"] { background: var(--primary-bg); color: var(--primary-text); }
html.ui9.page-ai .v9-moods button:disabled { opacity: .5; cursor: default; }
html.ui9.page-ai .v9-moods b { font: 500 11px/1 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
html.ui9.page-ai .v9-moods i { flex: none; width: 7px; height: 7px; border-radius: 50%; }
html.ui9.page-ai .v9-moods i.v9-m-bad { background: var(--rejected); }
html.ui9.page-ai .v9-moods i.v9-m-watch { background: var(--review); }
html.ui9.page-ai .v9-moods i.v9-m-good { background: var(--live); }

/* NewsBreak and Meta side by side, so Meta's Do today is on the first screen */
@media (min-width: 1100px) {
  html.ui9.page-ai #view:has(#bAuto) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--v9-gap); align-items: start; }
  html.ui9.page-ai #view:has(#bAuto) > .card:first-child { grid-column: 1 / -1; }
}
html.ui9.page-ai .card:has([data-mk]) > .bar:first-child { flex-wrap: nowrap; margin-bottom: 8px; }
html.ui9.page-ai .card:has([data-mk]) > .bar:first-child h2 { margin: 0; white-space: nowrap; }
html.ui9.page-ai .card:has([data-mk]) > .bar:first-child .faint { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui9.page-ai .card:has([data-mk]) > .bar:first-child .btn { flex: none; }
/* Claude's verdict, in his own voice. Two sentences at most, so it may hold the serif. */
html.ui9.page-ai p.v9-lede { margin: 0 2px 10px !important; font: 400 17px/1.3 var(--serif) !important; letter-spacing: 0; color: var(--text); }
/* the sentence leads: its numbers are mono, but no heavier than the serif round them */
html.ui9.page-ai p.v9-lede .v9-num { font: 400 .78em/1 var(--mono); letter-spacing: -.03em; }

/* ---- the hero: Do today ---- */
html.ui9.page-ai :is(.v9-do, .card:has([data-mk]) > .muted, #view > .err) {
  border-radius: var(--r-card); background-color: var(--bezel-well);
  background-image: linear-gradient(rgba(244,239,228,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(244,239,228,.03) 1px, transparent 1px);
  background-size: 12px 12px; background-position: -1px -1px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.85), 0 1px 0 rgba(244,239,228,.06);
}
/* in dark the bezel lifts above the sheet */
html.ui9.page-ai[data-theme="dark"] :is(.v9-do, .card:has([data-mk]) > .muted, #view > .err) { background-color: var(--bezel-2); box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-ai .v9-do { --bi: 4px; display: block; margin: 0 0 12px; padding: 12px 14px 8px; color: var(--on-bezel); }
/* nothing to read yet: the same recess stands empty, so the briefing still has its shape */
/* a block, never grid or flex: these hold a sentence with a link in it, and it must flow as one. Padding centres one line in 200px. */
html.ui9.page-ai :is(.card:has([data-mk]) > .muted, #view > .err) { display: block; box-sizing: border-box; min-height: 200px; padding: calc((200px - 1.45em) / 2) 16px; font-size: 13px; line-height: 1.45; text-align: center; text-wrap: balance; }
html.ui9.page-ai .card:has([data-mk]) > .muted { color: var(--on-bezel-dim); }
html.ui9.page-ai .v9-do h3 { display: flex; justify-content: space-between; width: 100%; margin: 0 0 6px; color: var(--on-bezel-dim); }
html.ui9.page-ai .v9-do h3 em { font-style: normal; color: var(--hazard); letter-spacing: 0; }
html.ui9.page-ai .v9-do ul { list-style: none; width: 100%; margin: 0; padding: 0; counter-reset: v9-do; }
html.ui9.page-ai .v9-do li { position: relative; margin: 0; padding: 6px 0 6px 26px; font-size: 13px; line-height: 1.35; counter-increment: v9-do; box-shadow: inset 0 1px 0 var(--bezel-line); }
html.ui9.page-ai .v9-do li::before { content: counter(v9-do, decimal-leading-zero); position: absolute; left: 0; top: 8px; font: 500 10.5px/1.2 var(--mono); color: var(--hazard); }
html.ui9.page-ai .v9-do .faint { color: var(--on-bezel-dim); }

/* ---- accounts: each one a row with a spine in its mood ---- */
html.ui9.page-ai .acct { --m: var(--line-strong); padding: 10px 0 10px 11px; border-top: 1px solid var(--hair); box-shadow: inset 2px 0 0 var(--m); }
/* the wall reads by urgency: Cut first, then Watch, then the rest. Nothing in an account takes focus, so the tab order is safe. */
html.ui9.page-ai .card:has(> .acct) { display: flex; flex-direction: column; }
html.ui9.page-ai .card > .acct { order: 3; }
html.ui9.page-ai .card > .acct:has(.mood.bad) { order: 1; }
html.ui9.page-ai .card > .acct:has(.mood.watch) { order: 2; }
html.ui9.page-ai .card:has(> .acct) > .v9-do + h3 { margin-top: 2px; }
html.ui9.page-ai .acct:has(.mood.bad) { --m: var(--rejected); }
html.ui9.page-ai .acct:has(.mood.watch) { --m: var(--review); }
html.ui9.page-ai .acct:has(.mood.good) { --m: var(--live); }
html.ui9.page-ai .acct > div:first-child { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 7px; font-size: 13px; }
html.ui9.page-ai .acct > div:first-child b { font-weight: 600; }
html.ui9.page-ai .acct > div:first-child .faint { font: 400 11px/1.3 var(--mono); color: var(--text-dim); }
html.ui9.page-ai .mood, html.ui9.page-ai .verdict, html.ui9.page-ai .kind {
  display: inline-block; flex: none; padding: 2px 5px; border-radius: var(--r-cap); font: 500 10px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase;
}
/* 10px labels need the ink of each tone, not the tone itself */
html.ui9.page-ai :is(.mood.good, .verdict.winner) { background: var(--okbg); color: var(--okink); }
html.ui9.page-ai .mood.watch { background: var(--warnbg); color: var(--warnink); }
html.ui9.page-ai :is(.mood.bad, .verdict.weak) { background: var(--badbg); color: var(--badink); }
html.ui9.page-ai .verdict.promising { background: var(--accent-soft); color: var(--accent-text); }
html.ui9.page-ai .acct .muted { margin-top: 2px !important; font-size: 12.5px; line-height: 1.4; }
html.ui9.page-ai .cols3 { gap: 8px 14px; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); margin-top: 7px; font-size: 12.5px; line-height: 1.38; }
html.ui9.page-ai .cols3 > div { min-width: 0; }
/* a campaign name is one long word: it breaks in its own column */
html.ui9.page-ai #view :is(li, .acct b, .acct .faint, .acct .muted) { overflow-wrap: anywhere; }
html.ui9.page-ai .cols3 b { font: 500 10px/1.2 var(--mono); letter-spacing: .085em; }
html.ui9.page-ai .cols3 b[style*="--live"] { color: var(--okink) !important; }
html.ui9.page-ai .cols3 b[style*="--bad"] { color: var(--badink) !important; }
html.ui9.page-ai .cols3 b[style*="--wait"] { color: var(--warnink) !important; }
/* a column with nothing to say folds, so the others get its width. All three empty: the row ends at the summary. */
html.ui9.page-ai .cols3 > div:has(> .faint) { display: none; }
html.ui9.page-ai .cols3:not(:has(li)) { display: none; }

/* the chips */
html.ui9.page-ai #view[data-ux-mood="bad"] .acct:not(:has(.mood.bad)),
html.ui9.page-ai #view[data-ux-mood="watch"] .acct:not(:has(.mood.watch)),
html.ui9.page-ai #view[data-ux-mood="good"] .acct:not(:has(.mood.good)) { display: none; }
html.ui9.page-ai #view[data-ux-mood="bad"] .card:has(.acct):not(:has(.mood.bad))::after,
html.ui9.page-ai #view[data-ux-mood="watch"] .card:has(.acct):not(:has(.mood.watch))::after,
html.ui9.page-ai #view[data-ux-mood="good"] .card:has(.acct):not(:has(.mood.good))::after { content: "No accounts in this group."; display: block; padding: 2px 0 4px; font-size: 12.5px; color: var(--text-dim); }

/* ---- Auto Winning: the rules up top, last run and the log side by side ---- */
@media (min-width: 1100px) {
  html.ui9.page-ai #view:has(#wMin) { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 var(--v9-gap); align-items: start; }
  html.ui9.page-ai #view:has(#wMin) > .card:first-child { grid-column: 1 / -1; }
}
html.ui9.page-ai .card:has(#wMin) .bar .input { min-height: 28px; text-align: right; font: 500 12.5px/1 var(--mono); }
/* the pair of Claude keys match */
html.ui9.page-ai :is(#wPrev, #wRun) { min-height: 27px; height: 27px; padding: 0 9px; font-size: 12px; border-radius: var(--r-key); }
/* the verdict of the last run leads the screen. A ruled note, not a hero: the page has one of those. */
html.ui9.page-ai #view:has(#wMin) > .card > p { margin: 2px 0 12px !important; padding: 9px 12px; border-left: 2px solid var(--line-strong); border-radius: 0 var(--r-key) var(--r-key) 0; background: var(--mat); font-size: 14px; font-weight: 500; line-height: 1.42; color: var(--text); }
html.ui9.page-ai .hist { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 5px 0; border-top: 1px solid var(--hair); }
html.ui9.page-ai .hist:first-child, html.ui9.page-ai h3 + .hist { border-top: 0; }
html.ui9.page-ai .hist > a { color: var(--text); font-weight: 500 !important; }
html.ui9.page-ai .hist > a .v9-i { width: 12px; height: 12px; margin: 0 5px -1px 0; color: var(--review); }
html.ui9.page-ai .hist > a:hover { color: var(--accent-text); text-decoration: none; }
html.ui9.page-ai .hist > .faint { flex: none; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
html.ui9.page-ai .hist > img { width: 36px !important; height: 36px !important; border-radius: var(--r-key) !important; }
html.ui9.page-ai .hist + .faint { font-size: 12px; }
/* the reason reads on the left, its numbers stand on the right. The reason is never squeezed: when the two will not fit
   on one line it keeps the whole width and the numbers drop to a line of their own, still on the right. */
html.ui9.page-ai .hist + .faint[data-ux-tail] { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1px 14px; }
html.ui9.page-ai .v9-reason { flex: 0 1 auto; min-width: 0; }
html.ui9.page-ai .hist + .faint[data-ux-tail] > .v9-tail { margin-left: auto; }
html.ui9.page-ai .v9-tail { flex: none; max-width: 100%; font: 500 11.5px/1.35 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-align: right; color: var(--text); }
/* a Last run row has room up on the name's line, so the reason keeps one line of its own */
html.ui9.page-ai .hist > .v9-tail { min-width: 276px; }
html.ui9.page-ai .v9-tail .v9-fig { font: inherit; letter-spacing: inherit; }
html.ui9.page-ai .hist:has(> img) + .faint { margin-left: 45px !important; }

/* the labels fill row one here: both Claude keys drop to a row of their own, together, on the right.
   The spacer is the line break. Its empty row costs one gap, which the keys take back. */
@media (max-width: 1059px) {
  html.ui9.page-ai .card:has(#wMin) .bar > .sp { flex: 0 0 100%; height: 0; }
  html.ui9.page-ai :is(#wPrev, #wRun) { margin-top: -10px; }
  html.ui9.page-ai #wPrev { margin-left: auto; }
}
/* too narrow for the pair: they stack on the right edge, and the second key keeps the row gap */
@media (max-width: 374px) {
  html.ui9.page-ai #wRun { margin-top: 0; margin-left: auto; }
}

/* ---- Why it wins: pick on the left, read on the right ---- */
@media (min-width: 1100px) {
  html.ui9.page-ai #view:has(> #wOut:not([hidden])) { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 var(--v9-gap); align-items: start; }
  /* the Explain key stays on the first screen: the picker scrolls in its own box */
  html.ui9.page-ai .card:has(#wGo) > .pick { max-height: max(220px, calc(100vh - 342px)); margin: 0 -2px; padding: 2px 4px 2px 2px; overflow-y: auto; }
}
html.ui9.page-ai .pick { gap: 8px; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); grid-auto-rows: max-content; }
/* a grid, so the tick can sit on the picture's bottom corner, clear of the copy at the top of the ad */
html.ui9.page-ai .pc { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; border: 0; border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--line); transition: box-shadow var(--t1); }
html.ui9.page-ai .pc:hover { box-shadow: 0 0 0 1px var(--line-strong); }
/* quieter than the art: the tick carries the state */
html.ui9.page-ai .pc.on { outline: 0; box-shadow: 0 0 0 1.5px var(--text-dim); }
html.ui9.page-ai .pc:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html.ui9.page-ai .pc .pic { grid-area: 1 / 1; aspect-ratio: 1 / 1; background: var(--mat); }
/* the tile is the art: the top of an ad is where it speaks */
html.ui9.page-ai :is(.pc, .why) .pic img { object-position: 50% 0; }
html.ui9.page-ai .pc .nm { padding: 6px 8px 0; font-size: 12px; font-weight: 500; line-height: 1.3; }
html.ui9.page-ai .pc .nm .v9-i { width: 11px; height: 11px; margin: 0 3px -1px 0; color: var(--review); }
/* a long figure takes a second line: it is never cut, and the mark beside it stays */
html.ui9.page-ai .pc .st { display: flex; align-items: flex-start; gap: 4px; min-height: 18px; padding: 1px 8px 6px; font: 500 10.5px/1.3 var(--mono); letter-spacing: -.02em; color: var(--text-dim); }
html.ui9.page-ai .v9-told { flex: none; display: inline-flex; margin-left: auto; color: var(--text-dim); }
html.ui9.page-ai .v9-told .v9-i { width: 12px; height: 12px; }
html.ui9.page-ai .pc .tick { position: relative; z-index: 1; top: auto; left: auto; grid-area: 1 / 1; align-self: end; justify-self: end; width: 16px; height: 16px; margin: 0 6px 6px 0; accent-color: var(--text); pointer-events: none; }
html.ui9.page-ai .why { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--hair); }
html.ui9.page-ai .why:first-child { border-top: 0; padding-top: 0; }
html.ui9.page-ai .why:last-child { padding-bottom: 0; }
html.ui9.page-ai .why .pic { border-radius: var(--r-key); background: var(--mat); }
html.ui9.page-ai .why b { font-weight: 600; }
html.ui9.page-ai .why p { font-size: 13px; line-height: 1.45; }
html.ui9.page-ai .why .faint b { font: 500 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
html.ui9.page-ai .why a.faint { color: var(--text-dim); font-size: 12px; }
html.ui9.page-ai .why a.faint:hover { color: var(--text); }

/* ---- Video scripts, Lander & email: the brief on the left, what to learn from on the right ---- */
html.ui9.page-ai .row { gap: 10px; }
html.ui9.page-ai label.f { margin: 11px 0 5px; }
html.ui9.page-ai textarea.input { min-height: 66px; }
html.ui9.page-ai .card:has(#sGo) #lk { margin-top: 8px !important; }
@media (min-width: 1100px) {
  html.ui9.page-ai .card:has(#sGo) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: repeat(7, auto) minmax(0, 1fr); column-gap: 22px; }
  html.ui9.page-ai .card:has(#sGo) > * { grid-column: 1; }
  /* the notes box takes up what the picker leaves, so the left column ends level with it */
  html.ui9.page-ai .card:has(#sGo) > textarea { grid-row-end: span 3; align-self: stretch; }
  html.ui9.page-ai .card:has(#sGo) > h3 { grid-column: 2; grid-row: 1; margin-top: 0; }
  html.ui9.page-ai .card:has(#sGo) > .bar:has(#sLib) { grid-column: 2; grid-row: 2; margin-bottom: 8px; }
  html.ui9.page-ai .card:has(#sGo) > .faint:has(+ .pick) { grid-column: 2; grid-row: 3; }
  html.ui9.page-ai .card:has(#sGo) > .pick, html.ui9.page-ai .card:has(#sGo) > .empty { grid-column: 2; grid-row: 3 / span 6; }
  html.ui9.page-ai .card:has(#sGo) > .pick { max-height: 338px; margin: 24px -2px 0; padding: 2px 4px 2px 2px; overflow-y: auto; }
  html.ui9.page-ai .card:has(#sGo) > .bar:has(#sGo) { grid-column: 1 / -1; margin: 12px 0 0 !important; }
}
html.ui9.page-ai .card:has(#sGo) > .bar:has(#sGo) { margin-bottom: 0; }
html.ui9.page-ai #sOut .card, html.ui9.page-ai [id^="hd"] { font-size: 13px; }
html.ui9.page-ai .doc { padding: 12px 0; border-top: 1px solid var(--hair); }
html.ui9.page-ai .doc:first-child { padding-top: 0; border-top: 0; }
html.ui9.page-ai .doc > b { font-weight: 600; }
html.ui9.page-ai .doc h2 { font-size: 15px !important; letter-spacing: -.015em; }
html.ui9.page-ai .out { line-height: 1.5; }
/* several drafts read side by side, like storyboards */
@media (min-width: 1100px) {
  html.ui9.page-ai :is(#sOut .card, [id^="hd"]):has(> .doc + .doc) { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 0 26px; }
  html.ui9.page-ai :is(#sOut .card, [id^="hd"]):has(> .doc + .doc) > .doc { padding-top: 0; border-top: 0; }
}
html.ui9.page-ai [id^="hd"]:not([hidden]) { padding: 4px 0 12px; }

/* ---- Auto-tags: the three counts are a readout band ---- */
html.ui9.page-ai .row:has(> .chip) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: 12px !important; border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); }
html.ui9.page-ai .row > .chip {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 2px; box-sizing: border-box; min-width: 0; min-height: 52px; padding: 7px 12px; border: 0; border-radius: 0; background: none;
  font: 500 10px/1.2 var(--mono); letter-spacing: .085em; text-transform: uppercase; color: var(--text-dim); box-shadow: 1px 0 0 var(--hair);
}
html.ui9.page-ai .row > .chip:last-child { box-shadow: none; }
html.ui9.page-ai .row > .chip b { font: 500 15px/1.2 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text); }
html.ui9.page-ai .card:has(#tAuto) .bar { margin-top: 10px !important; }
/* how much of the Library is labelled: the band's own three numbers, as one gauge */
html.ui9.page-ai .v9-tagged { --c: var(--text-dim); --track: var(--gauge-track); margin: -2px 3px 12px; }
/* the same order as Auto Winning: the words, then the switch left and the keys right on one row, then the readout across the whole sheet */
html.ui9.page-ai #tMsg:empty { margin-left: -8px; }
@media (min-width: 1100px) {
  html.ui9.page-ai .card:has(#tAuto) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 28px; }
  html.ui9.page-ai .card:has(#tAuto) > * { grid-column: 1; }
  html.ui9.page-ai .card:has(#tAuto) > .faint:last-child { grid-column: 2; grid-row: 2; align-self: end; text-align: right; }
  html.ui9.page-ai .card:has(#tAuto) > .bar:has(#tAuto) { grid-row: 3; align-self: center; margin: 10px 0 12px !important; }
  html.ui9.page-ai .card:has(#tAuto) > .bar:has(#tNew) { grid-column: 2; grid-row: 3; justify-content: flex-end; margin: 10px 0 12px !important; }
  html.ui9.page-ai #tMsg { order: -1; }
  html.ui9.page-ai .card:has(#tAuto) > :is(.row, .v9-tagged) { grid-column: 1 / -1; }
  html.ui9.page-ai .card:has(#tAuto) > .v9-tagged { margin-bottom: 2px; }
}

/* ---- History ---- */
html.ui9.page-ai .kind { background: var(--surface-2); color: var(--text-dim); }
/* one column for titles: LANDER is the widest word */
html.ui9.page-ai .hist[data-i] > .kind { box-sizing: border-box; min-width: 52px; text-align: center; }
html.ui9.page-ai .hist[data-i] { cursor: pointer; margin: 0 -6px; padding-left: 6px; padding-right: 6px; border-radius: 0; transition: background var(--t1); }
html.ui9.page-ai .hist[data-i]:hover { background: var(--hover); }
html.ui9.page-ai .hist[data-i] > b { font-weight: 500; }
html.ui9.page-ai .hist[data-i]:focus-visible { outline-offset: -2px; }
/* fourteen Deletes must not shout: quiet at rest, always there for keyboard and touch */
html.ui9.page-ai .hist [data-del]:not(:hover, :focus-visible) { background: none; color: var(--text-dim); box-shadow: none; }

/* ---- Usage: months side by side, the total ruled off ---- */
html.ui9.page-ai .card:has(> table.u) { columns: 400px; column-gap: 26px; }
html.ui9.page-ai .card:has(> table.u) > :is(h2, .faint) { column-span: all; }
html.ui9.page-ai .card:has(> table.u) > .faint { margin-bottom: 12px !important; }
html.ui9.page-ai .card:has(> table.u) > h3 { margin-top: 0; break-after: avoid; }
html.ui9.page-ai table.u { break-inside: avoid; }
html.ui9.page-ai .card > table.u { margin-bottom: 16px; }
html.ui9.page-ai .card > table.u:last-child { margin-bottom: 0; }
html.ui9.page-ai table.u th, html.ui9.page-ai table.u td { padding: 5px 8px; border-top: 0; }
html.ui9.page-ai table.u th { position: static; }
html.ui9.page-ai table.u th:first-child, html.ui9.page-ai table.u td:first-child { padding-left: 0; }
html.ui9.page-ai table.u th:last-child, html.ui9.page-ai table.u td:last-child { padding-right: 0; }
html.ui9.page-ai table.u td { height: 30px; border-bottom: 1px solid var(--hair); }
html.ui9.page-ai table.u td.n { font: 500 12.5px/1 var(--mono); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
html.ui9.page-ai table.u tr:last-child td { border-bottom: 0; box-shadow: inset 0 1.5px 0 var(--text); }
html.ui9.page-ai table.u tr:last-child td b { font-weight: 600; }
/* draft shot lists: the same table language, in a smaller room */
html.ui9.page-ai .doc table.u td { height: auto; vertical-align: top; padding-top: 6px; padding-bottom: 6px; }
html.ui9.page-ai .doc table.u tr:last-child td { box-shadow: none; }
html.ui9.page-ai .doc table.u td:first-child { font: 500 11.5px/1.4 var(--mono); }

/* the help line takes two lines before it would be cut */
@media (max-width: 1320px) {
  html.ui9.page-ai .card:has(#bAuto) > .bar .faint:not(label) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; min-height: 30px; white-space: normal; }
}
@media (max-width: 960px) { html.ui9.page-ai .card:has(#bAuto) > .bar .faint:not(label) { -webkit-line-clamp: 3; } }
@media (max-width: 860px) {
  html.ui9.page-ai .card:has(#bAuto) > .bar { flex-wrap: wrap; }
  html.ui9.page-ai .v9-moods { max-width: 100%; }
  /* which day and how old stay readable: a line of their own under the name */
  html.ui9.page-ai .card:has([data-mk]) > .bar:first-child { flex-wrap: wrap; }
  html.ui9.page-ai .card:has([data-mk]) > .bar:first-child .faint { order: 9; flex: 1 1 100%; white-space: normal; }
  html.ui9.page-ai .card:has(#wMin) .bar > label { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  html.ui9.page-ai .head #keyChip { flex: 0 1 auto; min-width: 0; overflow: hidden; font-size: 10.5px; }
  html.ui9.page-ai .row > .chip { padding: 6px 8px; letter-spacing: .05em; }
  html.ui9.page-ai .hist > .faint { max-width: 38%; }
  /* a history row gets the whole width for its title: who, when and Delete go under it */
  html.ui9.page-ai .hist[data-i] { flex-wrap: wrap; gap: 2px 9px; }
  /* !important: the page writes flex and nowrap on the title itself */
  html.ui9.page-ai .hist[data-i] > b { flex: 1 1 calc(100% - 72px) !important; white-space: normal !important; overflow-wrap: anywhere; }
  html.ui9.page-ai .hist[data-i] > .faint { flex: 1 1 calc(100% - 80px); min-width: 0; max-width: none; }
  /* the first card gives up the help line and the top of the page tightens, so the brief starts sooner */
  html.ui9.page-ai { --bar-h: 44px; }
  html.ui9.page-ai #tabs { margin: 0 0 8px; }
  html.ui9.page-ai .card:has(#bAuto) > .bar { gap: 6px; margin-bottom: 0; }
  html.ui9.page-ai .card:has(#bAuto) > .bar > div:not(.v9-moods) { display: none; }
  /* the long field gets the width: Seconds and How many hold two digits */
  html.ui9.page-ai .row:has(#fAngle) { flex-wrap: wrap; }
  html.ui9.page-ai .row:has(#fAngle) > div:has(#fAngle) { flex: 1 1 100%; }
  /* a reason and its numbers stack */
  html.ui9.page-ai .hist + .faint[data-ux-tail] { flex-wrap: wrap; }
  html.ui9.page-ai .v9-reason { flex-basis: 100%; }
  html.ui9.page-ai .v9-tail { text-align: left; }
  html.ui9.page-ai .hist + .faint[data-ux-tail] > .v9-tail { margin-left: 0; }
  html.ui9.page-ai .hist:has(> .v9-tail) { flex-wrap: wrap; gap: 0 9px; }
  html.ui9.page-ai .hist > .v9-tail { flex-basis: 100%; min-width: 0; }
}

/* ======================= AI CHAT: the console ======================= */
html.ui9.page-chat { --v9-side: 200px; }
/* the frame fills what is left of the window, under the shell's PHP warning too */
html.ui9.page-chat body { display: flex; flex-direction: column; box-sizing: border-box; min-height: 0; height: 100vh; height: 100dvh; }
html.ui9.page-chat .app { flex: 1 1 auto; width: 100%; max-width: none; height: auto; min-height: 0; margin: 0; padding: 0; gap: 0; grid-template-columns: var(--v9-side) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }

/* the list: a plain column. No brackets, no ink: this screen has no instruments to hold. */
html.ui9.page-chat .side { padding: 10px 8px 8px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: none; }
html.ui9.page-chat #newChat { flex: none; width: 100%; }
html.ui9.page-chat .side .list { margin-top: 8px; padding: 2px; }
html.ui9.page-chat .ci { position: relative; gap: 2px; min-height: 30px; padding: 3px 3px 3px 8px; border-radius: var(--r-key); font-size: 12.5px; line-height: 1.3; color: var(--text-dim); transition: background var(--t1), color var(--t1); }
html.ui9.page-chat .ci:hover { background: var(--hover); color: var(--text); }
html.ui9.page-chat .ci.on { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: inset 2px 0 0 var(--accent), inset 0 0 0 1px var(--line); }
html.ui9.page-chat .ci:focus-visible { outline-offset: -2px; }
/* the two small keys take no room at rest, so a 200px list can still read its titles */
html.ui9.page-chat .ci .x { display: none; flex: none; width: 22px; height: 22px; padding: 0; border-radius: var(--r-cap); font-size: 12px; line-height: 22px; text-align: center; color: var(--text-dim); visibility: visible; }
html.ui9.page-chat .ci .x:hover { background: var(--hover); color: var(--text); }
html.ui9.page-chat .ci:is(:hover, :focus-within) .x { display: block; }
html.ui9.page-chat #modelLine { flex: none; display: flex; align-items: center; gap: 6px; margin: 6px 2px 0 !important; font: 500 10.5px/1.3 var(--mono); letter-spacing: -.01em; color: var(--text-dim); overflow-wrap: anywhere; }
/* the lamp tells the truth: green only while Claude is connected, as on AI Studio's key */
html.ui9.page-chat #modelLine:not(:empty)::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--rejected); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rejected) 22%, transparent); }
html.ui9.page-chat #modelLine.v9-ok::before { background: var(--live); box-shadow: 0 0 0 2px color-mix(in srgb, var(--live) 22%, transparent); }
html.ui9.page-chat .side .faint { padding: 4px 6px; font-size: 12px; color: var(--text-dim); }

/* the sheet: one column of 860 down the middle */
html.ui9.page-chat .main { border: 0; border-radius: 0; background: none; }
html.ui9.page-chat .thread { padding: 16px var(--gut) 10px; font-size: 14px; line-height: 1.55; scrollbar-gutter: stable both-edges; }
/* under about 1110 the 860 column stops being centred, so a gutter would show: everything hangs from the composer's left edge instead */
@media (min-width: 821px) and (max-width: 1109px) {
  html.ui9.page-chat .thread { scrollbar-gutter: auto; }
  html.ui9.page-chat .msg { margin-left: 0; }
}
html.ui9.page-chat .msg { margin-bottom: 12px; }
/* a question opens a turn: the same prompt as the box below, in the page's own Geist */
html.ui9.page-chat .msg.user { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
html.ui9.page-chat .thread > .msg.user:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
html.ui9.page-chat .msg.user .b { position: relative; width: auto; max-width: none; margin: 0; padding: 0 0 0 18px; border-radius: 0; background: none; font-weight: 500; line-height: 1.45; color: var(--text); }
html.ui9.page-chat .msg.user .b::before { content: ">"; position: absolute; left: 0; top: 0; font: 600 14px/1.45 var(--mono); color: var(--accent-text); }
html.ui9.page-chat .who { margin-bottom: 5px; font: 600 10px/1.2 var(--mono); letter-spacing: .09em; color: var(--accent-text); }
html.ui9.page-chat .who::before { content: "\25C6\A0"; }
html.ui9.page-chat .who::after { content: "\A0\25B8"; }
html.ui9.page-chat .msg.assistant .b { padding: 0; }
html.ui9.page-chat .msg.assistant .b a { color: var(--accent-text); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }
html.ui9.page-chat .msg.assistant .b b { font-weight: 600; }
html.ui9.page-chat .msg.assistant .b :is(h3, h4) { font-size: 14px; font-weight: 600; letter-spacing: -.012em; }
html.ui9.page-chat .msg.assistant .b :not(pre) > code { padding: 1px 4px; border-radius: var(--r-cap); font-size: 12.5px; }
html.ui9.page-chat .msg.assistant .b pre { padding: 10px 12px; border-radius: var(--r-key); line-height: 1.5; }
html.ui9.page-chat .msg.assistant .b table { margin: 6px 0 10px; font-size: 12.5px; }
html.ui9.page-chat .msg.assistant .b :is(th, td) { padding: 6px 12px 6px 0; border: 0; }
html.ui9.page-chat .msg.assistant .b th { position: static; height: 28px; background: none; font-weight: 500; }
html.ui9.page-chat .msg.assistant .b td { height: 32px; border-bottom: 1px solid var(--hair); }
html.ui9.page-chat .msg.assistant .b :is(th, td):last-child { padding-right: 0; }
html.ui9.page-chat .msg.assistant .b .v9-n { text-align: right; padding-left: 14px; }
html.ui9.page-chat .msg.assistant .b td.v9-n { font: 500 12.5px/1.2 var(--mono); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
/* the lookups: HUD labels with a lamp */
html.ui9.page-chat .tools { gap: 3px 14px; margin-bottom: 10px; }
html.ui9.page-chat .tool { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; padding: 0; border-radius: 0; background: none; font: 400 11px/1.5 var(--mono); letter-spacing: -.01em; color: var(--text-dim); overflow-wrap: anywhere; }
html.ui9.page-chat .tool::before { content: ""; flex: none; align-self: center; width: 5px; height: 5px; border-radius: 50%; background: var(--live); }
html.ui9.page-chat .tool b { flex: none; font-weight: 500; font-size: 10px; letter-spacing: .085em; text-transform: uppercase; color: var(--text); }
/* the one still running */
html.ui9.page-chat .tools:has(+ .work) .tool:last-child::before { background: var(--review); }
@keyframes v9-chat-work { 50% { opacity: .35; } }
@media (prefers-reduced-motion: no-preference) {
  html.ui9.page-chat .tools:has(+ .work) .tool:last-child::before { animation: v9-chat-work 1s ease-in-out infinite; }
  html.ui9.page-chat .work::before { animation: v9-chat-work .9s ease-in-out infinite; }
}
html.ui9.page-chat .work { display: flex; align-items: center; gap: 9px; font: 500 12px/1.4 var(--mono); letter-spacing: -.01em; color: var(--text-dim); }
html.ui9.page-chat .work::before {
  content: ""; flex: none; width: 32px; height: 8px; transform: skewX(-18deg);
  background: repeating-linear-gradient(90deg, var(--accent) 0 3px, transparent 3px 5px);
}
html.ui9.page-chat .work .spin { display: none; }
html.ui9.page-chat .err { border-radius: var(--r-key); background: var(--rejected-bg); color: var(--rejected); font-size: 12.5px; line-height: 1.4; }

/* the agent prompt: the panel's box, in the page. The one ink shape here. */
html.ui9.page-chat .compose {
  width: calc(100% - 2 * var(--gut)); max-width: 860px; margin: 0 auto 12px; padding: 7px 7px 7px 14px; gap: 10px; border: 0; border-radius: var(--r-panel);
  background: var(--bezel); color: var(--on-bezel); box-shadow: 0 0 0 1px var(--bezel-line-2), var(--e2); transition: box-shadow var(--t1);
}
html.ui9.page-chat .compose::before { content: ">"; flex: none; align-self: flex-start; font: 600 15px/34px var(--mono); color: var(--led); }
html.ui9.page-chat .compose:focus-within { box-shadow: 0 0 0 1.5px var(--led), 0 0 0 4px var(--led-soft), var(--e2); }
html.ui9.page-chat .compose textarea {
  min-height: 34px; padding: 7px 0; border: 0; border-radius: 0; background: none; color: var(--on-bezel); caret-color: var(--led);
  font: 400 13.5px/20px var(--mono); letter-spacing: -.025em;
}
html.ui9.page-chat .compose textarea::placeholder { color: var(--on-bezel-faint); opacity: 1; }
/* one line, however narrow: a wrapped hint is cut in half by the one-row box */
html.ui9.page-chat .compose textarea:placeholder-shown { overflow: hidden; white-space: nowrap; }
html.ui9.page-chat .compose textarea:focus-visible { outline: 0; box-shadow: none !important; }
html.ui9.page-chat #send { min-height: 34px; padding: 0 8px 0 11px; background: var(--bezel-3); color: var(--on-bezel); box-shadow: none; }
html.ui9.page-chat #send:hover:not(:disabled) { background: var(--bezel-3); color: var(--on-bezel); filter: brightness(1.2); }
html.ui9.page-chat #send:focus-visible { outline-color: var(--led); }
html.ui9.page-chat #send .v9-kc { color: var(--on-bezel-dim); background: var(--bezel-2); box-shadow: inset 0 0 0 1px var(--bezel-line-2); }

/* before the first question */
/* docked on the prompt, on its left edge: the suggestions read like the console's last lines */
html.ui9.page-chat #thread:has(> .hello) { display: flex; flex-direction: column; }
html.ui9.page-chat .hello { box-sizing: border-box; width: 100%; max-width: 860px; margin: auto auto 14px; text-align: left; }
@media (min-width: 821px) and (max-width: 1109px) {
  html.ui9.page-chat .hello { margin-left: 0; }
  html.ui9.page-chat .compose { margin-left: var(--gut); }
}
html.ui9.page-chat .hello h1 { margin: 0 0 5px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
html.ui9.page-chat .hello .faint { font-size: 13px; line-height: 1.45; color: var(--text-dim); }
html.ui9.page-chat .sugg { gap: 6px; margin-top: 14px; }
@media (min-width: 900px) { html.ui9.page-chat .sugg { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
html.ui9.page-chat .sugg button { position: relative; padding: 9px 12px 9px 26px; border: 0; border-radius: var(--r-key); background: var(--surface); font-size: 12.5px; line-height: 1.35; color: var(--text); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); transition: box-shadow var(--t1); }
html.ui9.page-chat .sugg button::before { content: ">"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font: 600 12.5px/1 var(--mono); color: var(--accent-text); }
html.ui9.page-chat .sugg button:hover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); }

/* the phone: the list is one strip you swipe, the prompt sits on the thumb bar, and the page never scrolls */
@media (max-width: 820px) {
  html.ui9.page-chat .app { grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); min-height: 0; }
  html.ui9.page-chat .side { flex-direction: row; align-items: center; gap: 6px; padding: 6px var(--gut); border-right: 0; border-bottom: 1px solid var(--line); }
  html.ui9.page-chat #newChat { width: auto; padding: 0 10px; }
  html.ui9.page-chat .side .list { display: flex; gap: 4px; flex: 1; min-width: 0; max-height: none; margin: 0; padding: 2px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  html.ui9.page-chat .side .list::-webkit-scrollbar { display: none; }
  html.ui9.page-chat .ci { flex: none; max-width: 214px; }
  /* in the strip the keys hold their width: a row that grew under the mouse would move the next row's key away from the click */
  html.ui9.page-chat .ci .x { display: block; visibility: hidden; }
  html.ui9.page-chat .ci:is(:hover, :focus-within) .x { visibility: visible; }
  html.ui9.page-chat #modelLine { display: none; }
  html.ui9.page-chat .main { min-height: 0; }
  html.ui9.page-chat .thread { padding: 12px var(--gut) 8px; scrollbar-gutter: auto; }
  html.ui9.page-chat .compose { margin-bottom: 8px; }
}

/* touch has no hover: the keys are always there */
@media (hover: none) { html.ui9.page-chat .ci .x { display: block; visibility: visible; } }

/* ======================= API DOCS: the reference ======================= */
html.ui9.page-api-docs { --v9-toc: 228px; --v9-strip: 0px; }
@media (max-width: 1279px) { html.ui9.page-api-docs { --v9-strip: 42px; } }
@media (prefers-reduced-motion: no-preference) { html.ui9.page-api-docs { scroll-behavior: smooth; } }

/* public: an anonymous reader gets the brand, this page's name and the theme. Nothing that leads into the app. */
html.ui9.ui9-ready.page-api-docs:not(.v9-member) .ui-nav :is(.ui-cmd, .dk-tele, .dk-sync, .v9-plate, .ui-menu, .menu-btn),
html.ui9.ui9-ready.page-api-docs:not(.v9-member) .dk-tab:not(.on),
html.ui9.ui9-ready.page-api-docs:not(.v9-member) .dk-thumb { display: none !important; }

html.ui9.page-api-docs body { font-size: 14px; line-height: 1.6; color: var(--text); }
html.ui9.page-api-docs main.doc { box-sizing: border-box; max-width: 900px; margin: 0 auto; padding: calc(16px + var(--v9-strip)) var(--gut) 80px; }
@media (min-width: 1280px) {
  html.ui9.page-api-docs main.doc { margin-left: max(calc(var(--v9-toc) + 2 * var(--gut) + 14px), calc((100% - 900px) / 2)); margin-right: auto; }
}
html.ui9.page-api-docs main.doc > div:first-child { font: 500 10px/1.2 var(--mono) !important; letter-spacing: .085em !important; color: var(--text-dim); }
html.ui9.page-api-docs h1 { margin: 6px 0 4px; font-size: 26px; font-weight: 600; letter-spacing: -.022em; line-height: 1.15; }
html.ui9.page-api-docs h2 { margin: 34px 0 8px; padding-top: 10px; border-top: 2px solid var(--text); font-size: 18px; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
html.ui9.page-api-docs h3 { margin: 22px 0 5px; font-size: 14px; font-weight: 600; letter-spacing: -.012em; line-height: 1.3; }
html.ui9.page-api-docs :is(h2, h3, .card) { scroll-margin-top: calc(var(--shell-h) + var(--v9-strip) + 14px); }
html.ui9.page-api-docs main p { margin: 8px 0; }
html.ui9.page-api-docs .dim { color: var(--text-dim); font-size: 13px; }
html.ui9.page-api-docs main.doc > p.dim:first-of-type { font-size: 14px; max-width: 72ch; }
html.ui9.page-api-docs main a { color: var(--accent-text); }
html.ui9.page-api-docs code, html.ui9.page-api-docs pre { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.01em; }
html.ui9.page-api-docs main :not(pre) > code { padding: 1px 4px; border-radius: var(--r-cap); background: var(--surface-2); }
html.ui9.page-api-docs main :is(p, li) > code { overflow-wrap: anywhere; }

/* an endpoint is a line of mono with its verb in front */
html.ui9.page-api-docs .ep { display: inline-grid; place-items: center; min-width: 38px; height: 19px; margin-right: 7px; padding: 0 5px; border-radius: var(--r-cap); background: var(--surface-2); color: var(--text-dim); font: 600 10px/1 var(--mono); letter-spacing: .06em; vertical-align: 1px; }
html.ui9.page-api-docs :is(.ep, .v9-toc em).v9-get { background: var(--okbg); color: var(--okink); }
html.ui9.page-api-docs :is(.ep, .v9-toc em).v9-post { background: var(--warnbg); color: var(--warnink); }
html.ui9.page-api-docs h3:has(> .ep) { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--hair); font: 500 13.5px/1.35 var(--mono); letter-spacing: -.02em; overflow-wrap: anywhere; }
html.ui9.page-api-docs h2 + h3:has(> .ep) { margin-top: 12px; padding-top: 0; border-top: 0; }
html.ui9.page-api-docs h3 .dim { font: 400 11.5px/1 var(--sans) !important; letter-spacing: 0; }

/* the hero: Connect Claude. Ink, framed, and the first thing you read. */
html.ui9.page-api-docs main .card {
  --bi: 4px; box-sizing: border-box; margin: 16px 0 14px; padding: 15px 18px 14px; border: 0; border-radius: var(--r-card); color: var(--on-bezel); font-size: 13.5px; line-height: 1.55;
  background-color: var(--bezel-well);
  background-image: linear-gradient(rgba(244,239,228,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(244,239,228,.03) 1px, transparent 1px) !important;
  background-size: 12px 12px; background-position: -1px -1px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.85), 0 1px 0 rgba(244,239,228,.06);
}
html.ui9.page-api-docs[data-theme="dark"] main .card { background-color: var(--bezel-2); box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-api-docs main .card > b:first-child { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; letter-spacing: -.012em; color: var(--on-bezel); }
html.ui9.page-api-docs main .card :is(p, li) { color: var(--on-bezel); }
html.ui9.page-api-docs main .card p.dim { color: var(--on-bezel-dim); font-size: 12.5px; }
html.ui9.page-api-docs main .card code { background: var(--bezel-3); color: var(--on-bezel); }
html.ui9.page-api-docs .steps { margin: 0 0 8px; padding: 0; list-style: none; counter-reset: v9-step; }
html.ui9.page-api-docs .steps li { position: relative; margin: 0; padding: 7px 0 7px 28px; counter-increment: v9-step; box-shadow: inset 0 1px 0 var(--bezel-line); }
html.ui9.page-api-docs .steps li::before { content: counter(v9-step, decimal-leading-zero); position: absolute; left: 0; top: 10px; font: 500 10.5px/1.2 var(--mono); color: var(--hazard); }

/* a block of code: recessed paper. The Copy key stays put while a long line scrolls under it. */
html.ui9.page-api-docs .v9-pre { position: relative; margin: 8px 0 14px; }
html.ui9.page-api-docs main pre { margin: 0; padding: 11px 13px; border-radius: var(--r-key); background: var(--surface-2); line-height: 1.55; overflow-x: auto; box-shadow: inset 0 0 0 1px var(--hair); }
html.ui9.page-api-docs main pre code { padding: 0; background: none; }
html.ui9.page-api-docs :is(.copybtn, .v9-copy) {
  position: absolute; top: 6px; right: 6px; float: none; height: 24px; padding: 0 8px; border: 0; border-radius: var(--r-cap); cursor: pointer;
  background: var(--surface); color: var(--text-dim); font: 500 11.5px/1 var(--sans); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); transition: color var(--t1), box-shadow var(--t1);
}
html.ui9.page-api-docs :is(.copybtn, .v9-copy):hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); }

/* tables: the app's table language */
html.ui9.page-api-docs main table { display: table; width: 100%; margin: 6px 0 14px; font-size: 13px; line-height: 1.45; }
html.ui9.page-api-docs main :is(th, td) { padding: 7px 12px 7px 0; border-bottom: 1px solid var(--hair); }
html.ui9.page-api-docs main th { position: static; height: 28px; background: none; border-bottom: 0; font-weight: 500; }
html.ui9.page-api-docs main td { height: auto; }
html.ui9.page-api-docs main tr:hover td { background: none; }
html.ui9.page-api-docs main tr:last-child td { border-bottom: 0; }
@media (max-width: 899px) {
  html.ui9.page-api-docs main table { display: block; overflow-x: auto; }
}

/* ---- contents. At 1280 and up a rail beside the page. Under that one strip of sections under the bar. ---- */
html.ui9.page-api-docs .v9-toc { box-sizing: border-box; font-size: 12.5px; line-height: 1.25; }
html.ui9.page-api-docs .v9-toc a { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--text-dim); text-decoration: none; transition: background var(--t1), color var(--t1); }
html.ui9.page-api-docs .v9-toc a:hover { color: var(--text); background: var(--hover); }
html.ui9.page-api-docs .v9-toc a.on { color: var(--text); font-weight: 500; background: var(--surface); box-shadow: inset 2px 0 0 var(--accent), inset 0 0 0 1px var(--line); }
html.ui9.page-api-docs .v9-toc a:focus-visible { outline-offset: -2px; }
html.ui9.page-api-docs .v9-toc a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui9.page-api-docs .v9-toc .v9-lg { width: 14px; height: 14px; }
html.ui9.page-api-docs .v9-toc em { flex: none; width: 32px; padding: 2px 0; border-radius: var(--r-cap); text-align: center; font: 600 10px/1 var(--mono); font-style: normal; letter-spacing: .03em; }
html.ui9.page-api-docs .v9-toc .v9-sub { font: 400 11.5px/1.2 var(--mono); letter-spacing: -.02em; }
@media (min-width: 1280px) {
  html.ui9.page-api-docs .v9-toc {
    position: fixed; z-index: 20; top: calc(var(--shell-h) + 10px); left: var(--gut); bottom: 8px; width: var(--v9-toc); display: flex; flex-direction: column; gap: 1px;
    padding: 2px; overflow-y: auto; scrollbar-width: thin;
  }
  html.ui9.page-api-docs .v9-toc .v9-hud { flex: none; padding: 6px 8px 7px; }
  html.ui9.page-api-docs .v9-toc a { flex: none; min-height: 27px; padding: 0 8px; border-radius: var(--r-key); }
  html.ui9.page-api-docs .v9-toc .v9-sub { min-height: 24px; margin-left: 6px; }
}
@media (max-width: 1279px) {
  html.ui9.page-api-docs .v9-toc {
    position: fixed; z-index: 30; top: var(--shell-h); left: 0; right: 0; height: var(--v9-strip); display: flex; align-items: center; gap: 2px; padding: 0 var(--gut);
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none; background: linear-gradient(var(--sheet-top), var(--bg));
  }
  html.ui9.page-api-docs .v9-toc::-webkit-scrollbar { display: none; }
  html.ui9.page-api-docs .v9-toc :is(.v9-hud, .v9-sub) { display: none; }
  html.ui9.page-api-docs .v9-toc a { flex: none; min-height: 28px; padding: 0 9px; border-radius: var(--r-key); white-space: nowrap; }
  html.ui9.page-api-docs .v9-toc a.on { box-shadow: inset 0 0 0 1px var(--line); }
}
/* the shell's PHP warning (admins only) sits in the flow under the bar: contents make way for it */
@media (min-width: 1280px) { html.ui9.page-api-docs body:has(> #phpWarn) .v9-toc { top: calc(var(--shell-h) + 40px); } }
@media (max-width: 1279px) {
  html.ui9.page-api-docs:has(#phpWarn) { --v9-strip: 0px; }
  html.ui9.page-api-docs body:has(> #phpWarn) .v9-toc { position: static; height: 42px; }
}
@media (max-width: 760px) {
  /* page bars do not stick here */
  html.ui9.page-api-docs body:not(:has(> #phpWarn)) .v9-toc { position: absolute; }
  html.ui9.page-api-docs :is(h2, h3, .card) { scroll-margin-top: calc(var(--shell-h) + 12px); }
  html.ui9.page-api-docs main .card { padding: 13px 14px; }
  /* the end of a long line scrolls clear of the Copy key */
  html.ui9.page-api-docs main pre { padding-right: 60px; }
}

/* ===== 60-lists.css ===== */
/* =====================================================================
   60 Lists (DESIGN.md 4.15 to 4.17). Three lists, three compositions:
   Winners is a magazine under a top rule, 1-Click is a row of ticket stubs
   with a perforation, To-do is a queue with its groups in a gutter.
   ===================================================================== */

/* ---- shared by the three ------------------------------------------------ */
html.ui9:is(.page-templates, .page-oneclick, .page-todo) { --bar-h: 50px; scroll-padding-top: calc(var(--shell-h) + var(--bar-h) + 8px); }
html.ui9:is(.page-oneclick, .page-todo) .toast {
  background: var(--bezel); color: var(--on-bezel); border-radius: var(--r-key); font: 500 12.5px/1.35 var(--sans);
  box-shadow: 0 0 0 1px var(--bezel-line-2), var(--e2);
}
/* badges: a machined cap, not a pill. SmartNews had no colour on 1-Click and the wrong one on To-do. */
html.ui9:is(.page-oneclick, .page-todo) .pf {
  display: inline-block; padding: 3px 6px; border-radius: var(--r-cap); font: 500 10px/1 var(--mono); letter-spacing: .06em; white-space: nowrap;
}
html.ui9:is(.page-oneclick, .page-todo) .pf.smartnews { background: #0099eb; color: var(--go-ink); }
html.ui9:is(.page-oneclick, .page-todo) .pf.snapchat { background: #fffc00; color: #111; }
html.ui9:is(.page-oneclick, .page-todo)[data-theme="dark"] .pf.tiktok { box-shadow: inset 0 0 0 1px var(--line-strong); }
html.ui9.page-oneclick .tpl:has(.chip.active) .pf.tiktok { box-shadow: inset 0 0 0 1px var(--on-bezel-faint); }
html.ui9.page-todo .pf.any { background: var(--surface-2); color: var(--text-dim); }

@media (max-width: 760px) {   /* the bars stop sticking here, so only the shell can cover a focused key */
  html.ui9:is(.page-templates, .page-oneclick, .page-todo) { scroll-padding-top: calc(var(--shell-h) + 8px); }
}

/* ===================== Winners: the magazine ===================== */
html.ui9.page-templates .topbar .muted { min-width: 0; color: var(--text-dim); }
html.ui9.page-templates #reload { height: 32px; }
/* a hairline under the bar, so what scrolls beneath is cut by an edge and not by paper of the same colour */
html.ui9.page-templates body > .topbar { box-shadow: 0 1px 0 var(--hair); }
html.ui9.page-templates .wrap { padding-bottom: 40px; }

/* a spread: the department sits in the margin, the evidence runs beside it, under the top rule */
html.ui9.page-templates .vcard {
  display: grid; grid-template-columns: 148px minmax(0, 1fr); margin: 0 0 12px;
  border: 0; border-top: 3px solid var(--text); border-radius: 0; background: none; box-shadow: none; overflow: visible;
}
html.ui9.page-templates .vcard > header {
  display: block; position: sticky; top: calc(var(--shell-h) + var(--bar-h) + 6px); align-self: start;
  padding: 9px 14px 10px 0; border: 0;
}
html.ui9.page-templates .vcard > header h2 { line-height: 1.2; letter-spacing: -.015em; }
html.ui9.page-templates .vcard > header .muted { display: block; margin-top: 3px; font-size: 11.5px !important; line-height: 1.35; color: var(--text-dim); }
html.ui9.page-templates .vcard > header .muted b { font: 500 12.5px/1 var(--mono); letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
html.ui9.page-templates .v9-wn-bar { --c: var(--text); --track: var(--gauge-track); height: 6px; margin: 9px 6px 0 1px; }

/* columns weighted to the evidence */
html.ui9.page-templates .pgrid { grid-template-columns: 1.4fr 1.4fr 1fr 1fr; box-shadow: -1px 0 0 var(--hair); }
html.ui9.page-templates .pcell {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; column-gap: 8px; min-width: 0; min-height: 0;
  padding: 9px 12px 11px; border: 0; border-right: 1px solid var(--hair); border-radius: 0;
}
html.ui9.page-templates .pcell:last-child { border-right: 0; }
html.ui9.page-templates .pcell h3 {
  grid-column: 1; display: flex; align-items: center; gap: 6px; margin: 0;
  font: 600 13px/18px var(--sans); letter-spacing: -.008em; text-transform: none; color: var(--text);
}
html.ui9.page-templates .pcell .n {
  grid-column: 2; grid-row: 1 / 3; align-self: start; text-align: right;
  font: 500 24px/1.05 var(--mono); letter-spacing: -.045em; font-variant-numeric: tabular-nums; color: var(--text);
}
html.ui9.page-templates .pcell .sub { grid-column: 1; margin: 0; font-size: 11.5px; line-height: 1.35; color: var(--text-dim); }
/* nothing proven: the cell stays, and stays quiet */
html.ui9.page-templates .pcell:not(:has(.strip)) .n { color: var(--text-dim); font-weight: 400; }
html.ui9.page-templates .pcell:not(:has(.strip)) h3 { font-weight: 500; color: var(--text-dim); }

/* one strip height on every column, so the keys line up. NewsBreak and Meta get the bigger picture;
   TikTok and YouTube take vertical video, so theirs are narrow and tall. */
html.ui9.page-templates .strip { grid-column: 1 / -1; display: flex; gap: 5px; height: 96px; margin: 8px 0; }
html.ui9.page-templates .strip:empty { display: none; }
html.ui9.page-templates .strip img {
  flex: 0 1 54px; min-width: 0; width: auto; height: 100%; object-fit: cover; border: 0; border-radius: var(--r-cap);
  background: var(--mat); box-shadow: 0 0 0 1px var(--line);
}
html.ui9.page-templates .pcell:nth-child(-n+2) .strip img { flex-basis: 78px; }
/* the lead story: the top creative of the two big columns carries the weight, the rest give way */
html.ui9.page-templates .pcell:nth-child(-n+2) .strip img:first-child { flex: 0 0 120px; }
html.ui9.page-templates .cellbtns { grid-column: 1 / -1; gap: 5px; }

/* Review in the platform colour. href carries the platform, so this is right at first paint. */
html.ui9.page-templates .pcell a.btn-primary { --pfc: var(--primary-bg); --pfi: var(--primary-text); background: var(--pfc); color: var(--pfi); box-shadow: none; }
html.ui9.page-templates .pcell a.btn-primary[href$="|newsbreak"] { --pfc: #e52d27; --pfi: #fff; }
html.ui9.page-templates .pcell a.btn-primary[href$="|meta"] { --pfc: #1877f2; --pfi: #fff; }
html.ui9.page-templates .pcell a.btn-primary[href$="|tiktok"] { --pfc: #111; --pfi: #fff; }
html.ui9.page-templates .pcell a.btn-primary[href$="|youtube"] { --pfc: #d9201c; --pfi: #fff; }
html.ui9.page-templates .pcell a.btn-primary:hover { background: var(--pfc); color: var(--pfi); box-shadow: none; filter: brightness(1.1); }
/* TikTok's #111 vanishes on near-black: in dark it is the same paper key as every other primary */
html.ui9.page-templates[data-theme="dark"] .pcell a.btn-primary[href$="|tiktok"] { --pfc: var(--primary-bg); --pfi: var(--primary-text); }

/* the list under a cell */
html.ui9.page-templates .rows { grid-column: 1 / -1; margin-top: 8px; border-top-color: var(--hair); }
/* name over proof, so the proof is whole in the narrowest column. Two lines fit the 36px thumb. If one must give, it is the name. */
html.ui9.page-templates .trow { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 0 8px; align-items: center; padding: 4px 0; border-bottom-color: var(--hair); font-size: 12.5px; }
html.ui9.page-templates .trow > :first-child { grid-row: 1 / 3; }
html.ui9.page-templates .trow img { flex: none; width: 27px; height: 36px; border-radius: var(--r-cap); background: var(--mat); }
html.ui9.page-templates .trow > span[style] { flex: none; width: 27px !important; height: 36px; border-radius: var(--r-cap); background: var(--mat); }
html.ui9.page-templates .vcard .trow .nm { grid-column: 2; align-self: end; min-width: 0; max-width: none; font-size: 12.5px; font-weight: 500; line-height: 1.3; }
html.ui9.page-templates .trow .why { grid-column: 2; align-self: start; min-width: 0; overflow: visible; white-space: normal; font: 500 11.5px/1.3 var(--mono); letter-spacing: -.02em; text-align: left; color: var(--text-dim); }

/* colophon, on the same left edge as the cells */
html.ui9.page-templates .wrap > p.muted { max-width: 860px; margin: 4px 0 0 148px; line-height: 1.5; color: var(--text-dim); }

/* loading, signed out, error */
html.ui9.page-templates .wrap > .empty { padding: 14px 0; border-top: 3px solid var(--text); text-align: left; font-size: 13px; color: var(--text-dim); }
html.ui9.page-templates .wrap > .empty a { color: var(--text); text-underline-offset: 2px; }
html.ui9.page-templates .spin { border-color: var(--line-strong); border-top-color: var(--text); vertical-align: -2px; margin-right: 4px; }
html.ui9.page-templates .wrap > .empty:has(.spin)::after {
  content: ""; display: block; height: 178px; margin-top: 12px; border-radius: var(--r-cap); animation: v9-shimmer 1.6s linear infinite;
  background: linear-gradient(90deg, var(--surface-2) 30%, var(--mat) 50%, var(--surface-2) 70%) 0 0 / 200% 100%;
}

@media (max-width: 1240px) {
  html.ui9.page-templates .vcard { grid-template-columns: 120px minmax(0, 1fr); }
  html.ui9.page-templates .wrap > p.muted { margin-left: 120px; }
}
@media (max-width: 1100px) {
  html.ui9.page-templates body > .topbar { flex-wrap: wrap; }
}
@media (max-width: 1000px) {
  html.ui9.page-templates .vcard { display: block; }
  html.ui9.page-templates .vcard > header { position: static; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 8px 0 6px; }
  html.ui9.page-templates .vcard > header .muted { margin: 0; }
  html.ui9.page-templates .v9-wn-bar { flex: 1 1 90px; max-width: 200px; margin: 0 2px; align-self: center; }
  html.ui9.page-templates .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); box-shadow: 0 -1px 0 var(--hair); }
  html.ui9.page-templates .pcell:nth-child(2n) { border-right: 0; }
  html.ui9.page-templates .pcell:nth-child(-n+2) { border-bottom: 1px solid var(--hair); }
  html.ui9.page-templates .pcell:nth-child(n) .strip img { flex-basis: 78px; }
  html.ui9.page-templates .pcell:nth-child(-n+2) .strip img:first-child { flex: 0 1 120px; }
  /* a two-column cell is too narrow for a name and its proof: the open list takes the whole line */
  html.ui9.page-templates .pcell:has(.rows.open) { grid-column: 1 / -1; border-right: 0; }
  html.ui9.page-templates .wrap > p.muted { margin-left: 0; }
}
@media (max-width: 560px) {
  html.ui9.page-templates .pcell { padding: 8px 8px 10px; }
  html.ui9.page-templates .pcell:nth-child(2n+1) { padding-left: 0; }
  html.ui9.page-templates .pcell:nth-child(2n) { padding-right: 0; }
  html.ui9.page-templates .strip { height: 66px; gap: 4px; }
  html.ui9.page-templates .strip img:nth-child(n+4) { display: none; }
  html.ui9.page-templates .cellbtns { flex-wrap: wrap; }
}

/* ===================== 1-Click: ticket stubs ===================== */
/* --stub is the stub's width: .acts takes it, and the perforation and the notches are placed from it, so they move together */
html.ui9.page-oneclick { --stub: 200px; --hz-2: #16130e; }
/* the frame's dark stripe would sink into a dark page and leave loose dashes */
html.ui9.page-oneclick[data-theme="dark"] { --hz-2: var(--bezel-3); }
html.ui9.page-oneclick body > .topbar { flex-wrap: nowrap; }
html.ui9.page-oneclick .topbar h1 { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
html.ui9.page-oneclick .topbar h1 .v9-i { width: 14px; height: 14px; color: var(--text-dim); }
html.ui9.page-oneclick #count { font: 500 12px/1 var(--mono) !important; letter-spacing: -.01em; color: var(--text-dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* the page's own controls, then the spacer, then the way to make one */
html.ui9.page-oneclick .topbar #q { order: 1; flex: 0 1 240px; min-width: 0; margin-left: 6px; }
html.ui9.page-oneclick .topbar #pf { order: 2; }
html.ui9.page-oneclick .topbar #bf { order: 3; width: 170px; max-width: 170px; }   /* a set width: its options land after the first paint */
html.ui9.page-oneclick .topbar #count { order: 4; margin-left: 4px; }
html.ui9.page-oneclick .topbar .spacer { order: 6; }
html.ui9.page-oneclick .topbar a.btn { order: 7; }

/* how many of these spend the moment they are used, always in the bar */
html.ui9.page-oneclick .v9-oc-hot {
  order: 5; display: inline-flex; align-items: center; height: 26px; padding: 0 8px; border: 3px solid transparent; border-radius: var(--r-cap);
  font: 500 11.5px/1 var(--sans); color: #ffcf5c; white-space: nowrap; font-variant-numeric: tabular-nums;
  background: linear-gradient(#16130e, #16130e) padding-box, repeating-linear-gradient(-45deg, var(--hazard) 0 5px, var(--hz-2) 5px 10px) border-box;
}

html.ui9.page-oneclick .grid { gap: 6px; }
html.ui9.page-oneclick .tpl {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--stub); gap: 0; align-items: stretch; min-height: 64px; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-ticket); box-shadow: none; background: var(--surface); transition: border-color var(--t1);
}
html.ui9.page-oneclick .tpl:hover { border-color: var(--line-strong); }
/* the notches: a half disc of the page, cut through the ticket's edge, on the perforation */
html.ui9.page-oneclick .tpl::before, html.ui9.page-oneclick .tpl::after {
  content: ""; position: absolute; z-index: 1; right: calc(var(--stub) - 8px); width: 16px; height: 9px; background: var(--bg); border: 1px solid var(--line);
}
html.ui9.page-oneclick .tpl::before { top: -1px; border-top: 0; border-radius: 0 0 9px 9px; }
html.ui9.page-oneclick .tpl::after { bottom: -1px; border-bottom: 0; border-radius: 9px 9px 0 0; }
html.ui9.page-oneclick .tpl:hover::before, html.ui9.page-oneclick .tpl:hover::after { border-color: var(--line-strong); }

/* one line of a ticket: badge, name over status, account, campaign, structure, used */
html.ui9.page-oneclick .tpl > :first-child {
  display: grid; grid-template-columns: 78px minmax(0, 1.7fr) minmax(0, .8fr) minmax(0, 1.15fr) minmax(0, .9fr) 112px 26px;
  grid-template-rows: auto auto; column-gap: 14px; row-gap: 3px; align-items: center; align-content: center; min-width: 0; padding: 9px 8px 9px 12px;
}
html.ui9.page-oneclick .tpl .top, html.ui9.page-oneclick .tpl .facts { display: contents; }
html.ui9.page-oneclick .tpl .pf { grid-column: 1; grid-row: 1 / 3; justify-self: start; }
html.ui9.page-oneclick .tpl .nm { grid-column: 2; grid-row: 1; min-width: 0; font-size: 13px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-oneclick .tpl .chip { padding: 2px 6px; border-radius: var(--r-cap); font-size: 11.5px; line-height: 1.3; white-space: nowrap; }
html.ui9.page-oneclick .tpl .chip:is(.active, .paused) { grid-column: 2; grid-row: 2; justify-self: start; }
html.ui9.page-oneclick .tpl .chip.paused { background: var(--live-bg); color: var(--live); }
html.ui9.page-oneclick[data-theme="light"] .tpl .chip.paused { color: color-mix(in srgb, var(--live) 74%, var(--text)); }   /* 4.5:1 at this size */

/* used: figure over last date, no chip */
html.ui9.page-oneclick .tpl .top > .chip:last-child {
  grid-column: 6; grid-row: 1 / 3; justify-self: start; padding: 0; background: none; font-size: 12px; line-height: 1.3; color: var(--text-dim); white-space: normal;
}
html.ui9.page-oneclick .tpl .v9-oc-used { display: block; font: 500 13px/1.25 var(--mono); letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
html.ui9.page-oneclick .tpl .v9-oc-last { display: block; font-size: 11.5px; line-height: 1.3; color: var(--text-dim); white-space: nowrap; }

/* ticket keys */
html.ui9.page-oneclick .tpl .facts > div { grid-row: 1 / 3; min-width: 0; }
html.ui9.page-oneclick .tpl .facts > div:nth-child(2) { grid-column: 3; }
html.ui9.page-oneclick .tpl .facts > div:nth-child(3) { grid-column: 4; }
html.ui9.page-oneclick .tpl .facts > div:nth-child(4) { grid-column: 5; }
html.ui9.page-oneclick .tpl .facts b { display: block; margin-bottom: 4px; font: 500 10px/1 var(--mono); letter-spacing: .085em; color: var(--text-dim); }
html.ui9.page-oneclick .tpl .facts span { display: block; font-size: 12.5px; line-height: 1.3; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the rest of a ticket folds away: Library campaign, ad set, saved, ad copy */
html.ui9.ui9-ready.page-oneclick .tpl:not(.v9-open) :is(.facts > div:nth-child(1), .facts > div:nth-child(n+5), .copy) { display: none; }
/* placed on the row layout only: on a phone the facts are their own two-column grid */
@media (min-width: 761px) {
  html.ui9.page-oneclick .tpl:is(.v9-open, :root:not(.ui9-ready) *) .facts > div:nth-child(1) { grid-column: 2; grid-row: 3; }
  html.ui9.page-oneclick .tpl:is(.v9-open, :root:not(.ui9-ready) *) .facts > div:nth-child(5):not(:last-child) { grid-column: 3 / 5; grid-row: 3; }
  html.ui9.page-oneclick .tpl:is(.v9-open, :root:not(.ui9-ready) *) .facts > div:last-child { grid-column: 5 / 7; grid-row: 3; }
  html.ui9.page-oneclick .tpl:is(.v9-open, :root:not(.ui9-ready) *) .facts > div:is(:nth-child(1), :nth-child(n+5)) { margin-top: 7px; }
}
html.ui9.page-oneclick .tpl:is(.v9-open, :root:not(.ui9-ready) *) .facts span { white-space: normal; overflow-wrap: anywhere; }
html.ui9.page-oneclick .tpl:is(.v9-open, :root:not(.ui9-ready) *) .nm { white-space: normal; overflow-wrap: anywhere; }
/* opened, the rows start-align, so a tall fact does not float the name away from its status */
html.ui9.page-oneclick .tpl:is(.v9-open, :root:not(.ui9-ready) *) > :first-child { align-items: start; }
html.ui9.page-oneclick .tpl:is(.v9-open, :root:not(.ui9-ready) *) .facts > div, html.ui9.page-oneclick .tpl:is(.v9-open, :root:not(.ui9-ready) *) .top > .chip:last-child { align-self: start; }
html.ui9.page-oneclick .tpl .copy { grid-column: 2 / 7; grid-row: 4; margin: 7px 0 2px; padding: 1px 0 1px 9px; border-left: 2px solid var(--line-strong); font-size: 12.5px; line-height: 1.4; color: var(--text-dim); }
html.ui9.page-oneclick .tpl .copy b { font-weight: 600; color: var(--text); }
html.ui9.page-oneclick .v9-oc-more {
  grid-column: 7; grid-row: 1 / 3; justify-self: end; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--r-key);
  background: none; color: var(--text-dim); cursor: pointer; transition: background var(--t1), color var(--t1);
}
html.ui9.page-oneclick .v9-oc-more:hover { background: var(--hover); color: var(--text); }
html.ui9.page-oneclick .v9-oc-more .v9-i { width: 14px; height: 14px; transition: transform var(--t1) var(--ease); }
html.ui9.page-oneclick .v9-oc-more[aria-expanded="true"] .v9-i { transform: rotate(180deg); }

/* the stub */
html.ui9.page-oneclick .tpl .acts {
  display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 5px; width: var(--stub); padding: 0 10px;
  border-left: 1px dashed var(--line-strong); border-radius: 0 11px 11px 0; background: var(--sheet-top);
}
html.ui9.page-oneclick .tpl .acts .btn { flex: none; }

/* ACTIVE changes shape, not just colour: the Launcher's ink core in a hazard frame, with the exposure in words.
   The ticket redefines its own tokens, so everything inside it reads on ink, the keys included. */
html.ui9.page-oneclick .tpl:has(.chip.active) {
  --surface: var(--bezel-2); --text: var(--on-bezel); --text-dim: var(--on-bezel-dim); --text-faint: var(--on-bezel-faint);
  --line: var(--bezel-line-2); --line-strong: var(--bezel-line-2); --hover: rgba(244,239,228,.08); --rejected: #ff7a5c;
  color: var(--on-bezel); border: 4px solid transparent; border-radius: var(--r-ticket);
  grid-template-columns: minmax(0, 1fr) calc(var(--stub) - 3px);   /* the frame is 3px thicker: perforation and keys stay on the page's one line */
  background: linear-gradient(var(--bezel), var(--bezel)) padding-box, repeating-linear-gradient(-45deg, var(--hazard) 0 8px, var(--hz-2) 8px 16px) border-box;
}
html.ui9.page-oneclick .tpl:has(.chip.active):hover { border-color: transparent; }
html.ui9.page-oneclick .tpl:has(.chip.active)::before, html.ui9.page-oneclick .tpl:has(.chip.active)::after { border-color: transparent; }
html.ui9.page-oneclick .tpl:has(.chip.active):hover::before, html.ui9.page-oneclick .tpl:has(.chip.active):hover::after { border-color: transparent; }
html.ui9.page-oneclick .tpl:has(.chip.active)::before, html.ui9.page-oneclick .tpl:has(.chip.active)::after { right: calc(var(--stub) - 11px); }
html.ui9.page-oneclick .tpl:has(.chip.active)::before { top: -4px; height: 12px; }
html.ui9.page-oneclick .tpl:has(.chip.active)::after { bottom: -4px; height: 12px; }
html.ui9.page-oneclick .tpl:has(.chip.active) > :first-child { padding: 6px 5px 6px 9px; }
html.ui9.page-oneclick .tpl:has(.chip.active) .acts { width: calc(var(--stub) - 3px); padding: 0 7px 0 10px; background: var(--bezel-2); border-radius: 0 8px 8px 0; border-left-color: var(--on-bezel-faint); }
html.ui9.page-oneclick .tpl:has(.chip.active) :focus-visible { outline-color: var(--led); }
html.ui9.page-oneclick .tpl .chip.active { background: #ff7a5c; color: var(--go-ink); font-weight: 600; }
html.ui9.page-oneclick .tpl .chip.active::after { content: " \B7  spends now"; font-weight: 500; }

/* empty, loading, error */
html.ui9.page-oneclick #list > .empty { padding: 44px max(16px, calc(50% - 300px)); border: 1px dashed var(--line-strong); border-radius: var(--r-ticket); color: var(--text-dim); line-height: 1.55; }
html.ui9.page-oneclick #list > .empty b { color: var(--text); font-weight: 600; }
html.ui9.page-oneclick #list > .empty .v9-oc-bolt { color: var(--text); }
html.ui9.page-oneclick #list > .empty a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
html.ui9.page-oneclick:has(#count:empty) #list > .empty:not(:has(b)) {
  height: 204px; padding: 0; border: 0; border-radius: var(--r-ticket); color: transparent; font-size: 0; animation: v9-shimmer 1.6s linear infinite;
  background: linear-gradient(90deg, var(--surface-2) 30%, var(--mat) 50%, var(--surface-2) 70%) 0 0 / 200% 100%;
  -webkit-mask: repeating-linear-gradient(#000 0 64px, transparent 64px 70px); mask: repeating-linear-gradient(#000 0 64px, transparent 64px 70px);
}
html.ui9.page-oneclick .note.err { color: var(--rejected); background: var(--rejected-bg); }
html.ui9.page-oneclick .note.err a { color: inherit; }

/* the edit sheet: above the bar, right edge flush */
html.ui9.page-oneclick .sheet { border-radius: var(--r-panel) 0 0 var(--r-panel); }
html.ui9.page-oneclick .sheet header { padding: 11px 16px; border-bottom-color: var(--hair); }
html.ui9.page-oneclick #sheetTitle { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
html.ui9.page-oneclick .sheet .body { gap: 14px; padding: 14px 16px; align-content: start; }
html.ui9.page-oneclick .sheet footer { padding: 10px 16px; border-top-color: var(--hair); }
html.ui9.page-oneclick .sheet .f { gap: 6px; margin: 0; line-height: 1.2; }
html.ui9.page-oneclick .sheet .f > span { font: 500 10px/1.25 var(--mono); letter-spacing: .085em; color: var(--text-dim); }
html.ui9.page-oneclick .sheet .f .v9-oc-h { display: block; margin-top: 3px; font: 400 12px/1.35 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text-dim); }
html.ui9.page-oneclick .sheet .f .lim { font: 500 11px/1 var(--mono); letter-spacing: -.01em; color: var(--text-dim); }
html.ui9.page-oneclick .sheet .f .lim.over { color: var(--rejected); }
html.ui9.page-oneclick .sheet .f .help { font: 400 12px/1.4 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text-dim); }
html.ui9.page-oneclick .v9-oc-bolt { display: inline-block; width: 12px; height: 12px; vertical-align: -2px; }
html.ui9.page-oneclick .sheet .seg { display: inline-flex; justify-self: start; max-width: 100%; }
/* Active is the same hazard as the Launcher's */
html.ui9.page-oneclick #eStatus button.on.danger { background: var(--hazard); color: var(--go-ink); }
html.ui9.page-oneclick #eStatusHelp:has(span) { padding-left: 8px; box-shadow: inset 2px 0 0 var(--hazard); }

@media (max-width: 1240px) {
  /* two lines of a ticket: name and status, then the keys */
  html.ui9.page-oneclick .tpl > :first-child { grid-template-columns: 78px minmax(0, .2fr) minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, .9fr) 26px; column-gap: 12px; row-gap: 7px; }
  html.ui9.page-oneclick .tpl .pf { grid-row: 1; }
  html.ui9.page-oneclick .tpl .nm { grid-column: 2 / 5; grid-row: 1; white-space: normal; overflow-wrap: anywhere; }
  html.ui9.page-oneclick .tpl .chip:is(.active, .paused) { grid-column: 5; grid-row: 1; justify-self: end; }
  html.ui9.page-oneclick .tpl:has(.chip.active) .nm { grid-column: 2 / 4; }
  html.ui9.page-oneclick .tpl .chip.active { grid-column: 4 / 6; }
  html.ui9.page-oneclick .tpl .facts > div { grid-row: 2; align-self: start; }
  html.ui9.page-oneclick .tpl .facts span { white-space: normal; overflow-wrap: anywhere; }   /* a two-line ticket has the height: a long campaign wraps, it is never cut */
  html.ui9.page-oneclick .tpl .facts > div:nth-child(2) { grid-column: 1 / 3; }
  html.ui9.page-oneclick .tpl .facts > div:nth-child(3) { grid-column: 3; }
  html.ui9.page-oneclick .tpl .facts > div:nth-child(4) { grid-column: 4; }
  html.ui9.page-oneclick .tpl .top > .chip:last-child { grid-column: 5; grid-row: 2; align-self: start; }
  html.ui9.page-oneclick .v9-oc-more { grid-column: 6; }
  html.ui9.page-oneclick .tpl .copy { grid-column: 1 / 6; }
}
@media (min-width: 761px) and (max-width: 1240px) {
  html.ui9.page-oneclick .tpl:is(.v9-open, :root:not(.ui9-ready) *) .facts > div:nth-child(1) { grid-column: 1 / 3; grid-row: 3; }
  html.ui9.page-oneclick .tpl:is(.v9-open, :root:not(.ui9-ready) *) .facts > div:nth-child(5):not(:last-child) { grid-column: 3; grid-row: 3; }
  html.ui9.page-oneclick .tpl:is(.v9-open, :root:not(.ui9-ready) *) .facts > div:last-child { grid-column: 4 / 6; grid-row: 3; }
}
@media (max-width: 1100px) {
  html.ui9.page-oneclick body > .topbar { flex-wrap: nowrap; }
  html.ui9.page-oneclick .topbar #q { flex: 1 1 120px; }
  html.ui9.page-oneclick .topbar #bf { width: 140px; max-width: 140px; }
}
@media (max-width: 960px) {
  html.ui9.page-oneclick { --bar-h: 89px; }
  html.ui9.page-oneclick body > .topbar { flex-wrap: wrap; }
  html.ui9.page-oneclick .topbar .spacer { display: none; }
  /* line one: title, search, the way to make one. Line two: filters and counts. */
  html.ui9.page-oneclick .topbar #q { flex: 1 1 calc(100% - 300px); }
  html.ui9.page-oneclick .topbar a.btn { order: 2; }
  html.ui9.page-oneclick .topbar :is(#pf, #bf) { order: 3; }
}
@media (max-width: 860px) {
  html.ui9.page-oneclick { --bar-h: 129px; }
  html.ui9.page-oneclick .toast { bottom: calc(68px + env(safe-area-inset-bottom)); }
  /* core sets fields to 16px here, so the bar's filters take a line of their own. The way to make one rides on the title's line. */
  html.ui9.page-oneclick .topbar a.btn { order: 0; margin-left: auto; }
  html.ui9.page-oneclick .topbar #q { flex: 1 1 100%; margin-left: 0; }
  html.ui9.page-oneclick .topbar #pf, html.ui9.page-oneclick .topbar #bf { flex: 1 1 140px; width: auto; max-width: none; min-width: 0; }
  html.ui9.page-oneclick .topbar #count { margin-left: 0; }
}
@media (max-width: 760px) {
  /* a phone: the stub tears off the bottom, so the perforation lies flat */
  html.ui9.page-oneclick body > .topbar { padding-left: var(--gut); padding-right: var(--gut); }
  html.ui9.page-oneclick .tpl { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-oneclick .tpl:has(.chip.active) { grid-template-columns: minmax(0, 1fr); }
  html.ui9.page-oneclick .tpl > :first-child, html.ui9.page-oneclick .tpl:has(.chip.active) > :first-child { position: relative; display: block; padding: 10px 12px; }
  html.ui9.page-oneclick .tpl:has(.chip.active) > :first-child { padding: 7px 9px; }
  html.ui9.page-oneclick .tpl .top { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; padding: 0; border: 0; background: none; }
  html.ui9.page-oneclick .tpl .nm { flex: 1 1 100%; order: 2; white-space: normal; overflow-wrap: anywhere; font-size: 14px; }
  html.ui9.page-oneclick .tpl .pf { order: 1; margin-bottom: 3px; }
  html.ui9.page-oneclick .tpl .chip:is(.active, .paused) { order: 3; }
  html.ui9.page-oneclick .tpl:has(.chip.active) .nm { grid-column: auto; }
  html.ui9.page-oneclick .tpl .top > .chip:last-child { order: 4; flex: 1 1 auto; text-align: right; }
  html.ui9.page-oneclick .tpl .v9-oc-used, html.ui9.page-oneclick .tpl .v9-oc-last { display: inline; margin-left: 5px; }
  html.ui9.page-oneclick .tpl .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-top: 9px; }
  html.ui9.page-oneclick .tpl .facts > div:nth-child(n) { grid-row: auto; grid-column: auto; margin-top: 0; order: 3; }
  /* account and structure side by side, the long campaign name on a line of its own, what unfolds below them */
  html.ui9.page-oneclick .tpl .facts > div:is(:nth-child(2), :nth-child(4)):nth-child(n) { order: 1; }
  html.ui9.page-oneclick .tpl .facts > div:nth-child(3):nth-child(n) { grid-column: 1 / -1; order: 2; }
  html.ui9.page-oneclick .tpl .facts span { white-space: normal; overflow-wrap: anywhere; }
  html.ui9.page-oneclick .tpl .copy { margin: 9px 0 0; }
  html.ui9.page-oneclick .v9-oc-more { position: absolute; top: 0; right: 4px; width: 34px; height: 34px; }
  html.ui9.page-oneclick .tpl .acts {
    width: auto; padding: 8px 12px; justify-content: stretch; border-left: 0; border-top: 1px dashed var(--line-strong); border-radius: 0 0 11px 11px;
  }
  html.ui9.page-oneclick .tpl:has(.chip.active) .acts { width: auto; padding: 8px 12px; border-top-color: var(--on-bezel-faint); border-radius: 0 0 8px 8px; }
  html.ui9.page-oneclick .tpl .acts .btn { flex: 1 1 0; }
  html.ui9.page-oneclick .tpl::before, html.ui9.page-oneclick .tpl::after,
  html.ui9.page-oneclick .tpl:has(.chip.active)::before, html.ui9.page-oneclick .tpl:has(.chip.active)::after {
    top: auto; bottom: 42px; width: 9px; height: 16px; border: 1px solid var(--line);
  }
  html.ui9.page-oneclick .tpl::before, html.ui9.page-oneclick .tpl:has(.chip.active)::before { left: -1px; right: auto; border-left: 0; border-radius: 0 9px 9px 0; }
  html.ui9.page-oneclick .tpl::after, html.ui9.page-oneclick .tpl:has(.chip.active)::after { right: -1px; left: auto; border-right: 0; border-radius: 9px 0 0 9px; }
  html.ui9.page-oneclick .tpl:has(.chip.active)::before { left: -4px; width: 12px; border-color: transparent; }
  html.ui9.page-oneclick .tpl:has(.chip.active)::after { right: -4px; width: 12px; border-color: transparent; }
  html.ui9.page-oneclick .sheet { border-radius: 0; }
  html.ui9.page-oneclick .sheet .seg { flex-wrap: wrap; }
  html.ui9.page-oneclick .sheet .seg button { min-height: 34px; }
  html.ui9.page-oneclick .sheet footer .btn { min-height: 38px; }
}

/* ===================== To-do: the queue ===================== */
/* the page's own red, amber and blue give way to the shared words for them */
html.ui9.page-todo, html.ui9.page-todo[data-theme="light"], html.ui9.page-todo[data-theme="dark"] {
  --bad: var(--rejected); --bad-bg: var(--rejected-bg); --wait: var(--review); --wait-bg: var(--review-bg); --gutter: 92px;
}
html.ui9.page-todo body { padding-bottom: 90px; }
html.ui9.page-todo a:hover { text-decoration: none; }
/* a hairline under the bar: what scrolls beneath meets an edge */
html.ui9.page-todo .wrap > .head { box-shadow: 0 1px 0 var(--hair); }

/* .head and .bar are one row: .bar sticks at the same line and lies over .head's empty middle */
html.ui9.page-todo .wrap > .head { align-items: center; flex-wrap: nowrap; height: var(--bar-h); margin-bottom: 0; }
html.ui9.page-todo .head .sub { display: none; }
html.ui9.page-todo .wrap > .bar {
  position: sticky; top: var(--shell-h); z-index: 31; flex-wrap: nowrap; gap: 8px; width: fit-content; height: var(--bar-h);
  margin: calc(-1 * var(--bar-h)) 0 0 56px;
}
html.ui9.page-todo .bar .seg { flex-wrap: nowrap; }
html.ui9.page-todo .bar .seg button { white-space: nowrap; }
html.ui9.page-todo .seg button .n { display: inline-block; min-width: 7px; margin-left: 5px; font: 500 11.5px/1 var(--mono); letter-spacing: -.02em; opacity: .75; font-variant-numeric: tabular-nums; }
/* a square of platform colour on each filter: the same colours as the keys below */
html.ui9.page-todo #pfs button[data-p]:not([data-p="all"], [data-p=""])::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 2px; vertical-align: .5px; background: var(--pfc);
}
html.ui9.page-todo #pfs button[data-p="newsbreak"] { --pfc: #e52d27; }
html.ui9.page-todo #pfs button[data-p="meta"] { --pfc: #1877f2; }
html.ui9.page-todo #pfs button[data-p="tiktok"] { --pfc: #111; }
html.ui9.page-todo #pfs button[data-p="snapchat"] { --pfc: #fffc00; }
html.ui9.page-todo #pfs button[data-p="snapchat"]::before { box-shadow: 0 0 0 1px var(--line-strong); }
html.ui9.page-todo #pfs button[data-p="smartnews"] { --pfc: #0099eb; }
html.ui9.page-todo[data-theme="dark"] #pfs button[data-p="tiktok"]::before { box-shadow: 0 0 0 1px var(--line-strong); }
html.ui9.page-todo #pfs button[data-p="tiktok"].on::before { box-shadow: 0 0 0 1px var(--on-bezel-faint); }

html.ui9.page-todo #out { margin-top: 4px; }

/* groups run down a gutter, so the queue reads as one timetable */
html.ui9.page-todo .group { display: grid; grid-template-columns: var(--gutter) minmax(0, 1fr); column-gap: 10px; margin: 0 0 8px; }
html.ui9.page-todo .group-h {
  position: sticky; top: calc(var(--shell-h) + var(--bar-h) + 8px); align-self: start; display: flex; align-items: baseline; justify-content: space-between; gap: 6px;
  margin: 0; padding: 12px 0 0 2px; line-height: 1.35; color: var(--text-dim);
}
html.ui9.page-todo .group-h .cnt { padding: 0; background: none; font: 500 12.5px/1 var(--mono); letter-spacing: -.02em; color: inherit; font-variant-numeric: tabular-nums; }
html.ui9.page-todo .group.overdue .group-h { color: var(--rejected); }
html.ui9.page-todo .group.today .group-h { color: var(--text); }
html.ui9.page-todo .list { border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: none; background: var(--surface); }
html.ui9.page-todo .group:is(.overdue, .today) .list { position: relative; }
html.ui9.page-todo .group:is(.overdue, .today) .list::before { content: ""; position: absolute; z-index: 1; inset: 0 auto 0 0; width: 3px; pointer-events: none; background: var(--rejected); }
html.ui9.page-todo .group.today .list::before { background: var(--text); }   /* orange stays for go */

/* the page's inline .tick also lands on the nav's paper-tab tick, which is a 2px bar */
html.ui9.page-todo .dk-tab .tick { width: auto; padding: 0; border: 0; border-radius: 0 0 2px 2px; }

/* a 56px row */
html.ui9.page-todo .task {
  grid-template-columns: 16px 22px 40px minmax(0, 1fr) 96px; gap: 10px; min-height: 56px; padding: 7px 10px 7px 13px; border-top-color: var(--hair);
  transition: background var(--t1);
}
html.ui9.page-todo .task:hover { background: var(--hover); }
html.ui9.page-todo .task.sel { background: color-mix(in srgb, var(--text) 8%, var(--surface)); }
/* a machined box beside the round tick, the same drawn check */
html.ui9.page-todo .task input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; display: grid; place-items: center; width: 16px; height: 16px; margin: 0; padding: 0; border: 1.5px solid var(--line-strong); border-radius: var(--r-cap);
  background: var(--surface); cursor: pointer; transition: border-color var(--t1), background var(--t1);
}
html.ui9.page-todo .task input[type="checkbox"]:hover { border-color: var(--text-dim); }
html.ui9.page-todo .task input[type="checkbox"]:checked { border-color: var(--text); background: var(--text); }
html.ui9.page-todo .task input[type="checkbox"]::after { content: ""; width: 8px; height: 4px; margin-top: -2px; border-left: 2px solid transparent; border-bottom: 2px solid transparent; transform: rotate(-45deg); }
html.ui9.page-todo .task input[type="checkbox"]:checked::after { border-color: var(--surface); }
html.ui9.page-todo .task .tick { width: 22px; height: 22px; border-width: 1.5px; font-size: 0; transition: border-color var(--t1), background var(--t1); }
/* the check is drawn: the handler reads e.target.dataset, so nothing may go inside the key */
html.ui9.page-todo .task .tick::before {
  content: ""; width: 9px; height: 5px; margin-top: -2px; border-left: 2px solid transparent; border-bottom: 2px solid transparent; transform: rotate(-45deg);
}
html.ui9.page-todo .task .tick:hover { border-color: var(--live); }
html.ui9.page-todo .task .tick:hover::before { border-color: var(--live); }
html.ui9.page-todo .task.done .tick { background: var(--live); border-color: var(--live); }
html.ui9.page-todo .task.done .tick::before { border-color: var(--surface); }
html.ui9.page-todo .pic { width: 40px; height: 40px; border-radius: var(--r-key); background: var(--mat); font-size: 10.5px; color: var(--text-dim); }

/* name and facts on the left, what you can change on the right */
html.ui9.page-todo .info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 1.1fr); column-gap: 14px; align-items: center; }
html.ui9.page-todo .nm { grid-column: 1; font-size: 13px; font-weight: 500; line-height: 1.3; letter-spacing: -.005em; }
html.ui9.page-todo .nm .dim { color: var(--text-dim); font-weight: 400; }
html.ui9.page-todo .nm a:focus-visible { outline-offset: -3px; }   /* .nm clips: the ring goes inside */
html.ui9.page-todo .task.done .nm a { color: var(--text-dim); }
html.ui9.page-todo .info > .meta { grid-column: 1; flex-wrap: nowrap; gap: 7px; margin-top: 2px; overflow: hidden; font-size: 11.5px; line-height: 1.35; color: var(--text-dim); white-space: nowrap; }
/* the fields are folded away, so this line is the only place the date shows: it comes straight after the badge and never gives way.
   The board and the type shrink with an ellipsis, and "added by" goes first. */
html.ui9.page-todo .nm + .meta > * { flex: 0 1 auto; order: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html.ui9.page-todo .nm + .meta > :is(.pf, .how) { flex: none; order: 0; }
html.ui9.page-todo .nm + .meta > .due { flex: none; order: 1; }
html.ui9.page-todo .nm + .meta > :last-child:not(.due, .pf, .how) { flex-shrink: 1000; }
html.ui9.page-todo .info > .meta + .meta { grid-column: 2; grid-row: 1 / 3; margin: 0; white-space: normal; font-size: 12.5px; }
html.ui9.page-todo .due.over { color: var(--rejected); font-weight: 500; }
html.ui9.page-todo[data-theme="light"] .due.over { color: color-mix(in srgb, var(--rejected) 86%, var(--text)); }   /* 4.5:1 at this size */
html.ui9.page-todo .due.today { color: var(--text); font-weight: 600; }
html.ui9.page-todo .how { color: var(--live); font-weight: 500; }
html.ui9.page-todo[data-theme="light"] .how { color: color-mix(in srgb, var(--live) 86%, var(--text)); }

/* the fields stay in the DOM and in the tab order. At rest the note reads as text and the rest are hidden.
   Their place is held, so hover or focus only fades them in: nothing moves, nothing that writes lands under a pointer aimed at the note. */
html.ui9.page-todo .edit { grid-column: 2; grid-row: 1 / 3; flex-wrap: nowrap; gap: 6px; min-width: 0; margin: 0; }
html.ui9.page-todo .edit :is(select, input) {
  height: 28px; min-width: 0; padding: 0 7px; border: 0; border-radius: var(--r-key); background: transparent; color: var(--text); font: 400 12.5px/1 var(--sans);
  box-shadow: none; transition: background var(--t1), box-shadow var(--t1), opacity var(--t1);
}
html.ui9.page-todo .edit input.note { flex: 1 1 0; min-width: 0; color: var(--text-dim); text-overflow: ellipsis; }
html.ui9.page-todo .edit input.note::placeholder { color: transparent; }
@media (min-width: 1101px) {
  /* the note leads, the two fields sit beside Launch. Their tab order stays select, date, note. */
  html.ui9.page-todo .edit input.note { order: -1; }
  html.ui9.page-todo .edit select[data-f] { flex: 0 0 106px; width: 106px; padding: 0 5px; opacity: 0; }
  html.ui9.page-todo .edit input[type="date"] { flex: 0 0 122px; width: 122px; padding: 0 6px; opacity: 0; }
  html.ui9.page-todo .task:is(:hover, :focus-within) .edit :is(select, input) { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); opacity: 1; }
  html.ui9.page-todo .task:is(:hover, :focus-within) .edit :is(select, input):focus { background: var(--surface); }
  html.ui9.page-todo .task:is(:hover, :focus-within) .edit input.note::placeholder { color: var(--text-dim); }
}
/* no hover to fold behind: the fields stay on show, and the note keeps a readable share of the row */
@media (hover: none) and (min-width: 1101px) {
  html.ui9.page-todo .info { grid-template-columns: minmax(0, 1fr) minmax(390px, 1.25fr); }
  html.ui9.page-todo .edit :is(select, input) { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); opacity: 1; }
  html.ui9.page-todo .edit input.note::placeholder { color: var(--text-dim); }
  html.ui9.page-todo .edit select[data-f] { flex: 0 0 96px; width: 96px; opacity: 1; }
  html.ui9.page-todo .edit input[type="date"] { flex: 0 0 116px; width: 116px; opacity: 1; }
}

/* keys. The stack is fixed, so Launch and the X sit on one line down the page. */
html.ui9.page-todo .task .acts { justify-content: flex-end; gap: 4px; }
html.ui9.page-todo .task .btn[data-go] { --pfc: var(--primary-bg); --pfi: var(--primary-text); background: var(--pfc); color: var(--pfi); box-shadow: none; }
html.ui9.page-todo .task:has(.pf.newsbreak) .btn[data-go] { --pfc: #e52d27; --pfi: #fff; }
html.ui9.page-todo .task:has(.pf.meta) .btn[data-go] { --pfc: #1877f2; --pfi: #fff; }
html.ui9.page-todo .task:has(.pf.tiktok) .btn[data-go] { --pfc: #111; --pfi: #fff; }
html.ui9.page-todo .task:has(.pf.snapchat) .btn[data-go] { --pfc: #fffc00; --pfi: #111; }
html.ui9.page-todo .task:has(.pf.smartnews) .btn[data-go] { --pfc: #0099eb; --pfi: var(--go-ink); }
html.ui9.page-todo .task .btn[data-go]:hover { background: var(--pfc); color: var(--pfi); box-shadow: none; filter: brightness(1.1); }
html.ui9.page-todo[data-theme="dark"] .task:has(.pf.tiktok) .btn[data-go] { --pfc: var(--primary-bg); --pfi: var(--primary-text); }
html.ui9.page-todo .task .btn[data-go]::before { content: ""; width: 6px; height: 8px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
html.ui9.page-todo .x { display: grid; place-items: center; flex: none; width: 26px; height: 26px; padding: 0; border-radius: var(--r-key); color: var(--text-dim); font-size: 14px; line-height: 1; transition: background var(--t1), color var(--t1); }
html.ui9.page-todo .x:hover { color: var(--rejected); background: var(--rejected-bg); }

/* loading: skeleton rows, in the place the queue will land. Only the first paint has .empty straight under #out. */
html.ui9.page-todo #out > .empty {
  height: 242px; margin-left: calc(var(--gutter) + 10px); padding: 0; border-radius: var(--r-card); color: transparent; font-size: 0; animation: v9-shimmer 1.6s linear infinite;
  background: linear-gradient(90deg, var(--surface-2) 30%, var(--mat) 50%, var(--surface-2) 70%) 0 0 / 200% 100%;
  -webkit-mask: repeating-linear-gradient(#000 0 56px, transparent 56px 62px); mask: repeating-linear-gradient(#000 0 56px, transparent 56px 62px);
}
html.ui9.page-todo #out > .list .empty { padding: 34px 16px; font-size: 13px; line-height: 1.5; }
html.ui9.page-todo #out > .list .empty b { color: var(--text); font-size: 14px; font-weight: 600; }
html.ui9.page-todo #out > .list { margin-left: calc(var(--gutter) + 10px); }
html.ui9.page-todo .err { margin-left: calc(var(--gutter) + 10px); border-radius: var(--r-key); color: var(--rejected); background: var(--rejected-bg); }
html.ui9.page-todo .err a { color: inherit; text-decoration: underline; }
/* the page's own explanation, moved from the bar to the foot of the queue */
html.ui9.page-todo .wrap > .sub { margin: 10px 0 0 calc(var(--gutter) + 12px); max-width: 900px; font-size: 12px; line-height: 1.45; color: var(--text-dim); }

/* the selection dock: ink, like the Library's. NewsBreak and Meta filled, the rest quiet. */
html.ui9.page-todo .bulk {
  gap: 6px; padding: 8px 10px; flex-wrap: nowrap; border: 0; border-radius: var(--r-panel); background: var(--bezel); color: var(--on-bezel);
  box-shadow: 0 0 0 1px var(--bezel-line-2), var(--shadow-lg); transition: transform var(--t3) var(--ease);
}
html.ui9.page-todo .bulk b { margin-right: 4px; font: 500 13px/1 var(--mono); letter-spacing: -.02em; color: var(--on-bezel); white-space: nowrap; font-variant-numeric: tabular-nums; }
html.ui9.page-todo .bulk .lbl { margin-left: 4px; color: var(--on-bezel-dim); white-space: nowrap; }
/* the page's lone dot between the two groups becomes a machined divider */
html.ui9.page-todo .bulk .lbl:nth-of-type(2) { flex: none; width: 1px; height: 18px; margin: 0 4px; overflow: hidden; color: transparent; background: var(--bezel-line-2); }
html.ui9.page-todo .bulk .btn { background: rgba(244,239,228,.07); color: var(--on-bezel); box-shadow: inset 0 0 0 1px var(--bezel-line-2); }
html.ui9.page-todo .bulk .btn:hover { background: rgba(244,239,228,.14); color: var(--on-bezel); box-shadow: inset 0 0 0 1px var(--bezel-line-2); filter: none; }
html.ui9.page-todo .bulk .btn[data-launch="newsbreak"], html.ui9.page-todo .bulk .btn[data-launch="newsbreak"]:hover { background: #e52d27; color: #fff; box-shadow: none; }
html.ui9.page-todo .bulk .btn[data-launch="meta"], html.ui9.page-todo .bulk .btn[data-launch="meta"]:hover { background: #1877f2; color: #fff; box-shadow: none; }
html.ui9.page-todo .bulk .btn:is([data-launch="newsbreak"], [data-launch="meta"]):hover { filter: brightness(1.1); }
html.ui9.page-todo .bulk :is(#bDone, #bRemove, #bClear) { background: none; box-shadow: none; color: var(--on-bezel-dim); }
html.ui9.page-todo .bulk :is(#bDone, #bRemove, #bClear):hover { background: rgba(244,239,228,.1); box-shadow: none; color: var(--on-bezel); }
html.ui9.page-todo .bulk :focus-visible { outline-color: var(--led); }

/* the bar stops fitting on one row: two rows, both sticky, and the filters swipe */
@media (max-width: 960px) {
  html.ui9.page-todo { scroll-padding-top: calc(var(--shell-h) + var(--bar-h) + 50px); }
  html.ui9.page-todo .wrap > .bar {
    top: calc(var(--shell-h) + var(--bar-h)); z-index: 30; width: auto; height: auto; min-height: 42px; flex-wrap: wrap; row-gap: 6px;
    margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut) 8px; background: var(--bg);
  }
  html.ui9.page-todo .bar #pfs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  html.ui9.page-todo .bar #pfs::-webkit-scrollbar { display: none; }
  html.ui9.page-todo .bar #pfs button { flex: none; }
  html.ui9.page-todo .group-h { top: calc(var(--shell-h) + var(--bar-h) + 50px); }
  html.ui9.page-todo .bulk { flex-wrap: wrap; justify-content: center; width: max-content; max-width: calc(100vw - 24px); }
}
/* group header on Done: the label runs long, so the count sits over it */
@media (min-width: 761px) {
  html.ui9.page-todo .group:has(.task.done) .group-h { flex-direction: column-reverse; align-items: flex-start; gap: 4px; }
}
/* below this a 56px row cannot hold a name and a 160px note beside the fields: the row takes a line for them, and they stay on show */
@media (max-width: 1100px) {
  html.ui9.page-todo { --gutter: 74px; }
  html.ui9.page-todo .info { display: block; }
  html.ui9.page-todo .info > .meta { flex-wrap: wrap; white-space: normal; overflow: visible; row-gap: 2px; }
  html.ui9.page-todo .info > .meta + .meta { margin-top: 4px; }
  html.ui9.page-todo .edit { flex-wrap: wrap; gap: 6px; margin-top: 6px; }
  html.ui9.page-todo .edit :is(select, input) { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
  html.ui9.page-todo .edit input.note { flex: 1 1 160px; }
  html.ui9.page-todo .edit input.note::placeholder { color: var(--text-dim); }
  html.ui9.page-todo .edit select[data-f] { flex: 0 0 116px; width: 116px; padding: 0 5px; opacity: 1; }
  html.ui9.page-todo .edit input[type="date"] { flex: 0 0 140px; width: 140px; padding: 0 6px; opacity: 1; }
}
@media (max-width: 760px) {
  html.ui9.page-todo .wrap > .head { height: auto; }
  html.ui9.page-todo .wrap > .bar { position: static; padding-bottom: 6px; }
  html.ui9.page-todo .group { display: block; margin-bottom: 12px; }
  html.ui9.page-todo .group-h { position: static; justify-content: flex-start; padding: 6px 2px 5px; }
  html.ui9.page-todo #out > :is(.empty, .list), html.ui9.page-todo .err, html.ui9.page-todo .wrap > .sub { margin-left: 0; }
  html.ui9.page-todo .task { grid-template-columns: 16px 22px 44px minmax(0, 1fr); gap: 8px; padding: 8px 10px; align-items: start; }
  html.ui9.page-todo .task input[type="checkbox"] { margin-top: 3px; }
  html.ui9.page-todo .pic { width: 44px; height: 44px; }
  html.ui9.page-todo .nm { white-space: normal; overflow-wrap: anywhere; }
  html.ui9.page-todo .info { display: contents; }
  html.ui9.page-todo .task > :is(input, span, .tick, .pic) { grid-row: 1 / 3; }
  html.ui9.page-todo .nm { grid-column: 4; grid-row: 1; }
  html.ui9.page-todo .info > .meta { grid-column: 4; grid-row: 2; margin-top: -4px; }
  html.ui9.page-todo .info > .meta + .meta { grid-column: 3 / -1; grid-row: 3; margin-top: 0; }
  html.ui9.page-todo .edit { grid-column: 1 / -1; grid-row: 3; margin-top: 0; }
  html.ui9.page-todo .task .acts { grid-column: 1 / -1; grid-row: 4; justify-content: flex-start; }
  html.ui9.page-todo .task .btn[data-go] { flex: 1 1 auto; }
  html.ui9.page-todo .task .btn[data-go] { min-height: 34px; }
  html.ui9.page-todo .x { width: 34px; height: 34px; }
  html.ui9.page-todo .edit :is(select, input) { height: 36px; }
  html.ui9.page-todo .edit select[data-f] { flex: 1 1 130px; width: auto; }
  html.ui9.page-todo .edit input[type="date"] { flex: 1 1 150px; width: auto; }
  html.ui9.page-todo .edit input.note { flex: 1 1 100%; }
  html.ui9.page-todo .bulk .lbl { margin-left: 0; }
  html.ui9.page-todo .bulk .lbl:nth-of-type(2) { display: none; }
}
@media (max-width: 560px) {
  html.ui9.page-todo .bulk { justify-content: flex-start; }
}
