/* Stoichiometry Yield Lab. Classes are zsa-sy-. Load after zsa-base.css and zsa-lab-a11y.css.
   A lab bench holds the balance, the beaker, the funnel over a flask and the drying oven. What is in the beaker, the
   color of the solution and where the copper is are also told in words (the drawing's title, the observations and the
   balance display), 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-sy {--zsa-max-width:1200px; --sy-ink:#0f2540; --sy-bench:#e4ebef; --sy-line:#cbd5e1; --sy-teal:#0d6466;
  --sy-green:#166534; --sy-amber:#9a3412; background:#eef2f5; color:#1e293b; font-size:17px;}
body:has(.zsa-sy) {background:#eef2f5;}
.zsa-sy [hidden] {display:none!important;}
.zsa-sy h2 {font-size:clamp(22px,2.2vw,28px); font-weight:650; margin:0 0 8px; letter-spacing:-.02em;}
.zsa-sy h3 {font-size:18px; font-weight:650; margin:0 0 6px;}
.zsa-sy p {margin:8px 0;}
.zsa-sy-icon {width:20px; height:20px; flex:0 0 20px;}
.zsa-sy .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-sy .zsa-btn--primary {background:var(--sy-teal); border-color:var(--sy-teal);}
.zsa-sy .zsa-btn--primary:hover:not(:disabled) {background:#0a4a4c;}
.zsa-sy .zsa-sy-busy {background:#475569; border-color:#475569; cursor:progress;}
.zsa-sy .zsa-sy-busy:hover {background:#475569;}
.zsa-sy-row {display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:14px 0 4px;}
.zsa-sy-small {font-size:15px; color:#475569;}
.zsa-sy-eyebrow {font-size:13px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--sy-teal); margin:0 0 2px;}

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

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

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

/* The bench */
.zsa-sy-bench {min-width:0; background:var(--sy-bench); border:1px solid #b8cbd6; border-radius:16px; padding:14px; color:var(--sy-ink);}
.zsa-sy .zsa-sy-benchtitle {font-size:20px; margin:0 0 10px;}
.zsa-sy-scenebox {display:grid; gap:10px; background:white; border:1px solid var(--sy-line); border-radius:14px; padding:8px;}
.zsa-sy-scene {display:block; width:100%; height:auto; border-radius:10px;}
.zsa-sy-svglabel {font-size:24px; font-weight:650; fill:#1e293b;}
.zsa-sy-readout {font-size:19px; font-family:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace; fill:#86efac;}
.zsa-sy-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-sy .zsa-sy-meterlabel {margin:0; font-size:14px; color:#bbf7d0; letter-spacing:.04em; flex:1 1 100%;}
.zsa-sy .zsa-sy-display {margin:0; font-size:36px; font-weight:700; line-height:1.1; font-family:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace; color:#4ade80;}
.zsa-sy-unit {font-size:22px;}
.zsa-sy .zsa-sy-meternote {margin:0; color:#d1fae5;}

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

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