/* SectorLive incident breakdowns. Loads after home.css and borrows its tokens,
   nav, buttons and footer.
   Layout: a scroll story. Desktop = story cards left, radar scope pinned right.
   Phone = scope pinned to the top of the screen, cards slide up underneath it.
   Amber stays the brand; the scope keeps radar colours (green controller,
   amber and blue aircraft, red alerts). */
:root {
  --surface-1: var(--s1);
  --surface-2: var(--s2);
  --surface-3: var(--s3);
  --line-strong: var(--line-2);
  --scope: var(--threshold);
  --scope-dim: rgba(89, 217, 142, 0.14);
  --amber: var(--sodium);
  --amber-dim: var(--sodium-dim);
  --sky: #8CC8FF;
  --sky-dim: rgba(140, 200, 255, 0.14);
  --alert: #FF5A4E;
  --alert-dim: rgba(255, 90, 78, 0.16);
  --scope-h: 46svh;
}
html, body { overflow-x: clip; }
body { margin: 0; }
button { font: inherit; color: inherit; }

/* the floating nav steps aside while the scope is pinned */
.nav { transition: transform 500ms var(--ease), opacity 500ms var(--ease); }
body.in-story .nav { transform: translate(-50%, calc(-100% - 40px)); opacity: 0; pointer-events: none; }

/* ---------- article head ---------- */
.i-hero { padding-block: calc(128px + env(safe-area-inset-top, 0px)) 32px; }
.i-hero .wrap, .i-cast .wrap { display: grid; gap: 20px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font: 500 12px/16px var(--mono); color: var(--text-3); }
.crumbs a { text-decoration: none; color: var(--text-2); }
.crumbs a:hover { color: var(--amber); }
.i-hero h1 { font-size: clamp(32px, 5.6vw, 60px); line-height: 1.04; letter-spacing: -0.03em; max-width: 22ch; }
.dek { font-size: clamp(17px, 2.2vw, 20px); line-height: 1.55; color: var(--text-2); max-width: 60ch; }
.byline { display: flex; gap: 12px; align-items: center; font-size: 14px; line-height: 20px; color: var(--text-3); }
.byline b { color: var(--text-2); font-weight: 500; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--amber); font: 500 13px/1 var(--mono); }

.summary { padding-block: 8px 40px; }
.summary .wrap { display: grid; gap: 20px; }
@media (min-width: 900px) { .summary .wrap { grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; } }
.tldr { display: grid; gap: 10px; padding: 20px; border-radius: 16px; background: var(--surface-1); border: 1px solid var(--line); border-top: 2px solid var(--amber); }
.tldr h2 { font-size: 20px; line-height: 28px; }
.tldr p { color: var(--text-2); line-height: 1.6; }
.tldr p b { color: var(--text); font-weight: 600; }
.sheet-wrap { overflow-x: auto; }
.sheet { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.sheet caption { text-align: left; font: 500 12px/16px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); padding-bottom: 10px; }
.sheet th, .sheet td { text-align: left; vertical-align: top; padding: 9px 0; border-bottom: 1px solid var(--line); }
.sheet th { font: 500 12px/20px var(--mono); color: var(--text-3); padding-right: 16px; white-space: nowrap; }

.i-cast { padding-block: 0 40px; }
.cast { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.who { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 14px 16px; background: var(--surface-1); border: 1px solid var(--line); border-radius: 12px; }
.who .dot { grid-row: span 2; width: 12px; height: 12px; border-radius: 50%; }
.who b { font-weight: 600; }
.who span { font-size: 14px; line-height: 20px; color: var(--text-2); }
.scroll-hint { display: flex; align-items: center; gap: 10px; font: 500 13px/16px var(--mono); color: var(--text-3); }
.scroll-hint i { width: 18px; height: 28px; border: 1.5px solid var(--text-3); border-radius: 10px; position: relative; }
.scroll-hint i::after { content: ""; position: absolute; left: 50%; top: 5px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: var(--amber); animation: wheel 1.6s var(--ease) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- the story ---------- */
.story-grid { display: grid; grid-template-columns: 1fr; }
.scope-col { position: sticky; top: 0; height: calc(var(--scope-h) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); z-index: 8; background: #050607; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,0.9); }
.i-steps { position: relative; z-index: 4; padding-bottom: 40svh; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.i-step { min-height: 78svh; display: flex; align-items: flex-start; padding-block: 16px 0; }
.i-step:first-child { min-height: 60svh; }
.card { width: 100%; max-width: 520px; margin: 0 auto; background: rgba(24,24,24,0.96); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 10px; transition: border-color 400ms var(--ease), opacity 400ms var(--ease); opacity: 0.82; }
.i-step.is-active .card { opacity: 1; border-color: var(--line-strong); }
.card h2.ch, .card h3 { font-size: 20px; line-height: 1.2; }
.card p { color: var(--text-2); font-size: 15px; line-height: 1.55; }
.card p b { color: var(--text); font-weight: 600; }
.kicker { font: 500 12px/16px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); display: flex; gap: 8px; align-items: center; }
.kicker .z { color: var(--scope); }
@media (min-width: 900px) {
  :root { --scope-h: 100svh; }
  .story-grid { grid-template-columns: minmax(360px, 5fr) 7fr; }
  .scope-col { grid-column: 2; grid-row: 1; height: 100svh; padding-top: 0; border-bottom: 0; border-left: 1px solid var(--line); box-shadow: none; }
  .i-steps { grid-column: 1; grid-row: 1; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: 24px; }
  .i-step { min-height: 92svh; align-items: center; padding-block: 24px; }
  .i-step:first-child { min-height: 70svh; }
  .card { padding: 20px; gap: 12px; }
  .card h2.ch, .card h3 { font-size: 22px; }
  .card p { font-size: 16px; }
}

/* radio calls */
.i-radio { display: grid; gap: 10px; }
.call { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border-left: 3px solid var(--who, var(--scope)); }
.call[data-who="atc"] { --who: var(--scope); --who-dim: var(--scope-dim); }
.call[data-who="dal"] { --who: var(--amber); --who-dim: var(--amber-dim); }
.call[data-who="skw"] { --who: var(--sky); --who-dim: var(--sky-dim); }
.call-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 500 11px/14px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--who); }
.wave { display: flex; gap: 2px; align-items: center; height: 14px; }
.wave i { width: 2px; height: 3px; background: var(--who); border-radius: 1px; opacity: 0.5; }
.i-step.is-active .wave i { animation: talk 900ms ease-in-out infinite; opacity: 1; }
.wave i:nth-child(2) { animation-delay: -120ms !important; } .wave i:nth-child(3) { animation-delay: -420ms !important; } .wave i:nth-child(4) { animation-delay: -260ms !important; } .wave i:nth-child(5) { animation-delay: -640ms !important; } .wave i:nth-child(6) { animation-delay: -80ms !important; }
@keyframes talk { 0%, 100% { height: 3px; } 50% { height: 14px; } }
.said { font: 500 14.5px/1.45 var(--mono); color: var(--text); }
@media (min-width: 900px) { .said { font-size: 16px; } }
.plain { font-size: 14px; line-height: 1.45; color: var(--text-2); display: flex; gap: 8px; }
.plain::before { content: "in English"; flex: none; font: 500 10px/20px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--who); background: var(--who-dim); border-radius: 4px; padding: 0 6px; height: 20px; }
.said abbr { color: var(--who); text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }

.lesson { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); }
.lesson-tag { font: 500 11px/14px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.decode { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; line-height: 20px; color: var(--text-2); margin: 0; }
.decode dt { font: 500 14px/20px var(--mono); color: var(--scope); }
.decode dd { margin: 0; }

.quiz { display: grid; gap: 10px; }
.quiz-q { font-weight: 600; font-size: 17px; line-height: 1.35; color: var(--text) !important; }
.opts { display: grid; gap: 8px; }
.opt { text-align: left; cursor: pointer; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); font-size: 15px; line-height: 1.4; transition: border-color 200ms, background-color 200ms; }
.opt:hover { border-color: var(--amber); }
.opt.right { border-color: var(--scope); background: var(--scope-dim); }
.opt.wrong { border-color: var(--alert); background: var(--alert-dim); }
.opt[aria-disabled="true"] { cursor: default; }
.verdict b { color: var(--text); }
.freeze-tag { display: inline-flex; font: 500 11px/14px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--sodium-ink); background: var(--amber); padding: 4px 8px; border-radius: 4px; width: fit-content; }

/* the scope */
.scope { position: relative; width: 100%; height: 100%; overflow: hidden; }
.scope canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }
.hud { position: absolute; pointer-events: none; font: 500 11px/14px var(--mono); letter-spacing: 0.06em; color: var(--text-3); }
.hud-tl { left: max(12px, env(safe-area-inset-left, 0px)); top: 12px; display: grid; gap: 2px; }
.hud-tl .clock { font-size: 16px; line-height: 20px; color: var(--scope); letter-spacing: 0.02em; }
.hud-tr { right: max(12px, env(safe-area-inset-right, 0px)); top: 12px; text-align: right; display: grid; gap: 2px; }
.hud-tr .score { color: var(--text); font-size: 13px; }
.hud-tr .lbl { display: none; }
.sep { position: absolute; left: max(12px, env(safe-area-inset-left, 0px)); bottom: 30px; pointer-events: none; display: grid; gap: 4px; padding: 8px 10px; border-radius: 8px; background: rgba(0,0,0,0.72); border: 1px solid var(--line); font: 500 11px/14px var(--mono); color: var(--text-2); min-width: 160px; transition: opacity 400ms var(--ease), border-color 300ms; }
.sep .row { display: flex; justify-content: space-between; gap: 16px; }
.sep .row b { color: var(--text); font-weight: 500; }
.sep .state { letter-spacing: 0.08em; text-transform: uppercase; color: var(--scope); }
.sep.is-closing { border-color: var(--alert); }
.sep.is-closing .state { color: var(--alert); }
.sep.is-quiet { opacity: 0; }
.timeline { position: absolute; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: 12px; height: 12px; pointer-events: none; }
.timeline .track { position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: var(--line-strong); border-radius: 2px; }
.timeline .tick { position: absolute; top: 2px; width: 2px; height: 8px; border-radius: 1px; }
.timeline .head { position: absolute; top: 0; width: 2px; height: 12px; background: var(--text); box-shadow: 0 0 8px var(--text); }
.caption { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); pointer-events: none; font: 500 11px/16px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 10px; border-radius: 6px; background: var(--alert); color: #000; opacity: 0; transition: opacity 250ms; white-space: nowrap; }
.caption.on { opacity: 1; }
.caption.amber { background: var(--amber); }
@media (min-width: 900px) {
  .hud-tl .clock { font-size: 20px; line-height: 24px; }
  .hud-tr .lbl { display: block; }
  .sep { bottom: 34px; min-width: 176px; }
  .caption { top: 14px; font-size: 12px; }
}

/* ---------- after the story ---------- */
.i-section { padding-block: 80px; border-top: 1px solid var(--line); }
.i-section h2 { font-size: clamp(30px, 5vw, 48px); line-height: 1.05; margin-block: 12px; }
.i-section .lead { color: var(--text-2); font-size: 18px; line-height: 28px; max-width: 60ch; margin-bottom: 32px; }
.takeaways { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.take, .qa { padding: 20px; border-radius: 16px; background: var(--surface-1); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.take .n { font: 500 12px/16px var(--mono); color: var(--amber); }
.take h3 { font-size: 19px; line-height: 1.25; }
.take p, .qa p { color: var(--text-2); font-size: 15px; line-height: 1.55; }
.qa p b { color: var(--text); font-weight: 600; }
.qa a { color: var(--amber); }
.faq { display: grid; gap: 12px; max-width: 760px; }
.qa h3 { font-size: 17px; line-height: 1.3; }

.cta { position: relative; overflow: hidden; border-radius: 24px; border: 1px solid rgba(255,181,71,0.3); background: radial-gradient(120% 140% at 85% 0%, rgba(255,181,71,0.14), transparent 55%), var(--surface-1); padding: clamp(24px, 5vw, 56px); display: grid; gap: 28px; }
@media (min-width: 900px) { .cta { grid-template-columns: 1.1fr 1fr; align-items: center; } }
.cta h2 { font-size: clamp(34px, 5.5vw, 56px); line-height: 1; margin: 0; }
.cta p { color: var(--text-2); font-size: 17px; line-height: 1.55; }
.cta-copy { display: grid; gap: 16px; justify-items: start; }
.goals { display: grid; gap: 6px; font-size: 15px; color: var(--text-2); padding: 0; margin: 0; list-style: none; }
.goals li::before { content: "→ "; color: var(--amber); font-family: var(--mono); }
.soon { font: 500 12px/16px var(--mono); color: var(--text-3); }
.strip-wrap { display: grid; gap: 14px; }
.strip { font: 500 13px/1.4 var(--mono); background: #F2EFE6; color: #1A1A16; border-radius: 6px; padding: 14px 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 16px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); transform: rotate(-1.5deg); }
.strip:nth-child(2) { transform: rotate(1deg) translateX(12px); }
.strip .big { font-size: 20px; }
.strip .muted { color: #6B675C; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.strip hr { grid-column: 1 / -1; border: 0; border-top: 1px solid #CFC9B8; margin: 6px 0; width: 100%; }

details.transcript { border: 1px solid var(--line); border-radius: 16px; background: var(--surface-1); }
details.transcript summary { cursor: pointer; padding: 18px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.transcript summary::after { content: "+"; font-family: var(--mono); color: var(--amber); }
details[open].transcript summary::after { content: "–"; }
.tx { padding: 0 20px 20px; overflow-x: auto; }
.tx table { border-collapse: collapse; min-width: 560px; width: 100%; font-size: 14px; line-height: 20px; }
.tx td { padding: 6px 12px 6px 0; vertical-align: top; color: var(--text-2); }
.tx th { padding: 6px 12px 6px 0; vertical-align: top; text-align: left; font: 400 14px/20px var(--mono); color: var(--text-3); white-space: nowrap; }
.tx td:first-of-type { font: 500 12px/20px var(--mono); white-space: nowrap; }
.tx .w-atc { color: var(--scope); } .tx .w-dal { color: var(--amber); } .tx .w-skw { color: var(--sky); } .tx .w-other { color: var(--text-3); }

/* click-to-load video: a thumbnail until someone asks for the player */
.yt { position: relative; display: block; width: 100%; max-width: 760px; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #111 center / cover no-repeat; cursor: pointer; padding: 0; }
.yt::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(0,0,0,0.75)); }
.yt .play { position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; margin: -25px 0 0 -36px; border-radius: 14px; background: rgba(0,0,0,0.75); z-index: 1; transition: background-color 200ms; }
.yt .play::after { content: ""; position: absolute; left: 30px; top: 15px; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.yt:hover .play { background: #FF0033; }
.yt .yt-title { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; text-align: left; font-weight: 600; font-size: 15px; line-height: 20px; color: #fff; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sources { display: grid; gap: 12px; margin-top: 24px; color: var(--text-3); font-size: 14px; line-height: 20px; max-width: 70ch; }

/* incidents hub */
.hub-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.hub-card { display: grid; gap: 0; border-radius: 16px; overflow: hidden; background: var(--surface-1); border: 1px solid var(--line); text-decoration: none; transition: border-color 300ms var(--ease); }
.hub-card:hover { border-color: var(--amber); }
.hub-card img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; display: block; }
.hub-card .body { padding: 20px; display: grid; gap: 8px; }
.hub-card h2 { font-size: 20px; line-height: 1.25; }
.hub-card p { color: var(--text-2); font-size: 15px; line-height: 1.5; }
.hub-card .meta { font: 500 12px/16px var(--mono); color: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
  .scroll-hint i::after, .i-step.is-active .wave i { animation: none; }
  .nav { transition: none; }
}
