:root{font-family:Inter,Avenir,Helvetica,Arial,sans-serif;color:#ecf5f5;background:#07131c;font-synthesis:none;--surface:#0d202c;--surface2:#112735;--line:#27404d;--muted:#a7bac0;--v1:#49d9ce;--v2:#b7a0ff;--feedback:#ffc073;--blocked:#ff747f;--positive:#66dcc1;--negative:#ff9caa}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;min-width:320px;background:radial-gradient(circle at 95% 0%,#173e47 0%,transparent 26%),radial-gradient(circle at 5% 38%,#1a2141 0%,transparent 25%),#07131c;line-height:1.48}
button,input,select{font:inherit}
button{cursor:pointer}
a{color:#91eee7;text-decoration-color:#589fa3;text-underline-offset:3px}
a:hover{color:#c5fff7}
:focus-visible{outline:3px solid #f9d28b;outline-offset:3px}
.shell{max-width:1660px;margin:auto;padding:30px clamp(16px,3.3vw,52px) 35px}
.masthead{display:flex;justify-content:space-between;gap:30px;align-items:center;margin:2px 0 28px}
.eyebrow,.kicker{text-transform:uppercase;letter-spacing:.16em;font-size:.73rem;font-weight:800;color:#82cfcb;margin:0 0 7px}
.eyebrow-mark{display:inline-block;width:8px;height:8px;border-radius:100%;background:var(--v1);box-shadow:0 0 14px var(--v1);margin-right:8px}
h1,h2,h3,p{margin-top:0}
h1{font-size:clamp(2.3rem,5vw,4.7rem);line-height:1.04;letter-spacing:-.065em;margin:0 0 11px;font-weight:800}
h1 span{color:var(--v1)}
.lede{font-size:clamp(1rem,1.35vw,1.18rem);max-width:740px;color:#c9d9da;margin:0 0 12px}
.author{color:#8fa8b0;font-size:.88rem;margin:0}.author strong{color:#e3f3ef}
.header-stamp{border:1px solid #568b8f;background:#102c36;border-radius:22px;display:flex;gap:16px;padding:18px 22px;align-items:center;flex:none;transform:rotate(2deg);box-shadow:0 15px 34px #0005}
.header-stamp strong{font-size:2.1rem;line-height:1;color:#69e0d0;letter-spacing:-.07em}.header-stamp span{font-size:.72rem;text-transform:uppercase;letter-spacing:.13em;font-weight:800;color:#c4e4de}
.live-grid{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);gap:18px;align-items:stretch}
.panel{background:linear-gradient(155deg,rgba(19,43,55,.98),rgba(10,28,39,.98));border:1px solid #284553;box-shadow:0 14px 36px #0003;border-radius:22px}
.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:23px 25px 0}
.panel-head h2{font-size:1.43rem;letter-spacing:-.03em;margin:0;line-height:1.2}
.mode-badge,.dc-chip{font-size:.71rem;letter-spacing:.07em;text-transform:uppercase;font-weight:800;border-radius:100px;padding:8px 12px;white-space:nowrap}
.mode-badge{background:#173f3d;color:#99f4d9;border:1px solid #287b67}
.mode-badge.rail{background:#503027;color:#ffca9b;border-color:#985b3c}
.dc-chip{border:1px solid #3c6374;color:#b6e2eb;background:#123443}
.circuit-panel{overflow:hidden;min-width:0}
.schematic-wrap{padding:12px 12px 0;overflow-x:auto}
#schematic{display:block;width:100%;min-width:0;height:auto;max-height:480px}
.wire path{fill:none;stroke:#a8c4cb;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
.wire .ground-symbol{fill:#122733;stroke:#aac5c8;stroke-width:3}
.wire .supply-wire{stroke:#7891a2;stroke-width:3}
.resistors path{fill:none;stroke:#e0d7b6;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
.sources circle{fill:#102937;stroke-width:4}.sources .source-v1{stroke:var(--v1)}.sources .source-v2{stroke:var(--v2)}
.sources text{fill:#eef8f7;font-size:25px;font-weight:500;text-anchor:middle}
.amplifier{fill:#17303e;stroke:#d0e5e8;stroke-width:4;stroke-linejoin:round}
.amp-symbols text{fill:#ecf7f4;font-weight:700;font-size:27px}.amp-symbols text:last-child{font-size:30px;letter-spacing:-.04em}
.nodes circle{fill:#d8ede8;stroke:#14323e;stroke-width:2}
.current-flow{fill:none;stroke-width:6;stroke-linecap:round;stroke-dasharray:2 19;filter:url(#dot-glow);animation:flow-march var(--flow-duration,1.5s) linear infinite;opacity:1;transition:opacity .2s}
.current-flow[data-direction="negative"]{animation-direction:reverse}
.current-flow[data-direction="zero"]{opacity:0}
.v1-flow{stroke:var(--v1)}.v2-flow{stroke:var(--v2)}.feedback-flow{stroke:var(--feedback)}
#schematic.paused .current-flow{animation-play-state:paused}
@keyframes flow-march{to{stroke-dashoffset:-21}}
.circuit-labels text{font-family:Inter,Avenir,Helvetica,Arial,sans-serif}
.component-name{fill:#dfebe7;font-size:25px;font-weight:800}
.source-mode-tag{font-size:15px;font-weight:800;letter-spacing:.04em}
.component-value{fill:#a8bcc2;font-size:18px;font-weight:700}
.v1-text{fill:#60e2d6}.v2-text{fill:#c6b0ff}.feedback-text{fill:#ffd195}
.node-tag{fill:#d8ecec;font-size:23px;font-weight:750}
.output-tag{fill:#ffc073}.output-value{fill:#fff2db;font-size:21px;font-weight:800}
.supply-tag{fill:#90b4c2;font-weight:800;font-size:20px}
.direction-tag{font-size:31px;font-weight:900}
.blocked-input circle{fill:#172b37;stroke:var(--blocked);stroke-width:3}.blocked-input path{stroke:var(--blocked);stroke-width:3;stroke-linecap:round}
.flow-key{display:flex;flex-wrap:wrap;gap:8px 19px;padding:8px 25px 0;color:#bacbd0;font-size:.76rem;font-weight:650}
.flow-key span{display:inline-flex;align-items:center;gap:6px}.dot{display:inline-block;width:8px;height:8px;border-radius:100%;flex:none}.v1-dot{background:var(--v1);box-shadow:0 0 9px #49d9ce88}.v2-dot{background:var(--v2);box-shadow:0 0 9px #b7a0ff88}.feedback-dot{background:var(--feedback);box-shadow:0 0 9px #ffc07388}.blocked-dot{width:9px;height:9px;border-radius:100%;border:2px solid var(--blocked);position:relative}.blocked-dot:after{content:"";position:absolute;width:11px;height:2px;background:var(--blocked);transform:rotate(-45deg);left:-3px;top:2px}
.circuit-note{margin:10px 25px 0;color:#d0dedb;font-size:.86rem;min-height:2.6em}
.animation-controls{margin:12px 25px 24px;padding-top:13px;border-top:1px solid #294754;display:flex;align-items:center;gap:14px;flex-wrap:wrap;font-size:.78rem;color:#b7c8cc}
.animation-controls button{background:#164652;color:#c9faf2;border:1px solid #397989;border-radius:9px;padding:7px 10px;font-weight:800}
.animation-controls button:hover{background:#226275}
.animation-controls label{display:flex;align-items:center;gap:7px;font-weight:700}
.animation-controls select{background:#102d38;color:#edf7f7;border:1px solid #4a7581;padding:5px;border-radius:6px}
.animation-controls small{font-size:.74rem;color:#839ea6}
.monitor-panel{padding-bottom:13px;min-width:0;display:flex;flex-direction:column}
.output-feature{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:14px;align-items:center;margin:11px 22px 9px;padding:9px 13px;background:radial-gradient(circle at 90% 20%,#4d3c37,transparent 44%),#24313a;border-radius:12px;border:1px solid #826649}
.output-feature>span{grid-column:1;grid-row:1;font-size:.68rem;text-transform:uppercase;letter-spacing:.08em;color:#ddc7a4;font-weight:800}
.output-feature strong{grid-column:2;grid-row:1/3;display:block;font-size:clamp(1.6rem,2vw,2.2rem);line-height:1;letter-spacing:-.04em;color:#ffe2b1;margin:0;font-variant-numeric:tabular-nums;white-space:nowrap}
.output-feature strong small{font-size:.9rem;letter-spacing:0}
.output-feature p{grid-column:1;grid-row:2;color:#e3d2b7;font-size:.71rem;line-height:1.25;margin:2px 0 0}
.voltage-chart,.current-ledger{margin:0 22px 16px;padding:17px 17px 16px;border-radius:15px;border:1px solid #35515c;background:#0b1d29}
.chart-head,.ledger-head{display:flex;justify-content:space-between;align-items:baseline;gap:9px;margin-bottom:10px}
.chart-head h3,.ledger-head h3{font-size:.9rem;letter-spacing:-.015em;margin:0}
.chart-head>span,.ledger-head>span{font-size:.7rem;color:#9bb6c2;font-weight:750;white-space:nowrap}
.chart-axis{display:flex;justify-content:space-between;align-items:center;margin:0 90px 4px 33px;color:#8fa9b1;font-size:.7rem}
.chart-row{display:grid;grid-template-columns:27px minmax(0,1fr) 80px;gap:7px;align-items:center;min-height:30px;font-size:.75rem;font-weight:800}
.chart-row strong{text-align:right;font-variant-numeric:tabular-nums;font-size:.75rem;color:#dce9eb;white-space:nowrap}
.bar-track{height:15px;border-radius:5px;position:relative;background:linear-gradient(90deg,#1b3440 0%,#1b3440 49.4%,#7195a0 49.4%,#7195a0 50.6%,#1b3440 50.6%,#1b3440 100%);overflow:hidden}
.bar-track:before,.bar-track:after{content:"";position:absolute;top:0;bottom:0;width:1px;background:#345566}.bar-track:before{left:25%}.bar-track:after{left:75%}
.voltage-bar{height:9px;position:absolute;top:3px;border-radius:6px;min-width:3px;transition:left .22s,width .22s;z-index:2}
.v1-bar{background:var(--v1)}.v2-bar{background:var(--v2)}.minus-bar{background:#e6eaf0}.plus-bar{background:#849aa1}.output-bar{background:var(--feedback)}
.chart-foot{font-size:.72rem;color:#9bb0b8;margin:10px 0 0;border-top:1px solid #243f4d;padding-top:8px}
.monitor-panel .voltage-chart{margin:0 22px 9px;padding:11px 13px 9px;min-width:0}
.monitor-panel .chart-head{margin-bottom:5px}
.monitor-panel .chart-row{min-height:23px}
.monitor-panel .bar-track{height:12px}
.monitor-panel .voltage-bar{height:8px;top:2px}
.monitor-panel .chart-foot{margin-top:5px;padding-top:5px}
.current-ledger{margin-bottom:0}
.circuit-panel .current-ledger{margin:0 25px 22px;padding:12px 16px}
.circuit-panel .ledger-row{padding:4px 0}
.circuit-panel .kcl-equation{margin:5px 0 6px}
@media(min-width:1300px){.circuit-panel .current-ledger{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:9px;align-items:center;padding:10px 13px}.circuit-panel .ledger-head{grid-column:1/-1;margin-bottom:3px}.circuit-panel .ledger-row{display:block;min-width:0;padding:3px 0 5px}.circuit-panel .ledger-row span{font-size:.68rem;white-space:nowrap}.circuit-panel .ledger-row strong{display:block;text-align:left;margin:2px 0 0 15px;font-size:.77rem}.circuit-panel .kcl-equation{grid-column:1/3;margin:2px 0 0;padding:5px}.circuit-panel .pin-note{grid-column:3;margin:2px 0 0;font-size:.69rem;line-height:1.22}}
.scope{margin:0 22px 0;padding:12px 13px 9px;border-radius:15px;border:1px solid #35515c;background:#091923}
.monitor-panel .scope{flex:none;display:flex;flex-direction:column}
.scope-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.scope-head h3{font-size:.92rem;margin:0;color:#e7f5f3}
.scope-head p,.scope-head>span{font-size:.72rem;color:#a7bec7;margin:0;font-variant-numeric:tabular-nums}
#scope-svg{display:block;width:100%;height:auto;max-height:230px;margin-top:8px}
.scope-screen{fill:#07121c;stroke:#547483;stroke-width:1.5}
.scope-grid path{fill:none;stroke:#24404b;stroke-width:1}
.scope-rails path{fill:none;stroke:#ab6176;stroke-width:1.2;stroke-dasharray:5 5;opacity:.7}
.scope-trace{fill:none;stroke-width:2.7;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.trace-v1{stroke:var(--v1)}.trace-v2{stroke:var(--v2)}.trace-vo{stroke:var(--feedback);stroke-width:3.3}
.scope-cursor{stroke:#f6f7d8;stroke-width:1.7;stroke-dasharray:5 4;vector-effect:non-scaling-stroke}
#scope-hitarea{cursor:ew-resize;touch-action:none}
#scope-svg text{fill:#acc2c8;font:12px Inter,Avenir,Helvetica,Arial,sans-serif}
.scope-mobile-scale{display:none}
.scope-legend{display:flex;flex-wrap:wrap;gap:6px;font-size:.7rem;color:#c9d9db;font-weight:750}
.scope-legend button{display:inline-flex;align-items:center;gap:6px;background:#17313c;color:#e5f2f0;border:1px solid #41616d;border-radius:100px;padding:5px 10px;font-weight:800;font-size:.7rem;line-height:1.2}
.scope-legend button:hover{background:#21505c}
.scope-legend button[aria-pressed="false"]{opacity:.5;background:#0b1d29;text-decoration:line-through}
.trace-key,.rail-key{width:16px;height:3px;border-radius:3px;display:inline-block;background:var(--v1)}
.v2-key{background:var(--v2)}.vo-key{background:var(--feedback)}.rail-key{background:#ab6176}
.scope-scrubber{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:center;border-top:1px solid #294451;margin-top:8px;padding-top:7px}
.scope-scrubber label{font-size:.72rem;color:#e3f2ee;font-weight:800}
.scope-scrubber input{width:100%;margin:0;accent-color:#f8dca0;cursor:ew-resize}
.scope-scrubber span{display:none}
.scope-note{font-size:.68rem;line-height:1.35;color:#91aab1;margin:8px 0 0}
.scope-summary{font-size:.7rem;line-height:1.4;color:#c8dadb;border-top:1px solid #28414b;padding-top:8px;margin:8px 0 0}
.scope-explanation{border-top:1px solid #28414b;margin-top:8px;padding-top:5px;color:#a9c0c4;font-size:.69rem}
.scope-explanation summary{cursor:pointer;font-weight:750}
.scope-explanation[open]{padding-bottom:2px}
.ledger-row{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:6px 0;font-size:.8rem;border-bottom:1px solid #203846}
.ledger-row span{display:flex;align-items:center;gap:7px;color:#bfcfd2}.ledger-row strong{font-variant-numeric:tabular-nums;white-space:nowrap;color:#f0f8f4}
.ledger-row.total{border-bottom:0}.ledger-row.total strong{color:#ffcf91}
.kcl-equation{font-size:.76rem;color:#f4dcb6;background:#303039;border:1px solid #63504b;border-radius:8px;padding:8px 9px;margin:7px 0 8px;text-align:center;font-variant-numeric:tabular-nums}
.pin-note{color:#ffc1c0;margin:0;font-size:.77rem}.pin-note span{font-size:1rem;color:var(--blocked);font-weight:900;margin-right:3px}
.workbench{margin-top:18px;padding-bottom:23px}
.workbench-head{align-items:end}.workbench-head>p{font-size:.78rem;color:#a9bec0;max-width:340px;margin:0;text-align:right}
.presets{display:flex;flex-wrap:wrap;gap:9px;padding:22px 25px 8px}
.presets button{border:1px solid #49737d;color:#d6f1ed;background:#163440;border-radius:10px;padding:9px 12px;font-size:.81rem;font-weight:750;transition:transform .15s,background .15s,border-color .15s}
.presets button:hover{transform:translateY(-2px);background:#205361;border-color:#78cdd1}.presets button.active{background:#22656a;color:#f0fffa;border-color:#77ddd4}
.control-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 24px;padding:7px 25px 0}
.control-column{border-left:1px solid #2e4c58;padding-left:20px}
.control-column:first-child{grid-column:1/-1;border-left:0;padding-left:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px}
.control-column:first-child h3,.control-column:first-child .column-hint{grid-column:1/-1}
.control-column:nth-child(2){border-left:0;padding-left:0}
.control-column:nth-child(2),.control-column:nth-child(3){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px;align-content:start}
.control-column:nth-child(2) h3,.control-column:nth-child(3) h3{grid-column:1/-1}
.control-column h3{font-size:.87rem;color:#d4e5e4;margin:0 0 15px;letter-spacing:.02em}
.source-card{border:1px solid #34545f;background:#0d2530;border-radius:12px;padding:11px 10px;margin:0 0 13px}
.source-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.source-card-head strong{font-size:.89rem;color:#e7f1ef}
.source-card-head small{font-size:.7rem;color:#a4b9bd;font-weight:550}
.source-card-head label{font-size:.72rem;color:#a7bbc0;font-weight:750;display:flex;align-items:center;gap:5px}
.source-card-head select{background:#102d38;color:#edf7f7;border:1px solid #4a7581;padding:5px;border-radius:6px;max-width:105px}
.waveform-control{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:11px;color:#b8cdd0;font-size:.75rem;font-weight:800}
.waveform-control select{min-width:108px;background:#102d38;color:#edf7f7;border:1px solid #4a7581;padding:5px;border-radius:6px}
.source-card .control{padding-bottom:10px}
.source-card .control:last-child{padding-bottom:0}
.source-card .control-line label{font-size:.77rem}
.source-card .control-line{margin-bottom:4px}
.ac-controls{border-top:1px solid #2e4d59;margin-top:7px;padding-top:10px}
.ac-controls[hidden]{display:none}
.source-card .control[data-field="v1"].inactive,.source-card .control[data-field="v2"].inactive{opacity:.45}
.source-card input:disabled{cursor:not-allowed}
.control{padding:0 0 18px}.control:last-child{padding-bottom:0}
.control-line{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:7px}
.control-line label{font-weight:800;font-size:.88rem;white-space:nowrap}.control-line label small{font-weight:600;color:#91aab1;font-size:.72rem;margin-left:4px}
.field-entry{display:flex;align-items:center;gap:5px;background:#081a25;border:1px solid #4a6874;border-radius:8px;padding:6px 8px;color:#8facb5;font-size:.75rem}
.field-entry:focus-within{border-color:#7fe9d9;box-shadow:0 0 0 2px #2b8b8270}
.field-entry input{border:0;outline:0;background:transparent;color:#f3faf7;text-align:right;width:4.8em;font-size:.88rem;font-weight:800;font-variant-numeric:tabular-nums}
.field-entry input[aria-invalid="true"]{color:#ffaaa9}
.control input[type=range]{width:100%;margin:2px 0 0;accent-color:#6cdbd2;height:20px;cursor:pointer}
.control small[id$="-hint"]{display:block;color:#91a8af;font-size:.72rem;margin-top:0}
.column-hint{font-size:.73rem;color:#9bb0b7;line-height:1.42;margin:0}
.field-error{display:block;color:#ffb1b4;font-size:.75rem;font-weight:650;margin-top:3px}
.form-error{margin:8px 25px 0;border:1px solid #ad575d;background:#46272e;color:#ffbfc4;border-radius:8px;padding:9px 12px;font-size:.8rem}
.takeaway{margin-top:18px;padding:24px 27px;display:grid;grid-template-columns:minmax(180px,.72fr) minmax(0,1.28fr);gap:18px;background:linear-gradient(110deg,#143a42,#122b34);border:1px solid #3e7879;border-radius:18px;align-items:center}
.takeaway h2{font-size:clamp(1.23rem,2vw,1.65rem);line-height:1.2;margin:0;letter-spacing:-.035em}
.takeaway>p{margin:0;color:#c6dcda;font-size:.9rem}
.formula-strip{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:17px 7px 0}
.formula-strip span{font-size:.71rem;font-weight:800;text-transform:uppercase;letter-spacing:.11em;color:#9fbbc1}
.formula-strip strong{font-size:clamp(.95rem,1.7vw,1.35rem);font-weight:850;color:#fff0d3;white-space:normal}
.formula-strip p{font-size:.75rem;color:#a9bac0;margin:0}
.footer{display:flex;justify-content:space-between;gap:12px;border-top:1px solid #2a4350;margin-top:22px;padding-top:16px;font-size:.72rem;color:#8ba4ab;flex-wrap:wrap}
@media(max-width:1050px){.live-grid{grid-template-columns:1fr}.monitor-panel{display:flex}.scope{min-height:0}}
@media(max-width:780px){.shell{padding:19px 12px}.masthead{align-items:flex-start}.header-stamp{padding:11px 12px;gap:7px;border-radius:13px}.header-stamp strong{font-size:1.3rem}.header-stamp span{font-size:.57rem}.panel-head{padding:20px 18px 0}.schematic-wrap{padding:8px 5px 0}.flow-key{padding-left:18px;padding-right:18px}.circuit-note{margin-left:18px;margin-right:18px}.animation-controls{margin-left:18px;margin-right:18px}.circuit-panel .current-ledger{margin-left:18px;margin-right:18px}.control-grid{grid-template-columns:1fr;padding:7px 18px 0}.control-column{grid-column:1!important;border-left:0!important;border-top:1px solid #2e4c58;padding:16px 0 0!important}.control-column:first-child{border-top:0;padding-top:0!important}.presets{padding-left:18px;padding-right:18px}.workbench-head>p{max-width:220px}.takeaway{grid-template-columns:1fr}}
@media(max-width:560px){.masthead{display:block}.header-stamp{display:none}h1{font-size:2.4rem}.lede{font-size:.98rem}.output-feature,.scope,.monitor-panel .voltage-chart{margin-left:13px;margin-right:13px}#scope-svg text{visibility:hidden}.scope-mobile-scale{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:.7rem;color:#a7bdc2;margin:0 0 8px}.scope-mobile-scale strong{color:#e4f1ee;font-variant-numeric:tabular-nums}.scope-scrubber{display:flex;flex-direction:column;align-items:stretch;gap:4px}.scope-scrubber input{width:100%}.chart-row{grid-template-columns:25px minmax(0,1fr) 75px}.chart-axis{margin-right:82px}.control-column:first-child{grid-template-columns:1fr}.control-column:nth-child(2),.control-column:nth-child(3){grid-template-columns:1fr}.workbench-head{display:block}.workbench-head>p{text-align:left;max-width:none;margin-top:10px}.presets button{flex:1 1 44%;padding:8px 6px;font-size:.75rem}.formula-strip{display:block}.formula-strip>*{display:block;margin-bottom:7px!important}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.current-flow{animation:none;stroke-dasharray:4 15}.voltage-bar,.presets button{transition:none}}
