:root {
  --bg: #0a1020;
  --surface: #111a2e;
  --raised: #17223a;
  --ink: #e8eefc;
  --muted: #8d9bb8;
  --line: #24314f;
  --teal: #2dd4bf;
  --teal-soft: rgba(45, 212, 191, 0.16);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.16);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.16);
  --idle: #5a6a8c;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: radial-gradient(1200px 700px at 35% 30%, #12203f 0%, var(--bg) 70%);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: clamp(14px, 0.95vw, 18px);
  line-height: 1.4;
}
button { font: inherit; color: inherit; cursor: pointer; }
h2, h3, p, ul { margin: 0; }
#app { height: 100vh; display: flex; flex-direction: column; }

/* ------------------------------------------------------------- header */
.top { display: flex; align-items: center; gap: 1.5rem; padding: 0.6rem 1.1rem; border-bottom: 1px solid var(--line); background: rgba(17, 26, 46, 0.85); }
.brand { display: flex; flex-direction: column; min-width: 14rem; }
.client-name { font-weight: 700; font-size: 1.3em; letter-spacing: -0.01em; }
.sub { color: var(--muted); font-size: 0.9em; }
.scenes { display: flex; gap: 0.35rem; flex: 1; justify-content: center; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 0.25rem 0.75rem 0.25rem 0.55rem; display: flex; gap: 0.4rem; align-items: center; color: var(--muted); font-weight: 600; }
.chip span { font-weight: 500; }
.chip.done { color: var(--ink); background: var(--raised); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip:disabled { cursor: default; }
.mode { display: flex; align-items: center; gap: 0.7rem; }
.badge-mode { font-weight: 700; font-size: 0.8em; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.25rem 0.6rem; border-radius: 6px; }
.badge-mode.live { background: #dc2626; color: #fff; }
.badge-mode.replay { background: var(--raised); color: var(--muted); }
.controls { display: flex; gap: 0.35rem; }
.controls button { border: 1px solid var(--line); background: var(--raised); border-radius: 8px; padding: 0.3rem 0.75rem; }
.controls button.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); min-width: 7.2em; font-weight: 600; }

.caption { display: flex; align-items: baseline; gap: 0.8rem; padding: 0.55rem 1.1rem 0.3rem; min-height: 2.9rem; }
.scene-title { font-weight: 700; font-size: 1.25em; white-space: nowrap; }
.tag { font-size: 0.78em; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0.1rem 0.45rem; white-space: nowrap; }
.caption-text { font-size: 1.25em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.illustrated-scene .tag { border-style: dashed; border-color: var(--ink); color: var(--ink); }

/* --------------------------------------------------------------- main */
main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(330px, 1fr); gap: 0.9rem; padding: 0 1.1rem 0.9rem; }
.office { min-height: 0; display: flex; flex-direction: column; position: relative; }
.stats { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.stat { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.88em; color: var(--muted); }
.stat i { width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--idle); }
.stat.working i { background: var(--teal); }
.stat.waiting i { background: var(--amber); }
.stat.stalled i { background: var(--red); }
.legend { display: flex; gap: 1.2rem; flex-wrap: wrap; color: var(--muted); font-size: 0.88em; padding-top: 0.2rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.sw { width: 1em; height: 1em; border-radius: 4px; display: inline-block; border: 2px solid var(--idle); }
.sw.working { background: var(--teal-soft); border-color: var(--teal); }
.sw.waiting { background: var(--amber-soft); border-color: var(--amber); }
.sw.stalled { background: var(--red-soft); border-color: var(--red); border-style: dashed; }
.sw.dashed { border-style: dashed; border-color: var(--muted); }

/* ----------------------------------------------------------- the stage */
.stage { flex: 1; min-height: 0; position: relative; border-radius: 14px; overflow: hidden; background: #0a1020; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.nametag { position: absolute; left: 0; top: 0; background: rgba(8, 13, 28, 0.88); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 10px; padding: 0.18rem 0.55rem 0.22rem; white-space: nowrap; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45); will-change: transform; }
.nametag.hidden { display: none; }
.nametag .who { display: flex; align-items: center; gap: 0.38rem; }
.nametag b { font-size: 0.86em; font-weight: 700; color: #fff; }
.nametag small { display: block; font-size: 0.72em; color: #c3cee6; line-height: 1.25; }
.nametag small:empty { display: none; }
.nametag .dot { width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--idle); flex: none; }
/* A person's label is light where a bot's is dark: the people are not more agents. */
.nametag[data-kind="person"] { background: rgba(244, 236, 221, 0.96); border-color: rgba(244, 236, 221, 0.96); }
.nametag[data-kind="person"] b { color: #1b1508; }
.nametag[data-kind="person"] small { color: #4a4232; }
.nametag[data-kind="person"] .dot { background: #8a7f69; }
/* What is on the floor: shown in the presentation view too. */
.who-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1.5rem; padding-top: 0.45rem; color: var(--muted); font-size: 0.92em; }
.who-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.who-legend b { color: #e8eefc; font-weight: 700; }
.who-legend svg { width: 1.25em; height: 1.25em; flex: none; }
.who-legend .wl-bot svg { color: var(--teal); }
.who-legend .wl-person svg { color: #f4ecdd; }
.who-legend .wl-data svg { color: #9fb0d4; }
.who-legend .wl-world svg { color: #9fb0d4; }
body.present .who-legend { font-size: 1.02em; }
.nametag.working .dot { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.nametag.waiting .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.nametag.waiting { border-color: var(--amber); }
.nametag.stalled .dot { background: var(--red); }
.nametag.stalled { border-color: var(--red); }
.nametag .count:empty { display: none; }
.nametag .count { background: var(--amber); color: #1a1203; font-weight: 800; font-size: 0.8em; border-radius: 999px; min-width: 1.5em; text-align: center; padding: 0 0.35em; }

.pop { position: absolute; transform: translate(-50%, -50%); background: #fff; color: #0b1222; font-weight: 800; font-size: 0.9em; border-radius: 999px; padding: 0.2rem 0.75rem; white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); animation: rise 2.4s ease-out forwards; }
.pop.teal { background: var(--teal); }
/* A page a researcher read on the live web: a small sheet of paper, not a pill. */
.pop.page { animation: page-rise 3s ease-out forwards; border-radius: 3px 9px 3px 3px; padding: 0.22rem 0.6rem 0.26rem; font-weight: 700; font-size: 0.8em; background: #fdfcf7; border-left: 4px solid var(--teal); }
.pop.page.unread { border-left-color: var(--red); color: #5b6478; text-decoration: line-through; }
.pop.amber { background: var(--amber); }
.pop.red { background: var(--red); }
/* Rises further than a pill, so pages read one after another stack up over the desk and do not cover each other. */
@keyframes page-rise { 0% { opacity: 0; margin-top: 16px; } 10% { opacity: 1; margin-top: 4px; } 80% { opacity: 1; } 100% { opacity: 0; margin-top: -96px; } }
@keyframes rise { 0% { opacity: 0; margin-top: 14px; } 12% { opacity: 1; margin-top: 0; } 75% { opacity: 1; } 100% { opacity: 0; margin-top: -30px; } }

.flycard { position: absolute; left: 0; top: 0; background: #fff; color: #0b1222; font-weight: 700; font-size: 0.86em; border-radius: 8px; padding: 0.28rem 0.7rem; white-space: nowrap; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55); will-change: transform; }
.flycard.ask { background: var(--amber); }
.flycard.yes { background: var(--teal); }
.flycard.no { background: var(--red); }

.minitag, .porttag { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform; font-size: 0.7em; font-weight: 600; border-radius: 999px; padding: 0.05rem 0.45rem; }
.minitag.hidden, .porttag.hidden { display: none; }
.huddletag { background: var(--teal); color: #04201c; border-color: transparent; }
.minitag { background: rgba(8, 13, 28, 0.78); color: #dbe6ff; border: 1px dashed rgba(255, 255, 255, 0.35); }
.porttag { background: rgba(8, 13, 28, 0.88); color: #fff; border: 1px solid rgba(255, 255, 255, 0.25); font-size: 0.8em; font-weight: 700; }

.bubble { position: absolute; transform: translate(-50%, -100%); max-width: 15em; background: #fff; color: #0b1222; font-size: 0.88em; font-weight: 600; line-height: 1.25; border-radius: 12px; padding: 0.4rem 0.65rem; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55); animation: speak 0.25s ease-out; }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-top-color: #fff; border-bottom: 0; }
@keyframes speak { from { opacity: 0; margin-top: 8px; } to { opacity: 1; margin-top: 0; } }

.showcase { position: absolute; transform: translate(-50%, -100%); animation: present 4.6s ease-out forwards; filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.65)); font-size: 0.82em; }
.showcase .art { margin: 0; }
@keyframes present { 0% { opacity: 0; scale: 0.5; } 9% { opacity: 1; scale: 1.04; } 14% { scale: 1; } 86% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 0.7; } }

/* ------------------------------------------------------------- the work */
.art { margin: 0.2rem 0; border-radius: 10px; overflow: hidden; background: #0e1730; border: 1px solid var(--line); }
.art figcaption { font-size: 0.82em; font-weight: 700; color: var(--ink); }
.art-row { display: flex; gap: 0.5rem; }
.art-row .ad { flex: 1; min-width: 9.5em; }

.ad { position: relative; width: 100%; max-width: 17em; background: #fff; border: 0; }
.ad-scene { position: relative; height: 5.2em; overflow: hidden; background: linear-gradient(#ffd9a0, #f08a5d 55%, #b83b5e); }
.ad-scene .sun { position: absolute; right: 14%; top: 16%; width: 1.5em; height: 1.5em; border-radius: 50%; background: #fff6d6; }
.ad-scene .peak { position: absolute; bottom: 0; background: #1f3b4d; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.ad-scene .p1 { left: -6%; width: 58%; height: 78%; }
.ad-scene .p2 { left: 34%; width: 52%; height: 58%; background: #2c5364; }
.ad-scene .p3 { left: 62%; width: 50%; height: 70%; background: #16303f; }
.theme-forest .ad-scene { background: linear-gradient(#cdebd9, #6fbf8f 60%, #2f7d5b); }
.theme-forest .peak { background: #1d4d3a; }
.theme-forest .p2 { background: #2a6b50; }
.theme-forest .p3 { background: #143c2d; }
.theme-sale .ad-scene { background: linear-gradient(#ffe1e1, #ff8a7a 60%, #d6423a); }
.theme-sale .peak { background: #6b1f1f; }
.theme-sale .p2 { background: #8a2a2a; }
.theme-sale .p3 { background: #4f1616; }
.ad figcaption { padding: 0.45rem 0.6rem 0.55rem; display: flex; flex-direction: column; gap: 0.25rem; color: #14202b; }
.ad .ad-brand { font-size: 0.6em; letter-spacing: 0.14em; font-weight: 700; color: #5d6b70; }
.ad strong { font-size: 1.02em; line-height: 1.2; color: #14202b; }
.ad .ad-fixed { font-size: 0.62em; font-weight: 600; color: #3b4a5a; border-top: 1px solid rgba(20, 32, 43, 0.18); padding-top: 0.2rem; }
.art.test { padding: 0.5rem 0.65rem; display: grid; gap: 0.3rem; min-width: 20em; }
.art.test .td-hyp { font-weight: 700; font-size: 1.02em; line-height: 1.3; }
.art.test .td-arms { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.art.test .td-arms div { flex: 1 1 8em; border: 1px solid var(--line); border-radius: 8px; padding: 0.3rem 0.5rem; font-size: 0.9em; }
.art.test .td-arms b { display: inline-block; margin-right: 0.4em; color: var(--teal); }
.art.test .td-arms i { font-style: normal; font-size: 0.72em; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.art.test .td-row { display: grid; grid-template-columns: 8.5em 1fr; gap: 0.5rem; font-size: 0.82em; }
.art.test .td-row span { color: var(--muted); font-weight: 700; }
.ad .ad-cta { align-self: flex-start; background: #14202b; color: #fff; font-size: 0.72em; font-weight: 700; border-radius: 999px; padding: 0.15rem 0.6rem; }
.ad .ad-version { position: absolute; top: 0.35rem; left: 0.35rem; background: rgba(8, 13, 28, 0.82); color: #fff; font-size: 0.66em; font-weight: 700; border-radius: 6px; padding: 0.05rem 0.4rem; }

.bars, .profile { padding: 0.55rem 0.7rem 0.6rem; min-width: 17em; }
.bars figcaption, .profile figcaption { margin-bottom: 0.4rem; }
.bar-row { display: grid; grid-template-columns: 8.2em 1fr auto; align-items: center; gap: 0.5rem; font-size: 0.8em; color: var(--muted); padding: 0.1rem 0; }
.bar-track { height: 0.75em; background: rgba(255, 255, 255, 0.07); border-radius: 999px; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: #6f8fe0; border-radius: 999px; }
.bar-note { font-variant-numeric: tabular-nums; color: var(--ink); }
.bar-row.flag { color: var(--red); font-weight: 700; }
.bar-row.flag .bar-track i { background: var(--red); }
.bar-row.flag .bar-note { color: var(--red); }
.profile dl { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.8rem; margin: 0; font-size: 0.82em; }
.profile dt { color: var(--muted); }
.profile dd { margin: 0; color: var(--ink); font-weight: 600; }

/* -------------------------------------------------------------- panel */
.panel { min-height: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.panel section { min-height: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.panel .door { flex: 2.4; min-height: 15rem; }
.panel:has(.door) .found { flex: 0.6; }
.panel:has(.door) .logged { flex: 0.4; }
.panel .door .desk-form textarea { min-height: 2.6rem; height: 2.6rem; }
.panel .door #door { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.panel .elsewhere { flex: 0 0 auto; max-height: 30%; border-color: #fbbf24; }
.panel .elsewhere[hidden] { display: none; }
.waiting-row { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.55rem 0.8rem; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.waiting-row:hover { background: rgba(255, 255, 255, 0.04); }
.waiting-row span { color: var(--muted); font-size: 0.85em; }
.waiting-row .go { color: #2dd4bf; font-weight: 600; }
.waiting-lost { color: var(--muted); padding: 0 0.8rem 0.7rem; margin: 0; font-size: 0.9em; }
.floor-tabs { display: flex; gap: 0.35rem; margin-top: 0.35rem; flex-wrap: wrap; }
.floor-tab { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 0.82em; }
.floor-tab:hover { color: inherit; border-color: var(--muted); }
.floor-tab.here { color: inherit; border-color: #2dd4bf; }
.floor-tab .count { background: #fbbf24; color: #1a1305; border-radius: 999px; padding: 0 0.4rem; font-weight: 700; font-size: 0.9em; }
.panel .needs { flex: 1.35; }
.panel .needs:has(.empty) { flex: 0 0 auto; }
.panel .found { flex: 1.1; }
.panel .logged { flex: 0.85; }
/* The newest finding carries a chart and nothing waits on a person: give it the room to be seen whole. */
.panel:has(.needs .empty) .found:has(.card-finding:first-child :is(.trend, .test)) { flex: 3; }
/* A card that is waiting on a person gets the room: the log steps back. */
.panel:has(.needs .card-decision) .needs { flex: 2.2; }
.panel:has(.needs .card-decision) .logged { flex: 0.5; }
.panel h2 { font-size: 0.82em; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); padding: 0.55rem 0.8rem 0.4rem; display: flex; align-items: center; gap: 0.5rem; }
.count:not(:empty) { background: var(--amber); color: #1a1203; border-radius: 999px; padding: 0 0.5rem; font-size: 1.05em; letter-spacing: 0; font-weight: 800; }
.scroll { overflow-y: auto; padding: 0 0.8rem 0.8rem; display: flex; flex-direction: column; gap: 0.6rem; scrollbar-color: var(--line) transparent; }
.empty { color: var(--muted); padding: 0.3rem 0; }

.card-decision, .card-finding { border: 1px solid var(--line); border-radius: 10px; padding: 0.65rem 0.75rem; display: flex; flex-direction: column; gap: 0.35rem; background: var(--raised); }
.card-decision { border-left: 5px solid var(--amber); }
.card-decision.level4 { border-left-color: var(--red); }
.card-decision.nudged { box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.45); }
.card-finding h3, .card-decision h3 { font-size: 1.05em; line-height: 1.25; }
.meta { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.82em; color: var(--muted); }
.owner { font-weight: 700; color: var(--ink); }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--amber); }
.countdown.late { color: var(--red); }
.evidence { padding-left: 1.1rem; color: var(--muted); font-size: 0.9em; }
.source, .reco { font-size: 0.88em; color: var(--muted); }
.reco { color: var(--ink); }
.flags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.pill { font-size: 0.76em; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.5rem; color: var(--muted); white-space: nowrap; }
.pill.teal { background: var(--teal-soft); border-color: var(--teal); color: var(--teal); }
.pill.amber { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); }
.pill.red { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.pill.dashed { border-style: dashed; border-color: var(--muted); }
.pill.conf-high { border-color: var(--teal); color: var(--teal); }
.pill.conf-medium { border-color: var(--amber); color: var(--amber); }
.pill.conf-low { border-color: var(--red); color: var(--red); }
.row { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-top: 0.2rem; }
/* A long card must never hide its own buttons: they stay at the foot of the panel while the card scrolls behind them. */
.card-decision > .row { position: sticky; bottom: -0.8rem; background: var(--raised); padding: 0.45rem 0 0.5rem; margin-bottom: -0.3rem; box-shadow: 0 -10px 12px -8px rgba(0, 0, 0, 0.55); }
.btn { border: 1.5px solid var(--muted); background: transparent; border-radius: 8px; padding: 0.4rem 0.8rem; font-weight: 600; display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #04201c; }
.btn:disabled { opacity: 0.45; cursor: default; }
.rec { font-size: 0.68em; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.8; }
.recorded { font-size: 0.8em; color: var(--muted); }
/* in a take: a card the script will answer steps back, so the cards that are yours stand out */
.card-decision.by-script { opacity: 0.55; border-style: dashed; }
.recorded.by-script { font-size: 0.95em; font-weight: 700; color: var(--amber); }
.words textarea { width: 100%; min-height: 4.2em; font: inherit; padding: 0.45rem; border: 1.5px solid var(--muted); border-radius: 8px; resize: vertical; background: var(--bg); color: var(--ink); }

.logrow { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.93em; }
.logrow.objection { background: var(--red-soft); border-radius: 8px; padding: 0.3rem 0.4rem; }
.dot { flex: none; width: 0.65em; height: 0.65em; border-radius: 50%; margin-top: 0.45em; background: var(--muted); }
.dot.yes { background: var(--teal); }
.dot.no { background: var(--red); }
.logrow q { display: block; color: var(--muted); font-style: italic; }
.when { display: block; font-size: 0.82em; color: var(--muted); }

/* -------------------------------------------------------- client view */
body.client-view { font-size: 17px; }
body.client-view #app { height: auto; min-height: 100vh; max-width: 34rem; margin: 0 auto; padding: 1rem 1rem 3rem; gap: 0.8rem; }
.client-top { padding-top: 0.4rem; }
.assistant-note { color: var(--muted); font-size: 0.9em; }
#client-cards, #client-done { display: flex; flex-direction: column; gap: 0.8rem; }
.client-h2 { font-size: 0.82em; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin-top: 0.8rem; }
body.client-view .btn { padding: 0.75rem 1rem; flex: 1; align-items: center; }
body.client-view .card-decision { padding: 0.9rem; }

@media (max-width: 900px) {
  body:not(.client-view) #app { height: auto; }
  main { grid-template-columns: 1fr; }
  /* In a narrow window the page scrolls, so the office needs a height of its own. */
  .stage { flex: none; aspect-ratio: 4 / 3; }
  .top { flex-wrap: wrap; }
  .panel section { max-height: 60vh; }
}

@media (prefers-reduced-motion: reduce) {
  .pop, .pop.page { animation: none; }
}



/* ------------------------------------------------- views, votes, scoreboard */
.views { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.view { border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.55rem; background: rgba(248, 113, 113, 0.07); }
.view span { display: block; font-size: 0.72em; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.15rem; }
.view p { font-size: 0.9em; }
.votes { border-top: 1px dashed var(--line); padding-top: 0.45rem; display: flex; flex-direction: column; gap: 0.3rem; }
.votes-title { font-size: 0.8em; font-weight: 700; color: var(--amber); }
.vote-row { display: grid; grid-template-columns: 8em 1fr 2.2em; align-items: center; gap: 0.5rem; font-size: 0.85em; }
.vote-track { height: 0.8em; background: rgba(255, 255, 255, 0.07); border-radius: 999px; overflow: hidden; }
.vote-track i { display: block; height: 100%; background: var(--amber); border-radius: 999px; transition: width 0.4s; }
.vote-row b { text-align: right; font-variant-numeric: tabular-nums; }
.room-note { background: var(--amber-soft); border: 1px solid var(--amber); color: var(--amber); border-radius: 10px; padding: 0.5rem 0.7rem; font-weight: 600; }

.score { margin-left: auto; display: inline-flex; flex-wrap: wrap; gap: 0.4rem; }
.score > span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.88em; color: var(--muted); }
.score b { color: var(--ink); font-variant-numeric: tabular-nums; }
.keys { margin-left: auto; opacity: 0.7; }

#join-corner { position: absolute; right: 0.8rem; top: 3rem; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; background: rgba(8, 13, 28, 0.9); border: 1px solid var(--amber); border-radius: 12px; padding: 0.5rem; max-width: 9.5rem; text-align: center; font-size: 0.8em; font-weight: 600; color: var(--amber); }
#join-corner:empty { display: none; }
#join-corner img { width: 8rem; height: 8rem; background: #fff; border-radius: 8px; }

#curtain { position: absolute; inset: 0; z-index: 5; display: none; align-items: center; justify-content: center; background: rgba(5, 9, 20, 0.9); border-radius: 14px; }
#curtain.show { display: flex; }
.curtain-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.7rem; max-width: 34rem; padding: 1.5rem; }
.curtain-card h2 { font-size: 2.2em; letter-spacing: -0.01em; text-transform: none; color: var(--ink); padding: 0; }
.curtain-card p { font-size: 1.25em; color: var(--muted); }
.curtain-card .qr { width: min(46vh, 26rem); height: min(46vh, 26rem); background: #fff; border-radius: 16px; padding: 0.6rem; }
.curtain-card .qr.small { width: 7rem; height: 7rem; padding: 0.3rem; border-radius: 10px; }
.curtain-card.wide { max-width: 62rem; width: 92%; max-height: 94%; align-items: stretch; text-align: left; }
.curtain-card.wide h2 { text-align: center; }
.curtain-card h3 { font-size: 0.85em; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.big-numbers { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.big-numbers div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0.8rem 1.1rem; min-width: 9rem; text-align: center; }
.big-numbers b { display: block; font-size: 2.2em; line-height: 1.1; color: var(--teal); font-variant-numeric: tabular-nums; }
.big-numbers span { font-size: 0.85em; color: var(--muted); }
.trail { overflow-y: auto; min-height: 0; flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 1rem; }
.kit { display: flex; align-items: center; gap: 0.8rem; justify-content: center; color: var(--muted); }

/* ------------------------------------------------ lists and the readout */
.list, .readout { padding: 0.55rem 0.7rem 0.6rem; min-width: 17em; }
.list figcaption, .readout figcaption { margin-bottom: 0.4rem; }
.list ol { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.88em; }
.list li strong { display: block; color: var(--ink); }
.list li span { color: var(--muted); }
.slides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
.slide { position: relative; background: #fff; color: #14202b; border-radius: 6px; padding: 0.45rem 0.5rem 0.5rem; min-height: 5.2em; aspect-ratio: 16 / 10; display: flex; flex-direction: column; gap: 0.2rem; }
.slide strong { font-size: 0.8em; line-height: 1.15; padding-right: 1.2em; }
.slide p { font-size: 0.7em; line-height: 1.25; color: #46545c; }
.slide-n { position: absolute; right: 0.35rem; top: 0.25rem; font-size: 0.62em; font-weight: 700; color: #8a969c; }
.showcase .readout, .showcase .list { min-width: 26em; }

/* -------------------------------------------------------------- briefing */
.briefing { padding: 0.55rem 0.7rem 0.65rem; min-width: 22em; max-width: 30em; }
.briefing figcaption { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; }
.art-count { color: var(--teal); font-weight: 700; }
.briefing dl { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.7rem; margin: 0; font-size: 0.8em; }
.briefing dt { color: var(--muted); font-weight: 700; }
.briefing dd { margin: 0; color: var(--ink); }
.ask-title { margin-top: 0.5rem; font-size: 0.72em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--amber); }
.briefing ol { margin: 0.15rem 0 0; padding-left: 1.2rem; font-size: 0.82em; color: var(--ink); }

/* ------------------------------------------------ regions and mini cards */
.regions, .cards { padding: 0.55rem 0.7rem 0.65rem; min-width: 20em; }
.regions figcaption, .cards figcaption { margin-bottom: 0.4rem; }
.region-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.3rem; }
.region { border-radius: 8px; padding: 0.3rem 0.5rem 0.35rem; background: rgba(45, 212, 191, calc(0.1 + var(--heat) * 0.008)); color: var(--ink); display: flex; flex-direction: column; }
.region span { font-size: 0.72em; font-weight: 700; }
.region b { font-size: 1.25em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mini-card { border: 1px solid var(--line); border-radius: 8px; padding: 0.3rem 0.55rem 0.35rem; margin-top: 0.3rem; display: flex; flex-direction: column; }
.mini-card strong { font-size: 0.86em; color: var(--ink); }
.mini-card span { font-size: 0.78em; color: var(--muted); }
.mini-card.flag { border-color: var(--amber); background: var(--amber-soft); }
.mini-card.flag span { color: var(--amber); }

/* ------------------------------------------------- live sources, access */
.links { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.links a { font-size: 0.76em; font-weight: 600; color: var(--teal); border: 1px solid var(--teal); border-radius: 999px; padding: 0.02rem 0.5rem; text-decoration: none; }
.links a:hover { background: var(--teal-soft); }
.ask-title.access { color: var(--teal); }
.briefing ul { margin: 0.15rem 0 0; padding-left: 1.1rem; font-size: 0.8em; color: var(--muted); }
.briefing ul strong { color: var(--ink); }

/* ----------------------------------------------- Tech, Targets or Talent */
.lens { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; font-size: 0.88em; }
.lens i { font-style: normal; padding: 0.15rem 0.7rem; color: var(--idle); }
.lens i + i { border-left: 1px solid var(--line); }
.lens i.on { background: var(--teal); color: #04201c; font-weight: 700; }

/* ------------------------------------------------- the deliverable view */
.deliverable h2 small { font-size: 0.5em; color: var(--amber); font-weight: 700; margin-left: 0.5rem; }
.deck { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; min-height: 0; flex: 1; }
.deck-slide { position: relative; border-radius: 14px; padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: 0.45rem; overflow: auto; }
.deck-slide.written { background: #fff; color: #14202b; }
.deck-slide.draft { border: 2px dashed var(--muted); color: var(--ink); }
.deck-slide h3 { font-size: 1.35em; letter-spacing: 0; text-transform: none; color: inherit; line-height: 1.2; padding-right: 5.5em; }
.deck-slide p { font-size: 1.05em; color: inherit; opacity: 0.85; }
.deck-n { font-weight: 700; opacity: 0.5; }
.deck-stamp { position: absolute; right: 0.8rem; top: 0.8rem; font-size: 0.75em; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 8px; padding: 0.2rem 0.6rem; color: #0b1222; background: var(--teal); }
.deck-stamp.change { background: var(--amber); }
.deck-stamp.stop { background: var(--red); }
.deck-stage { font-size: 0.78em; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #0c8f80; }
.deck-slide.draft .deck-stage { color: var(--teal); }
.deck-rests { margin-top: 0.4rem; font-size: 0.72em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.6; }
.deck-slide ul { margin: 0; padding-left: 1.1rem; font-size: 0.82em; display: flex; flex-direction: column; gap: 0.3rem; }
.deck-slide li span { display: block; opacity: 0.7; }
.deck-note { text-align: center; font-size: 0.95em; }

/* Handover to another office, and the comparison shown after it */
.curtain-card .kicker { font-size: 0.85em; letter-spacing: 0.12em; text-transform: uppercase; color: #2dd4bf; }
#curtain.handover { animation: handover-in 0.5s ease-out; }
@keyframes handover-in { from { opacity: 0; } to { opacity: 1; } }
.office-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.office-col { border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; padding: 1rem 1.2rem; background: rgba(255, 255, 255, 0.03); }
.office-col h3 { font-size: 1.3em; letter-spacing: 0; text-transform: none; color: var(--ink); margin-bottom: 0.6rem; }
.office-col dl { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 0.9rem; margin: 0; }
.office-col dt { color: var(--muted); font-size: 0.85em; white-space: nowrap; }
.office-col dd { margin: 0; }
.curtain-card.changed .same { font-size: 1.1em; text-align: center; }
.curtain-card.changed .hint { font-size: 0.9em; text-align: center; }
@media (max-width: 900px) { .office-cols { grid-template-columns: 1fr; } }

/* ---- approved changes: what the bots carry from one run to the next */
.stat.guided i { background: #2dd4bf; }
.card-finding .what-if { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; align-items: baseline; font-size: 0.86em; color: var(--muted); }
.card-finding .what-if b { color: var(--amber); font-size: 1.1em; }
.card-finding .what-if span::before { content: '· '; }
.card-finding .instruction { border-left: 3px solid #2dd4bf; padding: 0.35rem 0.6rem; margin: 0.4rem 0; font-style: italic; }
.learned { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.45rem; text-align: left; }
.learned li { border-left: 3px solid #2dd4bf; padding: 0.3rem 0.7rem; }
.learned li strong { margin-right: 0.4rem; }
.learned li span { display: block; opacity: 0.7; font-size: 0.85em; }
.card-finding .caution, .card-decision .caution { border-left: 3px solid #fbbf24; padding: 0.35rem 0.6rem; margin: 0.4rem 0; color: #fde68a; }
/* The closing screen holds more than one tall section now: the card scrolls, and no section is squeezed. */
.curtain-card.wide { overflow-y: auto; }
.curtain-card.wide > * { flex-shrink: 0; }
.curtain-card.wide .trail { flex: 1 1 auto; min-height: 10rem; }
/* A card that asks for notes: room to type what was said in a meeting. */
.card-decision .words.notes textarea { min-height: 11rem; }
.brief-link { color: #2dd4bf; font-weight: 600; text-decoration: none; border: 1px solid #2dd4bf; border-radius: 999px; padding: 0.1rem 0.7rem; }

/* ---- text cards: their look is in cards.css */

/* ---- inside a bot: what it was sent, what it sent back, what was checked */
.nametag[data-who] { pointer-events: auto; cursor: pointer; }
.nametag[data-who]:hover { border-color: #2dd4bf; }
#curtain.inspecting { background: rgba(5, 9, 20, 0.97); align-items: stretch; }
.inspect { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 0.6rem; padding: 1rem 1.2rem; text-align: left; min-height: 0; }
.insp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.insp-head .tc-kicker { margin: 0; font-size: 0.8em; letter-spacing: 0.14em; text-transform: uppercase; color: #2dd4bf; }
.insp-head h2 { margin: 0; padding: 0; font-size: clamp(1.5rem, 2.2vw, 2.2rem); text-transform: none; letter-spacing: -0.01em; color: #e8eefc; }
.insp-head h2 small { font-size: 0.5em; font-weight: 500; color: #8d9bb8; margin-left: 0.6rem; letter-spacing: 0; }
.insp-hint { margin: 0; font-size: 0.82em; color: #8d9bb8; white-space: nowrap; }
.insp-task { margin: 0; font-size: 1.15em; color: #e8eefc; }
.insp-task span { color: #fbbf24; font-size: 0.85em; margin-left: 0.5rem; }
.insp-none { font-size: 1.15em; color: #b9c5de; max-width: 46rem; }
.insp-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 0.6rem; }
.insp-grid section { min-height: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.insp-grid h3, .insp-foot b { font-size: 0.82em; letter-spacing: 0.07em; text-transform: uppercase; color: #8d9bb8; margin: 0; padding: 0; }
.insp-grid h3 b, .insp-foot > p > b { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: #2dd4bf; color: #04201c; font-size: 1em; margin-right: 0.4em; letter-spacing: 0; }
.insp-box { flex: 1; min-height: 0; overflow: auto; background: #0b1226; border: 1px solid #24314f; border-radius: 10px; padding: 0.6rem 0.75rem; }
.insp-box pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 0.92em/1.45 ui-monospace, "Cascadia Mono", Consolas, monospace; color: #dbe4f8; }
.insp-box details { border-bottom: 1px solid #1a2545; padding: 0.25rem 0; }
.insp-box details:last-child { border-bottom: 0; }
.insp-box summary { cursor: pointer; color: #8fa2c9; font-size: 0.9em; padding: 0.15rem 0; }
.insp-box details[open] summary { color: #2dd4bf; margin-bottom: 0.3rem; }
.insp-tools { margin: 0.5rem 0 0; color: #fbbf24; font-size: 0.9em; }
.insp-foot { border: 1px solid #24314f; border-left-width: 4px; border-radius: 10px; padding: 0.55rem 0.8rem; background: #0b1226; }
.insp-foot p { margin: 0; font-size: 1.05em; color: #dbe4f8; }
.insp-foot.accepted { border-left-color: #2dd4bf; }
.insp-foot.refused { border-left-color: #f87171; }
.insp-foot.passed { border-left-color: #5a6a8c; }
.insp-foot .insp-cost { font-size: 0.85em; color: #8d9bb8; margin-top: 0.2rem; }

/* What a simulated room said: one block per persona. */
.art.reactions { padding: 0.45rem 0.6rem 0.5rem; }
.art.reactions figcaption { display: flex; justify-content: space-between; gap: 0.6rem; }
.reaction { border-top: 1px solid var(--line); margin-top: 0.4rem; padding-top: 0.35rem; }
.reaction .r-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; }
.reaction .r-who strong { font-size: 0.86em; color: var(--ink); }
.reaction .r-who i { font-style: normal; font-size: 0.72em; color: var(--muted); }
.reaction .r-mark { font-size: 0.68em; font-weight: 700; border-radius: 999px; padding: 0.02rem 0.45rem; border: 1px solid var(--line); color: var(--muted); }
.reaction .r-mark.yes { color: var(--teal); border-color: var(--teal); }
.reaction .r-mark.no { color: var(--amber); border-color: var(--amber); }
.reaction p { margin: 0.2rem 0 0; font-size: 0.84em; color: var(--ink); }
.reaction small { display: block; font-size: 0.74em; color: var(--muted); }
.art-note { margin: 0.45rem 0 0; font-size: 0.72em; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 0.3rem; }

/* Inside a room: its reads, and the personas in each, to pick from. */
.insp-room { display: flex; flex-wrap: wrap; gap: 0.35rem 1.4rem; }
.insp-room div { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.insp-room span { font-size: 0.8em; letter-spacing: 0.07em; text-transform: uppercase; color: #8d9bb8; margin-right: 0.15rem; }
.insp-room button { font: inherit; font-size: 0.92em; cursor: pointer; color: #dbe4f8; background: #0b1226; border: 1px solid #24314f; border-radius: 999px; padding: 0.15rem 0.75rem; }
.insp-room button:hover { border-color: #2dd4bf; }
.insp-room button.on { background: #2dd4bf; border-color: #2dd4bf; color: #04201c; font-weight: 700; }

/* A line the script wrote for a bot, as against one a bot wrote: dashed, and a little quieter. */
.bubble.scripted { background: #e2e8f0; outline: 2px dashed #64748b; outline-offset: -2px; font-weight: 500; }
.bubble.scripted::after { border-top-color: #e2e8f0; }

/* What is still open after a room's second read. */
.art.open ol { margin: 0.2rem 0 0.1rem 1.1rem; padding: 0; }
.art.open li { font-size: 0.84em; color: var(--ink); margin: 0.15rem 0; }
.art.open .open-from { margin-left: 0.4rem; font-size: 0.82em; color: var(--muted); }
.art.open .open-none { margin: 0.15rem 0; font-size: 0.8em; color: var(--muted); }

/* ---------------------------------------------------------------- presentation mode (?present=1, or V)
   For a shared screen: what the audience reads is bigger, what only the presenter needs is gone. */
body.present .controls, body.present .legend, body.present #mode-badge { display: none; }
/* one row of scenes: numbers, with only the current one spelled out */
body.present .top { padding: 0.45rem 1.4rem; }
body.present .scenes { flex-wrap: nowrap; justify-content: flex-end; }
body.present .chip { padding: 0.2rem 0.7rem; font-size: 1em; }
body.present .chip:not(.on) span { display: none; }
body.present .chip.on { padding-right: 1rem; }
body.present .client-name { font-size: 1.5em; }
/* the caption is the line to read: two lines, large. The label that says what is real leads it. */
body.present .caption { align-items: center; gap: 1rem; padding: 0.7rem 1.4rem 0.5rem; min-height: 4.6rem; }
body.present .scene-title { display: none; }
body.present .caption .tag { font-size: 0.95em; font-weight: 800; color: #04201c; background: var(--teal); border-color: var(--teal); border-radius: 8px; padding: 0.3rem 0.7rem; }
body.present .caption-text { font-size: 1.75em; font-weight: 600; line-height: 1.2; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* the panel beside the office: larger type, and the work shown over a desk is large enough to read */
body.present main { grid-template-columns: minmax(0, 2fr) minmax(380px, 1fr); padding: 0 1.4rem 1.1rem; }
body.present .panel { font-size: 1.14em; }
body.present .stat { font-size: 1em; }
/* the scoreboard is something the talk points at: its own row, the size of everything else, numbers leading */
body.present .stats { row-gap: 0.45rem; }
body.present .stat.idle { display: none; }
body.present .score { flex-basis: 100%; margin-left: 0; gap: 0.5rem; }
body.present .score > span { font-size: 1.05em; padding: 0.2rem 0.85rem; }
body.present .score b { font-size: 1.1em; }
body.present .showcase { font-size: 1.15em; }
/* Quieter beside the office. Nothing that says what is scripted, simulated or how sure a bot is goes away. */
/* 1. work held up over a desk is not also drawn in the panel until it has come down */
body.present:has(.showcase) #findings .card-finding:first-child .art { display: none; }
/* 2. the log keeps who decided what, and "scripted"; the version and the timing are on hover */
body.present .logrow .timing, body.present .logrow .when.bare { display: none; }
/* 3. a finding is its title, its picture, what it recommends, and how sure it is */
/* Where a finding came from stays on screen in the presentation view: it is what the presenter points at. */
/* The sites a finding was read from sit right under its title, above the picture, so they are on screen without scrolling the card. */
body.present .card-finding > .meta { order: -3; }
body.present .card-finding > h3 { order: -2; }
body.present .card-finding > .links { order: -1; }
body.present .card-finding > .links::before { content: 'Read from'; color: var(--muted); font-size: 0.8em; align-self: center; margin-right: 0.15rem; }
body.present .card-finding > .links a { font-size: 0.86em; }
/* The longer source line would say the same sites again; a finding with no links keeps it. */
body.present .card-finding:has(> .links) > .source { display: none; }
body.present .card-finding:has(.art) > p:not([class]) { display: none; }
body.present .card-finding .pill:not(.teal, .amber, .red, .dashed, [class*="conf-"]) { display: none; }
body.present .bubble { font-size: 1.05em; max-width: 17em; }

/* A few years of the same weeks: earlier years quiet, this year bright, a projection as a band. */
.art.trend { padding: 0.45rem 0.6rem 0.5rem; min-width: 19em; }
.art.trend svg { display: block; width: 100%; height: auto; margin-top: 0.3rem; }
.tr-grid { stroke: #24314f; stroke-width: 1; }
.tr-axis { fill: #8d9bb8; font-size: 8px; }
.tr-line { fill: none; stroke: #5f6f93; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.tr-line.now { stroke: #2dd4bf; stroke-width: 2.8; }
.tr-band { fill: rgba(251, 191, 36, 0.28); stroke: #fbbf24; stroke-width: 1; stroke-dasharray: 3 2; }
.tr-band-label { fill: #fbbf24; font-size: 8px; font-weight: 700; }
.tr-key { display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; font-size: 0.72em; color: var(--muted); margin-top: 0.2rem; }
.tr-key span { display: inline-flex; align-items: center; gap: 0.3rem; }
.tr-key i { width: 1em; height: 0; border-top: 2px solid #5f6f93; }
.tr-key .now i { border-top: 3px solid #2dd4bf; }
.tr-key .band i { height: 0.6em; border: 1px dashed #fbbf24; background: rgba(251, 191, 36, 0.28); }
.tr-key .tr-unit { margin-left: auto; }
.showcase .trend { min-width: 24em; }

/* A card for real work may hold a whole post: keep its paragraphs. */
.card-decision > p { white-space: pre-line; }

/* A card that opens to read, shows pictures, and lets a person pick the calls that are theirs. */
.card-picture { margin: 0.4rem 0; }
.card-picture img { width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: zoom-in; display: block; }
.card-picture figcaption { font-size: 0.85em; color: var(--muted); margin-top: 0.25rem; }
.btn.read-all { align-self: flex-start; }
.calls { display: flex; flex-direction: column; gap: 0.45rem; margin: 0.3rem 0; }
.calls-title { font-size: 0.9em; color: var(--muted); }
.call { border: 1px solid var(--line); border-radius: 8px; padding: 0.4rem 0.6rem; display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.call legend { font-weight: 600; padding: 0 0.3rem; font-size: 0.95em; }
.call label { display: flex; gap: 0.45rem; align-items: flex-start; font-size: 0.9em; cursor: pointer; }
.call input { margin-top: 0.25rem; flex: none; }
#reader { width: min(820px, 94vw); max-height: 92vh; border: 1px solid var(--line); border-radius: 14px; padding: 0; background: var(--raised); color: inherit; overflow-y: auto; }
#reader::backdrop { background: rgba(4, 8, 20, 0.72); }
.reader-page { padding: 1.4rem 1.8rem 1.6rem; font-size: 1.02rem; line-height: 1.6; }
.reader-close { float: right; margin-left: 1rem; }
.reader-kicker { color: var(--muted); font-size: 0.9em; margin-bottom: 0.6rem; }
.reader-main { white-space: pre-line; font-size: 1.08em; }
.reader-page section { border-top: 1px solid var(--line); margin-top: 1.1rem; padding-top: 0.8rem; }
.reader-page h3 { font-size: 1.05em; margin-bottom: 0.3rem; }
.reader-page h4 { font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0.8rem 0 0.15rem; }
.reader-page section p { white-space: pre-line; }
.reader-page ul { padding-left: 1.2rem; }
.reader-page li { margin: 0.2rem 0; }
.reader-page figure { margin: 1rem 0; }
.reader-page figure img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #fff; display: block; }
.reader-page figcaption { font-size: 0.9em; color: var(--muted); margin-top: 0.3rem; }
.reader-note { margin-top: 1.2rem; color: var(--muted); font-size: 0.85em; }
/* A card that can be opened shows the start of its main text, not all of it. */
.card-decision > p.clamped { display: -webkit-box; -webkit-line-clamp: 7; line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }

/* A page a desk made to explore: offered on the card, opened in a locked frame. */
.card-page { border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.6rem; display: flex; flex-direction: column; gap: 0.35rem; }
.card-page p { font-size: 0.9em; }
.card-page a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.card-page .page-note { font-size: 0.8em; color: var(--muted); }
#page-viewer { width: min(1200px, 96vw); height: 92vh; border: 1px solid var(--line); border-radius: 14px; padding: 0; background: var(--raised); color: inherit; overflow: hidden; }
#page-viewer[open] { display: flex; flex-direction: column; }
#page-viewer::backdrop { background: rgba(4, 8, 20, 0.72); }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.5rem 0.8rem; font-size: 0.85em; color: var(--muted); border-bottom: 1px solid var(--line); }
#page-viewer iframe { flex: 1; width: 100%; border: 0; background: #fff; }

/* ---------------------------------------------------------------- a client's own office: one page (layout A)
   The drawing with the front door under it, and beside them a column wide enough to read and decide in. */
body.client-office main { grid-template-columns: minmax(0, 1.15fr) minmax(430px, 1fr); }
body.client-office .scenes, body.client-office .scene-title, body.client-office #scene-status { display: none; }
body.client-office .panel .elsewhere { display: none; }
body.client-office .office { gap: 0.5rem; }
body.client-office .office .stage { flex: 1.7; }
body.client-office .office .door { flex: 1; min-height: 12rem; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
body.client-office .office .door h2 { font-size: 0.82em; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); padding: 0.55rem 0.8rem 0.4rem; }
body.client-office .office .door #door { display: flex; flex-direction: column; min-height: 0; flex: 1; padding: 0 0.8rem 0.6rem; }
body.client-office .office .door .desk-thread { flex: 1; min-height: 0; overflow-y: auto; }
body.client-office .office .door .desk-form textarea { min-height: 2.6rem; height: 2.6rem; }
body.client-office .who-legend, body.client-office .legend { font-size: 0.8em; }
body.client-office .panel .needs, body.client-office .panel:has(.needs .card-decision) .needs { flex: 1; }
body.client-office .panel .needs:has(.empty) { flex: 0 0 auto; }
body.client-office .panel .found, body.client-office .panel .logged, body.client-office .panel:has(.needs .card-decision) .logged { flex: 0 1 auto; max-height: 16%; }
body.client-office .panel:has(.needs .empty) .found, body.client-office .panel:has(.needs .empty) .logged { max-height: none; flex: 1; }
body.client-office .card-decision > p.clamped { -webkit-line-clamp: 5; line-clamp: 5; }
.pill.where { border-color: #2dd4bf; color: #2dd4bf; }
.full-toggle { position: absolute; right: 0.7rem; top: 2.6rem; z-index: 5; font-size: 0.82em; padding: 0.25rem 0.7rem; opacity: 0.85; }
.full-toggle:hover { opacity: 1; }
/* The drawing alone, filling the window. */
body.office-full main { grid-template-columns: minmax(0, 1fr); }
body.office-full .panel, body.office-full .office .door, body.office-full .who-legend, body.office-full .legend { display: none; }
body.office-full .office .stage { flex: 1; }
@media (max-width: 1100px) {
  body.client-office main { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  body.client-office .office .stage { min-height: 46vh; }
}

/* One card open at a time: the others show who they are for and what they ask. */
.card-decision.compact { cursor: pointer; padding: 0.5rem 0.75rem; gap: 0.25rem; opacity: 0.92; }
.card-decision.compact:hover, .card-decision.compact:focus-visible { opacity: 1; border-color: var(--amber); outline: none; }
.card-decision.compact h3 { font-size: 0.98em; }
body.client-office .office .stage { flex: 1.45; }
body.client-office .who-legend { display: none; }
body.client-office .desk-head p[data-part="sorting"] { display: none; }

/* ---------------------------------------------------------------- a client's own office, with only what is used while working
   The stage furniture of the talk (counts, lenses, keyboard hints, the legend, "Live") is for a demo. Here the page is
   the drawing, the front door and what needs a person. History is one click away. */
body.client-office .stats, body.client-office .legend, body.client-office .who-legend, body.client-office .mode, body.client-office .brand .sub { display: none; }
body.client-office header.top { padding-bottom: 0.2rem; }
body.client-office .brand { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
body.client-office .floor-tabs { margin-top: 0; }
body.client-office .caption { font-size: 0.85em; color: var(--muted); padding-top: 0; padding-bottom: 0.35rem; }
body.client-office .caption .caption-text { font-size: 1em; }
body.client-office .full-toggle { top: 0.6rem; }
body.client-office .office .stage { flex: 2.1; }
body.client-office .office .door { flex: 1; min-height: 11rem; }
/* On this page the floors are the tabs at the top, so the front door does not list them again. */
body.client-office .office .door .desk-floors { display: none; }
body.client-office .office .door .desk-head { display: flex; justify-content: flex-end; font-size: 0.85em; margin: 0; }
body.client-office .office .door .desk-next { font-size: 0.85em; }
/* History: closed until asked for, and no empty box for findings that are not there. */
body.client-office .panel section.closed { flex: 0 0 auto; max-height: none; }
body.client-office .panel section.closed .scroll { display: none; }
body.client-office .panel .found h2, body.client-office .panel .logged h2 { cursor: pointer; padding-bottom: 0.55rem; }
body.client-office .panel .found h2::after, body.client-office .panel .logged h2::after { content: 'Show'; margin-left: auto; font-size: 0.9em; letter-spacing: 0; text-transform: none; color: #2dd4bf; }
body.client-office .panel section:not(.closed).found h2::after, body.client-office .panel section:not(.closed).logged h2::after { content: 'Hide'; }
body.client-office .panel .found:has(.empty) { display: none; }
body.client-office .panel section:not(.closed).found, body.client-office .panel section:not(.closed).logged { flex: 0 1 auto; max-height: 35%; }
/* A card that asks for one line (an address) gets one line, not a page. */
body.client-office .card-decision .words.notes textarea { min-height: 2.8rem; height: 2.8rem; }
body.client-office .brand { flex-direction: row; }
body.client-office .caption { min-height: 0; }

/* The column beside the drawing: what needs a person, or the front door, one at a time. The drawing has the whole left side. */
.panel-tabs { display: flex; gap: 0.4rem; }
.panel-tabs button { flex: 1; background: var(--surface); border: 1px solid var(--line); color: var(--muted); border-radius: 10px; padding: 0.45rem 0.7rem; font: inherit; font-size: 0.92em; cursor: pointer; }
.panel-tabs button[aria-pressed="true"] { color: inherit; border-color: #2dd4bf; }
.panel-tabs .count { background: #fbbf24; color: #1a1305; border-radius: 999px; padding: 0 0.45rem; font-weight: 700; font-size: 0.9em; margin-left: 0.3rem; }
.panel-tabs .count:empty { display: none; }
body.client-office .office .stage { flex: 1; }
body.client-office .panel[data-tab="needs"] .door, body.client-office .panel[data-tab="door"] .needs { display: none; }
body.client-office .panel .needs > h2, body.client-office .panel .door > h2 { display: none; }
body.client-office .panel .needs, body.client-office .panel .needs:has(.empty), body.client-office .panel:has(.needs .card-decision) .needs, body.client-office .panel .door { flex: 1; min-height: 0; }
body.client-office .panel .needs .scroll { padding-top: 0.6rem; }
body.client-office .panel .door #door { padding: 0.6rem 0.8rem; }
body.client-office .panel .door .desk-thread { flex: 1; min-height: 0; overflow-y: auto; }
body.client-office .panel .door .desk-form textarea { min-height: 4.2rem; height: 4.2rem; }
body.client-office .panel .door .desk-floors, body.client-office .panel .door .desk-head p[data-part="sorting"] { display: none; }
body.client-office .panel .door .desk-head { display: flex; justify-content: flex-end; font-size: 0.85em; margin: 0; }

/* When nothing waits on a person: what the office is doing, from its records. */
.quiet { padding: 0.4rem 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.quiet-head { font-size: 1.1em; margin-bottom: 0.3rem; }
.quiet h3 { font-size: 0.78em; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin-top: 0.8rem; font-weight: 600; }
.quiet ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.quiet li { border: 1px solid var(--line); border-radius: 10px; padding: 0.45rem 0.7rem; display: flex; flex-direction: column; gap: 0.1rem; }
.quiet li b { font-weight: 600; }
.quiet li span, .quiet-cost { color: var(--muted); font-size: 0.86em; }
.quiet li.new { border-color: #2dd4bf; }
.quiet li.none { color: var(--muted); border-style: dashed; }

/* Routines: work the office does on a schedule. */
body.client-office .panel .routines { flex: 1; min-height: 0; }
body.client-office .panel[data-tab="needs"] .routines, body.client-office .panel[data-tab="door"] .routines, body.client-office .panel[data-tab="routines"] .needs, body.client-office .panel[data-tab="routines"] .door { display: none; }
.routines-list { padding: 0.7rem 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.routines-head { font-size: 0.95em; }
.routine { border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 10px; padding: 0.6rem 0.75rem; display: flex; flex-direction: column; gap: 0.35rem; }
.routine.on { border-left-color: #2dd4bf; }
.routine h3 { font-size: 1.02em; }
.routine .meta { display: flex; gap: 0.6rem; align-items: center; font-size: 0.85em; color: var(--muted); }
.routine .row { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.routine select { background: var(--surface); color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 0.3rem 0.5rem; font: inherit; font-size: 0.9em; }
.routine-cost, .routine-none { color: var(--muted); font-size: 0.86em; }
.routine-runs { list-style: none; padding: 0; margin: 0.2rem 0 0; display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.86em; color: var(--muted); }
.routine-runs b { color: inherit; font-weight: 600; }
.routine-ask { border: 1px solid var(--amber); border-radius: 8px; padding: 0.45rem 0.6rem; background: rgba(251, 191, 36, 0.08); display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.92em; }
.routine-said { border: 1px solid #2dd4bf; border-radius: 8px; padding: 0.4rem 0.6rem; font-size: 0.92em; }
.routine-add { border: 1px dashed var(--line); border-radius: 10px; padding: 0.6rem 0.75rem; display: flex; flex-direction: column; gap: 0.35rem; }
.routine-add input { background: var(--surface); color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 0.4rem 0.55rem; font: inherit; }
.routine-add .btn { align-self: flex-start; }

/* Putting a card aside until later. */
.btn.small { font-size: 0.8em; padding: 0.15rem 0.55rem; }
.snooze-open { margin-left: auto; }
.snooze-menu { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; font-size: 0.85em; color: var(--muted); flex-basis: 100%; }
.aside { margin: 0.6rem 0.2rem 0.4rem; display: flex; flex-direction: column; gap: 0.35rem; }
.aside h3 { font-size: 0.78em; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.aside-row { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; border: 1px dashed var(--line); border-radius: 10px; padding: 0.4rem 0.7rem; opacity: 0.85; }
.aside-row div { display: flex; flex-direction: column; min-width: 0; }
.aside-row span { color: var(--muted); font-size: 0.85em; }
.card-note { border: 1px solid var(--amber); border-radius: 8px; padding: 0.4rem 0.6rem; margin: 0 0.2rem 0.5rem; font-size: 0.92em; }

/* What a desk wrote, laid out to read: each field under its label, each thing in a list headed by what it is. */
.brief { margin: 0.2rem 0; display: flex; flex-direction: column; gap: 0.45rem; }
.brief .part { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.brief dt { font-size: 0.74em; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.brief dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.brief dd ul { margin: 0; padding-left: 1.1rem; }
.brief .group { border: 1px solid var(--line); border-radius: 10px; padding: 0.5rem 0.7rem; margin-top: 0.25rem; display: flex; flex-direction: column; gap: 0.35rem; }
.brief .group h4 { font-size: 1em; font-weight: 600; line-height: 1.3; margin: 0; text-transform: none; letter-spacing: 0; color: inherit; }
.brief .group dl { margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.card-decision .brief dd { font-size: 0.94em; }
.card-decision .brief .group dd { display: -webkit-box; -webkit-line-clamp: 5; line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.card-decision .brief .group dd:has(ul) { display: block; }
.card-decision .backed { font-size: 0.88em; color: var(--muted); }
.card-decision .backed b { color: inherit; font-weight: 600; }
.card-decision > p:first-of-type { font-size: 1.02em; }
.reader-page .brief .part { margin-top: 0.5rem; }

/* ---------------------------------------------------------------- a card laid out for the person deciding */
.lay { display: flex; flex-direction: column; gap: 0.7rem; min-width: 0; }
.lay-block { display: flex; flex-direction: column; gap: 0.55rem; min-width: 0; }
.lay.several .lay-block { border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.8rem; }
.lay-kicker { font-size: 0.8em; letter-spacing: 0.05em; text-transform: uppercase; color: #2dd4bf; font-weight: 600; }
.lay-headline { font-size: 1.18em; font-weight: 650; line-height: 1.3; }
.lay-body { font-size: 1.02em; line-height: 1.5; }
.lay-section { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.lay-section h4 { font-size: 0.76em; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0; display: flex; gap: 0.4rem; align-items: center; }
.lay-section p, .lay-section li { font-size: 0.95em; line-height: 1.5; overflow-wrap: anywhere; }
.lay-section ul, .lay-section ol { margin: 0; padding-left: 1.15rem; display: flex; flex-direction: column; gap: 0.2rem; }
.lay-sources a, .lay-claims a { color: #2dd4bf; }
.lay-claims li span { display: block; }
.lay-claims small, .lay-reader small, .lay-answer small { color: var(--muted); font-size: 0.85em; }
/* A post, shown as the post: on a surface of its own, in the words that would go out. */
.lay-post { border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.04); padding: 0.7rem 0.85rem; display: flex; flex-direction: column; gap: 0.4rem; }
.lay-post-on { font-size: 0.78em; color: var(--muted); }
.lay-post-body { white-space: pre-line; font-size: 1.02em; line-height: 1.55; overflow-wrap: anywhere; }
.card-decision .lay-post:not(.whole) .lay-post-body { display: -webkit-box; -webkit-line-clamp: 14; line-clamp: 14; -webkit-box-orient: vertical; overflow: hidden; }
/* What a checking desk found. Something wrong is put first and marked. */
.lay-verdict { border-radius: 10px; padding: 0.55rem 0.7rem; border: 1px solid var(--line); }
.lay-verdict.good { border-color: #2dd4bf; }
.lay-verdict.bad { border-color: var(--amber); background: rgba(251, 191, 36, 0.09); }
.lay-says { font-weight: 600; }
.lay-problem { border-top: 1px solid rgba(251, 191, 36, 0.35); padding-top: 0.35rem; margin-top: 0.2rem; }
.lay-problem b { font-weight: 600; font-size: 0.95em; }
.lay-readers { display: flex; flex-direction: column; gap: 0.45rem; }
.lay-reader, .lay-answer { border-left: 3px solid var(--line); padding-left: 0.6rem; display: flex; flex-direction: column; gap: 0.15rem; align-items: flex-start; }
.lay-reader b, .lay-answer b { font-weight: 600; font-size: 0.95em; }
.lay-more { border-top: 1px solid var(--line); padding-top: 0.45rem; }
.lay-more summary { cursor: pointer; color: var(--muted); font-size: 0.9em; }
.lay-more[open] summary { margin-bottom: 0.5rem; }
.lay-more .lay-section + .lay-section { margin-top: 0.6rem; }
.card-decision .lay-section.lay-readers-wrap p { -webkit-line-clamp: 3; }
.reader-page .lay { font-size: 1.02em; gap: 1rem; }
.reader-page .lay-headline { font-size: 1.4em; }
.lay-post-hook { font-weight: 650; font-size: 1.05em; line-height: 1.45; }
.lay-empty { color: var(--amber); }

/* Where a card stands, in a line. */
.lay-glance { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.lay-glance span { font-size: 0.84em; border-radius: 999px; padding: 0.12rem 0.65rem; border: 1px solid var(--line); }
.lay-glance span.good { border-color: #2dd4bf; color: #2dd4bf; }
.lay-glance span.bad { border-color: var(--amber); color: var(--amber); background: rgba(251, 191, 36, 0.08); }
.lay-fold summary { cursor: pointer; font-size: 0.9em; color: var(--muted); display: flex; gap: 0.4rem; align-items: center; }
.lay-fold[open] summary { margin-bottom: 0.4rem; }
/* The card's title stays in view while the card is read. */
body.client-office .card-decision:not(.compact) > h3 { position: sticky; top: -0.05rem; z-index: 2; background: var(--raised); padding: 0.3rem 0; margin: -0.1rem 0; }

/* Voices: how each author this client publishes under writes. */
body.client-office .panel .voices { flex: 1; min-height: 0; }
body.client-office .panel:not([data-tab="voices"]) .voices, body.client-office .panel[data-tab="voices"] .needs, body.client-office .panel[data-tab="voices"] .door, body.client-office .panel[data-tab="voices"] .routines { display: none; }
.panel-tabs button { padding: 0.45rem 0.4rem; white-space: nowrap; }
.voices-list { padding: 0.7rem 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.7rem; }
.voice-authors { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.voice-warn { border: 1px solid var(--amber); border-radius: 8px; padding: 0.4rem 0.6rem; font-size: 0.92em; background: rgba(251, 191, 36, 0.08); }
.voice-part { border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.75rem; display: flex; flex-direction: column; gap: 0.45rem; }
.voice-part h3 { font-size: 1em; }
.voice-part h3 small { color: var(--muted); font-weight: 400; font-size: 0.85em; }
.voice-lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.voice-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.6rem; align-items: start; border-left: 3px solid var(--line); padding-left: 0.6rem; }
.voice-lines li small { grid-column: 1; color: var(--muted); font-size: 0.84em; overflow-wrap: anywhere; }
.voice-lines li > .btn, .voice-lines li > .row { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: flex; gap: 0.3rem; }
.voice-lines.proposed li { border-left-color: var(--amber); }
.voice-part form { display: flex; flex-direction: column; gap: 0.35rem; }
.voice-part form[data-voice-form="direction"] { flex-direction: row; }
.voice-part input, .voice-part textarea { background: var(--surface); color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 0.4rem 0.55rem; font: inherit; flex: 1; min-width: 0; }
.voice-part textarea { min-height: 5rem; resize: vertical; }
.voice-part form > .btn { align-self: flex-start; }
.voice-file { cursor: pointer; }
.voice-talk { display: flex; flex-direction: column; gap: 0.35rem; max-height: 16rem; overflow-y: auto; }
.voice-talk p { font-size: 0.94em; }
.voice-talk p.coach { border-left: 3px solid #2dd4bf; padding-left: 0.6rem; }
