:root{--bg:#15191B;--ink:#EDF3EF;--muted:#B7C3C1;--accent:#9DE1D1;--stage-color:#2C3839}
:root[data-theme=light]{--bg:#F3F0E8;--ink:#282E2D;--muted:#414A44;--accent:#145447;--stage-color:#DCD8CC}
@font-face{font-family:Newsreader;src:url('fonts/newsreader-latin.woff2') format('woff2');font-style:normal;font-weight:200 800;font-display:swap}
@font-face{font-family:Newsreader;src:url('fonts/newsreader-latin-ext.woff2') format('woff2');font-style:normal;font-weight:200 800;font-display:swap;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F}
:root{
 --unit:1svh;--safe-top:var(--browser-safe-top,env(safe-area-inset-top,0px));--top:calc(3.55rem + var(--safe-top));--stage-x:39%;
 --surface:color-mix(in srgb,var(--bg) 91%,var(--ink));--rule:color-mix(in srgb,var(--bg) 62%,var(--muted));
 color-scheme:dark;scroll-padding-top:calc(var(--top) + 1rem);scroll-behavior:smooth;background:var(--bg);
}
:root[data-theme=light]{color-scheme:light}
*,*::after,*::before{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;color:var(--ink);background:var(--bg);font:400 1rem/1.66 system-ui,-apple-system,sans-serif}
a{color:var(--accent);text-underline-offset:.2em}
button,input{font:inherit}
:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
button{color:var(--ink);background:var(--surface);border:1px solid var(--rule);min-height:44px;padding:.4rem .7rem;cursor:pointer}
button[aria-pressed=true]{color:var(--bg);background:var(--accent);border-color:var(--accent)}
.skip{position:fixed;z-index:26;left:1rem;top:-6rem;background:var(--bg);padding:.4rem .75rem}
.skip:focus{top:1rem}
#nav{
 position:fixed;inset:0 0 auto;min-height:var(--top);padding:0 clamp(.8rem,3vw,3rem);z-index:20;
 display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:1rem;border-bottom:1px solid var(--rule);background:var(--bg);
 padding-top:var(--safe-top)
}
#nav a{color:var(--ink);text-decoration:none}
.site-name{width:max-content;font-weight:650;letter-spacing:.015em;font-size:.8rem}
#location{letter-spacing:.07em;font-size:.72rem;color:var(--muted);text-transform:uppercase}
.nav-actions{display:flex;align-items:center;justify-content:flex-end;gap:.8rem;font-size:.84rem}
.nav-actions a{display:grid;place-items:center;min-height:44px;padding-inline:.35rem}
#theme{min-width:44px;font-size:1rem;line-height:1;background:transparent}
#stage{
 position:fixed;z-index:0;inset:var(--top) 0 0 var(--stage-x);isolation:isolate;margin:0;overflow:hidden;
 background:radial-gradient(ellipse at 52% 44%,var(--stage-color),var(--bg) 93%)
}
#scene,#poster{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:cover}
#scene{visibility:hidden}
#stage[data-ready=true] #scene{visibility:visible}
#caption{
 position:absolute;inset:auto auto clamp(.8rem,2.4vw,2rem) clamp(.8rem,2.4vw,2rem);z-index:2;margin:0;
 max-width:min(41rem,80%);padding:.42rem .74rem;border-inline-start:2px solid var(--accent);
 color:var(--ink);background:var(--bg);font-size:.79rem;line-height:1.4
}
.chapter-nav{position:fixed;right:.68rem;top:49%;z-index:5;display:grid;gap:4px}
.chapter-nav a{display:grid;place-items:center;min-height:37px;min-width:36px;border:1px solid var(--rule);background:var(--bg);color:var(--muted);text-decoration:none;font-size:.68rem;font-variant-numeric:tabular-nums}
.chapter-nav a[aria-current]{background:var(--accent);color:var(--bg);border-color:var(--accent)}
.story{position:relative;z-index:3;padding-top:var(--top)}
.chapter{
 width:calc(var(--stage-x) + 6%);padding:clamp(2rem,calc(var(--unit) * 11),7rem) clamp(1.1rem,4.6vw,6rem);
 display:flex;align-items:center;min-height:calc(var(--unit) * 91);
}
.chapter .text{max-width:36rem;width:100%;padding:1.1rem .72rem 1rem 0;border-top:1px solid var(--rule);background:linear-gradient(90deg,var(--bg) 95%,transparent)}
.chapter:first-child{min-height:calc(var(--unit) * 100 - var(--top));padding-block:2rem}
.chapter:first-child .text{border:0}
h1,h2{margin:.5em 0 .5em;font:500 clamp(2rem,4.1vw,4.6rem)/.98 Newsreader,Georgia,serif;letter-spacing:-.042em;text-wrap:balance}
h1{font-size:clamp(3.2rem,7.2vw,8.35rem);line-height:.88;letter-spacing:-.056em}
.eyebrow{margin:0 0 .85rem;color:var(--accent);font:650 .72rem/1.4 system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase}
.chapter p{margin-top:0}
.chapter .lede{font-size:clamp(1.03rem,1.38vw,1.28rem);line-height:1.55;color:var(--muted)}
.chapter .begin{display:inline-flex;align-items:center;gap:1rem;min-height:44px;color:var(--accent);font-weight:650}
.ref{margin-inline:.16ch;font-size:.72em;vertical-align:super}
fieldset{margin:1.2rem 0 0;padding:1rem;border:1px solid var(--rule);border-top:2px solid var(--accent);background:var(--surface)}
legend{padding:0 .44rem;font-weight:650}
.choices{display:flex;flex-wrap:wrap;gap:.45rem}
.control-value{color:var(--ink);font-variant-numeric:tabular-nums}
.input-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.8rem}
.input-row input{width:100%;height:44px;accent-color:var(--accent)}
fieldset .hint{margin:.55rem 0 0;font-size:.85rem;color:var(--muted)}
.sources{position:relative;z-index:8;background:var(--bg);border-block:1px solid var(--rule);padding:clamp(2.5rem,7vw,7rem) clamp(1.2rem,6vw,6rem)}
.sources-inner{max-width:54rem;margin-inline:auto}
.sources li{margin-bottom:.9rem}
.sources li p{margin:.18rem 0;color:var(--muted);font-size:.93rem}
#copy-result{margin-inline-start:1ch;color:var(--muted);font-size:.87rem}
footer{position:relative;z-index:8;display:flex;flex-wrap:wrap;gap:1rem;padding:1.2rem clamp(1rem,6vw,6rem);color:var(--muted);background:var(--surface);font-size:.86rem}
body[data-layout=folio]{--stage-x:42%}
body[data-layout=hall]{--stage-x:34%}
body[data-layout=hall] .chapter:first-child .text{padding-top:1.7rem}
body[data-layout=folio] #stage{border-inline-start:1px solid var(--rule)}
body[data-layout=folio] h1{max-width:13ch;font-size:clamp(3.1rem,5.7vw,7.2rem);line-height:.93}
@media(max-width:780px){
 :root{--top:calc(3.3rem + var(--safe-top));--phone-stage:clamp(222px,calc(var(--unit) * 43),383px);scroll-padding-top:calc(var(--top) + var(--phone-stage) + 1.6rem)}
 #nav{grid-template-columns:1fr auto;gap:.2rem}
 #location,.chapter-nav{display:none}
 #stage{inset:var(--top) 0 auto;height:var(--phone-stage);z-index:6;border-bottom:1px solid var(--rule)}
 #caption{font-size:.84rem;max-width:calc(100% - 1.4rem);bottom:.5rem;left:.7rem;line-height:1.35}
 .story{padding-top:calc(var(--top) + var(--phone-stage))}
 .chapter,.chapter:first-child{width:100%;min-height:initial;display:block;padding:1.7rem 1.1rem 2.8rem}
 .chapter .text{background:var(--bg);max-width:40rem;margin-inline:auto;padding:1rem 0 0}
 .chapter:first-child .text,body[data-layout=hall] .chapter:first-child .text{padding:.27rem 0 0}
 h1,body[data-layout=folio] h1{font-size:clamp(3.1rem,13vw,5.6rem);line-height:.93}
 h2{font-size:clamp(2.25rem,8vw,3.8rem)}
 fieldset{padding:.7rem}
}
@media(max-width:350px){
 .nav-actions{gap:.35rem}
 .chapter,.chapter:first-child{padding-inline:.92rem}
}
@media(prefers-reduced-motion:reduce){:root{scroll-behavior:auto}}

