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

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

/* buttons and fields */
.rx .rx-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(--rx-line); background: var(--rx-card); color: var(--rx-ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.rx .rx-btn:hover { border-color: var(--rx-accent); }
.rx .rx-btn:disabled { opacity: .5; cursor: not-allowed; }
.rx .rx-btn--pri { background: var(--rx-accent); border-color: var(--rx-accent); color: var(--rx-accent-ink); }
.rx .rx-btn--ghost { background: transparent; }
.rx button:focus-visible, .rx a:focus-visible, .rx input:focus-visible, .rx select:focus-visible, .rx textarea:focus-visible, .rx summary:focus-visible, .rx-table:focus-visible { outline: 3px solid #eaa33d; outline-offset: 2px; }
.rx select, .rx input[type=text] { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; border-radius: 8px; border: 1px solid var(--rx-line); background: var(--rx-card); color: var(--rx-ink); padding: 6px 10px; max-width: 100%; }
.rx input[type=range] { width: 100%; min-height: 44px; margin: 0; accent-color: var(--rx-accent); }

/* start card */
.rx-gate { max-width: 1500px; margin: 8px auto 0; padding: clamp(14px, 3vw, 36px); border-radius: 22px; background: linear-gradient(140deg, #12324a, #0d6670 55%, #c9477a); }
.rx-gate-card { max-width: 980px; margin: 0 auto; padding: clamp(18px, 3vw, 34px); border-radius: 18px; background: var(--rx-card); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.rx-gate-card h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 6px 0; line-height: 1.15; }
.rx-gate-lede { font-size: 18px; color: var(--rx-muted); margin: 6px 0 0; }
.rx-gate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 12px; }
.rx-gate-grid button { appearance: none; text-align: left; font: inherit; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 2px solid var(--rx-line); border-radius: 14px; cursor: pointer; background: var(--rx-soft); color: var(--rx-ink); min-height: 44px; }
.rx-gate-grid button:hover { border-color: var(--rx-accent); }
.rx-gate-grid b { font-size: 19px; }
.rx-gate-grid span { color: var(--rx-muted); }

/* modes and tabs */
#workspace { max-width: 1500px; margin: 0 auto; }
.rx-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 2px 0 8px; }
.rx-modes-label { font-weight: 800; margin-right: 4px; }
.rx-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(--rx-line); background: var(--rx-card); color: var(--rx-ink); cursor: pointer; }
.rx-modes button.is-on { border-color: var(--rx-accent); background: var(--rx-accent); color: var(--rx-accent-ink); }
.rx-modes-note { color: var(--rx-muted); }
.rx-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 10px; }
.rx-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(--rx-line); background: var(--rx-card); color: var(--rx-ink); cursor: pointer; }
.rx-tabs button.is-on { background: var(--rx-ink); color: var(--rx-card); border-color: var(--rx-ink); }

/* bench */
.rx-stage { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.rx-stage--solo { grid-template-columns: minmax(0, 1fr); }
.rx-bench { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; background: var(--rx-card); border: 1px solid var(--rx-line); border-radius: 16px; padding: 12px; box-shadow: var(--rx-shadow); }
.rx-app { min-width: 0; display: grid; grid-template-columns: 380px 104px; gap: 8px; align-items: start; }
.rx-canvas-wrap { border-radius: 12px; overflow: hidden; border: 1px solid var(--rx-line); line-height: 0; background: var(--rx-soft); }
#scene { display: block; margin: 0 auto; }
.rx-buret { display: flex; flex-direction: column; gap: 6px; }
.rx-buret-label { font-weight: 800; line-height: 1.25; }
.rx .rx-buret .rx-btn { padding: 10px 4px; white-space: nowrap; }
.rx .rx-buret #newFlask { margin-top: 10px; }
.rx-plot { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rx-sw { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--rx-muted); vertical-align: -2px; background: transparent; }
.rx-graph h3 { margin: 0 0 4px; font-size: 16px; }
.rx-graph canvas, #bigCurve, #slopeChart { display: block; width: 100%; border-radius: 8px; }
.rx-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin-top: 4px; }
.rx-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rx-dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; background: var(--rx-no); }
.rx-dot--rec { background: var(--rx-card); border: 2px solid var(--rx-accent); }
.rx-reader label { font-weight: 800; display: block; }
.rx-readout { margin: 0; padding: 6px 10px; border-left: 4px solid var(--rx-sun); background: var(--rx-soft); border-radius: 8px; min-height: 2.6em; }
.rx-record { margin: 0; }
.rx-controls { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 18px; padding-top: 10px; border-top: 1px solid var(--rx-line); }
.rx-ctl { display: flex; flex-direction: column; gap: 2px; font-weight: 700; min-width: 0; }
.rx-ctl output { font-weight: 800; color: var(--rx-accent); }
.rx-caption { grid-column: 1 / -1; margin: 0; color: var(--rx-muted); }
.rx-flash { animation: rxFlash 2.4s ease-out; border-radius: 10px; }
@keyframes rxFlash { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 184, 0, 0); } 15%, 55% { box-shadow: 0 0 0 5px #ffb800; } }

/* coach */
.rx-coach { background: var(--rx-card); border: 1px solid var(--rx-line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--rx-shadow); min-width: 0; }
.rx-coach h2 { font-size: 19px; margin: 2px 0 4px; line-height: 1.25; }
.rx-coach h3 { font-size: 17px; margin: 12px 0 6px; }
.rx-goal { margin: 0 0 8px; }
.rx-next { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--rx-soft); border-left: 4px solid var(--rx-sun); }
.rx-next > b { color: var(--rx-sun); letter-spacing: .04em; text-transform: uppercase; }
.rx-next > #nextStep { font-weight: 800; font-size: 17px; }
.rx-next--done { border-left-color: var(--rx-ok); } .rx-next--done > b { color: var(--rx-ok); }
.rx-ask { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.rx-ask label { font-weight: 700; }
.rx-ask-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rx-ask-row input { width: 110px; } .rx-ask-row select { flex: 1 1 160px; min-width: 0; }
.rx-msg { min-height: 1.5em; margin: 8px 0; font-weight: 700; color: var(--rx-accent); }
.rx-steps { list-style: none; margin: 10px 0 0; padding: 0; }
.rx-steps li { padding: 3px 0; color: var(--rx-muted); }
.rx-steps li.done { color: var(--rx-ok); font-weight: 700; }
.rx-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.rx-cards li { border: 1px dashed var(--rx-line); border-radius: 10px; padding: 8px 10px; }
.rx-cards li span { display: block; color: var(--rx-muted); }
.rx-cards li.done { border-style: solid; border-color: var(--rx-ok); }

/* panels: pre-lab, notebook, CER, test */
.rx-panel { background: var(--rx-card); border: 1px solid var(--rx-line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--rx-shadow); }
.rx-panel h2 { margin: 4px 0 8px; font-size: 22px; line-height: 1.2; }
.rx-panel h3 { margin: 14px 0 6px; font-size: 18px; }
.rx-pre-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 8px 28px; }
.rx-pre-grid p { margin: 0 0 8px; }
.rx-term { color: var(--rx-accent); }
.rx-vocab { margin: 0; } .rx-vocab dt { font-weight: 800; } .rx-vocab dd { margin: 0 0 6px; color: var(--rx-muted); }
.rx-pred { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--rx-line); border-radius: 12px; padding: 12px; background: var(--rx-soft); }
.rx-pred label { font-weight: 700; }
.rx-pred .rx-msg { margin: 2px 0 0; }
.rx-safety { margin: 0; padding-left: 20px; }
.rx-links { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--rx-line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.rx-links b { white-space: nowrap; }
.rx-dialog .rx-links { display: block; }
.rx-data-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px; }
.rx-data-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 22px; }
.rx-data-grid > div:last-child { max-width: 820px; }
.rx-table { overflow: auto; max-height: 360px; border: 1px solid var(--rx-line); border-radius: 10px; }
.rx table { width: 100%; border-collapse: collapse; font-size: 16px; }
.rx th, .rx td { padding: 7px 10px; border-bottom: 1px solid var(--rx-line); text-align: left; color: var(--rx-ink); vertical-align: top; }
.rx th { background: var(--rx-soft); font-weight: 800; }
.rx td.rx-empty { text-align: center; color: var(--rx-muted); }
.rx-cer-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rx-cer-head > div { flex: 1 1 320px; }
.rx-checklist { list-style: none; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--rx-soft); flex: 1 1 320px; }
.rx-checklist li { padding: 2px 0; color: var(--rx-muted); }
.rx-checklist li.done { color: var(--rx-ok); font-weight: 700; }
.rx-pick { margin-top: 10px; }
.rx-pick summary { cursor: pointer; font-weight: 800; min-height: 44px; display: flex; align-items: center; }
.rx-pick label { display: flex; gap: 8px; align-items: flex-start; padding: 10px 0; min-height: 44px; }
.rx-pick input { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 2px; accent-color: var(--rx-accent); }
.rx-pick .rx-msg { margin: 0; }
.rx-cer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.rx-cer-grid label { display: flex; flex-direction: column; font-weight: 800; }
.rx-cer-grid small { font-weight: 500; color: var(--rx-muted); }
.rx-cer-grid textarea { font: 16px/1.45 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 150px; padding: 10px; margin-top: 4px; border: 1px solid var(--rx-line); border-radius: 10px; background: var(--rx-card); color: var(--rx-ink); resize: vertical; }
.rx-turnin { margin-top: 12px; }
.rx-done { margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--rx-ok); background: var(--rx-soft); }
.rx-done h3 { margin-top: 0; }
.rx-test { margin-top: 14px; max-width: 980px; }
.rx-test-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.rx-test-head h2 small { font-size: 18px; color: var(--rx-muted); }
.rx-progress { flex: 0 1 260px; height: 10px; background: var(--rx-soft); border-radius: 999px; overflow: hidden; border: 1px solid var(--rx-line); }
.rx-progress i { display: block; height: 100%; background: var(--rx-accent); }
.rx-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"] .rx-tag { background: #4a3510; color: #ffe2a8; }
.rx-q { font-size: 19px; font-weight: 700; margin: 12px 0; }
.rx-q b { color: var(--rx-accent); }
.rx-run { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.rx-choices { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.rx-choice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 48px; border: 2px solid var(--rx-line); border-radius: 12px; cursor: pointer; background: var(--rx-card); position: relative; }
.rx-choice input { position: absolute; opacity: 0; pointer-events: none; }
.rx-choice:focus-within { outline: 3px solid #eaa33d; outline-offset: 2px; }
.rx-choice.is-picked { border-color: var(--rx-accent); background: var(--rx-soft); }
.rx-choice.ok { border-color: var(--rx-ok); } .rx-choice.no { border-color: var(--rx-no); }
.rx-choice em { margin-left: auto; font-style: normal; font-weight: 900; font-size: 20px; }
.rx-choice.ok em { color: var(--rx-ok); } .rx-choice.no em { color: var(--rx-no); }
.rx-letter { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--rx-soft); border: 1px solid var(--rx-line); }
.rx-choices:disabled .rx-choice { cursor: default; }
.rx-numrow { display: flex; flex-wrap: wrap; gap: 12px; }
.rx-numrow label { display: flex; flex-direction: column; font-weight: 700; gap: 2px; }
.rx-numrow input { width: 160px; }
.rx-explain { padding: 10px 12px; border-radius: 10px; background: var(--rx-soft); margin: 12px 0 0; }
.rx-explain.ok { border-left: 4px solid var(--rx-ok); } .rx-explain.no { border-left: 4px solid var(--rx-no); } .rx-explain--need { border-left: 4px solid var(--rx-sun); font-weight: 700; }
.rx-test-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }
.rx-test-nav .rx-btn--pri { margin-left: auto; }
.rx-review { padding-left: 26px; }
.rx-review li { margin: 10px 0; }
.rx-review li.ok > b { color: var(--rx-ok); } .rx-review li.no > b { color: var(--rx-no); }

/* dialogs */
.rx-dialog { max-width: 720px; width: calc(100vw - 32px); 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"] .rx-dialog { background: #172633; color: #e6eef3; }
html[data-theme="dark"] .rx-dialog a { color: #8fd6f0; }
.rx-dialog::backdrop { background: rgba(6, 21, 37, .7); }
.rx-dialog h2 { margin-top: 0; overflow: hidden; min-height: 44px; }
.rx-dialog .rx-links a { display: block; padding: 4px 0; }
.rx-dialog a { font-weight: 700; }
.rx-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: 1180px) {
  .rx-stage { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .rx-bench { grid-template-columns: minmax(0, 1fr); }
  .rx-app { grid-template-columns: minmax(0, 420px) 104px; justify-content: center; }
  .rx-gate-grid, .rx-cer-grid, .rx-pre-grid, .rx-data-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .rx-app { grid-template-columns: minmax(0, 1fr); }
  .rx-buret { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rx-buret-label, .rx .rx-buret #newFlask { grid-column: 1 / -1; margin-top: 0; }
  .rx-tabs button { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { .rx * { transition: none !important; animation: none !important; } }
@media print { .rx-bench, .rx-tabs, .rx-modes, .rx-actions, .rx-turnin { display: none !important; } }

/* the site's "Sign in to save your progress" chip docks here, in the page flow, so it never floats over the bench */
.rx-signin:empty { display: none; }
.rx-signin .tlg-signin-note { margin: 0; }

/* short labels on phones so the bench starts higher up the page */
.rx-narrow { display: none; }
@media (max-width: 560px) {
  .rx-wide { display: none; }
  .rx-narrow { display: inline; }
  .rx-modes-note { display: none; }
  .rx-bar { gap: 6px 8px; padding-top: 6px; }
  .rx .rx-actions .rx-btn { padding: 10px 12px; }
}

/* ── Redox Titration Lab additions ── */
.rx-gate { background: linear-gradient(140deg, #2a0a3a, #5b1270 45%, #0d6670); }
.rx-gate-top { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; }
.rx-gate-swatches { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.rx-gate-swatches span { display: block; width: 46px; height: 30px; border-radius: 0 0 14px 14px; border: 2px solid rgba(80,100,120,.45); }
.rx-app { grid-template-columns: minmax(0, 440px) 116px; }
.rx-bench { grid-template-columns: auto minmax(0, 1fr); }
.rx-side { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.rx-now { margin: 0; padding: 8px 10px; border-left: 4px solid #8e2a8f; background: var(--rx-soft); border-radius: 8px; min-height: 2.6em; }
.rx-sw { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--rx-muted); vertical-align: -3px; margin-right: 2px; }
.rx-controls { grid-column: auto; display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; }
.rx-mini h3, .rx-data h3 { margin: 0 0 4px; font-size: 17px; }
.rx-mini canvas, #bigGraph { display: block; width: 100%; border-radius: 8px; border: 1px solid var(--rx-line); }
.rx .rx-buret #recordBtn { margin-top: 10px; white-space: normal; line-height: 1.2; }
.rx .rx-buret #newTrial { margin-top: 0; }
.rx-eqcard { grid-column: 1 / -1; padding: 10px 14px; border-radius: 12px; background: var(--rx-soft); border: 1px solid var(--rx-line); }
.rx-eqcard h3 { margin: 0 0 4px; font-size: 17px; }
.rx-eq { margin: 4px 0; font-size: 18px; line-height: 1.9; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.rx-eq--all { font-weight: 800; color: var(--rx-accent); }
.rx-eq-tag { display: inline-block; font-size: 16px; font-weight: 800; padding: 0 8px; border-radius: 999px; margin-right: 4px; }
.rx-eq-tag--red { background: #f1dcf3; color: #5b1270; }
.rx-eq-tag--ox { background: #dcefe3; color: #1f5e36; }
html[data-theme="dark"] .rx-eq-tag--red { background: #4a1f52; color: #f3d2f6; }
html[data-theme="dark"] .rx-eq-tag--ox { background: #1f4a30; color: #c8f0d6; }
.rx-ox { font-size: 16px; color: var(--rx-muted); font-weight: 700; }
.rx-blank { display: inline-block; min-width: 34px; text-align: center; border-bottom: 2px dashed var(--rx-sun); color: var(--rx-sun); font-weight: 800; }
.rx-eqbox { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--rx-soft); border-left: 4px solid #8e2a8f; font-weight: 700; }
.rx-ask-label { font-weight: 700; }
.rx-pickset { display: grid; gap: 6px; margin: 4px 0; }
.rx-opt { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; min-height: 44px; border: 2px solid var(--rx-line); border-radius: 10px; background: var(--rx-card); cursor: pointer; font-weight: 600; }
.rx-opt input { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 2px; accent-color: var(--rx-accent); }
.rx-opt:has(input:checked) { border-color: var(--rx-accent); }
.rx-opt:focus-within { outline: 3px solid #eaa33d; outline-offset: 2px; }
.rx-ask--x { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rx-line); }
.rx-fig { margin: 8px 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.rx-fig canvas { border-radius: 50%; }
.rx-fig figcaption { color: var(--rx-muted); flex: 1 1 200px; }
.rx-data-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1180px) { .rx-data-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .rx-app { grid-template-columns: minmax(0, 440px) 116px; } }
@media (max-width: 560px) {
  .rx-app { grid-template-columns: minmax(0, 1fr); }
  .rx-buret { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rx-buret-label, .rx .rx-buret #recordBtn, .rx .rx-buret #newTrial { grid-column: span 2; margin-top: 0; }
  .rx-buret-label { grid-column: 1 / -1; }
  .rx-gate-swatches { display: none; }
}
.rx-mini, .rx-data-grid > div { min-width: 0; } .rx-mini canvas, #bigGraph { max-width: 100%; }
@media (max-width: 860px) { .rx-bench { grid-template-columns: minmax(0, 1fr); } .rx-app { justify-content: center; } }
.rx-nextmini { display: none; margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--rx-soft); border-left: 4px solid var(--rx-sun); }
.rx-nextmini b { color: var(--rx-sun); }
@media (max-width: 1180px) { .rx-nextmini { display: block; } }
.rx-nextmini { flex-direction: column; gap: 2px; }
@media (max-width: 1180px) { .rx-nextmini { display: flex; } }
.rx-nextmini > * { display: block; }
.rx-nextmini a { align-self: flex-start; min-height: 44px; display: flex; align-items: center; }
.rx-now { display: flex; flex-direction: column; gap: 2px; font-weight: 700; }
.rx-now-row { display: flex; align-items: center; gap: 8px; }
