:root {
    --navy: #17345f;
    --navy-deep: #102746;
    --ink: #172538;
    --muted: #677489;
    --cream: #f7f4ec;
    --white: #fffef9;
    --line: #dcdedb;
    --lime: #d8ee62;
    --blue: #a8d9ef;
    --orange: #ffae72;
    --violet: #c2b2f2;
    --green: #32836f;
    --red: #c85e50;
    --shadow: 0 28px 70px rgba(23, 52, 95, 0.12);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { font: inherit; }

.math-header {
    width: min(1180px, calc(100% - 48px));
    min-height: 84px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(23, 37, 56, 0.14);
}

.math-header > p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.math-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 850;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.math-brand__mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--lime);
    background: var(--navy);
    font-size: 25px;
    line-height: 1;
}

.math-hero {
    width: min(1180px, calc(100% - 48px));
    min-height: 630px;
    margin: auto;
    padding: 76px 0 90px;
    display: grid;
    grid-template-columns: 1fr 0.95fr;
    align-items: center;
    gap: 70px;
}

.math-kicker {
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--navy);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.math-kicker::before {
    content: "";
    width: 22px;
    height: 4px;
    border-radius: 8px;
    background: var(--lime);
}

.math-kicker--light { color: #e9f0ff; }

.math-hero h1,
.session-heading h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(56px, 6.6vw, 90px);
    font-weight: 400;
    line-height: 0.96;
    letter-spacing: -0.055em;
}

.math-hero h1 em {
    color: var(--navy);
    font-weight: 400;
}

.math-hero__lead {
    max-width: 590px;
    margin: 28px 0 34px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.65;
}

.math-button {
    min-height: 50px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.math-button:hover { transform: translateY(-2px); }

.math-button:focus-visible,
.math-back:focus-visible,
.level-card:focus-visible,
.answer-button:focus-visible,
.math-result__close:focus-visible {
    outline: 3px solid var(--lime);
    outline-offset: 3px;
}

.math-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.math-button--dark {
    color: #fff;
    background: var(--navy);
    box-shadow: 0 14px 28px rgba(23, 52, 95, 0.18);
}

.math-button--dark:hover { background: var(--navy-deep); }

.math-button--accent {
    color: var(--navy-deep);
    background: var(--lime);
}

.math-button--outline {
    color: var(--ink);
    border-color: var(--line);
    background: transparent;
}

.math-hero__board {
    position: relative;
    min-height: 450px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 38px;
    background-color: var(--navy);
    background-image:
        linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: 40px 40px;
}

.math-hero__board::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -90px;
    bottom: -100px;
    border-radius: 50%;
    background: var(--lime);
    opacity: .12;
}

.example-card {
    position: absolute;
    width: 310px;
    min-height: 230px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 24px 45px rgba(4, 16, 35, .28);
}

.example-card--back {
    color: rgba(255,255,255,.55);
    background: #58709a;
    font-family: Georgia, serif;
    font-size: 58px;
    transform: translate(-58px, -38px) rotate(-11deg);
}

.example-card--front {
    align-items: center;
    transform: translate(35px, 25px) rotate(3deg);
}

.example-card small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.example-card strong {
    margin: 17px 0 25px;
    color: var(--navy);
    font-family: Georgia, serif;
    font-size: 52px;
    font-weight: 400;
}

.example-card div { display: flex; gap: 8px; }

.example-card i {
    min-width: 52px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
    text-align: center;
}

.example-card i.is-answer { background: var(--lime); border-color: var(--lime); }

.floating-sign {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-family: Georgia, serif;
    box-shadow: 0 10px 24px rgba(4, 16, 35, .22);
}

.floating-sign--plus {
    width: 62px; height: 62px; top: 55px; right: 55px;
    color: var(--navy); background: var(--lime); font-size: 34px;
}
.floating-sign--multiply {
    width: 48px; height: 48px; left: 34px; bottom: 62px;
    color: var(--navy); background: var(--orange); font-size: 26px;
}
.floating-sign--divide {
    width: 38px; height: 38px; left: 48px; top: 80px;
    color: var(--navy); background: var(--blue); font-size: 22px;
}

.timer-pill {
    position: absolute;
    z-index: 4;
    right: 36px;
    bottom: 38px;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--navy);
    background: #fff;
    font-size: 12px;
    font-weight: 900;
}

.math-diagnostic {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 44px;
    display: grid;
    grid-template-columns: 140px 1fr 320px;
    align-items: start;
    gap: 40px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.math-diagnostic__badge {
    width: fit-content;
    padding: 8px 11px;
    border-radius: 999px;
    color: var(--navy-deep);
    background: var(--lime);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.math-diagnostic h2,
.math-contact h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 3.4vw, 48px);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -.045em;
}

.math-diagnostic > div > p:last-child { margin: 16px 0 0; color: var(--muted); line-height: 1.6; }
.math-diagnostic ul { margin: 0; padding: 0; display: grid; list-style: none; border-top: 1px solid var(--line); }
.math-diagnostic li { padding: 15px 0; display: grid; gap: 4px; border-bottom: 1px solid var(--line); }
.math-diagnostic li strong { color: var(--navy); font-size: 13px; }
.math-diagnostic li span { color: var(--muted); font-size: 11px; }

.levels {
    width: min(1180px, calc(100% - 48px));
    margin: auto;
    padding: 100px 0;
    border-top: 1px solid rgba(23, 37, 56, 0.14);
}

.math-section-heading {
    margin-bottom: 44px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 40px;
}

.math-section-heading h2,
.math-rules h2,
.goal-note h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(38px, 4vw, 56px);
    font-weight: 400;
    letter-spacing: -0.045em;
}

.math-section-heading > p {
    width: 360px;
    margin: 0 0 5px;
    color: var(--muted);
    line-height: 1.6;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.level-card {
    min-height: 555px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(23, 37, 56, .12);
    border-radius: 22px;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.level-card:hover {
    z-index: 1;
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.level-card--lime { background: var(--lime); }
.level-card--blue { background: var(--blue); }
.level-card--orange { background: var(--orange); }
.level-card--violet { background: var(--violet); }

.level-card__top,
.level-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.level-card__top span:last-child {
    padding: 6px 9px;
    border: 1px solid rgba(23, 37, 56, .22);
    border-radius: 999px;
}

.level-card__symbol {
    height: 130px;
    display: flex;
    align-items: center;
    color: rgba(23, 52, 95, .82);
    font-family: Georgia, serif;
    font-size: 74px;
}

.level-card__body { margin: auto 0 25px; }

.level-card__body p {
    margin: 0 0 9px;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.level-card__body h3 {
    margin: 0 0 12px;
    font-family: Georgia, serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -.035em;
}

.level-card__body > span { font-size: 13px; line-height: 1.45; }

.level-card__detail {
    padding: 12px 0;
    display: grid;
    gap: 5px;
    border-top: 1px solid rgba(23, 37, 56, .15);
}

.level-card__detail small { font-size: 9px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; opacity: .64; }
.level-card__detail span { font-size: 12px; line-height: 1.42; }
.level-card__detail--live { margin-top: 3px; padding: 12px; border: 0; border-radius: 11px; color: var(--navy-deep); background: rgba(255,255,255,.52); }

.level-card__footer {
    padding-top: 18px;
    border-top: 1px solid rgba(23, 37, 56, .16);
}

.level-card__footer b {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 12px;
    color: #fff; background: var(--navy);
    font-size: 17px;
}

.math-programs {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 70px 0 100px;
}

.math-program-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.math-program-card { min-height: 620px; padding: 38px; display: flex; flex-direction: column; border-radius: 28px; }
.math-program-card--numbers { color: #fff; background: var(--navy); }
.math-program-card--logic { color: var(--ink); background: var(--lime); }
.math-program-card__top { display: flex; justify-content: space-between; gap: 20px; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.math-program-card__top span:last-child { padding: 7px 10px; border: 1px solid currentColor; border-radius: 999px; opacity: .8; }
.math-program-card h3 { margin: 70px 0 24px; font-family: Georgia, serif; font-size: clamp(37px, 4vw, 52px); font-weight: 400; line-height: 1.02; letter-spacing: -.045em; }
.math-program-card > p { margin: 0 0 25px; line-height: 1.6; opacity: .78; }
.math-program-card ul { margin: 0 0 30px; padding: 0; list-style: none; }
.math-program-card li { padding: 13px 0 13px 27px; position: relative; border-bottom: 1px solid rgba(255,255,255,.16); font-size: 13px; line-height: 1.45; }
.math-program-card--logic li { border-color: rgba(23,37,56,.16); }
.math-program-card li::before { content: "✓"; position: absolute; left: 0; color: var(--lime); font-weight: 900; }
.math-program-card--logic li::before { color: var(--navy); }
.math-program-card > a { margin-top: auto; padding-top: 20px; display: flex; justify-content: space-between; border-top: 1px solid currentColor; color: inherit; font-size: 13px; font-weight: 800; text-decoration: none; }

.math-rules {
    width: min(1260px, calc(100% - 28px));
    margin: 0 auto 14px;
    padding: 76px max(34px, calc((100% - 1120px) / 2));
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 75px;
    border-radius: 32px;
    color: #fff;
    background: var(--navy);
}

.math-rules ol { margin: 0; padding: 0; list-style: none; }

.math-rules li {
    padding: 20px 0;
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 20px;
    border-bottom: 1px solid rgba(255,255,255,.16);
}

.math-rules li:first-child { padding-top: 0; }
.math-rules li:last-child { padding-bottom: 0; border-bottom: 0; }
.math-rules li > span { color: var(--lime); font-family: Georgia, serif; font-size: 22px; }
.math-rules h3 { margin: 1px 0 7px; font-size: 16px; }
.math-rules li p { margin: 0; color: #bfcbe0; font-size: 13px; line-height: 1.55; }

.goal-note {
    width: min(900px, calc(100% - 48px));
    margin: 100px auto;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 30px;
}

.goal-note > span {
    width: 80px; height: 80px;
    display: grid; place-items: center;
    border-radius: 22px;
    color: var(--navy); background: var(--lime);
    font-size: 42px;
}

.goal-note h2 { font-size: 36px; }
.goal-note p { margin: 12px 0 0; color: var(--muted); line-height: 1.6; }

.math-contact {
    width: min(1260px, calc(100% - 28px));
    margin: 100px auto 14px;
    padding: 75px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 32px;
    color: #fff;
    background: var(--navy);
    text-align: center;
}

.math-contact h2 { max-width: 880px; font-size: clamp(38px, 5vw, 60px); }
.math-contact > p:last-child { max-width: 650px; margin: 22px 0 0; color: #bfcbe0; line-height: 1.6; }

.math-footer {
    width: min(1180px, calc(100% - 48px));
    min-height: 90px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

/* Session */
.math-session {
    width: min(1040px, calc(100% - 48px));
    margin: auto;
    padding: 34px 0 90px;
}

.math-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.session-heading {
    margin: 46px 0 38px;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    align-items: end;
    gap: 50px;
}

.session-heading h1 {
    max-width: 680px;
    font-size: clamp(48px, 6vw, 70px);
}

.session-heading__meta > span {
    padding: 7px 10px;
    display: inline-block;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--navy);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.session-heading__meta p { margin: 14px 0 3px; color: var(--muted); line-height: 1.55; }

.session-stats {
    padding: 14px;
    display: grid;
    grid-template-columns: 110px 90px 90px 1fr auto;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 254, 249, .8);
}

.session-stats > div {
    min-height: 55px;
    padding: 5px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--line);
}

.session-stats span {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.session-stats strong { color: var(--navy); font-size: 22px; font-variant-numeric: tabular-nums; }
.session-stats .math-button { min-height: 46px; padding: 0 17px; font-size: 13px; }

.accuracy-stat {
    display: grid !important;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 7px 12px;
}

.accuracy-stat > span { grid-column: 1 / -1; margin: 0; }
.accuracy-stat strong { font-size: 13px; }

.accuracy-track {
    height: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: #e1e3e2;
}

.accuracy-track i {
    width: 0;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: var(--green);
    transition: width 180ms ease;
}

.task-stage {
    position: relative;
    min-height: 520px;
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background-color: var(--white);
    background-image: radial-gradient(rgba(23, 52, 95, .08) 1px, transparent 1px);
    background-size: 26px 26px;
    box-shadow: var(--shadow);
}

.task-start,
.task-content {
    min-height: 520px;
    padding: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.task-start__icon {
    width: 90px; height: 90px;
    display: grid; place-items: center;
    border-radius: 26px;
    color: var(--navy); background: var(--lime);
    font-family: Georgia, serif;
    font-size: 25px;
    font-style: italic;
    transform: rotate(-4deg);
}

.task-start > p { margin: 22px 0 14px; color: var(--muted); font-size: 13px; }
.task-start h2 { margin: 0; font-family: Georgia, serif; font-size: 44px; font-weight: 400; letter-spacing: -.04em; }
.task-start > span:not(.task-start__icon) { margin: 10px 0 28px; color: var(--muted); }

.task-counter {
    margin: 0 0 25px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.expression {
    min-height: 105px;
    display: flex;
    align-items: center;
    color: var(--navy-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(58px, 8vw, 92px);
    line-height: 1;
    letter-spacing: -.03em;
}

.answer-grid {
    width: min(650px, 100%);
    margin-top: 42px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.answer-button {
    min-height: 84px;
    position: relative;
    border: 2px solid #dfe2e4;
    border-radius: 17px;
    color: var(--navy);
    background: #fff;
    font-family: Georgia, serif;
    font-size: 30px;
    cursor: pointer;
    transition: transform 120ms ease, border 120ms ease, background 120ms ease;
}

.answer-button:hover { border-color: var(--navy); transform: translateY(-3px); }
.answer-button:disabled { cursor: default; transform: none; }
.answer-button.is-correct { border-color: var(--green); color: #fff; background: var(--green); }
.answer-button.is-wrong { border-color: var(--red); color: #fff; background: var(--red); }

.answer-key {
    position: absolute;
    top: 8px;
    left: 9px;
    color: var(--muted);
    font-family: Inter, sans-serif;
    font-size: 9px;
    font-weight: 850;
}

.answer-button.is-correct .answer-key,
.answer-button.is-wrong .answer-key { color: rgba(255,255,255,.75); }

.answer-hint { margin: 19px 0 0; color: var(--muted); font-size: 11px; }

.feedback {
    position: absolute;
    z-index: 3;
    top: 22px;
    left: 50%;
    padding: 9px 14px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    opacity: 0;
    transform: translate(-50%, -10px);
    transition: opacity 140ms ease, transform 140ms ease;
    pointer-events: none;
}

.feedback.is-visible { opacity: 1; transform: translate(-50%, 0); }
.feedback.is-correct { background: var(--green); }
.feedback.is-wrong { background: var(--red); }

.math-result {
    width: min(750px, calc(100% - 28px));
    max-height: calc(100vh - 28px);
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 28px;
    color: var(--ink);
    background: var(--white);
    box-shadow: 0 32px 100px rgba(9, 25, 50, .35);
}

.math-result::backdrop { background: rgba(12, 29, 55, .76); backdrop-filter: blur(6px); }
.math-result__inner { position: relative; padding: clamp(30px, 6vw, 56px); }

.math-result__close {
    position: absolute;
    top: 20px; right: 20px;
    width: 38px; height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted); background: transparent;
    font-size: 24px; cursor: pointer;
}

.math-result h2 {
    max-width: 560px;
    margin: 0;
    font-family: Georgia, serif;
    font-size: clamp(38px, 5vw, 54px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -.04em;
}

.math-result h2 strong { color: var(--navy); font-weight: 400; }
.math-result__summary { max-width: 580px; margin: 16px 0 25px; color: var(--muted); line-height: 1.55; }

.score-ring {
    --score: 0deg;
    width: 130px; height: 130px;
    margin: 0 auto 26px;
    padding: 10px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--lime) var(--score), #e5e8e4 0);
}

.score-ring > div {
    width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--white);
}

.score-ring strong { color: var(--navy); font-size: 25px; }
.score-ring span { color: var(--muted); font-size: 10px; }

.result-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.result-metrics > div { padding: 17px 14px; display: grid; gap: 6px; border-right: 1px solid var(--line); }
.result-metrics > div:last-child { border-right: 0; }
.result-metrics span { color: var(--muted); font-size: 10px; }
.result-metrics strong { color: var(--navy); font-size: 14px; }

.goal-result {
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: 13px;
    font-size: 13px;
    line-height: 1.5;
}

.goal-result.is-achieved { color: #205e50; background: #e4f4e8; }
.goal-result.is-progress { color: #705329; background: #fff0cf; }
.math-result__actions { margin-top: 26px; display: flex; gap: 10px; }

@media (max-width: 980px) {
    .math-hero { grid-template-columns: 1fr .8fr; gap: 35px; }
    .math-hero__board { min-height: 390px; }
    .example-card { width: 260px; min-height: 205px; }
    .level-grid { grid-template-columns: repeat(2, 1fr); }
    .math-diagnostic { grid-template-columns: 120px 1fr; }
    .math-diagnostic ul { grid-column: 2; }
    .level-card { min-height: 510px; }
    .session-stats { grid-template-columns: repeat(3, 1fr); }
    .accuracy-stat { grid-column: span 2; border-top: 1px solid var(--line); border-right: 0 !important; padding-top: 14px !important; }
    .session-stats .math-button { align-self: stretch; }
}

@media (max-width: 720px) {
    .math-header,
    .math-hero,
    .levels,
    .math-footer,
    .math-session { width: min(100% - 28px, 1180px); }
    .math-diagnostic,
    .math-programs { width: min(100% - 28px, 1180px); }
    .math-diagnostic { padding: 30px 24px; grid-template-columns: 1fr; gap: 24px; }
    .math-diagnostic ul { grid-column: auto; }
    .math-header > p { display: none; }
    .math-hero { min-height: auto; padding: 54px 0 70px; grid-template-columns: 1fr; }
    .math-hero h1 { font-size: clamp(50px, 14vw, 70px); }
    .math-hero__board { min-height: 340px; }
    .math-section-heading,
    .session-heading { display: block; }
    .math-section-heading > p,
    .session-heading__meta { width: auto; margin-top: 20px; }
    .levels { padding: 70px 0; }
    .level-grid { grid-template-columns: 1fr; }
    .level-card { min-height: 475px; }
    .level-card__symbol { height: 95px; }
    .math-rules { padding: 48px 24px; grid-template-columns: 1fr; gap: 42px; }
    .math-programs { padding: 55px 0 75px; }
    .math-program-grid { grid-template-columns: 1fr; }
    .math-program-card { min-height: 580px; padding: 30px 24px; }
    .math-program-card h3 { margin-top: 50px; }
    .goal-note { grid-template-columns: 1fr; text-align: center; }
    .goal-note > span { margin: auto; }
    .session-heading h1 { font-size: 45px; }
    .session-stats { grid-template-columns: repeat(3, 1fr); padding: 10px; }
    .session-stats > div { padding: 5px 9px; }
    .accuracy-stat { grid-column: 1 / -1; }
    .session-stats .math-button { grid-column: 1 / -1; }
    .task-stage,
    .task-start,
    .task-content { min-height: 500px; }
    .task-start,
    .task-content { padding: 30px 18px; }
    .expression { font-size: clamp(48px, 15vw, 70px); }
    .answer-grid { margin-top: 34px; grid-template-columns: repeat(2, 1fr); }
    .answer-button { min-height: 75px; }
    .result-metrics { grid-template-columns: repeat(2, 1fr); }
    .result-metrics > div:nth-child(2) { border-right: 0; }
    .result-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .math-result__actions { flex-direction: column; }
    .math-contact { margin-top: 70px; padding: 55px 22px; }
}

@media (max-width: 450px) {
    .math-hero__board { min-height: 305px; }
    .example-card { width: 220px; min-height: 180px; padding: 22px; }
    .example-card strong { font-size: 43px; }
    .example-card--back { transform: translate(-35px, -30px) rotate(-10deg); }
    .example-card--front { transform: translate(22px, 20px) rotate(3deg); }
    .floating-sign--plus { top: 22px; right: 22px; }
    .floating-sign--divide { top: 48px; left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
