/* The chapter and its examples move with the document at every breakpoint. */
main{--chapter-width:min(90%,1490px);--chapter-space:clamp(54px,8vw,124px)}
.hero::after{content:"";position:absolute;inset:auto 0 0;height:13%;background:linear-gradient(transparent,var(--studio-ink));pointer-events:none;z-index:-1}
main>.sequence:is(#systems,#outbound,#editing){
 height:auto;min-height:0;padding:var(--chapter-space) 0 0;border:0;background:transparent
}
.chapter-body,#editing .case-shelf{width:var(--chapter-width);margin-inline:auto}
.sequence .chapter-body .layout{width:100%;padding:0;display:grid;grid-template-columns:minmax(0,.72fr) minmax(0,1.65fr);align-items:start;gap:clamp(24px,4.5vw,86px)}
.sequence .chapter-body .story{width:100%;margin:0}
.sequence .chapter-body .workbench{position:relative;top:auto;width:100%;margin:0}
/* The gutter belongs to the next chapter, so a directory link still lands on its title. */
main>.sequence:is(#outbound,#editing){padding-top:0;display:flow-root}
.chapter-seam{display:block;width:var(--chapter-width);height:clamp(96px,10vw,156px);margin:0 auto;pointer-events:none}
#outbound,#editing{scroll-margin-top:calc(-1 * clamp(96px,10vw,156px))}
#outbound .metric{align-items:baseline}
#outbound .letter{min-height:clamp(205px,17vw,260px)}
#outbound #mailbody{white-space:pre-line}
#editing .edit-net:not(.is-stacked){height:clamp(194px,18vw,275px)}
#systems .atlas-reading[data-topic="slit"]{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
#systems .atlas-reading[hidden],.slit-sheet[hidden]{display:none}
#systems .slit-sheet{max-width:640px;width:100%;padding:14px clamp(12px,2vw,24px);border-radius:4px}
.slit-sheet .cut-result{margin:10px 0 0;font-size:13px;line-height:1.55;color:var(--studio-engraved)}
.slit-sheet{margin:0;background:var(--studio-cream);color:var(--studio-ink);border-radius:6px;padding:clamp(16px,2.8vw,44px);box-sizing:border-box}
.slit-sheet figcaption,.roll-meta,.cut-key{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.slit-sheet figcaption{flex-wrap:wrap;padding-bottom:14px;border-bottom:1px solid #c8b9a8;font-size:clamp(12px,.96vw,15px);color:var(--studio-engraved)}
.slit-sheet figcaption strong{font-size:clamp(16px,1.3vw,21px);color:var(--studio-panel)}
.cut-rolls{display:grid;gap:8px;margin:12px 0}
.roll-meta{font-size:12px;color:#655442;margin-bottom:5px;font-variant-numeric:tabular-nums}
.cut-band{display:flex;min-height:23px;overflow:hidden;background:#d2c2ac;border:1px solid #c0ac92}
.cut-piece{flex:var(--share) 0 0;min-width:0;display:grid;place-items:center;box-shadow:inset 1px 0 0 var(--studio-cream);background:#ad8964;color:#241b14;font:500 clamp(10px,.97vw,14px)/1 Consolas,monospace;font-variant-numeric:tabular-nums}
.cut-piece.extra,.cut-key span:nth-child(2)::before{background:repeating-linear-gradient(125deg,#4e3726 0 3px,#795a3d 3px 5px);color:var(--studio-paper)}
.cut-piece.waste,.cut-key span:nth-child(3)::before{background:var(--studio-cream)}
.cut-key{justify-content:flex-start;flex-wrap:wrap;gap:6px 18px;font-size:12px;color:#564838}
.cut-key span{display:flex;align-items:center;gap:6px}.cut-key span::before{content:"";width:12px;height:9px;background:#ad8964;border:1px solid #a89072}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#editing .case-shelf{background:none;border:0;padding:0;margin-block:clamp(32px,4vw,68px) var(--chapter-space)}
#editing .case-shelf h3{color:var(--studio-paper);font-size:clamp(23px,2.25vw,36px);margin:0 0 .75em}
.case-prints{gap:clamp(12px,1.5vw,25px)}
.case-frame{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;aspect-ratio:1.71;background:var(--studio-ink)}
.case-frame img{width:100%;height:100%;min-width:0;min-height:0;object-fit:cover;object-position:center}
.case-frame .film-time{position:absolute;left:8px;bottom:8px;border-radius:2px;padding:3px 5px;background:#191816d9;color:var(--studio-paper);font:12px/1.2 Consolas,monospace;z-index:1}
.case-print:hover img,.case-print:focus-visible img{transform:none}
.case-print:focus-visible .case-frame,.case-print:hover .case-frame{outline:1px solid var(--studio-copper);outline-offset:2px}
.case-print strong{font-size:clamp(14px,1.1vw,18px)}
@media(max-width:960px){
 main{--chapter-width:91%;--chapter-space:clamp(44px,7vw,68px)}
 .sequence .chapter-body .layout{grid-template-columns:minmax(0,.64fr) minmax(0,1.36fr);gap:22px}
}
@media(max-width:750px){
 .sequence .chapter-body .layout{display:grid;grid-template-columns:minmax(0,1fr);gap:20px}
 #outbound .letter{min-height:185px}
}
@media(max-width:620px){
 .case-prints{grid-template-columns:minmax(0,1fr);gap:21px}
 .case-print strong{font-size:15px}.case-frame{aspect-ratio:1.95}
}
/* The two neighbouring boards follow the very same scroll position as their shared cut. */
@media(prefers-reduced-motion:no-preference){
 .sequence .chapter-body .workbench{
  --entry:var(--chapter-entry,0);--exit:var(--chapter-exit,0);
  transform-origin:50% 50%;
  transform:perspective(1300px) translateY(calc(var(--entry)*9px - var(--exit)*4px)) rotateX(calc(var(--entry)*2deg - var(--exit)*1.3deg)) scale(calc(1 - var(--entry)*.022 - var(--exit)*.012));
 }
 .sequence .chapter-body .story .kicker b{transform-origin:left;transform:scaleX(calc(1 - var(--chapter-entry,0)*.65))}
}
/* Native scrolling drives the entrances. Reading and keyboard focus need no animation. */
@supports (animation-timeline:view()){
 @media(prefers-reduced-motion:no-preference){
  .hero{view-timeline-name:--opening}
  .hero-copy{animation:leave-opening linear both;animation-timeline:--opening;animation-range:exit 0% exit 80%}
  .chapter-body .story,.chapter-body .workbench,.case-print{
   animation:chapter-arrive linear both;animation-timeline:view();animation-range:entry 0% entry 145px
  }
 }
}
@keyframes leave-opening{from{translate:0 0;opacity:1}to{translate:0 42px;opacity:.46}}
@keyframes chapter-arrive{from{opacity:.78;translate:0 18px}to{opacity:1;translate:0 0}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
