/* Worksheet paper, heading, metadata, two-column questions and footer reuse the School Workshop paper layout. Scoped to Math; no shared HUD redesign. */
#math-practice-content{width:100%;min-width:0}
#math-practice-title:focus{outline:none}
#math-practice-content [hidden]{display:none!important}
.practice-header-actions{display:flex;gap:8px;flex-wrap:wrap}
#start-screen .btn-start{white-space:nowrap;font-size:clamp(1.25rem,4vw,2.25rem)}
#math-practice-content .word-question{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:center;min-width:0}
#math-practice-content .word-question>span{grid-column:1/-1;font-size:16px;line-height:1.8;overflow-wrap:anywhere}
#math-practice-content .word-question .answer-label{display:flex;align-items:center;gap:8px}
#math-practice-content .word-question .answer-box{width:100%;min-width:0}
#math-practice-content .practice-controls,#bulk-math-practice .practice-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px;margin:16px 0}
.practice-controls label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:700;color:#4a5565}
.practice-controls [hidden]{display:none!important}
.practice-controls select{width:100%;padding:10px;border:1px solid #cbd5e1;border-radius:8px;background:white;color:#263445}
#math-practice-content .practice-generator{padding:20px;border:1px solid #dce3ec;border-radius:12px;background:#fff}
#math-practice-content .practice-generator[hidden]{display:none}
#math-practice-content .practice-generator h2{font-size:22px;font-weight:750}
#math-practice-content .practice-generator p{font-size:14px;color:#637183;margin-top:8px}
#math-practice-content .practice-actions{display:flex;flex-wrap:wrap;gap:9px;margin:18px 0}
#practice-status{font-size:15px;color:#435a76;min-height:24px;margin:10px 0}
#practice-status.error{color:#b42318}
#math-practice-content .paper{color:#253349;background:#fff;max-width:790px;min-height:715px;margin:24px auto;padding:34px 38px;box-shadow:0 3px 18px #22334c0b}
#math-practice-content .paper-top{color:#8791a0;border-bottom:2px solid #283d65;justify-content:space-between;padding-bottom:13px;font-size:11px;display:flex}
#math-practice-content .paper-top>span:first-child{color:#35528a;font-size:13px;font-weight:700}
#math-practice-content .paper h2{letter-spacing:-.8px;margin:24px 0 20px;font-size:27px;font-weight:750;overflow-wrap:anywhere}
#math-practice-content .paper-meta{background:#f3f5f9;justify-content:space-between;gap:12px;padding:12px 15px;font-size:14px;display:flex;flex-wrap:wrap}
#math-practice-content .paper-instruction{color:#788397;margin:25px 0 10px;font-size:14px}
#math-practice-content .question-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 27px;display:grid}
#math-practice-content .question{break-inside:avoid;border-bottom:1px solid #edf0f5;min-height:127px;padding:18px 0 25px;min-width:0}
#math-practice-content .q-number{letter-spacing:1px;color:#526aac;font-size:12px;font-weight:700;display:flex;justify-content:space-between;gap:8px}
#math-practice-content .equation{font-variant-numeric:tabular-nums;align-items:center;gap:10px;margin-top:12px;font-size:23px;display:flex;flex-wrap:wrap;overflow-wrap:anywhere}
#math-practice-content .place-question{font-size:18px;line-height:1.6;margin-top:12px;overflow-wrap:anywhere}
#math-practice-content .answer-box{border:1.5px solid #cad4e4;border-radius:6px;width:130px;max-width:100%;height:45px;padding:4px 8px;display:inline-block;font-size:20px;background:white}
#math-practice-content .remainder-label{display:flex;gap:8px;align-items:center;font-size:14px}
#math-practice-content .practice-working{height:46px;margin-top:12px;background:repeating-linear-gradient(to bottom,transparent 0,transparent 22px,#e9edf2 23px,transparent 24px)}
#math-practice-content .is-correct .question-feedback{color:#15803d}
#math-practice-content .is-wrong .question-feedback{color:#b42318}
#math-practice-content .is-wrong input{border-color:#e59a8f}
#math-practice-content .paper-bottom{color:#8c96a6;border-top:1px dashed #cad4e4;justify-content:space-between;margin-top:31px;padding-top:19px;font-size:12px;display:flex;gap:12px}
#math-practice-content .paper-bottom>span:last-child{color:#405985;font-weight:700}
#math-practice-content .stage-paper .question-grid{grid-template-columns:minmax(0,1fr)}
#math-practice-content .stage-prompt{font-size:18px;line-height:1.8;margin:12px 0;white-space:pre-wrap;overflow-wrap:anywhere}
#math-practice-content .stage-guide,#math-practice-content .stage-standards{font-size:13px;line-height:1.7;color:#637183;margin:12px 0;overflow-wrap:anywhere}
#math-practice-content .stage-reward{font-size:14px;font-weight:700;color:#a84c13;margin:12px 0}
#math-practice-content .stage-answer-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr));gap:12px;margin-top:16px}
#math-practice-content .stage-field{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:14px}
#math-practice-content .stage-field input{min-width:0;width:100%;padding:10px;border:1px solid #cad4e4;border-radius:6px;font-size:17px;background:white}
#math-practice-content .stage-field.field-correct input{border-color:#7ea58c}#math-practice-content .stage-field.field-wrong input{border-color:#e59a8f}
#math-practice-content .stage-visual{display:block;width:100%;max-width:650px;max-height:290px;margin:16px 0;height:auto}
#math-practice-content .stage-visual [data-grid-q]{cursor:pointer;pointer-events:all}
#math-practice-content .stage-polygons{display:flex;flex-wrap:wrap;gap:10px}#math-practice-content .stage-polygon{width:120px;max-width:100%;border:1px solid #eee}
#math-practice-content .stage-browser{margin-top:18px;border:1px solid #dce3ec;border-radius:10px;padding:16px;background:white}
#math-practice-content .stage-browser summary{font-weight:700;cursor:pointer}#math-practice-content .stage-filters{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0}
#math-practice-content #stage-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(235px,100%),1fr));gap:12px}
#math-practice-content .stage-card{display:flex;flex-direction:column;gap:8px;border:1px solid #e3e8ed;border-radius:8px;padding:14px;min-width:0;overflow-wrap:anywhere;font-size:14px}
#math-practice-content .stage-card small{color:#637183;font-size:11px;line-height:1.6}#math-practice-content .stage-card button,#math-practice-content .stage-filters button{padding:7px 10px;border:1px solid #ccd5dd;border-radius:6px;background:#fff;margin-right:5px}
#math-practice-content .stage-source{font-size:12px;line-height:1.7;color:#637183;margin:10px 0}
@media(max-width:600px){#math-practice-content .stage-answer-fields{grid-template-columns:minmax(0,1fr)}#math-practice-content .stage-prompt{font-size:16px}}
@media(max-width:600px){#math-practice-content .paper{margin:12px 0;padding:22px 18px}#math-practice-content .paper h2{font-size:23px}#math-practice-content .question-grid{grid-template-columns:minmax(0,1fr)}#math-practice-content .equation{font-size:22px}#math-practice-content .paper-top>span:last-child{display:none}}
@media print{body *{visibility:hidden}#math-practice-content .paper,#math-practice-content .paper *{visibility:visible}#math-practice-content .paper{position:absolute;left:0;top:0;margin:0;padding:12mm;box-shadow:none;width:100%;max-width:none}#math-practice-content .practice-working{height:55px}#math-practice-content input{color:#000}.no-print{display:none!important}@page{size:A4;margin:10mm}}
