/* Practice Lab layout — builds on style.css tokens */
.lab { max-width: 1480px; width: 100%; box-sizing: border-box; min-width: 0; margin: 0 auto; padding: 36px 24px 60px; }
.lab-hero { max-width: 900px; margin: 0 auto 28px; text-align: center; }
.lab-hero h1 { font-size: clamp(32px, 4.6vw, 52px); margin: 10px 0 14px; }
.lab-pitch { color: var(--muted, #b8c4d6); font-size: 17px; line-height: 1.6; margin: 0 auto 22px; }

.lab-progress { display: inline-flex; flex-wrap: wrap; justify-content: center; max-width: 100%; align-items: center; gap: 10px 14px; padding: 10px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); position: relative; font-size: 14px; }
.lab-progress .hud-label { margin: 0; }
.lab-stripes { display: inline-flex; gap: 4px; }
.lab-stripes i { display: block; width: 14px; height: 6px; border-radius: 2px; background: var(--line-hi); }
.lab-stripes i.on { background: var(--lime); box-shadow: 0 0 10px rgba(var(--lime-rgb), .6); }
.lab-link-btn { background: none; border: 0; color: var(--dim); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline dotted; }
.lab-link-btn:hover { color: var(--accent); }

.lab-body { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.lab-side { display: grid; gap: 16px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; min-width: 0; }
.lab-side > * { min-width: 0; }
.lab-picker, .lab-scenario { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; position: relative; }
.lab-picker .hud-label { margin: 0 0 8px; }
.lab-free-label { margin-top: 14px !important; }
.lab-group { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin: 10px 0 4px; display: flex; align-items: center; gap: 8px; }
.lab-group .belt-dot { width: 8px; height: 8px; }
.lab-picker button, .lab-free button { display: flex; width: 100%; align-items: center; gap: 10px; text-align: left; background: rgba(255,255,255,.02); border: 1px solid var(--line); color: var(--text, #e6edf7); border-radius: 10px; padding: 8px 10px; margin: 0 0 6px; font: inherit; font-size: 13.5px; cursor: pointer; transition: border-color .2s, background .2s; }
.lab-picker button:hover, .lab-free button:hover { border-color: var(--line-hi); background: rgba(var(--accent-rgb), .06); }
.lab-picker button.on, .lab-free button.on { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .35) inset; }
.lab-picker button .k-plat { font-family: var(--mono); font-size: 10px; color: var(--dim); margin-left: auto; white-space: nowrap; }
.lab-picker button .k-done { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-hi); flex: none; display: inline-grid; place-items: center; font-size: 10px; color: transparent; }
.lab-picker button.done .k-done { border-color: var(--lime); background: rgba(var(--lime-rgb), .18); color: var(--lime); }
.lab-free { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lab-free button { margin: 0; justify-content: center; font-size: 12.5px; }

.lab-scenario h2 { font-size: 22px; margin: 2px 0 8px; }
.lab-scenario > p { color: var(--muted, #b8c4d6); font-size: 14px; line-height: 1.55; margin: 0 0 12px; }
.lab-plats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 4px; }
.lab-plats .hud-label { margin: 0 4px 0 0; color: var(--dim); }
.lab-plats button { background: rgba(255,255,255,.03); border: 1px solid var(--line-hi); color: var(--muted); border-radius: 999px; padding: 5px 12px; font: 600 11.5px var(--mono); letter-spacing: .06em; cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.lab-plats button:hover { border-color: var(--accent); color: var(--text); }
.lab-plats button.on { border-color: var(--accent); background: rgba(var(--accent-rgb), .12); color: var(--accent); }
.lab-plats button.done { color: var(--lime); }
.lab-plats button.done.on { border-color: var(--lime); background: rgba(var(--lime-rgb), .1); }
.lab-only { margin: 0; color: var(--dim); font-size: 12.5px; line-height: 1.5; }
.lab-sub { margin: 14px 0 6px !important; color: var(--accent) !important; }
.lab-ex { margin: 0; padding: 10px 12px; background: #04060c; border: 1px solid var(--line); border-radius: 8px; font-family: var(--mono); color: #d9ecff; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.lab-ex code, .st-cmd code { font-size: 12px; }
.lab-how { color: var(--dim); font-size: 12.5px; line-height: 1.5; margin: 0 0 10px; }
/* Steps: numbered instructions, not a checklist of options. The number turns into a tick when the device state shows the step was done. */
.lab-checks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.lab-checks li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--line-hi); border-radius: 10px; background: rgba(255,255,255,.015); transition: border-color .3s, background .3s; }
.lab-checks .st-n { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font: 700 12px var(--mono); color: var(--muted); background: rgba(255,255,255,.05); }
.lab-checks .st-b { min-width: 0; }
.lab-checks .st-t { margin: 1px 0 4px; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--text); }
.lab-checks .st-on, .lab-checks .st-opt { display: inline-block; margin-left: 8px; padding: 1px 7px; border: 1px solid var(--line-hi); border-radius: 999px; font: 600 9.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); vertical-align: 2px; white-space: nowrap; }
.lab-checks .st-opt { color: var(--dim); }
.lab-checks .st-why { margin: 0 0 8px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.lab-checks .st-cmd { margin: 0 0 6px; padding: 8px 10px; background: #04060c; border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; font-family: var(--mono); color: #d9ecff; line-height: 1.55; white-space: pre; }
.lab-checks .st-run { padding: 0; }
.lab-checks li.cur { border-color: rgba(var(--accent-rgb), .5); border-left-color: var(--accent); background: rgba(var(--accent-rgb), .04); }
.lab-checks li.cur .st-n { background: var(--accent); color: #04121a; }
.lab-checks li.ok { border-color: rgba(var(--lime-rgb), .4); border-left-color: var(--lime); background: rgba(var(--lime-rgb), .05); }
.lab-checks li.ok .st-n { background: var(--lime); color: transparent; position: relative; box-shadow: 0 0 10px rgba(var(--lime-rgb), .5); }
.lab-checks li.ok .st-n::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #06110a; font-size: 13px; }
.lab-checks li.ok .st-why, .lab-checks li.ok .st-run { display: none; }
.lab-checks li.ok .st-cmd { opacity: .6; margin-bottom: 0; }
.lab-checks li.warn { border-left-color: var(--gold); }
.lab-checks li .why { display: block; color: var(--gold); font-family: var(--mono); font-size: 11px; margin-top: 4px; }
.lab-checks li .why:empty { display: none; }
/* Diagram status line, mirrored out of the SVG so it can wrap */
.lab .topo .t-status { display: none; }
.lab-status { margin: 6px 0 2px; text-align: center; font: 500 12px/1.5 var(--mono); color: var(--muted); }
.lab-status.up { color: var(--lime); } .lab-status.warn { color: var(--gold); } .lab-status.bad { color: var(--red); }
.lab-status.quiet, .lab-status:empty { display: none; }
.lab-isp { margin: 2px 0; text-align: center; font: 500 12px/1.5 var(--mono); color: var(--muted); }
.lab-isp.up { color: var(--lime); } .lab-isp.bad { color: var(--red); }
.lab-done { border: 1px solid rgba(var(--lime-rgb), .6); background: rgba(var(--lime-rgb), .08); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; }
.lab-done strong { color: var(--lime); }

.lab-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.btn-ghost { background: rgba(255,255,255,.03); border: 1px solid var(--line-hi); color: var(--text, #e6edf7); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: none; transition: border-color .2s, background .2s; }
.btn-ghost:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), .08); }
.lab-hints { display: grid; gap: 6px; }
.lab-hints p { margin: 0; padding: 8px 10px; border-left: 2px solid var(--gold); background: rgba(var(--gold-rgb), .06); border-radius: 0 8px 8px 0; font-size: 13px; line-height: 1.5; }
.lab-ref { margin-top: 10px; }
.lab-ref summary { cursor: pointer; font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.lab-ref .code-block { margin: 8px 0; max-height: 300px; max-width: 100%; overflow: auto; }
.lab-ref .code-block code { font-size: 12px; }

.lab-stage { display: grid; gap: 14px; min-width: 0; }
.lab-pane { display: grid; gap: 14px; min-width: 0; }
.lab-pane .console-diagram, .lab-pane .console-devices { grid-area: auto; }
.lab-pane[hidden] { display: none; }
.lab-pane .console-diagram { padding: 14px 18px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); position: relative; overflow: hidden; }
.lab-pane .console-diagram::before, .lab-pane .console-diagram::after { border-color: rgba(var(--accent-rgb), .55); }
.lab-pane .terminal { margin: 0; }
.lab-pane .term-out { height: 460px; }
.lab-pane .console-devices.pair .term-out { height: 420px; }
.lab-foot { color: var(--dim); font-size: 13px; margin: 4px 2px 0; }

@media (max-width: 1100px) {
  .lab-body { grid-template-columns: 1fr; }
  .lab-side { position: static; max-height: none; overflow: visible; }
  .lab-pane .console-devices.pair { grid-template-columns: 1fr; }
  .lab-pane .term-out, .lab-pane .console-devices.pair .term-out { height: 340px; }
}
