*{box-sizing:border-box}body{margin:0;background:#f0f2f1;color:#3a3c3b;font:16px Inter,"Segoe UI",sans-serif}header{height:60px;background:#272828;color:#d6d7d6;display:flex;align-items:center;gap:18px;padding:0 4vw;font-size:.88rem}.brand{display:flex;align-items:center;gap:10px;font-size:1.24rem;font-weight:750;color:white;letter-spacing:-.05em}.brand-logo{width:85px;height:auto;display:block}.primary:hover{background:#a60000;color:white}.divider{height:19px;border-left:1px solid #53605f}.mode{margin-left:auto;color:#ffffff;font: .8rem monospace}main{max-width:1750px;margin:auto;padding:22px 4vw 30px}.toolbar,.actions,.panelhead,.codefoot,.plotlabel{display:flex;align-items:center;justify-content:space-between}.toolbar{margin-bottom:20px}.actions{gap:9px}h1,h2,p{margin:0}h1{font-size:clamp(2rem,4vw,3rem);letter-spacing:-.065em;line-height:1.12}h1 span{color:#ff0000}.eyebrow,.plotlabel,.viewtag,.scale{font:600 .72rem monospace;letter-spacing:.09em}.eyebrow{color:#636564;margin-bottom:6px}button,select,a{font:inherit}button,select{cursor:pointer;background:#fff;color:inherit;border:1px solid #cacccb;border-radius:7px;padding:8px 12px;font-size:.86rem}button:hover,select:hover{border-color:#65766d}.primary{background:#cc0000;border-color:#cc0000;color:#ffffff;font-weight:700}.layout{display:grid;grid-template-columns:1.16fr 1fr;grid-template-rows:clamp(305px,42vh,520px) minmax(240px,auto);gap:14px}section{border:1px solid #cacccb;background:white;border-radius:12px;overflow:hidden;min-width:0;display:flex;flex-direction:column}.panelhead{height:49px;flex-shrink:0;padding:0 17px;border-bottom:1px solid #dcdddc}.panelhead>span,.codefoot{font: .79rem monospace;color:#5f6160}h2{font-size:1rem;font-weight:680;letter-spacing:-.025em}.panelhead button,.panelhead select{padding:5px 8px}#scene{position:relative;background:#202d31;flex:1;min-height:0}#scene canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}.viewtag,.scale{position:absolute;color:#eeeeee;pointer-events:none;z-index:1}.viewtag{top:15px;left:16px}.scale{bottom:13px;right:15px;color:#c3c4c3}.palette{display:flex;gap:6px;padding:10px 13px;border-bottom:1px solid #dcdddc}.palette button{padding:5px 8px}.workspace{background-color:#f6f7f7;background-image:radial-gradient(#cacccb 1px,transparent 1px);background-size:15px 15px;overflow:auto;flex:1;padding:15px 18px}.start,.brick{display:table;background:#ecbe57;border-radius:7px;padding:7px 13px;color:#14282d;font-size:.86rem}.start{border-radius:15px 8px 5px 5px}.brick{display:flex;align-items:center;gap:7px;width:max-content;max-width:100%;margin-top:2px;position:relative;cursor:grab;background:#90cedc;font-weight:600}.brick:before{content:"";position:absolute;top:-2px;left:20px;width:13px;height:4px;background:inherit;border-radius:0 0 3px 3px}.turn{background:#b4a9eb}.wait{background:#ecc38b}.brick.active{outline:2px solid #28352c}.brick input{width:53px;border:0;border-radius:5px;text-align:center;padding:3px;background:#ffffffc9;font:inherit}.brick button{padding:1px 5px;background:#ffffff70;border:none}.brick button:disabled{opacity:.3}.metrics{display:grid;grid-template-columns:repeat(3,1fr);margin:16px 18px;gap:12px}.metrics div{font-size:.84rem;color:#5f6160}.metrics strong{display:block;color:#3a3c3b;margin-top:3px;font:600 1.65rem monospace}.metrics small{font-size:.84rem;color:#626463}.plotlabel{padding:0 18px;color:#5f6160}.plotlabel span{font-weight:400}#plot{height:64px;margin:6px 16px 13px}#plot canvas{display:block}.code pre{font: .88rem/1.53 Consolas,monospace;margin:0;padding:12px 17px;flex:1;color:#3a3c3b;overflow:auto;counter-reset:line}.code pre span{display:block}.code pre span:before{counter-increment:line;content:counter(line);display:inline-block;width:2em;color:#93a09b}.codefoot{padding:8px 17px;border-top:1px solid #dcdddc}.codefoot a{color:#a60000}button:focus-visible,select:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid #267aac}@media(max-width:820px){main{padding:18px 12px}.layout{grid-template-columns:1fr 1fr}.brick{gap:3px;padding:6px}.palette{flex-wrap:wrap}.actions{gap:4px}}@media(max-width:660px){header{padding:0 12px;gap:8px}header>.divider,header>.divider+span{display:none}.layout{grid-template-columns:1fr;grid-template-rows:300px auto auto auto}.workspace{max-height:350px}.toolbar{gap:8px}.actions button{padding:8px;font-size:.79rem}.mode{font-size:.7rem}.eyebrow{font-size:.62rem}}

header a{color:#ffffff}.account{max-width:760px;margin:4vh auto}.account h2{margin-top:22px}.account form{display:grid;gap:12px;background:white;padding:22px;border:1px solid #d5dad3;border-radius:12px;margin:16px 0}.account form[hidden],[hidden]{display:none!important}.account label{display:grid;gap:5px}.account input,.account select{font:inherit;padding:8px;border:1px solid #bec9c0;border-radius:5px}.account li{padding:5px}.account #message{color:#764417}.account form button{justify-self:start}
.usbbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 16px}.usbbar label,.usbbar span{font-size:.87rem}.usbbar select{margin-left:5px}.usbbar span{color:#585a59}button:disabled{opacity:.55;cursor:default}

@media(max-width:660px){header{height:auto;min-height:60px;flex-wrap:wrap;padding-block:8px}.brand-logo{width:64px}.brand{font-size:1rem}.mode{font-size:.72rem}}
.studio header{padding-inline:16px;flex-shrink:0}.studio header #reset{color:#3a3c3b}
.studio main{width:100%;max-width:none;padding:0 10px 8px}
.studio .usbbar{margin:0;padding:7px 0}
.minimap{position:absolute;z-index:1;bottom:9px;left:9px;width:clamp(94px,21%,160px);margin:0;background:#fffef9ee;border:1px solid #cacccb;border-radius:6px;pointer-events:none}
.minimap figcaption{font:600 .72rem/1.2 monospace;padding:4px 7px 0;color:#3a3c3b}
.minimap svg{display:block;width:100%;height:auto}.minimap polyline{fill:none;stroke-width:2}.planned{stroke:#666;stroke-dasharray:4 3}.covered{stroke:#cc0000}.origin{fill:#fff;stroke:#3a3c3b}.marker{fill:#a60000;stroke:#fff;stroke-width:.7}
.split{display:none}
@media(min-width:661px){
  .studio{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
  .studio main{flex:1;display:flex;flex-direction:column;min-height:0}
  .studio .layout{flex:1;min-height:0;gap:0;grid-template-columns:minmax(0,calc(var(--left,50%) - 5px)) 10px minmax(0,1fr);grid-template-rows:minmax(0,calc(var(--top,50%) - 5px)) 10px minmax(0,1fr)}
  .studio section{min-height:0}.view{grid-area:1/1}.blocks{grid-area:1/3}.tele{grid-area:3/1}.code{grid-area:3/3}
  .tele{overflow:auto}.studio #plot{flex:1;min-height:44px;position:relative}.studio #plot canvas{position:absolute;inset:0}
  .split{display:grid;place-items:center;touch-action:none;user-select:none;z-index:2}
  .vertical{grid-area:1/2/4/3;cursor:col-resize}.horizontal{grid-area:2/1/3/4;cursor:row-resize}
  .split:after{content:"";background:#919593;border-radius:4px}.vertical:after{width:3px;height:36px}.horizontal:after{width:36px;height:3px}
  .split:hover,.split:focus-visible{background:#ffdfdf;outline:none}.split:hover:after,.split:focus-visible:after{background:#cc0000}
}
@media(max-width:850px){.studio header>.divider,.studio header>.divider+span{display:none}}
#liveprogress{display:grid;gap:12px;padding:24px;color:#3a3c3b}#missionbar{width:100%;accent-color:#cc0000}
#theme-toggle{white-space:nowrap;color:#fff;background:#343638;border-color:#646668}
#theme-toggle::before{content:"☾";margin-right:.4em}
#theme-toggle[aria-pressed=true]{border-color:#ff8a8a;background:#48282b}
#theme-toggle[aria-pressed=true]::before{content:"☑"}
html[data-theme=dark]{color-scheme:dark;--panel:#222529;--edge:#484c50;--ink:#f2f3f4;--muted:#bfc3c7}
[data-theme=dark] body{background:#16181b;color:var(--ink)}
[data-theme=dark] :is(section,.account form){background:var(--panel);border-color:var(--edge)}
[data-theme=dark] :is(.panelhead,.palette,.codefoot,.minimap){border-color:var(--edge)}
[data-theme=dark] :is(.panelhead>span,.codefoot,.plotlabel,.eyebrow,.usbbar span,.metrics div,.metrics small){color:var(--muted)}
[data-theme=dark] :is(.metrics strong,.code pre,#liveprogress,.minimap figcaption){color:var(--ink)}
[data-theme=dark] :is(select,.account input,button:not(.primary):not(#theme-toggle)){background:#32363b;color:var(--ink);border-color:#62666a}
[data-theme=dark] .workspace{background-color:#1b1e21;background-image:radial-gradient(#414549 1px,transparent 1px)}
[data-theme=dark] .brick :is(button,input){background:#ffffffc9!important;color:#182025!important;color-scheme:light}
[data-theme=dark] .brick.active{outline-color:#fff}
[data-theme=dark] .codefoot a,[data-theme=dark] .account #message{color:#ffaaaa}
[data-theme=dark] .minimap{background:#222529ee}
[data-theme=dark] .planned{stroke:#c5c6c7}
[data-theme=dark] .covered{stroke:#ff7777}
[data-theme=dark] .marker{fill:#ff7777}
@media(min-width:661px) and (max-width:1100px){.studio header{height:auto;min-height:60px;flex-wrap:wrap;gap:8px;padding-block:6px}}
.library{flex-shrink:0;padding:7px 12px;border-bottom:1px solid #9996}.filters,#choices{display:flex;gap:6px;flex-wrap:wrap}.filters select,.filters input,#choices button{font:inherit;font-size:.81rem;padding:5px 8px}.filters input{flex:1;min-width:110px;border:1px solid #9998;border-radius:5px}.filters{margin-bottom:5px}#choices{max-height:76px;overflow:auto}#choices button{white-space:normal}.nested{margin-left:16px;border-left:3px solid #aa83d4;padding-left:7px}.insertpoint{margin:4px 0;padding:3px 7px;font-size:.75rem}.insertpoint[aria-pressed=true]{outline:2px solid #a55050}.brick.if,.brick.repeat,.brick.while,.brick.stop{background:#eebd8a}.brick.read{background:#8ad8bf}.brick.set,.brick.add,.brick.multiply,.brick.display{background:#e9a7c7}.brick{flex-wrap:wrap}.brick select{font-size:.8rem;padding:2px}.workspace{min-height:0}#reading:not(:empty){padding:4px 18px;font: .9rem monospace}
.view>.panelhead{height:auto;min-height:44px;padding:5px 10px;gap:6px;flex-wrap:wrap}.view-actions,.view-tools{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.view-actions button,.view-actions select,.view-tools button,.view-tools select{font-size:.76rem;padding:4px 7px}.view-tools{padding:5px 10px;border-bottom:1px solid #9996;max-height:42%;overflow:auto;flex-shrink:0}.view-tools [role=status]{font-size:.75rem}.view-tools button[aria-pressed=true],.view-actions button[aria-expanded=true]{outline:2px solid #c34a4a}.view-tools label{font-size:.76rem}.module-row{display:flex;align-items:end;gap:5px;flex-wrap:wrap;margin:4px 0}.module-row label{display:grid;gap:2px}.module-row input{width:7.5rem;font:inherit}.module-row input[type=number]{width:3.7rem}#modules{width:100%}.view>#scene{overflow:hidden}
#zoom-value{font: .72rem monospace;min-width:3em;text-align:center}
#brick-library{position:fixed;inset:0 0 0 auto;margin:0;width:min(410px,100%);height:100dvh;max-height:100dvh;max-width:100%;padding:0;border:0;border-left:1px solid #939597;background:white;color:#292b2d;box-shadow:-8px 0 28px #0002}
#brick-library[open]{display:flex;flex-direction:column}#brick-library::backdrop{background:#12141665}
.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:18px 16px}
#brick-library .filters{display:grid;padding:0 16px 12px;border-bottom:1px solid #9996}
#brick-library #choices{display:block;max-height:none;overflow:auto;padding:0 16px 20px}
.brick-family{margin-top:16px}.brick-family h3{margin:0 0 7px;font-size:.84rem}.brick-family>div{display:flex;gap:6px;flex-wrap:wrap}
[data-theme=dark] #brick-library{color:var(--ink);background:var(--panel)}
#load-avoidance{margin-left:auto}.blocks .panelhead{gap:6px;flex-wrap:wrap;height:auto;min-height:44px;padding-block:4px}
