:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#18253b;background:#f3f6fc;font-synthesis:none;--blue:#234ee8;--green:#15724b}*{box-sizing:border-box}body{margin:0}button{font:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default;opacity:.42}button:focus-visible,summary:focus-visible{outline:3px solid #ed9b22;outline-offset:4px}[hidden]{display:none!important}.app{max-width:1000px;margin:auto;padding:28px 32px}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:26px}.brand{display:flex;align-items:center;gap:12px}.brand svg{width:42px;fill:var(--blue);stroke:white;stroke-width:2}h1{font-size:1.5rem;letter-spacing:-.05em;margin:0}header p{font-size:.75rem;letter-spacing:.15em;color:#5e6c83;margin:4px 0 0}main{display:grid;grid-template-columns:minmax(0,1fr);gap:22px}.practice{background:white;border:1px solid #dce3f0;border-radius:24px;padding:25px 32px 19px;box-shadow:0 10px 40px #1f3b7207}.practice-head,.time-row,.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.eyebrow{font-size:.75rem;letter-spacing:.1em;font-weight:750;color:#65738b}.target{white-space:nowrap;border-radius:20px;background:#edf1ff;color:#2344b4;padding:7px 10px;font-size:.875rem;font-weight:650}.stage{position:relative;min-height:354px;display:grid;place-items:center;background-image:radial-gradient(#d6deee .8px,transparent .8px);background-size:18px 18px;margin:18px -10px 0;border-radius:18px}.circle{width:310px;height:310px;position:relative;font-variant-numeric:tabular-nums}.circle>svg{position:absolute;inset:0;width:100%;height:100%;fill:white;stroke:#253650;stroke-width:3}.slot{position:absolute;font-size:3.5rem;font-weight:650;letter-spacing:-.065em;display:flex;align-items:center;justify-content:center;gap:3px}.nw{left:8%;top:14%;width:39%;height:32%}.ne{left:53%;top:14%;width:39%;height:32%}.south{left:20%;top:58%;width:60%;height:29%}.prefix{font-size:1em;color:#8491a7;font-weight:400}.minus{position:absolute;z-index:1;left:48%;top:29%;font-size:1.3rem;background:white;line-height:1}.missing{display:grid;place-items:center;color:var(--blue);background:#eef2ff;border:2px dashed #5372e5;border-radius:13px;width:64px;height:77px;font-size:3rem;line-height:1}.circle.correct>svg{stroke:var(--green)}.circle.wrong>svg{stroke:#c34738}.circle.correct .missing{color:var(--green);border-color:var(--green);background:#eaf8f0}.circle.wrong .missing{color:#b1372b;border-color:#b1372b;background:#fff0ed}.distance-question{width:min(100%,640px);min-height:310px;display:flex;flex-direction:column;justify-content:center;padding:8px 10px}.distance-prompt{text-align:center;font-size:1.25rem;font-weight:750;color:#344962;margin-bottom:2px}.distance-question.correct .distance-prompt{color:var(--green)}.distance-question.wrong .distance-prompt{color:#b1372b}#distance-line svg{display:block;width:100%;height:auto;font-family:inherit}.overlay{position:absolute;inset:0;z-index:2;background:#ffffffed;border-radius:16px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:20px;backdrop-filter:blur(5px)}.overlay h2{font-size:2.3rem;letter-spacing:-.055em;margin:10px 0}.overlay p{line-height:1.6;color:#59677d;margin:2px 0 23px}.primary{border:0;border-radius:12px;background:var(--blue);color:white;padding:14px 24px;font-weight:650;display:inline-flex;align-items:center;justify-content:center;gap:28px;box-shadow:0 4px 0 #1635a1}.primary:hover{background:#153ed0}.quiet{border:1px solid #ced8e8;background:white;border-radius:10px;padding:9px 15px;color:#364860}.timing{margin-top:12px}.time-row{font-size:.875rem;color:#637189;min-height:30px}.feedback{height:49px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:.94rem;font-weight:550;color:#65738b}.feedback.good{color:var(--green)}.feedback.bad{color:#b1372b}.keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.keypad button:last-child{grid-column:2}.keypad button{padding:10px 0;border:1px solid #d2dbea;border-bottom:3px solid #c3cfe2;border-radius:12px;background:#f8faff;color:#243550;font-size:1.65rem;font-weight:600;min-height:53px}.keypad button:hover:enabled{background:#eef2ff;border-color:#899fef}.keypad button:active:enabled{transform:translateY(2px);border-bottom-width:1px;background:#dce5ff}.notation{font-size:.875rem;color:#67768e;text-align:center;margin:18px 0 0;line-height:1.5}.notation b{color:#364860}.next{width:100%;margin:10px 0 0}.overall,.collection{padding:23px;background:white;border:1px solid #dce3f0;border-radius:20px;margin-bottom:18px}.section-title h2{font-size:1rem;margin:0}.section-title>span{font-size:.875rem;color:#64738a}progress{appearance:none;width:100%;height:8px;border:0;border-radius:8px;overflow:hidden;margin:20px 0 17px;background:#e8edf6}progress::-webkit-progress-bar{background:#e8edf6}progress::-webkit-progress-value{background:var(--green);border-radius:8px}progress::-moz-progress-bar{background:var(--green)}.piles{display:grid;grid-template-columns:1fr 1fr;gap:12px}.piles>div{display:grid;grid-template-columns:25px 1fr;background:#f0f3fa;border-radius:12px;padding:15px;gap:4px}.piles strong{font-size:2rem;line-height:1.1}.piles>div>span:last-child{grid-column:2;font-size:.875rem;color:#57687e}.piles .learned-pile{background:#eaf6ef;color:var(--green)}.pile-icon{font-size:1.25rem}.overall p{font-size:.875rem;color:#627188;line-height:1.6;margin:18px 0 0}.legend{display:flex;gap:10px;font-size:.75rem;color:#68788f;margin:17px 0 13px}.blue{color:var(--blue)}.green{color:var(--green)}.pairs{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.pair{font-size:.875rem;border:1px solid #dfe5ef;border-radius:7px;text-align:center;padding:7px 0;color:#748099;background:#f8faff;font-variant-numeric:tabular-nums}.pair.active{outline:2px solid #234ee8;outline-offset:1px}.pair.started{background:#e9efff;border-color:#b5c5fb;color:#2442a4}.pair.learned{background:#deefe5;border-color:#abd3b9;color:#1b6645}.small{font-size:.875rem;color:#69768b;line-height:1.5}.collection>p{margin:15px 0 0}details{padding:0 6px;color:#5c6c83;font-size:.875rem;line-height:1.65}summary{cursor:pointer;font-weight:650;color:#344962}footer{display:flex;justify-content:space-between;align-items:center;gap:12px;color:#758198;font-size:.75rem;padding:20px 5px}.text-button{border:0;background:transparent;color:#5c6c83;text-decoration:underline;font-size:.875rem;padding:5px}dialog{border:1px solid #dce3f0;border-radius:20px;max-width:420px;padding:28px;color:#18253b}dialog::backdrop{background:#14254280}dialog h2{margin-top:0}dialog p{line-height:1.6;color:#5c6c83}.dialog-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:25px}@media(max-width:850px){.app{max-width:620px;padding:18px 15px}main{grid-template-columns:1fr;gap:20px}.practice{padding:20px}header{margin-bottom:18px}.stage{min-height:320px}.circle{width:290px;height:290px}.overall{margin-bottom:16px}.pairs{grid-template-columns:repeat(9,1fr)}.collection .legend{gap:15px}}@media(max-width:380px){.app{padding:12px 9px}.practice{padding:17px 12px}.eyebrow{font-size:.68rem}.target{font-size:.75rem}.stage{min-height:295px}.circle{width:268px;height:268px}.slot{font-size:3rem}.missing{height:65px;width:55px}.pairs{grid-template-columns:repeat(5,1fr)}h1{font-size:1.3rem}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.heat-legend{margin:18px 0 16px;font-size:.875rem;color:#5d6c82}
.heat-caption,.heat-labels{display:flex;justify-content:space-between;gap:8px}
.heat-scale{height:10px;border-radius:6px;margin:10px 0 7px;background:linear-gradient(to right,rgb(34,230,84),rgb(250,204,21) 50%,rgb(139,0,0))}
.pair{font-weight:600}

header{gap:18px;flex-wrap:wrap}
.answer-modes{display:flex;gap:6px;margin-left:auto;align-items:stretch}
.mode-button{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:65px;padding:7px 10px;background:white;color:#53647b;border:1px solid #d5dfef;border-radius:12px;font-size:.875rem;font-weight:650;text-decoration:none;font-family:inherit}
.mode-button svg{width:32px;height:32px;overflow:visible}
.mode-fill{fill:currentColor;opacity:.3}
.mode-outline,.mode-lines{fill:none;stroke:currentColor;stroke-width:1.8}
.mode-button[aria-pressed="true"]{background:#e7eeff;border-color:#234ee8;color:#234ee8;box-shadow:inset 0 0 0 1px #234ee8}
.mode-button[aria-pressed="true"] .mode-fill{opacity:.7}
.mode-button:hover{background:#edf2fd}
@media(max-width:850px){.answer-modes{order:3;flex-basis:100%;margin:0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr))}header>.quiet{margin-left:auto}.mode-button{min-width:0;padding:7px 5px}}

.auto-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:17px 0 0;font-size:.875rem;color:#52637c}
.auto-row small{font-size:inherit;white-space:nowrap;color:#687992}
#auto-continue{display:flex;align-items:center;gap:8px;border:0;background:none;color:#344962;padding:7px 0 7px 7px;font-size:.875rem;min-height:44px}
.switch-track{display:block;width:40px;height:24px;border-radius:20px;background:#abb6c8;padding:3px}
.switch-track>span{display:block;width:18px;height:18px;border-radius:50%;background:white;box-shadow:0 1px 3px #0002}
#auto-continue[aria-checked="true"] .switch-track{background:var(--blue)}
#auto-continue[aria-checked="true"] .switch-track>span{transform:translateX(16px)}
.answer-help{border:1px solid #d8c8fa;border-radius:15px;background:#faf7ff;padding:17px 12px 12px}
.help-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 6px;color:#685584;font-size:.875rem}
.help-heading strong{font-size:1.4rem;color:#5b21b6;font-variant-numeric:tabular-nums}
#help-line svg{display:block;width:100%;height:auto;margin-top:12px;font-family:inherit}
.answer-help p{margin:4px 5px 0;font-size:.875rem;line-height:1.5;color:#65537f}
@media(max-width:380px){.auto-row{gap:8px}.auto-row small{display:block}.help-heading strong{font-size:1.2rem}}

/* Keep the exercise full-width, with progress and the heatmap centered below. */
main>aside{display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;gap:18px;min-width:0}
main>aside>*{width:100%;max-width:760px;min-width:0;margin:0}
main>aside>.overall,main>aside>.collection{margin:0}
.practice{min-width:0}
.practice .stage{min-height:0;margin:16px 0 0;padding:16px 0}
.practice .circle{width:min(100%,420px);height:auto;aspect-ratio:1}
.practice .slot{font-size:clamp(3.5rem,8vw,4.5rem)}
.practice .missing{width:72px;height:86px;font-size:3.5rem}
.practice .timing,.practice .feedback,.practice .keypad,.practice .answer-help,.practice .next,.practice .notation{width:100%;max-width:600px;margin-left:auto;margin-right:auto}
.practice .keypad button{min-height:60px}
.practice .next{display:flex}
.collection .pairs{grid-template-columns:repeat(9,minmax(0,1fr));gap:8px}
.collection .pair{padding:11px 2px;font-size:1rem}
@media(max-width:850px){.app{max-width:1000px}}
@media(max-width:600px){.distance-question{min-height:250px}.collection .pairs{grid-template-columns:repeat(5,minmax(0,1fr))}.overall,.collection{padding:20px}.practice .circle{max-width:340px}.practice .missing{width:60px;height:72px;font-size:3rem}.practice .stage{padding:10px 0}.practice .keypad button{min-height:56px}}
@media(max-width:380px){.practice .slot{font-size:3rem}.collection .pairs{gap:6px}.collection .pair{font-size:.875rem}.practice .missing{width:55px;height:65px}}

[hidden]{display:none!important}.account-bar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:18px;font-size:14px}.account-bar a,.login-card a{color:#234ee8}.account-bar span{margin-right:auto;overflow-wrap:anywhere}.login-card{max-width:440px;margin:8vh auto;padding:30px;background:white;border:1px solid #d9e1ee;border-radius:20px}.login-card h1{font-size:32px;margin:24px 0 16px}.login-card p{line-height:1.6}.login-card label{display:block;margin:18px 0}.login-card input{display:block;width:100%;padding:12px;border:1px solid #aebbd0;border-radius:8px;font:inherit;margin-top:6px}#login-error{color:#a21c20}#login-loading{text-align:center;padding:20vh 20px}
.focus-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;margin-top:16px}
.focus-row .quiet{min-height:44px;font-weight:650}
.focus-row .quiet[aria-pressed="true"]{background:#e7eeff;border-color:var(--blue);color:var(--blue)}
.focus-row .small{flex:1;min-width:180px}
.collection .pair.focused{box-shadow:inset 0 0 0 2px #18253b}


/* Circle exercises can be shown as the circle, a vertical subtraction, or both. */
.circle-view-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 0}
.circle-view-label{font-size:.875rem;font-weight:650;color:#52637c}
.circle-view-toggle{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;flex:1;max-width:620px}
.circle-view-button{min-height:42px;padding:8px 10px;border:1px solid #d5dfef;border-radius:10px;background:white;color:#53647b;font-size:.83rem;font-weight:650}
.circle-view-button:hover{background:#edf2fd}
.circle-view-button[aria-pressed="true"]{background:#e7eeff;border-color:var(--blue);color:var(--blue);box-shadow:inset 0 0 0 1px var(--blue)}
.circle-layout{width:100%;display:flex;align-items:center;justify-content:center;gap:clamp(26px,5vw,64px);min-width:0}
.circle-layout.view-both .circle{max-width:380px}
.vertical-equation{flex:0 0 205px;display:flex;flex-direction:column;align-items:stretch;justify-content:center;padding:14px 8px;font-variant-numeric:tabular-nums;color:#18253b}
.equation-row{display:grid;grid-template-columns:36px 1fr;align-items:center}
.equation-operator{display:grid;place-items:center;font-size:2rem;font-weight:450;color:#344962}
.equation-value{display:grid;grid-template-columns:repeat(2,64px);justify-content:end}
.equation-digit{width:64px;height:78px;display:grid;place-items:center;font-size:3.6rem;font-weight:650;line-height:1;letter-spacing:-.055em}
.equation-digit.prefix{color:#8491a7;font-weight:400}
.equation-missing{width:58px;height:70px;align-self:center;justify-self:center;color:var(--blue);background:#eef2ff;border:2px dashed #5372e5;border-radius:12px;font-size:3.1rem}
.equation-rule{height:0;border-top:3px solid #344962;margin:2px 0 5px 36px}
.vertical-equation.correct .equation-rule{border-color:var(--green)}
.vertical-equation.wrong .equation-rule{border-color:#c34738}
.vertical-equation.correct .equation-missing{color:var(--green);border-color:var(--green);background:#eaf8f0}
.vertical-equation.wrong .equation-missing{color:#b1372b;border-color:#b1372b;background:#fff0ed}
@media(max-width:700px){
  .circle-view-row{align-items:flex-start;flex-direction:column}
  .circle-view-toggle{width:100%;max-width:none}
  .circle-view-button{font-size:.76rem;padding:8px 6px}
  .circle-layout.view-both{flex-direction:column;gap:6px;padding:8px 0 14px}
  .circle-layout.view-both .circle{max-width:330px}
  .vertical-equation{flex-basis:auto;width:190px;padding:4px 8px}
  .equation-value{grid-template-columns:repeat(2,58px)}
  .equation-digit{width:58px;height:68px;font-size:3.1rem}
  .equation-missing{width:52px;height:62px;font-size:2.7rem}
}
@media(max-width:420px){
  .circle-view-toggle{grid-template-columns:1fr}
  .circle-view-button{min-height:38px}
}
