/* WORLD STATIONS: the generic layout of a stations page (docs/world-stations.md). Classes on <html> (set before the
   first paint): ws-stage (the 3D room), ws-flow (phones: one column over the room), ws-still (the plain page).
   A page marks its stations with [data-station] inside [data-ws-main]; a section that holds several stations
   carries [data-ws-group]. Colours come from --c on each station (or the page). Fonts are the page's. */
:root{--ws-bg:#020404;--ws-panel:rgba(2,6,6,.78);--ws-line:rgba(238,243,239,.14)}
.world3d{position:fixed;inset:0;width:100%;height:100%;z-index:0;display:block;background:var(--ws-bg);opacity:0;transition:opacity .7s cubic-bezier(.22,1,.36,1)}
body.world-on .world3d{opacity:1}
.ws-still .world3d{display:none}
.ws-veil{position:fixed;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,rgba(2,4,4,.78) 0,rgba(2,4,4,0) 130px,rgba(2,4,4,0) 70%,rgba(2,4,4,.82) 100%)}
.ws-still .ws-veil{display:none}
.ws-track{display:none}
/* a picture held over a page load (WorldStations.hold): it is the background until the page's overlay takes over */
html.ws-hold body{background:transparent!important;visibility:hidden}
html.ws-hold .arrive,html.ws-hold .pull{visibility:visible}

/* ---------- stage: the stations stand in the room ---------- */
.ws-stage,.ws-stage body{overscroll-behavior-y:none}
.ws-stage body{background:var(--ws-bg)}
.ws-stage [data-ws-main]{position:fixed;inset:0;z-index:5;pointer-events:none;overflow:hidden;padding:0;margin:0;max-width:none}
.ws-stage [data-ws-group]{display:contents}
.ws-stage [data-station]{position:absolute;left:0;top:0;width:var(--cw,1100px);max-width:none;margin:0;min-height:0;transform-origin:50% 50%;will-change:transform,opacity;
  visibility:hidden;pointer-events:none;background:var(--ws-panel);border:1px solid var(--ws-line);box-shadow:0 40px 90px -40px #000,0 0 70px -30px var(--c,#eef3ef);
  padding:clamp(18px,1.7vw,28px);transform:translate3d(-300vw,0,0)}
.ws-stage [data-station].near{pointer-events:auto}
.ws-stage [data-station]>*{transition:opacity .5s cubic-bezier(.22,1,.36,1)}
.ws-stage [data-station]:not(.on)>*{opacity:.45}
.ws-stage .ws-track{display:block;position:relative;z-index:-1;width:1px;pointer-events:none}
.ws-stage .world-drag{cursor:grabbing}
/* legibility over the lit floor: the caption sits on a soft dark band, never a box */
.ws-stage body::after{content:"";position:fixed;left:0;right:0;bottom:0;height:min(200px,24vh);z-index:4;pointer-events:none;background:linear-gradient(rgba(2,4,4,0),rgba(2,4,4,.8) 70%,#020404)}

/* ---------- flow: the plain column over the room ---------- */
.ws-flow body{background:transparent}
.ws-flow [data-ws-main]{position:relative;z-index:5}

/* ---------- caption, scrubber, hint ---------- */
.ws-cap,.ws-scrub,.ws-hint{display:none}
.ws-stage .ws-cap{display:block;position:fixed;left:50%;bottom:58px;transform:translateX(-50%);z-index:20;text-align:center;width:min(760px,92vw);pointer-events:none;opacity:0;transition:opacity .6s}
.ws-stage .ws-cap.on{opacity:1}
.ws-cap-n{font-family:var(--f-display,sans-serif);font-weight:800;font-size:18px;letter-spacing:.12em;height:22px;color:var(--c,#eef3ef)}
.ws-cap-t{color:var(--mute,#7c8580);height:16px;margin-top:4px}
.ws-cap .swap{display:inline-block;animation:ws-swap .55s cubic-bezier(.22,1,.36,1)}
@keyframes ws-swap{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.ws-stage .ws-scrub{display:block;position:fixed;left:50%;bottom:24px;width:min(820px,80vw);height:22px;transform:translateX(-50%);z-index:20;cursor:pointer;touch-action:none}
.ws-scrub-line{position:absolute;left:0;right:0;top:50%;height:1px;background-image:linear-gradient(90deg,rgba(238,243,239,.35) 50%,transparent 50%);background-size:4px 1px}
.ws-scrub .tick{position:absolute;top:50%;width:1px;height:7px;margin-top:-3px;background:var(--mute,#7c8580)}
.ws-scrub .tick.major{height:11px;margin-top:-5px;background:var(--ink,#eef3ef)}
.ws-scrub-dot{position:absolute;top:50%;width:9px;height:9px;margin:-4.5px 0 0 -4.5px;border-radius:50%;background:var(--c,#eef3ef);box-shadow:0 0 14px var(--c,#eef3ef)}
.ws-scrub .fill{position:absolute;left:0;top:50%;height:1px;background:var(--ink,#eef3ef)}
.ws-stage .ws-hint{display:block;position:fixed;right:var(--gut,24px);bottom:26px;z-index:20;color:var(--mute,#7c8580)}

/* ---------- INDEX: every station of the page, one press away ---------- */
.ws-index-btn{color:var(--mute,#7c8580)}
.ws-index-btn:hover,.ws-index-btn.on{color:var(--ink,#eef3ef)}
.ws-index{position:fixed;inset:0;z-index:45;background:rgba(5,5,5,.97);overflow-y:auto;overscroll-behavior:contain;opacity:0;transition:opacity .45s;touch-action:pan-y}
.ws-index[hidden]{display:block;visibility:hidden;pointer-events:none}
.ws-index.on{opacity:1;visibility:visible;pointer-events:auto}
.ws-index-in{max-width:980px;margin:0 auto;padding:96px var(--gut,24px)}
.ws-index-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;border-bottom:1px solid var(--ink,#eef3ef);padding-bottom:14px;margin-bottom:24px}
.ws-index-head h2{font-size:clamp(40px,6vw,80px);line-height:.9}
.ws-index-head .mono{color:var(--mute,#7c8580)}
.ws-index-x{color:var(--mute,#7c8580);min-height:44px}
.ws-index-x:hover{color:var(--ink,#eef3ef)}
.ws-index-list{list-style:none;margin:0;padding:0}
.ws-index-list button{display:grid;grid-template-columns:5ch minmax(0,1fr);gap:16px;width:100%;text-align:left;padding:14px 0;border-bottom:1px solid var(--ws-line);align-items:baseline;font-family:var(--f-display,sans-serif);font-weight:800;font-size:clamp(17px,1.8vw,26px);letter-spacing:.03em;transition:color .3s,padding .45s}
.ws-index-list button .mono{color:var(--mute,#7c8580)}
.ws-index-list button:hover,.ws-index-list button:focus-visible{padding-left:12px;color:var(--c,#eef3ef)}
@media (prefers-reduced-motion:reduce){.ws-cap .swap{animation:none}}
