@font-face{font-family:Adwaita;src:url(fonts/AdwaitaSans-Regular.ttf) format("truetype");font-weight:100 900;font-style:normal;font-display:block}
*{box-sizing:border-box} :root{--brand:#122a36;--olive:#02737f;--sage:#c9e6e7;--ink:#122a36;--paper:#ffffff;--muted:#526173;--line:#d9e0e7;--focus:#f5b400;--surface:#eef2f3;--danger:#8a1c12;--radius:.5rem;--scroll-thumb:#68705a;--scroll-track:#eef2f3;--scroll-hover:#30205f}
*{scrollbar-color:var(--scroll-thumb) var(--scroll-track);scrollbar-width:thin}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:var(--scroll-track)}::-webkit-scrollbar-thumb{background:var(--scroll-thumb);border-radius:5px}::-webkit-scrollbar-thumb:hover,::-webkit-scrollbar-thumb:active{background:var(--scroll-hover)}
body{margin:0;font:16px/1.5 Adwaita,system-ui,sans-serif;color:var(--ink);background:#1d1830}[hidden]{display:none!important}button,select,input{font:inherit}button,select,summary,input[type=range]{cursor:pointer}button{border:1px solid transparent;border-radius:var(--radius);padding:.6rem 1rem;background:var(--brand);color:var(--paper);font-weight:650;min-height:44px;transition:background .15s,box-shadow .15s}button:hover:not(:disabled){box-shadow:inset 0 0 0 2px var(--sage)}button:active:not(:disabled){transform:translateY(1px)}button:disabled{opacity:.45;cursor:not-allowed}button.secondary{background:var(--paper);border-color:var(--line);color:var(--brand)}:focus-visible{outline:3px solid var(--focus);outline-offset:3px}.skip{position:absolute;left:-999px}.skip:focus{left:1rem;top:1rem;z-index:60;background:var(--paper);padding:.7rem}

.screen{height:100%;position:relative;animation:slide-enter .22s ease-out}.screen-title{font-size:clamp(22px,calc(3*var(--u)),36px);line-height:1.15;margin:0 0 1rem}.screen:has(.slide-canvas)>.screen-title{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}.slide-canvas{height:100%;width:fit-content;max-width:100%;margin:auto;position:relative}.slide-canvas>img{border-radius:6px;box-shadow:0 10px 28px #0005;display:block;height:100%;width:auto;max-width:100%;object-fit:contain}.screen.assessment{background:var(--paper);border-radius:6px;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(300px,1fr);gap:16px;padding:20px}.screen.assessment>.slide-canvas{height:auto;align-self:center;width:100%}.screen.assessment>.slide-canvas>img{width:100%;height:auto;max-height:calc(100cqh - 40px)}[data-assessment]{align-self:center;max-height:100%;overflow:auto;scrollbar-gutter:stable;padding:8px 12px 8px 0}.screen:not(:has(.slide-canvas)){background:var(--paper);padding:calc(3*var(--u));overflow:auto}.content-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.content-grid.no-image{grid-template-columns:1fr}.content-grid>img{width:100%;max-height:340px;object-fit:contain}.screen audio{display:none}fieldset{border:0;margin:0;padding:0}legend{font-weight:700;line-height:1.4;font-size:clamp(15px,calc(1.6*var(--u)),20px);margin-bottom:10px}.option{display:flex;align-items:start;gap:10px;border:1px solid var(--line);border-radius:var(--radius);padding:10px 12px;margin:8px 0;cursor:pointer;font-size:clamp(14px,calc(1.35*var(--u)),17px)}.option:hover{border-color:var(--brand)}.option:has(input:checked){border-color:var(--brand);background:#f3f0f8}.option input{accent-color:var(--brand);margin-top:5px}form>button{margin-top:8px}ul{padding-left:1.3rem}.actions{display:flex;gap:12px;justify-content:center;margin-top:24px}.eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.15em;color:var(--olive);font-weight:750}
.transcript,.accessible-text{display:none;position:absolute;z-index:12;top:0;right:0;bottom:0;width:min(440px,90%);max-height:100%;overflow:auto;background:var(--paper);color:var(--ink);padding:24px;box-shadow:-12px 0 40px #0004;animation:slide-enter .2s ease-out}.transcript[open],.accessible-text[open]{display:block}.transcript summary,.accessible-text summary{display:block;font-size:20px;font-weight:700;pointer-events:none;list-style:none}.transcript p,.accessible-text ul,.accessible-text ol{margin:18px 0;line-height:1.7;font-size:16px}.close-panel{position:sticky;bottom:0;margin-top:20px}.transcript summary::-webkit-details-marker,.accessible-text summary::-webkit-details-marker{display:none}.caption-overlay{position:absolute;z-index:5;bottom:16px;left:50%;transform:translateX(-50%);width:max-content;max-width:80%;background:#172033ee;color:white;text-align:center;padding:8px 16px;border-radius:4px;font-size:clamp(14px,calc(1.7*var(--u)),22px);line-height:1.4;pointer-events:none;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;max-height:calc(2.8em + 16px)}.stage:has(.screen.assessment:not([hidden])) .caption-overlay{left:28%;max-width:48%;font-size:clamp(13px,calc(1.5*var(--u)),20px)}


.start-cover{position:fixed;inset:0;z-index:50;display:flex;flex-direction:column;padding:clamp(24px,5vw,72px);background:linear-gradient(90deg,#191229f5 0%,#211633ce 44%,#21163330 100%),var(--cover-photo) center/cover,var(--brand);color:var(--paper);overflow:auto}.cover-brand{font-size:14px;letter-spacing:.06em;font-weight:700}.brand-logo{width:150px;height:auto;border-radius:4px;background:var(--paper)}.cover-main{flex:1;display:grid;grid-template-columns:minmax(0,900px);align-items:center;gap:6vw;max-width:1440px;width:100%;margin:auto}.cover-kicker{color:var(--sage);text-transform:uppercase;letter-spacing:.2em;font-size:12px;font-weight:700}.cover-main h1{font:650 clamp(36px,5vw,78px)/1.04 Adwaita,system-ui,sans-serif;max-width:750px;margin:18px 0 24px;letter-spacing:-.035em}.cover-facility{font-size:20px;color:#ece9f4}.cover-main button{margin-top:20px;background:var(--sage);color:var(--brand);padding:16px 24px;min-width:190px;text-align:left}.cover-main button span{float:right;margin-left:32px}.cover-hint{font-size:13px;max-width:340px;color:#ece9f4;margin-top:18px}.cover-footer{display:flex;justify-content:space-between;border-top:1px solid #ffffff33;padding-top:20px;font-size:12px;color:#ece9f4}.results{--result-color:var(--danger);background:var(--paper);border-radius:6px;height:100%;overflow:auto;text-align:center;padding:clamp(24px,calc(4*var(--u)),48px);display:flex}.results.passed{--result-color:var(--olive)}.result-body{margin:auto;width:100%}.score-ring{--score:0%;font-size:44px;border-radius:50%;height:156px;width:156px;margin:20px auto;display:grid;place-items:center;background:radial-gradient(closest-side,var(--paper) 84%,transparent 85%),conic-gradient(var(--result-color) var(--score),var(--line) 0);color:var(--result-color);transition:--score 1s ease-out}#result-status{max-width:600px;margin:12px auto}#objective-summary{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:20px auto;font-size:13px}.objective-result{padding:10px 16px;background:var(--surface);border-radius:var(--radius)}.objective-result strong{display:block}.explore-status{position:absolute;bottom:8px;left:12px;font-size:12px;background:var(--paper);padding:4px 8px}.screen [data-reveal]{position:absolute;bottom:20px;right:20px}.screen .explore-dialog{position:absolute;z-index:10;inset:15% 20%;max-width:none;overflow:auto;margin:0;height:fit-content;max-height:70%}
@keyframes slide-enter{from{opacity:.5;transform:translateY(5px)}to{opacity:1;transform:none}}@media(max-width:1000px){.screen.assessment{gap:10px;padding:12px;grid-template-columns:1fr 1fr}}@media(max-width:700px){.cover-main{grid-template-columns:1fr}.cover-emblem{display:none}.cover-footer{gap:20px}.screen.assessment{grid-template-columns:1fr 1fr}.screen.assessment .option{font-size:12px;padding:5px}.screen.assessment legend{font-size:13px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media(forced-colors:active){*{scrollbar-color:auto}.score-ring{border:4px solid CanvasText}.caption-overlay{border:1px solid CanvasText}}

input[type=range]{appearance:none;height:4px;background:linear-gradient(to right,var(--brand) var(--position,0%),var(--line) var(--position,0%));border-radius:4px}input[type=range]::-webkit-slider-thumb{appearance:none;width:14px;height:14px;border-radius:50%;background:var(--brand);box-shadow:0 0 0 3px #30205f18}input[type=range]::-moz-range-thumb{width:14px;height:14px;border:0;border-radius:50%;background:var(--brand)}

.feedback:empty{display:none}

@property --score{syntax:"<percentage>";inherits:false;initial-value:0%}.objective-result[data-objective-status=passed]{border:1px solid var(--olive)}.objective-result[data-objective-status=failed]{border:1px solid var(--danger)}.objective-result[data-objective-status=passed] span{color:#435037}.objective-result[data-objective-status=failed] span{color:var(--danger)}.results #result-status{color:var(--result-color);font-weight:600}


/* Bound assessments to the stage: long forms scroll inside a visible framed pane. */
.screen.assessment{grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);grid-template-rows:minmax(0,1fr);align-items:center;gap:calc(2*var(--u));padding:calc(2*var(--u))}
.screen.assessment>[data-assessment]{min-height:0;min-width:0;max-height:100%;width:100%;align-self:stretch;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;scrollbar-gutter:stable;scrollbar-width:auto;border:1px solid var(--line);border-top:4px solid var(--sage);border-radius:6px;background:var(--surface);padding:calc(1.5*var(--u));overscroll-behavior:contain}
.screen.assessment>[data-assessment]>form{margin-block:auto;flex:none;min-width:0;width:100%}
.screen.assessment fieldset{min-width:0}
.screen.assessment legend{font-size:clamp(14px,calc(1.65*var(--u)),21px);line-height:1.25;margin-bottom:calc(.8*var(--u))}
.screen.assessment .sequence-list{margin:calc(.6*var(--u)) 0;padding:0;list-style:none;counter-reset:sequence}
.screen.assessment .sequence-row{grid-template-columns:minmax(0,1fr) auto auto;gap:calc(.45*var(--u));margin:calc(.5*var(--u)) 0;padding:calc(.5*var(--u)) calc(.7*var(--u));line-height:1.2;font-size:clamp(13px,calc(1.4*var(--u)),18px);counter-increment:sequence}
.screen.assessment .sequence-row>span:before{content:counter(sequence) ". ";font-weight:700}
.screen.assessment .sequence-row button{padding:calc(.4*var(--u)) calc(.5*var(--u));min-height:32px;font-size:clamp(11px,calc(1.1*var(--u)),14px);white-space:nowrap}
.screen.assessment .option{padding:calc(.8*var(--u));margin:calc(.7*var(--u)) 0;line-height:1.3}
.screen.assessment .match-board{gap:calc(.7*var(--u));margin:calc(.7*var(--u)) 0}
.screen.assessment .match-card,.screen.assessment .match-target{padding:calc(.65*var(--u));font-size:clamp(13px,calc(1.4*var(--u)),18px);overflow-wrap:anywhere}
.screen.assessment .match-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:calc(.7*var(--u))}
.screen.assessment .match-row select{min-width:0}
.screen.assessment form>button[type=submit]{position:sticky;bottom:0;z-index:1;box-shadow:0 0 0 5px var(--surface);margin-top:calc(1*var(--u));min-height:40px}
.screen.assessment>.slide-canvas{width:100%;min-width:0;max-height:100%;height:auto}
.screen.assessment>.slide-canvas>img{max-height:calc(100cqh - calc(4*var(--u)));object-fit:contain}
.screen.assessment:has(.option){grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}
.screen.assessment .option{min-height:calc(7.5*var(--u));padding:calc(1.3*var(--u));font-size:clamp(14px,calc(1.8*var(--u)),22px);align-items:center}
.screen.assessment:has(.option) legend{font-size:clamp(16px,calc(2*var(--u)),24px)}





/* Native questions never share the stage with a source slide or answer key. */
.screen.assessment.native-assessment{display:flex;flex-direction:column;align-items:stretch;gap:calc(1*var(--u));padding:calc(2*var(--u)) calc(4*var(--u));overflow:hidden}
.screen.assessment.native-assessment>.screen-title{position:static;width:auto;height:auto;clip-path:none;overflow:visible;flex:none;font-size:clamp(19px,calc(2.4*var(--u)),30px);line-height:1.2;margin:0}
.screen.assessment.native-assessment>[data-assessment]{flex:1;min-height:0;padding:calc(1*var(--u)) calc(2*var(--u))}
.screen.assessment.native-assessment .option{min-height:0;padding:calc(1.2*var(--u));margin:calc(.8*var(--u)) 0;font-size:clamp(16px,calc(1.8*var(--u)),23px)}
.screen.assessment.native-assessment .sequence-row{padding:calc(.55*var(--u)) calc(.8*var(--u));margin:calc(.45*var(--u)) 0}

.screen.native-reveal{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:calc(2*var(--u))}
.screen.native-reveal [data-answer] .transcript{display:block;position:static;width:auto;box-shadow:none;padding:calc(1*var(--u))}
.screen.native-reveal [data-answer] .transcript summary{display:none}

.screen.assessment.native-assessment:has(.option)>[data-assessment]{background:transparent;border:0;padding:0;justify-content:center}
.screen.assessment.native-assessment:has(.option)>[data-assessment]>form{margin:0;display:flex;flex-direction:column;gap:calc(1*var(--u))}
.screen.assessment.native-assessment .option{background:var(--surface);border-left:4px solid var(--sage);padding:calc(2*var(--u));min-height:calc(7*var(--u))}
.screen.assessment.native-assessment:has(.option) form>button[type=submit]{align-self:flex-end;box-shadow:none;min-width:180px}
/* Native assessments use a content-sized card, with the question directly above. */
.screen.assessment.native-assessment{height:auto;max-height:100%;min-height:0;padding:calc(2*var(--u)) calc(3*var(--u));gap:calc(1.2*var(--u))}
.screen.assessment.native-assessment>[data-assessment]{flex:0 1 auto;width:100%;align-self:stretch;padding:0;overflow:auto}
.screen.assessment.native-assessment .feedback:empty{display:none}
.screen.assessment.native-assessment .match-board{margin:calc(.6*var(--u)) 0;gap:calc(1.5*var(--u))}
.screen.assessment.native-assessment .match-sources,.screen.assessment.native-assessment .match-targets{min-height:0;gap:calc(.6*var(--u))}

.screen.assessment.native-assessment.native-source-media{display:grid;height:100%;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:calc(2*var(--u))}
.native-source-media>.screen-title{grid-column:1/-1;grid-row:1}
.native-source-media>[data-assessment]{grid-column:1;grid-row:2;min-height:0}
.assessment-source-images{grid-column:2;grid-row:2;min-width:0;min-height:0;display:flex;flex-direction:column;gap:calc(1*var(--u));overflow:hidden}
.assessment-source-images>img{width:100%;min-height:0;flex:1;object-fit:contain}


.screen.assessment.native-assessment:has(.sequence-list)>[data-assessment]{background:transparent;border:0;flex:0 1 auto;height:auto;align-self:center;max-width:100%}
.screen.assessment.native-assessment:has(.sequence-list) form{height:auto;min-height:0}
.screen.native-reveal>.screen-title{font-size:clamp(32px,calc(7*var(--u)),88px);line-height:1.08;max-width:80%;text-align:center}

.screen.native-reveal:has([data-answer]:not([hidden]))>.screen-title{font-size:clamp(24px,calc(3.5*var(--u)),44px)}
.screen.native-reveal [data-answer]{max-width:86%;border-left:calc(.6*var(--u)) solid var(--sage);padding:calc(1*var(--u)) calc(2*var(--u));background:var(--surface)}
.screen.native-reveal .reveal-transcript p{font-size:clamp(20px,calc(2.8*var(--u)),36px);line-height:1.4;margin:0}

/* Player chrome (2026-10 layout): content first. A 40px status bar and a 48px
   playbar leave the rest of the viewport to a stage that fills it (no fixed
   16:9 canvas). Stage content sizes from --u, one hundredth of the stage's
   width or of the width a 16:9 canvas of the stage's height would have,
   whichever is smaller, so text scales to the space actually available while
   layouts use the stage's real aspect. */
.shell{height:100dvh;overflow:hidden}.course{height:100%;display:flex;flex-direction:column}
.status{flex:none;height:40px;display:flex;align-items:center;gap:8px;padding:0 14px 0 2px;position:relative;z-index:2;background:var(--paper);border-bottom:1px solid var(--line);font-size:13px;line-height:1.2}
.brand{display:flex;align-items:center;gap:10px;flex:1;min-width:0;font-weight:800;color:var(--brand)}.brand>span{color:var(--olive);font-weight:600}
.brand strong{font-weight:550;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.status .brand-logo{width:auto;height:26px;display:block;border-radius:2px}
#screen-count{flex:none;font-variant-numeric:tabular-nums;color:var(--muted);white-space:nowrap}
.progress{position:absolute;left:0;bottom:-1px;width:100%;height:3px;background:var(--line)}.progress span{display:block;background:var(--olive);height:100%;width:0;transition:width .25s}
.icon-button{width:40px;height:40px;min-width:40px;display:inline-flex;align-items:center;justify-content:center;padding:8px!important;flex:none}.icon-button svg{width:22px;height:22px;display:block}
.status #menu-toggle,.footer-nav .icon-button{color:var(--brand);background:transparent}
.status #menu-toggle[aria-expanded=true]{background:var(--surface)}
.course-body{flex:1;min-height:0;display:flex;position:relative}
.stage-wrap{flex:1;min-width:0;min-height:0;display:flex;justify-content:center;position:relative;padding:0;background:var(--surface)}
.stage{position:relative;flex:1;min-width:0;max-width:1720px;height:100%;outline:none;overflow:hidden;background:var(--paper);container-type:size;--u:min(1cqw,1.7778cqh)}
.stage:focus-visible{outline-offset:-3px}
/* Wide windows and tall tablets ( player.js sets .stage-scaled, --design-height and --stage-scale):
   the stage lays out at the approved design size, 1280 x 600-768 by aspect, centred in the wrap, and
   scales uniformly to fill it, so --u, clamps and every template render exactly as at the gate sizes,
   scaled up or down. The letterbox bands are the wrap's surface. The caption strip scales with the stage. */
.stage-wrap.stage-scaled{overflow:hidden;align-items:center}
.stage-wrap.stage-scaled>.stage{flex:none;width:1280px;max-width:none;height:var(--design-height,600px);transform:scale(var(--stage-scale,1));transform-origin:center center}
.stage-wrap.stage-scaled.caption-space{padding-bottom:calc(56px*var(--stage-scale,1))}
.stage-wrap.stage-scaled>.caption-overlay{bottom:calc(4px*var(--stage-scale,1));padding:calc(3px*var(--stage-scale,1)) calc(14px*var(--stage-scale,1));font-size:calc(16px*var(--stage-scale,1));max-height:calc(48px*var(--stage-scale,1));min-width:min(70%,calc(760px*var(--stage-scale,1)));max-width:min(94%,calc(1100px*var(--stage-scale,1)))}
/* Captions have their own strip under the stage, never painted over course content. */
.stage-wrap.caption-space{padding-bottom:56px}
.stage-wrap>.caption-overlay{bottom:4px;left:50%;transform:translateX(-50%);width:max-content;min-width:min(70%,760px);max-width:min(94%,1100px);text-align:center;padding:3px 14px;font-size:16px;line-height:1.3;max-height:48px;-webkit-line-clamp:2}
/* Outline: overlays the stage on small screens, docks beside it on wide ones. */
.rail{flex:none;position:relative;z-index:20;width:300px;background:var(--brand);color:var(--paper);padding:12px 12px 12px 16px;display:flex;flex-direction:column;min-height:0;border-right:4px solid var(--sage)}
.menu-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.menu-heading .icon-button{color:var(--paper);background:transparent;border:1px solid #ffffff55}
.rail nav{overflow:auto;min-height:0;scrollbar-color:var(--sage) transparent}.rail h2{font-size:12px;text-transform:uppercase;letter-spacing:.1em;color:var(--sage);margin:18px 0 6px}
.rail nav button{display:flex;gap:10px;text-align:left;width:100%;font-size:13px;line-height:1.3;padding:8px 10px;margin:2px 0;font-weight:500;min-height:36px}
.rail nav button[aria-current=step]{background:var(--paper);color:var(--brand)}.rail nav button.visited .nav-number:after{content:' ✓'}.nav-number{min-width:32px;font-variant-numeric:tabular-nums}
#menu-progress{font-size:13px;color:var(--sage);margin:6px 0 0}
@media(max-width:1099px){.rail{position:absolute;top:0;bottom:0;left:0;width:min(340px,88vw);box-shadow:12px 0 32px #17203355}}
/* Playbar: one 48px row. */
.footer-nav{flex:none;height:48px;position:relative;z-index:2;background:var(--paper);border-top:1px solid var(--line);display:flex;gap:12px;align-items:center;justify-content:space-between;padding:0 10px}
.media-controls,.narration-controls,.navigation-controls,.more-controls{display:flex;gap:4px;align-items:center}
.media-controls{flex:1;min-width:0}.narration-controls{flex:1;min-width:0}
#media-context{margin-right:auto;color:var(--muted);font-size:13px}
.footer-nav button{min-height:40px}
.media-controls button[aria-pressed=true]{background:var(--brand);color:var(--paper)}
#play-pause{width:40px}
.seek-control{display:flex;flex:1;align-items:center;gap:10px;min-width:90px}.seek-control #seek{flex:1;width:100%;min-width:50px;max-width:none;margin:0;accent-color:var(--brand)}
#audio-time{font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap;min-width:72px}
.volume-control{display:flex;align-items:center}#volume{width:64px;accent-color:var(--brand)}
.speed-control{position:relative}.speed-control #speed{border:0}
.speed-control #speed-value{position:absolute;right:0;bottom:0;font-size:10px;font-weight:700;background:var(--paper);color:var(--brand);pointer-events:none}
.speed-options{position:absolute;bottom:48px;right:0;z-index:30;width:132px;padding:8px;background:var(--paper);border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 30px #0004}
.speed-options button{width:100%;text-align:left;font-size:14px;min-height:36px;padding:.4rem .8rem;background:transparent;color:var(--brand)}
.speed-options button[aria-pressed=true]{background:var(--brand);color:var(--paper)}
#more-toggle{display:none}
.navigation-controls{gap:6px}#back,#next{width:44px;min-width:44px}#back{background:var(--paper);color:var(--brand);border-color:var(--line)}#next{background:var(--brand);color:var(--paper)}
.playback-notice{position:absolute;z-index:8;bottom:56px;left:16px;background:var(--paper);padding:8px 14px;border:1px solid var(--line);border-radius:var(--radius);font-size:13px;margin:0}
/* Short or narrow viewports: secondary controls move into one "More" menu. */
@media(max-height:699px),(max-width:699px){
 #more-toggle{display:inline-flex}
 .more-controls{display:none;position:absolute;right:62px;bottom:52px;z-index:30;flex-direction:column;align-items:stretch;gap:2px;min-width:220px;padding:8px;background:var(--paper);border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 30px #0004}
 .more-controls.open{display:flex}
 .more-controls .icon-button{width:100%;justify-content:flex-start;gap:12px;padding:8px 12px!important}
 .more-controls .icon-button .control-label{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto;white-space:nowrap;font-weight:550;font-size:14px}
 .more-controls .volume-control{padding:6px 12px;gap:12px}.more-controls .volume-control:before{content:"Volume";font-size:14px;font-weight:550;color:var(--brand)}.more-controls #volume{flex:1}
 .more-controls .speed-control #speed-value{position:static;margin-left:auto;font-size:13px;background:transparent;align-self:center}
 .more-controls .speed-control{display:flex;align-items:center}
 .more-controls .speed-options{position:static;width:auto;box-shadow:none;border:0;border-top:1px solid var(--line);border-radius:0;padding:4px 0 0;display:flex;flex-wrap:wrap;gap:4px}
 .more-controls .speed-options[hidden]{display:none!important}
 .more-controls .speed-options button{width:auto;flex:1;text-align:center;padding:.3rem .4rem}
 .more-controls .speed-control{flex-wrap:wrap}
}
@media(max-width:699px){
 .footer-nav{padding:0 4px;gap:4px}.media-controls,.narration-controls{gap:0}
 .footer-nav .icon-button{width:36px;min-width:36px;height:40px}#back,#next{width:40px;min-width:40px}
 .seek-control{flex-direction:column;align-items:stretch;justify-content:center;gap:0;min-width:64px}#audio-time{font-size:10px;min-width:0;text-align:center;line-height:1.1}
 .more-controls{right:4px}
 .status{padding:0 8px 0 0;gap:4px}.status .brand-logo{height:22px}.brand{gap:6px}.brand strong{font-size:12px}#screen-count{font-size:12px}
 .stage-wrap.caption-space{padding-bottom:48px}.stage-wrap>.caption-overlay{font-size:14px;bottom:3px;max-height:42px;min-width:0;max-width:96%}
 .transcript,.accessible-text{font-size:14px}
}
/* A source-slide question (legacy packages) splits the stage evenly with its form. */
.screen.assessment:has(>.slide-canvas):not(:has(.option)){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
/* Inside an LMS frame, Chamilo's viewer floats its own prev/next pill over the top-right corner; its
   hide_lp_arrow_navigation setting is ignored by Chamilo 3.0.1 (a JSON string where the provider expects an
   array), so the status bar leaves the pill room and the screen counter stays readable (2026-11-09). */
.framed .status{padding-right:104px}

/* A preview label belongs to the status row, never on top of course content. */
#offline-preview-label{flex:none;white-space:nowrap;font-size:12px;font-weight:650;color:var(--brand);padding:4px 8px;background:var(--surface);border-radius:4px}
#offline-preview-note{position:fixed;z-index:60;top:48px;right:12px;max-width:min(420px,calc(100vw - 24px));padding:12px 16px;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 4px 16px #0002;font-size:14px}
@media(max-width:600px){.offline-preview .status{height:auto;min-height:40px;flex-wrap:wrap;padding-bottom:4px}.offline-preview .status .brand{flex-basis:calc(100% - 60px)}#offline-preview-label{margin-left:8px}#offline-preview-note{top:80px}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.match-row{display:grid;grid-template-columns:minmax(12rem,1fr) minmax(14rem,1fr);gap:1rem;align-items:center;margin:.7rem 0}.match-row select{font:inherit;padding:.55rem;width:100%}.sequence-list{padding-left:1.8rem}.sequence-row{display:grid;grid-template-columns:1fr auto auto;gap:.5rem;align-items:center;border:2px solid var(--line);border-radius:.45rem;padding:.45rem .6rem;margin:.45rem 0}.sequence-row button{padding:.35rem .55rem}.hotspot-canvas{position:relative;width:min(100%,56rem);margin:1rem auto}.hotspot-canvas>img{display:block;width:100%;max-height:none}.hotspot-region{position:absolute;border:3px solid transparent;background:transparent;cursor:pointer}.hotspot-region:hover,.hotspot-region:focus-within{border-color:var(--focus);background:#f5b40033}.hotspot-region:has(input:checked){border-color:var(--focus);background:#f5b40055}.hotspot-region input{position:absolute;opacity:0}.match-board{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin:1rem 0}.match-sources,.match-targets{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.6rem;min-height:8rem}.match-card{border:2px solid var(--brand);background:#fff;border-radius:.45rem;padding:.55rem .7rem;cursor:grab}.match-card[aria-grabbed=true]{outline:3px solid var(--focus)}.match-target{border:2px dashed var(--line);border-radius:.45rem;padding:.55rem}.match-drop{min-height:2.4rem}.match-fallback{margin-top:.8rem}.feedback{margin-top:.8rem;padding:.7rem .85rem;border-radius:.4rem;border:2px solid var(--line)}.feedback.correct{border-color:var(--olive);background:#eef6ea}.feedback.incorrect{border-color:#8a1c12;background:#fdecea}.slide-canvas.explore-host{position:relative;display:inline-block;max-width:100%}.slide-canvas.explore-host>img{display:block}.explore-region{position:absolute;border:2px dashed #c47a0044;background:transparent;padding:0;overflow:visible;cursor:pointer}.explore-region:hover,.explore-region:focus{border-color:var(--focus);background:#f5b40033;outline:2px solid var(--focus)}.explore-region.visited{border-color:var(--olive)}.explore-marker{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:1.55rem;height:1.55rem;border-radius:50%;background:var(--brand);color:#fff;font:700 .8rem/1.55rem system-ui,sans-serif;text-align:center;pointer-events:none;box-shadow:0 1px 4px #15203a55}.explore-region.visited .explore-marker{background:var(--olive)}.explore-dialog{position:relative;margin:1rem auto;max-width:36rem;padding:1rem 1.2rem;border:3px solid var(--brand);background:#fff;box-shadow:0 8px 24px #15203a22}@media(max-width:760px){.match-row,.match-board{grid-template-columns:1fr}}
/* ScreenSpec owns the full stage; brand tokens remain in scorm_player.css. */
.screen.screen-spec{padding:0;background:var(--brand);overflow:hidden;border-radius:0}
.spec-content{height:100%;padding:calc(3.2*var(--u)) calc(4*var(--u)) calc(7*var(--u));color:var(--paper);display:flex;flex-direction:column;gap:calc(2.4*var(--u));overflow:hidden;background:linear-gradient(130deg,var(--brand) 45%,color-mix(in srgb,var(--brand) 75%,var(--olive)))}
.spec-heading{color:inherit;font:650 clamp(22px,calc(3.7*var(--u)),48px)/1.1 Adwaita,system-ui,sans-serif;letter-spacing:-.035em;margin:0;max-width:100%}
.spec-content p{margin:0;font-size:clamp(14px,calc(1.9*var(--u)),24px);line-height:1.45}
.spec-content h2{margin:0;font-size:clamp(14px,calc(1.95*var(--u)),25px);line-height:1.24;font-weight:650}
.spec-content [data-cue-target]{transition:opacity .4s ease,transform .4s ease;opacity:1;transform:none}
.spec-content .spec-pending{opacity:0;visibility:hidden;transform:translateY(14px);pointer-events:none}
.spec-icon{width:calc(2.8*var(--u));height:calc(2.8*var(--u));min-width:calc(2.8*var(--u));stroke-width:1.6;display:block}
.spec-image{max-width:100%;max-height:100%;object-fit:contain}
.spec-with-image{padding:0;display:grid;grid-template-columns:1fr 1fr;gap:0}
.spec-main{display:flex;flex-direction:column;gap:calc(2.5*var(--u));padding:calc(3*var(--u)) calc(3*var(--u)) calc(7*var(--u));min-height:0;min-width:0}
.spec-main .spec-heading{font-size:calc(3.2*var(--u))}
.spec-media{height:100%;overflow:hidden;background:var(--olive);display:flex;align-items:center}
.spec-media>.spec-image{height:100%;width:100%;object-fit:contain}
.spec-title_hero{position:relative;justify-content:center;padding:0;background:var(--brand)}
.spec-title_hero>.spec-image{position:absolute;right:0;top:0;width:65%;height:100%;object-fit:cover}
.spec-title_hero:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,var(--brand) 30%,transparent 72%);pointer-events:none}
.spec-hero-copy{position:relative;z-index:1;width:55%;padding:calc(4*var(--u)) calc(4*var(--u)) calc(8*var(--u));background:color-mix(in srgb,var(--brand) 94%,transparent);border-left:calc(.7*var(--u)) solid var(--sage)}
.spec-hero-copy .spec-heading{color:var(--paper);font-size:clamp(26px,calc(6.2*var(--u)),76px);letter-spacing:-.04em}
.spec-hero-copy p{color:var(--paper);margin-top:calc(3*var(--u));font-size:calc(2.2*var(--u))}
.spec-build_list:not(.spec-with-image){display:grid;grid-template-columns:29% minmax(0,1fr);gap:calc(4.5*var(--u));background:linear-gradient(90deg,var(--sage) 34%,var(--brand) 34%);align-items:center}
.spec-build_list:not(.spec-with-image)>.spec-heading{color:var(--brand);font-size:calc(4.2*var(--u));line-height:1.06}
.spec-list-layout{display:flex;align-items:center;flex:1;min-height:0}
.spec-list{padding:0;margin:0;list-style:none;flex:1;display:grid;gap:calc(1.3*var(--u))}
.spec-list li{font-size:clamp(14px,calc(1.75*var(--u)),23px);line-height:1.35;border-bottom:1px solid color-mix(in srgb,var(--sage) 45%,transparent);padding:calc(1.2*var(--u)) 0;display:flex;gap:calc(1.5*var(--u));align-items:start}
.spec-list .spec-icon{color:var(--sage);margin-top:calc(.2*var(--u))}
.spec-short .spec-list li{font-size:calc(3.8*var(--u));line-height:1.15;border:0;letter-spacing:-.025em}
.spec-short .spec-list .spec-icon{width:calc(4*var(--u));height:calc(4*var(--u));min-width:calc(4*var(--u))}
.spec-steps{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:1fr;gap:calc(2*var(--u));flex:1;min-height:0}
.spec-step{position:relative;display:flex;flex-direction:column;gap:calc(1.6*var(--u));border:1px solid var(--sage);padding:calc(1.5*var(--u));background:color-mix(in srgb,var(--paper) 8%,var(--brand));transition:opacity .4s,background .4s;min-width:0}
.spec-step-top{display:flex;justify-content:space-between;align-items:center;color:var(--sage)}
.spec-step-number{font-size:calc(4.4*var(--u));font-weight:650;letter-spacing:-.06em;font-variant-numeric:tabular-nums;line-height:1}
.spec-step .spec-icon{width:calc(3.5*var(--u));height:calc(3.5*var(--u))}
.spec-step:before{content:"";position:absolute;left:100%;top:35%;height:2px;width:calc(2*var(--u));background:var(--sage);transform-origin:left;transition:transform .6s ease}
.spec-step:nth-child(4n):before,.spec-step:last-child:before{display:none}
.spec-step:not(.spec-connector-ready):before{transform:scaleX(0)}
.spec-step.spec-future{border-color:color-mix(in srgb,var(--sage) 45%,transparent);background:color-mix(in srgb,var(--sage) 10%,var(--brand))}
.spec-step.spec-future .spec-step-top{opacity:.45}
.spec-step.spec-past{opacity:.75}
.spec-step.spec-current{background:var(--sage);color:var(--brand);border-color:var(--paper);box-shadow:0 0 0 2px var(--sage)}
.spec-step.spec-current .spec-step-top{color:var(--brand)}
.spec-step h2{font-size:calc(1.9*var(--u))}.spec-step p{font-size:calc(1.35*var(--u));margin-top:calc(.6*var(--u))}
.spec-with-image .spec-steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:calc(1*var(--u))}
.spec-with-image .spec-step{padding:calc(1*var(--u));gap:calc(.7*var(--u))}.spec-with-image .spec-step-number{font-size:calc(2.5*var(--u))}.spec-with-image .spec-step h2{font-size:calc(1.4*var(--u))}
.spec-compare_table{background:var(--sage);color:var(--brand)}
.spec-table{width:100%;border-collapse:collapse;font-size:clamp(12px,calc(1.65*var(--u)),21px);line-height:1.3;flex:1}
.spec-table th,.spec-table td{padding:calc(1.5*var(--u)) calc(1.3*var(--u));text-align:left;border-bottom:1px solid color-mix(in srgb,var(--brand) 25%,transparent);vertical-align:middle}
.spec-table thead{background:var(--brand);color:var(--paper)}.spec-table tbody th{font-weight:650;width:23%}
.spec-table tbody tr{background:color-mix(in srgb,var(--paper) 45%,var(--sage));transition:background .5s,opacity .4s}
.spec-table tbody tr:nth-child(even){background:color-mix(in srgb,var(--paper) 15%,var(--sage))}
.spec-table .spec-active-row{background:var(--paper)!important;outline:3px solid var(--olive);outline-offset:-3px;animation:spec-row-pulse 1.2s ease-out 1}
.spec-table .spec-highlight{border-left:4px solid var(--brand)}
.spec-number{display:inline-block;font-weight:650;font-variant-numeric:tabular-nums}
.spec-active-row .spec-number{animation:spec-number-roll .6s cubic-bezier(.2,.8,.2,1) both}
@keyframes spec-number-roll{from{transform:translateY(.5em);opacity:0}to{transform:none;opacity:1}}
@keyframes spec-row-pulse{50%{box-shadow:inset 0 0 0 4px var(--olive)}}
.spec-tabs-body{flex:1;display:flex;flex-direction:column;gap:calc(2*var(--u));min-height:0}
.spec-tabs-body [role=tablist]{display:flex;border-bottom:2px solid var(--sage);gap:calc(1*var(--u))}
.spec-tabs-body [role=tab]{background:transparent;color:var(--paper);border-radius:0;padding:calc(1.2*var(--u));font-size:calc(1.8*var(--u));border-bottom:3px solid transparent;flex:1}
.spec-tabs-body [role=tab][aria-selected=true]{border-color:var(--paper);background:var(--sage);color:var(--brand)}
.spec-tabs-body [role=tabpanel]{padding:calc(3*var(--u));background:var(--sage);color:var(--brand);flex:1;border-left:calc(.6*var(--u)) solid var(--paper)}
.spec-tabs-body p+p,.spec-accordion-copy p+p{margin-top:calc(1.8*var(--u))}
.spec-accordion-body{display:grid;align-content:start;gap:calc(1.2*var(--u));flex:1;min-height:0}
.spec-accordion-body details{border:1px solid var(--sage);border-radius:0;overflow:clip;background:color-mix(in srgb,var(--paper) 10%,var(--brand))}
.spec-accordion-body summary{padding:calc(1.5*var(--u)) calc(2*var(--u));color:var(--brand);font-size:calc(2.2*var(--u));font-weight:650;background:var(--sage);cursor:pointer;min-height:44px}
.spec-accordion-body summary:hover{background:var(--paper)}.spec-accordion-copy{padding:calc(1.5*var(--u)) calc(2*var(--u))}.spec-accordion-copy p{font-size:calc(1.8*var(--u))}
.spec-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(calc(20*var(--u)),1fr));gap:calc(2*var(--u));flex:1;min-height:0;align-items:stretch}
.spec-card{background:var(--sage);color:var(--brand);border:1px solid var(--paper);padding:calc(2.5*var(--u));display:flex;flex-direction:column;gap:calc(2*var(--u))}
.spec-flip{color:var(--brand);background:transparent;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:calc(1*var(--u));padding:calc(1*var(--u));font-size:calc(3.5*var(--u));line-height:1.1;flex:1;transition:background .3s,transform .3s}
.spec-flip[aria-expanded=true]{flex:0;background:var(--brand);color:var(--paper);font-size:calc(1.9*var(--u))}
.spec-flip-symbol{font-size:calc(3*var(--u))}.spec-card-back{animation:spec-card-turn .35s ease-out}.spec-card-back p{font-size:calc(2.2*var(--u))}
@keyframes spec-card-turn{from{opacity:0;transform:rotateY(-25deg)}to{opacity:1;transform:none}}
.spec-image_callouts{padding:0;background:var(--olive);position:relative;gap:0}
.spec-image_callouts>.spec-heading{position:absolute;top:0;left:0;right:0;z-index:1;padding:calc(1.6*var(--u)) calc(3*var(--u));background:var(--brand);font-size:calc(3*var(--u))}
.spec-callout-layout{display:flex;justify-content:center;align-items:center;flex:1;min-height:0;padding:calc(6*var(--u)) 0 calc(5*var(--u))}
.spec-callout-canvas{position:relative;max-height:100%;min-height:0;width:fit-content;max-width:100%;align-self:center;line-height:0}
.spec-callout-canvas>.spec-image{width:auto;max-width:100%;height:auto;max-height:calc(45*var(--u));object-fit:contain;display:block}
.spec-pin{position:absolute;transform:translate(-50%,-50%)!important;min-width:44px;min-height:44px;width:calc(4.5*var(--u));height:calc(4.5*var(--u));padding:0;border-radius:50%;border:3px solid var(--paper);box-shadow:0 2px 12px #0005;font-size:26px;line-height:1}
.spec-pin:hover,.spec-pin[aria-expanded=true]{background:var(--olive)}
.spec-callout-details{position:absolute;right:calc(2*var(--u));bottom:calc(8*var(--u));max-width:32%;background:var(--brand);border-left:calc(.5*var(--u)) solid var(--sage)}
.spec-callout-details:has(section:not([hidden])){padding:calc(2*var(--u))}
.spec-callout-details p{margin-top:calc(1.4*var(--u));font-size:calc(1.8*var(--u))}
.spec-definition{background:linear-gradient(110deg,var(--sage) 37%,var(--brand) 37%);color:var(--paper)}
.spec-definition>.spec-heading{color:var(--brand);max-width:33%;font-size:calc(3.1*var(--u))}
.spec-definition-body{margin:0;display:grid;grid-template-columns:31% minmax(0,1fr);gap:calc(5*var(--u));align-items:center;flex:1}
.spec-definition-body dt{font-size:calc(9*var(--u));line-height:1.05;color:var(--brand);font-weight:650;letter-spacing:-.06em}
.spec-definition-body dd{margin:0;font-size:calc(3.1*var(--u));line-height:1.3;padding-left:calc(1*var(--u))}
.spec-code{align-self:flex-start;border:1px solid var(--paper);padding:calc(.5*var(--u)) calc(1.5*var(--u));font-weight:650}
.spec-examples{display:flex;gap:calc(2*var(--u));list-style:none;padding:0;margin:0 0 0 36%;}.spec-examples li{flex:1;border-top:2px solid var(--sage);padding-top:calc(1.2*var(--u));font-size:calc(1.7*var(--u));line-height:1.3}
.spec-statement{background:linear-gradient(125deg,var(--brand) 65%,var(--olive) 65%)}
.spec-statement-body{flex:1;display:flex;flex-direction:column;justify-content:center;gap:calc(3*var(--u));border-left:calc(.7*var(--u)) solid var(--sage);padding-left:calc(3*var(--u))}
.spec-statement-body>p:first-child{font-size:calc(4.4*var(--u));line-height:1.12;font-weight:650;letter-spacing:-.035em}
.spec-statement-body .spec-support{font-size:calc(2.2*var(--u));max-width:80%}
.spec-surround.assessment{border-top:4px solid var(--olive)}
/* A v2 question-frame owns the whole stage; the runtime question lives in its slot. */
.screen.assessment.question-framed{display:block;padding:0;gap:0;background:#fff;border-radius:0;overflow:hidden}
@media(max-width:700px){.spec-heading{font-size:calc(3.7*var(--u))}.spec-content{padding:calc(3*var(--u)) calc(3*var(--u)) calc(7*var(--u))}.spec-title_hero,.spec-with-image,.spec-image_callouts{padding:0}.spec-content p{font-size:calc(2*var(--u))}.spec-content h2{font-size:calc(1.9*var(--u))}.spec-pin{min-width:30px;min-height:30px;width:30px;height:30px}.spec-tabs-body [role=tab]{padding:calc(1*var(--u));min-height:32px}.spec-accordion-body summary{min-height:32px}.spec-hero-copy .spec-heading{font-size:calc(6.2*var(--u))}.spec-list li{font-size:calc(1.75*var(--u))}.spec-table{font-size:calc(1.65*var(--u))}.spec-statement-body>p:first-child{font-size:calc(4.4*var(--u))}}
@media(prefers-reduced-motion:reduce){.spec-content *,.spec-content *:before{animation:none!important;transition:none!important;transform:none!important}.spec-pin{transform:translate(-50%,-50%)!important}}
@media(forced-colors:active){.spec-content button,.spec-step{border:1px solid ButtonText}.spec-content,.spec-hero-copy{background:Canvas;color:CanvasText}.spec-heading,.spec-hero-copy p{color:CanvasText}}

/* Procedures use ordinary left-to-right rows. Connectors advance within each row. */
.spec-list-intro{display:flex;flex-direction:column;justify-content:center;gap:calc(4*var(--u));color:var(--brand);height:100%}
.spec-list-intro .spec-heading{font-size:calc(4.2*var(--u));line-height:1.06}
.spec-list-intro>.spec-icon{width:calc(12*var(--u));height:calc(12*var(--u));stroke-width:1.2;color:var(--brand);opacity:.8}
.spec-list-layout{height:100%;align-items:stretch}
.spec-list{height:100%;grid-auto-rows:1fr;gap:calc(1*var(--u))}
.spec-list li{padding:calc(1.1*var(--u)) calc(1.3*var(--u));border:1px solid color-mix(in srgb,var(--sage) 45%,transparent);background:color-mix(in srgb,var(--paper) 8%,var(--brand));font-size:calc(1.7*var(--u));align-items:center;min-height:0}
.spec-list li.spec-list-future>.spec-icon{opacity:.35}
.spec-list li.spec-list-current{border-color:var(--sage);background:color-mix(in srgb,var(--sage) 18%,var(--brand))}
.spec-with-image .spec-list-intro{height:auto;flex-direction:row;justify-content:space-between;align-items:center}
.spec-with-image .spec-list-intro>.spec-icon{width:calc(5*var(--u));height:calc(5*var(--u));min-width:calc(5*var(--u));color:var(--sage)}
.spec-with-image .spec-list-intro .spec-heading{color:var(--paper);font-size:calc(3.2*var(--u))}
.spec-short .spec-list li{font-size:calc(3.8*var(--u))}
/* Definition plus image is one readable text column beside an uncropped image. */
.spec-definition.spec-with-image{background:var(--brand)}
.spec-definition.spec-with-image .spec-main{gap:calc(1.5*var(--u))}
.spec-definition.spec-with-image .spec-heading{color:var(--paper)}
.spec-definition.spec-with-image .spec-definition-body{display:flex;flex-direction:column;align-items:flex-start;gap:calc(1.2*var(--u));flex:none}
.spec-definition.spec-with-image .spec-definition-body dt{font-size:calc(4.3*var(--u));color:var(--sage);line-height:1.08;overflow-wrap:anywhere}
.spec-definition.spec-with-image .spec-definition-body dd{font-size:calc(1.9*var(--u));line-height:1.3;padding:0}
.spec-definition.spec-with-image .spec-examples{display:grid;grid-template-columns:1fr;margin:0;gap:calc(1*var(--u))}
.spec-definition.spec-with-image .spec-examples li{font-size:calc(1.65*var(--u));padding-top:calc(.8*var(--u));line-height:1.25}
.spec-table{font-size:clamp(12px,calc(1.45*var(--u)),19px);line-height:1.2}
.spec-table th,.spec-table td{padding:calc(.9*var(--u)) calc(1*var(--u))}
/* Captions now have their own strip: use the full table stage. */
.spec-content.spec-compare_table{padding:calc(2*var(--u));gap:calc(1.5*var(--u))}
.spec-compare_table>.spec-heading{font-size:calc(3.4*var(--u))}
.spec-compare_table>.spec-table{font-size:clamp(13px,calc(1.65*var(--u)),22px);flex:1;min-height:0}
.spec-compare_table .spec-table th,.spec-compare_table .spec-table td{padding:calc(1*var(--u))}
/* Coordinate-grounded map. Detail panel never overlays the map or selected pin. */
.spec-image_callouts:has(.spec-geo-layout){background:var(--paper);color:var(--ink);padding:calc(1.5*var(--u));gap:calc(1*var(--u))}
.spec-image_callouts:has(.spec-geo-layout)>.spec-heading{position:static;background:transparent;color:var(--brand);padding:0;font-size:calc(2.8*var(--u))}
.spec-geo-layout{display:grid;grid-template-columns:minmax(0,2.2fr) minmax(220px,1fr);gap:calc(1.5*var(--u));flex:1;min-height:0}
.spec-geo-map{display:flex;flex-direction:column;min-width:0;min-height:0;gap:calc(.5*var(--u))}
.spec-geo-toolbar{display:flex;align-items:center;gap:calc(.5*var(--u));flex:none}.spec-geo-toolbar button{font-size:14px;padding:6px 12px;min-height:32px}.spec-geo-toolbar span{font-size:12px;margin-left:auto}
.spec-geo-viewport{position:relative;flex:1;min-height:0;overflow:hidden;border:1px solid var(--line);touch-action:none;cursor:grab;background:#f4f6ef}
.spec-geo-viewport:active{cursor:grabbing}.spec-geo-plane,.spec-geo-pins{position:absolute;inset:0}.spec-geo-plane{transform-origin:0 0;pointer-events:none}.spec-geo-plane>.spec-image{width:100%;height:100%;max-height:none;object-fit:fill;display:block}.spec-geo-pins{pointer-events:none}
.spec-geo-pin{pointer-events:auto;position:absolute;transform:translate(-50%,-50%)!important;min-width:0;min-height:0;margin:0;padding:0;border:1px solid white;border-radius:50%;background:var(--brand);color:var(--paper);font-size:9px;font-weight:700;line-height:1;box-shadow:0 0 0 1px var(--brand);cursor:pointer}
.spec-geo-pin[aria-expanded=true]{background:var(--olive);outline:2px solid var(--brand);outline-offset:2px}.spec-geo-pin:focus-visible{outline:3px solid var(--brand);outline-offset:3px}
.spec-geo-key{display:flex;flex-wrap:wrap;gap:calc(1*var(--u));font-size:11px;color:var(--olive)}
.spec-geo-side{display:flex;flex-direction:column;gap:calc(1*var(--u));min-height:0;min-width:0}.spec-geo-details{flex:1;min-height:0;overflow:auto;border-left:4px solid var(--sage);background:var(--surface);padding:calc(1*var(--u))}.spec-geo-inventory{flex:1;min-height:0;overflow:auto;border-top:1px solid var(--line);padding-top:calc(1*var(--u))}
.spec-geo-side h2{font-size:clamp(14px,calc(1.6*var(--u)),20px);margin:0 0 calc(.6*var(--u))}.spec-geo-side p{font-size:clamp(12px,calc(1.25*var(--u)),16px);line-height:1.4;margin:0 0 calc(1*var(--u))}.spec-geo-feature+.spec-geo-feature{margin-top:calc(1*var(--u))}
.spec-geo-details,.spec-geo-inventory{overflow-y:scroll;scrollbar-gutter:stable;scrollbar-width:auto;scrollbar-color:var(--olive) var(--paper)}
.spec-geo-details::-webkit-scrollbar,.spec-geo-inventory::-webkit-scrollbar{width:8px}
.spec-geo-details::-webkit-scrollbar-thumb,.spec-geo-inventory::-webkit-scrollbar-thumb{background:var(--olive);border:2px solid var(--paper);border-radius:6px}
.spec-geo-details::-webkit-scrollbar-track,.spec-geo-inventory::-webkit-scrollbar-track{background:var(--paper)}

/* Fixed source copy: compact geometry first, bounded type fitting second. */
.spec-content:is(.spec-process_steps,.spec-build_list,.spec-statement,.spec-definition){padding:calc(2*var(--u));gap:calc(1.6*var(--u));box-sizing:border-box}
.spec-content.spec-with-image{padding:0;gap:0}
.spec-content :is(.spec-heading,h2,p,dt,dd,li,[data-cue-target]){overflow-wrap:anywhere;min-width:0}
.spec-content :is(.spec-main,.spec-list-intro,.spec-statement-body,.spec-definition-body){min-height:0;min-width:0}
.spec-main{padding:calc(2*var(--u));gap:calc(1.6*var(--u))}
.spec-list-intro{gap:calc(2*var(--u))}.spec-list-intro>.spec-icon{flex-shrink:0;max-height:calc(10*var(--u))}
.spec-process_steps .spec-steps{grid-template-columns:repeat(var(--step-columns,4),minmax(0,1fr));grid-template-rows:repeat(var(--step-rows,2),minmax(0,1fr));gap:calc(1.2*var(--u))}
.spec-process_steps .spec-step{min-height:0;padding:calc(1.1*var(--u));gap:calc(.7*var(--u))}
.spec-process_steps .spec-step-top{flex:none}
.spec-process_steps .spec-step-number{font-size:calc(2.8*var(--u))}
.spec-process_steps .spec-step .spec-icon{width:calc(2.5*var(--u));height:calc(2.5*var(--u))}
.spec-process_steps .spec-step-copy{min-height:0;flex:1}
.spec-process_steps .spec-step h2{font-size:clamp(14px,calc(1.8*var(--u)),23px);line-height:1.2}
.spec-process_steps .spec-step p{font-size:clamp(14px,calc(1.4*var(--u)),18px);line-height:1.25;margin-top:calc(.4*var(--u))}
.spec-process_steps.spec-with-image .spec-steps{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(var(--step-image-rows,4),minmax(0,1fr))}
.spec-process_steps.spec-with-image .spec-step:nth-child(2n):before{display:none}
.spec-content.spec-fit-scroll{align-items:start;overflow-y:auto;scrollbar-gutter:stable;border:1px solid var(--sage)}
.spec-content.spec-fit-scroll .spec-list{height:auto;grid-auto-rows:minmax(min-content,1fr)}
.spec-content.spec-fit-scroll .spec-list-layout{height:auto;min-height:min-content}
.spec-content.spec-fit-scroll .spec-definition-body,.spec-content.spec-fit-scroll .spec-statement-body{flex:none}
.spec-step-copy[data-scroll-region]{overflow-y:auto;scrollbar-gutter:stable;border-bottom:1px solid var(--sage)}
/* Source figures stay whole: native title strip above the uncropped document. */
.spec-figure-hero{display:grid;grid-template-rows:auto minmax(0,1fr);padding:calc(1.5*var(--u));gap:calc(1*var(--u));background:var(--paper)}
.spec-figure-hero:after,.spec-title-only:after{display:none}
.spec-figure-hero>.spec-image{position:static;grid-row:2;width:100%;height:100%;max-height:100%;object-fit:contain}
.spec-figure-hero>.spec-hero-copy{grid-row:1;width:100%;padding:calc(.5*var(--u)) calc(1*var(--u));background:var(--brand);border-left:calc(.5*var(--u)) solid var(--sage)}
.spec-figure-hero .spec-heading{font-size:clamp(20px,calc(2.8*var(--u)),36px);line-height:1.1}
.spec-title-only{align-items:center;justify-content:center}
.spec-title-only .spec-hero-copy{width:90%;padding:calc(4*var(--u));border-left:calc(.8*var(--u)) solid var(--sage);background:transparent}
.spec-title-only .spec-heading{font-size:clamp(24px,calc(5*var(--u)),64px);overflow-wrap:anywhere}

/* Reviewed photos fill their cells; teaching figures stay whole. Detail view remains uncropped. */
.spec-media{min-width:0;min-height:0}
.spec-image-cell{width:100%;height:100%;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden;border:0;border-radius:0;padding:0;background:transparent;box-shadow:none;cursor:zoom-in}
.spec-image-cell>.spec-image{width:100%;height:100%}
.spec-image:not([data-media-type="photo"]){object-fit:contain!important;scale:1!important}
.spec-image-cell>.spec-image[data-media-type="photo"]{object-fit:cover!important}
.spec-image-cell:focus-visible{outline:3px solid var(--focus);outline-offset:-3px}
.spec-image-cell>.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.spec-media-multiple{display:grid;grid-template-rows:repeat(var(--image-count),minmax(0,1fr));gap:calc(1*var(--u));padding:calc(1*var(--u));box-sizing:border-box;background:var(--paper)}
.spec-media-many{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}
.spec-multiple-hero{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);padding:0;gap:0}
.spec-multiple-hero:after{display:none}
.spec-multiple-hero>.spec-main{padding:calc(1.5*var(--u));display:block;background:var(--brand)}
.spec-multiple-hero .spec-hero-copy{width:auto;padding:0;border:0;background:transparent}
.spec-multiple-hero .spec-heading{font-size:calc(3.2*var(--u))}
.spec-short.spec-with-image .spec-list li{font-size:calc(2.25*var(--u));line-height:1.35}
.spec-short.spec-with-image .spec-list .spec-icon{width:calc(2.8*var(--u));height:calc(2.8*var(--u));min-width:calc(2.8*var(--u))}
.spec-with-image.spec-dense-copy{grid-template-columns:minmax(0,3fr) minmax(0,2fr)}
.spec-figure-hero>.spec-image{object-fit:contain!important;scale:1!important}
.spec-figure-hero>.spec-hero-figure{grid-row:2;min-height:0;width:100%;height:100%}
.assessment-source-images>.spec-image-cell{flex:1}
.spec-source-dialog{max-width:96vw;max-height:92vh;padding:16px;border:2px solid var(--brand);background:var(--paper);overflow:auto;scrollbar-gutter:stable}
.spec-source-dialog::backdrop{background:#1d1830cc}
.spec-source-toolbar{display:flex;gap:12px;margin-bottom:12px}
.spec-source-viewport{max-width:90vw;max-height:75vh;overflow:auto;scrollbar-gutter:auto}
.spec-source-viewport>img{display:block;width:auto;max-width:88vw;max-height:74vh;object-fit:contain}
.spec-source-actual .spec-source-viewport>img{min-width:min(1200px,85vw);max-width:none;max-height:none}

/* Owner review: bounded detail viewer and content-sized teaching panels. */
.spec-source-dialog[open]{display:flex;flex-direction:column;width:96vw;height:94vh;max-height:94vh;padding:8px;overflow:hidden;box-sizing:border-box}
.spec-source-toolbar{flex:none;align-items:center;gap:8px;margin:0 0 6px}
.spec-source-toolbar button{min-height:36px;padding:6px 12px;font-size:14px;line-height:1.2}
.spec-source-viewport{flex:1;min-height:0;max-height:none;max-width:none;overflow:scroll;scrollbar-gutter:auto;border:1px solid var(--line)}
.spec-source-viewport>img{width:100%;height:100%;max-width:none;max-height:none;object-fit:contain}
.spec-source-actual .spec-source-viewport>img{width:auto;height:auto;min-width:min(1200px,85vw);max-width:none;max-height:none}
.spec-list-layout{height:auto;min-height:0;align-items:center}
.spec-list{height:auto;grid-auto-rows:minmax(min-content,auto);align-content:center}
.spec-content.spec-fit-scroll{padding-bottom:calc(2.5*var(--u))}
.spec-content.spec-fit-scroll .spec-list-layout{padding-bottom:calc(1*var(--u))}
.spec-steps:has(>.spec-step:nth-child(5)):not(:has(>.spec-step:nth-child(7))) .spec-step:before{display:none}
.spec-media-multiple{gap:calc(.5*var(--u));padding:calc(.5*var(--u))}
.spec-multiple-hero>.spec-main{padding:calc(.8*var(--u)) calc(1.5*var(--u))}

.native-typed-card{height:100%;box-sizing:border-box;display:grid;grid-template-columns:30% minmax(0,1fr);gap:calc(3*var(--u));padding:calc(2.5*var(--u));background:var(--paper);color:var(--ink)}
.native-typed-card header{background:var(--brand);color:var(--paper);padding:calc(2*var(--u));display:flex;align-items:center;border-bottom:8px solid var(--sage)}
.native-typed-card h1{font-size:clamp(20px,calc(3.3*var(--u)),44px);line-height:1.15;margin:0;overflow-wrap:anywhere}
.native-card-copy{min-height:0;overflow:auto;scrollbar-gutter:stable;padding:calc(1*var(--u));align-self:stretch;display:flex;flex-direction:column;justify-content:safe center}
.native-card-copy h2{font-size:clamp(18px,calc(2.5*var(--u)),34px);line-height:1.2;color:var(--brand);margin:0 0 calc(1.5*var(--u))}
.native-card-copy p{font-size:clamp(14px,calc(1.7*var(--u)),23px);line-height:1.45;margin:0}
.native-card-break{height:calc(1.4*var(--u));flex:none}.native-card-copy footer{font-size:clamp(12px,calc(1.1*var(--u)),15px);color:var(--olive);margin-top:calc(2*var(--u))}

.native-card-with-images{height:100%;display:grid;grid-template-columns:3fr 1fr}.native-card-with-images aside{min-height:0;overflow:hidden}.native-card-with-images .native-typed-card{grid-template-columns:1fr;padding:calc(1.5*var(--u));gap:calc(1*var(--u));grid-template-rows:auto minmax(0,1fr)}.native-card-with-images .native-typed-card header{padding:calc(1*var(--u))}.native-card-with-images .native-typed-card h1{font-size:calc(2*var(--u))}

.native-card-short .native-card-copy p{font-size:clamp(18px,calc(2.7*var(--u)),35px);line-height:1.35}.native-card-short .native-card-copy h2{font-size:clamp(22px,calc(3*var(--u)),40px)}

.spec-with-image .spec-copy-scroll{height:100%;min-height:0;box-sizing:border-box;overflow-y:scroll;scrollbar-gutter:stable;padding-bottom:calc(2*var(--u));border-bottom:2px solid var(--sage)}
.spec-copy-scroll .spec-list-intro{flex:none}.spec-copy-scroll .spec-list-layout{height:auto;min-height:min-content;flex:none}.spec-copy-scroll .spec-list{height:auto;grid-auto-rows:auto}

/* Long source lists stay verbatim; reduce row chrome before text size. */
.spec-dense-list .spec-list{gap:calc(.45*var(--u))}.spec-dense-list .spec-list li{padding:calc(.4*var(--u)) calc(.8*var(--u));gap:calc(.8*var(--u));font-size:clamp(14px,calc(1.45*var(--u)),19px);line-height:1.25}.spec-dense-list .spec-list .spec-icon{width:calc(1.7*var(--u));height:calc(1.7*var(--u));min-width:calc(1.7*var(--u));margin-top:0}.spec-dense-list .spec-main{gap:calc(1*var(--u));padding:calc(1.5*var(--u))}.spec-dense-list .spec-list-intro .spec-heading{font-size:calc(2.6*var(--u))}.spec-dense-list .spec-list-intro>.spec-icon{width:calc(3*var(--u));height:calc(3*var(--u));min-width:calc(3*var(--u))}
.spec-dense-list .spec-list li{font-size:clamp(16px,calc(1.7*var(--u)),23px);line-height:1.35;border:0;border-left:2px solid color-mix(in srgb,var(--sage) 45%,transparent);padding:calc(.35*var(--u)) calc(.8*var(--u))}

/* Generated teaching cards use natural paragraphs across the full reading stage. */
.native-typed-card{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:calc(1.8*var(--u));padding:calc(2.5*var(--u))}
.native-typed-card header{padding:calc(1.8*var(--u)) calc(2.3*var(--u));border-bottom-width:5px}
.native-card-copy{justify-content:flex-start;padding:calc(1*var(--u)) calc(2.3*var(--u));gap:calc(1.3*var(--u))}
.native-card-copy p{margin:0;max-width:100%;flex-shrink:0}
.native-card-break{display:none}
.native-card-short .native-card-copy{justify-content:space-evenly}
.native-card-short .native-card-copy p{font-size:clamp(20px,calc(3.4*var(--u)),44px);line-height:1.3}
.native-card-copy footer:empty{display:none}

.native-figure{height:100%;box-sizing:border-box;padding:calc(2*var(--u));background:var(--paper);color:var(--ink)}
.native-figure-heading{padding:calc(1*var(--u)) calc(1.5*var(--u));background:var(--brand);color:var(--paper);border-bottom:5px solid var(--sage)}
.native-figure-heading h1{font-size:clamp(20px,calc(3*var(--u)),38px);line-height:1.15;margin:0}
.native-figure-layout{height:calc(100% - calc(8*var(--u)));display:grid;grid-template-columns:1fr;gap:calc(2*var(--u));padding-top:calc(1.5*var(--u));box-sizing:border-box}
.native-figure-layout.has-media{grid-template-columns:minmax(0,3fr) minmax(0,2fr)}
.native-figure-copy{min-height:0;overflow:auto;scrollbar-gutter:stable;padding:0 calc(1*var(--u)) calc(1*var(--u)) 0;font-size:clamp(16px,calc(2.1*var(--u)),27px);line-height:1.35}
.native-figure-copy table{width:100%;border-collapse:collapse;margin-bottom:calc(1.5*var(--u));text-align:left}
.native-figure-copy caption{font-weight:700;background:var(--olive);color:var(--paper);padding:calc(1*var(--u));text-align:left}
.native-figure-copy td,.native-figure-copy th{padding:calc(1.3*var(--u));border-bottom:1px solid var(--sage);vertical-align:top}
.native-figure-copy th{background:var(--brand);color:var(--paper)}
.native-figure-layout aside{min-height:0;display:grid;grid-auto-rows:minmax(0,1fr);gap:calc(1*var(--u))}.native-figure-layout .spec-image-cell{height:100%;min-height:0}
.native-form-meta{font-size:.85em;columns:2}.native-figure-copy h2{font-size:1.2em}

.screen.content.native-figure{display:grid;grid-template-rows:auto minmax(0,1fr);gap:calc(1.5*var(--u));padding:calc(2*var(--u));background:var(--paper);color:var(--ink)}
.native-figure-layout{height:auto;min-height:0;padding-top:0}
.native-figure-copy:has(>table:only-child):has(tbody>tr:only-child){font-size:clamp(24px,calc(3.6*var(--u)),46px);line-height:1.3}
.native-contact-table{border-collapse:collapse;width:100%;font-size:clamp(14px,calc(1.9*var(--u)),25px);line-height:1.2}
.native-contact-table th,.native-contact-table td{padding:calc(.5*var(--u)) calc(1*var(--u));border-bottom:1px solid var(--sage);text-align:left;vertical-align:top}
.native-contact-table th{font-weight:600;width:52%}.native-card-copy:has(.native-contact-table){gap:calc(.6*var(--u))}
.native-card-copy:has(.native-contact-table) h2{margin:0}.native-card-copy:has(.native-contact-table) footer{margin-top:calc(.5*var(--u))}

.native-card-copy>p{border-left:calc(.45*var(--u)) solid transparent;padding:calc(.55*var(--u)) calc(1*var(--u));box-sizing:border-box;transition:background .18s,border-color .18s}
.native-card-copy>p.native-reading-current{background:var(--surface);border-left-color:var(--olive)}
.native-card-prose .native-card-copy>p{font-size:clamp(22px,calc(4*var(--u)),48px);line-height:1.3}
@media(prefers-reduced-motion:reduce){.native-card-copy>p{transition:none}}

/* Content-first stage (2026-10). The stage now has the viewport's own aspect,
   not a fixed 16:9 canvas: overflowing copy is never centred past its heading,
   two-column layouts share the real width, and figures stay uncropped. */
.spec-statement-body,.spec-list-intro{justify-content:safe center}
.spec-list-layout,.spec-definition-body,.spec-build_list:not(.spec-with-image){align-items:safe center}
.spec-list{align-content:safe center}
.native-card-short .native-card-copy{justify-content:safe space-evenly}
.spec-title-only{align-items:safe center;justify-content:safe center}
.spec-build_list:not(.spec-with-image){background:linear-gradient(90deg,var(--sage) calc(29% + 1.6*var(--u)),var(--brand) calc(29% + 1.6*var(--u)))}
.spec-statement.spec-with-image{background:var(--brand)}
.spec-with-image{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.spec-media{justify-content:center}
/* Title screen: one full-width title strip over an uncropped figure... */
.spec-figure-hero:not(.spec-multiple-hero){justify-content:stretch;grid-template-columns:minmax(0,1fr)}
/* ...or, when the stage is wide, a title panel beside the figure. */
@container (min-aspect-ratio: 8/5){
 .spec-figure-hero:not(.spec-multiple-hero){grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);grid-template-rows:minmax(0,1fr);gap:0;padding:0;background:var(--paper)}
 .spec-figure-hero:not(.spec-multiple-hero)>.spec-hero-copy{grid-row:1;grid-column:1;display:flex;flex-direction:column;justify-content:safe center;padding:calc(4*var(--u)) calc(4*var(--u)) calc(4*var(--u)) calc(3.5*var(--u));border-left:calc(.8*var(--u)) solid var(--sage);min-height:0;overflow:hidden}
 .spec-figure-hero:not(.spec-multiple-hero) .spec-heading{font-size:clamp(26px,calc(5.4*var(--u)),72px);line-height:1.05}
 .spec-figure-hero:not(.spec-multiple-hero) .spec-hero-copy p{font-size:clamp(16px,calc(2.2*var(--u)),28px)}
 .spec-figure-hero:not(.spec-multiple-hero)>:is(.spec-hero-figure,.spec-image){grid-row:1;grid-column:2;padding:calc(1.5*var(--u));box-sizing:border-box}
}
/* Scroll regions say so: a visible scrollbar and a fade above their lower edge until the end is reached. */
[data-scroll-region]{overflow-y:scroll!important;scrollbar-width:auto;scrollbar-color:var(--sage) color-mix(in srgb,var(--paper) 15%,transparent)}
[data-scroll-region][data-more=true]{-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 36px),#0007);mask-image:linear-gradient(to bottom,#000 calc(100% - 36px),#0007)}
.spec-geo-details[data-more=true],.spec-geo-inventory[data-more=true]{-webkit-mask-image:none;mask-image:none}
.spec-measuring .spec-pending,.spec-measuring [data-cue-target]{transform:none!important;transition:none!important}
/* Portrait stages (phones): stack every two-column composition, copy first. */
@container (max-aspect-ratio: 1/1){
 .screen{--u:min(1.6cqw,1.7778cqh)}
 .spec-content.spec-with-image:not(.spec-multiple-hero){grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) 34cqh}
 .spec-content.spec-with-image:not(.spec-multiple-hero)>.spec-media{height:34cqh;min-height:0}
 .spec-build_list:not(.spec-with-image){grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);align-items:stretch;background:var(--brand)}
 .spec-build_list:not(.spec-with-image)>.spec-list-intro{background:var(--sage);margin:calc(-2*var(--u)) calc(-2*var(--u)) 0;padding:calc(2*var(--u));height:auto;flex-direction:row;align-items:center;justify-content:space-between}
 .spec-build_list:not(.spec-with-image)>.spec-list-intro>.spec-icon{width:calc(6*var(--u));height:calc(6*var(--u))}
 .spec-process_steps .spec-steps{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:none!important;grid-auto-rows:minmax(0,1fr)}
 .spec-step:before{display:none}
 .spec-definition-body{grid-template-columns:minmax(0,1fr)}
 .spec-definition>.spec-heading{max-width:none}
 .spec-definition:not(.spec-with-image){background:var(--brand)}.spec-definition:not(.spec-with-image)>.spec-heading,.spec-definition:not(.spec-with-image) .spec-definition-body dt{color:var(--sage)}
 .spec-examples{margin-left:0;flex-direction:column}
 .native-figure-layout.has-media{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,32cqh)}
 .native-card-with-images{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,28cqh)}
 .spec-geo-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,38%)}
 .spec-statement{background:var(--brand)}
}

/* Sourced figure exploration: markers remain on the contained picture; details never cover it. */
.spec-image_callouts:not(:has(.spec-geo-layout)){padding:12px 20px;gap:12px}
.spec-image_callouts:not(:has(.spec-geo-layout))>.spec-heading{position:static;padding:8px 12px;flex:none}
.spec-callout-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(240px,1fr);gap:20px;align-items:center;padding:0}
.spec-callout-canvas{justify-self:center;max-height:100%}
.spec-callout-canvas>.spec-image{max-height:calc(100cqh - 100px);max-width:100%;height:auto;width:auto}
.spec-callout-side{align-self:stretch;min-height:0;overflow:auto;padding:12px;background:var(--brand)}
.spec-callout-details{position:static;max-width:none;background:none;border:0}
.spec-callout-details:has(section:not([hidden])){padding:12px 0}
.spec-callout-details h2{font-size:clamp(18px,2vw,28px)}
.spec-callout-details p{font-size:clamp(16px,1.55vw,22px);line-height:1.4;margin-top:12px}
.spec-explored{color:var(--sage);font-size:16px;font-variant-numeric:tabular-nums}
.spec-callout-hint{font-size:18px;margin-top:16px}
.inspection-visual{display:flex;gap:clamp(16px,3vw,50px);align-items:center;justify-content:center;padding:22px 0}
.inspection-visual>span{display:grid;place-items:center;width:clamp(65px,11vw,145px);aspect-ratio:1;border:2px solid var(--sage);border-radius:50%;background:var(--brand);color:var(--paper)}
.inspection-visual .spec-icon{width:60%;height:60%}
@media(max-width:600px){.spec-callout-layout{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) minmax(100px,35%);gap:8px}.spec-callout-canvas>.spec-image{max-height:calc(50cqh - 45px)}.spec-callout-side{padding:8px}.spec-callout-details p{font-size:16px}.inspection-visual{padding:12px 0}}

/* Deliberate figure cards: contained diagrams keep every label, never olive bands. */
.spec-media{background:transparent;justify-content:center;align-items:center}
.spec-raster-card{align-self:center;justify-self:center;flex-shrink:1}
.spec-raster-card[data-image-card="figure"]{background:#fff;border-radius:12px;overflow:hidden}
.spec-raster-card[data-image-card="photo"]{background:transparent}
.spec-raster-card>.spec-image{max-width:100%;max-height:100%}

.hotspot-canvas{background:#fff;border-radius:12px}
/* Scroll regions made focusable by screen_components.js markScrollRegions. The
   ring sits inside the box so a clipping ancestor never hides it. */
[data-scroll-focus][data-scroll-focus]:focus-visible { outline: 3px solid var(--t-focus, #f5b400); outline-offset: -3px; box-shadow: inset 0 0 0 5px var(--t-navy, #30205f); }
/* Screen template tokens (ScreenSpec v2). Custom properties only.

   Declared on [data-template] (not :root) because every size derives from the
   player stage's --u (1% of a 16:9 frame), which only exists inside .stage.
   Design frame: 100u x 56.25u. Desktop 1280x600 -> u=10.67px; wide 1920x1080
   -> u=19.2px; phone 400x760 -> u=4px (all clamp floors apply).

   WCAG 2.1 AA text pairings (only these are used; ratios computed with the
   WCAG relative-luminance formula):
     --t-ink      on --t-paper     16.27:1   body copy
     --t-ink      on --t-canvas    14.89:1
     --t-ink      on --t-mist      14.49:1
     --t-ink      on --t-sage-soft 12.98:1
     --t-navy     on --t-paper     14.02:1   headings, labels, numbers
     --t-navy     on --t-canvas    12.84:1
     --t-navy     on --t-mist      12.49:1
     --t-navy     on --t-sage-soft 11.19:1
     --t-navy     on --t-sage       7.58:1   chips, pins
     --t-paper    on --t-navy      14.02:1   reversed panels
     --t-paper    on --t-navy-deep 17.08:1
     --t-sage     on --t-navy       7.58:1   accent text on navy
     --t-sage     on --t-navy-deep  9.23:1
     --t-sage-soft on --t-navy     11.19:1
     --t-muted    on --t-paper      7.03:1   meta text (>=15px)
     --t-muted    on --t-mist       6.26:1
     --t-muted    on --t-canvas     6.44:1
     --t-muted    on --t-sage-soft  5.61:1   data-panel eyebrow (plan-card entries label)
     --t-olive    on --t-paper      5.18:1   eyebrows
     --t-olive    on --t-canvas     4.74:1
     --t-go       on --t-paper      6.37:1   "do" labels; --t-paper on --t-go 6.37:1
     --t-stop     on --t-paper      7.66:1   "don't" labels; --t-paper on --t-stop 7.66:1
     --t-focus    on --t-navy       7.62:1   focus ring on dark fields
   Photo scrims: text over photographs sits on --t-scrim-strong (navy-deep at
   92% opacity; worst case over a pure-white photo = #30274f, --t-paper 13.74:1).
   The section-opener scrim is never below 74% where text can sit (worst case
   #585172: --t-paper 7.41:1, --t-sage-soft 5.91:1).
   Figures: many upgraded images carry a baked #f5f5f2 backdrop; figure cells
   sit on --t-canvas (same value) so that backdrop never reads as a band. */

[data-template] {
  /* Brand (mirrors delivery/branding.py EBP_THEME) */
  --t-navy: #30205f;
  --t-navy-deep: #1e1440;
  --t-sage: #a8c6ad;
  --t-sage-soft: #dce9de;
  --t-sage-deep: #4f7a58;
  --t-olive: #68705a;
  --t-ink: #172033;
  --t-paper: #ffffff;
  --t-canvas: #f5f5f2;   /* = the seamless backdrop baked into upgraded product images */
  --t-mist: #eef3ef;
  --t-muted: #4d5a6a;
  --t-line: #d5dbd6;
  --t-line-strong: #b9c4bb;
  --t-go: #2f6b3f;
  --t-stop: #9b2a1c;
  --t-focus: #f5b400;
  --t-scrim-strong: rgb(30 20 64 / .92);
  --t-scrim-soft: rgb(30 20 64 / 0);

  /* Type: one family, the player's bundled Adwaita Sans. */
  --t-font: Adwaita, "Adwaita Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-u: var(--u, 10px);

  /* Floors: body >= 15px, headings >= 18px at every frame. Caps sit above the
     wide-frame value so 1920x1080 scales proportionally. */
  --t-fs-display: clamp(30px, calc(6.4 * var(--t-u)), 128px);
  --t-fs-statement: clamp(22px, calc(3.9 * var(--t-u)), 80px);
  --t-fs-stat: clamp(34px, calc(5.4 * var(--t-u)), 108px);
  --t-fs-h1: clamp(22px, calc(3.4 * var(--t-u)), 68px);
  --t-fs-h1-compact: clamp(20px, calc(2.7 * var(--t-u)), 54px);
  --t-fs-h2: clamp(18px, calc(2.05 * var(--t-u)), 42px);
  --t-fs-lead: clamp(17px, calc(2.15 * var(--t-u)), 44px);
  --t-fs-body: clamp(15px, calc(1.75 * var(--t-u)), 36px);
  --t-fs-body-lg: clamp(16px, calc(2.05 * var(--t-u)), 42px);
  --t-fs-meta: clamp(15px, calc(1.4 * var(--t-u)), 28px);

  --t-lh-tight: 1.08;
  --t-lh-head: 1.15;
  --t-lh-body: 1.45;

  /* Space */
  --t-gutter: max(16px, calc(4.2 * var(--t-u)));
  --t-gutter-y: max(16px, calc(3.4 * var(--t-u)));
  --t-gap-xs: max(4px, calc(.5 * var(--t-u)));
  --t-gap-s: max(8px, calc(1 * var(--t-u)));
  --t-gap-m: max(12px, calc(1.6 * var(--t-u)));
  --t-gap-l: max(16px, calc(2.4 * var(--t-u)));
  --t-gap-xl: max(20px, calc(3.6 * var(--t-u)));

  /* Shape */
  --t-radius: max(6px, calc(.8 * var(--t-u)));
  --t-radius-s: max(4px, calc(.45 * var(--t-u)));
  --t-rule-w: max(36px, calc(5 * var(--t-u)));
  --t-rule-h: max(4px, calc(.42 * var(--t-u)));
  --t-icon: max(22px, calc(2.6 * var(--t-u)));
  --t-icon-badge: max(40px, calc(4.6 * var(--t-u)));
  --t-shadow: 0 calc(.4 * var(--t-u)) calc(2.4 * var(--t-u)) rgb(23 32 51 / .12);
  --t-target: 44px;
}

/* Shared region-kind fragment styles for ScreenSpec v2 templates.
   Fragments come from delivery/template_renderer.py (.r-*); templates only
   arrange placeholders. Everything is scoped under [data-template]. */

/* The template owns the whole stage: neutralise the v1 screen chrome. */
.screen-spec:has(> [data-template]) { padding: 0; overflow: hidden; background: #ffffff; border-radius: 0; }

[data-template] {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--t-paper);
  color: var(--t-ink);
  font-family: var(--t-font);
  font-size: var(--t-fs-body);
  line-height: var(--t-lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:where([data-template] *), :where([data-template] *::before), :where([data-template] *::after) { box-sizing: border-box; }
:where([data-template] [data-region]) { min-width: 0; }

/* Decorative accent rule above headings. */
:where([data-template] .t-rule) { display: block; width: var(--t-rule-w); height: var(--t-rule-h); border-radius: 99px; background: var(--t-sage); flex: none; }

/* ---------- text ---------- */
:where([data-template] .r-heading) {
  margin: 0;
  font-size: var(--t-fs-h1);
  line-height: var(--t-lh-head);
  font-weight: 680;
  letter-spacing: -.022em;
  color: var(--t-navy);
  text-wrap: balance;
  white-space: normal;
}
:where([data-template] .r-text) { margin: 0; font-size: var(--t-fs-body); line-height: var(--t-lh-body); text-wrap: pretty; }
:where([data-template] .r-text > .spec-icon) { display: inline-block; vertical-align: -.18em; margin-right: .45em; width: 1.15em; height: 1.15em; min-width: 0; }

/* ---------- icons (Lucide, stroke = currentColor) ---------- */
:where([data-template] .spec-icon) { display: block; width: var(--t-icon); height: var(--t-icon); min-width: var(--t-icon); stroke-width: 1.75; flex: none; }

/* ---------- lists and items ---------- */
[data-template] .r-list, [data-template] .r-items { list-style: none; margin: 0; padding: 0; }
:where([data-template] .r-item) { margin: 0; min-width: 0; }
:where([data-template] .r-item-label) {
  margin: 0;
  font-size: var(--t-fs-h2);
  line-height: 1.22;
  font-weight: 650;
  letter-spacing: -.012em;
  color: var(--t-navy);
  text-wrap: balance;
}
:where([data-template] .r-item-body) { min-width: 0; }
:where([data-template] .r-item-body p) { margin: 0; font-size: var(--t-fs-body); line-height: var(--t-lh-body); text-wrap: pretty; }
:where([data-template] .r-item-body p + p) { margin-top: var(--t-gap-xs); }

/* Default row treatment: icon badge + copy. Templates refine. */
:where([data-template] .r-item:has(> .spec-icon)) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--t-gap-m); align-items: start; }
:where([data-template] .r-item > .spec-icon) { grid-row: 1; color: var(--t-navy); }
:where([data-template] .r-item:has(> .r-item-label + .r-item-body) > .spec-icon) { grid-row: 1 / span 2; }
:where([data-template] .r-item > :not(.spec-icon)) { grid-column: -2 / -1; }

/* ---------- figures ---------- */
:where([data-template] .r-figure) { margin: 0; position: relative; width: 100%; height: 100%; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
/* Photos fill their cell at the spec focal point (inline object-position). */
:where([data-template] .r-figure[data-media-type="photo"] img) { display: block; width: 100%; height: 100%; object-fit: cover; }
/* screen_components.js capSourcePixels writes inline max-width/max-height to stop
   upscaling; a cover photo must still fill its cell, so photos opt out. */
[data-template] .r-figure[data-media-type="photo"] img { max-width: none !important; max-height: none !important; }
/* Figures are contained and never cropped: the img box shrinks to the
   picture's own aspect, so there is no band to paint. screen_components.js
   fitFigureCards sizes a picture smaller than its fit up to it (the honest pixel
   size is a measurement, not a presentation limit: docs/design/visual-bar.md). */
:where([data-template] .r-figure[data-media-type="figure"] img) { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--t-radius-s); }
/* trimFigureBands clips a white-ground figure's baked canvas bands and hands the
   figure's own white to the cell (--figure-white) so the clipped edge is invisible. */
[data-template] .r-figure[data-media-type="figure"][data-band-trim] { background: var(--figure-white, var(--t-paper)); }

/* ---------- figure card (visual bar: a figure never sits at thumbnail size on a bare panel) ----------
   fitFigureCards sets data-figure-card when the picture alone would cover less than
   0.6 of its image panel: the cell becomes a brand-coloured card with a generous inset
   and soft shadow, the picture is fitted inside it (print: opaque, on the card with a
   print shadow; cutout: transparent edges, drop shadow), and a short caption from the
   alt is shown for labels and signs. A template opts in by setting --figure-card
   (the ground) on its figure cell, places the card inset within its panel and may
   set --figure-inset; a panel that already mounts its picture (the list-image band,
   the comparison column) leaves --figure-card unset and only gets the fitted picture. */
[data-template] .r-figure[data-media-type="figure"][data-figure-card] {
  flex-direction: column; gap: var(--t-gap-m);
  padding: var(--figure-inset, var(--t-gap-l));
  background: var(--figure-card); border-radius: var(--t-radius);
  box-shadow: var(--figure-card-shadow, var(--t-shadow));
}
[data-template] .r-figure[data-media-type="figure"][data-figure-card] img { flex: none; max-width: 100%; max-height: 100%; }
[data-template] .r-figure[data-media-type="figure"][data-figure-card="print"] img { box-shadow: 0 1px 0 rgb(23 32 51 / .08), var(--t-shadow); }
[data-template] .r-figure[data-media-type="figure"][data-figure-card="cutout"] img { border-radius: 0; filter: drop-shadow(0 max(3px, calc(.5 * var(--t-u))) max(8px, calc(1.4 * var(--t-u))) rgb(23 32 51 / .22)); }
/* A print on its own white ground (a product shot, a scanned label) takes that white as its
   card (fitFigureCards sets --figure-card to the picture's edge tone and data-figure-ground), so
   the picture's backdrop and the card are one surface, never a white box on a coloured card. */
[data-template] .r-figure[data-media-type="figure"][data-figure-card][data-figure-ground="white"] img { box-shadow: none; }
[data-template] .r-figure-caption { display: none; flex: none; margin: 0; max-width: 100%; font-size: var(--t-fs-meta); line-height: 1.3; font-weight: 550; color: var(--t-navy); text-align: center; text-wrap: balance; }
[data-template] .r-figure[data-figure-card] > .r-figure-caption { display: block; }
/* Photographs are never carded (visual bar): a figure the spec (data-photo-region, from
   provenance.photo_regions) or the image lane (data-image-class / data-disposition, package
   manifest) classes as a photograph is switched to the photo cell by screen_components.js
   classifyPhotos when it has no white or transparent ground of its own, and covers its panel at
   the spec focal point; a uniform band baked into its edges is cropped away (object-view-box). */
[data-template] .r-figure[data-media-type="photo"][data-photo-fill] img { object-fit: cover; }

/* ---------- table ---------- */
:where([data-template] .r-table) { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--t-fs-body); line-height: 1.35; font-variant-numeric: tabular-nums; }
:where([data-template] .r-table th), :where([data-template] .r-table td) { text-align: left; vertical-align: top; padding: var(--t-gap-m) var(--t-gap-m); border-bottom: 1px solid var(--t-line); }
:where([data-template] .r-table thead th) { background: var(--t-navy); color: var(--t-paper); font-weight: 650; font-size: var(--t-fs-meta); letter-spacing: .01em; vertical-align: bottom; border-bottom: 0; }
:where([data-template] .r-table thead th:first-child) { border-top-left-radius: var(--t-radius); }
:where([data-template] .r-table thead th:last-child) { border-top-right-radius: var(--t-radius); }
:where([data-template] .r-table tbody th) { color: var(--t-navy); font-weight: 650; }
:where([data-template] .r-table tbody tr:nth-child(even) > *) { background: var(--t-canvas); }
:where([data-template] .r-table tr.r-highlight > *) { background: var(--t-sage-soft); }
:where([data-template] .r-table tr.spec-active-row > *) { background: var(--t-sage-soft); }

/* ---------- pagination (R7) ---------- */
:where([data-template] .r-page) { min-height: 0; }
:where([data-template] .r-pager) { display: flex; align-items: center; justify-content: flex-end; gap: var(--t-gap-s); margin-top: var(--t-gap-m); flex: none; }
[data-template] .r-pager button {
  min-height: var(--t-target); min-width: var(--t-target);
  padding: 0 max(16px, calc(1.8 * var(--t-u)));
  border-radius: 99px; border: 2px solid var(--t-navy);
  background: var(--t-navy); color: var(--t-paper);
  font: 650 var(--t-fs-meta)/1 var(--t-font); cursor: pointer; box-shadow: none;
}
[data-template] .r-pager button[data-page-prev] { background: var(--t-paper); color: var(--t-navy); }
[data-template] .r-pager button:disabled { opacity: .4; cursor: not-allowed; }
[data-template] .r-pager button:hover:not(:disabled) { box-shadow: 0 0 0 3px var(--t-sage); }
:where([data-template] .r-page-status) { order: -1; margin-right: auto; font-size: var(--t-fs-meta); color: var(--t-muted); font-variant-numeric: tabular-nums; }

/* ---------- explore (callouts kind) ---------- */
:where([data-template] .r-explore) { position: relative; display: grid; min-height: 0; min-width: 0; }
:where([data-template] .r-explore-canvas) { position: relative; line-height: 0; min-width: 0; }
:where([data-template] .r-explore-canvas > .r-figure) { height: auto; overflow: visible; display: block; }
:where([data-template] .r-explore-canvas > .r-figure img) { display: block; width: 100%; height: auto; max-height: none; border-radius: var(--t-radius); }
[data-template] .r-pin {
  position: absolute; transform: translate(-50%, -50%);
  width: max(var(--t-target), calc(4.4 * var(--t-u))); height: max(var(--t-target), calc(4.4 * var(--t-u)));
  min-height: 0; padding: 0; margin: 0;
  border-radius: 50%; border: max(3px, calc(.35 * var(--t-u))) solid var(--t-paper);
  background: var(--t-navy); color: var(--t-paper);
  font: 700 var(--t-fs-meta)/1 var(--t-font); font-variant-numeric: tabular-nums;
  display: grid; place-items: center;
  box-shadow: 0 2px 10px rgb(23 32 51 / .35), 0 0 0 0 rgb(168 198 173 / .7);
  cursor: pointer; transition: background .2s, box-shadow .2s;
}
[data-template] .r-pin:active:not(:disabled) { transform: translate(-50%, -50%); }
[data-template] .r-pin:hover { box-shadow: 0 2px 10px rgb(23 32 51 / .35), 0 0 0 max(5px, calc(.6 * var(--t-u))) rgb(168 198 173 / .75); }
[data-template] .r-pin[aria-expanded="true"] { background: var(--t-sage); color: var(--t-navy); border-color: var(--t-navy); }
[data-template] .r-pin[data-explored="true"]:not([aria-expanded="true"]) { background: var(--t-sage-deep); }
:where([data-template] .r-explored) { margin: 0; font-size: var(--t-fs-meta); font-weight: 650; color: var(--t-navy); font-variant-numeric: tabular-nums; }
:where([data-template] .r-detail h2) { margin: 0; font-size: var(--t-fs-h2); line-height: 1.2; color: var(--t-navy); font-weight: 680; letter-spacing: .01em; }
:where([data-template] .r-detail p) { margin: var(--t-gap-s) 0 0; font-size: var(--t-fs-body-lg); line-height: 1.4; }

/* ---------- narration reveal (cue timing from screen_components.js) ---------- */
:where([data-template] [data-cue-target]) { transition: opacity .45s ease, transform .45s ease; }
:where([data-template] .spec-pending) { opacity: 0; visibility: hidden; transform: translateY(12px); pointer-events: none; }

/* ---------- focus and targets ---------- */
[data-template] :focus-visible { outline: 3px solid var(--t-focus); outline-offset: 2px; box-shadow: 0 0 0 5px var(--t-navy); }
[data-template] button { min-height: var(--t-target); }

@media (prefers-reduced-motion: reduce) {
  :where([data-template] *), :where([data-template] *::before), :where([data-template] *::after) { transition: none !important; animation: none !important; }
  :where([data-template] .spec-pending) { transform: none; }
  [data-template] .r-pin { transform: translate(-50%, -50%) !important; }
}
@media (forced-colors: active) {
  [data-template] { background: Canvas; color: CanvasText; }
  [data-template] .r-pin, [data-template] .r-pager button { border: 2px solid ButtonText; }
  :where([data-template] .t-scrim) { display: none; }
}

/* Gallery: several pictures in one region are equal tiles with equal gutters,
   whatever their media types. Photos cover their tile; figures are contained
   on the tile colour. screen_components.js fitGalleries picks the column count
   that shows the most of the pictures and sizes the tiles to the pictures'
   honest pixel size (--gallery-*); a short last row is centred. Without it the
   tiles share one row. A template only positions the group and may set
   --gallery-tile (tile colour) and --gallery-ground. */
[data-template] .r-figure-group {
  --gallery-n: var(--figure-count, 2);
  display: flex; flex-wrap: wrap; justify-content: center; align-content: center;
  gap: var(--gallery-gap, var(--t-gap-m)); width: 100%; height: 100%; min-height: 0; background: var(--gallery-ground, transparent);
}
[data-template] .r-figure-group[data-count="3"] { --figure-count: 3; }
[data-template] .r-figure-group[data-count="4"] { --figure-count: 4; }
[data-template] .r-figure-group[data-count="5"] { --figure-count: 5; }
[data-template] .r-figure-group[data-count="1"] { --figure-count: 1; }

/* Tiles keep each template's single-image absolute positioning local. */
[data-template] .r-figure-group > .r-figure {
  flex: none; position: relative !important; inset: auto !important; margin: 0 !important;
  width: var(--gallery-tile-w, calc((100% - (var(--gallery-n) - 1) * var(--gallery-gap, var(--t-gap-m))) / var(--gallery-n))) !important;
  height: var(--gallery-tile-h, 100%) !important;
  padding: 0 !important; background: var(--gallery-tile, var(--t-canvas)) !important; border-radius: var(--t-radius-s); overflow: hidden;
}
[data-template] .r-figure-group > .r-figure[data-media-type="figure"] { padding: var(--t-gap-s) !important; }
[data-template] .r-figure-group > .r-figure[data-media-type="figure"] img { border-radius: var(--t-radius-s); max-width: 100%; max-height: 100%; }
/* Tiles fill the gallery panel (fitGalleries sizes them to the whole cell, never to the honest
   pixel size); a tile whose picture covers less than FIGURE_FILL of it is a figure card too
   (fitFigureCards), so the tile reads as a card and counts as the picture. */
[data-template] .r-figure-group > .r-figure[data-figure-card] { border-radius: var(--t-radius-s); gap: 0; box-shadow: var(--t-shadow); }
/* Phone: the gallery leaves its fixed media box and stacks full-width tiles. */
@container (max-width: 640px) {
  [data-template] [data-region]:has(> .r-figure-group) { height: auto !important; min-height: 0 !important; flex: none !important; }
  [data-template] .r-figure-group {
    position: relative !important; inset: auto !important; width: 100% !important; height: auto !important;
    flex-direction: column; flex-wrap: nowrap;
  }
  [data-template] .r-figure-group > .r-figure { width: 100% !important; height: auto !important; aspect-ratio: 4 / 3; }
}
/* Figure-only title statement: a heading above the whole uncropped figure. */
[data-template="statement"]:not(:has([data-region="statement"] .r-text)) { display: flex; flex-direction: column; }
[data-template="statement"]:not(:has([data-region="statement"] .r-text)) .t-statement__panel { flex: none; padding-bottom: var(--t-gap-m); }
[data-template="statement"]:not(:has([data-region="statement"] .r-text)) .t-statement__body { display: none; }
[data-template="statement"]:not(:has([data-region="statement"] .r-text)) .t-statement__media { flex: 1; order: 0; min-height: 0; height: auto; }

/* Fitting measures copy where it will rest, not mid-way through a reveal. */
[data-template].t-measuring .spec-pending { transform: none !important; transition: none !important; }
/* A cover photo paints its own cell, so the cell is the photo, never a band of an
   ancestor's colour; canvas matches the backdrop baked into upgraded images. */
[data-template] .r-figure[data-media-type="photo"] { background: var(--t-canvas); }

/* Local leftovers: brand panels structure the existing copy and teaching imagery;
   the opt-in comes from resolved spec provenance, not a changed quality threshold. */
[data-brand-panel] .t-comparison__items .r-item,
[data-brand-panel] .t-checklist__items .r-item,
[data-brand-panel] .t-list-image__copy,
[data-brand-panel] .t-step-timeline__main { background: var(--t-sage-soft); }
[data-preserve-frame] { background: var(--t-sage-soft) !important; display: flex !important; align-items: center; justify-content: center; }
[data-preserve-frame] > img { object-fit: contain !important; flex: 0 1 auto; }

/* Full-frame teaching photographs get a substantial column beside the heading,
   not a tiny square in the middle of a panoramic strip. */
@container (min-width: 641px) {
  [data-template="statement"].t-statement:has([data-preserve-frame]) { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr); }
  [data-template="statement"].t-statement:has([data-preserve-frame]) .t-statement__panel { justify-content: center; }
}
[data-template="statement"].t-statement:has([data-preserve-frame]) .t-statement__media { background: var(--t-sage-soft); }

/* Reviewed spill lists: rows follow their text, leaving the teaching images room. */
[data-compact-cards].t-comparison .t-comparison__items { justify-content: center; }
[data-compact-cards].t-comparison .t-comparison__items .r-items,
[data-compact-cards].t-comparison .t-comparison__items .r-items:has(> li:nth-child(5)) {
  display: flex; flex-direction: column; flex: none; gap: var(--t-gap-m);
}
[data-compact-cards].t-comparison .t-comparison__items .r-item {
  flex: none; padding: var(--t-gap-m) var(--t-gap-l); justify-content: center;
}
[data-compact-cards].t-comparison .r-item-body { margin-top: 0; }
[data-compact-cards].t-comparison .r-item-body p { font-size: var(--t-fs-body-lg); line-height: 1.28; }
@container (min-width: 641px) {
  [data-compact-cards].t-comparison .t-comparison__body:has(> .t-comparison__media) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
}
@container (min-width: 641px) {
  /* A single portrait teaching print uses the full stage height beside the copy. */
  [data-compact-cards].t-comparison:has(.t-comparison__media > .r-figure) {
    display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  }
  [data-compact-cards].t-comparison:has(.t-comparison__media > .r-figure) .t-comparison__head { grid-column: 1; grid-row: 1; }
  [data-compact-cards].t-comparison:has(.t-comparison__media > .r-figure) .t-comparison__body { display: contents; }
  [data-compact-cards].t-comparison:has(.t-comparison__media > .r-figure) .t-comparison__items { grid-column: 1; grid-row: 2; }
  [data-compact-cards].t-comparison:has(.t-comparison__media > .r-figure) .t-comparison__media { grid-column: 2; grid-row: 1 / span 2; }
}

/* A figure the learner can enlarge (image.enlarge): the picture is the control, with a visible tag. */
.r-figure-zoom { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  min-height: 0; margin: 0; padding: 0; border: 0; background: none; cursor: zoom-in; }
.r-figure-zoom:focus-visible { outline: 3px solid var(--t-navy); outline-offset: 3px; }
.r-figure-zoom::after {
  content: "Click to enlarge"; position: absolute; right: 8px; bottom: 8px; padding: .25em .7em; border-radius: 99px;
  background: var(--t-navy); color: var(--t-paper); font-size: var(--t-fs-meta, 15px); line-height: 1.3; pointer-events: none;
}

/* An exercise says so above its title (template_renderer.EXERCISE_TEMPLATES). */
[data-template] .r-exercise-label {
  display: inline-block; width: fit-content; margin: 0 0 .35em; padding: .2em .75em; border-radius: 99px;
  background: var(--t-sage); color: var(--t-navy);
  font-size: var(--t-fs-meta, 15px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.4;
}

/* Checklist: things to verify, consider or keep up to date, each with a tick box. */
.t-checklist { display: flex; flex-direction: column; gap: var(--t-gap-l); padding: var(--t-gutter-y) var(--t-gutter); background: var(--t-canvas); }
.t-checklist__head { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--t-gap-s); flex: none; }
.t-checklist__title { display: flex; flex-direction: column; gap: var(--t-gap-s); }
.t-checklist__lead .r-text { font-size: var(--t-fs-lead); color: var(--t-navy); font-weight: 500; line-height: 1.3; }
.t-checklist__lead .r-text > .spec-icon { display: none; }
.t-checklist__body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--t-gap-xl); }
.t-checklist__body:has(> .t-checklist__media) { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.t-checklist__items { min-height: 0; display: flex; flex-direction: column; justify-content: safe center; }
.t-checklist__items .r-list { display: grid; gap: var(--t-gap-m); grid-template-columns: minmax(0, 1fr); align-content: center; grid-auto-rows: minmax(calc(6.2 * var(--t-u)), calc(8.4 * var(--t-u))); flex: 1; }
.t-checklist__items .r-list:has(> li:nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* With a picture and five or more items the rows keep their two columns (eight rows and
   the pager never fit one column beside a picture at 1280x600) and the picture takes the
   remaining third. Without a picture the composition is the approved one, untouched. */
.t-checklist__body:has(> .t-checklist__media):has(.r-list > li:nth-child(5)) { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.t-checklist__items .r-item {
  position: relative; display: flex; align-items: center; gap: var(--t-gap-m);
  background: var(--t-paper); border: 1px solid var(--t-line); border-radius: var(--t-radius);
  padding: var(--t-gap-m) var(--t-gap-l) var(--t-gap-m) var(--t-gap-m); min-height: calc(6.2 * var(--t-u));
}
.t-checklist__items .r-item > .spec-icon { display: none; }
.t-checklist__items .r-item::before {
  content: ""; flex: none; width: max(26px, calc(3 * var(--t-u))); height: max(26px, calc(3 * var(--t-u)));
  border-radius: var(--t-radius-s); background: var(--t-sage-soft); border: 2px solid var(--t-sage-deep);
}
.t-checklist__items .r-item::after {
  content: ""; position: absolute; left: calc(var(--t-gap-m) + max(26px, calc(3 * var(--t-u))) * .36); top: 50%;
  width: calc(max(26px, calc(3 * var(--t-u))) * .28); height: calc(max(26px, calc(3 * var(--t-u))) * .52);
  border: solid var(--t-navy); border-width: 0 max(2.5px, calc(.3 * var(--t-u))) max(2.5px, calc(.3 * var(--t-u))) 0;
  transform: translateY(-62%) rotate(45deg);
}
.t-checklist__items .r-item-body p { font-size: var(--t-fs-body-lg); line-height: 1.3; }
.t-checklist__media { position: relative; min-height: 0; }
.t-checklist__media .r-figure[data-media-type="photo"] { position: absolute; width: auto; height: auto; inset: 0; border-radius: var(--t-radius); }
.t-checklist__media { background: var(--t-canvas); }
.t-checklist__media .r-figure[data-media-type="figure"] img { border-radius: var(--t-radius); }
.t-checklist__media .r-figure[data-media-type="figure"] { --figure-card: var(--t-sage-soft); }

@container (max-width: 640px) {
  .t-checklist { overflow-y: auto; }
  .t-checklist__body, .t-checklist__body:has(> .t-checklist__media) { display: flex; flex-direction: column; flex: 1 0 auto; }
  .t-checklist__items .r-list:has(> li:nth-child(5)) { grid-template-columns: minmax(0, 1fr); }
  .t-checklist__items .r-list { grid-auto-rows: auto; flex: none; }
  .t-checklist__media { height: 220px; flex: none; }
}

/* Comparison: two to four options or categories as equal columns. */
.t-comparison { display: flex; flex-direction: column; gap: var(--t-gap-l); padding: var(--t-gutter-y) var(--t-gutter); background: var(--t-paper); }
.t-comparison__head { display: flex; flex-direction: column; gap: var(--t-gap-s); flex: none; }
.t-comparison__lead .r-text { font-size: var(--t-fs-lead); color: var(--t-navy); font-weight: 500; line-height: 1.3; }
.t-comparison__lead .r-text > .spec-icon { display: none; }
.t-comparison__body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--t-gap-xl); }
/* The picture column is as wide as one figure needs at the column's height (screen_components.js
   fitMediaColumns sets --media-col, 12% to 36% of the body), so a single picture shows large and
   fills its column; photos and galleries keep the 24% column and fill it edge to edge. */
.t-comparison__body:has(> .t-comparison__media) { grid-template-columns: minmax(0, 1fr) minmax(0, var(--media-col, 24%)); }
/* A photograph or gallery beside the options is a third of the body: the cards are mist on
   paper, so the picture is what paints the screen (visual bar, bare_screen). */
.t-comparison__body:has(> .t-comparison__media > .r-figure[data-media-type="photo"]),
.t-comparison__body:has(> .t-comparison__media > [data-count]) { grid-template-columns: minmax(0, 1fr) minmax(0, var(--media-col, 33%)); }
.t-comparison__items { min-height: 0; display: flex; flex-direction: column; }
.t-comparison__items .r-items { min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--t-gap-l); align-items: stretch; flex: 1; }
.t-comparison__items .r-item {
  --tone: var(--t-navy);
  position: relative; min-height: 0; display: flex; flex-direction: column; gap: var(--t-gap-m);
  padding: var(--t-gap-xl) var(--t-gap-l) var(--t-gap-l); border-radius: var(--t-radius);
  background: var(--t-mist); overflow: hidden;
}
.t-comparison__items .r-item::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: max(5px, calc(.6 * var(--t-u))); background: var(--tone); }
.t-comparison__items .r-item:nth-child(2) { --tone: var(--t-sage-deep); }
.t-comparison__items .r-item:nth-child(3) { --tone: var(--t-olive); }
.t-comparison__items .r-item:nth-child(4) { --tone: var(--t-sage); }
.t-comparison__items .r-item:nth-child(5) { --tone: var(--t-navy); }
.t-comparison__items .r-item:nth-child(6) { --tone: var(--t-sage-deep); }
/* Five or six options: a 3 x 2 grid of equal cells. */
.t-comparison__items .r-items:has(> li:nth-child(5)) { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: var(--t-gap-m); }
.t-comparison__items .r-items:has(> li:nth-child(5)) > .r-item { gap: var(--t-gap-s); padding: var(--t-gap-l) var(--t-gap-l) var(--t-gap-m); }
.t-comparison__items .r-items:has(> li:nth-child(5)) .r-item-body p { font-size: var(--t-fs-body-lg); line-height: 1.28; }
.t-comparison__items .r-item > .spec-icon { --t-icon-badge: max(44px, calc(6 * var(--t-u)));
  width: var(--t-icon-badge); height: var(--t-icon-badge); min-width: var(--t-icon-badge);
  padding: calc(var(--t-icon-badge) * .24); border-radius: 50%; background: var(--t-paper); color: var(--t-navy); stroke-width: 1.9;
}
.t-comparison__items .r-item-label { font-size: var(--t-fs-h2); }
.t-comparison__items .r-item-body { margin-top: auto; }
.t-comparison__items .r-item-body p { font-size: clamp(16px, calc(2.3 * var(--t-u)), 46px); line-height: 1.3; font-weight: 500; color: var(--t-navy); }
.t-comparison__items .r-item:has(.r-item-label) .r-item-body p { font-size: var(--t-fs-body); }
.t-comparison__media { position: relative; min-height: 0; background: var(--t-canvas); border-radius: var(--t-radius); overflow: hidden; }
.t-comparison__media .r-figure[data-media-type="photo"] { position: absolute; width: auto; height: auto; inset: 0; border-radius: var(--t-radius); }
.t-comparison__media .r-figure[data-media-type="figure"] { padding: var(--t-gap-m); }
/* Several pictures: the shared gallery (base.css) of white tiles on the canvas column. */
.t-comparison__media .r-figure-group { padding: var(--t-gap-s); --gallery-gap: var(--t-gap-s); --gallery-tile: var(--t-paper); }

@container (max-width: 640px) {
  .t-comparison { overflow-y: auto; }
  .t-comparison__body, .t-comparison__body:has(> .t-comparison__media) { display: flex; flex-direction: column; flex: 1 0 auto; }
  .t-comparison__items .r-items, .t-comparison__items .r-items:has(> li:nth-child(5)) { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .t-comparison__items .r-item { flex-direction: row; align-items: center; padding: var(--t-gap-l) var(--t-gap-m) var(--t-gap-m); }
  .t-comparison__items .r-item-body { margin-top: 0; }
  .t-comparison__items .r-item-body p { font-size: 17px; }
  .t-comparison__media { height: 260px; flex: none; }
  /* A preserved product shot (data-preserve-frame). Spill 071's sock photo is
     1024x2240 with off-white from y=0 to 347 and y=1883 to 2239. At phone the
     card is that product window (1024/1535): cover drops only the baked padding,
     object-position keeps all three socks, and the cell paints canvas so a photo
     classification is never a transparent letterbox. object-view-box stays none. */
  .t-comparison__media:has(> .r-figure[data-preserve-frame]) {
    height: auto; width: 100%; aspect-ratio: 1024 / 1535; flex: none; align-self: stretch;
    background: var(--t-canvas);
  }
  .t-comparison__media > .r-figure[data-media-type="photo"][data-preserve-frame],
  .t-comparison__media > .r-figure[data-preserve-frame] {
    position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0 !important;
    background: var(--t-canvas) !important; display: block !important;
  }
  .t-comparison__media > .r-figure[data-preserve-frame] > img {
    width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important;
    flex: none; aspect-ratio: auto;
    object-fit: cover !important; object-position: center 49.8% !important; object-view-box: none !important;
  }
}

/* Dense comparison grids keep their rows inside the body. If a long option
   still clips, trade card padding first, then use the normal body type size. */
@container (min-width: 641px) {
  .t-comparison.t-dense-1 .r-items:has(> li:nth-child(5)) > .r-item { padding: var(--t-gap-m); }
  .t-comparison.t-dense-2 .r-items:has(> li:nth-child(5)) .r-item-body p { font-size: var(--t-fs-body); line-height: 1.25; }
}

/* Do / don't: the right and wrong way side by side. Meaning is carried by the
   source label text and a tick / cross mark, never by colour alone. */
.t-do-dont { display: flex; flex-direction: column; justify-content: center; gap: var(--t-gap-l); padding: var(--t-gutter-y) var(--t-gutter); background: var(--t-canvas); }
.t-do-dont__head { display: flex; flex-direction: column; gap: var(--t-gap-s); flex: none; }
.t-do-dont__lead .r-text { font-size: var(--t-fs-lead); color: var(--t-navy); font-weight: 500; line-height: 1.3; max-width: 60ch; }
.t-do-dont__lead .r-text > .spec-icon { display: none; }
.t-do-dont__cols { flex: 0 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--t-gap-l); align-content: center; }
.t-do-dont__cols:not(:has(.r-figure)) { align-content: stretch; }
.t-do-dont__col {
  --tone: var(--t-go); display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  background: var(--t-paper); border-radius: var(--t-radius); box-shadow: 0 0 0 1px var(--t-line), var(--t-shadow);
  border-top: max(5px, calc(.6 * var(--t-u))) solid var(--tone);
}
.t-do-dont__col--dont { --tone: var(--t-stop); }
.t-do-dont__label { display: flex; align-items: center; gap: var(--t-gap-m); padding: var(--t-gap-m) var(--t-gap-l); flex: none; }
.t-do-dont__label .r-text { font-size: var(--t-fs-h2); font-weight: 750; letter-spacing: .04em; color: var(--tone); line-height: 1.1; }
.t-do-dont__label .r-text > .spec-icon { display: none; }
.t-do-dont__mark { position: relative; flex: none; width: max(32px, calc(3.8 * var(--t-u))); aspect-ratio: 1; border-radius: 50%; background: var(--tone); }
.t-do-dont__col--do .t-do-dont__mark::after {
  content: ""; position: absolute; left: 36%; top: 22%; width: 26%; height: 44%;
  border: solid var(--t-paper); border-width: 0 max(3px, calc(.38 * var(--t-u))) max(3px, calc(.38 * var(--t-u))) 0; transform: rotate(45deg);
}
.t-do-dont__col--dont .t-do-dont__mark::before, .t-do-dont__col--dont .t-do-dont__mark::after {
  content: ""; position: absolute; left: 27%; right: 27%; top: calc(50% - max(1.5px, calc(.19 * var(--t-u)))); height: max(3px, calc(.38 * var(--t-u)));
  background: var(--t-paper); border-radius: 2px; transform: rotate(45deg);
}
.t-do-dont__col--dont .t-do-dont__mark::before { transform: rotate(-45deg); }
.t-do-dont__items { flex: 1; min-height: 0; padding: 0 var(--t-gap-l) var(--t-gap-l); display: flex; flex-direction: column; }
.t-do-dont__items .r-items { flex: 1; min-height: 0; display: grid; gap: var(--t-gap-m); grid-auto-rows: minmax(0, 1fr); }
/* Picture-led items sit side by side as tiles. */
.t-do-dont__items .r-items:has(> .r-item > .r-figure) { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-auto-rows: auto; align-items: start; }
.t-do-dont__items .r-item { display: flex; flex-direction: column; gap: var(--t-gap-s); min-height: 0; }
.t-do-dont__items .r-item > .spec-icon { display: none; }
.t-do-dont__items .r-item > .r-figure { flex: none; height: auto; aspect-ratio: 1; max-height: calc(100cqh - 2 * var(--t-gutter-y) - 19 * var(--t-u)); min-height: 0; background: var(--t-canvas); border-radius: var(--t-radius); padding: var(--t-gap-s); }
.t-do-dont__items .r-item > .r-figure[data-media-type="photo"] { padding: 0; }
.t-do-dont__items .r-item:not(:has(.r-figure)) { flex-direction: row; align-items: flex-start; gap: var(--t-gap-m); padding: var(--t-gap-m) 0; border-bottom: 1px solid var(--t-line); }
.t-do-dont__items .r-item:not(:has(.r-figure))::before { content: ""; flex: none; width: max(8px, calc(.8 * var(--t-u))); aspect-ratio: 1; margin-top: .55em; border-radius: 50%; background: var(--tone); }
.t-do-dont__items .r-item-label { font-size: var(--t-fs-body-lg); }
.t-do-dont__items .r-item-body p { font-size: var(--t-fs-body-lg); line-height: 1.36; }

@container (max-width: 640px) {
  .t-do-dont { overflow-y: auto; }
  .t-do-dont__cols { grid-template-columns: minmax(0, 1fr); flex: 1 0 auto; }
  .t-do-dont__col { min-height: 260px; }
  .t-do-dont__items .r-items:has(> .r-item > .r-figure) { min-height: 180px; }
}

/* Document excerpt: the teaching content is a text-bearing figure of Bill's
   document (an SDS section, a plan scan, a form). One or two figures are shown
   as large as the stage allows, contained on --t-canvas and never cropped,
   each with an Enlarge control (data-source-zoom) so the text can be read. */
.t-document-excerpt { display: flex; flex-direction: column; gap: var(--t-gap-l); padding: var(--t-gutter-y) var(--t-gutter); background: var(--t-paper); }
.t-document-excerpt__head { display: flex; flex-direction: column; gap: var(--t-gap-s); flex: none; }
.t-document-excerpt .r-heading { font-size: var(--t-fs-h1-compact); }
.t-document-excerpt__lead .r-text { font-size: var(--t-fs-lead); line-height: 1.3; color: var(--t-navy); font-weight: 500; max-width: 64ch; }
.t-document-excerpt__lead .r-text > .spec-icon { display: none; }

.t-document-excerpt__body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--t-gap-xl); }
.t-document-excerpt__body:has(> .t-document-excerpt__caption) { grid-template-columns: minmax(0, 1fr) minmax(0, 30%); }
.t-document-excerpt__sheets { min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--t-gap-m); }
/* Each item is the painted sheet (the figure's own mount: visual bar, the figure fills
   its sheet) over its Enlarge control, centred in the stage. Items share the column's
   height equally (screen_components.js fitSheets sets each item's flex-basis, so sheet
   heights never depend on sheet widths) and each item is set to its figure's fitted
   width, so the canvas never stands as margins beside a page. */
.t-document-excerpt__item { flex: 0 1 auto; min-height: 0; max-width: 100%; display: flex; flex-direction: row; align-items: flex-end; gap: var(--t-gap-m); }
.t-document-excerpt__sheet {
  flex: 1 1 auto; min-width: 0; min-height: 0; max-width: 100%; align-self: stretch; display: flex; flex-direction: column;
  padding: var(--t-gap-m); border-radius: var(--t-radius); background: var(--t-canvas); box-shadow: inset 0 0 0 1px var(--t-line);
}
.t-document-excerpt__figure { flex: 1 1 auto; min-height: 0; }
.t-document-excerpt__figure .r-figure { height: 100%; }
.t-document-excerpt .t-document-excerpt__enlarge { flex: none; }
.t-document-excerpt__figure .r-figure img { background: var(--t-paper); box-shadow: 0 0 0 1px var(--t-line), var(--t-shadow); }
.t-document-excerpt .t-document-excerpt__enlarge {
  margin: 0; min-height: var(--t-target); padding: 0 max(16px, calc(1.8 * var(--t-u)));
  border: 2px solid var(--t-navy); border-radius: 99px; background: var(--t-paper); color: var(--t-navy); box-shadow: none;
  font: 650 var(--t-fs-meta)/1.2 var(--t-font); white-space: nowrap; cursor: zoom-in;
}
/* Wording rides on the accessible name, so the visible label always equals it. */
.t-document-excerpt .t-document-excerpt__enlarge::before { content: attr(aria-label) / ""; }
.t-document-excerpt .t-document-excerpt__enlarge:hover { background: var(--t-navy); color: var(--t-paper); }

.t-document-excerpt__title { display: none; }
/* A site document's provenance caption (data-site-document, PD-site-documents-stay): the plan name,
   section and printed page under the page on the paper side; dropped by the renderer when unset. */
.t-document-excerpt__source {
  display: flex; align-items: center; gap: .6em; margin: var(--t-gap-m) 0 0; font-size: var(--t-fs-meta); line-height: 1.35;
  font-weight: 600; color: var(--t-muted); text-wrap: pretty;
}
.t-document-excerpt__source::before {
  content: ""; flex: none; width: .8em; height: 1em; border-radius: 2px; border: 2px solid var(--t-muted);
  background: linear-gradient(var(--t-muted), var(--t-muted)) 50% 35% / 50% 2px no-repeat, linear-gradient(var(--t-muted), var(--t-muted)) 50% 65% / 50% 2px no-repeat;
}
/* In the split composition the provenance line has its own row under the figure's title line
   (the two shared the "title" cell and overlapped when that cell was only one line tall). */
.t-document-excerpt[data-excerpt-layout="split"] .t-document-excerpt__source { grid-area: source; align-self: start; margin-top: var(--t-gap-m); }
.t-document-excerpt__caption { min-height: 0; display: flex; flex-direction: column; justify-content: safe center; }
.t-document-excerpt__caption .r-list { display: grid; gap: var(--t-gap-m); }
.t-document-excerpt__caption .r-item { padding-left: var(--t-gap-m); border-left: max(3px, calc(.4 * var(--t-u))) solid var(--t-sage); }
.t-document-excerpt__caption .r-item > .spec-icon { display: none; }
.t-document-excerpt__caption .r-item-body p { font-size: var(--t-fs-body); line-height: 1.4; }

/* Split composition (visual bar): a single portrait or near-square page (figure aspect below
   3:2; screen_components.js fitSheets sets data-excerpt-layout="split" on desktop containers)
   would otherwise stand as a small page in the middle of a white stage. The sheet sits on a
   sage-soft panel that bleeds to the stage's left and bottom edges (--excerpt-panel, 52-58% of
   the stage, set by fitSheets to the width the full-height page and its Enlarge control need);
   the heading band stays across the top; the lead, the caption and the figure's title line
   (data-figure-title, the alt's own words) sit on paper beside it, centred as one block.
   Landscape strips and figure pairs keep the full-width sheets above. */
.t-document-excerpt[data-excerpt-layout="split"] {
  display: grid; column-gap: var(--t-gap-xl); row-gap: 0;
  grid-template-columns: minmax(0, var(--excerpt-panel, 46%)) minmax(0, 1fr);
  grid-template-rows: auto auto minmax(var(--t-gap-l), 1fr) auto auto auto auto minmax(var(--t-gap-l), 1fr);
  grid-template-areas: "rule rule" "heading heading" "panel ." "panel lead" "panel caption" "panel title" "panel source" "panel .";
}
.t-document-excerpt[data-excerpt-layout="split"] .t-document-excerpt__head,
.t-document-excerpt[data-excerpt-layout="split"] .t-document-excerpt__body { display: contents; }
.t-document-excerpt[data-excerpt-layout="split"] .t-rule { grid-area: rule; margin-bottom: var(--t-gap-s); }
.t-document-excerpt[data-excerpt-layout="split"] [data-region="heading"] { grid-area: heading; margin-bottom: var(--t-gap-l); }
.t-document-excerpt[data-excerpt-layout="split"] .t-document-excerpt__sheets {
  grid-area: panel; align-self: stretch; min-height: 0;
  margin: 0 0 calc(-1 * var(--t-gutter-y)) calc(-1 * var(--t-gutter));
  padding: var(--t-gap-m) var(--t-gap-l) calc(var(--t-gap-m) + var(--t-gutter-y)) calc(var(--t-gap-m) + var(--t-gutter));
  border-radius: 0 var(--t-radius) 0 0; background: var(--t-sage-soft);
}
.t-document-excerpt[data-excerpt-layout="split"] .t-document-excerpt__item { flex: none; }
.t-document-excerpt[data-excerpt-layout="split"] .t-document-excerpt__item[data-enlarge="below"] { flex-direction: column; align-items: center; }
.t-document-excerpt[data-excerpt-layout="split"] .t-document-excerpt__sheet { flex: none; align-self: auto; background: var(--t-paper); box-shadow: 0 0 0 1px var(--t-line), var(--t-shadow); }
.t-document-excerpt[data-excerpt-layout="split"] .t-document-excerpt__figure .r-figure img { box-shadow: none; }
.t-document-excerpt[data-excerpt-layout="split"] .t-document-excerpt__lead { grid-area: lead; }
.t-document-excerpt[data-excerpt-layout="split"] .t-document-excerpt__lead .r-text { max-width: none; }
.t-document-excerpt[data-excerpt-layout="split"] .t-document-excerpt__caption { grid-area: caption; display: block; }
.t-document-excerpt[data-excerpt-layout="split"]:has(.t-document-excerpt__lead) .t-document-excerpt__caption { margin-top: var(--t-gap-l); }
.t-document-excerpt[data-excerpt-layout="split"] .t-document-excerpt__title {
  grid-area: title; display: block; margin: 0; align-self: start;
  font-size: var(--t-fs-meta); line-height: 1.35; font-weight: 550; color: var(--t-muted); text-wrap: pretty;
}
.t-document-excerpt[data-excerpt-layout="split"]:has(.t-document-excerpt__lead, .t-document-excerpt__caption) .t-document-excerpt__title {
  margin-top: var(--t-gap-l); padding-top: var(--t-gap-m); border-top: 1px solid var(--t-line);
}
/* With neither lead nor caption the title line is the paper side's only copy: lead type. */
.t-document-excerpt[data-excerpt-layout="split"]:not(:has(.t-document-excerpt__lead, .t-document-excerpt__caption)) .t-document-excerpt__title {
  font-size: var(--t-fs-lead); line-height: 1.3; font-weight: 500; color: var(--t-navy);
}

@container (max-width: 640px) {
  .t-document-excerpt { overflow-y: auto; }
  .t-document-excerpt__body, .t-document-excerpt__body:has(> .t-document-excerpt__caption) { display: flex; flex-direction: column; flex: 1 0 auto; }
  .t-document-excerpt__sheets { flex: none; }
  .t-document-excerpt__item { flex: none !important; width: auto !important; flex-direction: column; align-items: stretch; gap: var(--t-gap-s); }
  .t-document-excerpt__sheet { flex: none; width: auto !important; padding: 10px; }
  /* Full width, natural height: the stage scrolls rather than shrinking the text. */
  .t-document-excerpt__figure, .t-document-excerpt__figure .r-figure { flex: none; height: auto; }
  .t-document-excerpt__figure .r-figure img { width: 100%; max-height: none; }
  .t-document-excerpt .t-document-excerpt__enlarge { width: 100%; background: var(--t-navy); color: var(--t-paper); }
}

/* Explore: a labelled graphic. Numbered pins open one detail at a time in a
   side card; the canvas is sized to the picture so pin percentages stay true. */
.t-explore { display: flex; flex-direction: column; gap: var(--t-gap-m); padding: var(--t-gutter-y) var(--t-gutter); background: var(--t-canvas); }
.t-explore__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--t-gap-l); flex: none; }
.t-explore__title { display: flex; flex-direction: column; gap: var(--t-gap-s); }
.t-explore .r-heading { font-size: var(--t-fs-h1-compact); }
.t-explore__intro .r-text { font-size: var(--t-fs-body); color: var(--t-muted); max-width: 46ch; }
.t-explore__stage { flex: 1; min-height: 0; }
.t-explore .r-explore { height: 100%; grid-template-columns: auto minmax(26%, 1fr); gap: var(--t-gap-xl); align-items: stretch; }
.t-explore .r-explore-canvas { align-self: center; width: fit-content; max-width: 100%; }
.t-explore .r-explore-canvas > .r-figure img {
  width: auto; max-width: calc(62 * var(--t-u)) !important;
  max-height: calc(100cqh - 2 * var(--t-gutter-y) - var(--t-fs-h1-compact) * 1.2 - var(--t-rule-h) - var(--t-gap-s) - var(--t-gap-m) - 2px) !important;
  box-shadow: var(--t-shadow);
}
.t-explore .r-pin { width: clamp(44px, calc(4.2 * var(--t-u)), 60px); height: clamp(44px, calc(4.2 * var(--t-u)), 60px); }
.t-explore .r-explore-side {
  display: flex; flex-direction: column; gap: var(--t-gap-m); min-height: 0; overflow: auto;
  padding: var(--t-gap-l); border-radius: var(--t-radius); background: var(--t-paper); box-shadow: 0 0 0 1px var(--t-line), var(--t-shadow);
}
.t-explore .r-explored {
  align-self: flex-start; white-space: nowrap; padding: .35em .9em; border-radius: 99px; background: var(--t-sage-soft); color: var(--t-navy);
}
/* While the narration plays the card stays hidden and the numbers cannot be opened (owner,
   2026-10-27); visibility keeps the layout still when the card appears. */
.t-explore .r-explore[data-explore-state="intro"] .r-explore-side { visibility: hidden; }
.t-explore .r-pin:disabled { opacity: 1; cursor: default; }
.t-explore .r-explore-hint { margin: 0; font-size: var(--t-fs-body); color: var(--t-navy); }
/* Empty state: until a pin is chosen the card shows a pin-and-pointer motif. */
.t-explore .r-explore-side:not(:has(.r-detail:not([hidden])))::after {
  content: ""; flex: 1; min-height: calc(12 * var(--t-u)); border-radius: var(--t-radius-s); border: 2px dashed var(--t-line-strong);
  background:
    radial-gradient(circle at 50% 46%, var(--t-navy) 0 calc(2.1 * var(--t-u)), var(--t-paper) calc(2.1 * var(--t-u)) calc(2.5 * var(--t-u)), rgb(168 198 173 / .55) calc(2.5 * var(--t-u)) calc(4.4 * var(--t-u)), transparent calc(4.4 * var(--t-u))),
    var(--t-canvas);
}
.t-explore .r-detail { display: flex; flex-direction: column; gap: var(--t-gap-s); padding-left: var(--t-gap-l); border-left: max(4px, calc(.5 * var(--t-u))) solid var(--t-sage); animation: t-explore-in .3s ease-out; }
@keyframes t-explore-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

@container (max-width: 640px) {
  .t-explore { overflow-y: auto; }
  .t-explore__head { flex-direction: column; align-items: flex-start; }
  .t-explore__stage { flex: 1 0 auto; }
  .t-explore .r-explore { grid-template-columns: minmax(0, 1fr); height: auto; }
  .t-explore .r-explore-canvas { width: 100%; }
  .t-explore .r-explore-canvas > .r-figure img { width: 100%; max-width: 100% !important; max-height: none !important; }
  .t-explore .r-explore-side:not(:has(.r-detail:not([hidden])))::after { min-height: 120px; }
}

/* Key fact: one number, code, limit or term set as the hero of the screen. */
.t-key-fact { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--t-paper); }
.t-key-fact:has(> .t-key-fact__media) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.t-key-fact__main { display: flex; flex-direction: column; gap: var(--t-gap-l); padding: var(--t-gutter-y) var(--t-gap-xl) var(--t-gutter-y) var(--t-gutter); min-height: 0; justify-content: safe center; }
.t-key-fact__head { display: flex; flex-direction: column; gap: var(--t-gap-s); }
.t-key-fact__card {
  position: relative; display: flex; flex-direction: column; gap: var(--t-gap-m);
  background: var(--t-navy); color: var(--t-paper); border-radius: var(--t-radius);
  padding: var(--t-gap-xl) var(--t-gap-xl) var(--t-gap-xl) calc(var(--t-gap-xl) + max(6px, calc(.7 * var(--t-u))));
  overflow: hidden;
}
.t-key-fact__card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: max(6px, calc(.7 * var(--t-u))); background: var(--t-sage); }
.t-key-fact__card::after {
  content: ""; position: absolute; right: calc(-6 * var(--t-u)); top: calc(-8 * var(--t-u));
  width: calc(22 * var(--t-u)); aspect-ratio: 1; border-radius: 50%; border: calc(.9 * var(--t-u)) solid rgb(168 198 173 / .16);
}
.t-key-fact__fact .r-text { position: relative; z-index: 1; font-size: var(--t-fs-stat); line-height: 1.04; font-weight: 720; letter-spacing: -.035em; color: var(--t-paper); text-wrap: balance; font-variant-numeric: lining-nums tabular-nums; }
.t-key-fact__fact .r-text > .spec-icon { display: none; }
.t-key-fact__body .r-text { position: relative; z-index: 1; font-size: var(--t-fs-body-lg); color: var(--t-sage-soft); line-height: 1.4; max-width: 46ch; }
.t-key-fact__body .r-text > .spec-icon { display: none; }
.t-key-fact__points .r-list { display: grid; gap: var(--t-gap-s); }
.t-key-fact__points .r-item { background: var(--t-mist); border-radius: var(--t-radius); padding: var(--t-gap-m) var(--t-gap-l); align-items: center; }
.t-key-fact__points .r-item > .spec-icon { color: var(--t-navy); }
.t-key-fact__points .r-item-body p { font-size: var(--t-fs-body-lg); line-height: 1.38; }
.t-key-fact__media { position: relative; min-height: 0; padding: var(--t-gutter-y) var(--t-gutter) var(--t-gutter-y) 0; }
.t-key-fact__media .r-figure[data-media-type="photo"] { position: absolute; width: auto; height: auto; inset: 0; }
/* Gallery tiles are cards with their own inset and shadow: the tiles, not a margin, fill the panel. */
.t-key-fact__media:has(> .r-figure-group) { padding: var(--t-gap-m); }
.t-key-fact__media .r-figure[data-media-type="figure"] img { border-radius: var(--t-radius); }
.t-key-fact__media .r-figure[data-media-type="figure"] { --figure-card: var(--t-sage-soft); }
/* No picture (visual bar: never text in boxes on white): the fact is set on a
   full-height navy panel and the points on a sage-soft panel beside it; with no
   points the navy panel is the whole stage. The main column spans the stage, so it
   is centred by construction (review round 1, spill 087/109). */
.t-key-fact:not(:has(> .t-key-fact__media)) { --kf-split: 57%; background: linear-gradient(90deg, var(--t-navy) 0 var(--kf-split), var(--t-sage-soft) var(--kf-split) 100%); }
.t-key-fact:not(:has(> .t-key-fact__media)):not(:has(> .t-key-fact__main > .t-key-fact__points)) { --kf-split: 100%; }
.t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__main { width: 100%; max-width: none; justify-self: center; display: grid; grid-template-columns: minmax(0, var(--kf-split)) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); column-gap: 0; row-gap: var(--t-gap-l); padding: 0; justify-content: stretch; }
.t-key-fact:not(:has(> .t-key-fact__media)):not(:has(> .t-key-fact__main > .t-key-fact__points)) .t-key-fact__main { grid-template-columns: minmax(0, 1fr); }
.t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__head { grid-column: 1; grid-row: 1; padding: var(--t-gutter-y) var(--t-gap-xl) 0 var(--t-gutter); }
.t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__head .r-heading { color: var(--t-paper); }
.t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__card { grid-column: 1; grid-row: 2; align-self: center; margin: 0 var(--t-gap-xl) var(--t-gutter-y) var(--t-gutter); background: transparent; border-radius: 0; padding: 0 0 0 calc(var(--t-gap-xl) + max(6px, calc(.7 * var(--t-u)))); overflow: visible; }
.t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__card::before { width: max(6px, calc(.7 * var(--t-u))); border-radius: 99px; }
.t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__card::after { display: none; }
.t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__fact .r-text { font-size: var(--t-fs-display); line-height: 1.02; }
.t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__points { grid-column: 2; grid-row: 1 / -1; align-self: center; padding: var(--t-gutter-y) var(--t-gutter) var(--t-gutter-y) var(--t-gap-xl); }
.t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__points .r-list { gap: var(--t-gap-m); }
.t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__points .r-item { background: var(--t-paper); box-shadow: 0 1px 0 var(--t-line), var(--t-shadow); border-top: max(3px, calc(.35 * var(--t-u))) solid var(--t-sage); }
.t-key-fact:not(:has(> .t-key-fact__media)):not(:has(> .t-key-fact__main > .t-key-fact__points)) .t-key-fact__head { padding-right: var(--t-gutter); }
.t-key-fact:not(:has(> .t-key-fact__media)):not(:has(> .t-key-fact__main > .t-key-fact__points)) .t-key-fact__card { margin-right: var(--t-gutter); max-width: calc(96 * var(--t-u)); }

@container (max-width: 640px) {
  /* The article is the stage and never scrolls itself: the picture keeps its band and the
     copy column scrolls when the stack is taller than the phone (the dense fallback). */
  .t-key-fact, .t-key-fact:has(> .t-key-fact__media) { display: flex; flex-direction: column; overflow: hidden; }
  .t-key-fact__main { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: var(--t-gutter-y) var(--t-gutter); justify-content: flex-start; }
  .t-key-fact__media { flex: none; height: 42%; min-height: 220px; padding: 0 var(--t-gutter) var(--t-gutter-y); }
  .t-key-fact__card { padding: var(--t-gap-l) var(--t-gap-l) var(--t-gap-l) calc(var(--t-gap-l) + 6px); }
  /* A gallery below the copy stacks full-width tiles taller than any phone (waste 022):
     the whole stage scrolls instead of the copy column, so no tile is cut off. */
  .t-key-fact:has(> .t-key-fact__media > .r-figure-group) { overflow-y: auto; }
  .t-key-fact:has(> .t-key-fact__media > .r-figure-group) .t-key-fact__main { flex: none; overflow: visible; }
  /* Stacked: the image-less panels become one navy block over the points. */
  .t-key-fact:not(:has(> .t-key-fact__media)) { --kf-split: 100%; background: var(--t-navy); }
  .t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__main { display: flex; flex-direction: column; gap: var(--t-gap-l); padding: var(--t-gutter-y) var(--t-gutter); }
  .t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__head, .t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__card, .t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__points { padding: 0; margin: 0; }
  .t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__card { padding-left: calc(var(--t-gap-l) + 6px); }
  .t-key-fact:not(:has(> .t-key-fact__media)) .t-key-fact__fact .r-text { font-size: var(--t-fs-statement); }
}

/* Density steps (screen_components.js fitTemplate): long facts step down from
   the stat size; body copy never drops below 15px, headings below 18px. */
.t-key-fact.t-dense-1 .t-key-fact__main { gap: var(--t-gap-m); }
.t-key-fact.t-dense-1 .t-key-fact__fact .r-text, .t-key-fact.t-dense-1:not(:has(> .t-key-fact__media)) .t-key-fact__fact .r-text { font-size: var(--t-fs-statement); line-height: 1.1; }
.t-key-fact.t-dense-1 .t-key-fact__card { padding: var(--t-gap-l) var(--t-gap-l) var(--t-gap-l) calc(var(--t-gap-l) + max(6px, calc(.7 * var(--t-u)))); gap: var(--t-gap-s); }
.t-key-fact.t-dense-2 .t-key-fact__fact .r-text, .t-key-fact.t-dense-2:not(:has(> .t-key-fact__media)) .t-key-fact__fact .r-text { font-size: var(--t-fs-h1-compact); }
.t-key-fact.t-dense-2 .t-key-fact__body .r-text, .t-key-fact.t-dense-2 .t-key-fact__points .r-item-body p { font-size: var(--t-fs-body); }
.t-key-fact.t-dense-2 .t-key-fact__points .r-item { padding: var(--t-gap-s) var(--t-gap-m); }
.t-key-fact.t-dense-3 .t-key-fact__fact .r-text, .t-key-fact.t-dense-3:not(:has(> .t-key-fact__media)) .t-key-fact__fact .r-text { font-size: var(--t-fs-h2); }
.t-key-fact.t-dense-3 .t-key-fact__main { gap: var(--t-gap-s); padding-top: var(--t-gap-l); padding-bottom: var(--t-gap-l); }
.t-key-fact.t-dense-3 .t-key-fact__points .r-list { gap: var(--t-gap-xs); }
/* Last resort: the copy column scrolls; the card never clips its own words. */
.t-key-fact.t-dense-scroll .t-key-fact__main { overflow-y: auto; justify-content: flex-start; }
.t-key-fact.t-dense-scroll .t-key-fact__card, .t-key-fact.t-dense-scroll .t-key-fact__points { flex: none; }

/* List with image: parallel points in icon rows beside one teaching image. */
.t-list-image { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--t-paper); }
.t-list-image:has(> .t-list-image__media) { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.t-list-image__copy { display: flex; flex-direction: column; gap: var(--t-gap-l); padding: var(--t-gutter-y) var(--t-gap-xl) var(--t-gutter-y) var(--t-gutter); min-height: 0; }
.t-list-image__head { display: flex; flex-direction: column; gap: var(--t-gap-s); }
.t-list-image__lead .r-text { font-size: var(--t-fs-lead); line-height: 1.32; color: var(--t-navy); font-weight: 500; max-width: 44ch; }
.t-list-image__lead .r-text > .spec-icon { display: none; }
.t-list-image__items { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: safe center; }
.t-list-image__items .r-list { display: grid; }
.t-list-image__items .r-item { align-items: center; padding: var(--t-gap-s) 0; border-bottom: 1px solid var(--t-line); }
.t-list-image__items .r-item:last-child { border-bottom: 0; }
.t-list-image__items .r-item > .spec-icon {
  width: var(--t-icon-badge); height: var(--t-icon-badge); min-width: var(--t-icon-badge);
  padding: calc(var(--t-icon-badge) * .24); border-radius: 50%; background: var(--t-sage-soft); color: var(--t-navy); stroke-width: 1.9;
}
.t-list-image__items .r-item-body p { font-size: var(--t-fs-body-lg); line-height: 1.32; }
.t-list-image__items .r-page { display: flex; flex-direction: column; justify-content: center; flex: 1; }
.t-list-image__items:has(.r-pager) { justify-content: space-between; }
/* No image: two balanced columns of rows. */
.t-list-image:not(:has(> .t-list-image__media)) .r-list:has(> li:nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--t-gap-xl); }

.t-list-image__media { position: relative; min-height: 0; }
.t-list-image__media::before { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 72%; background: var(--t-canvas); }
/* Visual bar: the band is the figure's mount; fitFigureCards fits the picture large
   into the cell (small sources included), so the band never stands behind a thumbnail. */
.t-list-image__media .r-figure[data-media-type="photo"] { position: absolute; width: auto; height: auto; inset: 0; }
.t-list-image__media .r-figure[data-media-type="figure"] { position: absolute; width: auto; height: auto; inset: var(--t-gutter-y) var(--t-gutter) var(--t-gutter-y) 0; }
.t-list-image__media .r-figure[data-media-type="figure"] img { border-radius: var(--t-radius); }
/* Several pictures: the shared gallery (base.css) of white tiles on the canvas band. */
.t-list-image__media:has(> .r-figure-group)::before { width: 100%; }
/* Gallery tiles are cards with their own inset and shadow, so the group sits close to the
   band's edges (the tiles, not a margin, fill the panel: visual bar figure_fill). */
.t-list-image__media .r-figure-group { position: absolute; inset: var(--t-gap-m); width: auto; height: auto; --gallery-tile: var(--t-paper); }

@container (max-width: 640px) {
  .t-list-image, .t-list-image:has(> .t-list-image__media) { display: flex; flex-direction: column; overflow-y: auto; }
  .t-list-image__media { order: -1; flex: none; height: 30%; min-height: 190px; }
  .t-list-image__media::before { width: 100%; }
  .t-list-image__media .r-figure-group { padding: 12px var(--t-gutter); }
  .t-list-image__media .r-figure[data-media-type="figure"] { inset: 12px var(--t-gutter); }
  .t-list-image__copy { flex: 1 0 auto; padding: var(--t-gutter-y) var(--t-gutter); }
  .t-list-image__items { justify-content: flex-start; }
  .t-list-image:not(:has(> .t-list-image__media)) .r-list:has(> li:nth-child(5)) { grid-template-columns: minmax(0, 1fr); }
}

/* Map: the coordinate-grounded site map. Reuses the v1 geo markup
   (.spec-geo-*: pan/zoom viewport, turbine pins, details, inventory) and
   restyles it in the v2 tokens. Hit areas stay >= 44px via the toolbar;
   dense turbine pins keep the v1 cluster behaviour. */
.t-map { display: flex; flex-direction: column; gap: var(--t-gap-m); padding: var(--t-gutter-y) var(--t-gutter); background: var(--t-canvas); }
.t-map__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--t-gap-s) var(--t-gap-l); flex: none; }
.t-map__title { display: flex; flex-direction: column; gap: var(--t-gap-s); }
.t-map .r-heading { font-size: var(--t-fs-h1-compact); }
.t-map__intro .r-text { font-size: var(--t-fs-body); color: var(--t-muted); max-width: 52ch; }
.t-map__body, .t-map__drainage { flex: 1; min-height: 0; }
.t-map__body > .spec-content { height: 100%; display: block; padding: 0; margin: 0; background: none; color: inherit; overflow: visible; }
/* The v1 geo markup wraps the layout in .spec-main and appends the static site
   diagram as .spec-media; the drainage tab shows that diagram, so the map panel
   keeps only the interactive layout, sized to the panel (never past the stage). */
.t-map__body > .spec-content > .spec-main { height: 100%; min-height: 0; box-sizing: border-box; padding: 0; }
.t-map__body > .spec-content > .spec-media { display: none; }
.t-map .spec-geo-layout { height: 100%; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: var(--t-gap-l); min-height: 0; }
.t-map .spec-geo-map { display: flex; flex-direction: column; gap: var(--t-gap-s); min-width: 0; min-height: 0; }
.t-map .spec-geo-toolbar { display: flex; align-items: center; gap: var(--t-gap-s); flex: none; }
.t-map .spec-geo-toolbar button {
  min-height: 44px; min-width: 44px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--t-line-strong);
  background: var(--t-paper); color: var(--t-navy); font: 650 var(--t-fs-meta)/1 var(--t-font); box-shadow: none;
}
.t-map .spec-geo-toolbar button:hover:not(:disabled) { box-shadow: 0 0 0 3px var(--t-sage); }
.t-map .spec-geo-toolbar span { margin-left: auto; font-size: var(--t-fs-meta); color: var(--t-muted); }
.t-map .spec-geo-viewport { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: var(--t-radius); background: var(--t-mist); box-shadow: 0 0 0 1px var(--t-line), var(--t-shadow); touch-action: none; cursor: grab; }
.t-map .spec-geo-plane, .t-map .spec-geo-pins { position: absolute; inset: 0; }
.t-map .spec-geo-plane { transform-origin: 0 0; pointer-events: none; }
.t-map .spec-geo-plane img { width: 100%; height: 100%; max-height: none; object-fit: fill; display: block; border-radius: 0; }
.t-map .spec-geo-pins { pointer-events: none; }
.t-map .spec-geo-pin {
  pointer-events: auto; position: absolute; transform: translate(-50%, -50%) !important; min-width: 0; min-height: 0; margin: 0; padding: 0;
  border: 2px solid var(--t-paper); border-radius: 50%; background: var(--t-navy); color: var(--t-paper);
  font: 700 15px/1 var(--t-font); font-variant-numeric: tabular-nums; box-shadow: 0 1px 4px rgb(23 32 51 / .4); cursor: pointer;
}
/* The glyph stays compact on the map; the touch target is 44px (geo_map.js keeps
   cluster centres at least 44px apart, so targets never overlap). */
.t-map .spec-geo-pin::before { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); border-radius: 50%; }
.t-map .spec-geo-pin:focus-visible { outline: 3px solid var(--t-focus); outline-offset: 2px; }
.t-map .spec-geo-pin[aria-expanded="true"] { background: var(--t-sage); color: var(--t-navy); border-color: var(--t-navy); }
.t-map .spec-geo-key { display: flex; flex-wrap: wrap; gap: var(--t-gap-xs) var(--t-gap-m); font-size: var(--t-fs-meta); color: var(--t-muted); flex: none; }
.t-map .spec-geo-side { display: flex; flex-direction: column; gap: var(--t-gap-m); min-height: 0; min-width: 0; }
.t-map .spec-geo-details, .t-map .spec-geo-inventory, .t-map__drain-list {
  flex: 1; min-height: 0; overflow: auto; padding: var(--t-gap-l); border-radius: var(--t-radius);
  box-shadow: 0 0 0 1px var(--t-line);
  /* Scroll cue: a shadow shows at whichever edge still has content beyond it.
     The paper covers ride with the content (local); the shadows stay put (scroll). */
  background:
    linear-gradient(var(--t-paper) 40%, transparent) top / 100% 28px no-repeat local,
    linear-gradient(transparent, var(--t-paper) 60%) bottom / 100% 28px no-repeat local,
    linear-gradient(color-mix(in srgb, var(--t-ink) 16%, transparent), transparent) top / 100% 16px no-repeat scroll,
    linear-gradient(transparent, color-mix(in srgb, var(--t-ink) 16%, transparent)) bottom / 100% 16px no-repeat scroll,
    var(--t-paper);
  scrollbar-width: thin; scrollbar-color: var(--t-line-strong) transparent;
}
.t-map .spec-geo-inventory:focus-visible, .t-map .spec-geo-details:focus-visible, .t-map__drain-list:focus-visible { outline: 3px solid var(--t-focus); outline-offset: 2px; }
.t-map .spec-geo-details { flex: 0 1 auto; max-height: 55%; border-left: max(4px, calc(.5 * var(--t-u))) solid var(--t-sage); }
.t-map .spec-geo-side h2 { margin: 0 0 var(--t-gap-s); font-size: var(--t-fs-h2); line-height: 1.2; color: var(--t-navy); }
.t-map .spec-geo-side p { margin: 0 0 var(--t-gap-s); font-size: var(--t-fs-body); line-height: 1.4; }
.t-map .spec-geo-hint { color: var(--t-muted); }


/* ---------- view switch: "Interactive map" / "Drainage & receiving waters" ---------- */
.t-map__views {
  display: flex; gap: 4px; padding: 4px; margin-left: auto; flex: none;
  border-radius: 99px; background: var(--t-mist); box-shadow: inset 0 0 0 1px var(--t-line);
}
.t-map .t-map__tab {
  min-height: var(--t-target); min-width: var(--t-target); margin: 0; padding: 0 max(16px, calc(1.8 * var(--t-u)));
  border: 0; border-radius: 99px; background: transparent; color: var(--t-navy); box-shadow: none;
  font: 650 var(--t-fs-meta)/1.2 var(--t-font); cursor: pointer; transition: background .15s, color .15s;
}
/* Wording rides on the accessible name, so the visible label always equals it. */
.t-map .t-map__tab::before, .t-map .t-map__enlarge::before { content: attr(aria-label) / ""; }
.t-map .t-map__tab[aria-selected="true"] { background: var(--t-navy); color: var(--t-paper); }
.t-map .t-map__tab:hover:not([aria-selected="true"]) { box-shadow: inset 0 0 0 2px var(--t-sage); }
.t-map .t-map__tab:focus-visible, .t-map .t-map__enlarge:focus-visible { outline: 3px solid var(--t-focus); outline-offset: 2px; }

/* ---------- drainage view: the whole labelled diagram, never cropped ---------- */
.t-map__drainage { display: flex; gap: var(--t-gap-l); }
.t-map__drainage[hidden] { display: none; }
/* The figure column is exactly as wide as the contained diagram at the panel's
   height; the side panel takes every remaining pixel. */
.t-map__diagram { flex: 0 1 auto; min-width: 0; height: 100%; cursor: zoom-in; }
.t-map__diagram .r-figure { width: auto; height: 100%; overflow: visible; justify-content: flex-start; }
.t-map__diagram .r-figure img {
  width: auto; height: 100%; max-width: 100%;
  border-radius: var(--t-radius); background: var(--t-paper); box-shadow: 0 0 0 1px var(--t-line), var(--t-shadow);
}
.t-map__drain-side { flex: 1 1 calc(30 * var(--t-u)); min-width: min(100%, 260px); min-height: 0; display: flex; flex-direction: column; gap: var(--t-gap-m); }
.t-map .t-map__enlarge {
  flex: none; align-self: flex-start; min-height: var(--t-target); margin: 0; padding: 0 max(16px, calc(1.8 * var(--t-u)));
  border: 1px solid var(--t-line-strong); border-radius: 99px; background: var(--t-paper); color: var(--t-navy); box-shadow: none;
  font: 650 var(--t-fs-meta)/1.2 var(--t-font); cursor: zoom-in;
}
.t-map .t-map__enlarge:hover { box-shadow: 0 0 0 3px var(--t-sage); }
.t-map__drain-list { border-left: max(4px, calc(.5 * var(--t-u))) solid var(--t-navy); }
.t-map__drain-list > * + * { margin-top: var(--t-gap-l); padding-top: var(--t-gap-l); border-top: 1px solid var(--t-line); }
.t-map__waters::before, .t-map__drain-list h2 {
  display: block; margin: 0 0 var(--t-gap-s);
  font-size: var(--t-fs-h2); line-height: 1.2; font-weight: 650; color: var(--t-navy);
}
.t-map__waters::before { content: attr(aria-label) / ""; }
.t-map .t-map__drain-list .spec-geo-inventory { max-height: none; padding: 0; box-shadow: none; background: none; overflow: visible; border-radius: 0; }
.t-map__drain-list .spec-geo-inventory[data-scroll-region] { overflow: visible !important; -webkit-mask-image: none; mask-image: none; }
.t-map__drain-list p { margin: 0 0 var(--t-gap-xs); font-size: var(--t-fs-meta); line-height: 1.4; }
.t-map__waters .r-list { display: flex; flex-direction: column; gap: var(--t-gap-xs); }
.t-map__waters .r-li { position: relative; padding-left: 1.1em; font-size: var(--t-fs-meta); }
.t-map__waters .r-li::before {
  content: ""; position: absolute; left: .1em; top: .55em; width: .45em; height: .45em; border-radius: 50%; background: var(--t-navy);
}
.t-map__waters .r-item-body p { margin: 0; line-height: 1.35; }
/* The diagram's own caveat closes the list. */
.t-map__waters .r-li:last-child { padding-left: 0; margin-top: var(--t-gap-xs); }
.t-map__waters .r-li:last-child::before { display: none; }
.t-map__waters .r-li:last-child p { color: var(--t-muted); font-size: var(--t-fs-meta); font-style: italic; }

.t-map__panel-enter { animation: t-map-view-in .18s ease-out; }
@keyframes t-map-view-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .t-map__panel-enter { animation: none; } .t-map .t-map__tab { transition: none; } }

@container (max-width: 640px) {
  .t-map { overflow-y: auto; }
  .t-map__head { flex-direction: column; align-items: flex-start; }
  .t-map__body { flex: 1 0 auto; }
  .t-map__body > .spec-content { height: auto; }
  .t-map .spec-geo-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: 420px auto; height: auto; }
  .t-map .spec-geo-details, .t-map .spec-geo-inventory { max-height: 260px; }
  .t-map .spec-geo-details { flex: none; }
  .t-map__views { width: 100%; margin-left: 0; }
  .t-map .t-map__tab { flex: 1 1 0; padding: 6px 10px; white-space: normal; }
  .t-map__drainage { flex: 1 0 auto; flex-direction: column; }
  .t-map__diagram { height: auto; }
  .t-map__diagram .r-figure, .t-map__diagram .r-figure img { width: 100%; height: auto; }
  .t-map__drain-side { flex: none; }
  .t-map .t-map__enlarge { align-self: stretch; }
  .t-map__drain-list { flex: none; overflow: visible; }
}

/* Photo with labels: a dominant picture and the short names of what is in it,
   set as callout tags whose leader lines run back toward the picture. */
.t-photo-labels { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); background: var(--t-paper); }
.t-photo-labels__media { position: relative; min-height: 0; }
.t-photo-labels__media .r-figure[data-media-type="photo"] { position: absolute; width: auto; height: auto; inset: 0; }
.t-photo-labels__media .r-figure[data-media-type="figure"] { position: absolute; width: auto; height: auto; inset: var(--t-gutter-y) var(--t-gap-l) var(--t-gutter-y) var(--t-gutter); }
.t-photo-labels__media .r-figure[data-media-type="figure"] { --figure-card: var(--t-sage-soft); }
.t-photo-labels__side {
  display: flex; flex-direction: column; gap: var(--t-gap-l); min-height: 0;
  padding: var(--t-gutter-y) var(--t-gutter) var(--t-gutter-y) var(--t-gap-xl); background: var(--t-canvas);
}
.t-photo-labels__head { display: flex; flex-direction: column; gap: var(--t-gap-s); }
.t-photo-labels__lead .r-text { font-size: var(--t-fs-lead); color: var(--t-navy); font-weight: 500; line-height: 1.3; }
.t-photo-labels__lead .r-text > .spec-icon { display: none; }
.t-photo-labels__labels { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: safe center; }
.t-photo-labels__labels .r-list { display: grid; gap: var(--t-gap-s); counter-reset: tag; }
.t-photo-labels__labels .r-item {
  position: relative; counter-increment: tag;
  display: flex; align-items: center; gap: var(--t-gap-m);
  padding: var(--t-gap-s) var(--t-gap-l) var(--t-gap-s) var(--t-gap-s);
  background: var(--t-paper); border-radius: 99px; box-shadow: 0 0 0 1px var(--t-line), 0 1px 3px rgb(23 32 51 / .06);
}
.t-photo-labels__labels .r-item::after {
  content: ""; position: absolute; right: 100%; top: 50%; width: var(--t-gap-xl); height: 2px; background: var(--t-sage);
}
.t-photo-labels__labels .r-item > .spec-icon {
  width: max(36px, calc(4 * var(--t-u))); height: max(36px, calc(4 * var(--t-u))); min-width: max(36px, calc(4 * var(--t-u)));
  padding: max(8px, calc(.95 * var(--t-u))); border-radius: 50%; background: var(--t-navy); color: var(--t-paper); stroke-width: 2;
}
.t-photo-labels__labels .r-item-body p { font-size: var(--t-fs-body-lg); font-weight: 600; color: var(--t-navy); line-height: 1.25; }

@container (max-width: 640px) {
  .t-photo-labels { display: flex; flex-direction: column; overflow-y: auto; }
  .t-photo-labels__media { flex: none; height: 34%; min-height: 220px; }
  .t-photo-labels__media .r-figure[data-media-type="figure"] { inset: 12px var(--t-gutter); }
  .t-photo-labels__side { flex: 1 0 auto; padding: var(--t-gutter-y) var(--t-gutter); }
  .t-photo-labels__labels .r-item::after { display: none; }
}

/* Density steps (screen_components.js fitTemplate) for long label lists on short
   stages; label text never drops below 15px. */
.t-photo-labels.t-dense-1 .t-photo-labels__side { gap: var(--t-gap-m); }
.t-photo-labels.t-dense-1 .t-photo-labels__labels .r-list { gap: var(--t-gap-xs); }
.t-photo-labels.t-dense-1 .t-photo-labels__labels .r-item { padding-top: var(--t-gap-xs); padding-bottom: var(--t-gap-xs); }
.t-photo-labels.t-dense-2 .t-photo-labels__labels .r-item > .spec-icon { width: 32px; height: 32px; min-width: 32px; padding: 7px; }
.t-photo-labels.t-dense-2 .t-photo-labels__labels .r-item-body p { font-size: var(--t-fs-body); }
.t-photo-labels.t-dense-3 .t-photo-labels__lead .r-text { font-size: var(--t-fs-body); }
.t-photo-labels.t-dense-3 .t-photo-labels__side { padding-top: var(--t-gap-l); padding-bottom: var(--t-gap-l); }
.t-photo-labels.t-dense-scroll .t-photo-labels__labels { overflow-y: auto; justify-content: flex-start; }

/* Plan card v2 (visual bar, 2026-10-05): facts drawn from this facility's SPCC plan
   as a full-stage data composition. Left (~55%): a navy facts panel with the heading
   under the sage rule, the headline fact(s) as hero figure typography (the renderer
   marks "Label: value" highlights as .r-hero-label / .r-hero-value; other highlights
   set as statements) and the plan citation as a chip. Right (~45%): a sage-soft data
   panel with the entries label, the entry list (two columns above seven, paged beyond
   fourteen by the shared pager) and the note as a footer line; a plan picture fills
   the top third above the list, or the whole panel when there are no entries.
   No white card floats on the canvas. */
.t-plan-card { --t-fit-min: .3; display: grid; grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); background: var(--t-navy); color: var(--t-paper); }
.t-plan-card:not(:has(> .t-plan-card__data > *)) { grid-template-columns: minmax(0, 1fr); }
.t-plan-card:not(:has(> .t-plan-card__data > *)) > .t-plan-card__data { display: none; }

/* ---------- facts panel ---------- */
.t-plan-card__facts {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: var(--t-gap-l); min-height: 0;
  padding: var(--t-gutter-y) var(--t-gap-xl) var(--t-gutter-y) var(--t-gutter); background: var(--t-navy); color: var(--t-paper);
}
.t-plan-card__facts::after {
  content: ""; position: absolute; right: calc(-12 * var(--t-u)); bottom: calc(-16 * var(--t-u)); width: calc(36 * var(--t-u)); aspect-ratio: 1;
  border-radius: 50%; border: calc(1.1 * var(--t-u)) solid rgb(168 198 173 / .14); pointer-events: none;
}
.t-plan-card__head, .t-plan-card__highlights, .t-plan-card__source { position: relative; z-index: 1; }
.t-plan-card__head { display: flex; flex-direction: column; gap: var(--t-gap-s); flex: none; }
.t-plan-card .r-heading { color: var(--t-paper); font-size: var(--t-fs-h1-compact); }
/* Highlights clip their own copy so the template fitter sees long display type and
   scales it (--t-fit, screen_components.js) down to the 18px floor. */
.t-plan-card__highlights { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.t-plan-card__highlights .r-list { display: flex; flex-direction: column; gap: var(--t-gap-l); }
.t-plan-card__highlights .r-item { display: block; padding-left: var(--t-gap-l); border-left: max(4px, calc(.5 * var(--t-u))) solid var(--t-sage); }
.t-plan-card__highlights .r-item > .spec-icon { display: none; }
.t-plan-card__highlights .r-item-body p {
  display: flex; flex-direction: column; gap: var(--t-gap-xs);
  font-size: max(18px, calc(var(--t-fit, 1) * clamp(20px, calc(3.3 * var(--t-u)), 66px))); line-height: 1.12; font-weight: 680; letter-spacing: -.02em;
  font-variant-numeric: lining-nums tabular-nums; text-wrap: balance; color: var(--t-paper);
}
/* Hero figure: the value large, its label in small caps beneath. */
.t-plan-card__highlights .r-hero-value { order: -1; display: block; font-size: max(18px, calc(var(--t-fit, 1) * clamp(28px, calc(5.2 * var(--t-u)), 104px))); line-height: 1.02; font-weight: 720; letter-spacing: -.03em; color: var(--t-paper); }
.t-plan-card__highlights .r-hero-label { display: block; font-size: max(15px, calc(var(--t-fit, 1) * clamp(15px, calc(1.5 * var(--t-u)), 30px))); line-height: 1.3; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--t-sage); }
/* Many short facts (three stacked) step the hero size down one notch. */
.t-plan-card__highlights .r-list:has(> li:nth-child(3)) .r-hero-value { font-size: max(18px, calc(var(--t-fit, 1) * clamp(24px, calc(4.2 * var(--t-u)), 84px))); }
.t-plan-card__highlights .r-list:has(> li:nth-child(3)) .r-item-body p { font-size: max(18px, calc(var(--t-fit, 1) * clamp(18px, calc(2.6 * var(--t-u)), 52px))); }
/* The plan citation as a chip. */
.t-plan-card__source { flex: none; }
.t-plan-card__source .r-text {
  display: inline-flex; align-items: center; gap: .6em; max-width: 100%; padding: .45em 1em .45em .8em; border-radius: 99px;
  background: var(--t-sage-soft); color: var(--t-navy); font-size: var(--t-fs-meta); line-height: 1.3; font-weight: 600;
}
.t-plan-card__source .r-text::before {
  content: ""; flex: none; width: .8em; height: 1em; border-radius: 2px; border: 2px solid var(--t-navy);
  background: linear-gradient(var(--t-navy), var(--t-navy)) 50% 35% / 50% 2px no-repeat, linear-gradient(var(--t-navy), var(--t-navy)) 50% 65% / 50% 2px no-repeat;
}
.t-plan-card__source .r-text > .spec-icon { display: none; }

/* ---------- data panel ---------- */
.t-plan-card__data { display: flex; flex-direction: column; gap: var(--t-gap-m); min-height: 0; padding: var(--t-gutter-y) var(--t-gutter) var(--t-gutter-y) var(--t-gap-xl); background: var(--t-sage-soft); color: var(--t-ink); }
/* The list never shrinks (it would overflow into the note); the picture above it gives way. */
.t-plan-card__detail { flex: 1 0 auto; min-height: 0; display: flex; flex-direction: column; gap: var(--t-gap-s); }
/* --t-muted on --t-sage-soft 5.61:1 (tokens.css); --t-olive reached only 4.13:1 at 15px bold. */
.t-plan-card__entries-label .r-text { font-size: var(--t-fs-meta); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--t-muted); }
.t-plan-card__entries-label .r-text > .spec-icon { display: none; }
.t-plan-card__entries { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: safe center; }
.t-plan-card__entries .r-list { display: grid; counter-reset: entry; }
.t-plan-card__entries .r-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: var(--t-gap-m);
  padding: var(--t-gap-s) 0; border-bottom: 1px solid var(--t-line-strong); counter-increment: entry;
}
.t-plan-card__entries .r-item:last-child { border-bottom: 0; }
.t-plan-card__entries .r-item > .spec-icon { display: none; }
.t-plan-card__entries .r-item::before { content: ""; grid-column: 1; align-self: center; width: max(10px, calc(1.1 * var(--t-u))); height: max(10px, calc(1.1 * var(--t-u))); border-radius: 2px; background: var(--t-navy); transform: rotate(45deg); }
.t-plan-card__entries .r-item > .r-item-body { grid-column: 2; }
.t-plan-card__entries .r-item-body p { font-size: var(--t-fs-body-lg); line-height: 1.3; font-variant-numeric: tabular-nums; color: var(--t-ink); }
/* Beside a plan picture the rows set compact (reading size, tight padding) so six entries,
   or a full fourteen-entry page with its pager, fit under the picture at 1280x600. */
.t-plan-card__data:has(.t-plan-card__media) .t-plan-card__entries .r-item { padding: var(--t-gap-xs) 0; }
.t-plan-card__data:has(.t-plan-card__media) .t-plan-card__entries .r-item-body p { font-size: var(--t-fs-body); }
/* The viewer wrapper is transparent to the data column's flex layout unless the screen
   shows a site document (below); its Enlarge control and caption exist only then. */
.t-plan-card__viewer { display: contents; }
.t-plan-card__enlarge, .t-plan-card__page-caption { display: none; }
/* More than seven entries: two balanced columns, read down then across. */
.t-plan-card__entries .r-list:has(> li:nth-child(8)) { display: block; columns: 2; column-gap: var(--t-gap-xl); }
.t-plan-card__entries .r-list:has(> li:nth-child(8)) > .r-item { break-inside: avoid; padding: 3px 0; }
.t-plan-card__entries .r-list:has(> li:nth-child(8)) .r-item-body p { font-size: var(--t-fs-body); line-height: 1.2; }
.t-plan-card__entries .r-page { display: flex; flex-direction: column; justify-content: safe center; flex: 1; min-height: 0; }
.t-plan-card__entries:has(.r-pager) { justify-content: space-between; }
.t-plan-card__entries .r-pager { margin-top: var(--t-gap-s); }
.t-plan-card__entries .r-pager button[data-page-prev] { background: var(--t-sage-soft); }
/* The note as a footer line. */
.t-plan-card__note { flex: none; padding-top: var(--t-gap-m); border-top: 1px solid var(--t-line-strong); }
.t-plan-card__note .r-text { font-size: var(--t-fs-meta); line-height: 1.35; color: var(--t-muted); }
.t-plan-card__note .r-text > .spec-icon { display: none; }
/* Plan pictures: the top third of the panel above the list, or the whole panel when
   there are no entries. Photos cover; figures sit on a paper card. */
.t-plan-card__media { position: relative; flex: 0 1 33%; min-height: calc(6 * var(--t-u)); border-radius: var(--t-radius); overflow: hidden; background: var(--t-paper); box-shadow: var(--t-shadow); }
.t-plan-card__data:not(:has(> .t-plan-card__detail)) > .t-plan-card__media { flex: 1 1 auto; }
.t-plan-card__media .r-figure[data-media-type="photo"] { position: absolute; width: auto; height: auto; inset: 0; }
.t-plan-card__media .r-figure[data-media-type="figure"] { position: absolute; width: auto; height: auto; inset: var(--t-gap-m); }
.t-plan-card__media .r-figure-group { position: absolute; inset: var(--t-gap-m); width: auto; height: auto; --gallery-tile: var(--t-canvas); }
/* Still clipping at the floor: the facts column scrolls; the panel keeps its height.
   (The stacked phone layout already scrolls as a whole.) */
@container (min-width: 641px) {
  .t-plan-card.t-dense-scroll .t-plan-card__highlights { overflow-y: auto; justify-content: flex-start; }
}

/* ---------- document viewer (PD-site-documents-stay, 2026-10-23) ----------
   The screen's picture is a page of this site's own SPCC plan, rendered from the certified
   PDF. The page is the primary image: the sage-soft viewer panel takes the wider column at
   full stage height, the page (the section first, when one is focused) fits it by aspect
   (screen_components.js fitDocumentViewer sizes each page to its box, so no paper stands as
   margins), with the whole page as a thumbnail that opens the Enlarge dialog, and the
   provenance caption ("From your SPCC Plan · §1.3 … · page 4") under it. The typed card is
   the transcription beside it: heading, hero facts and citation chip, then the entry list and
   note, all on the navy facts column. Nothing generated stands in for the page. */
.t-plan-card[data-site-document] {
  /* Display type never scales down here (the fitter skips --t-fit at 1): the entry list
     scrolls or pages inside its box instead, and the page keeps its Enlarge path. */
  --t-fit-min: 1;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "facts viewer" "detail viewer" "note viewer";
}
.t-plan-card[data-site-document] > .t-plan-card__data { display: contents; }
.t-plan-card[data-site-document] > .t-plan-card__facts { grid-area: facts; gap: var(--t-gap-m); overflow: visible; padding-bottom: var(--t-gap-s); }
.t-plan-card[data-site-document] .t-plan-card__highlights { flex: none; overflow: visible; }
.t-plan-card[data-site-document] .t-plan-card__highlights .r-list { gap: var(--t-gap-m); }
.t-plan-card[data-site-document] .t-plan-card__highlights .r-item-body p { font-size: max(18px, calc(var(--t-fit, 1) * clamp(18px, calc(2.1 * var(--t-u)), 36px))); }
.t-plan-card[data-site-document] .t-plan-card__highlights .r-hero-value { font-size: max(18px, calc(var(--t-fit, 1) * clamp(22px, calc(3.2 * var(--t-u)), 60px))); }
.t-plan-card[data-site-document] .t-plan-card__detail {
  grid-area: detail; flex: none; min-height: 0; overflow-y: auto;
  padding: 0 var(--t-gap-xl) var(--t-gap-m) var(--t-gutter); background: var(--t-navy); color: var(--t-paper);
}
/* The facts column is shorter than the data panel was: the pager stays in view at the foot of
   the list and the page of entries scrolls within it if it must, never under its own controls. */
.t-plan-card[data-site-document] .t-plan-card__detail { display: flex; flex-direction: column; overflow: hidden; }
.t-plan-card[data-site-document] .t-plan-card__entries { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: flex-start; }
.t-plan-card[data-site-document] .t-plan-card__entries .r-page { flex: 1 1 auto; min-height: 0; overflow-y: auto; justify-content: flex-start; }
.t-plan-card[data-site-document] .t-plan-card__entries .r-pager { flex: none; }
.t-plan-card[data-site-document] .t-plan-card__entries:has(.r-pager) { justify-content: flex-start; }
.t-plan-card[data-site-document] .t-plan-card__entries-label .r-text { color: var(--t-sage); }
.t-plan-card[data-site-document] .t-plan-card__entries .r-item { padding: 3px 0; border-bottom-color: rgb(255 255 255 / .18); }
.t-plan-card[data-site-document] .t-plan-card__entries .r-list:has(> li:nth-child(8)) > .r-item { padding: 2px 0; }
.t-plan-card[data-site-document] .t-plan-card__entries .r-item::before { background: var(--t-sage); }
.t-plan-card[data-site-document] .t-plan-card__entries .r-item-body p { font-size: var(--t-fs-body); color: var(--t-paper); }
.t-plan-card[data-site-document] .t-plan-card__entries .r-pager button { background: var(--t-paper); color: var(--t-navy); }
.t-plan-card[data-site-document] .t-plan-card__note {
  grid-area: note; padding: var(--t-gap-m) var(--t-gap-xl) var(--t-gutter-y) var(--t-gutter);
  background: var(--t-navy); border-top-color: rgb(255 255 255 / .18);
}
.t-plan-card[data-site-document] .t-plan-card__note .r-text { color: rgb(255 255 255 / .82); }
.t-plan-card[data-site-document] .t-plan-card__viewer {
  grid-area: viewer; display: flex; flex-direction: column; gap: var(--t-gap-s); min-height: 0;
  padding: var(--t-gap-l) var(--t-gutter) var(--t-gap-m) var(--t-gap-xl); background: var(--t-sage-soft); color: var(--t-ink);
}
.t-plan-card[data-site-document] .t-plan-card__media {
  position: relative; flex: 1 1 auto; min-height: 0; border-radius: 0; overflow: visible; background: transparent; box-shadow: none;
}
.t-plan-card[data-site-document] .t-plan-card__media .r-figure { position: absolute; inset: 0; width: auto; height: auto; margin: 0; display: flex; align-items: flex-start; justify-content: flex-start; }
.t-plan-card[data-site-document] .t-plan-card__media .r-figure img {
  display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain !important; object-position: 50% 50% !important;
  background: var(--t-paper); box-shadow: 0 0 0 1px var(--t-line), var(--t-shadow); border-radius: 2px;
}
/* Two pages side by side (§1.3, the contact pages), or the focused section with the whole page
   as a thumbnail beside it (the renderer marks each page's part: page, body, focus, full). */
.t-plan-card[data-site-document] .t-plan-card__media .r-figure-group {
  position: absolute; inset: 0; display: flex; gap: var(--t-gap-m); align-items: flex-start;
}
.t-plan-card[data-site-document] .t-plan-card__media .r-figure-group > .r-figure { position: relative; inset: auto; flex: 1 1 0; min-width: 0; min-height: 0; height: 100%; }
.t-plan-card[data-site-document] .t-plan-card__media .r-figure-group > [data-document-part="full"] { flex: 0 0 28%; }
.t-plan-card[data-site-document] .t-plan-card__media [data-document-part="full"] img { box-shadow: 0 0 0 1px var(--t-line); cursor: zoom-in; }
.t-plan-card[data-site-document] .t-plan-card__media .r-figure-caption { display: none; }
/* Any page opens the Enlarge dialog: fitDocumentViewer wraps each page in a zoom control. */
.t-plan-card[data-site-document] .t-plan-card__media .t-plan-card__page-zoom {
  display: block; margin: 0; padding: 0; border: 0; background: none; cursor: zoom-in; max-width: 100%; max-height: 100%; min-height: 0;
}
.t-plan-card[data-site-document] .t-plan-card__media .t-plan-card__page-zoom:focus-visible { outline: 3px solid var(--t-navy); outline-offset: 3px; }
.t-plan-card[data-site-document] .t-plan-card__enlarge {
  display: inline-flex; align-self: flex-start; margin: var(--t-gap-xs) 0 0; min-height: var(--t-target); padding: 0 max(16px, calc(1.8 * var(--t-u)));
  border: 2px solid var(--t-navy); border-radius: 99px; background: var(--t-paper); color: var(--t-navy); box-shadow: none;
  font: 650 var(--t-fs-meta)/1.2 var(--t-font); white-space: nowrap; cursor: zoom-in; align-items: center;
}
.t-plan-card[data-site-document] .t-plan-card__enlarge::before { content: attr(aria-label) / ""; }
.t-plan-card[data-site-document] .t-plan-card__enlarge:hover { background: var(--t-navy); color: var(--t-paper); }
.t-plan-card[data-site-document] .t-plan-card__page-caption {
  display: flex; align-items: center; gap: .6em; margin: 0; font-size: var(--t-fs-meta); line-height: 1.35; font-weight: 600; color: var(--t-muted); text-wrap: pretty;
}
.t-plan-card[data-site-document] .t-plan-card__page-caption::before {
  content: ""; flex: none; width: .8em; height: 1em; border-radius: 2px; border: 2px solid var(--t-muted);
  background: linear-gradient(var(--t-muted), var(--t-muted)) 50% 35% / 50% 2px no-repeat, linear-gradient(var(--t-muted), var(--t-muted)) 50% 65% / 50% 2px no-repeat;
}
@container (min-width: 641px) {
  /* The entry list, not the hero facts, gives way when the facts column runs short. */
  .t-plan-card[data-site-document].t-dense-scroll .t-plan-card__highlights { overflow: visible; }
  .t-plan-card[data-site-document].t-dense-scroll .t-plan-card__detail { overflow-y: auto; }
}

/* Phone: one scrolling column in the schema's stack order
   (heading, citation, highlights, entries_label, entries, image, note). */
@container (max-width: 640px) {
  .t-plan-card, .t-plan-card:not(:has(> .t-plan-card__data > *)) { display: flex; flex-direction: column; overflow-y: auto; --t-fit-min: 0; background: var(--t-sage-soft); }
  /* display: contents boxes clip nothing; overflow stays visible so no layout check reads
     the empty facts box as a clip of the heading. */
  .t-plan-card__facts, .t-plan-card__data { display: contents; overflow: visible; }
  .t-plan-card__facts::after { display: none; }
  /* The facts regions paint the navy field themselves; the data regions sit on the article's sage-soft. */
  .t-plan-card__head { order: 1; padding: var(--t-gutter-y) var(--t-gutter) 0; background: var(--t-navy); }
  .t-plan-card__source { order: 2; padding: var(--t-gap-m) var(--t-gutter) 0; background: var(--t-navy); }
  .t-plan-card__highlights { order: 3; flex: none; overflow: visible; padding: var(--t-gap-l) var(--t-gutter) var(--t-gutter-y); background: var(--t-navy); }
  .t-plan-card__detail { order: 4; flex: none; padding: var(--t-gutter-y) var(--t-gutter) 0; }
  .t-plan-card__media { order: 6; flex: none; height: 220px; margin: var(--t-gap-l) var(--t-gutter) 0; }
  .t-plan-card__note { order: 7; padding: var(--t-gap-l) var(--t-gutter) var(--t-gutter-y); border-top: 0; }
  .t-plan-card__entries .r-list:has(> li:nth-child(8)) { columns: 1; }
  .t-plan-card__highlights .r-hero-value { font-size: 34px; }
  .t-plan-card__highlights .r-item-body p { font-size: 22px; }
  /* Document viewer on a phone: the page at full width and natural height, before the list. */
  .t-plan-card[data-site-document] { display: flex; }
  .t-plan-card[data-site-document] .t-plan-card__viewer { display: contents; }
  /* The page keeps its natural height in the scrolling stack: no flex shrink (the desktop
     viewer's flex: 1 1 auto would squeeze it to the leftover space and let it spill over the list). */
  .t-plan-card[data-site-document] .t-plan-card__media { order: 4; flex: none; height: auto; min-height: auto; margin: var(--t-gap-l) var(--t-gutter) 0; }
  .t-plan-card[data-site-document] .t-plan-card__media .r-figure,
  .t-plan-card[data-site-document] .t-plan-card__media .r-figure-group,
  .t-plan-card[data-site-document] .t-plan-card__media .r-figure-group > .r-figure { position: static; display: block; flex: none; height: auto; }
  .t-plan-card[data-site-document] .t-plan-card__media .r-figure img { width: 100%; max-height: none; }
  .t-plan-card[data-site-document] .t-plan-card__media .r-figure-group > .r-figure + .r-figure { margin-top: var(--t-gap-m); }
  .t-plan-card[data-site-document] .t-plan-card__media .t-plan-card__page-zoom { width: 100%; }
  .t-plan-card[data-site-document] .t-plan-card__enlarge { order: 5; margin: var(--t-gap-s) var(--t-gutter) 0; }
  .t-plan-card[data-site-document] .t-plan-card__page-caption { order: 5; margin: var(--t-gap-s) var(--t-gutter) 0; }
  .t-plan-card[data-site-document] .t-plan-card__detail { order: 6; }
  .t-plan-card[data-site-document] .t-plan-card__note { order: 7; }
}

/* Fit the complete contact page before offering a scroll fallback. */
@container (min-width: 641px) {
  .t-plan-card[data-site-document] .t-plan-card__facts { padding-top: 12px; padding-bottom: 8px; gap: 8px; }
  .t-plan-card[data-site-document] .t-plan-card__detail { padding-bottom: 8px; }
  .t-plan-card[data-site-document] .t-plan-card__entries .r-item-body p { font-size: 15px; line-height: 1.2; }
  .t-plan-card[data-site-document] .t-plan-card__entries .r-item { padding: 2px 0; }
  .t-plan-card[data-site-document] .t-plan-card__note { padding-top: 4px; padding-bottom: 8px; }
}

/* Question frame: the surround for a runtime-rendered question. The heading and
   an answer-safe picture sit in a navy context column; the runtime fills
   [data-question-slot]. While the slot is empty (gallery, loading) it shows a
   neutral skeleton so the frame can be judged at its real proportions. */
.t-question-frame { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); background: var(--t-canvas); }
.t-question-frame__context {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: var(--t-gap-l); min-height: 0;
  padding: var(--t-gutter-y) var(--t-gap-xl) var(--t-gutter-y) var(--t-gutter); background: var(--t-navy); color: var(--t-paper);
}
.t-question-frame__context::after {
  content: ""; position: absolute; left: calc(-14 * var(--t-u)); bottom: calc(-16 * var(--t-u)); width: calc(28 * var(--t-u)); aspect-ratio: 1;
  border-radius: 50%; border: calc(1 * var(--t-u)) solid rgb(168 198 173 / .16); pointer-events: none;
}
.t-question-frame__head { display: flex; flex-direction: column; gap: var(--t-gap-s); position: relative; z-index: 1; }
.t-question-frame .r-heading { color: var(--t-paper); }
.t-question-frame__prompt .r-text { color: var(--t-sage-soft); font-size: var(--t-fs-body-lg); }
.t-question-frame__prompt .r-text > .spec-icon { display: none; }
.t-question-frame__media { position: relative; flex: 1; min-height: 0; z-index: 1; }
.t-question-frame__media .r-figure { position: absolute; width: auto; height: auto; inset: 0; border-radius: var(--t-radius); }
.t-question-frame__media .r-figure[data-media-type="figure"] img { border-radius: var(--t-radius); background: var(--t-paper); box-shadow: 0 0 0 max(4px, calc(.5 * var(--t-u))) var(--t-paper); }
/* The site's own document as the question's picture (data-site-document, PD-site-documents-stay):
   the page fits its box by aspect (screen_components.js fitDocumentViewer), opens the Enlarge
   dialog, and carries its provenance caption. Neither control exists for any other picture. */
.t-question-frame__enlarge, .t-question-frame__page-caption { display: none; }
/* Any document figure in the question's picture (the site's own plan page or diagram) opens the
   Enlarge dialog; a photograph has nothing to read and keeps no control. */
.t-question-frame__context:has(.r-figure[data-media-type="figure"]) .t-question-frame__enlarge {
  display: inline-flex; align-items: center; align-self: flex-start; position: relative; z-index: 1; margin: 0; min-height: var(--t-target);
  padding: 0 max(16px, calc(1.8 * var(--t-u))); border: 2px solid var(--t-paper); border-radius: 99px; background: transparent; color: var(--t-paper);
  box-shadow: none; font: 650 var(--t-fs-meta)/1.2 var(--t-font); white-space: nowrap; cursor: zoom-in;
}
.t-question-frame__context:has(.r-figure[data-media-type="figure"]) .t-question-frame__enlarge::before { content: attr(aria-label) / ""; }
.t-question-frame__context:has(.r-figure[data-media-type="figure"]) .t-question-frame__enlarge:hover { background: var(--t-paper); color: var(--t-navy); }
.t-question-frame[data-site-document] .t-question-frame__media .r-figure { display: flex; align-items: flex-start; justify-content: flex-start; border-radius: 0; }
.t-question-frame[data-site-document] .t-question-frame__media .r-figure img {
  display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain !important; object-position: 50% 50% !important;
  border-radius: 2px; background: var(--t-paper); box-shadow: 0 0 0 1px var(--t-line), var(--t-shadow); cursor: zoom-in;
}
.t-question-frame[data-site-document] .t-question-frame__media .t-plan-card__page-zoom {
  display: block; margin: 0; padding: 0; border: 0; background: none; cursor: zoom-in; max-width: 100%; max-height: 100%; min-height: 0;
}
.t-question-frame[data-site-document] .t-question-frame__media .t-plan-card__page-zoom:focus-visible { outline: 3px solid var(--t-paper); outline-offset: 3px; }
.t-question-frame[data-site-document] .t-question-frame__enlarge {
  display: inline-flex; align-items: center; align-self: flex-start; position: relative; z-index: 1; margin: 0; min-height: var(--t-target);
  padding: 0 max(16px, calc(1.8 * var(--t-u))); border: 2px solid var(--t-paper); border-radius: 99px; background: transparent; color: var(--t-paper);
  box-shadow: none; font: 650 var(--t-fs-meta)/1.2 var(--t-font); white-space: nowrap; cursor: zoom-in;
}
.t-question-frame[data-site-document] .t-question-frame__enlarge::before { content: attr(aria-label) / ""; }
.t-question-frame[data-site-document] .t-question-frame__enlarge:hover { background: var(--t-paper); color: var(--t-navy); }
.t-question-frame[data-site-document] .t-question-frame__page-caption {
  display: block; position: relative; z-index: 1; margin: 0; font-size: var(--t-fs-meta); line-height: 1.35; font-weight: 600; color: var(--t-sage-soft); text-wrap: pretty;
}
.t-question-frame__slot { min-width: 0; min-height: 0; overflow: auto; display: flex; flex-direction: column; justify-content: center; padding: var(--t-gutter-y) var(--t-gutter); }
.t-question-frame__slot:empty {
  --bar: max(18px, calc(2.2 * var(--t-u)));
  margin: var(--t-gutter-y) var(--t-gutter); padding: 0; border-radius: var(--t-radius);
  background:
    linear-gradient(var(--t-line) 0 0) var(--t-gap-xl) var(--t-gap-xl) / 70% var(--bar) no-repeat,
    linear-gradient(var(--t-line) 0 0) var(--t-gap-xl) calc(var(--t-gap-xl) + var(--bar) * 1.6) / 46% var(--bar) no-repeat,
    linear-gradient(var(--t-mist) 0 0) var(--t-gap-xl) calc(var(--t-gap-xl) + var(--bar) * 4) / calc(100% - 2 * var(--t-gap-xl)) calc(var(--bar) * 2.6) no-repeat,
    linear-gradient(var(--t-mist) 0 0) var(--t-gap-xl) calc(var(--t-gap-xl) + var(--bar) * 7.2) / calc(100% - 2 * var(--t-gap-xl)) calc(var(--bar) * 2.6) no-repeat,
    linear-gradient(var(--t-mist) 0 0) var(--t-gap-xl) calc(var(--t-gap-xl) + var(--bar) * 10.4) / calc(100% - 2 * var(--t-gap-xl)) calc(var(--bar) * 2.6) no-repeat,
    linear-gradient(var(--t-navy) 0 0) calc(100% - var(--t-gap-xl)) calc(100% - var(--t-gap-xl)) / calc(var(--bar) * 7) calc(var(--bar) * 2.2) no-repeat,
    var(--t-paper);
  box-shadow: 0 0 0 1px var(--t-line), var(--t-shadow);
}

/* ---------- runtime question inside the slot ----------
   The runtime renders .screen-title (prompt), form > fieldset (choice options,
   hotspot canvas, matching board, sequencing list), the Submit button and a
   .feedback status. Every rule is qualified by the slot so it outranks the v1
   player's .screen.assessment rules without !important. */
.t-question-frame .t-question-frame__slot:not(:empty) { gap: var(--t-gap-m); padding-block: var(--t-gap-m); justify-content: safe center; overscroll-behavior: contain; }
.t-question-frame .t-question-frame__slot > .screen-title {
  margin: 0; max-width: 34em; color: var(--t-navy); font-family: var(--t-font); font-weight: 700; letter-spacing: -.01em;
  font-size: clamp(18px, calc(2.45 * var(--t-u)), 50px); line-height: 1.25; text-wrap: pretty;
}
.t-question-frame .t-question-frame__slot > [data-assessment] {
  align-self: stretch; max-width: 46em; max-height: none; overflow: visible; padding: 0; margin: 0;
  border: 0; background: transparent; font-size: var(--t-fs-body); color: var(--t-ink);
}
.t-question-frame .t-question-frame__slot form { display: flex; flex-direction: column; align-items: flex-start; gap: var(--t-gap-m); margin: 0; }
.t-question-frame .t-question-frame__slot fieldset { align-self: stretch; min-width: 0; margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: var(--t-gap-s); }

/* Choice options: full-width cards with a 44px+ target and a drawn radio. */
.t-question-frame .t-question-frame__slot .option {
  position: relative; display: flex; align-items: center; gap: var(--t-gap-m); margin: 0; min-height: 52px;
  padding: var(--t-gap-m) var(--t-gap-l); border: 2px solid var(--t-line); border-radius: var(--t-radius);
  background: var(--t-paper); color: var(--t-ink); cursor: pointer; line-height: 1.35;
  font-size: var(--t-fs-body-lg); font-weight: 600; box-shadow: 0 1px 2px rgb(23 32 51 / .06);
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.t-question-frame .t-question-frame__slot .option input {
  appearance: none; flex: none; width: max(22px, calc(2.3 * var(--t-u))); height: max(22px, calc(2.3 * var(--t-u))); margin: 0;
  border: 2px solid var(--t-line-strong); border-radius: 50%; background: var(--t-paper); cursor: inherit;
}
.t-question-frame .t-question-frame__slot .option:hover { border-color: var(--t-navy); }
.t-question-frame .t-question-frame__slot .option:has(input:checked) { border-color: var(--t-navy); background: var(--t-mist); box-shadow: inset max(4px, calc(.5 * var(--t-u))) 0 0 var(--t-sage); }
.t-question-frame .t-question-frame__slot .option input:checked { border-color: var(--t-navy); background: radial-gradient(circle, var(--t-navy) 0 42%, var(--t-paper) 47%); }
.t-question-frame .t-question-frame__slot .option:has(input:focus-visible) { outline: 3px solid var(--t-focus); outline-offset: 2px; }
.t-question-frame .t-question-frame__slot .option input:focus-visible { outline: none; }
.t-question-frame .t-question-frame__slot .option:has(input:disabled) { cursor: default; }
.t-question-frame .t-question-frame__slot .option:has(input:disabled):not(:has(input:checked)) { opacity: .62; }
.t-question-frame .t-question-frame__slot .option:has(input:disabled):hover:not(:has(input:checked)) { border-color: var(--t-line); }

/* Submit and secondary buttons. */
.t-question-frame .t-question-frame__slot button {
  min-height: 48px; min-width: 0; margin: 0; padding: var(--t-gap-s) var(--t-gap-xl); border: 2px solid var(--t-navy); border-radius: 999px;
  background: var(--t-navy); color: var(--t-paper); font: 700 var(--t-fs-body)/1.2 var(--t-font); white-space: normal; text-align: center; cursor: pointer; box-shadow: none;
}
.t-question-frame .t-question-frame__slot form > button[type=submit] { position: sticky; bottom: 0; z-index: 1; box-shadow: 0 0 0 max(6px, calc(.8 * var(--t-u))) var(--t-canvas); margin: 0; min-height: 48px; }
.t-question-frame .t-question-frame__slot button:hover:not(:disabled) { background: var(--t-navy-deep); border-color: var(--t-navy-deep); }
.t-question-frame .t-question-frame__slot button:focus-visible { outline: 3px solid var(--t-focus); outline-offset: 3px; }
.t-question-frame .t-question-frame__slot button:disabled { opacity: 1; background: var(--t-line); border-color: var(--t-line); color: var(--t-muted); cursor: not-allowed; }
.t-question-frame .t-question-frame__slot button.secondary { min-height: 44px; padding: var(--t-gap-xs) var(--t-gap-m); background: var(--t-paper); color: var(--t-navy); border-color: var(--t-line-strong); font-size: var(--t-fs-meta); }

/* Feedback: a status card under Submit. */
.t-question-frame .t-question-frame__slot .feedback {
  align-self: stretch; margin: 0; padding: var(--t-gap-m) var(--t-gap-l); border: 0; border-left: max(4px, calc(.5 * var(--t-u))) solid var(--t-line-strong);
  border-radius: var(--t-radius-s); background: var(--t-paper); color: var(--t-ink); font-size: var(--t-fs-body); line-height: var(--t-lh-body);
}
.t-question-frame .t-question-frame__slot .feedback:empty { display: none; }
.t-question-frame .t-question-frame__slot .feedback > strong { display: block; margin-bottom: var(--t-gap-xs); font-size: var(--t-fs-body-lg); }
.t-question-frame .t-question-frame__slot .feedback.correct { border-left-color: var(--t-go); background: var(--t-sage-soft); }
.t-question-frame .t-question-frame__slot .feedback.correct > strong { color: var(--t-go); }
.t-question-frame .t-question-frame__slot .feedback.incorrect { border-left-color: var(--t-stop); background: #fbeeec; }
.t-question-frame .t-question-frame__slot .feedback.incorrect > strong { color: var(--t-stop); }

/* Sequencing: numbered rows with Move up / Move down, compact enough for 7 steps. */
.t-question-frame .t-question-frame__slot .sequence-list { margin: 0; padding: 0; list-style: none; counter-reset: sequence; display: flex; flex-direction: column; gap: max(6px, calc(.6 * var(--t-u))); }
.t-question-frame .t-question-frame__slot .sequence-row {
  counter-increment: sequence; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--t-gap-xs);
  margin: 0; padding: 0 2px 0 var(--t-gap-m); border: 1px solid var(--t-line-strong); border-radius: var(--t-radius);
  background: var(--t-paper); font-size: var(--t-fs-body); line-height: 1.25; cursor: grab;
}
.t-question-frame .t-question-frame__slot .sequence-row > span { padding-block: max(4px, calc(.3 * var(--t-u))); }
.t-question-frame .t-question-frame__slot .sequence-row > span::before { content: counter(sequence) "."; display: inline-block; min-width: 1.6em; color: var(--t-olive); font-weight: 700; font-variant-numeric: tabular-nums; }
.t-question-frame .t-question-frame__slot .sequence-row button.secondary { min-height: 44px; border: 0; border-radius: var(--t-radius-s); background: transparent; color: var(--t-navy); text-decoration: underline; text-underline-offset: .2em; text-decoration-color: var(--t-line-strong); }
.t-question-frame .t-question-frame__slot .sequence-row button.secondary:hover:not(:disabled) { background: var(--t-mist); }
.t-question-frame .t-question-frame__slot .sequence-row button.secondary:disabled { background: transparent; color: var(--t-muted); }
.t-question-frame .t-question-frame__slot .sequence-row:focus-visible { outline: 3px solid var(--t-focus); outline-offset: 2px; }

/* Matching: cards beside dashed drop targets; select fallback below. */
.t-question-frame .t-question-frame__slot .match-board { display: grid; grid-template-columns: 1fr 1fr; gap: var(--t-gap-l); margin: 0; }
.t-question-frame .t-question-frame__slot .match-sources, .t-question-frame .t-question-frame__slot .match-targets { gap: var(--t-gap-s); min-height: 0; }
.t-question-frame .t-question-frame__slot .match-card { min-height: 44px; padding: var(--t-gap-s) var(--t-gap-m); border: 2px solid var(--t-navy); border-radius: var(--t-radius); background: var(--t-paper); font-size: var(--t-fs-body); }
.t-question-frame .t-question-frame__slot .match-target { min-height: 44px; padding: var(--t-gap-s); border: 2px dashed var(--t-line-strong); border-radius: var(--t-radius); background: var(--t-paper); font-size: var(--t-fs-body); }
.t-question-frame .t-question-frame__slot .match-target-label { font-weight: 600; color: var(--t-navy); }
.t-question-frame .t-question-frame__slot .match-card:focus-visible, .t-question-frame .t-question-frame__slot .match-target:focus-visible { outline: 3px solid var(--t-focus); outline-offset: 2px; }
.t-question-frame .t-question-frame__slot .match-fallback { font-size: var(--t-fs-body); }
.t-question-frame .t-question-frame__slot .match-fallback summary { min-height: 44px; display: flex; align-items: center; color: var(--t-navy); font-weight: 600; cursor: pointer; }
.t-question-frame .t-question-frame__slot .match-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--t-gap-m); align-items: center; margin: var(--t-gap-s) 0; }
.t-question-frame .t-question-frame__slot .match-row select { min-height: 44px; font: inherit; font-size: var(--t-fs-body); }

/* Hotspot: the unannotated photo fills the slot width. */
.t-question-frame .t-question-frame__slot .hotspot-canvas { width: 100%; margin: 0; border-radius: var(--t-radius); overflow: hidden; }
.t-question-frame .t-question-frame__slot .hotspot-region { min-width: 44px; min-height: 44px; }

@container (max-width: 640px) {
  .t-question-frame { display: flex; flex-direction: column; overflow-y: auto; }
  .t-question-frame__context { flex: none; padding: var(--t-gutter-y) var(--t-gutter); }
  .t-question-frame__media { flex: none; height: 180px; }
  .t-question-frame__slot { flex: 1 0 auto; padding: var(--t-gutter-y) var(--t-gutter); }
  .t-question-frame__slot:empty { min-height: 420px; }
  .t-question-frame .t-question-frame__slot:not(:empty) { overflow: visible; justify-content: flex-start; padding-block: var(--t-gutter-y) calc(var(--t-gutter-y) * 2); }
  .t-question-frame .t-question-frame__slot form > button[type=submit] { position: static; }
  .t-question-frame .t-question-frame__slot .sequence-row { grid-template-columns: auto auto 1fr; padding-top: var(--t-gap-xs); }
  .t-question-frame .t-question-frame__slot .sequence-row > span { grid-column: 1 / -1; }
  .t-question-frame .t-question-frame__slot .sequence-row button.secondary { padding-inline: var(--t-gap-s); }
  .t-question-frame .t-question-frame__slot .match-board,
  .t-question-frame .t-question-frame__slot .match-row { grid-template-columns: 1fr; }
}

/* Recap / key points: objectives, takeaways or "what to remember" as icon cards. */
.t-recap { display: grid; grid-template-columns: minmax(0, 30%) minmax(0, 1fr); background: var(--t-canvas); }
.t-recap__band {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: var(--t-gap-m);
  padding: var(--t-gutter-y) var(--t-gap-xl) var(--t-gutter-y) var(--t-gutter); background: var(--t-navy); color: var(--t-paper);
}
.t-recap .r-heading { color: var(--t-paper); font-size: var(--t-fs-h1); position: relative; }
.t-recap__lead .r-text { position: relative; color: var(--t-sage-soft); font-size: var(--t-fs-body-lg); line-height: 1.38; }
.t-recap__lead .r-text > .spec-icon { display: none; }
.t-recap__ornament {
  position: absolute; left: calc(-10 * var(--t-u)); bottom: calc(-12 * var(--t-u)); width: calc(30 * var(--t-u)); aspect-ratio: 1;
  border-radius: 50%; border: calc(1.1 * var(--t-u)) solid rgb(168 198 173 / .18);
}
.t-recap__items { display: flex; flex-direction: column; justify-content: safe center; padding: var(--t-gutter-y) var(--t-gutter); min-height: 0; }
.t-recap__items .r-list { display: grid; gap: var(--t-gap-m); grid-template-columns: minmax(0, 1fr); }
.t-recap__items .r-list:has(> li:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.t-recap__items .r-list > li:last-child:nth-child(odd):not(:first-child) { grid-column: 1 / -1; }
.t-recap__items .r-item {
  align-items: center; background: var(--t-paper); border-radius: var(--t-radius);
  padding: var(--t-gap-m) var(--t-gap-l); box-shadow: 0 1px 0 var(--t-line), var(--t-shadow); border-top: max(3px, calc(.35 * var(--t-u))) solid var(--t-sage);
}
.t-recap__items .r-item > .spec-icon {
  width: var(--t-icon-badge); height: var(--t-icon-badge); min-width: var(--t-icon-badge);
  padding: calc(var(--t-icon-badge) * .24); border-radius: 50%; background: var(--t-sage-soft); color: var(--t-navy); stroke-width: 1.9;
}
.t-recap__items .r-item-body p { font-size: var(--t-fs-body); line-height: 1.34; }
.t-recap__items .r-list { grid-auto-rows: minmax(calc(8 * var(--t-u)), auto); }
.t-recap__items .r-list:not(:has(> li:nth-child(4))) .r-item-body p { font-size: var(--t-fs-body-lg); }
.t-recap__items .r-pager { margin-top: var(--t-gap-l); }

@container (max-width: 640px) {
  .t-recap { display: flex; flex-direction: column; overflow-y: auto; min-height: 0; }
  .t-recap__band { flex: none; padding: var(--t-gutter-y) var(--t-gutter); }
  .t-recap__ornament { display: none; }
  .t-recap__items { flex: none; padding: var(--t-gutter-y) var(--t-gutter); justify-content: flex-start; }
  .t-recap__items .r-list:has(> li:nth-child(4)) { grid-template-columns: minmax(0, 1fr); }
}
/* Optional picture: a third column (band | items | picture) scoped to the template
   article itself, never to the player wrapper that shares data-template. The items
   keep two card columns; a photo covers its column edge to edge and a figure sits on an
   inset cell, carded when it would not fill it (visual bar). */
.t-recap:has(> [data-region="image"]) { grid-template-columns: minmax(0, 26%) minmax(0, 1fr) minmax(0, 22%); }
.t-recap > [data-region="image"] { position: relative; min-height: 0; }
.t-recap > [data-region="image"] .r-figure[data-media-type="photo"] { position: absolute; width: auto; height: auto; inset: 0; }
.t-recap > [data-region="image"] .r-figure[data-media-type="figure"] { position: absolute; width: auto; height: auto; inset: var(--t-gutter-y) var(--t-gutter) var(--t-gutter-y) 0; }
.t-recap > [data-region="image"] .r-figure[data-media-type="figure"] { --figure-card: var(--t-sage-soft); }
.t-recap > [data-region="image"] .r-figure-group { position: absolute; inset: var(--t-gap-m); width: auto; height: auto; --gallery-tile: var(--t-paper); }
@container (max-width: 640px) {
  /* Scene photo follows the objectives in the scroll. 3/2 matches the opener
     still, so cover does not letterbox it. */
  .t-recap > [data-region="image"] {
    flex: none; position: relative; height: auto; aspect-ratio: 3 / 2;
    margin: 0 var(--t-gutter) var(--t-gutter); border-radius: var(--t-radius); overflow: hidden;
  }
  .t-recap > [data-region="image"] .r-figure[data-media-type="photo"] { position: absolute; inset: 0; }
  .t-recap > [data-region="image"] .r-figure[data-media-type="figure"], .t-recap > [data-region="image"] .r-figure-group { inset: 12px var(--t-gutter); }
}

/* Objectives beside a picture keep their cards within the stage at wide-window scaling. */
@container (min-width: 641px) {
  .t-recap__items { overflow: hidden; }
  .t-recap.t-dense-1 .t-recap__items { padding: 16px 24px; }
  .t-recap.t-dense-1 .t-recap__items .r-list { gap: 8px; grid-auto-rows: auto; }
  .t-recap.t-dense-1 .t-recap__items .r-item { padding: 8px 12px; }
  .t-recap.t-dense-2 .t-recap__items .r-item-body p { font-size: 16px; }
}

/* Which way would it run? (owner decision PD-runoff-scenario): a spill-path exercise on the
   site's own diagram. The copy and the task card share the navy column; the map fills the right.
   The region and its wrapper use display: contents so the task card and the map are grid items. */
.t-runoff {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "copy map" "task map"; background: var(--t-navy); color: var(--t-paper);
}
.t-runoff__copy { grid-area: copy; display: flex; flex-direction: column; gap: var(--t-gap-m); padding: var(--t-gutter-y) var(--t-gutter) var(--t-gap-m); }
.t-runoff__head { display: flex; flex-direction: column; gap: var(--t-gap-s); }
.t-runoff .r-heading { color: var(--t-paper); }
.t-runoff__subtitle .r-text { color: var(--t-sage-soft); font-size: var(--t-fs-small, .9em); }
.t-runoff__kicker .r-text { color: var(--t-sage); font-weight: 650; }
.t-runoff__intro .r-text { color: var(--t-sage-soft); max-width: 48ch; }
.t-runoff .r-text > .spec-icon { display: none; }
.t-runoff__play, .t-runoff__play > .r-runoff { display: contents; }

.t-runoff .r-runoff-task {
  grid-area: task; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: var(--t-gap-m);
  margin: 0 var(--t-gutter) var(--t-gutter-y); padding: var(--t-gap-l); border-radius: var(--t-radius); background: rgb(255 255 255 / .08);
}
.t-runoff .r-runoff-task p { margin: 0; }
.t-runoff .r-runoff-dots { display: flex; gap: var(--t-gap-s); }
.t-runoff .r-runoff-dot { width: max(8px, calc(.8 * var(--t-u))); aspect-ratio: 1; border-radius: 50%; background: rgb(255 255 255 / .25); }
.t-runoff .r-runoff-dot.is-on { background: var(--t-sage); }
.t-runoff .r-runoff-question { font-weight: 700; font-size: var(--t-fs-body-lg); }
.t-runoff .r-runoff-options { display: flex; flex-direction: column; gap: var(--t-gap-s); }
.t-runoff .r-runoff-option {
  font: inherit; text-align: left; padding: .6em .9em; min-height: 44px; border-radius: var(--t-radius-s);
  border: 2px solid rgb(255 255 255 / .38); background: transparent; color: var(--t-paper); cursor: pointer;
}
.t-runoff .r-runoff-option:hover:not(:disabled), .t-runoff .r-runoff-option:focus-visible { border-color: var(--t-sage); outline: none; }
.t-runoff .r-runoff-option:disabled { cursor: default; }
.t-runoff .r-runoff-option.is-right { background: var(--t-sage-soft); color: var(--t-navy); border-color: var(--t-sage); }
.t-runoff .r-runoff-option.is-wrong { background: transparent; color: var(--t-paper); border-color: #e6a3a3; text-decoration: line-through; }
.t-runoff .r-runoff-feedback { padding: .7em .9em; border-radius: var(--t-radius-s); background: var(--t-paper); color: var(--t-ink); }
.t-runoff .r-runoff-feedback small { display: block; margin-top: .3em; color: var(--t-muted); }
.t-runoff .r-runoff-next {
  align-self: flex-start; font: inherit; font-weight: 700; padding: .55em 1.2em; min-height: 44px; border: 0; border-radius: 99px;
  background: var(--t-sage); color: var(--t-navy); cursor: pointer;
}
.t-runoff .r-runoff-next:focus-visible { outline: 3px solid var(--t-paper); outline-offset: 2px; }
.t-runoff .r-runoff-final { font-weight: 700; font-size: var(--t-fs-body-lg); }

.t-runoff .r-runoff-map { grid-area: map; position: relative; min-height: 0; overflow: hidden; background: #ffffff; display: flex; align-items: center; justify-content: center; container-type: size; }
.t-runoff .r-runoff-frame { position: relative; flex: none; width: min(100cqw, calc(100cqh * 1180 / 860)); aspect-ratio: 1180 / 860; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.t-runoff .r-runoff-frame img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.t-runoff .r-runoff-overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.t-runoff .r-runoff-pad { fill: #ffcc33; stroke: var(--t-navy); stroke-width: .35; }
.t-runoff .r-runoff-pulse { fill: none; stroke: #ffcc33; stroke-width: .5; animation: t-runoff-pulse 1.6s ease-out infinite; }
@keyframes t-runoff-pulse { from { r: 1.1; opacity: 1; } to { r: 4; opacity: 0; } }
/* The label's size is set on the SVG text in map units (font-size="2.2" of a 100-unit map), not in CSS pixels. */
.t-runoff .r-runoff-label { font-weight: 700; font-family: var(--t-font); fill: var(--t-navy); paint-order: stroke; stroke: #ffffff; stroke-width: .6; }
.t-runoff .r-runoff-route { stroke: #1d6fd6; stroke-width: .55; fill: none; stroke-dasharray: 1.2 .8; }
.t-runoff .r-runoff-water { fill: #1d6fd6; }
.t-runoff marker path { fill: #1d6fd6; }
.t-runoff .r-runoff-hint {
  position: static; margin: 0; max-width: 60ch;
  padding: .3em .6em; border-radius: var(--t-radius-s); background: rgb(255 255 255 / .92); color: var(--t-navy); font-size: var(--t-fs-small, .85em);
}
@media (prefers-reduced-motion: reduce) {
  .t-runoff .r-runoff-frame { transition: none; }
  .t-runoff .r-runoff-pulse { animation: none; }
}

/* Short stages (the course's 1280x600 frame): the scenario, question and map hint carry the task,
   so the intro paragraph steps aside and every choice stays in view without scrolling. */
@container (max-height: 620px) and (min-width: 641px) {
  .t-runoff__intro { display: none; }
}

@container (max-width: 640px) {
  .t-runoff { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; grid-template-areas: "copy" "map" "task"; overflow-y: auto; }
  .t-runoff .r-runoff-map { height: 62vw; min-height: 220px; }
  .t-runoff .r-runoff-task { margin: var(--t-gap-m) var(--t-gutter) var(--t-gutter-y); overflow: visible; }
}
.t-runoff .r-runoff-text { display: none; }

/* The exercise stays legible as a whole, including feedback, in the short stage.
   Controls retain their 44px target; spacing gives way before text size. */
@container (min-width: 641px) {
  .t-runoff__copy { gap: 6px; padding: 16px 24px 8px; }
  .t-runoff .r-heading { font-size: 26px; line-height: 1.1; }
  .t-runoff__head { gap: 6px; }
  .t-runoff__subtitle .r-text, .t-runoff__kicker .r-text { font-size: 16px; }
  .t-runoff .r-runoff-task { margin: 0 24px 16px; padding: 12px; gap: 8px; font-size: 16px; line-height: 1.25; }
  .t-runoff .r-runoff-question { font-size: 18px; }
  .t-runoff .r-runoff-hint { font-size: 15px; }
  .t-runoff .r-runoff-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .t-runoff .r-runoff-option { padding: 6px; font-size: 15px; line-height: 1.2; }
  .t-runoff .r-runoff-feedback { padding: 8px; }
  .t-runoff .r-runoff-feedback small { font-size: 15px; }
  .t-runoff .r-runoff-next { padding: 6px 16px; }
}

.t-runoff .r-runoff-frame { overflow: hidden; }
.t-runoff .r-runoff-scene { position: absolute; inset: 0; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
@media (prefers-reduced-motion: reduce) { .t-runoff .r-runoff-scene { transition: none; } }

/* Answer feedback has its own row below the map, leaving the scenario and
   all choices in place. It never overlays the diagram or pushes choices away. */
.t-runoff:has(.r-runoff-result) {
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "copy map" "task map" "task feedback";
}
.t-runoff .r-runoff-result { grid-area: feedback; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--t-sage-soft); color: var(--t-ink); font-size: 16px; line-height: 1.25; }
@container (max-width: 640px) {
  .t-runoff:has(.r-runoff-result) { grid-template-rows: auto auto auto auto; grid-template-areas: "copy" "map" "task" "feedback"; }
}

/* Exercise geometry uses the panel aspect, with screen-space labels and arrows.
   The original figure remains the no-script/synthetic-preview fallback. */
.t-runoff .r-runoff-frame:has(.r-runoff-vector) { width: 100%; height: 100%; aspect-ratio: auto; }
.t-runoff .r-runoff-vector { display: block; width: 100%; height: 100%; overflow: hidden; background: #fff; font-family: var(--t-font); }
.t-runoff .r-runoff-contour { fill: none; stroke: #b9c7bb; stroke-width: .7; }
.t-runoff .r-runoff-contour.is-index { stroke: #8aa38f; stroke-width: 1.2; }
.t-runoff .r-runoff-waterbody { fill: #cfe4f2; stroke: #2a7fbf; stroke-width: 1; }
.t-runoff .r-runoff-stream { fill: none; stroke: #2a7fbf; stroke-width: 1; opacity: .65; }
.t-runoff .r-runoff-stream.is-named { stroke-width: 2; opacity: 1; }
.t-runoff .r-runoff-turbine { fill: #c62828; stroke: #fff; stroke-width: 1; }
.t-runoff .r-runoff-drainage { stroke: #b45309; stroke-width: 1; stroke-dasharray: 4 3; opacity: .25; }
.t-runoff .r-runoff-drainage.is-selected { stroke-width: 3; stroke-dasharray: 7 4; opacity: 1; }
.t-runoff .r-runoff-drain-head { fill: none; stroke: #b45309; stroke-width: 1; opacity: .25; }
.t-runoff .r-runoff-drain-head.is-selected { stroke-width: 3; opacity: 1; }
.t-runoff .r-runoff-vector .r-runoff-pad { fill: none; stroke: var(--t-navy); stroke-width: 3; }
.t-runoff .r-runoff-vector .r-runoff-label { font-size: 20px; stroke-width: 5; }
.t-runoff .r-runoff-vector text { paint-order: stroke; stroke: #fff; stroke-linejoin: round; stroke-width: 4; }
.t-runoff .r-runoff-stream-label { font-size: 15px; font-weight: 600; fill: #216799; }
.t-runoff .r-runoff-turbine-label { font-size: 15px; font-weight: 600; fill: #172033; }
.t-runoff .r-runoff-elevation { font-size: 15px; fill: #42624a; }
.t-runoff .r-runoff-leader { stroke: var(--t-navy); stroke-width: 1; }
.t-runoff .r-runoff-vector .r-runoff-route { stroke-width: 3; stroke-dasharray: 7 4; }

/* Scenario Q&A: a named scenario worked through as question cards, each with
   its answers. Pages break only at narration-anchored questions. */
.t-scenario-qa { display: grid; grid-template-columns: minmax(0, 30%) minmax(0, 1fr); background: var(--t-canvas); }
.t-scenario-qa__media { display: flex; flex-direction: column; min-height: 0; background: var(--t-navy-deep); }
.t-scenario-qa__photo { position: relative; flex: 1.35; min-height: 0; }
.t-scenario-qa__figure { position: relative; flex: 1; min-height: 0; background: var(--t-paper); border-top: max(4px, calc(.5 * var(--t-u))) solid var(--t-sage); }
.t-scenario-qa__media .r-figure { position: absolute; width: auto; height: auto; inset: 0; }
.t-scenario-qa__media .r-figure[data-media-type="figure"] { padding: var(--t-gap-m); }
/* A figure in the photo slot is contained on the canvas, not on the navy field. */
.t-scenario-qa__photo .r-figure[data-media-type="figure"] { background: var(--t-canvas); }
.t-scenario-qa__media .r-figure[data-media-type="figure"] { --figure-card: var(--t-sage-soft); --figure-inset: var(--t-gap-l); --figure-card-shadow: none; }
.t-scenario-qa__media .r-figure[data-media-type="figure"][data-figure-card] { border-radius: 0; }
.t-scenario-qa__main { display: flex; flex-direction: column; gap: var(--t-gap-l); padding: var(--t-gutter-y) var(--t-gutter) var(--t-gutter-y) var(--t-gap-xl); min-height: 0; }
.t-scenario-qa__head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--t-gap-s); }
.t-scenario-qa__context .r-text {
  display: inline-flex; align-items: center; gap: .5em; padding: .3em .95em .3em .7em; border-radius: 99px;
  background: var(--t-navy); color: var(--t-paper); font-size: var(--t-fs-meta); font-weight: 650; line-height: 1.3;
}
.t-scenario-qa__context .r-text > .spec-icon { margin: 0; width: 1.25em; height: 1.25em; color: var(--t-sage); }
.t-scenario-qa__qa { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.t-scenario-qa__qa .r-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.t-scenario-qa__qa .r-items { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--t-gap-l); align-content: center; }
.t-scenario-qa__qa .r-items:has(> li:only-child) { grid-template-columns: minmax(0, 1fr); }
.t-scenario-qa__qa .r-item {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--t-gap-m); row-gap: var(--t-gap-m);
  align-content: start; align-self: stretch;
  padding: var(--t-gap-l); border-radius: var(--t-radius); background: var(--t-paper); box-shadow: 0 0 0 1px var(--t-line), var(--t-shadow);
}
.t-scenario-qa__qa .r-item > .spec-icon {
  grid-row: 1; width: var(--t-icon-badge); height: var(--t-icon-badge); min-width: var(--t-icon-badge);
  padding: calc(var(--t-icon-badge) * .24); border-radius: 50%; background: var(--t-sage-soft); color: var(--t-navy); stroke-width: 1.9;
}
.t-scenario-qa__qa .r-item-label { grid-column: 2; align-self: center; font-size: var(--t-fs-h2); line-height: 1.24; }
.t-scenario-qa__qa .r-item-body { grid-column: 1 / -1; display: grid; gap: var(--t-gap-s); padding-top: var(--t-gap-m); border-top: 1px solid var(--t-line); }
.t-scenario-qa__qa .r-item-body p { position: relative; padding-left: calc(var(--t-gap-l) + 2px); font-size: var(--t-fs-body-lg); line-height: 1.34; }
.t-scenario-qa__qa .r-item-body p + p { margin-top: 0; }
.t-scenario-qa__qa .r-item-body p::before { content: ""; position: absolute; left: 0; top: .52em; width: max(10px, calc(1.1 * var(--t-u))); height: max(3px, calc(.32 * var(--t-u))); border-radius: 2px; background: var(--t-sage-deep); }
.t-scenario-qa__qa .r-pager { margin-top: var(--t-gap-l); }

@container (max-width: 640px) {
  .t-scenario-qa { display: flex; flex-direction: column; overflow-y: auto; }
  .t-scenario-qa__media { flex: none; flex-direction: row; height: 150px; }
  .t-scenario-qa__figure { border-top: 0; border-left: 4px solid var(--t-sage); }
  .t-scenario-qa__main { flex: 1 0 auto; padding: var(--t-gutter-y) var(--t-gutter); }
  .t-scenario-qa__qa .r-items { grid-template-columns: minmax(0, 1fr); align-content: start; }
}

/* Section opener: one full-bleed photograph, title set large on a navy scrim. */
.t-section-opener { background: var(--t-navy-deep); color: var(--t-paper); isolation: isolate; }
/* The photograph starts where the copy column ends, so the title never sits on
   the picture itself; the scrim fades the photo's leading edge into the navy
   field, which keeps the full-bleed look. */
.t-section-opener { --t-opener-copy: min(52%, calc(56 * var(--t-u))); --t-opener-media-left: calc(var(--t-gutter) + var(--t-opener-copy) + var(--t-gap-m)); }
.t-section-opener__media { position: absolute; inset: 0 0 0 var(--t-opener-media-left); z-index: -2; }
.t-section-opener__media .r-figure { position: absolute; width: auto; height: auto; inset: 0; }
.t-section-opener__media .r-figure[data-media-type="photo"] { background: var(--t-navy-deep); }
.t-section-opener__media .r-figure[data-media-type="figure"] { padding: var(--t-gutter); justify-content: flex-end; }
.t-section-opener__scrim {
  position: absolute; inset: 0 0 0 var(--t-opener-media-left); z-index: -1;
  background:
    linear-gradient(90deg, var(--t-navy-deep) 0%, rgb(30 20 64 / .74) 14%, var(--t-scrim-soft) 52%),
    linear-gradient(0deg, rgb(30 20 64 / .55) 0%, var(--t-scrim-soft) 40%);
}
.t-section-opener__copy {
  position: absolute; left: var(--t-gutter); bottom: calc(var(--t-gutter-y) * 1.3); top: var(--t-gutter-y);
  width: var(--t-opener-copy);
  display: flex; flex-direction: column; justify-content: flex-end; gap: var(--t-gap-m);
}
.t-section-opener__copy .t-rule { width: calc(var(--t-rule-w) * 1.4); }
.t-section-opener .r-heading { color: var(--t-paper); font-size: var(--t-fs-display); line-height: 1.02; letter-spacing: -.035em; font-weight: 700; }
.t-section-opener__kicker .r-text { font-size: var(--t-fs-meta); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--t-sage); }
.t-section-opener__sub .r-text { font-size: var(--t-fs-lead); line-height: 1.35; color: var(--t-sage-soft); max-width: 34ch; }
.t-section-opener__sub .r-text > .spec-icon { display: none; }

@container (max-width: 640px) {
  /* Phone: the photo above, the copy below it on the navy field. */
  .t-section-opener { display: flex; flex-direction: column; }
  .t-section-opener__media {
    position: relative; inset: auto; flex: 1 1 0; min-height: 160px;
    -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent); mask-image: linear-gradient(180deg, #000 62%, transparent);
  }
  .t-section-opener__scrim { display: none; }
  .t-section-opener__copy { position: relative; inset: auto; width: auto; flex: none; padding: var(--t-gap-l) var(--t-gutter) var(--t-gutter-y); }
}

/* Statement: one idea in large type on a navy field, optional photo panel. */
.t-statement { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--t-navy); color: var(--t-paper); }
.t-statement:has(> .t-statement__media) { grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); }
.t-statement__panel {
  position: relative; display: flex; flex-direction: column; gap: var(--t-gap-xl); min-height: 0;
  padding: var(--t-gutter-y) var(--t-gutter); overflow: hidden;
}
.t-statement__panel::after {
  content: ""; position: absolute; right: calc(-14 * var(--t-u)); bottom: calc(-18 * var(--t-u));
  width: calc(40 * var(--t-u)); aspect-ratio: 1; border-radius: 50%;
  border: calc(1.2 * var(--t-u)) solid rgb(168 198 173 / .14); pointer-events: none;
}
.t-statement__head, .t-statement__body { position: relative; z-index: 1; }
.t-statement__head { display: flex; flex-direction: column; gap: var(--t-gap-s); }
.t-statement .r-heading { color: var(--t-sage); font-size: var(--t-fs-h2); font-weight: 650; letter-spacing: .005em; line-height: 1.25; max-width: 40ch; }
.t-statement__body {
  flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: var(--t-gap-l);
  border-left: max(4px, calc(.6 * var(--t-u))) solid var(--t-sage); padding-left: var(--t-gap-xl); margin-bottom: var(--t-gap-l);
}
.t-statement__text .r-text { font-size: var(--t-fs-statement); line-height: 1.2; font-weight: 620; letter-spacing: -.02em; color: var(--t-paper); text-wrap: balance; max-width: 26ch; }
.t-statement:not(:has(> .t-statement__media)) .t-statement__text .r-text { max-width: 30ch; font-size: clamp(24px, calc(4.6 * var(--t-u)), 92px); }
.t-statement__text .r-text[data-long], .t-statement:not(:has(> .t-statement__media)) .t-statement__text .r-text[data-long] {
  font-size: var(--t-fs-lead); line-height: 1.4; font-weight: 500; letter-spacing: 0; text-wrap: pretty; max-width: 48ch;
}
.t-statement__support .r-text { font-size: var(--t-fs-body-lg); color: var(--t-sage-soft); max-width: 48ch; }
.t-statement .r-text > .spec-icon { display: none; }
.t-statement__media { position: relative; min-height: 0; background: var(--t-navy-deep); }
.t-statement__media .r-figure { position: absolute; width: auto; height: auto; inset: 0; }
.t-statement__media .r-figure[data-media-type="figure"] { padding: var(--t-gutter-y) var(--t-gutter); background: var(--t-paper); }
/* Visual bar: a figure that would not fill the paper panel sits on a sage-soft card
   inset on the navy-deep field, never small in a white panel. */
.t-statement__media .r-figure[data-media-type="figure"] { --figure-card: var(--t-sage-soft); }
.t-statement__media .r-figure[data-media-type="figure"][data-figure-card] { inset: var(--t-gutter-y) var(--t-gutter); }
.t-statement__media .r-figure[data-media-type="figure"][data-band-trim][data-figure-card] { background: var(--figure-card); }
/* Several pictures: a gallery on paper with equal gutters, never tiles split by navy. */
.t-statement__media:has(> .r-figure-group) { background: var(--t-paper); }
.t-statement__media > .r-figure-group { position: absolute; inset: 0; width: auto; height: auto; padding: var(--t-gutter-y) var(--t-gutter); }

/* Title only (no statement, no picture): the heading is the statement, set large and
   centred on the navy field under the accent rule, never a thin banner. */
.t-statement:not(:has([data-region="statement"] .r-text)):not(:has(> .t-statement__media)) { display: flex; }
.t-statement:not(:has([data-region="statement"] .r-text)):not(:has(> .t-statement__media)) .t-statement__panel { flex: 1; justify-content: center; align-items: center; text-align: center; padding: var(--t-gutter-y) var(--t-gutter); }
.t-statement:not(:has([data-region="statement"] .r-text)):not(:has(> .t-statement__media)) .t-statement__head { align-items: center; gap: var(--t-gap-l); }
.t-statement:not(:has([data-region="statement"] .r-text)):not(:has(> .t-statement__media)) .t-rule { width: calc(1.6 * var(--t-rule-w)); }
.t-statement:not(:has([data-region="statement"] .r-text)):not(:has(> .t-statement__media)) .r-heading {
  color: var(--t-paper); font-size: var(--t-fs-display); line-height: 1.04; font-weight: 700; letter-spacing: -.03em; max-width: 18ch;
}

@container (max-width: 640px) {
  .t-statement, .t-statement:has(> .t-statement__media) { display: flex; flex-direction: column; overflow-y: auto; }
  .t-statement__media { order: -1; flex: none; height: 44%; min-height: 220px; }
  .t-statement__panel { flex: 1 0 auto; gap: var(--t-gap-l); justify-content: safe center; }
  .t-statement__body { flex: none; padding-left: var(--t-gap-l); margin-bottom: 0; }
  .t-statement__text .r-text, .t-statement:not(:has(> .t-statement__media)) .t-statement__text .r-text { font-size: 25px; }
  .t-statement__text .r-text[data-long], .t-statement:not(:has(> .t-statement__media)) .t-statement__text .r-text[data-long] { font-size: 18px; }
  /* A gallery keeps the rest of the stage on paper, never a navy remainder below it. */
  .t-statement > .t-statement__media:has(> .r-figure-group) { flex: 1 0 auto !important; }
  .t-statement__media > .r-figure-group { padding: var(--t-gap-m) var(--t-gutter); }
}

/* Step timeline: an ordered procedure on a vertical spine of icon nodes. */
.t-step-timeline { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--t-paper); }
/* One picture's column follows the picture's aspect at the stage height (screen_components.js
   fitMediaColumns sets --media-col, 24% to 42%), so it fills the column uncropped. */
.t-step-timeline:has(> .t-step-timeline__media) { grid-template-columns: minmax(0, 1fr) minmax(0, var(--media-col, 36.3636%)); }
.t-step-timeline__main { display: flex; flex-direction: column; gap: var(--t-gap-l); padding: var(--t-gutter-y) var(--t-gap-xl) var(--t-gutter-y) var(--t-gutter); min-height: 0; }
.t-step-timeline__head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--t-gap-s); }
.t-step-timeline__context .r-text {
  display: inline-flex; align-items: center; gap: .5em; margin-top: var(--t-gap-xs);
  padding: .3em .9em; border-radius: 99px; background: var(--t-sage-soft); color: var(--t-navy);
  font-size: var(--t-fs-meta); font-weight: 650; line-height: 1.3;
}
.t-step-timeline__context .r-text > .spec-icon { margin: 0; width: 1.1em; height: 1.1em; }
.t-step-timeline__steps { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-start; padding-top: var(--t-gap-m); }
.t-step-timeline__steps .r-page { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; }
.t-step-timeline__steps .r-items { display: grid; gap: 0; }
.t-step-timeline__steps .r-item {
  --node: max(40px, calc(4.6 * var(--t-u)));
  position: relative; display: grid; grid-template-columns: var(--node) minmax(0, 1fr); column-gap: var(--t-gap-l);
  align-items: start; padding-bottom: var(--t-gap-xl);
}
.t-step-timeline__steps .r-item:last-child { padding-bottom: 0; }
.t-step-timeline__steps .r-item::before {
  content: ""; position: absolute; left: calc(var(--node) / 2 - 1px); top: var(--node); bottom: 0; width: 2px;
  background: linear-gradient(var(--t-sage), var(--t-sage-soft));
}
.t-step-timeline__steps .r-item:last-child::before { display: none; }
/* A step without an icon still gets a node on the spine, never a floating line. */
.t-step-timeline__steps .r-item:not(:has(> .spec-icon))::after {
  content: ""; grid-column: 1; grid-row: 1; justify-self: center; margin-top: calc(var(--node) * .3);
  width: calc(var(--node) * .4); height: calc(var(--node) * .4); border-radius: 50%; background: var(--t-navy);
  box-shadow: 0 0 0 max(4px, calc(.5 * var(--t-u))) var(--t-sage-soft);
}
.t-step-timeline__steps .r-item:not(:has(> .spec-icon))::before { top: calc(var(--node) * .85); }
.t-step-timeline__steps .r-item > .spec-icon {
  grid-column: 1; grid-row: 1 / span 2; width: var(--node); height: var(--node); min-width: var(--node);
  padding: calc(var(--node) * .25); border-radius: 50%; background: var(--t-navy); color: var(--t-paper); stroke-width: 1.9;
  box-shadow: 0 0 0 max(4px, calc(.5 * var(--t-u))) var(--t-paper);
}
.t-step-timeline__steps .r-item > :not(.spec-icon) { grid-column: 2; }
.t-step-timeline__steps .r-item-label { padding-top: calc(var(--node) * .12); }
.t-step-timeline__steps .r-item-body { align-self: center; }
.t-step-timeline__steps .r-item-label + .r-item-body { margin-top: var(--t-gap-xs); }
.t-step-timeline__steps .r-item-body p { font-size: var(--t-fs-body-lg); line-height: 1.36; }
.t-step-timeline__steps .r-item:has(.r-item-label) .r-item-body p { font-size: var(--t-fs-body); }
.t-step-timeline__steps .r-item:not(:has(.r-item-label)) .r-item-body { min-height: var(--node); display: flex; flex-direction: column; justify-content: safe center; }
.t-step-timeline__steps .spec-current > .spec-icon { background: var(--t-sage); color: var(--t-navy); }

.t-step-timeline__media { position: relative; min-height: 0; background: var(--t-canvas); }
.t-step-timeline__media .r-figure[data-media-type="photo"] { position: absolute; width: auto; height: auto; inset: 0; }
.t-step-timeline__media .r-figure[data-media-type="figure"] { position: absolute; width: auto; height: auto; inset: var(--t-gutter-y) var(--t-gap-xl); }
.t-step-timeline__media .r-figure[data-media-type="figure"] img { border-radius: var(--t-radius); }
.t-step-timeline__media .r-figure[data-media-type="figure"] { --figure-card: var(--t-sage-soft); }
/* Several pictures: the shared gallery (base.css) of white tiles on the canvas column. */
/* Gallery tiles are cards with their own inset and shadow, so the group sits close to the
   column's edges (the tiles, not a margin, fill the panel: visual bar figure_fill). */
.t-step-timeline__media .r-figure-group { position: absolute; inset: var(--t-gap-m); width: auto; height: auto; --gallery-tile: var(--t-paper); }

@container (max-width: 640px) {
  .t-step-timeline, .t-step-timeline:has(> .t-step-timeline__media) { display: flex; flex-direction: column; overflow-y: auto; }
  .t-step-timeline__media { order: -1; flex: none; height: 26%; min-height: 170px; }
  .t-step-timeline__media .r-figure[data-media-type="figure"] { inset: 12px var(--t-gutter); }
  .t-step-timeline__media .r-figure-group { padding: 12px var(--t-gutter); }
  .t-step-timeline__main { flex: 1 0 auto; padding: var(--t-gutter-y) var(--t-gutter); }
  .t-step-timeline__steps .r-item { column-gap: 14px; }
}

/* Table (visual bar, 2026-10-05): real rows and columns (limits, categories,
   schedules) as a full-stage composition, never a table dropped on paper. A navy
   band across the top carries the sage rule, the heading and the lead; the table
   fills the remaining height on a mist field (the rows share the spare height,
   header row navy, zebra rows sage-soft, the row-name column tinted as a sage
   accent column with its sage bar); the note is a sage-soft footer strip. Column
   and row headers stay native; the first column reads as the row's name. Overflow
   keeps its semantics: the table region scrolls (tabindex) when the rows need more
   height than the stage has; the PPTX emitter pages rows itself. */
.t-table { display: flex; flex-direction: column; background: var(--t-mist); color: var(--t-ink); }

/* ---------- navy band ---------- */
.t-table__head {
  position: relative; overflow: hidden; flex: none; display: flex; flex-direction: column; gap: var(--t-gap-s);
  padding: calc(var(--t-gap-l) + var(--t-gap-xs)) var(--t-gutter) var(--t-gap-l); background: var(--t-navy); color: var(--t-paper);
}
.t-table__head::after {
  content: ""; position: absolute; right: calc(-9 * var(--t-u)); top: calc(-16 * var(--t-u)); width: calc(34 * var(--t-u)); aspect-ratio: 1;
  border-radius: 50%; border: calc(1 * var(--t-u)) solid rgb(168 198 173 / .14); pointer-events: none;
}
.t-table__head > * { position: relative; z-index: 1; }
.t-table .r-heading { color: var(--t-paper); }
.t-table__lead .r-text { font-size: var(--t-fs-body-lg); line-height: 1.3; font-weight: 500; color: var(--t-sage-soft); max-width: 70ch; }
.t-table__lead .r-text > .spec-icon { display: none; }

/* ---------- the table fills the field ---------- */
.t-table__body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: var(--t-gap-m) var(--t-gutter); }
.t-table__wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; border-radius: var(--t-radius); background: var(--t-paper); box-shadow: var(--t-shadow); }
.t-table__wrap:focus-visible { outline-offset: 4px; }
/* The table grows to the field's height (spare height is shared by the rows) and
   never shrinks below its rows: taller content scrolls inside the region. */
.t-table .r-table { flex: 1 0 auto; width: 100%; font-size: clamp(15px, calc(1.85 * var(--t-u)), 36px); line-height: 1.3; }
.t-table .r-table thead th { font-size: clamp(15px, calc(1.55 * var(--t-u)), 30px); line-height: 1.25; padding: var(--t-gap-m) var(--t-gap-l); vertical-align: middle; border-radius: 0; }
.t-table .r-table td, .t-table .r-table tbody th { padding: var(--t-gap-s) var(--t-gap-l); vertical-align: middle; }
.t-table .r-table tbody th { width: 22%; font-size: inherit; background: var(--t-sage-soft); border-left: max(4px, calc(.5 * var(--t-u))) solid var(--t-sage); }
.t-table .r-table tbody tr:nth-child(even) > * { background: var(--t-sage-soft); }
.t-table .r-table tbody tr:nth-child(even) > th { border-left-color: var(--t-sage-deep); }
/* One column (waste 007): every cell is a row name, so the accent column is the
   whole table and the odd rows go back to paper to keep the zebra. */
.t-table .r-table:not(:has(> thead > tr > th:nth-child(2))) tbody tr:nth-child(odd) > th { width: auto; background: var(--t-paper); }
.t-table .r-table:not(:has(> thead > tr > th:nth-child(2))) tbody tr:nth-child(even) > th { width: auto; }
.t-table .r-table tbody tr:last-child > * { border-bottom: 0; }
.t-table .r-table tbody tr.r-highlight > th { border-left-color: var(--t-navy); }
.t-table .r-table tbody tr.spec-active-row > * { background: var(--t-sage-soft); }
.t-table .r-table tbody tr.spec-active-row > th { border-left-color: var(--t-navy); }

/* ---------- note footer ---------- */
.t-table__note { flex: none; padding: var(--t-gap-s) var(--t-gutter); background: var(--t-sage-soft); border-top: max(3px, calc(.35 * var(--t-u))) solid var(--t-sage); }
.t-table__note .r-text { font-size: var(--t-fs-meta); line-height: 1.35; font-weight: 500; color: var(--t-navy); }
.t-table__note .r-text > .spec-icon { display: none; }

/* Phone: one scrolling column in the schema's stack order (heading, lead, table,
   note); a wide table scrolls sideways inside its region, a one-column table does not. */
@container (max-width: 640px) {
  .t-table { overflow-y: auto; }
  .t-table__head { padding: var(--t-gap-l) var(--t-gutter); }
  .t-table__head::after { display: none; }
  .t-table__body { flex: none; padding: var(--t-gap-m) var(--t-gutter); }
  .t-table__wrap { flex: none; box-shadow: none;
    background: linear-gradient(90deg, var(--t-paper) 30%, transparent) left / 24px 100% no-repeat local, linear-gradient(270deg, var(--t-paper) 30%, transparent) right / 24px 100% no-repeat local, radial-gradient(farthest-side at 100% 50%, rgb(23 32 51 / .22), transparent) right / 12px 100% no-repeat scroll, var(--t-paper); }
  .t-table .r-table { flex: none; min-width: 640px; font-size: 15px; }
  .t-table .r-table:not(:has(> thead > tr > th:nth-child(2))) { min-width: 0; }
  .t-table .r-table thead th { font-size: 15px; padding: 12px; }
  .t-table .r-table td, .t-table .r-table tbody th { padding: 12px; font-size: 15px; }
  .t-table__note { padding: var(--t-gap-m) var(--t-gutter) var(--t-gutter-y); }
}
/* SpillWise uses the same player and template primitives, with a scoped palette. */
[data-template] { --t-navy:#123f46; --t-navy-deep:#092e35; --t-sage:#b8d9ce; --t-sage-soft:#e1eee9; --t-sage-deep:#426d60; --t-olive:#50666a; --t-scrim-strong:rgb(9 46 53 / .92); --t-scrim-soft:rgb(9 46 53 / 0); }
body {background:#092e35;}
.start-cover {background:linear-gradient(135deg,#092e35,#123f46 65%,#294f53);}
.cover-brand {font-size:clamp(28px,3vw,42px);}
.results:has(.certificate-offer) {align-items:center;justify-content:center;gap:clamp(24px,4vw,64px);}
.results:has(.certificate-offer) .result-body {flex:0 1 40%;margin:0;}
.results .certificate-offer {flex:0 1 45%;margin:0;padding-left:2rem;border-left:1px solid #b8d9ce;}
@media(max-width:700px) {.results:has(.certificate-offer){flex-direction:column;}.results .certificate-offer{border-left:0;border-top:1px solid #b8d9ce;padding:1rem 0 0;}}
.cover-brand,.certificate-brand {font-weight:750;letter-spacing:-.04em;}
.certificate-offer {margin:1rem auto 0;max-width:38rem;text-align:left;}
.certificate-offer label {display:block;font-weight:650;margin-bottom:.4rem;}
.certificate-offer>div {display:flex;gap:.6rem;flex-wrap:wrap;}
.certificate-offer input {flex:1;min-width:12rem;font:inherit;padding:.6rem;border:1px solid #50666a;border-radius:5px;}
.certificate-offer p {font-size:.85rem;}
.certificate-offer button,.certificate-actions button {font:inherit;padding:.65rem 1rem;background:#123f46;color:white;border:0;border-radius:5px;cursor:pointer;}
#sample-certificate {width:min(64rem,94vw);max-height:94vh;padding:0;border:0;background:#f1f6f4;color:#172033;}
#sample-certificate::backdrop {background:#122a30bb;}
.certificate-actions {display:flex;justify-content:space-between;padding:1rem;gap:1rem;}
.certificate-paper {margin:0 1.5rem 1.5rem;padding:2rem 3rem;text-align:center;background:white;border:2px solid #123f46;}
.certificate-brand {font-size:2rem;margin:0 0 1.5rem;color:#123f46;}
.certificate-kicker {text-transform:uppercase;letter-spacing:.14em;font-size:.8rem;}
.certificate-paper h1 {font-size:clamp(1.5rem,3vw,2.4rem);margin:1rem 0;}
.certificate-name {font-family:Georgia,serif;font-size:clamp(1.8rem,4vw,3rem);overflow-wrap:anywhere;margin:1.4rem 0 .6rem;}
.certificate-facility {font-weight:650;}
.certificate-disclaimer {border-top:1px solid #b8d9ce;padding-top:1rem;margin-top:1.5rem;font-weight:650;font-size:.95rem;}
@page {size:letter landscape;margin:.35in;}
@media print {
 html,body {background:white!important;}
 #sample-certificate {box-shadow:none!important;}
 #sample-certificate::backdrop {background:transparent;}
 body>* {display:none!important;}
 body>#sample-certificate[open] {display:block!important;position:static;width:100%;max-width:none;max-height:none;overflow:visible;background:white;margin:0;padding:0;}
 #sample-certificate .certificate-actions {display:none;}
 .certificate-paper {box-sizing:border-box;margin:0;min-height:7.6in;padding:.45in;border:2px solid #123f46;break-inside:avoid;}
 .certificate-paper h1 {font-size:26pt;}.certificate-name {font-size:32pt;}
}
/* Opt-in phone reading mode. Only declared samples load this stylesheet.
   The stage is the single scrolling page; status, captions and navigation stay
   outside it. Standing desktop/tablet compositions retain their existing CSS. */
@media screen {
.phone-layout .status {height:48px;gap:6px;}
.phone-layout .brand strong {display:none;}
.phone-layout .icon-button,.phone-layout .footer-nav .icon-button {width:44px;min-width:44px;height:44px;min-height:44px;}
.phone-layout .stage-wrap {display:flex;flex-direction:column;padding:0!important;overflow:hidden;}
.phone-layout .stage {width:100%;max-width:none;flex:1;height:auto;overflow-y:auto;overflow-x:hidden;container-type:inline-size;transform:none;--u:6px;scroll-padding:20px;}
.phone-layout .screen {height:auto;min-height:100%;overflow:visible;}
.phone-layout .screen > [data-template] {display:flex!important;flex-direction:column;height:auto;min-height:100%;overflow:visible!important;--t-u:6px;--t-fit:1;--t-gutter:20px;--t-gutter-y:24px;--t-gap-xl:24px;--t-gap-l:20px;--t-gap-m:14px;--t-fs-body:18px;--t-fs-body-lg:18px;--t-fs-meta:16px;--t-fs-h1:28px;--t-fs-h1-compact:28px;--t-fs-h2:21px;--t-fs-lead:20px;}
.phone-layout [data-template] [class*="__"] {min-height:0;max-height:none;overflow:visible!important;}
.phone-layout [data-template] [class*="__body"] {display:flex;flex-direction:column;gap:20px;}
.phone-layout [data-template] [class*="__copy"],.phone-layout .t-question-frame__context,.phone-layout .t-question-frame__slot {padding:24px 20px;flex:none;}
.phone-layout [data-template] [class*="__items"],.phone-layout [data-template] .r-page {flex:none;height:auto;}
.phone-layout [data-template] .r-items,.phone-layout [data-template] .r-list {grid-template-columns:minmax(0,1fr)!important;grid-auto-rows:auto!important;grid-auto-flow:row!important;columns:1;}
.phone-layout [data-template] .r-item-body p {font-size:18px!important;line-height:1.45;}
.phone-layout [data-template] .r-heading {font-size:28px!important;line-height:1.16;}
.phone-layout [data-template] [class*="__media"] {height:240px;flex:none;position:relative;order:initial;}
.phone-layout .t-list-image__media {min-height:240px!important;}
.phone-layout .t-comparison__items .r-item {min-height:110px;}
.phone-layout .t-plan-card[data-site-document] .t-plan-card__facts {display:block;padding:24px 20px;}
.phone-layout .t-plan-card__facts::after,.phone-layout .t-statement__panel::after {display:none;}
.phone-layout .t-plan-card[data-site-document] .t-plan-card__head,.phone-layout .t-plan-card[data-site-document] .t-plan-card__source,.phone-layout .t-plan-card[data-site-document] .t-plan-card__highlights {padding:0;margin:0 0 20px;}
.phone-layout .t-plan-card[data-site-document] .t-plan-card__highlights .r-item-body p {font-size:24px!important;}
.phone-layout .t-plan-card .r-hero-value {font-size:34px!important;}
.phone-layout .t-plan-card[data-site-document] .t-plan-card__data {display:flex;flex-direction:column;}
.phone-layout .t-plan-card[data-site-document] .t-plan-card__viewer {display:flex;flex-direction:column;padding:20px;order:2;}
.phone-layout .t-plan-card[data-site-document] .t-plan-card__detail {padding:20px;order:1;}
.phone-layout .t-plan-card[data-site-document] .t-plan-card__media {height:auto;margin:0;width:100%;}
.phone-layout .t-plan-card[data-site-document] .t-plan-card__media .r-figure,.phone-layout .t-plan-card[data-site-document] .t-plan-card__media .r-figure-group {position:static;display:block;width:100%;height:auto;}
.phone-layout .t-plan-card[data-site-document] .t-plan-card__media .r-figure {margin:0 0 16px;}
.phone-layout .t-plan-card[data-site-document] .t-plan-card__media img {width:100%!important;height:auto!important;max-width:100%!important;max-height:none!important;}
.phone-layout .t-plan-card[data-site-document] .t-plan-card__media .r-figure-group > .r-figure {height:auto!important;aspect-ratio:auto;overflow:visible!important;padding:0!important;}
.phone-layout .t-plan-card__page-zoom {width:100%;}
.phone-layout .t-plan-card[data-site-document] .t-plan-card__enlarge,.phone-layout .t-plan-card[data-site-document] .t-plan-card__page-caption {margin:0;}
.phone-layout .t-plan-card[data-site-document] .t-plan-card__note {padding:20px;order:3;}
.phone-layout .t-question-frame .t-question-frame__slot {height:auto;padding:24px 20px;}
.phone-layout .t-question-frame .t-question-frame__slot .screen-title {font-size:22px;}
.phone-layout .t-question-frame .t-question-frame__slot .option {font-size:18px;min-height:52px;}
.phone-layout .t-statement__panel {min-height:320px;padding:24px 20px;}
.phone-layout .t-statement__text .r-text {font-size:32px!important;}
.phone-layout button,.phone-layout input:not([type=radio]),.phone-layout summary {min-height:44px;min-width:44px;touch-action:manipulation;}
.phone-layout .stage-wrap>.caption-overlay {position:static;flex:none;transform:none;width:100%;max-width:none;min-width:0;max-height:none;display:block;margin:0;border-radius:0;padding:8px 16px;font-size:16px;line-height:1.4;overflow:visible;}
.phone-layout .footer-nav {height:100px;display:grid;grid-template-columns:1fr auto;grid-template-rows:48px 48px;gap:0;padding:0 8px;}
.phone-layout .media-controls {display:contents;}
.phone-layout .narration-controls {grid-column:1/-1;grid-row:1;gap:6px;width:100%;}
.phone-layout .seek-control {flex-direction:row;gap:6px;min-width:60px;}
.phone-layout #back,.phone-layout #next {width:44px;min-width:44px;}
.phone-layout .t-plan-card[data-site-document] .t-plan-card__enlarge {min-height:44px;flex:none;}
.phone-layout button {-webkit-tap-highlight-color:transparent;}
.phone-layout input[type=range] {background:transparent;}
.phone-layout input[type=range]::-webkit-slider-runnable-track {height:4px;background:var(--line);}
.phone-layout input[type=range]::-webkit-slider-thumb {margin-top:-5px;}
.phone-layout input[type=range]::-moz-range-track {height:4px;background:var(--line);}
.phone-layout #seek {min-width:44px;min-height:44px;}
.phone-layout #audio-time {display:none;}
.phone-layout #more-toggle {grid-column:1;grid-row:2;display:inline-flex;}
.phone-layout .navigation-controls {grid-column:2;grid-row:2;}
.phone-layout .footer-nav:has(#narration-controls[hidden]) {height:52px;grid-template-rows:48px;}
.phone-layout .footer-nav:has(#narration-controls[hidden]) #more-toggle,.phone-layout .footer-nav:has(#narration-controls[hidden]) .navigation-controls {grid-row:1;}
.phone-layout #media-context {display:none;}
.phone-layout .more-controls {bottom:100%;right:8px;max-height:calc(100dvh - 158px);overflow:auto;min-width:240px;}
.phone-layout .more-controls .icon-button {width:100%;}
.phone-layout .transcript,.phone-layout .accessible-text {position:fixed;inset:48px 8px 108px;max-height:none;width:auto;max-width:none;padding:16px;z-index:40;}
.phone-layout .start-cover {padding:24px;gap:20px;}
.phone-layout .cover-main {flex:none;display:block;margin:0;}
.phone-layout .cover-main h1 {font-size:36px;}
.phone-layout .cover-footer {margin-top:auto;gap:16px;flex-wrap:wrap;}
.phone-layout .results {height:auto;min-height:100%;overflow:visible;display:flex;flex-direction:column;padding:24px 20px;gap:24px;}
.phone-layout .results .result-body {flex:none;width:100%;margin:0;}
.phone-layout .results .certificate-offer {flex:none;width:100%;border-left:0;border-top:1px solid #b8d9ce;padding:20px 0 0;}
.phone-layout .certificate-offer input {min-width:0;width:100%;font-size:16px;}
.phone-layout .certificate-offer>div {display:flex;flex-direction:column;}
.phone-layout #sample-certificate {width:calc(100vw - 16px);max-height:calc(100dvh - 16px);}
.phone-layout .certificate-actions {position:sticky;top:0;background:#f1f6f4;padding:8px;z-index:1;}
.phone-layout .certificate-paper {margin:0 8px 8px;padding:24px 16px;}
.phone-layout .certificate-paper h1 {font-size:26px;}
.phone-layout .certificate-name {font-size:32px;}
.phone-layout .spec-source-dialog[open] {width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:none;}
.phone-layout .spec-source-toolbar button {min-width:44px;min-height:44px;}
}
/* Sample-only adapter. Tokens are supplied by site/spillwise/config.json. */
:root{--brand:#122a36;--olive:#02737f;--sage:#c9e6e7;--ink:#122a36;--focus:#e19529;--scroll-thumb:#02737f;--scroll-hover:#122a36}
[data-template]{--t-navy:#122a36;--t-navy-deep:#122a36;--t-sage:#c9e6e7;--t-sage-soft:#edf5f5;--t-sage-deep:#02737f;--t-olive:#02737f;--t-scrim-strong:rgb(18 42 54 / .94);--t-scrim-soft:rgb(18 42 54 / 0)}
body,.start-cover{background:#122a36}.sample-logo{display:block;flex:none}.sample-logo img{width:140px;height:auto;display:block}.cover-brand .sample-logo img{width:clamp(210px,30vw,350px);height:auto;max-height:none}.brand .sample-logo img{width:110px;height:auto}.phone-layout .brand .sample-logo img{width:94px}.certificate-brand img{width:180px;height:auto;margin:auto}.certificate-brand{margin-bottom:12px}.certificate-paper{border-color:#122a36}.certificate-offer button,.certificate-actions button{background:#122a36}.certificate-offer button:hover,.certificate-actions button:hover{background:#02737f}.start-cover #start-course{background:#e19529;color:#122a36}.start-cover #start-course:hover{background:#f0ad4f}
@media print{.certificate-brand img{width:150px}.certificate-brand{margin-bottom:6px}}
