:root{--ink:#28243d;--muted:#787287;--purple:#6951c9;--purple-dark:#543cae;--lavender:#f0ecfb;--mint:#bcebd6;--line:#e9e4ef;--paper:#faf9f6;--white:#fff;--radius:24px;font-family:ui-rounded,'Trebuchet MS',Arial,sans-serif;color:var(--ink);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:var(--paper);min-height:100vh}button,input{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default}button, input{touch-action:manipulation}button:focus-visible,input:focus-visible,.bar-scroll:focus-visible{outline:3px solid #8871df;outline-offset:4px}button{transition:background .15s,border-color .15s,transform .15s,box-shadow .15s}button:active:not(:disabled){transform:translateY(1px)}button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}[hidden]{display:none!important}.site-header{max-width:1424px;margin:auto;min-height:94px;display:flex;align-items:center;justify-content:space-between;padding:22px 48px;gap:16px}.brand{display:flex;align-items:center;gap:12px;font-weight:900;font-size:15px;letter-spacing:1.4px}.brand-sub{display:block;color:var(--muted);font-size:9px;letter-spacing:2px;margin-top:5px;font-weight:700}.brand-mark{width:40px;height:40px;background:var(--purple);border-radius:12px;display:grid;grid-template-columns:repeat(2,1fr);gap:3px;padding:9px;transform:rotate(-6deg)}.brand-mark i{background:var(--mint);border-radius:2px}.brand-mark i:last-child{background:#fff;opacity:.8}.header-actions{display:flex;align-items:center;gap:14px}.button{display:inline-flex;align-items:center;justify-content:center;gap:10px;border:1.5px solid transparent;border-radius:12px;padding:13px 20px;min-height:48px;font-size:15px;font-weight:700;line-height:1.3;white-space:nowrap}.button-primary{background:var(--purple);color:white;box-shadow:0 4px 0 #533caa}.button-primary:hover:not(:disabled){background:var(--purple-dark);box-shadow:0 4px 0 #402c87}.button-primary:disabled{color:#a39ab9;background:#eae5f3;box-shadow:none}.button-outline{border-color:#ded8e7;background:transparent;color:#514960}.button-outline:hover{background:#f0ecf6;border-color:#c7bcdc}.button-quiet{color:#675f76;background:transparent}.button-quiet:hover{background:#efecf3}.icon-button{width:44px;height:44px;display:grid;place-items:center;border:1.5px solid #e1dce9;background:transparent;border-radius:12px;color:#675f76}.icon-button:hover{background:#efecf3}.icon-button svg{width:19px;height:19px}main{max-width:1280px;margin:25px auto 0;padding:0 40px 28px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:28px}.eyebrow{font-size:10px;font-weight:800;letter-spacing:2.2px;color:var(--purple);margin:0 0 10px}h1{font-size:clamp(26px,3vw,38px);line-height:1.15;letter-spacing:-1.5px;margin:0;font-weight:800}.activity{background:var(--white);border:1.5px solid var(--line);border-radius:var(--radius);box-shadow:0 12px 40px #39304b06;overflow:hidden}.steps{display:flex;justify-content:center;align-items:center;list-style:none;padding:24px 28px 0;margin:0;gap:32px}.steps li{display:flex;align-items:center;gap:8px;color:#928a9e;font-size:12px;font-weight:700;position:relative}.steps li:not(:last-child):after{content:'';height:1px;width:15px;background:#ddd6e7;position:absolute;right:-24px}.step-number{width:24px;height:24px;display:grid;place-items:center;background:#f2f0f6;border-radius:50%;font-size:11px}.steps .active{color:var(--purple)}.steps .active .step-number{color:#fff;background:var(--purple)}.steps .done{color:#605278}.steps .done .step-number{background:#dff5e9;color:#2e795a}.question{display:flex;align-items:center;justify-content:center;gap:22px;margin:24px 20px 18px;min-height:100px;font-size:48px;line-height:1.1;letter-spacing:-1px}.question-find{font-size:20px;color:var(--muted);font-weight:500;letter-spacing:0;margin-right:0}.fraction{display:inline-flex;flex-direction:column;text-align:center;min-width:43px;font-size:35px;font-weight:800;color:var(--purple);letter-spacing:0}.fraction span:first-child{padding:0 7px 5px;border-bottom:2.5px solid var(--purple)}.fraction span:last-child{padding:5px 7px 0}.question-of{font-size:25px;font-weight:500;color:#7e748e;letter-spacing:0}.question-equals{color:#b0a6bf;font-size:33px;font-weight:400}.question-answer{color:#b9adc9;min-width:44px}.question.revealed .question-answer{color:var(--purple);animation:answer-pop .4s ease-out}.model-area{margin:0 36px;padding:2px 0 20px;position:relative}.whole-label{display:flex;flex-direction:column;align-items:center;gap:3px;margin-bottom:12px;color:#8c829b;font-size:11px;font-weight:700;letter-spacing:.3px}.whole-label strong{font-size:26px;color:var(--ink);letter-spacing:-.4px}.bar-scroll{overflow-x:auto;padding:0 2px 5px;scrollbar-width:thin;scrollbar-color:#d4cae6 transparent}.bar-wrapper{width:100%;min-width:var(--model-min,0px);padding-top:10px}.whole-bracket{height:12px;border:1.5px solid #b4a7cc;border-bottom:0;position:relative;margin:0 0 10px}.whole-bracket:before{content:'';position:absolute;height:7px;width:1.5px;background:#b4a7cc;left:50%;top:-8px}.bar-model{height:160px;border:2px solid #8672b4;border-radius:13px;display:grid;grid-template-columns:repeat(var(--parts,1),minmax(0,1fr));overflow:hidden;background:#f9f7fd;transition:background .2s}.bar-part{border:0;border-right:2px solid #a497bc;background:#f7f4fd;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:14px 8px;position:relative;min-width:0;color:#4c3f64;overflow:hidden}.bar-part:last-child{border-right:0}.bar-part:hover:not(:disabled){background:#eee7fb}.bar-part.is-selected{background:var(--purple);color:white}.bar-part.is-selected:hover:not(:disabled){background:#5e46bd}.bar-part:disabled{cursor:default;opacity:1}.bar-part.is-selected:after{content:'✓';font-size:13px;position:absolute;right:5px;top:5px;line-height:18px;width:18px;height:18px;border-radius:50%;background:#ffffff24;color:white;font-weight:800}.counter-grid{width:100%;max-width:190px;display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:6px;padding:1px;min-height:30px}.counter{display:block;flex:0 0 var(--counter-size,17px);width:var(--counter-size,17px);height:var(--counter-size,17px);border:1.5px solid #9f8bc7;background:#cbbbe7;border-radius:50%;box-shadow:inset 0 1.5px 0 #ffffff60;animation:counter-pop .35s both;animation-delay:var(--delay,0ms)}.bar-part.is-selected .counter{background:var(--mint);border-color:#bcebd6;box-shadow:inset 0 1.5px 0 #ffffff60}.part-value{font-size:16px;font-weight:800;line-height:1.1;min-height:18px;margin-top:12px}.model-caption{min-height:28px;margin-top:12px;text-align:center;font-size:12px;color:#92869f;line-height:1.5}.model-caption strong{font-weight:700;color:#68567f}.controls-area{background:#fbfafc;border-top:1px solid var(--line);padding:25px 34px 18px;min-height:178px}.control-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}h2{font-size:19px;letter-spacing:-.4px;margin:0;font-weight:800}.control-heading p,.select-instruction p{color:var(--muted);font-size:13px;margin:7px 0 0;line-height:1.5}.small-tag{border:1px solid #e4deed;border-radius:6px;color:#9b8bad;font-size:9px;font-weight:800;letter-spacing:1.8px;padding:6px 9px;background:white}.split-action-row{display:flex;align-items:center;gap:22px;justify-content:space-between}.part-choices{padding:0;margin:0;min-width:0;border:0}.part-choices>div{display:flex;flex-wrap:wrap;gap:7px}.choice{min-width:42px;height:44px;border:1.5px solid #e0d9eb;border-radius:10px;background:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:17px;font-weight:700;color:#71667f;position:relative;cursor:pointer;padding:0 9px;transition:background .15s,border-color .15s}.choice input{position:absolute;opacity:0;width:1px;height:1px}.choice:has(input:checked){color:var(--purple);background:#eee8fc;border:2px solid var(--purple)}.choice:has(input:focus-visible){outline:3px solid #8871df;outline-offset:3px}.choice:hover{background:#f2edf9;border-color:#bdb0d5}.feedback{margin:12px 0 0;color:#956321;font-size:13px;font-weight:700;line-height:1.45;min-height:0}.feedback:empty{display:none}.selection-row,.answer-row{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:112px}.selected-pill{display:flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;background:var(--lavender);border-radius:12px;padding:12px 16px;color:#7b6c94;font-size:12px}.selected-pill strong{font-size:22px;color:var(--purple)}.answer-eyebrow{color:#8a7c9d;font-size:10px;font-weight:800;letter-spacing:1.8px;margin:0 0 12px}.calculation{display:flex;gap:16px;align-items:center;font-size:25px;color:#6f607f;letter-spacing:-.6px;flex-wrap:wrap}.calculation strong{color:var(--purple)}.calculation-arrow{color:#c7bdd4;font-size:22px}.activity-footer{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:17px 4px 0}.activity-footer p{display:flex;align-items:center;gap:8px;margin:0;color:#8a8096;font-size:11px;line-height:1.5}.footer-dot{height:7px;width:7px;background:#b5d7c5;flex-shrink:0;border-radius:50%}.text-button{display:inline-flex;gap:6px;align-items:center;color:#8a7b9b;border:0;background:transparent;font-size:11px;padding:10px 0 10px 12px;white-space:nowrap}.text-button:hover{color:var(--purple)}.text-button svg{width:14px;height:14px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}dialog{width:min(510px,calc(100% - 32px));padding:30px;border:1px solid #e4dded;border-radius:24px;color:var(--ink);box-shadow:0 30px 100px #24133c30;max-height:calc(100dvh - 40px);overflow-y:auto}dialog::backdrop{background:#28203d65;backdrop-filter:blur(5px)}.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:16px}.dialog-header h2{font-size:26px}.dialog-header .eyebrow{margin-bottom:7px}.dialog-intro{font-size:14px;color:var(--muted);line-height:1.5;margin:20px 0}.question-inputs{display:flex;align-items:center;justify-content:center;gap:22px;padding:4px 0 15px}.fraction-inputs{width:115px;text-align:center}.question-inputs label{display:block;font-size:11px;font-weight:700;color:#84758e;margin-bottom:6px}.question-inputs input{width:100%;height:54px;border:1.5px solid #d8cde8;border-radius:10px;text-align:center;font-size:25px;font-weight:800;color:var(--purple);background:#faf8fe}.input-fraction-line{height:2px;background:#b6a2ce;margin:12px 0}.input-of{font-size:22px;color:#a18fad}.whole-input{width:125px}.whole-input input{height:66px}.input-hint{color:#92859e;font-size:12px;line-height:1.6;margin:8px 0}.form-error{color:#a04e36;font-size:13px;line-height:1.5;margin:8px 0}.form-error:empty{display:none}.dialog-footer{display:flex;justify-content:flex-end;gap:10px;margin-top:25px}.is-error{animation:shake .3s ease-in-out}.model-area.celebrate .bar-model{box-shadow:0 0 0 5px #bcebd650;transition:box-shadow .35s}body:fullscreen{background:var(--paper)}
@keyframes counter-pop{0%{transform:scale(0);opacity:0}70%{transform:scale(1.15);opacity:1}100%{transform:scale(1);opacity:1}}@keyframes answer-pop{0%{transform:scale(.8);opacity:.4}70%{transform:scale(1.1)}100%{transform:scale(1);opacity:1}}@keyframes shake{25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}
@media(min-width:1500px){main{margin-top:45px;max-width:1400px}.question{margin-top:34px;margin-bottom:26px;font-size:56px}.fraction{font-size:40px}.bar-model{height:190px}.model-area{padding-bottom:30px}.controls-area{padding-top:30px;padding-bottom:26px}.part-choices>div{gap:10px}.choice{min-width:49px;height:49px;font-size:20px}.button{font-size:17px;min-height:52px}.steps li{font-size:14px}.model-caption{font-size:14px}}
@media(max-width:1100px){main{padding-inline:28px;margin-top:20px}.site-header{padding-inline:32px}.choice{min-width:36px;height:42px;padding-inline:7px}.part-choices>div{gap:5px}.split-action-row{gap:14px}.controls-area{padding-inline:26px}.selected-pill{padding:10px 12px}.selection-row{gap:15px}.select-instruction{max-width:320px}.calculation{font-size:23px;gap:12px}}
@media(max-width:900px){.split-action-row{flex-wrap:wrap}.part-choices{flex:1}.split-action-row>.button{margin-left:auto}.controls-area{min-height:200px}.choice{min-width:39px}.selection-row{flex-wrap:wrap}.select-instruction{max-width:100%;flex:1 1 65%}.selection-row>.button{margin-left:auto}.selected-pill{padding:8px 14px}.answer-row{flex-wrap:wrap}.answer-row>.button{margin-left:auto}.page-heading{gap:16px}h1{font-size:30px}.page-heading>.button{font-size:13px;padding-inline:14px}.model-area{margin-inline:26px}}
@media(max-width:600px){.site-header{min-height:80px;padding:18px 18px 10px}.brand{font-size:12px;gap:8px;letter-spacing:1px}.brand-sub{font-size:7px;letter-spacing:1.2px}.brand-mark{width:32px;height:32px;border-radius:10px;padding:7px;gap:2px}.header-actions{gap:4px}.button-quiet{font-size:12px;padding-inline:9px;gap:6px}.button-quiet svg{width:15px;height:15px}#fullscreen{border:0;width:35px}.icon-button{width:38px;height:38px}main{padding:0 14px 20px;margin-top:20px}.page-heading{display:block;margin-bottom:18px}.eyebrow{font-size:8px;letter-spacing:1.6px;margin-bottom:8px}h1{font-size:27px;line-height:1.2;letter-spacing:-1px;max-width:320px}.page-heading>.button{margin-top:15px;min-height:38px;padding:8px 12px;font-size:12px}.page-heading>.button svg{width:15px;height:15px}.activity{border-radius:19px}.steps{gap:17px;padding:18px 12px 0;justify-content:space-around}.steps li{gap:5px;font-size:9px;white-space:nowrap}.steps li:not(:last-child):after{display:none}.step-number{width:20px;height:20px;font-size:10px}.question{gap:14px;font-size:39px;margin:20px 12px 18px;min-height:90px}.question-find{font-size:14px}.question-of{font-size:20px}.question-equals{font-size:25px}.fraction{font-size:29px;min-width:35px}.question-answer{min-width:30px}.model-area{margin:0 15px;padding-bottom:14px}.whole-label{font-size:10px;margin-bottom:10px}.whole-label strong{font-size:23px}.bar-model{height:172px;border-radius:10px}.bar-part{padding:12px 5px}.counter-grid{gap:4px}.counter{flex-basis:var(--counter-size,12px);width:var(--counter-size,12px);height:var(--counter-size,12px);border-width:1px}.part-value{font-size:14px;margin-top:10px}.bar-part.is-selected:after{font-size:10px;right:3px;top:3px;width:15px;height:15px;line-height:15px}.model-caption{font-size:10px;margin-top:9px;min-height:22px}.controls-area{padding:20px 18px 20px;min-height:210px}.control-heading{margin-bottom:16px}.control-heading p,.select-instruction p{font-size:11px;margin-top:6px}h2{font-size:17px}.small-tag{display:none}.part-choices>div{gap:6px}.choice{min-width:38px;height:40px;font-size:16px}.split-action-row{gap:18px}.split-action-row>.button{width:100%;min-height:46px}.selection-row{gap:16px;min-height:130px}.select-instruction{flex-basis:100%}.selected-pill{font-size:10px;padding:10px;gap:6px}.selected-pill strong{font-size:20px}.selection-row>.button{font-size:13px;padding-inline:13px;gap:7px;min-height:45px}.calculation{font-size:22px;gap:9px}.calculation-arrow{font-size:17px}.answer-eyebrow{font-size:8px;letter-spacing:1.4px}.answer-row{gap:20px;min-height:140px}.answer-row>.button{min-height:46px;width:100%}.feedback{font-size:12px}.activity-footer{padding:12px 2px 0;align-items:flex-start;gap:10px}.activity-footer p{font-size:9px;max-width:220px}.text-button{font-size:10px;padding-top:0}.footer-dot{height:5px;width:5px;margin-top:4px;align-self:flex-start}dialog{padding:23px}.dialog-header h2{font-size:24px}.question-inputs{gap:15px}.dialog-footer .button{font-size:12px;padding:12px 14px}.dialog-footer .button svg{width:16px;height:16px}}
.counter{position:relative;animation:none;font-style:normal;overflow:visible}
.counter.is-pending{visibility:hidden;animation:none}
.counter.is-placed{animation:counter-deal .24s ease-out both}
.bar-part.is-selected .counter:not(.is-counted){background:#ffffff40;border-color:#ffffff65;box-shadow:none}
.bar-part.is-selected .counter.is-counted{background:var(--mint);border-color:var(--mint)}
.counter.is-tallying{z-index:2;box-shadow:0 0 0 5px #bcebd64d}
.counter.is-tallying:after{content:attr(data-count);position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;min-width:27px;height:27px;padding:0 4px;border-radius:50%;background:var(--mint);color:#335d4c;border:2px solid #fff;font-size:13px;font-style:normal;font-weight:800;box-shadow:0 2px 8px #29163b26}
.model-caption.has-tally{display:flex;align-items:center;justify-content:center;gap:12px;min-height:40px;margin-top:10px}
.tally-label{font-size:12px;color:#8a7b9b}
.model-caption .tally-total{min-width:46px;padding:5px 10px;background:#eee8fc;border-radius:10px;color:var(--purple);font-size:26px;line-height:1;font-variant-numeric:tabular-nums}
.sound-button .sound-muted{display:none}
.sound-button[aria-pressed="false"] .sound-waves{display:none}
.sound-button[aria-pressed="false"] .sound-muted{display:block}
.sound-button[aria-pressed="false"]{color:#a399af}
@keyframes counter-deal{0%{transform:translateY(-18px) scale(.2);opacity:0}70%{transform:translateY(1px) scale(1.12);opacity:1}100%{transform:translateY(0) scale(1);opacity:1}}
@media(max-width:600px){.sound-button{width:32px;border:0}.sound-button svg{width:17px;height:17px}.header-actions{gap:0}.tally-label{font-size:10px}.model-caption .tally-total{font-size:24px}.counter.is-tallying:after{min-width:23px;height:23px;font-size:11px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
