/* Approved dark instrument layout. Only the live homepage is restyled. */
body.instrument-dashboard{--bg:#0a121b;--ink:#dfecf4;--paper:#0a121b;--white:#10212e;--panel:#10212e;--text:#dfecf4;--muted:#9aafbe;--line:#294455;--accent:#43d9b0;--mono:ui-monospace,SFMono-Regular,Consolas,monospace;background:var(--bg);color:var(--text);color-scheme:dark}
.instrument-dashboard main{max-width:1740px;padding:0 24px}.instrument-dashboard header{background:#0b1722;border-color:var(--line);height:58px;padding:0 24px}.instrument-dashboard a{color:#71c6ec}.instrument-dashboard h1,.instrument-dashboard h2,.instrument-dashboard h3,.instrument-dashboard strong,.instrument-dashboard b{color:var(--text)}
.instrument-dashboard button,.instrument-dashboard input,.instrument-dashboard select{background:#132c3b;border:1px solid #355165;color:var(--text);border-radius:6px}.instrument-dashboard button{padding:8px 11px}.instrument-dashboard button:hover{background:#203d50}.instrument-dashboard button:focus-visible,.instrument-dashboard input:focus-visible,.instrument-dashboard select:focus-visible{outline:2px solid #61dcff;outline-offset:3px}.instrument-dashboard .primary{background:#36d7a7;color:#052a25;border-color:#36d7a7}.instrument-dashboard .selected,.instrument-dashboard .active{background:#184839;color:#8ff2cd;border-color:#42be93}.instrument-dashboard .danger{color:#ffb7b7;background:#3a2530;border-color:#6b3b42}.instrument-dashboard .brand-icon{background:#36d7a7;color:#042b24}.instrument-dashboard .intro{padding:12px 0 10px}.instrument-dashboard h1{font-size:27px;margin:4px 0}.instrument-dashboard .intro p{color:var(--muted);margin:0}.instrument-dashboard .eyebrow{font-size:9px}.instrument-dashboard .intro-tags{display:none}
.instrument-dashboard .section-head{margin-bottom:9px}.instrument-dashboard .section-head h2{font-size:14px}.instrument-dashboard .status{background:#112c29;color:#8de2c6;min-width:194px;text-align:center}.instrument-dashboard .status.fault{background:#422936;color:#ffc3cb}.instrument-dashboard #simulator{padding-bottom:18px}.instrument-dashboard .pipeline-caption{font-size:10px}
.instrument-dashboard .pipeline-stages button{background:#102330;border:1px solid #284a61;position:relative;padding:10px 13px}.instrument-dashboard .pipeline-stages button::after{content:'›';position:absolute;right:-8px;top:40%;color:#50d8c8;z-index:2}.instrument-dashboard .pipeline-stages button:last-child::after{content:'↺'}.instrument-dashboard .pipeline-stages button[aria-pressed=true]{background:#14362f;border-color:#53d8ac;box-shadow:inset 0 3px #53d8ac}.instrument-dashboard .pipeline-stages small{color:#a4bccd}.instrument-dashboard .pipeline-stages output{font-size:17px;line-height:1.25;font-variant-numeric:tabular-nums}.instrument-dashboard .stage-number{color:#6fcaf2}
.instrument-dashboard .pipeline-detail{background:#102731;border:1px solid #315765;border-left:4px solid #43d9b0;border-radius:7px;margin:8px 0 0;height:104px;min-height:104px;overflow:auto}.instrument-dashboard .pipeline-detail p{color:#aec7d6;font-size:11px;max-width:850px}.instrument-dashboard .pipeline-detail output{color:#88dbf1;font-size:11px}.instrument-dashboard .pipeline-actions{margin-left:15px}.instrument-dashboard #foc-diagram{display:block;height:118px;width:min(1100px,100%);margin:10px auto 4px;color:#86cddd;font:12.5px var(--mono);background:#0d202b;border:1px solid #294b5e;border-radius:8px;padding:5px;box-sizing:border-box}.instrument-dashboard #foc-diagram rect{fill:#102531}.instrument-dashboard #foc-diagram .feedback-path{stroke:#52778a;stroke-width:1.2;stroke-dasharray:5 4}.instrument-dashboard #foc-diagram .flow-pulse{fill:#5ce4bb;filter:drop-shadow(0 0 3px #5ce4bb)}.instrument-dashboard #foc-diagram .feedback-pulse{fill:#6aaeff;filter:drop-shadow(0 0 3px #6aaeff)}
.instrument-dashboard .presets{position:relative;display:flex;gap:7px;align-items:center;flex-wrap:wrap;padding:9px 250px 9px 10px;border:1px solid var(--line);background:#0e202c;border-radius:7px;margin:0 0 10px;min-height:54px}.instrument-dashboard .presets span{font-size:9px}.instrument-dashboard .preset{font-size:11px}
/* Both statuses occupy a reserved slot; never add/remove a flow-level banner. */
#pending-slot{position:absolute;right:10px;top:8px;width:225px;height:36px;display:flex;align-items:center;justify-content:flex-end;font:11px var(--mono)}
.instrument-dashboard #pipeline-pending{position:absolute;inset:0;display:flex;align-items:center;justify-content:flex-end;box-sizing:border-box;margin:0;padding:6px 10px;background:#302a1c;color:#ffdc91;border-radius:6px;font:11px var(--mono);white-space:nowrap}
.instrument-dashboard #pipeline-pending[hidden]{display:flex!important;visibility:hidden;pointer-events:none}#synced-chip{color:#8aafad}
.dashboard-grid{display:grid;grid-template-columns:minmax(240px,.92fr) minmax(400px,2.3fr) minmax(265px,1.12fr);gap:12px;align-items:start}.scene-column,.electronics-column{min-width:0;display:flex;flex-direction:column;gap:12px}.instrument{background:linear-gradient(140deg,#112432,#0c1c28);border:1px solid var(--line);border-radius:8px;padding:12px;min-width:0;overflow:hidden}.instrument h3{font-size:12px;margin:0 0 9px}.instrument-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.instrument-head label{font-size:10px;color:var(--muted)}.instrument-head select{font-size:10px;padding:3px}.instrument figure{margin:0;padding:8px 0}.instrument figcaption{display:flex;justify-content:space-between;font-size:11px;font-weight:600;gap:8px}.instrument figcaption small{font-size:9px;font-weight:400;color:var(--muted)}.instrument canvas{display:block;width:100%;height:135px}.scope-key{display:flex;flex-wrap:wrap;gap:12px;font:9px var(--mono);color:var(--muted);margin-top:2px}.scope-key span::before{content:'';display:inline-block;width:12px;border-top:2px solid #5ce4bb;margin-right:4px}.scope-key span:nth-child(2)::before{border-color:#ffc971}.scope-key span:nth-child(3)::before{border-color:#6aaeff}.instrument-note{font-size:10px!important;line-height:1.5;color:var(--muted)!important;margin:7px 0 0!important}.instrument-note a{font-size:10px}
.instrument-dashboard .viewport{height:490px;border-radius:8px;background:#0d202d}.instrument-dashboard .scene-top{top:12px}.instrument-dashboard .view-tools{top:45px}.instrument-dashboard .scene-bottom{background:#071521b3;font-size:9px;gap:10px;bottom:6px;max-width:98%}.instrument-dashboard #picked{max-width:48%;text-align:right}.instrument-dashboard .scene-tag{background:#092532d9;color:#bbd2df;border-color:#284d5f}.instrument-dashboard .transport{flex-wrap:wrap;gap:6px;background:#102330;border:1px solid var(--line);border-top:0;border-radius:0 0 8px 8px;padding:8px}.instrument-dashboard .transport button,.instrument-dashboard .transport select{font-size:11px}.instrument-dashboard .model-note{font-size:10px;color:var(--muted);line-height:1.45;margin:6px 0}.instrument-dashboard .plot-panel{background:#10202c;border:1px solid var(--line);border-radius:8px}.instrument-dashboard .plot-panel p{color:var(--muted);font-size:10px}.instrument-dashboard #plot{height:145px}.instrument-dashboard .plot-head{gap:5px}.instrument-dashboard .chart-tab{font-size:10px}.instrument-dashboard #chart-unit{font-size:9px}.instrument-dashboard .chart-key{font-size:10px;color:#bbd1dc;gap:10px;flex-wrap:wrap}.instrument-dashboard .chart-key>span:last-child{margin-left:0}.instrument-dashboard .controls{padding:12px;background:#102431;border:1px solid var(--line);border-radius:8px;width:auto}.instrument-dashboard .controls h3{font-size:12px}.instrument-dashboard .controls label{font-size:11px;margin-top:10px}.instrument-dashboard .controls input,.instrument-dashboard .controls select{font-size:11px}.instrument-dashboard .mini-tag{background:#1a3937;color:#8be1c4}.instrument-dashboard .controls small{font-size:9px;color:var(--muted)}.instrument-dashboard .action-pair button{font-size:10px;padding:7px}.instrument-dashboard #stop-limits{display:block;height:28px;line-height:1.4}
.bridge-top{display:flex;align-items:center;gap:15px}.bridge-top svg{height:82px;width:110px}.bridge-top strong{display:block;font:21px var(--mono);color:#b8e9f6}.bridge-top output{display:block;font:13px var(--mono);margin:4px 0}.bridge-top small{font-size:9px;color:var(--muted)}#bridge-circuit{width:100%;height:148px;color:#87bcd6;font:10px var(--mono)}#bridge-circuit .gate{fill:#193442;stroke:#57778a}#bridge-circuit .gate.on{fill:#14594a;stroke:#56dfbb}#gate-scope{height:105px}.phase-cursor{display:flex;align-items:center;gap:6px;font:9px var(--mono);height:24px}.phase-cursor input{min-width:20px;width:100%}.phase-cursor output{min-width:58px}.pwm-replay-controls{display:flex;align-items:center;gap:8px;margin-top:6px;min-height:30px}.pwm-replay-controls button{padding:5px 8px;font-size:9px}.pwm-replay-controls small{color:var(--muted);font:9px var(--mono);line-height:1.3}.instrument-dashboard #bridge-circuit .gate{transition:fill .06s linear,stroke .06s linear}.instrument-dashboard #bridge-circuit .gate.on{filter:drop-shadow(0 0 3px #56dfbb)}
.sensor-instrument svg{width:100%;height:70px;font:10px var(--mono);color:#80c3dd}.sensor-instrument rect{fill:#102634}.sensor-instrument canvas{height:90px}
.energy-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:12px}.energy-grid canvas{height:145px}.energy-grid output{display:block;font:11px var(--mono);color:#abdadb;margin-top:6px}.energy-grid button{font-size:10px;margin-top:7px}.energy-grid #map-status{display:block;min-height:28px;font-size:9px;color:var(--muted);padding-top:5px}.loss-row{display:grid;grid-template-columns:80px 1fr 52px;gap:6px;align-items:center;font:10px var(--mono);margin:13px 0}.loss-row .track{height:7px;background:#1f3949;border-radius:4px;overflow:hidden}.loss-row i{display:block;height:7px;background:#4ccfaf;max-width:100%}.loss-row output{font-size:10px;text-align:right;margin:0}.run-details{padding:12px;margin-top:12px;border:1px solid var(--line);border-radius:8px}.run-details summary{font-size:12px}.instrument-dashboard .signal-panel{background:#102330;border:0}.instrument-dashboard .signal-panel .explanation{background:#163033;color:#bdcedb;height:95px;overflow:auto}.instrument-dashboard .signal-row{border-color:#2b4558}.instrument-dashboard .signal-row span{color:#a3b6c2}.instrument-dashboard .route-grid article{border-color:#385364}.instrument-dashboard .route-grid p,.instrument-dashboard footer{color:var(--muted)}.instrument-dashboard #recordings{background:#102330;border-color:var(--line)}.instrument-dashboard .film{background:#102330;border-color:var(--line)}.instrument-dashboard #learn{padding:18px 0}.instrument-dashboard #videos{padding-top:0}.instrument-dashboard .film-info p{color:var(--muted)}
/* Alerts float within the stable viewport; safety/error text remains readable. */
.instrument-dashboard #notice,.instrument-dashboard #error{position:absolute;left:12px;right:12px;bottom:40px;margin:0;padding:10px 12px;z-index:5;border-radius:6px;max-height:100px;overflow:auto;font-size:12px;background:#382d20;color:#ffe0aa;border:1px solid #795e2d}.instrument-dashboard #error{background:#3a1f2a;color:#ffc6d1;border-color:#a15a70}
@media(min-width:1550px){.dashboard-grid{grid-template-columns:minmax(275px,1fr) minmax(540px,2.5fr) minmax(300px,1.15fr)}.instrument-dashboard .viewport{height:530px}}
@media(max-width:1150px){.dashboard-grid{grid-template-columns:minmax(0,2fr) minmax(250px,1fr)}.scene-column{grid-column:1;grid-row:1}.electronics-column{grid-column:2;grid-row:1 / span 2}.wave-column{grid-column:1;grid-row:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.wave-column .instrument-head,.wave-column .instrument-note{grid-column:1/-1}.wave-column figcaption{flex-direction:column}.wave-column canvas{height:110px}.energy-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.instrument-dashboard .presets{padding-right:10px;padding-bottom:42px}#pending-slot{bottom:4px;top:auto;right:10px}.instrument-dashboard .viewport{height:405px}}
@media(max-width:700px){.instrument-dashboard main{padding:0 10px}.instrument-dashboard header{padding:0 10px;height:auto;min-height:54px;flex-wrap:wrap}.instrument-dashboard nav{gap:10px;padding:8px 0}.instrument-dashboard nav a{font-size:10px}.instrument-dashboard .intro h1{font-size:23px}.instrument-dashboard .pipeline-detail{height:142px;min-height:142px}.instrument-dashboard #foc-diagram{height:78px;font-size:10px;padding:3px}.dashboard-grid{display:flex;flex-direction:column}.scene-column,.electronics-column,.wave-column{width:100%;box-sizing:border-box}.scene-column{order:0}.wave-column{order:1;display:block}.electronics-column{order:2;display:grid;grid-template-columns:1fr}.wave-column figure{padding:5px 0}.wave-column canvas{height:130px}.instrument-dashboard .viewport{height:325px}.energy-grid{grid-template-columns:1fr}.instrument-dashboard .presets button{font-size:10px;padding:8px}.instrument-dashboard .pipeline-stages output{font-size:10px}.instrument-dashboard .pipeline-caption{font-size:9px}.instrument-dashboard .controls{order:-1}.instrument-dashboard .plot-head{flex-wrap:wrap}.instrument-dashboard #run-note{font-size:9px}}
@media(prefers-reduced-motion:reduce){.instrument-dashboard *{scroll-behavior:auto!important}.instrument-dashboard #foc-diagram .flow-pulse{display:none}}

.stage-symbol{float:right;width:34px;height:34px;color:#6ebada;opacity:.8}.instrument-dashboard .pipeline-stages output{font-size:15px}@media(max-width:1000px){.stage-symbol{display:none}}

/* Override the inherited light-theme compound selectors, not just bare inputs. */
.instrument-dashboard .visual-panel{background:#102330;border-color:var(--line)}
.instrument-dashboard .controls label{color:#c2d5e2}
.instrument-dashboard .controls input[type=number],
.instrument-dashboard .controls select{background:#132c3b;color:#dfecf4;border-color:#355165}
.instrument-dashboard .controls input:disabled,
.instrument-dashboard .controls select:disabled{color:#9aafbe;opacity:1}
