.math-adaptive { color: var(--ink, #23372e); font: inherit; letter-spacing: 0; box-sizing: border-box; width: 100%; min-width: 0; }
.math-adaptive *, .math-adaptive *::before, .math-adaptive *::after { box-sizing: border-box; }
.math-adaptive h2 { font-size: 26px; margin: 0; }
.math-adaptive h3 { font-size: 20px; margin: 0; }
.math-adaptive p { line-height: 1.65; overflow-wrap: anywhere; }
.math-adaptive strong, .math-adaptive label, .math-adaptive button { overflow-wrap: anywhere; }
.ma-heading { padding: 16px 0 22px; }
.ma-heading-row { display: flex; align-items: center; gap: 16px; }
.ma-heading-row > div { min-width: 0; }
.math-adaptive .ma-back { width: 44px; height: 44px; flex-shrink: 0; padding: 0; font-size: 24px; }
.ma-kicker { color: #587266; font-size: 14px; margin: 0 0 6px; }
.ma-progress { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; border-top: 2px solid #286a55; border-bottom: 1px solid #cbd6cf; }
.ma-progress p { margin: 8px 0 4px; }
.ma-progress small, .ma-muted { color: #58675f; }
.ma-progress > div { min-width: 0; }
.ma-status { display: inline-block; padding: 3px 8px; margin-left: 10px; font-size: 13px; color: #245e48; background: #e9f4ed; border-radius: 4px; white-space: normal; }
.ma-optional { color: #755c18; background: #fbf4dc; }
.ma-live { min-height: 24px; margin: 8px 0; color: #58675f; font-size: 14px; }
.ma-home-columns { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); border-top: 1px solid #d5ddd8; border-bottom: 1px solid #d5ddd8; }
.ma-home-columns > section { min-width: 0; padding: 24px 0; }
.ma-home-columns > section + section { border-left: 1px solid #d5ddd8; padding-left: 26px; margin-left: 26px; }
.ma-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.ma-task-list { padding: 0; margin: 0 0 22px; list-style: none; display: grid; gap: 0; }
.ma-task-list li { display: grid; gap: 7px; padding: 14px 0; border-bottom: 1px solid #e3e8e5; }
.ma-task-list span { color: #536b80; font-size: 13px; }
.ma-task-list strong { font-size: 17px; }
.math-adaptive button { min-height: 44px; border: 1px solid #afbeb5; border-radius: 6px; padding: 10px 15px; background: #fff; color: #254a3a; font: inherit; font-weight: 600; cursor: pointer; }
.math-adaptive button:disabled { opacity: .55; cursor: default; }
.math-adaptive .ma-primary { background: #215d49; border-color: #215d49; color: #fff; }
.math-adaptive .ma-secondary { background: transparent; }
.math-adaptive button:focus-visible, .math-adaptive input:focus-visible, .math-adaptive select:focus-visible, .math-adaptive textarea:focus-visible { outline: 3px solid #82b9d9; outline-offset: 2px; }
.ma-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ma-actions button { max-width: 100%; }
.ma-active-plan { display: flex; gap: 24px; justify-content: space-between; align-items: center; border-left: 4px solid #b98a28; background: #fbf8ec; padding: 18px; margin: 6px 0 22px; }
.ma-active-plan > div { min-width: 0; }
.ma-active-plan p { margin: 8px 0 0; }
.ma-active-plan button { flex-shrink: 0; }
.ma-corrections { padding: 24px 0; border-bottom: 1px solid #d5ddd8; }
.ma-corrections ul { list-style: none; margin: 12px 0 0; padding: 0; }
.ma-corrections li { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid #e3e8e5; }
.ma-corrections p { margin: 6px 0 0; color: #58675f; }
.ma-coverage { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 20px 0; color: #68766d; font-size: 13px; }
.ma-coverage p { width: 100%; margin: 0; }
.ma-editor { width: min(720px, calc(100% - 28px)); max-height: calc(100dvh - 36px); padding: 24px; border: 1px solid #9fac9f; border-radius: 8px; background: #fff; color: #23372e; overflow: auto; }
.ma-editor::backdrop { background: rgb(13 28 21 / 35%); }
.ma-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.ma-dialog-heading button { width: 44px; height: 44px; padding: 0; font-size: 24px; flex-shrink: 0; }
.ma-selector-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ma-editor label { display: grid; gap: 8px; font-size: 14px; font-weight: 600; min-width: 0; }
.ma-editor select, .ma-editor textarea { font: inherit; width: 100%; min-width: 0; min-height: 44px; border: 1px solid #adbbb1; border-radius: 5px; padding: 10px; background: #fff; color: #23372e; }
.ma-editor select { height: 44px; }
.ma-editor select:disabled, .ma-editor textarea:disabled { color: #56685e; background: #f2f5f3; opacity: 1; }
.ma-editor textarea { resize: vertical; }
.ma-school-note { margin-top: 20px; }
.ma-catalog-gap { font-size: 14px; min-width: 0; }
.ma-catalog-gap p { margin: 8px 0 0; padding: 10px 0; color: #68766d; }
.ma-editor-error { min-height: 24px; color: #934739; font-size: 14px; }
.ma-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 12px; border-top: 1px solid #d5ddd8; }
.ma-error, .ma-loading { padding: 30px 0; }
@media (max-width: 700px) {
  .ma-home-columns { grid-template-columns: 1fr; }
  .ma-home-columns > section + section { border-left: 0; border-top: 1px solid #d5ddd8; padding-left: 0; margin-left: 0; }
  .ma-progress, .ma-active-plan { align-items: flex-start; flex-direction: column; gap: 12px; }
  .ma-editor { padding: 18px; }
}
@media (max-width: 430px) {
  .ma-selector-grid { grid-template-columns: 1fr; }
  .ma-section-heading { align-items: flex-start; }
  .ma-corrections li { align-items: flex-start; flex-direction: column; }
  .ma-dialog-actions button { flex: 1; }
}
