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

/* title bar */
.rs-bar { max-width: 1500px; margin: 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 8px 0 6px; }
.rs-titles { flex: 1 1 260px; }
.rs-bar h1 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.15; }
.rs-level { padding: 4px 12px; border-radius: 999px; background: var(--rs-soft); border: 1px solid var(--rs-line); font-weight: 700; }
.rs-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rs-signin { max-width: 1500px; margin: 0 auto; }
.rs-signin:empty { display: none; }
.rs-signin .tlg-signin-note { margin: 0 0 8px; }

/* buttons */
.rs .rs-btn { appearance: none; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; padding: 9px 15px; border-radius: 10px; border: 1px solid var(--rs-line); background: var(--rs-card); color: var(--rs-ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.rs .rs-btn:hover { border-color: var(--rs-accent); }
.rs .rs-btn:disabled { opacity: .5; cursor: not-allowed; }
.rs .rs-btn--pri { background: var(--rs-accent); border-color: var(--rs-accent); color: var(--rs-accent-ink); }
.rs .rs-btn--ghost { background: transparent; }
.rs .rs-btn--small { min-height: 44px; padding: 6px 12px; margin-top: 6px; }
.rs .rs-linkbtn { appearance: none; border: 0; background: none; color: var(--rs-accent); font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; min-width: 44px; cursor: pointer; padding: 0 4px; }
.rs button:focus-visible, .rs a:focus-visible, .rs input:focus-visible, .rs select:focus-visible, .rs textarea:focus-visible, .rs summary:focus-visible, .rs [tabindex]:focus-visible { outline: 3px solid #eaa33d; outline-offset: 2px; }
.rs-more { position: relative; }
.rs-more summary { list-style: none; }
.rs-more summary::-webkit-details-marker { display: none; }
.rs-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(--rs-card); border: 1px solid var(--rs-line); box-shadow: var(--rs-shadow); min-width: 240px; }

/* start screen */
.rs-gate { max-width: 1500px; margin: 8px auto 0; padding: clamp(14px, 3.5vw, 44px); border-radius: 22px; background: linear-gradient(140deg, #0b2a2e, #1f6a5c 48%, #9bbf4a); }
.rs-gate-card { max-width: 900px; margin: 0 auto; padding: clamp(18px, 3.6vw, 40px); border-radius: 18px; background: var(--rs-card); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.rs-gate-card h2 { font-size: clamp(26px, 3.6vw, 40px); margin: 6px 0; line-height: 1.15; }
.rs-gate-lede { font-size: 18px; color: var(--rs-muted); }
.rs-how { margin: 10px 0; padding-left: 26px; font-size: 18px; }
.rs-how li { padding: 2px 0; }
.rs-gate-pick { margin: 16px 0 0; font-weight: 800; font-size: 18px; }
.rs-gate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.rs-gate-grid button { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 2px solid var(--rs-line); border-radius: 14px; cursor: pointer; background: var(--rs-soft); color: var(--rs-ink); min-height: 44px; }
.rs-gate-grid button:hover, .rs-gate-grid button:focus-visible { border-color: var(--rs-accent); box-shadow: 0 0 0 3px rgba(13, 102, 112, .25); }
.rs-gate-grid button:disabled { opacity: .45; cursor: not-allowed; }
.rs-gate-grid b { font-size: 21px; }
.rs-gate-grid span { color: var(--rs-muted); }
.rs-gate-grid em { font-style: normal; font-weight: 700; color: var(--rs-accent); }
.rs-gate-grid--4 em { order: -1; }
.rs-gate-grid button.is-first { border-color: var(--rs-accent); background: var(--rs-card); box-shadow: 0 0 0 3px rgba(13, 102, 112, .18); }
.rs-gate-switch { margin: 10px 0 0; }

/* modes + tabs */
#workspace { max-width: 1500px; margin: 0 auto; }
.rs-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 0 6px; }
.rs-modes-label { font-weight: 800; margin-right: 4px; }
.rs-modes button, .rs-tabs button { appearance: none; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; padding: 8px 13px; border-radius: 10px; border: 2px solid var(--rs-line); background: var(--rs-card); color: var(--rs-ink); cursor: pointer; }
.rs-modes button.is-on { border-color: var(--rs-accent); background: var(--rs-accent); color: var(--rs-accent-ink); }
.rs-modes-note { color: var(--rs-muted); }
.rs-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 8px; }
.rs-tabs button { border-radius: 999px; border-width: 1px; }
.rs-tabs button.is-on { background: var(--rs-ink); color: var(--rs-card); border-color: var(--rs-ink); }

/* bench */
#benchTest { display: flex; flex-direction: column; gap: 14px; }
.rs-stage { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 14px; align-items: start; }
.rs-stage.rs-stage--solo { grid-template-columns: minmax(0, 1fr); }
.rs-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rs-scene { background: #0b1722; border-radius: 16px; overflow: hidden; box-shadow: var(--rs-shadow); color: #eaf3f8; }
.rs-scene canvas { display: block; width: 100%; cursor: pointer; }
.rs-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 22px; padding: 10px 14px 8px; background: #10263f; }
.rs-ctl { display: flex; flex-direction: column; gap: 4px; font-weight: 700; color: #eaf3f8; min-width: 200px; flex: 0 1 auto; }
.rs-ctl select { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25); background: #16304d; color: #eef6fb; padding: 6px 8px; }
.rs-seg { display: flex; gap: 0; }
.rs-seg button { appearance: none; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .28); background: #16304d; color: #eef6fb; cursor: pointer; }
.rs-seg button:first-child { border-radius: 9px 0 0 9px; } .rs-seg button:last-child { border-radius: 0 9px 9px 0; border-left: 0; }
.rs-seg button.is-on { background: #f3b54a; border-color: #f3b54a; color: #1a1408; }
.rs-seg button:disabled { opacity: .55; cursor: not-allowed; }
.rs-canvas-wrap { position: relative; }
.rs-viewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 14px 10px; background: #10263f; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.rs-scene .rs-btn { background: #16304d; border-color: rgba(255, 255, 255, .22); color: #eef6fb; }
.rs-scene .rs-btn:hover { border-color: #f3b54a; }
.rs .rs-btn--go { background: #f3b54a !important; border-color: #f3b54a !important; color: #1a1408 !important; font-size: 18px; padding: 9px 18px; }
.rs-speed { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #eaf3f8; }
.rs-speed select { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25); background: #16304d; color: #eef6fb; padding: 4px 8px; }
.rs-magpick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 100%; }
.rs-magpick-label { font-weight: 800; color: #ffd27a; }
.rs .rs-chipbtn { 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; }
.rs .rs-chipbtn.is-on { background: #ffd34d; border-color: #ffd34d; color: #1a1408; }
.rs-transport--test { display: none; }
.rs-legend { margin: 0; padding: 4px 14px; color: #d6e6f1; display: flex; flex-wrap: wrap; gap: 2px 18px; }
.rs-legend b { color: #ffffff; white-space: nowrap; }
.rs-caption { margin: 0; padding: 6px 14px 12px; color: #eaf3f8; min-height: 3.2em; border-top: 1px solid rgba(255, 255, 255, .08); }
.rs-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rs-metric { background: var(--rs-card); border: 1px solid var(--rs-line); border-left: 4px solid var(--rs-sun); border-radius: 12px; padding: 7px 10px; box-shadow: var(--rs-shadow); line-height: 1.3; min-width: 0; }
.rs-metric--t { border-left-color: #2f8fd8; }
.rs-metric span, .rs-metric small { display: block; font-size: 16px; color: var(--rs-muted); }
.rs-metric span { font-weight: 700; color: var(--rs-ink); }
.rs-metric b { display: block; font-size: 20px; line-height: 1.25; color: var(--rs-ink); }
.rs-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rs-coach { background: var(--rs-card); border: 1px solid var(--rs-line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--rs-shadow); }
.rs-next { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--rs-soft); border-left: 4px solid var(--rs-sun); font-size: 17px; margin-top: 6px; }
.rs-stepchecks { list-style: none; margin: 8px 0; padding: 0; }
.rs-stepchecks li { padding: 2px 0; color: var(--rs-muted); }
.rs-stepchecks li.done { color: var(--rs-ok); font-weight: 700; }
.rs-ch summary, .rs-pick summary { cursor: pointer; font-weight: 800; min-height: 44px; display: flex; align-items: center; }
.rs-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.rs-cards li { border: 1px dashed var(--rs-line); border-radius: 10px; padding: 8px 10px; }
.rs-cards li span { display: block; color: var(--rs-muted); }
.rs-cards li.done { border-style: solid; border-color: var(--rs-ok); background: rgba(31, 122, 61, .08); }
.rs-compare { margin-top: 10px; padding: 8px 10px; border: 1px dashed var(--rs-line); border-radius: 10px; }
.rs-compare--done { border-style: solid; border-color: var(--rs-ok); }
.rs-compare p { margin: 4px 0 6px; }
.rs-compare-out { margin: 6px 0 0; font-weight: 700; }
.rs-compare-out.no { color: var(--rs-no); } .rs-compare-out.ok { color: var(--rs-ok); }
.rs-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; align-items: center; }
.rs-row--calc label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.rs-compare input[type=text], .rs-numq input { font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; width: 104px; padding: 6px 8px; border-radius: 8px; border: 2px solid var(--rs-accent); background: var(--rs-card); color: var(--rs-ink); }
.rs-rowpick { display: flex; gap: 8px; align-items: center; min-height: 44px; padding: 2px 0; cursor: pointer; }
.rs-rowpick input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--rs-accent); }
.rs-later { margin: 8px 0 0; }
.rs-msg { margin: 8px 0; padding: 8px 10px; border-radius: 10px; background: var(--rs-soft); border-left: 4px solid var(--rs-accent); font-weight: 700; }
.rs-livegraph { margin: 0; background: var(--rs-card); border: 1px solid var(--rs-line); border-radius: 14px; padding: 10px 12px; box-shadow: var(--rs-shadow); }
.rs-livegraph h3 { margin: 0 0 6px; font-size: 18px; }
.rs-livegraph canvas { display: block; width: 100%; border-radius: 8px; }
.rs-flash { animation: rsFlash 2.4s ease-out; border-radius: 10px; }
@keyframes rsFlash { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 184, 0, 0); } 15%, 55% { box-shadow: 0 0 0 5px #ffb800; } }

/* panels */
.rs-panel { background: var(--rs-card); border: 1px solid var(--rs-line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--rs-shadow); }
.rs-panel h2 { margin: 4px 0 8px; font-size: 22px; line-height: 1.2; }
.rs-panel h3 { margin: 14px 0 6px; font-size: 18px; }
.rs-qbox { padding: 12px 14px; border-radius: 12px; background: var(--rs-soft); border-left: 5px solid var(--rs-accent); margin: 10px 0; }
.rs-qbox small { display: block; color: var(--rs-muted); font-weight: 700; }
.rs-qbox b { font-size: 19px; }
.rs-prelab-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; }
.rs-vocab { display: flex; flex-wrap: wrap; gap: 8px; }
.rs .rs-term { position: relative; appearance: none; font: inherit; color: var(--rs-accent); font-weight: 800; background: none; border: 0; border-bottom: 2px dotted currentColor; padding: 0 1px; cursor: help; }
.rs-vocab .rs-term { border: 1px solid var(--rs-line); border-radius: 999px; padding: 6px 12px; background: var(--rs-soft); min-height: 44px; }
.rs-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); }
.rs-term:hover .rs-tip, .rs-term:focus .rs-tip, .rs-term:focus-visible .rs-tip { display: block; }
.rs-safety { padding-left: 0; list-style: none; }
.rs-safety li { padding: 6px 10px; margin: 6px 0; border-radius: 8px; background: #fff4d6; color: #5a3b00; }
html[data-theme="dark"] .rs-safety li { background: #3d2c0b; color: #ffe2a8; }
.rs-practice { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; padding: 10px 12px; border-radius: 12px; background: var(--rs-soft); border-left: 4px solid var(--rs-accent); }
.rs-practice span[aria-hidden] { font-size: 26px; line-height: 1; }
.rs-practice b { display: block; }
.rs-practice a { color: var(--rs-accent); font-weight: 800; }
.rs-frame { display: grid; gap: 8px; font-size: 17px; min-width: 0; }
.rs-frame-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.rs-frame-row > * { min-width: 0; max-width: 100%; }
.rs-frame select { font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; border-radius: 8px; border: 2px solid var(--rs-accent); background: var(--rs-card); color: var(--rs-ink); padding: 4px 8px; max-width: 100%; }
.rs-because { display: flex; flex-direction: column; font-weight: 700; margin-top: 10px; }
.rs-because textarea, .rs-cer-grid textarea { font: 16px/1.45 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 80px; padding: 10px; margin-top: 4px; border: 1px solid var(--rs-line); border-radius: 10px; background: var(--rs-card); color: var(--rs-ink); resize: vertical; }
.rs-varpool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; padding: 8px; border: 1px dashed var(--rs-line); border-radius: 12px; }
.rs-varbins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.rs-varbin { min-height: 120px; padding: 8px; border: 2px solid var(--rs-line); border-radius: 12px; background: var(--rs-soft); display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; cursor: pointer; }
.rs-varbin h4 { flex: 1 1 100%; margin: 0 0 4px; }
.rs .rs-varchip { appearance: none; font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--rs-line); background: var(--rs-card); color: var(--rs-ink); cursor: pointer; text-align: left; max-width: 100%; }
.rs .rs-varchip.picked { border-color: var(--rs-sun); box-shadow: 0 0 0 3px rgba(232, 154, 44, .35); }
.rs .rs-varchip.right { border-color: var(--rs-ok); } .rs .rs-varchip.wrong { border-color: var(--rs-no); }

/* data */
.rs-data-head, .rs-cer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 16px; flex-wrap: wrap; }
.rs-table { overflow-x: auto; border: 1px solid var(--rs-line); border-radius: 10px; margin-bottom: 8px; }
.rs table { width: 100%; border-collapse: collapse; font-size: 16px; }
.rs th, .rs td { padding: 7px 10px; border-bottom: 1px solid var(--rs-line); text-align: right; color: var(--rs-ink); }
.rs th { background: var(--rs-soft); font-weight: 800; min-width: 90px; vertical-align: bottom; }
.rs td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rs th:first-child, .rs td:first-child { text-align: left; }
.rs-table--sum th:nth-child(2), .rs-table--sum td:nth-child(2), .rs-table--sum th:nth-child(4), .rs-table--sum td:nth-child(4) { text-align: left; }
.rs-empty { text-align: center !important; color: var(--rs-muted) !important; }
.rs-graph-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.rs-graph { margin: 0; min-width: 0; }
.rs-graph h3 { margin: 0 0 6px; }
.rs-graph canvas { display: block; width: 100%; border-radius: 10px; border: 1px solid var(--rs-line); }
.rs-graph figcaption { margin-top: 4px; }
.rs-wait { padding: 30px 16px; border: 2px dashed var(--rs-line); border-radius: 12px; color: var(--rs-muted); text-align: center; }
.rs-keys { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; }
.rs-key { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }

/* CER */
.rs-checklist { list-style: none; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--rs-soft); min-width: 280px; flex: 0 1 460px; }
.rs-checklist li { padding: 2px 0; color: var(--rs-muted); }
.rs-checklist li.done { color: var(--rs-ok); font-weight: 700; }
.rs-pick { margin: 10px 0; border: 1px solid var(--rs-line); border-radius: 12px; padding: 4px 12px; }
#rowPick { max-height: 300px; overflow: auto; }
.rs-cer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.rs-cer-grid label { display: flex; flex-direction: column; font-weight: 800; }
.rs-cer-grid small { font-weight: 500; color: var(--rs-muted); }
.rs-cer-grid textarea { min-height: 130px; }
.rs-turnin { margin-top: 12px; }
.rs-done { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: rgba(31, 122, 61, .10); border: 2px solid var(--rs-ok); }

/* test */
.rs-test { max-width: 980px; }
.rs-test-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 20px; }
.rs-test-head h2 small { font-size: 18px; color: var(--rs-muted); }
.rs-progress { flex: 0 1 260px; height: 10px; background: var(--rs-soft); border-radius: 999px; overflow: hidden; border: 1px solid var(--rs-line); }
.rs-progress i { display: block; height: 100%; background: var(--rs-accent); }
.rs-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"] .rs-tag { background: #4a3510; color: #ffe2a8; }
.rs-q { font-size: 19px; font-weight: 700; margin: 12px 0; }
.rs-q b { color: var(--rs-accent); }
.rs-run { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; }
.rs-readout { flex: 1 1 100%; margin: 4px 0 0; padding: 10px 12px; border-left: 4px solid var(--rs-sun); background: var(--rs-soft); border-radius: 8px; }
.rs-choices { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.rs-choice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--rs-line); border-radius: 12px; cursor: pointer; background: var(--rs-card); min-height: 48px; position: relative; }
.rs-choice input { position: absolute; opacity: 0; pointer-events: none; }
.rs-choice:focus-within { outline: 3px solid #eaa33d; outline-offset: 2px; }
.rs-choice.is-picked { border-color: var(--rs-accent); background: var(--rs-soft); }
.rs-choice.ok { border-color: var(--rs-ok); } .rs-choice.no { border-color: var(--rs-no); }
.rs-choice em { margin-left: auto; font-style: normal; font-weight: 900; font-size: 20px; }
.rs-choice.ok em { color: var(--rs-ok); } .rs-choice.no em { color: var(--rs-no); }
.rs-letter { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--rs-soft); border: 1px solid var(--rs-line); }
.rs-choices:disabled .rs-choice { cursor: default; }
.rs-numq { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.rs-numq label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.rs-numq select { font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; border-radius: 8px; border: 2px solid var(--rs-accent); background: var(--rs-card); color: var(--rs-ink); padding: 4px 8px; }
.rs-explain { padding: 10px 12px; border-radius: 10px; background: var(--rs-soft); margin: 12px 0 0; }
.rs-explain.ok { border-left: 4px solid var(--rs-ok); } .rs-explain.no { border-left: 4px solid var(--rs-no); }
.rs-test-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.rs-test-nav .rs-btn--pri { margin-left: auto; }
.rs-need { flex: 1 1 100%; text-align: right; }
.rs-review { padding-left: 22px; }
.rs-review li { margin: 8px 0; }
.rs-review li.ok > b { color: var(--rs-ok); } .rs-review li.no > b { color: var(--rs-no); }

/* dialogs */
.rs-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"] .rs-dialog { background: #172633; color: #e6eef3; }
html[data-theme="dark"] .rs-dialog a { color: #8fd6f0; }
.rs-dialog::backdrop { background: rgba(6, 21, 37, .7); }
.rs-dialog h2 { margin-top: 0; min-height: 44px; display: flow-root; }
.rs-dialog sup { line-height: 0; font-size: 16px; }
.rs-x { float: right; font-size: 28px; line-height: 1; min-width: 44px; min-height: 44px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.rs-links { display: grid; gap: 6px; }
.rs-links a { display: block; min-height: 28px; color: var(--rs-accent); font-weight: 700; }

/* responsive */
@media (max-width: 1180px) {
  .rs-stage { grid-template-columns: minmax(0, 1fr); }
  .rs-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .rs-prelab-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .rs-gate-grid, .rs-cer-grid, .rs-varbins, .rs-graph-grid { grid-template-columns: minmax(0, 1fr); }
  .rs-side { grid-template-columns: minmax(0, 1fr); }
  .rs-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-ctl { min-width: 0; flex: 1 1 100%; }
  .rs-frame-row select { width: 100%; }
  .rs-bar h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .rs * { transition: none !important; animation: none !important; } }
@media print {
  .tlg-header, .tlg-footer, .rs-bar .rs-actions, .rs-modes, .rs-tabs, #stageWrap, .rs-pick, .rs-turnin, #testCard, .rs-gate { display: none !important; }
  .rs { background: #fff; color: #000; }
  #tab-data, #tab-cer { display: block !important; box-shadow: none; }
}
#help b { white-space: nowrap; }
