:root{font-family:Segoe UI,Yu Gothic UI,Yu Gothic,Meiryo,sans-serif;color:#202833;background:#f6f7f4;line-height:1.7;font-size:16px;font-synthesis:none}*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:25px}body{margin:0}button,input,select{font:inherit}button,a,summary,select{touch-action:manipulation}button,select,summary{cursor:pointer}button{background:#fff;border:1px solid #d7dfe8;color:#202833;border-radius:6px;font-size:14px;padding:7px 12px;transition:background .15s}button:hover:not(:disabled){background:#edf2fb}button:disabled{opacity:.45;cursor:not-allowed}button.primary{background:#315ce5;border-color:#315ce5;color:#fff;font-weight:600;padding:11px 20px;box-shadow:0 3px 8px #315ce519}button.primary:hover:not(:disabled){background:#244dcd}button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #7f9cf4;outline-offset:3px}h1,h2,h3,p{margin-top:0}h1{font-size:39px;letter-spacing:-1px;line-height:1.5;margin-bottom:16px}h2{font-size:23px;line-height:1.5;margin-bottom:0}h3{font-size:16px;margin-bottom:10px}p{color:#202833}a{color:#315ce5;text-decoration:none}a:hover{text-decoration:underline}code{font-family:Consolas,SFMono-Regular,monospace}small{font-size:12px}.eyebrow{font-size:12px;font-weight:700;letter-spacing:1.7px;color:#202833;margin-bottom:10px}main{max-width:1380px;margin:auto;padding:0 26px}.intro{padding:43px 0 36px;border-bottom:1px solid #dfe5e8;margin-bottom:34px}.intro h1{color:#315ce5}.intro h1 span{display:inline-block}.intro-copy{min-width:0}.intro-description{font-size:21px;font-weight:700;line-height:1.9;margin:0}.resource-links{display:flex;flex-wrap:wrap;gap:9px;margin-top:20px}.resource-link{position:relative;display:grid;grid-template-columns:28px minmax(0,1fr) auto;column-gap:10px;min-width:180px;padding:10px 13px;border:1px solid #dbe2eb;border-radius:8px;background:#fff;box-shadow:0 2px 8px #2339570a;color:#202833;line-height:1.3;transition:border-color .15s,transform .15s,box-shadow .15s}a.resource-link:hover{border-color:#9eb2ec;box-shadow:0 5px 14px #23395712;text-decoration:none;transform:translateY(-1px)}.resource-icon{grid-column:1;grid-row:1 / 3;align-self:center;width:26px;height:26px;color:#315ce5}.resource-link small{grid-column:2;grid-row:1;color:#202833;font:12px Consolas,monospace;letter-spacing:1.1px}.resource-link strong{grid-column:2;grid-row:2;margin-top:3px;font-size:13px}.resource-link>span{grid-column:3;grid-row:1 / 3;align-self:end;color:#315ce5;font-size:13px}.intro-guide{margin-top:20px}.edition{font:12px Consolas,monospace;letter-spacing:1px;color:#202833}.intro-guide ol{list-style:none;padding:0;margin:12px 0;font-size:14px;color:#202833}.intro-guide li{margin:12px 0}.intro-guide b{color:#315ce5;font:13px Consolas,monospace;padding-right:12px}.intro-guide a{font-size:14px}.build-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(420px,1fr);gap:30px;align-items:start}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:14px}.section-heading .eyebrow{font-size:12px;margin-bottom:8px;color:#202833}.badge{font-size:12px;color:#637b59;background:#ecf1e6;border:1px solid #dce5d4;border-radius:30px;padding:5px 11px;white-space:nowrap}.section-description{font-size:14px;line-height:1.8;margin-bottom:22px}.editor-caption{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid #34445c;background:#213047;color:#cdd8e9;padding:12px 15px;border-radius:9px 9px 0 0;font-size:13px}.editor-caption>span:first-child{font-family:Consolas,monospace}.editor-caption i{display:inline-block;width:6px;height:6px;background:#a4cc85;border-radius:50%;margin-right:9px}.editor-caption small{margin-left:12px;font-size:12px;color:#8d9eb7}.editor-caption button{font-size:12px;padding:4px 8px;background:#2c3b51;color:#bccde5;border-color:#48566c}.editor{overflow:hidden}.editor-loading{height:350px;background:#172336;color:#aabbcf;padding:30px}.cm-editor.cm-focused{outline:none}.code-toolbar{display:flex;align-items:center;gap:12px;justify-content:space-between;border-radius:0 0 9px 9px;padding:15px;background:#213047}.test-buttons{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.code-toolbar .fullscreen-toggle{flex-shrink:0;margin-left:auto;color:#c0ccdc;background:transparent;border-color:#53647c;font-size:13px}.code-toolbar .fullscreen-toggle:hover{background:#2c3b51}.sub-actions{display:flex;gap:16px;justify-content:flex-end;padding:10px 0 18px}.sub-actions button{background:transparent;border:0;padding:4px 0;font-size:12px;color:#202833}.hints{border:1px solid #dfe5e9;background:#fff;border-radius:9px;padding:2px 18px}.hints details{padding:13px 0;border-bottom:1px solid #edf0f4}.hints details:last-child{border:0}.hint-instructions{font-weight:400}.hint-instructions code{white-space:nowrap}summary{color:#202833;font-size:14px;font-weight:600}details p{font-size:14px;line-height:1.9;margin:12px 0 0}details code{font-size:13px;color:#202833;background:#f3f5f9;padding:1px 3px}.completion{font:30px Consolas,monospace;color:#315ce5}.completion span{font-size:16px;color:#202833}.instruction-list{border:1px solid #dfe5e9;border-radius:9px;background:#fff;overflow:hidden}.instruction-row{display:grid;grid-template-columns:48px minmax(0,1fr) 96px;gap:12px;align-items:center;padding:12px 14px;border-bottom:1px solid #e9edf2}.instruction-row:last-child{border:0}.instruction-meta code{font-size:13px;color:#202833;display:block}.reference,.difficulty{display:block;color:#678660;background:#edf3e8;font-size:12px;border-radius:3px;text-align:center;margin-top:4px;width:40px}.difficulty{color:#a65359;background:#fbeaec;width:44px}.instruction-body strong{font:700 15px Consolas,monospace;color:#202833}.instruction-body p{font-size:12px;color:#202833;margin:4px 0 0;line-height:1.6}.instruction-actions{display:grid;gap:7px}.instruction-actions button{font-size:12px;padding:3px 7px;display:block;width:100%}.common-note{font-size:13px;padding:14px 0;margin:0;color:#202833}table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}th,td{padding:7px 8px;border-bottom:1px solid #edf0f5}th{font-weight:500;color:#202833;font-size:12px}thead{background:#f7f9fc}.notice{display:flex;align-items:center;gap:12px;background:#fff3e9;border:1px solid #efd6bf;color:#975a32;border-radius:8px;padding:13px 17px;margin-bottom:18px;font-size:14px;overflow-wrap:anywhere}.notice>span{flex:1}.notice button{font-size:12px;white-space:nowrap}.undo{text-align:right;margin-bottom:15px}.undo button{font-size:13px}.simulation{border-top:1px solid #dce3e7;margin-top:40px;padding-top:32px}.simulation>.section-heading h2{font-size:27px}.run-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:30px;align-items:start}.rom-panel{min-width:0}.rom-panel .editor{border-radius:0 0 8px 8px}.rom-panel .cm-scroller{max-height:530px!important}.rom-description{margin-top:18px;padding:19px 20px;background:#edf1e8;border:1px solid #dfe7d8;border-radius:8px}.rom-description h3{color:#596d4a;font-size:14px}.rom-description p{font-size:13px;color:#202833;line-height:1.9;margin-bottom:10px}.rom-description code{font-size:13px}.rom-description button{color:#617653}.rom-tips{margin-top:16px;padding:2px 12px}.rom-tip-row{margin:0;padding:10px 0;font-size:13px;line-height:1.8}.rom-tip-row dt{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;font-weight:600}.rom-tip-row dt span{min-width:3em}.rom-tip-row dd{margin:4px 0 0}.rom-loop{margin:10px 0;padding:10px;border:1px solid #cedaec;border-radius:6px;background:#f3f7fd}.rom-loop h4{margin:0 0 4px;font-size:13px;line-height:1.7;color:#243e63}.wait-loop{border-color:#dcd3eb;background:#f6f2fa}.wait-loop h4{color:#513a70}.blink-loop{border-color:#d1dfce;background:#f3f8f1}.blink-loop h4{color:#35542d}.cpu-view{min-width:0}.board{background:#172336;border-radius:11px;padding:22px 24px;color:#dae6f6;box-shadow:0 7px 18px #14283a12}.board-heading{display:flex;justify-content:space-between;gap:10px;font:12px Consolas,monospace;letter-spacing:1px;color:#8da2c0}.run-indicator{color:#a9c694}.led-bank{display:flex;justify-content:space-evenly;text-align:center;padding:33px 0}.led{display:flex;align-items:center;justify-content:center;width:51px;height:51px;border-radius:50%;background:#314234;border:2px solid #5b7050;color:#8ca377;font:20px Consolas,monospace;box-shadow:inset 0 3px 6px #0003}.led.on{background:#c3f380;border-color:#ddffb1;color:#466132;box-shadow:0 0 18px #bcf27955,inset 0 2px 6px #fff5}.led-bank small{display:block;color:#7e92af;font:12px Consolas,monospace;letter-spacing:1px;margin-top:12px}.register-bank{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;padding-top:18px;border-top:1px solid #30405a}.register-bank>div{background:#21314a;border-radius:6px;text-align:center;padding:10px 4px}.register-bank label{display:block;color:#8299b8;font:12px Consolas,monospace;letter-spacing:1px}.register-bank strong{display:block;font:27px Consolas,monospace;margin:7px 0;color:#e2eaf6}.register-bank code{font-size:12px;letter-spacing:1px;color:#7d97bc}.register-bank .changed{background:#2b4264;outline:1px solid #6986b5}.register-bank .changed strong{color:#c1dcff}.current-instruction{display:flex;justify-content:space-between;gap:10px;font-size:12px;padding-top:20px;color:#8198b9}.current-instruction strong{font:14px Consolas,Yu Gothic UI,sans-serif;color:#b6c7df}.playback{display:flex;gap:8px;align-items:center;padding:17px 0}.playback button{font-size:14px}.playback label{display:flex;gap:6px;align-items:center;font-size:12px;color:#202833;margin-left:auto}.playback select{padding:7px 5px;border:1px solid #d9e1ec;border-radius:5px;background:#fff;color:#202833;font-size:12px}.inputs{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;justify-content:space-between;gap:15px;background:#fff;border:1px solid #dfe5ea;padding:18px;border-radius:8px;margin-bottom:18px}.input-description{grid-column:1 / -1}.timer-readout{min-width:0;padding:8px;border-radius:6px}.timer-readout>span{display:block;font-size:12px}.timer-readout strong{display:block;font-size:26px;font-variant-numeric:tabular-nums;line-height:1.4}.timer-readout.finished{background:#edf7ed;color:#285a35}.timer-light{display:inline-block;width:9px;height:9px;margin-right:6px;border-radius:50%;background:#4b824e;opacity:.2}.timer-light.lit{opacity:1}.inputs h3{font-size:14px;margin-bottom:4px}.inputs p{font-size:12px;margin:0;color:#202833}.switches{display:flex;gap:7px}.inputs .switch-notice{grid-column:1 / -1;justify-self:end;font-size:11px}.switches button{min-width:34px;padding:4px 9px;font:16px Consolas,monospace;background:#f3f5f8}.switches small{display:block;font-size:12px;color:#202833;margin-bottom:4px}.switches button[aria-pressed=true]{background:#e8efff;border-color:#8ea7ef;color:#315ce5}.live-rom{background:#fff;border:1px solid #dfe5ea;border-radius:8px;padding:17px}.live-rom-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.live-rom-title h3{font-size:14px;margin:0}.live-rom-title span{font-size:12px;color:#202833}.rom-words{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:repeat(8,auto);grid-auto-flow:column;gap:3px 14px}.rom-words>div{display:flex;align-items:center;gap:10px;padding:6px 7px;font:12px Consolas,monospace;border-radius:4px}.rom-words span,.rom-words code{color:#202833}.rom-words strong{font-weight:400;color:#202833}.rom-words .current{background:#e9efff;outline:1px solid #b6c6f8}.rom-words .current strong,.rom-words .current span{color:#315ce5}.muted{font-size:13px;color:#202833}.history{margin-top:16px;border:1px solid #dfe5ea;border-radius:8px;background:#fff;padding:15px}.history summary{font-size:13px}.history table{margin-top:14px;font-size:12px}.history td,.history th{padding:6px}.table-scroll{overflow:auto}footer{border-top:1px solid #dce3e7;margin-top:45px;padding:26px 0 32px;display:flex;justify-content:space-between;gap:15px;font-size:12px;color:#202833}@media(max-width:1100px){.build-grid{grid-template-columns:minmax(0,1.25fr) minmax(380px,1fr);gap:22px}.run-grid{gap:22px}.instruction-row{gap:8px;padding:10px}.instruction-body p{font-size:12px}.board{padding:20px 16px}.playback{flex-wrap:wrap}.playback label{margin-left:0}.section-heading h2{font-size:21px}.badge{font-size:12px}.intro h1{font-size:35px}.code-toolbar .primary{font-size:13px;padding:10px 14px}}@media(max-width:1000px){main{padding:0 18px}.intro{padding-top:30px}.intro h1{font-size:30px}.intro-guide li{font-size:13px}.build-grid,.run-grid{grid-template-columns:1fr;gap:28px}.tests-panel{margin-top:5px}.instruction-row{grid-template-columns:48px minmax(0,1fr) 96px;padding:12px 15px;gap:12px}.instruction-body p{font-size:13px}.instruction-actions button{font-size:12px}.section-heading h2{font-size:23px}.simulation>.section-heading h2{font-size:24px}.playback label{margin-left:auto}.led-bank{padding:30px 0}.notice{flex-wrap:wrap}.notice>span{min-width:75%}.cm-scroller{max-height:520px!important}.rom-words>div{font-size:14px}.live-rom-title span{font-size:12px}}@media(max-width:500px){.intro{margin-bottom:26px}.intro h1{font-size:32px}.resource-links{display:grid;grid-template-columns:1fr 1fr}.resource-link{min-width:0}.intro-guide ol{margin:10px 0}.intro-guide li{margin:7px 0}.intro-guide a{font-size:13px}.edition{font-size:12px}.section-heading{gap:8px}.section-heading h2{font-size:21px}.section-description{font-size:13px}.badge{font-size:12px;padding:4px 8px}.editor-caption{padding:10px}.editor-caption small{margin-left:7px;font-size:12px}.code-toolbar{padding:12px}.instruction-row{grid-template-columns:44px minmax(0,1fr) 92px;gap:9px;padding:10px}.instruction-body p{font-size:12px}.instruction-body strong{font-size:14px}.simulation>.section-heading{display:block}.simulation>.section-heading .badge{display:inline-block;margin-top:12px}.simulation>.section-heading h2{font-size:24px}.board{padding:20px 15px}.led{width:43px;height:43px}.register-bank{gap:6px}.register-bank strong{font-size:25px}.playback{gap:6px}.playback button{font-size:13px;padding:8px 11px}.playback button.primary{padding:9px 16px}.playback label{width:100%;justify-content:flex-end}.inputs{padding:14px;gap:10px}.inputs p{font-size:12px}.switches{gap:5px}.switches button{min-width:30px;padding:4px 7px}.rom-words{gap:3px 6px}.rom-words>div{gap:7px;font-size:12px;padding:6px}.live-rom-title span{font-size:12px}footer{flex-direction:column;font-size:12px;gap:5px}.sub-actions{gap:12px}.sub-actions button{font-size:12px}}.code-panel,.tests-panel{min-width:0}.cpu-workspace.is-fullscreen{position:fixed;inset:0;z-index:100;height:100dvh;display:flex;flex-direction:column;background:#172336;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}.is-fullscreen .editor-caption,.is-fullscreen .code-toolbar{flex-shrink:0;border-radius:0}.is-fullscreen .editor,.is-fullscreen .editor-loading{flex:1;min-height:0}.is-fullscreen .cm-editor{height:100%}.is-fullscreen .cm-scroller{min-height:0!important;max-height:none!important;overscroll-behavior:contain}.fullscreen-feedback{flex-shrink:0;display:flex;align-items:center;gap:12px;padding:8px 15px;color:#c0ccdc;background:#213047;font-size:14px;max-height:25dvh;overflow:auto;overflow-wrap:anywhere}.fullscreen-feedback [role=alert]{color:#ffceba}.fullscreen-feedback button{flex-shrink:0;background:transparent;color:#c0ccdc;border-color:#53647c}.instruction-row.passed{background:#edf7ed}.instruction-row.failed{background:#fff0f0}.instruction-row:focus-within{box-shadow:inset 3px 0 #6c8eed}@media(max-width:500px){.resource-link{grid-template-columns:22px minmax(0,1fr) auto;column-gap:6px;padding:10px 8px}.resource-icon{width:22px;height:22px}.section-heading{flex-wrap:wrap}}
