/* Mathematics shares the established landing surfaces, type, and button styles. */
.math-landing .ns-hero { padding-block: 28px; }
.math-landing .ns-hero__grid { gap: 32px; }
.math-landing :is(a, button, input, summary):focus-visible { outline: 3px solid #5c58b8; outline-offset: 4px; }
.math-angle-nav { background: #fff; border-bottom: 1px solid #d2e0e5; }
.math-angle-nav > div { display: flex; flex-wrap: wrap; gap: 0 24px; }
.math-angle-nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 6px 0; color: var(--ns-muted); font-size: 14px; text-decoration: none; border-bottom: 3px solid transparent; }
.math-angle-nav a[aria-current="page"] { color: var(--ns-teal); font-weight: 750; border-bottom-color: var(--ns-teal); }
.math-primary-actions, .math-bottom-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 22px; }
.math-primary-actions .ns-text-link { margin-top: 0; font-size: 13px; }
.math-learning-summary { color: var(--ns-teal); font-size: 13px; margin-top: 20px !important; }
.math-learning-summary span { padding-inline: 5px; }
.math-example-levels > p { font-size: 13px; color: var(--ns-muted); margin-bottom: 8px; }
.math-level-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.math-level-picker button { border: 1px solid #bdd4db; border-radius: 24px; background: #fff; color: var(--ns-teal); padding: 9px 14px; min-height: 44px; font-size: 14px; font-weight: 650; }
.math-level-picker button[aria-pressed="true"] { background: var(--ns-teal); border-color: var(--ns-teal); color: #fff; }
.math-landing .ns-example__head { padding: 20px 22px; }
.math-landing .ns-example__body { padding: 16px 22px; }
.math-example-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.math-example-meta .ns-note { margin: 0; font-size: 12px; }
.math-example-pages { display: flex; gap: 6px; }
.math-example-pages button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #bdd4db; border-radius: 7px; min-width: 44px; min-height: 44px; padding: 4px 8px; color: var(--ns-teal); background: #fff; font-size: 14px; font-weight: 650; }
.math-example-pages button[aria-current="step"] { border-color: var(--ns-teal); color: #fff; background: var(--ns-teal); }
.math-example-kind { margin-left: auto; color: var(--ns-muted); font-size: 12px; }
.math-stimulus { margin: 14px 0; font-size: 15px; line-height: 1.6; }
.math-stimulus .math-formula { font-size: 25px; font-weight: 700; margin-top: 8px; }
.math-stimulus table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.math-stimulus caption { caption-side: top; color: var(--ns-muted); text-align: center; padding: 3px 0; }
.math-stimulus :is(th, td) { border-bottom: 1px solid #d2e0e5; padding: 7px 9px; text-align: left; }
.math-stimulus th { background: #eef4f5; font-weight: 650; }
.math-stimulus svg { display: block; width: 220px; max-width: 100%; height: auto; margin: 0 auto; }
.math-stimulus svg text { font-size: 18px; fill: var(--ns-ink); }
.math-landing fieldset { min-width: 0; margin: 14px 0; padding: 0; border: 0; }
.math-landing legend { font-size: 15px; font-weight: 650; line-height: 1.5; margin-bottom: 10px; float: none; }
.math-choices { display: grid; gap: 8px; }
.ns-page label.math-choice { display: flex; align-items: center; gap: 11px; border: 1px solid #bdd4db; border-radius: 11px; padding: 11px 13px; min-height: 46px; margin: 0; font-size: 15px; font-weight: 400; line-height: 1.4; cursor: pointer; }
.math-choice input { width: 18px; height: 18px; flex-shrink: 0; margin: 0; accent-color: var(--ns-teal); }
.math-choice:has(input:checked) { background: #e8f6f1; border-color: var(--ns-teal); }
.ns-page label.math-choice.is-incorrect { background: #fff6df; color: #755110; border-color: #bd831c; }
.math-shade-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 5px; border: 2px solid var(--ns-teal); border-radius: 10px; max-width: 340px; margin-top: 8px; }
.math-shade-grid button { min-height: 48px; border: 1px solid #a9c7ca; background: #f5faf9; border-radius: 3px; }
.math-shade-grid button[aria-pressed="true"] { background: #397a78; border-color: #286967; }
.math-shade-grid button[aria-pressed="true"].is-incorrect { background: #dca240; border-color: #986615; }
.math-landing .math-shade-status { margin-top: 8px; font-size: 12px; color: var(--ns-muted); }
.math-landing .ns-feedback strong { display: block; margin-bottom: 5px; }
.math-landing .ns-feedback.is-incorrect { background: #fff6df; color: #755110; border: 1px solid #ead2a0; }
.math-landing .ns-feedback.is-prompt { background: #eef3f5; color: var(--ns-muted); }
.math-sample-next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
.math-sample-next .btn, .math-sample-next .ns-text-link { font-size: 13px; }
.math-landing .math-example-note { font-size: 11px; margin-top: 5px; }
.math-landing .ns-benefits__grid article { display: block; }
.math-landing .ns-benefits__grid h2 { font-size: 18px; margin: 0 0 8px; }
.math-content-section { background: #fff; padding-block: 30px; border-block: 1px solid #d2e0e5; }
.math-scope { padding-block: 30px; }
.math-content-section h2, .math-scope h2 { font-size: 27px; line-height: 1.3; margin: 0 0 24px; }
.math-content-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.math-content-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.math-content-grid .ns-eyebrow { font-size: 11px; letter-spacing: 1px; margin-bottom: 8px; }
.math-content-grid h3 { font-size: 18px; margin: 0 0 8px; }
.math-content-grid article > p { color: var(--ns-muted); font-size: 15px; line-height: 1.6; }
.math-content-section > div > .ns-note { margin-top: 20px; }
@media (max-width: 850px) {
    .math-landing .ns-hero__grid { gap: 24px; }
    .math-example-kind { display: none; }
}
@media (max-width: 700px) {
    .math-landing .ns-hero { padding-block: 20px; }
    .math-landing .ns-hero h1 { font-size: 30px; margin-bottom: 14px; }
    .math-landing .ns-lead { font-size: 14px; }
    .math-landing .ns-tags, .math-learning-summary, .math-example-levels > p { display: none; }
    .math-example-levels { margin-top: 16px; }
    .math-primary-actions { margin-top: 16px; }
    .math-landing .ns-example__head { padding: 16px 18px; }
    .math-landing .ns-example__body { padding: 14px 18px; }
    .math-content-grid { grid-template-columns: 1fr; gap: 22px; }
    .math-content-section h2, .math-scope h2 { font-size: 25px; }
}
@media (max-width: 420px) {
    .math-primary-actions > .btn { width: auto; font-size: 14px; }
    .math-primary-actions .ns-text-link { width: 100%; }
    .math-landing .ns-example__body { padding-inline: 16px; }
    .math-landing .ns-note { font-size: 11px; }
    .math-level-picker button { padding-inline: 10px; font-size: 12px; }
    .math-angle-nav > div { gap: 20px; }
    .math-angle-nav a { font-size: 13px; }
}
