/* © 2026 Cromulent, Inc. All Rights Reserved.
   wiring.css - "How it plugs together" (wiring.js): the board panel's drawing and the bigger view. The pictures are
   Adafruit's (Fritzing parts, unedited); everything around them is bench's tokens. Wire colours are the STEMMA QT
   cable's own (black ground, red power, blue SDA, yellow SCL), so the drawing matches the cable in the student's hand. */

.wiring { display: flex; flex-direction: column; gap: 8px; }
.wiring-open { display: block; width: 100%; padding: 6px; border: 1px solid var(--line); border-radius: 10px; cursor: zoom-in;
  background: radial-gradient(circle at 1px 1px, rgba(151, 163, 194, .14) 1px, transparent 1.2px) 0 0 / 14px 14px, color-mix(in srgb, var(--void) 70%, #1a2342); }
.wiring-open:hover, .wiring-open:focus-visible { border-color: var(--orchid); outline: none; }
.wiring-svg { display: block; width: 100%; height: auto; max-height: 520px; overflow: visible; }
.wiring-svg image { filter: drop-shadow(0 0 1px rgba(201, 211, 240, .9)) drop-shadow(0 4px 8px rgba(0, 0, 0, .55)); }
.wiring-name { font: 600 11px var(--mono); fill: var(--orchid-light); }
.wiring-port { font: 9px var(--pixel); text-transform: uppercase; fill: var(--amber); }
.wiring-plain { fill: #10172c; stroke: var(--line-2, #33406a); stroke-width: 1.5; }
.wiring-plain-name { font: 600 11px var(--mono); fill: var(--ink); }
.wiring-missing image, .wiring-missing .wiring-plain { opacity: .45; }
.wiring-wire path { fill: none; stroke-width: 3.4; stroke-linecap: round; }
.wiring-wire .wiring-jacket { stroke: #000; stroke-opacity: .7; stroke-width: 5.8; }
.wiring-wire .wiring-ground-edge { stroke: #8a93ad; stroke-opacity: .55; stroke-width: 1; }
.wiring-step circle { fill: var(--void); stroke: var(--orchid); stroke-width: 1.5; }
.wiring-step text { font: 10px var(--pixel); fill: var(--ink); }
.wiring-step.on circle { fill: var(--orchid); }
.wiring-step.on text { fill: var(--orchid-ink); }
.wiring-big .wiring-step { cursor: pointer; }
.wiring-dim { opacity: .22; }
.wiring-credit { margin: 0; font: 10px var(--mono); color: var(--ink-faint); }
.wiring-credit a { color: inherit; }

/* the steps: one cable per line, the number first */
.wiring-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.wiring-steps button { display: flex; gap: 8px; align-items: flex-start; width: 100%; text-align: left; padding: 6px 8px; border-radius: 8px;
  border: 1px solid transparent; background: none; color: var(--ink-2, var(--ink)); font: 12px/1.4 var(--body); cursor: pointer; }
.wiring-steps button b { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-2, var(--line)); display: grid; place-items: center;
  font: 10px var(--pixel); color: var(--ink); }
.wiring-steps strong { color: var(--ink); font-weight: 600; }
.wiring-steps button:hover { border-color: var(--line); }
.wiring-steps li.on button { border-color: var(--orchid); background: color-mix(in srgb, var(--orchid) 10%, transparent); }
.wiring-steps li.on b { background: var(--orchid); color: var(--orchid-ink); border-color: var(--orchid); }
.wiring-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 10px 0 8px; font: 11px var(--mono); color: var(--ink-dim); }
.wiring-legend i { display: inline-block; width: 16px; height: 4px; border-radius: 2px; margin-right: 5px; vertical-align: middle; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }

/* the bigger view */
.wiring-big { width: min(1200px, 96vw); max-height: 92vh; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--void); color: var(--ink); }
.wiring-big::backdrop { background: rgba(3, 5, 12, .72); }
.wiring-big header { display: flex; align-items: baseline; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.wiring-big h2 { margin: 0; font: 700 20px var(--disp); flex: 1 1 auto; }
.wiring-eyebrow { font: 11px var(--pixel); text-transform: uppercase; color: var(--orchid); }
.wiring-big-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; padding: 16px 18px; }
.wiring-big-figure { border: 1px solid var(--line); border-radius: 12px; padding: 10px;
  background: radial-gradient(circle at 1px 1px, rgba(151, 163, 194, .14) 1px, transparent 1.2px) 0 0 / 22px 22px, color-mix(in srgb, var(--void) 70%, #1a2342); }
.wiring-big-figure .wiring-svg { max-height: 70vh; }
@media (max-width: 760px) {
  .wiring-big { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .wiring-big-body { grid-template-columns: 1fr; }
}
