/* Lesson 02: the 3D bench, its console and the task cards. Base tokens and panels come from ../style.css. */
.prereq { font-size: .85rem; color: var(--muted); }
.prereq a { color: var(--u); }

.bench-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.stage-wrap { position: sticky; top: 12px; }
.stage { position: relative; height: clamp(380px, 62vh, 640px); border-radius: 16px; overflow: hidden; background: #0d1822; border: 1px solid var(--line); touch-action: none; }
.stage canvas { display: block; }
.stage-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: .9rem; }
.stage-hint { font-size: .75rem; color: var(--muted); margin: 10px 2px 0; }
.labels-layer { position: absolute; inset: 0; pointer-events: none; }
.pt { pointer-events: auto; min-height: 0; width: 30px; height: 30px; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; font-weight: 750; background: #101d29e6; color: var(--u); border: 2px solid #f5c76b80; box-shadow: 0 4px 12px #050c1399; }
.pt:hover { background: #203644; }
.pt.red { border-color: #e2554a; box-shadow: 0 0 0 3px #e2554a55; }
.pt.black { border-color: #cfd8dc; box-shadow: 0 0 0 3px #cfd8dc44; }
.pt.red.black { border-color: #e2554a; box-shadow: 0 0 0 3px #cfd8dc77; }

.console { display: flex; flex-direction: column; gap: 14px; }
.task-now { font-size: .84rem; padding: 12px 14px; border-radius: 12px; background: #10202c; border-left: 3px solid var(--u); }
.task-now b { display: block; color: var(--u); font-size: .7rem; letter-spacing: .14em; margin-bottom: 4px; }
.task-now.done { border-left-color: var(--ok); }
.readout { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 12px; background: #a8b598; color: #18201a; }
.readout-label { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; opacity: .7; }
.readout output { font: 600 1.7rem/1.1 ui-monospace, "Cascadia Mono", Consolas, monospace; font-variant-numeric: tabular-nums; }
.bench-note { margin: 0; font-size: .86rem; min-height: 2.6em; }
.bench-note.warn { color: #ffd2c7; padding: 10px 12px; border-radius: 10px; background: #4a1f1c80; border: 1px solid #7a332c; }
.bench-note.good { color: #d4f3df; }

.schema { width: 100%; height: auto; background: #10202c; border-radius: 12px; }
.schema .w { fill: none; stroke: #6b8796; stroke-width: 3; stroke-linejoin: round; }
.schema .w.cut { stroke-dasharray: 4 5; opacity: .5; }
.schema .part { fill: #203644; stroke: #a9bdc6; stroke-width: 2; }
.schema .bulb-on { fill: #ffcf7e; }
.schema text { fill: #a9bdc6; font-size: 10px; font-family: system-ui, sans-serif; }
.schema .pt-s { cursor: pointer; }
.schema .pt-s circle { fill: #101d29; stroke: var(--u); stroke-width: 2; }
.schema .pt-s text { fill: var(--u); font-size: 11px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.schema .pt-s:hover circle { fill: #203644; }
.schema .pt-s.red circle { stroke: #e2554a; stroke-width: 3; }
.schema .pt-s.black circle { stroke: #e9eef0; stroke-width: 3; }
.schema .pt-s:focus-visible { outline: none; }
.schema .pt-s:focus-visible circle { stroke-width: 4; }

.group { border: 0; padding: 0; margin: 0; min-width: 0; }
.group legend { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 0; margin-bottom: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { min-height: 40px; padding: 6px 11px; font-size: .84rem; flex: 1 1 auto; }
.chips button[aria-pressed=true] { border-color: var(--u); color: var(--u); background: #2a3a3e; }
.chips .probe-red[aria-pressed=true] { border-color: #e2554a; color: #ffb3aa; background: #3a2422; }
.chips .probe-black[aria-pressed=true] { border-color: #e9eef0; color: #fff; background: #2b3237; }
.probe-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.probe-selects label { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.probe-selects select { flex: 1; min-width: 0; min-height: 36px; border-radius: 8px; border: 1px solid var(--line); background: #10202c; color: var(--text); padding: 4px 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.red { background: #e2554a; } .dot.black { background: #e9eef0; }
.fuses { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.fuses .ok { color: var(--ok); } .fuses .blown { color: var(--hot); font-weight: 700; }
.fuses button { min-height: 34px; padding: 4px 10px; font-size: .78rem; }

.tasks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.task { border-radius: 14px; background: #10202c; border: 1px solid var(--line); }
.task.active { border-color: var(--u); box-shadow: inset 0 0 0 1px var(--u); }
.task-open { width: 100%; height: 100%; min-height: 120px; text-align: left; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; justify-content: flex-start; padding: 16px; border: 0; border-radius: 14px; background: transparent; }
.task-open:hover { background: #1a2e3b; }
.task .num { font-size: .68rem; letter-spacing: .14em; color: var(--u); font-weight: 750; }
.task strong { font-size: 1rem; line-height: 1.3; }
.task .brief { font-size: .8rem; color: var(--muted); }
.task.done .num::after { content: " · HOTOVO ✓"; color: var(--ok); }
.task-text { margin: 0; }
.task-progress { margin: 8px 0 0; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.answers-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.answers-row button { min-height: 36px; font-size: .8rem; padding: 6px 10px; }
.answers-row button.right { border-color: var(--ok); color: var(--ok); }
.answers-row button.wrong { border-color: var(--hot); color: #ffb3aa; }

.rule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.rule-grid article { background: #10202c; border-radius: 12px; padding: 18px; }
.rule-grid b { font-size: 1.05rem; }
.rule-grid p { font-size: .86rem; color: var(--muted); margin-bottom: 0; }
.rules .fine a { color: var(--u); }

@media (max-width: 980px) {
  .bench-layout { grid-template-columns: 1fr; }
  .stage-wrap { position: static; }
  .tasks, .rule-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .stage { height: 64vh; min-height: 340px; border-radius: 12px; }
  .tasks, .rule-grid { grid-template-columns: 1fr; }
  .task-open { min-height: 0; }
  .pt { width: 26px; height: 26px; font-size: .74rem; }
}
