.hud-stage{--pointer-x:50%;--pointer-y:50%;--rotate-x:0deg;--rotate-y:0deg;display:flex;flex-direction:column;height:auto;min-width:0;margin:30px 0 30px 22px;padding:0;border:1px solid var(--line);position:relative;pointer-events:auto;opacity:1}
.hud-stage:before,.hud-stage:after{content:'';position:absolute;width:14px;height:14px;border-color:var(--light);pointer-events:none;z-index:2}.hud-stage:before{left:-1px;top:-1px;border-left:2px solid;border-top:2px solid}.hud-stage:after{right:-1px;bottom:-1px;border-right:2px solid;border-bottom:2px solid}
.hud-top{display:flex;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line);font:10px monospace;letter-spacing:1px;color:var(--muted)}.hud-readout{white-space:nowrap;font-variant-numeric:tabular-nums}
.hud-viewport{position:relative;width:100%;height:325px;perspective:650px;overflow:hidden;touch-action:pan-y}.hud-grid{position:absolute;inset:0;width:100%;height:100%;color:rgba(242,242,242,.14);pointer-events:none;transition:color .4s}
.hud-object{position:absolute;inset:30px 22px;display:grid;place-items:center;transform:rotateX(var(--rotate-x)) rotateY(var(--rotate-y));transition:transform .2s ease-out;pointer-events:none}.hud-object svg{width:100%;height:100%;overflow:visible}.hud-fill{fill:var(--light);transition:opacity .45s}.hud-outline,.hud-depth{fill:none;stroke:var(--light);stroke-width:.6;vector-effect:non-scaling-stroke}.hud-depth{opacity:0;transform:translate(5px,5px);transition:opacity .4s,transform .4s}.hud-vertices{fill:var(--dark);stroke:var(--light);stroke-width:.6;opacity:0;transition:opacity .4s}
.hud-stage[data-mode=wire] .hud-fill,.hud-stage[data-mode=scan] .hud-fill{opacity:.035}.hud-stage[data-mode=wire] .hud-depth,.hud-stage[data-mode=scan] .hud-depth{opacity:.3;transform:translate(8px,8px)}.hud-stage[data-mode=wire] .hud-vertices,.hud-stage[data-mode=scan] .hud-vertices{opacity:1}.hud-stage[data-mode=wire] .hud-grid,.hud-stage[data-mode=scan] .hud-grid{color:rgba(242,242,242,.25)}
.hud-crosshair{position:absolute;left:var(--pointer-x);top:var(--pointer-y);width:18px;height:18px;transform:translate(-50%,-50%);pointer-events:none;opacity:0}.hud-crosshair:before,.hud-crosshair:after{content:'';position:absolute;background:var(--light)}.hud-crosshair:before{width:18px;height:1px;top:8px}.hud-crosshair:after{height:18px;width:1px;left:8px}.hud-scanline{display:none;position:absolute;left:0;right:0;height:1px;top:50%;background:var(--light);box-shadow:0 0 15px rgba(242,242,242,.3);pointer-events:none}.hud-stage[data-mode=scan] .hud-scanline{display:block;animation:hud-scan 4s ease-in-out infinite}
.hud-node{position:absolute;width:44px;height:44px;border:1px solid rgba(242,242,242,.45);background:var(--dark);color:var(--light);font:12px monospace;z-index:3}.hud-node:before{content:'';position:absolute;inset:5px;border:1px solid var(--line);pointer-events:none}.node-design{left:6%;top:17%}.node-build{right:6%;top:38%}.node-connect{left:38%;bottom:8%}.hud-node.is-active,.hud-node:hover{background:var(--light);color:var(--dark)}.hud-node.is-active:before{border-color:var(--dark)}.hud-axis{position:absolute;bottom:15px;left:16px;color:var(--muted);font:10px/1.8 monospace;pointer-events:none}
.hud-controls{display:flex;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.hud-controls button{flex:1;min-width:0;min-height:44px;padding:10px 4px;border:0;border-right:1px solid var(--line);background:transparent;color:var(--muted);font:11px monospace;letter-spacing:1px}.hud-controls button:last-child{border-right:0}.hud-controls button[aria-pressed=true]{background:var(--light);color:var(--dark)}.hud-info{padding:18px 16px;min-height:105px}.hud-info-label{font:11px monospace;letter-spacing:1px}.hud-info-copy{font-size:13px;color:var(--muted);margin:8px 0 0;line-height:1.6}
.hud-service{position:relative;transition:background .25s;min-height:300px}.hud-service:before,.hud-service:after{content:'';position:absolute;width:12px;height:12px;border-color:var(--light);opacity:0;pointer-events:none;transition:opacity .25s}.hud-service:before{left:0;top:-1px;border-left:1px solid;border-top:1px solid}.hud-service:after{right:15px;bottom:12px;border-right:1px solid;border-bottom:1px solid}.hud-service.is-inspected{background:rgba(242,242,242,.025)}.hud-service.is-inspected:before,.hud-service.is-inspected:after{opacity:1}.hud-service .service-meta{min-height:32px;margin-top:20px}.hud-service .service-meta[hidden]{display:block;visibility:hidden}.hud-inspect{display:block;border:0;border-bottom:1px solid var(--line);padding:10px 0;min-height:44px;background:transparent;color:var(--muted);font:11px monospace;letter-spacing:1px}.hud-inspect[aria-expanded=true]{color:var(--light)}
@media(hover:hover) and (pointer:fine){.hud-viewport:hover .hud-crosshair{opacity:.7}}
@media(max-width:900px){.hud-stage{margin-left:10px}.hud-viewport{height:285px}.hud-top{font-size:9px;letter-spacing:.4px;padding:12px 10px}.hud-controls button{font-size:10px;letter-spacing:.4px}}
@media(max-width:640px){.hud-stage{width:100%;margin:10px 0 35px;padding:0}.hud-viewport{height:300px}.hud-top{font-size:10px;padding:14px}.hud-info{min-height:95px}.hud-object{inset:30px 22px}.hud-service{min-height:280px}}
@keyframes hud-scan{0%,100%{top:8%;opacity:.3}50%{top:92%;opacity:.85}}
@media(prefers-reduced-motion:reduce){.hud-stage .hud-object{transform:none}.hud-stage[data-mode=scan] .hud-scanline{animation:none;top:50%}.hud-stage *{transition:none!important}}
.hud-stage{align-items:stretch}.hud-object svg{position:absolute;inset:0}.hud-top,.hud-controls,.hud-info{width:100%}

/* Solid stays opaque during interaction; wireframe exposes construction. */
.hud-stage[data-mode=solid] .hud-fill{opacity:1}
.hud-stage[data-mode=solid] .hud-outline,.hud-stage[data-mode=solid] .hud-depth,.hud-stage[data-mode=solid] .hud-vertices{opacity:0}
.hud-stage[data-mode=solid] .hud-grid{color:rgba(242,242,242,.08)}
.hud-stage[data-mode=wire] .hud-fill{opacity:0}
.hud-stage[data-mode=wire] .hud-outline{stroke-width:1.35;stroke-dasharray:5 2}
.hud-stage[data-mode=wire] .hud-depth{opacity:.55;transform:translate(11px,8px);stroke-width:.9}
.hud-stage[data-mode=wire] .hud-vertices{stroke-width:.8}
.hud-stage[data-mode=wire] .hud-grid{color:rgba(242,242,242,.3)}
