:root {
  color-scheme: dark;
  --bg: #091824;
  --surface: #102433;
  --surface-deep: #0b1c2b;
  --line: #294352;
  --ink: #f4f8fa;
  --muted: #abc0c9;
  --muted-light: #c4d3db;
  --teal: #91efd1;
  --teal-ink: #0c372f;
  --gold: #ffd293;
  --corner: 21px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 26% -10%, #183745 0, transparent 52%) var(--bg);
}
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
p, h1, h2, h3, dl, dd, figure { margin: 0; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 3;
  left: 14px;
  top: 14px;
  background: var(--teal);
  color: var(--teal-ink);
  padding: 10px 15px;
  border-radius: 8px;
}
.page { width: min(1220px, calc(100% - 56px)); margin-inline: auto; }
.site-head { border-bottom: 1px solid #284455; background: #091824aa; }
.head-inner { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { display: inline-flex; gap: 9px; align-items: center; min-height: 44px; text-decoration: none; font-weight: 800; letter-spacing: -.035em; }
.wordmark svg { color: var(--teal); flex: none; }
.wordmark b { color: var(--teal); font-weight: 650; margin-left: .25em; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted-light); font-size: .87rem; font-weight: 650; text-decoration: none; }
.back-link:hover, .lab-foot a:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 4px; }
.course-head { display: flex; justify-content: space-between; gap: 28px; align-items: flex-end; padding: 26px 0 20px; }
.kicker { font-size: .72rem; line-height: 1.45; font-weight: 760; letter-spacing: .14em; color: var(--teal); }
.course-head .kicker { display: flex; align-items: center; gap: 8px; }
.course-head .kicker span { width: 19px; height: 2px; background: var(--teal); }
.course-head h1 { font-size: clamp(2.65rem, 5.9vw, 4.9rem); line-height: 1; letter-spacing: -.071em; font-weight: 810; margin-top: 5px; }
.course-head h1 + p { color: var(--muted-light); margin-top: 8px; font-size: clamp(.91rem, 2vw, 1.05rem); }
.course-progress { flex: 0 1 228px; min-width: 160px; display: grid; align-content: end; gap: 9px; }
.course-progress > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.course-progress span { color: var(--muted); font-size: .66rem; letter-spacing: .1em; font-weight: 800; }
.course-progress strong { color: var(--teal); font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.course-progress progress { appearance: none; width: 100%; height: 5px; border: 0; border-radius: 10px; background: #2b4552; overflow: hidden; }
.course-progress progress::-webkit-progress-bar { background: #2b4552; }
.course-progress progress::-webkit-progress-value { background: var(--teal); border-radius: 10px; }
.course-progress progress::-moz-progress-bar { background: var(--teal); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #1b3040;
  padding: 8px 13px;
  color: var(--ink);
  font-weight: 700;
  font-size: .87rem;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color .15s, border-color .15s;
}
.button:hover { background: #284754; border-color: #57838a; }
.course-index { justify-content: flex-start; }
.course-index svg { color: var(--teal); flex: none; }
.module-rail {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(105px, 1fr);
  gap: 7px;
  margin: 0 -4px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-color: #456771 transparent;
  scrollbar-width: thin;
}
.module {
  min-height: 51px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #112535;
  border: 1px solid #2a4555;
  color: #cbd9df;
  border-radius: 11px;
  padding: 0 10px;
  text-decoration: none;
  white-space: nowrap;
}
.module > span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  flex: none;
  background: #223d4b;
  color: var(--muted-light);
  font: 700 .69rem/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
}
.module strong { font-size: .85rem; font-weight: 700; }
.module:hover { border-color: var(--teal); }
.module[aria-current] { border-color: #66c8af; background: #1a3f40; color: #f5fffd; }
.module[aria-current] > span, .module.completed > span { background: var(--teal); color: var(--teal-ink); }
.lesson { margin-top: 19px; }
.lesson-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.lesson-head h2 { margin: 4px 0 6px; font-size: clamp(1.8rem, 3.7vw, 2.75rem); line-height: 1.07; letter-spacing: -.042em; overflow-wrap: anywhere; scroll-margin-top: 22px; }
.lesson-head h2:focus:not(:focus-visible) { outline: none; }
.lesson-head p:not(.kicker) { color: var(--muted-light); line-height: 1.55; max-width: 71ch; }
.done-badge { display: inline-flex; align-items: center; gap: 5px; flex: none; color: var(--teal); background: #123a3b; border: 1px solid #357e72; border-radius: 25px; padding: 6px 10px; font-size: .78rem; font-weight: 750; }
.experiment { display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(300px, .44fr); gap: 13px; }
.workbench, .control-panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--corner); overflow: hidden; background: var(--surface); }
.bench-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 61px; padding: 7px 13px 7px 16px; background: #0f2433; border-bottom: 1px solid #2a4657; }
.bench-label { display: flex; align-items: center; gap: 7px; color: #d5e4e8; font-size: .83rem; font-weight: 750; }
.bench-label i { width: 7px; height: 7px; background: var(--teal); box-shadow: 0 0 11px #7df5d05e; border-radius: 100%; flex: none; }
.view-options { display: flex; border-radius: 10px; gap: 3px; padding: 3px; background: #0a1a29; border: 1px solid #294757; }
.view-options button { color: var(--muted-light); background: transparent; border: 1px solid transparent; border-radius: 7px; padding: 6px 9px; min-height: 34px; font-size: .78rem; font-weight: 730; }
.view-options button:hover { color: #fff; border-color: #4e7f83; }
.view-options button[aria-pressed="true"] { color: var(--teal); background: #204342; border-color: #39766e; }
.stage {
  padding: 4px 9px 0;
  background: radial-gradient(ellipse at 50% 42%, #20425088, transparent 75%),
    radial-gradient(#56758044 1px, transparent 1px) 0 0 / 14px 14px, #0b1d2c;
}
#stage { width: min(100%, 735px); margin-inline: auto; }
#stage svg { display: block; width: 100%; height: auto; }
.stage figcaption { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; color: var(--muted); padding: 2px 10px 12px; line-height: 1.4; font-size: .74rem; }
.stage-scale { font: 650 .68rem/1.3 ui-monospace, Consolas, monospace; color: #9dc5c9; white-space: nowrap; }
.meter-panel { padding: 11px 13px 13px; border-top: 1px solid #2c4c57; }
.meter-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.meter-heading > :first-child { font-size: .66rem; letter-spacing: .12em; color: var(--muted-light); font-weight: 800; }
.reading-state { font-size: .74rem; color: var(--teal); font-weight: 700; text-align: right; }
.readings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: 6px; }
.reading { min-width: 0; min-height: 61px; padding: 9px 10px; border-radius: 10px; border: 1px solid #284552; background: #0b1d2a; }
.reading dt { color: var(--muted-light); font-size: .71rem; line-height: 1.25; }
.reading dd { font: 700 clamp(.99rem, 2.1vw, 1.27rem)/1.15 ui-monospace, Consolas, monospace; color: #f8fcff; margin-top: 5px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.reading small { font-family: inherit; color: var(--teal); font-weight: 620; font-size: .72em; }
.control-panel { padding: 15px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 13px; }
.panel-head h3, .explanation h3 { font-size: 1.25rem; line-height: 1.17; margin-top: 3px; letter-spacing: -.027em; }
.reset { color: var(--muted-light); min-height: 39px; flex: none; }
.controls { display: grid; gap: 9px; }
.control-row, .toggle-row { border-radius: 11px; border: 1px solid #294652; padding: 9px 11px; background: #0d1f2f; }
.control-row label, .toggle-row { font-weight: 690; font-size: .87rem; }
.control-row select { width: 100%; margin-top: 7px; min-height: 42px; background: #1a3443; color: #effbff; border: 1px solid #416477; border-radius: 7px; padding: 7px; font-size: .88rem; }
.range-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 8px; }
.exact-value { display: flex; align-items: center; gap: 5px; color: var(--gold); white-space: nowrap; }
.exact-value input {
  width: 4.8rem;
  min-height: 35px;
  appearance: textfield;
  padding: 4px 6px;
  background: #162e3d;
  border: 1px solid #446071;
  border-radius: 6px;
  color: var(--gold);
  text-align: right;
  font: 700 1rem/1.3 ui-monospace, Consolas, monospace;
}
.exact-value input::-webkit-inner-spin-button, .exact-value input::-webkit-outer-spin-button { appearance: none; }
.exact-value span { font: 700 .75rem/1.3 ui-monospace, Consolas, monospace; }
.range-row > input { grid-column: 1/-1; width: 100%; min-height: 28px; margin: 0; accent-color: var(--teal); cursor: pointer; }
.toggle-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; cursor: pointer; }
.toggle-row input { position: absolute; inset-inline-end: 11px; width: 45px; height: 28px; opacity: 0; cursor: pointer; margin: 0; }
.switch-track { pointer-events: none; display: flex; align-items: center; width: 44px; height: 25px; padding: 3px; border: 1px solid #547280; border-radius: 18px; background: #213746; flex: none; }
.switch-track::after { content: ""; display: block; width: 17px; height: 17px; border-radius: 50%; background: #b6cdd4; transition: transform .12s; }
.toggle-row input:checked + .switch-track { background: #277767; border-color: var(--teal); }
.toggle-row input:checked + .switch-track::after { background: #e4fff6; transform: translateX(18px); }
.toggle-row input:focus-visible + .switch-track { outline: 3px solid var(--gold); outline-offset: 3px; }
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.preset-row button { min-height: 39px; font-size: .78rem; }
.playback { margin-top: 9px; color: var(--teal); }
.mission { margin-top: 14px; padding: 12px; background: #302d2b; border: 1px solid #665742; border-radius: 13px; }
.mission .kicker { color: var(--gold); }
#lessonTask { margin: 6px 0 10px; font-size: .88rem; color: #fff3df; line-height: 1.5; }
.primary { color: #082820; border-color: transparent; background: var(--teal); justify-content: space-between; width: 100%; }
.primary:hover { background: #c5ffea; color: #0a2c26; border-color: transparent; }
.feedback { padding-top: 9px; line-height: 1.4; font-size: .86rem; color: var(--muted-light); }
.feedback[data-tone="success"] { color: #a6f4d8; }
.feedback[data-tone="retry"] { color: var(--gold); }
.explanation { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .68fr); gap: 16px; align-items: center; margin-top: 13px; padding: 17px 19px; border: 1px solid var(--line); background: #102433; border-radius: 15px; }
#lessonNote { font-size: .88rem; margin-top: 7px; color: var(--muted-light); line-height: 1.58; }
.equation { padding: 11px 13px; border-radius: 9px; border: 1px solid #33505b; background: #0d1d2b; color: var(--gold); font: 650 .88rem/1.55 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 13px; }
.lesson-step { padding: 11px 14px; display: grid; align-content: center; min-height: 64px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; overflow-wrap: anywhere; }
.lesson-step:hover { border-color: var(--teal); background: #173443; }
.lesson-step span { color: var(--teal); font-weight: 760; font-size: .76rem; }
.lesson-step strong { margin-top: 2px; font-size: .92rem; }
.lesson-step.next { grid-column: 2; text-align: right; }
#prevLesson[hidden] + .next, #prevLesson:has(+ .next[hidden]) { grid-column: 1 / -1; }
.lab-foot { margin-top: 20px; border-top: 1px solid var(--line); padding: 15px 0 max(23px, env(safe-area-inset-bottom)); color: var(--muted-light); font-size: .77rem; line-height: 1.5; }
.lab-foot div { display: flex; flex-wrap: wrap; gap: 6px 17px; margin-top: 7px; }
.lab-foot a { text-underline-offset: 3px; }
dialog { width: min(620px, calc(100% - 26px)); max-height: min(84dvh, 780px); padding: 0; background: #112433; color: var(--ink); border-radius: 19px; border: 1px solid #456674; box-shadow: 0 20px 70px #030a12d9; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #030b14bd; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 15px 17px 9px; gap: 12px; }
.dialog-head h2 { font-size: 1.55rem; margin-top: 4px; letter-spacing: -.04em; }
.close-index { min-width: 44px; padding: 0; font-size: 1.5rem; }
.lesson-search { display: block; margin: 0 17px 10px; }
.lesson-search input { width: 100%; min-height: 45px; border-radius: 10px; border: 1px solid #456674; background: #0c1e2c; padding: 9px 11px; color: var(--ink); font-size: 1rem; }
.lesson-search input::placeholder { color: var(--muted); }
.lesson-list { padding: 0 17px 15px; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.lesson-list h3 { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--teal); font-size: .9rem; margin: 11px 0 6px; }
.lesson-list h3 small { color: var(--muted); font-size: .76rem; }
.lesson-list ol { list-style: none; margin: 0; padding: 0; }
.lesson-list a { display: flex; min-height: 43px; gap: 9px; align-items: center; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; font-size: .9rem; text-decoration: none; }
.lesson-list a:focus-visible { outline-offset: -2px; }
.lesson-list a:hover, .lesson-list a[aria-current] { border-color: #456e74; background: #1c3d44; }
.index-number { flex: none; font: 700 .74rem/1 ui-monospace, Consolas, monospace; color: var(--muted-light); }
.index-check { margin-left: auto; color: var(--teal); }
.no-results { color: var(--muted-light); padding: 12px 0; }

.circuit-svg, .scope-svg { font-family: ui-monospace, Consolas, monospace; }
.wire-shadow, .wire, .flow, .symbol, .pin, .switch-arm, .switch-on, .sheen, .wave-symbol, .warning-mark,
.battery-mark, .lamp-filament, .led-rays, .trench, .strip, .wiper, .resistive-track {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wire-shadow { stroke: #081e2b; stroke-width: 8.5; }
.wire { stroke: #8fb9b7; stroke-width: 3.5; }
.schematic .wire-shadow { display: none; }
.schematic .wire { stroke: #9ab9c9; stroke-width: 2.4; }
.flow { stroke: #ffe2a9; stroke-width: 4.7; stroke-dasharray: 2 14; animation: charge-flow var(--speed) linear infinite; animation-direction: var(--direction); }
@keyframes charge-flow { to { stroke-dashoffset: -64; } }
.symbol { stroke: #e0f1f5; stroke-width: 2.7; }
.case-outline { fill: #163043; }
.pin { stroke: #b2d0d1; stroke-width: 2.8; }
.switch-arm { stroke: #e9bc80; stroke-width: 4; }
.switch-on { stroke: #a0efc9; stroke-width: 4.7; }
.sheen { stroke: #fff8e0; stroke-width: 2; opacity: .39; }
.wave-symbol, .led-rays, .wiper { stroke: #9ae9cf; stroke-width: 2.8; }
.warning-mark { stroke: #ffc792; stroke-width: 4; }
.battery-mark { stroke: #f0fafa; stroke-width: 1.6; }
.lamp-filament { stroke: #fff4c9; stroke-width: 2.9; }
.lamp-halo { fill: #fbc480; opacity: .23; }
.part-case { fill: #234658; stroke: #99bdc7; stroke-width: 1.7; }
.part-label { fill: #f2f7f7; font-size: 16px; font-weight: 730; paint-order: stroke; stroke: #112934; stroke-width: 3px; stroke-linejoin: round; }
.node-label { fill: #a9e8d4; font-size: 13px; font-weight: 740; paint-order: stroke; stroke: #102632; stroke-width: 2.5px; stroke-linejoin: round; }
.node { fill: #ffdb9f; stroke: #37424a; stroke-width: 1.3; }
.terminal { fill: #0e2535; stroke: #c2dedc; stroke-width: 2; }
.board-screw { fill: #132c3c; stroke: #77a7ad; stroke-width: 1.4; }
.bjt-arrow { fill: #ffd391; }
.part-stamp { fill: #fff1de; font-size: 10px; font-weight: 850; }
.meter-case { fill: #0f3039; stroke: #89babb; stroke-width: 2; }
.meter-text { fill: #b9fae3; font-size: 12px; font-weight: 800; }
.resistive-track { stroke: #deb180; stroke-width: 8; stroke-dasharray: 2 4; }
.breadboard { fill: #193b4a; stroke: #7fadb3; stroke-width: 1.5; }
.trench { stroke: #0b2534; stroke-width: 13; }
.strip { stroke: #6a929d; stroke-width: 1.5; stroke-dasharray: 2 3; }
.board-hole { fill: #0a1c2b; stroke: #a1c2c1; stroke-width: 1.4; }
.magnet-pole { fill: #fff; font-size: 15px; font-weight: 850; }
.scope-grid, .scope-axis, .scope-line, .scope-guide, .scope-cursor { fill: none; }
.scope-title { fill: var(--ink); font-size: 17px; font-weight: 770; }
.axis-label { fill: #c1d4dc; font-size: 15px; font-weight: 690; }
.scope-grid { stroke: #2f5162; stroke-width: 1; }
.scope-axis { stroke: #82a6b4; stroke-width: 1.4; }
.scope-line { stroke: #83e9cd; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.scope-guide { stroke: #b8d9e8; stroke-opacity: .65; stroke-width: 1.2; stroke-dasharray: 7 7; }
.scope-cursor { stroke: #ffd296; stroke-width: 2.2; stroke-dasharray: 4 4; }
.scope-dot { fill: var(--gold); }

@media (max-width: 860px) {
  .page { width: min(100% - 34px, 1220px); }
  .experiment { grid-template-columns: minmax(0, 1fr) minmax(258px, .55fr); gap: 10px; }
  .bench-head { padding-inline: 9px; }
  .control-panel { padding: 12px; }
  .stage-scale { display: none; }
  .module { padding-inline: 8px; }
}
@media (max-width: 690px) {
  .page { width: calc(100% - 28px); }
  .head-inner { min-height: 55px; }
  .course-head { padding: 19px 0 11px; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
  .course-head h1 { font-size: clamp(2.6rem, 10vw, 4rem); }
  .course-head h1 + p { margin-top: 6px; }
  .course-progress { flex: 1 0 100%; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; }
  .course-progress > div { align-self: end; }
  .course-progress progress { grid-row: 2; align-self: start; }
  .course-index { grid-column: 2; grid-row: 1 / 3; }
  .module-rail { grid-auto-columns: max-content; gap: 5px; }
  .module { min-height: 44px; }
  .module > span { width: 22px; height: 22px; }
  .module strong { font-size: .8rem; }
  .lesson { margin-top: 14px; }
  .lesson-head { margin-bottom: 10px; }
  .lesson-head h2 { font-size: clamp(1.65rem, 6vw, 2.3rem); }
  .lesson-head p:not(.kicker) { font-size: .89rem; line-height: 1.42; }
  .lesson-head .kicker { font-size: .63rem; letter-spacing: .09em; }
  .done-badge { padding: 5px 7px; font-size: .65rem; }
  .experiment, .explanation { grid-template-columns: minmax(0, 1fr); }
  .workbench, .control-panel { border-radius: 15px; }
  .bench-head { min-height: 49px; }
  .bench-label { font-size: .72rem; gap: 4px; }
  .view-options button { padding: 5px 7px; min-height: 38px; font-size: .75rem; }
  .stage { padding-inline: 3px; }
  .stage figcaption { padding: 0 9px 8px; font-size: .69rem; }
  .meter-panel { padding: 8px; }
  .readings { grid-template-columns: repeat(auto-fit, minmax(min(100%, 89px), 1fr)); gap: 5px; }
  .reading { min-height: 52px; padding: 6px; }
  .reading dt { font-size: .67rem; }
  .meter-heading > :first-child { letter-spacing: .07em; font-size: .6rem; }
  .reading-state { font-size: .67rem; }
  .control-row select { font-size: 1rem; }
  .range-row > input { min-height: 33px; }
  .explanation { padding: 13px; gap: 8px; }
  .equation { font-size: .83rem; }
}
@media (max-width: 350px) {
  .page { width: calc(100% - 20px); }
  .view-options button { padding-inline: 5px; }
  .bench-label { gap: 4px; }
  .bench-label i { width: 5px; height: 5px; }
  .back-link { font-size: .79rem; }
  .reading dd { font-size: .91rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .flow { animation: none; }
}

.plate-svg { font-family: system-ui, sans-serif; }
.plate-heading { fill: #e6f2f4; font-size: 21px; font-weight: 780; text-anchor: middle; }
.plate-voltage { fill: #ffda9b; font-size: 35px; }
.plate-side { fill: #e6f2f4; font-size: 21px; font-weight: 710; }
.plate-small { fill: #b8d0dc; font-size: 17px; }
.segment-control { min-inline-size: 0; margin: 0; }
.segment-control legend { padding: 0 4px; font-size: .85rem; font-weight: 720; color: #d6e6ed; }
.segment-control > div { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 4px; }
.segment-control label { position: relative; cursor: pointer; text-align: center; }
.segment-control input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.segment-control span { display: grid; place-items: center; min-height: 44px; padding: 4px; border-radius: 8px; border: 1px solid #406577; background: #173345; }
.segment-control :checked + span { color: #061e1c; background: #9ce6d4; border-color: #9ce6d4; }
.segment-control :focus-visible + span { outline: 2px solid #ffd28d; outline-offset: 2px; }
.mode-context { margin: 9px 0 1px; color: #b5ceda; font-size: .82rem; line-height: 1.4; }
.trial { margin-top: 12px; padding: 11px 12px; border: 1px solid #365a69; border-radius: 12px; background: #0b2330; }
.trial-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.trial-head > div { flex: 1 1 210px; }
.trial-head h3 { font-size: .91rem; }
.trial-head p, .trial-note { margin: 4px 0; color: #bdd0dc; font-size: .79rem; }
.trial table { margin-top: 9px; width: 100%; border-collapse: collapse; font-size: .8rem; font-variant-numeric: tabular-nums; }
.trial th, .trial td { text-align: start; padding: 5px 3px; overflow-wrap: anywhere; border-top: 1px solid #365a69; }
.trial td:last-child { color: #ffda9b; font-weight: 730; }
#indexButtonLabel { font: inherit; color: inherit; }
@media (max-width: 480px) {
  .bench-head:has([data-view="plates"]:not([hidden])) { flex-wrap: wrap; }
  .bench-head:has([data-view="plates"]:not([hidden])) .view-options { width: 100%; justify-content: space-between; }
  .bench-head:has([data-view="plates"]:not([hidden])) .view-options button { flex: 1; min-height: 42px; padding-inline: 5px; }
}

.cap-tools { padding: 8px 12px 10px; background: #0a2430; border-bottom: 1px solid #365a69; }
.cap-tools .segment-control { background: transparent; border: 0; padding: 0; }
.cap-tools .segment-control legend { padding: 0 0 6px; }
.cap-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.cap-actions .mode-context { flex: 1 1 170px; margin: 0; }
.cap-actions .playback { margin: 0; min-height: 42px; }
#playbackSlot:empty { display: none; }
@media (max-width: 480px) {
  .workbench:has(.cap-tools:not([hidden])) .readings { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 350px) {
  .course-head h1 { font-size: 2.15rem; }
  .course-progress > div span { font-size: .58rem; }
  .course-progress .course-index { padding-inline: 8px; }
}
