/* circuit_lab.css — the circuit lab (viz/circuit_lab.js). Chrome is the muted steel of the
   viz tokens; bright colour is only for data (lamp glow, LED, warnings). Scoped under .cl. */
.cl { display: flex; flex-direction: column; gap: .7rem; }
.cl-tools { display: flex; flex-wrap: wrap; gap: .35rem; }
.cl-tool { display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 4.1rem; padding: .3rem .35rem .35rem;
  border-radius: .6rem; border: 1px solid rgba(148, 163, 184, .3); background: rgba(15, 23, 42, .55); color: #cbd5e1; cursor: pointer; font-size: .72rem; line-height: 1.15; }
.cl-tool canvas { width: 44px; height: 28px; }
.cl-tool:hover { border-color: #7d93ad; }
.cl-tool.cl-on { border-color: #7dd3fc; background: rgba(56, 189, 248, .14); color: #f1f5f9; }
.cl-tool:focus-visible, .cl-canvas:focus-visible, .cl-btn:focus-visible { outline: 2px solid #7dd3fc; outline-offset: 2px; }
.cl-board { width: 100%; border-radius: .8rem; border: 1px solid rgba(148, 163, 184, .3); background: linear-gradient(180deg, #0b1220, #070b14); }
.cl-canvas { display: block; touch-action: manipulation; cursor: crosshair; border-radius: .8rem; }
.cl-read { margin: 0; min-height: 1.3em; color: #e2e8f0; font-weight: 600; font-variant-numeric: tabular-nums; }
.cl-warn { padding: .45rem .7rem; border-radius: .6rem; background: rgba(239, 68, 68, .12); border: 1px solid rgba(248, 113, 113, .45); color: #fecaca; font-size: .9rem; }
.cl-warn[hidden] { display: none; }
.cl-edit { display: flex; flex-direction: column; gap: .4rem; }
.cl-edit:empty { display: none; }
.cl-slider { display: grid; grid-template-columns: minmax(7rem, auto) 1fr auto; align-items: center; gap: .6rem; color: #cbd5e1; font-size: .88rem; }
.cl-slider input { width: 100%; accent-color: #7dd3fc; }
.cl-slider output { min-width: 4.2rem; text-align: right; color: #f1f5f9; font-variant-numeric: tabular-nums; }
.cl-goal { display: flex; align-items: center; gap: .55rem; padding: .5rem .75rem; border-radius: .6rem; border: 1px solid rgba(148, 163, 184, .3); color: #e2e8f0; }
.cl-goal-mark { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #94a3b8; border: 1px solid rgba(148, 163, 184, .4); }
.cl-goal.cl-done { border-color: rgba(253, 224, 71, .55); background: rgba(253, 224, 71, .08); }
.cl-goal.cl-done .cl-goal-mark { color: #0b1220; background: #fde047; border-color: #fde047; }
.cl-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.cl-btn { border-radius: .6rem; border: 1px solid rgba(148, 163, 184, .3); background: rgba(15, 23, 42, .55); color: #e2e8f0; padding: .3rem .8rem; font-size: .85rem; cursor: pointer; }
.cl-btn:hover { border-color: #7d93ad; }
@media (max-width: 480px) { .cl-slider { grid-template-columns: 1fr auto; } .cl-slider span { grid-column: 1 / -1; } }

/* The viz card stays dark in the light theme too (as every .lx-visualization does), so no light overrides. */
/* …but the light theme's global `html[data-theme="light"] *` border colour outranks .cl-*: restore the edges. */
html[data-theme="light"] .cl .cl-tool, html[data-theme="light"] .cl .cl-btn, html[data-theme="light"] .cl .cl-board,
html[data-theme="light"] .cl .cl-goal { border-color: rgba(148, 163, 184, .3); }
html[data-theme="light"] .cl .cl-tool.cl-on { border-color: #7dd3fc; }
html[data-theme="light"] .cl .cl-goal.cl-done { border-color: rgba(253, 224, 71, .55); }
html[data-theme="light"] .cl .cl-goal-mark { border-color: rgba(148, 163, 184, .4); }
html[data-theme="light"] .cl .cl-goal.cl-done .cl-goal-mark { border-color: #fde047; }
html[data-theme="light"] .cl .cl-warn { border-color: rgba(248, 113, 113, .45); }
