/* theme.css — dark, bright, color-coded for speed of use (laptop) + presenter. */
:root {
  --bg:        #0a0d13;
  --bg-2:      #10151f;
  --panel:     #151b27;
  --panel-2:   #1c2432;
  --line:      #2a3444;
  --line-2:    #3a4658;
  --ink:       #eaf0f8;
  --ink-dim:   #9fb0c6;
  --ink-mut:   #6b7c93;
  --accent:    #4ea3ff;
  --accent-2:  #7c5cff;
  --warn:      #ffcf4d;
  --danger:    #ff5964;
  --ok:        #3ddc84;

  /* §9.7 five-quintile favorability bands (1 worst → 100 best) */
  --band-deepgreen: #0aa85a;  /* 81–100 best */
  --band-green:     #7dcb52;  /* 61–80 light green */
  --band-yellow:    #f2c33d;  /* 41–60 yellow */
  --band-lightred:  #f0745e;  /* 21–40 light red */
  --band-red:       #d22f2f;  /* 1–20 deep red / worst */
  --band-unknown:   #2a3444;

  --shadow: 0 6px 24px rgba(0,0,0,.45);
  --r: 10px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: radial-gradient(1200px 800px at 70% -10%, #12203a 0%, var(--bg) 55%);
  color: var(--ink);
  font: 14px/1.4 -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; }

/* ── top bar ─────────────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; background: rgba(10,13,19,.75); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40;
}
.topbar .brand { font-weight: 700; letter-spacing: .3px; }
.topbar .brand small { color: var(--ink-mut); font-weight: 500; margin-left: 8px; }
.topbar .spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 8px; color: var(--ink-dim); font-size: 13px; }
.who .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }

.btn {
  background: var(--panel-2); color: var(--ink); border: 1px solid var(--line-2);
  padding: 7px 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
  transition: .12s; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #04121f; border-color: var(--accent); }
.btn.active { background: var(--accent-2); border-color: var(--accent-2); color: #fff; box-shadow: 0 0 0 3px rgba(124,92,255,.25); }
.btn.warn { background: #3a2a12; border-color: var(--warn); color: var(--warn); }
.btn.danger { background: #3a1518; border-color: var(--danger); color: var(--danger); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 9px; font-size: 12px; }

/* ── layout ──────────────────────────────────────────────────────────────── */
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 0; height: calc(100vh - 53px); }
.main { padding: 14px 16px; overflow: auto; }
.rail { background: var(--bg-2); border-left: 1px solid var(--line); padding: 12px; overflow: auto; }

.section-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.section-head h2 { font-size: 15px; margin: 0; letter-spacing: .3px; }
.section-head .sub { color: var(--ink-mut); font-size: 12px; }

/* ── board (§4) — pews stacked; front pew (Juror 1) at the BOTTOM ─────────── */
/* displayRows() emits back pew first, front pew last → normal column puts the
   front pew (Juror 1) just above the podium label at the bottom. */
.board { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.board .pew { display: flex; gap: 6px; justify-content: center; width: 100%; }
.podium { order: 999; width: 100%; text-align: center; color: var(--ink-mut); font-size: 11px;
  letter-spacing: 1px; text-transform: uppercase; margin-top: 6px; }
.setup-preview .pew .tile { min-width: 40px; min-height: 34px; }
.tile {
  position: relative; aspect-ratio: 1 / 0.9; border-radius: var(--r);
  border: 2px solid var(--line-2); background: var(--panel);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; overflow: hidden; transition: transform .1s, box-shadow .1s;
  flex: 1 1 0; min-width: 58px; max-width: 88px; min-height: 60px; user-select: none;
}
.tile.nodata { opacity: .7; }
.tile.nodata .num { font-weight: 700; }
.tile.filled { cursor: pointer; }
.tile.filled:hover { transform: translateY(-2px); box-shadow: var(--shadow); z-index: 2; }
.tile.empty { border-style: dashed; border-color: var(--line); background: #0e1219; }
.tile.dashed { border-style: dashed; }
.tile .num { font-size: 22px; font-weight: 800; line-height: 1; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.tile .score { font-size: 13px; font-weight: 700; opacity: .95; }
.tile.excused { filter: grayscale(1) brightness(.6); }
.tile.excused .num { text-decoration: line-through; }
.tile .lock { position: absolute; top: 3px; left: 4px; font-size: 10px; opacity: .8; }
.tile .badges { position: absolute; top: 2px; right: 3px; display: flex; gap: 2px; font-size: 11px; }
.tile .causechips { position: absolute; bottom: 2px; left: 3px; display: flex; gap: 2px; }
.chip { display: inline-block; width: 7px; height: 7px; border-radius: 2px; }
.chip.belief { background: var(--warn); }
.chip.bp, .chip.locked { background: var(--danger); }
.chip.locked { box-shadow: 0 0 0 1.5px #fff; }
.tile.conflict { animation: pulseConflict 1.1s infinite; }
@keyframes pulseConflict { 0%,100%{ box-shadow: 0 0 0 0 rgba(255,207,77,.0);} 50%{ box-shadow: 0 0 0 3px rgba(255,207,77,.7);} }
.tile.pulse { animation: pulseNew 1s 2; }
@keyframes pulseNew { 0%,100%{ box-shadow: 0 0 0 0 rgba(78,163,255,0);} 50%{ box-shadow: 0 0 0 4px rgba(78,163,255,.8);} }

/* band fills — deep red → light red → yellow → light green → deep green */
.b-deepgreen { background: linear-gradient(180deg, #0cc76b, var(--band-deepgreen)); }
.b-green     { background: linear-gradient(180deg, #93d96b, var(--band-green)); color:#0b2b06; }
.b-yellow    { background: linear-gradient(180deg, #f6d15e, var(--band-yellow)); color:#2e2600; }
.b-lightred  { background: linear-gradient(180deg, #f78b78, var(--band-lightred)); color:#2f0c07; }
.b-red       { background: linear-gradient(180deg, #e04444, var(--band-red)); }
.b-unknown   { background: var(--band-unknown); color: var(--ink-dim); }

/* strike-zone lines (§10.2) */
.zone-legend { display:flex; gap:16px; font-size:12px; color:var(--ink-dim); margin-top:10px; }
.zone-legend b { color: var(--ink); }
.zoneline { color: var(--accent); font-weight:700; }
.tile.mainzone { outline: 2px solid rgba(78,163,255,.55); outline-offset: 1px; }
.tile.altzone  { outline: 2px dashed rgba(124,92,255,.6); outline-offset: 1px; }

/* ── rail: circle-back (§8) ──────────────────────────────────────────────── */
.cb-item { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.cb-item.p1 { border-left-color: var(--danger); }
.cb-item.p2 { border-left-color: var(--warn); }
.cb-item .cb-top { display: flex; justify-content: space-between; align-items: center; }
.cb-item .cb-j { font-weight: 700; }
.cb-item .cb-src { font-size: 11px; color: var(--ink-mut); text-transform: uppercase; letter-spacing: .5px; }
.cb-item .cb-note { font-size: 12px; color: var(--ink-dim); margin-top: 3px; }

/* ── modal / profile drawer (§5) ─────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(3,6,12,.6); z-index: 50; backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(560px, 96vw);
  background: var(--bg-2); border-left: 1px solid var(--line-2); z-index: 51;
  box-shadow: -20px 0 50px rgba(0,0,0,.5); display: flex; flex-direction: column;
  animation: slideIn .18s ease; }
@keyframes slideIn { from { transform: translateX(30px); opacity: .3; } to { transform: none; opacity: 1; } }
.drawer .dhead { padding: 14px 16px; border-bottom: 1px solid var(--line); display:flex; align-items:flex-start; gap:12px; }
.drawer .dbody { padding: 12px 16px; overflow: auto; flex: 1; }
.dhead .jbig { font-size: 30px; font-weight: 800; line-height: 1; }
.dhead .jname { font-size: 20px; font-weight: 700; }
.dhead .jocc { color: var(--ink-dim); font-size: 13px; }
.subscores { display: flex; gap: 8px; margin-top: 8px; }
.ss { text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; min-width: 46px; }
.ss .k { font-size: 10px; color: var(--ink-mut); letter-spacing: 1px; }
.ss .v { font-size: 18px; font-weight: 800; }
.ss.composite { border-color: var(--accent); }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); display:inline-block; }
.dots i.on { background: var(--accent); }

.acc { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.acc > summary { list-style: none; cursor: pointer; padding: 10px 12px; background: var(--panel);
  font-weight: 700; display: flex; align-items: center; gap: 8px; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary .role-tag { font-size: 10px; background: var(--accent-2); color:#fff; padding:1px 6px; border-radius: 20px; }
.acc .acc-body { padding: 12px; background: var(--bg-2); }

.field { margin-bottom: 10px; }
.field label { display:block; font-size: 11px; color: var(--ink-mut); text-transform: uppercase; letter-spacing:.5px; margin-bottom: 3px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--panel); border: 1px solid var(--line-2); color: var(--ink);
  border-radius: 7px; padding: 7px 9px; font-size: 13px; }
.field textarea { min-height: 54px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* cause buttons */
.cause-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 8px; border:1px solid var(--line); border-radius: 8px; background: var(--panel); }
.cause-row .cl { flex: 1; font-size: 13px; }
.cause-row.state-belief { border-color: var(--warn); }
.cause-row.state-bp, .cause-row.state-locked { border-color: var(--danger); }
.cause-row.state-locked { background: #2a1214; }
.state-pill { font-size: 10px; padding: 2px 7px; border-radius: 20px; font-weight: 700; text-transform: uppercase; }
.state-pill.belief { background: var(--warn); color:#221800; }
.state-pill.bp { background: var(--danger); color:#fff; }
.state-pill.locked { background: #fff; color: var(--danger); }
.state-pill.rehabbed { background: var(--line-2); color: var(--ink-dim); }
.lockdown { margin-top: 8px; display:flex; flex-direction:column; gap:5px; font-size:12px; }
.lockdown label { display:flex; gap:7px; align-items:flex-start; color: var(--ink-dim); }

/* sliders */
.slider { margin-bottom: 14px; }
.slider .st { display:flex; justify-content: space-between; font-size: 12px; margin-bottom: 3px; }
.slider .st .lab { font-weight: 700; color: var(--ink); }
.slider .st .val { font-weight: 800; }
.slider .ends { display:flex; justify-content: space-between; font-size: 10px; color: var(--ink-mut); }
.slider input[type=range] { width: 100%; accent-color: var(--accent); }
.slider.special input[type=range] { accent-color: var(--danger); }
.reads { font-size: 11px; color: var(--ink-mut); margin-top:2px; }

.quote { background: var(--panel); border-left: 2px solid var(--warn); padding: 5px 8px; font-size: 12px; margin: 4px 0; border-radius: 4px; }
.quote .meta { color: var(--ink-mut); font-size: 10px; }

.badge { display: inline-flex; align-items:center; gap:4px; font-size: 11px; padding: 2px 7px; border-radius: 20px; font-weight: 700; }
.badge.leader { background: #2a2410; color: var(--warn); }
.badge.veto { background: #2a1218; color: var(--danger); }
.badge.conflict { background: #2a2410; color: var(--warn); }
.badge.placeholder { background: #1a2230; color: var(--ink-mut); font-weight:600; }

.callout { background: #1a1408; border:1px solid var(--warn); color:#ffe6a3; padding:8px 10px; border-radius:8px; font-size:12px; margin-bottom:10px; }
.callout.danger { background:#210f11; border-color:var(--danger); color:#ffc4c7; }

/* strike sheet + monitor */
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
table.sheet { width:100%; border-collapse: collapse; font-size:13px; }
table.sheet th { text-align:left; color:var(--ink-mut); font-size:11px; text-transform:uppercase; padding:6px; border-bottom:1px solid var(--line); }
table.sheet td { padding:6px; border-bottom:1px solid var(--line); }
table.sheet .sw { font-weight:800; }

.tabs { display:flex; gap:6px; margin-bottom:14px; }
.tab { padding:8px 14px; border-radius:8px; background:var(--panel); border:1px solid var(--line-2); font-weight:600; color:var(--ink-dim); }
.tab.active { background:var(--panel-2); color:var(--ink); border-color:var(--accent); }

.empty-state { color: var(--ink-mut); text-align:center; padding: 40px; }

/* D factor chips ("why this score") */
.dfacs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dfac { font-size: 11px; padding: 3px 8px; border-radius: 20px; font-weight: 700; border: 1px solid var(--line-2); }
.dfac.pos { background: #0f2a18; color: #6ee7a0; border-color: #1c5236; }
.dfac.neg { background: #2c1416; color: #ff9ba0; border-color: #5a2a2e; }

/* paralegal intake */
.intake-wrap { overflow: auto; max-height: calc(100vh - 180px); border: 1px solid var(--line); border-radius: 10px; }
table.intake { border-collapse: collapse; font-size: 12px; width: 100%; }
table.intake th { position: sticky; top: 0; background: var(--panel-2); color: var(--ink-dim); text-align: left;
  padding: 8px 6px; border-bottom: 1px solid var(--line-2); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; z-index: 2; }
table.intake td { padding: 3px 4px; border-bottom: 1px solid var(--line); }
table.intake td.rn { color: var(--ink-mut); font-weight: 800; text-align: center; width: 34px; }
table.intake input, table.intake select { background: transparent; border: 1px solid transparent; color: var(--ink);
  border-radius: 6px; padding: 5px 6px; font-size: 12px; }
table.intake input:hover, table.intake select:hover { border-color: var(--line-2); }
table.intake input:focus, table.intake select:focus { background: var(--panel); border-color: var(--accent); outline: none; }
table.intake tr:hover td { background: rgba(78,163,255,.04); }

/* setup pew editor */
.pew-edit { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; margin-bottom: 6px; background: var(--panel); }
.pew-edit .pl { font-weight: 700; min-width: 100px; }
.pew-edit .pc { font-size: 16px; min-width: 26px; text-align: center; }

/* sign-in */
.signin { max-width: 420px; margin: 12vh auto; background: var(--panel); border:1px solid var(--line-2); border-radius: 14px; padding: 26px; box-shadow: var(--shadow); }
.signin h1 { margin: 0 0 4px; font-size: 20px; }
.signin p { color: var(--ink-mut); margin: 0 0 18px; font-size: 13px; }

/* ── strikes (§10.3 / §11.3) ─────────────────────────────────────────────── */
.tile.struck { opacity: .45; }
.tile.struck .num { text-decoration: line-through; }
.smark.P { color: var(--accent); }
.smark.D { color: var(--danger, #d22f2f); }
tr.warnrow td { background: rgba(210, 47, 47, .16); }
.seatchip { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 12px;
  font-weight: 600; margin: 2px 3px 2px 0; }
.seatchip.b-deepgreen { background: var(--band-deepgreen); color: #fff; }
.seatchip.b-green { background: var(--band-green); color: #0b2b06; }
.seatchip.b-yellow { background: var(--band-yellow); color: #2e2600; }
.seatchip.b-lightred { background: var(--band-lightred); color: #2f0c07; }
.seatchip.b-red { background: var(--band-red); color: #fff; }
.seatchip.b-unknown { background: var(--band-unknown); color: var(--ink-dim); }

/* ── print / PDF (strike sheet + defense monitor) ────────────────────────── */
.print-only { display: none; }
@media print {
  body { background: #fff !important; color: #000 !important; }
  .topbar, .rail, .btn, button, select, .zone-legend, .callout:not(.print-keep) { display: none !important; }
  .layout { display: block !important; }
  .main { overflow: visible !important; padding: 0 !important; }
  .print-only { display: block; font-size: 13px; margin-bottom: 12px; color: #000;
    border-bottom: 2px solid #000; padding-bottom: 6px; }
  .section-head h2, .section-head .sub, h3, p.sub, .sub { color: #000 !important; }
  table.sheet { width: 100%; border-collapse: collapse; }
  table.sheet th, table.sheet td { border: 1px solid #888; color: #000 !important;
    background: #fff !important; padding: 4px 6px; }
  tr.warnrow td { background: #f3d3d3 !important; }
  .seatchip { border: 1px solid #888; color: #000 !important; background: #fff !important; }
  .two-col { display: block !important; }
  .two-col > div { margin-bottom: 14px; }
}

/* ── cause-argument page (Cause Args) ─────────────────────────────────────── */
.ca-list { display: flex; flex-direction: column; gap: 6px; max-width: 1100px; }
.ca-row { background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; }
.ca-row[open] { border-color: var(--accent); }
.ca-row > summary { display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  cursor: pointer; list-style: none; }
.ca-row > summary::-webkit-details-marker { display: none; }
.ca-num { min-width: 40px; text-align: center; font-weight: 800; font-size: 16px;
  border-radius: 6px; padding: 5px 0; }
.ca-num.b-deepgreen { background: var(--band-deepgreen); color: #fff; }
.ca-num.b-green { background: var(--band-green); color: #0b2b06; }
.ca-num.b-yellow { background: var(--band-yellow); color: #2e2600; }
.ca-num.b-lightred { background: var(--band-lightred); color: #2f0c07; }
.ca-num.b-red { background: var(--band-red); color: #fff; }
.ca-num.b-unknown { background: var(--band-unknown); color: var(--ink-dim); }
.ca-name { min-width: 190px; font-weight: 700; }
.ca-name small { display: block; font-weight: 400; color: var(--ink-dim); font-size: 11.5px; }
.ca-scores { min-width: 190px; font-size: 12.5px; color: var(--ink-dim); }
.ca-badges { min-width: 54px; font-size: 15px; }
.ca-flags { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.ca-flag { font-size: 11.5px; padding: 2px 8px; border-radius: 12px; border: 1px solid var(--line-2); color: var(--ink-dim); }
.ca-flag.belief { border-color: var(--band-yellow); color: var(--band-yellow); }
.ca-flag.bp { border-color: var(--band-lightred); color: var(--band-lightred); }
.ca-flag.locked { border-color: var(--band-red); color: #ff8a8a; background: rgba(210,47,47,.12); }
.ca-flag.rehabbed { border-color: var(--band-green); color: var(--band-green); }
.ca-row.ca-excused { opacity: .55; }
.ca-row.ca-excused .ca-name { text-decoration: line-through; }
.ca-body { padding: 4px 14px 12px 64px; border-top: 1px solid var(--line); }
.ca-note { font-size: 12.5px; color: var(--ink-dim); margin: 6px 0; }
.ca-note b { color: var(--ink); }
.splashline { border-bottom: 2px dashed var(--accent-2); margin: 10px 0 14px; position: relative; }
.splashline span { position: relative; top: 10px; background: var(--bg-2); color: var(--accent-2);
  font-size: 11.5px; font-weight: 700; letter-spacing: .5px; padding: 2px 10px; border-radius: 10px;
  border: 1px solid var(--accent-2); }
.mono { font-family: ui-monospace, Consolas, monospace; }
@media print {
  .ca-row { border: 1px solid #888; page-break-inside: avoid; }
  .ca-row > summary { color: #000; }
  .ca-num, .ca-flag { border: 1px solid #888; color: #000 !important; background: #fff !important; }
  .ca-name small, .ca-scores, .ca-note, .ca-body, .ca-note b { color: #000 !important; }
  .splashline { border-color: #000; }
  .splashline span { color: #000; background: #fff; border-color: #000; }
}

/* ── rebuilt strike sheet (Texas rules, toggles + projected jury) ─────────── */
.sk-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }
.sk-list { display: flex; flex-direction: column; gap: 4px; }
.sk-row, .sk-seat { display: flex; align-items: center; gap: 10px; padding: 5px 10px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 7px; }
.sk-num { min-width: 34px; text-align: center; font-weight: 800; font-size: 14px; border-radius: 5px; padding: 4px 0; }
.sk-num.b-deepgreen { background: var(--band-deepgreen); color: #fff; }
.sk-num.b-green { background: var(--band-green); color: #0b2b06; }
.sk-num.b-yellow { background: var(--band-yellow); color: #2e2600; }
.sk-num.b-lightred { background: var(--band-lightred); color: #2f0c07; }
.sk-num.b-red { background: var(--band-red); color: #fff; }
.sk-num.b-unknown { background: var(--band-unknown); color: var(--ink-dim); }
.sk-name { min-width: 150px; flex: 1; font-weight: 700; font-size: 13px; }
.sk-name small { display: block; font-weight: 400; color: var(--ink-dim); font-size: 11px; }
.sk-scores { min-width: 200px; font-size: 12px; color: var(--ink-dim); }
.sk-badges { min-width: 34px; font-size: 14px; }
.sk-tog { min-width: 40px; }
.sk-tog.P.active { background: var(--accent); border-color: var(--accent); color: #04121f; font-weight: 800; }
.sk-tog.D.active { background: var(--band-red); border-color: var(--band-red); color: #fff; font-weight: 800; }
/* excused for cause: very dark grey-out, everywhere on this sheet */
.sk-row.sk-excused { background: #07090d; border-color: #10141b; opacity: .85; filter: grayscale(1); }
.sk-row.sk-excused .sk-num { background: #1a202b; color: #55617a; }
.sk-row.sk-excused .sk-name, .sk-row.sk-excused .sk-scores, .sk-row.sk-excused .sk-badges { color: #3d4658; }
.sk-row.sk-excused .sk-name { text-decoration: line-through; }
.sk-row.sk-excused .sk-name small { color: #333c4d; }
.sk-exlabel { font-size: 10px; font-weight: 800; letter-spacing: .8px; color: #55617a; }
.sk-nodata .sk-name { color: var(--ink-mut); font-weight: 400; }
.sk-seatpos { min-width: 20px; text-align: right; color: var(--ink-mut); font-size: 11px; }
.sk-start { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; padding: 9px 12px;
  border: 1px dashed var(--line-2); border-radius: 8px; color: var(--ink-dim); font-size: 12.5px; cursor: pointer; }
.sk-start.on { border-color: var(--band-red); color: #ff9d9d; background: rgba(210,47,47,.08); }
.sk-start input { width: 16px; height: 16px; accent-color: var(--band-red); }
.frozen-banner { border-color: var(--band-red); color: #ffb1b1; }
.ca-altbar { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 12px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; font-size: 12.5px; color: var(--ink-dim); }
/* excused on the main panel board: very dark grey-out */
.tile.excused { filter: grayscale(1) brightness(.32); }
@media print {
  .sk-cols { display: block; }
  .sk-row, .sk-seat { border: 1px solid #888; color: #000; }
  .sk-num, .sk-name, .sk-name small, .sk-scores, .sk-badges, .sk-seatpos, .sk-exlabel { color: #000 !important; background: #fff !important; }
  .sk-row.sk-excused { background: #ddd !important; filter: none; opacity: 1; }
  .sk-start, .ca-altbar { display: none !important; }
}

/* ── question-bank Setup page ─────────────────────────────────────────────── */
.qs-list { display: flex; flex-direction: column; gap: 12px; max-width: 980px; }
.qs-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; }
.qs-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.qs-idx { min-width: 26px; text-align: center; font-weight: 800; color: var(--ink-mut); }
.qs-short { width: 190px; }
.qs-axis { width: 240px; }
.qs-prompt { width: 100%; margin-bottom: 6px; }
.qs-ohead, .qs-opt { display: grid; grid-template-columns: 1fr 80px 76px 56px 40px; gap: 8px; align-items: center; }
.qs-ohead { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-mut); margin: 8px 0 4px; }
.qs-opt { margin-bottom: 5px; }
.qs-opt input[type="checkbox"] { width: 16px; height: 16px; justify-self: center; accent-color: var(--band-red); }

/* ── card-scan (photo → OCR → review) ─────────────────────────────────────── */
.scan-busy, .scan-review { position: fixed; inset: 0; z-index: 80; background: rgba(3,6,12,.7);
  display: flex; align-items: center; justify-content: center; }
.scan-busy-box { background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 22px 30px; font-size: 17px; font-weight: 700; }
.scan-review-box { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 20px 22px; width: min(560px, 94vw); max-height: 88vh; overflow: auto; }
.scan-review-box h3 { margin: 0 0 10px; font-size: 16px; }
.scan-row { display: grid; grid-template-columns: 22px 150px 1fr; gap: 8px; align-items: center;
  margin-bottom: 6px; font-size: 13px; color: var(--ink-dim); }
.scan-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.scan-btn { padding: 1px 6px; font-size: 12px; }
.intake td.rn { white-space: nowrap; }

/* ── iPhone-size screens: drop the Circle-Back rail (clutter at that width) ──
   Covers phones in portrait (narrow) and landscape (short + touch); iPads
   keep the rail. The queue still lives on the laptop and iPad presenter. */
@media (max-width: 740px), (max-height: 500px) and (pointer: coarse) {
  .layout { display: block; }
  .rail { display: none; }
}

/* ── Pews page: manual seat mode + assignment markers ─────────────────────── */
.setup-preview.manual-on .tile.seat-edit { cursor: pointer; }
.setup-preview.manual-on .tile.seat-edit:hover { border-color: var(--accent); transform: scale(1.06); }
.setup-preview .tile.seat-locked { border-color: var(--accent-2); box-shadow: 0 0 0 2px rgba(124,92,255,.35); }

/* ── sweep topic picker ───────────────────────────────────────────────────── */
.sweep-pick { position: fixed; inset: 0; z-index: 80; background: rgba(3,6,12,.7);
  display: flex; align-items: center; justify-content: center; }
.sweep-pick-box { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 20px 22px; width: min(520px, 94vw); max-height: 86vh; overflow: auto; }
.sweep-pick-box h3 { margin: 0 0 6px; font-size: 16px; }
.sweep-opt { display: block; width: 100%; text-align: left; margin-bottom: 6px; padding: 10px 14px; }
.sweep-opt small { display: block; font-weight: 400; color: var(--ink-dim); font-size: 11.5px; margin-top: 2px; }
.sweep-opt:hover { border-color: var(--accent); }

/* ── countdown clock chip (topbar, always visible) ────────────────────────── */
.clock-chip { padding: 5px 12px; border-radius: 8px; font-weight: 800; font-size: 14px;
  cursor: pointer; user-select: none; letter-spacing: .5px; white-space: nowrap; }
.clock-chip.clk-off { background: var(--panel-2); color: var(--ink-mut); border: 1px dashed var(--line-2); font-weight: 600; }
.clk-grey { background: #3a4150; color: #fff; }
.clk-yellow { background: var(--band-yellow); color: #2e2600; }
.clk-red { background: var(--band-red); color: #fff; }
@media print { .clock-chip { display: none !important; } }

/* ── "Got Em?" marker (cause admissions secured) — laptop board + Cause Args ── */
.tile.gotem { position: relative; border-color: var(--band-red); }
.tile.gotem::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 6px;
  background: linear-gradient(to top right, transparent calc(50% - 2px), var(--band-red) calc(50% - 2px), var(--band-red) calc(50% + 2px), transparent calc(50% + 2px)); }
.ca-gotem { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #fff;
  background: var(--band-red); padding: 2px 9px; border-radius: 12px; align-self: center; }
