/* Editorial chapter openings and reversible SVG handovers. */
:root{--chapter-page-h:calc(100svh - var(--nav-h))}
.chapter.has-chapter-opening{scroll-margin-top:var(--nav-h);border-top:0}
.has-chapter-opening>.chapter-page{padding-top:0}
.has-chapter-exit>.chapter-page{padding-bottom:0}
.chapter-opener,.chapter-exit{width:var(--page-w, 100vw);margin-left:calc(50% - var(--page-w, 100vw) / 2)}
.chapter-opener{position:relative;isolation:isolate;z-index:2;height:var(--chapter-page-h);min-height:560px;text-align:center;color:var(--ink);background:transparent}
.chapter-object{position:absolute;left:50%;top:29%;width:min(360px,64vw);height:auto;aspect-ratio:800/580;transform:translate(-50%,-50%);object-fit:contain}
.chapter-title-group{position:absolute;top:52%;left:28px;right:28px;text-align:center}
.chapter-title-group .t-kicker,.chapter-title-group .age-kicker{font:10px/1.6 var(--font-mono);letter-spacing:.15em;text-transform:uppercase;color:var(--muted);margin:0 0 34px}
.chapter-title-group .t-h1,.chapter-title-group h1{font:400 clamp(60px,7.8vw,108px)/1.04 var(--font-display);letter-spacing:-.045em;max-width:16ch;margin:0 auto;text-wrap:balance}
#c-section .chapter-title-group h1{font-size:clamp(52px,6.3vw,90px);max-width:19ch}
.chapter-deck{font:400 clamp(28px,3.1vw,40px)/1.3 var(--font-display);letter-spacing:-.02em;text-align:left;text-wrap:pretty;max-width:760px;margin:12vh auto 0;color:var(--ink)}
.chapter-opening{margin-bottom:60px}
.chapter-closing{padding-top:5vh}
.chapter-closing>.t-data-para{font-size:clamp(21px,2.1vw,28px);line-height:1.55;max-width:800px;margin:0 auto 12vh;text-wrap:pretty}
.chapter-exit{position:relative;height:var(--chapter-page-h);min-height:560px;scroll-margin-top:var(--nav-h);--turn-span:2.9;isolation:isolate}
.chapter-exit[data-quiet]{--turn-span:3.25}
.chapter-exit-page{position:relative;height:var(--chapter-page-h);min-height:560px;background:var(--bg);color:var(--ink);overflow:clip}
.chapter-exit-copy{position:absolute;top:28%;left:50%;width:min(800px,calc(100% - 64px));margin-left:calc(-1 * min(400px,(100% - 64px)/2));will-change:opacity,transform}
.chapter-exit-kicker{font:10px/1.6 var(--font-mono);letter-spacing:.14em;text-transform:uppercase;color:var(--muted);margin:0 0 30px}
.chapter-last-thought{font:400 clamp(27px,3.2vw,43px)/1.3 var(--font-display);letter-spacing:-.02em;margin:0;text-wrap:pretty}
.chapter-exit-mark{position:absolute;top:80%;left:50%;width:min(380px,74vw);height:auto;aspect-ratio:800/580;object-fit:contain;transform:translate(-50%,-50%)}
[data-chapter-motion=on] .chapter-exit:not([data-turn-failed]){height:calc(var(--chapter-page-h) * var(--turn-span));min-height:0}
[data-chapter-motion=on] .chapter-exit:not([data-turn-failed])>.chapter-exit-page{position:sticky;top:var(--nav-h);min-height:0}
[data-chapter-motion=on] .chapter-turn-in{margin-top:calc(-1 * var(--chapter-page-h))}
.report-chapter-morph{position:fixed;left:0;width:100%;z-index:16;pointer-events:none;overflow:hidden}
.report-chapter-morph[hidden]{display:none}
.age-report .age-opening{padding:0 0 100px}
.age-report .age-handoff{padding-top:90px;text-align:center;margin:0!important}
.age-report .chapter-opener{margin-top:0}
.age-report .chapter-title-group h1>span{display:block}
.age-report .chapter-title-group h1>span:last-child{color:var(--cat-primary)}
.age-report .age-deck{font:400 clamp(28px,3.1vw,40px)/1.3 var(--font-display);max-width:760px;margin:8vh auto 0!important}
.age-report .age-intro{max-width:760px;margin:30px auto 0!important}
.age-report .chapter-exit-copy p{margin:0}
.age-report .chapter-exit-copy .chapter-exit-kicker{margin-bottom:30px}
.age-report .chapter-closing{padding:0}
.age-report .age-trend-section{margin-bottom:50px}
@media(max-width:760px){
  .chapter-title-group{left:24px;right:24px;top:52%}
  .chapter-title-group .t-h1,.chapter-title-group h1{font-size:clamp(45px,12.8vw,72px);line-height:1.05;max-width:13ch}
  #c-section .chapter-title-group h1{font-size:clamp(39px,10.8vw,60px);max-width:15ch}
  .chapter-title-group .t-kicker,.chapter-title-group .age-kicker{font-size:10px;margin-bottom:30px}
  .chapter-deck{font-size:29px;margin-top:10vh;line-height:1.35}.chapter-opening{margin-bottom:42px}
  .chapter-closing>.t-data-para{font-size:22px;line-height:1.55;margin-bottom:8vh}
  .chapter-exit-copy{top:22%;width:calc(100% - 52px);margin-left:calc(-50% + 26px)}
  .chapter-exit-kicker{font-size:10px;margin-bottom:26px}
  .chapter-last-thought{font-size:clamp(24px,6.6vw,32px);line-height:1.34}
  .age-report .age-handoff{padding-top:62px;font-size:21px}
  .age-report .age-deck{font-size:29px;margin-top:7vh!important}
  .age-report .age-opening{padding-bottom:70px}
}
@media(prefers-reduced-motion:reduce),(max-height:640px){
  .report-chapter-morph{display:none!important}
  .chapter-exit,.chapter-opener,.chapter-exit-page{min-height:560px}
  .chapter-exit{height:auto!important}.chapter-exit-page{position:relative!important;top:auto!important}
  .chapter-turn-in{margin-top:0!important}
  .chapter-exit-copy,.chapter-title-group{opacity:1!important;transform:none!important}
  .chapter-object,.chapter-exit-mark{visibility:visible!important}
}
/* chapter 1 follows the journey text directly: on phones its badge and title sit higher on the opening page */
@media (max-width: 760px) { .age-report .chapter-opener .chapter-object { top: 20%; } .age-report .chapter-opener .chapter-title-group { top: 43%; } }
/* the sentence under a chapter title sits just under the title: chapter-transitions.js sets --deck-pull to the empty part of
   the opening page below the title. It paints above the previous exit page, and fades in with the title. */
.chapter-opener ~ .chapter-deck, .age-report .chapter-opener ~ .age-deck { position: relative; z-index: 2; margin-top: calc(clamp(20px, 3.5vh, 44px) - var(--deck-pull, 0px)) !important; }

/* an exit page without text (its copy was removed): the object sits in the middle, and the turn to the next
   chapter takes less scrolling, so no screen of empty page is left (review 17 Nov) */
.chapter-exit:not(:has(.chapter-exit-copy)) { --turn-span: 1.7; }
.chapter-exit-page:not(:has(.chapter-exit-copy)) .chapter-exit-mark { top: 42%; }
.chapter-closing:has(.chapter-exit-page:not(:has(.chapter-exit-copy))) > .t-data-para { margin-bottom: 4vh; }
