/* RadioDNA design system, carried over from the first version ("the night shift at a monitoring desk").
   Quiet graphite chrome; color only carries meaning; diagonal hatching always means "not heard". */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --deep: #0f0f10; --page: #141415; --card: #19191b; --raised: #232325; --raised-2: #2c2c2f; --gap-ground: #1b1b1d;
  --text: #ededed; --text-2: #a1a1a6; --text-3: #85858b; --on-primary: #141415;
  --line: rgba(237,237,237,.08); --line-2: rgba(237,237,237,.14);
  --need: #e8a33d; --need-line: rgba(232,163,61,.5);
  --heard: #4cc38a; --heard-fill: rgba(76,195,138,.26); --heard-edge: rgba(76,195,138,.45);
  --short: #f0676b; --short-line: rgba(240,103,107,.45);
  --hatch: repeating-linear-gradient(135deg, rgba(237,237,237,.26) 0 1px, transparent 1px 6px);
  --hatch-faint: repeating-linear-gradient(135deg, rgba(237,237,237,.13) 0 1px, transparent 1px 6px);
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.22,1,.36,1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--page); }
body { margin: 0; background: var(--page); color: var(--text); font: 400 14px/20px var(--sans); font-variant-numeric: tabular-nums; }
h1, h2, h3, p, dl, dd, ul, ol, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, select, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
time, .mono { font-family: var(--mono); font-size: 12px; line-height: 16px; }
.muted { color: var(--text-3); } .sub { color: var(--text-2); }
.need { color: var(--need); } .heard { color: var(--heard); } .short { color: var(--short); }
.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: 8px; top: -48px; padding: 8px 12px; background: var(--text); color: var(--on-primary); border-radius: 8px; z-index: 30; }
.skip:focus { top: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Shell */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--deep); border-right: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; padding: 4px 8px; text-decoration: none; }
.brand svg { width: 18px; height: 18px; flex: none; fill: var(--text); }
.org { display: block; padding: 0 8px; color: var(--text-3); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px; border-radius: 8px; color: var(--text-2); text-decoration: none; border: 1px solid transparent; white-space: nowrap; transition: background-color 140ms var(--ease), color 140ms var(--ease); }
.nav a:hover { background: var(--card); color: var(--text); }
.nav a[aria-current="page"] { background: var(--raised); color: var(--text); border-color: var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.nav .count { margin-left: auto; font: 400 12px/16px var(--mono); color: var(--text-3); }
.nav .count.need { color: var(--need); }
.side-foot { margin-top: auto; padding: 0 8px; display: flex; flex-direction: column; gap: 8px; }
.side-foot .btn.quiet { padding-left: 0; }
.side-foot .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.main { min-width: 0; padding: 32px 32px 64px; max-width: 1440px; }
.solo { max-width: 440px; margin: 0 auto; padding: 64px 16px; display: flex; flex-direction: column; gap: 24px; }
.solo.wide { max-width: 640px; }
.banner { padding: 12px 16px; margin-bottom: 24px; border: 1px solid var(--need-line); border-radius: 8px; color: var(--text); }
.banner b { font-weight: 500; color: var(--need); }

/* Page header and layout */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
h1 { font-size: 32px; line-height: 38px; font-weight: 400; text-wrap: balance; overflow-wrap: anywhere; }
h1 em { font-style: normal; color: var(--text-3); }
.head p { margin-top: 4px; color: var(--text-2); max-width: 72ch; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
h2 { font-size: 15px; line-height: 20px; font-weight: 500; }
h3 { font-size: 14px; line-height: 20px; font-weight: 500; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-width: 0; }
.panel > h2 + * { margin-top: 12px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 16px; align-items: start; }
.note { color: var(--text-2); max-width: 72ch; }
.back { display: inline-block; margin-top: 24px; color: var(--text-2); }

/* Controls */
.btn { min-height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--raised); display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none; transition: background-color 140ms var(--ease), opacity 140ms var(--ease); }
.btn:hover:not(:disabled) { background: var(--raised-2); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.primary { background: var(--text); color: var(--on-primary); border-color: var(--text); font-weight: 500; }
.btn.primary:hover:not(:disabled) { background: #fff; }
.btn.quiet { background: none; border-color: transparent; color: var(--text-2); padding: 0 8px; }
.btn.quiet:hover:not(:disabled) { background: var(--card); color: var(--text); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
kbd { font: 400 11px/16px var(--mono); min-width: 18px; padding: 0 4px; text-align: center; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; color: var(--text-2); background: rgba(255,255,255,.03); display: inline-block; }
.btn.primary kbd { color: var(--on-primary); border-color: rgba(0,0,0,.3); background: transparent; }
select, input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="number"], input[type="search"], input[type="file"], textarea {
  width: 100%; min-height: 36px; padding: 7px 8px; background: var(--deep); border: 1px solid var(--line-2); border-radius: 8px; }
select { background: var(--raised); }
select[multiple] { min-height: 120px; background: var(--deep); }
input[type="file"] { padding: 4px 8px; }
input[type="file"]::file-selector-button { margin-right: 8px; min-height: 26px; padding: 0 8px; background: var(--raised); border: 1px solid var(--line-2); border-radius: 6px; color: var(--text); font: inherit; }
textarea { resize: vertical; min-height: 64px; }
[aria-invalid="true"] { border-color: var(--short); }
.form { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label, .field > span.label { color: var(--text-2); }
.field .help { color: var(--text-3); font-size: 12px; line-height: 16px; }
.errorlist { color: var(--short); font-size: 12px; line-height: 16px; }
.errors { padding: 12px 16px; border: 1px solid var(--short-line); border-radius: 8px; }
.errors .errorlist { font-size: 14px; line-height: 20px; }
.check { flex-direction: row; align-items: center; gap: 8px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; margin-bottom: 16px; }

/* Tables and lists */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th { font-weight: 400; color: var(--text-3); text-align: left; padding: 8px 16px 8px 0; white-space: nowrap; font-size: 12px; line-height: 16px; }
td { padding: 10px 16px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
td.nowrap { white-space: nowrap; }
.rows > li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.rows > li:first-child { border-top: 0; }
.empty { padding: 32px 16px; text-align: center; color: var(--text-2); }
.empty b { display: block; font-weight: 400; font-size: 20px; line-height: 28px; color: var(--text); margin-bottom: 4px; }
.pager { display: flex; align-items: center; gap: 12px; margin-top: 16px; color: var(--text-3); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px; }
.facts dt { color: var(--text-3); font-size: 12px; line-height: 16px; }
.facts dd { margin-top: 2px; overflow-wrap: anywhere; }
.status { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-3); position: relative; display: inline-block; }
.dot.on { background: var(--heard); }
.dot.on::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid var(--heard); animation: live 2.4s var(--ease) infinite; }
.dot.off { background: transparent; border: 1.5px solid var(--need); }
.dot.disabled { background: transparent; border: 1.5px solid var(--text-3); }
.dot.need { background: var(--need); }
.dot.short { background: var(--short); }
@keyframes live { 0% { opacity: .7; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.5); } }
.bar { height: 6px; border-radius: 3px; overflow: hidden; background: var(--raised); display: flex; }
.bar i { display: block; background: var(--heard); }
.bar i.pending { background: var(--need); }
.work { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.work .figure { font-size: 32px; line-height: 36px; font-weight: 500; }

.js .js-hide { display: none; }
html:not(.js) .js-only { display: none; }
.preset-radio { margin: 0; }
.js .preset-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.reason .presets label.btn { cursor: pointer; }
.js .reason { display: none; }
.js .reason.open { display: flex; }
.js .reason.typed-only [data-presets] { display: none; }
details summary { cursor: pointer; }

/* Coverage timeline */
.tl-row, .tl-axis { display: grid; grid-template-columns: 196px minmax(0,1fr) 176px; gap: 16px; align-items: center; }
.tl-axis { padding-bottom: 8px; }
.axis { position: relative; height: 16px; }
.axis span { position: absolute; top: 0; transform: translateX(-50%); color: var(--text-3); white-space: nowrap; }
.axis span.first { transform: none; }
.axis span.last { transform: translateX(-100%); color: var(--text-2); }
.tl-row { padding: 12px 0; border-top: 1px solid var(--line); }
.tl-row.dim { opacity: .6; }
.st-name { display: flex; align-items: center; gap: 8px; font-weight: 500; min-width: 0; text-decoration: none; }
.st-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.st-name:hover span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.st-where { padding-left: 16px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane { position: relative; height: 12px; margin-bottom: 2px; }
.strip { position: relative; height: 24px; border-radius: 4px; overflow: hidden; background: var(--hatch-faint), var(--deep); }
.band { position: absolute; top: 0; bottom: 0; display: block; min-width: 2px; }
.band.cap { background: var(--heard-fill); box-shadow: inset 0 1px 0 var(--heard-edge); }
.band.capture, .band.uncertain { background: var(--hatch), var(--gap-ground); cursor: help; }
.band.processing { background: var(--hatch), var(--heard-fill); cursor: help; }
.tick { position: absolute; bottom: 0; width: 9px; margin-left: -4px; height: 12px; display: block; }
.tick::after { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--text-2); }
.tick.pending::after { background: var(--need); width: 2px; }
.tick:hover::after { background: var(--text); }
.band.future { background: var(--deep); }
/* Plan vs. aired: plan bands are outlines over the coverage strip, so hatching still shows through. */
.plan-tl { margin-top: 24px; }
.tl-row.plan-tl, .tl-axis.plan-tl { grid-template-columns: 96px minmax(0,1fr); margin-top: 0; }
.tl-row.plan-tl { padding: 8px 0; }
.plan-tl .today { color: var(--text); }
.band.plan { background: none; border: 1.5px solid var(--text-3); border-radius: 3px; }
.band.plan.delivered { border-color: var(--heard); }
.band.plan.shortfall { border-color: var(--short); }
.band.plan.pending { border-color: var(--text-2); }
.band.plan.scheduled { border-style: dashed; }
.tick.counted::after { background: var(--heard); width: 2px; }
.tick.outside::after { background: var(--need); width: 2px; }
.tick.partial::after { background: var(--text-3); }
.legend i.plan { background: none; border: 1.5px solid var(--text-3); }
.legend i.plan.delivered { border-color: var(--heard); }
.legend i.plan.shortfall { border-color: var(--short); }
.legend i.t.counted { background: var(--heard); }
.legend i.t.outside { background: var(--need); }
.st-state { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-state b { font-weight: 400; }
.st-state b.off { color: var(--need); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; line-height: 16px; }
.legend i { display: inline-block; width: 20px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legend i.cap { background: var(--heard-fill); }
.legend i.capture { background: var(--hatch), var(--gap-ground); }
.legend i.processing { background: var(--hatch), var(--heard-fill); }
.legend i.none { background: var(--hatch-faint), var(--deep); }
.legend i.t { width: 2px; height: 12px; background: var(--text-2); margin-right: 8px; border-radius: 0; }
.legend i.t.pending { background: var(--need); }
.claim { margin-top: 16px; color: var(--text-2); }
#tip { position: fixed; z-index: 20; max-width: 280px; padding: 8px 10px; background: var(--raised); border: 1px solid var(--line-2); border-radius: 8px; font-size: 12px; line-height: 16px; pointer-events: none; opacity: 0; transition: opacity 120ms var(--ease); left: 0; top: 0; }
#tip.show { opacity: 1; }
.segmented { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; padding: 2px; gap: 2px; }
.segmented a { padding: 3px 10px; border-radius: 6px; color: var(--text-2); text-decoration: none; }
.segmented a[aria-current="true"] { background: var(--raised); color: var(--text); }

/* Rewind player and evidence player */
.rewind-bar { position: relative; height: 40px; border-radius: 6px; overflow: hidden; cursor: pointer; background: var(--hatch-faint), var(--deep); border: 0; padding: 0; width: 100%; display: block; }
.rewind-bar:disabled { cursor: not-allowed; }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--text); pointer-events: none; }
.rw-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.wave { position: relative; height: 96px; background: var(--deep); border-radius: 8px; overflow: hidden; }
.wave.ready { cursor: pointer; }
.wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wave .track { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--line-2); }
.wave .spot { position: absolute; top: 0; bottom: 0; background: rgba(255,255,255,.04); border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); }
.wave .miss { position: absolute; top: 0; bottom: 0; background: var(--hatch), var(--gap-ground); }
.wave-labels { position: relative; height: 16px; margin-top: 4px; color: var(--text-3); }
.wave-labels span { position: absolute; white-space: nowrap; }
.play-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.player audio { width: 100%; display: block; margin-top: 8px; }
.player.enhanced audio { display: none; }
.player:not(.enhanced) .play-row, .player:not(.enhanced) .wave { display: none; }
.player .parts-note { margin-top: 8px; color: var(--text-3); font-size: 12px; line-height: 16px; }
audio { max-width: 100%; }

/* Review queue */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.tabs a { min-height: 32px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent; color: var(--text-2); text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--raised); border-color: var(--line); color: var(--text); }
.split { display: grid; grid-template-columns: 320px minmax(0, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.qlist { border-right: 1px solid var(--line); max-height: 720px; overflow-y: auto; }
.qitem { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background-color 140ms var(--ease); }
.qitem:hover { background: rgba(255,255,255,.02); }
.qitem[aria-current="true"] { background: var(--raised); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.qitem .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qitem .f { grid-column: 1 / -1; color: var(--text-3); font-size: 12px; line-height: 16px; }
.qdetail { padding: 24px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.qdetail h2 { font-size: 20px; line-height: 28px; font-weight: 400; }
.decide { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.hint { color: var(--text-2); }
.hint.need { color: var(--need); }
.reason { display: flex; flex-direction: column; gap: 8px; }
.reason .presets { display: flex; flex-wrap: wrap; gap: 8px; }
.reason[hidden] { display: none; }
.last { margin-top: 12px; color: var(--text-3); min-height: 20px; }
.keys { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--text-3); font-size: 12px; line-height: 16px; }
.split.empty-queue { display: block; }

/* Delivery grid */
.ledger { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: flex-end; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.ledger .big { font-size: 32px; line-height: 36px; font-weight: 500; }
.ledger .big small { font-size: 20px; font-weight: 400; color: var(--text-3); }
.ledger .fig { font: 400 20px/28px var(--mono); }
.ledger .lab { color: var(--text-3); font-size: 12px; line-height: 16px; }
.grid-wrap { overflow-x: auto; }
.grid { display: grid; grid-template-columns: 148px repeat(var(--days, 7), minmax(84px, 1fr)); gap: 4px; }
.grid .h { padding: 4px 8px; color: var(--text-3); font-size: 12px; line-height: 16px; }
.grid .h.today { color: var(--text); }
.grid .rowh { display: flex; flex-direction: column; justify-content: center; padding-right: 8px; min-width: 0; }
.grid .rowh > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid .rowh a[aria-current="true"] { text-decoration-color: currentColor; }
.cell { min-height: 64px; padding: 8px; border-radius: 6px; border: 1px solid var(--line); background: rgba(255,255,255,.015); display: flex; flex-direction: column; justify-content: space-between; gap: 4px; text-decoration: none; transition: border-color 140ms var(--ease); }
.cell:hover { border-color: var(--line-2); }
.cell[aria-current="true"] { border-color: var(--text); }
.cell.none { border-color: transparent; background: none; }
.cell .v { font: 500 14px/20px var(--mono); }
.cell .k { font-size: 11px; line-height: 14px; color: var(--text-3); }
.cell.delivered .v, .cell.delivered .k { color: var(--heard); }
.cell.pending { border-color: var(--need-line); }
.cell.pending .v, .cell.pending .k { color: var(--need); }
.cell.unverifiable { background: var(--hatch), var(--gap-ground); }
.cell.unverifiable .k, .cell.unverifiable .v { color: var(--text); }
.cell.shortfall { border-color: var(--short-line); }
.cell.shortfall .v, .cell.shortfall .k { color: var(--short); }
.cell.scheduled { background: none; border-style: dashed; }
.cell.scheduled .v { color: var(--text-3); font-weight: 400; }
.drill { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.drill ul { margin-top: 12px; }
.drill li { display: grid; grid-template-columns: 200px minmax(0,1fr); gap: 4px 16px; padding: 8px 0; border-top: 1px solid var(--line); }
.drill li .more { grid-column: 2; color: var(--text-2); }

/* Added for the rewrite: flash messages, upload drop zone, campaign mode choice, checkbox lists */
.messages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.messages li { padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 8px; }
.messages li.success { border-color: var(--heard-edge); }
.messages li.error { border-color: var(--short-line); }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 180px; padding: 24px; text-align: center; border: 1px dashed var(--line-2); border-radius: 14px; background: var(--hatch-faint), var(--deep); cursor: pointer; transition: border-color 140ms var(--ease), background-color 140ms var(--ease); }
.drop:hover, .drop.over { border-color: var(--text); }
.drop.over { background: var(--heard-fill); }
.drop .icon { width: 24px; height: 24px; color: var(--text-2); }
.drop b { font-size: 16px; font-weight: 500; }
.files li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.files li:first-child { border-top: 0; }
.files .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .bar { grid-column: 1 / -1; }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.choice label { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer; transition: border-color 140ms var(--ease); }
.choice label:has(input:checked) { border-color: var(--text); background: var(--raised); }
.choice input { margin-top: 3px; }
.choice b { display: block; font-weight: 500; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; max-height: 280px; overflow-y: auto; padding: 4px 0; }
.checks label { display: flex; gap: 8px; align-items: center; min-height: 28px; }
.weekdays { display: flex; flex-wrap: wrap; gap: 4px; }
.weekdays label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer; }
.weekdays label:has(input:checked) { background: var(--raised); border-color: var(--text); }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn.danger { color: var(--short); border-color: var(--short-line); background: none; }
.btn.danger:hover:not(:disabled) { background: rgba(240,103,107,.08); }

@media (prefers-reduced-motion: reduce) {
  .dot.on::after { animation: none; opacity: 0; }
  * { transition: none !important; }
}
@media (max-width: 1100px) {
  .tl-row, .tl-axis { grid-template-columns: 148px minmax(0,1fr) 128px; gap: 12px; }
  .two { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; gap: 8px; overflow: visible; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .nav .label-long { display: none; }
  .side-foot { margin-top: 0; padding: 0; flex-direction: row; align-items: center; justify-content: space-between; }
  .main { padding: 24px 16px 48px; }
  .tl-axis { display: none; }
  .tl-row { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "n s" "t t"; }
  .tl-row > :nth-child(1) { grid-area: n; min-width: 0; }
  .tl-row > :nth-child(2) { grid-area: t; }
  .tl-row > :nth-child(3) { grid-area: s; text-align: right; }
  .split { grid-template-columns: minmax(0,1fr); }
  .qlist { border-right: 0; border-bottom: 1px solid var(--line); max-height: 240px; }
  .qdetail { padding: 16px; }
  .wave-labels .ctx { display: none; }
  .drill li { grid-template-columns: minmax(0,1fr); }
  .drill li .more { grid-column: 1; }
  h1 { font-size: 28px; line-height: 34px; }
}

/* Reports print light so they can be saved as PDF and handed to a station */
@media print {
  :root {
    color-scheme: light;
    --deep: #fff; --page: #fff; --card: #fff; --raised: #f4f4f5; --gap-ground: #fff;
    --text: #171717; --text-2: #525252; --text-3: #6b6b6b;
    --line: rgba(0,0,0,.14); --line-2: rgba(0,0,0,.24);
    --need: #8a5a00; --need-line: rgba(138,90,0,.6); --heard: #15803d; --heard-fill: rgba(21,128,61,.2); --heard-edge: rgba(21,128,61,.5); --short: #b91c1c; --short-line: rgba(185,28,28,.6);
    --hatch: repeating-linear-gradient(135deg, rgba(0,0,0,.42) 0 1px, transparent 1px 6px);
    --hatch-faint: repeating-linear-gradient(135deg, rgba(0,0,0,.2) 0 1px, transparent 1px 6px);
  }
  body { font-size: 12px; }
  .side, .actions, .skip, #tip, .no-print, .player .wave, .player .play-row, .player audio, .pager, .segmented { display: none !important; }
  .shell { display: block; min-height: 0; }
  .main { padding: 0; max-width: none; }
  .panel { border: 0; padding: 0; border-radius: 0; }
  .grid { break-inside: avoid; }
  .cell, .band, .strip, .legend i { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  a { text-decoration: none; }
}

/* Map of Brazil (map_views.py): green shades count delivered plays, hatching means "not heard". */
.map-wrap { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 960px) { .map-wrap { grid-template-columns: minmax(0, 1fr); } }
.brmap { display: block; width: 100%; height: auto; }
.brmap path { vector-effect: non-scaling-stroke; stroke: var(--page); stroke-width: 1px; fill: var(--raised-2); transition: fill 140ms var(--ease); }
.brmap path.none, .legend i.m-none { fill: var(--card); background: var(--card); }
.brmap path.quiet, .legend i.m-quiet { fill: var(--raised-2); background: var(--raised-2); }
.brmap path.p1, .legend i.m-p1 { fill: rgba(76,195,138,.22); background: rgba(76,195,138,.22); }
.brmap path.p2 { fill: rgba(76,195,138,.42); }
.brmap path.p3 { fill: rgba(76,195,138,.66); }
.brmap path.p4, .legend i.m-p4 { fill: var(--heard); background: var(--heard); }
.brmap path.unheard { fill: url(#nao-ouvido); }
.brmap .hatch-ground { fill: var(--gap-ground); }
.brmap .hatch-line { stroke: rgba(237,237,237,.26); }
.brmap a:hover path, .brmap a:focus-visible path, .brmap path.selected { stroke: var(--text); stroke-width: 1.5px; }
.legend i.m-p1 { margin-right: 0; border-radius: 2px 0 0 2px; }
.legend i.m-p4 { border-radius: 0 2px 2px 0; }
