/* cirKITry v8: signal-lab controls restyled to match the workbench.
   Before: a pale grey/white rocker and a shiny black-and-silver slider cap on a white track (looked like a stock form
   control). Now both use the footer switch's language: recessed dark slot, hairline border, flat cap, orange = live. */

/* ---------- "Close the circuit" rocker ---------- */
.lab-power .rocker:not(#\#){
  width:44px;height:24px;padding:2px;box-sizing:border-box;border-radius:4px;
  background:#141a24;border:1px solid #2c3546;box-shadow:inset 0 2px 4px #00000066}
.lab-power .rocker>span:not(#\#){
  width:19px;height:18px;box-sizing:border-box;border-radius:2px;
  background:#0b0d11;border:1px solid #8190a7;box-shadow:none;transform:none}
.lab-power .rocker>span:not(#\#)::after{width:2px;height:6px;margin:5px auto;background:#8190a7}
.signal-lab[data-powered=true] .lab-power .rocker>span:not(#\#){transform:translateX(19px);background:var(--orange);border-color:var(--orange)}
.signal-lab[data-powered=true] .lab-power .rocker>span:not(#\#)::after{background:#0b0d11}
.signal-lab[data-powered=true] .lab-power .rocker:not(#\#){border-color:#ff7a0066}
@media(prefers-reduced-motion:no-preference){
  .lab-power .rocker>span:not(#\#){transition:transform .16s cubic-bezier(.16,1,.3,1),background-color .16s,border-color .16s}
}

/* ---------- Pulse-rate fader ---------- */
/* --rate-pos (0–1) is set by theme.js from the live value, so the fill follows the cap exactly at any decimal */
.lab-frequency:not(#\#){--rate-pos:.2;--cap:14px}
.lab-frequency input:not(#\#){
  appearance:none;-webkit-appearance:none;width:100%;height:32px;margin:6px 0 0;background:transparent;cursor:ew-resize;
  accent-color:var(--orange)}
.lab-frequency input:not(#\#)::-webkit-slider-runnable-track{
  height:6px;border-radius:3px;border:1px solid #2c3546;box-shadow:inset 0 1px 3px #00000080;
  background:
    linear-gradient(90deg,var(--blue) 0 calc(var(--cap)/2 + var(--rate-pos)*(100% - var(--cap))),transparent 0),
    #141a24}
.lab-frequency input:not(#\#)::-moz-range-track{height:6px;border-radius:3px;border:1px solid #2c3546;background:#141a24;box-shadow:inset 0 1px 3px #00000080}
.lab-frequency input:not(#\#)::-moz-range-progress{height:6px;border-radius:3px;background:var(--blue)}
/* flat fader cap: dark body, hairline edge, one orange index line (no gloss) */
.lab-frequency input:not(#\#)::-webkit-slider-thumb{
  appearance:none;-webkit-appearance:none;width:var(--cap);height:24px;margin-top:-10px;box-sizing:border-box;
  border:1px solid #8190a7;border-radius:3px;box-shadow:0 2px 0 #00000055;
  background:linear-gradient(90deg,transparent calc(50% - 1px),var(--orange) 0 calc(50% + 1px),transparent 0),#0b0d11}
.lab-frequency input:not(#\#)::-moz-range-thumb{
  width:var(--cap);height:24px;box-sizing:border-box;border:1px solid #8190a7;border-radius:3px;box-shadow:0 2px 0 #00000055;
  background:linear-gradient(90deg,transparent calc(50% - 1px),var(--orange) 0 calc(50% + 1px),transparent 0),#0b0d11}
.lab-frequency input:not(#\#):hover::-webkit-slider-thumb,.lab-frequency input:not(#\#):active::-webkit-slider-thumb{border-color:var(--orange)}
.lab-frequency input:not(#\#):hover::-moz-range-thumb,.lab-frequency input:not(#\#):active::-moz-range-thumb{border-color:var(--orange)}
.lab-frequency input:not(#\#):focus-visible{outline:2px solid var(--orange);outline-offset:3px;border-radius:4px}

/* 1–6 Hz scale under the fader; the padding lines each number up with the cap's centre at that value */
.lab-scale:not(#\#){display:flex;justify-content:space-between;padding-inline:calc(var(--cap)/2 - .3em);margin-top:2px;
  font:500 .75rem/1 var(--font-code,monospace);color:#8b97aa;font-variant-numeric:tabular-nums}
.lab-scale>span{position:relative;width:.6em;text-align:center}
.lab-scale>span::before{content:'';position:absolute;left:50%;top:-6px;width:1px;height:4px;background:#3a4558}
.lab-frequency output:not(#\#){font-variant-numeric:tabular-nums;color:var(--blue)}

/* very short desktop windows: the panel is one tight row, so drop the scale there */
@media(min-width:601px) and (max-height:559.98px){.lab-scale:not(#\#){display:none}}
