/* Lienzo: componentes, cables (buses, puentes, puntos de unión), pines y selección. */
.gdot { fill: var(--grid); }

/* Cables */
.wire { fill: none; stroke: var(--off); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; transition: stroke .15s; }
.wire.on { stroke: var(--on); filter: drop-shadow(0 0 3px var(--on-glow)); }
.wire.bus { stroke: var(--stroke); stroke-width: 4.5; }
.wire.bus.on { stroke: var(--dim); filter: none; }
.wire.sel { stroke: var(--accent); }
.wire.net-hi { stroke: var(--accent); filter: drop-shadow(0 0 2px color-mix(in srgb, var(--accent) 50%, transparent)); }
.wire.temp { stroke: var(--accent); stroke-dasharray: 5 4; filter: none; pointer-events: none; }
.hit { fill: none; stroke: transparent; stroke-width: 12; pointer-events: stroke; cursor: pointer; }
.wire.x { stroke: var(--bad); filter: none; opacity: .85; }
.wire.forzado { stroke-dasharray: 8 3; }
.wire.forzado:not(.on):not(.x) { stroke: var(--out); }
.wire.z { stroke: var(--accent); stroke-dasharray: 3 4; filter: none; opacity: .8; }
.junta { fill: var(--off); }
.junta.x { fill: var(--bad); } .junta.z { fill: var(--accent); }
.junta.on { fill: var(--on); }
.junta.bus { fill: var(--stroke); }
.junta.net-hi { fill: var(--accent); }
.busval { fill: var(--dim); font: 600 10px var(--mono); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; pointer-events: none; }

/* Componentes */
.hitbox { fill: transparent; cursor: move; }
.body { fill: var(--panel2); stroke: var(--stroke); stroke-width: 1.8; transition: stroke .15s; }
.back { fill: none; stroke: var(--stroke); stroke-width: 1.8; }
.comp.on .body, .comp.on .back { stroke: var(--on); }
.box { fill: var(--panel2); stroke: var(--stroke); stroke-width: 1.8; }
.comp.on .box:not(.num):not(.disp):not(.blk) { stroke: var(--on); }
.box.blk { fill: var(--panel); }
.box.const { stroke-dasharray: 3 2; }
.comp.sw .hitbox, .comp.btn .hitbox, .comp.numin .hitbox { cursor: pointer; }
.cname { fill: var(--text); font: 600 12px var(--mono); text-anchor: middle; pointer-events: none; }
.cval { fill: var(--muted); font: 10px var(--mono); text-anchor: middle; pointer-events: none; }
.comp.on .cval { fill: var(--on); }
.numtxt { fill: var(--out); font: 600 11px var(--mono); text-anchor: middle; pointer-events: none; }
.csym { fill: none; stroke: var(--muted); stroke-width: 1.4; }
.comp.on .csym { stroke: var(--on); }
.led-ring { fill: none; stroke: var(--stroke); stroke-width: 1.5; transition: stroke .2s; }
.led { fill: var(--led-off); transition: fill .2s, filter .2s; }
.comp.on .led-ring { stroke: var(--out); }
.comp.on .led { fill: var(--out); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--out) 55%, transparent)); }
.led-ring.x { stroke: var(--bad); } .led-ring.z { stroke: var(--accent); stroke-dasharray: 3 3; }
.led.x, .led.z { fill: none; }
.ledx { fill: var(--bad); font: 700 9px var(--mono); text-anchor: middle; }
.comp.bad .led-ring { stroke: var(--bad); stroke-width: 2.5; }
.comp.bad .box { stroke: var(--bad) !important; stroke-width: 2.5; }
.comp.bad .lname { fill: var(--bad); }
.lname { fill: var(--dim); font: 600 12px var(--mono); pointer-events: none; }
.comp.on .lname { fill: var(--out); }
.seg { fill: var(--off); opacity: .35; transition: fill .15s, opacity .15s; }
.seg.on { fill: var(--out); opacity: 1; }
.bar { fill: var(--stroke); }
.pinlbl { fill: var(--muted); font: 9px var(--mono); pointer-events: none; }
.reloj-tri { fill: none; stroke: var(--dim); stroke-width: 1.2; }
.box.tunel { fill: var(--panel); }
.pinlbl.end { text-anchor: end; }

/* Pines */
.pin { fill: var(--bg); stroke: var(--stroke); stroke-width: 1.2; pointer-events: none; }
.pin.con { fill: var(--stroke); }
.pinhit { fill: transparent; cursor: crosshair; }
.pinhit:hover, .pinhit.tgt { fill: color-mix(in srgb, var(--accent) 35%, transparent); }

/* Selección y sondas */
.codo { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; cursor: move; }
.selbox { fill: none; stroke: var(--accent); stroke-dasharray: 4 3; pointer-events: none; }
.boxsel { fill: color-mix(in srgb, var(--accent) 7%, transparent); stroke: var(--accent); stroke-dasharray: 4 3; pointer-events: none; }
.sonda rect { fill: var(--bg); stroke: var(--accent); }
.sonda text { fill: var(--accent); font: 600 10.5px var(--mono); text-anchor: middle; }
