:root{color-scheme:dark;--bg:#0a0a0a;--paper:#101010;--ink:#f5f5f5;--muted:#a3a3a3;--line:#303030;--green:#e5e5e5}
body{font-family:'Host Grotesk',ui-sans-serif,system-ui,-apple-system,sans-serif;background:var(--bg);color:var(--ink)}
button,select,input{font-family:inherit}button,select{background:#141414;border-color:#3a3a3a;border-radius:0;color:#ddd}
button:hover{background:#242424;border-color:#777}button.active{background:#333;color:#fff;border-color:#777}
button:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid #fff;outline-offset:3px}
.brand{font-weight:400;letter-spacing:.04em}.brand img{display:block;object-fit:contain;object-position:left center;width:108px;height:42px}
.brand-divider{background:#333}.brand-sub,.sample{color:#999}.sample span{background:#222;color:#ddd}
h1{font-family:inherit;font-weight:300;letter-spacing:.03em;color:#fff}h1 span{color:inherit;font-weight:300}
.eyebrow{color:#aaa}.run-meta span+span{border-color:#333}
.viewer-shell{border-color:#333;border-radius:0;box-shadow:none;background:#0f0f0f}
.view-toolbar{background:#101010;border-color:#303030}.stage{background:#0a0a0a}
.stage-label{color:#aaa}.live-dot{background:#ddd}
.hud{background:#111111ed;border-color:#3a3a3a;border-radius:0;box-shadow:none}
.hud-overline,.hud-values span,.hud-values small,.hud-tool div>span,.hud dt,.hud-position,.hud-state{color:#aaa}
.hud-values strong,.tool-symbol{color:#f5f5f5}.hud-values,.hud-position{border-color:#333}
.camera-controls button{background:#151515ed;border-color:#555;color:#ddd}
.stage-bottom,.stage-bottom button{color:#aaa}.stage-bottom b{color:#777}
.playback{background:#111;border-color:#333}.transport button.primary{background:#eee;border-color:#eee;color:#111}
.time strong{color:#eee}.time span,.speed-label{color:#aaa}.speed-label select{background:#151515;border-color:#444;border-radius:0}
.timeline input{accent-color:#ddd}.ticks span{border-color:#666}.timeline-caption,.timeline-caption span:last-child{color:#aaa;font-family:inherit}
.facts>div{border-color:#303030}.facts span,.facts strong small,.facts p{color:#aaa}.facts strong{color:#eee;font-weight:300}
summary{font-weight:400}summary>span:last-child{color:#aaa}th,td{border-color:#303030}th{background:#171717;color:#bbb}td button{color:#eee}
.tool-details,.source-details{color:#aaa}.tool-details h3,.source-details code{color:#ccc}
footer,footer b{color:#999}#loading{background:#0a0a0af5}#loading span{color:#aaa}.spinner{border-color:#444;border-top-color:#eee}
.error{background:#211916;color:#e4c4ae;border-color:#645044}
@media(max-width:650px){.hud{background:#111111ed}}

.combined-view-label{font-size:12px;color:#eee;white-space:nowrap;letter-spacing:.02em;padding:7px 3px}
.trace-switch{display:flex;gap:6px;margin-bottom:18px}
.trace-switch button{flex:1;font-size:12px;padding:8px 6px}
.trace-switch button[aria-pressed="true"]{background:#e5e5e5;border-color:#e5e5e5;color:#111}
.trace-note{font-size:12px;line-height:1.6;color:#ccc;margin:0 0 10px}
.trace-caption,#model-trace-status{font-size:11px;line-height:1.5;color:#888;margin:0 0 18px}
#model-trace-view[hidden],#execution-trace-view[hidden]{display:none}
.gcode-controls{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:20px}
.gcode-controls label{display:flex;align-items:center;gap:8px;font-size:13px;color:#aaa}
.gcode-controls input{width:100px;padding:8px;border:1px solid #444;background:#111;color:#eee}
.gcode-controls button:disabled{opacity:.4;cursor:default}
#code-status{font-size:12px;color:#aaa}
.gcode-preview{max-height:400px;overflow:auto;padding:20px;border:1px solid #303030;background:#111;color:#ddd;font:12px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre}
.gcode-preview:focus-visible{outline:2px solid #fff;outline-offset:3px}
.simulation-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;min-height:0}
.live-trace{min-width:0;max-height:560px;overflow:auto;padding:20px 16px;border-left:1px solid #303030;background:#0e0e0e}
.trace-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.trace-heading h2{font-size:13px;font-weight:400;margin:0;color:#eee}
.trace-heading span,#trace-state,#trace-status{font-size:11px;color:#999}
#trace-state{margin:12px 0 18px}
#trace-status:empty{display:none}
.trace-code{list-style:none;padding:0;margin:0 0 20px;font:11px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace}
.trace-code li{display:grid;grid-template-columns:48px minmax(0,1fr);padding:8px 6px;border-left:2px solid transparent;color:#888}
.trace-code li>span{color:#666;font-size:10px}
.trace-code code{font:inherit;white-space:pre-wrap;overflow-wrap:anywhere}
.trace-code li.current{background:#242424;border-left-color:#eee;color:#fff}
.trace-code li.current>span{color:#bbb}
.trace-context{border-top:1px solid #303030}
.trace-context .hud{position:static;width:auto;padding:8px 0;border:0;background:transparent}
.viewer-shell:fullscreen .simulation-layout{flex:1;min-height:0}.viewer-shell:fullscreen .live-trace{max-height:none}
@media(max-width:950px){.simulation-layout{grid-template-columns:minmax(0,1fr) 270px}.live-trace{padding:16px 12px}}
@media(max-width:700px){.simulation-layout{grid-template-columns:1fr}.live-trace{max-height:360px;border-left:0;border-top:1px solid #303030}.simulation-layout .stage{height:400px}.viewer-shell:fullscreen .live-trace{max-height:30vh}.viewer-shell:fullscreen .stage{min-height:180px}.viewer-shell:fullscreen .simulation-layout{overflow:auto}.trace-code{font-size:12px}}

.stage-label{flex-wrap:wrap;max-width:calc(100% - 32px)}
.workholding-note{flex-basis:100%;font-size:11px;color:#aaa;padding-left:14px}

.model-trace-raw{margin:0;padding:0;background:transparent;border:0;white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace;color:#ddd}

.stage > canvas{opacity:.98}
