/* Build stages stay visible; the grid and source browser share one fixed home. */
:root{color-scheme:dark;--bg:#101313;--surface:#191e1d;--line:#303b37;--ink:#eef3eb;--muted:#a5b1a8;--green:#beef8a;--active:#e2be6f;--error:#ff9c8b;--built:#709b8d}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.55 system-ui,sans-serif}header,main{width:min(1240px,calc(100% - 64px));margin:auto}a{color:inherit}button{font:inherit;cursor:pointer;border:1px solid var(--line);background:transparent;color:inherit;padding:10px 16px;border-radius:5px}button:disabled{cursor:default;opacity:.45}button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--active);outline-offset:4px}[hidden]{display:none!important}select,input{font:inherit;background:var(--surface);border:1px solid var(--line);border-radius:4px;color:var(--ink);padding:8px;max-width:100%}select{margin-left:8px}h2{font-size:20px;font-weight:550;letter-spacing:-.03em}pre{font:12px/1.7 monospace;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--muted)}.small,.locality{font-size:12px;color:var(--muted)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
header{display:grid;grid-template-columns:auto 1fr auto;gap:20px;padding:18px 0;border-bottom:1px solid var(--line);align-items:center}.brand{text-decoration:none}header nav{display:flex;justify-content:flex-end;gap:4px}header nav a{color:var(--muted);text-decoration:none;font-size:13px;padding:10px}.header-actions{display:flex;gap:8px}.header-actions a,.header-actions button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;color:var(--green);font:13px/1.4 system-ui,sans-serif;text-decoration:none;border:1px solid var(--line);border-radius:5px;padding:8px 11px;white-space:nowrap}.github-mark{display:block;width:20px;height:20px;flex-shrink:0;fill:currentColor}.share-feedback{width:min(1240px,calc(100% - 64px));margin:8px auto;text-align:right;color:var(--green);font-size:12px}.share-feedback input{width:230px;font-size:12px}
main{padding:24px 0}.hero{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:56px;align-items:end;margin-bottom:30px}.hero h1.wordmark{grid-row:1/3;font-size:clamp(42px,6vw,72px);margin:0;align-self:center}.intro{font-size:clamp(17px,1.8vw,22px);line-height:1.45;max-width:640px;margin:0 0 10px}.locality{margin:0;max-width:600px}.journey-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 20px}.journey-nav button{text-align:left;background:var(--surface);padding:12px 16px;border-radius:6px}.journey-nav button[aria-current]{border-color:var(--green)}.journey-nav strong{font:600 20px/1.3 monospace;color:var(--ink)}.journey-nav [aria-current] strong{color:var(--green)}.journey-nav small{display:block;margin-top:3px;font-size:12px;color:var(--muted)}.journey-nav sup{font-size:13px}.journey-nav button:disabled{opacity:.7}
.workflow-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 16px}.workflow-toolbar>div:first-child{display:flex;align-items:baseline;flex-wrap:wrap;gap:9px}.metric-label{font-size:12px;color:var(--muted)}#workflow-time{font:500 25px/1.3 monospace;font-variant-numeric:tabular-nums}#workflow-files{font:11px monospace;color:var(--muted);margin-left:6px}.workflow-actions{display:flex;gap:8px}#run-workflow{background:var(--green);border-color:var(--green);color:var(--bg);font-size:13px;font-weight:600}#cancel{font-size:12px}#cancel:disabled{opacity:.35}
.flow{display:flex;justify-content:center;align-items:center;list-style:none;margin:0;padding:0;gap:26px}.flow>li{position:relative;min-width:0}.flow>li+li:before{content:'→';position:absolute;left:-22px;top:50%;transform:translateY(-50%);color:var(--muted);font:16px monospace}.flow-node{flex:1;max-width:320px}.flow-node>button{width:100%;text-align:left;min-height:104px;padding:13px 14px;border-radius:7px;background:var(--surface)}.flow-node>button:disabled{opacity:.5}.flow-node.active>button,.flow-node.done>button{opacity:1}.flow-node.active>button{border-color:var(--active);background:#e2be6f0b}.flow-node.done>button{border-color:#beef8a70}.flow-node.failed>button{border-color:var(--error)}.node-name{display:flex;align-items:baseline;justify-content:space-between;gap:4px;font:600 18px monospace;white-space:nowrap}.node-check{font:11px system-ui;color:var(--green)}.node-description{display:block;font-size:11px;color:var(--muted);margin-top:8px}.node-stats{display:flex;justify-content:space-between;gap:8px;margin-top:10px;font:11px monospace;color:var(--muted);font-variant-numeric:tabular-nums}.active .node-stats{color:var(--active)}.endpoint{flex:0 0 96px;text-align:center}.endpoint strong,.endpoint small{display:block;font-size:11px;font-weight:500;white-space:nowrap}.endpoint small{font-size:9px;color:var(--muted);margin-top:3px}.dot{display:block;width:12px;height:12px;border-radius:50%;background:var(--green);margin:0 auto 8px}.finish{flex-basis:44px}.finish button{border:0;padding:0}.finish .dot{width:32px;height:32px;line-height:32px;font-size:11px;background:var(--line);color:var(--muted)}.finish.done .dot{background:var(--green);color:var(--bg)}.finish button:disabled{opacity:.5}.finish strong{font-size:11px}
#status{font-size:12px;color:var(--muted);min-height:20px;margin:14px 0 22px;overflow-wrap:anywhere}.phase-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px}.phase-heading>div{display:flex;align-items:center;gap:12px}.phase-heading strong{font-weight:550}#worker-count,#completed,#elapsed{font:11px monospace;color:var(--muted)}progress{display:block;width:100%;height:3px;border:0;background:var(--line);accent-color:var(--green);margin:10px 0 14px}progress::-webkit-progress-bar{background:var(--line)}progress::-webkit-progress-value{background:var(--green)}.units{display:grid;grid-template-columns:repeat(auto-fill,minmax(15px,1fr));gap:4px;min-height:21px}.units.dense{grid-template-columns:repeat(auto-fill,minmax(8px,1fr));gap:3px}.unit{aspect-ratio:1;padding:0;min-width:0;border-radius:2px;background:var(--surface);border:1px solid var(--line);max-height:22px}.unit.active{background:var(--active);border-color:var(--active)}.unit.done{background:var(--built);border-color:var(--built)}.unit.matched{background:var(--green);border-color:var(--green)}.unit.selected{outline:2px solid var(--ink);outline-offset:1px}.unit.failed{background:var(--error);border-color:var(--error)}.grid-key{display:flex;justify-content:space-between;align-items:center;gap:12px;font:10px monospace;color:var(--muted);margin:11px 0}.grid-key i{display:inline-block;width:7px;height:7px;background:var(--surface);border:1px solid var(--line);margin:0 5px 0 10px;border-radius:1px}.grid-key i:first-child{margin-left:0}.grid-key i.active{background:var(--active)}.grid-key i.done{background:var(--built)}.grid-key i.matched{background:var(--green)}#unit-detail{font:10px/1.6 monospace;color:var(--muted);overflow-wrap:anywhere;min-height:16px;margin:10px 0}.build-details{border-top:1px solid var(--line);padding:12px 0;font-size:12px;color:var(--muted)}summary{cursor:pointer}.build-details label{display:block;margin-top:14px}#downloads{display:flex;gap:15px;flex-wrap:wrap;color:var(--green)}#log{max-height:250px;overflow:auto}
.explorer{border-top:1px solid var(--line);margin:20px 0;padding-top:20px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.section-head h2{margin:0}.project-choice{font-size:12px;color:var(--muted)}.explorer>p{font-size:12px;color:var(--muted)}.explore-layout{display:grid;grid-template-columns:260px minmax(0,1fr);margin-top:16px;border:1px solid var(--line);border-radius:6px;overflow:hidden}.source-editor{position:relative;height:430px}.source-editor pre,.source-editor textarea{font:12px/1.7 monospace;tab-size:4;letter-spacing:normal;margin:0;border:0;border-radius:0;padding:12px;white-space:pre;overflow:auto;position:absolute;inset:0;width:100%;height:100%;background:transparent}.source-editor pre{pointer-events:none}.source-editor textarea{resize:none;color:transparent;caret-color:var(--ink);-webkit-text-fill-color:transparent}.source-editor textarea::selection{background:#52694e70}.code-pane pre{margin:0;height:430px;overflow:auto;white-space:pre;overflow-wrap:normal;padding:12px;color:var(--ink);font:12px/1.7 monospace}.token.comment,.token.prolog{color:#7a9184}.token.keyword{color:#ccadf4}.token.string,.token.char{color:#beef8a}.token.number,.token.boolean{color:#edbc7d}.token.function{color:#86cbd7}.token.operator,.token.punctuation{color:#cbd4cd}.token.class-name{color:#efcc94}.token.variable{color:#9cc7f1}.token.label{color:#86cbd7}.token.important{color:var(--active)}#inspector-status{font:11px/1.6 monospace;color:var(--muted);min-height:20px}.code-pane>p{margin:0;padding:8px 12px;border-bottom:1px solid var(--line)}.code-pane>p a{color:var(--green)}footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:11px;color:var(--muted);padding:20px 0;border-top:1px solid var(--line)}
dialog{border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink);padding:16px;width:min(1100px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto}dialog::backdrop{background:#000b;backdrop-filter:blur(4px)}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.modal-header h2{font-size:15px;margin:0}.modal-header button{position:sticky;top:0;font-size:13px;flex-shrink:0;background:var(--surface)}body:has(dialog[open]){overflow:hidden}#game-frame{display:block;width:100%;height:570px;border:0;background:var(--bg)}#game-status{font-size:12px;color:var(--muted)}
.wordmark{display:inline-grid;grid-template-columns:repeat(9,1ch);font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;font-size:clamp(44px,8vw,104px);font-weight:600;letter-spacing:0;line-height:1.04;row-gap:.08em}.wordmark-cpp{grid-column:3/span 3;grid-row:1;color:var(--green)}.wordmark-name{grid-column:1/-1;grid-row:2;white-space:nowrap}.wordmark-cep{display:inline-block}.brand.wordmark{font-size:19px}.brand.wordmark .wordmark-cpp{color:var(--green);font-weight:600}.brand.wordmark .wordmark-name{color:var(--ink);font-weight:600}

.project-files{border:0;border-right:1px solid var(--line);padding:12px 0;background:#131817;min-width:0}
.project-files>summary{font-size:12px;padding:0 12px 10px;list-style:none}.project-files>summary::-webkit-details-marker{display:none}
#file-count{display:block;font:10px/1.5 monospace;color:var(--muted);margin-top:4px}
#file-filter{margin:0 10px 8px;width:calc(100% - 20px);padding:7px 9px}
.tree-options{display:flex;align-items:center;gap:7px;font-size:10px;color:var(--muted);margin:0 10px 10px}
.tree-options input{margin:0;accent-color:var(--green)}
#source-files{height:490px;overflow:auto;padding-bottom:8px}
#source-files .project-row{display:flex;align-items:center;gap:5px;position:relative;padding:7px 8px 7px calc(8px + var(--depth)*13px);min-height:32px;font:11px/1.5 monospace;border:0;border-radius:0;width:100%;color:var(--muted);text-align:left;white-space:nowrap}
#source-files .project-row:hover{background:#222b25}#source-files .project-row.selected{background:#273325;color:var(--ink)}
.tree-arrow{width:10px;flex-shrink:0;color:var(--muted)}.tree-label{position:relative;overflow:hidden;min-width:0;flex:1;padding:1px 0}
.tree-label>span:last-child{position:relative;z-index:1;display:block;overflow:hidden;text-overflow:ellipsis}
.tree-bar{position:absolute;inset:0 auto 0 0;display:block;background:#beef8a25;border-radius:2px}
.tree-state{font-size:10px;min-width:16px;text-align:right;color:var(--muted)}
.project-row.matched .tree-state,.project-row.built .tree-state{color:var(--green)}.project-row.failed .tree-state{color:var(--error)}
.project-row.running .tree-label{background:#e2be6f12}.project-row.running .tree-state{color:var(--active)}
.project-row.running .tree-label:after{content:'';position:absolute;inset:0 auto 0 0;width:30%;background:#e2be6f25;animation:source-building 1.8s ease-in-out infinite}
@keyframes source-building{0%{left:-30%}100%{left:100%}}
.project-code{min-width:0}.code-tabs{display:flex;gap:0;background:var(--surface);border-bottom:1px solid var(--line);overflow:auto}
.code-tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;padding:11px 15px;white-space:nowrap;font-size:12px}
.code-tabs [aria-selected=true]{border-bottom-color:var(--green);color:var(--green)}
.code-file{display:flex;justify-content:space-between;gap:12px;padding:9px 12px;min-height:37px;border-bottom:1px solid var(--line);font:10px/1.7 monospace}
#source-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}#source-state{flex-shrink:0;color:var(--green)}
.project-code .code-pane{border:0}.project-code .code-pane pre,.project-code .source-editor{height:430px;font-size:12px}
.project-code .source-editor pre,.project-code .source-editor textarea{height:100%;font:12px/1.7 monospace}
.project-code .explore-controls{border-top:1px solid var(--line);padding:10px 12px;margin:0;gap:8px}
.project-code .explore-controls button{font-size:12px;padding:7px 10px}.project-code .explore-controls a{font-size:11px;color:var(--green)}
.token.variable{color:#9cc7f1}.token.label{color:#86cbd7}.token.important{color:var(--active)}
#game-frame{display:block;width:100%;min-height:300px;height:570px;border:0;background:var(--bg)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

@media(min-width:1600px){header,main{width:min(1380px,calc(100% - 96px))}}
@media(max-width:1000px){.hero{column-gap:30px}.flow{gap:20px}.flow>li+li:before{left:-18px}.endpoint{flex-basis:78px}.flow-node>button{padding:12px 9px}.node-name{font-size:15px}.node-description{font-size:10px}.node-check{font-size:10px}.explore-layout{grid-template-columns:220px minmax(0,1fr)}}
@media(max-width:700px){
header,main{width:calc(100% - 32px)}header{grid-template-columns:1fr auto;gap:8px;padding:12px 0}.brand.wordmark{font-size:17px}header nav{display:none}.header-actions a,.header-actions button{min-height:44px;font-size:12px;padding:8px 10px}.github-label{display:none}.share-feedback{width:calc(100% - 32px)}main{padding-top:18px}.hero{display:block;margin-bottom:22px}.hero h1.wordmark{font-size:clamp(42px,11vw,58px);margin-bottom:16px}.intro{font-size:18px;margin-bottom:8px}.locality{font-size:11px}.journey-nav{gap:6px;margin-bottom:18px}.journey-nav button{padding:10px 7px;min-width:0}.journey-nav strong{font-size:clamp(12px,3.6vw,17px)}.journey-nav small{font-size:10px;line-height:1.4}.journey-nav sup{font-size:10px}.workflow-toolbar{align-items:flex-start;gap:8px}.workflow-toolbar>div:first-child{gap:3px 7px}.metric-label{font-size:11px}#workflow-time{font-size:22px}#workflow-files{width:100%;margin:0;font-size:10px}.workflow-actions{gap:6px;flex-shrink:0}.workflow-actions button{padding:9px;font-size:11px!important;min-height:40px}
.flow{display:flex;flex-direction:column;align-items:stretch;gap:17px;padding-left:0}.flow>li+li:before{content:'↓';left:17px;top:-14px;transform:none;font-size:12px}.endpoint{flex:none;display:flex;align-items:center;gap:8px;padding:0 12px;text-align:left}.endpoint .dot{margin:0 4px 0 0;width:10px;height:10px;flex:none}.endpoint strong{font-size:11px}.endpoint small{margin:0;font-size:10px}.flow-node{max-width:none}.flow-node>button{min-height:64px;display:grid;grid-template-columns:minmax(0,1fr) 100px;column-gap:12px;padding:10px 12px}.node-name{grid-column:1;grid-row:1;font-size:16px;justify-content:flex-start;gap:10px}.node-description{grid-column:1;grid-row:2;font-size:10px;margin-top:3px}.node-stats{grid-column:2;grid-row:1/3;display:flex;flex-direction:column-reverse;align-items:flex-end;justify-content:center;gap:2px;margin:0;font-size:10px}.node-stats time{font-size:14px}.finish{flex:none;min-height:34px}.finish button{display:flex;align-items:center;gap:8px;min-height:36px}.finish .dot{width:26px;height:26px;line-height:26px;text-align:center;margin:0}.finish strong{font-size:12px}#status{margin:12px 0 18px}.phase-heading{font-size:11px}.phase-heading>div{gap:8px}#worker-count,#completed,#elapsed{font-size:10px}.units{grid-template-columns:repeat(auto-fill,minmax(12px,1fr));gap:3px}.units.dense{grid-template-columns:repeat(auto-fill,minmax(3px,1fr));gap:2px}.grid-key{flex-wrap:wrap;gap:5px}#memory{font-size:9px}.section-head{align-items:flex-start;flex-wrap:wrap}.section-head h2{font-size:18px}.project-choice{font-size:11px}.explore-layout{grid-template-columns:1fr}.project-files{border-right:0;border-bottom:1px solid var(--line);padding-bottom:8px}.project-files>summary{display:flex;justify-content:space-between;align-items:center}#file-count{margin:0}#source-files{height:190px}.project-code .code-pane pre,.project-code .source-editor{height:290px}.project-code .source-editor pre,.project-code .source-editor textarea{font-size:11px}.code-file{flex-direction:column;gap:0}.code-tabs button{padding:10px 12px}.project-code .explore-controls{gap:8px;padding:10px}.project-code .explore-controls button{min-height:40px}.project-code .explore-controls label{width:100%}.project-code .explore-controls select{min-height:40px}dialog{padding:12px;width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.modal-header h2{font-size:12px}.modal-header{position:sticky;top:-12px;background:var(--bg);z-index:1;padding:8px 0}.modal-header button{min-height:44px}dialog .small{font-size:10px}}
@media(prefers-reduced-motion:reduce){.project-row.running .tree-label:after{animation:none;left:35%}}
