/* Area Model — Student Quizzes (shared by the Area Model page and the Area & Perimeter page).
   Same shell and tokens as the other MMT student quizzes (Counting Strategies). */
:root{
  --bg:#f8fafc; --card:#ffffff; --ink:#0f172a; --muted:#64748b; --border:#e2e8f0;
  --shadow:0 18px 45px rgba(15,23,42,.13);
  --blue:#2563eb; --blue-dark:#1d4ed8;
  --green:#22c55e; --green-dark:#15803d;
  --purple:#7c3aed; --purple-dark:#5b21b6;
  --orange:#f97316; --orange-dark:#c2410c;
  --red:#dc2626; --line:#334155; --line-soft:#94a3b8;
  --sweet:#16a34a; --mild:#d97706; --medium:#ea580c; --spicy:#b91c1c;
  --uiFont:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --mathFont:"STIX Two Math","Cambria Math","Latin Modern Math","Times New Roman",Georgia,serif;
}
*{ box-sizing:border-box; }
html,body{ min-height:100%; }
body{
  margin:0; font-family:var(--uiFont); color:var(--ink);
  background:
    radial-gradient(circle at top left,rgba(37,99,235,.14),transparent 32rem),
    radial-gradient(circle at top right,rgba(124,58,237,.12),transparent 34rem),
    var(--bg);
  overflow-x:hidden;
}
button,input,select{ font:inherit; }
[hidden]{ display:none !important; }
.app{ min-height:100dvh; display:flex; flex-direction:column; }

/* ---------- topbar (shared MMT shell) ---------- */
.mmtTopbar{
  position:relative; z-index:40;
  background:linear-gradient(135deg,#0f172a,#123b7a 55%,#2563eb);
  color:white; padding:14px 24px;
  display:grid; grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center; gap:16px; box-shadow:0 10px 28px rgba(15,23,42,.22);
}
.mmtBrand{ display:flex; align-items:center; gap:12px; justify-self:start;
  text-decoration:none; color:white; border-radius:14px; padding:8px 12px; margin-left:-12px; font-weight:900; }
.mmtBrand:hover{ background:rgba(255,255,255,.12); }
.mmtBrandLogo{ width:44px; height:44px; border-radius:9px; background:white; color:#1d4ed8;
  display:grid; place-items:center; font-weight:1000; letter-spacing:-.08em; flex:0 0 auto; }
.mmtBrandText strong{ display:block; font-size:1.18rem; line-height:1; letter-spacing:-.03em; color:white; }
.mmtBrandText span{ display:block; font-size:.78rem; opacity:.82; font-weight:650; color:white; }
.mmtTopTitle{ font-weight:850; font-size:clamp(1rem,1.7vw,1.36rem); letter-spacing:-.035em; text-align:center; color:white; white-space:nowrap; }
.topActions{ justify-self:end; display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:nowrap; }
.btn{ appearance:none; border:1px solid rgba(255,255,255,.28); background:rgba(255,255,255,.14);
  color:white; padding:11px 15px; border-radius:14px; font-weight:900; font-size:15px; cursor:pointer; transition:.18s ease; white-space:nowrap; }
.btn:hover:not(:disabled){ background:rgba(255,255,255,.22); transform:translateY(-1px); }
.btn-primary{ background:white; color:#1d4ed8; border-color:white; }
.menuWrap{ position:relative; display:inline-flex; }
.dropMenu{ position:absolute; top:calc(100% + 8px); right:0; min-width:280px; background:#fff; color:var(--ink);
  border:1px solid rgba(226,232,240,.95); border-radius:14px; box-shadow:0 18px 45px rgba(15,23,42,.22);
  padding:7px; display:none; z-index:120; text-align:left; }
.dropMenu.open{ display:grid; gap:4px; }
.toolLink{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px;
  border-radius:10px; color:var(--ink); text-decoration:none; font-weight:900; font-size:.9rem; }
.toolLink::after{ content:'\203A'; color:var(--blue); font-weight:1000; font-size:1.1rem; }
.toolLink:hover{ background:#eef2ff; color:#1d4ed8; }
.toolLink small{ display:block; font-weight:650; font-size:.74rem; color:var(--muted); }

.lvlChip{ font-weight:1000; font-size:.82rem; padding:6px 13px; border-radius:999px;
  background:#fff; border:1px solid rgba(255,255,255,.3); color:var(--blue-dark); white-space:nowrap; }
.lvlChip.sweet{ color:var(--sweet); } .lvlChip.mild{ color:var(--mild); }
.lvlChip.medium{ color:var(--medium); } .lvlChip.spicy{ color:var(--spicy); }

.progressWrap{ height:6px; background:rgba(15,23,42,.10); }
.progressFill{ height:100%; width:0%; background:linear-gradient(90deg,var(--blue),var(--purple)); transition:width .3s ease; }

/* ---------- layout ---------- */
.layout{ flex:1; width:min(1380px,100%); margin:0 auto; padding:14px 20px 18px;
  display:flex; flex-direction:column; gap:11px; min-width:0; }
.headRow{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.qCounter{ font-size:.86rem; font-weight:950; color:var(--muted); white-space:nowrap; }
.promptBar{ flex:1 1 320px; display:flex; align-items:center; gap:12px; padding:9px 16px; border-radius:16px;
  background:linear-gradient(135deg,rgba(37,99,235,.10),rgba(124,58,237,.08));
  border:1px solid rgba(37,99,235,.20); font-weight:850; color:var(--line); font-size:.98rem; min-height:44px; line-height:1.35; }
.promptBar .pIco{ font-size:1.2rem; flex:0 0 auto; }
.promptBar.good{ background:linear-gradient(135deg,rgba(34,197,94,.16),rgba(37,99,235,.06)); border-color:rgba(21,128,61,.28); color:var(--green-dark); }
.promptBar.bad{ background:linear-gradient(135deg,rgba(220,38,38,.13),rgba(249,115,22,.07)); border-color:rgba(185,28,28,.28); color:#991b1b; }
.promptBar.warn{ background:#fffbeb; border-color:#fde68a; color:#92400e; }

.work{ display:grid; grid-template-columns:minmax(330px,0.86fr) minmax(0,1.14fr); gap:12px; align-items:start; }

/* ---------- the question ---------- */
.qCard{ background:var(--card); border:1px solid var(--border); border-radius:22px; box-shadow:var(--shadow);
  padding:16px 18px 14px; display:flex; flex-direction:column; gap:12px; min-width:0; overflow-y:auto; overscroll-behavior:contain; }
.qCard > *{ flex:0 0 auto; }
.part.folded{ gap:5px; padding-top:8px; padding-bottom:8px; }
.doneLine{ font-size:.95rem; font-weight:800; color:var(--green-dark); line-height:1.5; }
.doneLine .eq{ font-size:1.12rem; }
.qText{ font-size:clamp(1.08rem,1.6vw,1.3rem); font-weight:900; line-height:1.38; color:var(--ink); }
.eq{ font-family:var(--mathFont); font-weight:500; white-space:nowrap; }
.qText .eq{ font-size:1.18em; }
.cx{ color:var(--blue-dark); } .cy{ color:var(--orange-dark); }
.qSub{ font-size:.92rem; font-weight:800; color:var(--muted); line-height:1.45; }
.qSub b{ color:var(--line); }
.working{ font-family:var(--mathFont); font-size:1.28rem; color:var(--line); background:#f8fafc; border:1.5px dashed var(--border);
  border-radius:12px; padding:8px 12px; line-height:1.45; }

.part{ border:1.5px solid var(--border); border-radius:16px; padding:11px 13px; display:flex; flex-direction:column; gap:9px; background:#fff; }
.part.current{ border-color:#bfdbfe; box-shadow:0 0 0 4px rgba(37,99,235,.08); }
.part.ok{ border-color:#bbf7d0; background:#f7fdf9; }
.part.no{ border-color:#fecaca; background:#fffafa; }
.stepHead{ display:flex; align-items:center; gap:8px; font-weight:950; font-size:.95rem; color:var(--line); }
.stepNum{ display:inline-grid; place-items:center; width:24px; height:24px; border-radius:8px; background:var(--blue); color:#fff; font-size:.8rem; flex:0 0 auto; }
.part.ok .stepNum{ background:var(--green-dark); }
.part.no .stepNum{ background:var(--red); }
.stepTitle{ min-width:0; }
.stepMark{ margin-left:auto; font-size:.86rem; font-weight:950; white-space:nowrap; }
.part.ok .stepMark{ color:var(--green-dark); }
.part.no .stepMark{ color:var(--red); }
.fix{ font-size:.9rem; font-weight:850; color:#7f1d1d; background:#fef2f2; border-radius:10px; padding:8px 11px; line-height:1.45; }
.fix .eq{ font-size:1.08rem; }
.waitNote{ font-size:.92rem; font-weight:850; color:#1e40af; background:#eff6ff; border:1.5px dashed #bfdbfe; border-radius:12px; padding:10px 12px; line-height:1.45; }

/* number boxes */
.cell{ appearance:none; border:2px solid var(--border); background:#fff; border-radius:12px; padding:6px 6px;
  font-family:var(--mathFont); font-size:1.28rem; color:var(--ink); text-align:center; width:96px; min-width:0; }
.cell:focus-visible{ outline:none; border-color:var(--blue); box-shadow:0 0 0 4px rgba(37,99,235,.16); }
.cell.right{ border-color:var(--green); background:#f0fdf4; color:var(--green-dark); }
.cell.wrong{ border-color:var(--red); background:#fef2f2; color:var(--red); }
.cell.sm{ width:72px; }
.cell::placeholder{ color:#cbd5e1; }

/* one product per piece */
.prodGrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(178px,1fr)); gap:7px; }
.prodRow{ display:flex; align-items:center; gap:7px; border:1.5px solid var(--border); border-radius:12px; padding:5px 8px; background:#fff; transition:border-color .12s ease; }
.prodRow.hl{ border-color:#0f172a; }
.prodRow .sw{ width:14px; height:14px; border-radius:4px; border:1.5px solid rgba(15,23,42,.2); flex:0 0 auto; }
.prodRow .m{ font-family:var(--mathFont); font-size:1.2rem; white-space:nowrap; }
.prodRow .cell{ width:auto; flex:1 1 60px; font-size:1.18rem; padding:4px 5px; }
.fieldRows{ display:grid; gap:8px; }
.fieldRow{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-weight:900; color:var(--line); }
.fieldRow .lab{ font-size:.95rem; min-width:0; }
.fieldRow .lab .eq{ font-size:1.32rem; font-weight:500; }
.fieldRow .m{ font-family:var(--mathFont); font-weight:500; font-size:1.3rem; white-space:nowrap; }
.fieldInline{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-family:var(--mathFont); font-size:1.35rem; color:var(--line); }

/* multiple choice */
.mcList{ display:grid; gap:7px; }
.mcOpt{ appearance:none; text-align:left; border:2px solid var(--border); background:#fff; border-radius:14px; padding:9px 13px;
  font-weight:850; font-size:1rem; color:var(--line); cursor:pointer; display:flex; gap:10px; align-items:center; line-height:1.35; }
.mcOpt .eq{ font-size:1.18rem; }
.mcOpt .key{ display:inline-grid; place-items:center; width:26px; height:26px; border-radius:8px; background:#f1f5f9; font-weight:1000; flex:0 0 auto; }
.mcOpt:hover{ border-color:#bfdbfe; }
.mcOpt.on{ border-color:var(--blue); background:#eef2ff; }
.mcOpt.on .key{ background:var(--blue); color:#fff; }
.mcOpt.right{ border-color:var(--green); background:#f0fdf4; }
.mcOpt.wrong{ border-color:var(--red); background:#fef2f2; }

.checkRow{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.checkBtn{ appearance:none; border:none; background:var(--blue); color:#fff; padding:11px 22px;
  border-radius:14px; font-weight:950; font-size:1rem; cursor:pointer; }
.checkBtn:hover:not(:disabled){ background:var(--blue-dark); }

/* ---------- the area model ---------- */
.boardCard{ position:relative; background:var(--card); border:1px solid var(--border); border-radius:22px; box-shadow:var(--shadow);
  padding:10px 12px 8px; display:flex; flex-direction:column; gap:4px; min-width:0; }
.boardHead{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:.86rem; font-weight:900; color:var(--muted); padding:2px 4px 0; min-height:32px; }
.boardHead .sp{ flex:1 1 auto; }
.viewTag{ display:inline-flex; align-items:center; gap:6px; border-radius:999px; padding:4px 10px; font-weight:950; font-size:.8rem; }
.viewTag.area{ background:#eff6ff; color:var(--blue-dark); }
.viewTag.perim{ background:#f5f3ff; color:var(--purple-dark); }
.miniBtn{ appearance:none; border:1.5px solid var(--border); background:#fff; color:var(--line); border-radius:10px; padding:6px 11px; font-weight:900; font-size:.82rem; cursor:pointer; }
.miniBtn:hover:not(:disabled){ border-color:var(--blue); color:var(--blue-dark); }
.miniBtn:disabled{ opacity:.4; cursor:not-allowed; }
.boardWrap{ position:relative; height:clamp(320px, calc(100dvh - 292px), 600px); }
#board{ position:absolute; inset:0; width:100%; height:100%; display:block; touch-action:none; user-select:none; -webkit-user-select:none; overflow:visible; }
#board text{ font-family:var(--mathFont); font-weight:700; pointer-events:none; }
#board path, #board line, #board polygon{ pointer-events:none; }
#board line.cutHit{ pointer-events:stroke; cursor:ew-resize; }
#board line.cutHit.y{ cursor:ns-resize; }
#board .ruler{ cursor:copy; }
#board .ruler:hover rect.band{ fill:#e0e7ff; }
#board .piece{ cursor:default; }
#board.canPick .piece{ cursor:pointer; }
#board .piece.hl{ stroke:#0f172a; stroke-width:3.5; }
.boardNote{ font-size:.82rem; font-weight:800; color:var(--muted); padding:0 6px 2px; text-align:center; min-height:1.2em; }
.scaleTag{ position:absolute; right:4px; bottom:2px; font-size:.68rem; font-weight:900; letter-spacing:.06em; text-transform:uppercase;
  color:var(--muted); background:#f1f5f9; border:1px solid var(--border); border-radius:999px; padding:3px 8px; pointer-events:none; }

/* ---------- nav ---------- */
.navRow{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.navBtn{ appearance:none; border:1.5px solid var(--border); background:#fff; color:var(--line);
  padding:10px 18px; border-radius:14px; font-weight:900; cursor:pointer; }
.navBtn:hover:not(:disabled){ border-color:var(--blue); color:var(--blue-dark); background:#eef2ff; }
.navBtn.next{ background:var(--blue); color:#fff; border-color:var(--blue); }
.navBtn.next:hover:not(:disabled){ background:var(--blue-dark); color:#fff; }
.navBtn:disabled{ opacity:.4; cursor:not-allowed; }
.spacer{ flex:1 1 auto; }

@keyframes shake{ 0%,100%{transform:translateX(0);} 20%{transform:translateX(-6px);} 40%{transform:translateX(6px);} 60%{transform:translateX(-3px);} 80%{transform:translateX(3px);} }
.shake{ animation:shake .34s; }
.confetti{ position:fixed; inset:0; pointer-events:none; z-index:300; overflow:hidden; }

/* ---------- level chooser + certificate ---------- */
.modalBack{ position:fixed; inset:0; background:rgba(15,23,42,.42); display:none; place-items:center; z-index:200; padding:14px; }
.modalBack.open{ display:grid; }
.modal{ width:min(660px,100%); max-height:calc(100dvh - 28px); overflow:auto; background:#fff;
  border-radius:26px; box-shadow:0 34px 90px rgba(15,23,42,.34); border:1px solid #dbe3ef; padding:22px; }
.modal h2{ margin:0 0 6px; font-size:1.6rem; letter-spacing:-.03em; }
.modal p.sub{ margin:0 0 14px; color:var(--muted); font-weight:800; font-size:.95rem; line-height:1.4; }
.lvlList{ display:grid; gap:9px; }
.lvlRow{ display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:3px 14px; align-items:center;
  border:2px solid var(--border); border-radius:18px; padding:11px 16px; background:#fff; cursor:pointer;
  text-align:left; font-family:inherit; }
.lvlRow:hover{ border-color:#bfdbfe; background:#f8fbff; }
.lvlIco{ grid-column:1; grid-row:1/3; font-size:1.6rem; }
.lvlRow strong{ grid-column:2; grid-row:1; font-size:1.1rem; font-weight:1000; }
.lvlRow span.d{ grid-column:2; grid-row:2; color:var(--muted); font-weight:800; font-size:.86rem; line-height:1.35; }
.lvlRow .go{ grid-column:3; grid-row:1/3; font-weight:1000; color:var(--blue); font-size:1.3rem; }
.lvlRow.sweet strong{ color:var(--sweet); } .lvlRow.mild strong{ color:var(--mild); }
.lvlRow.medium strong{ color:var(--medium); } .lvlRow.spicy strong{ color:var(--spicy); }
.certBig{ font-size:2.6rem; font-weight:1000; text-align:center; color:var(--blue-dark); letter-spacing:-.03em; }
.certLine{ text-align:center; font-weight:900; color:var(--ink); font-size:1rem; margin-top:4px; }
.certSub{ text-align:center; font-weight:850; color:var(--muted); font-size:.92rem; line-height:1.45; margin-top:8px; }
.certBreak{ margin-top:12px; font-weight:900; font-size:.95rem; line-height:1.7; text-align:center; }
.modalActions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; justify-content:center; }
.modalActions button{ appearance:none; border:1.5px solid var(--border); background:#fff; color:var(--line);
  padding:11px 17px; border-radius:14px; font-weight:900; cursor:pointer; }
.modalActions button.primary{ background:var(--blue); color:#fff; border-color:var(--blue); }

.brandFoot{ text-align:center; font-size:.85rem; font-weight:850; color:var(--muted); padding:0 0 14px; }
.brandFoot a{ color:var(--blue); text-decoration:none; font-weight:1000; }

/* a part that is right is locked: it keeps its look, it just stops responding */
.part.ok .mcOpt:disabled{ cursor:default; opacity:1; color:inherit; }
.part.ok input[readonly]{ cursor:default; }

@media (max-width:1480px){ .mmtBrandText{ display:none; } }
@media (max-width:1180px){
  .mmtTopbar{ padding:12px 16px; gap:12px; }
  .mmtTopTitle{ white-space:normal; font-size:1.05rem; line-height:1.15; }
  .btn{ padding:10px 13px; font-size:14px; }
  .work{ grid-template-columns:minmax(300px,0.9fr) minmax(0,1.1fr); }
}
@media (max-width:980px){
  .work{ grid-template-columns:minmax(0,1fr); }
  .boardWrap{ height:clamp(300px,58vh,480px); }
}
@media (max-width:900px){
  .mmtTopbar{ grid-template-columns:auto minmax(0,1fr); gap:6px 8px; padding:8px 10px; }
  .mmtTopTitle{ grid-column:2; justify-self:start; text-align:left; font-size:1.02rem; white-space:normal; }
  .topActions{ grid-column:1/-1; justify-content:center; flex-wrap:wrap; }
  .dropMenu{ right:auto; left:50%; transform:translateX(-50%); }
  .layout{ padding:10px 10px 18px; }
  .qCard{ padding:14px 12px; }
}
@media (max-width:560px){
  .boardWrap{ height:clamp(260px,50vh,380px); }
  .prodGrid{ grid-template-columns:1fr; }
}
@media (max-height:820px){
  .layout{ gap:9px; padding-top:10px; padding-bottom:12px; }
  .promptBar{ min-height:40px; padding:7px 13px; font-size:.93rem; }
  .qCard{ padding:13px 15px 12px; gap:9px; }
  .part{ padding:9px 11px; gap:8px; }
  .navBtn{ padding:9px 16px; }
  .brandFoot{ padding-bottom:8px; }
}
@media (prefers-reduced-motion: reduce){ *{ animation:none !important; transition:none !important; } }

/* =====================================================================
   2026-10-31 (later): ONE question, ONE answer — the card is the question
   and nothing else. The model beside it is a helper, not a task.
   ===================================================================== */
.work{ align-items:stretch; }
.qCard{ padding:clamp(22px,3.4vw,46px) clamp(20px,3vw,44px); justify-content:center; }
.qBody{ display:flex; flex-direction:column; gap:clamp(18px,2.6vh,28px); max-width:560px; width:100%; margin:0 auto; }
.qText{ font-size:clamp(1.22rem,1.9vw,1.55rem); font-weight:900; line-height:1.35; letter-spacing:-.01em; }
.working{ font-size:clamp(1.25rem,1.8vw,1.5rem); padding:12px 16px; text-align:center; white-space:normal; }
.working .eq{ white-space:normal; }

.answers{ display:flex; flex-direction:column; gap:14px; }
.ansRow{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.ansRow .lab{ font-size:clamp(1.15rem,1.6vw,1.35rem); font-weight:900; color:var(--line); min-width:7.2em; }
.ansRow .cell.ans{ width:min(220px,100%); font-size:clamp(1.5rem,2.3vw,1.9rem); padding:8px 12px; border-radius:16px; border-width:2.5px; }
.ansRow.big{ gap:16px; }
.ansRow.big .lab{ min-width:0; font-size:clamp(2.2rem,4.2vw,3.4rem); font-weight:500; color:var(--ink); }
.ansRow.big .lab .eq{ font-weight:500; }
.ansRow.big .cell.ans{ width:min(240px,100%); font-size:clamp(2rem,3.6vw,2.9rem); padding:6px 12px; }

.mcList{ gap:9px; }
.mcOpt{ padding:12px 15px; font-size:1.05rem; }
.mcOpt .eq{ font-size:1.22rem; white-space:normal; }
.mcOpt:disabled{ cursor:default; opacity:1; color:inherit; }

.checkRow:empty{ display:none; }
.checkBtn{ padding:12px 28px; font-size:1.05rem; }

/* the one quiet line: a pointer to the model, then the feedback */
.fb{ font-size:.98rem; font-weight:800; line-height:1.5; border-radius:14px; }
.fb:empty{ display:none; }
.fb .eq{ font-size:1.12em; white-space:normal; }
.fb.hint{ display:flex; align-items:center; gap:9px; color:var(--muted); font-size:.9rem; }
.fb.hint .hIco{ display:inline-grid; place-items:center; width:26px; height:26px; border-radius:999px; background:#eff6ff; color:var(--blue-dark); font-weight:1000; flex:0 0 auto; }
.fb.good{ color:var(--green-dark); font-size:1.08rem; }
.fb.fixed{ color:#92400e; font-size:1.02rem; }
.fb.bad{ color:#7f1d1d; background:#fef2f2; padding:11px 14px; }
.fb.bad b{ color:var(--red); }
.fb.warn{ color:#92400e; background:#fffbeb; padding:9px 13px; }
.navBtn.next.ready{ box-shadow:0 0 0 4px rgba(37,99,235,.18); }

/* the board's head: one small label, or the Area / Perimeter switch; an icon to clear */
.viewSeg{ display:inline-flex; gap:2px; padding:3px; border-radius:999px; background:#f1f5f9; border:1px solid var(--border); }
.viewSeg button{ appearance:none; border:none; background:transparent; border-radius:999px; padding:5px 13px; font-weight:950; font-size:.82rem; color:var(--muted); cursor:pointer; }
.viewSeg button.on{ background:#fff; color:var(--blue-dark); box-shadow:0 1px 3px rgba(15,23,42,.14); }
.viewSeg button[data-v="perim"].on{ color:var(--purple-dark); }
.iconBtn{ appearance:none; width:36px; height:36px; display:inline-grid; place-items:center; border-radius:11px; border:1.5px solid var(--border);
  background:#fff; color:var(--line); font-size:1.15rem; font-weight:900; cursor:pointer; line-height:1; }
.iconBtn:hover:not(:disabled){ border-color:var(--blue); color:var(--blue-dark); }
.iconBtn:disabled{ opacity:.35; cursor:default; }
.iconBtn[hidden]{ display:none; }

/* jotting boxes over the pieces — the student's own working, never marked */
.jots{ position:absolute; inset:0; pointer-events:none; }
.jot{ position:absolute; pointer-events:auto; appearance:none; box-sizing:border-box; margin:0; padding:0 4px; text-align:center;
  border:1.5px dashed rgba(15,23,42,.32); border-radius:9px; background:rgba(255,255,255,.72); color:#0f172a;
  font-family:var(--mathFont); font-weight:700; outline:none; }
.jot::placeholder{ color:rgba(15,23,42,.45); font-weight:500; }
.jot:focus{ border-style:solid; border-color:var(--blue); background:#fff; box-shadow:0 0 0 3px rgba(37,99,235,.18); }

@media (max-width:980px){
  .qCard{ padding:22px 18px; }
  .qBody{ gap:16px; }
}
@media (max-width:560px){
  .ansRow .lab{ min-width:0; }
  .ansRow.big .lab{ font-size:2rem; }
  .ansRow.big .cell.ans{ font-size:1.8rem; width:150px; }
}

/* =====================================================================
   AREA QUIZZES — copied from area-of-a-triangle-quiz/quiz.css (which began
   as area-model-quiz/quiz.css) for the parallelogram & rhombus quiz.
   ===================================================================== */
.ansRow .unit{ font-family:var(--mathFont); font-size:clamp(1.2rem,1.7vw,1.45rem); color:var(--line); }
.ansRow .lab{ min-width:6.2em; }
.frac{ display:inline-flex; flex-direction:column; align-items:center; font-size:.7em; line-height:1; vertical-align:middle; margin:0 .06em; }
.frac > span:first-child{ border-bottom:.08em solid currentColor; padding:0 .12em .06em; }
.frac > span:last-child{ padding:.06em .12em 0; }
.stepBox{ display:inline-flex; align-items:center; gap:8px; min-width:0; }
.stepCap{ font-size:.84rem; font-weight:850; color:var(--line); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:24em; }
.stepCap b{ color:var(--muted); font-weight:950; margin-right:3px; }
.mBtn{ appearance:none; border:1.5px solid var(--border); background:#fff; color:var(--line); border-radius:11px; padding:7px 12px;
  font-weight:950; font-size:.88rem; cursor:pointer; white-space:nowrap; }
.mBtn:hover:not(:disabled){ border-color:var(--blue); color:var(--blue-dark); background:#eef2ff; }
.mBtn:disabled{ opacity:.38; cursor:default; }
.mBtn.go{ background:linear-gradient(135deg,var(--green-dark),#0f766e); color:#fff; border-color:transparent; }
.mBtn.go:hover:not(:disabled){ background:linear-gradient(135deg,#166534,#115e59); color:#fff; }
.mBtn.go:disabled{ background:#e2e8f0; color:var(--muted); opacity:.8; }
.mBtn.busy{ pointer-events:none; opacity:.7; }
#board text{ font-family:var(--mathFont); font-weight:700; }
@media (max-width:560px){ .stepCap{ max-width:11em; font-size:.78rem; } .mBtn{ padding:6px 9px; } }
