/* A reader is a screen, not a document with a fixed footer. */
@media screen {
 body.in-reader{height:100dvh;overflow:hidden;overscroll-behavior:none}
 body.in-reader>.topbar,body.in-reader>.site-footer{display:none}
 body.in-reader main{width:100%;max-width:none;height:100dvh;min-height:0;margin:0;padding:0;overflow:hidden}
 .screen-reader{height:100%;max-width:900px;margin:auto;display:grid;grid-template-rows:56px minmax(0,1fr) 88px;padding:0 max(20px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(20px,env(safe-area-inset-left));overflow:hidden}
 .screen-top{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:8px;border-bottom:1px solid var(--line)}
 .screen-top p{font-size:13px;text-align:center;font-weight:400;color:var(--muted);line-height:1.3}
 .screen-icon{display:grid;place-items:center;width:44px;height:44px;padding:10px;border-radius:4px}
 .screen-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
 .screen-icon svg circle{fill:currentColor;stroke:none}.screen-icon:hover{background:var(--soft)}.screen-close{font-size:26px}
 .screen-stage{min-height:0;min-width:0;display:flex;padding:26px 4px 16px;overflow:hidden}
 .screen-content{height:100%;width:100%;min-width:0;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:18px;outline:none;overflow:hidden}
 .screen-content>*{flex-shrink:0}.screen-content.is-measuring{justify-content:flex-start}.screen-question{font-weight:500;font-size:clamp(24px,3.6vw,36px);line-height:1.34;letter-spacing:-.5px;overflow-wrap:break-word}
 .screen-question.calculation{font-size:clamp(29px,4vw,44px);line-height:1.7;letter-spacing:0}
 .screen-given,.screen-reason{font-size:clamp(17px,2.5vw,22px);line-height:1.45;color:#4b5049;overflow-wrap:break-word}
 .screen-reason{color:var(--ink)}
 .screen-facts{margin:0;display:grid;gap:6px;font-size:16px;line-height:1.4}.screen-facts>div{display:grid;grid-template-columns:90px 1fr;gap:12px}.screen-facts dt{color:var(--muted)}.screen-facts dd{margin:0}
 .screen-bottom{display:flex;flex-direction:column;justify-content:flex-end;gap:10px;padding:0 0 14px;min-width:0}
 .screen-bottom>div{display:grid;grid-template-columns:1fr 1fr;gap:12px}
 .screen-caption{font-size:12px;color:var(--muted);line-height:1.4;text-align:center}
 .screen-primary,.screen-secondary{min-height:46px;border:1px solid #bec3b8;border-radius:4px;padding:10px 14px;font-size:15px;font-weight:500;display:flex;align-items:center;justify-content:center;gap:16px}
 .screen-primary{background:var(--accent);border-color:var(--accent);color:#fff}.screen-primary:hover{background:#913a18}.screen-secondary:hover{background:var(--soft)}
 .screen-reader[data-mode=menu]{grid-template-rows:56px minmax(0,1fr) auto}
 .is-menu-stage{padding:20px 4px;overflow-y:auto}.is-menu-stage .screen-content{justify-content:flex-start;height:auto;min-height:100%;overflow:visible;gap:20px}
 .screen-lesson-title{font-size:18px;line-height:1.4;letter-spacing:-.2px;font-weight:500}
 .screen-menu-list{display:grid}.screen-menu-list>button,.screen-menu-list>a{display:flex;justify-content:space-between;align-items:center;gap:10px;text-align:left;min-height:47px;border-top:1px solid var(--line);padding:10px 0;font-size:15px}.screen-menu-list span{color:var(--muted)}
 .screen-menu-intro{font-size:18px;line-height:1.5}.screen-content label{font-size:20px;margin-top:18px}.screen-content input[type=range]{width:100%;accent-color:var(--accent);min-height:44px;margin:0}.screen-level-labels{display:flex;justify-content:space-between;font-size:13px;color:var(--muted);margin-top:-16px}.screen-level-note{font-size:13px;color:var(--muted)}
 .screen-question-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.screen-question-grid a{display:grid;place-items:center;min-height:48px;border:1px solid var(--line);border-radius:3px;font-size:17px}.screen-question-grid [aria-current]{color:#fff;background:var(--ink);border-color:var(--ink)}
 .screen-help-content{align-items:center;gap:16px;container-type:inline-size}.screen-hint{font-size:18px;line-height:1.45;text-align:left;align-self:stretch;max-width:620px;margin:0 auto}
 .screen-model-fit{flex-shrink:0;max-width:100%;position:relative}.screen-model-fit>.learning-model{position:absolute;left:0;top:0}:is(.screen-model-fit,.screen-help-content) .math-model{max-width:100%;min-width:0}:is(.screen-model-fit,.screen-help-content) .model-scroll,:is(.screen-model-fit,.screen-help-content) .line-scroll{overflow:visible}:is(.screen-model-fit,.screen-help-content) .number-track{min-width:calc(var(--line-width) + 60px);padding:62px 30px 46px}:is(.screen-model-fit,.screen-help-content) .model-note,:is(.screen-model-fit,.screen-help-content) .model-caption{margin:12px 0;font-size:13px;line-height:1.4}:is(.screen-model-fit,.screen-help-content) .exchange-groups{gap:12px}:is(.screen-model-fit,.screen-help-content) .exchange-group{padding:8px;border-radius:3px}:is(.screen-model-fit,.screen-help-content) .unit-tiles{gap:5px}:is(.screen-model-fit,.screen-help-content) .unit-tiles span{font-size:16px;min-height:36px;font-weight:400}:is(.screen-model-fit,.screen-help-content) .known-whole{margin-bottom:10px;padding-bottom:0}:is(.screen-model-fit,.screen-help-content) .known-whole strong{font-size:24px;font-weight:500}:is(.screen-model-fit,.screen-help-content) .exchange-equivalence{padding-top:10px;font-size:16px}:is(.screen-model-fit,.screen-help-content) .exchange-equivalence strong{padding:6px 12px}:is(.screen-model-fit,.screen-help-content) .model-comparison{gap:14px}:is(.screen-model-fit,.screen-help-content) .comparison-item+.comparison-item{padding-top:12px}:is(.screen-model-fit,.screen-help-content) .written-head{padding-bottom:4px}:is(.screen-model-fit,.screen-help-content) .written-row>span{min-height:40px}:is(.screen-model-fit,.screen-help-content) .written-row{font-size:28px;line-height:1.5}:is(.screen-model-fit,.screen-help-content) .exchange-row{font-size:15px}:is(.screen-model-fit,.screen-help-content) .exchange-row>span{min-height:24px}:is(.screen-model-fit,.screen-help-content) .written-result{padding-top:5px;margin-top:5px}:is(.screen-model-fit,.screen-help-content) .exchange-example{margin-top:10px;padding-top:10px;font-size:15px}:is(.screen-model-fit,.screen-help-content) .value-pieces{gap:4px;padding:8px 3px}:is(.screen-model-fit,.screen-help-content) .value-coin{width:28px;height:28px;font-size:10px}:is(.screen-model-fit,.screen-help-content) .value-heading{padding:7px 2px}:is(.screen-model-fit,.screen-help-content) .ten-rod{height:100px;width:10px}:is(.screen-model-fit,.screen-help-content) .one-block{width:10px;height:10px}:is(.screen-model-fit,.screen-help-content) .base-ten-chart .value-pieces{min-height:116px}:is(.screen-model-fit,.screen-help-content) .math-table th,:is(.screen-model-fit,.screen-help-content) .math-table td{padding:7px 5px}:is(.screen-model-fit,.screen-help-content) .model-legend{margin-top:10px;gap:8px}:is(.screen-model-fit,.screen-help-content) .fraction-wholes{gap:10px}:is(.screen-model-fit,.screen-help-content) .fraction-strip{height:28px}
 .large-text .screen-question{font-size:clamp(29px,4vw,43px)}.large-text .screen-given,.large-text .screen-reason{font-size:24px}.large-text .screen-hint{font-size:23px}
 .screen-overflow{overflow:auto;max-height:100%;flex-shrink:0}
 body.in-reader .toast{bottom:100px}
 @media(min-width:800px){.screen-reader{padding-left:48px;padding-right:48px;grid-template-rows:64px minmax(0,1fr) 104px}.screen-stage{padding:36px 0 24px}.screen-content{gap:24px}.screen-bottom>div{grid-template-columns:180px 180px;justify-content:space-between}.screen-bottom{padding-bottom:24px}.screen-top p{font-size:14px}.screen-reader[data-mode=menu]{grid-template-rows:64px minmax(0,1fr) auto}}
 @media(max-height:500px){.screen-reader{grid-template-rows:48px minmax(0,1fr) 78px;padding-left:18px;padding-right:18px}.screen-stage{padding:16px 2px 10px}.screen-content{gap:14px}.screen-bottom{padding-bottom:8px;gap:7px}.screen-reader[data-mode=menu]{grid-template-rows:48px minmax(0,1fr) auto}.screen-question{font-size:24px}.screen-question.calculation{font-size:30px}.screen-given,.screen-reason{font-size:18px}.screen-hint{font-size:17px}.screen-lesson-title{font-size:16px}.screen-menu-list>button,.screen-menu-list>a{min-height:44px;font-size:14px}.is-menu-stage .screen-content{gap:12px}.screen-content label{margin-top:8px}}
}
@media print{.screen-reader{display:none!important}}

@media screen{.screen-help-content .unit-array{display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));gap:7px;max-width:320px;margin:0 auto}.screen-help-content .unit-array>span{display:grid;place-items:center;aspect-ratio:1;max-width:48px;border:1px solid #829174;border-radius:50%;background:#e9eee3;font-size:14px}.screen-help-content .plain-square-grid{display:grid;grid-template-columns:repeat(var(--cols),1fr);width:min(100%,180px);margin:auto}.screen-help-content .plain-square-grid>i{aspect-ratio:1;border:1px solid #829174;margin-right:-1px;margin-bottom:-1px}.screen-model-fit .counter.blank,.screen-help-content .counter.blank{background:transparent}.screen-content>.screen-model-fit{max-width:100%}}

@media screen{#gate{max-height:calc(100dvh - 24px);overflow:auto}#gate .dialog-top{justify-content:flex-end;margin-bottom:0}#gate h2{font-size:24px;margin-bottom:10px}#gate>form>p{margin:0 0 18px;font-size:15px}#gate label{margin-top:0}#gate #gate-error{margin:8px 0;min-height:20px;font-size:13px}}

@media screen{.access-gate{width:min(420px,calc(100vw - 28px));max-height:calc(100dvh - 24px);overflow:auto;padding:24px}.access-gate .dialog-top{justify-content:flex-end;margin:0}.access-gate h2{font-size:24px;margin:0 0 10px}.access-gate form>p{font-size:15px;margin:0 0 18px}.access-gate label{display:block;font-size:13px;margin:0 0 8px}.access-gate input{display:block;min-height:48px;width:100%;border:1px solid #aeb5a8;border-radius:3px;background:white;font-size:22px;padding:8px 12px;letter-spacing:6px}.access-gate #think-error{margin:8px 0;min-height:20px;font-size:13px}.screen-level-note{max-width:100%}}
