:root {
  --bg: #07101d;
  --surface: #111b2c;
  --surface-2: #17243a;
  --surface-3: #22314a;
  --text: #f4f7fb;
  --muted: #99a9bf;
  --line: rgba(148,163,184,.17);
  --accent: #60a5fa;
  --accent-2: #22d3ee;
  --good: #5ffd75;
  --live: #5ffd75;
  --live-rgb: 95,253,117;
  --bad: #fb7185;
  --warn: #fbbf24;
  --shadow: 0 20px 60px rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: radial-gradient(circle at top, #10203b 0, var(--bg) 38%); color: var(--text); }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
.app-shell { width: min(760px, 100%); margin: 0 auto; padding: 22px 18px 110px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
h1,h2,h3,p { margin-top: 0; }
h1 { font-size: 27px; margin-bottom: 0; letter-spacing: -.03em; }
h2 { font-size: 22px; margin-bottom: 6px; letter-spacing: -.02em; }
.eyebrow { margin-bottom: 6px; font-size: 11px; font-weight: 900; letter-spacing: .13em; color: var(--accent-2); }
.level-pill, .quiet-badge { border: 1px solid rgba(96,165,250,.28); background: rgba(96,165,250,.10); color: #dbeafe; border-radius: 999px; padding: 9px 12px; font-size: 12px; font-weight: 850; }
.quiet-badge { color: var(--muted); border-color: var(--line); background: var(--surface-2); padding: 6px 9px; }
.hero-card, .section-block, .modal-card { background: rgba(17,27,44,.94); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 24px; }
.hero-card { padding: 22px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.hero-copy p:not(.eyebrow) { color: #cbd7e7; line-height: 1.55; margin-bottom: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.meta-chip { border: 1px solid var(--line); background: rgba(255,255,255,.025); padding: 7px 9px; border-radius: 999px; }
.progress-ring { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; align-content: center; gap: 0; background: conic-gradient(var(--accent-2) 0deg, var(--surface-3) 0deg); position: relative; }
.progress-ring::after { content:""; position:absolute; inset:8px; border-radius:50%; background:var(--surface); }
.progress-ring span, .progress-ring small { z-index: 1; }
.progress-ring span { font-weight: 950; font-size: 23px; }
.progress-ring small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.section-block { margin-top: 16px; padding: 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 16px rgba(34,211,238,.8); }
.primary-btn,.secondary-btn,.tertiary-btn { width: 100%; border-radius: 15px; padding: 14px 16px; font-weight: 900; border: 1px solid transparent; }
.primary-btn { color: #06101e; background: linear-gradient(135deg,var(--accent),var(--accent-2)); }
.secondary-btn { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.tertiary-btn { color: #dce8f7; background: transparent; border-color: var(--line); }
.mastery-list,.lesson-list,.level-list { display: grid; gap: 9px; }
.mastery-row,.lesson-row,.role-summary,.level-row { border: 1px solid var(--line); background: var(--surface-2); border-radius: 16px; }
.mastery-row { padding: 13px 14px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.mastery-name,.lesson-row-title { font-weight: 900; }
.mastery-sub,.lesson-row-sub,.role-copy,.level-copy { color: var(--muted); font-size: 12px; line-height: 1.45; }
.mastery-state { font-weight: 900; font-size: 12px; }
.state-demonstrated { color: var(--good); }
.state-learning { color: var(--warn); }
.state-notstarted { color: var(--muted); }
.lesson-row { display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: hidden; }
.lesson-row button { background: transparent; border: 0; color: var(--text); text-align: left; padding: 14px; width: 100%; }
.lesson-row button:disabled { color: #79889e; }
.lesson-lock,.lesson-done { padding-right: 14px; }
.lesson-done { color: var(--good); font-size: 19px; }
.role-summary { padding: 15px; }
.role-title { display:flex; justify-content:space-between; gap:10px; align-items:center; font-weight:900; margin-bottom:7px; }
.role-meter { height: 7px; margin-top: 12px; background: #0b1424; border-radius: 99px; overflow:hidden; }
.role-meter div { height: 100%; background: linear-gradient(90deg,var(--accent),var(--accent-2)); }
.hidden { display:none !important; }
.lesson-view { min-height: calc(100vh - 120px); }
.lesson-header { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; }
.lesson-header-copy h2 { margin-bottom:0; }
.icon-btn { width:44px; height:44px; border:1px solid var(--line); border-radius:14px; background:var(--surface); color:var(--text); font-size:22px; font-weight:900; }
.lesson-progress-track { height:6px; margin:18px 0 22px; border-radius:999px; overflow:hidden; background:var(--surface-3); }
.lesson-progress-track div { height:100%; background:linear-gradient(90deg,var(--accent),var(--accent-2)); transition:width .2s ease; }
.lesson-stage { min-height: 410px; display:flex; align-items:center; }
.lesson-card { width:100%; background:var(--surface); border:1px solid var(--line); border-radius:24px; padding:24px; box-shadow:var(--shadow); }
.step-count { color:var(--muted); font-size:11px; font-weight:900; letter-spacing:.08em; margin-bottom:12px; }
.lesson-card h3 { font-size:26px; line-height:1.18; margin-bottom:14px; }
.lesson-card p { color:#d9e5f3; line-height:1.58; font-size:17px; }
.formula-box,.diagram,.reference-card,.challenge-box { margin-top:18px; padding:17px; border-radius:17px; background:#0a1424; border:1px solid var(--line); }
.formula-box { text-align:center; font-size:24px; font-weight:950; letter-spacing:.02em; }
.diagram { text-align:center; }
.circuit-line { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:8px; font-weight:900; }
.circuit-block { padding:10px 12px; border-radius:11px; border:1px solid rgba(96,165,250,.45); background:rgba(96,165,250,.07); }
.arrow { color:var(--accent-2); font-size:21px; }
.question-title { margin:18px 0 10px; font-size:15px; font-weight:900; }
.answer-grid { display:grid; gap:9px; }
.answer-btn { border:1px solid var(--line); border-radius:14px; background:var(--surface-2); color:var(--text); padding:13px; text-align:left; font-weight:750; line-height:1.35; }
.answer-btn.correct { border-color:rgba(var(--live-rgb),.68); background:rgba(var(--live-rgb),.11); }
.answer-btn.wrong { border-color:rgba(251,113,133,.65); background:rgba(251,113,133,.10); }
.feedback { margin-top:13px; padding:13px 14px; border-radius:14px; line-height:1.45; }
.feedback.good { background:rgba(var(--live-rgb),.10); border:1px solid rgba(var(--live-rgb),.28); }
.feedback.bad { background:rgba(251,113,133,.09); border:1px solid rgba(251,113,133,.26); }
.remediation-btn { margin-top:11px; }
.optional-challenges { margin-top:14px; padding-top:13px; border-top:1px solid var(--line); }
.optional-label { color:var(--muted); font-size:11px; font-weight:900; letter-spacing:.08em; margin-bottom:9px; }
.challenge-actions { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.challenge-btn { border:1px solid var(--line); border-radius:13px; padding:11px; background:#0c1728; color:var(--text); font-weight:850; }
.challenge-btn.hard { border-color:rgba(96,165,250,.32); }
.challenge-btn.tricky { border-color:rgba(251,191,36,.35); }
.challenge-tag { display:inline-block; margin-bottom:8px; font-size:10px; font-weight:950; letter-spacing:.1em; color:var(--warn); }
.reference-card { background:rgba(34,211,238,.055); }
.reference-card strong { display:block; margin-bottom:5px; }
.reference-note { color:var(--muted); font-size:12px; line-height:1.5; }
.lesson-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:17px; }
.tutor-panel { position:fixed; z-index:40; inset:0; background:rgba(2,7,18,.8); display:flex; align-items:flex-end; justify-content:center; padding:14px; }
.tutor-card { width:min(720px,100%); max-height:90vh; overflow:hidden; background:#101a2b; border:1px solid var(--line); border-radius:24px; padding:18px; box-shadow:var(--shadow); display:flex; flex-direction:column; }
.tutor-header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.tutor-status { font-size:11px; color:var(--muted); margin-top:2px; }
.tutor-status.online { color:var(--good); }
.tutor-status.local { color:var(--warn); }
.tutor-messages { min-height:190px; max-height:48vh; overflow-y:auto; padding:12px 0; display:flex; flex-direction:column; gap:9px; }
.message { max-width:91%; padding:12px 14px; border-radius:15px; line-height:1.5; }
.message.tutor { align-self:flex-start; background:var(--surface-2); }
.message.user { align-self:flex-end; background:rgba(96,165,250,.16); border:1px solid rgba(96,165,250,.23); }
.tutor-form { display:grid; grid-template-columns:1fr auto; gap:9px; align-items:end; }
.tutor-form textarea { width:100%; resize:none; border-radius:14px; border:1px solid var(--line); background:#091322; color:var(--text); padding:12px; outline:none; }
.tutor-form .primary-btn { width:auto; }
.prototype-note,.benchmark-disclaimer { color:var(--muted); font-size:11px; line-height:1.45; margin:10px 2px 0; }
.level-card { align-self:center; }
.benchmark-disclaimer { margin:8px 0 14px; }
.level-row { padding:14px; }
.level-row.current { border-color:rgba(34,211,238,.45); }
.level-heading { display:flex; justify-content:space-between; align-items:center; gap:9px; margin-bottom:5px; font-weight:900; }
.level-number { color:var(--accent-2); font-size:11px; }
.bottom-nav { position:fixed; z-index:20; left:50%; transform:translateX(-50%); bottom:max(12px,env(safe-area-inset-bottom)); width:min(724px,calc(100% - 28px)); display:grid; grid-template-columns:repeat(4,1fr); padding:7px; border:1px solid var(--line); border-radius:20px; background:rgba(15,25,42,.93); backdrop-filter:blur(15px); box-shadow:var(--shadow); }
.nav-item { border:0; background:transparent; color:var(--muted); border-radius:14px; padding:8px; display:grid; gap:2px; justify-items:center; }
.nav-item span { font-size:20px; }
.nav-item small { font-size:11px; font-weight:850; }
.nav-item.active { background:var(--surface-3); color:var(--text); }
.modal-card { padding:20px; }
.stat-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-top:14px; }
.stat-card { background:var(--surface-2); border:1px solid var(--line); border-radius:15px; padding:15px; }
.stat-value { font-size:25px; font-weight:950; }
.stat-label { color:var(--muted); font-size:11px; margin-top:3px; }
.experimental-card { margin-top:16px; padding:16px; border-radius:18px; border:1px dashed rgba(34,211,238,.35); background:rgba(34,211,238,.035); }
.experimental-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.experimental-tag { color:var(--accent-2); font-size:10px; font-weight:950; letter-spacing:.1em; }
.chart-wrap { margin-top:13px; background:#091322; border:1px solid var(--line); border-radius:15px; padding:10px; overflow:hidden; }
.chart-wrap svg { display:block; width:100%; height:auto; }
.chart-labels { display:flex; justify-content:space-between; color:var(--muted); font-size:9px; margin-top:5px; }
.event-list { margin-top:11px; display:grid; gap:7px; }
.event-row { display:grid; grid-template-columns:1fr auto; gap:10px; padding:9px 10px; border-radius:12px; background:var(--surface-2); font-size:11px; color:var(--muted); }
.final-history { margin-top:16px; }
.history-row { padding:10px; border-bottom:1px solid var(--line); font-size:12px; display:grid; grid-template-columns:1fr auto; gap:10px; }
.history-result.good { color:var(--good); font-weight:900; }
.history-result.bad { color:var(--bad); font-weight:900; }
.notice { padding:13px 14px; border-radius:14px; background:rgba(251,191,36,.08); border:1px solid rgba(251,191,36,.22); color:#f7e7b2; line-height:1.45; font-size:12px; }
@media (max-width:520px) {
  .app-shell { padding-left:14px; padding-right:14px; }
  .hero-card { grid-template-columns:1fr; }
  .progress-ring { width:78px; height:78px; }
  .lesson-stage { min-height:370px; }
  .lesson-card { padding:20px; }
  .lesson-card h3 { font-size:23px; }
  .lesson-card p { font-size:16px; }
  .lesson-actions,.challenge-actions,.tutor-form { grid-template-columns:1fr; }
  .tutor-form .primary-btn { width:100%; }
}

/* V3 current-level emphasis */
.current-level-banner {
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid rgba(34,211,238,.28);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(22,39,64,.98), rgba(12,24,42,.98));
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}
.current-level-copy h2 { margin: 0; font-size: 25px; }
.current-level-copy > p:not(.eyebrow):not(.next-benchmark) { margin: 9px 0 7px; color: #d3deeb; line-height: 1.5; }
.current-level-title-row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.level-status { border-radius:999px; padding:6px 9px; font-size:10px; font-weight:950; letter-spacing:.08em; border:1px solid var(--line); }
.level-status.achieved { color:#d9ffe0; background:rgba(var(--live-rgb),.11); border-color:rgba(var(--live-rgb),.35); }
.level-status.in-progress { color:#fde7a5; background:rgba(251,191,36,.10); border-color:rgba(251,191,36,.30); }
.next-benchmark { color:var(--accent-2); font-size:12px; font-weight:850; margin:0; }
.level-roadmap-btn { width:auto; min-width:160px; }

/* V3 challenge/practice controls */
.challenge-actions { grid-template-columns:repeat(3,1fr); }
.challenge-btn.practice { border-color:rgba(var(--live-rgb),.32); }
.question-bank-note { margin-top:8px; color:var(--muted); font-size:10px; line-height:1.35; }
.challenge-gate { margin-top:12px; padding:11px 12px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.02); color:var(--muted); font-size:11px; line-height:1.45; }

/* V3 roadmap scrolling and background lock */
body.modal-open { overflow:hidden; }
.level-card { align-self:center; max-height:min(88vh,820px); overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
.level-list { min-height:0; }
.level-row { position:relative; }
.level-row.achieved { border-color:rgba(var(--live-rgb),.42); background:rgba(var(--live-rgb),.055); }
.level-row.current { border-color:rgba(34,211,238,.48); background:rgba(34,211,238,.055); }
.level-row.future { opacity:.82; }
.level-badge { font-size:10px; font-weight:950; border-radius:999px; padding:5px 8px; border:1px solid var(--line); white-space:nowrap; }
.level-badge.achieved { color:var(--good); border-color:rgba(var(--live-rgb),.3); }
.level-badge.current { color:var(--accent-2); border-color:rgba(34,211,238,.3); }
.level-badge.future { color:var(--muted); }
.level-heading-right { display:flex; gap:7px; align-items:center; }
.level-requirements { margin-top:8px; color:#b9c8da; font-size:11px; line-height:1.45; }

/* V3 instructional micro-steps */
.micro-list { display:grid; gap:8px; margin-top:16px; }
.micro-step { padding:11px 12px; border-radius:13px; border:1px solid var(--line); background:#0b1627; color:#dbe7f4; line-height:1.48; }
.micro-step strong { color:var(--text); }
.concept-callout { margin-top:16px; padding:14px; border-left:3px solid var(--accent-2); border-radius:10px; background:rgba(34,211,238,.055); color:#dbe7f4; line-height:1.5; }

@media (max-width:520px) {
  .current-level-banner { grid-template-columns:1fr; }
  .level-roadmap-btn { width:100%; }
  .challenge-actions { grid-template-columns:1fr; }
}


/* V5 overrides: shorter slides, deterministic diagrams, scripted help, history */
.topbar .eyebrow{letter-spacing:.13em}.current-level-banner{border-width:2px}.current-level-copy h2{font-size:clamp(27px,4vw,36px)}
.lesson-stage{max-width:760px;margin:0 auto;width:100%}.lesson-card{min-height:300px;display:flex;flex-direction:column;justify-content:center;padding:clamp(22px,4vw,34px)}
.lesson-card h3{font-size:clamp(24px,4vw,32px);margin:5px 0 14px}.lesson-copy{font-size:clamp(17px,2.8vw,20px);line-height:1.6;max-width:680px;margin:0}
.slide-kicker{font-size:11px;letter-spacing:.14em;font-weight:800;color:var(--accent-2);text-transform:uppercase;margin-bottom:5px}
.micro-list,.step-count{display:none!important}.concept-callout-card{border-color:rgba(var(--live-rgb),.36)}
.lesson-actions{grid-template-columns:1fr}.help-top-btn{border:1px solid var(--line);background:var(--surface-2);color:var(--text);border-radius:999px;padding:9px 14px;font-weight:800;cursor:pointer}
.diagram-toggle{align-self:flex-start;margin-top:18px;border:1px solid var(--line);background:transparent;color:var(--accent-2);border-radius:10px;padding:9px 12px;font-weight:800;cursor:pointer}
.diagram-wrap{margin-top:14px;border:1px solid var(--line);background:rgba(5,12,25,.5);border-radius:16px;padding:12px}.lesson-svg{width:100%;height:auto;display:block;max-height:270px}
.lesson-svg .wire{stroke:#d8e5f3;stroke-width:4;stroke-linecap:round}.lesson-svg .component{fill:#16243a;stroke:#7dd3fc;stroke-width:2}.lesson-svg .meter{fill:#16243a;stroke:var(--live);stroke-width:3}.lesson-svg .node{fill:var(--live)}.lesson-svg .svg-text{fill:#edf6ff;font-size:17px;font-weight:700}.lesson-svg .svg-label{fill:#c8d8e8;font-size:16px;font-weight:800}.lesson-svg .svg-note{fill:var(--live);font-size:15px;font-weight:700}.lesson-svg .probe-red{stroke:#ef9a9a;stroke-width:4}.lesson-svg .probe-black{stroke:#a9b7c6;stroke-width:4}
.overlay-panel{position:fixed;z-index:50;inset:0;background:rgba(2,7,18,.82);display:flex;align-items:center;justify-content:center;padding:14px;overscroll-behavior:contain}.overlay-card{width:min(720px,100%);max-height:min(90vh,820px);background:#101a2b;border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden}.overlay-header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;padding:18px 18px 10px}.overlay-header h2{margin:3px 0 0}.help-body{padding:8px 18px 14px;overflow-y:auto;min-height:180px}.help-nav{display:flex;gap:9px;flex-wrap:wrap;padding:14px 18px 18px;border-top:1px solid var(--line);background:#0d1727}.help-nav button{flex:1 1 150px}.help-choice-grid{display:grid;gap:10px}.help-choice-grid button{width:100%;text-align:left;border:1px solid var(--line);background:#142139;color:var(--text);padding:15px;border-radius:14px;font-weight:800;cursor:pointer}.help-choice-grid button:hover{border-color:var(--accent-2)}.help-slide-text{font-size:19px;line-height:1.65;padding:18px 2px}.level-card{overflow:hidden!important}.benchmark-disclaimer{padding:0 18px 10px}.level-list{overflow-y:auto;min-height:0;max-height:65vh;padding:0 18px 18px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.retry-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:12px}.retry-actions button{flex:1 1 190px}
.final-history{margin-top:22px}.history-item{border:1px solid var(--line);border-radius:14px;background:#101a2b;margin:9px 0;overflow:hidden}.history-item summary{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:14px;cursor:pointer;list-style:none}.history-item summary::-webkit-details-marker{display:none}.history-item summary small{display:block;color:var(--muted);margin-top:4px}.history-detail{border-top:1px solid var(--line);padding:14px}.history-question{font-size:17px;font-weight:800;line-height:1.45;margin-bottom:12px}.history-options{display:grid;gap:7px}.history-option{display:flex;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;color:#d8e5f3}.history-option span:last-child{font-size:12px;font-weight:800;color:var(--muted);white-space:nowrap}.history-option.correct-option{border-color:rgba(var(--live-rgb),.55);background:rgba(var(--live-rgb),.08)}.history-option.selected-option:not(.correct-option){border-color:rgba(248,113,113,.55);background:rgba(248,113,113,.07)}.history-why{margin-top:12px;line-height:1.5;color:#cfdaea}.history-resolved{margin-top:10px;padding:10px;border-radius:10px;background:rgba(var(--live-rgb),.08);color:#e8fff0;font-weight:700}.history-result{font-size:11px;font-weight:900;letter-spacing:.08em}.history-result.good{color:var(--live)}.history-result.bad{color:#f5a3a3}
.chart-grid{stroke:rgba(148,163,184,.25)}.chart-line{fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.chart-point{fill:currentColor}
body.modal-open{overflow:hidden!important;touch-action:none}.overlay-card,.level-list,.help-body{touch-action:pan-y}
@media(max-width:640px){.lesson-card{min-height:280px}.current-level-copy h2{font-size:27px}.history-item summary{align-items:flex-start}.history-option{flex-direction:column;gap:3px}.history-option span:last-child{white-space:normal}}

/* V5: concise instruction, explicit meter diagrams, save/resume */
.lesson-card{min-height:260px}
.lesson-header-actions{display:flex;align-items:center;gap:8px}
.save-exit-btn{border:1px solid rgba(var(--live-rgb),.34);background:rgba(var(--live-rgb),.08);color:#e8fff0;border-radius:999px;padding:9px 14px;font-weight:850;cursor:pointer;white-space:nowrap}
.save-exit-btn:hover{border-color:rgba(var(--live-rgb),.7)}
.lesson-svg{max-height:340px}
.lesson-svg .meter-body{fill:#17243a;stroke:#8ecdf7;stroke-width:3}
.lesson-svg .meter-screen{fill:#07101d;stroke:var(--live);stroke-width:2}
.lesson-svg .meter-readout{fill:#f4f7fb;font-size:20px;font-weight:900}
.lesson-svg .meter-readout.small{font-size:16px}
.lesson-svg .meter-port-red{fill:#ef9a9a;stroke:#ffd0d0;stroke-width:2}
.lesson-svg .meter-port-black{fill:#7f8ea1;stroke:#d8e5f3;stroke-width:2}
.lesson-svg .probe-red{stroke:#ef9a9a;stroke-width:5;stroke-linecap:round}
.lesson-svg .probe-black{stroke:#a9b7c6;stroke-width:5;stroke-linecap:round}
.lesson-svg .arrow-fill{fill:var(--live)}
.lesson-svg .svg-caption{fill:#c8d8e8;font-size:14px;font-weight:700}
.diagram-wrap{padding:14px;overflow:hidden}
.reference-note{font-size:13px}
@media(max-width:640px){
  .lesson-header{grid-template-columns:auto 1fr;align-items:center}
  .lesson-header-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;width:100%}
  .save-exit-btn,.help-top-btn{width:100%;border-radius:12px}
  .lesson-svg .svg-note{font-size:13px}.lesson-svg .svg-caption{font-size:12px}.lesson-svg .svg-label{font-size:14px}.lesson-svg .svg-text{font-size:15px}
}


/* V6: roadmap drawer, learning help, back navigation, and richer instructional visuals */
.lesson-actions{grid-template-columns:minmax(140px,.42fr) 1fr;align-items:stretch}
.lesson-support-row{margin-top:14px}
.course-help-btn{width:100%;display:flex;align-items:center;gap:12px;text-align:left;border:1px solid rgba(34,211,238,.28);background:linear-gradient(135deg,rgba(34,211,238,.07),rgba(96,165,250,.06));color:var(--text);border-radius:16px;padding:13px 15px;cursor:pointer}
.course-help-btn:hover{border-color:rgba(34,211,238,.62);background:linear-gradient(135deg,rgba(34,211,238,.11),rgba(96,165,250,.09))}
.course-help-btn.hidden{display:none!important}.course-help-icon{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;background:rgba(34,211,238,.12);border:1px solid rgba(34,211,238,.38);color:var(--accent-2);font-weight:950;font-size:18px}.course-help-btn strong{display:block;font-size:14px}.course-help-btn small{display:block;color:var(--muted);font-size:11px;margin-top:2px;font-weight:600}.lesson-back-btn{height:100%}
.roadmap-panel{align-items:stretch!important;justify-content:flex-end!important;padding:0!important;background:rgba(2,7,18,.72)!important}
.roadmap-drawer{width:min(570px,94vw)!important;height:100vh!important;max-height:100vh!important;border-radius:28px 0 0 28px!important;border-right:0!important;align-self:stretch!important;background:linear-gradient(180deg,#101d31 0%,#0b1526 100%)!important;box-shadow:-24px 0 70px rgba(0,0,0,.38)!important}
.roadmap-drawer .overlay-header{padding:24px 24px 10px}.roadmap-drawer .benchmark-disclaimer{padding:0 24px 14px}.roadmap-drawer .level-list{max-height:none!important;flex:1;padding:0 24px 28px!important}
.roadmap-summary{border:1px solid rgba(34,211,238,.28);background:linear-gradient(145deg,rgba(34,211,238,.08),rgba(96,165,250,.07));border-radius:18px;padding:16px 17px;margin-bottom:18px}.roadmap-summary-label{display:block;color:var(--accent-2);font-size:10px;font-weight:900;letter-spacing:.12em;margin-bottom:6px}.roadmap-summary strong{display:block;font-size:23px;line-height:1.15}.roadmap-summary small{display:inline-block;margin-top:8px;color:#fde7a5;font-size:10px;font-weight:900;letter-spacing:.08em;border:1px solid rgba(251,191,36,.3);background:rgba(251,191,36,.08);padding:5px 8px;border-radius:999px}
.roadmap-timeline{position:relative;display:grid;gap:14px} .roadmap-timeline::before{content:none}.roadmap-node:not(:last-child)::after{content:"";position:absolute;left:18px;top:38px;bottom:-14px;width:2px;background:#4c7490}
.roadmap-node{display:grid;grid-template-columns:38px 1fr;gap:12px;position:relative}.roadmap-marker{z-index:1;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;font-weight:950;background:#101b2d;border:2px solid var(--line);color:var(--muted)}.roadmap-node.achieved .roadmap-marker{background:rgba(var(--live-rgb),.13);border-color:rgba(var(--live-rgb),.7);color:var(--good)}.roadmap-node.current .roadmap-marker{background:rgba(34,211,238,.13);border-color:rgba(34,211,238,.7);color:var(--accent-2);box-shadow:0 0 20px rgba(34,211,238,.16)}.roadmap-card{border:1px solid var(--line);background:rgba(23,36,58,.82);border-radius:18px;padding:15px 16px}.roadmap-node.achieved .roadmap-card{border-color:rgba(var(--live-rgb),.32);background:linear-gradient(145deg,rgba(var(--live-rgb),.055),rgba(23,36,58,.82))}.roadmap-node.current .roadmap-card{border-color:rgba(34,211,238,.42);background:linear-gradient(145deg,rgba(34,211,238,.06),rgba(23,36,58,.88))}.roadmap-node.future .roadmap-card{opacity:.78}.roadmap-meter{height:6px;background:#08111f;border-radius:999px;overflow:hidden;margin-top:12px}.roadmap-meter>div{height:100%;background:linear-gradient(90deg,var(--accent),var(--accent-2));border-radius:999px}.roadmap-node.achieved .roadmap-meter>div{background:linear-gradient(90deg,var(--live),var(--live))}
.lesson-svg .flow-arrow{stroke:var(--live);stroke-width:5;stroke-linecap:round;fill:none;marker-end:url(#arrowHead)}.lesson-svg .muted-wire{stroke:#65758b;stroke-width:3;stroke-linecap:round}.lesson-svg .calc-box{fill:#0b1627;stroke:var(--live);stroke-width:2}.lesson-svg .calc-arrow{fill:var(--live)}.lesson-svg .highlight-component{fill:#17324b;stroke:#22d3ee;stroke-width:3}.lesson-svg .dim-component{fill:#121f33;stroke:#60738a;stroke-width:2}.lesson-svg .svg-subtle{fill:#8fa0b6;font-size:13px;font-weight:650}
@media(max-width:640px){.lesson-actions{grid-template-columns:1fr 1.35fr}.course-help-btn small{font-size:10px}.roadmap-drawer{width:100vw!important;border-radius:0!important}.roadmap-drawer .overlay-header{padding:18px 18px 8px}.roadmap-drawer .benchmark-disclaimer{padding:0 18px 12px}.roadmap-drawer .level-list{padding:0 18px 22px!important}}

@media(max-width:640px){.lesson-header-actions{grid-template-columns:1fr!important}}


/* V7 refinements ----------------------------------------------------------- */
.topbar{justify-content:flex-start}
.formula-inline{white-space:nowrap;display:inline-block}
.lesson-stage{min-height:0!important;align-items:stretch!important;margin-bottom:0!important}
.lesson-card{min-height:0!important;justify-content:flex-start!important}
.lesson-actions{margin-top:12px!important}
.lesson-support-row{margin-top:10px!important}
.course-help-btn{width:100%;text-align:left}
/* Themed scrollbar for the roadmap drawer instead of the native gray bar. */
.roadmap-drawer .level-list{scrollbar-width:thin;scrollbar-color:#22d3ee #081321;overscroll-behavior:contain}
.roadmap-drawer .level-list::-webkit-scrollbar{width:10px}
.roadmap-drawer .level-list::-webkit-scrollbar-track{background:#081321;border-radius:999px;margin:8px 0}
.roadmap-drawer .level-list::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#60a5fa,#22d3ee);border:2px solid #081321;border-radius:999px}
.roadmap-drawer .level-list::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#7bb7ff,#56e5f6)}
.lesson-card h3{overflow-wrap:normal;word-break:normal}
/* V7 diagram primitives */
.control-link{stroke:#7dd3fc;stroke-width:4}
.clamp-jaw{stroke:#60a5fa;stroke-width:12;stroke-linecap:round}
.short-path{stroke:#fb7185;stroke-width:6;stroke-linecap:round;stroke-linejoin:round}
.dc-line{stroke:#60a5fa;stroke-width:5;stroke-linecap:round}
.ac-line{stroke:#22d3ee;stroke-width:5;stroke-linecap:round}
.rms-line{stroke:#fbbf24;stroke-width:3;stroke-dasharray:8 7}
.cycle-bracket{stroke:#fbbf24;stroke-width:3}
.trace-wire{stroke:var(--live);stroke-width:6;stroke-linecap:round;stroke-linejoin:round}
.muted-wire{stroke:#64748b;stroke-width:5;stroke-linecap:round}
.active-component{fill:rgba(var(--live-rgb),.14);stroke:var(--live);stroke-width:3}
.motor-circle{fill:#111b2c;stroke:#60a5fa;stroke-width:4}
@media(max-width:640px){.roadmap-drawer .level-list::-webkit-scrollbar{width:7px}.lesson-card h3{font-size:clamp(22px,6vw,28px)}}

/* V8: level-focused curriculum and isolated reviewer mode ------------------ */
.reviewer-entry-card{margin-top:20px;border:1px solid rgba(34,211,238,.28);background:linear-gradient(145deg,rgba(34,211,238,.055),rgba(96,165,250,.045));border-radius:18px;padding:18px}
.reviewer-entry-card h3{margin:4px 0 7px;font-size:21px}.reviewer-entry-card p:not(.eyebrow){margin:0 0 14px;color:var(--muted);line-height:1.55}
.reviewer-shell{display:grid;gap:16px}.reviewer-banner{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;border:1px solid rgba(251,191,36,.34);background:linear-gradient(145deg,rgba(251,191,36,.07),rgba(34,211,238,.045));border-radius:20px;padding:18px}
.reviewer-banner h2{margin:4px 0 8px}.reviewer-banner p:not(.eyebrow){margin:0;color:#c8d5e5;line-height:1.55;max-width:700px}.reviewer-badge{white-space:nowrap;border:1px solid rgba(251,191,36,.45);background:rgba(251,191,36,.1);color:#fde7a5;border-radius:999px;padding:7px 10px;font-size:10px;font-weight:950;letter-spacing:.1em}
.reviewer-level-card{border:1px solid var(--line);background:var(--surface-1);border-radius:20px;padding:18px}.reviewer-level-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:14px}.reviewer-level-head h3{margin:4px 0 6px;font-size:23px}.reviewer-level-head p:not(.eyebrow){margin:0;color:var(--muted);line-height:1.45}.reviewer-level-head>span{color:var(--accent-2);font-size:11px;font-weight:900;white-space:nowrap;border:1px solid rgba(34,211,238,.28);border-radius:999px;padding:6px 9px}
.reviewer-course-row button{cursor:pointer}.reviewer-active .lesson-header{border-color:rgba(251,191,36,.3)}.reviewer-active #lessonModule{color:#fde7a5}.reviewer-active .lesson-progress-track>div{background:linear-gradient(90deg,#fbbf24,#22d3ee)}
@media(max-width:640px){.reviewer-banner,.reviewer-level-head{flex-direction:column}.reviewer-badge{align-self:flex-start}.reviewer-level-card{padding:14px}}
/* V9 instructional graphic standardization */
.lesson-svg .meter-brand{fill:#8fa0b6;font-size:10px;font-weight:800;letter-spacing:.08em}
.lesson-svg .meter-knob{fill:#0b1627;stroke:#7dd3fc;stroke-width:3}
.lesson-svg .meter-mode{fill:#edf6ff;font-size:17px;font-weight:900}
.lesson-svg .meter-port-label{fill:#90a1b7;font-size:10px;font-weight:800}
.lesson-svg .probe-point{fill:#07101d;stroke:#d8e5f3;stroke-width:2}
.lesson-svg .probe-tip-red{fill:#ef9a9a}.lesson-svg .probe-tip-black{fill:#a9b7c6}
.lesson-svg .resistor-zigzag{stroke:#7dd3fc;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}
.lesson-svg .energized-wire{stroke:var(--live);stroke-width:5;stroke-linecap:round;fill:none}
.lesson-svg .current-path{stroke:var(--live);stroke-width:5;stroke-linecap:round;fill:none}
.lesson-svg .warning-box{fill:#231c14;stroke:#fbbf24;stroke-width:2}
.lesson-svg .flow-dot{fill:#102b3c;stroke:#22d3ee;stroke-width:3}.lesson-svg .flow-dot-text{fill:#f4f7fb;font-size:15px;font-weight:900}
.lesson-svg .clamp-gap{stroke:#07101d;stroke-width:7;stroke-linecap:round}
.lesson-svg .axis-line{stroke:#415269;stroke-width:2}.lesson-svg .ac-wave{stroke:#22d3ee;stroke-width:5;stroke-linecap:round;fill:none}
.lesson-svg .coil-body{fill:#17243a;stroke:#7dd3fc;stroke-width:2}.lesson-svg .coil-body.coil-on{fill:rgba(var(--live-rgb),.12);stroke:var(--live);stroke-width:3}
.lesson-svg .coil-winding{stroke:#8ecdf7;stroke-width:3;fill:none}.lesson-svg .coil-winding.energized{stroke:var(--live);stroke-width:4}
.lesson-svg .magnetic-field{stroke:#22d3ee;stroke-width:3;fill:none;stroke-dasharray:8 6}
.lesson-svg .armature{fill:#25354a;stroke:#c8d8e8;stroke-width:2}.lesson-svg .spring-line{stroke:#fbbf24;stroke-width:3}
.lesson-svg .motion-arrow{stroke:var(--live);stroke-width:5;stroke-linecap:round}.lesson-svg .motion-arrow.reverse{stroke:#8fa0b6}
.lesson-svg .mechanical-link{stroke:#8ecdf7;stroke-width:5;stroke-linecap:round;fill:none}.lesson-svg .mechanical-link.active{stroke:var(--live)}
.lesson-svg .contact-node{fill:var(--live);stroke:#e8fff0;stroke-width:1.5}.lesson-svg .contact-arm{stroke:#d8e5f3;stroke-width:5;stroke-linecap:round}.lesson-svg .contact-arm.contact-closed{stroke:var(--live)}
.lesson-svg .state-text{fill:#a7b7ca;font-size:14px;font-weight:800}.lesson-svg .energized-text{fill:var(--live)}
.lesson-svg .panel-outline{fill:#091423;stroke:#22d3ee;stroke-width:2}.lesson-svg .din-rail{fill:#415269;stroke:#64748b;stroke-width:2}
.lesson-svg .panel-device{fill:#17243a;stroke:#7dd3fc;stroke-width:2}.lesson-svg .wire-duct{fill:#111d2f;stroke:#52657d;stroke-width:2}
.motor-circle{fill:#17243a;stroke:#60a5fa;stroke-width:4}
@media (max-width:700px){.lesson-svg .meter-brand{font-size:9px}.lesson-svg .state-text{font-size:12px}}

/* V10 relay/meter mechanism refinements */
.lesson-svg .field-halo{fill:rgba(34,211,238,.08);stroke:#22d3ee;stroke-width:3}
.lesson-svg .armature-active{fill:rgba(var(--live-rgb),.14);stroke:var(--live);stroke-width:3}
.lesson-svg .mechanical-bar{stroke:#8fa0b6;stroke-width:7;stroke-linecap:round;fill:none}
.lesson-svg .mechanical-bar.active{stroke:var(--live)}
.lesson-svg .contact-carrier{fill:#25354a;stroke:#c8d8e8;stroke-width:2}
.lesson-svg .contact-carrier.active{fill:rgba(var(--live-rgb),.14);stroke:var(--live);stroke-width:3}
.lesson-svg .frame-anchor{stroke:#8fa0b6;stroke-width:6;stroke-linecap:round}

/* V13 diagram semantics and QA standard ------------------------------------
   Green is reserved for live / energized electrical state inside lesson
   diagrams. Cyan is explanatory/diagram UI. Neutral white-gray means 0 V,
   de-energized, or a non-live reference path. */
.lesson-svg .svg-note{fill:var(--accent-2)}
.lesson-svg .live-label{fill:var(--live);font-size:15px;font-weight:800}
.lesson-svg .meter{fill:#16243a;stroke:#7dd3fc;stroke-width:3}
.lesson-svg .meter-screen{fill:#07101d;stroke:#7dd3fc;stroke-width:2}
.lesson-svg .node{fill:#d8e5f3;stroke:#eef6ff;stroke-width:1.5}
.lesson-svg .live-node{fill:var(--live);stroke:#e8fff0;stroke-width:1.5}
.lesson-svg .calc-box{fill:#0b1627;stroke:#22d3ee;stroke-width:2}
.lesson-svg .calc-arrow{fill:#22d3ee}
.lesson-svg .arrow-fill{fill:#22d3ee}
.lesson-svg .flow-arrow{stroke:#22d3ee;stroke-width:5;stroke-linecap:round;fill:none;marker-end:url(#arrowHead)}
.trace-wire{stroke:#22d3ee;stroke-width:6;stroke-linecap:round;stroke-linejoin:round}
.lesson-svg .contact-node{fill:#d8e5f3;stroke:#eef6ff;stroke-width:1.5}
.lesson-svg .contact-node.live-node{fill:var(--live);stroke:#e8fff0;stroke-width:1.5}
.lesson-svg .contact-arm{stroke:#d8e5f3;stroke-width:5;stroke-linecap:round}
.lesson-svg .contact-arm.contact-closed{stroke:#d8e5f3}
.lesson-svg .contact-arm.live-contact{stroke:var(--live)}
.lesson-svg .voltage-live{stroke:var(--live);stroke-width:5;stroke-linecap:round;fill:none}
.lesson-svg .zero-wire{stroke:#d8e5f3;stroke-width:4;stroke-linecap:round;fill:none}
.lesson-svg .current-arrow{fill:#22d3ee}
.lesson-svg .neutral-note{fill:#8fa0b6;font-size:14px;font-weight:700}
.lesson-svg .warning-path{stroke:#fb7185;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;fill:none}
.lesson-svg .clamp-jaw-upper,.lesson-svg .clamp-jaw-lower{stroke:#60a5fa;stroke-width:13;stroke-linecap:round;fill:none}
.lesson-svg .motor-body{fill:#17243a;stroke:#d8e5f3;stroke-width:3}
.lesson-svg .motor-terminal{fill:#17243a;stroke:#d8e5f3;stroke-width:3}
.lesson-svg .phase-live{stroke:var(--live);stroke-width:5;stroke-linecap:round;fill:none}

/* V13.1 clamp-meter depth/occlusion standard */
.lesson-svg .clamp-jaw-rear{stroke:#ef4444;stroke-width:24;stroke-linecap:round;fill:none}
.lesson-svg .clamp-jaw-front{stroke:#ff4d57;stroke-width:24;stroke-linecap:round;fill:none}
.lesson-svg .clamp-hinge{fill:#60a5fa;stroke:#07101d;stroke-width:3}
.lesson-svg .clamp-trigger{fill:#ef4444;stroke:#07101d;stroke-width:4;stroke-linejoin:round}
.lesson-svg .clamp-conductor{stroke-width:9}

/* V13.2 approved clamp-meter artwork */
.approved-diagram-image{display:block;width:100%;height:auto;max-height:440px;object-fit:contain;border-radius:12px}

/* V15 clean app exit */
.app-exit-btn{border:1px solid rgba(var(--live-rgb),.34);background:rgba(var(--live-rgb),.07);color:#e8fff0;border-radius:999px;padding:9px 14px;font-weight:850;cursor:pointer;white-space:nowrap}.app-exit-btn:hover{border-color:rgba(var(--live-rgb),.7)}
.app-closed-card{max-width:620px;margin:12vh auto 0;text-align:center}.app-closed-card p{color:var(--muted);line-height:1.6}
.topbar{justify-content:space-between;flex-wrap:wrap}


/* V16.1 lab validation build: level-gated interactive Challenge Lab */
body.lab-active .app-shell{width:min(1120px,100%)}
.lab-lobby{padding:24px}.lab-lobby-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:18px}.lab-lobby-head>div{max-width:720px}.lab-lobby-head p:not(.eyebrow){color:#cbd7e7;line-height:1.55}.lab-tier-card{margin-top:12px;padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--surface-2)}.lab-tier-card.unlocked{border-color:rgba(var(--live-rgb),.32)}.lab-tier-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.lab-tier-head h3{margin:2px 0 7px}.lab-tier-head p:not(.eyebrow){color:var(--muted);line-height:1.45;margin-bottom:14px}.lab-tier-status{font-size:10px;font-weight:950;letter-spacing:.09em;border:1px solid var(--line);padding:6px 9px;border-radius:999px;color:var(--muted);white-space:nowrap}.lab-tier-card.unlocked .lab-tier-status{color:var(--good);border-color:rgba(var(--live-rgb),.35)}.lab-tier-start{margin-top:4px}.lab-future-note,.lab-design-note{color:var(--muted);font-size:12px;line-height:1.5}.lab-design-note{margin-top:18px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#0b1627}.reviewer-lab-card{margin-top:16px;padding:18px}.reviewer-lab-card .secondary-btn{margin-top:12px}
.lab-shell{display:grid;gap:14px}.lab-top{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;background:rgba(17,27,44,.94);border:1px solid var(--line);border-radius:22px;padding:20px}.lab-top>div{max-width:780px}.lab-top p:not(.eyebrow){color:#cbd7e7;line-height:1.5;margin-bottom:0}.lab-exit-btn{width:auto;min-width:145px}.lab-status-row{display:flex;flex-wrap:wrap;gap:8px}.lab-pill{border:1px solid var(--line);border-radius:999px;padding:7px 10px;background:var(--surface-2);font-size:10px;font-weight:950;letter-spacing:.06em;color:#d5dfeb}.lab-pill.on{color:var(--good);border-color:rgba(var(--live-rgb),.35);background:rgba(var(--live-rgb),.07)}.lab-pill.trip{color:#fda4af;border-color:rgba(251,113,133,.4);background:rgba(251,113,133,.07)}
.lab-grid{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(290px,.8fr);gap:14px}.lab-board-card,.lab-tools,.lab-evidence,.lab-diagnosis{background:rgba(17,27,44,.94);border:1px solid var(--line);border-radius:20px}.lab-board-card{padding:12px;min-width:0}.lab-board-help{color:var(--muted);font-size:11px;line-height:1.45;padding:5px 8px 4px}.lab-schematic{width:100%;height:auto;display:block;max-height:570px;background:#091321;border-radius:15px;border:1px solid rgba(148,163,184,.13)}.lab-live{stroke:var(--live);stroke-width:7;stroke-linecap:round}.lab-dead{stroke:#6f8198;stroke-width:7;stroke-linecap:round}.lab-neutral{stroke:#a9b7c6;stroke-width:6;stroke-linecap:round}.lab-breaker-closed{fill:rgba(var(--live-rgb),.08);stroke:var(--live);stroke-width:3}.lab-breaker-trip{fill:rgba(251,113,133,.08);stroke:#fb7185;stroke-width:3}.lab-load{fill:#17243a;stroke:#7dd3fc;stroke-width:2}.lab-svg-title{fill:#eef7ff;font-size:18px;font-weight:900}.lab-svg-label{fill:#eef7ff;font-size:15px;font-weight:850}.lab-svg-sub{fill:#9fb0c5;font-size:12px;font-weight:700}.lab-tp-label{fill:#22d3ee;font-size:11px;font-weight:900}.lab-test-point{fill:#07101d;stroke:#22d3ee;stroke-width:4;cursor:pointer}.lab-test-point:hover{stroke:#f4f7fb;stroke-width:6}.lab-clamp-wire{cursor:pointer}.lab-clamp-wire:hover{stroke:#fbbf24}.lab-red-lead{fill:none;stroke:#ef9a9a;stroke-width:5;stroke-linecap:round}.lab-black-lead{fill:none;stroke:#a9b7c6;stroke-width:5;stroke-linecap:round}.lab-red-probe{fill:#ef9a9a}.lab-black-probe{fill:#a9b7c6}
.lab-tools{padding:14px;display:grid;gap:12px;align-content:start}.lab-tool-section{border:1px solid var(--line);border-radius:15px;background:#0b1627;padding:13px}.lab-control-grid,.lab-meter-select,.lab-mode-row,.lab-lead-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.lab-control,.lab-control-on,.lab-branch-controls button,.lab-meter-select button,.lab-mode-row button,.lab-lead-row button{border:1px solid var(--line);border-radius:11px;padding:10px;background:#142139;color:var(--text);font-weight:800}.lab-control-on{border-color:rgba(var(--live-rgb),.45);background:rgba(var(--live-rgb),.08)}.lab-branch-controls{display:grid;gap:7px;margin-top:8px}.lab-branch-controls button.active{border-color:rgba(var(--live-rgb),.4);color:#e8fff0}.lab-meter-select button.selected,.lab-mode-row button.selected{border-color:var(--accent-2);background:rgba(34,211,238,.09)}.lab-lead-row{margin-top:8px}.lab-lead-row button.red.selected{border-color:#ef9a9a}.lab-lead-row button.black.selected{border-color:#a9b7c6}.lab-meter-display{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:30px;font-weight:950;letter-spacing:.03em;text-align:center;color:#ecfff0;background:#06100d;border:2px solid rgba(var(--live-rgb),.55);border-radius:12px;padding:14px;margin:10px 0}.lab-clamp p,.lab-meter-placeholder,.lab-message{color:#cbd7e7;font-size:12px;line-height:1.5}.lab-message{min-height:54px}.lab-bottom-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.lab-evidence,.lab-diagnosis{padding:17px}.lab-evidence ul{margin:8px 0 0;padding-left:20px;color:#d7e4f1;font-size:12px;line-height:1.55}.lab-diagnosis{display:grid;gap:9px}.lab-diagnosis select{width:100%;border:1px solid var(--line);border-radius:12px;background:#0b1627;color:var(--text);padding:12px}.lab-complete{padding:13px;border-radius:13px;border:1px solid rgba(var(--live-rgb),.35);background:rgba(var(--live-rgb),.08);color:#e9ffed;line-height:1.5;font-size:12px}.lab-safety-note{font-size:11px;line-height:1.5;color:var(--muted);padding:13px 15px;border:1px solid var(--line);border-radius:14px;background:#091321}
@media(max-width:850px){.lab-grid,.lab-bottom-grid{grid-template-columns:1fr}.lab-top{flex-direction:column}.lab-exit-btn{width:100%}.lab-lobby-head,.lab-tier-head{flex-direction:column}.lab-schematic{min-height:360px}}


/* V16.1 Challenge Lab refinements */
.lab-validation-card{display:flex;justify-content:space-between;gap:18px;align-items:center;margin:16px 0 20px;padding:18px;border:1px solid rgba(34,211,238,.38);border-radius:18px;background:linear-gradient(135deg,rgba(34,211,238,.08),rgba(17,27,44,.94))}.lab-validation-card>div{max-width:760px}.lab-validation-card h3{margin:3px 0 7px}.lab-validation-card p:not(.eyebrow){margin:0;color:#cbd7e7;line-height:1.5}.lab-validation-card .primary-btn{width:auto;min-width:180px;white-space:nowrap}
.lab-evidence-summary{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:9px 0 12px}.lab-evidence-summary>div{padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#0b1627}.lab-evidence-summary span{display:block;color:var(--muted);font-size:10px;font-weight:850;letter-spacing:.04em;text-transform:uppercase}.lab-evidence-summary strong{display:block;margin-top:4px;font-size:22px;color:#eef7ff}.lab-evidence-cards{display:grid;gap:9px;max-height:390px;overflow:auto;padding-right:3px}.lab-evidence-card{padding:12px;border:1px solid var(--line);border-radius:13px;background:#0b1627}.lab-evidence-card.attention{border-color:rgba(251,191,36,.52);background:rgba(251,191,36,.055)}.lab-evidence-meta{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:9px;font-weight:950;letter-spacing:.08em}.lab-evidence-icon{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:7px;border:1px solid rgba(34,211,238,.36);color:#67e8f9;background:rgba(34,211,238,.07);font-size:11px}.lab-evidence-card.attention .lab-evidence-icon{border-color:rgba(251,191,36,.55);color:#fbbf24;background:rgba(251,191,36,.08)}.lab-evidence-main{display:flex;justify-content:space-between;gap:12px;align-items:baseline;margin-top:7px}.lab-evidence-main strong{font-size:12px;color:#eef7ff}.lab-evidence-main span{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:17px;font-weight:950;color:#dff9ff;white-space:nowrap}.lab-evidence-card p{margin:5px 0 0;color:var(--muted);font-size:10px;line-height:1.4}.lab-evidence-empty{display:grid;gap:5px;padding:15px;border:1px dashed var(--line);border-radius:13px;color:var(--muted);font-size:11px}.lab-evidence-empty strong{color:#d7e4f1}
.lab-calculator-toggle{width:100%;border:1px solid var(--line);border-radius:11px;padding:10px 12px;background:#142139;color:var(--text);font-weight:850}.lab-calculator-toggle.open{border-color:rgba(34,211,238,.38)}.lab-calculator{margin-top:9px}.lab-calc-screen{display:grid;gap:4px;text-align:right;padding:11px 12px;border:1px solid rgba(34,211,238,.25);border-radius:12px;background:#06101d}.lab-calc-screen small{min-height:15px;color:#8ca0b8;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10px;overflow-wrap:anywhere}.lab-calc-screen strong{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:23px;color:#ecfff0;overflow-wrap:anywhere}.lab-calc-utility{display:grid;grid-template-columns:.6fr .6fr 1.8fr;gap:6px;margin:7px 0}.lab-calc-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.lab-calc-grid button,.lab-calc-utility button{border:1px solid var(--line);border-radius:9px;padding:9px 6px;background:#142139;color:#eef7ff;font-weight:850}.lab-calc-grid button:hover,.lab-calc-utility button:hover{border-color:#22d3ee}
.lab-reasoning-card{padding:13px;border:1px solid rgba(34,211,238,.3);border-radius:13px;background:rgba(34,211,238,.045)}.lab-reasoning-card label{display:block;color:#edf8ff;font-size:12px;font-weight:850;line-height:1.45}.lab-current-answer{display:flex;align-items:center;gap:8px;margin-top:9px}.lab-current-answer input{width:150px;border:1px solid var(--line);border-radius:10px;background:#071321;color:#eef7ff;padding:10px 11px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:18px;font-weight:900}.lab-current-answer span{font-weight:950;color:#cbd7e7}.lab-reasoning-card>p:not(.eyebrow){margin:8px 0 0;color:var(--muted);font-size:10px;line-height:1.4}.lab-reasoning-feedback{margin-top:9px;padding:9px 10px;border-radius:9px;background:#111f34;color:#dce8f5;font-size:11px;line-height:1.4}
.lab-alert-backdrop{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:22px;background:rgba(2,8,18,.82);backdrop-filter:blur(5px)}.lab-safety-alert{width:min(540px,100%);padding:25px;border:2px solid #fb7185;border-radius:20px;background:#180d16;box-shadow:0 24px 80px rgba(0,0,0,.55)}.lab-alert-icon{display:grid;place-items:center;width:58px;height:58px;margin-bottom:13px;border:3px solid #fb7185;border-radius:50%;color:#fff1f2;background:rgba(251,113,133,.14);font-size:34px;font-weight:950}.lab-safety-alert .eyebrow{color:#fda4af}.lab-safety-alert h3{margin:4px 0 9px;color:#fff1f2;font-size:25px}.lab-safety-alert>p:not(.eyebrow){color:#ffe4e6;line-height:1.55}.lab-alert-rule{margin:15px 0;padding:11px 12px;border-left:4px solid #fb7185;border-radius:8px;background:rgba(251,113,133,.09);color:#fecdd3;font-size:12px;font-weight:800;line-height:1.45}.lab-alert-ack{width:100%;border:1px solid #fb7185;border-radius:12px;padding:12px 14px;background:#fb7185;color:#19080d;font-weight:950}
@media(max-width:700px){.lab-validation-card{flex-direction:column;align-items:stretch}.lab-validation-card .primary-btn{width:100%}.lab-evidence-summary{grid-template-columns:1fr}.lab-evidence-main{align-items:flex-start;flex-direction:column;gap:4px}}

/* V16.2 Challenge Lab: circuit-state accuracy and evidence-by-load layout */
.lab-grid{grid-template-columns:minmax(0,1.7fr) minmax(300px,.78fr);align-items:start}
.lab-left-column,.lab-right-column{display:grid;gap:14px;align-content:start;min-width:0}
.lab-board-card{align-self:start}
.lab-branch-name{fill:#eef7ff;font-size:13px;font-weight:900;letter-spacing:.035em}
.lab-neutral-label{fill:#9fb0c5;font-size:12px;font-weight:800}
.lab-contact-node{fill:#081321;stroke:#9fb0c5;stroke-width:3}.lab-contact-node.hot{stroke:var(--live);fill:rgba(var(--live-rgb),.10)}
.lab-no-label{fill:#9fb0c5;font-size:10px;font-weight:900;letter-spacing:.08em}
.lab-sticky-lead-note{margin-top:7px;color:#91a4bb;font-size:10px;line-height:1.4}
.lab-evidence{padding:16px}
.lab-circuit-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:9px 0 13px}.lab-circuit-summary>div{padding:10px 11px;border:1px solid var(--line);border-radius:12px;background:#0b1627}.lab-circuit-summary span{display:block;color:var(--muted);font-size:9px;font-weight:850;letter-spacing:.04em;text-transform:uppercase;line-height:1.35}.lab-circuit-summary strong{display:block;margin-top:5px;color:#eef7ff;font-size:17px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.lab-load-evidence-grid{display:grid;gap:10px}.lab-load-evidence-card{border:1px solid var(--line);border-radius:15px;background:#0b1627;overflow:hidden}.lab-load-evidence-head{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:11px 12px;border-bottom:1px solid var(--line);background:#0d1a2c}.lab-load-evidence-head>div{display:flex;align-items:baseline;gap:9px}.lab-load-evidence-head>div>span{color:#22d3ee;font-size:10px;font-weight:950}.lab-load-evidence-head>div>strong{color:#eef7ff;font-size:13px}.lab-load-state{border:1px solid var(--line);border-radius:999px;padding:5px 8px;color:#9fb0c5;font-size:9px;font-weight:950;letter-spacing:.04em;white-space:nowrap}.lab-load-state.on{color:#e7ffed;border-color:rgba(var(--live-rgb),.35);background:rgba(var(--live-rgb),.07)}
.lab-condition-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:9px}.lab-condition-panel{padding:9px;border:1px solid rgba(148,163,184,.16);border-radius:11px;background:#091321}.lab-condition-panel.current{border-color:rgba(34,211,238,.36);box-shadow:inset 0 0 0 1px rgba(34,211,238,.05)}.lab-condition-head{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:7px}.lab-condition-head strong{font-size:9px;color:#cbd7e7;letter-spacing:.035em}.lab-condition-head span{font-size:8px;color:#67e8f9;font-weight:950;white-space:nowrap}.lab-evidence-field{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:5px 0;border-top:1px solid rgba(148,163,184,.09)}.lab-evidence-field:first-of-type{border-top:0}.lab-evidence-field span{color:#8fa3ba;font-size:9px}.lab-evidence-field strong{color:#e6f5ff;font-size:11px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;white-space:nowrap}.lab-evidence-field.empty strong{color:#65778c}.lab-evidence-field.problem strong{color:#fda4af}.lab-evidence-field.attention strong{color:#fbbf24}
.lab-history{margin-top:10px;border:1px solid var(--line);border-radius:12px;background:#091321;overflow:hidden}.lab-history summary{cursor:pointer;padding:10px 12px;color:#aebed0;font-size:10px;font-weight:850}.lab-history-list{display:grid;gap:6px;padding:0 9px 9px}.lab-history-row{display:grid;grid-template-columns:1fr auto;gap:3px 10px;padding:8px;border-radius:9px;background:#0d1a2c}.lab-history-row span{color:#cbd7e7;font-size:9px}.lab-history-row strong{color:#e8f7ff;font-size:10px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.lab-history-row small{grid-column:1/-1;color:#7f93aa;font-size:8px;line-height:1.35}.lab-history-empty{padding:9px;color:#7f93aa;font-size:9px}
.lab-diagnosis{align-self:start}
@media(max-width:980px){.lab-circuit-summary{grid-template-columns:1fr 1fr}.lab-condition-grid{grid-template-columns:1fr}.lab-load-evidence-head{align-items:flex-start;flex-direction:column}}
@media(max-width:850px){.lab-grid{grid-template-columns:1fr}.lab-left-column,.lab-right-column{gap:12px}.lab-schematic{min-height:0}.lab-circuit-summary{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.lab-circuit-summary{grid-template-columns:1fr}.lab-condition-grid{grid-template-columns:1fr}}

/* V16.3 Challenge Lab validation refinements */
.lab-load-evidence-card>summary{list-style:none;cursor:pointer;user-select:none}.lab-load-evidence-card>summary::-webkit-details-marker{display:none}.lab-load-evidence-card:not([open]) .lab-load-evidence-head{border-bottom:0}.lab-load-summary-state{display:flex;align-items:center;gap:8px}.lab-card-chevron{color:#7dd3fc;font-size:15px;font-weight:900;transition:transform .16s ease}.lab-load-evidence-card[open] .lab-card-chevron{transform:rotate(180deg)}
.lab-lead-actions{display:flex;justify-content:flex-end;margin-top:8px}.lab-lead-actions button{border:1px solid var(--line);border-radius:9px;padding:8px 11px;background:#0b1627;color:#dce8f5;font-size:10px;font-weight:850}.lab-lead-actions button:hover:not(:disabled){border-color:#7dd3fc}.lab-lead-actions button:disabled{opacity:.42;cursor:not-allowed}
.lab-thermal-status{margin-top:11px;padding:10px;border:1px solid var(--line);border-radius:12px;background:#091321}.lab-thermal-head{display:flex;justify-content:space-between;gap:8px;align-items:center}.lab-thermal-head>span{color:#8fa3ba;font-size:9px;font-weight:900;letter-spacing:.06em}.lab-thermal-label{font-size:9px;font-weight:950;text-align:right}.lab-thermal-label.cool{color:#91a4bb}.lab-thermal-label.normal{color:#d9fbe2}.lab-thermal-label.heating{color:#fbbf24}.lab-thermal-label.trip{color:#fda4af}.lab-thermal-track{height:8px;margin-top:8px;border-radius:999px;overflow:hidden;background:#17243a;border:1px solid rgba(148,163,184,.12)}.lab-thermal-bar{height:100%;width:0;border-radius:999px;transition:width .2s linear}.lab-thermal-bar.cool,.lab-thermal-bar.normal{background:#64748b}.lab-thermal-bar.heating{background:#fbbf24}.lab-thermal-bar.trip{background:#fb7185}.lab-thermal-status small{display:block;margin-top:7px;color:#7f93aa;font-size:9px;line-height:1.4}
.lab-diagnosis-wide{width:100%;padding:18px}.lab-diagnosis-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:12px}.lab-diagnosis-head h3{margin:2px 0 0;font-size:18px}.lab-diagnosis-state{border:1px solid var(--line);border-radius:999px;padding:6px 9px;color:#aebed0;font-size:9px;font-weight:950;letter-spacing:.06em}.lab-diagnosis-layout{display:grid;grid-template-columns:minmax(220px,1fr) minmax(260px,1.15fr) minmax(220px,1fr);gap:12px;align-items:stretch}.lab-diagnosis-field,.lab-reasoning-placeholder{padding:13px;border:1px solid var(--line);border-radius:13px;background:#0b1627}.lab-diagnosis-field label{display:block;margin-bottom:7px;color:#aebed0;font-size:10px;font-weight:900;letter-spacing:.03em}.lab-diagnosis-field select{height:auto}.lab-reasoning-placeholder{color:#91a4bb;font-size:11px;line-height:1.45}.lab-reasoning-placeholder p{margin:0}.lab-submit-wide{margin-top:12px;width:100%;min-height:46px}.lab-submit-wide:disabled{opacity:.62;cursor:default}
.lab-completion-banner{display:flex;gap:15px;align-items:center;margin-bottom:15px;padding:17px 18px;border:2px solid rgba(var(--live-rgb),.58);border-radius:16px;background:linear-gradient(135deg,rgba(var(--live-rgb),.14),rgba(34,211,238,.07));box-shadow:0 0 0 1px rgba(var(--live-rgb),.08) inset}.lab-completion-icon{display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;border-radius:50%;background:var(--live);color:#06200d;font-size:28px;font-weight:1000}.lab-completion-banner h3{margin:2px 0 5px;font-size:24px;color:#effff3}.lab-completion-banner p{margin:0;color:#d8e9df;line-height:1.5}.lab-completion-banner .eyebrow{color:var(--live)}
@media(max-width:1050px){.lab-diagnosis-layout{grid-template-columns:1fr 1fr}.lab-reasoning-card,.lab-reasoning-placeholder{grid-column:1/-1}}
@media(max-width:700px){.lab-diagnosis-layout{grid-template-columns:1fr}.lab-reasoning-card,.lab-reasoning-placeholder{grid-column:auto}.lab-diagnosis-head{flex-direction:column}.lab-completion-banner{align-items:flex-start}.lab-thermal-head{align-items:flex-start;flex-direction:column}.lab-thermal-label{text-align:left}}


/* V16.4 Challenge Lab measurement-target and completion refinements */
.lab-clamp-zone .lab-clamp-target{stroke:rgba(34,211,238,.18);stroke-width:24;stroke-linecap:round;pointer-events:none;transition:stroke .12s ease,stroke-width .12s ease}
.lab-clamp-zone .lab-clamp-hit{stroke:transparent;stroke-width:42;stroke-linecap:round;cursor:pointer;pointer-events:stroke}
.lab-clamp-zone:hover .lab-clamp-target,.lab-clamp-zone.active .lab-clamp-target{stroke:rgba(251,191,36,.48);stroke-width:28}
.lab-clamp-target-label{fill:#22d3ee;font-size:9px;font-weight:950;letter-spacing:.07em;pointer-events:none}
.lab-clamp-zone:hover .lab-clamp-target-label,.lab-clamp-zone.active .lab-clamp-target-label{fill:#fbbf24}
.lab-meter-overlay-hint{fill:#91a4bb;font-size:12px;font-weight:750}
.lab-completion-banner{align-items:flex-start;padding:22px 24px;border-width:2px;box-shadow:0 0 0 1px rgba(var(--live-rgb),.12) inset,0 12px 34px rgba(0,0,0,.18)}
.lab-completion-icon{flex-basis:58px;width:58px;height:58px;font-size:34px}
.lab-completion-banner h3{font-size:32px;margin:0 0 8px;color:#f1fff4}
.lab-completion-copy>p{font-size:14px;line-height:1.58}
.lab-future-tips{margin-top:14px;padding-top:13px;border-top:1px solid rgba(var(--live-rgb),.28);display:grid;gap:8px;color:#e6fff0}
.lab-future-tips>strong{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:#5ffd75}
.lab-future-tip{padding:10px 12px;border-radius:11px;background:rgba(7,16,29,.46);border:1px solid rgba(148,163,184,.16);color:#d8e5df;font-size:12px;line-height:1.5}
.lab-submit-actions{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:stretch;margin-top:12px}
.lab-submit-actions .lab-submit-wide{margin-top:0}
.lab-restart-btn{min-width:170px}
@media(max-width:700px){.lab-submit-actions{grid-template-columns:1fr}.lab-restart-btn{width:100%}}


/* V16.5 Challenge Lab evidence, calculator, and thermal-memory refinements */
.lab-circuit-summary{display:flex;flex-wrap:wrap;gap:0;margin:8px 0 11px;padding:8px 10px;border:1px solid var(--line);border-radius:12px;background:#0b1627}
.lab-circuit-summary>div{flex:1 1 150px;min-width:130px;padding:4px 10px;border:0;border-left:1px solid rgba(148,163,184,.14);border-radius:0;background:transparent}
.lab-circuit-summary>div:first-child{border-left:0}.lab-circuit-summary span{font-size:8px}.lab-circuit-summary strong{margin-top:2px;font-size:14px}
.lab-load-evidence-head{display:grid;grid-template-columns:1fr auto;gap:7px 12px;align-items:center}.lab-load-evidence-head>div.lab-load-title{display:flex;align-items:center;gap:8px;min-width:0}.lab-load-title>span:first-child{color:#22d3ee;font-size:10px;font-weight:950}.lab-load-title>strong{color:#eef7ff;font-size:13px}.lab-load-compact-summary{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:5px;min-height:18px}.lab-evidence-chip{display:inline-flex;gap:4px;align-items:center;padding:4px 7px;border:1px solid rgba(148,163,184,.15);border-radius:999px;background:#091321;color:#c8d5e4;font-size:9px}.lab-evidence-chip b{color:#8fa3ba;font-weight:850}.lab-load-no-evidence{color:#667a91;font-size:9px;font-style:italic}.lab-new-badge{padding:3px 6px;border-radius:999px;background:rgba(251,191,36,.15);border:1px solid rgba(251,191,36,.5);color:#fbbf24!important;font-size:8px!important;font-weight:950!important;letter-spacing:.06em;animation:labNewPulse 1.4s ease-in-out 2}.lab-load-evidence-card:has(.lab-new-badge){border-color:rgba(251,191,36,.36)}
.lab-evidence-field{position:relative}.lab-evidence-field.new-evidence{margin:2px -5px;padding:6px 5px;border-radius:8px;background:rgba(251,191,36,.13);box-shadow:inset 0 0 0 1px rgba(251,191,36,.38)}.lab-evidence-field.new-evidence strong{color:#fff3bf}.lab-evidence-field em{margin-left:auto;padding:2px 5px;border-radius:999px;background:rgba(251,191,36,.18);color:#fbbf24;font-size:7px;font-style:normal;font-weight:950;letter-spacing:.06em}@keyframes labNewPulse{50%{box-shadow:0 0 0 4px rgba(251,191,36,.07)}}
.lab-calculator-float{position:fixed;right:24px;top:120px;width:min(310px,calc(100vw - 32px));z-index:1200;padding:0 12px 12px;border:1px solid rgba(34,211,238,.42);border-radius:16px;background:#0b1627;box-shadow:0 18px 55px rgba(0,0,0,.5)}.lab-calculator-float-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0 -12px 10px;padding:11px 12px;border-bottom:1px solid var(--line);cursor:move;user-select:none}.lab-calculator-float-head strong{color:#67e8f9;font-size:10px;letter-spacing:.08em}.lab-calculator-float-head button{width:30px;height:30px;border:1px solid var(--line);border-radius:8px;background:#142139;color:#eef7ff;font-size:20px;line-height:1}.lab-calculator-float .lab-calculator{margin-top:0}
.lab-live-status{display:grid;gap:7px}.lab-live-status>div{display:grid;grid-template-columns:92px 1fr;gap:8px;align-items:start;padding:7px 0;border-top:1px solid rgba(148,163,184,.1)}.lab-live-status>div:first-child{border-top:0}.lab-live-status span{color:#8296ad;font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.04em}.lab-live-status strong{color:#dce8f5;font-size:10px;line-height:1.35;overflow-wrap:anywhere}.lab-live-status strong.heating{color:#fbbf24}.lab-live-status strong.trip{color:#fda4af}.lab-live-status strong.normal{color:#d9fbe2}.lab-live-status strong.cool{color:#aebed0}
.lab-submit-feedback{margin-top:12px;padding:11px 13px;border:1px solid rgba(251,191,36,.38);border-radius:12px;background:rgba(251,191,36,.07);color:#f8e8b0;font-size:11px;line-height:1.5}
@media(max-width:700px){.lab-circuit-summary>div{flex-basis:50%}.lab-calculator-float{right:16px;top:88px}.lab-load-evidence-head{grid-template-columns:1fr}.lab-load-summary-state{justify-content:space-between}}


/* V16.6 Challenge Lab orientation and interaction refinements */
.lab-validation-actions,.lab-lobby-actions,.lab-top-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.lab-validation-actions .primary-btn,.lab-validation-actions .secondary-btn{width:auto;min-width:170px}
.lab-lobby-actions{margin-top:14px}
.lab-lobby-actions .secondary-btn{width:auto}
.lab-top-actions{justify-content:flex-end}.lab-top-actions .tertiary-btn,.lab-top-actions .secondary-btn{width:auto;min-width:132px}
.lab-orientation-backdrop{position:fixed;inset:0;z-index:1290;background:rgba(2,8,18,.56);backdrop-filter:blur(1px)}
.lab-orientation-card{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:1310;width:min(720px,calc(100vw - 32px));padding:20px 22px;border:1px solid rgba(34,211,238,.5);border-radius:18px;background:#0b1627;box-shadow:0 24px 70px rgba(0,0,0,.58)}
.lab-orientation-progress{display:flex;justify-content:space-between;gap:12px;align-items:center;color:#22d3ee;font-size:10px;font-weight:950;letter-spacing:.09em}.lab-orientation-progress strong{color:#b7c7d9}.lab-orientation-card h3{margin:8px 0 7px;font-size:22px}.lab-orientation-card p{margin:0;color:#cbd7e7;line-height:1.55}.lab-orientation-actions{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:16px}.lab-orientation-actions>div{display:flex;gap:8px}.lab-orientation-actions button{width:auto;min-width:105px}
.lab-orientation-active .lab-orientation-highlight{position:relative;z-index:1300;outline:3px solid #22d3ee;outline-offset:5px;box-shadow:0 0 0 10px rgba(34,211,238,.12),0 18px 48px rgba(0,0,0,.35);border-radius:16px;pointer-events:none}
@media(max-width:700px){.lab-orientation-card{bottom:12px;padding:16px}.lab-orientation-actions{align-items:stretch;flex-direction:column}.lab-orientation-actions>div{display:grid;grid-template-columns:1fr 1fr;width:100%}.lab-orientation-actions>button{width:100%}.lab-top-actions{width:100%}.lab-top-actions button{flex:1}.lab-validation-actions{width:100%}.lab-validation-actions button{flex:1}}


/* V16.8 orientation: subject-focused spotlighting without floating callout boxes */
.lab-orientation-active .lab-orientation-highlight{position:relative;z-index:1300;outline:2px solid rgba(34,211,238,.72);outline-offset:5px;box-shadow:0 0 0 8px rgba(34,211,238,.08),0 18px 48px rgba(0,0,0,.35);border-radius:16px;pointer-events:none}
.lab-orientation-subject{position:relative;z-index:1305!important;outline:4px solid #facc15!important;outline-offset:5px!important;box-shadow:0 0 0 9px rgba(250,204,21,.18),0 0 28px rgba(250,204,21,.78)!important;animation:labOrientationPulse .9s ease-in-out infinite alternate!important}
button.lab-orientation-subject{filter:none!important;opacity:1!important;background:#15243a!important;color:#fff!important;border-color:#facc15!important}
.lab-test-point.lab-orientation-subject{outline:none!important;fill:#22d3ee!important;stroke:#facc15!important;stroke-width:5!important;filter:drop-shadow(0 0 9px #facc15)}
.lab-clamp-zone.lab-orientation-subject{outline:none!important;box-shadow:none!important}
.lab-clamp-zone.lab-orientation-subject .lab-clamp-target{stroke:#facc15!important;stroke-width:18!important;opacity:.92!important;filter:drop-shadow(0 0 8px #facc15)}
.lab-clamp-zone.lab-orientation-subject .lab-clamp-target-label{fill:#facc15!important;font-size:14px!important;font-weight:950!important}
.lab-thermal-status.lab-orientation-subject,.lab-live-status.lab-orientation-subject,#labDiagnosisSection.lab-orientation-subject,#labEvidenceSection.lab-orientation-subject{outline:4px solid #facc15!important;outline-offset:5px!important;box-shadow:0 0 0 9px rgba(250,204,21,.15),0 0 28px rgba(250,204,21,.45)!important}
@keyframes labOrientationPulse{from{filter:brightness(1)}to{filter:brightness(1.28)}}

/* V16.9 expanded Challenge Lab library */
.lab-pack-count{display:inline-flex;margin-top:2px;padding:5px 8px;border-radius:999px;border:1px solid rgba(34,211,238,.2);background:rgba(34,211,238,.05);color:#91dff0;font-size:9px;font-weight:900;letter-spacing:.05em;text-transform:uppercase}
.lab-pack-shell{padding:24px}.lab-pack-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:18px}.lab-pack-head>div{max-width:760px}.lab-pack-head p:not(.eyebrow){color:#cbd7e7;line-height:1.5}.lab-scenario-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.lab-scenario-card{display:grid;gap:10px;padding:17px;border:1px solid var(--line);border-radius:16px;background:#0b1627}.lab-scenario-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.lab-scenario-card h3{margin:2px 0 0}.lab-scenario-card>p{margin:0;color:#aebed0;line-height:1.5;font-size:12px}.lab-scenario-footer{display:flex;justify-content:space-between;gap:12px;align-items:end;border-top:1px solid rgba(148,163,184,.1);padding-top:10px}.lab-scenario-footer>span{color:#8398af;font-size:9px;line-height:1.4;max-width:65%}.lab-scenario-footer button{width:auto;min-width:130px}.lab-scenario-complete{padding:4px 7px;border-radius:999px;border:1px solid rgba(var(--live-rgb),.34);background:rgba(var(--live-rgb),.07);color:var(--good);font-size:8px;font-weight:950;letter-spacing:.06em;white-space:nowrap}
.lab-validation-pack{margin-top:15px;padding:16px;border:1px solid var(--line);border-radius:16px;background:#0b1627}.lab-validation-pack-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.lab-validation-pack-head h3{margin:2px 0}.lab-validation-pack-head>span{color:#8fa3ba;font-size:10px;font-weight:900}.lab-validation-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}.lab-validation-list button{display:grid;text-align:left;gap:3px;padding:11px 12px;border:1px solid var(--line);border-radius:11px;background:#142139;color:#eef7ff}.lab-validation-list button:hover{border-color:#22d3ee}.lab-validation-list button span{color:#91a4bb;font-size:9px;line-height:1.35}
.lab-generic-evidence-list{display:grid;gap:6px;padding:9px 0 2px}.lab-generic-evidence-list .lab-evidence-field{display:flex;justify-content:space-between;gap:12px;padding:7px 8px;border-radius:8px;background:#091321;color:#9fb0c5;font-size:10px}.lab-generic-evidence-list .lab-evidence-field strong{color:#eef7ff;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.lab-tool-section>.lab-control{width:100%;margin-top:7px}.lab-tool-section>.lab-control.active{border-color:rgba(var(--live-rgb),.42);background:rgba(var(--live-rgb),.07);color:#ecfff0}.gl-test-point{cursor:pointer}.gl-test-point:hover .lab-test-point{stroke:#f4f7fb;stroke-width:6}
@media(max-width:800px){.lab-scenario-grid,.lab-validation-list{grid-template-columns:1fr}.lab-pack-head{flex-direction:column}.lab-scenario-footer{align-items:stretch;flex-direction:column}.lab-scenario-footer>span{max-width:none}.lab-scenario-footer button{width:100%}}
.lab-bottom-stack{display:grid;grid-template-columns:1fr;gap:14px}.lab-bottom-stack .lab-diagnosis{width:100%}.lab-bottom-stack .lab-evidence{width:100%}.lab-bottom-stack .lab-load-evidence-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}@media(max-width:800px){.lab-bottom-stack .lab-load-evidence-grid{grid-template-columns:1fr}}

/* V17: the scenario labs use the approved Overcurrent evidence layout. */
#glEvidenceSection .lab-load-evidence-grid{grid-template-columns:1fr}
#glEvidenceSection .lab-generic-evidence-list{padding:9px;gap:5px}
#glEvidenceSection .lab-evidence-field{align-items:center;flex-wrap:wrap}
#glEvidenceSection .lab-evidence-field span{flex:1 1 180px;line-height:1.4}
#glEvidenceSection .lab-evidence-field span b{color:#67e8f9;font-size:9px}
#glEvidenceSection .lab-evidence-field.new-evidence{outline:1px solid rgba(251,191,36,.55);background:rgba(251,191,36,.10)}
#glEvidenceSection .lab-evidence-field em{color:#fbbf24;font-size:8px;font-style:normal;font-weight:950}
#glEvidenceSection .lab-history .lab-generic-evidence-list{padding:0 9px 9px}
#glEvidenceSection.lab-orientation-subject,#glDiagnosisSection.lab-orientation-subject,#glLiveStatusSection.lab-orientation-subject{outline:4px solid #facc15!important;outline-offset:5px!important;box-shadow:0 0 0 9px rgba(250,204,21,.15),0 0 28px rgba(250,204,21,.45)!important}

/* V17.1 circuit clarity */
.lab-top p.lab-task-question{margin-top:10px;color:#e9f3ff;font-weight:700}.lab-task-question strong{color:#22d3ee}.lab-contact-point{fill:#d7e4f1;stroke:#091321;stroke-width:2}.lab-fuse-symbol{fill:#17243a;stroke:#d7e4f1;stroke-width:3}.lab-board-context{display:block;margin-top:4px;color:#c6d6e8}.lab-contact-close{animation:labCloseContact .22s ease-out both}@keyframes labCloseContact{from{transform:rotate(-16deg)}to{transform:rotate(0deg)}}
.lab-unknown{stroke:#6f8198;stroke-width:4;stroke-dasharray:10 8}

/* V17.2 fuse state and print reference */
.lab-fuse-status{margin-top:12px;padding:12px;border:1px solid #54708b;border-radius:12px;color:#e6f2ff}.lab-fuse-status>div:first-child{display:flex;justify-content:space-between;gap:10px}.lab-fuse-status small{display:block;margin-top:7px;color:#afc2d6;line-height:1.35}.lab-fuse-track{margin-top:9px;height:10px;border-radius:99px;background:#22344a;overflow:hidden}.lab-fuse-track>div{height:100%;background:linear-gradient(90deg,#40d66a,#ffbe45,#fb635a);transition:width .2s linear}.lab-control:disabled{opacity:.55;cursor:not-allowed}.lab-print-excerpt{fill:#15283e;stroke:#90b3d3;stroke-width:2}
.lab-fuse-break{fill:none;stroke:#fb635a;stroke-width:3;stroke-linecap:round}

.lesson-svg .svg-subtle{fill:#c9dceb}.lesson-svg .dim-component{opacity:1}.teaching-figure{width:100%;height:auto}

/* V17.7: worked examples and shared lab interaction refinements. */
.worked-steps{display:grid;gap:14px;margin-top:22px}.worked-steps>div{display:grid;gap:9px;padding:20px 24px;border:1px solid var(--line);border-radius:14px;background:#0a1424}.worked-steps span{font-size:16px;color:#c9dcea}.worked-steps strong{font-size:clamp(20px,2.3vw,28px);line-height:1.55;overflow-wrap:anywhere}.lab-probe-hit{pointer-events:all;cursor:crosshair}.gl-test-point{cursor:crosshair}.mt-nameplate{padding:14px;border:1px solid #45657e;border-radius:12px;color:#e2eef8;line-height:1.6;margin:12px 0}.mt-experiment{display:grid;gap:10px}.mt-experiment label{display:grid;gap:6px}.mt-experiment select{max-width:100%;padding:10px;color:#eef7ff;background:#0b1627;border:1px solid #52708a;border-radius:8px}.mt-observation{color:#d5e7f6;line-height:1.55}.mt-meter-note{font-size:14px;color:#d5e7f6}.mt-verify{margin-top:16px;padding:18px;border:1px solid #4eac80;border-radius:14px}.mt-verify button{margin:8px 8px 8px 0}.mt-scope{fill:none;stroke:#6bf396;stroke-width:3}.mt-field{transition:opacity .18s}.lab-schematic text{pointer-events:none}.lab-schematic .lab-clamp-hit{pointer-events:stroke}.mt-evidence-condition{display:block;margin-top:5px;color:#d4e7f5;font-size:11px;line-height:1.4}
/* V17.8: compact shared lab workspace, readable saved evidence, explicit verification. */
.lab-generic .lab-tools{padding:10px;gap:9px}
.lab-generic .lab-tool-section{padding:10px}
.lab-generic #glCircuitControls{display:grid;gap:7px}
.lab-generic .lab-meter-display{margin:7px 0;padding:10px}
.lab-generic .lab-circuit-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
.lab-circuit-summary strong small{display:block;margin-top:4px;font:11px system-ui;color:#b8ccdf}
.lab-load-evidence-card:not([open]) > :not(summary),.lab-history:not([open]) > :not(summary){display:none!important}
.lab-load-evidence-card summary{cursor:pointer;list-style:none}
.lab-generic .lab-load-evidence-head{display:grid;grid-template-columns:1fr auto;gap:7px}
.lab-generic .lab-load-compact-summary{grid-column:1/-1;flex-wrap:wrap}
.lab-generic .lab-evidence-field span{font-size:11px;color:#c5d7e8;line-height:1.45}
.lab-generic .lab-evidence-field strong{font-size:13px}
.lab-generic .lab-history-list{max-height:300px;overflow:auto;padding:10px}
.lab-generic .lab-history summary{font-size:12px;color:#d2e0ef}
.lab-generic .lab-generic-evidence-list{max-height:260px;overflow:auto}
.lab-diagnosis-first{grid-template-columns:1fr}
.lab-diagnosis-layout label{min-width:0;line-height:1.5}
.lab-diagnosis-layout select{margin-top:6px;font-size:13px}
.lab-diagnosis-layout input{max-width:100%}
.lab-reasoning-card label{display:block;line-height:1.55}
.mt-reference{border:1px solid var(--line);border-radius:12px;background:#0b1627;padding:11px 14px;color:#dce8f4;font-size:14px;line-height:1.6}
.mt-reference summary{cursor:pointer;font-weight:800;color:#dce8f4}
.mt-reference p{margin:10px 0 0}
.mt-reference:not([open]) > :not(summary){display:none}
.mt-guide{border:1px solid #4eac80;border-radius:12px;padding:12px;background:#102721;color:#effcf4;font-size:13px;line-height:1.55}
.mt-guide p{margin:0 0 9px}.mt-guide .eyebrow{font-size:10px;color:#8cf1b3}
.mt-guide button{width:100%;padding:10px}
.mt-guide ul{list-style:none;padding:0;margin:10px 0 0;display:grid;gap:7px}
.mt-guide li{display:grid;grid-template-columns:16px 1fr;gap:5px;color:#cbdde8;font-size:11px}
.mt-guide li.checked{color:#89f1ac}
.mt-experiment{font-size:12px;line-height:1.5;gap:6px}
.mt-experiment p{margin:3px 0}.mt-experiment small{color:#bfd0e1;line-height:1.5}
.lab-generic .lab-completion-banner{padding:18px;gap:12px}.lab-generic .lab-completion-icon{width:42px;height:42px;font-size:24px;flex-shrink:0}
.lab-generic .lab-completion-copy h3{font-size:22px}.lab-generic .lab-completion-copy p{font-size:14px}
@media(min-width:1100px){.lab-generic .lab-right-column{position:sticky;top:12px}}
@media(max-width:850px){.lab-generic .lab-grid{display:flex;flex-direction:column}.lab-generic .lab-left-column,.lab-generic .lab-right-column{display:contents}.lab-generic #glBoardCard{order:1;width:100%}.lab-generic .lab-tools{order:2;width:100%}.lab-generic .mt-reference{order:3;width:100%}.lab-generic #glCompletion{order:4;width:100%}.lab-generic #glEvidenceSection{order:5;width:100%}.lab-generic .lab-diagnosis-layout{grid-template-columns:1fr}.lab-generic .lab-circuit-summary{grid-template-columns:1fr 1fr}.lab-generic .lab-tools{box-sizing:border-box}}

/* V17.9 Student: retain all existing lab blocks and column positions. */
.lab-right-column,.lab-generic .lab-right-column{position:static;top:auto}
@media(min-width:851px){
 .lab-right-column,.lab-generic .lab-right-column{display:block;align-self:start;min-width:0}
 .lab-right-column>.lab-tools{position:sticky;top:12px}
}
@media(max-width:850px){.lab-right-column>.lab-tools{position:static}.lab-right-column{height:auto!important}}
.student-backup{display:grid;gap:12px;margin:20px 0;padding:18px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}
.student-backup label{display:block;margin-top:10px;font-weight:700}
.student-backup textarea{box-sizing:border-box;display:block;width:100%;max-width:100%;padding:12px;border:1px solid var(--line);border-radius:10px;background:#0b1627;color:var(--text);font-size:14px;overflow-wrap:anywhere}
.student-backup summary{cursor:pointer;font-weight:700}
details.student-backup:not([open])>:not(summary){display:none}
.student-backup input{max-width:100%}
.lab-scenario-footer button:disabled{opacity:.55;cursor:not-allowed}
.modal-card>p,.student-backup p{line-height:1.6}
@media(max-width:600px){.topbar h1{font-size:23px}.app-exit-btn{font-size:12px}.student-backup{padding:12px}.lab-circuit-summary>div{min-width:0}}
