:root[data-theme=dark]{color-scheme:dark;--ink:#f2eee3;--paper:#142332;--white:#1e3040;--cream:#142332;--line:#51616d;--hair:#51616d;--muted:#c0ccd1;--tint:#293f50;--accent:#fa9b7c;--ground:#142332;--route-ink:#f3eee1;--route-muted:#c6cfd1;--route-rule:#52616a}
:root[data-theme=light]{color-scheme:light;--ground:#f4f1e8;--route-ink:#192a38;--route-muted:#455659;--route-rule:#9fa4a0}
nav .theme-switch{display:inline-grid;flex:none;place-items:center;align-self:center;min-height:44px;width:44px;border:0;border-radius:50%;box-shadow:none;background:transparent;color:inherit;padding:9px;cursor:pointer}nav .theme-switch:hover{background:#8998a22a}nav .theme-switch svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.75}nav .theme-switch path{fill:currentColor}
.passage{position:absolute;inset:0;pointer-events:none;z-index:-2;opacity:var(--passage-opacity,0)}.passage img{height:100%;width:100%;object-fit:cover}.stage:after{z-index:-1;background:linear-gradient(to top,var(--ground,#142332) 0%,transparent 23%),linear-gradient(90deg,#0d1a2bab,transparent 71%)}.routes,body:has(.journey) footer{background:var(--ground);color:var(--route-ink)}.lead p,.list small{color:var(--route-muted)}.list a,.list a:last-child{border-color:var(--route-rule)}.scroll{color:var(--route-ink)}
[data-theme=light] .stage{color:#152738;background:#cbd6d1}[data-theme=light] .stage:after{background:linear-gradient(to top,var(--ground) 0%,transparent 33%),linear-gradient(90deg,#e1e9e3ed,transparent 76%)}[data-theme=light] .stage nav a,[data-theme=light] .title p,[data-theme=light] .stage .intro p{color:#182a36}[data-theme=light] .stage header{border-color:#34494955}[data-theme=light] .action{background:#1b3040;color:#fffbef}
[data-theme=dark] .console,[data-theme=dark] .control select,[data-theme=dark] #numeric input,[data-theme=dark] .choice b{background:#203244;color:var(--ink)}[data-theme=dark] :is(.intro p,.control .tag,.control .kicker){color:#c6d0d5}[data-theme=dark] .choice:not(:disabled):hover,[data-theme=dark] .choice.done:disabled,[data-theme=dark] .feedback{background:#314959;color:var(--ink)}[data-theme=dark] .primary:hover{color:white}[data-theme=dark] .primary{background:#e8e4d8;color:#182a3a}
@media(max-width:680px){.stage header{flex-wrap:wrap;gap:0;min-height:68px}.stage nav{gap:9px}.stage nav .theme-switch{width:36px}.stage:after{background:linear-gradient(0deg,var(--ground) 0%,transparent 26%),linear-gradient(150deg,#102130c9,transparent 70%)}[data-theme=light] .stage:after{background:linear-gradient(0deg,var(--ground) 0%,transparent 26%),linear-gradient(145deg,#e1e9e3f5 8%,#dee6dcce 32%,transparent 70%)}}
/* One pinned world behind both sections; the route list never replaces the camera. */
.ridge-story{position:relative;isolation:isolate}.ridge-back{height:100vh;height:100lvh;position:sticky;top:0;margin-bottom:-100vh;margin-bottom:-100lvh;z-index:-1;overflow:hidden;background:#364c64 url(passage/dark-01.webp) center/cover no-repeat;pointer-events:none}
[data-theme=light] .ridge-back{background:#d7e2db url(passage/light-01.webp) center/cover no-repeat}
.ridge-back canvas{display:block;width:100%;height:100%;opacity:0}.ridge-back canvas.ready{opacity:1}
.ridge-back:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#0d1b2ac9,transparent 83%),linear-gradient(0deg,#1423328c,transparent 45%)}
[data-theme=light] .ridge-back:after{background:linear-gradient(90deg,#e7ede2e8,#e6ecdf44 80%),linear-gradient(0deg,#e4ebdfaa,transparent 52%)}
.ridge-story .journey{height:auto}.ridge-story .stage,[data-theme=light] .ridge-story .stage{position:relative;height:100svh;min-height:520px;background:transparent;overflow:visible}.ridge-story .stage:after{display:none}
.ridge-story .routes{min-height:92svh;position:relative;background:transparent;align-content:center;isolation:isolate}.ridge-story .routes:before{content:"";position:absolute;inset:-10vh 0 0;z-index:-1;background:linear-gradient(0deg,#142332f7,#142332ca 75%,transparent)}
[data-theme=light] .ridge-story .routes:before{background:linear-gradient(0deg,#f4f1e8f7,#f4f1e8cb 75%,transparent)}
.ridge-story .scroll{color:inherit}@media(max-width:680px){.ridge-story .routes{padding-top:64px;padding-bottom:70px}.ridge-back:after{background:linear-gradient(110deg,#0d1b2acc,transparent 95%)}}
.ridge-story .routes:before{background:linear-gradient(0deg,#112130bf,#11213064 74%,transparent)}
[data-theme=light] .ridge-story .routes:before{background:linear-gradient(0deg,#edf0e3c9,#edf0e38c 74%,transparent)}
@media(prefers-reduced-motion:reduce){.ridge-back canvas{visibility:hidden}}
