/* Chapter-only overrides. The home, serif claims and page wipe keep their styles. */
.living-stage{position:fixed;inset:0;z-index:0;pointer-events:none;visibility:hidden;overflow:hidden}
.living-stage canvas,.living-stage .engineering,.living-shade{position:absolute;inset:0;width:100%;height:100%}
.living-stage canvas{opacity:1}.living-stage .engineering{visibility:visible}
.living-shade{background:linear-gradient(0deg,#071c16ed,transparent 42%)}
.living-ready .living-stage{visibility:visible}
.living-ready main{position:relative;z-index:1}
.living-ready .chapter .plate,.living-ready .chapter .scene-shade{visibility:hidden}
.living-ready .chapter .engineering{visibility:hidden}
.at-contact .living-stage{display:none}
.engineering .route,.engineering .leader{stroke:#dec38c;stroke-width:1.5px;stroke-opacity:1;filter:drop-shadow(0 0 4px #dec38c59)}
.engineering .annotation{fill:#dec38c;font-size:12px;stroke:none;letter-spacing:1px}
.js-motion .living-stage .route{stroke-dasharray:none;stroke-dashoffset:0;animation:none}
.js-motion .living-stage .trace .leader,.js-motion .living-stage .trace text,.js-motion .living-stage .endpoint{opacity:1;animation:none}
.living-stage .trace{opacity:1}
@media(max-width:700px){.living-shade{background:linear-gradient(0deg,#071c16f2,transparent 47%)}}
@media(prefers-reduced-motion:reduce){.living-stage{display:none}}
/* Descendant SVG visibility must not override the hidden static plate. */
.living-ready .chapter .plate{display:none}
/* A small pool of shade follows the copy instead of darkening the photograph. */
.living-shade{background:none}
.scene-shade{background:radial-gradient(ellipse 58% 35% at 22% 87%,#071c16a8,transparent 100%)}
.living-ready .chapter .scene-shade{visibility:visible}
.scene-copy{text-shadow:0 2px 18px #071c16d9}
.engineering .route,.engineering .endpoint.end{visibility:hidden}
.engineering .leader{stroke:#dec38c;stroke-width:1px;stroke-opacity:.65;filter:none}
.engineering .endpoint.start{fill:#dec38c}
.engineering .annotation{fill:#f0eee4;font:500 11px Manrope,'Manrope fallback',sans-serif;letter-spacing:0;stroke:none}
@media(max-width:700px){
 .living-shade{background:none}
 .scene-shade{background:radial-gradient(ellipse 75% 29% at 35% 81%,#071c16b8,transparent 100%)}
 .engineering .annotation{font-size:10px}
}
.title-clip{overflow:hidden;padding:0 .06em .08em;margin:0 -.06em -.08em}
@media(prefers-reduced-motion:no-preference){
 .entered .title-clip h1,.entered .title-clip h2{animation:chapter-title-in var(--m-title) var(--m-ease-out) both}
 @keyframes chapter-title-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
}
/* Solid backing keeps navigation legible against every photograph. */
body:has(.chapter) .masthead{background:linear-gradient(180deg,rgba(8,30,22,.9) 0,rgba(8,30,22,.78) 62%,rgba(8,30,22,0) 100%)}

/* A chapter moves from context to construction, detail, interaction and result.
   Percentages are shared with living-engine.js, including the static fallback. */
.chapter{--photo-x:0;--photo-y:0;--photo-w:100;--photo-h:100;--crop:1}
.chapter .plate{left:calc(var(--photo-x)*1%);top:calc(var(--photo-y)*1%);width:calc(var(--photo-w)*1%);height:calc(var(--photo-h)*1%)}
.chapter .plate img{object-position:var(--position) var(--vertical);transform:scale(calc(var(--framing)*var(--crop)));transform-origin:var(--position) var(--vertical)}
.chapter>.engineering{z-index:0}
.engineering .annotation{font-size:12px;paint-order:stroke;stroke:#102922;stroke-width:3px;stroke-linejoin:round}
.chapter .eyebrow,.scene-nav a,.header-note{font-size:12px}
.chapter[data-composition=construction]{--photo-x:40;--photo-y:19;--photo-w:53;--photo-h:64}
.chapter[data-composition=construction] .scene-copy{left:4.4%;right:auto;bottom:36%;width:32%;max-width:480px}
.chapter[data-composition=construction] h2{font-size:clamp(38px,3.8vw,58px)}
.chapter[data-composition=construction] .scene-copy:after{content:"";position:absolute;left:0;top:calc(100% + 30px);width:calc(111.25% + 32px);height:1px;background:var(--gold);opacity:.7}
.chapter[data-composition=construction] .scene-shade{background:none}
.chapter[data-composition=detail]{--photo-w:67;--crop:1.18}
.chapter[data-composition=detail] .scene-copy{left:71%;right:6%;bottom:20%;max-width:none}
.chapter[data-composition=detail] h2{font-size:clamp(36px,3.5vw,52px)}
.chapter[data-composition=detail] .scene-shade{background:none}
.engineering[data-composition=detail] .annotation,.chapter[data-composition=detail] .annotation{font-size:15px}
/* One precise label lets the close-up breathe; opening reveals the full diagram. */
.engineering[data-composition=detail] .trace:not(:first-child),.chapter[data-composition=detail] .trace:not(:first-child){display:none}
.chapter[data-composition=continuation]{--photo-x:7;--photo-y:14;--photo-w:86;--photo-h:72}
.chapter[data-composition=continuation] .scene-copy{bottom:9%;max-width:780px}
.chapter[data-composition=result]{--photo-x:7;--photo-y:16;--photo-w:86;--photo-h:54}
.chapter[data-composition=result] .scene-copy{left:12%;right:12%;bottom:9%;max-width:none;text-align:center}
.chapter[data-composition=result] h2{max-width:1000px;margin-inline:auto}
.chapter[data-composition=result] .scene-shade{background:none}
.engineering[data-composition=result] .trace,.chapter[data-composition=result] .trace{display:none}
@media(max-width:700px){
 .chapter[data-composition=construction]{--photo-x:14;--photo-y:23;--photo-w:76;--photo-h:43}
 .chapter[data-composition=construction] .scene-copy{left:24px;right:40px;width:auto;bottom:12%;max-width:none}
 .chapter[data-composition=construction] h2{font-size:clamp(30px,9vw,38px)}
 .chapter[data-composition=construction] .scene-copy:after{left:0;top:-28px;width:1px;height:24px}
 .chapter[data-composition=detail]{--photo-x:0;--photo-y:0;--photo-w:100;--photo-h:67;--crop:1.08}
 .chapter[data-composition=detail] .scene-copy{left:24px;right:40px;bottom:12%}
 .chapter[data-composition=detail] h2{font-size:clamp(30px,9vw,38px)}
 .chapter[data-composition=detail] .detail{margin-top:14px}
 .engineering[data-composition=detail] .annotation,.chapter[data-composition=detail] .annotation{font-size:14px}
 .chapter[data-composition=continuation]{--photo-x:6;--photo-y:22;--photo-w:84;--photo-h:49}
 .chapter[data-composition=continuation] .scene-copy{bottom:12%}
 .chapter[data-composition=result]{--photo-x:6;--photo-y:25;--photo-w:84;--photo-h:37}
 .chapter[data-composition=result] .scene-copy{left:24px;right:36px;bottom:14%}
 .chapter[data-composition=result] h2{font-size:clamp(30px,9vw,38px)}
 .chapter .eyebrow,.scene-nav a{font-size:12px}
}
/* Hide the fallback SVG as a whole: inline label visibility survives inheritance. */
.living-ready .chapter>.engineering{display:none}
.interaction-active .chapter>.engineering,.cutaway-active .chapter>.engineering{display:none}
@media(max-width:700px){
 .chapter[data-composition=construction] .scene-copy{top:70%;bottom:auto}
 .chapter[data-composition=construction] .scene-copy:after{left:calc(14vw - 24px);top:calc(var(--chapter-viewport-height,100svh)*-.04);height:calc(var(--chapter-viewport-height,100svh)*.04 - 12px)}
 .chapter[data-composition=detail] .scene-copy{top:70%;bottom:auto}
}
/* Phone: a solid header bar, so scrolling copy never shows through the nav row. */
@media(max-width:700px){body:has(.chapter) .masthead{background:#0b231a}}
/* Phone: compositions keep their crop but always fill the width; the step rail sits over the photo, not in an empty column. */
@media(max-width:700px){.chapter[data-composition]{--photo-x:0;--photo-w:100}}

/* On phones the rail is attached to the photograph's frame, not the viewport. */
.phone-scene-nav{display:none}
@media(max-width:700px){
 body > .scene-nav{display:none}
 .chapter .phone-scene-nav{display:flex;position:absolute;top:max(122px, calc(var(--photo-y)*1% + 10px));right:calc((100 - var(--photo-x) - var(--photo-w))*1% + 10px);align-items:center;justify-content:center;min-height:32px;padding:6px 10px;border:1px solid #dec38c60;border-radius:16px;background:#071c16b3;color:var(--paper);font-size:11px;letter-spacing:.08em;font-variant-numeric:tabular-nums;z-index:4}
 .contact-visible .phone-scene-nav,.phone-scene-nav.outside-photo{visibility:hidden;opacity:0;pointer-events:none}
}
@media(max-width:700px){
 .chapter[data-composition=construction],.chapter[data-composition=continuation],.chapter[data-composition=result]{--photo-y:16;--photo-h:62}
 .chapter .next{width:44px;height:44px}
 body .detail summary,body .interaction-trigger,body .interaction-close,body .cutaway-close{min-height:44px;font-size:15px}
}

/* The live photograph and its original caption share a viewport anchor.
   Opacity comes from the same dissolve, never from the section's scroll edge. */
:is(.living-ready,:where(.living-layout) body) .chapter{overflow:visible}
:is(.living-ready,:where(.living-layout) body) .chapter .scene-copy,:is(.living-ready,:where(.living-layout) body) .chapter .scene-shade{position:fixed}
.living-ready .chapter .title-clip h1,.living-ready .chapter .title-clip h2{animation:none}
:is(.living-ready,:where(.living-layout) body) .chapter .next{position:fixed;visibility:hidden;pointer-events:none}
.living-ready .chapter.photo-visible .next{visibility:visible;pointer-events:auto}
body:has(.chapter) .masthead{background:none}
body:has(.chapter) .masthead::after{background:linear-gradient(180deg,#081e16 0%,#081e16f5 65%,#081e1600 100%)}
/* Remove the final half-screen spacer when the fixed photo hands off to contact. */
:is(.living-ready,:where(.living-layout) body) .contact{position:relative;margin-top:-50svh;margin-top:calc(var(--chapter-viewport-height,100svh)*-.5);visibility:hidden}
:is(.living-ready,:where(.living-layout) body).at-contact .contact{visibility:visible}
.contact{padding-top:130px}
.prepare ul,footer{color:var(--paper);font-weight:350;font-size:12px}
@media(max-width:700px){
 body:has(.chapter) .masthead::after{background:#0b231a}
 /* Keep captions close to their photo edge, including half-scroll stops. */
 .chapter[data-composition=construction],.chapter[data-composition=continuation],.chapter[data-composition=result]{--photo-y:16;--photo-h:57}
 .chapter[data-composition=construction] .scene-copy,
 .chapter[data-composition=continuation] .scene-copy,
 .chapter[data-composition=result] .scene-copy{top:76%;bottom:auto;left:24px;right:64px;width:auto;text-align:left}
 .chapter[data-composition=detail]{--photo-y:16;--photo-h:48}
 .chapter[data-composition=detail] .scene-copy{top:67%;bottom:auto;left:24px;right:64px}
 .chapter[data-composition=construction] .scene-copy:after{display:none}
 .chapter[data-composition=result] h2{margin-inline:0}
 .living-ready .chapter .phone-scene-nav{position:fixed;visibility:hidden;opacity:0;pointer-events:none}
 .living-ready:not(.interaction-active):not(.cutaway-active) .chapter.photo-visible .phone-scene-nav{visibility:visible;opacity:1;pointer-events:auto}
 .contact{padding-top:140px;padding-bottom:24px}
 .contact .eyebrow{margin-bottom:14px}
 .contact h2{font-size:34px}
 .contact .email{margin:20px 0 24px}
 .prepare{padding-top:18px;gap:12px}
 .prepare ul,footer{font-size:12px;line-height:1.8}
 .other-chapters{margin:20px 0}
 footer{padding-top:18px}
}

/* Phone annotations stay sparse, including the opened technical views. */
@media(max-width:700px){
 .interaction-labels > g:nth-child(n+3),.cutaway-mobile > g:nth-child(n+3){display:none}
 .contact a,.contact summary{min-width:44px;min-height:44px}
 .contact .other-chapters a{display:inline-flex;align-items:center}
}

/* Technical callouts: physical anchor, fine leader, tracked caption. */
.engineering .leader{stroke:var(--paper);stroke-width:1px;stroke-opacity:.45;filter:none}
.engineering .endpoint.start{fill:var(--paper)}
.engineering .annotation{font-size:11px;letter-spacing:.12em;stroke:#10292280;stroke-width:2px}
@media(max-width:700px){.engineering .annotation{font-size:10px}}

/* Opening and continuation fill the viewport in both WebGL and fallback. */
.chapter[data-composition=context],.chapter[data-composition=continuation]{--photo-x:0;--photo-y:0;--photo-w:100;--photo-h:100;height:100svh;height:var(--chapter-viewport-height,100dvh);min-height:0}
.chapter[data-composition=context] .scene-shade,.chapter[data-composition=continuation] .scene-shade{background:linear-gradient(90deg,#071c1699,transparent 70%),linear-gradient(0deg,#071c16e6,transparent 62%)}
@media(max-width:700px){
 .chapter[data-composition=context] .scene-copy,.chapter[data-composition=continuation] .scene-copy{top:auto;bottom:12%;left:24px;right:44px}
 .chapter[data-composition=context] .scene-shade,.chapter[data-composition=continuation] .scene-shade{background:linear-gradient(0deg,#071c16eb,transparent 76%)}
}

/* Desktop chapters share one viewport and one editorial rail. The photo bounds
   also feed living-engine.js, keeping static, live and projected geometry equal. */
@media(min-width:701px){
 body:has(.chapter){
  --green:#0c1f1a;
  --chapter-scrim:linear-gradient(90deg,#0c1f1a 0%,#0c1f1ae0 28%,#0c1f1a00 58%),linear-gradient(180deg,#0c1f1acc 0%,#0c1f1a00 160px);
 }
 .chapter[data-composition]{--photo-x:0;--photo-y:0;--photo-w:100;--photo-h:100;--crop:1;height:100vh;min-height:0}
 .living-stage,.dive-stage{width:100vw;height:100vh;background:#0c1f1a}
 .chapter .plate{background:#0c1f1a}
 .living-stage canvas,.chapter .plate picture,.dive-stage canvas{
  mask-image:linear-gradient(90deg,transparent,#000 12%,#000 94%,transparent),linear-gradient(transparent,#000 12%,#000 88%,transparent);
  mask-composite:intersect;
 }
 .living-stage .living-shade{background:var(--chapter-scrim)}
 .chapter[data-composition] .scene-shade{background:var(--chapter-scrim)}
 .living-ready .chapter[data-composition] .scene-shade{display:none}
 .chapter[data-composition] .scene-copy{
  left:64px;right:auto;top:auto;bottom:88px;width:360px;max-width:360px;text-align:left;isolation:isolate;
 }
 /* The title carries its own scrim through both the live plate and the dive. */
 .chapter[data-composition] .scene-copy::before{
  content:"";position:absolute;z-index:-1;pointer-events:none;left:-64px;bottom:-88px;
  width:484px;height:max(348px,calc(100% + 144px));
  background:radial-gradient(ellipse 420px 260px at 64px calc(100% - 88px),rgba(8,22,17,.72),rgba(8,22,17,.48) 35%,rgba(8,22,17,0) 100%);
 }
 .chapter[data-composition] .scene-copy:after{display:none}
 .chapter.dive-section .detail{display:none}
 .chapter[data-composition] .scene-copy h1,.chapter[data-composition] .scene-copy h2{
  font-size:clamp(40px,3.35vw,52px);line-height:1.08;margin-inline:0;
 }
 .chapter[data-composition] .eyebrow{margin-bottom:20px}
 .chapter .next{bottom:88px}
 .engineering .annotation{font-size:12px;letter-spacing:.02em;fill:#f4f6f4;stroke:none}
 .engineering .leader{stroke:#ffffff8c;stroke-opacity:1}
 .engineering .endpoint.start{fill:#e3b363}
 .callout-glass{width:100%;height:100%;box-sizing:border-box;border:var(--callout-unit,1px) solid rgba(255,255,255,.22);border-radius:calc(5 * var(--callout-unit,1px));background:rgba(9,26,20,.92)}
 /* Motion round 2: the pill sat over a canvas that repaints every frame, so its backdrop blur (at .88 fill, 12% of the photo showing) re-ran every frame for every visible label. A .92 fill without the blur reads the same and costs nothing. */
 .callout-ring{fill:rgba(8,22,17,.55);stroke:none}
}
/* Desktop pacing: each still gets less than half a screen; dives own their duration.
   The first section includes the half-screen used by midpoint scene selection. */
@media(min-width:701px){
 :is(.living-ready,:where(.living-layout) body) .chapter[data-composition]{height:45vh;scroll-margin-top:calc(50vh - 24px)}
 :is(.living-ready,:where(.living-layout) body) .chapter[data-composition]:first-of-type{height:90vh}
 .living-stage canvas,.chapter .plate picture,.dive-stage canvas{mask-image:none}
 body:has(.chapter){--chapter-scrim:radial-gradient(ellipse 600px 320px at 100px calc(100% - 115px),#0c1f1aeb 0%,#0c1f1ab3 40%,#0c1f1a00 100%)}
 .engineering[data-composition=result] .trace[data-desktop-label],.chapter[data-composition=result] .trace[data-desktop-label]{display:block}
 /* Expose the transformer radiator callout on desktop; phone details stay sparse. */
 .engineering[data-composition=detail] .trace[data-desktop-label="Radiatory"],.chapter[data-composition=detail] .trace[data-desktop-label="Radiatory"]{display:block}
 /* Contact is one natural screen, with no empty closing scroll beyond its content. */
 .contact{min-height:100vh;padding-bottom:32px}
}

/* Desktop callouts and the final scene occupy their own visual space. */
@media(min-width:701px){
 .engineering[data-composition] .annotation,.chapter .engineering .annotation{fill:#F4F7F5;font-size:14px;font-weight:500}
 .engineering .leader{stroke-width:1.5px}
 .engineering .endpoint.start{fill:#fff}
 /* The result uses the same beat as the other stills. The extra quarter-screen
    here used to extend the document after the final scene had settled. */
 :is(.living-ready,:where(.living-layout) body) .chapter[data-composition]:has(+ .contact){height:45vh}
 /* The contact surface enters only in the final quarter-screen of scrolling. */
 :is(.living-ready,:where(.living-layout) body) .contact{margin-top:-25vh;opacity:var(--contact-progress,0)}
 /* GPU-CHECK (2026-11-07, real M2 GPU): at opacity 0 and visibility hidden the 2560 px contact photo was never painted
    ahead, so every arrival at contact decoded (~24 ms) and rasterised it inside that frame: a 30-50 ms stall each visit.
    The decorative photo stays painted under a 0.2% opacity floor (under one colour level), so the compositor keeps it
    decoded and rasterised; the text and links stay hidden until at-contact. */
 :is(.living-ready,:where(.living-layout) body) .contact{opacity:max(var(--contact-progress,0),.002)}
 :is(.living-ready,:where(.living-layout) body) .contact .contact-photo{visibility:visible}
 .living-ready.at-contact .living-stage{display:block}
 :is(.living-ready,:where(.living-layout) body).at-contact .chapter .next{visibility:hidden}
}

/* Fine dark edges keep desktop leaders readable on pale equipment and concrete. */
@media(min-width:701px){
 .engineering .leader,.dive-labels path{filter:drop-shadow(0 0 1px rgba(10,24,19,.85)) drop-shadow(0 1px 1px rgba(10,24,19,.55))}
 .engineering .endpoint.start,.dive-labels circle:not(.callout-ring){stroke:rgba(10,24,19,.65);stroke-width:1px;vector-effect:non-scaling-stroke;paint-order:stroke}
 /* The email underline starts the group; one rule below the disclosure ends it. */
 .contact .email{border-color:#ced6c840}
 .contact .prepare{border-top:0;border-bottom:1px solid #ced6c840;padding-top:0;padding-bottom:12px}
}

/* Motion round 3: dead scroll at chapter ends. html.living-layout (chapter-open.js, desktop, motion allowed) gives the
   sections their compact depth-stage geometry from the first paint, so the document is the same height before and
   after the stage arrives and ends exactly when the contact is fully in (before: 6 full screens until living-ready,
   then 2 screens less). Until the stage arrives, and for good if it never does, each section's own plate and labels
   stand in for it: fixed to the viewport, the plate of the section under the reader's midline shown (the first one, or
   the hash target, before the engine has chosen), dissolving on the site curve, framed exactly like the stage's first
   frame (position, framing x 1.035) so the handoff to the depth picture does not move. */
@media(min-width:701px){
 .living-layout body:not(.living-ready) .chapter .plate,.living-layout body:not(.living-ready) .chapter>.engineering{position:fixed;inset:0;pointer-events:none}
 .living-layout body:not(.living-ready) .chapter .plate img{object-position:var(--position) var(--vertical);transform:scale(calc(var(--framing) * 1.035));transform-origin:var(--position) var(--vertical)}
 .living-layout body:not(.living-ready) .chapter :is(.plate,.scene-copy,.scene-shade,.next),.living-layout body:not(.living-ready) .chapter>.engineering{opacity:0;visibility:hidden;transition:opacity var(--eve-fade) var(--eve-ease),visibility 0s var(--eve-fade)}
 .living-layout body:not(.living-ready) .chapter :is(.scene-copy,.next){pointer-events:none}
 .living-layout body:not(.living-ready) .chapter.entered .plate,.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered,>.chapter:target))>.chapter:first-of-type .plate,.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered))>.chapter:target .plate,.living-layout body:not(.living-ready) .chapter.entered.projected>.engineering,.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered,>.chapter:target))>.chapter:first-of-type.projected>.engineering,.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered))>.chapter:target.projected>.engineering,.living-layout body:not(.living-ready) .chapter.entered :is(.scene-copy,.scene-shade,.next),.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered,>.chapter:target))>.chapter:first-of-type :is(.scene-copy,.scene-shade,.next),.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered))>.chapter:target :is(.scene-copy,.scene-shade,.next){visibility:visible;transition:opacity var(--eve-fade) var(--eve-ease)}
 .living-layout body:not(.living-ready) .chapter.entered .plate,.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered,>.chapter:target))>.chapter:first-of-type .plate,.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered))>.chapter:target .plate{opacity:1}
 .living-layout body:not(.living-ready) .chapter.entered :is(.scene-copy,.scene-shade,.next),.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered,>.chapter:target))>.chapter:first-of-type :is(.scene-copy,.scene-shade,.next),.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered))>.chapter:target :is(.scene-copy,.scene-shade,.next),.living-layout body:not(.living-ready) .chapter.entered.projected>.engineering,.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered,>.chapter:target))>.chapter:first-of-type.projected>.engineering,.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered))>.chapter:target.projected>.engineering{opacity:calc(1 - var(--contact-progress,0))}
 .living-layout body:not(.living-ready) .chapter.entered :is(.scene-copy,.next),.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered,>.chapter:target))>.chapter:first-of-type :is(.scene-copy,.next),.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered))>.chapter:target :is(.scene-copy,.next){pointer-events:auto}
 .living-layout body:not(.living-ready).at-contact .chapter .next{visibility:hidden;pointer-events:none}
 /* A static label's pill and ring arrive with its text and leader (they showed 0.8 s before them, an empty box). */
 .js-motion .chapter>.engineering .trace :is(.callout-pill,.callout-ring){opacity:0}
 .js-motion .chapter.entered>.engineering .trace :is(.callout-pill,.callout-ring){animation:label-in var(--m-label-in) calc(var(--m-label-gap) * 1.5) var(--m-ease-out) both}
}

/* PERF1: the stand-in plates above are all fixed to the viewport, so to the browser every section's lazy photograph was on
   screen and all five downloaded in the first second and a half, sharing a slow line with the hero plate and its depth map.
   A plate that is neither shown nor next in line now waits one fade, then steps far off to the side (translate, not
   transform, which frames the picture): hidden either way, but its lazy image is no longer in view, so it loads when its
   neighbour is shown (or when the depth stage asks for it). Shown plates and their next neighbours stay in place. */
@media(min-width:701px){
 .living-layout body:not(.living-ready) .chapter .plate{translate:-600vw 0;transition:opacity var(--eve-fade) var(--eve-ease),visibility 0s var(--eve-fade),translate 0s var(--eve-fade)}
 .living-layout body:not(.living-ready) .chapter.entered .plate,.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered,>.chapter:target))>.chapter:first-of-type .plate,.living-layout body:not(.living-ready) main:not(:has(>.chapter.entered))>.chapter:target .plate{translate:none;transition:opacity var(--eve-fade) var(--eve-ease)}
 .living-layout body:not(.living-ready) :is(.chapter.entered,main:not(:has(>.chapter.entered,>.chapter:target))>.chapter:first-of-type,main:not(:has(>.chapter.entered))>.chapter:target)+.chapter .plate{translate:none}
}

/* PACE15: a continuous desktop falloff, including close-ups behind the navigation. */
@media(min-width:801px){
 body:has(.chapter) .masthead::after{height:150px;background:linear-gradient(180deg,rgba(8,30,22,.78) 0%,rgba(8,30,22,.69) 20%,rgba(8,30,22,.48) 40%,rgba(8,30,22,.25) 60%,rgba(8,30,22,.07) 80%,rgba(8,30,22,0) 100%)}
}

/* PACE16: one contact column and a plain dark track behind the desktop step rail. */
@media(min-width:701px){
 .contact .email,.contact .prepare{width:min(790px,100%);max-width:790px;box-sizing:border-box}
 .contact .prepare summary{width:100%;justify-content:space-between}
 body>.scene-nav{padding:6px;border-radius:999px;background:rgba(9,24,19,.6)}
}

/* PACE18: corner-anchored shade belongs below the callouts, on the image layer. */
@media(min-width:701px){
 body:has(.chapter){--chapter-scrim:radial-gradient(ellipse 900px 500px at 0% 100%,rgba(13,17,16,.9) 0%,rgba(13,17,16,.82) 40%,rgba(13,17,16,.68) 55%,rgba(13,17,16,.3) 75%,rgba(13,17,16,0) 100%)}
 /* Keep the visible next control above later, transparent section hit areas. */
 .living-ready .chapter.photo-visible{z-index:1}
 .chapter[data-composition] .scene-copy::before{display:none}
 .scene-copy{text-shadow:0 2px 18px rgba(5,14,11,.75),0 1px 3px rgba(5,14,11,.9)}
 body:has(.chapter) .masthead::after{
  height:120px;background:linear-gradient(180deg,rgba(13,17,16,.88),rgba(13,17,16,.68) 55%,rgba(13,17,16,0));
 }
 .chapter .next,.scene-nav{background:rgba(13,17,16,.72)}
}

/* PACE19: desktop end caps share the home closing scale and protect the contact column. */
@media(min-width:801px){
 .contact h2{max-width:620px}
 .contact .email{width:max-content;max-width:100%;font-size:clamp(26px,2vw,34px);gap:18px;margin:24px 0 28px}
 .contact .prepare{width:min(620px,100%);max-width:620px}
 .contact::before{background:linear-gradient(90deg,rgba(12,35,30,.96),rgba(12,35,30,.92) 62%,rgba(12,35,30,.78))}
 .contact .other-chapters{gap:16px;flex-wrap:wrap;margin:28px 0}
 .contact .other-chapters a{display:flex;align-items:center;justify-content:space-between;min-width:180px;min-height:48px;padding:14px 18px;border:1px solid rgba(244,246,244,.14);background:rgba(12,35,30,.88)}
 .contact .other-chapters a:is(:hover,:focus-visible){border-color:var(--gold)}
 body>.scene-nav,.chapter .next{background:rgba(12,35,30,.88);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
 body>.scene-nav a{background:transparent}
}

/* PACE20: align the existing leader endpoint (baseline + 8) with the pill centre.
   Manrope 14px has a 19px SVG box, centred 5.5px above its baseline. Offsets in
   the chapter HTML leave a horizontal run outside the pill before the 45deg bend.
   The explicit horizontal mode ends at baseline - 4 instead. Anchors stay put. */
@media(min-width:801px){
 .engineering .trace :is(.annotation,.callout-pill){translate:0 13.5px}
 .engineering .trace[data-desktop-leader="horizontal"] :is(.annotation,.callout-pill){translate:0 1.5px}
 .engineering .leader,.dive-labels g path{
  stroke:#f2dfb9;stroke-opacity:1;stroke-width:1px;
  filter:drop-shadow(.75px 0 0 rgba(10,26,21,.75)) drop-shadow(-.75px 0 0 rgba(10,26,21,.75)) drop-shadow(0 .75px 0 rgba(10,26,21,.75)) drop-shadow(0 -.75px 0 rgba(10,26,21,.75));
 }
 .engineering .callout-ring,.dive-labels .callout-ring{fill:rgba(10,26,21,.85);stroke:#e2c687;stroke-width:1.5px;vector-effect:non-scaling-stroke}
 .engineering .endpoint.start,.dive-labels g circle:not(.callout-ring){fill:rgba(10,26,21,.85);stroke:none}
 .contact .email,.contact .prepare,.contact .other-chapters{width:min(620px,100%);max-width:620px}
 .contact .email{justify-content:space-between}
 .contact .other-chapters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));row-gap:14px}   /* FOUR: three other scopes, film order on every page */
 .contact .other-chapters a{min-width:0;white-space:nowrap}
 /* POLISH 2 (judges, 2026-11-19): „Strona główna” wrapped in a quarter-width box; it is the way out, not a fourth scope, so
    it is a quiet line under the three boxes, its arrow beside it. */
 .contact .other-chapters a[href="../"]{grid-column:1/-1;justify-self:start;justify-content:flex-start;gap:0;min-height:0;padding:6px 0;border:0;background:none;color:var(--muted,#b9c4bd)}
 .contact .other-chapters a[href="../"]:is(:hover,:focus-visible){color:var(--gold)}
 .contact .contact-accent{display:block;color:#e2c687}
 .contact::before{background:linear-gradient(90deg,rgba(10,28,22,.96) 0%,rgba(10,28,22,.96) 46%,rgba(10,28,22,.62) 70%,rgba(10,28,22,.62) 100%)}
}

/* PACE21: keep the arrow with the address while the divider spans the column. */
@media(min-width:801px){.contact .email{justify-content:flex-start;gap:16px}}

/* PACE22: feather from the frame corner, below the callouts, without a local patch. */
@media(min-width:801px){
 body:has(.chapter){--chapter-scrim:radial-gradient(ellipse 900px 560px at 0% 100%,rgba(10,26,21,.94) 0%,rgba(10,26,21,.9) 40%,rgba(10,26,21,.76) 55%,rgba(10,26,21,.36) 75%,rgba(10,26,21,0) 100%)}
}

/* ROUND 8 (ART-fable8 subpages 2): the bands as static images, no live gradient over the picture on desktop. The same
   900 x 560 corner ellipse and 120 px masthead ramp, written once by tools/make-bands.py and drawn at the same size and anchor. */
@media(min-width:801px){
 body:has(.chapter){--chapter-scrim:url(/assets/chapters/scrim.webp) left bottom / 900px 560px no-repeat}
 body:has(.chapter) .masthead::after{background:url(assets/chapters/band-top.webp) 0 0 / 100% 120px no-repeat}
}

/* AUTO: the chapter unravels by itself (chapters/autoplay.js). The timeline writes the scroll position; the reader steps
   with the dots, keys and one gesture per step, so the page itself never scrolls (no scrollbar). The closer scrolls again. */
@media(min-width:701px){
 html.chapter-auto:not(.chapter-free){overflow:hidden;overscroll-behavior:none}
 html.chapter-auto .scene-nav .chapter-toggle{margin:10px 0 0;justify-self:center}
 /* the active dot fills as its step comes along (rest, or the dive's playback and rest) */
 html.chapter-auto .scene-nav a{position:relative}
 html.chapter-auto .scene-nav a[aria-current]{border-right-color:#dec38c4d}
 html.chapter-auto .scene-nav a::after{content:"";position:absolute;right:-2px;top:0;bottom:0;width:2px;background:var(--gold);transform:scaleY(var(--step-progress,0));transform-origin:top;opacity:0;pointer-events:none}
 html.chapter-auto .scene-nav a[aria-current]::after{opacity:1}
}

/* ROUND 8 (ART-fable8 subpages 4): a label is a solid dark box with a 1 px gold rule, like the home schedule's cards
   (round 2's .92 glass let a cream picture through: "a translucent grey box over cream, low contrast"). */
/* LIVE1 (ART-fable-live1 2): the same chip at every width (the phone had .92 glass on the dives and no chip at all on the
   tours' labels). */
.callout-glass{width:100%;height:100%;box-sizing:border-box;border:var(--callout-unit,1px) solid #dec38c2e;border-top-color:var(--gold);border-radius:calc(2 * var(--callout-unit,1px));background:#0a1c17}
.callout-ring{fill:rgba(10,26,21,.85);stroke:none}
@media(max-width:700px){
 .engineering .trace .annotation{font-size:11px;letter-spacing:.02em;fill:#f4f6f4;stroke:none}
}

/* ROUND 8 (ART-fable8 subpages 5): the poster before the depth stage starts on the same service crop as the stage's
   intro (living-engine.js INTRO: the focus --fx,--fy in plate px at the frame's centre, INTRO_ZOOM 1.25). The poster shows
   the frame the stage computes (cover, then framing x 1.035 about the object position), so the crop is that frame
   scaled 1.25 about the screen point S(P) and moved to the centre: translate(centre - 1.25 S(P)) scale(1.25). */
@media(min-width:701px){
 html.chapter-intro body:not(.living-ready) .chapter[data-intro-focus] .plate picture{
  --s:calc(max(100vw / 1400, 100vh / 788) * var(--fk,1) * 1.035);
  transform-origin:0 0;
  transform:translate(calc(50vw - 1.25 * (100vw * var(--pk) + var(--s) * (var(--fx) - 1400 * var(--pk)))),calc(50vh - 1.25 * (100vh * var(--vk) + var(--s) * (var(--fy) - 788 * var(--vk))))) scale(1.25)}
 html.chapter-intro body:not(.living-ready) .chapter[data-intro-focus]>.engineering{visibility:hidden}
}

/* CRISP 5 (ART-fable-bright2 5; Stan 2026-11-10: "light, colourful and very crisp"): the chapter title stands on a title
   plate. The corner scrim (a 900 x 560 px ellipse of dark from the bottom-left corner, 35 % of the frame for two lines of
   type) is gone from the living stage, the plates and the dives; the title block carries one opaque plate in the shell's
   green with hard edges, docked in the corner, just larger than its words. The type sits on it without a shadow. The
   masthead's band reaches a third less far (120 -> 84 px): dense where the logo and the navigation's words are, gone
   below them. (At half, 60 px, the logo's lower line and the navigation stood on bare bone-white frames, unreadable.) */
@media(min-width:801px){
 body:has(.chapter){--chapter-scrim:none}
 body:has(.chapter) .chapter[data-composition] .scene-copy{width:max-content;max-width:min(560px,44vw);text-shadow:none}
 body:has(.chapter) .chapter[data-composition] .scene-copy::before{content:"";display:block;position:absolute;z-index:-1;pointer-events:none;left:-64px;right:-44px;top:-30px;bottom:-88px;width:auto;height:auto;background:#0e251e;border:1px solid #dec38c33;border-left:0;border-bottom:0}
 body:has(.chapter) .masthead::after{height:84px;background:linear-gradient(180deg,rgba(13,17,16,.9) 0%,rgba(13,17,16,.84) 66%,rgba(13,17,16,0) 100%)}
}
/* DIO: a scene's diorama film (chapters/film-plate.js) in its plate's rectangle, over the canvas, under the shade and labels.
   Its box and opacity are written by the module on the engine's frame; nothing here animates. */
.living-stage .film-plate{position:absolute;overflow:hidden;visibility:hidden;opacity:0;contain:strict}
.living-stage .film-plate-video{position:absolute;display:block;object-fit:cover;background:transparent}
.living-stage .film-plate-hold{inset:0}
/* HOLD (2026-11-19, Fable audit 2): under an evolving film, the last frame it showed (held across a cut) and the chapter's
   still (the deed's first frame), dissolving in over it in 360 ms while the new part loads. The video covers both from its
   first frame; the picture is never blank. */
.living-stage .film-plate :is(.evo-held,.evo-still){position:absolute;display:block;object-fit:cover;pointer-events:none}
.living-stage .film-plate .evo-held{opacity:0}
.living-stage .film-plate .evo-still{opacity:0;transition:opacity 360ms var(--m-ease-out,ease-out)}
.living-stage .film-plate .evo-still.on{opacity:1}
.living-stage .film-plate .film-plate-video{z-index:1}
@media(prefers-reduced-motion:reduce){.living-stage .film-plate .evo-still{transition:none}}
