:root{color-scheme:dark;--bg:#081322;--panel:#102238;--edge:#38536b;--cyan:#5bdde9;--orange:#ffa53c;--muted:#b8cbdc;--ink:#f3f9ff;--good:#8beaaf;--red:#ff9999}*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden}body{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:radial-gradient(ellipse at 14% -5%,#244763,#071421 56%,#07111e)}button,input,textarea{font:inherit}button{cursor:pointer;color:inherit}button:focus-visible,input:focus-visible,textarea:focus-visible,[role=button]:focus-visible{outline:3px solid var(--orange);outline-offset:2px}.shell{height:100dvh;max-width:1640px;margin:auto;padding:12px 19px 9px;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto;gap:10px}.top{min-height:91px;display:flex;align-items:center;justify-content:space-between;padding:11px 19px;border-radius:19px;border:1px solid #45647d;background:linear-gradient(140deg,#1b3650,#0b1b2c);box-shadow:0 13px 25px #0005}.brand{display:flex;align-items:center;gap:15px}.mark{width:59px;height:59px;border-radius:16px;display:grid;place-items:center;flex:none;color:#291407;font-weight:1000;font-size:34px;background:linear-gradient(145deg,#ffe2a9,#ff9e24 65%,#b94a04);box-shadow:inset 0 2px 4px #fff9,0 6px 0 #964107,0 10px 18px #0008}.eyebrow{font-size:.69rem;letter-spacing:.15em;color:var(--cyan);font-weight:800}h1{font-size:clamp(1.1rem,2vw,1.9rem);line-height:1.15;margin:3px 0}.top p{margin:0;color:var(--muted);font-size:.85rem}.status{background:#193c37;border:1px solid #3e8877;border-radius:40px;padding:8px 13px;color:#a7f1c6;font-size:.84rem;font-weight:750;white-space:nowrap}.tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.tabs button{background:linear-gradient(#1c3149,#102338);border:1px solid #47647e;border-bottom:4px solid #263e56;border-radius:11px;min-height:55px;padding:5px;color:#f3f9ff;font-weight:900;font-size:1.1rem}.tabs button span{display:block;font-size:.76rem;line-height:1.2;color:#b7cadb;font-weight:650}.tabs button[aria-selected=true]{border-color:#69d6e4;background:linear-gradient(150deg,#266078,#18354e);box-shadow:inset 0 1px 9px #60d7e21b,0 3px 15px #00597055}.stage{min-height:0;border:1px solid var(--edge);border-radius:18px;background:linear-gradient(135deg,#142b42,#0d2033);box-shadow:0 16px 40px #0004;overflow:hidden}.pane{height:100%;display:flex;flex-direction:column;min-height:0}.pane[hidden]{display:none}.pane-head{padding:12px 20px 10px;background:linear-gradient(115deg,#1d3d57,#10283d);border-bottom:1px solid var(--edge)}.pane-head h2{font-size:1.12rem;line-height:1.2;margin:0 0 3px}.pane-head p{color:#cadbea;font-size:.8rem;margin:0}.a-layout,.b-layout,.c-layout,.d-layout,.e-layout{display:grid;flex:1;min-height:0}.a-layout{grid-template-columns:minmax(0,1.55fr) minmax(250px,1fr)}.architecture{padding:17px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;position:relative}.component{border:2px solid #549eb7;border-radius:15px;background:linear-gradient(145deg,#245875,#132f4a 60%,#0b243d);box-shadow:inset 2px 2px 9px #92deff2a,0 9px 0 #0a2131,0 13px 18px #0009;cursor:pointer;text-align:center;transition:transform .15s,border-color .15s}.component.selected{border-color:var(--orange);box-shadow:inset 0 1px 12px #ffa63b33,0 7px 0 #7f4e17,0 12px 18px #0008;transform:translateY(2px)}.cpu,.memory{width:min(90%,385px);padding:13px}.component-title{display:block;font-size:.9rem;font-weight:900;letter-spacing:.06em}.chip-row{display:flex;justify-content:center;gap:14px;margin:9px 0}.subchip{background:linear-gradient(125deg,#1e6680,#0b293e);border:1px solid #77e8f4;border-radius:9px;min-width:103px;font-size:1.1rem;font-weight:950;padding:5px}.subchip small{display:block;font-size:.65rem;font-weight:600;color:#cae5f4}.component-sub{font-size:.72rem;color:#cbddec}.memory{background:linear-gradient(145deg,#224d4a,#102f35 65%,#0a2228);border-color:#5dbbb5}.mem-mini{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;max-width:295px;margin:6px auto}.mem-mini span{border:1px solid #427b7f;background:#0a2631;border-radius:4px;padding:2px;font-size:.73rem}.wire{width:min(70%,300px);height:41px;display:grid;place-items:center;position:relative}.wire:before,.wire:after{content:'↕';position:absolute;color:var(--cyan);font-size:18px;font-weight:900;left:8px;top:8px}.wire:after{left:auto;right:8px}.wire span{font-size:.69rem;font-weight:750;color:#aee9f5}.beam{position:absolute;inset:8px 0;border:1px dashed #67cbd9;border-radius:20px;opacity:.55;pointer-events:none}.beam.blink{animation:flash .4s ease-in-out}@keyframes flash{50%{background:#38d1df55;box-shadow:0 0 25px #39d4ec}}.peripherals{display:flex;gap:16px;width:min(90%,420px);justify-content:space-around;margin:5px 0}.peripheral{padding:9px 12px;min-width:130px;font-size:.8rem;font-weight:850;border-color:#ac89eb;background:linear-gradient(145deg,#584476,#292e54)}.a-note{font-size:.72rem;color:var(--muted);text-align:center}.inspector,.register-bank,.memory-box,.trace-panel,.editor-col,.program-col,.perf-controls,.perf-output{padding:16px 18px;min-height:0;min-width:0}.inspector,.register-bank,.trace-panel,.editor-col,.perf-controls{border-left:1px solid var(--edge);background:#0d2034}.inspector h3,.register-bank h3,.memory-box h3,.trace-panel h3,.program-col h3{font-size:.87rem;color:var(--cyan);margin:5px 0 12px;letter-spacing:.04em}.inspector p{line-height:1.55;font-size:.87rem;color:#d3e3f2}.metric{background:linear-gradient(140deg,#183750,#102639);border:1px solid #3c6681;padding:10px 12px;border-radius:12px;min-width:0}.metric small{font-size:.7rem;color:var(--muted);display:block}.metric strong{display:block;font:800 clamp(.9rem,1.5vw,1.5rem)/1.4 ui-monospace,Consolas,monospace;overflow-wrap:anywhere}.legend{display:grid;gap:9px;color:var(--muted);font-size:.78rem;margin-top:24px}.legend span:nth-child(1){color:#8de1fa}.legend span:nth-child(2){color:#a8e8c2}.legend span:nth-child(3){color:#dcbaf8}.b-layout{grid-template-columns:minmax(240px,.75fr) minmax(0,1.7fr)}.registers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:8px 0 15px}.reg{border-radius:9px;background:#173950;border:1px solid #376882;padding:7px 10px}.reg small{display:block;font-size:.66rem;color:#a5d1e5}.reg strong{font:800 1.12rem ui-monospace,Consolas,monospace;overflow-wrap:anywhere}.register-bank label,.editor-col label{display:grid;gap:4px;color:#d9e7f2;font-size:.8rem;font-weight:750;margin-bottom:10px}input[type=number],textarea{width:100%;background:#09192b;border:1px solid #57758b;border-radius:9px;padding:8px;color:white;font-family:ui-monospace,Consolas,monospace}.local-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:7px}.local-actions button{flex:1;background:linear-gradient(#25506c,#183650);border:1px solid #65aec5;border-bottom:4px solid #123046;border-radius:9px;padding:8px 10px;font-size:.74rem;font-weight:850}.mini{color:var(--muted);font-size:.72rem;line-height:1.55}.memory-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;max-height:calc(100% - 57px);overflow:auto;scrollbar-width:thin}.mem-cell{background:#0c2b3f;border:1px solid #365b71;border-radius:8px;text-align:left;padding:5px 8px;min-width:0}.mem-cell small{display:block;color:#9ac1d5;font-size:.65rem}.mem-cell strong{display:block;font:700 .72rem ui-monospace,Consolas,monospace;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mem-cell.data{background:#123a37;border-color:#387e76}.mem-cell.active{border-color:var(--orange);background:#645024}.mem-cell:disabled{cursor:default;color:var(--ink);opacity:1}.c-layout{grid-template-columns:minmax(0,1.5fr) minmax(250px,1fr)}.cpu-board{padding:15px;min-height:0;display:flex;flex-direction:column;gap:10px}.phase-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.phase-step{background:#112b42;border:1px solid #45718a;border-radius:11px;text-align:center;padding:9px 2px;font-size:.8rem;font-weight:900}.phase-step.active{background:linear-gradient(#9b5e25,#61371c);border-color:var(--orange);box-shadow:0 0 20px #ff9e3844}.machine-visual{display:grid;grid-template-columns:minmax(0,1fr) 70px minmax(0,.85fr);align-items:center;flex:1;min-height:0}.cpu-die,.ram-die{background:linear-gradient(145deg,#254f6e,#10263b);border:2px solid #67bcce;border-radius:16px;padding:13px 10px;box-shadow:inset 2px 2px 13px #a2eaff22,0 8px 0 #071a2a,0 12px 20px #0007;min-width:0}.ram-die{border-color:#62b79f;background:linear-gradient(145deg,#24534d,#112f36)}.die-label{text-align:center;font-size:.75rem;font-weight:850;letter-spacing:.03em}.die-blocks{display:grid;gap:9px;margin-top:13px}.die-block{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:9px;background:#0a2439;border:1px solid #487892;border-radius:8px;font-size:.8rem}.die-block b{font:750 .82rem ui-monospace,Consolas,monospace;overflow-wrap:anywhere}.transfer{text-align:center;color:var(--cyan);font-size:2.8rem;font-weight:900}.transfer small{display:block;font-size:.56rem;line-height:1;letter-spacing:.08em}.transfer.pulse{color:var(--orange);text-shadow:0 0 14px var(--orange)}.ram-items{display:grid;gap:6px;margin-top:12px}.ram-item{font:700 .74rem ui-monospace,Consolas,monospace;padding:9px 6px;border-radius:6px;border:1px solid #376868;background:#0a2c36;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ram-item.lit{border-color:var(--orange);background:#564526}.registers.compact{grid-template-columns:repeat(4,1fr);margin:0}.trace-panel{overflow:auto;scrollbar-width:thin}.trace-panel .metric{margin:8px 0}.trace-panel p,.delta{font-size:.82rem;line-height:1.5}.delta{background:#123046;border-radius:8px;border:1px solid #31546b;padding:10px}.log{font: .75rem/1.55 ui-monospace,Consolas,monospace;background:#091d2d;border:1px solid #33546a;padding:10px;border-radius:8px;min-height:55px;max-height:150px;overflow:auto;scrollbar-width:thin;white-space:pre-wrap}.d-layout{grid-template-columns:minmax(260px,1fr) minmax(0,1.12fr)}.editor-col{display:flex;flex-direction:column}.editor-col textarea{flex:1;min-height:100px;resize:none;line-height:1.5;font-size:.91rem}.program-col{display:flex;flex-direction:column;gap:10px}.program-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;align-content:start;overflow:auto;min-height:45px;max-height:48%;scrollbar-width:thin}.program-line{font: .77rem ui-monospace,Consolas,monospace;padding:7px 9px;background:#102d43;border:1px solid #365971;border-radius:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.program-line.current{background:#654b25;border-color:#ffb35c}.output-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.output-strip .metric{padding:7px}.program-col .log{flex:1;max-height:none;min-height:45px}.e-layout{grid-template-columns:minmax(270px,.9fr) minmax(0,1.35fr)}.perf-controls{display:flex;flex-direction:column;justify-content:space-around;gap:5px}.perf-controls label{display:block;font-size:.78rem;font-weight:750}.perf-controls output{float:right;color:#fdb55d;font:800 .8rem ui-monospace,Consolas,monospace}.perf-controls input{display:block;width:100%;margin:5px 0 0;accent-color:#ff9e36}.perf-output{display:flex;flex-direction:column;justify-content:center;gap:12px}.equation{text-align:center;background:#fff2a4;border:2px solid #cb3730;border-radius:12px;padding:11px;color:#172c37;font-size:1.05rem;font-weight:850}.perf-output .output-strip{grid-template-columns:repeat(3,1fr)}.metric.accent{border-color:var(--orange)}.perf-bars{display:grid;gap:11px}.perf-bars span{display:block;font-size:.78rem;margin-bottom:4px}.bar-track{background:#0a1e30;border-radius:6px;overflow:hidden;height:18px}.bar-track>div{height:100%;background:linear-gradient(90deg,#36a4c5,#66d5e9);min-width:2px;transition:width .2s}.bar-track #e-bar-total{background:linear-gradient(90deg,#d87724,#ffb25a)}.big-result{font:900 clamp(1.5rem,3vw,2.8rem) ui-monospace,Consolas,monospace;text-align:center;color:#ffba6e}.perf-output p{margin:0;font-size:.82rem;line-height:1.5}.toolbar{display:flex;align-items:center;gap:9px;flex-wrap:nowrap;padding:9px 12px;border:1px solid #42617b;background:linear-gradient(#203b53,#12263a);border-radius:13px}.action{background:linear-gradient(#35516a,#1c344d);border:1px solid #7792a7;border-bottom:4px solid #10283b;border-radius:10px;padding:9px 12px;font-size:.78rem;font-weight:900;white-space:nowrap;box-shadow:0 4px 10px #0004}.action:active{transform:translateY(2px);border-bottom-width:2px}.action.primary{background:linear-gradient(#ffbf68,#ef8725);color:#211608;border-color:#ffd28a;border-bottom-color:#9c460d}.action.cyan{background:linear-gradient(#387b92,#21516a);border-color:#73cbdc}.action:disabled{opacity:.45;cursor:not-allowed}.progress{margin-left:auto;font-size:.73rem;color:#bcd3e1;text-align:right;min-width:135px}.speed{display:flex;align-items:center;justify-content:flex-end;gap:6px}.speed input{width:75px;accent-color:#ffab4e}footer{display:flex;justify-content:space-between;gap:15px;color:#acbfd2;font-size:.69rem;padding:0 7px;min-height:17px}#feedback{color:#ffd29a;text-align:right}@media(max-height:740px){.shell{padding:6px 10px;gap:6px}.top{min-height:69px;padding:5px 11px}.mark{width:44px;height:44px;font-size:27px}.top p{display:none}.tabs button{min-height:43px}.pane-head{padding:8px 14px}.pane-head p{display:none}.inspector,.register-bank,.memory-box,.trace-panel,.editor-col,.program-col,.perf-controls,.perf-output{padding:10px 12px}.architecture{padding:5px;gap:3px}.cpu,.memory{padding:7px}.chip-row{margin:4px}.toolbar{padding:6px}.action{padding:6px 10px}.legend{margin-top:8px}}@media(max-width:1050px){.action{font-size:.7rem;padding:8px}.progress{min-width:110px}.tabs button span{font-size:.66rem}.a-layout{grid-template-columns:1.2fr 1fr}.toolbar{gap:5px}}@media(max-width:760px){html,body{overflow:auto;height:auto}.shell{height:auto;min-height:100dvh;grid-template-rows:auto auto auto auto auto}.top{gap:8px}.status{font-size:.72rem}.tabs{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.tabs button{font-size:.91rem;padding:5px 2px}.tabs button span{font-size:.6rem}.stage{height:auto;min-height:550px}.pane{min-height:540px}.a-layout,.b-layout,.c-layout,.d-layout,.e-layout{grid-template-columns:1fr}.architecture{min-height:300px}.inspector,.register-bank,.trace-panel,.editor-col,.perf-controls{border-left:0;border-top:1px solid var(--edge)}.b-layout,.c-layout,.d-layout,.e-layout{display:flex;flex-direction:column}.memory-grid{max-height:300px}.editor-col textarea{min-height:200px}.toolbar{flex-wrap:wrap}.progress{margin-left:0}.e-layout{min-height:650px}footer{flex-direction:column}}
