:root{font-family:ui-rounded,"Avenir Next",Avenir,system-ui,sans-serif;color:#243e36;background:#faf8f0;font-synthesis:none;--green:#356859;--muted:#6c7770;--line:#dfE3d8}*{box-sizing:border-box}body{margin:0}main{max-width:1120px;margin:auto;padding:28px 38px}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:48px}.brand{font-size:27px;font-weight:800;letter-spacing:-1px;color:inherit;text-decoration:none;display:flex;align-items:center}.mark{background:var(--green);color:#fffbed;border-radius:13px;display:inline-grid;place-items:center;width:42px;height:42px;margin-right:10px;font-size:38px;font-weight:400}.dot{color:#dc9a49}.eyebrow,.tag{font-size:10px;letter-spacing:2px;font-weight:750}.eyebrow{color:var(--muted)}h1{font-size:44px;letter-spacing:-1.8px;line-height:1.15;margin:14px 0}h1 em{font-family:Georgia,serif;font-weight:400;color:var(--green)}.intro>p{color:var(--muted);margin:18px 0 28px}.setup-grid{display:grid;grid-template-columns:1.45fr 1fr;gap:26px}.panel{background:#fffef9;border:1px solid var(--line);border-radius:20px;padding:28px}fieldset{border:0;padding:0;margin:0 0 26px;min-width:0}legend{font-weight:750;margin-bottom:14px;font-size:16px}legend>span{color:#86998c;font-size:11px;margin-right:10px}.choices{display:flex;gap:8px}.choices label{flex:1}.choices span,.tables span{display:grid;place-items:center;border:1px solid var(--line);border-radius:10px;min-height:46px;font-weight:650;cursor:pointer}.choices input,.tables input,.modes input{position:absolute;opacity:0;width:1px;height:1px}input:checked+span{background:var(--green);border-color:var(--green);color:white}input:focus-visible+span{outline:3px solid #dda24b;outline-offset:3px}.tables{display:grid;grid-template-columns:repeat(7,1fr);gap:7px}.table-actions{display:flex;justify-content:flex-end;gap:16px;margin-top:-6px;margin-bottom:9px}button,input{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.55;cursor:wait}.text-button{background:none;border:0;color:var(--green);text-decoration:underline;text-underline-offset:4px;padding:10px 0;font-size:13px;font-weight:650}.hint{font-size:12px;line-height:1.6;color:var(--muted)}.modes{display:grid;grid-template-columns:1fr 1fr;gap:9px}.modes label>span{display:block;padding:14px 12px;border:1px solid var(--line);border-radius:12px;font-weight:700;cursor:pointer}.modes .hint{display:block;font-weight:400;font-size:10px;margin-top:6px}.modes input:checked+span{background:#eef3ec;color:var(--green)}.primary{display:flex;justify-content:space-between;align-items:center;gap:24px;border:0;border-radius:11px;background:var(--green);color:white;padding:16px 22px;font-weight:700;min-height:50px}#start{width:100%}.center{text-align:center;margin-bottom:0}.leaderboard{align-self:start;background:#eff2e8;min-height:360px}.board-title{display:flex;align-items:center;justify-content:space-between}.star{font-size:45px;color:#c18a41}h2{font-family:Georgia,serif;font-size:30px;font-weight:400;margin:3px 0 10px}#scores{padding:0;list-style:none;margin:25px 0}#scores li{display:flex;align-items:center;gap:12px;border-top:1px solid #d8dfd1;padding:13px 0;font-size:14px}#scores .rank{color:#83907f;width:20px}#scores .score-time{margin-left:auto;font-weight:750;font-variant-numeric:tabular-nums}.empty-board{padding:20px 0;color:var(--muted);font-size:14px;line-height:1.7}.local-note{margin-top:26px}footer{display:flex;justify-content:center;gap:14px;color:#829087;font-size:11px;margin:32px 0 0}footer span{color:#b68e50}.game-heading{display:flex;justify-content:space-between;align-items:center}.game-heading h1{font-size:28px}.clock{text-align:right}.clock>span{display:block;font-size:10px;letter-spacing:1px}.clock strong{font-size:32px;font-variant-numeric:tabular-nums}progress{width:100%;height:5px;accent-color:var(--green);border:0;border-radius:5px}progress::-webkit-progress-bar{background:#e5e8df}progress::-webkit-progress-value{background:var(--green)}.worksheet-tools{display:flex;align-items:center;justify-content:space-between;gap:16px}.problems{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.problem{border:1px solid var(--line);background:#fffef9;border-radius:13px;padding:10px 14px;position:relative}.problem-head{display:flex;align-items:center;gap:14px}.problem-number{font-size:10px;color:#8b958e}.equation{font-size:22px;font-weight:700;letter-spacing:1px}.erase{margin-left:auto;font-size:11px;padding:5px;color:var(--muted);min-height:28px}.answer-row{display:flex;align-items:center;gap:12px;margin-top:5px}.ink{width:216px;max-width:75%;height:66px;background:linear-gradient(90deg,transparent calc(33.333% - 1px),#e5e8e1 33.333%,transparent calc(33.333% + 1px),transparent calc(66.666% - 1px),#e5e8e1 66.666%,transparent calc(66.666% + 1px));border-bottom:2px solid #b7c5b6;touch-action:none;user-select:none;-webkit-user-select:none;border-radius:0}.readout{font-size:19px;font-weight:700;color:#647366;min-width:42px}.typed-answer{height:57px;width:100%;border:0;border-bottom:2px solid #b7c5b6;background:transparent;color:var(--green);border-radius:0;font-size:26px;padding:5px 10px;outline-offset:1px}.problem.incorrect{border-color:#cd875a;background:#fff7ed}.problem.correct{border-color:#9db399}.problem-status{position:absolute;right:10px;top:12px;font-size:11px;color:#885122}.problem:has(.erase) .problem-status{right:65px}.page-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:18px}.page-footer p{font-size:13px}.results{max-width:650px;margin:60px auto;text-align:center;padding:45px}#final-time{font-size:70px;font-weight:750;letter-spacing:-3px;margin:24px 0;color:var(--green)}.results p{color:var(--muted);line-height:1.6}.save-row{display:flex;gap:10px;margin:12px 0}#save-form{margin-top:30px}#player{min-width:0;flex:1;padding:12px;border:1px solid var(--line);border-radius:10px}.results label{font-size:13px}button:focus-visible,a:focus-visible{outline:3px solid #dda24b;outline-offset:3px}[hidden]{display:none!important}@media(max-width:850px){main{padding:22px 24px}header{margin-bottom:30px}.eyebrow{font-size:8px}.setup-grid{gap:16px;grid-template-columns:1.3fr 1fr}.panel{padding:22px}.modes label>span{font-size:13px}.modes .hint{font-size:9px}h1{font-size:38px}.problems{gap:9px}.problem{padding:8px 12px}.game-heading h1{font-size:25px}}@media(max-width:600px){main{padding:20px 16px}.eyebrow{display:none}.setup-grid{grid-template-columns:1fr}h1{font-size:35px}.leaderboard{min-height:250px}.game-heading h1{font-size:21px}.clock strong{font-size:25px}.problem{padding:8px}.equation{font-size:18px}.problem-head{gap:6px}.problem-number{font-size:9px}.ink{max-width:100%;width:100%;height:72px}.answer-row{flex-wrap:wrap;gap:0}.readout{font-size:13px;height:17px}.erase{font-size:10px}.page-footer{align-items:flex-start}.page-footer p{max-width:45%}.results{padding:25px 16px}.save-row{flex-direction:column}.worksheet-tools .hint{font-size:11px}.problem-status{top:35px!important;right:8px!important}.brand{font-size:24px}.choices{gap:6px}}

.choices{flex-wrap:wrap}.choices label{min-width:40px}

/* The guide sits INSIDE the canvas: ink crossing it is still captured. */
.ink-surface{position:relative;width:216px;max-width:75%;height:86px;flex-shrink:0}
.ink-surface::before{content:"";position:absolute;inset:10px 0;border:1.5px solid #9dab9d;border-radius:5px;pointer-events:none;background:linear-gradient(90deg,transparent calc(33.333% - 1px),#d9ded5 33.333%,transparent calc(33.333% + 1px),transparent calc(66.666% - 1px),#d9ded5 66.666%,transparent calc(66.666% + 1px))}
.ink-surface .ink{position:relative;display:block;width:100%;max-width:none;height:100%;border:0;background:transparent}
@media(max-width:600px){.ink-surface{width:100%;max-width:100%;height:92px}}

.problem.correct{background:#e1f1df;border-color:#7ead7b}
.problem.correct .problem-status{color:#28663b;font-size:20px;font-weight:800;line-height:1}
.problem.correct .typed-answer{color:#28663b;border-color:#83af81}
.problem.correct .ink-surface::before{border-color:#83af81;background-color:#eaf6e7}
.problem.correct .readout{color:#28663b}
.header-actions{display:flex;align-items:center;gap:20px}
.sound-button{border:1px solid var(--line);background:#fffef9;border-radius:9px;padding:9px 12px;color:var(--green);font-size:12px;min-height:40px}
@media(max-width:850px){.header-actions .eyebrow{display:none}}
