/* 20-11-2026: schakeling bouwen (fz-schakeling.js) */
.sb-wrap{max-width:1480px;margin:0 auto 60px;padding:0 18px;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:#0f2742}
.sb-hero{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:14px;background:linear-gradient(135deg,#0f2742,#1678f2);color:#fff;border-radius:16px;padding:20px 24px;margin:10px 0 14px}
.sb-hero h1{margin:0 0 6px;font-size:clamp(22px,3vw,32px)}.sb-hero p{margin:0;max-width:820px;font-size:15.5px;line-height:1.5;opacity:.95}
.sb-id{display:inline-flex;margin-top:10px;padding:6px 10px;border-radius:8px;background:#ffffff22;font-size:12.5px}
.sb-vakken{display:flex;gap:8px;flex-wrap:wrap}
.sb-vak{border:2px solid #ffffff66;background:#ffffff14;color:#fff;border-radius:10px;padding:8px 14px;font:700 14px Inter,system-ui,sans-serif}
.sb-vak.on{background:#fff;color:#0f2742;border-color:#fff}.sb-vak[disabled]{opacity:.65;cursor:default}.sb-vak small{display:block;font-weight:500;font-size:11px}
.sb-app{background:#fff;border:1px solid #d9e3ed;border-radius:14px;padding:12px}
.sb-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:10px}
.sb-spacer{flex:1}
.sb-btn{border:1px solid #c7d4e3;background:#f6f9fd;color:#0f2742;border-radius:9px;padding:9px 13px;font:700 14.5px Inter,system-ui,sans-serif;cursor:pointer}
.sb-btn:hover{border-color:#1678f2}.sb-btn.groen{background:#16a34a;border-color:#16a34a;color:#fff;font-size:15.5px}
.sb-simmode .sb-btn.groen{background:#b91c1c;border-color:#b91c1c}.sb-btn.rood{background:#fff1f1;border-color:#f3b4b4;color:#b91c1c;margin-top:10px}
.sb-file{position:relative;overflow:hidden}.sb-file input{position:absolute;inset:0;opacity:0;cursor:pointer}
.sb-bar select{padding:9px 10px;border-radius:9px;border:1px solid #c7d4e3;font-size:15px;max-width:280px}
.sb-p{white-space:nowrap;display:flex;align-items:center;gap:6px;font-weight:700;font-size:14px}.sb-p b{color:#1678f2;min-width:54px}
.sb-main{display:grid;grid-template-columns:230px minmax(0,1fr) 250px;gap:12px}
@media(max-width:1100px){.sb-main{grid-template-columns:200px minmax(0,1fr)}.sb-props{grid-column:1/-1}}
@media(max-width:700px){.sb-main{grid-template-columns:minmax(0,1fr)}.sb-lib{display:flex;gap:6px;overflow-x:auto;max-height:none;-webkit-overflow-scrolling:touch}.sb-lib h3,.sb-groep summary{display:none}.sb-groep{display:contents}.sb-lib .sb-items{display:flex;gap:6px}.sb-lib .sb-item{flex:0 0 96px;touch-action:pan-x}}
.sb-lib{border:1px solid #e1e8f0;border-radius:12px;padding:8px;max-height:760px;overflow:auto;background:#fbfcfe}
.sb-lib h3,.sb-groep summary{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#41566e;margin:8px 4px 6px;cursor:pointer;list-style-position:inside}.sb-groep summary small{font-weight:600;color:#8aa0b8}.sb-groep{border-bottom:1px solid #e6edf5;padding-bottom:6px}.sb-groep:last-child{border-bottom:0}
.sb-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.sb-item{display:flex;flex-direction:column;align-items:center;gap:3px;border:1px solid #d9e3ed;background:#fff;border-radius:9px;padding:6px 4px;cursor:grab;touch-action:none;font:600 11px/1.2 Inter,system-ui,sans-serif;color:#0f2742;text-align:center;min-width:0;overflow-wrap:break-word;hyphens:auto}
.sb-item span{max-width:100%}
.sb-item:hover{border-color:#1678f2;box-shadow:0 0 0 3px #1678f222}
.sb-sym{width:100%;height:52px;pointer-events:none}
.sb-ghost{position:fixed;z-index:99999;width:140px;height:70px;transform:translate(-50%,-50%);pointer-events:none;opacity:.8}.sb-ghost svg{width:100%;height:100%}
.sb-blad{min-width:0}
#sbCanvas{display:block;width:100%;height:auto;border:1px solid #d9e3ed;border-radius:12px;background:#fbfcfe;touch-action:none;user-select:none;-webkit-user-select:none}
.sb-simbar{display:flex;align-items:center;gap:12px;margin:0 0 8px;flex-wrap:wrap}.sb-hint{margin:0;font-size:13.5px;color:#41566e;flex:1;min-width:200px}.sb-warn{margin:2px;font-size:13.5px;color:#b91c1c;font-weight:700}
.sb-props{border:1px solid #e1e8f0;border-radius:12px;padding:12px;background:#fbfcfe;font-size:14px}
.sb-props h3{margin:0 0 10px;font-size:15px}.sb-props label{display:block;font-weight:700;margin:0 0 10px}
.sb-props input[type=number],.sb-props select{width:100%;margin-top:4px;padding:7px;border:1px solid #c7d4e3;border-radius:8px;font-size:16px;box-sizing:border-box}
.sb-props input[type=range]{width:100%}.sb-leeg,.sb-tip{color:#5b6f86;font-size:13px;line-height:1.45}
.sb-calc{display:grid;grid-template-columns:1fr auto;gap:5px 8px;margin:6px 0 0;font-size:13.5px}.sb-calc dt{color:#41566e}.sb-calc dd{margin:0;font-weight:800;color:#1678f2;text-align:right}
.sb-calc a{font-size:11px;font-weight:700;color:#1460c9;text-decoration:none;border:1px solid #b7cfe8;border-radius:5px;padding:0 4px}
.sb-uitleg{margin-top:12px;font-size:14.5px;line-height:1.5}.sb-uitleg summary{font-weight:800;cursor:pointer}
.sb-terug{margin-top:12px}.sb-terug a{color:#1460c9;font-weight:700;text-decoration:none}
/* symbolen op het werkblad */
#sbCanvas .comp,.sb-sym{stroke:#0f2742;stroke-width:2;fill:none;stroke-linejoin:round}
#sbCanvas .comp text,.sb-sym text{stroke:none;fill:#0f2742}
.pn{font:600 11px Inter,system-ui,sans-serif}.lbl{font:800 13px Inter,system-ui,sans-serif}.warn{font:800 13px Inter,system-ui,sans-serif;fill:#b91c1c!important}
.box{fill:#fff}.kader{stroke-dasharray:4 3;stroke-width:1.4;fill:#fff}.fill{fill:#0f2742;stroke:none}
.uit{fill:#fff}.zuiger{fill:#1678f2;stroke:#0f2742}.stang{fill:#cbd5e1}.veer{stroke-width:1.5}.kogel{fill:#0f2742}.naald{stroke:#dc2626;stroke-width:2}.dik{stroke-width:2.4}
.pil{stroke-dasharray:5 4}
.kop{fill:#16a34a}.knop.on .kop{fill:#4ade80}.rol{fill:#fff}.rol.on{fill:#facc15}
.sb-simmode #sbCanvas .knop{cursor:pointer}.sb-simmode #sbCanvas .knop:hover .kop{fill:#22c55e}
#sbCanvas .comp{cursor:move}.sb-simmode #sbCanvas .comp{cursor:default}
#sbCanvas .hitbox{fill:transparent;stroke:none}
#sbCanvas .comp.sel .hitbox{fill:#1678f20d;stroke:#1678f2;stroke-width:1.5;stroke-dasharray:6 4}
#sbCanvas .port{fill:#fff;stroke:#1678f2;stroke-width:2;cursor:crosshair}#sbCanvas .port.used{fill:#1678f2}
#sbCanvas .port:hover,#sbCanvas .port.pick{fill:#facc15;stroke:#b45309;r:7}
#sbCanvas .lijn{fill:none;stroke:#0f2742;stroke-width:2.4;pointer-events:none}
#sbCanvas .lijn.p{stroke:#1678f2;stroke-width:3.2}#sbCanvas .lijn.e{stroke:#94a3b8}
#sbCanvas .lijn.e.stroom{stroke:#f97316;stroke-width:3.2;stroke-dasharray:10 7;animation:sbStroom .6s linear infinite reverse}
#sbCanvas .lijn.p.stroom{stroke-dasharray:10 7;animation:sbStroom .6s linear infinite}
#sbCanvas .lijn.sel{stroke:#b45309;stroke-width:4}
#sbCanvas .hit{fill:none;stroke:transparent;stroke-width:12;cursor:pointer}
.sb-simmode #sbCanvas .hit{pointer-events:none}
@keyframes sbStroom{to{stroke-dashoffset:-17}}
@media(prefers-reduced-motion:reduce){#sbCanvas .lijn.stroom{animation:none}}

.spoelvak{fill:#fff;stroke:#0f2742;stroke-width:1.4}
#sbCanvas .spoel.on .spoelvak{fill:#facc15}
#sbCanvas .spoel{cursor:pointer}

.sb-kies{margin:0 0 10px;padding:7px 10px;background:#eef5ff;border:1px solid #cfe0f5;border-radius:8px;color:#17375d}
.sb-last{margin:6px 0;padding:8px 10px;border-radius:8px;font-size:13px;line-height:1.4;border:2px solid}
.sb-last.ok{background:#e7f7ec;border-color:#2e9d4f;color:#145a2c}
.sb-last.nok{background:#fde8e7;border-color:#e1251b;color:#8a1510}
.sb-vak[data-dom]{cursor:pointer}.sb-vak[data-dom]:not(.on):hover{background:#ffffff2a}
#sbCanvas .lijn.el{stroke-width:1.8}
#sbCanvas .lijn.el.v{stroke:#dc2626;stroke-width:2.6}
#sbCanvas .lijn.el.z{stroke:#2563eb;stroke-width:2}
#sbCanvas .comp .blad.dicht{stroke:#16a34a;stroke-width:2.6}
#sbCanvas .comp .lamp-aan{fill:#fde047;stroke:#b45309}
#sbCanvas .comp .spoel-aan{fill:#facc15}
.sb-sym .lamp-aan,.sb-sym .spoel-aan{fill:none}
#sbCanvas .comp .ekop,.sb-sym .ekop{fill:#fff;stroke:#0f2742}
#sbCanvas .knop.on .ekop{fill:#4ade80}
#sbCanvas .knop:hover .ekop{fill:#bbf7d0}
#sbCanvas .lijn.el.f1{stroke:#92400e;stroke-width:2.6}
#sbCanvas .lijn.el.f2{stroke:#111827;stroke-width:2.6}
#sbCanvas .lijn.el.f3{stroke:#6b7280;stroke-width:2.6}
#sbCanvas .comp .motor-aan{fill:#bbf7d0;stroke:#15803d}
.sb-sym .motor-aan{fill:none}
#sbCanvas .comp .sens-aan{fill:#86efac;stroke:#15803d}
#sbCanvas .comp .sico,.sb-sym .sico{font-size:9px;font-weight:700}
.sb-knoppen{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
/* 23-11 melding Patrick: overzicht bibliotheek houden bij scrollen — bibliotheek blijft in beeld, groepkop plakt bovenaan */
@media(min-width:701px){.sb-lib{position:sticky;top:104px;align-self:start;max-height:calc(100vh - 116px)}
.sb-groep summary{position:sticky;top:-8px;z-index:2;background:#fbfcfe;margin:0 -4px 6px;padding:8px 8px 6px;box-shadow:0 1px 0 #e6edf5}}
#sbCanvas .pn.gekoppeld{fill:#0b7a35;font-weight:700}
#sbCanvas .pn.warn{fill:#c0392b;font-weight:700}
#sbCanvas .knoop{fill:#0f2742;stroke:none}
