/* Neuron & Action Potential Lab (layout shared with the Wave H labs). Everything is scoped under .np so site.css (loaded after this file) can't collide. */
.np {
  --np-ink: #14263a; --np-muted: #4b6075; --np-paper: #eef4f7; --np-card: #ffffff; --np-line: #cfdce4;
  --np-accent: #0d6670; --np-accent-ink: #ffffff; --np-sun: #e89a2c; --np-soft: #f3f7f9; --np-ok: #1f7a3d; --np-no: #b3261e;
  --np-shadow: 0 1px 2px rgba(16, 40, 60, .06), 0 8px 24px rgba(16, 40, 60, .07);
  color: var(--np-ink); font: 16px/1.5 "Atkinson Hyperlegible", system-ui, sans-serif;
  background: radial-gradient(ellipse 90% 60% at 50% -10%, #dcebf3, var(--np-paper) 70%);
  padding: 0 clamp(12px, 2vw, 28px) 56px; min-height: 70vh;
}
html[data-theme="dark"] .np {
  --np-ink: #e6eef3; --np-muted: #aabdca; --np-paper: #0f1b26; --np-card: #172633; --np-line: #33495a;
  --np-accent: #3fb5a3; --np-accent-ink: #062521; --np-soft: #1d3040; --np-ok: #7fdc9a; --np-no: #ff9b93;
  --np-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  background: radial-gradient(ellipse 90% 60% at 50% -10%, #19324a, var(--np-paper) 70%);
}
.np *, .np *::before, .np *::after { box-sizing: border-box; }
.np [hidden] { display: none !important; }
.np h1, .np h2, .np h3 { color: var(--np-ink); font-family: inherit; }
.np-eyebrow { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: .08em; color: var(--np-accent); }
.np-muted { color: var(--np-muted); }

/* title bar */
.np-bar { max-width: 1500px; margin: 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 10px 0 8px; }
.np-titles { flex: 1 1 260px; }
.np-bar h1 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.1; }
.np-level { padding: 4px 12px; border-radius: 999px; background: var(--np-soft); border: 1px solid var(--np-line); font-weight: 700; }
.np-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* buttons */
.np .np-btn { appearance: none; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--np-line); background: var(--np-card); color: var(--np-ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.np .np-btn:hover { border-color: var(--np-accent); }
.np .np-btn:disabled { opacity: .5; cursor: not-allowed; }
.np .np-btn--pri { background: var(--np-accent); border-color: var(--np-accent); color: var(--np-accent-ink); }
.np .np-btn--ghost { background: transparent; }
.np .np-btn--small { min-height: 36px; padding: 6px 12px; margin-top: 6px; }
.np button:focus-visible, .np a:focus-visible, .np input:focus-visible, .np select:focus-visible, .np textarea:focus-visible { outline: 3px solid #eaa33d; outline-offset: 2px; }

/* level gate */
.np-gate { max-width: 1500px; margin: 8px auto 0; padding: clamp(18px, 4vw, 48px); border-radius: 22px; background: linear-gradient(140deg, #1f1630, #4a2c4f 55%, #c2773a); }
.np-gate-card { max-width: 860px; margin: 0 auto; padding: clamp(22px, 4vw, 44px); border-radius: 18px; background: var(--np-card); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.np-gate-card h2 { font-size: clamp(28px, 4vw, 42px); margin: 6px 0; }
.np-gate-lede { font-size: 18px; color: var(--np-muted); }
.np-gate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.np-gate-grid button { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 2px solid var(--np-line); border-radius: 14px; cursor: pointer; background: var(--np-soft); color: var(--np-ink); }
.np-gate-grid button:hover, .np-gate-grid button:focus-visible { border-color: var(--np-accent); box-shadow: 0 0 0 3px rgba(13, 102, 112, .25); }
.np-gate-grid button:disabled { opacity: .45; cursor: not-allowed; }
.np-gate-grid b { font-size: 21px; }
.np-gate-grid span { color: var(--np-muted); }
.np-gate-grid em { font-style: normal; font-weight: 700; color: var(--np-accent); }

/* tabs */
#workspace { max-width: 1500px; margin: 0 auto; }
.np-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; }
.np-tabs button { appearance: none; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; white-space: nowrap; min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--np-line); background: var(--np-card); color: var(--np-ink); cursor: pointer; }
.np-tabs button.is-on { background: var(--np-ink); color: var(--np-card); border-color: var(--np-ink); }

/* stage */
.np-stage { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.np-scene { background: #0a1a30; border-radius: 16px; overflow: hidden; box-shadow: var(--np-shadow); color: #eaf3f8; }
.np-viewbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px; background: #0d223b; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.np-views { display: flex; gap: 6px; flex-wrap: wrap; }
.np-views button { appearance: none; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; padding: 8px 14px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: #d7e7f2; cursor: pointer; }
.np-views button.is-on { background: #f3b54a; color: #1a1408; border-color: #f3b54a; }
.np-transport { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.np-scene .np-btn { background: #16304d; border-color: rgba(255, 255, 255, .2); color: #eef6fb; min-height: 40px; padding: 8px 12px; }
.np-scene .np-btn:hover { border-color: #f3b54a; }
.np-speed { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.np-speed select, .np-controls select { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25); background: #16304d; color: #eef6fb; padding: 6px 8px; }
.np-canvas-wrap { position: relative; }
#scene { display: block; width: 100%; touch-action: none; }
.np-caption { margin: 0; padding: 10px 14px; background: #0d223b; color: #d6e6f1; border-top: 1px solid rgba(255, 255, 255, .08); min-height: 3.2em; }
.np-controls { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 10px 14px 12px; background: #10263f; }
.np-ctl input[type=range] { margin: 0; }
.np-ctl { display: flex; flex-direction: column; gap: 2px; font-weight: 700; min-width: 210px; flex: 1 1 210px; }
.np-ctl input[type=range] { width: 100%; accent-color: #f3b54a; min-height: 28px; }
.np-out { font-weight: 800; color: #ffd27a; margin-left: 6px; }
.np-check { display: flex; align-items: center; gap: 8px; font-weight: 700; align-self: center; }
.np-check input { width: 20px; height: 20px; accent-color: #f3b54a; }

/* readouts */
.np-readouts { display: flex; flex-direction: column; gap: 12px; }
.np-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.np-metric { background: var(--np-card); border: 1px solid var(--np-line); border-left: 4px solid var(--np-sun); border-radius: 12px; padding: 7px 10px; box-shadow: var(--np-shadow); line-height: 1.3; }
.np-metric--v { border-left-color: var(--np-accent); }
.np-metric span, .np-metric small { display: block; font-size: 16px; color: var(--np-muted); }
.np-metric span { font-weight: 700; color: var(--np-ink); }
.np-metric b { display: block; font-size: 22px; line-height: 1.25; color: var(--np-ink); white-space: nowrap; }
.np-year { background: var(--np-card); border: 1px solid var(--np-line); border-radius: 12px; padding: 10px; box-shadow: var(--np-shadow); }
.np-year h3 { margin: 0 0 6px; font-size: 18px; }
.np-year canvas, #labGraph { display: block; width: 100%; }

/* lab work */
.np-work { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(0, 1.4fr); gap: 14px; margin-top: 14px; }
.np-panel { background: var(--np-card); border: 1px solid var(--np-line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--np-shadow); }
.np-panel h2 { margin: 4px 0 8px; font-size: 22px; line-height: 1.2; }
.np-panel h3 { margin: 14px 0 6px; font-size: 18px; }
.np-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.np-pred { border: 1px solid var(--np-line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; background: var(--np-soft); }
.np-pred legend { font-weight: 700; padding: 0 4px; }
.np-pred label { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; cursor: pointer; }
.np-pred input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--np-accent); }
.np-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.np-cards li { border: 1px dashed var(--np-line); border-radius: 10px; padding: 8px 10px; }
.np-cards li span { display: block; color: var(--np-muted); }
.np-cards li.done { border-style: solid; border-color: var(--np-ok); background: rgba(31, 122, 61, .08); }
.np-steps { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.np-steps li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--np-line); font-weight: 700; }
.np-steps li.done { border-color: var(--np-ok); color: var(--np-ok); }
.np-months { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.np .np-chip { appearance: none; font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; min-width: 56px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--np-line); background: var(--np-soft); color: var(--np-ink); cursor: pointer; }
.np .np-chip.done { border-color: var(--np-ok); color: var(--np-ok); }
.np .np-chip.is-on { outline: 2px solid var(--np-sun); }
.np-inline { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.np-inline select { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; border-radius: 8px; border: 1px solid var(--np-line); background: var(--np-card); color: var(--np-ink); padding: 6px 8px; max-width: 100%; }
.np-feedback { min-height: 1.5em; font-weight: 700; color: var(--np-accent); margin: 8px 0 0; }
.np-data-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.np-data-head h3 { margin: 2px 0 8px; font-size: 20px; }
.np-table { overflow: auto; max-height: 290px; border: 1px solid var(--np-line); border-radius: 10px; margin-bottom: 12px; }
.np table { width: 100%; border-collapse: collapse; font-size: 16px; }
.np th, .np td { padding: 7px 10px; border-bottom: 1px solid var(--np-line); text-align: right; white-space: nowrap; color: var(--np-ink); }
.np th:first-child, .np td:first-child, .np th:nth-child(2), .np td:nth-child(2) { text-align: left; }
.np th { position: sticky; top: 0; background: var(--np-soft); font-weight: 800; }
.np-empty { text-align: center !important; color: var(--np-muted) !important; }

/* CER */
.np-cer { margin-top: 14px; }
.np-cer-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.np-checklist { list-style: none; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--np-soft); min-width: 280px; }
.np-checklist li { padding: 2px 0; color: var(--np-muted); }
.np-checklist li.done { color: var(--np-ok); font-weight: 700; }
.np-cer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.np-cer-grid label { display: flex; flex-direction: column; font-weight: 800; }
.np-cer-grid small { font-weight: 500; color: var(--np-muted); }
.np-cer-grid textarea { font: 16px/1.45 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 130px; padding: 10px; margin-top: 4px; border: 1px solid var(--np-line); border-radius: 10px; background: var(--np-card); color: var(--np-ink); resize: vertical; }
.np-turnin { margin-top: 12px; }

/* test */
.np-test { margin-top: 14px; max-width: 980px; }
.np-test-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.np-test-head h2 small { font-size: 18px; color: var(--np-muted); }
.np-progress { flex: 0 1 260px; height: 10px; background: var(--np-soft); border-radius: 999px; overflow: hidden; border: 1px solid var(--np-line); }
.np-progress i { display: block; height: 100%; background: var(--np-accent); }
.np-tag { display: inline-block; margin: 8px 0 0; padding: 3px 10px; border-radius: 999px; background: #fff1d6; color: #6b4300; font-weight: 700; }
html[data-theme="dark"] .np-tag { background: #4a3510; color: #ffe2a8; }
.np-q { font-size: 19px; font-weight: 700; margin: 12px 0; }
.np-run { margin-bottom: 10px; }
.np-readout { margin: 8px 0 0; padding: 10px 12px; border-left: 4px solid var(--np-sun); background: var(--np-soft); border-radius: 8px; }
.np-choices { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.np-choice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--np-line); border-radius: 12px; cursor: pointer; background: var(--np-card); }
.np-choice input { position: absolute; opacity: 0; pointer-events: none; }
.np-choice:focus-within { outline: 3px solid #eaa33d; outline-offset: 2px; }
.np-choice.is-picked { border-color: var(--np-accent); background: var(--np-soft); }
.np-choice.ok { border-color: var(--np-ok); }
.np-choice.no { border-color: var(--np-no); }
.np-choice em { margin-left: auto; font-style: normal; font-weight: 900; font-size: 20px; }
.np-choice.ok em { color: var(--np-ok); } .np-choice.no em { color: var(--np-no); }
.np-letter { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--np-soft); border: 1px solid var(--np-line); }
.np-choices:disabled .np-choice { cursor: default; }
.np-explain { padding: 10px 12px; border-radius: 10px; background: var(--np-soft); }
.np-explain.ok { border-left: 4px solid var(--np-ok); } .np-explain.no { border-left: 4px solid var(--np-no); }
.np-test-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }
.np-test-nav .np-btn--pri { margin-left: auto; }
.np-review { padding-left: 22px; }
.np-review li { margin: 8px 0; }
.np-review li.ok > b { color: var(--np-ok); } .np-review li.no > b { color: var(--np-no); }

/* dialogs */
.np-dialog { max-width: 720px; border: 0; border-radius: 16px; padding: 22px 26px; color: #14263a; background: #fff; box-shadow: 0 20px 70px rgba(0, 0, 0, .4); font: 16px/1.55 "Atkinson Hyperlegible", system-ui, sans-serif; }
html[data-theme="dark"] .np-dialog { background: #172633; color: #e6eef3; }
html[data-theme="dark"] .np-dialog a { color: #8fd6f0; }
.np-dialog::backdrop { background: rgba(6, 21, 37, .7); }
.np-dialog h2 { margin-top: 0; }
.np-x { float: right; font-size: 28px; line-height: 1; min-width: 44px; min-height: 44px; border: 0; background: transparent; color: inherit; cursor: pointer; }

/* responsive */
@media (max-width: 1100px) {
  .np-stage { grid-template-columns: minmax(0, 1fr); }
  .np-metrics { grid-template-columns: repeat(3, 1fr); }
  .np-work { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .np-gate-grid, .np-cer-grid { grid-template-columns: minmax(0, 1fr); }
  .np-metrics { grid-template-columns: 1fr 1fr; }
  .np-viewbar { flex-direction: column; align-items: stretch; }
  .np-views button { flex: 1; }
  .np-ctl { min-width: 0; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .np * { transition: none !important; animation: none !important; } }
@media print { .np-scene, .np-tabs, .np-actions, .np-turnin { display: none !important; } }

.np small { font-size: 16px; }
.np .np-th-title { text-align: left !important; background: var(--np-card); color: var(--np-accent); font-weight: 800; position: static; }
.np .np-th-sub { position: static; }
.np-caption { font-size: 16px; }

/* ── v3 structure: modes, tabs, coach, pre-lab, advanced, toast ── */
.np-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 2px 0 8px; }
.np-modes-label { font-weight: 800; margin-right: 4px; }
.np-modes button { appearance: none; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 2px solid var(--np-line); background: var(--np-card); color: var(--np-ink); cursor: pointer; }
.np-modes button.is-on { border-color: var(--np-accent); background: var(--np-accent); color: var(--np-accent-ink); }
.np-modes-note { color: var(--np-muted); }
.np-tabs button.is-on { background: var(--np-ink); color: var(--np-card); border-color: var(--np-ink); }
.np-stage { grid-template-columns: minmax(0, 1fr) 350px; }
.np-side { display: flex; flex-direction: column; gap: 10px; }
.np-coach { background: var(--np-card); border: 1px solid var(--np-line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--np-shadow); }
.np-coach h2 { font-size: 18px; margin: 2px 0 6px; }
.np-next { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--np-soft); border-left: 4px solid var(--np-sun); }
.np-stepchecks { list-style: none; margin: 8px 0; padding: 0; }
.np-stepchecks li { padding: 2px 0; color: var(--np-muted); }
.np-stepchecks li.done { color: var(--np-ok); font-weight: 700; }
.np-ch summary { cursor: pointer; font-weight: 800; padding: 4px 0; min-height: 32px; }
.np-ice canvas { display: block; width: 100%; border-radius: 8px; margin: 6px 0; }
.np-ice input[type=range] { width: 100%; accent-color: var(--np-accent); }
.np-zoom { position: absolute; left: 10px; bottom: 34px; display: flex; flex-direction: column; gap: 6px; }
.np-zoom button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.3); background: rgba(10,26,48,.85); color: #fff; font: 800 20px/1 system-ui; cursor: pointer; }
.np-adv { background: #0d223b; border-top: 1px solid rgba(255,255,255,.08); }
.np-adv summary { cursor: pointer; padding: 10px 14px; font-weight: 800; color: #ffd27a; min-height: 44px; }
.np-adv-grid { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 4px 14px 14px; }
.np-adv-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex: 1 1 100%; }
.np-adv .np-metric { background: #16304d; border-color: rgba(255,255,255,.12); color: #eaf3f8; }
.np-adv .np-metric span, .np-adv .np-metric b, .np-adv .np-metric small { color: #eaf3f8; }
.np-seed { display: flex; align-items: center; gap: 10px; }
.np-seed b { font-size: 20px; color: #ffd27a; }
.np-ctl small { font-weight: 500; color: #c3dce6; }
.np-scene select { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: #16304d; color: #eef6fb; padding: 6px 8px; }
.np-flash { animation: crFlash 2.4s ease-out; border-radius: 10px; }
@keyframes crFlash { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,184,0,0); } 15%, 55% { box-shadow: 0 0 0 5px #ffb800; } }
.np-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: min(640px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 12px; background: #10253b; color: #fff; font-weight: 700; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
/* pre-lab */
.np-prelab h3 { margin-top: 18px; }
.np-qbox { padding: 12px 14px; border-radius: 12px; background: var(--np-soft); border-left: 5px solid var(--np-accent); margin: 10px 0; }
.np-qbox small { display: block; color: var(--np-muted); font-weight: 700; }
.np-qbox b { font-size: 19px; }
.np-prelab-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; }
.np-vocab { display: flex; flex-wrap: wrap; gap: 8px; }
.np .np-term { position: relative; appearance: none; font: inherit; color: var(--np-accent); font-weight: 800; background: none; border: 0; border-bottom: 2px dotted currentColor; padding: 0 1px; cursor: help; }
.np-vocab .np-term { border: 1px solid var(--np-line); border-radius: 999px; padding: 6px 12px; background: var(--np-soft); min-height: 40px; }
.np-tip { display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: min(320px, 80vw); padding: 10px 12px; border-radius: 10px; background: #10253b; color: #fff; font-weight: 500; text-align: left; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.np-term:hover .np-tip, .np-term:focus .np-tip, .np-term:focus-visible .np-tip { display: block; }
.np-safety { padding-left: 0; list-style: none; }
.np-safety li { padding: 6px 10px; margin: 6px 0; border-radius: 8px; background: #fff4d6; color: #5a3b00; }
html[data-theme="dark"] .np-safety li { background: #3d2c0b; color: #ffe2a8; }
.np-frame { line-height: 2.4; font-size: 17px; }
.np-frame select { font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; border-radius: 8px; border: 2px solid var(--np-accent); background: var(--np-card); color: var(--np-ink); padding: 4px 8px; }
.np-because { display: flex; flex-direction: column; font-weight: 700; }
.np-because textarea { font: 16px/1.45 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 80px; padding: 10px; margin-top: 4px; border: 1px solid var(--np-line); border-radius: 10px; background: var(--np-card); color: var(--np-ink); }
.np-varpool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; padding: 8px; border: 1px dashed var(--np-line); border-radius: 12px; }
.np-varbins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.np-varbin { min-height: 120px; padding: 8px; border: 2px solid var(--np-line); border-radius: 12px; background: var(--np-soft); display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; cursor: pointer; }
.np-varbin h4 { flex: 1 1 100%; margin: 0 0 4px; }
.np .np-varchip { appearance: none; font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--np-line); background: var(--np-card); color: var(--np-ink); cursor: pointer; }
.np .np-varchip.picked { border-color: var(--np-sun); box-shadow: 0 0 0 3px rgba(232,154,44,.35); }
.np .np-varchip.right { border-color: var(--np-ok); } .np .np-varchip.wrong { border-color: var(--np-no); }
/* data + CER */
.np-data h3 { margin: 14px 0 6px; font-size: 18px; }
#labGraph { margin-top: 14px; border-radius: 10px; }
.np-pick { margin: 10px 0; border: 1px solid var(--np-line); border-radius: 12px; padding: 8px 12px; }
.np-pick summary { cursor: pointer; font-weight: 800; min-height: 32px; }
.np-rowpick { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; }
.np-rowpick input { width: 18px; height: 18px; margin-top: 3px; }
#rowPick { max-height: 220px; overflow: auto; }
.np-done { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: rgba(31,122,61,.10); border: 2px solid var(--np-ok); }
.np-more { position: relative; }
.np-more summary { list-style: none; }
.np-more summary::-webkit-details-marker { display: none; }
.np-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: var(--np-card); border: 1px solid var(--np-line); box-shadow: var(--np-shadow); min-width: 240px; }
@media (max-width: 1100px) { .np-prelab-grid { grid-template-columns: minmax(0, 1fr); } .np-stage { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .np-varbins { grid-template-columns: minmax(0, 1fr); } .np-adv-metrics { grid-template-columns: minmax(0, 1fr); } }
@media print {
  .tlg-header, .tlg-footer, .np-bar .np-actions, .np-modes, .np-tabs, #stageWrap, .np-pick, .np-turnin, .np-toast, #testCard { display: none !important; }
  .np { background: #fff; color: #000; }
  #tab-data, #tab-cer { display: block !important; box-shadow: none; }
}
/* compact header rows so the scene and its controls fit at 1366×768 */
.np-titles .np-eyebrow { display: none; }
.np-bar { padding: 8px 0 6px; }
.np-bar h1 { font-size: 26px; white-space: nowrap; }
.np-bar .np-btn { min-height: 40px; padding: 7px 12px; }
.np-modes { padding: 0 0 6px; }
.np-modes button, .np-tabs button { min-height: 40px; padding: 7px 13px; }
.np-tabs { padding: 0 0 8px; }
@media (max-width: 760px) { .np-bar h1 { white-space: normal; } }
/* scene full width; coach, readouts and graph in a row underneath */
.np-stage { grid-template-columns: minmax(0, 1fr); }
.np-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 12px; align-items: start; }
.np-side .np-metrics { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .np-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .np-side .np-year { grid-column: 1 / -1; } }
@media (max-width: 760px) { .np-side { grid-template-columns: minmax(0, 1fr); } }

/* ── Electrochemistry Lab additions ── */
.np-gate { background: linear-gradient(140deg, #0d1a2e, #1d4f8a 50%, #c8763f); }
.np-scene { background: #0b1722; }
.np-zoom { top: 44px; bottom: auto; left: 10px; flex-direction: row; }
.np-side { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1.05fr); }
.np-metrics { grid-template-columns: 1fr 1fr; }
.np-metric b { font-size: 20px; white-space: normal; }
.np-metric--t { border-left-color: #2f8fd8; }
.np .np-btn--go { background: #f3b54a; border-color: #f3b54a; color: #1a1408; }
.np .np-btn--go:hover { border-color: #fff; }
.np .np-btn[aria-pressed="true"] { background: #7ce0c3; border-color: #7ce0c3; color: #062521; }
.np-pair { display: flex; gap: 6px; }
.np-pair select { flex: 1; }
.np-ctl select { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: #16304d; color: #eef6fb; padding: 6px 8px; width: 100%; }
.np-ctl--btn { justify-content: flex-end; min-width: 150px; flex: 0 1 auto; }
.np-row--tight { margin: 0; }
.np-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.np-label { margin: 8px 0 0; font-weight: 800; }
.np-run { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.np-run .np-readout { flex: 1 1 100%; }
.np-q b { color: var(--np-accent); }
.np-choices + .np-run { margin-top: 12px; }
.np-fit { margin: 6px 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--np-soft); border-left: 4px solid var(--np-ok); font-weight: 700; }
.np-compare { margin-top: 10px; padding: 8px 10px; border: 1px dashed var(--np-line); border-radius: 10px; }
.np-compare select { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; border-radius: 8px; border: 1px solid var(--np-line); background: var(--np-card); color: var(--np-ink); padding: 4px 6px; max-width: 100%; }
.np-compare-out { margin: 6px 0 0; font-weight: 700; }
.np-compare-out.no { color: var(--np-no); } .np-compare-out.ok { color: var(--np-ok); }
.np-seed { flex-direction: row; align-items: center; gap: 12px; }
.np-seed b { font-size: 20px; color: #ffd27a; }
.np dialog sub, .np dialog sup { line-height: 0; }
html[data-theme="dark"] .np-dialog sub { color: inherit; }
@media (max-width: 1100px) { .np-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .np-side .np-year { grid-column: 1 / -1; } }
@media (max-width: 760px) { .np-side { grid-template-columns: minmax(0, 1fr); } }

.np-ctl--sel { min-width: 180px; }
.np-views button { padding: 8px 12px; }
.np-zoom { top: auto; bottom: 46px; left: auto; right: 12px; }
/* practice links (Pre-lab and the completion card) */
.np-practice { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; padding: 10px 12px; border-radius: 12px; background: var(--np-soft); border-left: 4px solid var(--np-accent); }
.np-practice span[aria-hidden] { font-size: 26px; line-height: 1; }
.np-practice b { display: block; }
.np-practice a { color: var(--np-accent); font-weight: 800; }
.np-toast { pointer-events: none; }   /* informational only: never blocks a tap on the scene below it */

/* ── Body Systems & Immune Response Lab additions ── */
.np-ctl output { font-weight: 800; color: #ffd27a; font-variant-numeric: tabular-nums; }
.np-ctl--chk { flex-direction: row; align-items: center; gap: 10px; min-height: 44px; }
.np-ctl--chk input { width: 22px; height: 22px; accent-color: #f3b54a; }
.np-ident { margin-top: 10px; padding: 8px 10px; border: 1px dashed var(--np-line); border-radius: 10px; }
.np-cands { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; margin: 6px 0; max-height: 260px; overflow: auto; }
.np-cands label { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.np-cands input { width: 20px; height: 20px; accent-color: var(--np-accent); }
.np-cands small { margin-left: auto; color: var(--np-muted); font-variant-numeric: tabular-nums; }
.np-graph { margin: 14px 0 0; }
.np-graph canvas { display: block; width: 100%; border-radius: 10px; }
.np-graph figcaption { margin-top: 4px; }
.np-views button { white-space: nowrap; }

/* ── Body Systems lab specifics ── */
.np-gate { background: linear-gradient(140deg, #2a0d1f, #7a1f3d 45%, #1f6f78); }
.np-scene { background: #0b1722; }
.np-graph-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .np-graph-grid { grid-template-columns: minmax(0, 1fr); } }
.np-role { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; font-weight: 600; }
.np-role select { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; border-radius: 8px; border: 1px solid var(--np-line); background: var(--np-card); color: var(--np-ink); padding: 4px 6px; max-width: 100%; }
.np-role span { font-weight: 800; min-height: 1em; }
.np-ok { color: var(--np-ok); } .np-no { color: var(--np-no); }
.np-table { overflow-x: auto; }
.np-table th { white-space: normal; min-width: 90px; }

/* ── Neuron & Action Potential Lab (layout shared with the Wave H labs) specifics ── */
.np-gate { background: linear-gradient(140deg, #071d2b, #0f5c6e 48%, #3f8a4a); }
.np-scene { background: #0b1722; }
.np-series { margin: 8px 0; border: 1px solid var(--np-line); border-radius: 10px; padding: 6px 10px; background: var(--np-card); }
.np-series summary { cursor: pointer; font-weight: 800; min-height: 32px; display: flex; align-items: center; }
.np-series .np-table { max-height: 360px; overflow: auto; }
@media (max-width: 640px) { .np-zoom { bottom: 8px; } }
.np-tests { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; background: #0d223b; border-top: 1px solid rgba(255,255,255,.08); }
.np-tests-label { font-weight: 800; color: #ffd27a; }
.np-tests .np-btn { background: #16304d; border-color: rgba(255,255,255,.2); color: #eef6fb; min-height: 40px; padding: 8px 12px; }
.np-tests .np-btn.is-done { background: #0f5446; border-color: #7ce0c3; }
.np-tests .np-btn.is-done::after { content: " ✓"; }
.np-classify .np-rowpick { min-height: 32px; }
.np-eq { font-size: 18px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.np .np-coef { width: 3.2em; min-height: 40px; font: 700 18px "Atkinson Hyperlegible", system-ui, sans-serif; text-align: center; border: 2px solid var(--np-accent); border-radius: 8px; background: var(--np-card); color: var(--np-ink); }
.np-compare input[type=text] { min-height: 40px; font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; border: 1px solid var(--np-line); border-radius: 8px; padding: 4px 8px; background: var(--np-card); color: var(--np-ink); }
.np-graph h3 { margin: 14px 0 6px; font-size: 18px; }

/* ══ Neuron & Action Potential Lab: its own layout (everything above is the shared Wave H lab sheet) ══ */
.np-gate { background: linear-gradient(140deg, #0a1a2c, #1c4a7a 48%, #c9a23f); }
.np-titles .np-eyebrow { display: none; }
/* tap targets: 44 px everywhere */
.np .np-btn, .np-bar .np-btn, .np-scene .np-btn, .np-modes button, .np-tabs button, .np .np-varchip, .np .np-chip { min-height: 44px; }
.np .np-btn--small { min-height: 44px; }
.np-scene select, .np-speed select, .np-controls select, .np-ctl select, .np-frame select, .np-compare select { min-height: 44px; }
.np-vocab .np-term { min-height: 44px; }
.np-pick summary, .np-ch summary { min-height: 44px; display: flex; align-items: center; }
.np-rowpick { min-height: 44px; align-items: center; padding: 2px 0; cursor: pointer; }
.np-rowpick input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--np-accent); }
.np-choice { min-height: 48px; }

/* start screen */
.np-gate-card h2 { font-size: clamp(28px, 3.6vw, 40px); }
.np-how { margin: 10px 0; padding-left: 26px; font-size: 18px; }
.np-how li { padding: 2px 0; }
.np-gate-note { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: var(--np-soft); border-left: 4px solid var(--np-sun); }
.np-gate-pick { margin: 16px 0 0; font-weight: 800; font-size: 18px; }
.np-gate-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
.np-gate-grid button.is-first { border-color: var(--np-accent); background: var(--np-card); box-shadow: 0 0 0 3px rgba(13, 102, 112, .18); }
.np-gate-grid em { order: -1; font-size: 16px; }
@media (max-width: 760px) { .np-gate-grid--4 { grid-template-columns: minmax(0, 1fr); } }

/* bench: scene on the left, coach and readouts on the right */
.np-stage { grid-template-columns: minmax(0, 1fr) 350px; }
.np-stage.np-stage--solo { grid-template-columns: minmax(0, 1fr); }
.np-side { display: flex; flex-direction: column; gap: 10px; }
.np-side .np-metrics { grid-template-columns: 1fr 1fr; }
.np-scene canvas { display: block; width: 100%; }
.np-duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 0 8px; }
.np-duo .np-canvas-wrap { border-radius: 14px; overflow: hidden; }
.np-controls { gap: 8px 22px; padding: 10px 14px 6px; border-top: 1px solid rgba(255, 255, 255, .08); }
.np-ctl { min-width: 230px; flex: 1 1 230px; max-width: 460px; color: #eaf3f8; }
.np-ctl input[type=range] { min-height: 44px; }
.np-ctl .np-out { margin-left: 4px; }
.np-viewbar { background: #10263f; border-bottom: 0; padding: 6px 14px 12px; justify-content: flex-start; gap: 10px 22px; }
.np-check { min-height: 44px; color: #eaf3f8; cursor: pointer; }
.np-check input { width: 22px; height: 22px; }
.np-check input:disabled + span { opacity: .7; }
.np .np-btn--go { font-size: 18px; padding: 10px 20px; }
.np-neuronkey { margin: 0; padding: 8px 14px 8px 38px; background: #0d2238; color: #eaf3f8; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 2px 30px; }
.np-neuronkey li { padding: 1px 0; }
.np-neuronkey .np-nokey { list-style: none; grid-column: 1 / -1; margin-left: -24px; color: #c3d6e4; }
.np-refrkey { margin: 0; padding: 8px 14px 0; color: #eaf3f8; }
.np-sw { display: inline-block; width: 22px; height: 16px; vertical-align: -2px; border-radius: 3px; margin-right: 2px; border: 1px solid rgba(255, 255, 255, .5); }
.np-sw--abs { background: repeating-linear-gradient(135deg, rgba(255, 110, 110, .9) 0 2px, rgba(255, 96, 96, .25) 2px 7px); }
.np-sw--rel { background: radial-gradient(circle, rgba(255, 214, 130, .95) 1.5px, rgba(255, 196, 80, .2) 2px) 0 0 / 7px 7px; }
.np-phasebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px 4px; }
.np-phasebar-label { font-weight: 800; color: #ffd27a; }
.np-phases { display: flex; flex-wrap: wrap; gap: 6px; }
.np .np-phase { appearance: none; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); background: #16304d; color: #eef6fb; cursor: pointer; }
.np .np-phase:hover { border-color: #f3b54a; }
.np .np-phase:disabled { opacity: .55; cursor: not-allowed; }
.np .np-phase.is-on { background: #f3b54a; border-color: #f3b54a; color: #1a1408; }
.np .np-phase.is-on::before { content: "▶ "; }
.np-scrub { display: flex; align-items: center; gap: 12px; padding: 2px 14px 6px; font-weight: 700; color: #eaf3f8; }
.np-scrub input { flex: 1; min-width: 0; min-height: 44px; accent-color: #f3b54a; }
.np-scrub output { min-width: 108px; text-align: right; font-variant-numeric: tabular-nums; color: #ffd27a; font-weight: 800; }
.np-caption { min-height: 4.6em; }
/* coach */
.np-next { font-size: 17px; }
.np-row--rec { align-items: center; margin: 10px 0 4px; }
.np-row--rec .np-muted { flex: 1 1 140px; }
.np-row--calc { align-items: center; }
.np-row--calc label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.np-compare input[type=text] { font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; width: 96px; padding: 6px 8px; border-radius: 8px; border: 2px solid var(--np-accent); background: var(--np-card); color: var(--np-ink); }
.np-compare p { margin: 4px 0 6px; }
.np-later { margin: 8px 0 0; }
.np-metric b { font-size: 20px; white-space: normal; }
/* pre-lab sentence frames: one per line, the menu under its sentence on narrow screens */
.np-frame { line-height: 1.5; display: grid; gap: 8px; }
.np-frame-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.np-frame-row select { max-width: 100%; }
/* graphs */
.np-keys { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; }
.np-key { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.np-key canvas { width: 26px; height: 22px; display: inline-block; }
.np-graph { max-width: 760px; }
.np-graph-grid .np-graph { max-width: none; }
.np-graph h3 { margin: 0 0 6px; }
/* test */
.np-test-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 20px; }
#benchTest { display: flex; flex-direction: column; gap: 14px; }
.np-links a { color: var(--np-accent); font-weight: 700; }
@media (max-width: 1100px) {
  .np-stage { grid-template-columns: minmax(0, 1fr); }
  .np-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
@media (max-width: 760px) {
  .np-duo { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .np-duo .np-canvas-wrap { border-radius: 0; }
  .np-side { grid-template-columns: minmax(0, 1fr); }
  .np-viewbar { flex-direction: row; align-items: center; }
  .np-ctl { flex-basis: 100%; max-width: none; }
}
@media print { .np-gate, #benchTest { display: none !important; } }
.np-msg { margin: 8px 0; padding: 8px 10px; border-radius: 10px; background: var(--np-soft); border-left: 4px solid var(--np-accent); font-weight: 700; }
/* readouts sit under the scene; the coach has the side column to itself */
.np-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.np-main .np-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.np-side { display: flex; flex-direction: column; }
.np-tabs { flex-wrap: wrap; overflow-x: visible; }
@media (max-width: 1100px) { .np-side { display: flex; } }
@media (max-width: 760px) { .np-main .np-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.np-x { min-width: 44px; min-height: 44px; }
.np-table { max-height: none; overflow-y: visible; }
.np th { position: static; }
.np-dialog h2 { overflow: hidden; min-height: 44px; display: flow-root; }
.np-links { display: grid; gap: 6px; }
.np-links a { display: block; min-height: 28px; }
.np-frame, .np-frame-row { min-width: 0; }
.np-frame-row > * { min-width: 0; max-width: 100%; }
@media (max-width: 760px) { .np-frame-row select { width: 100%; } }
#rowPick { max-height: 300px; }
/* the site's "Sign in to save your progress" chip docks here, in the page flow under the title row, so it never floats over the bench */
.np-signin { max-width: 1500px; margin: 0 auto; }
.np-signin:empty { display: none; }
.np-signin .tlg-signin-note { margin: 0 0 8px; }
