/* Chemical Equilibrium Lab styles (structure shared with the Greenhouse and Seasons labs). */
.eq {
  --eq-ink: #14263a; --eq-muted: #4b6075; --eq-paper: #eef4f7; --eq-card: #ffffff; --eq-line: #cfdce4;
  --eq-accent: #0d6670; --eq-accent-ink: #ffffff; --eq-sun: #e89a2c; --eq-soft: #f3f7f9; --eq-ok: #1f7a3d; --eq-no: #b3261e;
  --eq-shadow: 0 1px 2px rgba(16, 40, 60, .06), 0 8px 24px rgba(16, 40, 60, .07);
  color: var(--eq-ink); font: 16px/1.5 "Atkinson Hyperlegible", system-ui, sans-serif;
  background: radial-gradient(ellipse 90% 60% at 50% -10%, #dcebf3, var(--eq-paper) 70%);
  padding: 0 clamp(12px, 2vw, 28px) 56px; min-height: 70vh;
}
html[data-theme="dark"] .eq {
  --eq-ink: #e6eef3; --eq-muted: #aabdca; --eq-paper: #0f1b26; --eq-card: #172633; --eq-line: #33495a;
  --eq-accent: #3fb5a3; --eq-accent-ink: #062521; --eq-soft: #1d3040; --eq-ok: #7fdc9a; --eq-no: #ff9b93;
  --eq-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(--eq-paper) 70%);
}
.eq *, .eq *::before, .eq *::after { box-sizing: border-box; }
.eq [hidden] { display: none !important; }
.eq h1, .eq h2, .eq h3 { color: var(--eq-ink); font-family: inherit; }
.eq-eyebrow { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: .08em; color: var(--eq-accent); }
.eq-muted { color: var(--eq-muted); }

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

/* buttons */
.eq .eq-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(--eq-line); background: var(--eq-card); color: var(--eq-ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.eq .eq-btn:hover { border-color: var(--eq-accent); }
.eq .eq-btn:disabled { opacity: .5; cursor: not-allowed; }
.eq .eq-btn--pri { background: var(--eq-accent); border-color: var(--eq-accent); color: var(--eq-accent-ink); }
.eq .eq-btn--ghost { background: transparent; }
.eq .eq-btn--small { min-height: 36px; padding: 6px 12px; margin-top: 6px; }
.eq button:focus-visible, .eq a:focus-visible, .eq input:focus-visible, .eq select:focus-visible, .eq textarea:focus-visible { outline: 3px solid #eaa33d; outline-offset: 2px; }

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

/* tabs */
#workspace { max-width: 1500px; margin: 0 auto; }
.eq-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; }
.eq-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(--eq-line); background: var(--eq-card); color: var(--eq-ink); cursor: pointer; }
.eq-tabs button.is-on { background: var(--eq-ink); color: var(--eq-card); border-color: var(--eq-ink); }

/* stage */
.eq-stage { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.eq-scene { background: #0a1a30; border-radius: 16px; overflow: hidden; box-shadow: var(--eq-shadow); color: #eaf3f8; }
.eq-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); }
.eq-views { display: flex; gap: 6px; flex-wrap: wrap; }
.eq-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; }
.eq-views button.is-on { background: #f3b54a; color: #1a1408; border-color: #f3b54a; }
.eq-transport { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.eq-scene .eq-btn { background: #16304d; border-color: rgba(255, 255, 255, .2); color: #eef6fb; min-height: 40px; padding: 8px 12px; }
.eq-scene .eq-btn:hover { border-color: #f3b54a; }
.eq-speed { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.eq-speed select, .eq-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; }
.eq-canvas-wrap { position: relative; }
#scene { display: block; width: 100%; touch-action: none; }
.eq-caption { margin: 0; padding: 10px 14px; background: #0d223b; color: #d6e6f1; border-top: 1px solid rgba(255, 255, 255, .08); min-height: 3.2em; }
.eq-controls { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 10px 14px 12px; background: #10263f; }
.eq-ctl input[type=range] { margin: 0; }
.eq-ctl { display: flex; flex-direction: column; gap: 2px; font-weight: 700; min-width: 210px; flex: 1 1 210px; }
.eq-ctl input[type=range] { width: 100%; accent-color: #f3b54a; min-height: 28px; }
.eq-out { font-weight: 800; color: #ffd27a; margin-left: 6px; }
.eq-check { display: flex; align-items: center; gap: 8px; font-weight: 700; align-self: center; }
.eq-check input { width: 20px; height: 20px; accent-color: #f3b54a; }

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

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

/* CER */
.eq-cer { margin-top: 14px; }
.eq-cer-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.eq-checklist { list-style: none; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--eq-soft); min-width: 280px; }
.eq-checklist li { padding: 2px 0; color: var(--eq-muted); }
.eq-checklist li.done { color: var(--eq-ok); font-weight: 700; }
.eq-cer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.eq-cer-grid label { display: flex; flex-direction: column; font-weight: 800; }
.eq-cer-grid small { font-weight: 500; color: var(--eq-muted); }
.eq-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(--eq-line); border-radius: 10px; background: var(--eq-card); color: var(--eq-ink); resize: vertical; }
.eq-turnin { margin-top: 12px; }

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

/* dialogs */
.eq-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"] .eq-dialog { background: #172633; color: #e6eef3; }
html[data-theme="dark"] .eq-dialog a { color: #8fd6f0; }
.eq-dialog::backdrop { background: rgba(6, 21, 37, .7); }
.eq-dialog h2 { margin-top: 0; }
.eq-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) {
  .eq-stage { grid-template-columns: minmax(0, 1fr); }
  .eq-metrics { grid-template-columns: repeat(3, 1fr); }
  .eq-work { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .eq-gate-grid, .eq-cer-grid { grid-template-columns: minmax(0, 1fr); }
  .eq-metrics { grid-template-columns: 1fr 1fr; }
  .eq-viewbar { flex-direction: column; align-items: stretch; }
  .eq-views button { flex: 1; }
  .eq-ctl { min-width: 0; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .eq * { transition: none !important; animation: none !important; } }
@media print { .eq-scene, .eq-tabs, .eq-actions, .eq-turnin { display: none !important; } }

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

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

/* Chemical Equilibrium Lab additions */
.eq-row--wrap { flex-wrap: wrap; }
.eq-dec { display: grid; gap: 6px; padding: 10px; border-radius: 10px; background: var(--eq-soft, rgba(120,160,200,.1)); margin: 8px 0; }
.eq-dec input[type=number] { font: inherit; font-size: 16px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--eq-line, #9ab); background: transparent; color: inherit; }
.eq-links a { white-space: nowrap; }
body.eq-printing .eq-stage, body.eq-printing .eq-tabs, body.eq-printing .eq-modes { display: none; }
#sideChart { display: block; width: 100%; }
.eq-coach, .eq-side > * { min-width: 0; }
.eq-cards li { overflow-wrap: anywhere; max-width: 100%; box-sizing: border-box; }
.eq-cards li select { max-width: 100%; }
@media (max-width: 640px) { .eq-zoom { bottom: auto; top: 96px; } }
.eq-graph { background: var(--eq-card); border: 1px solid var(--eq-line); border-radius: 12px; padding: 10px; box-shadow: var(--eq-shadow); }
.eq-graph h3 { margin: 0 0 6px; font-size: 18px; }
.eq-sys { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #d7e7f2; }
.eq-sys 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; max-width: 280px; }
.eq-adds { flex-direction: row !important; flex-wrap: wrap; gap: 8px; align-items: center; flex: 2 1 380px !important; }
.eq-adds .eq-btn { min-height: 40px; }
.eq-stresscard { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: var(--eq-soft); border-left: 4px solid var(--eq-sun); margin: 8px 0; }
.eq-stresscard select, .eq-coach select, .eq-coach input[type=number] { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; border-radius: 8px; border: 1px solid var(--eq-line); background: var(--eq-card); color: var(--eq-ink); padding: 6px 8px; max-width: 100%; }
.eq-predrow { display: flex; flex-wrap: wrap; gap: 6px; }
.eq .eq-pbtn { appearance: none; font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--eq-line); background: var(--eq-card); color: var(--eq-ink); cursor: pointer; }
.eq .eq-pbtn.is-on { border-color: var(--eq-accent); background: var(--eq-accent); color: var(--eq-accent-ink); }
.eq-ice { width: 100%; border-collapse: collapse; margin: 6px 0; }
.eq-ice th, .eq-ice td { padding: 4px 6px !important; text-align: center !important; font-size: 16px; }
.eq-pending { padding: 8px 10px; border-radius: 10px; border: 2px dashed var(--eq-sun); margin: 8px 0; }
.eq-coach { max-height: 560px; overflow: auto; }
.eq-side { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1.25fr) !important; }
@media (max-width: 1100px) { .eq-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; } }
@media (max-width: 760px) { .eq-side { grid-template-columns: minmax(0, 1fr) !important; } .eq-sys { width: 100%; } .eq-sys select { flex: 1; max-width: none; } }
.eq-ok { color: var(--eq-ok); font-weight: 800; } .eq-no { color: var(--eq-no); font-weight: 800; }

.eq-metric b { font-size: 19px; white-space: normal; overflow-wrap: anywhere; }
.eq-side .eq-metrics { grid-template-columns: 1fr 1fr; }
/* the site's "Sign in to save your progress" note sits in the title bar (page flow), never over the bench */
.eq-signin:empty { display: none; }
.eq-signin { margin-left: auto; display: flex; }
.eq-signin .tlg-signin-note--inline { margin: 0; }
