/* ─────────────────────────────────────────────────────────────────────────
   KinPella Circuit Lab — section styles.
   Loaded only by Circuit Lab pages (a <link> in the page body), on top of
   site.css: it reuses the site's variables, buttons and Code Lab card
   classes, and adds only what the circuit board needs. Flat borders, no
   big soft shadows on text cards (the owner's ghost-text lesson).
   ───────────────────────────────────────────────────────────────────────── */

.kt-stats{font-weight:800;color:var(--muted);margin:0}
.page-hero .kt-stats{color:#c9d4ef}

/* Goal card + board layout */
.kt-goal{background:#fff;border:1px solid #e8edf3;border-radius:var(--radius);padding:20px 22px;margin-bottom:16px}
.kt-goal p{font-size:17.5px;line-height:1.6;color:#33445f;margin:0 0 10px}
.kt-goal p:last-child{margin-bottom:0}
.kt-goal .kt-mission{background:var(--violet-soft);border-radius:12px;padding:12px 16px;font-weight:700;color:#2c2358}
.kt-player-section{padding-top:22px;padding-bottom:118px}

.kt-board-wrap{max-width:560px;margin:0 auto}
.kt-svg{display:block;width:100%;height:auto}
.kt-board-bg{fill:#0d1730;stroke:#26365c;stroke-width:2}

/* Wires + flow */
.kt-wire{fill:none;stroke:#e8a33d;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}
.kt-flowgeo path{fill:none;stroke:none}
.kt-dot{fill:#ffe066;stroke:#b97e10;stroke-width:1}

/* Slots */
.kt-slot rect{fill:rgba(255,255,255,.05);stroke:#7ae2d5;stroke-width:2;stroke-dasharray:7 6}
.kt-slot.is-accepting rect{stroke:#ffd94d;stroke-width:3;animation:kt-pulse 0.9s ease-in-out infinite}
.kt-slot.is-filled rect{stroke:transparent;fill:transparent}
.kt-slot-label{fill:#5f74a3;font-family:var(--font-ui);font-weight:800;font-size:11px;letter-spacing:.08em}
.kt-slot{cursor:pointer;outline:none}
.kt-slot:focus-visible rect{stroke:#ffd94d;stroke-width:3}
@keyframes kt-pulse{0%,100%{opacity:1}50%{opacity:.45}}

/* Parts */
.kt-part{cursor:default}
.kt-part[data-kt-placed]{cursor:pointer;outline:none}
.kt-part[data-kt-placed]:focus-visible{filter:brightness(1.3)}
.kt-leg,.kt-lead{stroke:#c8cfdb;stroke-width:3.4;stroke-linecap:round;fill:none}
.kt-batt-body{fill:#6c4bd8;stroke:#46309f;stroke-width:2}
.kt-batt-nub{fill:#46309f}
.kt-batt-sign{fill:#fff;font-family:var(--font-ui);font-weight:900;font-size:15px}
.kt-led-dome{fill:#7a2436;stroke:#4d1420;stroke-width:2;transition:fill .25s}
.kt-led-shine{fill:rgba(255,255,255,.5)}
.kt-halo{fill:url(#ktHaloGrad);opacity:0;transition:opacity .3s}
.kt-res-body{fill:#f0c475;stroke:#b98a2f;stroke-width:2}
.kt-band.b1{fill:#d64545}.kt-band.b2{fill:#7a4fd0}.kt-band.b3{fill:#8a5a2b}
.kt-sw-base{fill:#94a3b8}
.kt-sw-post{fill:#334155}
.kt-sw-lever{stroke:#f5b942;stroke-width:4.4;stroke-linecap:round}
.kt-sw-knob{fill:#f5b942;stroke:#b97e10;stroke-width:1.6}
.kt-cap-body{fill:#2f6fd0;stroke:#1d4e9e;stroke-width:2}
.kt-cap-fill{fill:#9fd0ff}
.kt-cap-plus{fill:#fff;font-family:var(--font-ui);font-weight:900;font-size:13px}
.kt-trans-body{fill:#334155;stroke:#0f172a;stroke-width:2}
.kt-trans-core{fill:#64748b}
.kt-trans-bolt{font-size:13px}
.kt-bulb-glass{fill:#475569;stroke:#263449;stroke-width:2;transition:fill .25s}
.kt-bulb-fil{fill:none;stroke:#1f2937;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

/* Live circuit states (the board wrap carries .is-on / .is-dim) */
[data-kt-board].is-on .kt-light .kt-halo{opacity:.95}
[data-kt-board].is-dim .kt-light .kt-halo{opacity:.4}
[data-kt-board].is-on .kt-led-dome{fill:#ff5964}
[data-kt-board].is-dim .kt-led-dome{fill:#c94f5e}
[data-kt-board].is-on .kt-bulb-glass{fill:#ffd94d}
[data-kt-board].is-on .kt-bulb-fil{stroke:#92600a}

/* The POP (Resistor Rescue) */
.kt-puff{display:none}
.kt-puff circle{fill:#9aa7bd;stroke:#6b7a94;stroke-width:1.6}
.kt-puff-text{fill:#fff;font-family:var(--font-ui);font-weight:900;font-size:13px}
.is-popping .kt-led-dome{fill:#fff3f3}
.is-popped .kt-led-dome,.is-popped .kt-led-shine{opacity:.12}
.is-popped .kt-puff{display:block}
.kt-shake{animation:kt-shake .45s ease-in-out}
.kt-wiggle{animation:kt-shake .3s ease-in-out}
@keyframes kt-shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-7px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(3px)}}

/* Signal pad (Gatekeeper) */
.kt-pad{cursor:pointer;outline:none}
.kt-pad circle{fill:#12325e;stroke:#7ae2d5;stroke-width:2.4}
.kt-pad text{fill:#bfe9ff;font-family:var(--font-ui);font-weight:900;font-size:11px;letter-spacing:.06em}
.kt-pad:focus-visible circle,.kt-pad:hover circle{stroke:#ffd94d}

/* Success sparkles */
.kt-sparkles{opacity:0;transition:opacity .4s}
.kt-sparkles path{fill:#ffd94d}
[data-kt-board].is-done .kt-sparkles{opacity:1}

/* Tray */
.kt-tray{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin:16px auto 4px;max-width:560px}
.kt-chip{display:flex;flex-direction:column;align-items:center;gap:2px;background:#fff;border:2px solid #dbe2ee;border-radius:16px;padding:10px 16px 8px;cursor:pointer;font-family:var(--font-ui);font-weight:800;font-size:14px;color:#24314c;min-width:96px}
.kt-chip svg{width:46px;height:46px}
.kt-chip .kt-halo{display:none}
.kt-chip .kt-puff{display:none}
.kt-chip.is-selected{border-color:var(--amber);background:#fff7e0}
.kt-chip.is-used{opacity:.38;pointer-events:none}
.kt-chip:focus-visible{outline:3px solid var(--violet);outline-offset:2px}

/* Feedback + actions */
.kt-feedback{max-width:560px;margin:14px auto 0;text-align:center;font-size:16.5px;line-height:1.55;font-weight:700;color:#2c3a58;min-height:26px}
.kt-safety{max-width:560px;margin:18px auto 0;text-align:center;font-size:13.5px;line-height:1.6;color:var(--muted)}
.kt-trade{max-width:560px;margin:14px auto 0;background:#fff6dd;border:1.5px solid var(--amber-soft);border-radius:14px;padding:13px 17px;font-size:14.5px;line-height:1.6;font-weight:600;color:#5c4a12;text-align:center}
.kt-power-live{background:var(--teal) !important;box-shadow:0 10px 20px -8px rgba(29,90,80,.5), inset 0 1px 0 rgba(255,255,255,.35) !important}
.cl-actions .btn.is-live{background:#2b8a7e;box-shadow:0 10px 20px -8px rgba(29,90,80,.5), inset 0 1px 0 rgba(255,255,255,.35)}
.kt-advance-row{max-width:560px;margin:14px auto 0;text-align:center}

@media (prefers-reduced-motion: reduce){
  .kt-slot.is-accepting rect{animation:none}
  .kt-shake,.kt-wiggle{animation:none}
}

/* Side-space (owner order 2026-11-30 — "use the sides, for all the
   pages that's like that"; the Wave 3 widening sample applied): at
   tablet widths and up the player column leaves the 560px phone
   measure for up to 920px and the section wrap lifts to the site
   measure so the column has room; tray chips and mission text step
   up with it. The board is an SVG and scales losslessly. Phone
   (<600px) is untouched. */
@media (min-width:600px){
  .kt-player-section .cl-wrap{max-width:1180px}
  .kt-board-wrap{max-width:min(920px,100%)}
  .kt-tray,.kt-feedback,.kt-safety,.kt-trade,.kt-advance-row{max-width:920px}
  .kt-goal,.kt-player-section .cl-actions,.kt-player-section .cl-hint{max-width:920px;margin-left:auto;margin-right:auto}
  .kt-chip{font-size:17px;min-width:128px;padding:14px 20px 12px}
  .kt-chip svg{width:64px;height:64px}
  .kt-goal p{font-size:19px}
}
