header button{background:transparent;color:#fff;padding:5px 8px;font-size:14px}header #identity{flex:1}.remember{display:flex;align-items:center;gap:8px}.remember input{width:auto}details>summary{cursor:pointer;padding:14px 0}.exercise-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.exercise-heading h1{font-size:28px}#question-area{position:relative;min-height:180px;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#fff;border:1px solid #d8e1e3;border-radius:15px;padding:32px 20px;overflow:hidden}#question{font-size:clamp(42px,7.5vw,81px);text-align:center;white-space:pre-wrap;overflow-wrap:anywhere}#question-image{max-width:100%;max-height:45vh;object-fit:contain}#ink{position:absolute;inset:0;width:100%;height:100%;touch-action:none;z-index:2}#axis{width:100%}#axis svg{width:100%;min-height:100px;overflow:visible}.choices{display:flex;flex-wrap:wrap;gap:10px;margin:15px 0}#feedback{font-size:20px;min-height:30px}.user-tile{display:flex;gap:5px}.user-tile .card{flex:1}.user-tile .forget{background:transparent;color:#61727b;padding:6px}#users{margin-bottom:20px}[hidden]{display:none!important}#answer{grid-template-columns:1fr auto}#answer input{font-size:36px}@media(max-width:600px){body.workspace header{gap:8px;padding:12px}.exercise-heading{align-items:flex-start}body.workspace main{margin-top:15px;padding:0 14px}#question-area{padding:20px 12px}#answer{grid-template-columns:1fr}#question{font-size:48px}}
#question-instruction{font-size:clamp(18px,2.5vw,22px);line-height:1.5;text-align:center;max-width:48rem;margin:0 0 16px;overflow-wrap:anywhere}

#fraction-view{width:100%;max-width:760px}#fraction-view svg{display:block;width:100%;max-height:48vh}.math-step{font-size:1.5rem;white-space:pre-wrap}#hint-panel{margin:1rem 0;line-height:1.6}
body.workspace .pin-loss-warning.recoverable{border-color:#9ab6bd;background:#eff6f6;color:#173c4c}
body.workspace .pin-loss-warning.recoverable strong,body.workspace .pin-loss-warning.recoverable p{color:#173c4c}

.fraction-choices,.fraction-targets,.fraction-order{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}.fraction-pairs{display:grid;grid-template-columns:1fr 1fr;gap:24px}.fraction-pairs>div,.fraction-fields{display:grid;gap:12px}.fraction-pairs button,.fraction-order button,.fraction-targets button,.fraction-fields button{background:#edf4f4;color:#173c4c;border:2px solid #b6cbd0}.fraction-task [aria-pressed="true"],.fraction-task .paired{background:#d5e7ef;border-color:#2b7694}.fraction-fields input{max-width:100%}.fraction-task math{font-size:clamp(39px,7.5vw,69px);padding:16px;overflow-x:auto}.fraction-task svg text{font-size:66px}.fraction-pairs button{overflow-wrap:anywhere;font-size:33px}#fraction-view [role="slider"]{cursor:crosshair;outline-offset:4px}@media(max-width:600px){.fraction-pairs{gap:12px}.fraction-pairs button{padding:12px 8px;font-size:27px}}

body.workspace .pin-help{max-width:48rem;margin:12px 0;border-top:1px solid #d8e1e3;border-bottom:1px solid #d8e1e3}
body.workspace .pin-help>summary{padding:12px 4px;color:#24576a;font-size:1rem;font-weight:600}
body.workspace .pin-help>summary:focus-visible{outline:2px solid #24576a;outline-offset:3px;border-radius:4px}
body.workspace .pin-help-body{padding:0 4px 12px;line-height:1.55}
body.workspace .pin-help-body p{margin:0 0 12px;font-size:1rem}
body.workspace .pin-start-info{max-width:48rem;line-height:1.55;color:#425d67}
body.workspace .pin-help-body .pin-start-info{margin-bottom:0;padding-top:12px;border-top:1px solid #d8e1e3}

/* BEGIN 2026-10-18: fast exercises and completed session in one desktop viewport. */
#test-results{background:#edf3f2;border:1px solid #cadbd8;border-radius:16px;padding:16px;min-width:0;display:flex;flex-direction:column;gap:12px}
#test-results h2{font-size:22px;margin:0}#results-notice{font-size:14px;line-height:1.45;margin:0;color:#47636a}
#results-summary{display:grid;grid-template-columns:1fr 1fr;gap:8px}#results-summary:empty{display:none}
#results-summary>div{padding:10px;background:#fff;border-radius:9px;display:flex;flex-direction:column;gap:3px;min-width:0}
#results-summary span{font-size:12px;color:#47636a}#results-summary strong{font-size:22px;font-variant-numeric:tabular-nums}
#results-table-wrap{min-height:0;overflow:auto;flex:1}#results-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:14px}
#results-table th,#results-table td{padding:7px 5px;vertical-align:top;overflow-wrap:anywhere;border-bottom:1px solid #cadbd8}
#results-table thead th{position:sticky;top:0;background:#edf3f2;text-align:left;font-size:12px}
#results-table th:first-child{width:9%}#results-table th:last-child{width:20%}#results-table td:last-child{font-variant-numeric:tabular-nums;white-space:nowrap}
#results-table small{display:inline;margin-left:3px;color:#47636a;font-size:13px}#results-table .result-correct td:nth-child(3)>span{color:#1e624b}#results-table .result-wrong td:nth-child(3)>span{color:#a22d32;font-weight:700}
#results-pages{display:flex;align-items:center;justify-content:space-between;gap:8px}#results-pages button{padding:8px 12px;font-size:14px}#results-page{font-size:13px;white-space:nowrap}
body.speed-workspace #message:empty,body.speed-workspace main>.registration-link{display:none}
body.speed-workspace .exercise-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(310px,1fr);gap:18px}
body.speed-workspace .exercise-work{min-width:0}body.speed-workspace #feedback:empty,body.speed-workspace #hint-panel:empty,body.speed-workspace #review:empty,body.speed-workspace #choices:empty{display:none}
body.speed-workspace #start{grid-template-columns:repeat(auto-fit,minmax(110px,1fr));padding:12px;margin:0;gap:10px}
body.speed-workspace #start label{font-size:14px}body.speed-workspace #start input,body.speed-workspace #start select{padding:9px}
body.speed-workspace #start button{padding:10px}body.speed-workspace #counter{margin:8px 0;font-size:15px;color:#47636a}
body.speed-workspace #answer{padding:12px;margin:12px 0 0;gap:12px}body.speed-workspace #answer label{font-size:14px}
body.speed-workspace #answer input{font-size:42px;padding:10px}body.speed-workspace #answer button{align-self:end}
body.speed-workspace #feedback{margin:8px 0;min-height:0;font-size:18px}body.speed-workspace #next{margin-top:12px}
@media(min-width:900px) and (min-height:600px){
 body.speed-workspace{height:100dvh;min-height:0;display:flex;flex-direction:column}
 body.speed-workspace header{padding:10px 24px;flex-shrink:0}
 body.speed-workspace main{max-width:none;width:100%;margin:0;padding:12px 24px 20px;flex:1;min-height:0;display:flex;flex-direction:column;box-sizing:border-box}
 body.speed-workspace #message{margin:0 0 8px;flex-shrink:0}
 body.speed-workspace #exercise-panel{display:flex;flex-direction:column;flex:1;min-height:0}
 body.speed-workspace .exercise-heading{flex-shrink:0;margin-bottom:12px}
 body.speed-workspace .exercise-heading h1{margin:0;font-size:26px}body.speed-workspace .exercise-heading button{padding:10px 14px}
 body.speed-workspace .exercise-heading .module-add{font-size:13px}
 body.speed-workspace .exercise-layout{flex:1;min-height:0}
 body.speed-workspace .exercise-work{display:flex;flex-direction:column;min-height:0}
 body.speed-workspace .exercise-work>*{flex-shrink:0}
 body.speed-workspace #question-area{flex:1;min-height:0;padding:16px}
 body.speed-workspace #question-image{min-height:0;max-height:70%;flex-shrink:1}
 body.speed-workspace #test-results{min-height:0}
}
@media(max-width:899px),(max-height:599px){body.speed-workspace .exercise-layout{grid-template-columns:1fr}#test-results{margin-top:16px}#results-table-wrap{max-height:440px}}
/* END 2026-10-18 */

/* BEGIN 2026-10-18: own statistics remain available without leaving an exercise. */
header #sign-out{border:1px solid #80979f;border-radius:7px;white-space:nowrap}header #my-statistics,header #logout{white-space:nowrap}
#statistics-dialog{width:min(920px,calc(100% - 24px));max-height:85dvh;padding:24px;border:1px solid #c4d5d4;border-radius:18px;background:#faf7ee;color:#102a36;box-shadow:0 16px 70px #071b2a55}
#statistics-dialog::backdrop{background:#071b2a99}#statistics-dialog[open]{display:flex;flex-direction:column;gap:14px}
.statistics-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.statistics-heading h2{margin:0;font-size:26px}.statistics-heading button{font-size:14px;padding:9px 15px}
#statistics-person{font-size:19px;font-weight:600;margin:0}#statistics-description,#statistics-status{margin:0;line-height:1.5;font-size:15px;color:#47636a}
#statistics-status:empty{display:none}#statistics-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}#statistics-summary:empty{display:none}
#statistics-summary>div{padding:14px;border:1px solid #cadbd8;border-radius:10px;background:#edf3f2;display:flex;flex-direction:column;gap:4px}
#statistics-summary span{font-size:14px;color:#47636a}#statistics-summary strong{font-size:27px;font-variant-numeric:tabular-nums}
#statistics-table-wrap{min-height:0;overflow:auto}#statistics-table-wrap table{font-size:15px}#statistics-table-wrap th,#statistics-table-wrap td{padding:12px 10px}
#statistics-table-wrap thead th{background:#faf7ee;position:sticky;top:0;z-index:1}#statistics-table-wrap tbody th{font-weight:500}#statistics-table-wrap td{font-variant-numeric:tabular-nums}
#statistics-retry{align-self:flex-start}#statistics-dialog>*:not(#statistics-table-wrap){flex-shrink:0}
@media(max-width:700px){header #identity{min-width:100px}#statistics-dialog{padding:14px;gap:10px}.statistics-heading h2{font-size:22px}#statistics-summary{gap:6px}#statistics-summary>div{padding:9px}#statistics-summary span{font-size:12px}#statistics-summary strong{font-size:22px}#statistics-table-wrap table{font-size:13px}#statistics-table-wrap th,#statistics-table-wrap td{padding:8px 5px;overflow-wrap:anywhere}#statistics-table-wrap th:first-child{min-width:90px}#statistics-table-wrap td:last-child{min-width:100px}}
/* END 2026-10-18 */

#competition-note{font-size:14px;color:#47636a;margin:8px 0 0}
#start input[readonly]{background:#edf3f2;color:#102a36}

/* BEGIN 2026-10-18: independent paged 25-question session rankings. */
#question-area.ranking-view{padding:14px;align-items:stretch;justify-content:flex-start}
#session-ranking{display:flex;flex-direction:column;gap:8px;min-height:0;height:100%;width:100%}
.ranking-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap}
.ranking-heading h2{font-size:20px;margin:0}.ranking-heading span{font-size:13px;color:#47636a}
#ranking-status{font-size:14px;line-height:1.4;color:#47636a;margin:0}#ranking-status:empty{display:none}
#ranking-table-wrap{flex:1;min-height:0;overflow:auto}#ranking-table{width:100%;table-layout:auto;border-collapse:collapse;font-size:13px;line-height:1.3}
#ranking-table th,#ranking-table td{padding:8px 5px;vertical-align:middle;border-bottom:1px solid #dbe5e3}
#ranking-table thead th{font-size:12px;background:#edf3f2;text-align:left;white-space:nowrap}
/* Let content determine column proportions; keep dates and numbers on one line. */
#ranking-table th:not(:nth-child(3)),#ranking-table td:not(:nth-child(3)){white-space:nowrap}
#ranking-table th:nth-child(3){min-width:8ch}
#ranking-table tbody tr{height:50px}
#ranking-table td{font-variant-numeric:tabular-nums}#ranking-table .ranking-person{display:block;width:max-content;max-width:clamp(8rem,18vw,20rem);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#ranking-table td:nth-child(7),#ranking-table td:nth-child(8){white-space:nowrap}
#ranking-table tr.current-session{background:#d8eee5;font-weight:600;box-shadow:inset 3px 0 #2d7055}
#ranking-pages{display:flex;align-items:center;justify-content:space-between;gap:6px}#ranking-pages button{font-size:13px;padding:7px 9px}#ranking-page{font-size:13px;white-space:nowrap}
#results-summary .session-rank{grid-column:1/-1;flex-direction:row;justify-content:space-between;align-items:center}
#results-summary .session-rank strong{font-size:20px}
@media(max-width:899px),(max-height:599px){#ranking-table-wrap{max-height:390px}#ranking-table{min-width:500px}}
/* END 2026-10-18 */

/* Negative numbers: read before advancing, no hidden overflowing explanation. */
.negative-goals{grid-column:1/-1;border:0;padding:0;margin:0;display:flex;gap:8px;flex-wrap:wrap}.negative-goals legend{font-size:15px;margin-bottom:8px}.negative-goals button{padding:8px 18px!important}.negative-goals [aria-pressed="true"]{outline:3px solid #608f7d;outline-offset:2px}
.negative-feedback{width:100%;max-width:58rem;font-size:clamp(16px,1.4vw,20px);line-height:1.5}.negative-feedback h2{font-size:23px;margin:0}.negative-feedback p{margin:12px 0}.negative-feedback .negative-answer{font-size:clamp(24px,2.4vw,36px);overflow-wrap:anywhere}.negative-rule{background:#e3eee9;border-left:4px solid #497b67;padding:10px}.negative-actions{display:flex;gap:12px;margin-top:12px;justify-content:space-between}.negative-actions button{font-size:16px;padding:10px 16px}#negative-stop{background:transparent;color:#355962;border:1px solid #839d9c}#question-area.negative-explaining{justify-content:flex-start;overflow:auto}#results-summary .negative-marks{font-size:32px;letter-spacing:3px;overflow-wrap:anywhere;color:#214f42}#results-summary>p{grid-column:1/-1;margin:8px 0;line-height:1.5}.negative-history-wrap{overflow:auto}.negative-history{font-size:14px;white-space:nowrap}.negative-history td{padding:8px!important}

.fraction-task{min-width:0;overflow-x:auto}.fraction-fields input{font-size:36px}.fraction-choices button,.fraction-order button,.fraction-targets button{font-size:1.5em}

/* BEGIN 2026-10-20: small header control and a full-viewport, readable QR card. */
body.workspace>header{flex-wrap:wrap}
.app-header-tools{display:flex;align-items:center;gap:8px;margin-left:auto;flex-shrink:0}
#student-qr{width:44px;min-height:44px;padding:6px;border:1px solid #b9c9cf;font-weight:650}
#student-qr:focus-visible,#app-language:focus-visible{outline:3px solid #dfbd75;outline-offset:3px}
#app-language{width:70px;min-height:44px;background:#102a36;color:#fff;border-color:#b9c9cf;font-size:14px;padding:6px}
body.student-qr-open{overflow:hidden}
#student-qr-dialog{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;border:0;border-radius:0;padding:16px;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:#fff;color:#102a36;overflow:auto}
#student-qr-dialog[open]{display:flex;flex-direction:column;gap:12px}
#student-qr-dialog::backdrop{background:#fff}
.student-qr-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}
.student-qr-heading h2{font:600 clamp(18px,3vw,24px)/1.2 system-ui;margin:0}
.student-qr-heading button{min-height:44px;padding:8px 16px}
.student-qr-content{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;flex-direction:column}
[data-qr-status]{text-align:center;max-width:34rem;margin:0}
[data-qr-status]:empty{display:none}
[data-qr-image]{width:min(100%,calc(100vh - 180px));width:min(100%,calc(100dvh - 180px));max-height:100%;aspect-ratio:1;flex-shrink:1}
[data-qr-image] svg{display:block;width:100%;height:100%;background:#fff}
[data-qr-name]{flex-shrink:0;text-align:center;font-size:clamp(20px,4vw,32px);font-weight:650;line-height:1.2;overflow-wrap:anywhere;margin:0}
@media(max-width:600px){body.workspace>header #menu{max-width:calc(100% - 135px);text-align:left}body.workspace>header .app-header-tools{order:-1}body.workspace>header #menu{order:-2}body.workspace>header #identity{flex-basis:100%;overflow-wrap:anywhere}}
/* END 2026-10-20 */

/* 2026-10-30: existing arithmetic categories, compact and keyboard accessible. */
.learning-categories{grid-column:1/-1;border:1px solid #8aa4aa;border-radius:8px;padding:12px}.learning-categories>div{display:flex;flex-wrap:wrap;gap:10px 20px}.learning-categories label{display:flex!important;align-items:center;gap:8px}.learning-categories input{width:20px!important;height:20px!important;min-height:20px!important}.learning-categories button{font-size:14px;margin-top:10px}

/* 2026-11-12: compact pupil access strip and a single contextual detail panel. */
body.workspace header{padding:12px 20px;gap:16px;flex-wrap:wrap}
header #menu,header #identity{font-size:20px;line-height:1.3}
header #identity{font-weight:600;min-width:3rem}
header #logout,header #sign-out{font-size:17px;line-height:1.3}
/* BEGIN 2026-11-28: separate event codes and catalogue above the pupil's access tiles. */
#dashboard-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 20px;margin:8px 0 14px}
#dashboard-toolbar h1{font-size:26px;margin:0}
#dashboard-actions{display:flex;align-items:stretch;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin-left:auto}
#dashboard-actions button,#dashboard-actions .button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:9px 14px;font-size:15px;line-height:1.3;text-align:center;text-decoration:none}
#browse-access{background:transparent;color:#102a36;border:1px solid #78959f}
#dashboard-actions :focus-visible{outline:2px solid #102a36;outline-offset:3px}
#access-strip{display:flex;align-items:flex-start;gap:12px;min-height:133px;background:#fff;border:1px solid #bdcaca;border-radius:12px;padding:14px;box-sizing:border-box}
#modules{display:flex;flex:1;flex-wrap:wrap;gap:8px;min-width:0}
#modules .access-icon{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:7px;flex:0 0 104px;width:104px;min-height:103px;padding:8px 4px;border:2px solid transparent;border-radius:9px;background:transparent;color:#102a36;text-align:center;box-sizing:border-box}
#modules .access-icon strong{font:600 14px/1.2 system-ui,sans-serif;overflow-wrap:anywhere}
#modules .module-icon{width:48px;height:48px;object-fit:contain;flex-shrink:0}
#modules .access-icon.selected{background:#edf4f6;border-color:#8daeb8}
#modules .access-icon:focus-visible{outline:2px solid #102a36;outline-offset:2px}
@media(max-width:700px){#dashboard-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}#dashboard-actions button,#dashboard-actions .button{min-width:0}}
/* END 2026-11-28 */
#access-info{display:flex;align-items:center;gap:20px;justify-content:space-between;min-height:100px;padding:14px 18px;margin-top:12px;background:#edf4f6;border-radius:10px;box-sizing:border-box}
#access-description{min-width:0;overflow-wrap:anywhere}
#access-description>strong{display:block;font-size:19px;margin-bottom:6px}
#access-description>p{margin:3px 0;font-size:15px;line-height:1.4}
#access-actions{display:flex;flex-direction:column;align-items:center;gap:4px;flex-shrink:0}
#access-open{min-width:100px}
#event-panel{margin-top:16px}
@media(max-width:600px){body.workspace header{padding:10px 12px;gap:8px}header #menu,header #identity{font-size:18px}header #logout,header #sign-out{font-size:16px}#access-strip{gap:4px;padding:8px}#modules{gap:4px}#modules .access-icon{flex-basis:88px;width:88px}#access-info{align-items:flex-start;flex-direction:column;gap:12px;padding:12px}#access-actions{flex-direction:row;flex-wrap:wrap}}

/* 2026-11-12: mode and level are one-click radio groups, including fractions. */
.radio-backing{display:none!important}
.exercise-options{min-width:0;margin:0;border:1px solid #a9bec5;border-radius:5px;padding:.4rem .65rem .6rem}
.exercise-options legend{font-weight:600;padding:0 .25rem}
.exercise-options-choices{display:flex;flex-wrap:wrap;gap:.5rem .85rem}
.exercise-options-choices label{display:inline-flex;align-items:center;gap:.3rem;cursor:pointer;margin:0;white-space:nowrap}
body.workspace #start .exercise-options-choices input{appearance:auto;position:static;opacity:1;width:16px;height:16px;min-height:0;padding:0;margin:0;accent-color:#12313d;flex:none}
.exercise-options-choices span{font-weight:400}
.exercise-options-choices input:focus-visible{outline:2px solid #176b91;outline-offset:2px}
.exercise-options-choices input:disabled+span{opacity:.5;cursor:default}
body.workspace #start{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
#start .exercise-options[data-option=mode]{flex:0 0 auto}
#start .exercise-options[data-option=level]{flex:0 1 auto}
#start>button{flex:none;min-width:90px;align-self:stretch;margin-top:.75em}
#learning-step-count{display:flex;align-self:stretch;align-items:center;justify-content:center;flex:none;min-width:2.5em;margin-top:.75em;font-weight:600;font-variant-numeric:tabular-nums}
#start>label:has([name=count][readonly]){display:none}
#start .learning-categories,#start .negative-goals{flex-basis:100%}
#learning-progress-state{margin:.5rem 0}

/* BEGIN 2026-11-29: complete geometry and hints remain in normal page flow. */
body.katy-workspace{height:auto;min-height:100dvh}
body.katy-workspace main{flex:none}
body.katy-workspace #question-area{flex:none;justify-content:flex-start;overflow:visible;padding:18px;gap:12px}
body.katy-workspace #question{font-size:clamp(20px,2.3vw,26px);line-height:1.4}
body.katy-workspace #fraction-view{max-width:760px}
body.katy-workspace #fraction-view svg{height:clamp(220px,38vw,360px)!important;min-height:220px;max-height:none}
body.katy-workspace #fraction-view p{margin:10px 0;line-height:1.5}
body.katy-workspace #answer input{font-size:26px;padding:10px;width:100%;box-sizing:border-box}
body.katy-workspace #answer{grid-template-columns:minmax(0,1fr) auto}
body.katy-workspace .negative-feedback svg{max-width:100%}
@media(max-width:600px){body.katy-workspace #question-area{padding:14px 10px}body.katy-workspace #answer{grid-template-columns:1fr}body.katy-workspace #fraction-view button{font-size:15px;padding:10px}}
/* END 2026-11-29 */
