body:has(#agent-space){background:#080f1c;color:#edf2f8}
body:has(#agent-space)>.wrap{max-width:none;padding:0;margin:0}
body:has(#agent-space)>.wrap>.top,body:has(#agent-space)>.wrap>.flash,body:has(#agent-space) #nps-widget{display:none}
#agent-space{--text:#edf2f8;--muted:#b5c4d6;--surface:#122033;--line:#3c536d;--accent:#d8ff65;--font:inherit;position:relative;isolation:isolate;display:flex;flex-direction:column;height:100dvh;min-height:760px;overflow:hidden;background:radial-gradient(ellipse at 50% 45%,#1a2b3c66,transparent 65%),#080f1c;color:var(--text);font-family:var(--sans,Arial,sans-serif);font-size:clamp(22px,1.25vw,32px)}
#agent-space [hidden]{display:none!important}
.space-bar{display:flex;align-items:center;gap:32px;padding:24px 40px;z-index:2}
.space-brand{color:#d9e4f1;font-size:inherit;text-decoration:none;white-space:nowrap}
.space-live{color:#a1e1cd;font-size:inherit}
.space-live[data-connected=false]{color:#ffd4a8}
.space-bar nav{margin-left:auto;display:flex;gap:16px}
#agent-space button{min-height:52px;min-width:52px;border:1px solid #71839766;background:#132235;color:#edf2f8;border-radius:12px;padding:12px 22px;font:inherit;cursor:pointer}
#agent-space button:hover{border-color:#bbd0e5;background:#22364d}
#agent-space button:focus-visible,#agent-space a:focus-visible{outline:3px solid var(--accent);outline-offset:5px}
.space-universe{position:relative;min-height:0;flex:1}
#space-graph{width:100%;height:100%;position:absolute;inset:0;overflow:visible}
.space-core{position:absolute;left:50%;top:43%;transform:translate(-50%,-50%);width:39%;max-width:740px;text-align:center;pointer-events:none;z-index:1}
.space-core:before{content:'';position:absolute;inset:-30%;z-index:-1;background:radial-gradient(ellipse,#0d1726 35%,#0d1726cc 50%,transparent 72%)}
.space-core h1{font:500 clamp(44px,3.5vw,84px)/1.08 var(--sans,Arial,sans-serif);letter-spacing:-.04em;margin:0 0 28px;overflow-wrap:anywhere;color:#f2f6f9;text-wrap:balance}
#agent-space[data-long-title=true] .space-core h1{font-size:clamp(36px,2.8vw,70px)}
.space-core p{font-size:inherit;line-height:1.5;color:#c6d3e4;margin:22px 0 0;text-wrap:balance}
#space-phase{color:#d8ff93;font-weight:500}
#space-round-task{color:#dbccff}
#space-winner-details{pointer-events:auto;margin-top:24px}
.space-node{cursor:pointer;outline:none}.space-node .node-halo{fill:#17293888;stroke:#53718488;stroke-width:2}.space-node .node-art{pointer-events:none}
.space-node .node-name{fill:#f2f6fb;font-size:clamp(24px,1.6vw,40px);font-weight:500;text-anchor:middle}
.space-node .node-state{fill:#bbccdf;font-size:clamp(22px,1.25vw,32px);text-anchor:middle}
.space-node .node-creator{fill:#d8e3ef;font-size:clamp(22px,1.25vw,32px);text-anchor:middle}
#space-champions .champion-creator{overflow-wrap:anywhere;margin:10px 0 0}
.space-node[data-active=true] .node-halo{stroke:#d8ff65;filter:drop-shadow(0 0 14px #d8ff6566)}
.space-node[data-private=true] .node-halo{stroke-dasharray:7 8;stroke:#b5a1e7}
.space-node[data-finalist=true] .node-halo{stroke:#b7a3eb;stroke-width:3}
.space-node:focus .node-halo,.space-node:hover .node-halo{stroke:#fff;stroke-width:3}
.space-node.node-new .node-shell{animation:space-arrive 1s ease-out both;transform-box:fill-box;transform-origin:center}
.space-edge{fill:none;stroke:#76cbd4;stroke-opacity:.3;stroke-width:3}
.space-pulse{fill:#b3f7ee;filter:drop-shadow(0 0 7px #95e5e4)}
.space-activity{flex-shrink:0;text-align:center;font-size:clamp(24px,1.6vw,38px);line-height:1.4;color:#d6e5f5;margin:0;padding:18px 40px 30px;text-wrap:balance}
#agent-space[data-showcase=final]{background:radial-gradient(ellipse at 50% 45%,#39325f66,transparent 65%),#080f1c}
#agent-space[data-showcase=winner]{background:radial-gradient(ellipse at 50% 45%,#324a2866,transparent 65%),#080f1c}
#agent-space:not([data-showcase=agents]) .space-core h1{font-size:clamp(24px,1.8vw,44px);line-height:1.3;letter-spacing:-.02em;margin:0 0 24px;color:#cbd9e9}
#space-final-title{font:500 clamp(52px,5vw,110px)/1.05 var(--sans,Arial,sans-serif);letter-spacing:-.04em;text-transform:none;margin:0 0 24px;color:#f2edff;text-wrap:balance}
#agent-space[data-showcase=winner] #space-final-title{font-size:clamp(36px,3vw,64px);color:#d8ff93;margin-bottom:10px}
#space-champions{display:flex;justify-content:center;gap:24px;flex-wrap:wrap}
#space-champions>div{min-width:0;flex:1 1 40%}
.champion-art{height:clamp(100px,10vw,220px);display:flex;justify-content:center;align-items:center;font-size:100px;line-height:1;color:#daff8d;filter:drop-shadow(0 0 32px #d8ff7b33)}
.champion-art img{display:block;width:100%;height:100%;object-fit:contain}
#space-champions h3{font:500 clamp(32px,2.8vw,64px)/1.15 var(--sans,Arial,sans-serif);letter-spacing:-.025em;overflow-wrap:anywhere;text-wrap:balance;color:#efffdc;margin:14px 0 0}
#space-champions:not([data-count="1"]) .champion-art{height:clamp(80px,7vw,140px)}
#space-champions:not([data-count="1"]) h3{font-size:clamp(26px,2.2vw,46px)}
.space-takeaway{margin:0 40px 24px;padding:24px 28px;display:flex;gap:28px;align-items:center;background:#182d29;border-radius:16px}
.space-takeaway>p{font-size:clamp(24px,1.6vw,38px);line-height:1.4;margin:0;flex:1;text-wrap:pretty}.space-takeaway button{flex-shrink:0}
#space-inspector{width:min(1100px,94vw);max-height:90dvh;box-sizing:border-box;border:1px solid #4e647e;border-radius:20px;background:#101c2c;color:#dfe8f0;padding:32px;overflow:auto;box-shadow:0 30px 100px #0009;font-size:clamp(20px,1.25vw,30px);line-height:1.6}
#space-inspector::backdrop{background:#030812dd}
.space-inspector-head{display:flex;align-items:center;gap:24px}.space-inspector-head h2{font-size:1.5em;font-weight:500;text-transform:none;letter-spacing:normal;color:#e6edf5;margin:0;flex:1}
#space-inspector :is(p,li,summary,a,button,small,pre,td,th,caption,span,code,dd,dt){font-size:inherit;line-height:inherit}
#space-inspector h2{font-size:1.5em;text-transform:none;letter-spacing:normal}
#space-inspector :is(h3,h4){font-size:1.2em;text-transform:none;letter-spacing:normal}
#space-inspector a{color:#d8ff98}#space-scope,#space-count,#space-mode{color:#b8c9dd}
#space-roster,#space-tools{display:flex;gap:12px;flex-wrap:wrap;margin:28px 0}#space-roster button{white-space:normal;text-align:left}
#space-inspector[data-view=plan] :is(#space-scope,#space-count,#space-mode,#space-motion,#space-roster,#space-tools,#space-inspector-agent),#space-inspector[data-view=plan] #space-solution>h2,#space-inspector[data-view=plan] .solution-run{display:none}
#space-inspector[data-view=winner] :is(#space-scope,#space-count,#space-mode,#space-motion,#space-roster,#space-tools,#space-solution){display:none}
.space-score-comparison{overflow-x:auto;margin:24px 0}.space-score-comparison table{width:100%;border-collapse:collapse;font-size:inherit}.space-score-comparison caption{text-align:left;margin-bottom:12px}.space-score-comparison th,.space-score-comparison td{padding:12px;text-align:left;border-bottom:1px solid #34465d}.space-score-comparison th{font-weight:500}.space-score-comparison td{white-space:nowrap}.space-score-comparison tr[data-different=true]{background:#d8ff980b}.space-score-comparison tfoot{font-weight:600;color:#d8ff98}
#space-inspector-agent details{margin:24px 0}#space-inspector-agent summary{cursor:pointer;font-weight:600}#space-inspector-agent .solution-evidence pre{white-space:pre-wrap;overflow-wrap:anywhere;padding:16px;background:#0a1422;border-radius:8px}
@keyframes space-arrive{from{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}
#agent-space[data-motion=paused] *,#agent-space[data-connected=false] *{animation:none!important}
@media(prefers-reduced-motion:reduce){#agent-space *{animation:none!important;scroll-behavior:auto!important}}
@media(max-width:1000px) and (min-width:700px){.space-bar{padding:20px;gap:20px}.space-brand{max-width:180px;white-space:normal}.space-core{width:36%}.space-core h1{font-size:38px}.space-node .node-name{font-size:22px}.space-node .node-state{font-size:20px}}
@media(max-width:699px){
 #agent-space{height:auto;min-height:100dvh;overflow:visible;font-size:18px}
 .space-bar{padding:20px;gap:16px;flex-wrap:wrap}.space-brand{font-size:20px}.space-live{margin-left:auto}.space-bar nav{width:100%;margin:0;justify-content:flex-end;gap:12px}#agent-space button{font-size:18px;padding:10px 18px}
 .space-universe{display:flex;flex-direction:column;flex:none}.space-core{position:relative;left:auto;top:auto;transform:none;width:auto;max-width:none;padding:28px 24px;box-sizing:border-box}.space-core:before{display:none}.space-core h1,#agent-space[data-long-title=true] .space-core h1{font-size:36px;margin-bottom:20px}.space-core p{font-size:20px;margin-top:20px}
 #space-graph{position:relative;inset:auto;height:calc(var(--space-rows,2)*var(--space-row-height,310px));flex-shrink:0}.space-node .node-name{font-size:20px}.space-node .node-state,.space-node .node-creator{font-size:18px}
 .space-activity{font-size:20px;padding:20px 24px 28px}.space-takeaway{margin:0 16px 20px;padding:20px;gap:20px;flex-direction:column;align-items:stretch}.space-takeaway>p{font-size:20px}
 #agent-space:not([data-showcase=agents]) .space-core h1{font-size:22px}.champion-art{height:130px}#space-champions h3{font-size:32px}#space-final-title{font-size:48px}
 #space-inspector{padding:22px;font-size:18px}.space-inspector-head{gap:12px;align-items:start}.space-inspector-head h2{font-size:26px}
}

#space-next{color:#c6d3e4}
#agent-space[data-working=true] .space-core:before{background:radial-gradient(ellipse,#152c29 30%,#0d1726dd 52%,transparent 72%)}
.space-node[data-active=true] .node-halo{stroke:#d8ff65;animation:space-working 2.4s ease-in-out infinite}
.space-edge[data-kind=assignment]{stroke:#d8ff93;stroke-opacity:.65;stroke-dasharray:12 12;animation:space-flow 2s linear infinite}
.space-edge[data-kind=peer]{stroke-opacity:.65;stroke-width:4}
.space-edge[data-kind=work]{stroke:#87e9e0;stroke-opacity:.6;stroke-width:3}
.space-edge[data-failed=true]{stroke:#ef9898;stroke-dasharray:2 5}
#agent-space button.space-activity{flex-shrink:0;margin:0 40px 24px;padding:18px 24px;font-size:clamp(24px,1.6vw,38px);line-height:1.4;text-align:center;background:#132735;border-color:#435c6d;text-wrap:balance}
@keyframes space-working{50%{stroke-width:6;stroke-opacity:.65;filter:drop-shadow(0 0 24px #d8ff6588)}}
@keyframes space-flow{to{stroke-dashoffset:-48}}
@media(max-width:699px){#agent-space button.space-activity{margin:0 16px 20px;font-size:20px;padding:18px}.space-core #space-next{font-size:20px}}

#agent-space[data-layout=grid]{height:auto;min-height:100dvh;overflow:visible}
#agent-space[data-layout=grid] .space-universe{display:flex;flex-direction:column;flex:none}
#agent-space[data-layout=grid] .space-core{position:relative;left:auto;top:auto;transform:none;width:auto;max-width:1400px;margin:0 auto;padding:10px 32px 30px;box-sizing:border-box}
#agent-space[data-layout=grid] .space-core:before{inset:-20% 0}
#agent-space[data-layout=grid] .space-core h1{font-size:clamp(36px,2.7vw,70px);margin-bottom:16px}
#agent-space[data-layout=grid] .space-core p{margin-top:12px}
#agent-space[data-layout=grid] #space-question{display:none}
#agent-space[data-layout=grid] #space-graph{position:relative;inset:auto;height:calc(var(--space-rows)*var(--space-row-height));flex-shrink:0}
#agent-space[data-layout=grid][data-showcase=winner] .space-core h1{font-size:clamp(24px,1.8vw,44px)}
@media(max-width:699px){#agent-space[data-layout=grid] .space-core{padding:24px}.space-edge[data-kind=peer]{stroke-opacity:.35}}
#agent-space[data-layout=grid]:fullscreen{height:100dvh;overflow:auto}
