:root{color-scheme:dark;--bg:#101d1d;--panel:#172a28;--line:#344641;--ink:#e0e9df;--muted:#a3b5ac;--water:#a5dbd2;--gold:#cfca9a;--focus:#e4d391;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-size:14px;line-height:1.5}button,select,summary{font:inherit}button,select{min-height:44px;border:1px solid #59716a;border-radius:5px;background:#213a35;color:var(--ink)}button{cursor:pointer;padding:10px 14px;touch-action:manipulation;transition:background .16s,border-color .16s}button:hover{background:#315049;border-color:#94b6a8}button:active{background:#42665a}button:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--focus);outline-offset:4px}button:disabled{cursor:default;opacity:.56}button[aria-pressed=true]{border-color:var(--water);background:#30544b}button[data-next=true]{border-color:var(--gold);box-shadow:inset 0 0 0 1px var(--gold);background:#344b3f}main{max-width:1512px;margin:0 auto;padding:37px 44px 20px}.masthead{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:27px;gap:20px}.eyebrow{text-transform:uppercase;letter-spacing:.16em;font-size:10px;font-weight:550;margin:0;color:var(--muted)}h1{font-size:clamp(31px,3.7vw,53px);letter-spacing:-.045em;font-weight:450;line-height:1.13;margin:8px 0 0}.title-dot{color:#97bdaa}.intro{margin:0 2px 4px 0;font-size:13px;line-height:1.8}.intro span{color:var(--muted)}.lock{border:1px solid var(--line);border-radius:8px;overflow:hidden;background:var(--panel)}.scene-header{height:38px;padding:0 21px;display:flex;align-items:center;justify-content:space-between;background:#1b302b;letter-spacing:.11em;font-size:10px;text-transform:uppercase;color:#c3d2bd;gap:8px}.scene-header #daylight{color:#a0b1a4}.scene-wrap{position:relative;height:clamp(400px,41.8vw,620px);overflow:hidden;background:#719999}canvas{display:block;width:100%;height:100%}.scene-key{position:absolute;top:20px;left:23px;right:23px;display:flex;justify-content:space-between;pointer-events:none;color:#203d35;font-size:10px;letter-spacing:.13em;text-transform:uppercase;font-weight:650}.scene-key span{display:flex;align-items:center;gap:8px}.scene-key i{width:16px;height:1px;background:currentColor;display:inline-block}.scene-caption{position:absolute;bottom:17px;left:24px;color:#d5e6db;font-size:11px;letter-spacing:.03em;padding:5px 9px;border-radius:3px;background:#142d29d9;max-width:calc(100% - 48px);pointer-events:none}.working-panel{padding:24px 27px 0}.guidance{display:grid;grid-template-columns:48px minmax(0,1fr) 214px;gap:21px;align-items:center;padding-bottom:24px}.step-index{font-size:27px;font-weight:350;color:var(--water);letter-spacing:-.045em;align-self:start;line-height:1.35}.step-index span{display:block;font-size:10px;letter-spacing:.1em;color:var(--muted);padding-top:3px}.instruction h2{font-size:21px;line-height:1.3;font-weight:480;letter-spacing:-.02em;margin:5px 0 4px}.instruction>p:last-child{color:var(--muted);font-size:12px;margin:0;max-width:690px}.boat-button{width:100%;display:flex;justify-content:space-between;align-items:center;background:#d2d7b4;border-color:#d2d7b4;color:#203b31;font-weight:600;min-height:48px}.boat-button:hover{background:#e0e4c9;color:#142820}.boat-button:disabled{opacity:.7}.boat-controls{display:flex;flex-wrap:wrap;gap:7px}#turn-back{width:100%;min-height:44px;padding:8px}.machinery{display:grid;grid-template-columns:1fr 85px 1fr;gap:27px;border-top:1px solid var(--line);padding-top:20px}.machine-heading{display:flex;gap:10px;align-items:center;margin-bottom:12px}.machine-number{font-size:10px;color:var(--gold);border:1px solid #657160;border-radius:50%;width:24px;height:24px;text-align:center;line-height:22px}.machine h3{font-size:13px;font-weight:550;margin:0}.height-label{margin-left:auto;color:var(--muted);font-size:10px}.machine-buttons{display:grid;grid-template-columns:1.17fr 1fr;gap:9px}.machine-buttons button{display:flex;align-items:center;gap:10px;text-align:left;justify-content:center;font-size:12px;padding:10px}.gate-icon{font-size:19px;line-height:1;color:var(--water);font-weight:bold}.wheel-icon{font-size:22px;line-height:1;color:var(--gold);display:inline-block}.machine-state{font-size:10px;letter-spacing:.015em;color:var(--muted);margin:9px 0 0;min-height:15px}.level-readout{display:flex;align-items:center;flex-direction:column;color:var(--muted);font-size:10px;gap:5px;justify-content:center}.level-track{width:65px;height:9px;background:#0c2120;border:1px solid #526963;position:relative;overflow:hidden}.level-track i{height:100%;width:100%;display:block;background:#91c5ba}.level-track b{position:absolute;height:100%;border-right:1px solid #162f2a80;top:0;left:25%}.level-track b:nth-of-type(2){left:50%}.level-track b:nth-of-type(3){left:75%}.level-readout output{font-variant-numeric:tabular-nums;color:var(--water);font-size:12px}.feedback{font-size:11px;color:#b2c6bb;margin:17px -27px 0;padding:12px 27px;background:#142522;min-height:41px;border-top:1px solid #2f433c}.feedback.refused{color:#f1d49a;background:#332f22}.ledger{display:flex;justify-content:space-between;gap:40px;padding:30px 0;border-bottom:1px solid var(--line)}.ledger h2{font-size:15px;font-weight:450;letter-spacing:-.015em;margin:0 0 5px}.ledger-note p{font-size:11px;color:var(--muted);margin:0;max-width:230px}.ledger dl{display:grid;grid-template-columns:repeat(3,1fr);gap:43px;margin:0}.ledger dt{font-size:10px;color:var(--muted);margin:0 0 3px}.ledger dd{font-size:24px;line-height:1.2;font-weight:350;letter-spacing:-.035em;margin:0;font-variant-numeric:tabular-nums}.ledger dd span{font-size:9px;letter-spacing:0;color:var(--muted);display:block;margin-top:4px}.footer{padding-top:21px;display:grid;grid-template-columns:1fr auto;align-items:start;gap:17px 30px}.transport{display:flex;align-items:center;gap:10px}.transport button{background:transparent;font-size:12px;min-width:70px}.pace-label{display:flex;gap:10px;align-items:center;color:var(--muted);font-size:11px}.pace-label select{padding:9px 29px 9px 12px;font-size:12px;max-width:160px;background:#172c27}.pace-note{font-size:10px;color:var(--muted);text-align:right;margin:0;line-height:1.8}.footer details{grid-column:1/-1;color:var(--muted);font-size:12px}.footer summary{min-height:44px;display:list-item;cursor:pointer;list-style-position:inside;width:fit-content;padding:11px 4px;max-width:100%}.model-note{display:grid;grid-template-columns:1fr 1fr;gap:0 36px;line-height:1.85;max-width:1080px;color:#b4c4b8;padding:5px 5px 12px}.model-note p{margin:0 0 15px}.model-note strong{font-weight:550;color:var(--ink)}.colophon{font-size:9px;letter-spacing:.13em;color:#839a8d;grid-column:1/-1;margin:5px 0 0}.colophon span{padding:0 8px}.ending{padding:35px 0 8px;max-width:800px}.ending h2{font-size:clamp(26px,3.3vw,39px);letter-spacing:-.035em;font-weight:400;line-height:1.2;margin:9px 0 15px}.ending p{font-size:14px;color:#bdcfc1;line-height:1.8}.ending>.eyebrow{font-size:10px;color:var(--gold)}.ending button{margin-top:4px}.ending button span{padding-left:15px}[hidden]{display:none!important}.no-script{padding:20px;border:1px solid var(--gold)}
@media(min-width:1600px){main{padding-top:45px}.scene-wrap{height:620px}}
@media(max-width:900px){main{padding:25px 22px 20px}.guidance{grid-template-columns:36px minmax(0,1fr) 180px;gap:15px}.working-panel{padding:20px 20px 0}.machinery{gap:17px;grid-template-columns:1fr 58px 1fr}.machine-buttons{grid-template-columns:1fr;gap:7px}.machine-buttons button{justify-content:flex-start;padding-left:14px}.feedback{margin-left:-20px;margin-right:-20px;padding-left:20px;padding-right:20px}.ledger{gap:20px}.ledger dl{gap:20px}.scene-wrap{height:460px}}
@media(max-width:600px){main{padding:18px 12px 16px}.masthead{margin-bottom:17px;align-items:start}.masthead .eyebrow{font-size:8px;letter-spacing:.13em}.masthead .eyebrow span{display:none}h1{font-size:31px;margin-top:7px}.intro{font-size:9px;line-height:1.65;max-width:94px;margin-top:3px}.intro span{display:none}.scene-header{padding:0 12px;height:32px;font-size:8px;letter-spacing:.08em}.scene-header #daylight{max-width:104px;text-align:right;white-space:nowrap;overflow:hidden}.scene-wrap{height:440px}.scene-key{font-size:8px;top:16px;left:13px;right:13px}.scene-key span:last-child{position:absolute;right:0;top:356px;color:#d4e5dc;background:#1939329c;padding:4px 6px}.scene-caption{bottom:13px;left:12px;max-width:calc(100% - 24px);font-size:9px;padding:5px 7px}.working-panel{padding:16px 13px 0}.guidance{grid-template-columns:29px minmax(0,1fr);gap:10px;padding-bottom:17px}.step-index{font-size:23px}.step-index span{font-size:8px}.instruction .eyebrow{font-size:8px;letter-spacing:.09em}.instruction h2{font-size:18px;margin:5px 0}.instruction>p:last-child{font-size:11px;line-height:1.65}.boat-controls{grid-column:1/-1;margin-top:3px}.boat-button{min-height:44px;font-size:12px}.boat-controls:has(#turn-back:not([hidden])){display:grid;grid-template-columns:1.2fr 1fr}#turn-back{font-size:12px}.machinery{grid-template-columns:1fr 1fr;gap:13px;padding-top:15px}.machine-heading{gap:6px;margin-bottom:10px;flex-wrap:wrap}.machine-number{width:20px;height:20px;font-size:8px;line-height:18px}.machine h3{font-size:11px}.height-label{display:none}.machine-buttons{gap:7px;grid-template-columns:1fr}.machine-buttons button{padding:9px 8px;gap:8px;min-height:44px;font-size:10px;justify-content:flex-start}.machine-state{font-size:8px;line-height:1.6}.level-readout{grid-column:1/-1;grid-row:2;flex-direction:row;justify-content:center;padding:0;gap:10px}.level-track{width:92px}.level-readout output{font-size:11px}.feedback{margin:14px -13px 0;padding:11px 13px;font-size:10px;min-height:42px;line-height:1.7}.ledger{flex-direction:column;gap:19px;padding:24px 3px}.ledger-note p{max-width:275px;font-size:10px}.ledger h2{font-size:14px}.ledger dl{gap:10px;grid-template-columns:repeat(3,minmax(0,1fr))}.ledger dt{font-size:9px;line-height:1.5;min-height:27px}.ledger dd{font-size:25px}.ledger dd span{font-size:8px}.footer{display:flex;flex-direction:column;gap:16px;padding:20px 3px 0}.transport{width:100%;gap:8px;flex-wrap:wrap}.transport button{min-width:59px;font-size:11px;padding:10px}.pace-label{gap:7px;font-size:10px}.pace-label select{max-width:135px;font-size:11px;padding:9px 21px 9px 10px}.pace-note{text-align:left;font-size:10px}.footer summary{font-size:11px}.model-note{display:block;font-size:11px;line-height:1.85;padding-right:5px}.colophon{font-size:8px;letter-spacing:.09em}.ending{padding:28px 4px 0}.ending p{font-size:12px}.ending h2{font-size:29px}.ending>.eyebrow{font-size:9px}}
@media(max-width:350px){main{padding:14px 9px 16px}.masthead{margin-bottom:14px}h1{font-size:28px}.intro{font-size:8px;max-width:80px}.scene-wrap{height:374px}.scene-key span:last-child{top:295px}.scene-header{font-size:7px;padding:0 10px}.working-panel{padding-top:14px}.instruction h2{font-size:17px}.instruction>p:last-child{font-size:10px}.guidance{padding-bottom:15px}.transport{gap:6px}.pace-label{gap:5px}.pace-label select{max-width:126px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* On phones the two gate controls sit beside their physical gate machinery. */
.scene-notice{position:absolute;bottom:12px;left:12px;right:12px;margin:0;padding:10px 12px;border:1px solid #c5b277;background:#263c30f5;color:#f0dfac;font-size:11px;border-radius:4px;line-height:1.6}
.scene-wrap:has(.scene-notice:not([hidden])) .scene-caption{visibility:hidden}
@media(max-width:600px){.lock{position:relative;--scene-height:440px}.machine-buttons button[id^=gate-]{position:absolute;z-index:2;min-height:44px;width:133px;max-width:46%;background:#193b34ed;border-color:#98b49b;box-shadow:0 3px 15px #09282030;justify-content:center;font-size:10px}.machine-buttons #gate-upper{top:calc(32px + var(--scene-height)*.28);left:12px}.machine-buttons #gate-lower{top:calc(32px + var(--scene-height)*.64);right:12px}.machine-buttons button[id^=gate-][data-next=true]{border-color:#e1d391;box-shadow:0 0 0 1px #e1d391,0 3px 15px #09282030;background:#344d3eee}.scene-notice{font-size:10px;padding:9px 10px}}
@media(max-width:350px){.lock{--scene-height:374px}.machine-buttons #gate-upper{left:9px}.machine-buttons #gate-lower{right:9px}}
@media(max-width:350px){.masthead{gap:6px}}
/* A boat button always moves only the boat. Machinery takes priority until
   the crossing is available; blocked attempts retain the model's feedback. */
.boat-button[data-ready=false]{background:#213a35;border-color:#59716a;color:var(--muted);font-weight:450}
.boat-button[data-ready=false]:hover{background:#315049;color:var(--ink)}
.machine-buttons button[data-next=true]{background:#d2d7b4;border-color:#e1d391;color:#203b31;font-weight:650}
.machine-buttons button[data-next=true] .gate-icon,.machine-buttons button[data-next=true] .wheel-icon{color:#365c48}
.lock.is-complete .scene-wrap{height:430px}
.lock.is-complete .ending{max-width:none;padding:22px 27px 26px}
.lock.is-complete .ending h2{margin:7px 0 9px}
.lock.is-complete .ending p{margin:7px 0 12px}
@media(min-width:1000px){.lock.is-complete{display:grid;grid-template-columns:minmax(0,1fr) 320px}.lock.is-complete .scene-header{grid-column:1/-1}.lock.is-complete .ending{align-self:center;padding:24px}.lock.is-complete .ending h2{font-size:32px}}
@media(max-width:600px){.machine-buttons button[id^=gate-][data-next=true]{background:#d2d7b4;color:#203b31}.machine-buttons #gate-lower{top:calc(32px + var(--scene-height)*.52)}.lock.is-complete .scene-wrap{height:300px}.lock.is-complete .scene-key{display:none}.lock.is-complete .ending{padding:16px 16px 19px}.lock.is-complete .ending h2{font-size:26px}.lock.is-complete .ending p{line-height:1.6}}
/* Keep the actual crossing action readable over the generic next-control rule. */
.boat-button[data-ready=true][data-next=true]{background:#d2d7b4;border-color:#e1d391;color:#203b31}
.boat-button[data-ready=true][data-next=true]:hover{background:#e0e4c9;color:#142820}
/* Readiness changes ink and fill together, without an unsafe interpolated fill. */
.boat-button{transition:border-color .16s}
