:root{--blue:#4c6f84;--dark:#3d5e73;--pale:#e3edf3;--light:#d5e4ec;--line:#b6ccd9;--ink:#294353;--muted:#637f90;--paper:#fff;--ground:#f8f7f2;font-family:Arial,sans-serif;color:var(--ink);background:var(--ground);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:9px 14px;color:var(--dark);background:white;border:1px solid var(--line);border-radius:10px;cursor:pointer;line-height:1.35}button:hover{background:#f0f5f8}button[aria-pressed=true]{background:var(--light);border-color:var(--blue);box-shadow:inset 0 0 0 1px var(--blue)}button:disabled{opacity:.5;cursor:wait}button.primary{background:var(--blue);color:white;border-color:var(--blue)}a{color:var(--dark)}button:focus-visible,a:focus-visible,[tabindex]:focus-visible,[contenteditable]:focus-visible,input:focus-visible{outline:3px solid #7da9c4;outline-offset:3px}button svg{width:19px;height:19px;flex:none}.icon{width:42px;height:42px;padding:9px;flex:none}.top{max-width:1240px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:15px 28px}.brand{display:flex;align-items:center;gap:5px;text-decoration:none}.brand img:first-child{width:33px;height:33px}.brand img:last-child{width:102px;height:auto}.material-nav{display:flex;align-items:center;gap:10px}.back{font-size:13px;text-decoration:none;margin-right:12px}.action-bar{display:flex;justify-content:flex-end;gap:10px;padding:12px max(28px,calc((100vw - 1184px)/2));border-bottom:1px solid var(--line);min-height:68px}.action-bar button{min-width:148px}.action-bar .idea{min-width:84px;background:var(--pale);font-style:italic}main{max-width:1240px;margin:auto;padding:30px 28px 80px}.intro{display:flex;justify-content:space-between;align-items:center;gap:25px;margin-bottom:24px}.eyebrow{font-size:10px;letter-spacing:1.5px;color:var(--muted);font-weight:bold;margin:0 0 10px}h1{font:700 38px Georgia,serif;margin:0 0 10px}.intro p:last-child{font-size:14px;color:var(--muted);margin:0}.intro-digits{font:italic 58px Georgia,serif;color:var(--blue);letter-spacing:7px;padding-right:18px;white-space:nowrap}.intro-digits span{color:#9ab9c6}.tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:12px;background:var(--pale);border:1px solid var(--line);border-radius:12px}.tools>button{font-size:12px;min-height:48px}.tools>button>span:not(.tool-symbol){display:grid;gap:3px;text-align:left}.tools small{font-size:10px;font-weight:normal}.tool-symbol{font:bold 20px Georgia,serif}.tools .generate-open{font-weight:bold;background:#d5e4ec}.spacer{flex:1}.file-action{height:48px;min-width:45px;display:grid!important;gap:2px!important;padding:5px!important;justify-items:center}.file-action span{font-size:9px}.file-action svg{width:18px;height:18px}.work-summary{display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:12px;color:var(--muted);margin:15px 0 5px}.work-summary p{margin:0}.summary-dot{padding:0 10px}#save-state{font-size:10px}.direct-hint{font-size:11px;line-height:1.6;color:var(--muted);margin:0 0 19px}.pages{display:grid;justify-items:center;gap:28px;padding:0 12px}.worksheet{width:210mm;height:296.5mm;background:white;position:relative;box-shadow:0 4px 24px #304b5b19;border:1px solid #d5e4ec;overflow:visible;color:#294353;container-type:inline-size}.paper-content{padding:12mm 13mm 9mm;width:100%;height:100%;position:relative;display:flex;flex-direction:column}.paper-header{display:flex;align-items:center;justify-content:space-between;gap:12mm;padding-bottom:4mm;border-bottom:1px solid #d5e4ec;font-size:8px;letter-spacing:.4px;color:#637f90}.print-brand{display:inline-flex;align-items:center;gap:3px;flex:none}.print-brand img:first-child{width:7mm;height:7mm;object-fit:contain}.print-brand img:last-child{width:25mm;height:auto}.paper-header>span:last-child{max-width:75mm;text-align:right;overflow-wrap:anywhere}.paper-heading{display:flex;align-items:baseline;justify-content:space-between;gap:6mm;margin-top:5mm}.paper-heading h2{font:700 25px Georgia,serif;margin:0;min-width:20mm;max-width:135mm;overflow-wrap:anywhere}.level-caption{font-size:9px;color:#637f90}.name-line{display:flex;align-items:baseline;gap:3mm;font-size:11px;margin:4mm 0 0}.name-line>span:last-child{display:block;min-width:58mm;min-height:5mm;border-bottom:1px solid #9eb9c9;max-width:120mm;overflow-wrap:anywhere}.trace-intro{display:grid;grid-template-columns:65mm 1fr 22mm;gap:6mm;align-items:center;min-height:65mm;padding:3mm 0;margin:2mm 0 4mm;border-bottom:1px solid #e3edf3}.big-digit{height:58mm;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#7194a7}.large-glyph{height:100%;width:100%;overflow:visible}.direction-arrows{fill:#b57836}.trace-copy{align-self:center}.stage-title{display:flex;align-items:center;gap:2.5mm;font-size:12px;line-height:1.35}.stage-title>svg{width:17px;height:17px;color:#4c6f84;flex:none}.stage-number{display:inline-flex;width:6mm;height:6mm;align-items:center;justify-content:center;border-radius:50%;background:#e3edf3;color:#4c6f84;font-size:10px;flex:none}.trace-copy p{font-size:10px;line-height:1.6;margin:3mm 0;max-width:67mm;color:#637f90}.finger-count{height:25mm;display:flex;justify-content:flex-start;align-items:center;gap:3mm;margin:2mm 0}.finger-count>svg{height:100%;max-width:23mm;overflow:hidden}.number-word{font-size:11px;color:#637f90;display:block;margin-top:1mm}.paper-companion{width:22mm;height:25mm;object-fit:contain;align-self:end;margin-bottom:5mm}.writing-rows{display:grid;gap:7mm}.writing-task{padding:0;cursor:pointer;border-radius:3mm}.writing-task:hover{outline:1px solid #c5d9e4;outline-offset:3mm}.writing-task:focus-visible{outline-offset:3mm}.row-edit-hint{margin-left:auto;color:#86a4b4;opacity:.7;display:flex}.row-edit-hint svg{width:14px;height:14px}.writing-area{display:flex;justify-content:space-between;align-items:flex-end;gap:0;min-height:calc(var(--digit-height) + 10mm);margin-top:3mm;padding:5mm 2mm;border-bottom:1px solid #7fa1b6;position:relative}.writing-area.grid{background-image:linear-gradient(to right,#dbe5ea 1px,transparent 1px),linear-gradient(to bottom,#dbe5ea 1px,transparent 1px);background-size:var(--grid-step) var(--grid-step);background-position:0 5mm}.writing-area.lines{background-image:linear-gradient(to bottom,#c7d8e3 1px,transparent 1px);background-size:100% var(--grid-step);background-position:0 5mm}.writing-area.blank{background:none}.writing-cell{width:calc(var(--digit-height)*.84);height:var(--digit-height);display:flex;justify-content:center;align-items:flex-end;flex:none;color:#9cb4c0}.writing-cell.model-cell{color:#3d5e73}.digit-glyph{display:block;width:100%;height:100%}.self-check{display:flex;align-items:center;gap:3mm;margin-top:7mm;padding:4mm 0 3mm;border-top:1px solid #e3edf3;font-size:10px;color:#637f90}.self-check p{margin:0}.choose-mark{font-size:24px;color:#9a7d43}.paper-footer{display:flex;justify-content:space-between;gap:10mm;margin-top:auto;padding-top:3mm;color:#637f90;font-size:8px}.page-delete{position:absolute;right:-12px;top:-12px;width:30px;height:30px;min-height:30px;padding:6px;border-radius:50%;background:white;box-shadow:0 2px 8px #304b5b15;z-index:3}.page-delete svg{width:16px;height:16px}.mono{filter:grayscale(1)}.mono .writing-cell:not(.model-cell){color:#a1a1a1}.mono .writing-cell.model-cell{color:#222}.mono .direction-arrows{fill:#222}[contenteditable]:hover{outline:1px dashed #aac5d5;outline-offset:3px}.loading-card,.empty-pages{padding:40px;text-align:center;border:1px solid var(--line);border-radius:14px;background:white;color:var(--muted);width:min(100%,600px);margin:20px auto}.loader{display:block;border:2px solid var(--pale);border-top-color:var(--blue);border-radius:50%;width:24px;height:24px;animation:spin 1s linear infinite;margin:auto}@keyframes spin{to{transform:rotate(360deg)}}dialog{border:1px solid var(--line);border-radius:17px;background:white;color:var(--ink);padding:0;width:min(720px,calc(100vw - 28px));max-height:calc(100dvh - 28px);box-shadow:0 18px 70px #203b4c30}dialog::backdrop{background:#203b4c66;backdrop-filter:blur(2px)}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 22px;border-bottom:1px solid var(--light);position:sticky;top:0;background:white;z-index:2}.modal-head h2{font-size:20px;margin:0}.modal-head .close{width:38px;height:38px;min-height:38px;padding:8px}.modal-head .close svg{width:20px;height:20px}#modal-body{padding:22px}.modal-intro{font-size:13px;color:var(--muted);line-height:1.6;margin:0 0 18px}#modal-body h3{font-size:14px;margin:20px 0 12px}.hint{font-size:11px;line-height:1.65;color:var(--muted);margin:15px 0 0}.small-actions{display:flex;gap:8px;margin-bottom:15px}.small-actions button{font-size:11px;padding:7px 12px;min-height:34px}.digit-choices{display:grid;grid-template-columns:repeat(5,1fr);gap:9px}.digit-choices button{height:88px;display:flex;flex-direction:column;gap:4px;padding:12px 6px}.digit-choices .digit-glyph{height:45px;width:43px}.digit-choices button>span{font-size:10px}.level-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.level-choices>button{display:flex;flex-direction:column;align-items:stretch;text-align:left;gap:12px;padding:14px;min-height:177px}.level-choices strong{font-size:13px}.level-choices small{font-size:11px;font-weight:normal;line-height:1.6;min-height:52px}.mini-sequence{display:grid;grid-template-columns:repeat(4,1fr);gap:3px;height:45px}.mini-sequence>span{border-bottom:1px solid #9eb9c9;display:block;height:44px}.mini-sequence .digit-glyph{height:32px;width:100%;margin-top:6px}.settings-block{padding-bottom:17px;margin-bottom:16px;border-bottom:1px solid #d5e4ec}.settings-block h3:first-child{margin-top:0!important}.background-choices{display:flex;gap:8px;margin:12px 0 21px}.background-choices>button{flex:1;display:flex;flex-direction:column;gap:8px;font-size:12px}.background-sample{display:block;width:68px;height:35px;border:1px solid #d5e4ec;background-color:white}.background-sample.grid{background-image:linear-gradient(to right,#aac5d5 1px,transparent 1px),linear-gradient(to bottom,#aac5d5 1px,transparent 1px);background-size:9px 9px}.background-sample.lines{background-image:linear-gradient(to bottom,#aac5d5 1px,transparent 1px);background-size:100% 9px}.range-label{display:flex;justify-content:space-between;align-items:center;gap:20px;font-size:12px;margin-bottom:12px}.range-label output{padding:6px 9px;background:#e3edf3;border-radius:6px;font-weight:bold}input[type=range]{width:100%;accent-color:var(--blue)}.range-ends{display:flex;justify-content:space-between;font-size:10px;color:var(--muted);margin-top:6px}.toggle-row{display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:12px;border-bottom:1px solid #e3edf3;padding:10px 0}.toggle-row button{font-size:11px;min-height:34px;min-width:90px}.colour-choices{display:flex;gap:8px;margin-top:15px}.colour-choices button{font-size:12px;flex:1}.colour-dot{display:inline-block;width:15px;height:15px;border-radius:50%;background:conic-gradient(#4c6f84 0 33%,#b57836 0 66%,#809e73 0)}.colour-dot.grey{background:linear-gradient(90deg,#fff 50%,#444 50%);border:1px solid #777}.text-label{display:grid;gap:8px;font-size:12px}.text-label input{padding:10px;border:1px solid var(--line);border-radius:7px;color:var(--ink)}.generator-choices{display:grid;grid-template-columns:1fr 1fr;gap:10px}.generator-choices>button{display:flex;align-items:center;gap:12px;text-align:left;padding:13px}.generator-choices button>span:last-child{display:grid;gap:7px}.generator-choices strong{font-size:12px}.generator-choices small{font-size:11px;font-weight:normal;line-height:1.6}.sheet-symbol{height:48px;width:35px;flex:none;display:flex;align-items:center;justify-content:center;border:1px solid #93b3c5;background:white;font:bold 24px Georgia;color:var(--blue);box-shadow:3px 3px #dae6ed}.generate-bottom{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:22px;padding-top:18px;border-top:1px solid #d5e4ec;font-size:13px}.generate-bottom button{font-size:13px}.row-style-choices{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.row-style-choices button{flex-direction:column;padding:10px 4px;font-size:11px}.row-style-sample{height:56px;width:45px;display:flex;align-items:center;justify-content:center}.row-style-sample>.digit-glyph{height:50px}.blank-square{width:30px;height:44px;border:1px dashed #aac5d5}.count-choices{display:flex;gap:7px;flex-wrap:wrap}.count-choices button{font-size:12px;min-width:44px}.ideas{font:italic 18px/1.8 Georgia,serif}.ideas p{margin:0 0 18px}.ideas p:last-child{margin-bottom:0}.help-copy{font-size:13px;line-height:1.8}.help-copy p{margin-top:0}#print-preview{width:min(1100px,calc(100vw - 24px));height:calc(100dvh - 32px);max-height:none}#print-preview iframe{width:100%;height:calc(100% - 78px);border:0;display:block}.toast{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);background:#36586b;color:white;padding:12px 17px;border-radius:10px;font-size:12px;z-index:1000;box-shadow:0 4px 22px #29435328;max-width:min(600px,calc(100vw - 28px))}.toast:empty{display:none}.toast button{padding:3px 7px;min-height:28px;font-size:11px;margin-left:10px}.print-document{background:#e6ecf0;padding:18px;margin:0}.print-document .worksheet{margin:0 auto 22px;border:0;overflow:hidden}.print-document .writing-task{cursor:default}.print-document .paper-content{padding-top:12mm}.print-document .editor-only{display:none!important}[hidden]{display:none!important}@page{size:A4 portrait;margin:0}@media print{html,body.print-document{margin:0!important;padding:0!important;background:white!important;min-height:0!important;height:auto!important}body.print-document{display:contents!important}.print-document .worksheet{margin:0!important;width:210mm;height:calc(297mm - 1px)!important;box-shadow:none!important;border:0!important;break-inside:avoid;page-break-inside:avoid;break-after:auto;page-break-after:auto}.print-document .worksheet+.worksheet{break-before:page;page-break-before:always}.print-document .paper-content{height:100%}*{-webkit-print-color-adjust:exact;print-color-adjust:exact}.editor-only{display:none!important}}
@media screen and (max-width:900px){main{padding:26px 20px 65px}.intro-digits{font-size:47px}.tools{gap:7px}.tools .spacer{display:none}.pages{padding:0 7px}.worksheet{width:min(210mm,100%);height:auto;aspect-ratio:210/296.5;container-type:inline-size}.worksheet .paper-content{position:absolute;inset:0;padding:5.71cqw 6.19cqw 4.28cqw}.worksheet .paper-header{padding-bottom:1.9cqw;font-size:clamp(5px,1cqw,8px)}.worksheet .print-brand img:first-child{width:3.33cqw;height:3.33cqw}.worksheet .print-brand img:last-child{width:11.9cqw}.worksheet .paper-header>span:last-child{max-width:35cqw}.worksheet .paper-heading{margin-top:2.38cqw;gap:2.85cqw}.worksheet .paper-heading h2{font-size:3.15cqw;max-width:64cqw}.worksheet .level-caption{font-size:1.13cqw}.worksheet .name-line{font-size:1.38cqw;margin-top:1.9cqw;gap:1.42cqw}.worksheet .name-line>span:last-child{min-height:2.38cqw;min-width:27.61cqw}.worksheet .trace-intro{grid-template-columns:30.95cqw 1fr 10.47cqw;gap:2.85cqw;min-height:30.95cqw;padding:1.42cqw 0;margin:1cqw 0 1.9cqw}.worksheet .big-digit{height:27.61cqw}.worksheet .stage-title{font-size:1.51cqw;gap:1.19cqw}.worksheet .stage-number{width:2.85cqw;height:2.85cqw;font-size:1.26cqw}.worksheet .stage-title>svg{width:2.14cqw;height:2.14cqw}.worksheet .trace-copy p{font-size:1.26cqw;line-height:1.6;margin:1.42cqw 0}.worksheet .finger-count{height:11.9cqw;gap:1.42cqw;margin:.95cqw 0}.worksheet .finger-count>svg{max-width:10.95cqw}.worksheet .number-word{font-size:1.38cqw}.worksheet .paper-companion{width:10.47cqw;height:11.9cqw;margin-bottom:2.38cqw}.worksheet .writing-rows{gap:3.33cqw}.worksheet .writing-area{min-height:calc(var(--digit-number)*.47619cqw + 4.76cqw);height:calc(var(--digit-number)*.47619cqw + 4.76cqw);padding:2.38cqw .95cqw;margin-top:1.42cqw;background-size:calc(var(--grid-number)*.47619cqw) calc(var(--grid-number)*.47619cqw);background-position:0 2.38cqw}.worksheet .writing-cell{width:calc(var(--digit-number)*.4cqw);height:calc(var(--digit-number)*.47619cqw)}.worksheet .self-check{margin-top:3.33cqw;padding:1.9cqw 0 1.42cqw;gap:1.42cqw;font-size:1.26cqw}.worksheet .choose-mark{font-size:3cqw}.worksheet .paper-footer{padding-top:1.42cqw;font-size:1cqw}.worksheet .row-edit-hint svg{width:1.76cqw;height:1.76cqw}.worksheet .page-delete{right:-9px;top:-9px;width:27px;height:27px}.print-document .worksheet{width:210mm;height:296.5mm;aspect-ratio:auto}.print-document .paper-content{position:relative;padding:12mm 13mm 9mm}}
@media screen and (max-width:600px){.top{padding:12px 14px}.brand img:last-child{width:85px}.brand img:first-child{width:28px;height:28px}.material-nav{gap:6px}.material-nav .icon{width:34px;height:34px;min-height:34px;padding:6px}.back{margin-right:2px;font-size:12px}.action-bar{padding:10px 14px;gap:7px;min-height:62px}.action-bar button{min-width:0;flex:1;font-size:12px;padding:9px 5px}.action-bar .idea{min-width:0;flex:0 0 70px}main{padding:23px 14px 55px}h1{font-size:31px}.eyebrow{font-size:9px;letter-spacing:1.1px}.intro{gap:10px;margin-bottom:20px}.intro p:last-child{font-size:12px;line-height:1.5;max-width:240px}.intro-digits{display:none}.tools{padding:8px;gap:6px}.tools>button{min-height:43px;font-size:11px;padding:7px 9px}.tools .digits-open,.tools .level-open{flex:1}.tools small{font-size:9px}.tool-symbol{font-size:17px}.tools .settings-open{flex:1}.tools .generate-open{flex:1}.tools .file-action{min-width:37px;width:37px}.tools .settings-open span{display:none!important}.tools .settings-open{flex:0 0 38px}.tools .generate-open{flex-basis:calc(100% - 90px)}.tools .generate-open span{display:inline!important}.tools .file-action{height:43px}.work-summary{font-size:10px;align-items:flex-start;margin-top:12px}.summary-dot{padding:0 5px}#save-state{font-size:9px;max-width:100px;text-align:right}.direct-hint{font-size:10px;margin-bottom:20px}.pages{padding:0 4px;gap:22px}.worksheet{width:100%}.modal-head{padding:14px 16px;gap:12px}.modal-head h2{font-size:18px}.modal-head .close{width:36px;height:36px;min-height:36px}#modal-body{padding:18px 16px}.digit-choices{gap:6px}.digit-choices button{height:70px;padding:8px 4px}.digit-choices .digit-glyph{height:34px;width:34px}.level-choices{grid-template-columns:1fr;gap:8px}.level-choices>button{display:grid;grid-template-columns:115px 1fr;align-items:center;gap:5px 15px;min-height:95px;padding:12px}.level-choices .mini-sequence{grid-row:span 2}.level-choices small{min-height:0}.background-choices{gap:6px}.background-choices button{font-size:11px;padding:8px 4px}.background-sample{width:59px}.generator-choices{grid-template-columns:1fr}.generator-choices>button{padding:12px}.row-style-choices{gap:5px}.row-style-choices button{font-size:10px}.row-style-sample{width:35px;height:48px}.row-style-sample>.digit-glyph{height:42px}.generate-bottom{gap:10px}.generate-bottom button{font-size:12px}.ideas{font-size:17px}.print-document{padding:8px}.print-document .worksheet{margin-bottom:14px}}

/* Notebook: thin, bold, bold, thin; equal steps = half the numeral height. */
.trace-intro{min-height:46mm;margin:2mm 0 4mm}.big-digit{height:43mm}.paper-companion{height:22mm;margin-bottom:3mm}.writing-rows{gap:4mm}.writing-area{height:calc(var(--digit-height)*1.5);min-height:calc(var(--digit-height)*1.5);padding:0 2mm calc(var(--digit-height)/2);margin-top:2mm;border:0;background-position:0 0}.writing-area.lines{background:none}.frame-guide{position:absolute;left:0;right:0;height:1px;background:#c6d8e4;pointer-events:none}.frame-top{top:0}.frame-upper{top:33.333333%;height:1.7px;background:#7c9cb2}.frame-lower{top:66.666667%;height:1.7px;background:#7c9cb2}.frame-bottom{top:100%;bottom:auto}.writing-area:not(.lines) .frame-guide{display:none}.finger-settings{border-radius:8px;cursor:pointer;padding:1mm}.finger-settings:hover{outline:1px dashed #aac5d5;outline-offset:2px}.self-check{margin-top:4mm;padding:2mm 0;font-size:9px}
@media screen and (max-width:900px){.worksheet .trace-intro{min-height:21.9cqw;margin:1cqw 0 1.9cqw}.worksheet .big-digit{height:20.48cqw}.worksheet .paper-companion{height:10.48cqw;margin-bottom:1.43cqw}.worksheet .writing-rows{gap:1.9cqw}.worksheet .writing-area{height:calc(var(--digit-number)*.714285cqw);min-height:calc(var(--digit-number)*.714285cqw);padding:0 .95cqw calc(var(--digit-number)*.238095cqw);margin-top:.95cqw;background-position:0 0}.worksheet .self-check{margin-top:1.9cqw;padding:.95cqw 0;font-size:1.13cqw}}
.print-document .stage-title{min-height:4mm}.print-document .trace-copy{display:flex;align-items:center;justify-content:center}.print-document .finger-count{height:29mm}.print-document .finger-settings{padding:0;cursor:default}.print-document .finger-settings:hover{outline:none}

/* Coloured teaching models retain the actual saved numeral centre lines. */
.coloured-model{color:var(--model-colour)}.coloured-model .inside-direction{fill:#fff}.mono .coloured-model{color:#333}

/* Two grid sizes share one compact choice; cells align with the actual grid. */
.background-choices{display:grid;grid-template-columns:2fr 1fr 1fr;gap:8px}.background-choices>button{min-width:0}.grid-background-pair{display:grid;grid-template-columns:1fr 1fr;gap:1px;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--line)}.grid-background-pair>button{border:0;border-radius:0;flex-direction:column;padding:10px 4px;font-size:11px;gap:8px}.grid-background-pair>button[aria-pressed=true]{box-shadow:inset 0 0 0 2px var(--blue)}.background-sample.grid-large{background-image:linear-gradient(to right,#aac5d5 1px,transparent 1px),linear-gradient(to bottom,#aac5d5 1px,transparent 1px);background-size:18px 18px}.background-sample.lines{background:linear-gradient(to bottom,#c6d8e4 0 1px,transparent 1px 11px,#7c9cb2 11px 13px,transparent 13px 22px,#7c9cb2 22px 24px,transparent 24px 34px,#c6d8e4 34px 35px)}
.writing-area:is(.grid,.grid-large){display:grid;grid-auto-flow:column;grid-auto-columns:var(--digit-height);grid-template-columns:none;justify-content:start;align-items:end;height:var(--digit-height);min-height:var(--digit-height);padding:0;border:0;box-shadow:inset 0 -1px #dbe5ea;background-image:linear-gradient(to right,#dbe5ea 1px,transparent 1px),linear-gradient(to bottom,#dbe5ea 1px,transparent 1px);background-size:var(--grid-step) var(--grid-step);background-position:0 0}.writing-area:is(.grid,.grid-large) .writing-cell{width:var(--digit-height);height:var(--digit-height);padding:0 .5mm}.writing-area:is(.grid,.grid-large) .digit-glyph{height:calc(100% - .5mm);margin-bottom:.25mm}
@media screen and (max-width:900px){.worksheet .writing-area:is(.grid,.grid-large){height:calc(var(--digit-number)*.47619cqw);min-height:calc(var(--digit-number)*.47619cqw);padding:0;grid-auto-columns:calc(var(--digit-number)*.47619cqw);background-size:calc(var(--grid-number)*.47619cqw) calc(var(--grid-number)*.47619cqw)}.worksheet .writing-area:is(.grid,.grid-large) .writing-cell{width:calc(var(--digit-number)*.47619cqw);height:calc(var(--digit-number)*.47619cqw);padding:0 .238095cqw}.worksheet .writing-area:is(.grid,.grid-large) .digit-glyph{height:calc(100% - .238095cqw);margin-bottom:.119047cqw}}
@media screen and (max-width:600px){.background-choices{grid-template-columns:1fr 1fr}.grid-background-pair{grid-column:1/-1}.grid-background-pair .background-sample{width:68px}.background-choices>button{padding:10px}}
/* The same physical baseline and half-height guide for every font variant. */
.worksheet{border:0;outline:1px solid #d5e4ec}.writing-area.lines{padding:0 2mm calc(var(--digit-height)/2);align-items:flex-start}.writing-area.lines .writing-cell{position:relative;z-index:1;flex-shrink:0;align-self:flex-start}.writing-area.lines .digit-glyph{overflow:visible}.notebook-guides{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:0;fill:none}.notebook-guides .thin-guide{stroke:#c6d8e4;stroke-width:.12}.notebook-guides .bold-guide{stroke:#7c9cb2;stroke-width:.28}.writing-area:is(.grid,.grid-large){width:calc(var(--digit-height)*var(--writing-columns));max-width:100%}
.trace-intro{grid-template-columns:47mm 38mm minmax(0,1fr);gap:4mm;min-height:47mm;margin:2mm 0 3mm}.big-digit{height:43mm;position:relative}.trace-cue{position:absolute;right:-1mm;bottom:0;color:#4c6f84;width:14mm;height:14mm;background:#ffffffeb;border-radius:50%;padding:1mm}.trace-cue>svg{width:100%;height:100%}.trace-copy{min-width:0;align-self:center}.finger-count{justify-content:center}.illustration-choice{width:100%;height:47mm;position:relative;display:block;padding:0;border:0;border-radius:0;background:transparent;min-height:0}.illustration-choice:hover{background:transparent;outline:1px dashed #aac5d5;outline-offset:1mm}.paper-scene{display:block;width:100%;height:100%;object-fit:contain;object-position:center}.scene-change{position:absolute;right:0;top:0;background:white;border:1px solid #b6ccd9;border-radius:50%;width:6mm;height:6mm;line-height:6mm;text-align:center;font-size:15px;color:#4c6f84}.writing-rows{gap:3mm}.self-check{margin-top:3mm;padding:1mm 0}
@media screen and (max-width:900px){.worksheet .trace-intro{grid-template-columns:22.38cqw 18.095cqw minmax(0,1fr);gap:1.905cqw;min-height:22.38cqw;margin:.95cqw 0 1.43cqw}.worksheet .big-digit{height:20.48cqw}.worksheet .trace-cue{width:6.667cqw;height:6.667cqw;right:-.476cqw;padding:.476cqw}.worksheet .illustration-choice{height:22.38cqw}.worksheet .scene-change{width:2.857cqw;height:2.857cqw;line-height:2.857cqw;font-size:1.9cqw}.worksheet .writing-rows{gap:1.43cqw}.worksheet .writing-area.lines{padding:0 .95cqw calc(var(--digit-number)*.238095cqw)}.worksheet .writing-area:is(.grid,.grid-large){width:calc(var(--digit-number)*var(--writing-columns)*.47619cqw)}}
@media print{.worksheet{outline:none!important}.illustration-choice:hover{outline:none}.writing-area.lines{padding-bottom:calc(var(--digit-height)/2)}.print-document .stage-title{min-height:3mm;height:3mm}.print-document .stage-title>svg{height:3mm;width:3mm}.print-document .trace-copy{display:block}.print-document .finger-count{height:27mm}}

.notebook-guides .thin-guide{stroke:none;fill:#c6d8e4}.notebook-guides .bold-guide{stroke:none;fill:#7898af}
@media screen and (max-width:600px){.worksheet .page-delete{right:2px;top:2px}}

/* Use the available A4 height without reducing numeral size or guide spacing. */
.writing-rows{gap:2mm}.writing-area{margin-top:1mm}.stage-title{height:4mm;min-height:4mm}.stage-number{width:4mm;height:4mm;font-size:8px}.stage-title>svg{width:3.5mm;height:3.5mm}.level-caption{white-space:nowrap;font-size:9px;color:#637f90}.level-caption b{display:inline-grid;place-items:center;border-radius:50%;background:#e3edf3;color:#3d5e73;width:5mm;height:5mm;margin-right:1mm}.mini-sequence{grid-template-columns:repeat(5,minmax(0,1fr))}.generator-result{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;min-height:91px;margin-top:16px}.generator-result>div{background:#f3f7f9;border:1px solid #d5e4ec;border-radius:9px;padding:10px}.generator-result strong{display:block;font-size:11px;margin-bottom:8px}.generator-result .mini-sequence{height:40px}
@media screen and (max-width:900px){.worksheet .writing-rows{gap:.95238cqw}.worksheet .writing-area{margin-top:.47619cqw}.worksheet .stage-title{height:1.90476cqw;min-height:1.90476cqw}.worksheet .stage-number{width:1.90476cqw;height:1.90476cqw;font-size:1cqw}.worksheet .stage-title>svg{width:1.6667cqw;height:1.6667cqw}.worksheet .level-caption{font-size:1.13cqw}.worksheet .level-caption b{width:2.38cqw;height:2.38cqw;margin-right:.47619cqw}}
@media screen and (max-width:600px){.generator-result{gap:6px}.generator-result>div{padding:8px 6px}.generator-result strong{font-size:10px}.generator-result .mini-sequence{height:30px}}

/* One compact entry point for digits and practice help, after print settings. */
.learning-open{min-width:0;max-width:100%;gap:9px}.learning-open .learning-label{min-width:0;max-width:290px}.learning-open small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:10px}#modal-body .learning-section>h3{margin:0 0 11px;font-size:14px}.learning-section+.learning-section{margin-top:20px;border-top:1px solid #d5e4ec;padding-top:17px}.learning-section .level-choices>button{min-height:139px;padding:12px;gap:9px}.learning-section .mini-sequence{height:36px}.learning-section .level-choices small{min-height:36px}.learning-section .hint{margin-top:12px}
@media screen and (max-width:600px){.learning-open .learning-label{max-width:calc(100vw - 136px)}.learning-section .level-choices>button{min-height:120px}.learning-section+.learning-section{margin-top:17px;padding-top:14px}}

/* Use the existing shared material navigation and its support/contact controls. */
.material-nav .header-actions .material-help-button{font:italic 700 25px/1 Georgia,serif}
@media screen and (max-width:600px){.top{gap:12px;flex-wrap:wrap}.top>.material-nav{margin-left:auto}.material-nav .header-actions{gap:7px}.material-nav .back{white-space:nowrap}}
