/* Cloudsdale Arena stylesheet (CLOUDSDALE-FRONTEND-MODULARIZATION, Phase 1, 6 Aug 2026).
 * Extracted verbatim from host/arena-default.html's inline <style> block -- pure move,
 * no rule changed. Served fresh per request via GET /arena.css (host/index.js), same
 * no-build-step model as the HTML/JS files: edit this file, it's live on next load. */
:root{
  /* Palette slots (31 Aug 2026, Serena: "consideration of clients might ask to make it
   * their brand colors one day"). The two palettes live ONLY here as --pal-* slots; the
   * working tokens below map onto them, and the daylight layer at the bottom of this file
   * remaps the same slots per surface. A future per-tenant brand theme is a typed config
   * override that redefines --pal-* values (same injection pattern as uiOverrides), never
   * a component-rule change. New UI work must read working tokens, never raw hexes. */
  --pal-dark-bg:#1A1A1A; --pal-dark-panel:#262626; --pal-dark-panel2:#2E2E2E; --pal-dark-line:#3a3a3a;
  --pal-dark-accent:#C9A460; --pal-dark-accent-soft:rgba(201,164,96,.16); --pal-dark-accent-line:rgba(201,164,96,.38);
  --pal-dark-ink:#EDE7DC; --pal-dark-ink-dim:#A79F92; --pal-dark-ink-faint:#9a9489;
  --pal-dark-ok:#7FB77E; --pal-dark-warn:#D9A05B; --pal-dark-bad:#C96A60; --pal-dark-info:#7FA8C9;
  --pal-light-bg:#EFE8DA; --pal-light-panel:#FBF8F2; --pal-light-panel2:#F3EDE2; --pal-light-line:#DAD2C2;
  --pal-light-accent:#84642A; --pal-light-accent-soft:rgba(132,100,42,.12); --pal-light-accent-line:rgba(132,100,42,.42);
  --pal-light-ink:#262626; --pal-light-ink-dim:#6B6355; --pal-light-ink-faint:#7A7264;
  --pal-light-ok:#3F7040; --pal-light-warn:#8F5D1E; --pal-light-bad:#A6473F; --pal-light-info:#3E6E96;
  --bg:var(--pal-dark-bg); --panel:var(--pal-dark-panel); --panel2:var(--pal-dark-panel2); --line:var(--pal-dark-line);
  --gold:var(--pal-dark-accent); --gold-soft:var(--pal-dark-accent-soft); --gold-line:var(--pal-dark-accent-line);
  --ink:var(--pal-dark-ink); --ink-dim:var(--pal-dark-ink-dim); --ink-faint:var(--pal-dark-ink-faint);
  --ok:var(--pal-dark-ok); --warn:var(--pal-dark-warn); --bad:var(--pal-dark-bad); --info:var(--pal-dark-info);
  --c-captain:#C9A460; --c-builder:#8FB6A8; --c-growth:#B08FB6; --c-client:#D9A05B;
  --c-pricing:#C96A9A; --c-qa:#7FA8C9; --c-legal:#A8B67F; --c-creator:#E0B4B4;
  --c-intel:#9AC0CD; --c-india:#D98E5B; --c-human:#EDE7DC;
  --serif:'Cormorant Garamond', Georgia, serif;
  --sans:'Open Sans', -apple-system, 'Segoe UI', sans-serif;
  --r:14px;
  /* Type scale (CLOUDSDALE-ARENA-WORKBENCH-DESIGN-PASS, 9600, 30 Jul 2026): additive only --
     nothing below references these yet, so this changes zero rendering today. Derived from the
     actual frequency distribution of the 38 raw px values in this file (11px/48x, 12px/47x,
     12.5px/40x, 13px/33x were the heaviest clusters). Migrate call sites onto these incrementally,
     highest-frequency raw values first -- see 0-Specs/oldjo-arena-workbench-design-audit-2026-07-30.md. */
  --fs-1:11px; --fs-2:12.5px; --fs-3:14px; --fs-4:16px; --fs-5:22px; --fs-6:28px;
}

/* [10230] Scrollbars, themed once rather than per surface (Serena, 13 Sep 2026: "the
 * vertical scroller looks ugly", pointing at the Teammates rail). She pointed at one, but
 * the arena has a dozen scrolling surfaces -- the roster, the chat log, the reading panel,
 * sheets, the model menu, ticket detail -- and every one was showing the browser's default
 * light-grey bar against dark charcoal. Fixing only the reported one guarantees the next
 * report.
 *
 * Written against the WORKING TOKENS, never raw hexes, per this file's own rule at the top.
 * That is what makes it free in both palettes: the daylight layer remaps --line and
 * --ink-faint on .view, so a light pane gets a light thumb and the dark frame keeps a dark
 * one, with no second rule. Track stays transparent so the thumb sits on whatever the
 * surface already paints, including the beige reading paper.
 *
 * #nav keeps its own display:none hide (id specificity wins): a horizontal nav strip on a
 * phone is the one place a visible bar is worse than none. */
*{scrollbar-width:thin;scrollbar-color:var(--line) transparent}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--line);border-radius:8px;border:2px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-thumb:hover{background:var(--ink-faint);background-clip:padding-box}
::-webkit-scrollbar-corner{background:transparent}

*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%}
body{background:var(--bg);color:var(--ink);font-family:var(--sans);font-weight:400;overflow-x:hidden}
body.scrolllock{overflow-y:hidden}
body::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:0;
  background:radial-gradient(1200px 600px at 70% -10%, rgba(201,164,96,.07), transparent 60%),
             radial-gradient(900px 500px at 10% 110%, rgba(127,168,201,.05), transparent 60%)}
::selection{background:var(--gold-soft)}
button{font-family:var(--sans);cursor:pointer;border:none;background:none;color:inherit}
input,textarea,select{font-family:var(--sans);color:var(--ink);background:var(--panel2);border:1px solid var(--line);border-radius:10px;padding:10px 12px;font-size:14px;outline:none;font-weight:400}
input:focus,textarea:focus,select:focus{border-color:var(--gold-line)}
h1,h2,h3,.serif{font-family:var(--serif)}
a{color:var(--gold)}
/* pressed states: on touch there is no hover, the press is the feedback */
button{touch-action:manipulation}
.navbtn:active,.iconbtn:active,.btn:active,.talk:active,.squadtab:active,.rosteritem:active,.pchip:active,.galNav button:active,.sheet .x:active,#adminLink:active,.gdot:active,.bigtalk:active{transform:scale(.95);filter:brightness(1.2);transition:transform .06s}
.card:active{transform:translateY(-2px) scale(.98);transition:transform .06s}
.ticket:active{transform:translateX(3px) scale(.98);transition:transform .06s}
.doc:active{transform:scale(.98);transition:transform .06s}
button:focus-visible,.rosteritem:focus-visible,.card:focus-visible,.ticket:focus-visible,.doc:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
@media(pointer:coarse){
  .navbtn,.btn,.squadtab,.bigtalk,.talk{min-height:44px}
  /* 10057 (Rebecca, 31 Aug 2026): #topbarHamburger was the one control left out of this
   * list, sitting at 36x28 on a 390px phone. It is not a minor omission -- on mobile
   * #nav is display:none and this button is the ONLY way to reach navigation at all
   * (see the mobile block near the end of this file), so the smallest tap target on the
   * page was also the most load-bearing. Same class as 9502/9504, which fixed .navbtn and
   * #avWrap and missed this one. Caught by the new mobile viewport pass in
   * test/browser-smoke.js, which is exactly the gap that pass exists to close. */
  #topbarHamburger{min-width:44px;min-height:44px;align-items:center;justify-content:center}
  .iconbtn{width:44px;height:44px}
  .rosteritem{min-height:44px}
  .sheet .x{width:44px;height:44px}
  .galNav button{width:44px;height:44px}
  input,textarea,select{font-size:16px}
}
@media(prefers-reduced-motion:reduce){
  *{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* ---------- top bar ---------- */
#topbar{position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:18px;
  padding:14px 26px;background:rgba(26,26,26,.92);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
#brand{display:flex;flex-direction:column;line-height:1.05;cursor:pointer}
#brand .b1{font-family:var(--serif);font-size:19px;letter-spacing:.14em;color:var(--gold);font-weight:600}
#brand{position:relative}
#brand .b2{font-size:9.5px;letter-spacing:.34em;color:var(--ink-dim);text-transform:uppercase;cursor:pointer;white-space:nowrap}
#brand .b2:hover{color:var(--gold)}
#brand .b2 .caret{font-size:8px;color:var(--gold);letter-spacing:0}
#arenaMenuBox{display:none;position:absolute;top:calc(100% + 8px);left:0;z-index:60;min-width:220px;background:#1d1c1a;border:1px solid var(--gold-line);border-radius:12px;padding:6px;box-shadow:0 18px 40px -14px rgba(0,0,0,.7)}
#arenaMenuBox.on{display:block}
#arenaMenuBox .ami{display:flex;align-items:center;gap:9px;width:100%;padding:9px 11px;border-radius:9px;border:none;background:none;color:var(--ink);font-size:12.5px;text-align:left;cursor:pointer}
#arenaMenuBox .ami:hover{background:rgba(201,164,96,.12)}
#arenaMenuBox .ami.on{color:var(--gold)}
#arenaMenuBox .amnote{font-size:10px;color:var(--ink-faint);padding:7px 11px 5px}
/* mobile-batch fix: hidden on desktop by default; the mobile media query above
 * switches it to display:inline-flex and gives it a job (toggles #topbar.navOpen). */
#topbarHamburger{display:none;background:none;border:1px solid var(--gold-line);border-radius:8px;color:var(--gold);font-size:16px;line-height:1;padding:5px 10px;cursor:pointer}
#nav{display:flex;gap:6px;margin-left:auto;flex-wrap:wrap}
.navbtn{padding:8px 15px;border-radius:999px;font-size:13px;letter-spacing:.06em;color:var(--ink-dim);
  border:1px solid transparent;transition:all .2s;text-transform:uppercase;font-weight:400}
.navbtn:hover{color:var(--ink);border-color:var(--line)}
.navbtn.active{color:var(--gold);border-color:var(--gold-line);background:var(--gold-soft)}
#liveDot{display:flex;align-items:center;gap:7px;font-size:11px;letter-spacing:.14em;color:var(--ink-dim);text-transform:uppercase;position:relative}
/* Settings menu (1 Sep 2026, Serena: "use an EA brand icon for the settings, keep
 * credits, operating model, login as, live team, number of seats paid"): one brand
 * monogram in the topbar, everything else behind it. Same dropdown vocabulary as
 * #arenaMenuBox above, so the two menus read as one system. */
#settingsBtn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;
  border:1px solid var(--gold-line);border-radius:9px;background:var(--gold-soft);cursor:pointer;transition:all .2s}
#settingsBtn:hover{border-color:var(--gold);background:rgba(201,164,96,.2)}
#brandMono{font-family:Georgia,"Cormorant Garamond",serif;font-size:13px;font-weight:700;letter-spacing:.06em;color:var(--gold);text-transform:uppercase}
#settingsMenu{display:none;position:absolute;top:calc(100% + 8px);right:0;z-index:60;min-width:230px;background:#1d1c1a;
  border:1px solid var(--gold-line);border-radius:12px;padding:6px;box-shadow:0 18px 40px -14px rgba(0,0,0,.7);text-transform:none;letter-spacing:normal}
#settingsMenu.on{display:block}
#settingsMenu .setrow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 11px;font-size:12px;color:var(--ink-dim)}
#settingsMenu .setlab{color:var(--ink-faint);font-size:11px}
#settingsMenu .setval{display:flex;align-items:center;gap:6px;color:var(--ink);font-size:12px}
#settingsMenu .setsep{height:1px;background:var(--line);margin:5px 3px}
#settingsMenu .setitem{display:flex;align-items:center;gap:8px;width:100%;padding:9px 11px;border-radius:9px;border:none;background:none;
  color:var(--ink);font-size:12.5px;text-align:left;cursor:pointer;text-transform:none;letter-spacing:normal}
#settingsMenu .setitem:hover{background:rgba(201,164,96,.12)}
#settingsMenu #whoChip{color:var(--gold);font-size:11.5px}
/* the Settings SURFACE's account block -- paper, like everything else you read */
.setpanel{background:var(--panel);border:1px solid var(--line);border-radius:var(--r);padding:4px 16px;margin:0 0 22px}
.setpanel-row{display:flex;align-items:center;gap:14px;padding:13px 0;border-bottom:1px solid var(--line)}
.setpanel-row:last-child{border-bottom:none}
.setpanel-row .spr-l{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-faint);flex:0 0 132px}
.setpanel-row .spr-v{flex:1;font-size:13.5px;color:var(--ink)}
@media(max-width:620px){ .setpanel-row{flex-wrap:wrap;gap:6px} .setpanel-row .spr-l{flex:1 0 100%} }
/* signed-in identity chip (login rework): honest attribution next to the live dot */
#whoChip{display:none;font-size:10.5px;letter-spacing:.06em;text-transform:none;color:var(--gold);border:1px solid var(--gold-line);border-radius:999px;padding:2px 9px;white-space:nowrap}
#whoChip.on{display:inline-block}
#pageStale{position:fixed;top:0;left:50%;transform:translateX(-50%);z-index:400;background:var(--gold);color:#141414;font-size:12.5px;font-weight:600;padding:7px 18px 8px;border-radius:0 0 12px 12px;cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.3);display:flex;flex-direction:column;align-items:center;gap:1px;line-height:1.35;text-align:center;max-width:min(92vw,520px)}
#pageStale .ps-l2{font-weight:500;font-size:11px;opacity:.75}
/* Getting started guide + Waiting-on-you lane (9478 slice, Serena-approved mock 24 Jul, copy Keeley) */
#setupGuide{background:var(--panel);border:1px solid var(--gold-line);border-radius:var(--r);margin:18px 0 8px;overflow:hidden}
#setupGuide .sg-head{padding:14px 18px 10px;background:linear-gradient(180deg,var(--gold-soft),transparent);display:flex;align-items:baseline;gap:12px}
#setupGuide .sg-head h2{font-size:21px;font-weight:600}
#setupGuide .sg-sub{font-size:12px;color:var(--ink-dim)}
/* [9910] next-step banner + direct Ted link, always visible while the guide shows */
.sg-next{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  margin:0 18px 12px;padding:9px 13px;background:var(--panel2);border:1px solid var(--gold-line);border-radius:10px;font-size:12.5px;color:var(--ink-dim)}
.sg-next b{color:var(--ink);font-weight:600}
.sg-tedlink{color:var(--gold);font-weight:600;font-size:12px;letter-spacing:.04em;white-space:nowrap;cursor:pointer;text-decoration:underline}
.sg-tedlink:hover{color:#f0dca2}
.sg-prog{display:flex;gap:5px;padding:0 18px 12px}
.sg-prog i{flex:1;height:3px;border-radius:2px;background:var(--line)}
.sg-prog i.on{background:var(--gold)}
.sg-step{padding:12px 18px;border-top:1px solid var(--line);display:flex;gap:12px}
.sg-tick{flex:0 0 22px;height:22px;border-radius:50%;border:1.5px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--ink-faint);margin-top:1px}
.sg-step.done .sg-tick{background:var(--ok);border-color:var(--ok);color:#16211a}
.sg-step.now .sg-tick{border-color:var(--gold);color:var(--gold)}
.sg-step h3{font-size:16px;font-weight:600;font-family:var(--serif)}
.sg-step.done h3{color:var(--ink-dim)}
.sg-step p{font-size:12.5px;color:var(--ink-dim);line-height:1.55;margin-top:4px;max-width:92ch}
.sg-step.later p{display:none}
.sg-step.later h3{color:var(--ink-faint)}
.sg-cta{display:inline-block;margin-top:8px;background:var(--gold);color:#141414;border-radius:999px;padding:6px 15px;font-size:12px;font-weight:600;cursor:pointer}
.hlane{background:linear-gradient(180deg,var(--gold-soft),var(--panel) 55%);border:1px solid var(--gold-line);border-radius:var(--r);padding:12px 14px;margin-bottom:16px}
.hlane .hl-t{font-size:10.5px;letter-spacing:.18em;text-transform:uppercase;color:var(--gold);display:flex;justify-content:space-between;margin-bottom:2px}
.hlane .hl-note{font-size:11px;color:var(--ink-dim);margin-top:9px}
.hl-item{background:var(--panel2);border:1px solid var(--gold-line);border-radius:8px;padding:9px 11px;font-size:12.5px;margin-top:8px;cursor:pointer}
.hl-item .m{font-size:10.5px;color:var(--ink-dim);margin-top:3px}
.chip.smp{background:rgba(127,168,201,.15);border-color:rgba(127,168,201,.4);color:#9AC0CD}
#compWho{font-size:12px;color:var(--gold);letter-spacing:.04em}
.pulse{width:9px;height:9px;border-radius:50%;background:var(--ok);animation:pulse 2.2s infinite}
.pulse.off{background:var(--ink-faint);animation:none}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(127,183,126,.5)}70%{box-shadow:0 0 0 9px rgba(127,183,126,0)}100%{box-shadow:0 0 0 0 rgba(127,183,126,0)}}

/* ---------- views ---------- */
.view{display:none;position:relative;z-index:1;max-width:1280px;margin:0 auto;padding:34px 26px 90px;animation:vIn .35s ease}
.view.on{display:block}
@keyframes vIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.viewhead{margin-bottom:26px}
.viewhead h1{font-size:42px;font-weight:600;letter-spacing:.01em}
/* 3 Aug 2026 (Serena, live: "max the backstage screen so that user get more
 * realestate to work with on the chats with the team"). Every view shares the same
 * 1280px reading-width cap above -- sensible for text-heavy pages (Library,
 * Operating Model), wrong for a chat pane, which should use the room it's given the
 * way every other chat product does. Comms-only override: wider cap, and a smaller,
 * tighter header so more of the viewport goes to the actual conversation instead of
 * hero copy above it. */
#v-comms{max-width:1800px;padding-top:12px;padding-bottom:0}
/* 3 Aug 2026 (Serena, live: "backstage scrolling shouldn't move when i'm scrolling
 * the chat portion"). Root cause: .view has no height cap and lives in normal
 * document flow, so the outer PAGE is scrollable while #chatLog/#roster ALSO
 * scroll internally -- any small overflow (this view's own padding math, or just
 * scroll-chaining at an inner list's top/bottom edge) shifts the whole Backstage
 * layout, not just the conversation. Tried capping #v-comms itself to 100vh first
 * -- wrong, #topbar is position:sticky (real layout space, not fixed/overlay), so
 * .view already starts BELOW it and 100vh from there overshoots by the topbar's
 * own height, the exact same class of off-by-some-px bug this is trying to fix.
 * Real fix lives in JS (see lockBodyScroll, called from go()): the outer page's
 * own scroll is disabled outright while comms is the open view, so there's no
 * page left to move regardless of any small height miscalculation -- a harder
 * guarantee than re-tuning padding math px by px. overscroll-behavior:contain
 * below is the second layer, stopping the rubber-band/chain effect some browsers
 * still show at an inner scroller's own edges even when the outer page can't move. */
/* 3 Aug 2026 (Serena, live: "i think we don't need the title nor description much at
 * the backstage") -- the shrunk kicker+h1+hidden-p from the first pass still cost real
 * height for a page that's entirely about the conversation below it. Drop the whole
 * hero block; the roster + chat head already say who you're talking to. */
#v-comms .viewhead{display:none}
.viewhead h1 em{color:var(--gold);font-style:normal}
.viewhead p{color:var(--ink-dim);font-size:15.5px;max-width:760px;margin-top:8px;line-height:1.6}
.kicker{font-size:11px;letter-spacing:.3em;text-transform:uppercase;color:var(--gold);margin-bottom:10px;font-weight:600}

/* ---------- arena ---------- */
#squadTabs{display:flex;gap:8px;margin:6px 0 22px;flex-wrap:wrap}
.squadtab{padding:7px 16px;border-radius:999px;border:1px solid var(--line);font-size:12.5px;letter-spacing:.08em;color:var(--ink-dim);text-transform:uppercase}
.squadtab.active{border-color:var(--gold-line);color:var(--gold);background:var(--gold-soft)}
#arenaGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(228px,1fr));gap:18px}
.card{position:relative;background:var(--panel);border-radius:16px;
  border:1px solid #2a2826;padding:20px 16px 16px;text-align:center;transition:transform .16s,border-color .16s;
  cursor:pointer;animation:cardIn .5s ease backwards}
.card:nth-child(n){animation-delay:calc(var(--i,0)*60ms)}
@keyframes cardIn{from{opacity:0;transform:translateY(16px) scale(.97)}to{opacity:1;transform:none}}
.card:hover{transform:translateY(-3px);border-color:var(--cc,var(--gold-line))}
.card .stat-dot{position:absolute;top:14px;right:14px;width:8px;height:8px;border-radius:50%;background:var(--ok);animation:pulse 2.4s infinite}
/* live team mode dot semantics: green pulse = ready, amber = mid-turn, grey = unreachable/unconfigured */
.card .stat-dot.run{background:var(--warn);animation:pulse 1.2s infinite}
.card .stat-dot.off{background:#5a5a52;animation:none}
.avatar{width:92px;height:92px;margin:14px auto 10px;border-radius:28px;display:flex;align-items:center;justify-content:center;
  font-family:var(--serif);font-size:38px;font-weight:600;color:#141414;position:relative;
  background:linear-gradient(135deg,var(--cc,var(--gold)),color-mix(in srgb,var(--cc,var(--gold)) 55%, #1A1A1A));
  box-shadow:0 10px 26px -10px rgba(0,0,0,.7);transition:transform .25s}
.card:hover .avatar{transform:scale(1.07) rotate(-2deg)}
.avatar .emo{position:absolute;bottom:-7px;right:-7px;font-size:22px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.5))}
.card h3{font-size:22px;font-weight:600;letter-spacing:.02em}
.card .role{font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--cc,var(--gold));margin-top:2px;font-weight:600}
.card .tag{font-size:12.5px;color:var(--ink-dim);margin-top:7px;min-height:34px;line-height:1.45}
.statbars{margin-top:12px;display:flex;flex-direction:column;gap:6px;text-align:left}
.recentline{text-align:left}
.recentline span:last-child{display:block;font-size:12.5px;color:var(--ink-dim);line-height:1.45}
.sb{display:grid;grid-template-columns:100px 1fr 24px;gap:8px;align-items:center;font-size:9px;letter-spacing:.02em;color:var(--ink-dim);text-transform:uppercase}
.sb>span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sb .bar{height:6px;border-radius:4px;background:#100f0e;overflow:hidden;box-shadow:inset 0 1px 2px rgba(0,0,0,.6)}
.sb .fill{display:block;height:100%;border-radius:4px;background:var(--cc,var(--gold));width:var(--w,0);transition:width .8s cubic-bezier(.2,.8,.2,1)}
.sb .num{text-align:right;color:var(--ink);font-weight:600}
.sb.low{color:var(--ink-faint)}
.sb.low .fill{background:#5a544b}
.sb.low .num{color:var(--ink-faint)}
.card .talk{margin-top:13px;width:100%;padding:9px;border-radius:10px;border:1px solid var(--cc,var(--gold-line));
  color:var(--cc,var(--gold));font-size:12px;letter-spacing:.14em;text-transform:uppercase;font-weight:600;transition:all .2s}
.card .talk:hover{background:var(--cc,var(--gold));color:#141414}
.card.human .avatar{border-radius:50%}

/* ---------- declutter player card (approved direction) ---------- */
.card.decl{padding:18px 16px 15px;text-align:center}
.card.decl .cls{position:absolute;top:0;left:16px;transform:translateY(-50%);font-size:9px;letter-spacing:.18em;text-transform:uppercase;
  color:var(--cc,var(--gold));background:var(--bg);border:1px solid color-mix(in srgb,var(--cc,var(--gold)) 32%,transparent);border-radius:6px;padding:3px 8px}
.bav{position:relative;width:78px;height:78px;margin:12px auto 8px;border-radius:22px;display:grid;place-items:center;
  font-family:var(--serif);font-size:34px;color:#151513;font-weight:600;
  background:linear-gradient(135deg,var(--cc,var(--gold)),#1a1917)}
.bav.photo{background-size:cover;background-position:center;color:transparent}
.bav .cam{position:absolute;right:-4px;bottom:-4px;width:24px;height:24px;border-radius:50%;background:#141312;border:1px solid var(--gold-line);
  display:grid;place-items:center;font-size:11px;color:var(--gold);cursor:pointer;z-index:3}
.bav .cam:hover{border-color:var(--gold);color:#f0dca2}
.bav .cam.x{right:auto;left:-4px;color:var(--ink-faint);font-size:11px}
.bav .cam.x:hover{border-color:var(--bad);color:var(--bad)}
.card.human .bav{border-radius:50%}
.card.decl h3{font-size:19px;margin-top:2px}
.card.decl .role{margin-top:3px}
.seclab{font-size:8.5px;letter-spacing:.24em;text-transform:uppercase;color:var(--ink-faint);margin:13px 0 6px;display:flex;align-items:center;gap:8px;text-align:left}
.seclab::after{content:"";flex:1;height:1px;background:#2a2825}
.prof-left .bav{width:120px;height:120px;font-size:48px;border-radius:32px;margin:6px auto 10px}
.prof-left .bav .cam{width:28px;height:28px;font-size:13px}
.prof-left .seclab{max-width:230px;margin-left:auto;margin-right:auto}

/* ---------- agent modal ---------- */
.overlay{position:fixed;inset:0;background:rgba(10,10,10,.72);backdrop-filter:blur(6px);z-index:80;display:none;align-items:center;justify-content:center;padding:22px;animation:vIn .25s ease}
.overlay.on{display:flex}
/* 1 Aug (Serena: "sign in button doesnt do anything"): the private cover is fixed at
 * z-index 900, so the sign-in sheet — a generic .overlay at z-index 80 — opened BEHIND
 * it, fully invisible. The sheet the cover's own button opens must sit ABOVE the cover;
 * its backdrop only ever reveals the cover behind it, so nothing private leaks. */
#signinModal{z-index:950}
.sheet{background:var(--panel);border:1px solid var(--line);border-radius:20px;max-width:880px;width:100%;max-height:88vh;overflow:auto;position:relative;box-shadow:0 40px 90px -30px rgba(0,0,0,.9)}
/* Onboarding guided wizard (9947): real backend behind the founder-approved mockup.
 * Reuses the sheet/overlay modal shape everything else here already uses -- own class
 * prefix (ob-) so nothing collides with the rest of the arena's styling. */
.ob-rail{display:flex;align-items:flex-start;margin:4px 0 18px;padding:0 4px}
.ob-node{flex:1;display:flex;flex-direction:column;align-items:center;position:relative;cursor:pointer;background:none;border:none;padding:2px 0}
.ob-node:not(:last-child)::after{content:'';position:absolute;top:12px;left:50%;width:100%;height:2px;background:var(--line);z-index:0}
.ob-node.done:not(:last-child)::after{background:var(--ok)}
.ob-dot{width:24px;height:24px;border-radius:50%;background:var(--panel2);border:2px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:10.5px;font-weight:700;color:var(--ink-faint);z-index:1;transition:all .2s}
.ob-node.done .ob-dot{background:color-mix(in srgb,var(--ok) 22%,transparent);border-color:var(--ok);color:var(--ok)}
.ob-node.cur .ob-dot{background:var(--gold);border-color:var(--gold);color:#1A1A1A;box-shadow:0 0 0 4px var(--gold-soft);transform:scale(1.1)}
.ob-cap{font-size:11px;color:var(--ink-faint);text-transform:uppercase;letter-spacing:.1em;margin-bottom:4px}
.ob-title{font-family:var(--serif);font-size:22px;margin-bottom:14px}
.ob-guide{display:flex;gap:10px;align-items:center;margin-bottom:14px}
.ob-av{width:38px;height:38px;border-radius:50%;background:radial-gradient(circle at 32% 28%,var(--gold),#8a6f3c);display:flex;align-items:center;justify-content:center;font-family:var(--serif);font-weight:700;color:#1A1A1A;flex:0 0 auto}
.ob-bubble{position:relative;background:var(--panel2);border-radius:12px;border-top-left-radius:3px;padding:13px 15px;font-size:13.5px;line-height:1.6;margin-bottom:16px}
.ob-bubble::before{content:'';position:absolute;left:0;top:8px;bottom:8px;width:2.5px;border-radius:2px;background:var(--gold-line)}
.ob-qbox{margin-bottom:12px}
.ob-qbox label{display:block;font-size:11.5px;color:var(--ink-dim);font-weight:600;margin-bottom:6px}
.ob-qbox textarea,.ob-qbox input{width:100%;background:var(--bg);border:1px solid var(--line);border-radius:9px;padding:10px 12px;color:var(--ink);font-family:var(--sans);font-size:13px;resize:vertical}
.ob-qbox textarea{min-height:54px}
.ob-actions{display:flex;gap:10px;margin-top:6px;flex-wrap:wrap;align-items:center}
.ob-btn{padding:9px 18px;border-radius:999px;border:1px solid var(--gold-line);background:none;color:var(--gold);font-size:12px;font-weight:600;cursor:pointer}
.ob-btn.solid{background:var(--gold);color:#1A1A1A;border-color:var(--gold)}
.ob-btn.ghost{border-color:transparent;color:var(--ink-faint);font-weight:500}
.ob-agent{background:var(--panel2);border:1px solid var(--line);border-radius:11px;padding:14px 16px;margin-bottom:12px}
.ob-agent .role{font-size:10px;text-transform:uppercase;letter-spacing:.09em;color:var(--gold);margin-bottom:3px}
.ob-forkrow{display:flex;gap:10px;margin:8px 0 14px;flex-wrap:wrap}
.ob-fork{flex:1;min-width:190px;border:1px solid var(--line);border-radius:10px;padding:12px 14px;cursor:pointer;background:var(--bg)}
.ob-fork.sel{border-color:var(--gold);background:var(--gold-soft)}
.ob-fork b{font-size:13px;display:block;color:var(--ink)}
.ob-fork span{font-size:11px;color:var(--ink-faint)}
.ob-checklist{margin-top:18px;border-top:1px solid var(--line);padding-top:14px}
.ob-chkrow{display:flex;align-items:center;gap:9px;padding:6px 2px;cursor:pointer;font-size:12.5px}
.ob-chkrow .d{width:8px;height:8px;border-radius:50%;background:var(--line);flex:0 0 auto}
.ob-chkrow.done .d{background:var(--ok)}
.ob-chkrow.done{color:var(--ink-faint);text-decoration:line-through;text-decoration-color:var(--line)}
.ob-golive{text-align:center;padding:30px 10px 16px}
.ob-golive h2{font-family:var(--serif);font-size:28px;margin-bottom:8px}
.ob-golive p{color:var(--ink-dim);font-size:13.5px}
.ob-err{color:var(--bad);font-size:12px;margin-top:8px}
.ob-prompt{margin:0 0 13px;background:var(--gold-soft);border:1px solid var(--gold-line);border-radius:10px;padding:9px 12px}
.ob-prompt summary{cursor:pointer;font-size:11.5px;color:var(--gold);list-style:none;display:flex;align-items:center;gap:6px;font-weight:700;user-select:none}
.ob-prompt summary::-webkit-details-marker{display:none}
.ob-prompt summary::before{content:'\2726';font-size:9.5px}
.ob-prompt summary::after{content:'\25BE';margin-left:auto;font-size:10px;transition:transform .15s}
.ob-prompt[open] summary::after{transform:rotate(180deg)}
.ob-prompt[open] summary{margin-bottom:9px}
.ob-prompttext{background:var(--bg);border:1px solid var(--line);border-radius:9px;padding:11px 13px;font-size:12px;color:var(--ink-dim);line-height:1.6;white-space:pre-wrap}
.ob-prompt .copyrow{display:flex;justify-content:flex-end;margin-top:7px}
.ob-example{border-left:2px solid var(--gold-line);padding:2px 0 2px 13px;margin:0 0 14px}
.ob-example .lab{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--ink-faint);margin-bottom:4px;font-weight:700}
.ob-example p{font-size:12.5px;color:var(--ink-dim);line-height:1.6;font-style:italic}
.sheet .x{position:sticky;top:0;float:right;margin:14px 14px 0 0;width:34px;height:34px;border-radius:50%;border:1px solid var(--line);color:var(--ink-dim);font-size:15px;background:var(--panel);z-index:5}
/* Same cascade bug as .iconbtn above, same fix, caught by the same sweep, same re-scoping. */
@media(pointer:coarse){ body .sheet .x{width:44px;height:44px} }
.sheet .x:hover{color:var(--ink);border-color:var(--gold-line)}
.sheet-inner{padding:30px 34px 34px}
/* full-screen reading (Serena 27 Jul: "the view port may be too small at times") */
.overlay.fullscr{padding:0}
.overlay.fullscr .sheet{max-width:none!important;width:100%;height:100%;max-height:none;border-radius:0}
.profgrid{display:grid;grid-template-columns:230px 1fr;gap:28px}
@media(max-width:720px){.profgrid{grid-template-columns:1fr}}
.prof-left{text-align:center}
.prof-left .avatar{width:130px;height:130px;font-size:54px;border-radius:36px}
.quote{font-family:var(--serif);font-size:18px;font-style:italic;color:var(--gold);line-height:1.5;margin:14px 0;padding:14px;border-left:2px solid var(--gold-line);background:var(--gold-soft);border-radius:0 10px 10px 0;text-align:left}
.playrow{display:flex;gap:10px;align-items:flex-start;padding:11px 0;border-bottom:1px solid #2f2f2f;font-size:14px;line-height:1.5}
.playrow:last-child{border:none}
.playrow .pi{color:var(--gold);font-size:15px;margin-top:1px}
.sechead{font-size:11px;letter-spacing:.26em;text-transform:uppercase;color:var(--ink-dim);margin:20px 0 8px;font-weight:600}
.bigtalk{margin-top:18px;padding:13px;width:100%;border-radius:12px;background:var(--gold);color:#141414;font-size:13px;letter-spacing:.16em;text-transform:uppercase;font-weight:600;transition:transform .15s}
.bigtalk:hover{transform:translateY(-2px)}

/* ---------- ops board ---------- */
#board{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
@media(max-width:960px){#board{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){#board{grid-template-columns:1fr}
/* 12 Jul 2026 (Serena): on the phone the Review lane is the founder action queue, it reads first */
#board .col:nth-child(4){order:-1}}
.col{background:rgba(38,38,38,.55);border:1px solid var(--line);border-radius:var(--r);padding:12px;min-height:200px}
.colhead{display:flex;justify-content:space-between;align-items:center;padding:2px 6px 10px;font-size:11.5px;letter-spacing:.2em;text-transform:uppercase;color:var(--ink-dim);font-weight:600}
.colhead .cnt{background:var(--panel2);border:1px solid var(--line);border-radius:999px;padding:1px 9px;font-size:11px;color:var(--gold)}
.ticket{background:var(--panel2);border:1px solid var(--line);border-radius:11px;padding:11px 12px;margin-bottom:9px;cursor:pointer;transition:all .2s;animation:cardIn .4s ease backwards}
.ticket:hover{border-color:var(--gold-line);transform:translateX(3px)}
/* 30 Jul, TeamEA: "make each box selectable instead of a button" -- the whole tier
 * card is the click target now (renderTierGrid), not a button sitting inside it. */
.tierCard{transition:border-color .15s,transform .15s,background .15s}
.tierCard.pick:hover{border-color:var(--gold);transform:translateY(-2px);background:rgba(200,164,90,.05)}
.ticket .t-top{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:6px}
.ticket .t-id{font-size:10px;letter-spacing:.12em;color:var(--ink-faint)}
.ticket .t-title{font-size:13.5px;line-height:1.4;font-weight:400}
.ticket .t-foot{display:flex;justify-content:space-between;align-items:center;margin-top:8px}
.mini-av{width:24px;height:24px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;color:#141414;font-family:var(--serif)}
.mini-av.human{border-radius:50%} /* 2 Aug 2026: same circle-vs-box language as .card.human .bav, just missing here until now */
.chip{font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;padding:2px 8px;border-radius:999px;border:1px solid var(--line);color:var(--ink-dim)}
.chip.gold{color:var(--gold);border-color:var(--gold-line)}
.flowline{font-size:12px;color:var(--ink-dim);padding:10px 14px;border:1px dashed var(--line);border-radius:10px;margin-bottom:18px;display:flex;gap:8px;align-items:center}
.flowline .fdot{width:7px;height:7px;border-radius:50%;background:var(--gold);animation:pulse 2s infinite}
/* [9908] plain-language empty state: a genuinely empty live board (nothing populated
 * yet for a fresh client) previously fell through to the same 4-column grid everyone
 * else sees, just with "0" in every header -- reads as broken, not "nothing here yet". */
.board-empty{background:var(--panel);border:1px solid var(--line);border-radius:var(--r);padding:30px 26px;text-align:center}
.board-empty b{display:block;font-family:var(--serif);font-size:17px;font-weight:600;color:var(--ink);margin-bottom:8px}
.board-empty p{font-size:13px;color:var(--ink-dim);line-height:1.6;max-width:52ch;margin:0 auto}

/* ---------- library ---------- */
/* document-grade markdown (Serena 27 Jul round 2: researched typography — 50-75ch
 * measure, consistent vertical rhythm, GitHub-style heading/table treatment).
 * [10-feedback, 12 Aug] "Can we make popup review of documents in beige background
 * or lighter colour style rather than black?" -- .pbdoc had no background of its own,
 * so it sat directly on the dark modal chrome (.sheet, var(--panel)) -- reading a real
 * report (e.g. a growth-strategy .md) was dark text on a near-black surface. Given a
 * dedicated warm paper surface, deliberately hardcoded rather than theme-aware --
 * a document should read like paper regardless of the app's own dark UI, same
 * reasoning a PDF viewer keeps a white page inside a dark chrome. Tones pull from the
 * champagne-gold family already in the brand, not a generic grey. */
/* 6 Sep 2026, Serena, live: "the reading area doesn't use the whole space" -- true, and
 * a real gap between two separate, both-reasonable changes that never met each other. The
 * 72ch measure above is a real typography choice (comment above, 27 Jul research: wider
 * than ~75ch is genuinely harder to read, not a limitation to remove), but drillWide()
 * (1 Sep) widened the MODAL to up to 1100px for a full document read without touching
 * this box, so on a wide screen the reading column sat flush left against a large,
 * unbalanced blank gap on the right -- reading as broken, not as a considered layout.
 * Centering keeps the comfortable measure and turns the extra width into balanced margin
 * either side, the same shape a book or a magazine column uses, instead of dead space. */
.pbdoc{
  font-size:14px;line-height:1.7;color:#2a2318;max-width:72ch;margin-left:auto;margin-right:auto;
  background:#f6f0e2;border:1px solid rgba(42,35,24,.10);border-radius:12px;
  padding:22px 26px;
}
.pbdoc>*:first-child{margin-top:0!important}
.pbdoc h2,.pbdoc h3,.pbdoc h4{font-weight:600;line-height:1.3;margin:1.5em 0 .5em;color:#2a2318}
.pbdoc h2{font-size:20px;padding-bottom:.3em;border-bottom:1px solid rgba(42,35,24,.14)}
.pbdoc h3{font-size:16.5px}
.pbdoc h4{font-size:13.5px;color:#8a6423;letter-spacing:.04em}
.pbdoc p{margin:0 0 .9em}
.pbdoc ul,.pbdoc ol{margin:0 0 .9em;padding-left:1.6em}
.pbdoc li{margin:.3em 0}
.pbdoc li>ul,.pbdoc li>ol,.pbdoc ul ul,.pbdoc ol ul,.pbdoc ol ol,.pbdoc ul ol{margin:.3em 0}
.pbdoc hr{border:0;height:1px;background:rgba(42,35,24,.14);margin:1.5em 0}
.pbdoc pre{background:#ece4d1;border:1px solid rgba(42,35,24,.10);border-radius:8px;padding:12px;overflow:auto;font-size:12px;margin:0 0 1em;color:#2a2318}
.pbdoc code{background:#ece4d1;border-radius:4px;padding:1px 5px;font-size:12.5px;color:#2a2318}
.pbdoc blockquote{border-left:2px solid #b99752;margin:0 0 .9em;padding:4px 12px;color:#6b6152}
.pbdoc a{color:#8a6423}
.pbdoc i{color:#6b6152}
.pbdoc table{border-collapse:collapse;margin:0 0 1em;display:block;overflow-x:auto;max-width:100%;font-size:12.5px}
.pbdoc th,.pbdoc td{border:1px solid rgba(42,35,24,.14);padding:6px 11px;text-align:left;vertical-align:top}
.pbdoc th{font-weight:600;background:#ece4d1}
.pbdoc tr:nth-child(even) td{background:rgba(42,35,24,.03)}
.shelf{margin-bottom:30px}
.shelfhead{display:flex;align-items:baseline;gap:12px;margin-bottom:12px}
.shelfhead h3{font-size:24px;font-weight:600}
.shelfhead span{font-size:12px;color:var(--ink-dim);letter-spacing:.1em}
/* Bets tracker cards (3 Aug 2026, 9950 -- Serena's own internal 0-Ops/bets-tracker.html
 * restyle, ported into renderBets() below). */
.betc{background:var(--panel);border:1px solid var(--line);border-radius:var(--r);padding:16px 16px 14px}
.betc.hl{border-color:var(--gold-line);box-shadow:0 0 0 1px var(--gold-soft)}
.betc-hd{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:6px}
.betc-badge{font-family:var(--serif);font-weight:700;font-size:13px;background:var(--panel2);color:var(--gold);border:1px solid var(--gold-line);border-radius:6px;padding:2px 9px}
.betc-name{font-size:18px;line-height:1.3;color:var(--ink)}
.betc-stage{font-size:11px;border-radius:999px;padding:2px 10px;background:var(--panel2);color:var(--ink-dim);border:1px solid var(--line);margin-left:auto}
.betc-goal{font-size:12.5px;color:var(--ink-dim);margin:4px 0 10px;line-height:1.5}
.betc-day{display:flex;align-items:baseline;gap:10px;margin:4px 0 12px}
.betc-daynum{font-family:var(--serif);font-weight:700;font-size:40px;line-height:.9;color:var(--gold)}
.betc-daynum .betc-u{font-size:13px;color:var(--ink-faint);margin-left:3px}
.betc-dayidle{font-family:var(--serif);font-weight:700;font-size:26px;line-height:1;color:var(--ink-faint)}
.betc-daylabel{font-size:11px;color:var(--ink-dim);line-height:1.4}
.betc-daylabel b{color:var(--ink)}
.betc-tbox{color:var(--gold);font-weight:600}
.betc-hypo{font-size:12px;color:var(--ink-dim);background:var(--panel2);border:1px solid var(--line);border-radius:8px;padding:8px 11px;margin-bottom:8px;line-height:1.5}
.betc-lab{font-weight:700;color:var(--gold);text-transform:uppercase;font-size:10px;letter-spacing:.05em;margin-right:6px}
.betc-crit{border:1px solid var(--line);background:var(--panel2);border-radius:8px;padding:7px 11px;margin-bottom:10px}
.betc-crit summary{cursor:pointer;font-weight:700;color:var(--gold);text-transform:uppercase;font-size:10px;letter-spacing:.05em;list-style:none}
.betc-crit summary::-webkit-details-marker{display:none}
.betc-crit summary::before{content:'\25B8  ';color:var(--gold)}
.betc-crit[open] summary::before{content:'\25BE  '}
.betc-critlist{margin:8px 0 2px;padding-left:18px;font-size:12px;color:var(--ink-dim)}
.betc-critlist li{margin:3px 0;line-height:1.45}
.betc-move{background:var(--gold-soft);border:1px solid var(--gold-line);border-radius:8px;padding:9px 12px;margin-bottom:12px;font-size:12.5px;line-height:1.5;color:var(--ink)}
.betc-movelist{margin:6px 0 0;padding-left:18px}
.betc-movelist li{margin:3px 0;line-height:1.5}
.betc-crew{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.betc-crewchip{display:inline-flex;align-items:center}
.betc-progress{display:flex;gap:16px;flex-wrap:wrap;border:1px solid var(--line);background:var(--panel2);border-radius:8px;padding:10px 12px 11px;margin-bottom:10px}
.betc-ev{flex:1 1 220px;min-width:200px}
.betc-evlist{margin:6px 0 0;padding-left:16px;font-size:11.5px;color:var(--ink-dim)}
.betc-evlist li{margin:3px 0;line-height:1.4}
.betc-evtag{font-size:9.5px;color:var(--ink-faint);text-transform:uppercase;letter-spacing:.03em;margin-left:3px}
.betc-evsum{font-size:11px;color:var(--ink-faint);margin-top:5px}
.betc-gauge{flex:1 1 180px;min-width:170px}
.betc-gaugebar{display:flex;gap:3px;margin:8px 0 6px}
.betc-gseg{flex:1;height:6px;border-radius:3px;background:var(--line)}
.betc-gseg.on{background:var(--gold)}
.betc-gaugelabel{font-size:13px;color:var(--ink);font-weight:600}
.betc-gaugepct{font-size:11px;color:var(--ink-faint);font-weight:400;margin-left:4px}
.betc-ovbadge{font-size:9px;text-transform:uppercase;letter-spacing:.03em;color:var(--gold);border:1px solid var(--gold-line);border-radius:999px;padding:1px 6px;margin-left:5px}
.betc-ovreason{font-size:11px;color:var(--ink-dim);margin-top:4px;font-style:italic}
.betc-computednote{font-size:10.5px;color:var(--ink-faint);margin-top:4px}
.betc-money{flex:1 1 150px;min-width:140px}
.betc-moneyfig{font-family:var(--serif);font-weight:700;font-size:22px;color:var(--gold);margin:6px 0 2px}
.betc-moneynote{font-size:11px;color:var(--ink-dim);line-height:1.4}
.betc-moneycaveat{font-size:10px;color:var(--ink-faint);margin-top:5px;line-height:1.4}
@media(max-width:640px){.betc-daynum{font-size:32px}}
.docrow{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}
.doc{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px 15px;cursor:pointer;transition:all .2s;position:relative;overflow:hidden}
.doc::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--dc,var(--gold));opacity:.7}
.doc:hover{border-color:var(--gold-line);transform:translateY(-3px)}
.doc .d-type{font-size:9.5px;letter-spacing:.2em;text-transform:uppercase;color:var(--dc,var(--gold));font-weight:600}
.doc h4{font-size:14.5px;font-weight:400;margin:5px 0 4px;line-height:1.35;font-family:var(--sans)}
.doc p{font-size:12px;color:var(--ink-dim);line-height:1.45}

/* ---------- gallery ---------- */
#galStage{position:relative;height:430px;perspective:1400px;margin:10px 0 8px}
.galItem{position:absolute;top:0;left:50%;width:min(560px,86vw);height:400px;margin-left:calc(min(560px,86vw)/-2);
  transition:transform .7s cubic-bezier(.25,.8,.25,1),opacity .7s,filter .7s;border-radius:16px;overflow:hidden;
  border:1px solid var(--line);background:var(--panel);cursor:pointer;box-shadow:0 30px 70px -30px rgba(0,0,0,.9)}
.galItem .g-head{padding:13px 18px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;background:var(--panel2)}
.galItem .g-type{font-size:10px;letter-spacing:.22em;text-transform:uppercase;color:var(--gold);font-weight:600}
.galItem .g-agent{font-size:11px;color:var(--ink-dim)}
.galItem .g-body{padding:20px 22px;height:calc(100% - 49px);overflow:hidden}
.galNav{display:flex;gap:14px;justify-content:center;align-items:center;margin-top:10px}
.galNav button{width:40px;height:40px;border-radius:50%;border:1px solid var(--line);color:var(--ink-dim);font-size:16px;transition:all .2s}
.galNav button:hover{border-color:var(--gold-line);color:var(--gold)}
.galdots{display:flex;gap:6px}
.gdot{width:7px;height:7px;border-radius:50%;background:var(--line);cursor:pointer;transition:all .2s}
.gdot.on{background:var(--gold);transform:scale(1.3)}
/* mock site inside gallery */
.mock-site{font-size:11px}
.mock-hero{background:linear-gradient(135deg,#242018,#1c1c1c);border:1px solid var(--line);border-radius:10px;padding:22px 18px;text-align:center;margin-bottom:10px}
.mock-hero h4{font-family:var(--serif);font-size:22px;color:var(--gold);font-weight:600}
.mock-hero p{color:var(--ink-dim);margin-top:5px;font-size:11.5px}
.mock-cols{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.mock-cols div{background:var(--panel2);border:1px solid var(--line);border-radius:8px;padding:10px;color:var(--ink-dim);line-height:1.4}
.mock-live{display:inline-block;margin-top:11px;font-size:11.5px;font-weight:600;letter-spacing:.02em;color:var(--gold);text-decoration:none;border-bottom:1px solid rgba(201,164,96,.4);padding-bottom:1px;transition:border-color .15s}
.mock-live:hover{border-bottom-color:var(--gold)}
.mock-post{background:var(--panel2);border:1px solid var(--line);border-radius:12px;padding:16px;max-width:400px;margin:0 auto}
.mock-post .mp-head{display:flex;gap:10px;align-items:center;margin-bottom:10px}
.mock-post .mp-body{font-size:13px;line-height:1.6;color:var(--ink)}
.mock-doc{font-size:12.5px;line-height:1.7;color:var(--ink-dim)}
.mock-doc h4{font-family:var(--serif);color:var(--ink);font-size:18px;margin-bottom:8px}
.mock-doc .hl{color:var(--gold)}

/* ---------- routines ---------- */
#dayline{position:relative;margin:30px 0 0;padding-left:26px}
#dayline::before{content:"";position:absolute;left:8px;top:6px;bottom:6px;width:2px;background:linear-gradient(var(--gold-line),var(--line))}
.rt{position:relative;padding:0 0 26px 18px;animation:cardIn .5s ease backwards}
.rt::before{content:"";position:absolute;left:-24px;top:4px;width:14px;height:14px;border-radius:50%;background:var(--panel);border:2px solid var(--gold);z-index:2}
.rt .rt-time{font-size:11px;letter-spacing:.22em;color:var(--gold);text-transform:uppercase;font-weight:600}
.rt h4{font-family:var(--serif);font-size:21px;font-weight:600;margin:3px 0 5px}
.rt p{font-size:14px;color:var(--ink-dim);line-height:1.6;max-width:640px}
.rt .rt-who{display:flex;gap:6px;margin-top:8px}

/* ---------- comms ---------- */
/* Roster narrowed, message cap widened (6 Sep 2026, TeamEA: "make sure we have the agent
 * responses box expand a bit more real estate to the right"). The roster only ever shows a
 * name, a role and a status dot, it never needed 250/300px; giving 30px back to the pane the
 * responses actually live in, and letting a response itself run wider before wrapping, is what
 * "more real estate" reads as here -- not the page's own outer max-width, which few screens
 * ever reach anyway (#v-comms is centered at max-width:1800px). */
#commsWrap{display:grid;grid-template-columns:220px 1fr;gap:18px;height:calc(100vh - 250px);min-height:480px}
/* the hidden #v-comms header above reclaims real vertical space -- give it back to
   the chat pane instead of leaving it as unused padding under the old, taller header.
   Same #commsWrap selector (not #v-comms #commsWrap) so specificity matches the line
   above and the @media rules below -- source order alone decides the winner, same as
   before this override, so phone breakpoints still apply their own height correctly. */
#commsWrap{height:calc(100vh - 110px)}
/* ---------- reading panel (10200) ----------
 * Serena, 7 Sep 2026: "it will be good to have the article reading panel side by side to the
 * chat (like claude) rather than overlay option." A third column that exists only while a
 * document is open.
 *
 * What gives way, and in what order, is the actual design decision here. Below about 1200px
 * three columns leaves the chat too narrow to be worth having, so the ROSTER yields first: it
 * is a picker you use between conversations, not something you read, and it comes straight
 * back when the reader closes. The chat never drops below a readable width, because a reader
 * that squeezes the conversation out of usefulness has just reinvented the overlay it
 * replaced. Below 820px there is no room for two panes at all and the overlay stays the
 * honest answer; the JS routes there instead of rendering this. */
#readPane{display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--panel);border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
#readPane[hidden]{display:none}
#commsWrap.reading{grid-template-columns:220px minmax(360px,1fr) minmax(340px,40%)}
@media(min-width:1400px){ #commsWrap.reading{grid-template-columns:260px minmax(420px,1fr) minmax(420px,42%)} }
@media(max-width:1200px){
  /* the roster steps aside rather than the conversation getting squeezed */
  #commsWrap.reading{grid-template-columns:minmax(320px,1fr) minmax(320px,46%)}
  #commsWrap.reading #roster{display:none}
}
#readPaneHead{display:flex;align-items:center;gap:8px;padding:10px 10px 10px 14px;border-bottom:1px solid var(--line);flex:0 0 auto}
#readPaneTitle{flex:1;min-width:0;font-size:14.5px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rp-x{width:30px;height:30px;flex:0 0 auto;border-radius:50%;border:1px solid var(--line);background:var(--panel);color:var(--ink-dim);font-size:13px;cursor:pointer;display:flex;align-items:center;justify-content:center}
.rp-x:hover{color:var(--ink);border-color:var(--gold-line)}
#readPaneBody{flex:1;min-height:0;overflow:auto;padding:16px 18px 22px}
/* The document surface IS the panel here, not a card floating inside one. Serena's adjacent
 * 7 Sep note ("rather than restricted in a panel within a panel") is about the modal, but the
 * same reasoning applies harder in a narrow column: a second border inside this one would eat
 * the width the panel exists to give back.
 *
 * So the PAPER FILLS THE PANEL and .pbdoc drops its own chrome, rather than the other way
 * round. Deleting the beige instead would have regressed the 12 Aug ask ("can we make popup
 * review of documents in beige background or lighter colour style rather than black") -- the
 * beige was never the problem, the nested frame around it was. Applied as a class the renderer
 * sets, because this panel also shows images, PDFs and sandboxed HTML, and paper behind an
 * iframe is just a coloured margin. */
#readPaneBody.paper{background:#f6f0e2;color:#2a2318}
/* [10202] Web-page mode: an external page embedded in the Reader. Not paper -- paper is for
 * documents we render ourselves, and a beige margin around someone else's website is just a
 * coloured frame. The body becomes a column so the origin bar and note sit above a frame that
 * takes the rest of the height. */
#readPaneBody.webpage{display:flex;flex-direction:column;padding:0;background:var(--panel)}
.rp-origin{display:flex;align-items:center;gap:8px;flex:0 0 auto;padding:9px 12px;border-bottom:1px solid var(--line);font-size:12px;color:var(--ink-dim);background:var(--panel2)}
.rp-lock{flex:0 0 auto;font-size:11px}
/* The host, not the full url: it is the part that answers "whose page am I looking at", which
 * is the question that matters when a page renders inside our own chrome. Full url on hover. */
.rp-host{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink);font-weight:600}
.rp-tab{flex:0 0 auto;color:var(--gold);text-decoration:none;font-size:11.5px;border:1px solid var(--gold-line);border-radius:999px;padding:3px 10px}
.rp-tab:hover{background:var(--gold-soft)}
.rp-note{flex:0 0 auto;padding:8px 12px;font-size:11.5px;color:var(--ink-faint);border-bottom:1px solid var(--line);line-height:1.5}
.rp-frame{flex:1;min-height:0;width:100%;border:0;background:#fff}
/* A link inside a chat bubble. Full url as the text, so anyone can see where it goes before
 * opening it; wraps rather than stretching the bubble. */
.chatlink{color:var(--gold);text-decoration:underline;text-underline-offset:2px;word-break:break-word}
.chatlink:hover{color:var(--ink)}
/* [10208] Jump strip for a long read. Sticky at the top of the paper, because six page-long
 * specialist answers is about seven screens and a strip that scrolls away helps nobody. */
.rp-jumps{position:sticky;top:-16px;z-index:2;display:flex;flex-wrap:wrap;gap:6px;margin:-16px -18px 14px;padding:12px 18px;background:#f6f0e2;border-bottom:1px solid rgba(42,35,24,.12)}
.rp-jump{font:inherit;font-size:11.5px;line-height:1;padding:5px 10px;border-radius:999px;border:1px solid rgba(42,35,24,.18);background:transparent;color:#5b5245;cursor:pointer}
.rp-jump:hover{border-color:rgba(42,35,24,.4);color:#2a2318}
.rp-jump.on{background:#2a2318;border-color:#2a2318;color:#f6f0e2}
#readPaneBody.paper .pbdoc{border:none;border-radius:0;background:transparent;padding:0;max-width:70ch}
@media(max-width:820px){
  /* phone: roster collapses to a horizontal strip, the chat pane owns the height and the composer pins to its bottom */
  #commsWrap{display:flex;flex-direction:column;gap:10px;height:calc(100vh - 200px);height:calc(100dvh - 200px);min-height:420px}
  #roster{display:flex;flex-direction:row;gap:6px;overflow-x:auto;overflow-y:hidden;flex:0 0 auto;padding:8px}
  #roster>.rrole{display:none}
  .rosteritem{flex:0 0 auto}
  #chatPane{flex:1;min-height:0}
  /* composer breathes on the phone: the text box owns the row (attach + input + send only),
     the char counter hides, and 16px input font stops iOS zooming the page on focus */
  #charCnt{display:none}
  #chatBar{gap:6px;padding:6px 8px}
  #chatBar .iconbtn{width:44px;height:44px;min-width:44px;flex:0 0 auto}
  /* 12 Jul 2026 (Serena): composer owns the phone; who-to-chat moved off the strip into the avatar hamburger */
  #chatInput{min-height:64px;font-size:16px}
  #roster{display:none}
  #commsWrap{height:calc(100vh - 150px);height:calc(100dvh - 150px)}
}
/* Wide desktop: the rail earns a little more room once there is plenty to spare
 * (measured 4 Sep 2026 at 1900px -- a 250px rail leaves the name/role column just
 * 180px, so a real client role line like "Accountant & Financial Strategist", or a
 * human teammate's "Teammate / no agent between you", wrapped to two lines while
 * 1500px of chat pane sat empty beside it). 300px gives the column 211px, one line
 * for both, and costs the conversation 50px it was not using. Below 1400px the rail
 * keeps its 250px so laptop widths lose nothing. */
@media(min-width:1400px){ #commsWrap{grid-template-columns:260px 1fr} }
#roster{background:var(--panel);border:1px solid var(--line);border-radius:var(--r);padding:12px;overflow:auto;overscroll-behavior:contain}
.rosteritem{display:flex;gap:10px;align-items:center;padding:9px 10px;border-radius:10px;cursor:pointer;transition:background .15s;border:1px solid transparent}
.rosteritem:hover{background:var(--panel2)}
.rosteritem.active{background:var(--gold-soft);border-color:var(--gold-line)}
.rosteritem .rname{font-size:14px}
.rosteritem .rrole{font-size:10.5px;color:var(--ink-dim);letter-spacing:.06em;text-transform:uppercase}
/* [10-feedback, 12 Aug] "which one is ready or pending for my action" -- a small,
 * unmissable pill for a teammate whose turn is paused on an approval or a question,
 * pinned to the row's right edge by the parent's own flex layout. --warn (amber), not
 * --bad -- this is "waiting for a normal decision", not an error state. */
.rosteritem .needs-you{margin-left:auto;flex:none;font-size:9.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--warn);border:1px solid var(--warn);border-radius:999px;padding:2px 8px;white-space:nowrap}
#chatPane{display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;position:relative;scroll-margin-top:72px}
#chatHead{display:flex;align-items:center;gap:12px;padding:13px 16px;border-bottom:1px solid var(--line);background:var(--panel2)}
#chatHeadInner{display:flex;align-items:center;gap:12px;flex:1;min-width:0}
#chatHead .ch-name{font-family:var(--serif);font-size:19px;font-weight:600}
#chatHead .ch-sub{font-size:11px;color:var(--ink-dim);letter-spacing:.08em}
#outPill{display:none;border:1px solid rgba(201,164,96,.45);background:none;color:var(--gold);border-radius:999px;padding:5px 12px;font-size:11px;letter-spacing:.06em;cursor:pointer;white-space:nowrap}
/* Try-free pill (H016 arena lane 2, 20 Jul): public demo only, routes to intake, no self-serve minting */
#tryPill{border:1px solid var(--gold);background:var(--gold);color:#141414;border-radius:999px;padding:5px 12px;font-size:11px;font-weight:600;letter-spacing:.06em;cursor:pointer;white-space:nowrap}
#tryPill:hover{filter:brightness(1.08)}
#outPill.on{display:inline-block}
#outPill:hover{background:rgba(201,164,96,.12)}
.ovwrap{position:fixed;inset:0;z-index:300;background:rgba(10,10,10,.94);display:flex;flex-direction:column;padding:14px;gap:10px}
.ovbar{display:flex;align-items:center;gap:10px;color:var(--ink-dim);font-size:12px}
.ovbar .ovx{margin-left:auto;border:1px solid var(--line);background:none;color:var(--ink-dim);border-radius:8px;padding:6px 14px;cursor:pointer}
.ovtitle{color:var(--ink);font-family:var(--serif);font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:52vw}
.ovgrid{flex:1;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px;align-content:start}
.ovcard{display:flex;gap:10px;align-items:center;background:var(--panel2);border:1px solid var(--line);border-radius:12px;padding:10px;cursor:pointer;min-height:64px}
.ovcard:hover{border-color:var(--gold)}
.ovic{width:46px;height:46px;flex:none;display:flex;align-items:center;justify-content:center;font-size:22px;background:rgba(255,255,255,.05);border-radius:8px;overflow:hidden}
.ovic img{width:100%;height:100%;object-fit:cover}
.ovnm{color:var(--ink);font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ovsub{color:var(--ink-dim);font-size:11px;margin-top:2px}
.ovbody{flex:1;display:flex;overflow:auto;background:var(--panel2);border:1px solid var(--line);border-radius:10px}
.ovmd{padding:14px 18px;font-size:13.5px;line-height:1.6;color:var(--ink);overflow:auto;width:100%;white-space:pre-wrap}
.ovpre{margin:0;padding:14px 16px;font-size:12px;white-space:pre-wrap;word-break:break-word;color:var(--ink);overflow:auto;width:100%}
.ovnote{color:var(--ink-dim);font-size:12.5px;margin:auto;text-align:center;display:flex;flex-direction:column;align-items:center;gap:10px}
#chRight{margin-left:auto;display:flex;gap:8px;align-items:center}
#modelWrap{position:relative;display:inline-flex}
#modelGear,#attachTop{width:36px;height:36px}
/* 6 Sep 2026: a THIRD rule in this same cascade bug, found after the .iconbtn/.sheet .x fix
 * above still left #modelGear at 36x36 on mobile -- an ID selector beats any number of
 * classes, so neither the @media(pointer:coarse) .iconbtn override nor "body .iconbtn" could
 * ever reach these two. Adding "body" in front keeps the ID (so it still wins the cascade the
 * same way) while adding one more specificity point over the bare ID rule above; scoped to
 * touch devices only, same as the two fixes above, so desktop's smaller icon is untouched. */
@media(pointer:coarse){ body #modelGear,body #attachTop{width:44px;height:44px} }
#modelPop{display:none;position:absolute;right:0;top:42px;z-index:60;background:var(--panel2);border:1px solid var(--line);border-radius:10px;padding:10px;box-shadow:0 10px 30px rgba(0,0,0,.5)}
#modelPop.on{display:block}
#modelMenu{display:flex;flex-direction:column;gap:2px;max-height:50vh;overflow:auto;min-width:220px}
.mm-row{text-align:left;padding:9px 12px;border-radius:8px;background:none;border:1px solid transparent;color:var(--ink);font-size:12.5px;cursor:pointer;white-space:nowrap}
.mm-row:hover{background:var(--panel)}
.mm-row.on{border-color:var(--gold-line);background:var(--gold-soft);color:var(--gold)}
#sendStack{display:flex;flex-direction:column;gap:6px;align-self:flex-end}
#modelSel{font-size:12px;width:220px;max-width:70vw}
#avWrap{position:relative;display:inline-flex;cursor:pointer;flex:none}
#rosterBurger{position:absolute;right:-7px;bottom:-7px;width:18px;height:18px;border-radius:6px;background:var(--panel);border:1px solid var(--gold-line);color:var(--gold);font-size:10px;display:flex;align-items:center;justify-content:center;pointer-events:none}
#rosterSheet{display:none;position:absolute;top:62px;left:10px;right:10px;bottom:80px;z-index:50;background:var(--panel);border:1px solid var(--line);border-radius:12px;overflow:auto;padding:10px;box-shadow:0 14px 40px rgba(0,0,0,.55)}
#rosterSheet.on{display:block}
#chatLog{flex:1;overflow-y:auto;padding:12px 14px;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain}
.msg{max-width:78%;padding:11px 14px;border-radius:14px;font-size:14px;line-height:1.55;animation:cardIn .3s ease;white-space:pre-wrap;word-wrap:break-word}
.msg.user{align-self:flex-end;background:var(--gold-soft);border:1px solid var(--gold-line);border-bottom-right-radius:4px}
.msg.agent{align-self:flex-start;background:var(--panel2);border:1px solid var(--line);border-bottom-left-radius:4px;
  /* 6 Sep 2026, TeamEA: "i mean the agent's speech bubble's real estate" -- specifically the
   * reply, not the human's own line, so this widens .msg.agent past the shared .msg cap
   * rather than raising it for both sides. */
  max-width:94%}
.msg .m-who{font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;margin-bottom:5px;font-weight:600;color:var(--mc,var(--gold));display:flex;align-items:center;gap:7px}
/* the signed-in human's avatar: photo-able like the agent cards, tap to add or change */
.uav{position:relative;display:inline-flex;width:24px;height:24px;border-radius:8px;background:#26241f;color:var(--gold);align-items:center;justify-content:center;font-size:10.5px;letter-spacing:0;background-size:cover;background-position:center;cursor:pointer;border:1px solid var(--gold-line);flex:none}
.uav.photo{color:transparent}
.uav .ux{position:absolute;top:-7px;right:-7px;width:15px;height:15px;border-radius:50%;background:#141414;color:#999;font-size:9px;display:none;align-items:center;justify-content:center;border:1px solid var(--line);letter-spacing:0}
.uav:hover .ux{display:flex}
#whoChip .uav{width:16px;height:16px;border-radius:50%;font-size:8.5px;margin-right:5px;cursor:pointer;vertical-align:middle;border:none}
.msg.sys{align-self:center;background:none;border:1px dashed var(--line);color:var(--ink-dim);font-size:12.5px;max-width:90%;text-align:center}
.daychip{align-self:center;font-size:11px;color:var(--ink-dim);border:1px solid var(--line);border-radius:999px;padding:2px 12px;background:var(--panel2)}
@keyframes aprPulse{50%{box-shadow:0 0 0 8px rgba(201,106,96,.22)}}
.apr-arrive{animation:cardIn .3s ease,aprPulse 1.1s ease .3s 2}
#jumpDown{position:absolute;right:14px;bottom:84px;display:none;align-items:center;gap:6px;background:var(--panel2);border:1px solid var(--gold-line);color:var(--gold);border-radius:999px;padding:8px 14px;font-size:12px;z-index:6;box-shadow:0 8px 20px rgba(0,0,0,.45)}
#jumpDown.on{display:flex}
/* WhatsApp/Slack-style: group consecutive same-sender bubbles, subtle time + delivery ticks */
.msg.grouped{margin-top:-8px;border-top-left-radius:6px;border-top-right-radius:6px}
.msg .m-meta{display:flex;gap:5px;align-items:center;justify-content:flex-end;margin-top:4px;font-size:9.5px;color:var(--ink-faint);letter-spacing:.06em;line-height:1}
.msg.agent .m-meta{justify-content:flex-start}
.msg .ticks{font-weight:600;letter-spacing:-2px;color:var(--ink-faint);transition:color .2s}
.msg .ticks.read{color:var(--info)}
/* [10195 follow-up, 7 Sep 2026] replaces the old anonymous three-dot ".typing" bubble --
 * Serena live: "we are not sure what's happening .. it's like lagging". Names the agent
 * ("AgentName · Taking in...") instead of showing unattributed dots; the pulse keeps the
 * same "still alive" cue the dots gave, just on real text now. */
.typing-name{font-size:13px;color:var(--ink-dim);animation:tp 1.4s infinite}
@keyframes tp{0%,60%,100%{opacity:.4;transform:none}30%{opacity:1;transform:none}}
/* collapsed activity group (Cowork-style): ONE card per running live turn, tool + narration lines folded inside */
.actg{align-self:flex-start;max-width:82%;min-width:200px;background:var(--panel2);border:1px solid var(--line);border-radius:12px;padding:9px 13px;animation:cardIn .3s ease;font-size:12.5px;color:var(--ink-dim)}
.actg .ag-head{display:flex;gap:9px;align-items:center;cursor:pointer;min-height:24px}
.actg .ag-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ag-spin{position:relative;width:22px;height:22px;flex:0 0 auto;border-radius:50%;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAfCAYAAACyLw6QAAAKsUlEQVR42s1Z7XOU13X/nXvv8zyrlxV6AYuAZWMcNCAWIYEshKDMKLFerDANSWp1ks40k69pP7Uz7ceV2n+gnzr1dCbTTmba6ZJpjRMvWoS7GLCEpBUS0gphGSNwggUSAqGV9uXZ597TD6uNVSzAyHLT++157uvvnHvO+Z1zCZvcmJmIiAEgFn1va4HfeV275lUoKmZmYUvL02SIPS2NgScEPZBEt5Mic6uh4Y+TT67xdRt9E8AmhnqrDLheQG5h5mVA3NPGm5VwU65FiRJPKU9REWdlcZa4SkmqhGFbQ/8ukXWHjh8/ldgskLSZ4OKhkE27tnzXMO0kSTdsLzte3dS5BABTl9/17zt+KjE2+H61cHm+9o9OPor395YHmjse5oXCBocN4Vsgc6WusXOUGUS5E/IfDGAwGBQ9PT3m+mBfhSHzIxb8ecIt+aC5uTk1caX3YJZF0lg0p7Jux5bthWeW5zJvGjZjwoOjpah7lHbOVBS4B10lbjY0tD6eGOqtAlGbgHiw/43WMwCIGSDaGEjaDM2Nj5+vJNf8WBvvw7rGztHRwfAPbM9czSpyBFBSe+R7sf7+3vKjRwcWiXoMAMxEo75FLPq0v2rF8uYO82M5IcqylQpW4X+833/97ZPNPyRBBfsPt/1yM23yhcABoOkr4ZL4cOSvxgb7qvP/r8XOHhoYOFP5nLlfauMDZyqnLr/rz39PxnpPxWN9f5abExT/pwCDwdyGE7HIz8eGwvUAEAqF5NOArAfqaUBz15IFAMRjkZ9OXOltAQAOfvMgiZkpGo0qABgf7m2djJ3rAgBeA46ZKa/hF7sVoGAwKPLzg8GgiMXesSaGI3/z6fj5yrWC3dSruN6i/f39BfHhc38Zj4fs9fqfoZ0XviXXYn0H4oO9P9ns9f9Xi8ViVry/t3xqNLpr+ur5mtHof5VOT4edZ83p7w8VfNWD5MeND/Xt/nj0/M4nQYyNRYrygn2Rc6vnDZgcOLdHC9STeeiAzAxrnWRHpUpRmn6tuiWznoebmYn63EVd4Wa9t4noH77ybYnFrLh58EM3gz4Ad9HdTTmcLIho5fpQJGB46SiAfx4fOF9Ze/TN+xsCmJfc9eFzHYB3T7BYMlqNHjjaef/LYYa+CPTxkJ1O7+bU/MK3PaZ2Bi/EYu8VFqXL5d5jnyeJuvR6nhgAiMhcj509QCRum2z2s1xfN9AD4PRpAoCsQatUcng6HHZcZI/094f6Cgu3CNwHHtmf65aWn6WfxLKuwRIRExGz5E/2N3aOklQra6UVCoVk3m0TgYmIZ2aiPuGWHnV4/pgGTgD6ZRg8tLRoMFaycfJqyWtP2vPqPoaITLy/t5y1LGNgdlkm07m+HgOAqKtLx+MhW0hYjqNUuoK+b6TY7rf8R/RKpklWyMYSe1vjdPjLJvNc+xiLRIqE3xy1bd9Y2rjbVaF9OxBoWf59/1Ak4LOxsreufWZVK2JipPctMvToQGNHf/4fEZknCcLYR5GXpI09Wy2MLTD2cNa3wJyprD3SFrt6NbxNCEl1de1z09NhJ5FQFT7mqprDbUMfX/3ggOel5wJHTt7bEJNhBgEsJq9GXjOamgC2lRDXCbTCGhkI/arWmNM+uqmy9DMmo2Hod8zmgSuz1yxtn5IaQ4HmjpsTQ71Vyl+86CWW9jpOwSxSqaXqps6lqcvv+o2vsIO1SRijtbDUDkB8SlJ8K5v0PpQW/kQIjBDMZ+kke0LiZZJUXJvyDYwXua0C/FjApFLC+1hlnOKDzW3zIAI9wVvV+lcUPD19VhEpIjaLpNFf09z2EACuXTn7YwV5DAKfqCxqjDEtSqh/0qSPETCujL2DiARLbh0biviY8R2znLhjWJaupNNJQXI3gItpy3nFB7qRyph7yidPateLkVTfJvbmhUPlrKnCMAIkZI3t0CyT2U1C3Zjwe+3SYCeRtI2hQw6sYVXoxfOaAdHzbRAAqqs7M/sPtX0CiZW0fSfBzGJ8INwJYlt7qb/PiPJ/NJqnAfrIFGz/MEPmHbJ8tyREIYypMsxxC2K7reQFJrVAguaVUNuysmIAABSTShIv2OUFKSHkJwebvzchpJ6fmklcqm3ouEECn2uNGe8BhyCNC22uSyluSWZWUl7Rju+iYaw4Xvbivvq3bhMR1uOrzwwTs2ORogVPZA8fLjPxkfOdRsrbdY3t4Xz/xFBYeCQu1wYCLoBZALPjQ+EtDJk62NR+ae1a8XjcDuTGAQBpTbM2mUZjskYsWxenp6ed5KNPi7q6unR8uLcRDAkfBuua2lf6+0MDRcLfsK++5fbYlQhlTcZSzG9p0iPVRzqXotGgamnp8dbD8Ezac/8+oNmrmBwqa1VSxesa2+Oco1KSAYKRZT7lzOUdx9TUZT+RRQeb2n+1Om6VegXFGnAAgLpj7XNM8rpN1lCgpWXZfXS3TLJ3Lz74m+2GRYGncS2ZfGwAoJC3vC4Ep5mZlIMtktUuYl5UyrnJDLpwAeZpGJ4JsK69fYU860papi7uq2+5HQwGBfX0GACGAGYlrBLtn8u7/Mzjla1svAwAoDv3r6enx+RTpLV+DABqG1tv7W1oeZAz+3QFGcuRytrJxvvUsozd3NyVYgbZjllQUt0lIkaWXiFikfV4waJMkgj8dz09ZsNMJh//Vl27yYMBAEkmsfNwQyrv9r2MSUsbs7mZ3ZyL0s+nZ0TEosT/GRYTFRnXq2RWO5SRd/OyqGmg2S8mGdeAHytLWnvq2xZWs37eMMD84fOg8t+jA2d3Ga1TALi7u1twbqfZtUH8uTFqzZh9+44nACQmh8/VGBKpf/v1pVhur9V4OxA+frBpeWBqKDnMouiUgf6IiEwuherZ1GQ4R4rHL5XFh3v/djocdtayk42mM3ltrpdDXov1HYgPRf4CAKLRqG988FzDVyXxtMHDCCIy8VjkO2BTGXjjrX+fjEWOsM7e+Srs4nlVuVAoJPdWFe93Le9mIuF3txVn/9pNeb84dKJz/kXX3ZC0icgwB0Wgof2/waJ8fKTvqMnSUtYuSo+ORkvD4fXTqN9r6QvB0lo7XNWQ6urq0lCiUnlOZUVh5k+JaeTQic75fEb/IuWLr5EddzMz07LRv5SM42TRSn19y6LIpk/sfImrmUFP5m55EGvoFK8tEsfjcbvCl6oZHTi7q/aNjj4pqJ5IiP2NreeZOe/BsY5X/maramNjkZeky3+uJEV1hmeKMk5yyUnXCEV7fvX+wOnu7h4eGXlHlXhVBXuOdCZGRt4ruHUrnal7pbjItcRLad56x9IP3haES4E32u+OXPh1eWGJ74RhLtnf0P6vyDmwDTmSr1XfICIOBoOirq59jgrxC23QYCzRtOBPiDJsmWKtLnR3d3N3d5AK9CvVaaKOkZGYsrX9g9rdvjKPrO1ac43r3lIPk85/Hmjs+O344NkdPr9z0vOYAw3t/0Kb4RE3q7Idi8Us23vUBslVFstxuImJfcdPJXJjQvL0aaCrq0tPjvzmVXaSs4FAl5u3wemxD3a4WX0IzC9LqQZrGt68urruH7ay/bS3CRY4LDSVGujHROJ+xjX3i33e41RCe+QWZlWp7WeTLTOCtwnCDgYVCMN3Fr3U8P+7t4mnAb0Re2+rhvO656FKkCkFC9bMywxjWUIVMCGt2TwC0W3vG3pd+h+HEhHe0vSOvwAAAABJRU5ErkJggg==) center/cover no-repeat;box-shadow:0 0 0 1px #000 inset}
.ag-spin::after{content:"";position:absolute;inset:-4px;border:2px solid transparent;border-top-color:var(--gold);border-right-color:var(--gold-line);border-radius:50%;animation:agspin .9s linear infinite}
@keyframes agspin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.ag-spin::after{animation:none;border-color:var(--gold-line)}}
.actg.done .ag-spin::after{animation:none;border-color:var(--ok)}
/* the quiet "summarised" divider (10108, spec D4): a hairline, a low-key label, the summary on tap */
.ctxdiv{align-self:center;max-width:82%;margin:6px 0;text-align:center}
.ctxdiv-head{background:none;border:none;border-top:1px solid var(--line);padding:8px 10px 2px;font-size:11.5px;letter-spacing:.04em;color:var(--ink-faint);cursor:pointer;width:100%}
.ctxdiv-head:hover,.ctxdiv-head:focus-visible{color:var(--gold);outline:none}
.ctxdiv-head.hoff{color:var(--gold);border-top-color:var(--gold-line)}
.ctxdiv-head.hoff::after{content:" \2192"}
.ctxdiv-body{margin:6px 0 2px;padding:10px 12px;background:var(--panel2);border:1px solid var(--line);border-radius:10px;font-size:12.5px;line-height:1.6;color:var(--ink-dim);text-align:left;white-space:pre-wrap}
/* parked on the person's approval (4 Sep 2026): no motion, gold = your move */
.actg.waiting{border-color:var(--gold-line)}
.actg.waiting .ag-spin::after{animation:none;border-color:var(--gold)}
.actg.waiting .ag-label{color:var(--gold)}
/* 10012: chevron no longer rotates open/closed -- a tap now opens the #activityModal
 * popup instead of expanding .ag-list in place, so there is no in-card "open" state
 * to reflect. Static "›" reads as "opens a detail view", same affordance the reference
 * Claude-Code-mobile screenshots use. */
.ag-chev{flex:0 0 auto;color:var(--ink-faint);font-size:11px}
/* display:none is the resting state; actgOpenPopup() sets an inline display:flex when
 * this node is moved into #activityModalBody, actgClosePopup() clears it back to this
 * default when moved home. No .actg.open selector needed -- there is no in-card open
 * state anymore (10012). */
.ag-list{display:none;flex-direction:column;gap:5px}
.ag-line{font-size:11.5px;color:var(--ink-faint);white-space:pre-wrap;word-break:break-word;line-height:1.45}
/* narr parity with workbench.css (31 Aug, Serena named the workbench treatment as the
 * reference for steps): thinking reads as first-class prose behind the gold dot, not
 * as one more faint log line */
.ag-line.narr{font-size:13px;color:var(--ink);opacity:.85;line-height:1.5;margin:6px 0 2px;max-width:60ch}
.ag-line.narr::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--gold);margin-right:8px;vertical-align:2px;opacity:.8}
.ag-pop-title{font-weight:600;color:var(--ink);font-size:13.5px;margin:0 0 12px;padding-right:30px}
/* [CLOUDSDALE-BACKSTAGE-ACTIVITY-DETAIL, 11 Aug 2026, TeamEA: "on the workbench, we have
 * a better UI... the same code can be used there on backstage"] Ported from ui/
 * workbench.css's own .ag-step/.ag-chip/.ag-rdetail (same class names, this file's own
 * --ink-dim/--ink-faint/--panel2 naming instead of workbench's --dim/--faint/--code --
 * see arena-ddops.js's own header comment for why a straight cross-file <link> isn't
 * used here). Reverses the 3 Aug 2026 abstraction on this exact surface -- see
 * toolLine()/toolResultLine()'s own comment in arena-default.html for the full history
 * and why this is a deliberate, confirmed reversal, not a regression. */
.ag-step{display:flex;align-items:baseline;gap:8px;margin:7px 0 0}
.st-ico{width:15px;text-align:center;color:var(--ink-faint);font-size:12px;flex:none;transform:translateY(1px)}
.st-verb{font-size:12.5px;font-weight:600;color:var(--ink);flex:none}
.st-target{font-size:11px;color:var(--ink-faint);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.ag-rrow{margin:3px 0 6px 23px}
.ag-chip{display:inline-block;background:var(--panel2);color:var(--ink-dim);border:1px solid var(--line);border-radius:6px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10.5px;padding:2px 9px;cursor:pointer}
.ag-chip:hover,.ag-chip:focus-visible{color:var(--ink);border-color:var(--gold-line);outline:none}
.ag-chip.ok::before{content:"✓ ";color:var(--gold)}
.ag-chip.err::before{content:"✗ ";color:var(--bad)}
.ag-rdetail{display:none;margin-top:5px;background:var(--panel2);border:1px solid var(--line);border-radius:8px;padding:8px 10px;font-size:11.5px;color:var(--ink-dim);white-space:pre-wrap;word-break:break-word;max-height:180px;overflow:auto}
.ag-rrow.open .ag-rdetail{display:block}
/* live helper tree (9481 gap, closed 1 Aug): mirrors ui/index.html's ag-helpers/ag-h,
 * ported to this file's own --ink-dim/--ink naming instead of ui/index.html's --dim.
 * Visible even while .actg is collapsed (sits above .ag-list, outside its display:none
 * toggle), so a delegated helper reads as a distinct named line, not just one more
 * generic step folded into "Worked N steps". */
.ag-helpers{display:flex;flex-direction:column;gap:3px;margin:6px 0 2px}
/* [10182] Serena, 5 Sep 2026, on a Coach Ted session: "once the question is answered, the box
 * can be collapsed so that user don't get confused." The 9481 rule above is about a LIVE turn:
 * while helpers are running, their named rows stay visible under the spinner. Once the turn is
 * done and the reply is on screen, the card folds to its one-line "Worked N steps" and the
 * helper rows go with it; they are still one tap away, moved into the steps popup with the
 * rest of the work. */
.actg.done .ag-helpers{display:none}
/* [10183] the pinned-question slot above the composer: empty and invisible until a question
 * is waiting, then the card sits there at full width until it is answered. Bounded so a long
 * question never pushes the composer off a phone screen. */
#pinnedCards{display:none;flex-direction:column;gap:8px;padding:8px 10px 0;max-height:42vh;overflow:auto}
#pinnedCards:not(:empty){display:flex}
#pinnedCards .msg{max-width:100%;align-self:stretch}
.ag-h{display:flex;gap:7px;font-size:11.5px;color:var(--ink-dim);align-items:baseline;min-width:0}
/* [10208] A finished specialist read opens its full answer in the Reader. Given an affordance
 * rather than left as a secret click: the row already looked like a status line, so without
 * this nobody would discover it. Subagent rows stay inert and unstyled, which is the honest
 * signal that only a named teammate's answer is drillable. */
.ag-h.h-openable{cursor:pointer;border-radius:6px;margin:0 -4px;padding:1px 4px}
.ag-h.h-openable:hover{background:rgba(255,255,255,.05);color:var(--ink)}
.ag-h.h-openable:hover .h-txt{color:var(--ink)}
.ag-h.h-openable:focus-visible{outline:2px solid var(--gold);outline-offset:1px}
.ag-h.h-openable .h-name::after{content:" \2197";color:var(--ink-faint);font-size:10px}
.ag-h .h-st{flex:0 0 auto}
.ag-h .h-name{font-weight:600;color:var(--ink);flex:0 0 auto}
.ag-h .h-txt{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* quote-reply: hover icon on desktop, always faintly visible on touch */
.msg{position:relative}
/* Per-message action row (6 Sep 2026): reply, copy, and (user bubbles only) replay, as one
 * small icon group instead of the single absolutely-positioned reply button this replaces. */
.msg-actions{position:absolute;top:3px;right:5px;display:flex;gap:1px;opacity:0;transition:opacity .15s}
.msg:hover .msg-actions{opacity:.85}
.mabtn{color:var(--ink-faint);cursor:pointer;background:none;border:none;padding:3px 4px;line-height:1;border-radius:6px;display:flex;align-items:center}
.mabtn:hover{color:var(--gold);background:rgba(255,255,255,.06)}
@media(pointer:coarse){.msg-actions{opacity:.4}}
.qt{border-left:3px solid var(--gold-line);background:rgba(201,164,96,.08);padding:6px 9px;border-radius:6px;font-size:12px;color:var(--ink-dim);margin-bottom:6px;white-space:pre-wrap}
#quoteBar{display:none;align-items:center;gap:8px;padding:8px 12px;border-top:1px solid var(--line);background:var(--panel2);font-size:12px;color:var(--ink-dim)}
#quoteBar.on{display:flex}
/* [10174] "> " blockquote in an agent reply: reads as verbatim, copy-ready text (the
 * words a customer should actually receive), not a stylized pull-quote like .quote --
 * same body font and size as the surrounding message, just set apart with a rule and a
 * faint tint so the block and its own copy button are easy to spot at a glance. */
.quote-card{position:relative;margin:8px 0;padding:9px 34px 9px 12px;border-left:2px solid var(--gold-line);background:rgba(201,164,96,.06);border-radius:0 8px 8px 0}
.quote-text{font-size:inherit;line-height:inherit;color:var(--ink);white-space:pre-wrap}
.quote-copy-btn{position:absolute;top:6px;right:6px;display:flex;align-items:center;gap:4px;color:var(--ink-faint);cursor:pointer;background:none;border:none;padding:3px 5px;line-height:1;border-radius:6px;font-size:10.5px;letter-spacing:.04em}
.quote-copy-btn:hover{color:var(--gold);background:rgba(255,255,255,.06)}
#quoteBar .qtx{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-left:3px solid var(--gold-line);padding-left:8px}
/* attachment chips above the composer */
#attachBar{display:none;gap:8px;padding:8px 12px;border-top:1px solid var(--line);background:var(--panel2);flex-wrap:wrap}
#attachBar.on{display:flex}
.attchip{display:flex;gap:7px;align-items:center;border:1px solid var(--gold-line);border-radius:9px;padding:5px 8px;font-size:11.5px;color:var(--ink)}
.attchip.pend{opacity:.55}
.attchip img{width:34px;height:34px;object-fit:cover;border-radius:6px}
.ax{cursor:pointer;color:var(--ink-faint);border:none;background:none;font-size:13px;padding:2px 5px}
.ax:hover{color:var(--bad)}
.msg .att-th{display:block;max-width:220px;max-height:160px;border-radius:9px;margin-top:6px;border:1px solid var(--line)}
.msg .att-file{display:inline-flex;gap:6px;align-items:center;border:1px solid var(--line);border-radius:8px;padding:4px 9px;font-size:12px;margin-top:6px;color:var(--ink-dim)}
#chatPane.dragover::after{content:"Drop files to attach";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(26,26,26,.82);border:2px dashed var(--gold);border-radius:var(--r);color:var(--gold);font-size:15px;z-index:8;pointer-events:none}
/* tighter composer (1 Sep 2026, Serena: "lesser padding around the chat box as well") --
 * the box was carrying desktop-dialog padding inside a pane that is already inset, which
 * ate vertical room the conversation wants. */
#chatBar{display:flex;gap:8px;padding:7px 9px;border-top:1px solid var(--line);background:var(--panel2);align-items:flex-end}
#chatInput{flex:1;resize:none;max-height:180px;min-height:52px;line-height:1.4}
.iconbtn{width:42px;height:42px;border-radius:11px;border:1px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:17px;color:var(--ink-dim);transition:all .2s;flex:0 0 auto}
/* 6 Sep 2026, caught by the mobile smoke sweep once Backstage-first put the composer's
 * #modelGear in front of a first-time mobile visitor: the @media(pointer:coarse) 44px
 * override up top NEVER applied to this class -- CSS gives no priority to a media-scoped
 * rule over an unconditional one at equal specificity, so this plain, LATER .iconbtn rule
 * silently won the cascade on every touch device, always. Re-scoped inside the same
 * @media(pointer:coarse) query it was always meant to live in (a first attempt here left
 * it unconditional, quietly growing every icon button on desktop too); "body" adds the one
 * specificity point needed to beat the later, unconditional base rule, nothing else changes,
 * the icon itself is unaffected, only the tap target, and only on a touch device. */
@media(pointer:coarse){ body .iconbtn{width:44px;height:44px} }
/* File mentions in a message (1 Sep 2026, Serena: "the file links are not in good colour
 * or shade"): a quiet chip rather than coloured underlined text -- it reads as something
 * openable without shouting inside a paragraph, and it takes its colours from the tokens
 * so it resolves correctly on the dark frame AND on the daylight paper bubbles. */
/* Inline code + code blocks inside a message (1 Sep 2026): token-driven so they read on
 * the dark frame AND on the daylight paper bubbles. The previous inline #1f1f1f fill
 * with no colour rendered as a black bar on beige -- see the arena-default.html note. */
.cdinl{background:var(--panel2);border:1px solid var(--line);border-radius:4px;padding:1px 5px;font-size:12.5px;color:var(--ink)}
.cdblk{background:var(--panel2);border:1px solid var(--line);border-radius:8px;padding:8px;overflow:auto;font-size:12px;color:var(--ink)}
.filemention.on{cursor:pointer;color:var(--gold);background:var(--gold-soft);border:1px solid var(--gold-line);
  border-radius:6px;padding:0 5px;font-size:.94em;text-decoration:none;transition:all .18s;white-space:nowrap}
.filemention.on:hover{background:var(--gold);color:var(--panel);border-color:var(--gold)}
.iconbtn:hover{border-color:var(--gold-line);color:var(--gold)}
.iconbtn.rec{border-color:var(--bad);color:var(--bad);animation:pulse 1.4s infinite}
.iconbtn.on{border-color:var(--gold-line);color:var(--gold);background:var(--gold-soft)}
/* gentler composer button (1 Sep 2026, Serena: "can you make these buttons more
 * gracefully"): a softer gold face with a real border instead of a hard saturated
 * block, so it sits in the composer rather than shouting out of it. */
#sendBtn{background:var(--gold-soft);color:var(--gold);border:1px solid var(--gold-line);font-weight:600}
#sendBtn:hover:not(:disabled){background:var(--gold);color:var(--panel);border-color:var(--gold)}
#sendBtn:disabled{opacity:.45;cursor:not-allowed}
/* Stop is its own control (Serena 12 Jul): it appears WHILE a turn runs and never replaces Send,
 * so you can keep sending prompts (the runtime queues them) and stop only if you want to. */

/* Stop mode (live team): while a turn runs, the send arrow becomes a stop control */
/* the SAME button becomes Stop while a live turn runs (one control, one position) */
#sendBtn.stopmode{background:rgba(166,71,63,.14);color:var(--bad);border-color:rgba(166,71,63,.45)}
#sendBtn.stopmode:hover{background:var(--bad);color:var(--panel);border-color:var(--bad)}
#offlineBanner{display:none;padding:10px 16px;background:rgba(201,106,96,.12);border-bottom:1px solid rgba(201,106,96,.3);font-size:12.5px;color:#d8a49e}
#offlineBanner.on{display:block}
/* 3 Aug 2026 (Serena, live: "concurrently both human are talking to the same [agent]
 * on different devices... what's the cost of this build"). Not an error state like
 * offlineBanner -- an FYI, so a calmer gold/info tone rather than the red one. */
#elsewhereBanner{display:none;padding:10px 16px;background:var(--gold-soft,rgba(201,164,96,.12));border-bottom:1px solid var(--gold-line,rgba(201,164,96,.3));font-size:12.5px;color:var(--gold)}
#elsewhereBanner.on{display:block}
#charCnt{font-size:10px;color:var(--ink-faint);position:absolute;right:118px;bottom:16px;pointer-events:none}
#chatBarWrap{position:relative}

/* ---------- admin ---------- */
#adminLink{position:fixed;bottom:12px;right:16px;font-size:10px;letter-spacing:.2em;color:var(--ink-faint);text-transform:uppercase;z-index:40;opacity:.55}
#adminLink:hover{color:var(--ink-dim);opacity:1}
/* CLOUDSDALE-ONE-BRAND-NAME-DECISION (9497, Serena 25 Jul 2026): Diamond Dogs Arena is the
 * team's own name and wins as the primary brand here -- this stays a small, secondary credit,
 * not a competing headline. */
/* leaner footer (1 Sep 2026, Serena: "i want the footer to be leaner also... across the
 * arenas"): the credit is provenance, not chrome to read -- smaller, tighter to the
 * corner, and quieter, so it stops competing with the workspace it sits under. Same
 * treatment everywhere the credit renders (fixed corner, sign-in cover, plan sheet). */
#cdsCredit{position:fixed;bottom:8px;left:12px;font-size:8.5px;letter-spacing:.1em;color:var(--ink-faint);text-transform:uppercase;z-index:40;opacity:.34;pointer-events:none}
.adm-row{margin-bottom:16px}
.adm-row label{display:block;font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--ink-dim);margin-bottom:6px;font-weight:600}
.adm-row input,.adm-row select{width:100%}
.adm-note{font-size:12px;color:var(--ink-dim);line-height:1.55;padding:11px 13px;border:1px dashed var(--line);border-radius:10px;margin:14px 0}
.adm-int{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;background:var(--panel2);border:1px solid var(--line);border-radius:11px;margin-bottom:9px}
.adm-int .ai-name{font-size:14px}
.adm-int .ai-sub{font-size:11px;color:var(--ink-dim)}
.lockpill{font-size:9.5px;letter-spacing:.14em;text-transform:uppercase;padding:3px 10px;border-radius:999px;border:1px solid var(--line);color:var(--ink-faint)}
.btn{padding:10px 20px;border-radius:10px;border:1px solid var(--gold-line);color:var(--gold);font-size:12.5px;letter-spacing:.1em;text-transform:uppercase;font-weight:600;transition:all .2s}
/* 31 Jul (Serena, screenshot: grey text on a gold button): hover fills gold but the
 * later .btn.ghost grey overrode the hover text colour — grey-on-gold, unreadable, and
 * on touch screens the hover state sticks after a tap. Hover is now scoped to devices
 * that really hover, and every gold-filled state (hover, ghost-hover, solid) pins the
 * dark ink explicitly so no ordering can produce grey-on-gold again. */
@media(hover:hover){
.btn:hover{background:var(--gold);color:#141414}
.btn.ghost:hover{background:var(--gold);border-color:var(--gold);color:#141414}
}
.btn.solid{background:var(--gold);color:#141414}
.btn.ghost{border-color:var(--line);color:var(--ink-dim)}
/* Team Backlog ticket modal: the lane-move row (10134, 5 Sep 2026). Its own line under the
 * action buttons so "Move to" reads as a sentence, the current lane named at the end. */
.board-move{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.board-move-lab{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-right:2px}
.board-move .btn{padding:7px 14px;font-size:11.5px}
.board-move-now{font-size:12px;color:var(--ink-faint);margin-left:auto}
@media(max-width:640px){.board-move-now{flex-basis:100%;margin-left:0}}

/* ---------- speech bubbles ---------- */
.bubble{position:absolute;top:36px;left:50%;transform:translateX(-50%) translateY(6px);background:#EDE7DC;color:#1A1A1A;
  font-size:11px;padding:7px 11px;border-radius:12px;border-bottom-left-radius:3px;max-width:88%;
  box-shadow:0 8px 20px rgba(0,0,0,.45);opacity:0;pointer-events:none;transition:opacity .4s,transform .4s;z-index:6;line-height:1.35;text-align:left;font-weight:400}
.card:hover .bubble{opacity:1;transform:translateX(-50%) translateY(0)}
.bubble::after{content:"";position:absolute;bottom:-6px;left:20px;border:6px solid transparent;border-top-color:#EDE7DC;border-bottom:none}

/* ---------- jobs ---------- */
.tile-status{font-size:10.5px;color:var(--ink-faint);margin-top:8px;display:flex;gap:6px;justify-content:center;align-items:center;letter-spacing:.04em}
.tile-status .run{color:var(--ok)}
.jobrow{display:flex;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #2f2f2f;font-size:13.5px}
.jobrow:last-child{border:none}
.jpill{font-size:9px;letter-spacing:.12em;text-transform:uppercase;padding:3px 9px;border-radius:999px;font-weight:600;flex:0 0 auto}
.jpill.run{background:rgba(127,183,126,.15);color:var(--ok);border:1px solid rgba(127,183,126,.4)}
.jpill.run::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--ok);margin-right:5px;animation:pulse 1.6s infinite}
.jpill.done{background:rgba(201,164,96,.12);color:var(--gold);border:1px solid var(--gold-line)}
.jpill.wait{background:none;color:var(--ink-faint);border:1px solid var(--line)}
.jobrow .jmeta{margin-left:auto;font-size:11px;color:var(--ink-faint);text-align:right;line-height:1.35;flex:0 0 auto}

/* ---------- rename pencil (my-arena cards) ---------- */
.pencil{font-size:12px;color:var(--ink-faint);margin-left:6px;padding:2px 6px;vertical-align:middle;border:none;background:none;line-height:1}
.pencil:hover{color:var(--gold)}
@media(pointer:coarse){.pencil{padding:6px 8px}}

/* ---------- custom agent ---------- */
.card.slot{border-style:dashed;border-color:var(--gold-line);background:none;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:380px;color:var(--ink-dim)}
.card.slot:hover{background:var(--gold-soft)}
.card.slot .plus{width:64px;height:64px;border-radius:50%;border:1px dashed var(--gold-line);display:flex;align-items:center;justify-content:center;font-size:30px;color:var(--gold);margin-bottom:14px}
.chiprow{display:flex;gap:8px;flex-wrap:wrap}
.pchip{padding:7px 14px;border-radius:999px;border:1px solid var(--line);font-size:12.5px;color:var(--ink-dim);cursor:pointer;transition:all .15s}
.pchip.on{border-color:var(--gold-line);color:var(--gold);background:var(--gold-soft)}
.swatch{width:30px;height:30px;border-radius:9px;cursor:pointer;border:2px solid transparent;display:inline-block;margin-right:8px;vertical-align:middle}
.swatch.on{border-color:#EDE7DC}

/* ---------- org chart ---------- */
.org{background:var(--panel);border:1px solid var(--line);border-radius:var(--r);padding:22px;margin-bottom:34px}
.org-row{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}
.org-node{background:var(--panel2);border:1px solid var(--gold-line);border-radius:12px;padding:10px 18px;text-align:center;min-width:130px}
.org-node .on-name{font-family:var(--serif);font-size:17px;font-weight:600}
.org-node .on-sub{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-dim);margin-top:2px}
.org-stem{width:2px;height:20px;background:var(--gold-line);margin:0 auto}
.org-lanes{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.org-lane{background:var(--panel2);border:1px solid var(--line);border-radius:12px;padding:12px}
.org-lane .ol-name{font-size:10.5px;letter-spacing:.2em;text-transform:uppercase;color:var(--gold);margin-bottom:9px;font-weight:600}
.org-lane .ol-m{display:flex;gap:8px;align-items:center;margin-bottom:7px;font-size:13px}

/* ---------- ways of working ---------- */
#wowPanel{background:var(--panel);border:1px solid var(--line);border-radius:var(--r);padding:22px;margin-bottom:34px}
.wow-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
@media(max-width:720px){.wow-grid{grid-template-columns:1fr}}
.wow-item label{display:block;font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--ink-dim);margin-bottom:7px;font-weight:600}
.wow-item select{width:100%}
.wow-checks{display:flex;flex-direction:column;gap:8px}
.wow-checks label{display:flex;gap:9px;align-items:center;font-size:13.5px;color:var(--ink);text-transform:none;letter-spacing:0;font-weight:400;cursor:pointer;margin-bottom:0}
.wow-checks input{accent-color:var(--gold);width:15px;height:15px;flex:0 0 auto}
.wow-live{margin-top:18px;font-size:12px;color:var(--gold);display:flex;gap:9px;align-items:center}

/* ---------- 9890: Human in the Loop dial (approved mockup: tasks/design-mockups/human-in-the-loop-dial.html) ---------- */
.hitl-refrow{display:flex;gap:10px;margin-bottom:16px}
.hitl-refchip{flex:1;background:var(--panel2);border:1px solid var(--line);border-radius:10px;padding:11px 14px;
  display:flex;align-items:center;gap:10px;cursor:pointer;text-align:left}
.hitl-refchip .ic{font-size:16px;flex-shrink:0}
.hitl-refchip .tx{font-size:12.5px;min-width:0}
.hitl-refchip .tx b{display:block;font-size:12.5px;color:var(--ink)}
.hitl-refchip .tx span{color:var(--ink-dim);font-size:11px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hitl-floor{background:var(--panel2);border:1px solid var(--gold-line);border-radius:10px;padding:14px 16px;margin-bottom:20px}
.hitl-floor .kicker{margin-bottom:6px;font-size:12px;letter-spacing:1px}
.hitl-floorsub{font-size:12px;color:var(--ink);margin-bottom:12px;line-height:1.5;max-width:560px}
.hitl-floor .row{display:flex;gap:8px;flex-wrap:wrap}
.hitl-floorchip{display:flex;align-items:center;gap:6px;background:var(--bg);border:1px solid var(--line);
  border-radius:20px;padding:6px 12px;font-size:12px}
.hitl-floor .note{font-size:11px;color:var(--ink-dim);margin-top:10px}
.hitl-gaugewrap{display:flex;flex-direction:column;align-items:center;margin:8px 0 4px}
.hitl-gauge{width:260px;height:140px;position:relative;margin:0 auto;overflow:hidden}
.hitl-arc{position:absolute;top:0;left:0;width:260px;height:260px;border-radius:50%;
  background:conic-gradient(from 270deg, var(--bad) 0deg 36deg, #cf9a5a 36deg 72deg, var(--gold) 72deg 108deg,
    #a8b98a 108deg 144deg, var(--ok) 144deg 180deg, transparent 180deg 360deg)}
.hitl-hole{position:absolute;top:38px;left:38px;width:184px;height:184px;border-radius:50%;background:var(--panel)}
.hitl-needle{position:absolute;left:128px;bottom:0;width:4px;height:104px;background:var(--gold);
  transform-origin:bottom center;transform:rotate(0deg);border-radius:2px}
.hitl-pivot{position:absolute;left:118px;bottom:-10px;width:22px;height:22px;border-radius:50%;
  background:var(--gold);border:3px solid var(--panel)}
.hitl-gaugelabels{display:flex;justify-content:space-between;width:260px;font-size:9.5px;
  color:var(--ink-dim);text-transform:uppercase;letter-spacing:.5px;margin-top:2px}
.hitl-slidehit{width:260px;margin-top:6px}
.hitl-slidehit input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:4px;
  background:var(--line);border-radius:4px;cursor:pointer;margin:0}
.hitl-slidehit input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;
  border-radius:50%;background:var(--gold);border:2px solid var(--bg);cursor:grab;margin-top:-6px}
.hitl-slidehit input[type=range]::-moz-range-thumb{width:16px;height:16px;border-radius:50%;
  background:var(--gold);border:2px solid var(--bg);cursor:grab}
.hitl-stanceblock{text-align:center;margin-top:14px}
.hitl-stance{font-size:20px;font-weight:600;color:var(--gold)}
.hitl-stancedesc{font-size:12.5px;color:var(--ink-dim);max-width:420px;margin:4px auto 0}
.hitl-movegrid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:20px}
@media(max-width:640px){.hitl-movegrid{grid-template-columns:1fr 1fr}}
.hitl-movecell{text-align:center;background:var(--panel2);border-radius:10px;padding:12px 6px}
.hitl-movecell .ic{font-size:18px;margin-bottom:6px}
.hitl-movecell .lbl{font-size:10px;color:var(--ink-dim);text-transform:uppercase;letter-spacing:.3px;margin-bottom:6px}
.hitl-movecell .tag{font-size:10.5px;padding:3px 8px;border-radius:20px;display:inline-block}
.hitl-movecell .tag.human{background:var(--gold-soft);color:var(--gold);border:1px solid var(--gold-line)}
.hitl-movecell .tag.agent{background:rgba(127,183,126,.15);color:var(--ok);border:1px solid #4c6b58}
.hitl-firstrun{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:14px;
  font-size:11px;color:var(--ink-dim);text-align:center}

/* ---------- companion mode (9432): hands-free while driving ---------- */
#companion{display:none;position:fixed;inset:0;z-index:250;background:var(--bg);flex-direction:column;gap:10px;
  padding:calc(14px + env(safe-area-inset-top)) 20px calc(18px + env(safe-area-inset-bottom))}
#companion.on{display:flex}
#compTop{display:flex;align-items:flex-start;gap:12px}
#compNameRow{display:flex;align-items:center;gap:12px}
#compName{font-size:clamp(34px,9vw,46px);font-weight:600;color:var(--gold);line-height:1.1}
.cdot{width:14px;height:14px;border-radius:50%;background:var(--ok);flex:0 0 auto}
.cdot.run{background:var(--warn)}
.cdot.off{background:#5a5a52}
#compActivity{font-size:14px;color:var(--ink-dim);min-height:20px;margin-top:2px}
#compClose{margin-left:auto;width:56px;height:56px;border-radius:50%;border:1px solid var(--line);color:var(--ink-dim);font-size:22px;flex:0 0 auto}
#compClose:active{transform:scale(.95)}
#compCards{overflow:auto;display:flex;flex-direction:column;gap:10px;flex:0 0 auto;max-height:46vh}
#compCards .msg{max-width:100%;font-size:16px;align-self:stretch}
#compCards .btn{min-height:60px;font-size:16px}
#compCards input{min-height:52px;font-size:16px}
#compMain{flex:1;display:flex;flex-direction:column;justify-content:center;gap:14px;overflow:auto;min-height:0}
#compYou{font-size:17px;color:var(--ink-dim);line-height:1.45;white-space:pre-wrap}
#compAgent{font-size:clamp(28px,6.5vw,34px);line-height:1.4;font-weight:400;white-space:pre-wrap;word-wrap:break-word}
#compHint{min-height:18px;font-size:13px;color:var(--warn);text-align:center}
#compMic{width:104px;height:104px;border-radius:50%;margin:0 auto;border:2px solid var(--gold-line);color:var(--gold);font-size:40px;background:var(--panel);flex:0 0 auto}
#compMic:active{transform:scale(.95)}
#compMic.rec{border-color:var(--bad);color:var(--bad);animation:pulse 1.4s infinite}
#compMic.na{opacity:.35}
#compTypeRow{display:flex;gap:10px}
#compTypeRow input{flex:1;min-height:48px;font-size:16px}
#compTypeRow .btn{min-width:64px;min-height:48px}

/* ---------- toast ---------- */
#toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%) translateY(80px);background:var(--panel2);border:1px solid var(--gold-line);color:var(--ink);padding:11px 20px;border-radius:12px;font-size:13.5px;z-index:200;transition:transform .3s;box-shadow:0 16px 40px -12px rgba(0,0,0,.8);max-width:86vw;text-align:center}
#toast.on{transform:translateX(-50%) translateY(0)}
/* [9917] Ted's goodbye: was a 3.2s toast (function toast() always uses that fixed
 * duration -- the 9000ms passed at the old call site was silently ignored), easy to
 * miss and offering no choice. Reuses the approval-card visual language (.msg.agent
 * .apr-arrive, see clApprovalMsg/clQuestionMsg) but fixed-position, since the
 * farewell can fire from any view, not just an open chat pane -- and stays on
 * screen until the client picks, instead of auto-dismissing. */
#tedFarewellCard.tf-fixed{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);z-index:210;max-width:420px;width:92vw;box-shadow:0 16px 40px -12px rgba(0,0,0,.8)}

/* ---------- intro hero ---------- */
#hero{padding:36px 0 8px;text-align:center}
#hero h1{font-size:clamp(34px,5.5vw,58px);font-weight:600;line-height:1.12}
#hero h1 em{color:var(--gold);font-style:normal}
#hero p{color:var(--ink-dim);font-size:16.5px;max-width:640px;margin:14px auto 0;line-height:1.65}
#hero .heroline{margin-top:20px;display:flex;gap:26px;justify-content:center;flex-wrap:wrap;font-size:12px;letter-spacing:.18em;text-transform:uppercase;color:var(--ink-dim)}
#hero .heroline b{color:var(--gold);font-weight:600;font-family:var(--serif);font-size:22px;display:block;letter-spacing:.02em}
@media(max-width:640px){
  .viewhead h1{font-size:32px}
  .view{padding:24px 14px 80px}
  /* phone header: brand + live chip on the top row, nav becomes a swipeable pill strip below */
  #topbar{flex-wrap:wrap;gap:10px;padding:10px 14px 8px}
  #brand{order:1}
  #brand .b1{font-size:16px;letter-spacing:.1em}
  #brand .b2{font-size:8.5px;letter-spacing:.24em}
  #liveDot{order:2;margin-left:auto}
  /* 9502 (25 Jul, Rebecca): 6 tabs need ~605px in a 358px container. Horizontal scroll
   * already existed but hid its own scrollbar with no other affordance, so a first-time
   * visitor had no signal there was more nav off-screen. Fix: keep the scroll (smaller
   * change than a wrap/collapse redesign), add a static edge-fade via mask-image so the
   * cut-off tab reads as "more here", and force the 44px tap-target guideline instead of
   * relying on pointer:coarse alone. */
  #nav{order:3;flex-basis:100%;width:100%;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;margin-left:0;gap:6px;padding-bottom:2px;scrollbar-width:none;-webkit-overflow-scrolling:touch;
    -webkit-mask-image:linear-gradient(to right,transparent,#000 14px,#000 calc(100% - 28px),transparent);
    mask-image:linear-gradient(to right,transparent,#000 14px,#000 calc(100% - 28px),transparent)}
  #nav::-webkit-scrollbar{display:none}
  .navbtn{flex:0 0 auto;font-size:12px;padding:8px 13px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  /* 9504 (25 Jul, Rebecca): #avWrap (chat-head roster toggle) measured 36x36, under the
   * 44px guideline. The visual avatar stays 36px (miniAv/mini-av sizing untouched); only
   * the tappable wrapper grows, centred, mobile-only so desktop is pixel-identical. */
  #avWrap{min-width:44px;min-height:44px;justify-content:center}
  /* mobile-batch fix (Serena, 31 Jul + repeated 1 Aug via a live Backstage session):
   * "the top menu can all be collapse in a hamburger under the title diamond dogs
   * arena". #topbar is sticky and shows on EVERY view, including Backstage chat --
   * not just the arena landing page -- so its nav row + credits/who/live-team chips
   * ate a fixed block of vertical space above the actual content on a phone every
   * time, not only on first load. Collapsed into a hamburger, closed by default;
   * this whole file is inside the existing 640px media query, so desktop is
   * untouched. Overrides (not full redeclares) the order/margin-left of the
   * existing #nav/#liveDot mobile rules above -- their other properties (the
   * scroll mask, tap targets) still apply once opened. */
  #topbarHamburger{display:inline-flex;order:2;margin-left:auto}
  #nav{order:4;display:none}
  #liveDot{order:5;margin-left:0;width:100%;flex-wrap:wrap;display:none}
  #topbar.navOpen #nav,#topbar.navOpen #liveDot{display:flex}
}

/* [CLOUDSDALE-DD-ARENA-LAYOUT, 7 Aug 2026, TeamEA: "use most of the page to display the
 * artifact just as the way it's produced by the team pinned on cowork"] Was a horizontal
 * tab row eating vertical space above a body capped at max-width:900px -- artifacts authored
 * as full-page documents (h016-commercials.html, bets-tracker.html) got squeezed into a
 * narrow column, nothing like how a pinned Cowork artifact actually reads. Left rail is
 * pinned (not a hamburger-collapsed overlay -- TeamEA said either was fine, pinned is the
 * simpler, always-visible option and needs no new toggle JS), main content fills the rest
 * of .view's existing 1280px column. */
.ddops-shell{display:flex;gap:22px;align-items:flex-start}
.ddops-rail{display:flex;flex-direction:column;gap:6px;flex:0 0 190px;position:sticky;top:18px}
.ddops-rail .navbtn{text-align:left;border-radius:8px;padding:10px 14px;width:100%}
.ddops-body{flex:1;min-width:0}
@media(max-width:820px){
  .ddops-shell{flex-direction:column}
  .ddops-rail{flex-direction:row;flex-wrap:wrap;position:static;flex:0 0 auto;width:100%}
}

/* [CLOUDSDALE-FEEDBACK-LOG-VIEW, 12 Aug 2026] flat reverse-chronological list, same card
 * language as .doc (Library) but a single column -- feedback text reads better full-width
 * than squeezed into a grid tile. */
#feedbackList{display:flex;flex-direction:column;gap:10px}
.fbrow{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px 15px}
.fbrow-head{display:flex;align-items:center;gap:10px;margin-bottom:8px;flex-wrap:wrap}
.fbrow-who{font-size:12.5px;font-weight:600;color:var(--ink)}
.fbrow-when{font-size:11px;color:var(--ink-faint);margin-left:auto}
.fbrow-text{font-size:13.5px;color:var(--ink-dim);line-height:1.5;white-space:pre-wrap;word-break:break-word}
.fb-src.fb-user{color:var(--gold);border-color:var(--gold-line)}
.fb-src.fb-guest{color:#9AC0CD;background:rgba(127,168,201,.15);border-color:rgba(127,168,201,.4)}
.fb-src.fb-system{color:var(--ink-faint)}

/* ================= Daylight dual-tone (CLOUDSDALE-ARENA-READABILITY-PALETTE, 31 Aug 2026,
 * Serena: "mix of both beige and EA colour dark tone... improve readability", Option B of
 * the proposal artifact + "navigation bar not too big... this is becoming a workspace").
 * Flag arena_daylight, per tenant, default off. Mechanism: the content panes (.view)
 * re-declare the token set on beige; the frame (topbar, roster rail, composer) stays on
 * the root dark set, so every component keeps reading the same var names. Champagne gold
 * fails contrast on beige (1.96:1), so light scope carries "gold ink" #84642A (4.6:1),
 * with true champagne only where the dark tokens still apply. */
body.daylight .view{
  --bg:var(--pal-light-bg); --panel:var(--pal-light-panel); --panel2:var(--pal-light-panel2); --line:var(--pal-light-line);
  --gold:var(--pal-light-accent); --gold-soft:var(--pal-light-accent-soft); --gold-line:var(--pal-light-accent-line);
  --ink:var(--pal-light-ink); --ink-dim:var(--pal-light-ink-dim); --ink-faint:var(--pal-light-ink-faint);
  --ok:var(--pal-light-ok); --warn:var(--pal-light-warn); --bad:var(--pal-light-bad); --info:var(--pal-light-info);
  color:var(--ink);
  /* 1 Sep 2026, Serena live: "the main panel should be kept the dark tone. Team
   * Backlog background can be the dark tone, the panels are in beige and light
   * grey." The token remap above stays untouched -- every --panel/--panel2 card,
   * ticket, chip and badge across every view still correctly resolves to the light
   * palette, unchanged. Only the page's OWN paint reverts to dark: the --bg token
   * still holds the light value (badges/inputs/chips inside a panel legitimately
   * consume var(--bg) as their base fill and must keep matching their card), but
   * .view no longer PAINTS that value onto itself. This also closes a seam Serena
   * flagged separately on Library: on a screen wider than the 1280px content
   * column, the light .view butted directly against the still-dark body gutters,
   * two mismatched dark/light tones side by side. One page-dark background fixes
   * both reports at once. */
  background:var(--pal-dark-bg);
}
/* Loose page chrome -- section headers, the Team Backlog live-banner, board column
 * labels, Library shelf headers -- sits directly on .view's own background with no
 * --panel card underneath it, so it would otherwise inherit the light-mode "dark ink
 * on beige" tokens meant for panels and go dark-on-dark against the page's own dark
 * background above. Reverted here to the dark-palette ink/gold/line so it reads
 * exactly as it does with daylight off. */
body.daylight .viewhead, body.daylight #hero, body.daylight .flowline,
body.daylight .colhead, body.daylight .shelfhead{
  --ink:var(--pal-dark-ink); --ink-dim:var(--pal-dark-ink-dim); --ink-faint:var(--pal-dark-ink-faint);
  --gold:var(--pal-dark-accent); --gold-soft:var(--pal-dark-accent-soft); --gold-line:var(--pal-dark-accent-line);
  --line:var(--pal-dark-line);
  color:var(--ink);
}
/* Operating Model + Backstage stay fully dark regardless of daylight (1 Sep 2026,
 * Serena live: "operating model should be kept in settings. and dark tone" -- the
 * settings-placement half is a navigation-structure question, not decided here, see
 * the PR note; the dark-tone half is this rule -- and separately "backstage colours
 * are too off", which traced to its chat pane and agent bubbles flipping light
 * against a rail and composer that stay forced-dark right below, an inconsistent
 * three-way split. Both are working-session surfaces (rules you edit live in
 * conversation, a live huddle), not documents to read on paper -- exempt the whole
 * view, same dual-tone shape as the frame-stays-dark rule immediately below. */
body.daylight #v-routines, body.daylight #v-comms{
  --bg:var(--pal-dark-bg); --panel:var(--pal-dark-panel); --panel2:var(--pal-dark-panel2); --line:var(--pal-dark-line);
  --gold:var(--pal-dark-accent); --gold-soft:var(--pal-dark-accent-soft); --gold-line:var(--pal-dark-accent-line);
  --ink:var(--pal-dark-ink); --ink-dim:var(--pal-dark-ink-dim); --ink-faint:var(--pal-dark-ink-faint);
  --ok:var(--pal-dark-ok); --warn:var(--pal-dark-warn); --bad:var(--pal-dark-bad); --info:var(--pal-dark-info);
  background:var(--pal-dark-bg); color:var(--ink);
}
/* Backstage chat goes paper (1 Sep 2026, Serena, revising the 1 Sep #44 all-dark
 * exemption directly above: "for the backstage - make the chat background beige and
 * the chat box beige too"). The CHAT PANE and the COMPOSER are the reading/writing
 * surface, so they take the light palette; the roster rail immediately below keeps
 * the dark treatment, which is what makes the pane read as a sheet you write on
 * rather than an undifferentiated light block. Wins over the #v-comms rule above by
 * being later + more specific. */
body.daylight #chatPane, body.daylight #chatBarWrap{
  --bg:var(--pal-light-bg); --panel:var(--pal-light-panel); --panel2:var(--pal-light-panel2); --line:var(--pal-light-line);
  --gold:var(--pal-light-accent); --gold-soft:var(--pal-light-accent-soft); --gold-line:var(--pal-light-accent-line);
  --ink:var(--pal-light-ink); --ink-dim:var(--pal-light-ink-dim); --ink-faint:var(--pal-light-ink-faint);
  --ok:var(--pal-light-ok); --warn:var(--pal-light-warn); --bad:var(--pal-light-bad); --info:var(--pal-light-info);
  background:var(--pal-light-bg); color:var(--ink);
}
/* (the composer's own background:var(--panel) rule further down now resolves to the
 * light card tone through this remap -- one step up from the pane, as intended) */
/* frame stays dark inside the comms view: the roster rail remaps back to the dark
 * slots so its descendants resolve exactly as today (the composer left this rule on
 * 1 Sep when Serena asked for a beige chat box -- see the paper rule above) */
body.daylight #roster{
  --bg:var(--pal-dark-bg); --panel:var(--pal-dark-panel); --panel2:var(--pal-dark-panel2); --line:var(--pal-dark-line);
  --gold:var(--pal-dark-accent); --gold-soft:var(--pal-dark-accent-soft); --gold-line:var(--pal-dark-accent-line);
  --ink:var(--pal-dark-ink); --ink-dim:var(--pal-dark-ink-dim); --ink-faint:var(--pal-dark-ink-faint);
  --ok:var(--pal-dark-ok); --warn:var(--pal-dark-warn); --bad:var(--pal-dark-bad); --info:var(--pal-dark-info);
  color:var(--ink);
}
body.daylight #chatBarWrap{background:var(--panel)}
/* reading sheets go paper too: playbooks and the file reader (openPlaybook / fvOpen,
 * both rendering into #drillModal) are the long-form reading surfaces named first in
 * the rollout ("start with the backstage and the library / file read panels"), and the
 * activity-detail popup (#activityModal, the "Worked N steps" reader) is the same kind
 * of surface (Serena 31 Aug: approval box / steps / in-chat connectors touched up) */
body.daylight #drillModal .sheet, body.daylight #activityModal .sheet{
  --bg:var(--pal-light-bg); --panel:var(--pal-light-panel); --panel2:var(--pal-light-panel2); --line:var(--pal-light-line);
  --gold:var(--pal-light-accent); --gold-soft:var(--pal-light-accent-soft); --gold-line:var(--pal-light-accent-line);
  --ink:var(--pal-light-ink); --ink-dim:var(--pal-light-ink-dim); --ink-faint:var(--pal-light-ink-faint);
  --ok:var(--pal-light-ok); --warn:var(--pal-light-warn); --bad:var(--pal-light-bad); --info:var(--pal-light-info);
  background:var(--panel); color:var(--ink);
}
/* Speech bubbles both go beige (1 Sep 2026, Serena: "the speech bubbles should be
 * beige toned too", revising the earlier keep-user-dark rule). The left/right scan
 * has to survive without a dark block interrupting a paper page, so the two sides
 * separate by WARMTH rather than by dark-vs-light: an agent reply sits on the palest
 * paper, your own message on a warm gold-tinted sand with the accent border -- the
 * same accent pairing the dark theme already uses for "yours", just in the light
 * palette's register. Ink stays the light-palette ink on both, so contrast is the
 * ~13:1 of #262626 on cream either way. */
/* Waiting-on-you lane (1 Sep 2026, Serena: "team backlog - waiting on you, should be
 * gold to beige. dark to beige is ugly"). .hlane's gradient starts on --gold-soft, which
 * is TRANSLUCENT: it used to composite over a light page, but since the page went back to
 * dark (the panel-seam fix earlier today) that top band was compositing over the dark page
 * instead -- a dark slab fading into beige cards. Opaque warm sand to paper here, so the
 * lane reads gold-to-beige regardless of what is behind it. Same trap applies to any other
 * translucent-background panel: inside a light pane it must resolve to an opaque light
 * tone, never rely on the page beneath it. */
/* ============================================================================
 * DAYLIGHT DESIGN RULE (1 Sep 2026, Serena: "the whole look and feel and colour
 * scheme doesn't seem to gel. maybe you can do a review and design accordingly").
 * The day's fixes had been report-by-report, which is exactly how a palette stops
 * cohering. One rule now decides every surface:
 *
 *   DARK carries WHO and WHERE  -- the frame, the nav, the roster rail, the chat
 *     head, and the team tiles. Agent portraits and their per-agent colours only
 *     read as identity against a dark ground; on paper they turn into pastel mush.
 *   PAPER carries WHAT YOU READ AND WRITE -- the chat log and its bubbles, backlog
 *     tickets, playbooks, file reads, the plan sheet. Long text belongs on paper.
 *
 * Two corollaries worth keeping: a panel that sits directly on the page needs an
 * OPAQUE tone (a translucent one composites over the dark page, which is what made
 * the waiting-on-you lane read dark-to-beige), and a surface never mixes -- it is
 * wholly one or the other, so no element straddles the seam.
 * ============================================================================ */
/* Reading CONTAINERS get real paper, so their headings have something to sit on
 * (1 Sep 2026, after the contrast sweep caught "Playbooks" at 1.15:1). .shelf and the
 * Artifacts body were transparent -- fine when the page was light, invisible once the
 * page went dark, and the re-light rule below would otherwise put light ink on a dark
 * page. Both are long-form reading surfaces, so per the dark/paper rule they ARE paper:
 * giving them an opaque panel fixes every descendant at once. */
body.daylight .shelf{background:var(--pal-light-panel);border:1px solid var(--pal-light-line);border-radius:var(--r);padding:14px 16px}
body.daylight .ddops-body{background:var(--pal-light-panel);border:1px solid var(--pal-light-line);border-radius:var(--r);padding:14px 16px;color:var(--pal-light-ink)}
/* the Sample badge hardcodes a pale blue for the dark theme; on a light ticket that is
 * 1.5:1. Same hue, light-theme weight. */
body.daylight .chip.smp{background:rgba(62,110,150,.14);border-color:rgba(62,110,150,.45);color:#2F5878}
/* ...but chrome NESTED INSIDE a light panel keeps that panel's ink (fixed 1 Sep 2026,
 * Serena: "the library colour doesn't fully work"). The revert above assumes a heading
 * sits on the page's dark ground; the Library's growing-brain card puts a .shelfhead
 * inside a beige card, so it was painting pale dark-mode ink on beige -- invisible, the
 * exact 9487 class. Anything inside a panel-like container is re-lit here, which is
 * later and more specific, so it wins. */
body.daylight .shelf .shelfhead, body.daylight .shelf .viewhead,
body.daylight .card .shelfhead, body.daylight .setpanel .shelfhead,
body.daylight .sheet .shelfhead, body.daylight .sheet .viewhead,
body.daylight .hlane .shelfhead{
  --ink:var(--pal-light-ink); --ink-dim:var(--pal-light-ink-dim); --ink-faint:var(--pal-light-ink-faint);
  --gold:var(--pal-light-accent); --gold-soft:var(--pal-light-accent-soft); --gold-line:var(--pal-light-accent-line);
  --line:var(--pal-light-line);
  color:var(--ink);
}
/* The file browser is a READING surface, so it gets paper (1 Sep 2026, Serena: "the
 * worse is the folder part of the library"). Its rows reuse .rosteritem, which is
 * transparent by design -- fine in the dark roster rail it was built for, invisible
 * here, where light-palette ink was landing straight on the dark page. Giving the
 * browser its own opaque paper panel fixes every row at once and puts it on the right
 * side of the dark/paper rule instead of patching row colours. */
body.daylight #fvWrap{background:var(--pal-light-panel);border:1px solid var(--pal-light-line);border-radius:var(--r);padding:14px 16px}
body.daylight #fvWrap .rosteritem:hover{background:var(--pal-light-panel2)}
body.daylight .shelf .shelfhead h3, body.daylight .sheet .shelfhead h3{color:var(--pal-light-ink)}
body.daylight .shelf .shelfhead span, body.daylight .sheet .shelfhead span{color:var(--pal-light-ink-dim)}
body.daylight .hlane{background:linear-gradient(180deg,#E6DDCE,var(--pal-light-panel) 55%);border-color:var(--pal-light-accent-line)}
/* WHO: team tiles stay dark (Serena, 1 Sep: "team tiles should be dark tone like
 * before") -- each card carries an agent's own colour, which needs the dark ground. */
body.daylight .card{
  --bg:var(--pal-dark-bg); --panel:var(--pal-dark-panel); --panel2:var(--pal-dark-panel2); --line:var(--pal-dark-line);
  --gold:var(--pal-dark-accent); --gold-soft:var(--pal-dark-accent-soft); --gold-line:var(--pal-dark-accent-line);
  --ink:var(--pal-dark-ink); --ink-dim:var(--pal-dark-ink-dim); --ink-faint:var(--pal-dark-ink-faint);
  --ok:var(--pal-dark-ok); --warn:var(--pal-dark-warn); --bad:var(--pal-dark-bad); --info:var(--pal-dark-info);
  background:var(--pal-dark-panel); border-color:#2a2826; color:var(--ink);
}
/* WHERE: the roster rail and the chat head are identity chrome, dark with the frame,
 * so the paper chat log between them reads as the one place work happens. */
body.daylight #chatHead{
  --bg:var(--pal-dark-bg); --panel:var(--pal-dark-panel); --panel2:var(--pal-dark-panel2); --line:var(--pal-dark-line);
  --gold:var(--pal-dark-accent); --gold-soft:var(--pal-dark-accent-soft); --gold-line:var(--pal-dark-accent-line);
  --ink:var(--pal-dark-ink); --ink-dim:var(--pal-dark-ink-dim); --ink-faint:var(--pal-dark-ink-faint);
  background:var(--pal-dark-panel2); color:var(--ink); border-bottom-color:var(--pal-dark-line);
}
/* MINIMAL BACKSTAGE PADDING (Serena, 1 Sep: "keep all the padding to the minimal for
 * the backstage. so that we use more real estate for the work"). Backstage is a
 * workspace, not a document page: the view's document margins, the rail/pane gutter
 * and the chat head all give their room back to the conversation. */
#v-comms{padding:12px 14px 16px}
#v-comms .viewhead{margin-bottom:10px}
#commsWrap{gap:10px;height:calc(100vh - 74px)}
#chatHead{padding:8px 12px;gap:9px}
#roster{padding:8px}
@media(max-width:820px){ #v-comms{padding:10px 10px 14px} }
body.daylight .msg.user{background:var(--pal-light-accent-soft);border-color:var(--pal-light-accent-line);color:var(--pal-light-ink)}
body.daylight .msg.agent{background:var(--pal-light-panel);border-color:var(--pal-light-line);color:var(--pal-light-ink);box-shadow:0 1px 2px rgba(33,30,26,.06)}
/* compact workspace topbar */
body.daylight #topbar{padding:7px 18px;gap:12px}
body.daylight #brand .b1{font-size:15px}
body.daylight #brand .b2{font-size:8.5px;letter-spacing:.24em}
body.daylight .navbtn{padding:5px 12px;font-size:12px}
body.daylight #liveDot{font-size:10px}
body.daylight #liveDot #cartPill, body.daylight #liveDot #creditsPill{padding:2px 8px}

/* ================= Pre-live arena scope (CLOUDSDALE-PREPAY-BACKSTAGE-UX, 31 Aug 2026,
 * Serena from a live staging walkthrough: "we shouldn't show some parts of the arena if
 * it's not paid yet. it confuses user" + her explicit list). body.prelive is toggled from
 * the entitlement state (ddNotLiveYet), never per-tenant config, so it self-resolves the
 * moment payment clears. Hidden pre-live: the four not-yet-real nav tabs (Library stays,
 * close-shop view), the credits pill, the demo stat tiles, and both status strips. */
body.prelive .navbtn[data-v="routines"],body.prelive .navbtn[data-v="board"],
body.prelive .navbtn[data-v="gallery"],body.prelive .navbtn[data-v="feedback"],
body.prelive #creditsPill,body.prelive #statShippedWrap,body.prelive #statClockWrap,
body.prelive #tileDisclosure,body.prelive #tileLiveNote{display:none!important}
/* teammate cards exist pre-live but nothing runs yet: still dot, honest tag */
body.prelive .card .stat-dot{background:var(--ink-faint);animation:none}
.prelive-tag{display:inline-block;border:1px solid var(--line);border-radius:999px;color:var(--ink-dim);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;padding:2px 8px;margin-left:7px;vertical-align:middle}
/* pre-live Backstage: the composer swaps for the settle-your-plan card -- an inviting
 * message box before payment "gives a wrong impression that you can chat with your
 * agents now" (Serena, 31 Aug, staging walkthrough) */
body.prelive #chatBar, body.prelive #quoteBar, body.prelive #attachBar, body.prelive #chips{display:none!important}
body.prelive #preliveChatNote{display:block!important}

/* ---- Business WhatsApp inbox (10039) ----
 * Working tokens only, never raw hexes: the daylight layer remaps the same --pal-* slots
 * per surface, so this view follows light/dark for free and a future per-tenant brand
 * theme reaches it without touching a single rule here. */
#waInbox{max-width:1000px;margin:0 auto;padding:0 4px}
.wa-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;
  padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel);margin-bottom:12px}
.wa-num{font-size:var(--fs-2);color:var(--ink-dim)}
.wa-num b{color:var(--ok);font-family:ui-monospace,Menlo,monospace}
.wa-agent{display:flex;align-items:center;gap:8px;font-size:var(--fs-2);color:var(--ink-dim)}
.wa-agent b{color:var(--ink)}
.wa-agent select{padding:6px 10px;font-size:var(--fs-2)}
.wa-legend{padding:10px 14px;border:1px solid var(--gold-line);border-radius:12px;background:var(--panel);
  font-size:var(--fs-1);color:var(--ink-dim);display:flex;align-items:center;flex-wrap:wrap;margin-bottom:10px}
.wa-legend b{color:var(--ink)}
.wa-arr{margin:0 10px;color:var(--gold)}
.wa-legend-note{flex-basis:100%;margin-top:6px;color:var(--warn);line-height:1.6}
.wa-mode{padding:9px 14px;border:1px solid var(--gold-line);border-radius:12px;background:var(--panel);
  font-size:var(--fs-2);color:var(--ink-dim);margin-bottom:12px}
.wa-mode b{color:var(--gold)}
.wa-mode-watch{border-style:dashed;border-color:var(--info);color:var(--info)}
.wa-mode-watch b{color:var(--info)}
.wa-list{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--panel)}
.wa-conv{border-bottom:1px solid var(--line)}
.wa-conv:last-child{border-bottom:none}
.wa-conv-main{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:11px 14px;cursor:pointer}
.wa-conv-main:hover{background:var(--panel2)}
/* awaiting-approval is visually the loudest -- the one stage a human has to act on */
.wa-loud{background:var(--gold-soft);border-left:3px solid var(--gold)}
.wa-conv-who{min-width:0}
.wa-who{font-weight:600;font-size:var(--fs-3);color:var(--ink)}
.wa-msg{color:var(--ink-dim);font-size:var(--fs-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:46ch}
.wa-conv-meta{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.wa-t{color:var(--ink-faint);font-size:var(--fs-1)}
.wa-stage{font-size:10px;letter-spacing:.06em;text-transform:uppercase;border-radius:999px;padding:2px 10px;font-weight:600;white-space:nowrap}
.wa-st-new{background:var(--panel2);color:var(--info);border:1px solid var(--info)}
.wa-st-agent{background:var(--gold-soft);color:var(--gold);border:1px solid var(--gold-line)}
.wa-st-appr{background:var(--gold);color:var(--bg);border:1px solid var(--gold)}
.wa-st-replied{background:var(--panel2);color:var(--ok);border:1px solid var(--ok)}
.wa-open{padding:0 14px 14px}
.wa-open-note{font-size:var(--fs-2);color:var(--ink-dim);margin-bottom:8px}
.wa-draft{border:1px solid var(--gold-line);border-radius:12px;background:var(--panel2);padding:12px 14px}
/* [10192] A reply being WRITTEN, as opposed to .wa-draft, which is one an owner can send.
 * Deliberately quieter: a dashed edge and dimmer text, so watching never reads as something
 * finished and approvable. That distinction is the point here, not decoration. */
.wa-drafting{border:1px dashed var(--line);border-radius:12px;background:rgba(255,255,255,.02);padding:11px 13px}
.wa-drafting-head{display:flex;align-items:center;gap:6px;font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);font-weight:600;margin-bottom:7px}
.wa-drafting-text{font-size:var(--fs-2);color:var(--ink-dim);line-height:1.65;white-space:pre-wrap}
.wa-drafting-foot{font-size:11px;color:var(--ink-faint);margin-top:8px}
.wa-drafting-dots{display:inline-flex;gap:3px}
.wa-drafting-dots i{width:3px;height:3px;border-radius:50%;background:var(--gold);opacity:.35;animation:waDot 1.2s infinite}
.wa-drafting-dots i:nth-child(2){animation-delay:.18s}
.wa-drafting-dots i:nth-child(3){animation-delay:.36s}
@keyframes waDot{0%,60%,100%{opacity:.25}30%{opacity:1}}
@media(prefers-reduced-motion:reduce){.wa-drafting-dots i{animation:none;opacity:.5}}
.wa-draft-lab{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--gold);font-weight:600;margin-bottom:6px}
.wa-draft-text{font-size:var(--fs-2);color:var(--ink);line-height:1.65}
.wa-draft-edit{width:100%;box-sizing:border-box;min-height:120px;resize:vertical;font:inherit;font-size:var(--fs-3);line-height:1.55;color:var(--ink);
  background:var(--panel);border:1px solid var(--gold-line);border-radius:10px;padding:10px 12px}
.wa-draft-edit:focus{outline:2px solid var(--gold);outline-offset:1px}
.wa-draft-btns{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.wa-draft-btns .btn{min-height:44px}
.wa-draft-hint{font-size:var(--fs-1);color:var(--ink-faint);margin-top:8px;line-height:1.6}
.wa-empty{padding:36px 14px;text-align:center;color:var(--ink-dim)}
.wa-empty-box{display:inline-block;border:1px solid var(--gold-line);border-radius:12px;padding:18px 24px;
  background:var(--panel);font-size:var(--fs-2);line-height:1.7;max-width:60ch}
.wa-empty-t{font-family:var(--serif);font-size:var(--fs-4);color:var(--ink);margin-bottom:5px}
/* Phone layout (feedback #43, TeamEA, 5 Sep 2026: rows ran together and the chips were hard
 * to read). Each conversation becomes its own card with air between cards, so different chats
 * read as different chats; the preview clamps to two lines instead of running on; the stage
 * chip drops the letter-spaced caps for plain sentence case at a readable size. */
@media(max-width:640px){
  .wa-list{border:none;background:transparent;border-radius:0;overflow:visible;display:grid;gap:10px}
  .wa-conv{border:1px solid var(--line);border-radius:12px;background:var(--panel)}
  .wa-conv:last-child{border-bottom:1px solid var(--line)}
  .wa-loud{border-color:var(--gold-line)}
  .wa-conv-main{flex-wrap:wrap;padding:14px 14px 12px;gap:8px}
  .wa-conv-who{flex:1 1 100%}
  .wa-who{font-size:var(--fs-3);line-height:1.3;margin-bottom:3px}
  .wa-msg{max-width:100%;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.45}
  .wa-conv-meta{flex:1 1 100%;justify-content:space-between}
  .wa-stage{font-size:11.5px;letter-spacing:0;text-transform:none;padding:4px 11px}
  .wa-draft-lab{font-size:11.5px;letter-spacing:0;text-transform:none}
  .wa-draft-btns .btn{flex:1 1 100%}
}

/* Label chips + filter (10100). The owner's own WhatsApp Business labels: shown verbatim,
 * never re-worded, and visually quieter than a stage chip -- a stage is what the TEAM must
 * do next, a label is how the OWNER has classified this customer. Working tokens only. */
.wa-filters{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:12px}
.wa-filters-lab{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-right:2px}
.wa-chip{font-size:var(--fs-1);border:1px solid var(--line);background:var(--panel);color:var(--ink-dim);
  border-radius:999px;padding:5px 12px;cursor:pointer;min-height:32px}
.wa-chip:hover{border-color:var(--gold-line);color:var(--ink)}
.wa-chip.on{background:var(--gold-soft);border-color:var(--gold-line);color:var(--gold);font-weight:600}
.wa-labels{display:inline-flex;gap:5px;flex-wrap:wrap;margin-left:8px;vertical-align:middle}
/* The owner's colour is an ACCENT -- a dot plus a tinted edge -- never the text or a solid
 * fill. WhatsApp's palette is mid-tone and would fail contrast as a background behind ink in
 * one theme or the other; keeping the text on theme ink means a label is legible on both the
 * dark and daylight surfaces while still reading as the colour the owner picked.
 * color-mix keeps the tint derived from that one colour rather than hand-tuning 20 pairs. */
.wa-label{font-size:10px;letter-spacing:.04em;border-radius:999px;padding:1px 8px 1px 6px;
  border:1px solid var(--lc,var(--line));background:color-mix(in srgb, var(--lc,var(--panel2)) 14%, transparent);
  color:var(--ink-dim);font-weight:500;display:inline-flex;align-items:center;gap:5px}
.wa-dot{width:7px;height:7px;border-radius:50%;background:var(--lc,var(--ink-faint));flex:0 0 auto;display:inline-block}
.wa-chip .wa-dot{margin-right:2px}
@media(max-width:640px){
  .wa-labels{margin-left:0;margin-top:4px;display:flex}
  .wa-who{display:flex;flex-wrap:wrap;align-items:center}
}

/* Handling-mode control (10101), deliberately inline with the sentence that describes the
 * mode rather than tucked into a settings screen -- the copy used to point at a Settings
 * control that did not exist. */
.wa-modebtns{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.wa-mode-ask{border-color:var(--gold);background:var(--gold-soft)}

/* Existing WhatsApp thread (10102). Customer left, business right -- the one convention
 * every messaging app shares, so nobody has to be taught which side is theirs. */
.wa-thread{margin:10px 0;max-height:320px;overflow-y:auto;display:flex;flex-direction:column;gap:6px;
  padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--panel2)}
.wa-bub{max-width:78%;border-radius:12px;padding:7px 11px;font-size:var(--fs-2);line-height:1.55;
  border:1px solid var(--line);background:var(--panel);color:var(--ink)}
.wa-bub.out{margin-left:auto;background:var(--gold-soft);border-color:var(--gold-line)}
.wa-bub-t{display:block;margin-top:3px;font-size:10px;color:var(--ink-faint)}
.wa-thread-load{font-size:var(--fs-2);color:var(--ink-faint);margin:8px 0}

/* Pairing QR (4 Sep 2026). Bigger, and on white with a real quiet zone: a phone camera
   hunting finder patterns against a dark panel with no light margin is doing avoidable
   work, which is what "takes a long while to scan" actually was. The white surround only
   appears once a code is drawn (.live), so the connecting and expired states stay on the
   card's own surface. Caps at the container width so a narrow phone never clips it. */
.wa-qr{display:flex;justify-content:center;align-items:center;color:var(--ink-dim);font-size:11px;text-align:center}
.wa-qr.live{background:#fff;padding:14px;border-radius:12px;margin:0 auto;width:max-content;max-width:100%}
.wa-qr.live img,.wa-qr.live canvas{display:block;width:100%;height:auto;max-width:220px}

/* Collapsible explainer (10039/10104). Prominent on a first visit, one line afterwards:
   the flow still stated when collapsed, so nothing is hidden, only compacted. */
.wa-exp-toggle{background:none;border:none;color:var(--gold);font-size:10px;letter-spacing:.1em;
  text-transform:uppercase;font-weight:600;cursor:pointer;padding:0;display:inline-flex;align-items:center;gap:5px}
.wa-legend .wa-exp-body{flex-basis:100%;display:flex;align-items:center;flex-wrap:wrap;margin-top:7px}
.wa-legend.collapsed{gap:10px}
.wa-exp-one{color:var(--ink-dim);font-size:var(--fs-1)}
.wa-caret{font-size:9px}

/* One collapsible box for title, subtitle, flow, number, agent and mode (10039/10104,
   TeamEA: the four stacked blocks were most of the first screen). Collapsed is a single
   compact row that still carries the three facts worth knowing at a glance: whose number,
   who handles it, and which mode, so approvals never arrive unexplained. */
.wa-hero{border:1px solid var(--line);border-radius:12px;background:var(--panel);padding:14px 16px;margin-bottom:12px}
.wa-hero.collapsed{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:9px 14px}
.wa-hero-toggle{background:none;border:none;padding:0;cursor:pointer;display:inline-flex;align-items:center;gap:7px;color:var(--gold)}
.wa-hero-kick{font-size:10px;letter-spacing:.14em;text-transform:uppercase;font-weight:600}
.wa-hero-name{font-family:var(--serif);font-size:var(--fs-4);color:var(--gold)}
.wa-hero-line{font-size:var(--fs-1);color:var(--ink-dim)}
.wa-num-inline{color:var(--ok);font-family:ui-monospace,Menlo,monospace}
.wa-hero-h1{font-family:var(--serif);font-size:26px;font-weight:600;color:var(--ink);margin:6px 0 4px}
.wa-hero-h1 em{color:var(--gold);font-style:normal}
.wa-hero-sub{font-size:var(--fs-2);color:var(--ink-dim);line-height:1.6;max-width:70ch;margin-bottom:10px}
.wa-hero-flow{display:flex;align-items:center;flex-wrap:wrap;font-size:var(--fs-1);color:var(--ink-dim);
  padding:9px 12px;border:1px solid var(--gold-line);border-radius:10px;background:var(--panel2)}
.wa-hero-flow b{color:var(--ink)}
.wa-hero-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px}
.wa-hero .wa-mode{margin-top:10px;margin-bottom:0}
/* 10105: the live reply while the model is still writing; a soft caret says "still coming" */
.msg.agent.streaming .md{white-space:pre-wrap;cursor:pointer} /* 5 Sep 2026: plain text while typing, append-only, no reflow */
.msg.agent.streaming .md::after{content:"\258D";display:inline-block;margin-left:2px;opacity:.55;animation:ctxblink 1s steps(2,start) infinite}
@keyframes ctxblink{to{visibility:hidden}}
@media (prefers-reduced-motion:reduce){.msg.agent.streaming .md::after{animation:none}}
/* 5 Sep 2026: Try again under a failed reply */
.ctxdiv.retry{margin:2px 0 8px}
.ctxdiv-head.retrybtn{color:var(--gold);border:1px solid var(--gold-line);border-radius:999px;padding:7px 16px;width:auto;letter-spacing:.06em}
.ctxdiv-head.retrybtn:hover{background:var(--panel2)}
/* 10138: the memory fold shows a sense of itself, not the prose */
.ctxdiv-gist{font-size:12px;color:var(--ink-dim);line-height:1.5;padding:4px 12px 0;max-width:60ch;margin:0 auto}
.ctxdiv-chips{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;padding:6px 8px 0}
.ctxdiv-chip{font-size:11px;color:var(--gold);border:1px solid var(--gold-line);border-radius:999px;padding:2px 9px;white-space:nowrap;max-width:32ch;overflow:hidden;text-overflow:ellipsis}
.ctxdiv-chip::before{content:"open \00b7 ";color:var(--ink-faint)}

/* huddle list tidy (10215 first slice): a quiet per-row control and two folds. Always visible
 * on touch, where there is no hover to reveal it; revealed on hover or focus elsewhere. */
.hudhide{margin-left:auto;flex:0 0 auto;background:none;border:1px solid transparent;color:var(--ink-faint);font:inherit;font-size:11px;letter-spacing:.04em;padding:4px 8px;border-radius:8px;cursor:pointer;opacity:0;transition:opacity .15s,color .15s,border-color .15s}
.rosteritem:hover .hudhide,.rosteritem:focus-within .hudhide,.hudhide:focus-visible,.hudhide.on{opacity:1}
.hudhide:hover,.hudhide:focus-visible{color:var(--gold);border-color:var(--gold-line)}
@media (hover:none){.hudhide{opacity:.75}}
.hudfold{padding:12px 10px 6px;cursor:pointer;user-select:none}
.hudfold:hover{color:var(--gold)}
.hudrow{cursor:default}

/* Roster running pulse (21 Sep 2026): the same amber "mid-turn" language the Team grid's
 * .stat-dot.run already uses, brought to the Backstage rail itself, where a founder juggling
 * several agents actually watches for it. A quiet corner badge, not a banner -- a near-
 * identical banner was built and retired 4 Sep 2026 for nagging (Serena: "can u remove this
 * message"), so this stays a glance cue on the one avatar in question, never an interrupt. */
.av-wrap{position:relative;display:inline-flex;flex:0 0 auto}
.av-wrap .running-dot{position:absolute;bottom:-1px;right:-1px;width:9px;height:9px;border-radius:50%;background:var(--warn);border:2px solid var(--panel);animation:pulse 1.2s infinite;pointer-events:none}
