/* Molar Volume of Hydrogen Lab. Classes are zsa-mv-. Load after zsa-base.css and zsa-lab-a11y.css.
   A lab bench holds the analytical balance, a gas measuring tube clamped upside down in a beaker of water with a
   thermometer, a barometer on the wall and the supplies. The tube, the gas and the water levels are also told in words
   (the drawing's title, the Last reading display and the Data table), and feedback has ✓ or ↻ and words, so nothing
   relies on color or the picture alone. Text contrast is at least 4.5:1 (checked by axe in the tests). */
.zsa-mv {--zsa-max-width:1200px; --mv-ink:#0f2540; --mv-bench:#e4ebef; --mv-line:#cbd5e1; --mv-teal:#0d6466;
  --mv-green:#166534; --mv-amber:#9a3412; background:#eef2f5; color:#1e293b; font-size:17px;}
body:has(.zsa-mv) {background:#eef2f5;}
.zsa-mv [hidden] {display:none!important;}
.zsa-mv h2 {font-size:clamp(22px,2.2vw,28px); font-weight:650; margin:0 0 8px; letter-spacing:-.02em;}
.zsa-mv h3 {font-size:18px; font-weight:650; margin:0 0 6px;}
.zsa-mv p {margin:8px 0;}
.zsa-mv-icon {width:20px; height:20px; flex:0 0 20px;}
.zsa-mv .zsa-btn {display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:48px; padding:10px 16px; font-size:16px; line-height:1.25; border-radius:10px; text-align:left;}
.zsa-mv .zsa-btn--primary {background:var(--mv-teal); border-color:var(--mv-teal);}
.zsa-mv .zsa-btn--primary:hover:not(:disabled) {background:#0a4a4c;}
.zsa-mv .zsa-mv-busy {background:#475569; border-color:#475569; cursor:progress;}
.zsa-mv .zsa-mv-busy:hover {background:#475569;}
.zsa-mv-row {display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:14px 0 4px;}
.zsa-mv-small {font-size:15px; color:#475569;}
.zsa-mv-eyebrow {font-size:13px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--mv-teal); margin:0 0 2px;}

/* Run bar: run number, mode, metal and the lid error */
.zsa-mv-runbar {display:flex; flex-wrap:wrap; align-items:center; gap:12px 18px; margin:10px 0 12px;
  background:white; border:1px solid var(--mv-line); border-radius:14px; padding:12px 14px;}
.zsa-mv-barinfo {min-width:0; flex:1 1 220px;}
.zsa-mv .zsa-mv-barlabel {margin:0; font-size:20px; font-weight:650; color:var(--mv-ink); font-variant-numeric:tabular-nums;}
.zsa-mv .zsa-mv-barmeta {margin:2px 0 0; font-size:15px; color:#475569;}
.zsa-mv-toggle {display:flex; flex-wrap:wrap; gap:6px;}
.zsa-mv .zsa-mv-togglebtn {background:white; color:var(--mv-ink); border:2px solid #7d93ad;}
.zsa-mv .zsa-mv-togglebtn:hover {background:#f1f6fc;}
.zsa-mv .zsa-mv-togglebtn[aria-pressed="true"] {background:var(--mv-ink); border-color:var(--mv-ink); color:white;}
.zsa-mv-options {display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; flex:1 1 100%;}
.zsa-mv-error {display:flex; align-items:center; gap:10px; min-height:48px; padding:4px 10px; border:2px dashed var(--mv-amber); border-radius:10px; cursor:pointer; color:#7c2d12; font-weight:600;}
.zsa-mv-error input {width:22px; height:22px; flex:0 0 22px; margin:0; accent-color:var(--mv-amber);}
.zsa-mv .zsa-mv-optnote {margin:0;}
.zsa-mv-barside {display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:flex-end; margin-left:auto;}
.zsa-mv .zsa-mv-confirm {margin:0; font-size:15px; font-weight:600; color:var(--mv-amber); flex:1 1 100%; text-align:right;}

/* Progress track: where the student is (not buttons; the procedure runs in order) */
.zsa-mv-tracknav {margin:0 0 14px;}
.zsa-mv-track {display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; list-style:none; margin:0; padding:0;}
.zsa-mv-trackstep {position:relative; min-height:52px; display:flex; align-items:center; gap:8px; padding:6px 10px;
  border:2px solid var(--mv-line); border-radius:12px; background:white; color:var(--mv-ink); font-size:15px; line-height:1.2;}
.zsa-mv-trackstep[aria-current="step"] {background:var(--mv-ink); border-color:var(--mv-ink); color:white;}
.zsa-mv-tracknum {display:inline-flex; align-items:center; justify-content:center; flex:0 0 28px; height:28px; border-radius:50%; border:2px solid currentColor; font-weight:700;}
.zsa-mv-trackdone {position:absolute; top:-9px; right:-7px; display:inline-flex; width:22px; height:22px; border-radius:50%; background:var(--mv-green); color:white; border:2px solid white; align-items:center; justify-content:center;}
.zsa-mv-trackdone .zsa-mv-icon {width:14px; height:14px; flex-basis:14px;}
@media (max-width:640px) { .zsa-mv-track {grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:420px) { .zsa-mv-trackstep {font-size:14px; padding:6px 8px; gap:6px; overflow-wrap:anywhere;} .zsa-mv-tracknum {flex-basis:24px; height:24px;} }

/* Layout: bench and task card side by side on wide screens */
.zsa-mv-layout {display:grid; gap:18px; align-items:start;}
@media (min-width:980px) { .zsa-mv-layout {grid-template-columns:minmax(0,1.35fr) minmax(360px,1fr);} }
@media (max-width:979px) { .zsa-mv-layout--task-first .zsa-mv-taskcard {order:-1;} }

/* The bench */
.zsa-mv-bench {min-width:0; background:var(--mv-bench); border:1px solid #b8cbd6; border-radius:16px; padding:14px; color:var(--mv-ink);}
.zsa-mv .zsa-mv-benchtitle {font-size:20px; margin:0 0 10px;}
.zsa-mv-scenebox {display:grid; gap:10px; background:white; border:1px solid var(--mv-line); border-radius:14px; padding:8px;}
.zsa-mv-scene {display:block; width:100%; height:auto; border-radius:10px;}
.zsa-mv-svglabel {font-size:24px; font-weight:650; fill:#1e293b;}
.zsa-mv-readout {font-size:19px; font-family:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace; fill:#86efac;}
.zsa-mv-tiny {font-size:13px; font-weight:600; fill:#1e293b;}
.zsa-mv-closenum {font-size:15px; font-weight:700; fill:#1e293b;}
.zsa-mv-tinylight {font-size:15px; font-weight:650; fill:#e2e8f0;}
.zsa-mv-fizz {animation:zsa-mv-rise .6s linear infinite;}
@keyframes zsa-mv-rise {from {transform:translateY(6px); opacity:.5;} to {transform:translateY(-6px); opacity:1;}}
@media (prefers-reduced-motion:reduce) { .zsa-mv-fizz {animation:none;} }
.zsa-mv-meter {display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 14px; background:#0b1d12; color:#4ade80; border-radius:12px; padding:8px 14px; font-variant-numeric:tabular-nums;}
.zsa-mv .zsa-mv-meterlabel {margin:0; font-size:14px; color:#bbf7d0; letter-spacing:.04em; flex:1 1 100%;}
.zsa-mv .zsa-mv-display {margin:0; font-size:32px; font-weight:700; line-height:1.1; font-family:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace; color:#4ade80;}
.zsa-mv-unit {font-size:22px;}
.zsa-mv .zsa-mv-meternote {margin:0; color:#d1fae5;}

/* Tables */
.zsa-mv-tablewrap {overflow-x:auto; margin:12px 0 0; max-width:100%; background:white; border:1px solid var(--mv-line); border-radius:12px; padding:0 10px 6px;}
.zsa-mv-table {border-collapse:collapse; width:100%; font-size:15px; font-variant-numeric:tabular-nums;}
.zsa-mv-table caption {text-align:left; font-weight:700; padding:8px 0; color:var(--mv-ink);}
.zsa-mv-table th, .zsa-mv-table td {padding:6px 8px; border-top:1px solid var(--mv-line); text-align:right; vertical-align:middle;}
.zsa-mv-table th[scope="row"], .zsa-mv-table thead th:first-child, .zsa-mv-table td[colspan] {text-align:left;}
.zsa-mv-table th[scope="row"] {font-weight:600;}
.zsa-mv-table thead th {background:#f1f5f9; color:var(--mv-ink); font-size:14px;}

.zsa-mv-vapor {max-width:360px;}
/* Task card */
.zsa-mv-taskcard {background:white; border:1px solid var(--mv-line); border-radius:16px; padding:16px 18px; min-width:0; box-shadow:0 6px 18px #0f25400f;}
.zsa-mv-taskcard h2:focus-visible {outline:3px solid #1d4ed8; outline-offset:2px;}
.zsa-mv .zsa-mv-next {font-weight:650; color:var(--mv-ink);}
.zsa-mv-steps {margin:8px 0; padding:8px 12px 8px 32px; border-left:4px solid var(--mv-teal); background:#f0f9f9; border-radius:0 10px 10px 0; color:var(--mv-ink);}
.zsa-mv-steps li {margin:4px 0;}
.zsa-mv-choices {margin:12px 0; padding:8px 12px 10px; border:1px solid var(--mv-line); border-radius:12px;}
.zsa-mv-choices legend {font-weight:650; color:var(--mv-ink); padding:0 4px;}
.zsa-mv-choice {display:flex; align-items:flex-start; gap:10px; min-height:44px; padding:8px 6px; border-radius:8px; cursor:pointer; line-height:1.35; font-variant-numeric:tabular-nums;}
.zsa-mv-choice:hover {background:#f1f6fc;}
.zsa-mv-choice input {width:22px; height:22px; flex:0 0 22px; margin:1px 0 0; accent-color:var(--mv-teal);}
.zsa-mv-feedback {margin:6px 0; padding:6px 10px; border-radius:8px; font-size:15px;}
.zsa-mv-feedback--good {background:#f0fdf4; border:1px solid #86efac; color:#14532d;}
.zsa-mv-feedback--retry {background:#fff7ed; border:1px solid #fdba74; color:#7c2d12;}
.zsa-mv-mark {font-weight:800;}
.zsa-mv .zsa-mv-work {padding:8px 12px; border-radius:10px; background:#f1f5f9; border:1px solid var(--mv-line); font-variant-numeric:tabular-nums;}
.zsa-mv-done {margin-top:14px; padding-top:6px; border-top:1px solid var(--mv-line);}
/* Copy my data (shared/zsa-labkit.js) */
.zsa-mv-data {margin-top:18px; padding:10px 12px; border:1px solid var(--mv-line); border-radius:12px; background:#f8fafc;}
.zsa-mv-datatable {border-collapse:collapse; width:100%; font-size:14px;}
.zsa-mv-datatable th, .zsa-mv-datatable td {padding:4px 6px; border-top:1px solid var(--mv-line); text-align:left; vertical-align:top; overflow-wrap:anywhere;}
.zsa-mv-datatable th {width:42%; color:var(--mv-ink);}
.zsa-mv-copystatus {font-size:15px; color:var(--mv-green); min-height:1.4em;}
/* Lab check (?check=1) */
.zsa-mv-checkmount:not(:empty) {margin:18px 0 0;}
/* About this model */
.zsa-mv > .zsa-mv-model {margin:18px 0 0; padding:4px 14px; background:white; border:1px solid var(--mv-line); border-radius:12px;}
.zsa-mv-model summary {cursor:pointer; min-height:44px; display:flex; align-items:center; gap:8px; font-weight:650; color:var(--mv-ink);}
@media (max-width:480px) {
  .zsa-mv {padding-left:10px; padding-right:10px;}
  .zsa-mv-bench {padding:10px;}
  .zsa-mv-taskcard {padding:12px;}
  .zsa-mv .zsa-mv-display {font-size:30px;}
  .zsa-mv-table th, .zsa-mv-table td {padding:5px 5px;}
  .zsa-mv-barside {margin-left:0;}
}
