/* The Replay Lab: story pages.
   Look: BDF's "Broadsheet". White paper, ink, one story red, grey for context.
   Source Serif 4 for headlines and reading, Source Sans 3 for everything else.
   Every section opens on the playhead rule: a hairline with a short red tick. */

:root {
  /* Colour */
  --paper: #FFFFFF;
  --ink: #1F1F1F;
  --sub: #6B6B6B;
  --grid: #E6E6E6;
  --ctx: #BDBDBD;
  --red: #C70000;
  --blue: #1F5FA8;
  --tint: #F4F4F2;
  --night: #0B0B0B;
  --white: #FFFFFF;
  --yc: #F2C200; /* real yellow cards only */

  /* Type */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;

  /* Spacing */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --gutter: clamp(16px, 4vw, 48px);
  --col: 660px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --bar-h: 58px;
  color-scheme: light;
}

/* The front-page photo grows into the story's opening photo */
@view-transition { navigation: auto; }
::view-transition-group(story-photo) { animation-duration: .55s; animation-timing-function: var(--ease); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 19px; line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.skip { position: absolute; left: var(--s4); top: -60px; z-index: 50; background: var(--ink); color: var(--white); padding: var(--s2) var(--s3); font-family: var(--sans); font-weight: 700; }
.skip:focus { top: var(--s4); }

.label { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.tag { display: inline-block; }
.tag.dark { color: var(--sub); }

/* The playhead rule */
.play { position: relative; height: 1px; background: var(--ink); }
.play::before { content: ""; position: absolute; left: 0; top: -2px; width: 28px; height: 5px; background: var(--red); }

/* ---------------- Reading bar ---------------- */
.scrub { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); color: var(--ink); padding: 10px var(--gutter) 8px; display: grid; gap: 7px; font-family: var(--sans); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--grid); }
.scrub .row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); }
.scrub .home { font-family: var(--serif); font-weight: 800; font-size: 20px; letter-spacing: -.01em; text-transform: none; text-decoration: none; line-height: 1; }
.scrub .home i { display: none; }
.scrub .home span { color: var(--red); }
.scrub .now { flex: 1; text-align: center; color: var(--sub); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scrub .tc { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--sub); }
.track { position: relative; height: 3px; background: var(--grid); overflow: hidden; }
.track .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--red); }
.chaps { display: flex; gap: 3px; }
.chaps a { text-decoration: none; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-top: 1px; min-width: 0; font-size: 11px; }
.chaps a:hover, .chaps a.on { color: var(--ink); }
.chaps a.on { box-shadow: inset 0 2px 0 var(--red); }

/* ---------------- Full-page photo with text scrolling over it ---------------- */
.photo-scene { position: relative; background: var(--night); color: var(--white); }
.photo-scene .bg { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.photo-scene .bg img { width: 100%; height: 100%; object-fit: cover; }
.photo-scene .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .6) 100%); }
.photo-scene .bg + .beat { margin-top: -100vh; margin-top: -100svh; }
.photo-scene .beat { position: relative; z-index: 1; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding: calc(var(--bar-h) + var(--s7)) var(--gutter) clamp(48px, 10vh, 96px); }
.photo-scene .beat.mid { align-items: center; }
.photo-scene .beat.short { min-height: 70vh; min-height: 70svh; }
.photo-scene .credit { position: absolute; right: var(--s4); bottom: var(--s3); z-index: 2; font-family: var(--sans); font-size: 11px; color: rgba(255, 255, 255, .8); max-width: calc(100% - 32px); text-align: right; }
.photo-scene .card-text { background: var(--paper); color: var(--ink); padding: var(--s5); max-width: 58ch; font-size: 19px; line-height: 1.6; box-shadow: inset 0 3px 0 var(--red); }
.photo-scene .card-text p { margin: 0; }
.photo-scene .card-text p + p { margin-top: 1em; }
.photo-scene .chant { font-family: var(--serif); font-size: clamp(48px, 11vw, 160px); font-weight: 800; font-style: italic; line-height: .95; letter-spacing: -.02em; text-wrap: balance; max-width: 12ch; margin: 0; text-shadow: 0 2px 30px rgba(0, 0, 0, .5); }
.photo-scene .big { font-family: var(--serif); font-size: clamp(40px, 6.4vw, 92px); font-weight: 700; line-height: 1; letter-spacing: -.02em; max-width: 14ch; text-wrap: balance; margin-bottom: 0; text-shadow: 0 2px 24px rgba(0, 0, 0, .45); }
.photo-scene .label { color: var(--white); }
.photo-scene .label.tag { box-shadow: inset 0 -2px 0 var(--red); padding-bottom: 3px; }

.story-head .kick { display: flex; gap: var(--s3); align-items: baseline; margin-bottom: var(--s4); flex-wrap: wrap; color: rgba(255, 255, 255, .85); }
.story-head .kick .tag { color: var(--white); background: var(--red); padding: 3px 8px; }
.story-head h1 { margin: 0; font-family: var(--serif); font-size: clamp(48px, 7.6vw, 120px); line-height: .95; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; max-width: 12ch; text-shadow: 0 2px 30px rgba(0, 0, 0, .45); }
.story-head .standfirst { font-size: clamp(19px, 2vw, 24px); line-height: 1.45; max-width: 44ch; margin: var(--s5) 0 0; }
.story-head .cue { margin-top: var(--s6); display: inline-flex; align-items: center; gap: var(--s2); color: rgba(255, 255, 255, .85); }
.story-head .cue::after { content: ""; width: 1px; height: 28px; background: currentColor; animation: cue 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------------- Reading column ---------------- */
.prose { padding: var(--s8) var(--gutter); }
.prose > * { max-width: var(--col); margin-left: auto; margin-right: auto; }
.prose p { margin-top: 0; margin-bottom: 1.1em; }
.prose > .wide { max-width: 980px; }
.chapter-head { padding: var(--s9) var(--gutter) 0; }
.chapter-head > * { max-width: var(--col); margin-left: auto; margin-right: auto; }
.chapter-head .label { display: block; margin-bottom: var(--s3); position: relative; border-top: 1px solid var(--ink); padding-top: var(--s3); }
.chapter-head .label::before { content: ""; position: absolute; left: 0; top: -3px; width: 28px; height: 5px; background: var(--red); }
.chapter-head h2 { margin-top: 0; margin-bottom: 0; font-family: var(--serif); font-size: clamp(36px, 4.8vw, 60px); line-height: 1.02; font-weight: 700; letter-spacing: -.018em; text-wrap: balance; }
.chapter-head + .prose { padding-top: var(--s6); }

/* The Bobo doll, drawn from BDF's pencil original. It inks itself in when it arrives. */
/* The Bobo doll sits small at the left of the column and draws itself in as one pencil line (timing set in replay.js) */
.bobo-intro { margin: var(--s6) auto var(--s5); padding: 0 var(--gutter); max-width: var(--col); color: #3A3A3A; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--s5); align-items: end; }
.bobo-intro svg { width: 100%; height: auto; filter: url(#pencil); }
.bobo-intro g { stroke-width: 4; }
.bobo-intro path { stroke-dasharray: var(--l) var(--l); stroke-dashoffset: var(--l); opacity: 0; }
.bobo-intro.on path { animation: ink var(--d, 1s) linear var(--t, 0s) forwards; }
@keyframes ink { from { opacity: 1; stroke-dashoffset: var(--l); } to { opacity: 1; stroke-dashoffset: 0; } }
.bobo-intro figcaption { font-family: var(--sans); font-size: 14px; color: var(--sub); max-width: 34ch; padding-bottom: var(--s2); border-bottom: 1px solid var(--grid); }

/* Freeze-frame quote */
.freeze { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--grid); padding: var(--s5) 0; margin: var(--s6) auto; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s5); align-items: center; position: relative; }
.freeze::before { content: ""; position: absolute; left: 0; top: -3px; width: 28px; height: 5px; background: var(--red); }
.freeze .tc { font-family: var(--sans); font-weight: 700; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--red); }
.freeze blockquote { margin: 0; }
.freeze blockquote p { margin: 0; font-family: var(--serif); font-size: clamp(30px, 4vw, 46px); line-height: 1.05; font-weight: 800; font-style: italic; letter-spacing: -.015em; }
.freeze .tr { display: block; font-family: var(--sans); font-size: 16px; margin-top: var(--s2); color: var(--sub); }

/* Figures */
.figure { margin: var(--s7) auto; }
.figure .ct { margin: 0 0 4px; font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.2; }
.figure .cs { margin: 0 0 var(--s4); font-family: var(--sans); font-size: 15px; color: var(--sub); }
.figure figcaption { font-family: var(--sans); font-size: 12px; color: var(--sub); margin-top: var(--s3); line-height: 1.45; }
.figure figcaption b { font-weight: 700; color: var(--ink); margin-right: var(--s2); }
.figure figcaption cite { font-style: italic; }

/* V1: interview timeline. Grey for context, red for the five seconds. */
.v1 svg { width: 100%; height: auto; }
.v1 .bar5 { transform-box: fill-box; transform-origin: left center; transform: scaleX(0); transition: transform .8s var(--ease) .2s; }
.v1 .leaders { opacity: 0; transition: opacity .4s ease .8s; }
.v1 .zoom { opacity: 0; transform: translateY(8px); transition: opacity .6s ease 1s, transform .6s ease 1s; }
.v1.on .bar5 { transform: none; }
.v1.on .leaders { opacity: 1; }
.v1.on .zoom { opacity: 1; transform: none; }
.v1 .narrow { display: none; }
.v1-n { font-family: var(--sans); font-size: 15px; display: grid; gap: var(--s2); }
.v1-n .full { height: 22px; background: var(--ctx); position: relative; }
.v1-n .full i { position: absolute; left: 0; top: 0; bottom: 0; width: 5.5%; background: var(--red); }
.v1-n .k { font-size: 13px; color: var(--sub); display: flex; justify-content: space-between; gap: var(--s3); }
.v1-n ol { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: 4px; border-left: 1px solid var(--ctx); padding-left: var(--s3); }
.v1-n li { display: flex; justify-content: space-between; gap: var(--s3); padding: 9px 12px; background: var(--tint); font-weight: 700; }
.v1-n li:nth-child(3) { background: var(--red); color: var(--white); }
.v1-n li:nth-child(3) span { color: var(--white); }
.v1-n li span { font-weight: 400; color: var(--sub); }
.v1-n li.said { background: none; font-weight: 400; font-style: italic; font-family: var(--serif); }
.v1-n .note { font-size: 12px; color: var(--sub); margin-top: var(--s2); }

/* V5: 18 yellow cards, scroll-driven, full screen */
.v5 { position: relative; height: 300vh; background: var(--tint); color: var(--ink); }
.v5 .stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; padding: calc(var(--bar-h) + var(--s5)) var(--gutter) var(--s6); gap: var(--s6); }
.v5 .count { font-family: var(--serif); font-weight: 800; font-size: clamp(140px, 22vw, 300px); line-height: .8; letter-spacing: -.04em; font-variant-numeric: tabular-nums lining-nums; color: var(--ink); }
.v5 .count small { display: block; font-family: var(--sans); font-size: clamp(18px, 2vw, 24px); font-weight: 400; letter-spacing: 0; line-height: 1.25; color: var(--ink); margin-top: var(--s4); max-width: 16ch; }
.v5 .count .record { display: inline-block; margin-top: var(--s4); font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); opacity: 0; transition: opacity .4s ease; }
.v5.done .count .record { opacity: 1; }
.v5 .count .red-line { display: block; margin-top: var(--s2); font-family: var(--sans); font-size: clamp(18px, 2vw, 24px); font-weight: 700; letter-spacing: 0; line-height: 1.25; color: var(--red); opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s var(--ease); }
.v5.red .count .red-line { opacity: 1; transform: none; }
.v5 .count .record { display: block; }
.v5 .pile { position: relative; height: min(70vh, 560px); border-bottom: 1px solid var(--ink); }
.v5 .yc { position: absolute; width: clamp(48px, 5.4vw, 74px); aspect-ratio: 3 / 4; border-radius: 4px; background: var(--yc); box-shadow: 0 1px 0 rgba(0, 0, 0, .18), 0 8px 16px -10px rgba(0, 0, 0, .45); left: var(--x); bottom: var(--y); transform: translateY(-120vh) rotate(calc(var(--r) * 4)); transition: transform .55s cubic-bezier(.3, 1.2, .5, 1); will-change: transform; }
.v5 .yc.in { transform: rotate(var(--r)); }
.v5 .yc.rc { background: var(--red); z-index: 1; transition-duration: .7s; }

/* V3: the same Bobo doll in three rooms; the one left standing topples with the reward */
/* V3: the children as dots. Colour is the only thing that changes; dots never grow. */
.v3 { position: relative; height: 560vh; overflow-x: clip; }
.v3 .stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; align-content: center; gap: var(--s5); padding: calc(var(--bar-h) + var(--s4)) var(--gutter) var(--s5); max-width: 1180px; margin: 0 auto; box-sizing: border-box; }
.v3 .cap { max-width: 720px; display: grid; gap: var(--s2); }
.v3 .cap > * { transition: opacity .3s ease; }
.v3 .cap.swap > .yr, .v3 .cap.swap > .hd, .v3 .cap.swap > .sb { opacity: 0; }
.v3 .steps { display: flex; gap: 6px; margin-bottom: var(--s2); }
.v3 .steps i { width: 22px; height: 3px; background: var(--grid); display: block; transition: background .3s ease; }
.v3 .steps i.on { background: var(--red); }
.v3 .yr { color: var(--red); }
.v3 .hd { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.15; }
.v3 .sb { margin: 0; font-size: 18px; line-height: 1.45; color: var(--ink); max-width: 60ch; }
.v3 .rooms { --dot: 26px; --gap: 8px; --cols: 6; display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 0 var(--s6); align-items: start; }
.v3 .sexes { display: grid; grid-template-rows: subgrid; grid-row: span 4; font-family: var(--sans); font-size: 13px; color: var(--sub); }
.v3 .sexes span:first-child { grid-row: 2; align-self: center; }
.v3 .sexes span:last-child { grid-row: 3; align-self: center; }
.v3 .room { display: grid; grid-template-rows: subgrid; grid-row: span 4; gap: var(--s3); border-top: 1px solid var(--ink); padding-top: var(--s3); min-width: 0; }
.v3 .room h4 { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.2; display: grid; gap: 2px; transition: opacity .3s ease; }
.v3 .room h4 span { font-weight: 400; font-size: 14px; color: var(--sub); }
.v3 .blk { display: grid; grid-template-columns: repeat(var(--cols), var(--dot)); gap: var(--gap); }
.v3 .blk i { width: var(--dot); height: var(--dot); border-radius: 50%; box-sizing: border-box; border: 1.5px solid var(--ctx); background: transparent; transition: background-color .7s ease, border-color .7s ease, opacity .5s ease; }
.v3 .blk i.gone { opacity: 0; }
.v3 .avg { margin: 0; font-family: var(--sans); font-size: 14px; color: var(--sub); transition: opacity .3s ease; }
.v3 .avg b { font-family: var(--serif); font-size: 26px; color: var(--ink); font-variant-numeric: tabular-nums; }
.v3 .avg.hot b { color: var(--red); }
.v3 .key { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px var(--s5); align-items: center; font-family: var(--sans); font-size: 14px; color: var(--sub); transition: opacity .4s ease; }
.v3 .key.off { opacity: 0; }
.v3 .key p { margin: 0; }
.v3 .key .what { color: var(--ink); }
.v3 .key .note { grid-column: 1 / -1; font-size: 13px; }
.v3 .key .note a { color: var(--ink); }
.v3 .scale { display: grid; grid-template-columns: auto 160px auto; justify-content: start; gap: 8px; align-items: center; }
.v3 .scale .bar { grid-column: 2; grid-row: 1; height: 10px; background: linear-gradient(90deg, #E0E0E0, #E9A196 35%, #C70000 70%, #7A0000); }
.v3 .scale .lo { grid-column: 1; grid-row: 1; }
.v3 .scale .hi { grid-column: 3; grid-row: 1; }

/* V4: from five seconds to a T-shirt */
.v4 ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.v4 li { position: relative; padding: var(--s6) var(--s4) var(--s4) 0; display: grid; gap: var(--s2); align-content: start; opacity: .15; transform: translateY(10px); transition: opacity .5s ease, transform .5s var(--ease); min-width: 0; }
.v4 li::before { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.v4 li::after { content: ""; position: absolute; top: 6px; left: 0; width: 28px; height: 5px; background: var(--red); }
.v4.on li { opacity: 1; transform: none; }
.v4.on li::before { transform: scaleX(1); }
.v4.on li:nth-child(2), .v4.on li:nth-child(2)::before { transition-delay: .35s; }
.v4.on li:nth-child(3), .v4.on li:nth-child(3)::before { transition-delay: .7s; }
.v4.on li:nth-child(4), .v4.on li:nth-child(4)::before { transition-delay: 1.05s; }
.v4 .n { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.v4 h4 { margin: 0; font-family: var(--serif); font-size: clamp(20px, 2vw, 26px); line-height: 1.1; font-weight: 700; overflow-wrap: break-word; }
.v4 p { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.45; }
.v4-title { margin: 0 0 var(--s4); font-family: var(--serif); font-size: clamp(26px, 3vw, 36px); line-height: 1.1; font-weight: 700; }

/* Inline link to video, never a task */
.watch { display: flex; gap: var(--s3); align-items: baseline; border-top: 1px solid var(--grid); padding: var(--s3) 0; font-family: var(--sans); font-size: 15px; }
.watch .tag { flex: none; }

/* For your exam */
.exam { padding: var(--s8) var(--gutter); background: var(--tint); }
.exam-in { max-width: 980px; margin: 0 auto; display: grid; gap: var(--s5); }
.exam h2 { margin: 0; font-family: var(--serif); font-size: clamp(36px, 4.8vw, 60px); line-height: 1.02; font-weight: 700; letter-spacing: -.018em; }
.exam .intro { margin: 0; color: var(--sub); max-width: 62ch; font-family: var(--sans); font-size: 17px; }
.exam .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s5); }
.exam .grid > div { padding: var(--s4) 0; border-top: 1px solid var(--ctx); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
.exam .grid h3 { margin: 0 0 var(--s1); font-family: var(--sans); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--red); }
.exam .grid p { margin: 0; }
.exam .grid ol, .exam .grid ul { margin: 0; padding-left: 1.2em; }
.exam .q { background: var(--paper); padding: var(--s5); font-size: 19px; box-shadow: inset 0 3px 0 var(--red); }
.exam .q h3 { margin: 0 0 var(--s2); color: var(--red); font-family: var(--sans); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.exam .q p { margin: 0; }
.exam .more { font-family: var(--sans); font-size: 15px; margin: 0; }
.exam .more a { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--red); }

/* Sources and credits */
.sources { padding: var(--s7) var(--gutter); font-family: var(--sans); font-size: 15px; }
.sources-in { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
.sources h2 { margin: 0 0 var(--s3); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.sources ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s2); color: var(--sub); }
.sources a { color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* End of story: newsletter, then where next */
.news { --paper: #111111; --ink: #F2F2F2; --sub: #B3B3B3; padding: var(--s7) var(--gutter); background: var(--paper); color: var(--ink); }
.news-in { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5) var(--s7); align-items: end; }
.news h2 { margin: 0; font-family: var(--serif); font-size: 30px; line-height: 1.1; font-weight: 700; }
.news p { margin: var(--s2) 0 0; color: var(--sub); font-family: var(--sans); font-size: 16px; max-width: 44ch; }
.news form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; font-family: var(--sans); }
.news label { grid-column: 1 / -1; color: var(--ink); font-size: 13px; letter-spacing: 0; text-transform: none; }
.news input { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); min-width: 0; border-radius: 0; }
.news button { font: inherit; font-size: 15px; font-weight: 700; letter-spacing: .04em; padding: 10px 20px; border: 0; background: var(--red); color: var(--white); cursor: pointer; border-radius: 0; }
.news .msg { grid-column: 1 / -1; font-size: 14px; margin: 0; min-height: 1.4em; color: var(--sub); }
.news .msg.err { color: var(--red); }

.upnext { padding: var(--s6) var(--gutter) var(--s7); font-family: var(--sans); }
.upnext-in { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.upnext a { display: grid; gap: 4px; text-decoration: none; border-top: 1px solid var(--ink); padding-top: var(--s3); position: relative; }
.upnext a::before { content: ""; position: absolute; left: 0; top: -3px; width: 28px; height: 5px; background: var(--red); }
.upnext a strong { font-family: var(--serif); font-size: 20px; line-height: 1.2; }
.upnext a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.upnext a span { font-size: 14px; color: var(--sub); }
.foot { padding: var(--s6) var(--gutter) var(--s7); display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; font-family: var(--sans); font-size: 13px; color: var(--sub); }

/* ---------------- Phones ---------------- */
@media (max-width: 760px) {
  body { font-size: 18px; }
  .news-in, .sources-in, .upnext-in { grid-template-columns: 1fr; }
  .chaps { display: none; }
  .scrub .now { text-align: right; }
  .freeze { grid-template-columns: 1fr; }
  .freeze .tc { font-size: 32px; }
  .v1 .wide-svg { display: none; }
  .v1 .narrow { display: block; }
  .v5 .stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: end; }
  .v5 .pile { height: 46vh; }
  .bobo-intro { grid-template-columns: 104px minmax(0, 1fr); gap: var(--s4); }
  .v3 { height: 600vh; }
  .v3 .stage { gap: var(--s4); }
  .v3 .sb { font-size: 16px; }
  .v3 .rooms { --dot: 17px; --gap: 5px; --cols: 4; column-gap: var(--s3); }
  .v3 .sexes { font-size: 11px; }
  .v3 .sexes span { writing-mode: vertical-rl; transform: rotate(180deg); justify-self: center; }
  .v3 .room h4 { font-size: 14px; }
  .v3 .room h4 span { font-size: 12px; }
  .v3 .avg { font-size: 12px; }
  .v3 .avg b { font-size: 20px; display: block; }
  .v3 .key { grid-template-columns: 1fr; }
  .v4 ol { grid-template-columns: 1fr; }
  .v4 li { padding: var(--s3) 0 var(--s3) var(--s6); }
  .v4 li::before { top: 0; bottom: 0; left: 0; right: auto; width: 1px; height: auto; transform: scaleY(0); transform-origin: top; }
  .v4.on li::before { transform: scaleY(1); }
  .v4 li::after { top: 18px; left: 0; width: 18px; height: 3px; }
  .exam .grid { grid-template-columns: 1fr; }
  .photo-scene .card-text { padding: var(--s4); font-size: 18px; }
}

/* ---------------- Reduced motion: everything rests in its finished state ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; scroll-behavior: auto !important; }
  .v5 { height: auto; }
  .v5 .stage { position: relative; height: auto; min-height: 0; padding-top: var(--s8); padding-bottom: var(--s8); }
  .bobo-intro path { stroke-dashoffset: 0; opacity: 1; }
  .v4 li { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
