/* BatchMath v12.8.X — Unit 5 practice styles (multi-part answers, calculator badge, figure choices,
   slope-field drawing board). Math containers grow to fit; nothing here creates a nested scroll box. */
.u5-question{display:flex;flex-direction:column;align-items:center;gap:6px;width:100%}
.u5-calculator-badge{align-self:flex-start;font-size:.78rem;font-weight:900;letter-spacing:.02em;border-radius:999px;padding:3px 10px;margin:0 0 4px;border:1px solid #555;color:#c7c7c7}
.u5-calculator-badge.is-active{border-color:var(--yellow);color:var(--yellow)}
.u5-context{font-weight:600;line-height:1.5;text-align:left;max-width:640px}
.u5-question .u4-formula{max-width:100%}
.unit5-answer .unit5-part{width:100%}
.unit5-answer .staged-part-prompt{line-height:1.5}
.unit5-input-row{display:flex;align-items:center;gap:8px;width:100%;min-width:0}
.unit5-input-row .bm-calc-editor{flex:1 1 auto;min-width:0}
.unit5-prefix{flex:0 0 auto;font-size:1.15rem;color:#f4f4f4}
.unit5-help{font-size:.88rem;color:#bbb;margin:2px 0 6px;line-height:1.45}
.unit5-choices{grid-template-columns:repeat(2,minmax(0,1fr))}
.unit5-figure-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.unit5-figure-choices .choice{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px;min-height:0}
.unit5-figure-choices .choice svg{width:100%;max-width:240px;height:auto;display:block}
.unit5-figure-label{font-weight:900;color:var(--yellow)}
@media(max-width:600px){
 .unit5-choices{grid-template-columns:1fr}
 .unit5-figure-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .unit5-prefix{font-size:1.05rem}
}

/* ---------- slope-field board ---------- */
.u5-board-wrap{width:100%;display:flex;flex-direction:column;align-items:center;gap:8px}
.u5-board{width:100%;max-width:440px;aspect-ratio:1/1;touch-action:none;user-select:none;-webkit-user-select:none;background:#050505;border:1px solid #303030;border-radius:10px;display:block}
.u5-board text{fill:#cfcfcf;font-size:11px;font-family:inherit}
.u5-board .grid-line{stroke:#1f1f1f;stroke-width:1}
.u5-board .axis{stroke:#8a8a8a;stroke-width:1.4}
.u5-board .field-seg{stroke:#9a9a9a;stroke-width:1.6;stroke-linecap:round}
.u5-board .target{fill:#f4f4f4}
.u5-board .target.active{fill:var(--yellow)}
.u5-board .target-ring{fill:none;stroke:var(--yellow);stroke-width:1.5;opacity:0}
.u5-board .target-ring.active{opacity:1}
.u5-board .student-seg{stroke:#4fb3ff;stroke-width:3.2;stroke-linecap:round}
.u5-board .student-curve{fill:none;stroke:#4fb3ff;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round}
.u5-board .model-seg{stroke:#ffd400;stroke-width:2.4;stroke-linecap:round;stroke-dasharray:5 3}
.u5-board .model-curve{fill:none;stroke:#ffd400;stroke-width:2.6;stroke-dasharray:7 4}
.u5-board .mark-good{fill:none;stroke:#66c977;stroke-width:2.2}
.u5-board .mark-bad{fill:none;stroke:#ff6b6b;stroke-width:2.2}
.u5-board .ic-point{fill:#ff8f93;stroke:#050505;stroke-width:1.5}
.u5-board .no-segment{stroke:#ff8f93;stroke-width:2}
.u5-tools{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.u5-tools .choice{min-height:44px;padding:8px 14px}
.u5-tools .choice[aria-pressed="true"]{border-color:var(--yellow);color:var(--yellow)}
.u5-legend{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;font-size:.85rem;color:#ddd}
.u5-legend span{display:inline-flex;align-items:center;gap:6px}
.u5-legend i{display:inline-block;width:22px;height:0;border-top:3px solid #4fb3ff}
.u5-legend i.model{border-top:3px dashed #ffd400}
.u5-board-status{font-size:.9rem;color:#ccc;text-align:center;min-height:1.3em}
.u5-slope-entry{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:6px;width:100%;max-width:520px}
.u5-slope-entry label{display:flex;align-items:center;gap:6px;font-size:.88rem;color:#ddd}
.u5-slope-entry input{width:5.5em;min-height:36px;background:#111;color:#fff;border:1px solid #555;border-radius:6px;padding:4px 6px}
/* slope fields: figures, matching choices, slope tables */
.u5-figure{margin:10px auto 4px}
.u5-figure .u5-board{max-width:360px}
.u5-board .axis-name{font-style:italic;fill:#e6e6e6}
.u5-board .student-seg.preview{opacity:.6}
.u5-board .choice-curve{fill:none;stroke:#4fb3ff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.unit5-answer .staged-choice-grid.unit5-figure-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.unit5-answer .unit5-figure-choices .staged-choice{text-align:center;display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px;min-height:0}
.unit5-figure-choices .u5-mini{max-width:220px;border-radius:8px}
.u5-choice-label{font-weight:800;color:var(--yellow)}
.u5-slope-table{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:4px 16px;margin:6px 0 10px}
.u5-retry{margin:6px auto 0;display:block}
@media (max-width:520px){.unit5-figure-choices{gap:6px}.unit5-figure-choices .staged-choice{padding:5px}}
/* comprehensive review: topic and difficulty tag above each question */
.u5-review-tag{display:inline-block;margin:0 auto 8px;font-size:.78rem;font-weight:800;color:#bdbdbd;border:1px solid #3a3a3a;border-radius:999px;padding:3px 10px}
