/* ==========================================================================
   Storyline & Sinker — Resources (hub + articles)
   Loaded after styles.css. Every new class is prefixed res-.
   Rule: words never move. Prose, headings' opacity, captions and CTA text are
   always visible without JS and under reduced motion. Any hide-until-reveal
   state is written as  html.ready <sel>:not(.in)  inside a no-preference query.
   ========================================================================== */

.res-art, .res-hub {
  --ink: #E6E5E0;
  --col: min(34em, 100% - 32px);
  --gut: max(24px, (100vw - 1240px) / 2);
}
.res-art .grain, .res-hub .grain { opacity: .05; }
.res-art .ambient, .res-art .grain { transition: opacity 1.2s var(--ease); }
html.res-screening .ambient { opacity: .4; }
html.res-screening .grain { opacity: .02; }

@media (prefers-reduced-motion: no-preference) {
  html:has(body.res-art) { scroll-behavior: smooth; }
}

/* skip link */
.res-skip {
  position: fixed; left: 12px; top: 12px; z-index: 120; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  background: var(--teal); color: #071012; font: 700 .74rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  transform: translateY(-160%);
}
.res-skip:focus, .res-skip:focus-visible { transform: none; outline-offset: 2px; }
.res-article:focus, .res-hub main:focus { outline: none; }

/* shared decorative label helpers: words live in data-l / data-r, never DOM text */
.res-tag { display: block; margin-bottom: 10px; font: 500 .6rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-t); }
.res-tag::before { content: attr(data-l); }

/* ==========================================================================
   6.1 HERO / OPENING TITLE CARD
   ========================================================================== */
.res-hero { position: relative; padding: clamp(112px, 16vh, 160px) 0 clamp(56px, 8vh, 96px); }
.res-hero-grid { position: relative; z-index: 1; width: min(1240px, 100% - 48px); margin-inline: auto; }

.res-slate { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 22px; font: 500 .62rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-t); }
.res-slate::before { content: attr(data-l); order: 1; }
.res-slate::after { content: attr(data-r); order: 2; color: var(--text2); }
.res-slate i {
  order: 0; position: relative; display: block; width: 140px; height: 14px; flex: none;
  background: repeating-linear-gradient(-45deg, var(--teal) 0 10px, #0E1115 10px 20px); border: 1px solid rgba(25, 230, 207, .55);
}
.res-slate i::before {  /* clapper arm */
  content: ''; position: absolute; left: -1px; right: -1px; bottom: calc(100% + 2px); height: 10px; transform-origin: 0 100%;
  background: repeating-linear-gradient(45deg, var(--teal) 0 10px, #0E1115 10px 20px); border: 1px solid rgba(25, 230, 207, .55);
}
.res-slate { padding-top: 12px; }

.res-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; }
.res-crumbs li { display: flex; align-items: center; font: 500 .66rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text2); }
.res-crumbs li + li::before { content: "/"; margin: 0 10px; color: var(--text2); opacity: .6; }
.res-crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; transition: color .4s; }
.res-crumbs a:hover { color: var(--accent-t); }
.res-crumbs span[aria-current] { display: inline-flex; align-items: center; min-height: 44px; }

.res-topics { max-width: none; margin: 6px 0 18px; font: 500 .7rem/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-t); }

.res-h1 {
  position: relative; max-width: 13em; padding-bottom: 26px; color: var(--text);
  font: 400 clamp(2.4rem, 1.4rem + 3.6vw, 5rem)/1.0 var(--serif); letter-spacing: -.025em;
  text-wrap: balance; hyphens: none; overflow-wrap: normal;
}
.res-h1::after { content: ''; position: absolute; left: 0; bottom: 0; width: 72px; height: 1px; background: var(--teal); box-shadow: 0 0 12px var(--teal); transform-origin: left; }

.res-byline { max-width: none; margin-top: 22px; font: 500 .72rem/1.7 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text2); }
.res-byline time, .res-byline span, .res-one-meta time, .res-one-meta span { white-space: nowrap; }
.res-byline a { color: var(--text); text-decoration: underline 1px var(--teal); text-underline-offset: 3px; }
.res-byline a:hover { color: var(--accent-t); }

.res-answer { position: relative; max-width: 34em; margin-top: 28px; padding: 22px 26px; }
.res-answer p { max-width: none; color: var(--text); font: 400 clamp(1.35rem, 1.1rem + .9vw, 1.8rem)/1.38 var(--serif); letter-spacing: -.005em; }

/* the plate: a real still, letterboxed to 2.39:1 inside a 16:9 frame */
.res-plate { position: relative; margin-top: 40px; }
.res-plate-frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #050607;
}
@media (prefers-reduced-motion: no-preference) {
  html.res-motion .res-plate-frame { transform: translate3d(calc(var(--px, 0) * -10px), calc(var(--hp, 0) * 40px + var(--py, 0) * -8px), 0); }
}
.res-plate-frame img, .res-plate-frame video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(.8) contrast(1.06) brightness(.78);
}
.res-plate-frame .res-live { opacity: 0; transition: opacity .6s var(--ease); }
.res-plate.has-live .res-live { opacity: 1; }
.res-plate-frame::after {  /* blue grade */
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: color;
  background: linear-gradient(200deg, rgba(24, 58, 102, .35), rgba(24, 58, 102, 0) 70%);
}
.res-plate-frame::before, .res-bar-b { content: ''; position: absolute; left: 0; right: 0; height: 12.8%; background: #020304; z-index: 3; }
.res-plate-frame::before { top: 0; }
.res-bar-b { bottom: 0; display: block; }
.res-plate-hud {
  position: absolute; left: 0; right: 0; bottom: 0; height: 12.8%; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 0 16px;
  font: 500 .58rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--text2);
}
.res-plate-hud::before { content: attr(data-l); order: 1; }
.res-plate-hud::after { content: attr(data-r); order: 2; margin-left: auto; }
.res-plate-hud i { order: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--text2); opacity: .6; transition: background .5s, box-shadow .5s, opacity .5s; }
.res-plate.is-live .res-plate-hud i { background: var(--teal); opacity: 1; box-shadow: 0 0 10px var(--teal), 0 0 2px var(--teal); }
.res-plate > .cb.tl { top: -8px; left: -8px; } .res-plate > .cb.br { bottom: 26px; right: -8px; }
.res-plate figcaption { margin-top: 10px; max-width: none; font: 500 .62rem/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text2); }

@media (min-width: 1100px) {
  .res-hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); column-gap: 56px; align-content: start; }
  .res-hero-grid > :not(.res-plate) { grid-column: 1; }
  .res-plate { grid-column: 2; grid-row: 1 / span 6; align-self: center; margin: 0 calc(-1 * var(--gut)) 0 0; }
  .res-plate-frame { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%); mask-image: linear-gradient(90deg, transparent 0, #000 22%); }
  .res-plate figcaption { text-align: right; padding-right: var(--gut); }
  .res-plate > .cb.br { right: calc(var(--gut) - 8px); }
  .res-plate > .cb.tl { left: 18%; }
}
@media (max-width: 1099px) {
  .res-hero-grid { width: min(1240px, 100% - 48px); }
  .res-answer { padding: 18px 18px 20px; margin-inline: -4px; }
}
@media (max-width: 559px) { .res-hero-grid { width: calc(100% - 32px); } }

/* Layer 2 — title sequence. Only under html.res-motion (inline head script),
   every keyframe ends in the default, visible state. Text never animates. */
@media (prefers-reduced-motion: no-preference) {
  html.res-motion .res-plate-frame { animation: resPlateIn 1.2s var(--ease) both; }
  html.res-motion .res-plate-frame img { animation: resPush 6s var(--ease) both; }
  html.res-motion .res-plate-frame::before, html.res-motion .res-bar-b { animation: resIris 1.6s var(--ease) .15s both; }
  html.res-motion .res-plate-hud { animation: resHud 1.6s var(--ease) .15s both; }
  html.res-motion .res-slate i::before { animation: resClap .28s cubic-bezier(.5, 0, .9, .4) .4s both; }
  html.res-motion .res-h1::after { animation: resLine 1s var(--ease) .7s both; }
}
@keyframes resPlateIn { from { opacity: .35; } }
@keyframes resPush { from { transform: scale(1.06); } }
@keyframes resIris { from { height: 46%; } }
@keyframes resHud { from { opacity: 0; } }
@keyframes resClap { from { transform: rotate(-14deg); } }
@keyframes resLine { from { transform: scaleX(0); } }

/* ==========================================================================
   6.2 PROSE
   ========================================================================== */
.res-prose { width: var(--col); margin-inline: auto; font-size: clamp(1.125rem, 1.04rem + .3vw, 1.25rem); }
.res-prose > p { max-width: none; color: var(--ink); font: 400 1em/1.72 var(--sans); }
.res-prose > p + p { margin-top: 1.1em; }
.res-prose a { color: var(--text); text-decoration: underline 1px var(--teal); text-underline-offset: 3px; transition: color .3s; }
.res-prose a:hover { color: var(--accent-t); }
.res-prose > p a[href^="http"]::after { content: "\2197"; content: "\2197" / ""; display: inline-block; margin-left: .18em; font-size: .78em; color: var(--accent-t); text-decoration: none; }

.res-intro { position: relative; padding-top: clamp(24px, 4vh, 48px); }

/* ==========================================================================
   6.3 INTERTITLE CARD
   ========================================================================== */
.res-ch { position: relative; padding: clamp(72px, 11vh, 128px) 0 0; scroll-margin-top: 84px; }
.res-finale, .res-intro { scroll-margin-top: 84px; }
/* off-canvas start positions of the .cb brackets must never widen the page */
.res-ch, .res-intro, .res-showing, .res-credits { overflow-x: clip; }
.res-card {
  position: relative; width: min(1040px, 100% - 32px); min-height: clamp(240px, 36vh, 400px); margin: 0 auto clamp(40px, 6vh, 64px);
  display: grid; place-items: center; text-align: center; padding: 64px 32px; isolation: isolate;
  border: 1px solid var(--line);
  background: radial-gradient(60% 70% at 50% 50%, color-mix(in srgb, var(--accent) 7%, #0E1115), #0B0D10);
}
.res-card::before { content: ''; position: absolute; inset: 14px; border: 1px solid var(--line2); pointer-events: none; }
.res-card > .cb.tl { top: -1px; left: -1px; } .res-card > .cb.tr { top: -1px; right: -1px; }
.res-card > .cb.bl { bottom: -1px; left: -1px; } .res-card > .cb.br { bottom: -1px; right: -1px; }
.res-num { position: absolute; inset: 0; z-index: -1; display: grid; place-items: center; pointer-events: none; overflow: hidden; }
.res-num::before {
  content: attr(data-l); font: 400 clamp(8rem, 20vw, 16rem)/1 var(--serif); letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--accent) 45%, transparent);
}
.res-card-slate {
  position: absolute; top: 26px; left: 32px; right: 32px; display: flex; justify-content: space-between; gap: 16px;
  font: 500 .6rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-t);
}
.res-card-slate::before { content: attr(data-l); }
.res-card-slate::after { content: attr(data-r); color: var(--text2); }
.res-card h2 {
  position: relative; z-index: 1; max-width: 15em; color: var(--text);
  font: 400 clamp(2rem, 1.3rem + 2.8vw, 3.6rem)/1.05 var(--serif); letter-spacing: -.02em; text-wrap: balance;
}
@media (max-width: 699px) {
  .res-card { min-height: 0; padding: 64px 20px 36px; text-align: left; place-items: start; }
  .res-card::before { inset: 10px; }
  .res-card-slate { top: 22px; left: 20px; right: 20px; }
  .res-num { place-items: start end; padding: 34px 16px 0 0; }
  .res-num::before { font-size: clamp(5.5rem, 28vw, 8rem); -webkit-text-stroke-color: color-mix(in srgb, var(--accent) 30%, transparent); }
  .res-card h2 { font-size: 2rem; }
}

/* ==========================================================================
   6.4 TOC — scene selection
   ========================================================================== */
.res-toc {
  position: relative; width: min(1040px, 100% - 32px); margin: 64px auto 0; padding: 34px 32px;
  background: rgba(21, 25, 31, .6); border: 1px solid var(--line);
}
.res-toc::before, .res-toc::after {
  content: ''; position: absolute; left: 0; right: 0; height: 12px; pointer-events: none;
  background: radial-gradient(circle, #0B0D10 3px, transparent 3.5px) 0 0 / 22px 12px repeat-x;
}
.res-toc::before { top: 4px; } .res-toc::after { bottom: 4px; }
.res-toc-l { max-width: none; margin-bottom: 10px; font: 500 .66rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-t); }
.res-toc ol { display: grid; column-gap: 40px; }
@media (min-width: 900px) { .res-toc ol { grid-auto-flow: column; grid-template-rows: repeat(5, auto); grid-template-columns: 1fr 1fr; } }
.res-toc a {
  position: relative; display: flex; align-items: center; gap: 4px; min-height: 56px; padding: 10px 0;
  font: 500 1rem/1.35 var(--sans); color: var(--text); text-decoration: none;
  background: linear-gradient(var(--line), var(--line)) left bottom / 100% 1px no-repeat;
  transition: background-size 1s var(--ease) calc(var(--k, 0) * 60ms), color .3s;
}
.res-toc a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--teal); box-shadow: 0 0 8px var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.res-toc a:hover::after, .res-toc a:focus-visible::after { transform: scaleX(1); }
.res-toc-n { flex: none; width: 2.4em; }
.res-toc-n::before { content: attr(data-l); font: 500 .66rem/1 var(--mono); letter-spacing: .14em; color: var(--text2); transition: color .3s; }
.res-toc-t { transition: transform .5s var(--ease); }
.res-toc a:hover .res-toc-n::before, .res-toc a:focus-visible .res-toc-n::before { color: var(--accent-t); }
.res-toc a:hover .res-toc-t, .res-toc a:focus-visible .res-toc-t { transform: translateX(4px); }
@media (max-width: 560px) { .res-toc { padding: 30px 20px; } .res-toc a { min-height: 48px; } }

/* ==========================================================================
   6.5 SET PIECES
   ========================================================================== */
/* ch02 — teleprompter cue */
.res-quote {
  position: relative; margin: 40px 0; padding: 30px 32px 30px 36px;
  background: rgba(21, 25, 31, .72); border-left: 2px solid var(--teal);
}
.res-quote p { max-width: none; color: var(--text); font: 400 clamp(1.35rem, 1.1rem + .8vw, 1.65rem)/1.4 var(--serif); }
.res-quote > .cb.tl { top: -1px; left: -2px; } .res-quote > .cb.br { bottom: -1px; right: -1px; }
.res-quote::before { content: ''; position: absolute; left: -2px; top: 0; width: 2px; height: 40px; background: #fff; box-shadow: 0 0 12px 2px var(--teal); opacity: 0; }
@media (min-width: 1100px) { .res-quote { margin-inline: -40px; } }
@media (max-width: 560px) { .res-quote { padding: 24px 20px 24px 22px; } }

/* ch03 — selected take */
.res-take { margin: 48px auto; }
.res-take-strip { position: relative; padding: 30px 22px 40px; background: #050607; border: 1px solid var(--line); }
.res-take-strip::before, .res-take-strip::after {
  content: ''; position: absolute; left: 0; right: 0; height: 12px;
  background: radial-gradient(circle, rgba(244, 243, 239, .13) 3px, transparent 3.5px) 0 0 / 22px 12px repeat-x;
}
.res-take-strip::before { top: 8px; } .res-take-strip::after { bottom: 8px; }
.res-take-frame { position: relative; width: min(280px, 72vw); aspect-ratio: 9 / 16; margin: auto; background: #0E1115; }
.res-take-frame video, .res-take-frame img, .res-screen-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #050607; }
.res-ring { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); overflow: visible; pointer-events: none; z-index: 2; }
.res-ring path { fill: none; stroke: rgba(244, 243, 239, .85); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s var(--ease) .2s; }
.res-edge { position: absolute; left: 22px; right: 22px; bottom: 16px; display: flex; justify-content: space-between; font: 500 .55rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--text2); }
.res-edge::before { content: attr(data-l); color: var(--accent-t); }
.res-edge::after { content: attr(data-r); }
.res-take figcaption, .res-map figcaption { max-width: 44ch; margin: 14px auto 0; text-align: center; font: 500 .66rem/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text2); }

/* play overlay (added by resources.js) */
.res-play {
  position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; white-space: nowrap;
  background: rgba(11, 13, 16, .72); border: 1px solid var(--teal); color: var(--text);
  font: 500 .64rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .4s, color .4s, box-shadow .5s;
}
.res-play svg { width: 14px; height: 14px; fill: var(--teal); flex: none; transition: fill .4s; }
.res-play:hover, .res-play:focus-visible { background: var(--teal); color: #071012; box-shadow: 0 0 40px -6px var(--teal); }
.res-play:hover svg, .res-play:focus-visible svg { fill: #071012; }
.res-play[hidden] { display: none; }
.res-screen .res-play { top: auto; bottom: 8%; transform: translateX(-50%); }

/* ch04 — screening room */
.res-screen { position: relative; margin: 48px 0; isolation: isolate; overflow-x: clip; }
.res-screen-frame { position: relative; width: min(260px, 72vw); aspect-ratio: 9 / 16; margin: 0 auto; border: 10px solid #121519; outline: 1px solid var(--line2); background: #050607; box-sizing: content-box; }
.res-beam {
  position: absolute; inset: -30% -40% auto; height: 160%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 200deg at 50% 0, transparent, color-mix(in srgb, var(--accent) 10%, transparent) 20deg, transparent 40deg);
}
.res-screen figcaption { max-width: 34ch; margin: 18px auto 0; font: 400 .95rem/1.6 var(--sans); color: var(--text2); text-align: center; }
.res-screen figcaption .res-tag { margin-bottom: 12px; }
@media (min-width: 900px) {
  .res-screen { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: end; }
  .res-screen-frame { width: 280px; margin: 0; }
  .res-screen figcaption { margin: 0 0 6px; text-align: left; }
}

/* ch04 — edit timeline (decorative) */
.res-timeline { position: relative; overflow: hidden; display: grid; gap: 10px; margin: 40px 0; padding: 18px 0; border-block: 1px solid var(--line); }
.res-timeline .trk { position: relative; display: block; height: 18px; }
.res-timeline .trk::before { content: attr(data-l); position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 90px; font: 500 .55rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text2); white-space: nowrap; }
.res-timeline .trk::after {
  content: ''; position: absolute; top: 2px; bottom: 2px;
  left: calc(96px + var(--s) * (100% - 96px)); width: calc(var(--w) * (100% - 96px));
  background: color-mix(in srgb, var(--teal) 70%, transparent); box-shadow: 0 0 14px -2px var(--teal);
}
.res-timeline .res-ph { position: absolute; top: 8px; bottom: 8px; left: 96px; right: 0; border-right: 1px solid var(--teal); display: none; pointer-events: none; }

/* ch08 — continuity log (decorative, intentionally empty) */
.res-log { display: grid; grid-template-columns: 1.6fr .8fr .9fr 1.2fr; column-gap: 14px; margin: 36px 0 8px; padding: 16px 18px 8px; background: rgba(21, 25, 31, .45); border: 1px solid var(--line); }
.res-log span { padding-bottom: 10px; border-bottom: 1px solid var(--line2); font: 500 .58rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text2); }
.res-log span::before { content: attr(data-l); }
.res-log i { position: relative; grid-column: 1 / -1; height: 34px; border-bottom: 1px solid var(--line2); transform-origin: left; transition: transform 1s var(--ease) calc(var(--k, 0) * 120ms + .2s); }
.res-log i:first-of-type::after { content: ''; position: absolute; left: 0; bottom: 8px; width: 7px; height: 14px; background: var(--teal); opacity: .8; }
.res-prose > .res-log:not(:last-child) { margin-bottom: 1.6em; }
@media (max-width: 559px) { .res-log { grid-template-columns: 1fr 1fr; row-gap: 12px; } }

/* ch09 — the map */
.res-map { position: relative; width: min(1100px, 100vw - 32px); margin: 56px 0; margin-inline: calc(50% - min(550px, 50vw - 16px)); padding: clamp(20px, 3vw, 40px); border: 1px solid var(--line); background: linear-gradient(165deg, rgba(21, 25, 31, .8), rgba(21, 25, 31, .35)); font-size: 1.0625rem; }
.res-map:not(:has(.mm-wrap)) { display: none; }
.res-map > .cb.tl { top: -1px; left: -1px; } .res-map > .cb.br { bottom: -1px; right: -1px; }
.res-map figcaption { max-width: 60ch; margin-top: 22px; }
.res-map .mm-disc { text-align: left; }
@media (max-width: 760px) { .res-map .mm-reels { display: none !important; } }

/* finale */
.res-finale {
  position: relative; min-height: 92svh; margin-top: clamp(72px, 11vh, 128px); padding: 14vh 16px;
  display: grid; place-items: center; align-content: center; text-align: center;
}
.res-finale::before, .res-finale::after { content: ''; position: absolute; left: 0; right: 0; height: 9vh; background: #020304; transition: transform 1.2s var(--ease); pointer-events: none; }
.res-finale::before { top: 0; transform-origin: top; }
.res-finale::after { bottom: 0; transform-origin: bottom; }
.res-finale-lead { max-width: 36em; margin: 0 auto; color: var(--ink); font: 400 1.2rem/1.6 var(--sans); }
.res-states { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 30px; font: 500 .58rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--text2); }
.res-states span { display: inline-flex; align-items: center; gap: 8px; }
.res-states span::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); opacity: .35; transition: opacity .5s var(--ease) calc(var(--k, 0) * 90ms), box-shadow .5s var(--ease) calc(var(--k, 0) * 90ms); }
.res-states span::after { content: attr(data-l); }
.res-finale:has(a:hover, a:focus-visible) .res-states span::before { opacity: 1; box-shadow: 0 0 12px var(--c), 0 0 2px var(--c); }
.res-finale-cta { max-width: none; }
.res-finale-cta a { display: inline-block; color: var(--text); text-decoration: none; }
.res-finale-cta a:focus-visible { outline: 2px solid var(--teal); outline-offset: 10px; }
.fl-q { display: block; max-width: 12em; margin: 28px auto 32px; font: 400 clamp(2.3rem, 1rem + 5.6vw, 6rem)/.98 var(--serif); letter-spacing: -.03em; color: var(--text); text-wrap: balance; transition: text-shadow .6s var(--ease); }
.res-finale-cta a:hover .fl-q, .res-finale-cta a:focus-visible .fl-q { text-shadow: 0 0 44px color-mix(in srgb, var(--teal) 60%, transparent); }
.fl-go {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 56px; padding: 0 30px; overflow: hidden;
  background: var(--teal); color: #071012; border: 1px solid var(--teal); border-radius: 2px;
  font: 700 .78rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  box-shadow: 0 14px 60px -16px rgba(25, 230, 207, .65), inset 0 0 0 1px rgba(255, 255, 255, .25);
  transition: box-shadow .5s var(--ease);
}
.fl-go::before { content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-18deg); transition: left .9s var(--ease); }
.fl-go svg { flex: none; transition: transform .5s var(--ease); }
.res-finale-cta a:hover .fl-go, .res-finale-cta a:focus-visible .fl-go { box-shadow: 0 18px 80px -10px rgba(25, 230, 207, .85), inset 0 0 0 1px rgba(255, 255, 255, .4); }
.res-finale-cta a:hover .fl-go::before { left: 120%; }
.res-finale-cta a:hover .fl-go svg, .res-finale-cta a:focus-visible .fl-go svg { transform: translateX(5px); }
@media (max-width: 559px) {
  .res-states { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; justify-items: start; }
  .res-finale-cta a { display: block; }
  .fl-go { display: flex; width: 100%; padding: 0 20px; }
}

/* credits */
.res-credits { padding: 96px 16px 80px; text-align: center; font: 500 .66rem/1.8 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text2); }
.res-credits p { max-width: none; margin-inline: auto; color: var(--text2); }
.res-credits p + p { margin-top: .4em; }
.res-credits a:not(.tlink) { color: var(--text); text-decoration: underline 1px var(--teal); text-underline-offset: 3px; }
.res-credits .tlink { margin-top: 18px; }
.res-end { display: block; margin-bottom: 28px; color: var(--accent-t); }
.res-end::before { content: attr(data-l); }
.res-end::after { content: ''; display: block; width: 64px; height: 1px; margin: 16px auto 0; background: var(--teal); box-shadow: 0 0 10px var(--teal); }

/* ==========================================================================
   LAYER 3 — edit reveals (one-shot, gated: never hides words)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* intertitle: inner frame draws, H2 pulls from soft focus (opacity stays 1) */
  .res-card h2 { transition: filter .9s var(--ease) .15s; }
  html.ready .res-card:not(.in) h2 { filter: blur(6px); }
  .res-card::before { transition: clip-path 1.2s var(--ease); }
  html.ready .res-card:not(.in)::before { clip-path: inset(0 100% 100% 0); }
  .res-card-slate { transition: opacity .9s var(--ease) .3s; }
  html.ready .res-card:not(.in) .res-card-slate { opacity: 0; }

  /* TOC: row rules draw in */
  html.ready .res-toc:not(.in) a { background-size: 0 1px; }

  /* teleprompter scan line runs once */
  html.ready .res-quote.in::before { animation: resScan 1.6s var(--ease) .5s 1 both; }

  /* selected take: grease-pencil ring */
  html.ready .res-take:not(.in) .res-ring path { stroke-dashoffset: 1; }

  /* edit timeline: playhead crosses, clips light as it reaches them */
  html.ready .res-timeline .trk::after { background: var(--line2); box-shadow: none; transition: background .4s, box-shadow .4s; transition-delay: calc(var(--s) * 2.4s + .2s); }
  html.ready .res-timeline.in .trk::after { background: color-mix(in srgb, var(--teal) 70%, transparent); box-shadow: 0 0 14px -2px var(--teal); }
  html.ready .res-timeline.in .res-ph { display: block; animation: resPh 2.6s linear .2s both; }

  /* continuity log: rules draw, caret blinks four times (< 5s) then holds */
  html.ready .res-log:not(.in) i { transform: scaleX(0); }
  html.ready .res-log.in i:first-of-type::after { animation: resBlink 1.1s steps(1) .8s 4; }

  /* finale: letterbox closes in */
  html.ready .res-finale:not(.in)::before, html.ready .res-finale:not(.in)::after { transform: scaleY(0); }

  /* hub */
  .res-hub .res-beam { animation: resBreathe 6s ease-in-out infinite alternate; }
}
@keyframes resScan { 0% { opacity: 0; top: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; top: calc(100% - 40px); } }
@keyframes resPh { from { transform: translateX(-100%); opacity: 1; } 92% { opacity: 1; } to { transform: none; opacity: 0; } }
@keyframes resBlink { 50% { opacity: 0; } }
@keyframes resBreathe { from { opacity: .6; } to { opacity: 1; } }

/* ==========================================================================
   6.6 RAIL AS EDIT TIMELINE (≥1380px, where pages.js shows the rail)
   ========================================================================== */
@media (min-width: 1380px) {
  .res-art .rail ol { height: 62vh; gap: 3px; }
  .res-art .rail li { flex: var(--w, 1) 1 0; min-height: 6px; display: flex; }
  .res-art .rail a { flex: 1; align-items: stretch; gap: 12px; }
  .res-art .rail a i { width: 4px; height: auto; border: 0; border-radius: 0; background: var(--line2); transform: none !important; }
  .res-art .rail li.passed a i { background: color-mix(in srgb, var(--accent) 45%, transparent); }
  .res-art .rail a.on i { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
  .res-art .rail a span { align-self: center; padding: 4px 8px; background: #0E1115; border: 1px solid var(--line); }
  .res-art .rail a.on span { opacity: .95; transform: none; }
  .res-art .rail li:first-child a.on span { opacity: 0; }
  .res-art .rail:hover li:first-child a.on span { opacity: .9; }
  .res-art .rail:has(li:first-child a.on) .res-tc { opacity: 0; }
  .res-tc { transition: opacity .4s var(--ease); }
  .res-art .rail { transition: opacity .4s var(--ease), visibility .4s; }
  .res-art.res-at-end .rail { opacity: 0; visibility: hidden; }
  .res-art .rail .rl { background: none; }
  .res-art .rail .rl i { display: none; }
  .res-tc { position: absolute; left: -2px; top: calc(100% + 14px); font: 500 .55rem/1 var(--mono); letter-spacing: .14em; color: var(--text2); white-space: nowrap; }
}
@media (max-width: 1379px) { .res-tc { display: none; } }

/* 6.7 progress bar with chapter ticks */
.res-art .prog { height: 2px; }
.res-art .prog b { position: absolute; bottom: 0; width: 1px; height: 5px; background: var(--line2); transition: background .4s; pointer-events: none; }
.res-art .prog b.passed { background: var(--teal); box-shadow: 0 0 6px var(--teal); }

/* 6.8 nav width guard (five links + Book) */
@media (min-width: 981px) and (max-width: 1180px) {
  .res-art .pk-nav, .res-hub .pk-nav { gap: 16px; }
  .res-art .pk-nav a:not(.pk-book), .res-hub .pk-nav a:not(.pk-book) { letter-spacing: .14em; }
  .res-art .pk-nav .pk-book, .res-hub .pk-nav .pk-book { padding: 0 14px; }
}

/* ==========================================================================
   10. HUB — "Now showing"
   ========================================================================== */
.res-hub-hero { padding: clamp(120px, 18vh, 180px) 0 clamp(40px, 6vh, 72px); }
.res-hub-hero .wrap { z-index: 1; }
.res-hub-hero .res-crumbs { margin-bottom: 6px; }
.res-hub-hero .res-slate { margin-bottom: 26px; }
.res-hub-h { font: 400 clamp(3.2rem, 9vw, 8rem)/.95 var(--serif); letter-spacing: -.035em; margin-bottom: 26px; }
.res-hub-lead { max-width: 36em; color: var(--ink); font-size: 1.2rem; line-height: 1.6; }
.res-hub .res-beam { inset: -10% auto auto -10%; width: min(900px, 120vw); height: 120%; z-index: 0; background: conic-gradient(from 150deg at 0 0, transparent, color-mix(in srgb, var(--teal) 8%, transparent) 25deg, transparent 50deg); }

.res-showing { padding-top: clamp(24px, 4vh, 48px); }
.res-one {
  position: relative; width: min(1240px, 100% - 32px); margin-inline: auto; display: grid; gap: 0;
  background: rgba(21, 25, 31, .55); border: 1px solid var(--line);
}
.res-one::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--teal); box-shadow: 0 0 10px var(--teal); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease); pointer-events: none; }
.res-one > .cb.tl { top: -1px; left: -1px; } .res-one > .cb.br { bottom: -1px; right: -1px; }
.res-one-plate { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #050607; }
.res-one-plate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) contrast(1.06) brightness(.8); transition: transform 1.4s var(--ease); }
.res-one-plate::before, .res-one-plate::after { content: ''; position: absolute; left: 0; right: 0; height: 12.8%; background: #020304; z-index: 2; transition: height 1.2s var(--ease); }
.res-one-plate::before { top: 0; } .res-one-plate::after { bottom: 0; }
.res-one-plate .res-grade { position: absolute; inset: 0; z-index: 1; mix-blend-mode: color; background: linear-gradient(200deg, rgba(24, 58, 102, .35), rgba(24, 58, 102, 0) 70%); }
.res-one-txt { display: flex; flex-direction: column; gap: 16px; padding: clamp(24px, 3vw, 44px); }
.res-one-txt .res-topics { margin: 0; }
.res-one h2 { font: 400 clamp(1.9rem, 3vw, 2.8rem)/1.05 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.res-one h2 a { color: var(--text); text-decoration: none; }
.res-one h2 a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.res-one h2 a:focus-visible { outline: none; }
.res-one:has(h2 a:focus-visible) { outline: 2px solid var(--teal); outline-offset: 6px; }
.res-one-sum { max-width: 36em; color: var(--ink); font-size: 1.05rem; }
.res-one-meta { max-width: none; font: 500 .66rem/1.7 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text2); }
.res-cue { display: inline-flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 8px; font: 500 .7rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-t); }
.res-cue::before { content: attr(data-l); }
.res-cue::after { content: '→'; transition: transform .5s var(--ease); }
.res-one:hover h2 a, .res-one:focus-within h2 a { color: var(--accent-t); }
.res-one:hover::after, .res-one:focus-within::after { transform: scaleX(1); }
.res-one:hover .res-cue::after, .res-one:focus-within .res-cue::after { transform: translateX(5px); }
@media (prefers-reduced-motion: no-preference) {
  .res-one:hover .res-one-plate img, .res-one:focus-within .res-one-plate img { transform: scale(1.045); }
  .res-one:hover .res-one-plate::before, .res-one:hover .res-one-plate::after,
  .res-one:focus-within .res-one-plate::before, .res-one:focus-within .res-one-plate::after { height: 9%; }
}
@media (min-width: 980px) {
  .res-one { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: stretch; }
  .res-one-plate { aspect-ratio: auto; min-height: 100%; }
  .res-one-plate::before, .res-one-plate::after { height: 14%; }
}
.res-hub-toc { width: min(1240px, 100% - 32px); margin-top: 40px; }

.res-hub .cta-h { margin-inline: auto; }

/* ==========================================================================
   6.9 PRINT
   ========================================================================== */
@media print {
  .ambient, .grain, .vignette, .rail, .top, .res-skip, .res-slate, .res-num, .res-card-slate, .res-timeline, .res-log, .res-states,
  video, .res-play, .res-plate-hud, .res-bar-b, .res-ring, .res-edge, .res-tag, .pk-foot, .cb { display: none !important; }
  body, html { background: #fff !important; color: #000 !important; }
  .res-prose > p, .res-answer p, .res-quote p, .res-finale-lead, .res-byline, figcaption, .res-credits p { color: #000 !important; }
  .res-h1, .res-card h2, .fl-q { color: #000 !important; }
  .res-card { min-height: 0; border: 0; padding: 24px 0 8px; background: none; text-align: left; place-items: start; }
  .res-card::before, .res-plate-frame::before, .res-plate-frame::after, .res-finale::before, .res-finale::after { display: none; }
  .res-finale { min-height: 0; padding: 24px 0; }
  .fl-go { background: none; color: #000; box-shadow: none; border: 1px solid #000; }
  .res-plate-frame { transform: none !important; -webkit-mask-image: none; mask-image: none; }
  .res-plate-frame img { filter: none; }
  .res-card h2 { filter: none !important; }
  .res-card::before { clip-path: none !important; }
  .mm-wrap .mm > :not(svg) { opacity: 1 !important; }
  .res-prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}

/* ===== REEL 02 — LOCAL SIGNAL (article 2 + related reading + hub double bill) ===== */
/* Same contract as above: words never move. Decorative labels come from attr()
   on aria-hidden elements; every hide-until-reveal state is gated as
   html.ready X:not(.in) inside a no-preference query; nothing loops. */

/* ---- 2.1 hero: the scope plate (reuses .res-plate frame, bars, HUD, parallax) */
.res2-scope .res-plate-frame { background: radial-gradient(55% 75% at 50.6% 50%, rgba(24, 58, 102, .28), transparent 70%), #050607; }
.res2-scope .res-plate-frame::after { display: none; }
.res2-scope > .cb.br { bottom: -8px; }
.res2-scope .res-plate-hud i { background: var(--teal); opacity: 1; box-shadow: 0 0 10px var(--teal), 0 0 2px var(--teal); }
.res2-scope-map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.res2-scope-map path, .res2-scope-map circle { fill: none; stroke-width: 1; vector-effect: non-scaling-stroke; }
.res2-scope-map .grat path, .res2-scope-map .xhair { stroke: var(--line); }
/* rings: user-unit stroke (a dash pattern + non-scaling-stroke draws only part of the path) */
.res2-scope-map .ring { stroke: var(--line2); stroke-width: .22; vector-effect: none; stroke-dasharray: 1; stroke-dashoffset: 0; }
@media (max-width: 699px) { .res2-scope-map .ring { stroke-width: .42; } }
.res2-sweep {
  position: absolute; left: 50.61%; top: 50.07%; z-index: 1; width: 54%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  transform: translate(-50%, -50%);
  background: conic-gradient(from -40deg, transparent 0deg, rgba(25, 230, 207, .16) 34deg, rgba(25, 230, 207, .55) 39.5deg, transparent 40deg);
}
.res2-blips { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.res2-blips i { position: absolute; left: var(--x); top: var(--y); width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: rgba(25, 230, 207, .8); box-shadow: 0 0 6px rgba(25, 230, 207, .7); }
.res2-blips .a { opacity: 0; }
.res2-blips .b { opacity: .5; }

/* city points (hero + ch04 route). The halo is an outline so both pseudo-elements carry words */
.res2-city {
  position: absolute; left: var(--x); top: var(--y); z-index: 2; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 10px var(--c), 0 0 24px color-mix(in srgb, var(--c) 45%, transparent);
  outline: 1px solid color-mix(in srgb, var(--c) 60%, transparent); outline-offset: 5px;
}
.res2-city--w { --c: #3478D4; }
.res2-city--e { --c: #19E6CF; }
.res2-city::before, .res2-city::after { position: absolute; white-space: nowrap; font-family: var(--mono); font-weight: 500; text-transform: uppercase; line-height: 1; }
.res2-city::before { content: attr(data-l); bottom: 50%; font-size: .62rem; letter-spacing: .18em; color: var(--text); }
.res2-city::after { content: attr(data-r); top: 50%; margin-top: 5px; font-size: .58rem; letter-spacing: .12em; color: var(--text2); }
.res2-city--w::before, .res2-city--w::after { right: calc(100% + 14px); text-align: right; }
.res2-city--e::before, .res2-city--e::after { left: calc(100% + 14px); }
@media (max-width: 699px) {
  .res2-scope .res2-city::after { content: none; }
  .res2-scope .res2-city::before { bottom: auto; top: 50%; transform: translateY(-50%); }
}

/* hero typography + cold open */
.res2-h1 { max-width: 15em; font-size: clamp(2.2rem, 1.3rem + 3vw, 4.3rem); }
.res2-h1-q { display: block; margin-bottom: .3em; font: italic 400 clamp(1.45rem, 1.1rem + 1.3vw, 2.3rem)/1.15 var(--serif); color: #A9B9CC; letter-spacing: -.01em; }
.res2-h1-a { display: block; text-wrap: balance; }
.res-prose.res2-cold { width: auto; max-width: 34em; margin: 28px 0 0; }
.res-prose > p.res2-beat { margin-top: .9em; font: 400 clamp(1.4rem, 1.15rem + .8vw, 1.8rem)/1.3 var(--serif); color: var(--text); letter-spacing: -.005em; }
@media (min-width: 1100px) {
  .res2-scope .res-plate-frame { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%); mask-image: linear-gradient(90deg, transparent 0, #000 12%); }
}
@media (max-width: 1099px) { .res2-scope { margin-top: 36px; } }
@media (max-width: 559px) {
  .res2-hero .res-crumbs li:last-child { flex-basis: 100%; }
  .res2-hero .res-crumbs li:last-child::before { margin-left: 0; }
  .res2-hero .res-crumbs span[aria-current] { min-height: 0; padding: 2px 0 8px; }
}

/* hero title sequence (inherits resPlateIn / resIris / resHud / resClap / resLine) */
@media (prefers-reduced-motion: no-preference) {
  html.res-motion .res2-scope .ring { animation: res2Draw 1.2s var(--ease) .3s both; }
  html.res-motion .res2-scope .res2-city { animation: res2On .9s var(--ease) .9s both, res2Halo 1.3s var(--ease) 1.3s both; }
  html.res-motion .res2-scope .res2-city--e { animation-delay: 1.05s, 1.45s; }
  html.res-motion .res2-sweep { animation: res2Spin 4.8s linear 1.4s both; }
  html.res-motion .res2-blips .a { animation: res2BlipA 2.4s linear calc(1.4s + var(--b) * 2.4s / 360) both; }
  html.res-motion .res2-blips .b { animation: res2BlipB 2.4s linear calc(3.8s + var(--b) * 2.4s / 360) both; }
}
@keyframes res2Draw { from { stroke-dashoffset: 1; } }
@keyframes res2On { from { transform: scale(.2); opacity: 0; } }
@keyframes res2Halo { 0% { outline-offset: 5px; outline-color: transparent; } 35% { outline-offset: 14px; outline-color: var(--c); } }
@keyframes res2Spin { from { rotate: 0deg; } to { rotate: 720deg; } }
@keyframes res2Spin1 { from { rotate: 0deg; } to { rotate: 360deg; } }
@keyframes res2BlipA { 0% { opacity: 0; transform: scale(.3); } 3% { opacity: 1; transform: scale(1.5); } 100% { opacity: 0; transform: scale(1); } }
@keyframes res2BlipB { 0% { opacity: 0; transform: scale(.3); } 3% { opacity: 1; transform: scale(1.5); } 100% { opacity: .5; transform: scale(1); } }

/* ---- 2.2 intro: "Cut to:" */
.res2-cut { display: block; margin-bottom: 26px; text-align: right; font: 500 .62rem/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--accent-t); }
.res2-cut::before { content: attr(data-l); }
.res2-cut::after { content: ''; display: block; height: 1px; margin-top: 10px; background: linear-gradient(90deg, #3478D4, #19E6CF); transform-origin: left; transition: transform 1.2s var(--ease); }

/* ---- 2.3 intertitle additions: ring field + signal meter */
.res2-card::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-radial-gradient(circle at 50% 50%, transparent 0 63px, color-mix(in srgb, var(--accent) 11%, transparent) 63px 64px);
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent); mask-image: radial-gradient(closest-side, #000 40%, transparent);
}
.res2-sig {
  position: absolute; bottom: 26px; left: 50%; width: 90px; height: 9px; transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 0 / calc(var(--n) * 10px) 100% no-repeat, var(--line2);
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 10px); mask-image: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 10px);
}
@media (max-width: 699px) { .res2-sig { left: 20px; bottom: 16px; transform: none; } }

/* ---- 2.4 inline marks (text-neutral spans) */
.res2-mark {
  background: linear-gradient(transparent 58%, rgba(25, 230, 207, .24) 58% 92%, transparent 92%) 0 0 / 100% 100% no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.res2-mark--q { background-image: linear-gradient(transparent 58%, rgba(52, 120, 212, .32) 58% 92%, transparent 92%); }
.res2-weak { text-decoration: underline dashed 1px var(--text2); text-underline-offset: 4px; }
.res2-query {
  position: relative; padding: .02em .5em .05em 1.6em; white-space: nowrap; color: var(--text);
  border: 1px solid var(--line2); border-radius: 999px; background: #15191F;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.res2-query::before {
  content: ""; content: "" / ""; position: absolute; left: .55em; top: 50%; width: .78em; height: .78em; transform: translateY(-50%); background: var(--text2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 420px) { .res2-query { white-space: normal; } .res2-query::before { top: .82em; } }

/* ---- 2.5 set pieces */
/* ch01 — three pings (illustration, not study data) */
.res2-pings { margin: 44px 0 40px; text-align: center; }
.res2-ping-row { display: flex; justify-content: center; gap: 16px; margin-bottom: 34px; opacity: .8; }
.res2-ping {
  position: relative; flex: none; width: min(150px, 27vw); aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line2);
  background:
    radial-gradient(circle at 68% 44%, #19E6CF 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 32% 56%, #3478D4 0 2.5px, transparent 3.5px),
    linear-gradient(var(--line), var(--line)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat,
    repeating-radial-gradient(circle closest-side, transparent 0 calc(33.3% - 1px), var(--line2) calc(33.3% - 1px) 33.3%),
    #050607;
}
.res2-ping::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from -40deg, transparent 0deg, rgba(25, 230, 207, .14) 34deg, rgba(25, 230, 207, .5) 39.5deg, transparent 40deg); }
.res2-ping::after { content: attr(data-l); position: absolute; left: -10px; right: -10px; top: calc(100% + 10px); font: 500 .6rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--text2); white-space: nowrap; }
.res2-ping b { position: absolute; left: var(--x); top: var(--y); width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: rgba(25, 230, 207, .85); box-shadow: 0 0 6px var(--teal); }
.res2-pings > .res-tag { margin: 0; }

/* ch03 — the example-questions table (a real table; mobile restyles rows as cards) */
.res2-qt-wrap {
  position: relative; overflow: hidden; width: min(1040px, 100vw - 32px); margin: 40px 0; margin-inline: calc(50% - min(520px, 50vw - 16px));
  padding: 20px clamp(16px, 2.5vw, 32px) 8px; background: rgba(21, 25, 31, .6); border: 1px solid var(--line);
}
.res2-qt-wrap > .cb.tl { top: -1px; left: -1px; } .res2-qt-wrap > .cb.br { bottom: -1px; right: -1px; }
.res2-qt-wrap::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--teal); box-shadow: 0 0 10px var(--teal); opacity: 0; pointer-events: none; }
.res2-qt-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 6px; font: 500 .6rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-t); }
.res2-qt-head::before { content: attr(data-l); }
.res2-qt-head::after { content: attr(data-r); color: var(--text2); }
.res2-qt { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; }
.res2-qt thead th { width: 39%; padding: 14px 16px; border-bottom: 1px solid var(--line2); font: 500 .62rem/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-t); vertical-align: bottom; }
.res2-qt thead th:first-child { width: 22%; }
.res2-qt tbody th, .res2-qt td { padding: 22px 16px; vertical-align: top; border-bottom: 1px solid var(--line); text-align: left; }
.res2-qt tbody tr:last-child > * { border-bottom: 0; }
.res2-qt tbody th { font: 600 1.02rem/1.4 var(--sans); color: var(--text); }
.res2-qt td:nth-child(2) { font: 400 1.28rem/1.35 var(--serif); color: var(--text); }
.res2-qt td:nth-child(3) { font: 400 1rem/1.6 var(--sans); color: var(--ink); }
.res2-qt tbody tr { transition: background .4s; }
.res2-qt tbody tr:hover { background: rgba(255, 255, 255, .025); }
.res2-qt-l { display: none; }
.res2-qt-at { display: flex; gap: 8px; margin-bottom: 12px; }
.res2-qt-at::before, .res2-qt-at::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--line2); transition: background .5s, box-shadow .5s; transition-delay: calc(var(--k, 0) * .35s + .5s); }
.res2-qt-at[data-at="w"]::before, .res2-qt-at[data-at="both"]::before { background: #3478D4; box-shadow: 0 0 8px #3478D4; }
.res2-qt-at[data-at="e"]::after, .res2-qt-at[data-at="both"]::after { background: #19E6CF; box-shadow: 0 0 8px #19E6CF; }
@media (max-width: 760px) {
  .res2-qt-wrap { padding: 16px 12px 4px; }
  .res2-qt, .res2-qt tbody, .res2-qt tr, .res2-qt th, .res2-qt td { display: block; width: auto; }
  .res2-qt thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
  .res2-qt tbody tr { margin-bottom: 12px; padding: 18px; border: 1px solid var(--line); background: rgba(21, 25, 31, .7); }
  .res2-qt tbody th { padding: 0; border: 0; font: 400 1.3rem/1.2 var(--serif); }
  .res2-qt td { margin-top: 14px; padding: 12px 0 0; border-top: 1px solid var(--line); border-bottom: 0; }
  .res2-qt tbody tr:last-child > td { border-top: 1px solid var(--line); }
  .res2-qt td:nth-child(2) { font-size: 1.18rem; }
  .res2-qt th, .res2-qt td { overflow-wrap: anywhere; }
  .res2-qt-l { display: block; margin-bottom: 6px; }
  .res2-qt-l::before { content: attr(data-l); font: 500 .58rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-t); }
}

/* ch04 — example service area */
.res2-route { max-width: 560px; margin: 40px auto; }
.res2-route-map { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: radial-gradient(60% 80% at 50% 50%, rgba(24, 58, 102, .22), transparent 70%), #050607; border: 1px solid var(--line); }
.res2-route-map svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.res2-route .grat { fill: none; stroke: var(--line2); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .45; }
.res2-route .arc { fill: none; stroke: var(--accent); stroke-width: .5; stroke-dasharray: 1.8 1.3; stroke-linecap: round; }
.res2-route .draw { fill: none; stroke: #fff; stroke-width: 4; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s var(--ease) .3s; }
.res2-route .remote { fill: none; stroke: var(--accent-t); stroke-width: .45; stroke-dasharray: .2 1.4; stroke-linecap: round; opacity: .75; transform-box: fill-box; transform-origin: center; }
.res2-route .res2-city::before { color: var(--accent-t); letter-spacing: .14em; }
.res2-route .res2-city::after { font-size: .6rem; color: var(--text); }
.res2-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; font: 500 .6rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--text2); }
.res2-legend span { display: inline-flex; align-items: center; gap: 8px; }
.res2-legend span::after { content: attr(data-l); }
.res2-legend .on::before { content: ''; width: 22px; border-top: 1px dashed var(--accent); }
.res2-legend .rm::before { content: ''; width: 10px; height: 10px; border-radius: 50%; border: 1px dotted var(--accent-t); }

/* ch04 — "Before you publish" check card */
.res-prose > p.res2-check { position: relative; margin-top: 2em; padding: 24px 26px; background: rgba(21, 25, 31, .72); border-left: 2px solid var(--accent); }
.res2-check::before { content: ''; position: absolute; left: -2px; top: 0; width: 2px; height: 40px; background: #fff; box-shadow: 0 0 12px 2px var(--teal); opacity: 0; }
@media (max-width: 560px) { .res-prose > p.res2-check { padding: 20px 18px 20px 20px; } }

/* ch05 — CHR frames on a strip */
.res2-strip { width: min(1040px, 100vw - 32px); margin: 48px 0; margin-inline: calc(50% - min(520px, 50vw - 16px)); }
.res2-reel { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 30px 18px 32px; background: #050607; border: 1px solid var(--line); }
.res2-reel::before, .res2-reel::after { content: ''; position: absolute; left: 0; right: 0; height: 12px; background: radial-gradient(circle, rgba(244, 243, 239, .13) 3px, transparent 3.5px) 0 0 / 22px 12px repeat-x; }
.res2-reel::before { top: 8px; } .res2-reel::after { bottom: 8px; }
.res2-frame { position: relative; min-width: 0; }
.res2-img { position: relative; aspect-ratio: 16 / 9; background: #0E1115; }
.res2-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.8) contrast(1.06) brightness(.8); transition: filter 1.4s var(--ease) calc(var(--k, 0) * 140ms); }
.res2-blend { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color; background: linear-gradient(200deg, rgba(24, 58, 102, .35), rgba(24, 58, 102, 0) 70%); }
.res2-pencil { position: absolute; left: 3%; top: 74%; width: 49%; height: 21.5%; overflow: visible; pointer-events: none; z-index: 2; }
.res2-pencil path { fill: none; stroke: rgba(244, 243, 239, .85); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s var(--ease) 1.1s; }
.res2-frame .res-edge { position: static; margin-top: 10px; }
.res2-strip figcaption { max-width: 56ch; margin: 16px auto 0; text-align: center; font: 400 .95rem/1.55 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text2); }
@media (max-width: 759px) {
  .res2-reel { grid-template-columns: 1fr 1fr; gap: 12px 10px; padding: 28px 12px 30px; }
  .res2-frame:first-child { grid-column: 1 / -1; }
  .res2-frame .res-edge { font-size: .5rem; letter-spacing: .14em; }
}

/* ch07 — access lamps */
.res2-board { max-width: 560px; margin: 40px auto; padding: 22px 24px 24px; background: rgba(21, 25, 31, .6); border: 1px solid var(--line); }
.res2-lamps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }
.res2-lamp { display: flex; align-items: flex-start; gap: 10px; font: 500 .62rem/1.45 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text2); }
.res2-lamp::before { content: ''; flex: none; width: 8px; height: 8px; margin-top: .2em; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal), 0 0 2px var(--teal); transition: background .4s var(--ease), box-shadow .4s var(--ease); transition-delay: calc(var(--k, 0) * 90ms + .25s); }
.res2-lamp::after { content: attr(data-l); min-width: 0; }
.res2-lamp.is-sep { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.res2-lamp.is-sep::before { background: var(--line2); box-shadow: none; }
.res2-lamp.is-sep::after { content: attr(data-l) "\A" attr(data-r); white-space: pre-line; }
@media (max-width: 559px) { .res2-lamps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .res2-board { padding: 20px 18px; } }

/* ch09 — reel transcript (a native disclosure: readable without JS, no motion) */
.res-tx { margin: -20px 0 2em; border-block: 1px solid var(--line); }
.res-tx summary {
  display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none;
  font: 500 .66rem/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-t);
}
.res-tx summary::-webkit-details-marker { display: none; }
.res-tx summary::before { content: "+"; content: "+" / ""; width: 1em; font-size: .9rem; text-align: center; color: var(--text2); }
.res-tx[open] summary::before { content: "\2212"; content: "\2212" / ""; }
.res-tx summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.res-tx p { max-width: none; padding: 4px 0 18px; font: 400 .98rem/1.65 var(--sans); color: var(--ink); }

/* ch09 finale: the lock */
.res2-finale { isolation: isolate; }
.res2-finale > :not(.res2-lock) { position: relative; z-index: 1; }
.res2-lock {
  position: absolute; left: 50%; top: 50%; z-index: -1; width: min(720px, 92vw); aspect-ratio: 1; border-radius: 50%; opacity: .4; pointer-events: none;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(var(--line2), var(--line2)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--line2), var(--line2)) 0 50% / 100% 1px no-repeat,
    repeating-radial-gradient(circle closest-side, transparent 0 calc(25% - 1px), var(--line2) calc(25% - 1px) 25%);
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent); mask-image: radial-gradient(closest-side, #000 72%, transparent);
}
.res2-lock i { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from -40deg, transparent 0deg, rgba(25, 230, 207, .14) 34deg, rgba(25, 230, 207, .45) 39.5deg, transparent 40deg); }
.res2-lock b { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 14px var(--teal), 0 0 3px var(--teal); }
.res2-finale .res-finale-cta { margin-top: 40px; }
.res2-take { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--teal); font: 500 .72rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--teal); }
.res2-take::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.fl-go.res2-go { display: flex; width: 56px; height: 56px; padding: 0; gap: 0; margin: 0 auto; border-radius: 50%; }
@media (max-width: 559px) { .fl-go.res2-go { display: flex; width: 56px; } }

/* ---- 2.6 Reel 02 reveals (one-shot, gated, decoration only) */
@media (prefers-reduced-motion: no-preference) {
  html.ready .res2-cut:not(.in)::after { transform: scaleX(0); }
  .res2-sig { transition: background-size 1.2s var(--ease) .4s; }
  html.ready .res2-card:not(.in) .res2-sig { background-size: 0 100%, auto; }
  .res2-mark { transition: background-size 1.1s var(--ease); }
  .res2-mark--q { transition-delay: .9s; }
  html.ready .res2-hl:not(.in) .res2-mark { background-size: 0 100%; }
  html.ready .res2-pings:not(.in) .res2-ping b { opacity: 0; }
  html.ready .res2-pings.in .res2-ping::before { animation: res2Spin1 1.6s linear calc(var(--k) * .4s) both; }
  html.ready .res2-pings.in .res2-ping b { animation: res2Flash .9s ease-out calc(var(--k) * .4s + var(--b) * 1.6s / 360) both; }
  html.ready .res2-qt-wrap.in::after { animation: res2Scan 1.6s var(--ease) .2s both; }
  html.ready .res2-qt-wrap:not(.in) .res2-qt-at::before, html.ready .res2-qt-wrap:not(.in) .res2-qt-at::after { background: var(--line2); box-shadow: none; }
  html.ready .res2-route:not(.in) .draw { stroke-dashoffset: 1; }
  html.ready .res2-route.in .remote { animation: res2Pulse 1.4s var(--ease) .5s 2 both; }
  html.ready .res2-route.in .remote.r2 { animation-delay: .7s; }
  html.ready .res2-check.in::before { animation: resScan 1.6s var(--ease) .5s 1 both; }
  html.ready .res2-strip:not(.in) .res2-img img { filter: saturate(.8) contrast(1.06) brightness(.3); }
  html.ready .res2-strip:not(.in) .res2-pencil path { stroke-dashoffset: 1; }
  html.ready .res2-board:not(.in) .res2-lamp:not(.is-sep)::before { background: var(--line2); box-shadow: none; }
  html.ready .res2-finale.in .res2-lock i { animation: res2Spin1 2.4s cubic-bezier(.3, 0, .2, 1) .3s both; }
  html.ready .res2-finale.in .res2-lock b { animation: res2Ping 1.2s ease-out .7s 2 both; }
}
@keyframes res2Flash { 0% { opacity: 0; transform: scale(.3); } 12% { opacity: 1; transform: scale(1.8); } 100% { opacity: 1; transform: scale(1); } }
@keyframes res2Scan { 0% { top: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes res2Pulse { 0%, 100% { transform: scale(1); opacity: .75; } 50% { transform: scale(1.25); opacity: .25; } }
@keyframes res2Ping { 0% { box-shadow: 0 0 14px var(--teal), 0 0 3px var(--teal), 0 0 0 0 rgba(25, 230, 207, .6); } 100% { box-shadow: 0 0 14px var(--teal), 0 0 3px var(--teal), 0 0 0 44px rgba(25, 230, 207, 0); } }

/* ---- 2.7 related reading (shared by both articles) */
.res-rel { width: min(1060px, 100% - 12px); margin: 0 auto; padding: 0 10px 96px; overflow-x: clip; }  /* 10px inline padding keeps the 6px-offset focus ring inside the clip */
.res-rel-l { max-width: none; margin-bottom: 14px; font: 500 .66rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-t); }
.res-rel .res-one { width: 100%; }
.res-rel-t { max-width: none; font: 400 clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem)/1.08 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.res-rel-t a { color: var(--text); text-decoration: none; transition: color .3s; }
.res-rel-t a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.res-rel-t a:focus-visible { outline: none; }
.res-one:has(.res-rel-t a:focus-visible) { outline: 2px solid var(--teal); outline-offset: 6px; }
.res-one:hover .res-rel-t a, .res-one:focus-within .res-rel-t a { color: var(--accent-t); }
.res-rel-reel { position: absolute; left: 12px; bottom: 4%; z-index: 3; font: 500 .55rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--text2); }
.res-rel-reel::before { content: attr(data-l); }
@media (min-width: 980px) {
  .res-rel .res-one { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .res-rel .res-one-plate { aspect-ratio: 16 / 9; min-height: 0; align-self: center; }
}

/* ---- 2.8 hub double bill */
.res-showing .res-one + .res-one { margin-top: 32px; }
@media (min-width: 980px) {
  .res-one--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .res-one--flip .res-one-plate { order: 2; }
}

/* ---- 2.9 print */
@media print {
  .res2-scope, .res2-cut, .res2-sig, .res2-pencil, .res2-pings, .res2-route, .res2-board, .res2-lock, .res2-qt-at, .res2-qt-l, .res2-qt-head, .res-rel-reel { display: none !important; }
  .res2-h1-q { color: #000 !important; }
  .res2-mark { background: none !important; text-decoration: underline 1px #000; }
  .res2-query { background: none; border-color: #000; color: #000; }
  .res2-check { background: none !important; color: #000 !important; border-left-color: #000 !important; }
  .res2-qt-wrap { width: auto; margin-inline: 0; padding: 0; background: none; border: 0; overflow: visible; }
  .res2-qt-wrap::after, .res2-reel::before, .res2-reel::after { display: none; }
  .res2-qt, .res2-qt thead, .res2-qt tbody, .res2-qt tr, .res2-qt th, .res2-qt td { color: #000 !important; }
  .res2-qt th, .res2-qt td { border: 1px solid #000 !important; padding: 8px !important; background: none !important; }
  .res2-reel { background: none; border: 0; padding: 0; }
  .res2-img img { filter: none !important; }
  .res2-strip figcaption { color: #000; }
}
