:root{font-family:'Segoe UI',Arial,sans-serif;color:#20344e;background:#f0f4f9;font-synthesis:none;font-size:14px;--blue:#1968e0;--line:#e0e7ef;--muted:#75859a}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,select{cursor:pointer}button{border:1px solid var(--line);border-radius:7px;background:white;color:#425570;padding:9px 12px;transition:background .15s}button:hover{background:#eef4ff;border-color:#b6ccec}button:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid #71a8fc;outline-offset:2px}button:disabled{opacity:.4;cursor:default}header{height:77px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;background:white;border-bottom:1px solid var(--line)}.brand{font-size:27px;letter-spacing:-1px;font-weight:750;display:flex;align-items:center;color:#243750;text-decoration:none}.brand>span:not(.brandmark){color:var(--blue)}.brandmark{background:var(--blue);color:white;font-size:34px;width:38px;height:40px;border-radius:11px;margin-right:10px;text-align:center;line-height:40px}.brand small{font-size:13px;font-weight:400;letter-spacing:0;color:var(--muted);border-left:1px solid var(--line);margin-left:22px;padding-left:22px}.header-actions{display:flex;gap:9px}.header-actions button:last-child{background:#eff5ff;color:var(--blue);border-color:#d9e7fc}.workspace{display:grid;grid-template-columns:224px minmax(400px,1fr) 254px;min-height:calc(100vh - 115px)}aside{background:white;padding:24px 18px}.library{border-right:1px solid var(--line)}.inspector{border-left:1px solid var(--line)}.panel-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.panel-heading h2{font-size:16px;margin:0}.panel-heading>span{font-size:12px;color:var(--muted)}.search{display:flex;border:1px solid var(--line);padding:9px;border-radius:7px;gap:6px;margin-bottom:24px}.search span{font-size:22px;line-height:20px;color:var(--muted)}.search input{border:0;min-width:0;width:100%;outline:none;font-size:13px}.category{margin-bottom:20px}.category h3{font-size:12px;font-weight:600;color:var(--muted);margin:0 0 8px}.part-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.part-button{display:flex;flex-direction:column;align-items:center;justify-content:center;height:70px;border-color:#e7edf4;padding:5px;font-size:12px;gap:3px;background:#fcfdff}.part-button svg{width:53px;height:33px;color:#445e7d}.part-button.selected{background:#e9f2ff;border-color:var(--blue);color:var(--blue)}.library-note{border-top:1px solid var(--line);padding-top:19px;font-size:12px;color:#7c8b9e;line-height:1.65}.library-note strong{color:#53647a;font-size:13px}.library-note p{margin-top:5px}main{min-width:0;display:flex;flex-direction:column;background:#f8fafd}.projectbar{display:flex;align-items:center;justify-content:space-between;padding:22px 25px 20px;gap:15px}.eyebrow{font-size:12px;color:var(--muted)}h1{font-size:23px;letter-spacing:-.5px;margin:6px 0 0;font-weight:650}select{border:1px solid var(--line);background:white;border-radius:6px;color:#425570;padding:8px;max-width:100%}.toolbar{display:flex;justify-content:space-between;gap:10px;padding:9px 17px;background:white;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.toolgroup{display:flex;align-items:center;gap:4px}.toolgroup button{border-color:transparent;padding:7px 9px;font-size:17px}.toolgroup button span{font-size:13px}.toolgroup button.active{background:#eaf2ff;color:var(--blue)}.divider{height:22px;border-left:1px solid var(--line);margin:0 5px}.flow-label{font-size:12px;display:flex;align-items:center;gap:4px;margin-right:9px;white-space:nowrap}input[type=checkbox]{accent-color:var(--blue)}#zoomLabel{font-size:12px;min-width:39px;text-align:center}#board{position:relative;flex:1;min-height:430px;overflow:hidden;background:#f5f8fc;touch-action:none}#circuit{width:100%;height:100%;position:absolute;inset:0;user-select:none;touch-action:none}#boardHint{position:absolute;top:18px;left:50%;transform:translateX(-50%);padding:9px 14px;background:#fffef0;border:1px solid #ede7c5;border-radius:6px;font-size:12px;color:#8c7438;pointer-events:none;white-space:nowrap}.board-key{position:absolute;bottom:16px;left:22px;color:#8190a3;font-size:11px;display:flex;align-items:center;gap:7px;pointer-events:none}.key-line{width:19px;border-top:2px solid #708399}.key-dot{width:5px;height:5px;border-radius:50%;background:#f0a32f;margin-left:15px}#emptyHint{position:absolute;top:45%;width:100%;text-align:center;color:#788aa4;pointer-events:none}.simulation{padding:13px 20px;display:flex;justify-content:space-between;align-items:center;gap:12px;background:white;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.sim-controls{display:flex;align-items:center;gap:8px}.primary{background:var(--blue);color:white;border-color:var(--blue)}.primary:hover{background:#0c58c8;color:white}.sim-controls label{font-size:12px;color:var(--muted);margin-left:5px}.sim-controls select{border:0;padding:4px}#simStatus{font-size:12px;color:#488677;display:flex;align-items:center;gap:6px}#simStatus i{display:inline-block;width:6px;height:6px;border-radius:50%;background:#37a483}.time{font-variant-numeric:tabular-nums;font-size:12px;color:var(--muted)}.readings{display:grid;grid-template-columns:1fr 1fr 1fr 2.1fr;background:white;min-height:151px;padding:21px 0}.reading{padding:5px 20px;border-right:1px solid var(--line)}.reading>span{font-size:12px;color:var(--muted);display:block;white-space:nowrap}.reading strong{font-size:27px;font-weight:500;display:block;margin-top:17px;font-variant-numeric:tabular-nums;white-space:nowrap}.reading small{font-size:15px;color:#8897aa}.metric-line{width:24px;height:3px;border-radius:3px;margin-top:15px}.blue{background:#3181ed}.orange{background:#efa542}.purple{background:#9878cf}.chart-box{padding:0 19px;min-width:0}.chart-box>div:first-child{display:flex;justify-content:space-between;gap:8px;font-size:12px}.chart-box strong{font-weight:600}.chart-box span{color:var(--muted)}#chart{height:70px;width:100%;margin:5px 0;overflow:visible}.chart-bottom{display:flex;justify-content:space-between;font-size:10px}.pill{color:#237d62!important;background:#ebf8f2;padding:4px 8px;border-radius:5px}.selected-card{background:#f2f6fb;border:1px solid #e4ebf3;border-radius:8px;padding:16px;display:flex;gap:11px;align-items:center;margin-bottom:23px}.selected-card svg{width:45px;height:40px}.selected-card strong{display:block;font-size:15px}.selected-card small{display:block;color:var(--muted);font-size:12px;margin-top:5px}.field{margin:19px 0}.field label{display:block;font-size:13px;color:#62738a;margin-bottom:9px}.input-unit{display:flex;border:1px solid #dce4ef;border-radius:6px;align-items:center;overflow:hidden}.input-unit input{width:100%;min-width:0;border:0;padding:10px;background:#fff;color:#273b55}.input-unit span{padding-right:12px;color:var(--muted);font-size:12px}input[type=range]{width:100%;accent-color:var(--blue);margin:13px 0 0}.state-button{width:100%;margin-top:6px}.small-note{font-size:12px;color:var(--muted);line-height:1.6}.inspector-actions{display:flex;gap:6px;margin-top:20px}.inspector-actions button{font-size:12px;flex:1;padding:8px}.learning{border-top:1px solid var(--line);margin-top:27px;padding-top:23px}.lesson-icon{font-size:25px;color:var(--blue)}.learning h3{font-size:15px;margin:9px 0}.learning p{font-size:13px;color:#718197;line-height:1.7}.formula{background:#f0f5fc;color:#356eae;text-align:center;border-radius:6px;padding:17px;margin-top:19px;font-family:Georgia,serif;font-size:23px;font-style:italic}.learning small{display:block;text-align:center;font-size:11px;color:#8c99aa;margin-top:8px}.text-button{border:0;color:#7c8da3;background:none;font-size:12px;padding:20px 0}footer{height:38px;display:flex;justify-content:space-between;align-items:center;padding:0 25px;border-top:1px solid var(--line);font-size:11px;color:#91a0b1}footer b{color:#70849b}#toast{position:fixed;left:50%;bottom:30px;transform:translateX(-50%);padding:12px 20px;border-radius:8px;background:#233d5e;color:white;opacity:0;pointer-events:none;z-index:30;transition:opacity .2s}#toast.show{opacity:1}dialog{border:1px solid var(--line);border-radius:15px;padding:32px;max-width:620px;width:90%;box-shadow:0 25px 100px #16325230;color:#304662}dialog::backdrop{background:#16325265}dialog h2{margin-top:0}dialog p,dialog li{line-height:1.7}dialog li{margin-bottom:9px}#closeDialog{float:right;font-size:23px;border:0;padding:0 5px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.part{cursor:grab}.part:active{cursor:grabbing}.terminal{cursor:crosshair}.wire{cursor:pointer}.part-label{font-size:15px;font-weight:600;fill:#526b87;pointer-events:none}.part-value{font-size:13px;fill:#8797aa;pointer-events:none}.flow-dot{fill:#eca338;pointer-events:none}.wire-selected{stroke:#1968e0}.part-body{stroke:#395976;stroke-width:2.7;fill:none;stroke-linecap:round;stroke-linejoin:round}@media(min-width:1500px){.workspace{grid-template-columns:250px minmax(400px,1fr) 290px}aside{padding:27px 24px}#board{min-height:530px}}@media(max-width:1150px){.workspace{grid-template-columns:185px minmax(350px,1fr) 215px}aside{padding:20px 12px}.brand small{display:none}.readings{grid-template-columns:1fr 1fr 1fr}.chart-box{grid-column:1/-1;margin-top:20px}.chart-box #chart{height:65px}.reading{padding:5px 14px}.flow-label{display:none}#simStatus{display:none}.projectbar{padding:18px 16px;flex-wrap:wrap}h1{font-size:21px}}@media(max-width:800px){header{padding:0 14px;height:68px}.brand{font-size:23px}.header-actions button{padding:8px}.header-actions #help span{display:none}.workspace{grid-template-columns:150px minmax(0,1fr)}.inspector{grid-column:1/-1;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr;gap:20px}.inspector .panel-heading{grid-column:1/-1;margin:0}.learning{border:0;margin:0;padding:0}.inspector .text-button{grid-column:1/-1;padding:0;text-align:left}.part-button{font-size:11px}.toolbar{padding:7px;flex-wrap:wrap}.toolgroup{gap:0}.toolgroup button span{display:none}.projectbar select{font-size:12px}.sim-controls label{display:none}.time{font-size:11px}.simulation{padding:10px}.reading strong{font-size:21px}.reading>span{font-size:10px}.reading{padding:5px 9px}#board{min-height:380px}.board-key{font-size:9px;left:10px}#boardHint{font-size:10px;max-width:95%;white-space:normal;text-align:center}footer{padding:10px;height:auto}footer span:last-child{display:none}}@media(max-width:480px){.workspace{grid-template-columns:110px minmax(0,1fr)}aside{padding:16px 7px}.part-grid{gap:4px}.part-button{height:63px;font-size:10px;padding:2px}.part-button svg{width:40px}.panel-heading{flex-wrap:wrap;gap:6px}.panel-heading h2{font-size:14px}.search{padding:5px}.search input{font-size:11px}.header-actions button{font-size:11px}.brandmark{width:30px;height:33px;line-height:33px;font-size:28px}.brand{font-size:20px}.header-actions{gap:4px}.projectbar{padding:16px 10px}.projectbar h1{font-size:18px}.readings{grid-template-columns:1fr}.reading{display:flex;align-items:center;justify-content:space-between;padding:5px 12px;border:0}.reading strong{margin:0;font-size:18px}.metric-line{display:none}.reading>span{font-size:12px}.chart-box{margin-top:10px;padding:0 12px}.time{display:none}.inspector{grid-template-columns:1fr}.inspector .panel-heading{grid-column:auto}.library-note{font-size:11px}.board-key{display:none}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
/* Junctions and an explicitly labelled measurement plot. */
.pin-number{font-size:12px;fill:#69809d;pointer-events:none}.pin-count{font-size:12px;font-weight:700;fill:#1968e0;paint-order:stroke;stroke:#f5f8fc;stroke-width:3px;pointer-events:none}.terminal:hover circle:last-of-type{stroke:#1968e0;stroke-width:3px}.connections-info{padding:12px;background:#f0f5fc;border-radius:7px;font-size:13px;line-height:1.7;margin:16px 0}.connections-info strong{display:block;margin-bottom:5px}.connections-info p{font-size:12px;color:#697c94;margin:8px 0 0}.toolbar{flex-wrap:wrap}.readings{grid-template-columns:repeat(3,minmax(0,1fr));padding-bottom:12px}.chart-box{grid-column:1/-1;padding:20px 24px 0;border-top:1px solid var(--line);margin-top:20px}.chart-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px}.chart-header>div:first-child{display:flex;flex-direction:column;gap:5px}.chart-header strong{font-size:16px}.chart-header #chartLabel{font-size:13px}.chart-controls{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.chart-controls label{font-size:12px;color:#63768e;display:flex;flex-direction:column;gap:5px}.chart-controls select{font-size:13px}.chart-controls button{padding:8px 11px}.chart-box #chart{width:100%;height:auto;max-height:260px;display:block;margin:12px 0 2px;overflow:visible}.chart-bottom{font-size:12px;gap:12px;flex-wrap:wrap}.chart-note{font-size:12px;line-height:1.6;color:#63768e;margin:12px 0 0}.chart-box .chart-header{font-size:14px}.chart-box #chartLatest{color:#324d6d;font-weight:600}@media(max-width:800px){.chart-box{padding:16px 10px 0}.chart-header{align-items:start}.chart-controls{gap:6px}.chart-controls select{max-width:125px}.chart-box #chart{min-height:130px}.readings{grid-template-columns:1fr}.reading{display:flex;justify-content:space-between;align-items:center;border:0;padding:7px 15px}.reading strong{font-size:20px;margin:0}.metric-line{display:none}.reading>span{font-size:12px}.chart-header strong{font-size:14px}}

.chart-scroll{overflow-x:auto;max-width:100%}.chart-box .chart-scroll #chart{min-width:540px}.chart-box{min-width:0}
.meter-dock{position:sticky;top:10px;z-index:6;background:#fff;padding:16px 12px;border:1px solid #cedef3;border-radius:9px;margin:-6px -4px 24px;box-shadow:0 4px 14px #2437500a;max-height:65vh;overflow-y:auto}.meter-heading{display:flex;flex-wrap:wrap;gap:7px;align-items:center;justify-content:space-between}.meter-heading h2{font-size:15px;margin:0}.meter-heading span{font-size:11px;color:#528071}.meter-intro{font-size:12px;line-height:1.6;color:#718197;margin:10px 0 12px}.meter-picker{display:flex;flex-wrap:wrap;gap:6px}.meter-picker select{width:100%;font-size:12px;min-width:0}.meter-picker>button{width:100%;font-size:12px;color:#1968e0;background:#edf4ff}.meter-card{margin-top:10px;border-left:3px solid #1968e0;background:#f1f6fd;padding:8px 10px;border-radius:5px}.meter-card.current-meter{border-color:#d88a19;background:#fff8ed}.meter-card-heading{display:flex;align-items:center;justify-content:space-between;gap:3px}.meter-select{font-size:12px;font-weight:600;border:0;background:none;padding:3px 0;text-align:left;overflow-wrap:anywhere}.meter-unpin{border:0;background:none;font-size:19px;padding:2px 5px;flex-shrink:0}.meter-value{display:block;font-size:26px;font-weight:600;font-variant-numeric:tabular-nums;margin:7px 0;color:#244d82;overflow-wrap:anywhere}.current-meter .meter-value{color:#9c650e}.meter-connection{display:block;font-size:11px;line-height:1.5;color:#718197}.meter-dock .small-note:empty{display:none}.meter-dock .small-note{margin-bottom:0}@media(max-width:800px){.meter-dock{grid-column:1/-1;position:relative;top:auto;margin:0;max-height:none}#pinnedMeters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.meter-picker{flex-wrap:nowrap}.meter-picker select{width:auto;flex:1}.meter-picker>button{width:auto}.meter-dock .meter-card{margin-top:10px}}

@media(max-width:800px){.meter-dock{position:sticky;top:0;align-self:start;max-height:40vh}}

.toolgroup button.clear-all{font-size:12px;color:#b14c3d;border-color:#ead5d0;margin-left:5px;padding:8px}.toolgroup button.clear-all:hover{background:#fff2ee}
.meter-settings{display:grid;gap:8px;margin:9px 0}.meter-settings label{display:grid;gap:4px;font-size:12px;color:#5a708d}.meter-settings select{width:100%;font-size:12px;padding:6px}.meter-settings strong{font-size:12px;color:#765298}.meter-extra{font-size:12px;line-height:1.8;color:#765298}.meter-progress{display:block;margin-top:5px;font-size:11px;color:#72839b}.meter-card.power-meter{background:#f8f3fc;border-color:#8752aa}.power-meter .meter-value{color:#765298}#meterHelp{padding:2px 8px}.selected-meter-readout{display:block;font-size:15px;font-weight:600;padding:10px 0;color:#326499}

/* Phones: the board comes first at full width, the part library becomes scrollable rows below it. */
@media(max-width:700px){.workspace{display:flex;flex-direction:column;min-height:0}.workspace>main{order:1}.library{order:2;border-right:0;border-top:1px solid var(--line);padding:14px 12px}.inspector{order:3}#board{flex:none;min-height:0;height:min(62vh,520px)}#catalog .category{margin-bottom:12px}#catalog .part-grid{display:flex;gap:6px;overflow-x:auto;padding-bottom:6px;scrollbar-width:thin}#catalog .part-button{flex:0 0 84px;height:70px}.library-note{display:none}.projectbar{gap:10px}.projectbar select{max-width:100%}}

.lang-switch{display:flex;gap:2px;padding:3px;border:1px solid var(--line);border-radius:9px;background:#f5f8fc}.lang-switch button{border:0;background:transparent;padding:6px 9px;font-size:12px;font-weight:700;color:#64748b;border-radius:6px}.lang-switch button[aria-pressed=true]{background:white;color:#1968e0;box-shadow:0 1px 3px #0f2a5420}
@media(max-width:480px){.lang-switch button{padding:5px 6px;font-size:11px}}
