*{box-sizing:border-box}body{margin:0;font:16px/1.55 system-ui;color:#17334c;background:#f4f8ff}header{padding:36px 20px;background:linear-gradient(110deg,#4536a3,#168e98);color:white}header div,main{max-width:1100px;margin:auto}h1{font-size:clamp(30px,5vw,46px);margin:0}main{padding:20px 16px}.nav{display:flex;gap:8px;flex-wrap:wrap;position:sticky;top:0;background:#f4f8fff2;padding:10px 0;z-index:3}.nav button{background:#e5e9ff;color:#342e89}.nav button.active{background:#5042b1;color:white}button{border:0;border-radius:10px;padding:10px 16px;background:#5042b1;color:white;font:inherit;font-weight:700;cursor:pointer}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:16px}.card,.test{background:white;border:1px solid #dae4f0;border-radius:18px;padding:18px;box-shadow:0 4px 18px #22365812}.visual{border-radius:12px;padding:16px;background:#e9f8f3;margin:12px 0;min-height:120px}.line{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:9px 0}.chip{display:inline-flex;justify-content:center;align-items:center;min-width:38px;min-height:38px;border-radius:8px;background:#ffd078;font-weight:700;color:#4b3714}.chip.active{background:#674fba;color:white}.eq{background:#fff3dc;border-radius:10px;padding:10px;margin:9px 0;overflow-wrap:anywhere}.frac{display:inline-flex;vertical-align:middle;flex-direction:column;text-align:center;line-height:1.15;margin:0 .12em}.frac .top{border-bottom:1px solid;padding:0 .15em}.frac .bottom{padding:0 .15em}.status{font-size:12px;color:#5c6e88;font-weight:800}.choice{background:#edf1fd;color:#26365e;margin:4px}.test{margin-top:24px}.clockrow{display:flex;gap:14px;align-items:center}.clock{position:relative;border:4px solid #5143ad;background:white;border-radius:50%;width:80px;height:80px}.hand{position:absolute;left:50%;bottom:50%;height:30px;width:2px;background:#db4d56;transform-origin:bottom}.minute{height:22px;width:3px;background:#5143ad}.clock:after{content:'•';position:absolute;left:43%;top:31%;font-size:22px}.studyinput{font:inherit;width:110px;padding:9px;border:1px solid #9ba9bf;border-radius:9px}.answer{background:#ebf8ed;padding:10px;border-radius:10px}iframe{width:100%;height:85vh;border:1px solid #d6dfef;border-radius:16px;background:white}.note{background:#fff5d9;padding:13px;border-radius:12px}button:disabled{opacity:.45;cursor:not-allowed}textarea,input,select{font:inherit;border:1px solid #aabbd0;border-radius:9px;padding:10px}.nav button:focus-visible,button:focus-visible{outline:3px solid #faad50}

.ld-paper{background:#fffdf6;border:1px solid #efd4aa;border-radius:12px;padding:12px;margin:12px 0;overflow-x:auto}
.ld-caption{font-weight:800;color:#593b87}.ld-caption span{display:block;font-size:.78rem;color:#536477}
.ld-grid{display:grid;grid-template-columns:max-content max-content;gap:0 6px;align-items:center;width:max-content;font:700 1.18rem/1.3 ui-monospace,monospace;margin:8px 0}
.ld-quot{padding-left:10px;color:#6542ab}.ld-divisor{color:#b54825}.ld-dividend{border-top:2px solid #344b61;border-left:2px solid #344b61;padding:2px 8px;border-radius:8px 0 0 0;color:#145d78}
.ld-written{white-space:pre;font:600 1rem/1.3 ui-monospace,monospace;color:#174a5f;margin:6px 0 6px 25px}.ld-lines{padding-left:1.5em;font-size:.9rem}.ld-lines li{margin:.35em 0}
.ld-labels{display:grid;gap:5px;margin:10px 0}.ld-labels span{border-radius:8px;background:#fff4d8;padding:6px}.ld-warning{background:#fff2df;border-left:4px solid #d98c27;padding:10px;border-radius:8px;margin:10px 0}.lesson39-testwork{margin:12px 0}


.eq39-paper{font-family:"Comic Sans MS","Chalkboard SE","Bradley Hand",cursive;font-size:clamp(18px,2vw,23px);font-weight:600;background:#fff4db;line-height:1.7;overflow-x:auto;color:#743e18}
.eq39-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:14px 0}
.eq39-frac{display:inline-flex;vertical-align:middle;flex-direction:column;text-align:center;line-height:1.4;flex-shrink:0;margin:0 3px}
.eq39-top{border-bottom:2px solid #78451d;padding:0 7px 3px;color:#a04520}
.eq39-bottom{padding:3px 7px 0;color:#185b85}

header>div{position:relative;padding-top:48px}.headerFeedback{position:absolute;right:0;top:0;display:inline-block;background:white;color:#4536a3;border-radius:10px;padding:9px 17px;text-decoration:none;font-weight:800;box-shadow:0 2px 10px #0002}.headerFeedback:hover{background:#fff3dc}.headerFeedback:focus-visible,.backLessons:focus-visible{outline:3px solid #faad50;outline-offset:3px}.backLessons{display:inline-block;margin:0 0 16px;color:#4536a3;font-weight:700}body.feedback-page main{max-width:760px}.feedback-page .test{margin-top:0}.feedback-page input,.feedback-page select{max-width:100%}
.eq36-paper{font-family:"Comic Sans MS","Chalkboard SE","Bradley Hand",cursive;font-size:clamp(17px,1.8vw,23px);line-height:1.7;color:#743e18;overflow-x:auto;background:#fff4db}.eq36-line{display:grid;grid-template-columns:max-content 20px max-content;align-items:center;justify-content:start;gap:6px;margin:10px 0}.eq36-added{color:#185b85}.eq36-cancel{text-decoration:line-through;text-decoration-color:#d25235;text-decoration-thickness:2px;color:#816854}.eq36-frac{display:inline-flex;flex-direction:column;text-align:center;margin:0 3px}.eq36-frac>span:first-child{border-bottom:2px solid;padding:0 4px}.eq36-frac>span:last-child{padding:0 4px}.eq36-check{margin-top:14px;color:#236046;font-size:.8em}.test .choice{min-width:85px;max-width:100%;vertical-align:top}.test .choice:disabled{opacity:.65}
.study31-options{display:grid;gap:7px;margin:12px 0}.study31-choice{text-align:left;margin:0;overflow-wrap:anywhere}.study31-equation{font-size:1.5rem;font-weight:800;letter-spacing:.04em}.study31-options p{margin:4px 0}

.test-active-step{position:sticky;top:var(--test-top-offset,76px);z-index:2;background:#fff;border:1px solid #dce2f2;border-radius:14px;padding:14px;box-shadow:0 4px 16px #243c5814;max-height:calc(100vh - var(--test-top-offset,76px) - 12px);max-height:calc(100dvh - var(--test-top-offset,76px) - 12px);overflow-y:auto;overflow-anchor:none;scroll-margin-top:var(--test-top-offset,76px)}
.test-active-step:focus{outline:none}.test-active-step h3{margin:8px 0}.test-active-step>.status{margin:8px 0}.test-active-step>p{margin:10px 0}.test-active-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.test-active-choices .choice{margin:0;min-height:44px;text-align:left;overflow-wrap:anywhere;width:100%}.test-active-step .clockrow{gap:9px;font-size:.85rem}.test-active-step .clock{width:42px;height:42px;border-width:2px;flex:0 0 42px}.test-active-step .hand{height:15px}.test-active-step .minute{height:11px}.test-active-step .clock:after{font-size:14px;left:43%;top:24%}.test-completed-work{margin-top:14px;overflow-anchor:none}#exam{overflow-anchor:none}.test-active-step #testmsg:empty{margin:0}
@media(max-width:450px){.test-active-step{padding:10px}.test-active-choices{gap:6px}.test-active-choices .choice{font-size:.92rem;padding:10px}}

.study-coordinate svg{display:block;width:100%;max-height:220px}.learning-options .study31-choice{padding:12px 14px}.quest-section{border:1px solid #dbd5f1;background:linear-gradient(145deg,#fff,#f8f5ff)}.quest-levels{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.quest-level{display:flex;flex-direction:column;align-items:center;gap:7px;padding:18px 8px;background:linear-gradient(145deg,#6753bf,#3d819c);box-shadow:0 4px 0 #342d68;border:2px solid transparent;transition:transform .15s}.quest-level:hover:not(:disabled){transform:translateY(-3px)}.quest-level>span{font-size:28px}.quest-level>small{font-size:11px}.quest-level:disabled{background:#e8eaf2;color:#5b6380;box-shadow:0 3px 0 #cbd0df;opacity:.8}.quest-note{color:#56627d}.quest-ribbon{margin:5px 0 7px}.quest-track{display:flex;gap:8px;align-items:center;justify-content:center}.quest-track span{width:26px;height:26px;display:grid;place-items:center;border-radius:50%;background:#edf0f6;color:#64728a;font-weight:800;font-size:12px}.quest-track .done{background:#d8f3e2;color:#237245}.quest-track .current{background:#7350b9;color:white;outline:3px solid #e7dcff}.quest-progress{height:5px;background:#eeeaf8;border-radius:6px;margin-top:9px;overflow:hidden}.quest-progress>span{display:block;height:100%;background:linear-gradient(90deg,#7951bb,#3eac9b);transition:width .2s}.quest-playboard{display:grid;grid-template-columns:minmax(145px,.7fr) minmax(0,1.3fr);gap:14px;align-items:start}.quest-picture{background:linear-gradient(135deg,#f0ebff,#e7f8ef);border-radius:12px;padding:10px;min-height:125px;text-align:center;display:flex;flex-direction:column;justify-content:center;overflow:hidden}.quest-picture svg{width:100%;height:140px;display:block}.quest-response>p:first-child{font-size:1.08rem;font-weight:750;margin:0 0 9px}.quest-response #testmsg{margin:8px 0;font-size:.9rem}.quest-hint-button{font-size:.82rem;padding:6px 9px;background:#fff2cc;color:#67501a;border:1px solid #ead298}.quest-hint-wrap p{padding:8px;background:#fff8df;border-radius:8px;font-size:.85rem;margin:6px 0}.quest-success{color:#237245}.quest-retry{color:#8b5a21}.quest-bar{position:relative;height:18px;background:white;border:1px solid #9581c0;border-radius:3px;overflow:hidden;margin:4px 0}.quest-bar>span{display:block;height:100%;background:#8c72cf}.quest-bar>i{position:absolute;top:0;bottom:0;border-left:1px solid #7c65af}.quest-fraction-label{font-size:1.35rem;margin:4px}.quest-math-chips{font-size:1.2rem;font-weight:800;color:#4d367e}.quest-math-chips>span{display:block}.quest-counters{display:flex;gap:5px;justify-content:center;margin-top:9px}.quest-counters b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;color:white}.counter-0{background:#398c91}.counter-1{background:#aa5f96}.quest-decimal{font-size:1.65rem;font-weight:800;color:#574289}.quest-place-labels,.quest-place-track{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;font-size:10px;align-items:center}.quest-place-labels{margin:8px 0 3px}.quest-place-labels span{overflow-wrap:anywhere}.quest-place-track b{background:#fff;padding:6px 0;border-radius:4px}.quest-compare{font-size:1.1rem;font-weight:700}.quest-compare-signs{display:flex;gap:8px;justify-content:center;margin-top:10px}.quest-compare-signs b{background:white;border-radius:6px;min-width:30px;padding:4px;color:#6b4da1}.quest-award{display:flex;gap:15px;align-items:center;padding:20px;background:#e5f7e9;border-radius:14px;color:#295a3b;margin-bottom:16px}.quest-award>span{font-size:42px}.test-active-step .clockrow{justify-content:flex-end}.test-active-step>.status{font-size:11px}.test-active-step h3{margin:5px 0 10px}
@media(max-width:700px){.quest-levels{grid-template-columns:repeat(3,minmax(0,1fr))}.quest-playboard{grid-template-columns:1fr}.quest-picture{min-height:0;padding:5px}.quest-picture svg{height:85px}.quest-picture .quest-bar{height:12px;margin:2px 12px}.quest-fraction-label{font-size:1rem;margin:0}.quest-counters{display:none}.quest-math-chips{font-size:1rem}.quest-math-chips>span{display:inline;margin-left:6px}.quest-decimal{font-size:1.15rem}.quest-place-labels{margin:1px}.quest-place-track b{padding:2px}.quest-compare-signs{margin:3px}.quest-track span{width:22px;height:22px}.quest-ribbon{margin:3px 0}.quest-playboard{gap:8px}.test-active-step .clock{display:none}.quest-response>p:first-child{font-size:1rem}.test-active-step .clockrow{font-size:.75rem}.quest-picture small{font-size:10px}.quest-level{padding:12px 5px}.quest-level>span{font-size:23px}}
@media(prefers-reduced-motion:reduce){.quest-level,.quest-progress>span{transition:none}}
.lab-welcome{display:flex;flex-direction:column;gap:5px;padding:18px 20px;margin:15px 0;background:linear-gradient(120deg,#e7ddff,#dcf5ec);border:1px solid #cfcae9;border-radius:16px;color:#314269}.lab-welcome strong{font-size:1.25rem}.lab-welcome span{font-size:.95rem}.lab-explorer{font-size:14px}.lab-value-keys{display:flex;flex-wrap:wrap;gap:9px;margin:12px 0;align-items:center;justify-content:center}.lab-value-key{display:flex;align-items:center;gap:6px}.lab-value-key>b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#7660c8;color:white}.lab-value-key:nth-child(2)>b{background:#b34d59}.lab-value-key:nth-child(3)>b{background:#127b78}.lab-value-key small{display:block;font-size:11px}.lab-picture svg{width:100%;height:auto;min-height:125px;overflow:visible}.lab-bar-row{display:grid;grid-template-columns:20px minmax(60px,1fr) auto;gap:8px;align-items:center;margin:12px 0}.lab-bar{height:23px;border:1px solid #c3c8df;background:#fff;position:relative;overflow:hidden;border-radius:5px}.lab-bar>span{display:block;height:100%;transition:width .3s}.lab-bar>i{position:absolute;top:0;bottom:0;border-left:1px solid #fff9}.lab-bar-row>.frac{min-width:30px}.lab-tools{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:10px 0}.lab-tools button,.lab-explore-button{font-size:12px;min-height:34px;padding:6px 10px;border:1px solid #c8b9ea;background:#fff;color:#594382;border-radius:9px}.lab-tools button[aria-pressed=true]{background:#7255b8;color:white;border-color:#7255b8}.lab-equation{font-family:'Comic Sans MS','Chalkboard SE',cursive;font-size:17px;line-height:2.2;background:#fff5d6;border:1px solid #eedcaf;border-radius:10px;padding:10px;margin-top:10px;color:#704418;overflow-wrap:anywhere}.lab-eq-space{display:inline-block;width:12px}.lab-final{background:#e2f4df;padding:12px;border-radius:10px;margin-top:12px}.lab-machine-in{display:flex;justify-content:center;align-items:center;gap:10px;background:#e7e0fa;border:1px solid #cbbce9;border-radius:12px;padding:12px 5px;margin:12px 0}.lab-machine-in>span{display:flex;flex-direction:column;text-align:center;gap:5px}.lab-machine-in small{font-size:10px;color:#5b4b79}.lab-machine-in b{font-size:22px}.lab-digit-train{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:3px;padding:10px 0}.lab-digit-train>b{display:inline-grid;place-items:center;background:white;border:1px solid #c4bfdf;border-radius:5px;min-width:24px;min-height:32px;font-family:monospace;font-size:19px;color:#473778}.lab-digit-train .lab-cycle{background:#ffdd87;border-color:#d9ad43}.lab-stop{color:#238371;padding-left:6px}.lab-rem{border:2px solid #ca8f3d;border-radius:50%;padding:2px 6px}.lab-caption{font-size:13px;line-height:1.5;margin:6px 0}.lab-trail{display:flex;flex-direction:column;gap:5px;text-align:left;font-family:monospace;font-size:12px;background:white;padding:9px;max-height:150px;overflow:auto;border-radius:8px}.lab-trail[hidden]{display:none}.lab-square>svg{display:block;width:100%;max-height:200px}.lab-square-area{padding:7px;border-radius:9px;background:#fff9e7}.lab-square-area>b{color:#7e579f;font-size:18px}.lab-build-note{background:#e1f1ea;border-radius:7px;padding:7px;font-size:12px}.lab-mission-stamp{font-size:12px;font-weight:800;color:#6b4c9d;margin-bottom:7px}.lab-test-picture{display:block;text-align:center;padding:10px}.lab-test-picture .lab-equation{font-size:13px;padding:4px;line-height:2;margin-top:5px}.lab-test-picture .lab-value-keys{margin:3px 0}.lab-test-picture .lab-picture svg{height:115px;min-height:0}.lab-test-picture .lab-square>svg{height:125px}.lab-test-picture .lab-machine-in{margin:3px 0;padding:6px}.lab-test-picture .lab-machine-in b{font-size:17px}.lab-test-picture .lab-digit-train{padding:5px 0}.lab-test-picture .lab-caption{font-size:11px}.lab-test-picture .lab-tools{margin:5px 0}.lab-topic-active .quest-playboard{grid-template-columns:minmax(200px,.9fr) minmax(0,1.1fr)}.lab-study .status{letter-spacing:.03em}.lab-test-picture .lab-build-note{font-size:11px;padding:4px}
@media(max-width:700px){.lab-topic-active .quest-playboard{grid-template-columns:1fr}.lab-test-picture{padding:6px}.lab-test-picture .lab-picture svg{height:85px}.lab-test-picture .lab-square{display:grid;grid-template-columns:100px 1fr;align-items:center;gap:4px}.lab-test-picture .lab-square>svg{grid-row:1/5;height:90px;grid-column:1}.lab-test-picture .lab-square>*:not(svg){grid-column:2;margin:0}.lab-test-picture .lab-square .lab-equation{display:none}.lab-test-picture .lab-tools button{min-height:30px;font-size:11px;padding:3px 7px}.lab-test-picture .lab-machine .lab-caption,.lab-test-picture .lab-machine>.lab-equation{display:none}.lab-test-picture .lab-machine-in{display:inline-flex;margin-right:8px;padding:4px 7px}.lab-test-picture .lab-machine-in small{font-size:8px}.lab-test-picture .lab-digit-train{display:inline-flex}.lab-test-picture .lab-digit-train>b{min-width:18px;min-height:25px;font-size:15px}.lab-test-picture .lab-compare>.lab-equation{display:none}.lab-test-picture .lab-machine>.lab-explore-button{display:block;margin:4px auto}.lab-value-key small{font-size:10px}.lab-equation{font-size:16px}.lab-welcome{padding:14px}}
@media(prefers-reduced-motion:reduce){.lab-bar>span{transition:none}}