:root{--bg:#F4F6FB;--card:#FFFFFF;--ink:#192055;--muted:#575D69;--line:#DDE2EE;--navy:#181E51;--blue:#3F54A3;
--orange:#ED6842;--green:#1D7240;--red:#A3332B;--sans:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.6 var(--sans)}
a{color:var(--blue)}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--orange);outline-offset:2px}
.mast{background:var(--navy);padding:12px 24px}
.brand{display:flex;align-items:center;gap:12px;color:#fff;font-weight:800;font-size:18px;text-decoration:none}
.badge{width:40px;height:40px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center}
.badge img{width:32px;height:32px}.lab{color:var(--orange)}
.page{max-width:900px;margin:0 auto;padding:24px 16px 48px}
.foot{max-width:900px;margin:0 auto;padding:0 16px 24px;color:var(--muted);font-size:13px}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px 20px;margin:16px 0}
.row{display:flex;flex-wrap:wrap;gap:12px}
label{display:flex;flex-direction:column;font-size:13px;font-weight:600;color:var(--muted);gap:4px}
input,select{font:16px var(--sans);padding:6px 8px;border:1px solid var(--line);border-radius:8px;color:var(--ink)}
.answer-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px 14px;margin-top:12px}
.answer{flex:1 1 260px;max-width:420px}.answer input{font-size:20px;width:100%}
.keys{display:flex;flex-wrap:wrap;gap:6px}
.keys button{min-width:44px;min-height:44px;font:600 18px var(--sans);background:#fff;color:var(--ink);
border:1px solid var(--line);border-radius:8px;padding:4px 10px}
.keys button:hover{border-color:var(--blue)}
.condition-key{margin-top:6px}.condition-key button{font-size:16px;padding:4px 12px}
code{font-size:.92em;background:#EEF1F8;border-radius:4px;padding:0 .2em}
[hidden]{display:none!important}
.preview{min-height:2.6em;margin:8px 0;font-size:18px;display:flex;align-items:center;gap:8px}
.preview math{font-size:1.25em}
button{font:600 15px var(--sans);background:var(--blue);color:#fff;border:0;border-radius:8px;padding:8px 18px;cursor:pointer}
.label{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:700;margin-right:6px}
.muted{color:var(--muted);font-size:14px}.bad{color:var(--red)}
.verdict{font-size:18px;font-weight:700}.v-right{color:var(--green)}.v-wrong,.v-unreadable{color:var(--red)}
.v-form,.v-unit{color:#A23E1C}
math{font-size:1.1em}
.narrow{max-width:420px;display:flex;flex-direction:column;gap:12px}
.flash{border-radius:10px;padding:8px 14px}.flash-error{background:#FDEDE7;color:var(--red)}.flash-ok{background:#E5F6EC;color:var(--green)}
.table{width:100%;border-collapse:collapse;background:var(--card);border:1px solid var(--line);border-radius:10px;font-size:15px}
.table th,.table td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--line);vertical-align:middle}
.table th{background:#E9EDF8;font-size:13px}
tr.inactive td{color:var(--muted);text-decoration:line-through}
.actions{display:flex;gap:6px;flex-wrap:wrap}.actions form{margin:0}
button.small{font-size:13px;padding:4px 10px}button.secondary{background:#fff;color:var(--blue);border:1px solid var(--line)}
.children{border:1px solid var(--line);border-radius:10px;margin:12px 0;padding:8px 12px}
label.check{flex-direction:row;align-items:center;gap:6px;font-weight:500;color:var(--ink)}
.link-text{word-break:break-all;font-size:14px}
@media (max-width:640px){.table{display:block;overflow-x:auto}}
.badge-active{font-size:13px;background:#E5F6EC;color:var(--green);border-radius:6px;padding:2px 8px;vertical-align:middle}
.crumb{color:var(--muted);font-size:14px;margin:0}.crumb a{color:var(--muted)}
.unit-card{display:flex;flex-direction:column;gap:2px;text-decoration:none;color:var(--ink)}.unit-title{font-size:20px;font-weight:700}
.unit-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:24px;align-items:start}
@media (max-width:820px){.unit-layout{grid-template-columns:minmax(0,1fr)}}
.unit-steps ol{list-style:none;margin:0;padding:0}.unit-steps li{padding:8px 0;border-bottom:1px solid var(--line);display:flex;gap:8px;justify-content:space-between;align-items:baseline}
.unit-steps li:last-child{border-bottom:0}.unit-steps li.current a{color:var(--ink);font-weight:700}.unit-steps a{text-decoration:none}
.small-h{font-size:17px;margin:0 0 4px}
.page{max-width:1180px}
.lesson h2{margin-top:0}.lesson p,.lesson li{max-width:72ch}
.lesson blockquote{margin:12px 0;padding:8px 14px;background:#E9EDF8;border-radius:10px}

.fig{margin:12px 0}  /* no browser side margins: a figure uses its column's width (D140) */
/* a figure at the size it is drawn, never enlarged, and on a wide screen no taller than half the screen, so the text
   around it stays in view; on a phone it uses its column's width (D140, D155) */
.fig img{max-width:100%;width:auto;height:auto;max-height:50vh;background:#fff;border:1px solid var(--line);border-radius:10px;padding:8px}
@media (max-width:640px){.fig img{width:min(100%,calc(var(--w,9999px) * 1.6));max-height:none}
  .fig.tall img{width:min(260px,calc(var(--w,9999px) * 1.6))}}  /* a figure drawn taller than wide, e.g. two panels stacked: it fits a phone screen with its step (D140) */
/* on a phone a figure uses its column's width, but a small one grows at most 1.6 times its drawn size, so its lines and
   labels stay in proportion (D156) */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.decide{border:2px solid var(--orange);border-radius:14px;padding:12px 18px;margin:16px 0}
.kicker{font-size:13px;letter-spacing:.06em;text-transform:uppercase;font-weight:800;color:var(--orange)}
.decide .q{font-weight:700;font-size:18px}.choices{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}
button.choice{width:100%;text-align:left;background:#fff;color:var(--ink);border:1px solid var(--line);font-weight:600;font-size:16px;padding:10px 14px}
button.choice.is-right{border-color:var(--green);background:#E5F6EC}button.choice.is-wrong{border-color:var(--red);background:#FDEDE7}
.feedback{padding:6px 14px;color:var(--ink)}
.worked{background:#F4F6FB;border-radius:12px;padding:10px 16px;margin:14px 0}.worked h3{margin:2px 0 6px}.worked .stmt{font-weight:600}

.ask-field button.choice{width:auto}.ask-result.is-right{color:var(--green);font-weight:700}.ask-result.is-wrong{color:var(--red)}
.pager{display:flex;justify-content:space-between;gap:12px;margin-top:20px}
a.button{display:inline-block;font:600 15px var(--sans);background:var(--blue);color:#fff;border-radius:8px;padding:8px 18px;text-decoration:none}
a.button.secondary{background:#fff;color:var(--blue);border:1px solid var(--blue)}
progress.progress{appearance:none;-webkit-appearance:none;width:100%;height:8px;border:0;border-radius:6px;background:#E2E6F0;margin:10px 0 18px;overflow:hidden}
progress.progress::-webkit-progress-bar{background:#E2E6F0;border-radius:6px}
progress.progress::-webkit-progress-value{background:var(--orange);border-radius:6px}
progress.progress::-moz-progress-bar{background:var(--orange);border-radius:6px}
.practice-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:22px;align-items:start}
@media (max-width:900px){.practice-layout{grid-template-columns:minmax(0,1fr)}}
.problem-body{display:flex;gap:18px;flex-wrap:wrap}.statement{flex:1 1 280px;font-size:18px}.problem-fig{flex:0 1 300px}
@media (max-width:640px){.problem-fig{flex:1 1 100%}.fig img{padding:4px}}
.unit-word{font-weight:600}.help-row{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start;margin-top:10px}
.hint{flex-basis:100%;background:#F4F6FB;border-radius:10px;padding:8px 12px;margin:0}
button.secondary{background:#fff;color:var(--blue);border:1px solid var(--line)}
.verdict-card{border-left:6px solid var(--line)}.verdict-card.v-right{border-left-color:var(--green)}.verdict-card.v-wrong{border-left-color:var(--red)}
.verdict-card.v-form,.verdict-card.v-unit{border-left-color:var(--orange);background:#FDF1EC}
.verdict-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.verdict-head h2{margin:0}
.band{font-size:14px;font-weight:700;border:1px solid var(--line);border-radius:999px;padding:3px 10px;background:#fff}
.route-card .kicker{color:var(--blue)}.route-list{padding-left:18px}.route-list li{margin:6px 0}
.route-list a{font-weight:600}.route-ask{display:block;font-size:.88em;color:var(--muted)}
.route-more summary{cursor:pointer;color:var(--blue);margin:.2em 0}
.ok-text{color:var(--green);font-weight:600}.repair{margin-top:12px}
/* mini-quizzes (A3b) */
.quiz-builder fieldset{border:1px solid var(--line);border-radius:8px;margin:0 0 14px;padding:10px 14px;min-width:0;min-inline-size:0}
/* a unit's full title stays in its option; the select fits the screen instead of widening the page (UX02) */
.quiz-builder select{display:block;width:100%;max-width:100%;margin-top:4px}
.quiz-builder legend{font-weight:600;padding:0 4px}
label.check{display:flex;margin:4px 0}label.field{display:block;margin-top:8px}
.small{font-size:13px}
.quiz-nav{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 14px}
.quiz-nav a{border:1px solid var(--line);border-radius:6px;padding:4px 10px;text-decoration:none;background:var(--card)}
.quiz-nav a.answered{border-color:var(--blue)}
.quiz-nav a.current{background:var(--blue);color:#fff;border-color:var(--blue)}
.quiz-nav a.finish-link{margin-left:auto}
/* a verdict card's text stays ink: its border and its heading's words carry the verdict (D54: no green text on white) */
.verdict-card.v-right,.verdict-card.v-wrong,.verdict-card.v-unreadable,.verdict-card.v-form,.verdict-card.v-unit{color:var(--ink)}
/* full rounds (A3c) */
.round-bar{position:sticky;top:0;z-index:5;display:flex;flex-wrap:wrap;align-items:center;gap:12px;justify-content:space-between;
  background:var(--card);border:1px solid var(--line);border-radius:10px;padding:8px 14px;margin:8px 0}
.round-name{font-weight:700}
.timer{font:700 22px/1 var(--sans);font-variant-numeric:tabular-nums;min-width:4ch;text-align:right}
.timer.late{color:var(--red)}
.pairs{display:flex;gap:6px}
.pair-dot{display:inline-block;width:1.8em;height:1.8em;line-height:1.8em;text-align:center;border-radius:50%;border:1px solid var(--line);font-size:13px}
.pair-dot.done{background:var(--line)}.pair-dot.now{background:var(--blue);color:#fff;border-color:var(--blue)}
.round-page{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:16px;align-items:start;margin:16px 0}
.paper-page{display:block;max-width:100%;height:auto;border:1px solid var(--line);border-radius:6px;background:#fff;margin:0 0 12px}
.answer-col{display:flex;flex-direction:column;gap:6px;position:sticky;top:84px}
.round-answer{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.round-answer .num{font-weight:700;min-width:2.2em;display:inline-block;text-align:right}
.round-answer input[data-num]{flex:1 1 9em;min-width:0;max-width:14em;font-size:17px;padding:5px 8px}
.round-answer .preview{flex-basis:100%;min-height:0;margin:0 0 4px 2.6em;font-size:15px}
.save-state{color:var(--muted)}
.paper-list{list-style:none;padding:0;margin:0}
.paper-list li{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:6px 0;border-bottom:1px solid var(--line)}
.paper-list .paper-name{font-weight:600;min-width:14em}
.paper-list form{margin:0 0 0 auto}
.table-wrap{overflow-x:auto;max-width:100%;min-width:0}
.table-wrap:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
.round-table tr.v-right td:nth-child(3){color:var(--green);font-weight:600}
.key-review{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.key-pages{position:sticky;top:8px}
.done-list{columns:2;margin:0}
@media (max-width:760px){.round-page,.key-review{grid-template-columns:1fr}.answer-col,.key-pages{position:static}}
/* lesson and practice pages (D81): a step pill, Back and Next with progress dots, ticks on steps read, the reference
   sheet in a panel that slides over the page, a unit's video in the page */
.step-pill{display:inline-block;margin:0 0 6px;padding:3px 10px;border-radius:999px;background:#FDEDE7;color:#A23E1C;
  font-size:13px;font-weight:700}
.pager{align-items:center;flex-wrap:wrap}
.dots{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;flex:1 1 auto}
.dot{width:11px;height:11px;border-radius:50%;background:var(--line);display:inline-block}
.dot.seen{background:#AEB9DA}.dot.now{background:var(--orange);transform:scale(1.25)}
.dot:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.side-progress{display:flex;flex-direction:column;gap:2px;margin-bottom:6px}
.side-progress .progress{margin:4px 0 8px}
.unit-steps li.done a{color:var(--ink)}.tick{color:var(--green);font-weight:700}
.side-sheet{display:block;text-align:center;margin:12px 0}
.unit-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
.unit-grid .unit-card{margin:0}
.unit-card .progress{margin:10px 0 6px}
.unit-stats{display:flex;flex-wrap:wrap;gap:4px 14px;color:var(--muted)}
.card-go{margin-top:8px;font-weight:700;color:var(--blue)}
/* a unit's category and level as tags, and its time in one or two numbers (D158): the category first, filled in its
   subject's color and in capitals; the level after it at the right, tinted green, amber or red */
.unit-tags{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 6px}
.tag-cat{text-transform:uppercase;color:#fff}
.tag-cat-arithmetic{background:#3F54A3}.tag-cat-algebra{background:#6B45A8}.tag-cat-geometry{background:#1D6F69}
.tag-cat-number-theory{background:#A33A64}.tag-cat-counting-probability-statistics{background:#A65310}
.tag-cat-logic{background:#56701E}.tag-cat-technique{background:#4A5160}
.tag-level{margin-left:auto;font-weight:700;letter-spacing:0}
.tag-level-easy{background:#E5F6EC;color:var(--green)}.tag-level-medium{background:#FBEFD0;color:#7A4B00}
.tag-level-difficult{background:#F9E3E1;color:var(--red)}
.tag-recommended{background:var(--navy);color:#fff}
.unit-card .unit-time{margin-top:2px}
.side-meta{display:flex;flex-direction:column;gap:2px;margin:4px 0 10px}.side-meta .unit-tags{margin:0}
/* the overview's time, and on a phone, where the side list comes after the lesson, the tags too */
.overview-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:6px 0}.overview-meta .unit-tags{display:none}
.video-card{margin:16px 0}
.video-play{display:flex;align-items:center;gap:16px;width:100%;max-width:640px;aspect-ratio:16/9;padding:24px;border:0;
  border-radius:12px;background:linear-gradient(135deg,var(--navy),var(--blue));color:#fff;text-align:left;cursor:pointer}
.video-play:focus-visible{outline:3px solid var(--orange);outline-offset:3px}
.play-icon{flex:0 0 64px;height:64px;border-radius:50%;background:var(--orange);position:relative}
.play-icon::after{content:"";position:absolute;left:26px;top:20px;border-left:20px solid #fff;border-top:12px solid transparent;
  border-bottom:12px solid transparent}
.video-text{display:flex;flex-direction:column;gap:6px}.video-title{font:700 18px/1.3 var(--sans)}
.video-meta{font-size:14px;opacity:.9}
.video-frame{display:block;width:100%;max-width:640px;aspect-ratio:16/9;border:0;border-radius:12px;background:#000}
.sheet-drawer{position:fixed;top:0;right:0;bottom:0;width:min(460px,100vw);z-index:30;background:var(--card);
  border-left:1px solid var(--line);box-shadow:-8px 0 24px rgba(24,30,81,.18);display:flex;flex-direction:column}
.sheet-drawer[hidden]{display:none}
.sheet-drawer:focus{outline:none}
.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;
  border-bottom:1px solid var(--line);background:var(--navy);color:#fff}
.sheet-head h2{margin:0;font-size:18px;color:#fff}
.sheet-close{background:#fff;color:var(--navy);border:0;border-radius:8px;padding:4px 12px;font-weight:700}
.sheet-body{overflow:auto;padding:12px 16px 24px}
.sheet-body table{font-size:14px}
@media (min-width:1280px){body.sheet-open main.page{margin-right:470px}}
@media (max-width:640px){.sheet-drawer{top:auto;width:100vw;height:80vh;border-left:0;border-top:1px solid var(--line);
  border-radius:16px 16px 0 0;box-shadow:0 -8px 24px rgba(24,30,81,.2)}}
/* lessons, second pass (D81): Your turn as a numbered column of steps; worked examples with their steps set apart;
   the floating sheet button on phones only, the side column kept in view on wider screens */
.lesson p,.lesson li{line-height:1.75}
.try-steps{list-style:none;margin:14px 0 4px;padding:0}
.try-step{position:relative;margin:0 0 0 13px;padding:4px 0 16px 26px;border-left:2px solid var(--line)}
.try-step:last-child{border-left-color:transparent}
.try-step .marker{position:absolute;left:-12px;top:6px;width:22px;height:22px;border-radius:50%;background:var(--card);
  border:2px solid #AEB9DA}
.try-step.ask .marker{border-color:var(--orange);background:#FDEDE7}
.try-step.done .marker{border-color:var(--green);background:var(--green)}
.try-step.done .marker::after{content:"";position:absolute;left:6px;top:2px;width:5px;height:10px;border:solid #fff;
  border-width:0 2px 2px 0;transform:rotate(45deg)}
.try-text p{margin:0 0 8px}
.ask-q{font-size:17px}
.ask-choices{display:flex;flex-direction:column;gap:8px;max-width:620px}
.ask-choices button.choice:disabled{opacity:1;cursor:default}.ask-choices button.choice:disabled:not(.chosen){opacity:.5}
.ask-input{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.ask-input input{font-size:17px;padding:6px 10px;width:12em}
.try-reading{margin:6px 0 0;min-height:1.4em}
.ask-result{margin:6px 0 0;min-height:1.4em}
.ask-result.is-right{color:var(--green);font-weight:700}.ask-result.is-wrong{color:var(--red);font-weight:600}
button.link-button{background:none;border:0;padding:0;color:var(--blue);text-decoration:underline;font:inherit;cursor:pointer}
/* a finished block greens its last explanation; a question keeps its verdict's marker, so no unresolved one turns green
   (D386) */
.try.finished .try-steps:not(.try-history-steps) .try-step:not(.ask):last-child .marker{border-color:var(--green)}

.ask-result:empty,.try-reading:empty{display:none}
.worked .stmt{font-size:17px}
/* the side list stays in view on a wide screen, never taller than the screen (it scrolls in itself); on a short screen,
   a phone on its side, it scrolls with the page (D183) */
@media (min-width:821px) and (min-height:561px){.unit-side{position:sticky;top:12px;max-height:calc(100vh - 24px);
  overflow-y:auto;overscroll-behavior:contain}}
/* Named ideas use cards (D81); common mistakes use warning cards. Recaps use full-width lead/body rows below.
   Numbered instructions have number badges; plain bullets an accent marker. */
.lesson ul.cards{list-style:none;padding:0;margin:14px 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}
.lesson ul.cards > li{margin:0;padding:12px 14px;background:#F4F6FB;border:1px solid var(--line);border-radius:12px;max-width:none;line-height:1.6}
.lesson ul.cards > li > strong:first-child,.lesson ul.cards > li > p:first-child > strong:first-child{display:block;
  color:var(--navy);font-size:16px;margin-bottom:4px}
.lesson ul.cards > li p{margin:0}
.lesson.sec-recap{container-type:inline-size}
.lesson.sec-recap > ul{list-style:none;padding:0;margin:8px 0 0;display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.lesson.sec-recap > ul > li{position:static;margin:0;padding:14px 0;background:none;border:0;border-bottom:1px solid var(--line);
  border-radius:0;max-width:none;line-height:1.55}
.lesson.sec-recap > ul > li:last-child{border-bottom:0}
.lesson.sec-recap > ul > li::before,.lesson.sec-recap > ul > li::after{content:none}
.lesson.sec-recap > ul > li.recap-row{display:grid;grid-template-columns:minmax(0,1fr);gap:4px}
.lesson.sec-recap .recap-lead{min-width:0;color:var(--navy);font-size:16px}
.lesson.sec-recap .recap-body{min-width:0;max-width:65ch}
.lesson.sec-recap .recap-body:only-child{grid-column:1 / -1}
@container (min-width:600px){.lesson.sec-recap > ul > li.recap-row{grid-template-columns:11rem minmax(0,1fr);gap:24px;align-items:start}}
.lesson > ol{list-style:none;counter-reset:n;padding:0;margin:14px 0}
.lesson > ol > li{counter-increment:n;position:relative;margin:10px 0;padding:8px 12px 8px 46px;background:#F4F6FB;border-radius:10px}
.lesson > ol > li::before{content:counter(n);position:absolute;left:10px;top:8px;width:26px;height:26px;border-radius:50%;
  background:var(--blue);color:#fff;font-weight:700;text-align:center;line-height:26px;font-size:14px}
.lesson ul:not(.cards) > li::marker{color:var(--orange)}
.lesson th{background:#E9EDF8;color:var(--navy)}.lesson th,.lesson td{border:0;border-bottom:1px solid var(--line);padding:8px 12px}
.lesson tr:nth-child(even) td{background:#FAFBFE}.lesson tr:last-child td{border-bottom:0}
.lesson blockquote{border-left:4px solid var(--blue)}
/* phones: the lesson's Back and Next stay at the bottom of the screen, with a count instead of the dots */
.step-count{display:none;font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums}
@media (max-width:640px){
  .lesson .pager{position:sticky;bottom:0;z-index:20;margin:16px -20px -16px;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px));
    background:var(--card);border-top:1px solid var(--line);border-radius:0 0 14px 14px;flex-wrap:nowrap}
  .lesson .pager .dots{display:none}
  .step-count{display:block;flex:1;text-align:center}
}
/* worked examples as walkthroughs, and idea boxes (D82) */
.problem-card{background:var(--card);border:2px solid var(--blue);border-radius:12px;padding:10px 16px 12px;margin:8px 0 14px}
.problem-tag,.tag{display:inline-block;font-size:12px;font-weight:800;letter-spacing:.04em;border-radius:999px;padding:2px 10px}
.problem-tag{background:var(--blue);color:#fff;text-transform:uppercase;margin-bottom:6px}
.problem-card p{margin:0;font-weight:600;font-size:17px;line-height:1.65}
.walk-steps{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}
.walk-step{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:10px 14px;line-height:1.75}
.walk-step .tag{margin-right:6px;vertical-align:1px}
.tag-move{background:#E4E8F6;color:var(--navy)}
.tag-answer{background:var(--green);color:#fff}.walk-step.kind-answer{border-color:#9FD3B5;background:#F1FAF4}
.tag-check{background:#E5F6EC;color:var(--green)}
.tag-hint{background:#FBEFD0;color:#7A4B00}.walk-step.kind-hint{background:#FFFBF0;border-color:#EBD9A6}
.walk-try{margin:8px 0 10px}
.tag-alt{background:#FDEDE7;color:#A23E1C}.walk-step.kind-alt{border-style:dashed;border-color:#F0B49D}
.walk-controls{display:flex;align-items:center;gap:14px;margin-top:12px;flex-wrap:wrap}
.walk-step:focus{outline:none}
.lesson .idea{background:#F4F6FB;border:1px solid var(--line);border-left:5px solid var(--blue);border-radius:12px;padding:12px 16px;margin:14px 0}
.lesson .idea p{margin:0;max-width:72ch}
.lesson .idea .idea-title{font-weight:800;color:var(--navy);font-size:17px;margin:0 0 4px}
.lesson blockquote .idea{border:0;background:none;padding:0;margin:0}
/* no bare bullets (D82): a plain list is a column of soft rows with a small marker; a sub-list inside a card stays compact;
   the lists that have their own look (cards, choices, common mistakes, the recap) keep it */
.lesson:not(.sec-common-mistakes):not(.sec-recap) ul:not(.cards):not(.choices){list-style:none;padding:0;margin:12px 0;
  display:flex;flex-direction:column;gap:8px}
.lesson:not(.sec-common-mistakes):not(.sec-recap) ul:not(.cards):not(.choices) > li{position:relative;margin:0;
  padding:8px 12px 8px 34px;background:#F4F6FB;border-radius:10px;max-width:72ch}
.lesson:not(.sec-common-mistakes):not(.sec-recap) ul:not(.cards):not(.choices) > li::before{content:"";position:absolute;
  left:14px;top:1.05em;width:8px;height:8px;border-radius:2px;background:var(--orange);transform:rotate(45deg)}
.lesson .cards ul{gap:4px;margin:6px 0 0}
.lesson .cards ul > li{background:var(--card)!important;padding:4px 10px 4px 28px!important}
.lesson .cards ul > li::before{left:10px!important}
.nobr{white-space:nowrap}
/* D82, third pass: tables, the worked example's reveal, common mistakes as "why is it wrong?" cards */
.lesson .table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px;margin:14px 0;background:var(--card)}
.lesson .table-wrap table{width:100%;border-collapse:collapse;font-size:15px}
.lesson .table-wrap th,.lesson .table-wrap td{text-align:left;padding:9px 14px;border:0;border-bottom:1px solid var(--line);vertical-align:top}
.lesson .table-wrap tr:last-child td{border-bottom:0}
.lesson .table-wrap th{background:#E9EDF8;color:var(--navy);font-size:14px}
.lesson table.has-not td:last-child{color:var(--red)}
.lesson table.has-not td:last-child:not(:empty)::before{content:"✗ ";font-weight:800}
.lesson table.has-not td:nth-last-child(2):not(:empty)::before{content:"✓ ";color:var(--green);font-weight:800}
.lesson table.has-not th:last-child{color:var(--red)}
/* a table in a problem or its worked solution on the practice, check, mini-quiz and review pages and their results
   (D337): the lesson table's padding, rules and header, only as wide as its columns, scrolling in its own box when
   wider than the column; on a phone it stays a grid, a data table read across, with less padding. A round's statement
   keeps its own style (D92) */
:is(.statement,.solution,.solution-more) .table-wrap:not(:is(.round-problem,.exam-review) *){width:fit-content;max-width:100%;overflow-x:auto;border:1px solid var(--line);border-radius:12px;margin:12px 0;background:var(--card)}
:is(.statement,.solution,.solution-more) .table-wrap:not(:is(.round-problem,.exam-review) *) table{border-collapse:collapse;font-size:16px;font-variant-numeric:tabular-nums}
:is(.statement,.solution,.solution-more) .table-wrap:not(:is(.round-problem,.exam-review) *) :is(th,td){text-align:left;padding:8px 14px;border:0;border-bottom:1px solid var(--line);vertical-align:top}
:is(.statement,.solution,.solution-more) .table-wrap:not(:is(.round-problem,.exam-review) *) :is(th,td)+:is(th,td){border-left:1px solid var(--line)}
:is(.statement,.solution,.solution-more) .table-wrap:not(:is(.round-problem,.exam-review) *) tr:last-child td{border-bottom:0}
:is(.statement,.solution,.solution-more) .table-wrap:not(:is(.round-problem,.exam-review) *) th{background:#E9EDF8;color:var(--navy);font-size:15px}
@media (max-width:560px){:is(.statement,.solution,.solution-more) .table-wrap:not(:is(.round-problem,.exam-review) *) :is(th,td){padding:6px 10px}}
button.walk-next{display:block;width:100%;text-align:left;background:var(--card);color:var(--blue);border:2px dashed #AEB9DA;
  border-radius:12px;padding:10px 14px;font-weight:700}
button.walk-next:hover{border-color:var(--blue)}
.lesson.sec-common-mistakes > ul{list-style:none;padding:0;margin:14px 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px;align-items:start}
.lesson.sec-common-mistakes > ul > li.mistake{margin:0;padding:0;background:var(--card);border:1px solid var(--line);border-radius:14px;
  box-shadow:0 1px 3px rgba(24,30,81,.08);max-width:none}
.lesson.sec-common-mistakes > ul > li.plain{margin:0;padding:12px 16px;background:var(--card);border:1px solid var(--line);border-radius:14px}
li.mistake summary{list-style:none;cursor:pointer;display:grid;grid-template-columns:auto 1fr;gap:2px 12px;padding:14px 16px;align-items:start}
li.mistake summary::-webkit-details-marker{display:none}
li.mistake summary:focus-visible{outline:2px solid var(--blue);outline-offset:-2px;border-radius:14px}
li.mistake .x{grid-row:span 2;width:30px;height:30px;border-radius:50%;background:#FDE3DC;position:relative}
li.mistake .x::before{content:"✗";position:absolute;inset:0;text-align:center;line-height:30px;color:var(--red);font-weight:900;font-size:17px}
li.mistake .m-title{font-weight:800;font-size:16px;line-height:1.4}
li.mistake .m-why{color:var(--blue);font-weight:700;font-size:14px}
li.mistake .m-why::after{content:" ▾"}
li.mistake details[open] .m-why::after{content:" ▴"}
li.mistake details[open]{border-top:0}
li.mistake .m-body{padding:0 16px 14px 58px;line-height:1.7}
del.wrong{color:var(--red);text-decoration-thickness:2px}
.mistakes-all{margin:4px 0 0}
/* the red-team pass and more room for content (D83): a compact header and page, the unit's title in its side panel,
   the sheet button in the pager (never floating over controls), stacked tables on phones, one honest next action */
/* the header (D83, D183): the brand, the common destinations in a row, the administrator's pages and the account under
   labeled menus (plain disclosures); at 760px and below one row with Help and a Menu holding every destination */
.mast{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;padding:6px 16px;
  position:relative;z-index:25}
.badge{width:32px;height:32px}.badge img{width:26px;height:26px}.brand{font-size:16px;gap:10px;flex:none}
.mast a{color:#fff}
.nav{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:14px}
.nav-links{display:flex;flex-wrap:wrap;align-items:center;gap:2px;list-style:none;margin:0;padding:0}
.nav-links a,.nav-help{display:inline-flex;align-items:center;min-height:40px;padding:0 10px;border-radius:8px;
  text-decoration:none;white-space:nowrap}
.nav-links a:hover,.nav-help:hover{text-decoration:underline}
.nav-links [aria-current="page"],.nav-help[aria-current="page"],.menu>summary.is-here{box-shadow:inset 0 -3px 0 var(--orange)}
.menu{position:relative}
.menu>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:40px;max-width:16em;
  padding:0 10px;border:1px solid rgba(255,255,255,.45);border-radius:8px;color:#fff;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis}
.menu>summary::-webkit-details-marker{display:none}
.menu>summary::after{content:"\25BE";font-size:.8em}
.menu[open]>summary{background:rgba(255,255,255,.14)}
.menu>summary:focus-visible{outline:3px solid var(--orange);outline-offset:2px}
.menu-count{font-weight:700;color:#FFD3C4}
.menu-panel{position:absolute;right:0;top:calc(100% + 6px);width:max-content;min-width:220px;max-width:min(320px,calc(100vw - 24px));
  max-height:calc(100vh - 80px);overflow:auto;background:var(--card);color:var(--ink);border:1px solid var(--line);
  border-radius:12px;box-shadow:0 10px 28px rgba(24,30,81,.22);padding:6px;z-index:40;font-size:15px}
.menu-panel ul{list-style:none;margin:0;padding:0}
.mast .menu-panel a{display:flex;align-items:center;min-height:44px;padding:0 12px;border-radius:8px;color:var(--ink);
  text-decoration:none}
.mast .menu-panel a:hover{background:#F0F3FA}
.menu-panel [aria-current="page"]{box-shadow:inset 3px 0 0 var(--orange);font-weight:700}
.menu-panel form{margin:4px 0 0;border-top:1px solid var(--line);padding-top:4px}
button.link.menu-signout{display:flex;align-items:center;width:100%;min-height:44px;padding:0 12px;border:0;border-radius:8px;
  background:none;color:var(--blue);text-align:left;font:600 15px var(--sans)}
button.link.menu-signout:hover{background:#F0F3FA}
.menu-group{margin:8px 12px 2px;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.nav-phone{display:none;align-items:center;gap:6px}
@media (max-width:760px){.nav-wide{display:none}.nav-phone{display:flex}.mast{flex-wrap:nowrap;padding:6px 12px}
  .nav-help,.nav-phone .menu>summary{min-height:44px;font-size:15px;font-weight:600}}
@media (max-width:400px){.brand-long{display:none}}
.page{padding:12px 16px 32px}
h1{font-size:1.6rem;line-height:1.25;margin:.25em 0 .4em}
.card{margin:12px 0;padding:14px 18px}
progress.progress{margin:4px 0 10px}
.crumb{margin:0 0 6px}.crumb-unit{color:var(--ink);font-weight:600}
.unit-layout{grid-template-columns:240px minmax(0,1fr);gap:16px;margin-top:4px}
.unit-layout .card{margin:0 0 12px}
.side-title{font-size:18px;margin:0 0 2px}.side-meta{margin:0 0 8px}
.lesson h2{font-size:1.35rem;line-height:1.3;margin:2px 0 8px}
.step-pill{margin:0 0 4px;padding:2px 10px;font-size:12px}
.lesson > p:first-of-type{margin-top:0}
.pager{margin-top:14px}
a.button.pager-sheet{display:none}
@media (max-width:820px){a.button.pager-sheet{display:inline-block}.unit-layout{grid-template-columns:minmax(0,1fr)}}
@media (max-width:640px){.lesson .pager{gap:8px}.lesson .pager .button{padding:8px 12px}}
.pager-note{margin:8px 0 0;font-weight:600;color:#A23E1C}
/* step dots: a bigger target, read steps filled */
.dots{gap:2px}
.dot{width:12px;height:12px;border:6px solid transparent;background-clip:padding-box;box-sizing:content-box;background-color:var(--line)}
.dot.seen{background-color:var(--blue)}.dot.now{background-color:var(--orange);transform:none;width:16px;height:16px;border-width:4px}
/* Prose tables: a card per row on a phone. Compact comparisons and value grids keep their column relationships. */
@media (max-width:560px){
  .lesson .table-wrap table.compact :is(th,td){padding:6px 8px}
  .lesson table.stack,.lesson table.stack tbody,.lesson table.stack tr,.lesson table.stack td{display:block;width:100%}
  .lesson table.stack thead{display:none}
  .lesson table.stack tr{padding:8px 12px;border-bottom:1px solid var(--line)}
  .lesson table.stack tr:last-child{border-bottom:0}
  .lesson .table-wrap table.stack td{padding:2px 0;border:0;background:none}
  .lesson table.stack td:first-child{font-weight:700;color:var(--navy)}
  .lesson table.stack:not(.has-not) td:not(:first-child)::before{content:attr(data-label) ": ";color:var(--muted);font-weight:600}
  .lesson table.stack td:empty{display:none}
}
/* wrong working, struck through even when it is math */
del.wrong{text-decoration:none;position:relative;display:inline-block}
del.wrong::after{content:"";position:absolute;left:-2px;right:-2px;top:55%;border-top:2px solid var(--red);transform:rotate(-4deg)}
/* common mistakes: one column; a mistake without a separate explanation has the same card */
.lesson.sec-common-mistakes > ul{grid-template-columns:minmax(0,1fr);max-width:760px}
.lesson.sec-common-mistakes > ul > li.plain{position:relative;padding:14px 16px 14px 58px;line-height:1.6;font-weight:600}
.lesson.sec-common-mistakes > ul > li.plain::before{content:"✗";position:absolute;left:16px;top:12px;width:30px;height:30px;
  border-radius:50%;background:#FDE3DC;color:var(--red);font-weight:900;text-align:center;line-height:30px}
/* Your turn: how to type, the keys, a clear ending */
/* a round's keys (D94): one row in the bar for the box last used; on a phone each exam problem's own row, above its
   box while the box is in use, so the problem keeps the screen while she reads */
.round-bar .keys button{min-width:36px;min-height:34px;font-size:16px;padding:2px 8px}
.round-problem .answer-col .keys{display:none}
.try .keys{margin:8px 0 0}.try .keys button{min-width:40px;min-height:40px;font-size:16px}
.ask-input input{width:14em;max-width:100%}
.try-reading{font-size:16px;color:var(--ink)}.try-reading math{font-size:1.25em}
.try-done{margin:10px 0 0;padding:10px 14px;border-radius:12px;background:#E5F6EC;border:1px solid #9FD3B5;font-weight:700;color:var(--ink)}
/* Your turn keeps the active explanation and question outside a native, reopenable history. */
.try-history{margin:10px 0 4px;border-bottom:1px solid var(--line)}
.try-history>summary{cursor:pointer;color:var(--blue);font-weight:600;min-height:44px;padding:8px 0}
.try-history>summary:focus-visible{outline:3px solid var(--orange);outline-offset:2px;border-radius:6px}
.try-history .try-steps{margin-top:4px}
.ask-result a{font-weight:700}
/* buttons */
button.big,a.button.big{font-size:17px;padding:12px 22px}
button.danger{background:var(--red)}
a.button.continue{font-weight:700}
/* home and start screens */
.next-card{display:flex;flex-direction:column;gap:4px;text-decoration:none;color:var(--ink);max-width:560px;border:2px solid var(--blue)}
.next-card .progress{margin:6px 0}
.review-card{display:flex;flex-direction:column;gap:6px;text-decoration:none;color:var(--ink);max-width:560px;border:2px solid var(--orange)}
.review-card p{margin:0}.review-card form{margin:0}
.bridge-home{display:flex;flex-direction:column;gap:6px;text-decoration:none;color:var(--ink);max-width:560px;border:2px solid var(--ink)}
.bridge-directions{margin:.6rem 0 0}.bridge-support{margin:.4rem 0 0}.bridges-h{margin-top:1.6rem}
.big-go{align-self:flex-start;font-size:17px;padding:10px 20px}
.home-links{display:flex;flex-wrap:wrap;gap:8px}
.start-card{max-width:640px}.start-card h1{margin-top:2px}
.rules{list-style:none;padding:0;margin:10px 0 16px;display:flex;flex-direction:column;gap:8px}
.rules li{padding:8px 12px 8px 34px;background:#F4F6FB;border-radius:10px;position:relative}
.rules li::before{content:"";position:absolute;left:14px;top:1.05em;width:8px;height:8px;border-radius:2px;background:var(--orange);transform:rotate(45deg)}
.start-card form{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
/* practice */
.practice-layout{gap:16px}
.practice-layout .card{margin:0 0 12px}
.verdict-card.v-later{border-left-color:var(--blue)}
.solution-more summary,.route-how summary,.paper-again summary{cursor:pointer;font-weight:700;color:var(--blue)}
.practice-pager{margin-top:4px}
.pager-choice{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.boundary-note{margin:12px 0 0;font-weight:600}
.route-body{margin:10px 0}
.repair-ask{font-size:17px}
/* rounds */
.timer-box{display:flex;align-items:baseline;gap:8px}.timer-label{font-size:13px;font-weight:700;color:var(--muted)}
.end-round{position:relative}
.end-round summary{cursor:pointer;font-size:14px;color:var(--red);font-weight:600;list-style:none;padding:6px 4px}
.end-round summary::-webkit-details-marker{display:none}
.end-pop{position:absolute;right:0;top:100%;z-index:6;width:min(320px,80vw);background:var(--card);border:1px solid var(--line);
  border-radius:12px;padding:12px 14px;box-shadow:0 8px 24px rgba(24,30,81,.18)}
.end-pop p{margin:0 0 10px;font-size:14px}
.round-sub{margin:4px 0 8px;font-size:14px;color:var(--muted)}
.round-page{margin:8px 0 16px}
.paper-scroll{position:relative;overflow-x:auto;border-radius:6px}
.paper-scroll .zoom-toggle{position:absolute;right:8px;top:8px}
.paper-scroll.zoomed .paper-page{max-width:none;width:200%}
#finish-btn{margin-top:10px;font-size:16px;padding:10px 18px}
.done-list{columns:auto;list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.done-list li{background:#F4F6FB;border-radius:10px;padding:6px 12px}.done-list .num{font-weight:700;margin-right:6px}
@media (max-width:760px){.round-target .answer-col{position:sticky;bottom:0;z-index:4;background:var(--card);
  border-top:1px solid var(--line);padding:8px 0 calc(8px + env(safe-area-inset-bottom,0px));box-shadow:0 -6px 16px rgba(24,30,81,.08)}}
.paper-list .button{margin-left:auto}
.paper-list a.paper-name{text-decoration:none}
.practice-layout:not(.has-feedback){grid-template-columns:minmax(0,760px)}
span.button.big-go{display:inline-block;background:var(--blue);color:#fff;border-radius:8px;font-weight:700;text-decoration:none}
.verdict-card math,.route-card math{font-size:1.25em}
.paper-list li{padding:4px 0}
/* the administrator's account reset (D84) */
a.button.small{font-size:13px;padding:4px 10px}
a.button.danger-outline{background:#fff;color:var(--red);border:1px solid var(--red)}
.confirm-card{border:2px solid var(--red)}.confirm-card .kicker{color:var(--red)}
.foot{max-width:1180px}
/* the way to message the administrator, at the foot of every page but a timed or check one, and on Home (D185) */
.foot-help{border-top:1px solid var(--line);padding-top:12px;margin-top:8px}
.foot-help p{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:0;color:var(--ink);font-size:15px}
.foot-help .button{min-height:44px;display:inline-flex;align-items:center}
.home-feedback{margin:10px 0 0}.home-feedback a{font-weight:600}
.kb-message-admin{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}.kb-message-admin .button{min-height:44px;display:inline-flex;align-items:center}
/* original exams in rounds (D92): the statement and its figure where a past paper shows its page */
.round-problem .problem-text{display:flex;flex-direction:column;gap:8px;background:var(--card);border:1px solid var(--line);border-radius:6px;padding:12px 14px}
.round-problem .problem-text .num{font-weight:700}
.round-problem .problem-text .fig img,.exam-review .fig img{max-width:min(100%,420px);height:auto}
.exam-review{margin:8px 0}
.exam-review summary{cursor:pointer}
.exam-review .problem-text{margin:8px 0}
.card.exam-review{color:var(--ink)}
.exam-review.v-right summary{color:var(--green)}
.exam-review:is(.v-wrong,.v-unreadable) summary{color:var(--red)}.exam-review:is(.v-form,.v-unit) summary{color:#A23E1C}
.label.pick{color:var(--green)}
.round-problem .statement table,.exam-review .statement table{border-collapse:collapse;margin:8px 0;font-variant-numeric:tabular-nums}
.round-problem .statement :is(th,td),.exam-review .statement :is(th,td){border:1px solid var(--line);padding:4px 12px;text-align:center}
.round-problem .statement :is(th,td):first-child,.exam-review .statement :is(th,td):first-child{text-align:left;background:#F4F6FB}
.round-problem .statement,.exam-review .statement{flex:none}
.round-problem{margin:6px 0}
.round-problem .problem-text{display:grid;grid-template-columns:2em minmax(0,1fr);gap:6px 4px;align-items:start}
.round-problem .problem-text .fig{grid-column:2;margin:0}
.round-problem .problem-text .statement p:first-child{margin-top:0}
@media (max-width:760px){.round-target .round-problem .answer-col{position:static;box-shadow:none}}
/* an exam round a page at a time (D92): five Sprint problems or a Target pair to a page on a wider screen, with Back,
   where she is and Next kept in view at the bottom; on a phone one problem per screen, and the page itself never
   scrolls: the bar on one line, the problem (scrolling inside itself only when it cannot fit), its answer, the buttons */
.qnav{display:none}
body.paged .round-problem:not(.is-current){display:none}
body.paged .qnav{display:block;position:sticky;bottom:0;z-index:4;background:var(--bg);padding:10px 0 12px}
@media (min-width:761px){
  .qnav-grid{left:50%;right:auto;width:min(100%,520px);transform:translateX(-50%);grid-template-columns:repeat(10,1fr)}
  body.paged .page{max-width:1100px;padding-top:8px;padding-bottom:0}
  body.paged .round-problem .statement{line-height:1.5}
  body.paged .round-problem{grid-template-columns:minmax(0,1fr) 270px;gap:12px;margin:6px 0}
  body.paged .round-problem .answer-col{position:static}
  body.paged .round-problem .problem-text{grid-template-columns:2em minmax(0,1fr) auto;padding:8px 14px}
  body.paged .round-problem .problem-text .fig{grid-column:3;grid-row:1 / span 2;margin:0}
  body.paged .round-problem .problem-text .fig img{width:auto;max-width:300px;max-height:260px}
}
.qnav-bar{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;align-items:center}
.qnav-bar .qnav-back{justify-self:start}.qnav-bar .qnav-next{justify-self:end;min-width:6.5em}
.qnav-bar button{padding:10px 16px}.qnav-bar button:disabled{opacity:.4;cursor:default}
.qnav-where{display:flex;flex-direction:column;align-items:center;line-height:1.25;background:var(--card);color:var(--ink);
  border:1px solid var(--line)}
.qnav-where span{font-weight:400;font-size:12px;color:var(--muted)}
.qnav-grid{position:absolute;left:0;right:0;bottom:100%;z-index:6;display:grid;grid-template-columns:repeat(6,1fr);gap:6px;
  background:var(--card);border:1px solid var(--line);border-radius:12px;padding:10px;box-shadow:0 -6px 24px rgba(24,30,81,.16)}
.qnav-num{background:#fff;color:var(--ink);border:1px solid var(--line);padding:8px 0;font-variant-numeric:tabular-nums}
.qnav-num.answered{background:#DCE2F3;border-color:#AEB9DA}
.qnav-num.now{outline:2px solid var(--orange);outline-offset:1px}
.qnav-legend{grid-column:1/-1;margin:2px 0 0;color:var(--muted)}
@media (max-width:760px){
  body.paged{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
  body.paged .mast,body.paged .round-sub,body.paged .done-card{display:none}
  body.paged .page{flex:1 1 auto;min-height:0;width:100%;display:flex;flex-direction:column;padding:8px 12px 10px}
  body.paged .round-bar{position:static;margin:0 0 8px;flex-wrap:nowrap;gap:10px;padding:4px 12px}
  body.paged .round-name{flex:1 1 auto;min-width:0;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.paged .round-bar:has(.pairs) .round-name,body.paged .timer-label{display:none}
  body.paged .pairs{flex:1 1 auto}
  body.paged .end-round summary{padding:2px 0}
  body.paged #round-form{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
  body.paged .round-problem.is-current{display:flex;flex-direction:column;align-items:stretch;gap:10px;flex:0 1 auto;
    min-height:0;margin:0}
  body.paged .round-problem.is-current .problem-text{flex:0 1 auto;min-height:0;overflow-y:auto}
  body.paged .round-problem .answer-col{position:static;box-shadow:none;padding:0;border:0;background:none}
  body.paged .round-problem .round-answer .num{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  body.paged .round-problem .round-answer input[data-num]{flex:1 1 8em;min-width:0;max-width:14em;font-size:18px;padding:8px 10px}
  body.paged .round-problem .round-answer .preview{margin-left:0}
  body.paged .round-problem .statement{line-height:1.5}
  body.paged .round-problem.is-current:has(.fig),body.paged .round-problem.is-current:has(.fig) .problem-text{flex:1 1 auto}
  body.paged .round-problem .problem-text:has(.fig){grid-template-rows:auto minmax(110px,1fr)}
  body.paged .round-problem .problem-text .fig{align-self:stretch;min-height:0;position:relative;margin:0;cursor:zoom-in}
  body.paged .round-problem .problem-text .fig img{width:100%;height:100%;max-width:420px;object-fit:contain}
  body.paged .round-problem .fig.small::after,body.paged .round-problem .fig.zoomed::after{content:"Tap to enlarge";
    position:absolute;right:6px;bottom:6px;font-size:12px;font-weight:600;color:#fff;background:var(--navy);border-radius:999px;
    padding:1px 8px}
  body.paged .round-problem .problem-text .fig.zoomed{position:fixed;inset:0;z-index:40;background:rgba(24,30,81,.88);
    padding:16px;display:flex;align-items:center;justify-content:center;cursor:zoom-out}
  body.paged .round-problem .problem-text .fig.zoomed img{max-width:none}
  body.paged .round-problem .fig.zoomed::after{content:"Tap to close";right:auto;left:50%;bottom:28px;transform:translateX(-50%);
    font-size:14px;padding:4px 14px}
  body.paged .round-problem .problem-text .fig:focus-visible{outline:3px solid var(--orange);outline-offset:2px}
  body.paged .round-problem .fig.zoomed .fig-close{position:fixed;top:12px;right:12px;z-index:41;min-height:44px;min-width:88px}
  body.paged .round-problem .problem-text{grid-template-columns:minmax(0,1fr)}
  body.paged .round-problem .problem-text > .num{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  body.paged .round-problem .problem-text .fig{grid-column:1}
  body.paged .round-problem #finish-btn{display:none}
  body.paged .round-bar .keys{display:none}
  body.paged .round-problem .answer-col:focus-within .keys{display:flex;order:-1}
  body.paged .round-problem .answer-col .keys button{min-height:40px;flex:1 1 0;min-width:0;padding:4px}
  body.paged .qnav{position:relative;margin-top:auto;padding:10px 0 0}
}
/* a short phone screen: tighter type and spacing, so the longest problems still fit */
@media (max-width:760px) and (max-height:700px){
  body.paged .page{padding:6px 10px 8px}
  body.paged .round-bar{margin-bottom:6px}
  body.paged .round-problem.is-current{gap:8px}
  body.paged .round-problem .problem-text{padding:8px 12px}
  body.paged .round-problem .statement{font-size:15px;line-height:1.45}
  body.paged .qnav{padding-top:8px}
  body.paged .qnav-bar button{padding:8px 14px}
}

/* D103, D104: the next step after a check with misses; a word for a student's first visit */
.next-note{margin:16px 0 8px}
.how-it-works ul{margin:6px 0 8px;padding-left:20px}.how-it-works li{margin:4px 0}
.how-it-works summary,.award-next-more summary{cursor:pointer;font-weight:700;color:var(--blue)}
.award-next-more summary{font-size:14px;font-weight:600}
/* Home (D183): the next task and the ways to work first; on a wide screen the awards summary beside them */
.home-hello{font-size:1.35rem;margin:.15em 0 .2em}
.home-top{display:grid;grid-template-columns:minmax(0,1fr);gap:0 18px;align-items:start}
@media (min-width:821px){.home-top{grid-template-columns:minmax(0,1.45fr) minmax(250px,1fr)}.home-top .next-card,.home-top .review-card,.home-top .bridge-home,.home-top .intro-card{max-width:none}}
/* a solution as readable steps (D129): each named step its own paragraph, the answer marked, the extras folded */
.sol-step{margin:.55em 0}
.sol-answer{border-left:4px solid var(--blue);padding:2px 0 2px 10px}
details.sol-more{margin:.5em 0}
details.sol-more summary{cursor:pointer;font-weight:700;color:var(--blue)}
details.sol-more p{margin:.4em 0 .4em 1em}

.review-choice-row{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin:.5rem 0}.review-choice-row form{margin:0}
.review-problem code{white-space:pre-wrap;overflow-wrap:anywhere}
.q-selected{box-shadow:0 0 0 2px rgba(63,84,163,.35);border-radius:6px}  /* the question being timed (D138) */
/* the progress pages' tables stack into labeled rows on a phone (D139) */
.topic-table .cat-row th{background:#E9EDF8;color:var(--navy);text-align:left}
@media (max-width:640px){.stack-table thead{display:none}.stack-table tr{display:block;padding:8px 0;border-bottom:1px solid var(--line)}.stack-table td,.stack-table tfoot th{display:block;border:0;padding:2px 0}.stack-table td[data-label]::before{content:attr(data-label) ": ";color:var(--muted);font-weight:600}.stack-table .cat-row th{display:block;padding:6px 8px}}
.review-page{margin:0 0 12px}.review-page .paper-page{max-width:min(100%,680px)}.review-page figcaption{font-size:14px;color:var(--muted)}
.change-children summary{cursor:pointer;color:var(--blue);font-size:14px}.change-children form{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;margin-top:6px}
.overview{border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:14px}.overview summary{cursor:pointer;color:var(--blue);font-weight:600;min-height:30px}
.overview-benefit{font-size:1.06em;margin:.6em 0 .3em}.overview-skills{padding-left:20px;margin:.3em 0 .6em}.overview-skills li{margin:4px 0}.overview-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
/* optional pages in the unit's order (D155): under their section in the side list, a note with a link past them, the
   overview's list of them, and a hollow dot until read */
.unit-steps li{flex-wrap:wrap}
.side-sub{list-style:none;margin:2px 0 0;padding:0;flex-basis:100%}
.unit-steps .side-sub li{border:0;padding:3px 0 3px 14px;justify-content:flex-start;gap:6px;font-size:.94em}
.optional-skip{background:#F3F5FB;border-left:3px solid var(--blue);border-radius:6px;padding:8px 12px;margin:4px 0 12px}
.overview-extras{margin:.2em 0 .7em}
.dot.opt:not(.now):not(.seen){background-color:transparent;box-shadow:inset 0 0 0 2px var(--line)}
/* a figure beside the decision, worked example or Your turn it belongs to, on a wide screen, staying in view while
   its steps open; stacked, figure first, on a narrower one (D155) */
@media (min-width:900px){.fig-pair{display:flex;gap:18px;align-items:flex-start}
  .fig-pair>.fig{order:2;flex:0 1 auto;max-width:45%;margin:0;position:sticky;top:12px}
  .fig-pair>.fig img{max-height:70vh}
  .fig-pair>:not(.fig){order:1;flex:1 1 0;min-width:0;margin-top:0}}
/* a lesson or practice figure opens large on a click or tap (D155; the rounds have their own, D92) */
.fig[role=button]{cursor:zoom-in}
.fig[role=button]:focus-visible{outline:3px solid var(--orange);outline-offset:2px;border-radius:10px}
.fig-zoom{position:fixed;inset:0;z-index:60;background:rgba(24,30,81,.9);display:flex;align-items:center;justify-content:center;
  padding:64px 16px 16px;cursor:zoom-out}
.fig-zoom img{background:#fff;border-radius:10px;padding:10px;width:min(94vw,900px);height:auto;max-height:calc(100vh - 96px);object-fit:contain}
.fig-zoom-close{position:fixed;top:12px;right:12px;min-height:44px;min-width:88px}
/* awards (D165, D166): medals drawn by awards.js; the new-award box, the home card and the Awards page */
.medal{display:inline-block;line-height:0;flex:none}.medal svg{display:block;overflow:visible}
.award-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
.award-sound{font-size:13px}
.award-box{border:2px solid #E2AE22;background:#FFFBEF;padding:10px 14px}
.award-box .award-new-list{grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:6px 14px;margin-top:4px}
.award-box .award-new{gap:10px;align-items:flex-start}.award-box .award-new .muted{font-size:13px;line-height:1.4}
.award-box .award-earlier,.award-box .award-all{margin:4px 0 0}
.award-tools{display:inline-flex;gap:14px;align-items:baseline}
.award-new-list,.award-next-list{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:10px}
.award-new{display:flex;gap:14px;align-items:center}
.award-new>div,.award-next-list li>div,.award-body{display:flex;flex-direction:column;gap:2px;min-width:0}
.award-word{font-size:13px;font-weight:700;color:var(--blue)}
.award-surprise{font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#C2386E}
.award-new-tag{font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--orange)}
.award-earlier{margin:6px 0 0}
.award-all{margin:10px 0 0}
.award-summary{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:4px 0 10px}
.chip{font-size:13px;font-weight:600;background:#E7EBF8;color:var(--blue);padding:4px 10px;border-radius:999px}
.award-next-h{margin:4px 0 0}
.award-next-list li{display:flex;gap:12px;align-items:center;border:1px solid var(--line);border-radius:10px;padding:8px 10px}
.award-next-list .progress,.award-body .progress{margin:4px 0 0;height:6px}
.award-group{margin:28px 0 0}.award-group h2{margin:0}.award-group>.muted{margin:2px 0 10px}
.award-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px}
.award-card{display:flex;gap:12px;align-items:flex-start;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:12px}
.award-card.locked{background:#F8F9FC}.award-card.locked .award-body>b{color:var(--muted)}
.award-card.is-new{border:2px solid #E2AE22}
.award-card.found{border-color:#E8A0BC;background:#FFF4F8}
.award-card.mystery{border-style:dashed;background:transparent}
.award-next{font-size:13px;color:var(--ink);margin-top:2px}
.award-history{font-size:13px;color:var(--muted)}.award-history ul{margin:4px 0 0;padding-left:18px}
.pips{display:flex;gap:4px;margin:2px 0}.pips i{width:16px;height:6px;border-radius:3px;background:var(--line)}
.pips .p1{background:#C27C45}.pips .p2{background:#8F9AA8}.pips .p3{background:#D9A21B}.pips .p4{background:#3D6BE0}
.pips .p5{background:linear-gradient(90deg,#FF7AC6,#8E6BFF,#29C5F6)}
@media (prefers-reduced-motion:no-preference){
  .award-new .medal{animation:award-pop .55s cubic-bezier(.2,1.4,.4,1)}
  .award-new.sparkle .medal{position:relative}
  .award-new.sparkle .medal::after{content:"";position:absolute;inset:-8px;border-radius:50%;
    background:radial-gradient(circle,#FFD16699 0 2px,transparent 3px) 0 0/14px 14px;animation:award-glint 1.2s ease-out 2}
}
@keyframes award-pop{0%{transform:scale(.4) rotate(-12deg)}70%{transform:scale(1.15) rotate(4deg)}100%{transform:scale(1) rotate(0)}}
@keyframes award-glint{0%{opacity:0;transform:scale(.6)}40%{opacity:1}100%{opacity:0;transform:scale(1.3)}}
/* the administrator's awards across students (D169) */
.admin-awards-check{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:8px 0 18px}
.admin-awards{table-layout:fixed;width:100%}.admin-awards td{vertical-align:top;overflow-wrap:anywhere}.admin-awards th:nth-child(1){width:40%}.admin-awards th:nth-child(2){width:10%}.admin-awards th:nth-child(3){width:23%}
.admin-awards ul{list-style:none;margin:0;padding:0}.admin-awards li{margin:1px 0}
.admin-award{display:flex;gap:10px;align-items:flex-start}.admin-award > div{display:flex;flex-direction:column;gap:2px;min-width:0}
.admin-award .medal{flex:none}
.admin-awards summary{cursor:pointer;color:var(--muted)}.admin-awards details ul{margin-top:2px}
@media (max-width:640px){.admin-awards td[data-label="Award"]::before{display:none}}
/* Learn (D183): Continue first, the filters, then every unit; each card has one link, its title, reaching across the
   card, with the progress detail beside it (never inside the link); on a phone a short row with the detail folded */
.continue-card{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 14px;text-decoration:none;color:var(--ink);
  border:2px solid var(--blue);max-width:760px}
.continue-card .kicker{flex-basis:100%}.continue-title{font-size:19px;font-weight:700}.continue-card .card-go{margin:0}
.continue-card:hover .card-go{text-decoration:underline}
/* Learn's search and filters (D185) share the Rounds page's search row, "Filters" disclosure, groups and chips */
.learn-tools{margin:8px 0 4px}
label.check.lt-left{min-height:44px;margin:6px 0 0;flex-wrap:wrap;gap:2px 8px}.lt-left input{width:20px;height:20px}
.filter-count{flex-basis:100%;margin:0}
.unit-card{position:relative}
.unit-card .unit-title{margin:0;line-height:1.3}
.unit-link{color:var(--ink);text-decoration:none}
.unit-link::after{content:"";position:absolute;inset:0;border-radius:14px}
.unit-link:focus-visible{outline:none}
.unit-card:has(.unit-link:focus-visible){outline:3px solid var(--orange);outline-offset:2px}
.unit-card:hover .unit-link,.unit-card:hover .card-go{text-decoration:underline}
.unit-line{display:flex;flex-wrap:wrap;gap:2px 12px;margin:2px 0 0}
.status{font-weight:700}.status-review{color:#A23E1C}.status-done{color:var(--green)}
.unit-more{position:relative;z-index:1;display:none}
.unit-more summary{cursor:pointer;color:var(--blue);font-weight:600;min-height:44px;display:flex;align-items:center;width:max-content}
.unit-more ul{margin:0 0 4px;padding-left:18px}
.empty-state{grid-column:1/-1;background:var(--card);border:1px dashed var(--line);border-radius:12px;padding:14px 18px}
@media (max-width:640px){.unit-grid{grid-template-columns:minmax(0,1fr);gap:10px}.unit-card .unit-stats{display:none}
  .unit-more{display:block}.unit-card .progress{margin:6px 0 0}.unit-card .card-go{margin-top:4px}}
/* a lesson's place and contents (D183, D185): beside the lesson on a wide screen, the side list, with the overview above
   the page; to 820px one header in the page's flow, "← All units", the unit's title (the page's one h1) and Contents, a
   disclosure with the section and page, every section and page, read and optional ones marked, Practice, the check
   and About this lesson (the category, difficulty, time, overview and what to know first); the phone's Back and Next
   bar shows the page count */
.lesson-contents{margin:0 0 10px;border:1px solid var(--line);border-radius:12px;background:#F7F8FC}
.lesson-contents>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;
  min-height:44px;padding:4px 12px;font-size:14px;font-weight:700}
.lesson-contents>summary::-webkit-details-marker{display:none}
.lesson-contents>summary:focus-visible{outline:3px solid var(--orange);outline-offset:2px;border-radius:12px}
.lc-where{color:#A23E1C}.lc-open{color:var(--blue);white-space:nowrap}.lc-open::after{content:" \25BE"}
.lesson-contents[open] .lc-open::after{content:" \25B4"}
.lc-panel{padding:0 12px 8px}.lc-read{margin:0 0 4px}
.lc-sections{list-style:none;margin:0;padding:0}
.lc-sections>li{padding:4px 0;border-top:1px solid var(--line)}
.lc-sections>li>a{display:inline-flex;align-items:center;min-height:44px;font-weight:600;text-decoration:none}
.lc-sections>li.current>a{color:var(--ink);font-weight:800}
.lc-pages{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 6px}
.lc-page{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;border:1px solid var(--line);
  border-radius:8px;background:#fff;text-decoration:none;font-variant-numeric:tabular-nums}
.lc-page.seen{background:#E7EBF8}.lc-page.opt{border-style:dashed}.lc-page.now{border:2px solid var(--orange);font-weight:800}
.lc-sections .side-sub li{padding:2px 0 2px 14px}.lc-sections .side-sub a{display:inline-flex;align-items:center;min-height:40px}
.lc-about-item{display:block}.lc-about>summary{cursor:pointer;color:var(--blue);font-weight:600;min-height:44px;display:flex;
  align-items:center}
.lc-about-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:2px 0 6px}.lc-about-meta .unit-tags{margin:0}
.lc-about p,.lc-about ul{font-size:15px}
.crumb-arrow{display:none}
@media (min-width:821px){.lesson-contents{display:none}}
@media (max-width:820px){.lesson .step-pill,.lesson>.overview{display:none}
  .crumb{margin:0}.crumb a{display:inline-flex;align-items:center;min-height:44px;color:var(--blue);font-weight:600}
  .crumb-arrow{display:inline;white-space:pre}.crumb-tail{display:none}
  .unit-layout .unit-steps{padding:0;margin:0 0 10px;background:none;border:0;border-radius:0}
  .side-title{font-size:22px;line-height:1.25;margin:0 0 8px}
  .lesson-contents{margin:0}
  .unit-side .side-meta,.unit-side .side-nav,.unit-side .side-sheet,.unit-side .side-before{display:none}}
/* the phone's Back and Next bar: while an answer box in the lesson has the focus it stops floating, so it never covers
   the box, its reading or a message, and a focused control is scrolled clear of it (D183) */
@media (max-width:640px){.lesson:has(input:focus) .pager{position:static;margin:16px 0 0;border-radius:0}
  html:has(.lesson .pager){scroll-padding-bottom:88px}}
/* practice (D183): the problem and its answer box, the verdict and its next step, then the help, in that order in the
   page; on a wide screen the verdict column sits beside the problem and the help under it */
.practice-layout.has-feedback>.problem,.practice-layout.has-feedback>.support-card{grid-column:1}
@media (min-width:901px){.practice-layout.has-feedback{grid-template-rows:auto 1fr}
  .practice-layout.has-feedback>.feedback-col{grid-column:2;grid-row:1 / span 2}}
.support-card .help-row{margin-top:0}.support-card .hint+.help-row{margin-top:10px}
.support-card .hint{margin:0 0 8px}
.support-note{margin:8px 0 0}
.reveal-confirm{margin:10px 0 0}
.reveal-confirm>summary{cursor:pointer;color:var(--blue);font-weight:600;width:max-content;max-width:100%;min-height:44px;
  display:flex;align-items:center}
.reveal-confirm form{border:1px solid var(--line);border-left:4px solid var(--orange);border-radius:10px;padding:8px 12px;
  display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center}
.reveal-confirm form p{flex-basis:100%;margin:0}
/* asked before a step that cannot be undone: a check's answer, a Target pair's Finish (D244) */
.ask-first{margin:10px 0;border:1px solid var(--line);border-left:4px solid var(--orange);border-radius:10px;padding:8px 12px;
  display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;background:var(--card)}
.ask-first p{flex-basis:100%;margin:0}.ask-first p:focus{outline:none}
.ask-first [data-ask-answer]{white-space:pre-wrap;overflow-wrap:anywhere}
button[data-ask]:disabled{opacity:.45;cursor:default}
.format-msg{margin:8px 0 0;padding:8px 12px;border-radius:10px;background:#FDF1EC;border-left:4px solid var(--orange)}
.format-msg:focus{outline:3px solid var(--orange);outline-offset:2px}
.draft-note{margin:4px 0 0}
.todo{margin:4px 0 6px}.todo p{margin:2px 0}  /* what is left in a lesson for mini-quiz access, linked (UX04) */
.save-line{margin:6px 0 0}  /* a quiz answer: saved, nothing saved yet, or a change not saved yet (UX01) */
.draft-pending a:not([hidden]) ~ a:not([hidden])::before{content:", "}
#answer,#feedback,#hints,#solution,#verdict{scroll-margin-top:12px}
.verdict-card:focus{outline:3px solid var(--orange);outline-offset:2px}
.hint:focus,.solution:focus{outline:2px solid var(--blue);outline-offset:2px}
/* the unit check: where the student is, and what is saved */
.check-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 12px}.check-head p{margin:0}
.check-rule{margin:6px 0 0}
/* worked examples and Your turn (D183): the step just shown is marked, older ones fold behind "Earlier steps"; a right
   answer in Your turn waits for Continue, and a finished choice keeps only the one chosen */
.walk-step.walk-current{border-color:var(--orange);box-shadow:inset 4px 0 0 var(--orange)}
.walk-step.kind-answer.walk-current{border-color:#9FD3B5;box-shadow:inset 4px 0 0 var(--green)}
button.walk-earlier{display:flex;align-items:center;min-height:44px;margin:0 0 4px;font-weight:600}
.try-step.done .ask-choices button.choice:not(.chosen){display:none}
button.link-button.show-next.is-continue{display:inline-flex;align-items:center;min-height:44px;margin-top:8px;padding:0 18px;
  border-radius:8px;background:var(--blue);color:#fff;text-decoration:none;font-weight:700}
/* a check's results (D183): the score and what to do next first; each problem a short row, its statement folded, its
   answer and explanation only after the student chose them */
.result-head h1{margin:0 0 4px}.result-head p{margin:4px 0}
.result-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px!important}
.result-list{list-style:none;margin:0;padding:0}
.result-row{border-left:6px solid var(--line);color:var(--ink);scroll-margin-top:12px}
.result-row.v-right{border-left-color:var(--green)}.result-row.v-wrong,.result-row.v-unreadable{border-left-color:var(--red)}
.result-row.v-form,.result-row.v-unit{border-left-color:var(--orange)}
.result-line{display:flex;justify-content:space-between;align-items:center;gap:8px}
.result-h{font-size:17px;margin:0}
.result-wrote{margin:4px 0}
.result-problem summary,.sol-open summary{cursor:pointer;color:var(--blue);font-weight:600;min-height:40px;display:flex;align-items:center;
  width:max-content}
.result-answer p{margin:6px 0}
.route-lead{margin:8px 0 0}
/* the adults' progress (D183): a student's page as three linked views, Overview, Topics and Tests; a parent's children
   as links; each topic a row that opens on its sources, its state named without opening it */
.student-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 18px}.student-head h1{margin:0}
.child-pick{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.child-pick a,.view-tabs a{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border:1px solid var(--line);
  border-radius:10px;background:var(--card);text-decoration:none;font-weight:600}
.child-pick a[aria-current],.view-tabs a[aria-current]{background:var(--blue);border-color:var(--blue);color:#fff}
.view-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 4px}
.view-links{display:block}
.topic-filter{margin:6px 0 10px}
.topic-cat{margin:14px 0 0}.topic-cat h3{font-size:16px;margin:0 0 4px}
.topic-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.topic-list>li{border-bottom:1px solid var(--line)}
.topic-list summary{cursor:pointer;display:flex;flex-wrap:wrap;justify-content:space-between;gap:2px 12px;min-height:44px;
  align-items:center;padding:4px 2px}
.t-name{font-weight:600}.t-state{font-size:14px;color:var(--muted)}.t-state.t-enough,.t-state.t-few{color:var(--ink)}
.t-detail{padding:0 4px 10px 14px}
.t-sources{margin:0;display:grid;gap:2px}.t-sources div{display:grid;grid-template-columns:7em minmax(0,1fr);gap:8px}
.t-sources dt{font-weight:600;color:var(--muted)}.t-sources dd{margin:0}
/* the disclosures drawn as rows keep a marker that says open or closed (D183) */
:is(.result-problem,.sol-open,.unit-more,.reveal-confirm,.topic-list details,.test-list details)>summary::after{content:"\25BE";margin-left:6px;
  font-size:.8em;color:var(--blue)}
:is(.result-problem,.sol-open,.unit-more,.reveal-confirm,.topic-list details,.test-list details)[open]>summary::after{content:"\25B4"}
:is(.result-problem,.sol-open,.unit-more,.reveal-confirm,.test-list details)>summary::-webkit-details-marker{display:none}
.lc-sections .side-sub>li{background:none!important;padding:2px 0 2px 14px!important}.lc-sections .side-sub>li::before{content:none!important}
/* the Rounds page (D185): Continue your round first; Source and Format as two labeled rows of choices, always in view,
   wrapping on a phone; the other filters on demand; one compact row per round with a text source label */
.how-rounds{margin:0 0 10px}.how-rounds summary{cursor:pointer;color:var(--blue);font-weight:600;min-height:44px;display:flex;
  align-items:center;width:max-content;max-width:100%}
.how-rounds p{margin:4px 0;max-width:72ch}
.continue-rounds{border:2px solid var(--blue)}.continue-rounds .round-list{margin-top:4px}
.round-selectors{display:flex;flex-wrap:wrap;gap:6px 24px;margin:8px 0}
.sel-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.sel-label{font-size:13px;font-weight:700;color:var(--muted);min-width:4.5em}
a.sel{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border:1px solid var(--line);border-radius:999px;
  background:var(--card);text-decoration:none;font-weight:600}
a.sel[aria-current]{background:var(--blue);border-color:var(--blue);color:#fff}
.round-filters{margin:4px 0 6px}
.rf-search{display:flex;flex-wrap:wrap;align-items:flex-end;gap:6px 10px}.rf-search label{flex-basis:100%}
.rf-search input{min-height:44px;flex:1 1 14em;max-width:26em}.rf-search button{min-height:44px}
.more-filters{margin:8px 0 0}.more-filters>summary{cursor:pointer;color:var(--blue);font-weight:600;min-height:44px;display:flex;
  align-items:center;width:max-content}
.rf-groups{display:flex;flex-wrap:wrap;gap:8px 18px;margin:4px 0 10px}
.rf-groups fieldset{border:1px solid var(--line);border-radius:10px;padding:6px 12px;margin:0}
.rf-groups legend{font-weight:700;font-size:14px;padding:0 4px}
.rf-groups label.check{min-height:36px;margin:0;font-size:15px}
.rf-years{max-width:100%}.rf-years label.check{display:inline-flex;margin-right:10px}
.chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:6px 0}
a.chip.chip-x{display:inline-flex;align-items:center;gap:6px;min-height:36px;text-decoration:none}
.rf-count{margin:4px 0 6px}
.round-list{list-style:none;margin:0;padding:0}
.round-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 14px;padding:10px 4px;
  border-bottom:1px solid var(--line);scroll-margin-top:12px}
.rr-main{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1 1 18em}
.rr-title{font-weight:700;font-size:17px}a.rr-title{text-decoration:none}
.rr-meta,.rr-facts{font-size:14px;color:var(--muted)}.rr-facts{color:var(--ink)}.rr-meta .label{white-space:nowrap}
.round-row .button{min-height:44px;display:inline-flex;align-items:center}
.src{display:inline-block;font-size:12px;font-weight:800;letter-spacing:.03em;border-radius:999px;padding:1px 9px;
  border:1px solid currentColor}
.src-past{color:var(--navy);background:#E9EDF8}.src-lab{color:#1D6F69;background:#E3F4F1}
.notice{background:#F3F5FB;border-left:4px solid var(--blue);border-radius:8px;padding:8px 12px}
.notice .button{margin-left:6px}
.pagination{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:12px 0}
@media (max-width:640px){.sel-row{width:100%}.sel-label{flex-basis:100%;min-width:0}a.sel{padding:0 12px}
  .round-row{flex-wrap:nowrap;align-items:flex-start;gap:10px}.rr-main{flex:1 1 auto}.rr-title{font-size:16px}
  .round-row .button{flex:none;padding:0 14px}}
@media (max-width:360px){a.sel{padding:0 9px;font-size:15px}}
/* the adults' Tests view (the UI review of 2026-10-27): the recent tests, dated, filtered by type with the type's own
   count, each opening on its own score by verdict, its time recorded with the questions it covers, and what came after */
span.sel.sel-none{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border:1px dashed var(--line);
  border-radius:999px;color:var(--muted);font-weight:600}
.test-types{margin:6px 0 10px}
.test-list{list-style:none;margin:6px 0 10px;padding:0;border-top:1px solid var(--line)}
.test-list>li{border-bottom:1px solid var(--line)}
.test-row>summary{cursor:pointer;display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 12px;min-height:44px;padding:8px 2px}
.test-row>summary:focus-visible{outline:3px solid var(--orange);outline-offset:2px;border-radius:6px}
.tr-when{color:var(--muted);font-size:14px;flex:0 0 9.5em}
.tr-main{flex:1 1 16em;min-width:0;font-weight:600;overflow-wrap:anywhere}
.tr-type{display:inline-block;font-size:12px;font-weight:800;letter-spacing:.03em;border:1px solid currentColor;border-radius:999px;
  padding:0 8px;margin-right:4px;color:var(--navy);background:#E9EDF8}
.tr-score{font-variant-numeric:tabular-nums;font-weight:700;white-space:nowrap}
.tr-facts{margin:0 0 10px;display:grid;gap:4px;padding:0 4px 0 14px;font-size:15px}
.tr-facts>div{display:grid;grid-template-columns:9em minmax(0,1fr);gap:8px}
.tr-facts dt{font-weight:600;color:var(--muted)}.tr-facts dd{margin:0}
.quiz-state{margin:8px 0 0}
@media (max-width:640px){.tr-when{flex-basis:100%}.tr-facts>div{grid-template-columns:minmax(0,1fr);gap:0}}
/* the adults' main Progress page (the review of 2026-10-27, U1): the scope said once, then one compact row per student,
   each cell a short list of labelled facts; the topics by category and every version's reading in named disclosures */
.roster-scope{margin:4px 0 0;font-size:15px}
.roster-table td{vertical-align:top}
.roster-name{font-weight:700;font-size:17px}
.roster-facts{list-style:none;margin:0;padding:0}
.roster-facts li{margin:0 0 3px;line-height:1.45}
.rf-k{font-size:12px;font-weight:700;color:var(--muted);letter-spacing:.02em;margin-right:4px}
.rf-k::after{content:":"}
.roster-more>summary{cursor:pointer;color:var(--blue);font-weight:600;min-height:44px;display:flex;align-items:center;
  width:max-content;max-width:100%}
.roster-more>summary:focus-visible{outline:3px solid var(--orange);outline-offset:2px;border-radius:4px}
.roster-reading{list-style:none;margin:6px 0 0;padding:0}
.roster-reading>li{padding:6px 0;border-top:1px solid var(--line)}.roster-reading p{margin:2px 0}
@media (max-width:640px){.roster-table td{padding:3px 0}.roster-table td[data-label]::before{display:block}
  .roster-table td[data-label="Student"]::before{display:none}}
/* The student introduction (D294): the public video page, one player, the phone or wider-screen video, always within
   the column's width and most of the screen's height, its shape kept (D295); and the one offer on a student's Home */
.welcome{max-width:760px}.welcome-lead{margin-top:0}
.welcome-views{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.welcome-views a{font-weight:600;padding:6px 14px;border:1px solid var(--line);border-radius:999px;background:#fff;text-decoration:none}
.welcome-views a[aria-current]{background:var(--blue);border-color:var(--blue);color:#fff}
.welcome-video{margin:0 0 14px}
.welcome-video video{display:block;height:auto;max-width:100%;margin:0 auto;background:var(--navy);border-radius:10px}
.welcome-wide video{aspect-ratio:16/9;width:min(100%,calc(85vh*16/9));width:min(100%,calc(85svh*16/9))}
.welcome-phone video{aspect-ratio:9/16;width:min(100%,360px,calc(80vh*9/16));width:min(100%,360px,calc(80svh*9/16))}
.welcome-transcript h2{margin-top:12px}.welcome-transcript p{margin:2px 0 8px}
.welcome-next .button{margin:0 6px 6px 0}
.intro-card{display:flex;flex-direction:column;gap:6px;max-width:560px}.intro-card p{margin:0}
.intro-card form{display:flex;flex-wrap:wrap;gap:8px;margin:2px 0 0}

/* Teacher/admin notes: escaped text, readable at small widths, with explicit acknowledgement. */
.teacher-note-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; max-width: 70ch; }
.teacher-note-form fieldset { display: grid; gap: .75rem; margin-bottom: 1.2rem; min-width: 0; }
.teacher-note-form select, .teacher-note-form textarea { display: block; width: 100%; max-width: 100%; box-sizing: border-box; }
.teacher-note-form textarea { margin-top: .5rem; font: inherit; padding: .75rem; }
.teacher-note-form > button { margin-top: .5rem; }
.note-edit-return { margin-top: .75rem; }
.teacher-note-form .note-audience-choice { display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: .6rem; min-height: 44px; }
.teacher-note-form .note-audience-choice input { width: 1.1rem; height: 1.1rem; margin: 0; flex: 0 0 auto; }
.home-notes-entry { margin: .5rem 0 1rem; }
.home-notes-entry .button { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; }
.note-count { font-size: .85rem; font-weight: 700; background: #e8ebf6; border-radius: 1rem; padding: .15rem .55rem; }
.note-inbox-list { overflow-wrap: anywhere; }
/* Notes and Community use the Help shell; its ordinary link colors must not hide primary button labels (D322). */
.jla-kb a.button:not(.secondary) { color: #fff; }
.note-inbox-list > li { padding: 0; margin: .6rem 0; border-color: #ccd4e6; }
.note-row { display: block; min-height: 44px; padding: .9rem 1rem; color: #192055; text-decoration: none; }
.note-row:hover, .note-row:focus-visible { background: #f7f8fd; }
.note-row-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; }
.note-row-state { font-size: .8rem; background: #e8ebf6; border-radius: 1rem; padding: .15rem .55rem; }
.note-row-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: .35rem 0; line-height: 1.4; }
.note-row-meta { display: block; font-size: .78rem; color: #475569; }

/* Communication: plain text with locally rendered MathML, contained at phone widths. */
.communication-body { line-height: 1.6; overflow-wrap: anywhere; min-width: 0; max-width: 100%; }
.teacher-note-body.communication-body, .kb-support-message.communication-body { white-space: normal; }
.communication-math-inline { display: inline-block; max-width: 100%; overflow-x: auto; vertical-align: middle; }
.communication-math-display { display: block; max-width: 100%; overflow-x: auto; padding: .6rem .2rem; }
.communication-preview { border: 1px solid #ccd4e6; border-radius: 8px; background: #f7f8fd; padding: 1rem; margin-top: .7rem; }
.communication-tools { margin: .5rem 0 1rem; }
.communication-tools details { margin: .5rem 0; }
.communication-tools summary { color: #3548a8; cursor: pointer; min-height: 32px; }
.communication-tools button[data-communication-preview] { background: white; color: #3548a8; border: 1px solid #3548a8; }
.communication-tools code { overflow-wrap: anywhere; }
.communication-insertions:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .5rem 0; min-width: 0; }
.communication-insert-label { flex-basis: 100%; font-size: .85rem; font-weight: 600; margin-right: .1rem; }
.communication-tools .communication-insertions button { min-width: 44px; min-height: 44px; max-width: 100%; margin: 0; padding: .5rem .7rem; font-size: .9rem; background: white; color: #3548a8; border: 1px solid #8e9bb9; }
.communication-tools .communication-insertions button:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.communication-tools .communication-insertions button:hover { background: #eef1f8; color: #3548a8; border-color: #3548a8; }
.communication-insert-hint { flex-basis: 100%; font-size: .8rem; color: #475569; line-height: 1.4; }
.community { max-width: 850px; margin: 0 auto; }
.community-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.community-heading h1 { margin-top: 0; }.community-heading .eyebrow { margin-bottom: .2rem; }
.community-heading h2 { margin: .5rem 0; }
.community-rules { margin: 1rem 0; font-size: .9rem; }
.community-rules summary { color: #3548a8; cursor: pointer; }
.community-rules p { max-width: 70ch; }
.community-messages { border-top: 1px solid #ccd4e6; margin: 1rem 0; }
.community-post { padding: 1.1rem .3rem; border-bottom: 1px solid #ccd4e6; scroll-margin-top: 1rem; }
.community-post-meta { display: flex; flex-wrap: wrap; gap: .25rem .8rem; align-items: baseline; margin-bottom: .6rem; }
.community-post-meta > span { font-size: .78rem; color: #475569; }
.community-post-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; margin-top: .6rem; font-size: .85rem; }
.community-post-actions a, .community-post-actions summary { padding: .45rem 0; min-height: 32px; }
.community-post-actions details { max-width: 100%; }.community-post-actions form { margin-top: .3rem; }
.community-staff { margin: .6rem 0; font-size: .85rem; }
.community-staff summary { cursor: pointer; }
.community form textarea, .community form input:not([type=hidden]), .community form select { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; }
.community textarea { display: block; font: inherit; padding: .7rem; margin-top: .35rem; border-radius: 7px; border: 1px solid #8e9bb9; }
.community form label { margin-top: .7rem; }
.community form button { margin-top: .6rem; }
.community-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; margin: .6rem 0 1rem; }
.community-search > div { flex: 1 1 180px; }
.community-form-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.community-empty { padding: 1.2rem 0; color: #475569; }
.community-topics > li { padding: 0; }.community-topic-row { display: block; padding: .9rem 1rem; text-decoration: none; }
.community-topic-row h3 { font-size: 1.05rem; line-height: 1.4; margin: 0 0 .4rem; }
.community-topic-row p { margin: .25rem 0 0; }.topic-title { overflow-wrap: anywhere; }
.community-topic-action { display: grid; gap: .3rem; margin-bottom: 1rem; }
@media(max-width: 480px) { .community-composer { padding: 1rem; }.community-heading .button { width: 100%; text-align: center; }.home-notes-entry { display:flex; flex-wrap:wrap; gap:.5rem; } }
/* a system of equations, one to a row, the equals signs lined up (D306; render.aligned: rows of inline math laid out as a table) */
.system{display:table;border-collapse:collapse;margin:0.6em auto}.system .sys-row{display:table-row}
.system .sys-cell{display:table-cell;padding:0.12em 0;vertical-align:baseline}
.system .sys-cell:first-child{text-align:right;padding-inline-end:0.15em}.system .sys-cell:last-child{text-align:left}

/* Student clarity: reading and approved core participation stay visible at phone widths. */
.unit-card .unit-reading-label{margin:.5rem 0 .15rem;line-height:1.45}
.unit-card .unit-core-summary,.unit-card .unit-component-note{margin:.45rem 0;line-height:1.45}
.unit-card .unit-more{display:block}
.unit-core-items{overflow-wrap:anywhere}
.unit-core-items a,.lc-core-practice a{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:2px 5px;
  margin:2px 0;border:1px solid var(--line);border-radius:8px;background:#fff;text-decoration:none;font-variant-numeric:tabular-nums}
.lc-core-practice details{margin:.4rem 0}.lc-core-practice summary{min-height:44px;cursor:pointer;color:var(--blue)}

/* Private questions and reports (D380) and the one-tap content feedback (D381): readable at phone width, every control
   at least 44px tall, the pressed vote shown by more than colour. */
.questions .question-privacy{margin:.4rem 0 .8rem}
.jla-kb .question-list{padding-left:0;overflow-wrap:anywhere}.question-list>li{padding:0;margin:.6rem 0;border-color:#ccd4e6}
.question-context ul{margin:.3rem 0;padding-left:1.2rem}.question-context code{overflow-wrap:anywhere}
.question-form{display:grid;gap:.35rem}.question-form textarea,.question-form select{box-sizing:border-box;width:100%;max-width:100%;min-width:0}
.question-form textarea{font:inherit;padding:.7rem;border-radius:7px;border:1px solid #8e9bb9}
.question-form button,.question-actions button{min-height:44px}
.question-messages{display:grid;gap:.6rem;margin:1rem 0}
.question-message{background:#fff;border:1px solid var(--line);border-radius:10px;padding:.7rem 1rem;overflow-wrap:anywhere}
.question-message.from-staff{border-left:4px solid var(--blue)}
.question-message-head{margin:0 0 .3rem;font-size:14px;color:var(--muted)}
.question-withheld,.question-held{border-left:4px solid var(--orange)}
.question-actions form{display:flex;flex-wrap:wrap;gap:.6rem}
.question-statement,.question-figure{overflow-x:auto}.question-paper-page{max-width:100%;height:auto}
.question-links{margin:.8rem 0}.question-links a{display:inline-flex;align-items:center;min-height:44px}
.feedback{margin:1rem 0;padding:.6rem 0;border-top:1px solid var(--line)}
.feedback-row{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin:0}
.feedback-prompt{font-weight:600}.feedback-buttons{display:inline-flex;gap:.5rem}
.feedback-buttons button{min-height:44px;min-width:72px}
.feedback-buttons button[aria-pressed="true"]{background:var(--blue);color:#fff;border-color:var(--blue);font-weight:700}
.feedback-buttons button[aria-pressed="true"]::after{content:" ✓"}
.feedback-buttons button:focus-visible,.feedback-reason input:focus-visible{outline:3px solid var(--orange);outline-offset:2px}
.feedback-reasons{border:1px solid var(--line);border-radius:10px;margin:.6rem 0 0;padding:.5rem .8rem}
.feedback-reason{display:inline-flex;flex-direction:row;align-items:center;gap:.35rem;min-height:44px;margin-right:.8rem;font-weight:500;color:var(--ink)}
.feedback-reason-actions{display:flex;flex-wrap:wrap;gap:1rem;align-items:center}
.feedback-saved[data-state="saved"]{color:var(--green);font-weight:600}.feedback-saved[data-state="unsaved"]{color:var(--ink)}
.lesson-foot{margin-top:1.4rem}
.feedback-totals{border-collapse:collapse;width:100%;font-size:14px}
.feedback-totals th,.feedback-totals td{border-bottom:1px solid var(--line);padding:.4rem .5rem;text-align:left;vertical-align:top}
.jla-kb .feedback-totals tbody th{background:#fff;color:var(--ink);font-weight:700}.feedback-version{font-weight:400;color:var(--muted)}
.feedback-totals .feedback-open{display:block;margin-top:.25rem;font-weight:400}
.feedback-totals .feedback-problem{margin-top:.35rem;font-weight:400}.feedback-totals .feedback-problem summary{cursor:pointer;min-height:32px}
.feedback-totals .feedback-problem .question-statement{margin:.4rem 0}
@media(min-width:641px){.feedback-totals tbody th{min-width:13rem}}
@media(max-width:640px){.feedback-totals thead{display:none}.feedback-totals tr{display:block;border:1px solid var(--line);
  border-radius:10px;margin:.6rem 0;background:#fff}.feedback-totals th,.feedback-totals td{display:block;border:0}
  .feedback-totals td::before{content:attr(data-label) ": ";font-weight:600}}
