/* SectorLive incident articles: a news article you read, beside a replay you
   can watch. Loads after home.css and incident.css and borrows their tokens,
   hero, facts table, radio calls, FAQ, CTA and sources.
   Desktop = article left (reading width), replay pinned right.
   Phone = replay docked to the top of the screen, foldable, article below.
   Pages with no replay (`.a-grid.solo`) are a single reading column. */
:root {
  --read: 680px;
  --rp-bg: #050607;
}

/* ---------- the split ---------- */
.a-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.a-grid.solo { max-width: calc(var(--read) + 32px); }
@media (min-width: 1000px) {
  .a-grid:not(.solo) { grid-template-columns: minmax(0, var(--read)) minmax(0, 1fr); gap: 48px; align-items: start; }
  /* clear of the floating site nav */
  .a-grid:not(.solo) .replay { position: sticky; top: calc(88px + env(safe-area-inset-top, 0px)); grid-column: 2; grid-row: 1; margin-top: 32px; }
  .a-grid:not(.solo) .a-body { grid-column: 1; grid-row: 1; }
}
@media (max-width: 999px) {
  .a-grid .replay { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 12;
    margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); border-radius: 0; border-inline: 0; }
  .replay.folded .rp-stage { display: none; }
  /* docked on a phone: just the picture and the controls; the article carries the radio */
  .replay .rp-log, .replay .rp-cta, .replay .rp-note { display: none; }
  .rp-stage { max-height: 36svh; }
  .rp-now span { font-size: 13px; }
}

/* ---------- article body ---------- */
.a-body { min-width: 0; display: grid; gap: 24px; padding-block: 32px 64px; max-width: var(--read); }
.a-body > p, .a-body .sync > p { font-size: 18px; line-height: 1.7; color: #E6E3DC; }
.a-body > p b, .a-body .sync > p b { color: var(--text); font-weight: 600; }
.a-body a:not(.btn) { color: var(--sodium); text-underline-offset: 3px; }
.a-body h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.2; padding-top: 16px; }
.a-body h3 { font-size: 19px; line-height: 1.3; }
.a-body .tldr p { font-size: 17px; }
.a-body .sheet-wrap { margin-top: 4px; }
.a-body .call { cursor: pointer; }
.a-body .lesson { border-style: solid; border-color: rgba(89, 217, 142, 0.25); background: rgba(89, 217, 142, 0.05); padding: 18px 20px; gap: 8px; }
.a-body .lesson-tag { color: var(--threshold); }
.a-body .lesson p { color: var(--text-2); font-size: 16px; line-height: 1.6; }
.a-body .lesson p b { color: var(--text); }

/* paragraphs that drive the replay */
.sync { display: grid; gap: 8px; scroll-margin-top: 50svh; }
.seek { justify-self: start; display: inline-flex; gap: 6px; align-items: center; cursor: pointer;
  font: 500 12px/16px var(--mono); color: var(--threshold); background: rgba(89, 217, 142, 0.08);
  border: 1px solid rgba(89, 217, 142, 0.3); border-radius: 999px; padding: 4px 10px; }
.seek::before { content: ""; border-left: 7px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.seek:hover { background: rgba(89, 217, 142, 0.16); }
.sync.is-now .seek { background: var(--threshold); color: #04140A; }

/* the commentary box: the opinion half of the article */
.take-box { padding: 20px 22px; border-radius: 16px; background: var(--s2); display: grid; gap: 10px; }
.take-box .tag { font: 500 12px/16px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sodium); }
.take-box p { font-size: 18px; line-height: 1.65; color: var(--text); }
.take-box .who { font-size: 14px; color: var(--text-3); }

/* in-article call to action */
.a-cta { display: grid; gap: 14px; padding: 24px; border-radius: 20px; border: 1px solid rgba(255, 181, 71, 0.35);
  background: radial-gradient(120% 140% at 0% 0%, rgba(255, 181, 71, 0.12), transparent 60%), var(--s1); }
.a-cta h2, .a-cta h3 { font-size: 24px; line-height: 1.15; padding: 0; }
.a-cta p { color: var(--text-2); font-size: 16px; line-height: 1.55; }
.a-cta .row { display: flex; gap: 10px; flex-wrap: wrap; }

.update-box { display: grid; gap: 6px; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: 12px; }
.update-box b { font: 500 12px/16px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.update-box p { font-size: 15px; line-height: 1.55; color: var(--text-2); }

/* chair timeline (ground stop style: what the controller sees, minute by minute) */
.chair { display: grid; grid-template-columns: 6ch 1fr; gap: 0 16px; margin: 0; }
.chair dt { font: 500 13px/1.9 var(--mono); color: var(--threshold); padding-block: 14px; border-top: 1px solid var(--line); }
.chair dd { margin: 0; padding-block: 14px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.chair dd b { font-weight: 600; font-size: 16px; }
.chair dd span { color: var(--text-2); font-size: 16px; line-height: 1.6; }

/* centers board (ground stop) */
.board { display: grid; gap: 12px; padding: 18px; border-radius: 16px; background: var(--rp-bg); border: 1px solid var(--line-2); }
.board-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font: 500 12px/16px var(--mono); color: var(--text-3); }
.board-h b { color: #FF5A4E; font-weight: 500; }
.centers { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.centers li { font: 500 12px/1 var(--mono); padding: 10px 8px; border-radius: 8px; border: 1px solid rgba(89, 217, 142, 0.3); color: var(--threshold); background: rgba(89, 217, 142, 0.05); text-align: center; }
.centers li.hit { border-color: rgba(255, 90, 78, 0.45); color: #FF5A4E; background: rgba(255, 90, 78, 0.07); animation: flick 2.4s steps(1) infinite; animation-delay: var(--d, 0s); }
@keyframes flick { 0%, 62% { opacity: 1; } 63%, 70% { opacity: 0.35; } 71%, 100% { opacity: 1; } }
.board .cap { font: 12px/1.5 var(--mono); color: var(--text-3); }

/* ---------- the replay panel ---------- */
.replay { display: grid; background: var(--rp-bg); border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; }
.rp-top { white-space: nowrap; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font: 500 12px/16px var(--mono); color: var(--text-3); }
.rp-top .live { color: var(--threshold); display: flex; gap: 8px; align-items: center; margin-right: auto; }
.rp-top .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--threshold); }
.rp-top .clock { color: var(--text-2); font-variant-numeric: tabular-nums; }
.rp-fold { display: none; background: transparent; border: 1px solid var(--line-2); color: var(--text-2); border-radius: 6px; font: inherit; padding: 2px 8px; cursor: pointer; }
@media (max-width: 999px) { .rp-fold { display: inline-block; } }
.rp-stage { position: relative; aspect-ratio: 4 / 3; max-height: 44svh; width: 100%; }
@media (min-width: 1000px) { .rp-stage { aspect-ratio: auto; height: min(calc(100svh - 420px), 560px); min-height: 280px; max-height: none; } }
.rp-stage canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.rp-now { position: absolute; left: 10px; top: 10px; right: 10px; pointer-events: none; }
.rp-now span { display: inline-block; max-width: 40ch; font: 500 14px/1.4 var(--font); background: rgba(5, 6, 7, 0.85); padding: 6px 10px; border-radius: 8px; border-left: 3px solid var(--who, var(--text-3)); }
.rp-note { position: absolute; left: 10px; right: 10px; bottom: 8px; pointer-events: none; font: 11px/1.4 var(--mono); color: var(--text-3); }
.rp-ctl { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.rp-play { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--sodium); color: var(--sodium-ink); cursor: pointer; display: grid; place-items: center; }
.rp-track { position: relative; height: 28px; }
.rp-track input { width: 100%; height: 28px; margin: 0; accent-color: var(--sodium); background: transparent; }
.rp-marks { position: absolute; inset: 0 0 auto; height: 6px; pointer-events: none; }
.rp-marks i { position: absolute; top: 0; width: 2px; height: 6px; background: var(--text-3); }
.rp-marks i.hit { background: #FF5A4E; width: 3px; }
.rp-time { font: 500 12px/1 var(--mono); color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 5ch; text-align: right; }
.rp-speed { font: 500 12px/1 var(--mono); color: var(--text-2); background: transparent; border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 8px; cursor: pointer; }
.rp-log { max-height: 200px; overflow-y: auto; border-top: 1px solid var(--line); padding-block: 6px; margin: 0; list-style: none; padding-inline: 0; }
.rp-log button { display: grid; grid-template-columns: 9ch 7ch 1fr; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text-2); padding: 5px 14px; font: 13px/1.45 var(--font); cursor: pointer; }
.rp-log .ts, .rp-log .w { font: 500 11px/1.9 var(--mono); color: var(--text-3); }
.rp-log button.on { background: var(--s1); color: var(--text); }
.rp-log button.past { color: var(--text-3); }
.rp-log button.narr { font-style: italic; }
.rp-cta { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border-top: 1px solid var(--line); background: linear-gradient(90deg, var(--sodium-dim), transparent); }
.rp-cta p { font-size: 13px; line-height: 1.4; color: var(--text-2); max-width: 30ch; }

/* share-image mode: the replay alone, full frame (tools/render-share.mjs-style capture) */
body.share-still .a-grid .replay { position: fixed; margin: 0; inset: 0; width: 1200px; height: 630px; border: 0; border-radius: 0; z-index: 30; }
body.share-still .rp-top, body.share-still .rp-ctl, body.share-still .rp-log, body.share-still .rp-cta, body.share-still .rp-note, body.share-still .rp-now { display: none; }
body.share-still .rp-stage { height: 630px; max-height: none; aspect-ratio: auto; }

@media (prefers-reduced-motion: reduce) { .centers li.hit { animation: none; } }
