/* Evidence Screen: the reading room. Room theme only; it does not follow the website style. */
:root {
  --room: #111317;
  --room-2: #181c22;
  --rail: #1d2229;
  --film: #2b3542;
  --line: rgba(214, 226, 238, 0.12);
  --line-ink: #c5d0da;
  --glow: #e6edf3;
  --ink: #12161b;
  --ink-2: #4a5562;
  --text: #edf1f5;
  --muted: #9aa4b1;
  --lavender: #a898ff;
  --lavender-ink: #4f3bc9;
  --on-lavender: #140f30;
  --amber: #f0b44c;
  --alert: #ff7a70;
  --alert-ink: #b4262a;
  --display: "Archivo", system-ui, sans-serif;
  --read: "Source Serif 4", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--room); color: var(--text); font-family: var(--display); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--lavender); outline-offset: 2px; }
.loading { padding: 40px; color: var(--muted); }
/* Small headings read as words, not labels: mono capitals are kept for evidence IDs and sources (design review B14). */
.eyebrow { font: 600 calc(13px * var(--text-scale, 1))/1.3 var(--display); color: var(--muted); }
.eyebrow.ink { color: var(--ink-2); }
.wordmark { font-weight: 800; font-stretch: 125%; letter-spacing: 0.06em; text-transform: uppercase; font-size: calc(13px * var(--text-scale, 1)); white-space: nowrap; }
.id { font: 600 calc(11px * var(--text-scale, 1))/1.2 var(--mono); letter-spacing: 0.04em; }
.muted { color: var(--ink-2); font-size: calc(14px * var(--text-scale, 1)); }
.small { font-size: calc(13px * var(--text-scale, 1)); color: var(--muted); line-height: 1.5; }
.link { background: none; border: none; padding: 0; color: var(--lavender-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; font-size: calc(14px * var(--text-scale, 1)); }
.link.danger { color: var(--alert-ink); }

/* Buttons */
.btn {
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid #9eaab6; background: transparent;
  font-weight: 700; font-size: calc(14px * var(--text-scale, 1)); font-stretch: 105%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn.primary { background: var(--lavender-ink); border-color: var(--lavender-ink); color: #fff; }
.btn.danger { border-color: var(--alert-ink); color: var(--alert-ink); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: calc(13px * var(--text-scale, 1)); }
.btn.ghost { border-color: var(--line); color: var(--text); }
.reader .btn.ghost { border-color: #b9c5d0; color: var(--ink); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.5; }

/* ---------- Join ---------- */
.join { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 520px) 1fr; }
.join-card { padding: 36px 48px; background: var(--room-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.join-title { margin: 14px 0 12px; font-size: clamp(40px, 5vw, 60px); line-height: 0.95; font-weight: 800; font-stretch: 122%; letter-spacing: -0.02em; }
.lede { color: #c9d1db; font: 400 calc(17px * var(--text-scale, 1))/1.55 var(--read); margin: 0 0 26px; max-width: 42ch; }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; font-weight: 700; font-size: calc(14px * var(--text-scale, 1)); border: none; padding: 0; }
.field input, .field select, .field textarea {
  min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid #3a4450; background: var(--room);
  font-weight: 500; font-size: calc(16px * var(--text-scale, 1));
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--lavender); outline: none; box-shadow: 0 0 0 3px rgba(168, 152, 255, 0.3); }
#f-code, #f-value { font-family: var(--mono); letter-spacing: 0.06em; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 18px; }
.choice button { min-height: 46px; border-radius: 999px; border: 1.5px solid #3a4450; background: transparent; font-weight: 700; font-size: calc(14px * var(--text-scale, 1)); }
.choice button[aria-pressed="true"] { background: var(--lavender); border-color: var(--lavender); color: var(--on-lavender); }
.form-error { min-height: 1.4em; color: var(--alert); font-size: calc(14px * var(--text-scale, 1)); margin: 0 0 10px; }
.reader .form-error { color: var(--alert-ink); }
.join-art { position: relative; overflow: hidden; perspective: 1400px;
  background: radial-gradient(ellipse 60% 50% at 50% 60%, rgba(196, 214, 232, 0.18), transparent 70%), radial-gradient(ellipse 80% 60% at 50% 0%, #1c2128, var(--room) 70%); }
.art-table { position: absolute; left: 50%; top: 52%; width: 640px; height: 420px; margin: -210px 0 0 -320px; border-radius: 26px;
  transform: rotateX(56deg) rotateZ(-8deg); transform-style: preserve-3d;
  background: repeating-linear-gradient(0deg, rgba(40,60,80,.06) 0 1px, transparent 1px 26px), repeating-linear-gradient(90deg, rgba(40,60,80,.06) 0 1px, transparent 1px 26px), radial-gradient(ellipse 62% 58% at 50% 44%, #fff 0%, #e9f0f6 36%, #b4c3d1 74%, #67768a 100%);
  box-shadow: 0 0 0 14px #20262e, 0 0 0 16px #2d3540, 0 0 160px 40px rgba(205, 222, 238, 0.16), 0 80px 100px rgba(0, 0, 0, 0.5); }
.art-card { position: absolute; width: 120px; height: 156px; border-radius: 6px; background: #fbfcfd; box-shadow: 8px 14px 24px rgba(30, 45, 60, 0.3); }
.art-card::before { content: ""; position: absolute; left: 12px; right: 30px; top: 18px; height: 12px; border-radius: 6px; background: #cfd8e1; box-shadow: 0 22px 0 #e1e7ed, 0 40px 0 #e1e7ed, 0 58px 0 #e1e7ed; }
.c1 { left: 80px; top: 50px; transform: rotate(-8deg); } .c2 { left: 230px; top: 40px; transform: rotate(3deg); } .c3 { left: 390px; top: 30px; transform: translateZ(50px) rotate(-2deg); outline: 3px solid var(--lavender); outline-offset: 4px; }
.art-folder { position: absolute; width: 140px; height: 96px; border-radius: 8px; background: linear-gradient(160deg, #36414f, var(--film)); top: 270px; overflow: hidden; }
.art-folder::after { content: ""; position: absolute; left: -10px; right: -10px; bottom: 16px; height: 16px; background: var(--amber); transform: rotate(-4deg); }
.f1 { left: 170px; transform: rotate(-3deg); } .f2 { left: 340px; transform: rotate(2deg); }

/* ---------- Workspace ---------- */
.ws {
  height: 100vh; min-height: 640px; display: grid; overflow: hidden;
  grid-template-columns: 300px minmax(0, 1fr) 452px; grid-template-rows: 60px minmax(0, 1fr) 76px;
  grid-template-areas: "top top top" "claims scene reader" "dock dock dock";
}
.topbar { grid-area: top; display: flex; align-items: center; gap: 22px; padding: 0 20px; border-bottom: 1px solid var(--line); min-width: 0; }
.topbar .case { color: var(--muted); font-size: calc(13px * var(--text-scale, 1)); white-space: nowrap; }
.stages { display: flex; gap: 4px; margin: 0 auto; list-style: none; padding: 0; }
.stages li { font: 500 calc(11px * var(--text-scale, 1))/1 var(--mono); color: var(--muted); padding: 8px 10px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.stages li.done { color: #c9d1db; }
.stages li.done::before { content: "✓ "; }
.stages li.now { border-color: var(--lavender); color: var(--text); }
.stages li.now::before { content: "● "; color: var(--lavender); }
.team-cluster { display: flex; align-items: center; gap: 12px; font-size: calc(13px * var(--text-scale, 1)); }
.team-cluster .btn { white-space: nowrap; }
/* The case line gives way before the team controls do. */
@media (max-width: 1499px) { .topbar .case { display: none; } }
.team-name { font-weight: 800; font-stretch: 112%; }
/* Avatars sit apart, with the online dot on the top-right rim, so both initials stay readable. */
.avatars { display: flex; gap: 5px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font: 600 calc(11px * var(--text-scale, 1)) var(--mono);
  background: var(--rail); color: var(--muted); border: 2px solid var(--room); position: relative; }
.avatar.on { color: var(--text); background: #2b3340; }
.avatar.on::after { content: ""; position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: #7ee2a8; border: 2px solid var(--room); }
.avatar.cap { box-shadow: 0 0 0 2px var(--lavender); }
.avatar.me { font-weight: 800; }
.clock { font: 500 calc(15px * var(--text-scale, 1)) var(--mono); font-variant-numeric: tabular-nums; }

.claims { grid-area: claims; background: var(--room-2); border-right: 1px solid var(--line); padding: 20px 16px; overflow: auto; }
.claims h2 { margin: 6px 0 4px; font-size: calc(22px * var(--text-scale, 1)); font-weight: 800; font-stretch: 112%; }
.claims .sub { margin: 0 0 16px; color: var(--muted); font-size: calc(13px * var(--text-scale, 1)); line-height: 1.45; }
.claim { display: block; width: 100%; text-align: left; margin: 0; padding: 14px 10px 13px 12px; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.claim:hover { background: var(--rail); }
.claim.active { background: var(--rail); box-shadow: inset 3px 0 0 var(--lavender); }
.claim q { display: block; margin-top: 6px; font: 400 calc(15px * var(--text-scale, 1))/1.35 var(--read); quotes: "“" "”"; }
.claim .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.claim .pins { font: 500 calc(11px * var(--text-scale, 1)) var(--mono); color: var(--muted); }
.status { font: 600 calc(11px * var(--text-scale, 1))/1 var(--mono); padding: 6px 9px; border-radius: 999px; letter-spacing: 0.03em; display: inline-block; }
.status.sup { background: var(--lavender); color: var(--on-lavender); }
.status.sup::before { content: "✓ "; }
.status.chal { border: 1.5px solid var(--alert); color: var(--alert); }
.status.chal::before { content: "✕ "; }
.status.open { padding-left: 0; padding-right: 0; color: var(--muted); font-weight: 500; }
.reader .status.sup { background: var(--lavender-ink); color: #fff; }
.reader .status.chal { border-color: var(--alert-ink); color: var(--alert-ink); }
.reader .status.open { color: var(--ink-2); border-color: #8995a2; }

.scene { grid-area: scene; position: relative; overflow: hidden; min-width: 0;
  background: radial-gradient(ellipse 60% 45% at 50% 60%, rgba(196, 214, 232, 0.10), transparent 70%), var(--room); }
.scene-head { position: absolute; z-index: 3; top: 18px; left: 24px; right: 24px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; pointer-events: none; }
.scene-head h1 { margin: 8px 0 6px; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.05; font-weight: 800; font-stretch: 118%; letter-spacing: -0.015em; max-width: 22ch; }
.scene-head .task { margin: 0; color: #c9d1db; font-size: calc(14px * var(--text-scale, 1)); max-width: 46ch; line-height: 1.45; }
.requests { text-align: right; flex: none; }
.tokens { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.token { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--amber); }
.token.full { background: var(--amber); box-shadow: 0 0 14px rgba(240, 180, 76, 0.55); }
.requests .count { font-size: calc(15px * var(--text-scale, 1)); font-weight: 700; margin-top: 8px; }
.stage3d { position: absolute; inset: 0; }
.table-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.table-labels { position: absolute; inset: 0; pointer-events: none; }
.table-tag {
  position: absolute; left: 0; top: 0; pointer-events: auto; white-space: nowrap; padding: 7px 11px; border-radius: 999px;
  background: rgba(14, 16, 20, 0.88); color: var(--text); border: 1px solid var(--line); font: 500 calc(12px * var(--text-scale, 1)) var(--mono);
}
.table-tag.new { border-color: var(--amber); color: var(--amber); }
.table-tag.sel { background: var(--lavender); color: var(--on-lavender); border-color: transparent; }
/* Near-edge labels (sources and tools) may wrap to two lines within their object's width. */
.table-tag.sealed, .table-tag.opened, .table-tag.tool { white-space: normal; text-align: center; line-height: 1.2; border-radius: 12px; }
.table-tag.sealed { border-color: rgba(240, 180, 76, 0.6); }
.table-tag.opened { color: #c9d1db; border-style: dashed; border-color: #5f6a78; }
/* B8: the lit table runs under the heading and the foot, so each sits on its own shade. */
.scene::before { content: ''; position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 170px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(11, 12, 15, 0.9), rgba(11, 12, 15, 0.6) 60%, rgba(11, 12, 15, 0)); }
.scene-foot { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 30px 24px 12px; margin: 0;
  background: linear-gradient(to bottom, rgba(11, 12, 15, 0), rgba(11, 12, 15, 0.92) 55%); font-size: calc(13px * var(--text-scale, 1)); color: var(--muted); display: flex; justify-content: space-between; gap: 16px; pointer-events: none; }
.scene-foot kbd { font: 500 calc(11px * var(--text-scale, 1)) var(--mono); padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); }
@media (prefers-reduced-motion: no-preference) { .table-tag.new { animation: pulse 2.4s ease-in-out infinite; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(240, 180, 76, 0.2); } }

/* Flat table when WebGL is unavailable */
.stage3d.flat .table-labels { position: absolute; inset: 150px 24px 48px; pointer-events: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; align-content: start; overflow: auto;
  padding: 18px; border-radius: 22px; background: radial-gradient(ellipse at 50% 40%, #fff, #c7d3de 80%); }
.flat-item { text-align: left; min-height: 120px; padding: 14px; border-radius: 8px; border: none; background: #fbfcfd; color: var(--ink); display: flex; flex-direction: column; gap: 6px; box-shadow: 6px 10px 18px rgba(30, 45, 60, 0.18); }
.flat-item.sealed { background: var(--film); color: #e8edf2; border-bottom: 10px solid var(--amber); }
.flat-item.opened { background: transparent; border: 2px dashed rgba(60, 75, 92, 0.45); box-shadow: none; }
.flat-item.sel { outline: 3px solid var(--lavender-ink); outline-offset: 3px; }
.flat-id { font: 600 calc(11px * var(--text-scale, 1)) var(--mono); }
.flat-title { font-weight: 800; font-size: calc(17px * var(--text-scale, 1)); line-height: 1.15; }
.flat-ask { font: 400 calc(13px * var(--text-scale, 1))/1.35 var(--read); }

/* Reader */
.reader { grid-area: reader; overflow: auto; background: var(--glow); color: var(--ink); padding: 22px 28px 40px; box-shadow: -40px 0 80px rgba(205, 222, 238, 0.08), inset 1px 0 0 #fff; }
.reader .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.reader .row > .back { flex: none; white-space: nowrap; }
.reader-mine { display: inline-block; margin-top: 8px; }
.reader .id { color: var(--lavender-ink); }
.card-title { margin: 14px 0 4px; font-size: calc(26px * var(--text-scale, 1)); line-height: 1.08; font-weight: 800; font-stretch: 112%; letter-spacing: -0.015em; }
.kind { margin: 0 0 16px; color: var(--ink-2); font-size: calc(14px * var(--text-scale, 1)); }
.doc p, .doc li { font: 400 calc(16.5px * var(--text-scale, 1))/1.55 var(--read); }
.doc .meta { font: 500 calc(13px * var(--text-scale, 1))/1.4 var(--mono); color: var(--ink-2); margin: 0 0 10px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc blockquote { margin: 0 0 16px; padding: 4px 0 4px 18px; border-left: 3px solid #b9c5d0; }
.doc blockquote p { margin: 0 0 10px; }
.table-wrap { overflow-x: auto; margin: 4px 0 18px; }
.data { width: 100%; border-collapse: collapse; font: 500 calc(14px * var(--text-scale, 1))/1.4 var(--mono); font-variant-numeric: tabular-nums; }
.data th, .data td { padding: 10px 8px; border-bottom: 1px solid var(--line-ink); text-align: left; vertical-align: top; }
.data td.num, .data th.num { text-align: right; }
.data thead th { font: 600 calc(11px * var(--text-scale, 1))/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); }
.data tfoot td { font-weight: 600; border-bottom: none; }
.section-h { font: 700 calc(15px * var(--text-scale, 1))/1.3 var(--display); color: var(--ink); margin: 26px 0 10px; }
.pin { border-radius: 14px; background: #fff; border: 1px solid #c9d4de; padding: 12px 14px; margin-bottom: 10px; }
.pin-head { display: flex; gap: 10px; align-items: center; font: 500 calc(12px * var(--text-scale, 1)) var(--mono); color: var(--ink-2); margin-bottom: 6px; }
.pin-head .link { margin-left: auto; font: 600 calc(12px * var(--text-scale, 1)) var(--display); }
.pin p { margin: 0; font: 400 calc(15px * var(--text-scale, 1))/1.45 var(--read); }
.composer { margin-top: 8px; }
.field.ink input, .field.ink select, .field.ink textarea { background: #fff; border-color: #b9c5d0; color: var(--ink); }
.field.ink textarea { resize: vertical; line-height: 1.45; font-family: var(--read); }
.field.ink:disabled, .field.ink textarea:disabled { background: #f2f5f8; }
.field legend { font-weight: 700; font-size: calc(14px * var(--text-scale, 1)); margin-bottom: 8px; padding: 0; }
.help { display: block; font-weight: 400; font-size: calc(13px * var(--text-scale, 1)); color: var(--ink-2); margin: 0 0 8px; }
.counter { font: 500 calc(12px * var(--text-scale, 1)) var(--mono); color: var(--ink-2); align-self: flex-end; }
.counter.over { color: var(--alert-ink); font-weight: 600; }
.field .by { font: 500 calc(12px * var(--text-scale, 1)) var(--mono); color: var(--ink-2); align-self: flex-end; }
.form-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.follow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: #d9e3ec; font-size: calc(14px * var(--text-scale, 1)); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--lavender-ink); }
.note { padding: 2px 0 2px 14px; border-left: 3px solid #b9c5d0; font-size: calc(14px * var(--text-scale, 1)); line-height: 1.45; }
.lead { font: 400 calc(16px * var(--text-scale, 1))/1.55 var(--read); }
.guide h2 { margin: 10px 0 6px; font-size: calc(28px * var(--text-scale, 1)); line-height: 1.08; font-weight: 800; font-stretch: 112%; }
/* The stage question is already the scene's headline; the guide gives the task instead. */
.guide h2.guide-task { font-size: calc(21px * var(--text-scale, 1)); line-height: 1.25; font-stretch: 106%; }
.roles { display: grid; gap: 10px; margin: 20px 0; }
.roles > div { padding: 12px 0 0; border-top: 1px solid #c9d4de; }
.roles p { margin: 6px 0 0; font: 400 calc(15px * var(--text-scale, 1))/1.45 var(--read); }
.role-h { font-weight: 800; font-size: calc(15px * var(--text-scale, 1)); }
.board-q { margin-top: 26px; font-weight: 800; font-size: calc(18px * var(--text-scale, 1)); line-height: 1.3; }
.board-q span { display: block; font: 600 calc(13px * var(--text-scale, 1))/1.3 var(--display); color: var(--ink-2); margin-bottom: 6px; }
.claim-quote { margin: 16px 0; font: 400 calc(22px * var(--text-scale, 1))/1.35 var(--read); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-btn { position: relative; min-height: 42px; padding: 0 14px; border-radius: 8px; border: 1.5px solid #9eaab6; background: #fff; display: inline-flex; align-items: center; font-weight: 700; font-size: calc(14px * var(--text-scale, 1)); color: var(--ink); cursor: pointer; }
.seg-btn[aria-pressed="true"], .seg-btn.on { background: var(--lavender-ink); border-color: var(--lavender-ink); color: #fff; }
.seg-btn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-btn:has(input:focus-visible) { outline: 3px solid var(--lavender-ink); outline-offset: 2px; }
.options { display: grid; gap: 8px; }
.option { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; padding: 13px 10px 13px 12px; border: 0; border-bottom: 1px solid #c9d4de; border-radius: 0; background: transparent; cursor: pointer; font-weight: 400; }
.option:first-child { border-top: 1px solid #c9d4de; }
.option:hover { background: #f4f6f9; }
.option.on { background: #ece9ff; box-shadow: inset 4px 0 0 var(--lavender-ink); }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option:has(input:focus-visible) { outline: 3px solid var(--lavender-ink); outline-offset: 2px; }
.option .letter { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #e4e9ef; font-weight: 900; font-stretch: 120%; }
.option.on .letter { background: var(--lavender-ink); color: #fff; }
.option b { display: block; font-size: calc(15px * var(--text-scale, 1)); }
.option small { display: block; margin-top: 3px; font: 400 calc(14px * var(--text-scale, 1))/1.4 var(--read); color: var(--ink-2); }
.status-line { font-weight: 700; font-size: calc(14px * var(--text-scale, 1)); padding: 10px 12px; border-radius: 12px; background: #d9e3ec; }
.status-line.done { background: #e4e0ff; color: var(--lavender-ink); }
.status-line.locked { background: #20262e; color: #fff; }
.team-panel .players { list-style: none; padding: 0; margin: 10px 0; }
.team-panel .players li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-ink); }
.team-panel .avatar { margin: 0; border-color: var(--glow); }
.pname { font-weight: 700; }
.tag { font: 600 calc(11px * var(--text-scale, 1)) var(--mono); padding: 4px 8px; border-radius: 999px; }
.tag.cap { background: var(--lavender-ink); color: #fff; }
.tag.away { border: 1px solid #8995a2; color: var(--ink-2); }
.team-panel .link { margin-left: auto; }
.invite-code { display: block; font: 600 calc(44px * var(--text-scale, 1))/1 var(--mono); letter-spacing: 0.12em; margin: 14px 0 8px; color: var(--ink); }

/* Dock */
.dock { grid-area: dock; display: flex; align-items: center; gap: 20px; padding: 0 20px; border-top: 1px solid var(--line); }
.dock .q { font-size: calc(15px * var(--text-scale, 1)); font-weight: 700; }
.dock .q span { color: var(--muted); font-weight: 500; margin-right: 8px; }
.decisions { margin-left: auto; display: flex; gap: 0; }
.dec { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 0; border: 0; border-left: 1px solid var(--line); background: transparent; font-size: calc(13px * var(--text-scale, 1)); text-align: left; }
.dec:hover:not(:disabled) { background: var(--rail); }
.dec .letter { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--lavender); color: var(--on-lavender); font-weight: 900; font-stretch: 120%; flex: none; }
.dec .stamp { font: 600 calc(10px * var(--text-scale, 1)) var(--mono); letter-spacing: 0.12em; color: var(--lavender); border: 1.5px solid var(--lavender); padding: 3px 6px; border-radius: 4px; transform: rotate(-3deg); }
.dec.wait { color: var(--muted); }
.dec.wait .letter, .dec .letter:empty { background: transparent; border: 1.5px dashed #5f6a78; color: var(--muted); }

.tabs, .phone-main { display: none; }
.offline { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 40; background: var(--amber); color: #2a1b00; font-weight: 700; padding: 10px 16px; border-radius: 999px; }
/* Above the table's keyboard hint, clear of the dock. */
.toasts { position: fixed; z-index: 50; left: 50%; bottom: 128px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: #0c0e11; color: var(--text); border: 1px solid var(--line); padding: 11px 16px; border-radius: 999px; font-size: calc(14px * var(--text-scale, 1)); font-weight: 600; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }
.toast.new { border-color: var(--amber); color: var(--amber); }
.toast.error { border-color: var(--alert); color: var(--alert); }
.toast.out { opacity: 0; visibility: hidden; }
.ended { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 15, 0.92); display: grid; place-items: center; text-align: center; padding: 24px; }
.ended h2 { font-size: calc(30px * var(--text-scale, 1)); font-weight: 800; font-stretch: 115%; }

@media (max-width: 1280px) { .ws { grid-template-columns: 250px minmax(0, 1fr) 400px; } .topbar .case { display: none; } }
@media (max-width: 1080px) { .stages li:not(.now) { display: none; } }

/* ---------- Phone ---------- */
body:has(.ws:not(.phone)) { overflow: hidden; }
@media (max-width: 899px) {
  .ws { overflow: visible; }
  .join { grid-template-columns: 1fr; }
  .join-card { padding: 32px 16px; border-right: none; }
  .join-art { display: none; }
  .ws { height: auto; min-height: 100vh; display: block; padding-bottom: 84px; }
  .topbar { position: sticky; top: 0; z-index: 10; background: var(--room); flex-wrap: wrap; gap: 6px 12px; padding: 12px 16px; }
  .topbar .wordmark { font-size: calc(11px * var(--text-scale, 1)); }
  .stages { order: 3; width: 100%; margin: 0; }
  .stages li:not(.now) { display: none; }
  .team-cluster .btn { display: none; }
  .team-cluster { margin-left: auto; }
  .claims, .dock { display: none; }
  .scene { background: none; overflow: visible; }
  .scene-head { position: static; padding: 18px 16px 6px; pointer-events: auto; flex-direction: column; }
  .scene-head h1 { font-size: calc(24px * var(--text-scale, 1)); }
  /* Off the Evidence tab the stage question is one line: the stage, then the question, cut to fit (design review B12). */
  .scene-head.compact { padding: 10px 16px 2px; }
  .scene-head.compact > div:first-child { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
  .scene-head.compact .eyebrow { flex: none; }
  .scene-head.compact h1 { margin: 0; min-width: 0; font-size: calc(14px * var(--text-scale, 1)); font-weight: 600; font-stretch: 100%; letter-spacing: 0; line-height: 1.4; color: #c9d1db;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .scene-head.compact .task, .scene-head.compact .requests { display: none; }
  .ph-claims-head h2 { margin: 4px 0 2px; font-size: calc(22px * var(--text-scale, 1)); font-weight: 800; font-stretch: 112%; }
  .ph-claims-head .sub { margin: 0; color: var(--muted); font-size: calc(13px * var(--text-scale, 1)); line-height: 1.45; }
  .requests { text-align: left; }
  .tokens { justify-content: flex-start; }
  .stage3d, .scene-foot, .scene::before { display: none; }
  .phone-main { display: grid; gap: 10px; padding: 10px 16px; }
  .ph-card { text-align: left; border: none; border-radius: 16px; padding: 14px 16px; background: var(--glow); color: var(--ink); display: grid; gap: 6px; position: relative; }
  .ph-card .row { display: flex; justify-content: space-between; }
  .ph-card .id { color: var(--lavender-ink); }
  .ph-card .src { font: 500 calc(11px * var(--text-scale, 1)) var(--mono); color: var(--ink-2); }
  .ph-card .t { font-size: calc(18px * var(--text-scale, 1)); line-height: 1.15; font-weight: 800; font-stretch: 108%; }
  .ph-card .ask { font: 400 calc(14px * var(--text-scale, 1))/1.4 var(--read); }
  .ph-card.new { outline: 2px solid var(--amber); outline-offset: 2px; }
  .new-tag { position: absolute; right: 14px; bottom: 12px; font: 600 calc(11px * var(--text-scale, 1)) var(--mono); color: #7a5200; }
  .ph-card.sealed { background: var(--film); color: #dfe5ec; }
  .ph-card.sealed .src { color: var(--muted); }
  .ph-card .seal { color: var(--amber); }
  /* Phone claims: the same ruled list as the sidebar (design review B14). */
  .ph-claims { border-top: 1px solid var(--line); }
  .ph-claims .claim { padding: 16px 4px 15px 12px; }
  .phone-main .team-panel { background: var(--glow); color: var(--ink); border-radius: 18px; padding: 16px; }
  .dec-list { display: grid; gap: 0; }
  .dec-list .dec { width: 100%; min-height: 56px; border-left: 0; border-bottom: 1px solid var(--line); }
  .empty { color: var(--muted); }
  .reader { display: none; }
  .ws.overlay .reader { display: block; position: fixed; inset: 0; z-index: 30; padding: 18px 16px 100px; }
  .ws.overlay .topbar, .ws.overlay .scene { display: none; }
  .tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; padding: 0 4px env(safe-area-inset-bottom); background: var(--room); border-top: 1px solid var(--line); }
  .tabs button { min-height: 58px; border-radius: 0; border: 0; border-top: 3px solid transparent; background: transparent; color: var(--muted); font-weight: 700; font-size: calc(14px * var(--text-scale, 1)); }
  .tabs button[aria-pressed="true"] { color: var(--text); border-top-color: var(--lavender); }
  .toasts { bottom: 90px; width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Stage 2: hints, Data Lens, Four Histories, lead reports, exchange ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tool-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.hint-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0; }
.hint-btn { border-style: dashed; }
.hint { margin: 14px 0; padding: 12px 16px; border-radius: 14px; background: #fff6e4; color: var(--ink); border: 1.5px solid var(--amber); }
.hint .section-h { margin-top: 2px; color: #7a5200; }
.hint p { margin: 0; font: 400 calc(15.5px * var(--text-scale, 1))/1.5 var(--read); }
.report-box, .prediction, .trial-summary { margin: 18px 0; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid #c9d4de; }
.report-box .section-h, .prediction .section-h, .trial-summary .section-h { margin-top: 4px; }
.report-text { font: 400 calc(16px * var(--text-scale, 1))/1.5 var(--read); margin: 6px 0; }
.prediction p, .trial-summary p { font: 400 calc(15px * var(--text-scale, 1))/1.5 var(--read); }
.ledger td.num { font-weight: 600; white-space: nowrap; }
/* Data Lens steps: plain numbered steps along a rule, not pills. */
.lens-nav ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0 4px; margin: 14px 0 8px; padding: 0; border-bottom: 1px solid var(--line-ink); }
.lens-nav-btn { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; min-height: 48px; padding: 6px 12px 9px 4px; margin-bottom: -1px;
  border: 0; border-bottom: 3px solid transparent; background: none; color: var(--ink-2); font: inherit; text-align: left; cursor: pointer; }
.lens-nav-btn:hover { color: var(--ink); }
.lens-nav-btn[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--lavender-ink); }
.lens-nav-n { grid-row: 1 / 3; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid currentColor; font: 600 calc(12px * var(--text-scale, 1)) var(--mono); }
.lens-nav-btn.complete .lens-nav-n { background: var(--lavender-ink); border-color: var(--lavender-ink); color: #fff; }
.lens-nav-t { font-weight: 700; font-size: calc(14.5px * var(--text-scale, 1)); white-space: nowrap; }
.lens-nav-c { font: 500 calc(11.5px * var(--text-scale, 1)) var(--mono); }
/* The lens: the figures being typed light up in the card's table. */
.lens-src .data td, .lens-src .data th { transition: background-color .15s, color .15s; }
.lens-src .data .lit-den { background: #e7e3ff; }
.lens-src .data .lit-num { background: var(--lavender); color: var(--on-lavender); font-weight: 700; }
.lens-src.lit-last .data .lit-num { background: #fde3e1; color: var(--alert-ink); box-shadow: inset 0 0 0 2px var(--alert-ink); }
.lens-src.lit-last .data .lit-den { background: #fff1f0; }
.lens-read { margin: 4px 0 10px; min-height: 1.4em; white-space: pre-line; font: 500 calc(13.5px * var(--text-scale, 1))/1.45 var(--mono); color: var(--lavender-ink); }
.lens-src.lit-last .lens-read { color: var(--alert-ink); }
/* The pilot as a flow of counts. */
.pilot-flow { margin: 16px 0 6px; }
.pilot-flow figcaption { font: 600 calc(11.5px * var(--text-scale, 1)) var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.pf-row { list-style: none; display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px 0; margin: 8px 0 0; padding: 0; }
.pf-box { display: flex; flex-direction: column; min-width: 120px; padding: 4px 0 6px; }
.pf-box + .pf-box { padding-left: 58px; position: relative; }
.pf-box + .pf-box::before { content: "→"; position: absolute; left: 18px; top: 6px; font-size: calc(24px * var(--text-scale, 1)); color: var(--ink-2); }
.pf-n { font: 600 calc(32px * var(--text-scale, 1))/1.1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.pf-box.empty .pf-n { color: #6b7684; }
.pf-l { font-size: calc(13px * var(--text-scale, 1)); color: var(--ink-2); }
.pf-slots { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--line-ink); font-size: calc(14px * var(--text-scale, 1)); }
.pf-slots b { font: 600 calc(18px * var(--text-scale, 1)) var(--mono); }
.pf-short { color: var(--alert-ink); }
.pf-wait { color: var(--ink-2); }
.lens-steps { list-style: none; padding: 0; margin: 10px 0 0; counter-reset: lens; }
.lens-step { padding: 14px 0; border-top: 1px solid var(--line-ink); counter-increment: lens; }
.lens-nav + .lens-wrap .lens-steps > .lens-step:first-child { border-top: 0; }
.lens-q { margin: 0 0 10px; font-weight: 700; font-size: calc(15px * var(--text-scale, 1)); line-height: 1.4; }
.lens-step .lens-q::before { content: counter(lens) ". "; color: var(--lavender-ink); }
.summary-q .lens-q::before { content: none; }
.lens-answer { margin: 0 0 4px; font: 600 calc(16px * var(--text-scale, 1)) var(--mono); color: var(--lavender-ink); }
.lens-fb { margin: 6px 0; font: 400 calc(15px * var(--text-scale, 1))/1.45 var(--read); }
.lens-fb.miss { color: var(--alert-ink); }
.working { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: #e4e9ef; font: 500 calc(13px * var(--text-scale, 1))/1.45 var(--mono); }
.lens-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.lens-form label { display: flex; flex-direction: column; gap: 4px; font-size: calc(13px * var(--text-scale, 1)); font-weight: 700; }
.lens-form input { width: 130px; min-height: 44px; padding: 8px 10px; border-radius: 10px; border: 1.5px solid #b9c5d0; background: #fff; font: 500 calc(16px * var(--text-scale, 1)) var(--mono); color: var(--ink); }
.lens-form input:focus { outline: none; border-color: var(--lavender-ink); box-shadow: 0 0 0 3px rgba(79, 59, 201, 0.25); }
.lens-form .over { font-size: calc(22px * var(--text-scale, 1)); padding-bottom: 8px; color: var(--ink-2); }
.lens-options { display: grid; gap: 8px; }
.option-btn { text-align: left; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid #b9c5d0; background: #fff; font: 400 calc(15px * var(--text-scale, 1))/1.4 var(--read); color: var(--ink); }
.option-btn:hover { border-color: var(--lavender-ink); }
.tag.opt { border: 1px solid #8995a2; color: var(--ink-2); font-size: calc(10px * var(--text-scale, 1)); }
.tl-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: calc(13px * var(--text-scale, 1)); color: var(--ink-2); }
.tl-key span { display: inline-flex; align-items: center; gap: 8px; }
.tl-key .tl-mark { position: relative; top: auto; left: auto; transform: none; display: inline-block; flex: none; }
.tl-key .tl-mark.dx { transform: rotate(45deg); }
.tl-key .tl-mark.alive { transform: none; }
.person { margin: 0; padding: 18px 0; border-top: 1px solid #c9d4de; }
.person h3 { margin: 0 0 8px; font-size: calc(17px * var(--text-scale, 1)); font-weight: 800; font-stretch: 110%; }
.tl { display: grid; grid-template-columns: 82px 1fr; gap: 2px 10px; align-items: center; margin: 8px 0; }
.tl-label { font: 600 calc(11px * var(--text-scale, 1)) var(--mono); text-transform: uppercase; color: var(--ink-2); }
.tl-track { position: relative; height: 22px; margin-right: 10px; border-radius: 6px;
  background: repeating-linear-gradient(90deg, #e4e9ef 0 1px, transparent 1px calc(100% / 12)), #f4f6f9; border: 1px solid #d5dde5; }
.tl-text { grid-column: 2; font-size: calc(13px * var(--text-scale, 1)); color: var(--ink-2); }
.tl-span { position: absolute; top: 6px; height: 10px; background: rgba(79, 59, 201, 0.25); border-radius: 5px; }
.tl-mark { position: absolute; top: 50%; width: 14px; height: 14px; transform: translate(-50%, -50%); }
.tl-mark.dx { background: var(--lavender-ink); transform: translate(-50%, -50%) rotate(45deg); width: 12px; height: 12px; }
.tl-mark.death { border-radius: 3px; }
.tl-mark.death.lc { background: var(--alert-ink); }
.tl-mark.death.other { background: #6b7684; }
.tl-mark.neg { border: 2px solid var(--ink-2); border-radius: 50%; background: #fff; }
.tl-mark.alive { width: 0; height: 0; border: 8px solid transparent; border-left: 12px solid #2f8f5b; transform: translate(-30%, -50%); }
/* Four Histories: both histories on one shared axis of years. */
.tl-chart { display: grid; grid-template-columns: 82px minmax(0, 1fr); column-gap: 10px; margin: 6px 0 2px; }
.tl-labels, .tl-plot { position: relative; height: 108px; }
.tl-labels span { position: absolute; left: 0; white-space: nowrap; line-height: 22px; font: 600 calc(11px * var(--text-scale, 1))/22px var(--mono); text-transform: uppercase; color: var(--ink-2); }
.tl-labels .yr { line-height: 16px; top: auto; }
.tl-plot { margin: 0 12px 0 4px; }
.tl-plot .tl-track { position: absolute; left: 0; right: 0; margin: 0; }
.tl-five { position: absolute; top: -5px; bottom: -5px; width: 0; border-left: 2px dotted #6b7684; }
.tl-key .tl-five { position: relative; top: auto; bottom: auto; display: inline-block; height: 14px; }
.tl-guide { position: absolute; top: 4px; height: 68px; width: 0; border-left: 2px dashed var(--alert-ink); transform: translateX(-1px); }
.tl-key .tl-guide { position: relative; top: auto; display: inline-block; height: 14px; transform: none; }
.tl-bracket { position: absolute; top: 40px; height: 7px; border: 2px solid var(--lavender-ink); border-top: 0; box-sizing: border-box; }
.tl-bracket b { position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 600 calc(11.5px * var(--text-scale, 1)) var(--mono); color: var(--lavender-ink); background: #fff; padding: 0 3px; }
.tl-axis { position: absolute; left: 0; right: 0; height: 18px; border-top: 1px solid #9eaab6; }
.tl-tick { position: absolute; top: 0; height: 4px; border-left: 1px solid #9eaab6; font: 500 calc(11px * var(--text-scale, 1)) var(--mono); color: var(--ink-2); }
.tl-tick.n { height: auto; padding-top: 6px; line-height: 12px; transform: translateX(-50%); border-left: 0; }
.tl-tick.n::before { content: ""; position: absolute; left: 50%; top: 0; height: 6px; border-left: 1px solid #9eaab6; }
.tl-texts { list-style: none; margin: 4px 0 12px; padding: 0; font-size: calc(13px * var(--text-scale, 1)); color: var(--ink-2); }
.tl-texts b { font-weight: 700; color: var(--ink); }
.hq { margin-top: 10px; }
.hq p { margin: 0 0 6px; font-size: calc(14px * var(--text-scale, 1)); font-weight: 600; }
.seg-btn.right { background: #22744a; border-color: #22744a; color: #fff; }
.seg-btn.wrong { background: #fff; border-color: var(--alert-ink); color: var(--alert-ink); }
.summary-q { margin: 18px 0; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid #c9d4de; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 10px; font-size: calc(15px * var(--text-scale, 1)); }
.checks input { width: 18px; height: 18px; accent-color: var(--lavender-ink); }
.exchange-card { margin: 0; padding: 14px 0; border-top: 1px solid #c9d4de; }
.exchange-card .pin-head .link { margin-left: auto; }
@media (max-width: 899px) {
  .toasts { top: 76px; bottom: auto; }
  .toast { font-size: calc(13px * var(--text-scale, 1)); padding: 8px 12px; }
  .ph-tools { display: flex; gap: 8px; flex-wrap: wrap; }
  .ph-tool { min-height: 48px; padding: 0 16px; border-radius: 10px; border: 1.5px solid #3d4756; background: var(--rail); color: var(--text); font-weight: 700; }
  .ph-brief { background: var(--glow); color: var(--ink); border-radius: 18px; padding: 4px 16px 14px; }
  .ph-brief .section-h { margin-top: 14px; }
  .ph-brief-foot { margin: 14px 0 0; font-size: calc(14px * var(--text-scale, 1)); color: var(--ink-2); }
  .tl { grid-template-columns: 64px 1fr; }
  .tl-chart { grid-template-columns: 76px minmax(0, 1fr); column-gap: 4px; }
  .tl-labels span { font-size: calc(10.5px * var(--text-scale, 1)); }
}

/* The learner briefing, in the guide and as its own reader. */
.briefing p { margin: 0 0 12px; font: 400 calc(15.5px * var(--text-scale, 1))/1.5 var(--read); }
.briefing .board-q { margin: 18px 0 10px; }
.brief-options { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 0; border-top: 1px solid #c9d4de; }
.brief-options li { padding: 10px 0; border-bottom: 1px solid #c9d4de; font: 400 calc(15px * var(--text-scale, 1))/1.45 var(--read); }
.mine-tag { font: 600 calc(11px * var(--text-scale, 1))/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: #6a4c00; background: #ffe7a8; border-radius: 6px; padding: 2px 6px; }
.ph-card .mine-tag { justify-self: start; }

/* ---------- Wide reader: tools and decisions take the room ---------- */
/* The table folds into a strip of its objects above the reader; every object stays a button. */
.strip, .lens-src { display: none; }
.ws.wide { grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: 60px auto minmax(0, 1fr) 76px; grid-template-areas: "top top" "claims scene" "claims reader" "dock dock"; }
@media (max-width: 1280px) { .ws.wide { grid-template-columns: 250px minmax(0, 1fr); } }
.ws.wide .scene-head, .ws.wide .stage3d, .ws.wide .scene-foot, .ws.wide .scene::before { display: none; }
.ws.wide .scene { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #1a1e24, var(--room)); }
.ws.wide .strip { display: flex; align-items: center; gap: 22px; padding: 10px 24px; min-width: 0; }
.strip-h { display: grid; gap: 5px; flex: none; }
.strip-note { font-size: calc(13px * var(--text-scale, 1)); color: #c9d1db; white-space: nowrap; }
/* The stage is named in the top bar, so the strip's own label goes first when space is short. */
@media (max-width: 1399px) { .strip-h { display: none; } }
.strip-row { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-x: auto; padding: 8px 6px 10px; scrollbar-width: thin; }
.strip-item { flex: none; }
/* Cards are small paper documents, tilted as they lie on the table. */
.strip-item.card { position: relative; width: 46px; height: 62px; padding: 7px 6px 6px; border: none; border-radius: 4px; display: flex; flex-direction: column; gap: 6px;
  background: #fbfcfd; color: var(--ink); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4); transform: rotate(var(--tilt, -1.5deg)); }
.strip-item.card:nth-child(even) { --tilt: 1.2deg; }
.strip-item.card:nth-child(3n) { --tilt: -0.4deg; }
.strip-id { font: 600 calc(11px * var(--text-scale, 1))/1 var(--mono); }
.strip-lines { flex: 1; background: repeating-linear-gradient(180deg, #cfd8e1 0 2px, transparent 2px 7px); }
.strip-item.card:hover { transform: translateY(-3px) rotate(var(--tilt)); }
.strip-item.card.sel { outline: 3px solid var(--lavender); outline-offset: 2px; transform: translateY(-4px) rotate(0deg); }
.strip-item.card.new::after { content: ""; position: absolute; right: -4px; top: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--amber); border: 2px solid var(--room); }
.strip-sep { flex: none; width: 1px; height: 40px; margin: 0 6px; background: var(--line); }
.strip-item.tool, .strip-item.sealed, .strip-item.opened { min-height: 44px; padding: 4px 13px; border-radius: 12px; display: inline-flex; align-items: center; white-space: nowrap;
  font: 500 calc(12px * var(--text-scale, 1))/1.2 var(--mono); border: 1px solid var(--line); background: var(--rail); color: var(--text); }
.strip-item.tool:hover, .strip-item.sealed:hover { border-color: var(--lavender); }
.strip-item.tool.sel { background: var(--lavender); color: var(--on-lavender); border-color: transparent; }
.strip-item.sealed { background: var(--film); border-bottom: 4px solid var(--amber); }
/* Source names may take two lines so the whole table fits across the strip. */
.strip-item.sealed, .strip-item.opened { white-space: normal; max-width: 128px; text-align: center; justify-content: center; }
.strip-item.opened { border-style: dashed; border-color: #5f6a78; color: #c9d1db; background: transparent; }
@media (prefers-reduced-motion: no-preference) {
  .strip-item.card { transition: transform 0.18s ease; }
  .ws.wide .strip-row { animation: strip-in 0.35s cubic-bezier(.2, .8, .2, 1) both; }
  .ws.wide .reader { animation: reader-in 0.3s ease both; }
}
@keyframes strip-in { from { opacity: 0; transform: translateY(-10px); } }
@keyframes reader-in { from { opacity: 0.4; } }

/* The reader centres a 1120px measure in whatever width it has. */
.reader:focus { outline: none; }
.reader:focus-visible { outline: 3px solid var(--lavender-ink); outline-offset: -3px; }
.ws.wide .reader { padding: 24px max(40px, calc((100% - 1120px) / 2)) 48px; }
.ws.wide .reader .kind, .ws.wide .reader .note, .ws.wide .reader .status-line { max-width: 76ch; }
.ws.wide .reader .trial-summary { max-width: 820px; }
.ws.wide .dec-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0 40px; align-items: start; }
.ws.wide .lens-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr); gap: 40px; align-items: start; }
/* The figures stay in view while the steps scroll; a tall pair of tables scrolls inside the panel. */
.ws.wide .lens-src { display: block; position: sticky; top: 0; max-height: calc(100vh - 290px); min-height: 200px; overflow-y: auto; padding: 2px 18px 6px; border-radius: 16px; background: #fff; border: 1px solid #c9d4de; }
.lens-src-card + .lens-src-card { border-top: 1px solid var(--line-ink); padding-top: 6px; }
.lens-src-id { margin: 0 0 4px; font-weight: 700; font-size: calc(14px * var(--text-scale, 1)); }
.lens-src-id .id { font: 600 calc(12px * var(--text-scale, 1)) var(--mono); color: var(--lavender-ink); margin-right: 4px; }
.lens-src .table-wrap { margin-bottom: 10px; }
.ws.wide .persons, .ws.wide .summaries, .ws.wide .exchange-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ws.wide .persons .person, .ws.wide .summaries .summary-q, .ws.wide .exchange-list .exchange-card { margin: 0; }
.ws.wide .persons { margin: 16px 0; }
.ws.wide .summaries { margin: 0 0 18px; }

/* ---------- The 1,000 invitations (design review B2) ---------- */
.dotfield { margin: 4px 0 12px; }
.df-cap { margin: 0 0 4px; max-width: 72ch; font: 400 calc(14px * var(--text-scale, 1))/1.45 var(--read); color: var(--ink-2); }
.df-rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.df-row { padding-top: 12px; border-top: 1px solid var(--line-ink); }
.df-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.df-label { font-weight: 700; font-size: calc(15px * var(--text-scale, 1)); line-height: 1.3; }
.df-val { font: 600 calc(15px * var(--text-scale, 1)) var(--mono); white-space: nowrap; }
.df-val.muted { font: 400 calc(13px * var(--text-scale, 1)) var(--display); color: var(--ink-2); }
.df-sub { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 4px; font: 500 calc(11px * var(--text-scale, 1))/1.3 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); }
.df-svg { display: block; width: 100%; height: auto; max-width: 800px; }
.df-bg { fill: #d3dbe3; }
.df-dot.death { fill: var(--alert-ink); }
.df-dot.dx { fill: var(--lavender-ink); }
.df-dot.proc { fill: #8a5300; }
.df-ring { fill: #fff; stroke-width: 1.6; }
.df-ring.death { stroke: var(--alert-ink); }
.df-ring.harm { stroke: var(--alert-ink); }
.df-ghost { fill: none; stroke: #1d6b44; stroke-width: 1.6; stroke-dasharray: 2.4 1.4; }
.df-note { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 0; font-size: calc(13px * var(--text-scale, 1)); color: var(--ink-2); }
.df-key { flex: none; display: inline-block; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; }
.df-key.ghost { border: 1.6px dashed #1d6b44; }
.df-key.ring { border: 1.6px solid var(--alert-ink); }
/* A newly worked-out figure fills in column by column; reduced motion shows it at once. */
.df-mark { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .df-fresh .df-mark { animation: df-in 0.45s cubic-bezier(.2, .8, .2, 1) calc(var(--c) * 45ms) both; }
}
@keyframes df-in { from { opacity: 0; transform: scale(0.2); } }

/* Late evidence arriving on the table: the edges dim while the card slides in (design review B6). */
.scene-arrival { position: absolute; inset: 0; z-index: 2; pointer-events: none; display: grid; justify-items: center; align-content: start; padding-top: 19%;
  background: radial-gradient(ellipse 52% 48% at 50% 58%, transparent 35%, rgba(5, 6, 8, 0.78) 100%); }
.sa-note { display: grid; justify-items: center; gap: 6px; padding: 14px 22px 16px; border-radius: 16px; background: rgba(12, 14, 18, 0.88); box-shadow: 0 20px 50px #000a; text-align: center; max-width: 30rem; }
.sa-tape { padding: 3px 12px; background: var(--amber); color: #2a1b00; font: 600 calc(12px * var(--text-scale, 1)) var(--mono); letter-spacing: 0.3em; text-transform: uppercase; transform: rotate(-2deg); }
.sa-note b { font-size: calc(19px * var(--text-scale, 1)); font-weight: 800; font-stretch: 112%; color: var(--text); }
.sa-note b .id { font: 600 calc(13px * var(--text-scale, 1)) var(--mono); color: var(--lavender); margin-right: 4px; }
.sa-line { font-size: calc(14.5px * var(--text-scale, 1)); color: #c9d1db; }
@media (prefers-reduced-motion: no-preference) {
  .scene-arrival { animation: sa-in 0.5s ease-out both; transition: opacity 0.6s; }
  .scene-arrival .sa-note { animation: sa-drop 0.7s 0.1s cubic-bezier(.2,.8,.2,1) both; }
}
.scene-arrival.out { opacity: 0; }
@keyframes sa-in { from { opacity: 0; } }
@keyframes sa-drop { from { opacity: 0; transform: translateY(-16px); } }

/* A locked decision: the option is stamped on the form and the dock chip (design review B7). */
.lock-banner { display: flex; align-items: center; gap: 22px; margin: 4px 0 16px; padding: 14px 18px; border-radius: 14px; background: #20262e; color: #fff; }
.lock-banner p { margin: 0; font-size: calc(14.5px * var(--text-scale, 1)); line-height: 1.45; }
.lock-banner p b { display: block; margin-top: 2px; font-weight: 700; color: #dcd6ff; }
.lock-stamp { flex: none; display: inline-flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border: 3px solid var(--lavender); border-radius: 10px; transform: rotate(-5deg);
  box-shadow: inset 0 0 0 2px #20262e, inset 0 0 0 4px #a898ff66; }
.ls-letter { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 8px; background: var(--opt, #3a4450); color: var(--on-lavender); font-size: calc(32px * var(--text-scale, 1)); font-weight: 900; font-stretch: 120%; }
.ls-letter:not([style]) { color: #edf1f5; }
.ls-word { font: 700 calc(22px * var(--text-scale, 1)) var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--lavender); }
.decision.locked .option:not(.on) { opacity: 0.72; }
.decision.locked .option.on { box-shadow: 0 0 0 3px var(--lavender-ink); }
.dec.locked .letter[style] { background: var(--opt); transform: rotate(-6deg); box-shadow: 0 0 0 2px var(--room), 0 0 0 3.5px var(--lavender); }
@media (prefers-reduced-motion: no-preference) {
  .lock-banner.thump .lock-stamp { animation: stamp-down 0.38s cubic-bezier(.3, 1.5, .5, 1) both; }
  .dec.thump .letter { animation: chip-stamp 0.38s cubic-bezier(.3, 1.5, .5, 1) both; }
}
@keyframes stamp-down { from { opacity: 0; transform: rotate(-12deg) scale(1.9); } }
@keyframes chip-stamp { from { transform: rotate(-16deg) scale(1.8); } }

/* Documents that look like where they came from (design review B9). Each card is a sheet with its own
   masthead and one or two type decisions; the body stays in the reading serif. */
.paper { position: relative; margin: 14px 0 22px; padding: 0 22px 16px; background: #fff; border-radius: 6px; color: var(--ink);
  box-shadow: 0 1px 0 rgba(18, 22, 27, 0.06), 0 14px 30px -18px rgba(18, 22, 27, 0.45); overflow: hidden; }
.paper .card-title { margin-top: 16px; }
.paper .doc > :last-child { margin-bottom: 0; }
.mast { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 -22px; padding: 10px 22px;
  font: 600 calc(12px * var(--text-scale, 1))/1.2 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; background: #2b3542; color: #fff; }
/* Memo: a plain dark band and a rule under the title. */
.look-memo .kind { padding-bottom: 12px; border-bottom: 2px solid #2b3542; }
/* Brochure: glossy and loud. The headline shouts; the body is still the reading serif. */
.look-brochure .mast { background: #4a35c4; color: #fff; }
.look-brochure .card-title { margin: 0 -22px 0; padding: 18px 22px 22px; background: linear-gradient(135deg, #4a35c4, #2a1d7a); color: #fff;
  font-size: calc(34px * var(--text-scale, 1)); font-weight: 900; font-stretch: 125%; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.98; }
.look-brochure .kind { margin: 0 -22px 16px; padding: 8px 22px; background: #f0b44c; color: #2a1b00; font-weight: 600; }
.look-brochure .doc blockquote { border-left-color: #a898ff; }
/* Laboratory file: a manila tab and a stamp. */
.look-file { background: #fffdf7; box-shadow: inset 0 0 0 3px #d9bd84, 0 14px 30px -18px rgba(18, 22, 27, 0.45); }
.look-file .mast { margin: 0 auto 0 -22px; width: max-content; padding: 9px 18px; background: #d9bd84; color: #3d2b0a; border-radius: 0 0 10px 0; }
.mast-stamp { position: absolute; right: 18px; top: 14px; padding: 3px 9px; border: 2px solid #a3262a; border-radius: 4px; color: #a3262a; background: transparent;
  letter-spacing: 0.2em; transform: rotate(-6deg); }
/* Audit ledger: green-ruled, with green column heads. */
.look-ledger { background: #f3f8f1; }
.look-ledger .mast { background: #2f5d34; }
.look-ledger .data th { color: #2f5d34; border-bottom-color: #8fb98f; }
.look-ledger .data td { border-bottom-color: #c3dcc0; }
/* Notebook: spiral holes, a red margin and ruled lines under the writing. */
.look-notebook { background: #fffcf0; padding-left: 40px; }
.look-notebook::before { content: ''; position: absolute; left: 26px; top: 0; bottom: 0; width: 2px; background: #e59a9a; }
.look-notebook .mast { margin-left: -40px; padding-left: 40px; background: #fffcf0; color: #4a5562; border-bottom: 1px solid #e2dcc6;
  background-image: radial-gradient(circle at 50% 50%, #c9ced6 0 5px, transparent 5.5px); background-size: 28px 100%; background-position: 12px 0; background-repeat: repeat-x;
  color: transparent; height: 22px; padding-top: 0; padding-bottom: 0; }
.look-notebook .doc p { background-image: linear-gradient(transparent calc(100% - 1px), #c9daea 0); background-size: 100% 1lh; }
/* The adviser's index cards: a red line under the heading, faint blue rules. */
.look-index { background: #fbfdff; }
.look-index .mast { background: #fbfdff; color: #4a5562; border-bottom: 1px solid #dfe6ee; }
.look-index .kind { padding-bottom: 10px; border-bottom: 2px solid #e59a9a; }
/* Trial protocol and report: a coloured band and a formal small-capital title line. */
.look-protocol .mast { background: #1f3a5f; }
.look-report .mast { background: #1d5c52; }
.look-protocol .kind, .look-report .kind { font: 600 calc(12.5px * var(--text-scale, 1))/1.4 var(--mono); letter-spacing: 0.04em; color: #3e4955; }
/* Letter: letterhead, a fold, and the quoted letters set as correspondence. */
.look-letter { background-image: linear-gradient(transparent calc(33% - 1px), rgba(40, 50, 60, 0.07) 33%, transparent calc(33% + 1px)); }
.look-letter .mast { background: #2a2140; color: #dcd6ff; padding: 14px 22px; }
.look-letter .doc blockquote { border-left: 0; padding-left: 0; }
.look-letter .doc .meta { margin-top: 14px; padding-top: 10px; border-top: 1px solid #e3e7ec; }

/* The decision options keep the projector's scale: most commitment first (design review B10). */
.scale-note { margin: 0 0 8px; font-size: calc(13px * var(--text-scale, 1)); color: var(--ink-2); }

/* The verdict sheet (design review C5): a sheet of paper in the room's style. Sizes are in em; each page sets the scale. */
.vsheet { position: relative; padding: 0 1.5em 1.4em; background: #fff; color: var(--ink); border-radius: 6px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(18, 22, 27, 0.06), 0 1em 2em -1.2em rgba(18, 22, 27, 0.5); }
.vs-mast { display: flex; justify-content: space-between; gap: 1em; margin: 0 -1.5em; padding: 0.55em 1.5em; background: #2b3542; color: #fff; }
.vs-mast span { font: 600 0.75em/1.2 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; }
.vs-team { margin: 0.5em 0 0.4em; font-size: 2.2em; font-weight: 800; font-stretch: 118%; line-height: 1.05; }
.vs-decisions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid #2b3542; border-bottom: 1px solid #c9d4de; }
.vs-dec { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "label label" "letter opt" "letter conf"; column-gap: 0.7em; align-items: center;
  padding: 0.8em 1em 0.9em; }
.vs-dec + .vs-dec { border-left: 1px solid #c9d4de; }
.vs-dec + .vs-dec::before { content: "→"; position: absolute; left: -0.55em; top: 50%; transform: translateY(-50%); padding: 0.1em 0; background: #fff; color: var(--ink-2); font-weight: 700; }
.vs-dlabel { grid-area: label; margin-bottom: 0.5em; font-size: 0.82em; font-weight: 600; color: var(--ink-2); }
.vs-letter { grid-area: letter; display: grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: 0.3em; background: var(--opt, #e9edf1); color: var(--on-lavender);
  font-size: 1.4em; font-weight: 900; font-stretch: 120%; transform: rotate(-4deg); }
.vs-dec.none .vs-letter { border: 2px dashed #9eaab6; background: transparent; color: var(--ink-2); transform: none; }
.vs-opt { grid-area: opt; align-self: end; font-size: 1em; line-height: 1.25; }
.vs-dec.none .vs-opt { grid-row: 2 / 4; align-self: center; color: var(--ink-2); font-weight: 600; }
.vs-conf { grid-area: conf; align-self: start; font-size: 0.85em; color: var(--ink-2); }
.vs-offer { margin: 0.8em 0 0; font-size: 0.95em; color: var(--ink-2); }
.vs-offer b { color: var(--ink); }
.vs-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2em; margin-top: 1.2em; }
.vs-cols h3, .vs-cols h4 { margin: 0 0 0.5em; font-size: 1em; font-weight: 700; }
.vs-pred dl { margin: 0; }
.vs-pred dt { font-size: 0.82em; color: var(--ink-2); margin-top: 0.6em; }
.vs-pred dt:first-child { margin-top: 0; }
.vs-pred dd { margin: 0.15em 0 0; font: 400 0.95em/1.4 var(--read); }
.vs-met { margin: 0.8em 0 0; font-size: 0.9em; color: var(--ink-2); }
.vs-met b { color: var(--ink); }
.vs-part blockquote { margin: 0; padding-left: 0.8em; border-left: 4px solid var(--lavender-ink); font: 400 1.35em/1.4 var(--read); }
.vs-none { color: var(--ink-2); font-style: italic; margin: 0; }
@media (max-width: 700px) {
  .vs-decisions, .vs-cols { grid-template-columns: 1fr; }
  .vs-dec + .vs-dec { border-left: 0; border-top: 1px solid #c9d4de; }
  .vs-dec + .vs-dec::before { display: none; }
}

/* One field of 1,000 (design review C1): the laboratory's samples and the pilot's people as dots on one grid. */
.sfields { margin: 4px 0 18px; display: grid; gap: 14px; }
.sfields > .df-cap { margin: 0; }
.sfield { margin: 0; padding-top: 10px; border-top: 1px solid var(--line-ink); }
.sf-title { margin-bottom: 8px; font-weight: 700; font-size: calc(15px * var(--text-scale, 1)); }
.sf-svg { display: block; width: 100%; max-width: 440px; height: auto; }
.sf-bg { fill: #c3ccd6; }
.sf-pos { fill: var(--lavender-ink); }
.sf-pos-ring { fill: #fff; stroke: var(--lavender-ink); stroke-width: 1.5; }
.sf-wait { fill: #fff; stroke: #5f6a78; stroke-width: 1.4; stroke-dasharray: 2 1.3; }
.sf-miss { fill: var(--alert-ink); }
.sf-key { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 18px; font-size: calc(13.5px * var(--text-scale, 1)); }
.sf-key li { display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; align-items: center; }
.sf-key b { font: 600 calc(13px * var(--text-scale, 1)) var(--mono); }
.sf-sw { width: 16px; height: 16px; }

/* Pins as threads (design review C2): from each pinned card to its claim, leaving the table at the left edge. */
.threads { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.thread { opacity: 0.3; transition: opacity 0.2s; }
.thread.lit { opacity: 1; }
.thread-halo { fill: none; stroke: rgba(255, 255, 255, 0.7); stroke-width: 5px; stroke-linecap: round; }
.thread-line { fill: none; stroke: #b4262a; stroke-linecap: round; }
.thread-pin { fill: #b4262a; stroke: #fff; stroke-width: 1.5px; }
@media (prefers-reduced-motion: reduce) { .thread { transition: none; } }

/* Text size is local to this device and independent for each reading panel. */
.claims, .ph-claims, .ph-claims-head { --text-scale: var(--claims-scale, 1); }
.reader { --text-scale: var(--reader-scale, 1); }
.text-size { --text-scale: 1; display: flex; gap: 4px; justify-content: flex-end; margin: 0 0 12px; }
.text-size button { font: 600 14px/1 var(--display); min-width: 44px; min-height: 44px; padding: 8px; border: 1px solid currentColor; border-radius: 8px; color: inherit; background: transparent; }
.text-size button:disabled { opacity: .4; cursor: default; }
.claim q, .reader { overflow-wrap: anywhere; }

.debrief { display: grid; gap: 24px; }
.debrief-claim { background: #fff; color: var(--ink); border: 1px solid #c9d4de; border-radius: 12px; padding: 24px; }
.debrief-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: #49358f; }
.debrief-claim h2 { font-size: calc(23px * var(--text-scale, 1)); line-height: 1.25; }
.debrief-claim p { font: 400 calc(18px * var(--text-scale, 1))/1.55 var(--read); }
.debrief-sources { font-family: var(--mono) !important; color: #49358f; }

.language-tools { height: 44px; display: flex; justify-content: flex-end; align-items: center; padding: 0 16px; background: var(--room-2); border-bottom: 1px solid var(--line); font: 500 14px var(--display); }
.language-tools label, .projector-language { display: flex; align-items: center; gap: 8px; }
.language-tools select, .projector-language select { min-height: 36px; background: var(--room); color: var(--text); border: 1px solid #66717e; border-radius: 8px; padding: 4px 10px; }
.has-language .ws { height: calc(100dvh - 44px); }
.has-language .join, .has-language .t-dash, .has-language .t-login, .has-language .t-sessions { min-height: calc(100dvh - 44px); }
.projector-language { margin: 8px 22px; font-size: 14px; }
:lang(zh-Hans) { --read: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; --display: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
:lang(zh-Hans) .stages li { letter-spacing: 0; }
@media (max-width: 1199px) { .topbar .stages { display: none; } }
.vs-cols { grid-template-columns: 1fr; }
