/* Mathematics uses the shared Learning Lab components. Only graph-specific layout lives here. */
.math-panel .math-layout{grid-template-columns:minmax(0,1.4fr) minmax(260px,1fr);align-items:start}.math-panel .new-chem-stage{min-width:0;overflow:hidden}.math-panel svg{display:block;width:100%;height:auto;aspect-ratio:600/440;overflow:hidden;background:#faf7fc;border-radius:12px}.math-panel svg text{font:13px sans-serif;fill:#43354b;paint-order:stroke;stroke:#faf7fc;stroke-width:3px;stroke-linejoin:round}.math-panel .new-chem-controls{min-width:0}.math-panel .new-chem-controls label{display:grid;gap:7px;margin:0;font-weight:700;min-width:0}.math-panel input,.math-panel select{max-width:100%;box-sizing:border-box;min-width:0}.math-panel input[type=range]{width:100%;accent-color:#70567e}.math-panel output{font-variant-numeric:tabular-nums}.math-panel .matrix-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.math-panel .matrix-inputs label{font-size:.76rem}.math-panel fieldset{min-width:0;margin:0;padding:12px;border:1px solid #d8cddd;border-radius:10px}.math-panel .new-chem-stage [role=status]{margin:18px 0 0;padding:14px;background:#fff;border-radius:10px;line-height:1.8;overflow-wrap:anywhere}.math-panel .coding-activity-navigation{display:flex;flex-wrap:wrap;gap:12px}.math-panel .new-chem-reading button{margin:6px 0;white-space:normal}.math-panel .simulator>p,.math-panel .simulator>.sim-title{padding:18px 24px}.math-focus .chem-context-hint{position:static;display:flex;flex-wrap:wrap;gap:12px;align-items:center}.math-focus .chem-context-hint span{flex:1 1 220px;min-width:0;overflow-wrap:anywhere}.math-focus .chem-mode-row,.math-focus .chem-difficulty{flex-wrap:wrap}.math-focus .lab-mode-bar{flex-wrap:wrap}.math-focus .lab-content-credit{display:none}.math-panel .new-chem-practice input[type=number]{width:100%;max-width:300px}.math-panel .new-chem-controls button{white-space:normal}.math-panel .simulator{min-width:0}.math-panel .lesson-body,.math-panel .lesson-question{min-width:0;overflow-wrap:anywhere}@media(max-width:960px){.math-panel .math-layout{grid-template-columns:minmax(0,1fr)}.math-panel .new-chem-controls{grid-template-columns:minmax(0,1fr)}}@media(max-width:480px){.math-panel .new-chem-grid{padding:12px}.math-panel .new-chem-stage{padding:10px}.math-panel .matrix-inputs{gap:8px}.math-panel .coding-activity-navigation a{width:100%;box-sizing:border-box}.math-focus .mode-switch{width:100%}.math-focus .mode-btn{white-space:normal}}

.math-panel svg{box-sizing:border-box;padding:0;border:0;min-width:0}.math-panel .new-chem-stage>svg{max-width:100%}
/* Expansion diagrams and tables keep labels outside graph geometry. */
.math-panel [data-math-activity] .new-chem-stage>svg{aspect-ratio:600/350}.math-panel .math-data-table{max-width:100%;overflow-x:auto}.math-panel .math-data-table table{border-collapse:collapse;width:100%;font-variant-numeric:tabular-nums;font-size:.8rem}.math-panel .math-data-table td,.math-panel .math-data-table th{padding:10px;text-align:left;border-bottom:1px solid #dfd6e5;white-space:nowrap}.math-panel .math-data-table caption{text-align:left;margin:14px 0;font-weight:700}.math-panel textarea{width:100%;max-width:100%;min-height:110px;resize:vertical;padding:12px;box-sizing:border-box;border:1px solid #d8cddd;border-radius:8px;font:inherit;background:white;color:#43273f}.math-panel .math-legend{font-size:.78rem;line-height:1.7;color:#65556f}.math-panel .new-chem-controls:has(#sysA),.math-panel .new-chem-controls:has(#vecAx){grid-template-columns:repeat(2,minmax(0,1fr))}.math-panel .new-chem-controls:has(#sysA)>:first-child,.math-panel .new-chem-controls:has(#vecAx)>select,.math-panel .new-chem-controls>p,.math-panel .new-chem-controls>button{grid-column:1/-1}.math-panel [data-advanced-only][hidden]{display:none!important}.math-panel .feedback:empty{display:none}.math-panel .new-chem-stage svg text{font:12px sans-serif}.math-panel .new-chem-stage #trigonometry-circleSecondary>svg{aspect-ratio:600/350}.math-panel .new-chem-stage [role=status]{font-variant-numeric:tabular-nums}.math-panel .new-chem-controls input[type=number]{min-height:44px}.math-panel .new-chem-controls input[type=range]{min-height:30px}.math-panel .new-chem-controls label:has(input:disabled){opacity:.65}@media(max-width:480px){.math-panel .new-chem-controls:has(#sysA),.math-panel .new-chem-controls:has(#vecAx){grid-template-columns:minmax(0,1fr)}.math-panel .sim-title h4{overflow-wrap:anywhere}.math-panel .chem-difficulty button{flex:1 1 90px}}

/* Investigation notes and optional readable-size diagrams across all Mathematics activities. */
.math-panel .math-investigation-notes label{display:grid;gap:8px;margin:16px 0;font-weight:700}.math-panel .math-investigation-notes textarea{font-size:1rem;line-height:1.6}.math-panel .math-diagram-toggle{margin:12px 24px;min-height:44px;white-space:normal}.math-panel input:focus-visible,.math-panel select:focus-visible,.math-panel textarea:focus-visible,.math-panel button:focus-visible{outline:3px solid #8d6aa4;outline-offset:3px}.math-panel [aria-invalid=true]{border:2px solid #b4233b}.math-panel select,.math-panel button{min-height:44px}.math-panel .new-chem-actions{display:flex;flex-wrap:wrap;gap:10px}.math-panel.math-diagrams-expanded .new-chem-stage{overflow-x:auto}.math-panel.math-diagrams-expanded .new-chem-stage svg{min-width:600px}.math-panel .math-data-table{overscroll-behavior-x:contain}.math-panel .new-chem-note,.math-panel .math-legend,.math-panel .new-chem-reading{overflow-wrap:anywhere}@media(max-width:480px){.math-panel .math-diagram-toggle{margin:10px 12px}.math-panel .new-chem-practice input,.math-panel select,.math-panel textarea{font-size:16px}.math-panel .new-chem-actions button{flex:1 1 140px}.math-panel .new-chem-controls label{line-height:1.5}}

.math-badge-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:14px}.math-activity-badge{display:flex;gap:12px;padding:16px;border:1px solid #d8cddd;border-radius:12px;background:#faf7fc;overflow-wrap:anywhere}.math-activity-badge>span{font-size:1.6rem;color:#705282}.math-activity-badge.earned{border-color:#a77b31;background:#fff9e9}.math-activity-badge p{font-size:.85rem;line-height:1.6}.math-badges-section{margin:18px 0}.math-activity-badge a{display:inline-block;min-height:44px;line-height:44px}
.function-point-learning{padding:1.1rem;margin:1rem 0;border:1px solid #cbb8dc;border-radius:14px;background:#faf7fd;min-width:0}
.function-point-learning h5{margin:.3rem 0 .7rem}
.function-point-kicker{font-size:.8rem;font-weight:700;letter-spacing:.04em;color:#62428b}
.function-point-learning label{display:block;font-weight:600;margin:.7rem 0 .4rem}
.function-point-learning input[type=range]{width:100%;max-width:34rem;min-height:44px}
.function-point-learning input[type=number]{max-width:100%;min-height:44px}
.function-point-learning button{min-height:44px;white-space:normal;margin:.5rem 0}
.function-point-learning details{margin-top:.8rem}
.function-point-learning summary{cursor:pointer;font-weight:600}
.function-point-table{overflow-x:auto;max-width:100%}
.function-point-table table{width:100%;min-width:330px;border-collapse:collapse;font-variant-numeric:tabular-nums}
.function-point-table th,.function-point-table td{padding:.6rem;text-align:right;border-bottom:1px solid #ded3e9}
.function-point-table caption{text-align:left;padding:.5rem 0;font-size:.85rem}
.function-point-table .function-selected-row{background:#e9ddf4;font-weight:700;outline:2px solid #62428b;outline-offset:-2px}
.function-point-examples{display:flex;gap:.6rem;flex-wrap:wrap}
#functionPointEquation{font-family:ui-monospace,monospace;overflow-wrap:anywhere;padding:.6rem;border-left:3px solid #62428b}
@media(max-width:600px){.function-point-learning{padding:.8rem}.function-point-examples button{flex:1 1 140px}}
.function-point-dock{margin-bottom:.5rem;padding:.6rem;background:#fff;border-radius:10px}
.function-point-dock label{display:block;font-weight:700}
.function-point-dock input[type=range]{width:100%;min-height:44px}
#function-transformations .function-point-learning{padding:.8rem;border:1px solid #cbb8dc;border-radius:12px}
.function-mapping-details>summary{cursor:pointer;font-weight:700;margin-top:1rem}
@media(max-width:600px){.function-point-table table{min-width:0;table-layout:fixed}.function-point-table th,.function-point-table td{padding:.4rem .25rem;font-size:.8rem;overflow-wrap:anywhere}}
.algebra-tiles{padding:1rem;margin:1rem 0;background:#faf7fc;border:1px solid #cbb9df;border-radius:12px}.algebra-tile-actions{display:flex;flex-wrap:wrap;gap:.5rem}.algebra-tile-actions button{white-space:normal}.algebra-tile-sides{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.algebra-tile-side{min-width:0;padding:.75rem;border:1px solid #cbb9df;border-radius:8px}.algebra-tile-set{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem}.algebra-tile{display:inline-flex;justify-content:center;align-items:center;padding:.4rem;min-height:2rem;border:2px solid #62428b;background:#eee6f5;font-weight:700}.algebra-x-tile{min-width:3.5rem;min-height:3.5rem}.algebra-unit-tile{min-width:2rem}.algebra-negative{border-style:dashed;background:white}.algebra-value-card{padding:.7rem;border:2px solid #33766d;border-radius:8px;overflow-wrap:anywhere}.algebra-tile-equation{font-weight:700;font-size:1.15rem;overflow-wrap:anywhere}.algebra-tiles-error{color:#a51932}@media(max-width:550px){.algebra-tile-sides{grid-template-columns:1fr}.algebra-tiles{padding:.7rem}.algebra-tile-actions{flex-direction:column}}
.fraction-operations{padding:1rem;margin:1rem 0;border:1px solid #cbb9df;border-radius:12px;background:#faf7fc}.fraction-operation-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}.fraction-operation-controls input,.fraction-operation-controls select{width:100%;min-width:0;box-sizing:border-box}.fraction-operation-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0}.fraction-operation-actions button{white-space:normal}.fraction-operation-equation,.fraction-operation-step{font-weight:700;overflow-wrap:anywhere}.fraction-whole{display:grid;width:100%;height:2.2rem;margin:.5rem 0;border:2px solid #62428b;box-sizing:border-box}.fraction-piece{display:flex;align-items:center;justify-content:center;border-right:1px solid #806994;min-width:0;font-size:.6rem;color:#362347}.fraction-piece:last-child{border-right:0}.fraction-piece-filled{background:#d9c8eb}.fraction-piece-negative{background:#fff1e4;color:#703a15;font-weight:700}.fraction-operation-error{color:#a51932}@media(max-width:550px){.fraction-operations{padding:.7rem}.fraction-operation-actions{flex-direction:column}.fraction-operation-controls{grid-template-columns:1fr}}
.geometry-construction{padding:1rem;margin:1rem 0;border:1px solid #cbb9df;border-radius:12px;background:#faf7fc}.geometry-construction-actions{display:flex;flex-wrap:wrap;gap:.5rem}.geometry-construction-actions button{white-space:normal}.geometry-construction-output>svg{display:block;width:100%;height:auto;max-height:420px}.geometry-construction-step{font-weight:700}.geometry-construction-output text{font-size:13px;fill:#30213e}@media(max-width:550px){.geometry-construction{padding:.7rem}.geometry-construction-actions{flex-direction:column}}
