/* 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}
