:root{font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:#243c40;background:#f5f3ed;line-height:1.5}*{box-sizing:border-box}body{margin:0}header,main,footer{max-width:1500px;margin:auto;padding:28px 40px}header{padding-top:36px;padding-bottom:12px}a{color:#216e68;text-underline-offset:4px}header>a:last-of-type{float:right}.brand{text-decoration:none;font-weight:850;letter-spacing:.13em}.brand span{font-weight:450;color:#647570;font-size:.75rem}h1{font-size:clamp(2rem,3.4vw,3.5rem);line-height:1.12;letter-spacing:-.045em;margin:36px 0 14px}h2{font-size:clamp(1.5rem,2.6vw,2.2rem);letter-spacing:-.035em;line-height:1.2;margin:4px 0}h3{font-size:1rem;margin:0 0 10px}p{margin:10px 0}nav{display:flex;flex-wrap:wrap;gap:24px;margin:24px 0}.note{font-size:.8rem;color:#627570}.controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;margin:12px 0 20px}.controls label{display:flex;align-items:center;gap:7px;font-size:.85rem;max-width:100%}select,button,input{font:inherit}select,button{border:1px solid #bdc9bb;border-radius:6px;background:#fffdf6;color:#263f40;padding:9px 12px;min-height:42px;max-width:100%}button{cursor:pointer}button:hover:not(:disabled){background:#e0e9d9}button:disabled{opacity:.45;cursor:default}.primary,button[aria-pressed=true]{background:#246b61;color:white;border-color:#246b61}button:focus-visible,select:focus-visible,a:focus-visible,input:focus-visible,svg:focus-visible{outline:3px solid #c7743b;outline-offset:3px}input[type=color]{border:0;width:40px;height:34px;padding:2px;background:none}input[type=checkbox]{accent-color:#246b61}.signal-lesson{display:grid;grid-template-columns:1fr 1fr;gap:36px;border:1px solid #ccd6c7;padding:28px;border-radius:14px;background:#fffdf6}.signal-lesson h2{font-size:1.6rem}.signal-examples{display:flex;align-items:center}.signal-examples figure{margin:0;width:50%;text-align:center;font-size:.8rem}.signal-examples svg{width:100%;max-height:180px}.theater{margin-top:48px;padding-top:30px;border-top:1px solid #b9c7b9;scroll-margin-top:16px}.exercise{background:#e7edde;border-left:3px solid #649081;padding:12px 16px;font-size:.9rem}.stage{position:relative;border:1px solid #aebbab;border-radius:14px;overflow:hidden;background:#dfe8d2}[data-ui=scene]{width:100%;height:560px;display:block;touch-action:none;cursor:crosshair}.stage [data-ui=fit]{position:absolute;top:12px;right:12px}.stage-key{position:absolute;bottom:12px;left:12px;font-size:.72rem;background:#fffff0df;padding:7px 11px;border-radius:7px;display:flex;align-items:center;gap:6px;pointer-events:none}.stage-key span{width:8px;height:8px;display:inline-block;border-radius:50%;margin-left:7px}.red-dot{background:#D83D43}.green-dot{background:#168557}.path-dot{background:#558ccc}[data-ui=traffic-notice]{padding:10px 0;min-height:42px;font-size:.9rem;font-weight:600}[data-alert=true]{color:#ad343a}.below-stage{display:grid;grid-template-columns:1.4fr 1fr;gap:36px;margin-top:10px}.below-stage.single-column{grid-template-columns:1fr}.editor>p{font-size:.85rem;color:#61756c}.train-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #d2dacb}.train-row p{font-size:.8rem;margin:2px 0;color:#5a6e62}.train-row strong{font-size:.9rem}[data-ui=selected-direction]{font-weight:650}[data-ui=edit-message]{color:#9d4531;min-height:1.5em}[data-ui=error]{color:#a62835}footer{display:flex;justify-content:space-between;font-size:.85rem;border-top:1px solid #ccd6c7;margin-top:30px;padding-top:25px;padding-bottom:40px}[data-ui=signal-list]{max-width:260px}
@media(max-width:900px){header,main,footer{padding-left:24px;padding-right:24px}.signal-lesson,.below-stage{grid-template-columns:1fr;gap:20px}}
@media(max-width:650px){header,main,footer{padding-left:16px;padding-right:16px}header>a:last-of-type{float:none;display:block;margin-top:16px}h1{margin-top:24px}[data-ui=scene]{height:420px}.controls{gap:8px 12px}.stage-key{font-size:.65rem}.theater{margin-top:30px}.signal-lesson{padding:18px}.signal-examples svg{height:140px}}

.construction-stage [data-ui=scene]{height:360px}.construction-stage:not(.first-railway-stage) text{font-size:12px;fill:#28483f}.construction-result{min-height:3em;font-weight:650}.construction-result[data-alert=true]{color:#ad343a}

/* Shared handbook treatment for the existing interactive guide pages. */
:root{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#2d493e;background:#294c3e}
body{padding:28px;background:linear-gradient(#294c3e9c,#294c3ec9),url('/assets/station-study-2026-09-13/station-background.png') center top/cover fixed;background:linear-gradient(#294c3e9c,#294c3ec9),image-set(url('/assets/station-study-2026-09-13/station-background.webp') type('image/webp'),url('/assets/station-study-2026-09-13/station-background.png') type('image/png')) center top/cover fixed}
body>header,body>main,body>footer{max-width:1440px;background:#f8f4e4;border-left:12px solid #3c5f4c;border-right:12px solid #3c5f4c;box-shadow:4px 0 0 #b0b595,-4px 0 0 #b0b595}
body>header{border-top:12px solid #3c5f4c;border-radius:12px 12px 0 0;padding-top:28px}
body>main{padding-bottom:35px}
body>footer{margin-top:0;border-bottom:12px solid #3c5f4c;border-radius:0 0 12px 12px;padding-top:25px;padding-bottom:25px}
body>header nav{border-top:1px dashed #a5af89;border-bottom:1px dashed #a5af89;padding:17px 0;gap:16px;font-size:.85rem}
body>header nav a[aria-current=page]{color:#294a38;font-weight:700;text-decoration-thickness:2px}
h1,h2{letter-spacing:-.035em}.brand{color:#315b46}.signal-lesson{background:#fdf9eb;border-color:#b3bf9c}.stage{border-color:#8ca47e}.exercise{background:#e4e9d0;border-left-color:#a39a60}.primary,button[aria-pressed=true]{background:#3c6750;border-color:#3c6750}.theater{border-top-color:#adb895}.guide-page{padding-top:10px}
@media(max-width:650px){body{padding:0}body>header,body>main,body>footer{border-left-width:5px;border-right-width:5px;box-shadow:none}body>header{border-top-width:5px;border-radius:0}body>footer{border-bottom-width:5px;border-radius:0}body>header nav{font-size:.75rem}}

/* First railway: an inspectable scene and an explanation for every beat. */
.railway-eyebrow{font-size:.72rem;font-weight:700;letter-spacing:.1em;color:#657956;margin:10px 0}
.railway-intro{font-size:clamp(1rem,1.6vw,1.25rem);max-width:900px}
.railway-chain{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;list-style:none;padding:0;margin:28px 0}
.railway-chain li{padding:18px 20px;border:1px solid #b3bf9c;border-top:4px solid #59775b;border-radius:8px;background:#fdf9eb}
.railway-chain span{display:block;font-size:.7rem;letter-spacing:.08em;color:#657956;margin-bottom:9px}
.railway-chain strong{font-size:.95rem}.railway-chain p{font-size:.82rem;margin-bottom:0}
.railway-walkthrough,.railway-reference,.railway-checks{margin-top:42px;padding-top:28px;border-top:1px dashed #a5af89}
.railway-controls[hidden],.railway-step-nav[hidden]{display:none}
.railway-controls{margin:20px 0 12px}.railway-controls button,.railway-controls select{font-size:.8rem}
.railway-step-status{font-size:.8rem;font-weight:700;border-left:3px solid #9a8c54;padding:8px 12px;background:#e8ebd5;margin:0 0 18px}
.railway-lesson-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);align-items:start;gap:24px}
.railway-scene{margin:0;min-width:0}.railway-scene .first-railway-stage [data-ui=scene]{height:auto;aspect-ratio:665/380;cursor:default;touch-action:auto}
.railway-map-key{display:flex;justify-content:space-between;gap:16px;font-size:.7rem;padding:12px 2px;line-height:1.5}
.railway-map-key span{max-width:50%}.railway-map-key span:last-child{text-align:right}
.railway-lessons{padding:20px 24px;border:1px solid #b3bf9c;border-radius:10px;background:#fdf9eb;min-height:380px}
.railway-lessons section[hidden]{display:none}.railway-lessons section+section:not([hidden]){margin-top:28px}
.railway-lessons h3{font-size:1.22rem;line-height:1.3;margin:12px 0}
.railway-lessons h4{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:#657956;margin:18px 0 4px}
.railway-lessons p{font-size:.83rem}.railway-lessons .railway-eyebrow{font-size:.7rem;margin-top:0}
.railway-walkthrough kbd{font:inherit;font-size:.8em;background:#e7ebd7;border:1px solid #b3bf9c;border-bottom-width:2px;border-radius:4px;padding:2px 5px;white-space:nowrap}
.railway-step-nav{margin:22px 0 0}.railway-step-nav ol{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;list-style:none;padding:0;margin:0;width:100%}
.railway-step-nav button{display:flex;gap:10px;align-items:baseline;width:100%;height:100%;font-size:.72rem;line-height:1.4;text-align:left;border-radius:5px;padding:12px}
.railway-step-nav button span{font-size:.65rem;color:#6e805e}.railway-step-nav button[aria-current=step]{background:#3c6750;border-color:#3c6750;color:#fff8e5}.railway-step-nav button[aria-current=step] span{color:#d8dfb8}
.railway-table-wrap{overflow:auto;margin:22px 0;border:1px solid #b3bf9c;border-radius:8px}.railway-table-wrap:focus-visible{outline:3px solid #c7743b;outline-offset:3px}
.railway-orders{border-collapse:collapse;width:100%;font-size:.78rem;text-align:left;background:#fdf9eb}
.railway-orders caption{text-align:left;padding:14px 16px;font-weight:700;background:#e4e9d0}
.railway-orders th,.railway-orders td{padding:14px 16px;border-top:1px solid #c5ceb0;vertical-align:top;min-width:140px}.railway-orders thead{background:#edf0dd}.railway-orders tbody th{font-weight:600}
.railway-reference>p{font-size:.88rem}.railway-check-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin:22px 0}.railway-check-grid h3{font-size:1rem}.railway-check-grid ul{font-size:.85rem;padding-left:20px}.railway-check-grid li{margin:10px 0}.railway-closing{padding:18px 20px;background:#e4e9d0;border-radius:8px;font-size:.9rem}
@media(max-width:1050px){.railway-lesson-layout{grid-template-columns:1fr}.railway-lessons{min-height:0}.railway-scene .first-railway-stage [data-ui=scene]{aspect-ratio:665/265}.railway-step-nav ol{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.railway-chain{grid-template-columns:1fr;gap:10px;margin:22px 0}.railway-chain li{padding:12px 16px}.railway-chain span{margin-bottom:5px}.railway-chain p{margin-top:4px}.railway-walkthrough,.railway-reference,.railway-checks{margin-top:30px;padding-top:22px}.railway-lessons{padding:18px}.railway-step-nav ol{grid-template-columns:repeat(2,minmax(0,1fr))}.railway-step-nav button{padding:10px;font-size:.68rem}.railway-check-grid{grid-template-columns:1fr;gap:14px}.railway-scene .first-railway-stage [data-ui=scene]{aspect-ratio:665/380}.railway-map-key{font-size:.63rem;gap:8px}.railway-controls{gap:8px}.railway-controls button{flex:1 1 auto}.railway-controls label{width:100%}}
