:root{--navy:#14213d;--ink:#263551;--muted:#66758c;--paper:#f4f7fb;--line:#dce4ef;--white:#fff;--yellow:#ffd166;--orange:#f59e42;--teal:#118a8a;--purple:#6c4bd1;--green:#18865b;--red:#c33b4b;--shadow:0 10px 28px rgba(20,33,61,.09);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-width:320px;background:radial-gradient(circle at 92% 7%,#fff2bd 0,transparent 22rem),var(--paper)}button,input{font:inherit}.topbar{height:72px;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(18px,4vw,54px);position:sticky;top:0;z-index:20;box-shadow:0 4px 18px rgba(20,33,61,.18)}.brand{display:flex;align-items:center;gap:12px;color:#fff;text-decoration:none;font-weight:750;font-size:1.02rem}.brand b{color:var(--yellow)}.brand-mark{display:grid;place-items:center;min-width:54px;height:36px;padding:0 8px;border-radius:9px;background:var(--yellow);color:var(--navy);font:800 .72rem/1 ui-monospace,SFMono-Regular,Consolas,monospace}.score-block{display:grid;grid-template-columns:auto 132px;align-items:center;gap:12px;font-size:.84rem;font-weight:750}.score-block progress{width:132px;height:9px;accent-color:var(--yellow)}.app-shell{display:grid;grid-template-columns:290px minmax(0,1fr);min-height:calc(100vh - 72px)}.sidebar{background:#fff;border-right:1px solid var(--line);padding:34px 24px;position:sticky;top:72px;height:calc(100vh - 72px);overflow:auto}.eyebrow{margin:0 0 7px;color:var(--teal);font-size:.72rem;letter-spacing:.12em;font-weight:850}.sidebar h1{margin:0 0 24px;color:var(--navy);font-size:1.28rem;line-height:1.25}.checkpoint-nav{display:grid;gap:7px}.checkpoint-button{width:100%;display:grid;grid-template-columns:33px 1fr auto;align-items:center;gap:10px;border:0;border-radius:11px;padding:10px;background:transparent;text-align:left;color:#536179;cursor:pointer}.checkpoint-button:hover{background:#f4f7fb}.checkpoint-button.active{background:#eef8f7;color:var(--navy);box-shadow:inset 3px 0 var(--teal)}.checkpoint-button:focus-visible,.primary:focus-visible,.secondary:focus-visible,.choice:focus-visible,input:focus-visible{outline:3px solid #edaa24;outline-offset:2px}.checkpoint-no{display:grid;place-items:center;width:31px;height:31px;border-radius:9px;background:#edf1f6;font-size:.75rem;font-weight:850}.active .checkpoint-no{background:var(--teal);color:#fff}.checkpoint-name{font-size:.82rem;font-weight:720;line-height:1.25}.checkpoint-status{font-size:.75rem;color:var(--green);font-weight:900}.side-note{margin-top:24px;border-radius:12px;background:var(--navy);color:#dce6f7;padding:15px;display:flex;gap:12px}.side-note span{color:var(--yellow);font-size:1.55rem;font-weight:900}.side-note p{margin:0;font-size:.78rem;line-height:1.45}.side-note b{color:#fff}main{padding:clamp(26px,5vw,62px);max-width:1180px;width:100%;margin:0 auto}.checkpoint-kicker{margin:0;color:var(--teal);font-size:.76rem;letter-spacing:.13em;font-weight:850}.checkpoint-title{margin:7px 0 8px;color:var(--navy);font-size:clamp(1.65rem,3vw,2.45rem);line-height:1.1}.checkpoint-intro{margin:0;max-width:760px;color:var(--muted);font-size:1rem;line-height:1.6}.rule-strip{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}.rule-chip{padding:8px 11px;border:1px solid #cfd9e6;border-radius:8px;background:#fff;color:var(--navy);font:750 .85rem ui-monospace,SFMono-Regular,Consolas,monospace}.section-heading{display:flex;align-items:center;gap:12px;margin:30px 0 13px}.section-heading span{padding:5px 8px;border-radius:6px;background:var(--navy);color:#fff;font-size:.68rem;letter-spacing:.1em;font-weight:850}.section-heading h2{margin:0;color:var(--navy);font-size:1rem}.placeholder{margin-top:28px;padding:28px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow)}
@media(max-width:820px){.app-shell{display:block}.sidebar{position:static;height:auto;border-right:0;border-bottom:1px solid var(--line);padding:22px 18px}.checkpoint-nav{display:flex;overflow-x:auto;padding-bottom:4px}.checkpoint-button{min-width:185px}.side-note{display:none}main{padding:28px 18px 54px}.score-block{grid-template-columns:1fr}.score-block progress{display:none}}

.demo-list{display:grid;gap:12px}.demo-card{border:1px solid var(--line);border-left:5px solid var(--teal);border-radius:15px;background:#fff;overflow:hidden;box-shadow:0 6px 20px rgba(20,33,61,.055)}.demo-card summary{list-style:none;display:flex;align-items:center;gap:13px;padding:17px 19px;cursor:pointer;background:linear-gradient(90deg,#eef9f8,#fff)}.demo-card summary::-webkit-details-marker{display:none}.demo-card summary:focus-visible{outline:3px solid #edaa24;outline-offset:-3px}.demo-card summary>span:nth-child(2){display:grid;gap:3px}.demo-card summary small,.model-box small,.math-steps small,.column-reveal small{font-size:.68rem;letter-spacing:.1em;color:var(--teal);font-weight:850}.demo-card summary b{color:var(--navy);font-size:1.08rem}.demo-index{width:32px;height:32px;display:grid;place-items:center;border-radius:9px;background:var(--teal);color:#fff;font-size:.78rem;font-weight:850;flex:0 0 auto}.open-label{margin-left:auto;color:#728097;font-size:.72rem;font-weight:720}.sticker-story{border-top:1px solid var(--line)}.story-copy{display:grid;grid-template-columns:minmax(230px,1fr) minmax(290px,1.2fr);align-items:center;gap:18px;padding:20px}.story-copy>p{margin:0;color:#4e5f77;line-height:1.6}.sticker-row{min-height:82px;border-radius:12px;background:#f6f8fc;display:flex;align-items:center;justify-content:center;gap:9px;padding:14px;overflow:hidden}.sticker-stack{display:flex;flex-wrap:wrap;max-width:128px;gap:5px;align-items:center}.sticker-stack i{width:18px;height:18px;border-radius:50%;box-shadow:inset 0 -2px 0 rgba(20,33,61,.15)}.sticker-stack.gold i{background:#ffd166}.sticker-stack.blue i{background:#4aa4df}.sticker-stack.coral i{background:#f27f69}.sticker-stack em{font-style:normal;font-size:.75rem;font-weight:850;color:var(--navy)}.story-arrow{color:var(--muted);font-weight:900}.two-methods{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line)}.two-methods>div{padding:18px 20px}.two-methods>div+div{border-left:1px solid var(--line)}.two-methods small{color:var(--purple);letter-spacing:.09em;font-size:.67rem;font-weight:850}.two-methods p{margin:7px 0 0;line-height:1.55;color:#4d5d74}.takeaway{display:flex;align-items:center;gap:18px;padding:15px 20px;background:#fff8dc;border-top:1px solid #f1df99}.takeaway span{font:850 1.08rem ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--navy);white-space:nowrap}.takeaway p{margin:0;color:#655a2e;line-height:1.45}.thinking-card{display:flex;gap:18px;align-items:center;border:1px solid var(--line);border-radius:15px;background:#fff;padding:22px;box-shadow:var(--shadow)}.thinking-icon{width:52px;height:52px;display:grid;place-items:center;border-radius:13px;background:#fff1b5;color:var(--navy);font-size:1.7rem;font-weight:900;flex:0 0 auto}.thinking-card b{color:var(--navy)}.thinking-card p{margin:5px 0 0;color:var(--muted);line-height:1.55}.worked-grid{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line)}.model-box,.math-steps{padding:21px}.math-steps{background:#f7f9fd;border-left:1px solid var(--line);display:grid;align-content:start;gap:11px}.model-box p{line-height:1.55;color:#526178}.model-box .note{font-size:.88rem;margin-bottom:0}.group-model{display:flex;gap:8px;flex-wrap:wrap}.group-model span{border-radius:8px;padding:9px 11px;background:#fff1b5;color:#5f511d;font-size:.78rem;font-weight:800}.group-model span+span{background:#e7f5f4;color:#176b6c}.math-steps strong{font:800 1rem/1.55 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--navy)}.math-steps>span{font:750 1.02rem ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--purple)}.fraction-demo{display:grid;grid-template-columns:1fr 165px;gap:24px;align-items:center;padding:22px;border-top:1px solid var(--line)}.fraction-demo p{margin:0 0 16px;color:var(--muted);line-height:1.55}.cancel-line{display:flex;align-items:center;gap:14px;flex-wrap:wrap;font:750 1rem ui-monospace,SFMono-Regular,Consolas,monospace}.fraction{display:inline-grid;grid-template-rows:auto 2px auto;place-items:center;min-width:54px;vertical-align:middle}.fraction i{width:100%;height:2px;background:currentColor}.fraction b{padding:4px 8px}.fraction.reduced{color:var(--teal);font-size:1.15rem}.cancel-line .arrow{color:var(--teal);font-size:1.25rem}.same-value{border-radius:12px;background:#e9f7ef;color:var(--green);padding:18px;text-align:center;display:grid;gap:5px}.same-value span{font-size:.78rem}.chain-demo{padding:21px;border-top:1px solid var(--line)}.chain-demo>p{margin:0 0 16px;color:var(--muted)}.chain{display:flex;align-items:stretch;gap:8px;overflow-x:auto;padding-bottom:4px}.chain div{min-width:max-content;border-radius:10px;background:#f5f7fb;padding:12px 14px;display:grid;gap:5px}.chain div+div:before{content:"→";position:absolute;transform:translate(-22px,12px);color:var(--teal);font-weight:900}.chain span{color:var(--teal);font-size:.65rem;letter-spacing:.09em;text-transform:uppercase;font-weight:850}.chain b{color:var(--navy);font:760 .94rem ui-monospace,SFMono-Regular,Consolas,monospace}.lesson-next{margin-top:28px;border:1px solid var(--line);border-radius:15px;background:#fff;padding:20px;display:flex;align-items:center;justify-content:space-between;gap:18px}.lesson-next p{margin:0;color:var(--muted);line-height:1.5}.question-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:11px}.question-tab{width:38px;height:38px;border:1px solid #cad5e2;border-radius:9px;background:#fff;color:#5e6d84;font-weight:800;cursor:pointer}.question-tab.active{border-color:var(--navy);background:var(--navy);color:#fff}.question-tab.correct:not(.active){border-color:#9ed8ba;background:#e9f7ef;color:var(--green)}.question-card{border:1px solid var(--line);border-top:5px solid var(--teal);border-radius:16px;background:#fff;box-shadow:var(--shadow);padding:clamp(20px,4vw,34px)}.question-meta{display:flex;justify-content:space-between;color:var(--teal);font-size:.7rem;letter-spacing:.1em;font-weight:850}.problem-text{margin:25px 0 18px;color:var(--navy);font-size:clamp(1.12rem,2.2vw,1.42rem);line-height:1.5}.choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.choice-grid.two{max-width:640px;margin:20px auto 0}.choice{min-height:62px;border:1px solid #cfd9e6;border-radius:11px;background:#fff;color:var(--ink);padding:10px 13px;display:flex;align-items:center;gap:12px;text-align:left;cursor:pointer}.choice:hover{border-color:#7a8ba4;background:#f8faff}.choice.selected{border:2px solid var(--teal);background:#edf9f7}.choice>span{width:31px;height:31px;display:grid;place-items:center;border-radius:8px;background:#edf1f6;color:var(--navy);font-size:.77rem;font-weight:850;flex:0 0 auto}.choice.selected>span{background:var(--teal);color:#fff}.choice b{font:740 1rem ui-monospace,SFMono-Regular,Consolas,monospace}.compare-board{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center}.compare-board>div{min-height:104px;border-radius:12px;background:#f5f7fb;padding:16px;display:grid;place-items:center;text-align:center}.compare-board small{color:var(--teal);font-size:.67rem;letter-spacing:.12em;font-weight:850}.compare-board b{font:800 clamp(.98rem,2vw,1.2rem)/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--navy)}.compare-board>span{color:var(--muted);font-size:.8rem}.question-label{margin:24px 0 14px;color:var(--muted)}.question-label b{color:var(--navy);font:800 1.08rem ui-monospace,SFMono-Regular,Consolas,monospace}.fill-board{min-height:150px;border-radius:13px;background-color:#f7f9fd;background-image:linear-gradient(rgba(187,200,218,.25) 1px,transparent 1px),linear-gradient(90deg,rgba(187,200,218,.25) 1px,transparent 1px);background-size:25px 25px;padding:26px 18px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:7px;font:780 clamp(1rem,2.4vw,1.34rem)/1.75 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--navy)}.math-input{width:82px;min-height:48px;border:1px solid #bfcbd9;border-bottom:3px solid var(--teal);border-radius:8px 8px 4px 4px;background:#fff;color:var(--teal);text-align:center;font-weight:850;padding:5px}.math-input.right{border-color:var(--green);background:#eef9f3;color:var(--green)}.math-input.wrong{border-color:var(--red);background:#fff4f5;color:var(--red)}.fraction-workspace{margin-top:18px;display:grid;grid-template-columns:auto auto 1fr auto 1fr;align-items:center;justify-content:center;gap:18px;border-radius:13px;background:#f7f9fd;padding:26px 18px}.division-expression{font:850 1.14rem ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--navy)}.workspace-arrow{color:var(--teal);font-size:1.3rem;font-weight:900}.fraction-stage,.fraction-input{display:flex;align-items:center;justify-content:center;gap:12px;font:750 1rem ui-monospace,SFMono-Regular,Consolas,monospace}.divide-tag{display:grid;font-size:.72rem;color:var(--teal);text-align:center}.fraction-input .math-input{width:72px}.column-reveal{margin-top:16px;border:1px solid #cfe5dc;border-radius:12px;background:#f2fbf6;padding:18px 22px;display:flex;align-items:center;justify-content:space-between;gap:20px}.column-reveal p{margin:5px 0 0;color:#567063;font-size:.85rem}.long-division{display:grid;grid-template-columns:auto auto;grid-template-areas:"blank quotient" "divisor dividend" "blank subtract";min-width:145px;font:800 1.05rem/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--navy)}.quotient{grid-area:quotient;border-bottom:2px solid var(--navy);padding:0 9px;text-align:center}.divisor{grid-area:divisor;padding:3px 8px}.dividend{grid-area:dividend;border-left:2px solid var(--navy);padding:3px 9px}.subtract{grid-area:subtract;border-bottom:1px solid #718097;padding:2px 9px;color:#64728a}.question-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.primary,.secondary{min-height:44px;border-radius:9px;padding:9px 16px;font-weight:800;cursor:pointer}.primary{border:1px solid var(--navy);background:var(--navy);color:#fff}.primary:hover{background:#243657}.secondary{border:1px solid #becada;background:#fff;color:var(--navy)}.secondary:hover{background:#f6f8fb}.feedback{display:none;margin-top:15px;border-radius:10px;padding:13px 15px;line-height:1.48}.feedback:not(:empty){display:block}.feedback.success{background:#eaf8f0;color:#166943}.feedback.error{background:#fff0f1;color:#9e2f3c}.feedback.hint{background:#fff7d9;color:#65551d}.question-footer{display:flex;justify-content:space-between;margin-top:19px;padding-top:16px;border-top:1px solid var(--line)}.text-button{border:0;background:transparent;color:var(--teal);padding:6px 0;font-weight:800;cursor:pointer}.text-button:disabled{opacity:.35;cursor:default}

@media(max-width:760px){.story-copy,.worked-grid,.fraction-demo{grid-template-columns:1fr}.two-methods{grid-template-columns:1fr}.two-methods>div+div{border-left:0;border-top:1px solid var(--line)}.math-steps{border-left:0;border-top:1px solid var(--line)}.fraction-demo{gap:15px}.same-value{text-align:left}.fraction-workspace{grid-template-columns:1fr}.workspace-arrow{transform:rotate(90deg);justify-self:center}.choice-grid{grid-template-columns:1fr}.compare-board{grid-template-columns:1fr}.compare-board>span{display:none}.column-reveal{align-items:flex-start}.lesson-next{align-items:flex-start;flex-direction:column}.fill-board{justify-content:flex-start;overflow-x:auto}.topbar{height:66px}.brand>span:last-child{display:none}.score-block{font-size:.78rem}.app-shell{min-height:calc(100vh - 66px)}}
@media(max-width:430px){.question-card{padding:18px 14px}.story-copy,.two-methods>div,.takeaway,.worked-grid>div,.fraction-demo,.chain-demo{padding-left:14px;padding-right:14px}.takeaway{align-items:flex-start;flex-direction:column;gap:7px}.sticker-row{justify-content:flex-start}.question-actions{display:grid;grid-template-columns:1fr 1fr}.primary,.secondary{padding-left:10px;padding-right:10px}.fraction-input{flex-wrap:wrap}.column-reveal{flex-direction:column}.rule-chip{font-size:.76rem}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

.workspace-panel{min-height:148px;border:1px solid #d7e0eb;border-radius:11px;background:#fff;padding:15px;display:grid;align-content:center;justify-items:center;gap:13px}.workspace-panel>small{color:var(--teal);font-size:.64rem;letter-spacing:.1em;font-weight:850;text-align:center}.fraction-stage{display:grid;font:750 1rem ui-monospace,SFMono-Regular,Consolas,monospace}.fraction-stage>div{display:flex;align-items:center;gap:10px}.mini-arrow{color:var(--teal);font-size:1.2rem}.column-entry .long-division{min-width:160px}.column-entry .quotient{padding:2px 8px 5px}.column-entry .quotient .math-input{width:84px;min-height:42px}.column-entry .divisor,.column-entry .dividend{min-width:48px;text-align:center}.fraction-workspace{grid-template-columns:minmax(145px,.65fr) auto minmax(280px,1.25fr) auto minmax(190px,.8fr)}
@media(max-width:960px){.fraction-workspace{grid-template-columns:1fr}.fraction-workspace .workspace-arrow{transform:rotate(90deg);justify-self:center}.workspace-panel{width:100%}}

.sticker-cluster{display:grid;gap:6px;justify-items:start}.sticker-cluster>small{color:#5c6a80;font-size:.62rem;letter-spacing:.06em;font-weight:850;white-space:nowrap}.sticker-stack{max-width:156px}.fill-board{display:grid;align-content:center;justify-items:center;gap:12px}.equation-row{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:7px;width:100%}.equation-row>span{white-space:pre-wrap}.equation-row .math-input+span{white-space:nowrap}
@media(max-width:430px){.sticker-cluster{justify-items:start}.sticker-row{align-items:flex-start;flex-wrap:wrap}.equation-row{justify-content:flex-start}}

.reduction-stage{min-height:92px;display:flex;align-items:center;gap:15px;font:780 1rem ui-monospace,SFMono-Regular,Consolas,monospace}.reducing-fraction{min-width:116px}.reducing-fraction b{display:flex;align-items:center;justify-content:center;gap:8px;position:relative}.reducing-fraction b small{width:0;opacity:0;overflow:hidden;color:var(--purple);font-size:.76rem;white-space:nowrap;transition:width .28s ease,opacity .2s ease}.number-to-reduce{position:relative;display:inline-block}.number-to-reduce:after{content:"";position:absolute;left:-5px;right:-5px;top:52%;height:2px;background:var(--red);transform:rotate(-15deg) scaleX(0);transform-origin:center;transition:transform .28s ease}.reduction-arrow,.result-fraction,.result-answer{opacity:0;transform:translateX(-10px);transition:opacity .24s ease,transform .28s ease}.reduction-arrow{color:var(--teal);font-size:1.25rem;font-weight:900}.result-answer{color:var(--navy);font-weight:850}.reduction-activity.is-reduced .reducing-fraction b small{width:34px;opacity:1}.reduction-activity.is-reduced .number-to-reduce:after{transform:rotate(-15deg) scaleX(1)}.reduction-activity.is-reduced .reduction-arrow,.reduction-activity.is-reduced .result-fraction,.reduction-activity.is-reduced .result-answer{opacity:1;transform:translateX(0)}.reduce-button{min-height:43px;border:1px solid var(--teal);border-radius:9px;background:#edf9f7;color:#116f70;padding:9px 13px;font-weight:800;cursor:pointer}.reduce-button:hover{background:#dff3f1}.reduce-button:focus-visible{outline:3px solid #edaa24;outline-offset:2px}.reduce-button span{padding-left:5px}.reduction-activity .same-value{opacity:.38;transition:opacity .25s ease}.reduction-activity.is-reduced .same-value{opacity:1}
@media(max-width:620px){.reduction-stage{flex-wrap:wrap}.reducing-fraction{min-width:105px}.reduce-button{width:100%}}
