@layer legacy {

/* teacher.css */
*{box-sizing:border-box}body{margin:0;background:var(--page);color:var(--text);font-family:var(--font);-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit} .topbar{border-bottom:1px solid rgb(var(--brand-rgb)/0.12549);padding: max(22px,env(safe-area-inset-top)) 24px 20px}.topbar-inner{max-width:880px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:24px}.wordmark{display:block;width:174px;height:auto;mix-blend-mode:multiply}.role{font-size:13px;color:var(--action-ink)}main{max-width:880px;margin:auto;padding:30px 24px max(24px,env(safe-area-inset-bottom))}.welcome{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:28px}.greeting{font-size:15px;color:var(--action-ink);margin:0 0 10px}h1{font-size:30px;line-height:1.2;margin:0 0 12px;letter-spacing:-.6px}.hint{font-size:16px;margin:0;color:var(--muted)}.mascot{width:96px;height:96px;object-fit:contain;flex:none}.classes{display:grid;gap:16px}.class-card{width:100%;min-height:102px;display:flex;align-items:center;gap:16px;padding:18px 16px;text-align:left;background:var(--surface);border:1.5px solid rgb(var(--brand-rgb)/0.20784);border-bottom:4px solid rgb(var(--brand-rgb)/0.27059);border-radius:16px;cursor:pointer;transition:background .12s,border-color .12s,transform .12s}.class-card:hover{background:#fff}.class-card:active{transform:translateY(2px);border-bottom-width:2px;margin-top:2px}.class-card:focus-visible{outline:3px solid var(--brand-purple);outline-offset:4px}.class-card[aria-pressed=true]{background:var(--tint-green);border-color:var(--tint-green-edge);border-bottom-color:#6aa783}.class-symbol{width:48px;height:48px;display:grid;place-items:center;flex:none;border-radius:12px;background:var(--brand-tint);color:var(--action-ink);font-size:23px;font-weight:700}.class-copy{flex:1;min-width:0}.class-name{display:block;font-size:21px;font-weight:700;margin-bottom:6px}.subject{display:block;font-size:15px;color:var(--muted)}.arrow{width:28px;height:28px;flex:none;color:var(--forward)}.selection{font-size:14px;color:#315f40;min-height:20px;margin:18px 0 0}.sample{font-size:12px;color:var(--legacy-ink-666,#666);margin:12px 0 0;text-align:center}@media(min-width:650px){.topbar{padding:28px 40px 24px}.wordmark{width:210px}main{padding:48px 40px 32px}.welcome{margin-bottom:36px;max-width:100%}.mascot{width:96px;height:96px}h1{font-size:36px}.classes{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.class-card{min-height:124px;padding:22px 20px}.sample{margin-top:22px}}@media(prefers-reduced-motion:reduce){.class-card{transition:none}}

h1:focus{outline:none}.test-heading{display:flex;align-items:center;gap:18px;margin:0 0 18px}.test-heading h1{font-size:28px;margin:0 0 8px}.icon-button{display:grid;place-items:center;border:0;background:transparent;min-width:48px;min-height:48px;padding:8px;cursor:pointer}.back-arrow{color:var(--danger)}.test-tools{display:flex;justify-content:space-between;align-items:center;min-height:76px;margin-bottom:18px}.add-test{width:48px;height:48px;border:1px solid var(--tint-green-edge);border-bottom:3px solid #8bb89a;border-radius:50%;background:var(--tint-green);color:#315f40;display:grid;place-items:center;cursor:pointer}.add-test svg{width:26px;height:26px}.planning{width:64px;height:64px;object-fit:contain}.test-list{display:grid;gap:16px}.test-tile{background:var(--surface);border:1.5px solid rgb(var(--brand-rgb)/0.18824);border-radius:16px;padding:18px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:14px}.test-copy h2{font-size:21px;margin:0 0 5px;overflow-wrap:anywhere}.draft-label{font-size:12px;color:var(--legacy-ink-666,#666)}.delete-test{width:44px;height:44px;display:grid;place-items:center;background:var(--tint-red);color:var(--danger);border:0;border-radius:50%;cursor:pointer}.delete-test svg{width:19px;height:19px}.test-action{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;min-height:48px;background:transparent;border:0;border-top:1px solid rgb(var(--brand-rgb)/0.09412);padding:12px 0 0;font-size:16px;cursor:pointer;text-align:left}.test-action .arrow{width:24px;height:24px}.ready-action{background:var(--tint-green);border:1px solid var(--tint-green-edge);border-bottom:3px solid #8bb89a;border-radius:12px;padding:10px 12px;color:#315f40}.empty-state{grid-column:1/-1;text-align:center;padding:12px 0 48px}.empty-state img{width:144px;height:144px;object-fit:contain}.empty-state h2{font-size:24px;margin:12px 0}.empty-state p{color:var(--muted);margin:0}.undo-area{min-height:32px;display:flex;align-items:center;justify-content:space-between;font-size:14px;margin-top:16px}.undo-area button{min-height:44px;background:none;border:0;color:var(--action-ink);text-decoration:underline;font:inherit;cursor:pointer}.confirm-dialog{width:calc(100% - 40px);max-width:390px;background:var(--page);color:var(--text);font-family:var(--font);border:1px solid rgb(var(--brand-rgb)/0.25098);border-radius:20px;padding:26px}.confirm-dialog::backdrop{background:#20172c66}.confirm-dialog h2{font-size:24px;margin:0 0 16px}.confirm-dialog p{font-size:15px;line-height:1.5;margin:0 0 18px}.draft-name{font-weight:700}.dialog-actions{display:flex;gap:12px;margin-top:24px}.dialog-actions button{flex:1}.keep{background:transparent;border:1px solid rgb(var(--brand-rgb)/0.31373);border-radius:12px;min-height:48px;font:inherit;cursor:pointer}.solid{border:0;border-bottom:4px solid #81342e;border-radius:12px;min-height:48px;font:inherit;padding:12px;cursor:pointer}.danger{background:var(--danger);color:white}.positive{background:var(--forward);border-bottom-color:#226653;color:var(--on-forward)}.solid:active,.add-test:active,.ready-action:active{transform:translateY(2px)}button:focus-visible{outline:3px solid var(--brand-purple);outline-offset:4px}@media(min-width:650px){.test-heading h1{font-size:34px}.test-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.test-tile{padding:22px}.test-tools{margin-bottom:24px}.planning{width:80px;height:80px}}

/* Larger teacher illustrations sit behind the screen header; cards remain opaque. */
main{position:relative;isolation:isolate;overflow:hidden;min-height:calc(100svh - 83px)}
.welcome{position:relative;min-height:214px;align-items:center;margin-bottom:22px}
.welcome>div{position:relative;z-index:1;max-width:65%}
.welcome .mascot{position:absolute;right:-30px;top:-18px;width:250px;height:250px;opacity:.58;z-index:-1;pointer-events:none;user-select:none}
.test-heading{position:relative;z-index:1}
.test-tools{min-height:130px;align-items:flex-start;padding-top:10px;margin-bottom:18px}
.test-tools .planning{position:absolute;right:-6px;top:8px;width:250px;height:250px;opacity:.58;z-index:-1;pointer-events:none;user-select:none}
.classes,.test-list,.undo-area,.sample{position:relative;z-index:1}
.empty-state img{width:230px;height:230px}
@media(min-width:650px){main{min-height:calc(100svh - 100px)}.welcome{min-height:270px;margin-bottom:30px}.welcome .mascot{width:330px;height:330px;right:-12px;top:-34px;opacity:.58}.test-tools{min-height:182px;padding-top:16px;margin-bottom:24px}.test-tools .planning{width:320px;height:320px;right:8px;top:20px}.empty-state img{width:300px;height:300px}}

/* Shared arrow language: hollow at rest, solid on hover, focus and press. */
.arrow{width:34px;height:34px;color:var(--action-ink)}
.arrow-shape{fill:transparent;stroke:currentColor;stroke-width:3.5;stroke-linejoin:round;transition:fill .14s}
button:hover .arrow-shape,button:focus-visible .arrow-shape,button:active .arrow-shape{fill:currentColor}
.back-arrow{color:var(--action-ink)}
.test-action .arrow{width:32px;height:32px}
.ready-action .arrow{color:var(--forward)}
.danger .arrow,.delete-test .arrow,.tint-red .arrow{color:var(--danger)}
.positive .arrow,.tint-green .arrow{color:var(--forward)}
.test-heading{display:block;text-align:center;min-height:114px;margin-bottom:8px;padding:0 44px}
.test-heading .go-back{position:absolute;left:0;top:16px}
.test-heading h1{font-size:36px;line-height:1.2;margin-bottom:10px}
.test-heading .hint{font-size:22px;color:var(--text);line-height:1.35}
.test-tools{justify-content:center;align-items:flex-start;min-height:166px;padding-top:16px}
.add-test{width:64px;height:64px;border-bottom-width:4px;position:relative;z-index:2}
.add-test svg{width:34px;height:34px}
.test-tools .planning{right:-36px;top:88px;width:250px;height:250px;opacity:.5}
.test-heading>div{position:relative;z-index:1}
@media(min-width:650px){.test-heading{min-height:142px;padding:0 64px}.test-heading h1{font-size:44px}.test-heading .hint{font-size:28px}.test-heading .go-back{top:18px}.test-tools{min-height:196px;padding-top:20px}.add-test{width:72px;height:72px}.add-test svg{width:40px;height:40px}.test-tools .planning{width:330px;height:330px;right:-24px;top:80px;opacity:.5}}
@media(prefers-reduced-motion:reduce){.arrow-shape{transition:none}}

/* Creation is the first tile, using the same list rhythm as saved tests. */
.test-tools{min-height:150px;padding:0;margin-bottom:18px}
.create-test-tile{grid-template-columns:auto 1fr;justify-content:start;gap:16px;text-align:left;min-height:140px;background:var(--tint-green);border-color:var(--tint-green-edge);border-bottom:4px solid #8bb89a;color:#315f40;font-size:21px;font-weight:700;cursor:pointer}
.create-plus{font-family:Arial,sans-serif;font-size:46px;line-height:1;width:44px;text-align:center;font-weight:700}
.create-test-tile:active{transform:translateY(2px)}
@media(min-width:650px){.test-tools{min-height:182px;margin-bottom:24px}.create-test-tile{min-height:164px;font-size:23px}}

.create-dialog{position:fixed;inset:0;margin:auto;padding:32px 26px 26px;max-height:calc(100dvh - 32px);overflow-y:auto}.create-dialog h2{padding-right:34px;margin-bottom:8px;font-size:26px}.close-dialog{position:absolute;right:12px;top:12px;width:44px;height:44px;display:grid;place-items:center;background:transparent;border:0;color:var(--action-ink);cursor:pointer}.close-dialog svg{width:24px;height:24px}.create-dialog .dialog-context{font-size:14px;color:var(--muted);margin-bottom:26px}.create-dialog label{display:block;font-size:15px;margin-bottom:10px}.create-dialog input{display:block;width:100%;min-height:56px;border:2px solid rgb(var(--brand-rgb)/0.33333);border-radius:12px;padding:12px 14px;background:var(--surface);color:var(--text);font:inherit;font-size:19px}.create-dialog input:focus{outline:2px solid var(--brand-purple);outline-offset:2px}.create-dialog input[aria-invalid=true]{border-color:var(--danger)}.create-dialog .field-error{min-height:22px;font-size:13px;color:var(--danger);margin:10px 0 16px}.create-submit{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:60px;padding:12px 18px;background:var(--tint-green);color:#315f40;border:1px solid var(--tint-green-edge);border-bottom:4px solid #8bb89a;font-size:19px;font-weight:700}.create-submit .arrow{color:var(--forward);width:32px;height:32px}.paper-heading h1{font-size:30px}.paper-test-name{overflow-wrap:anywhere}.capture-placeholder{text-align:center;margin-top:36px}.capture-placeholder img{width:220px;height:220px;object-fit:contain}.capture-placeholder p{font-size:15px;color:var(--muted)}@media(min-width:650px){.create-dialog{max-width:440px;padding:36px 32px 32px}.paper-heading h1{font-size:38px}}

/* Empty classes keep the same header illustration and creation tile. */
.empty-state{padding:12px 0 24px}.empty-state h2{font-size:21px;margin:8px 0 10px}.empty-state p{font-size:15px}

.create-test-tile{display:flex;align-items:center;justify-content:center;gap:12px;min-height:80px;align-self:center;padding:16px 12px;font-size:18px;line-height:1.3;text-align:center}
.create-plus{font-size:34px;width:30px;flex:none}
@media(min-width:650px){.create-test-tile{min-height:92px;font-size:20px;padding:18px 16px}}

/* Screen heroes share left-aligned copy beside the teacher on the right. */
.welcome{min-height:258px;margin-bottom:24px}
.welcome>div{max-width:64%}
.welcome h1{font-size:36px;line-height:1.15}
.welcome .greeting{font-size:17px}
.welcome .hint{font-size:20px}
.welcome .mascot{width:250px;height:250px;right:-52px;top:4px;opacity:.58}
.class-hero{min-height:280px;padding:40px 0 0;margin:0 0 24px;display:flex;align-items:center;text-align:left}
.class-hero>div{width:65%;position:relative;z-index:1}
.class-hero h1{font-size:38px;line-height:1.15;margin-bottom:14px}
.class-hero .hint{font-size:24px;line-height:1.3}
.class-hero .go-back{top:0;left:-8px}
.class-hero .planning{position:absolute;right:-36px;top:30px;width:250px;height:250px;object-fit:contain;opacity:.5;z-index:-1;pointer-events:none;user-select:none}
@media(min-width:650px){.welcome{min-height:330px;margin-bottom:30px}.welcome h1{font-size:48px}.welcome .greeting{font-size:21px}.welcome .hint{font-size:25px}.welcome .mascot{width:330px;height:330px;right:-24px;top:0}.class-hero{min-height:350px;padding-top:40px;margin-bottom:30px}.class-hero h1{font-size:50px}.class-hero .hint{font-size:32px}.class-hero .planning{width:330px;height:330px;right:-24px;top:20px}.class-hero .go-back{top:0}}
@media(max-width:374px){.welcome h1{font-size:34px}.class-hero h1{font-size:36px}.class-hero .hint{font-size:23px}}

.capture-hero h1{font-size:32px}.capture-hero .hint{font-size:21px;overflow-wrap:anywhere}.capture-heading{display:flex;align-items:center;gap:16px;padding:0;min-height:0;text-align:left;margin-bottom:20px}.capture-heading .go-back{position:static;flex:none}.capture-heading h1{font-size:28px;line-height:1.2;margin:0 0 8px}.capture-heading .hint{font-size:18px;overflow-wrap:anywhere}.capture-empty{font-size:17px;color:var(--muted);margin:0 0 24px}.capture-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:22px;position:sticky;bottom:0;padding:12px 0 max(12px,env(safe-area-inset-bottom));background:var(--page);z-index:3}.capture-controls button{min-height:60px;border-radius:14px;display:flex;align-items:center;justify-content:center;gap:10px;font-size:18px;font-weight:700;cursor:pointer}.capture-controls svg{width:28px;height:28px}.camera-choice{background:var(--tint-green);border:1px solid var(--tint-green-edge);border-bottom:4px solid #8bb89a;color:#315f40}.gallery-choice{background:var(--surface);border:1px solid rgb(var(--brand-rgb)/0.33333);color:var(--action-ink)}.capture-done{grid-column:1/-1;background:var(--tint-green);border:1px solid var(--tint-green-edge);border-bottom:4px solid #8bb89a;color:#315f40}.capture-controls button:disabled{opacity:.45;cursor:default}.capture-controls button:not(:disabled):active{transform:translateY(2px)}.capture-message{font-size:14px;color:var(--muted);min-height:24px;margin:10px 0 0;line-height:1.4}.paper-stage{position:relative;background:#eee7da;border-radius:14px;display:flex;flex-direction:column;align-items:center;padding:10px}.paper-preview{width:100%;height:clamp(220px,42vh,440px);object-fit:contain}.page-position{font-size:13px;margin:8px 0 2px}.photo-thumbnails{display:flex;gap:8px;overflow-x:auto;padding:10px 2px 4px;min-width:0}.photo-thumbnail{position:relative;flex:0 0 48px;width:48px;height:34px;border:2px solid transparent;border-radius:7px;background:white;padding:0;cursor:pointer;overflow:hidden}.photo-thumbnail img{width:100%;height:100%;object-fit:cover}.photo-thumbnail span{position:absolute;bottom:0;right:0;background:var(--brand-purple);color:var(--on-brand);min-width:14px;font:10px Arial,sans-serif;padding:2px;border-top-left-radius:4px}.photo-thumbnail[aria-pressed=true]{border-color:var(--brand-purple)}.camera-stage{position:relative;background:#19161c;border-radius:14px;overflow:hidden}.camera-stage video{display:block;width:100%;height:clamp(260px,48vh,540px);object-fit:contain}.close-camera{position:absolute;right:12px;top:12px;width:44px;height:44px;border-radius:50%;border:0;background:var(--page);color:var(--action-ink);font:32px Arial,sans-serif;cursor:pointer}.shutter{position:absolute;left:calc(50% - 32px);bottom:16px;width:64px;height:64px;border-radius:50%;border:4px solid white;background:transparent;display:grid;place-items:center;cursor:pointer}.shutter span{width:46px;height:46px;background:white;border-radius:50%}.shutter:active span{background:var(--tint-green-edge)}@media(min-width:650px){.capture-hero h1{font-size:46px}.capture-hero .hint{font-size:28px}.capture-heading h1{font-size:36px}.capture-heading .hint{font-size:22px}.capture-workspace{max-width:680px;margin:auto}.capture-controls{max-width:680px;margin:22px auto 0;grid-template-columns:1fr 1fr 1fr;gap:16px}.capture-done{grid-column:auto}.capture-message{max-width:680px;margin:10px auto 0}}

/* Purple navigation arrows: solid normally, hollow on hover/focus/press. */
.arrow-shape{fill:currentColor}
button:hover .arrow-shape,button:focus-visible .arrow-shape,button:active .arrow-shape{fill:transparent}
/* Semantic red/green arrows retain hollow-to-solid behaviour. */
:is(.ready-action,.danger,.delete-test,.tint-red,.positive,.tint-green,.create-submit) .arrow-shape{fill:transparent}
:is(.ready-action,.danger,.delete-test,.tint-red,.positive,.tint-green,.create-submit):is(:hover,:focus-visible,:active) .arrow-shape{fill:currentColor}

.camera-choice{background:var(--surface);border:1px solid rgb(var(--brand-rgb)/0.33333);color:var(--action-ink)}
.page-navigation{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:6px}.page-navigation .icon-button{min-width:44px;min-height:44px;padding:6px}.page-navigation .arrow{width:32px;height:32px}.page-navigation .page-position{flex:1;text-align:center;margin:0;font-size:13px}.page-change{color:var(--danger)}.page-change svg{width:26px;height:26px}.page-navigation button:disabled{opacity:.25;cursor:default}.page-change-dialog{position:fixed;inset:0;margin:auto;padding-top:32px}.page-change-dialog h2{padding-right:36px}.page-change-dialog .close-dialog{font:32px Arial,sans-serif}.page-change-actions{display:flex;gap:12px}.page-change-actions button{flex:1;min-height:52px;border-radius:12px;cursor:pointer}.replace-page{background:var(--surface);color:var(--action-ink);border:1px solid rgb(var(--brand-rgb)/0.33333)}.page-action-error{color:var(--danger);font-size:13px;margin-top:12px}

/* Photo controls are embedded within the captured-sheet area. */
.paper-image-area{position:relative;width:100%}
.paper-image-area .page-navigation{position:absolute;inset:0;margin:0;display:block;pointer-events:none}
.paper-image-area .page-navigation button{position:absolute;pointer-events:auto;background:transparent;border:0;z-index:2}
.paper-image-area .page-previous{left:0;top:50%;transform:translateY(-50%)}
.paper-image-area .page-next{right:0;top:50%;transform:translateY(-50%)}
.paper-image-area .page-change{right:0;top:0}
.paper-image-area .paper-preview{padding:0 44px}
.paper-stage>.page-position{margin:8px 0 2px;text-align:center}

/* Show the entire original sheet within the available photo container. */
.paper-stage{padding:0}
.paper-image-area{width:100%;height:clamp(260px,52svh,560px)}
.paper-image-area .paper-preview{display:block;width:100%;height:100%;padding:0;object-fit:contain;object-position:center;border-radius:0}

@media(min-width:650px){.capture-controls{grid-template-columns:1fr 1fr}.capture-done{grid-column:1/-1}}

/* High-contrast selected-sheet actions. */
.paper-image-area .page-navigation .page-change{width:44px;height:44px;min-width:44px;min-height:44px;right:8px;top:8px;border-radius:50%;background:var(--danger);color:#fff;padding:10px}
.paper-image-area .page-change svg{width:24px;height:24px}

.paper-preview[role=button]{cursor:zoom-in}.sheet-viewer{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:var(--page);color:var(--text);font-family:var(--font)}.sheet-viewer[open]{display:flex;flex-direction:column}.sheet-viewer::backdrop{background:var(--page)}.viewer-header{display:grid;grid-template-columns:44px 1fr minmax(130px,170px);align-items:center;gap:10px;padding:max(12px,env(safe-area-inset-top)) 16px 12px;border-bottom:1px solid rgb(var(--brand-rgb)/0.13333)}.viewer-close{font:34px Arial,sans-serif;color:var(--action-ink);cursor:pointer}.viewer-page{font-size:15px;margin:0;text-align:center}.viewer-upload{display:flex;align-items:center;gap:8px;background:transparent;border:0;color:#315f40;font:700 13px Poppins,Arial,sans-serif;text-align:left;min-height:44px;cursor:pointer}.viewer-upload svg{width:28px;height:28px;flex:none}.viewer-image-area{flex:1;min-height:0;position:relative;overflow:hidden;touch-action:none}.viewer-photo{width:100%;height:100%;object-fit:contain;display:block;user-select:none}.viewer-previous,.viewer-next{position:absolute;top:50%;transform:translateY(-50%);z-index:1;background:transparent;cursor:pointer}.viewer-previous{left:8px}.viewer-next{right:8px}.viewer-image-area button:disabled{opacity:.25;cursor:default}.viewer-footer{padding:12px 20px max(12px,env(safe-area-inset-bottom));border-top:1px solid rgb(var(--brand-rgb)/0.13333)}.zoom-controls{display:flex;justify-content:center;gap:12px;margin-bottom:8px}.zoom-controls button{min-width:44px;min-height:44px;border:1px solid rgb(var(--brand-rgb)/0.26667);background:var(--surface);border-radius:10px;color:var(--action-ink);font:18px Poppins,Arial,sans-serif;cursor:pointer}.zoom-controls button:disabled{opacity:.4;cursor:default}.viewer-page-actions{display:flex;justify-content:center;gap:40px}.viewer-page-actions button{display:flex;align-items:center;gap:8px;min-height:48px;font:16px Poppins,Arial,sans-serif;border:0;background:transparent;cursor:pointer}.viewer-page-actions svg{width:28px;height:28px}.viewer-replace{color:var(--legacy-ink-000,#000)}.viewer-remove{color:var(--danger)}.viewer-message{font-size:13px;color:var(--muted);text-align:center;margin:4px 0 0;min-height:0}.viewer-message:empty{display:none}@media(min-width:650px){.viewer-header{padding:16px 32px;grid-template-columns:48px 1fr 200px}.viewer-upload{font-size:16px}.viewer-page{font-size:18px}.viewer-footer{display:grid;grid-template-columns:1fr 1fr;align-items:center;padding:12px 32px}.zoom-controls{margin:0}.viewer-message{grid-column:1/-1}.viewer-previous{left:24px}.viewer-next{right:24px}}

.capture-hero h1{font-size:36px;line-height:1.15}.capture-hero .hint{font-size:24px}@media(min-width:650px){.capture-hero h1{font-size:50px}.capture-hero .hint{font-size:32px}}

/* One shared hero geometry across Classes, tests and capture. */
:is(.welcome,.class-hero,.capture-heading,.paper-heading){position:relative;display:block;height:236px;min-height:236px;padding:0;margin:0 0 24px;text-align:left;overflow:hidden}
:is(.welcome,.class-hero,.capture-heading,.paper-heading)>div:not(.hero-illustration){position:absolute;top:68px;left:0;width:calc(100% - 150px);max-width:none;z-index:1}
:is(.welcome,.class-hero,.capture-heading,.paper-heading) h1{font-size:28px;line-height:1.18;letter-spacing:-.4px;height:66px;margin:0 0 12px;display:flex;align-items:flex-start}
:is(.welcome,.class-hero,.capture-heading,.paper-heading) .hint{font-size:20px;line-height:1.25;margin:0;overflow-wrap:anywhere;color:var(--text)}
.welcome .greeting{position:absolute;top:-26px;left:0;font-size:15px;line-height:1.2;margin:0}
:is(.class-hero,.capture-heading,.paper-heading) .go-back{position:absolute;left:-8px;top:0;min-width:48px;min-height:48px;margin:0;transform:none}
:is(.welcome,.class-hero,.capture-heading,.paper-heading)>.hero-illustration{position:absolute;right:0;top:52px;width:140px;height:180px;overflow:hidden;pointer-events:none;z-index:0}
.hero-illustration :is(.mascot,.planning){position:absolute;width:300px;height:300px;max-width:none;left:calc(50% - 150px);right:auto;top:0;object-fit:contain;opacity:.58;z-index:0}
@media(min-width:650px){:is(.welcome,.class-hero,.capture-heading,.paper-heading){height:276px;min-height:276px;margin-bottom:30px}:is(.welcome,.class-hero,.capture-heading,.paper-heading)>div:not(.hero-illustration){top:80px;width:calc(100% - 240px)}:is(.welcome,.class-hero,.capture-heading,.paper-heading) h1{font-size:38px;line-height:1.16;height:88px;margin-bottom:12px}:is(.welcome,.class-hero,.capture-heading,.paper-heading) .hint{font-size:26px}.welcome .greeting{font-size:18px;top:-30px}:is(.welcome,.class-hero,.capture-heading,.paper-heading)>.hero-illustration{top:52px;width:220px;height:220px}.hero-illustration :is(.mascot,.planning){width:380px;height:380px;left:calc(50% - 190px)}}

.reading-panel{border:1px solid rgb(var(--brand-rgb)/0.20784);border-radius:16px;background:var(--surface);padding:22px;text-align:center;max-width:600px;margin:0 auto}.demo-label{font-size:12px;color:var(--action-ink)}.reading-status-icon{height:56px;display:grid;place-items:center;margin:16px 0;color:#315f40;font-size:36px;font-weight:700}.reading-status-icon svg{width:42px;height:42px}.reading-spinner{width:34px;height:34px;border:4px solid rgb(var(--brand-rgb)/0.1451);border-top-color:var(--brand-purple);border-radius:50%;animation:reading-spin 1s linear infinite}.reading-panel h2{font-size:22px;line-height:1.25;margin:0 0 12px}.reading-panel p{font-size:15px;line-height:1.5;color:var(--muted);margin:0}.reading-stages{display:flex;gap:8px;margin-top:24px}.reading-stages span{height:6px;flex:1;border-radius:4px;background:rgb(var(--brand-rgb)/0.12549)}.reading-stages .stage-complete{background:var(--brand-purple)}.reading-primary{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:56px;margin-top:24px;background:var(--tint-green);color:#315f40;border:1px solid var(--tint-green-edge);border-bottom:4px solid #8bb89a;border-radius:12px;padding:12px 16px;font:700 18px Poppins,Arial,sans-serif;cursor:pointer}.reading-primary .arrow{color:var(--forward)}.reading-primary .arrow-shape{fill:transparent}.reading-primary:is(:hover,:focus-visible,:active) .arrow-shape{fill:currentColor}.reading-failed{border-color:var(--tint-red-edge)}.reading-failed .reading-status-icon{color:var(--danger)}.reading-complete{border-color:var(--tint-green-edge)}.reading-demo-controls{max-width:600px;margin:20px auto 0;color:var(--legacy-ink-666,#666);font-size:13px}.reading-demo-controls summary{min-height:44px;display:flex;align-items:center;cursor:pointer}.reading-demo-controls>div{display:flex;flex-wrap:wrap;gap:8px}.reading-demo-controls button{min-height:44px;border:1px solid rgb(var(--brand-rgb)/0.26667);border-radius:10px;padding:8px 12px;background:var(--surface);color:var(--action-ink);font:13px Poppins,Arial,sans-serif;cursor:pointer}.reading-demo-controls button[aria-pressed=true]{background:var(--brand-tint);border-color:var(--brand-purple)}.reading-demo-controls p{font-size:12px;line-height:1.4}.next-build-placeholder{max-width:600px;margin:auto}.back-reading{display:flex;align-items:center;gap:12px;min-height:48px;border:0;background:transparent;color:var(--action-ink);font:16px Poppins,Arial,sans-serif;cursor:pointer}@keyframes reading-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.reading-spinner{animation:none}}

/* Compact spacing shared by every screen hero. */
.topbar{padding: max(12px,env(safe-area-inset-top)) 24px 12px}
main{padding-top:12px;padding-bottom:max(16px,env(safe-area-inset-bottom))}
:is(.welcome,.class-hero,.capture-heading,.paper-heading){height:162px;min-height:162px;margin-bottom:12px}
:is(.welcome,.class-hero,.capture-heading,.paper-heading)>div:not(.hero-illustration){top:44px}
:is(.welcome,.class-hero,.capture-heading,.paper-heading) h1{height:58px;font-size:26px;margin-bottom:4px;line-height:1.1}
:is(.welcome,.class-hero,.capture-heading,.paper-heading) .hint{font-size:18px}
.welcome .greeting{top:-22px;font-size:13px}
:is(.class-hero,.capture-heading,.paper-heading) .go-back{top:-4px}
:is(.welcome,.class-hero,.capture-heading,.paper-heading)>.hero-illustration{top:18px;height:140px}
.hero-illustration :is(.mascot,.planning){width:250px;height:250px;left:calc(50% - 125px)}
.capture-page .paper-image-area{height:clamp(160px,calc(100svh - 438px),470px)}
.capture-page .camera-stage video{height:clamp(180px,calc(100svh - 422px),470px)}
.capture-controls{margin-top:8px;padding-top:8px;gap:8px}
.capture-controls button{min-height:52px;font-size:17px}
.capture-empty{margin-bottom:12px}
.capture-message{margin-top:4px;min-height:20px}
@media(min-width:650px){.topbar{padding: max(16px,env(safe-area-inset-top)) 40px 16px}main{padding-top:16px}:is(.welcome,.class-hero,.capture-heading,.paper-heading){height:188px;min-height:188px;margin-bottom:16px}:is(.welcome,.class-hero,.capture-heading,.paper-heading)>div:not(.hero-illustration){top:44px}:is(.welcome,.class-hero,.capture-heading,.paper-heading) h1{height:74px;font-size:34px;margin-bottom:4px}:is(.welcome,.class-hero,.capture-heading,.paper-heading) .hint{font-size:24px}.welcome .greeting{top:-24px;font-size:16px}:is(.welcome,.class-hero,.capture-heading,.paper-heading)>.hero-illustration{top:12px;height:172px}.hero-illustration :is(.mascot,.planning){width:300px;height:300px;left:calc(50% - 150px)}.capture-page .paper-image-area{height:clamp(180px,calc(100svh - 498px),560px)}.capture-page .camera-stage video{height:clamp(180px,calc(100svh - 482px),560px)}.capture-controls{margin-top:8px}}

.doubts-page{height:calc(100dvh - 64px);min-height:0;display:flex;flex-direction:column;overflow:hidden;padding-bottom:8px}.doubts-page>.class-hero{flex:none}.doubts-provenance{font-size:11px;color:var(--legacy-ink-666,#666);margin:0 0 8px;flex:none}.doubts-paper{flex:none;max-width:680px;width:100%;margin:0 auto 8px}.inspect-paper{display:block;width:100%;height:clamp(150px,28dvh,330px);border:1px solid rgb(var(--brand-rgb)/0.2);background:#eee7da;border-radius:12px;padding:0;cursor:zoom-in}.inspect-paper img{width:100%;height:100%;object-fit:contain}.paper-question-links{display:flex;gap:8px;padding:6px 0 0}.paper-question-link{border:1px solid var(--tint-red-edge);border-radius:8px;background:var(--tint-red);color:var(--danger);font:700 13px Poppins,Arial,sans-serif;min-height:44px;padding:6px 12px;cursor:pointer}.paper-question-link.answered{background:var(--tint-green);border-color:var(--tint-green-edge);color:#315f40}.doubt-list{overflow-y:auto;flex:1;min-height:100px;max-width:680px;width:100%;margin:auto;overscroll-behavior:contain;padding:2px 2px 8px}.doubt-card{border:1px solid var(--tint-red-edge);background:var(--tint-red);border-radius:12px;margin-bottom:8px;padding:0}.doubt-card.answered{background:var(--tint-green);border-color:var(--tint-green-edge)}.doubt-row{width:100%;display:flex;align-items:flex-start;gap:10px;border:0;background:none;text-align:left;padding:12px;color:var(--text);font:14px Poppins,Arial,sans-serif;cursor:pointer}.doubt-row strong{display:block;font-size:15px}.doubt-symbol{font-size:18px;font-weight:700;min-width:20px;color:var(--danger)}.answered .doubt-symbol{color:#315f40}.doubt-summary{display:block;font-size:13px;line-height:1.35;margin-top:4px;overflow-wrap:anywhere}.doubt-body{padding:0 12px 12px}.doubt-evidence{font-size:12px;color:var(--legacy-ink-555,#555);margin:0 0 8px}.doubt-evidence summary{min-height:32px;cursor:pointer}.doubt-evidence p{font-size:12px;line-height:1.5;margin:4px 0 8px}.doubt-prompt{font-size:15px;margin:8px 0}.choice-source{font-size:11px;color:var(--legacy-ink-666,#666);margin:0 0 8px}.doubt-options{display:grid;gap:8px}.doubt-choice{min-height:44px;text-align:left;padding:10px 12px;border:1px solid rgb(var(--brand-rgb)/0.26667);border-radius:10px;background:var(--surface);color:var(--text);font:14px Poppins,Arial,sans-serif;cursor:pointer}.doubt-choice[aria-pressed=true]{border:2px solid var(--brand-purple);background:var(--brand-tint);padding:9px 11px}.doubt-field{display:block;margin-top:12px;font-size:13px}.doubt-field span{display:block;margin-bottom:6px}.doubt-field input,.doubt-field textarea{width:100%;min-height:44px;font:16px Poppins,Arial,sans-serif;border:1px solid rgb(var(--brand-rgb)/0.33333);border-radius:8px;padding:10px;background:var(--surface);resize:vertical}.doubt-answer-actions{display:flex;gap:10px;margin-top:10px}.save-doubt{min-height:44px;flex:1;font:700 15px Poppins,Arial,sans-serif;background:var(--tint-green);color:#315f40;border:1px solid var(--tint-green-edge);border-bottom:3px solid #8bb89a;border-radius:10px;cursor:pointer}.cancel-doubt{min-height:44px;font:14px Poppins,Arial,sans-serif;background:none;border:1px solid rgb(var(--brand-rgb)/0.26667);border-radius:10px;padding:8px 12px;cursor:pointer}.doubt-error{font-size:12px;color:var(--danger);line-height:1.4;margin:6px 0}.doubt-error:empty{display:none}.doubts-footer{flex:none;max-width:680px;width:100%;margin:auto;padding-top:4px}.doubts-footer .reading-primary{margin-top:4px;min-height:50px}.doubts-footer button:disabled{opacity:.4;cursor:default}.doubts-notice{font-size:11px;color:var(--legacy-ink-666,#666);line-height:1.3;margin:0;min-height:0}.doubts-notice:empty{display:none}.inspect-doubt-dialog{position:fixed;inset:0;margin:auto;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;padding:48px 12px 12px;background:var(--page);overflow:auto}.inspect-doubt-dialog img{display:block;width:100%;height:auto;max-width:900px;margin:auto}.close-paper{position:fixed;right:12px;top:8px;width:44px;height:36px;border:0;border-radius:50%;background:var(--page);color:var(--action-ink);font:30px Arial,sans-serif;cursor:pointer}@media(min-width:650px){.doubts-page{height:calc(100dvh - 80px)}.inspect-paper{height:clamp(160px,30dvh,350px)}.doubt-options{grid-template-columns:repeat(3,minmax(0,1fr))}.doubt-list{min-height:100px}}@media(max-height:700px){.doubts-page .inspect-paper{height:150px}.doubts-page>.class-hero{height:132px;min-height:132px}.doubts-page .hero-illustration{height:110px}}

.pending-page-action{display:block;width:100%;min-height:44px;border:1px solid rgb(var(--brand-rgb)/0.33333);border-radius:10px;color:var(--action-ink);background:var(--surface);font:700 15px Poppins,Arial,sans-serif;cursor:pointer;margin-bottom:4px}

@media(min-width:650px) and (max-height:800px){.doubts-page .inspect-paper{height:180px}}

.doubts-page .doubt-list{min-height:0}

.continue-doubts{position:relative;justify-content:center;padding-left:48px;padding-right:48px;text-align:center}.continue-doubts .arrow{position:absolute;right:14px;top:50%;transform:translateY(-50%)}

.student-roster{height:calc(100dvh - 64px);min-height:0;display:flex;flex-direction:column;overflow:hidden;padding-bottom:8px}.student-roster>.class-hero{flex:none}.student-source{font-size:12px;color:var(--legacy-ink-666,#666);margin:0 0 10px;flex:none}.student-list{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:10px;padding:2px;overscroll-behavior:contain}.student-row{display:flex;align-items:center;gap:12px;width:100%;min-height:76px;padding:12px;border:1px solid rgb(var(--brand-rgb)/0.20784);border-radius:12px;background:var(--surface);text-align:left;font:15px Poppins,Arial,sans-serif;cursor:pointer}.student-avatar{width:40px;height:40px;border-radius:10px;background:var(--brand-tint);color:var(--action-ink);display:grid;place-items:center;flex:none;font-weight:700;font-size:18px}.student-row-copy{flex:1;min-width:0}.student-row-copy strong{display:block;font-size:18px;margin-bottom:5px}.student-row-copy span{display:block;font-size:12px;color:var(--legacy-ink-555,#555)}.student-row.saved{border-color:var(--tint-green-edge)}.student-row.changed,.student-row.pending{border-color:var(--tint-red-edge)}.student-row.absent{background:#eee9df}.student-roster-footer{flex:none;padding-top:8px}.student-roster-summary{font-size:12px;color:var(--legacy-ink-666,#666);margin:0 0 6px}.check-students{position:relative;justify-content:center;padding:12px 48px;margin-top:0;min-height:52px}.check-students .arrow{position:absolute;right:14px;top:50%;transform:translateY(-50%)}.check-students:disabled{opacity:.4;cursor:default}.student-message{font-size:12px;color:var(--legacy-ink-666,#666);margin:6px 0 0;line-height:1.35;min-height:0}.student-message:empty{display:none}.student-editor .class-hero{margin-bottom:8px}.student-neighbours{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px;min-height:44px}.student-sheet-status{text-align:center;font-size:12px;color:var(--legacy-ink-555,#555)}.student-neighbours button:disabled{opacity:.25;cursor:default}.student-editor .paper-image-area{height:clamp(150px,calc(100svh - 518px),460px)}.student-editor .camera-stage video{height:clamp(150px,calc(100svh - 518px),460px)}.student-editor-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px;position:sticky;bottom:0;padding:8px 0;background:var(--page);z-index:3}.student-editor-controls button{min-height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;gap:8px;font:700 16px Poppins,Arial,sans-serif;cursor:pointer}.student-editor-controls svg{width:26px;height:26px}.student-absent{background:var(--tint-red);color:var(--danger);border:1px solid var(--tint-red-edge)}.student-done{background:var(--tint-green);color:#315f40;border:1px solid var(--tint-green-edge);border-bottom:3px solid #8bb89a}.student-local-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:10px;color:var(--legacy-ink-666,#666)}.restore-student{min-height:36px;background:none;border:0;text-decoration:underline;color:var(--action-ink);font:12px Poppins,Arial,sans-serif;cursor:pointer;padding:4px 0}.restore-student:disabled{opacity:.4;cursor:default}.student-no-pages{display:grid;place-items:center;min-height:180px;border:1px dashed rgb(var(--brand-rgb)/0.33333);border-radius:12px;font-size:18px;color:var(--legacy-ink-666,#666)}@media(min-width:650px){.student-roster{height:calc(100dvh - 80px)}.student-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:14px}.student-row{min-height:88px}.student-editor .paper-image-area,.student-editor .camera-stage video{height:clamp(150px,calc(100svh - 538px),520px)}.student-editor-controls{grid-template-columns:repeat(4,minmax(0,1fr))}}

.results-page,.review-page{height:calc(100dvh - 64px);min-height:0;display:flex;flex-direction:column;overflow:hidden;padding-bottom:8px}.results-page>.class-hero,.review-page>.class-hero{flex:none}.saved-results-source{font-size:12px;color:var(--legacy-ink-666,#666);margin:0 0 8px}.results-filters{display:flex;gap:8px;overflow-x:auto;flex:none;margin-bottom:10px;padding:2px}.results-filters button{white-space:nowrap;min-height:40px;border:1px solid rgb(var(--brand-rgb)/0.26667);border-radius:10px;background:var(--surface);color:var(--action-ink);font:12px Poppins,Arial,sans-serif;padding:8px 10px;cursor:pointer}.results-filters button[aria-pressed=true]{background:var(--brand-tint);border-color:var(--brand-purple)}.saved-results-list{overflow:auto;flex:1;min-height:0;display:flex;flex-direction:column;gap:10px;padding:2px}.saved-result-row{display:flex;align-items:center;gap:10px;width:100%;min-height:82px;padding:12px;border:1px solid rgb(var(--brand-rgb)/0.20784);border-radius:12px;background:var(--surface);text-align:left;font:15px Poppins,Arial,sans-serif;cursor:pointer}.result-student{flex:1;min-width:0}.result-student strong{display:block;font-size:18px;margin-bottom:5px}.result-student>span{display:block;font-size:11px;color:var(--legacy-ink-666,#666)}.result-score{font-weight:700;padding:8px;border-radius:8px;font-size:15px;white-space:nowrap}.score-low{color:#a5342c;background:var(--tint-red)}.score-middle{color:#795700;background:var(--tint-yellow)}.score-high{color:#286449;background:var(--tint-green)}.score-neutral{color:var(--legacy-ink-555,#555)}.review-student-navigation{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;margin-bottom:6px}.review-student-navigation>div{text-align:center}.review-final-mark{display:block;font-size:17px;padding:4px 8px;border-radius:8px}.review-engine-mark{display:block;font-size:11px;color:var(--legacy-ink-666,#666);margin-top:4px}.review-student-navigation button:disabled,.review-photo-area button:disabled{opacity:.25;cursor:default}.saved-review-warning{font-size:11px;color:var(--legacy-ink-666,#666);margin:0 0 6px;flex:none}.review-photo-area{position:relative;flex:none;height:clamp(160px,28dvh,340px);width:100%;background:#eee7da;border-radius:12px;overflow:hidden}.review-image-plane{position:absolute;transform-origin:center}.review-image-plane>img{width:100%;height:100%;display:block;object-fit:contain}.sheet-annotation{position:absolute;border:1.5px solid #286449;background:#e6f4ea26;border-radius:3px;cursor:pointer;padding:0;text-align:left;color:#286449}.sheet-annotation>span{position:absolute;left:0;top:0;font:700 10px Arial,sans-serif;background:var(--tint-green);color:inherit;padding:2px 3px;white-space:nowrap;border-radius:2px}.annotation-low{border-color:#a5342c;color:#a5342c;background:#fdecea26}.annotation-low>span{background:var(--tint-red)}.annotation-middle{border-color:#9a7400;color:#795700;background:#fff6d626}.annotation-middle>span{background:var(--tint-yellow)}.annotation-neutral{border-color:var(--brand-purple);color:var(--action-ink)}.annotation-selected{outline:2px solid var(--brand-purple);outline-offset:2px}.hide-annotations .sheet-annotation{display:none}.review-page-previous,.review-page-next{position:absolute;top:50%;transform:translateY(-50%);background:transparent;z-index:2;cursor:pointer}.review-page-previous{left:0}.review-page-next{right:0}.inspect-review-paper{position:absolute;top:8px;right:8px;width:40px;height:40px;border:1px solid rgb(var(--brand-rgb)/0.26667);border-radius:10px;background:var(--page);color:var(--action-ink);font-size:24px;cursor:pointer;z-index:3}.review-toolbar{display:flex;justify-content:space-between;align-items:center;gap:8px;flex:none;margin:4px 0}.review-page-label{font-size:12px;color:var(--legacy-ink-555,#555)}.review-toggle-annotations{min-height:36px;font:12px Poppins,Arial,sans-serif;color:var(--action-ink);border:0;background:none;cursor:pointer}.review-tabs{display:flex;gap:10px;flex:none;margin-bottom:6px}.review-tabs button{flex:1;min-height:40px;border:1px solid rgb(var(--brand-rgb)/0.26667);border-radius:10px;background:var(--surface);color:var(--action-ink);font:14px Poppins,Arial,sans-serif;cursor:pointer}.review-tabs button[aria-pressed=true]{background:var(--brand-tint);border-color:var(--brand-purple)}.review-details{flex:1;min-height:0;overflow:auto;padding:2px;overscroll-behavior:contain}.review-question{border:1px solid rgb(var(--brand-rgb)/0.2);border-radius:10px;background:var(--surface);margin-bottom:8px}.review-question-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:48px;padding:10px 12px;border:0;background:none;font:15px Poppins,Arial,sans-serif;text-align:left;cursor:pointer}.review-question-row>span{font-weight:700;padding:4px 8px;border-radius:6px}.review-question-text{font-size:13px;line-height:1.4;margin:0;padding:0 12px 10px}.review-step{margin:0 12px 10px;padding:10px;border-radius:8px;background:var(--page);font-size:12px;line-height:1.45}.review-step strong{display:block;font-size:13px}.review-step p{margin:6px 0 0;overflow-wrap:anywhere}.review-saved-note{color:var(--action-ink)}.saved-report-section{background:var(--surface);border:1px solid rgb(var(--brand-rgb)/0.2);border-radius:10px;padding:12px;margin-bottom:10px}.saved-report-section h2{font-size:16px;margin:0 0 8px}.saved-report-section p{font-size:13px;line-height:1.5;margin:8px 0;white-space:pre-line}.review-inspection{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:var(--page)}.review-inspection[open]{display:flex;flex-direction:column}.review-inspection header{display:flex;align-items:center;justify-content:center;gap:12px;padding:8px;flex:none}.review-inspection header button{min-width:44px;min-height:44px;border:1px solid rgb(var(--brand-rgb)/0.26667);border-radius:8px;color:var(--action-ink);background:var(--surface);font:18px Poppins,Arial,sans-serif;cursor:pointer}.review-inspection header .close-inspection{margin-right:auto;font-size:28px;border:0}.inspection-canvas{flex:1;min-height:0;position:relative;overflow:hidden;touch-action:none}@media(min-width:650px){.results-page,.review-page{height:calc(100dvh - 80px)}.saved-results-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:14px}.review-photo-area{height:clamp(180px,30dvh,370px)}}@media(max-height:800px){.review-photo-area{height:180px}}

.student-editor .paper-preview,.review-photo-area .review-image-plane>img{cursor:zoom-in}.review-inspection header .close-inspection{display:flex;align-items:center;justify-content:center;gap:6px;font-size:13px;white-space:nowrap;padding:6px}.close-inspection .arrow{width:24px;height:24px;flex:none}.review-inspection header{gap:8px}.review-inspection header button{min-width:40px}.review-inspection .close-inspection span{font-size:13px}

/* Scroll the paper and follow-ups together, retaining a compact tappable reference. */
main.doubts-page{display:block;overflow-y:auto;overscroll-behavior:contain;height:calc(100dvh - var(--stage-header-height,64px));scroll-behavior:smooth;padding-bottom:8px}
.doubts-page .doubts-paper{position:sticky;top:0;z-index:6;background:var(--page);padding:6px 0;margin-bottom:8px}
.doubts-page .inspect-paper{height:var(--doubt-paper-height,28dvh);transition:height .12s linear;overflow:hidden}
.doubts-page .doubt-list{display:block;overflow:visible;min-height:0;margin:0 auto;padding-bottom:16px}
.doubts-page .doubts-footer{position:sticky;bottom:0;z-index:7;background:var(--page);padding:6px 0 0;margin:0 auto}
.doubts-page .paper-question-links{padding-top:4px}
@media(prefers-reduced-motion:reduce){main.doubts-page{scroll-behavior:auto}.doubts-page .inspect-paper{transition:none}}

.demo-flow-panel{max-width:680px;margin:12px auto}.demo-flow-panel>p{font-size:14px;line-height:1.5}.demo-flow-panel label{display:block;font-size:15px;margin:12px 0}.demo-flow-panel input:not([type=checkbox]),.demo-flow-panel textarea{display:block;width:100%;min-height:44px;border:1px solid rgb(var(--brand-rgb)/0.33333);background:var(--surface);border-radius:8px;padding:10px;font:inherit;margin-top:6px}.demo-confirm input{width:20px;height:20px;vertical-align:middle}.demo-sheet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.demo-sheet-grid button{border:1px solid rgb(var(--brand-rgb)/0.26667);border-radius:10px;background:#eee7da;padding:4px;cursor:zoom-in}.demo-sheet-grid img{width:100%;height:180px;object-fit:contain}.demo-flow-panel .student-row{margin:10px 0}.demo-flow-panel .reading-primary{width:100%;margin:10px 0}.demo-paper-preview .inspect-paper{height:180px}.demo-flow-panel button:disabled{opacity:.4}

/* Answer explanations stay inside the full-sheet viewer. */
.inspection-body{display:flex;flex:1;min-height:0;overflow:hidden;flex-direction:column}
.inspection-body>.inspection-canvas{min-width:0}
.inspection-spotlight{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;opacity:0;transition:opacity 240ms ease}
.has-explanation .inspection-spotlight{opacity:.46}
.has-explanation .sheet-annotation{z-index:0;outline:none}
.has-explanation .inspection-answer-active{z-index:2;outline:2px solid var(--brand-purple);outline-offset:2px}
.inspection-explanation{flex:none;max-height:46%;min-height:0;display:flex;flex-direction:column;background:var(--surface);border-top:1px solid rgb(var(--brand-rgb)/0.2);animation:inspection-answer-in 220ms ease both;padding-bottom:env(safe-area-inset-bottom)}
.inspection-explanation[hidden]{display:none}
.inspection-answer-heading{display:flex;align-items:center;gap:12px;padding:10px 16px;border-bottom:1px solid rgb(var(--brand-rgb)/0.13333);flex:none}
.inspection-answer-heading h2{font-size:20px;margin:0}
.inspection-answer-heading h2:focus{outline:none}
.inspection-answer-score{font-size:16px;font-weight:700;padding:5px 9px;border-radius:6px}
.inspection-answer-close{margin-left:auto;min-width:44px;min-height:44px;border:0;border-radius:8px;background:var(--page);color:var(--action-ink);font:28px Poppins,Arial,sans-serif;cursor:pointer}
.inspection-answer-content{overflow:auto;overscroll-behavior:contain;padding:14px 4px 4px;min-height:0}
.inspection-answer-content .review-question-text{font-size:15px;line-height:1.5;white-space:pre-line}
.inspection-answer-content .review-step{font-size:14px;line-height:1.55}
.inspection-answer-content .review-step strong{font-size:14px}
.inspection-answer-content .review-step p{white-space:pre-line}
@keyframes inspection-answer-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:900px){.inspection-body{flex-direction:row}.inspection-explanation{width:360px;max-width:40%;max-height:none;border-top:0;border-left:1px solid rgb(var(--brand-rgb)/0.2)}}
@media(prefers-reduced-motion:reduce){.inspection-spotlight{transition:none}.inspection-explanation{animation:none}}

/* Full-sheet navigation stays reachable outside the zoomed image. */
.inspection-sheet{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.inspection-page-navigation{position:absolute;left:0;right:0;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 18%;background:var(--page)}
.inspection-page-navigation button{display:flex;align-items:center;justify-content:center;min-width:48px;min-height:44px;padding:0;border:0;background:none;color:var(--action-ink);cursor:pointer}
.inspection-page-navigation .arrow{width:34px;height:34px}
.inspection-page-navigation button:disabled{opacity:.25;cursor:default}
.inspection-page-navigation span{font-size:13px;min-width:86px;text-align:center;color:var(--action-ink)}

/* Compact review: one header and no space between the photo and its explanation. */
.inspection-review>header{justify-content:space-between;padding:6px 12px;gap:12px}
.inspection-review>header .close-inspection{margin:0;padding:0;background:none;min-height:44px}
.inspection-page-position{font:13px Poppins,Arial,sans-serif;color:var(--action-ink);white-space:nowrap}
.inspection-review .inspection-body{flex-direction:column;gap:0;justify-content:flex-start}
.inspection-review .inspection-sheet{flex:0 0 auto;width:100%;padding:0;margin:0}
.inspection-review .inspection-explanation{width:100%;max-width:none;max-height:46%;margin:0;border-left:0;animation:none}
.inspection-review .inspection-answer-heading{padding:6px 12px;gap:10px}
.inspection-review .inspection-answer-heading h2{font-size:18px}
.inspection-review .inspection-answer-content{padding:10px 0 0}

/* Page arrows sit on the sheet edges, outside the image/annotation transform. */
.inspection-sheet-arrows{position:absolute;inset:0;z-index:4;pointer-events:none}
.inspection-sheet-arrows button{position:absolute;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:44px;height:48px;border:0;padding:4px;background:none;color:var(--action-ink);cursor:pointer;pointer-events:auto}
.inspection-sheet-arrows .inspection-page-previous{left:0}
.inspection-sheet-arrows .inspection-page-next{right:0}
.inspection-sheet-arrows .arrow{width:32px;height:32px;filter:drop-shadow(0 0 1px var(--surface))}
.inspection-sheet-arrows button:disabled{opacity:.25;cursor:default}

.inspection-answer-heading .inspection-marks-toggle{margin-left:auto;white-space:nowrap;padding:4px 0;min-height:44px;flex:none}
.inspection-review .hide-annotations .inspection-spotlight{opacity:0}

/* With marks off, centre the photo and its compact question/toggle row together. */
.inspection-review .inspection-answer-content[hidden]{display:none}
.inspection-review.inspection-marks-off .inspection-explanation{padding-bottom:0}
.inspection-review.inspection-marks-off .inspection-answer-heading{border-bottom:0}

/* Background taps collapse the answer while keeping its marks control available. */
.inspection-answer-dismissed .inspection-answer-heading h2,.inspection-answer-dismissed .inspection-answer-score{display:none}

/* Shared accessible Marks switch for the review page and full-sheet viewer. */
.review-toggle-annotations.marks-switch{display:inline-flex;align-items:center;gap:8px;min-height:44px;color:var(--action-ink);cursor:pointer}
.marks-switch-track{position:relative;display:block;flex:none;width:38px;height:22px;border-radius:12px;background:#d8d1dd;border:1px solid #A48CAF;transition:background 200ms ease,border-color 200ms ease}
.marks-switch-track::after{content:'';position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:var(--surface);transition:transform 200ms ease}
.marks-switch[aria-checked=true] .marks-switch-track{background:var(--brand-purple);border-color:var(--brand-purple)}
.marks-switch[aria-checked=true] .marks-switch-track::after{transform:translateX(16px)}
.marks-switch:focus-visible{outline:2px solid var(--brand-purple);outline-offset:2px;border-radius:6px}
.marks-switch:disabled{opacity:.4;cursor:default}
.inspection-marks-off .inspection-answer-heading h2,.inspection-marks-off .inspection-answer-score{display:none}
@media(prefers-reduced-motion:reduce){.marks-switch-track,.marks-switch-track::after{transition:none}}

/* Match Paper doubts: one scroll area with a shrinking sticky sheet reference. */
main.review-page{display:block;overflow-y:auto;overscroll-behavior:contain;height:calc(100dvh - var(--stage-header-height,64px));scroll-behavior:smooth;padding-bottom:8px}
.review-page .review-paper-sticky{position:sticky;top:0;z-index:6;background:var(--page);padding:6px 0;margin-bottom:8px}
.review-page .review-photo-area{height:var(--review-paper-height,28dvh);transition:height .12s linear}
.review-page .review-details{display:block;overflow:visible;min-height:0;padding:2px 2px 16px}
@media(prefers-reduced-motion:reduce){main.review-page{scroll-behavior:auto}.review-page .review-photo-area{transition:none}}

main.review-page{overflow-anchor:none}

/* Question-paper pages: tap arrows or swipe horizontally; vertical gestures scroll. */
.doubt-paper-stage{position:relative;touch-action:pan-y}
.doubt-paper-stage .inspect-paper{touch-action:pan-y}
.doubt-paper-arrows{position:absolute;inset:0;pointer-events:none}
.doubt-paper-arrows button{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:48px;display:flex;align-items:center;justify-content:center;background:none;border:0;padding:4px;color:var(--action-ink);cursor:pointer;pointer-events:auto}
.doubt-paper-arrows button:first-child{left:0}
.doubt-paper-arrows button:last-child{right:0}
.doubt-paper-arrows .arrow{width:30px;height:30px}
.doubt-paper-arrows button:disabled{opacity:.25;cursor:default}
.doubt-paper-position{display:block;text-align:center;font-size:12px;color:var(--action-ink);padding:4px 0 0}

.review-question-body[hidden]{display:none}

/* App-wide brand typography and action/title casing. Keep entered answers and body copy natural. */
button,input,select,textarea,dialog{font-family:var(--font)}
button,h1,.stage-path,.teacher-flow-track,.role{text-transform:uppercase}
button{letter-spacing:.015em}
button input,button textarea{ text-transform:none }
button.class-card .class-copy,button.saved-result-row .result-student{text-transform:uppercase}
.sheet-annotation>span{font-family:var(--font)}
.paper-image-area,.review-photo-area,.doubt-paper-stage{overflow:hidden}
.paper-preview,.review-image-plane,.doubt-paper-stage .inspect-paper img{will-change:transform;transform-origin:center;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}

@media(max-width:649px){
 .classes{grid-template-columns:minmax(0,1fr)}
 .class-card{gap:8px;padding:16px 10px}
 .class-card>.arrow{width:26px;height:26px;flex:none}
 .class-symbol{width:36px;height:40px;font-size:20px}
 .class-name{font-size:18px}
 .subject{font-size:12px;overflow-wrap:anywhere}
}

/* Hero titles use title case; compact navigation/action labels stay uppercase. */
h1{text-transform:capitalize}
/* Stretch each test's existing native navigation button across its whole tile. */
.test-tile{position:relative;isolation:isolate}
.test-tile .test-action::after{content:'';position:absolute;inset:0;z-index:1;border-radius:16px}
.test-tile .delete-test{position:absolute;top:4px;right:4px;z-index:2}
.test-tile:has(.test-action){cursor:pointer}
.test-tile:has(.test-action:focus-visible){outline:3px solid var(--brand-purple);outline-offset:3px}
.test-copy{grid-column:1/-1;min-width:0;padding:0 30px}
.test-copy h2{text-align:center;text-transform:uppercase;font-size:18px;line-height:1.35;margin-bottom:5px}
.class-card,.student-row{display:grid;grid-template-columns:40px minmax(0,1fr) 40px;gap:8px}
.class-card>.arrow,.student-row>.arrow{justify-self:end}
.class-symbol,.student-avatar{justify-self:start}
.class-name,.student-row-copy>strong{text-align:center}
/* Purple metadata tags share one compact treatment across tile types. */
.tile-tag,.class-copy .subject,.draft-label{display:inline-flex;align-items:center;width:fit-content;max-width:100%;padding:3px 6px;border-radius:5px;background:var(--brand-purple);color:var(--on-brand);font-size:10px;font-weight:400;line-height:1.3;text-transform:uppercase;letter-spacing:.01em;overflow-wrap:anywhere}
.student-row-copy>.student-row-meta{display:flex;align-items:center;gap:5px;flex-wrap:wrap;font-size:10px;line-height:1.3;color:var(--muted)}
.student-row-meta>.student-page-count{display:inline;font-size:10px;color:var(--muted)}
.student-row-meta>.tile-tag{display:inline-flex;font-size:10px;color:#fff}
.saved-result-row{display:grid;grid-template-columns:minmax(0,1fr) auto 28px;gap:6px 8px}
.saved-result-row>.result-student{display:contents}
.saved-result-row .result-student>strong{grid-column:1/-1;grid-row:1;text-align:center;font-size:18px;margin:0}
.saved-result-row .result-student>.result-meta{grid-column:1;grid-row:2;display:flex;align-items:center;gap:5px;flex-wrap:wrap;font-size:10px;line-height:1.3}
.saved-result-row .result-page-count{font-size:10px;color:var(--muted)}
.saved-result-row>.result-score{grid-column:2;grid-row:2;font-size:13px;padding:5px}
.saved-result-row>.arrow{grid-column:3;grid-row:2;width:28px;height:28px}
@media(max-width:649px){.class-copy .subject{font-size:9px;padding:3px 5px}.class-card,.student-row{grid-template-columns:36px minmax(0,1fr) 36px}.student-row-copy>strong{font-size:16px}}

/* Centre every text element within interactive tiles and controls. */
button{text-align:center}
.class-copy,.student-row-copy,.test-copy,.result-student{text-align:center}
.tile-tag,.class-copy .subject,.draft-label{margin-inline:auto;justify-content:center;text-align:center}
.student-row-copy>.student-row-meta,.saved-result-row .result-student>.result-meta{justify-content:center;text-align:center}
.saved-result-row{position:relative;display:block}
.saved-result-row>.result-student{display:block;padding-inline:28px}
.saved-result-row .result-student>strong{display:block;text-align:center;margin:0 0 4px}
.saved-result-row .result-student>.result-meta{display:flex;gap:5px;align-items:center;flex-wrap:wrap}
.saved-result-row .result-meta>.tile-tag{margin-inline:0}
.saved-result-row .result-meta>.result-score{display:inline-block;font-size:12px;padding:3px 5px;border-radius:5px}
.saved-result-row>.arrow{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:28px;height:28px}
.test-action,.reading-primary:has(>span):has(>.arrow){display:grid;grid-template-columns:32px minmax(0,1fr) 32px;align-items:center;gap:6px;text-align:center}
.test-action>span,.reading-primary:has(>span):has(>.arrow)>span{grid-column:2;text-align:center}
.test-action>.arrow,.reading-primary:has(>span):has(>.arrow)>.arrow{grid-column:3;justify-self:end}
/* Purple return tiles match the brand's tactile tile language. */
.review-inspection>header .close-inspection,.inspection-review>header .close-inspection{background:var(--brand-purple);color:var(--on-brand);border:1px solid var(--brand-purple);border-bottom:3px solid var(--brand-dark);border-radius:10px;min-height:44px;padding:6px 10px;justify-content:center;text-align:center}
.review-inspection .close-inspection .arrow{color:#fff}
/* Explicit press state adds feedback without delaying the click action. */
button,.test-tile{transition:translate 110ms ease,scale 110ms ease,filter 110ms ease,background-color 140ms ease;translate:0 0;scale:1}
button:not(:disabled):active,button.is-pressed,.test-tile.is-pressed{translate:0 2px;scale:.98;filter:brightness(.94)}
.class-card:active{transform:none;margin-top:0;border-bottom-width:4px}
.solid:active,.add-test:active,.ready-action:active{transform:none}
button .arrow{transition:filter 110ms ease;filter:drop-shadow(0 2px 0 rgb(var(--brand-rgb)/0.13333))}
button:not(:disabled):active .arrow,button.is-pressed .arrow{filter:drop-shadow(0 0 0 transparent)}
button:disabled{scale:1;translate:0 0}
.sheet-slide-snapshot{contain:layout style;user-select:none;-webkit-user-select:none}
/* Keep each hero at the top of its own scrolling flow, outside the requested exceptions. */
main:not(.doubts-page):not(.review-page):not(.student-editor){overflow-y:auto;overflow-anchor:none;height:calc(100dvh - var(--stage-header-height,64px));min-height:0}
body.stage-path-preview>main:not(.doubts-page):not(.review-page):not(.student-editor)>:is(.welcome,.class-hero,.capture-heading,.paper-heading){position:sticky;top:0;z-index:7;background:var(--page)}
body.stage-path-preview>main:not(.doubts-page):not(.review-page):not(.student-editor)>:is(.welcome,.class-hero,.capture-heading,.paper-heading)::before{content:'';position:absolute;inset:-12px -100vw 0;background:var(--page);z-index:-1;pointer-events:none}
@media(prefers-reduced-motion:reduce){button,.test-tile,button .arrow{transition:none}}

:is(.welcome,.class-hero,.capture-heading,.paper-heading)>div:not(.hero-illustration){text-align:center}
.paper-preview,.review-image-plane>img,.inspect-paper>img{-webkit-user-drag:none}

/* Keep question tile labels centred while the compact mark stays at its edge. */
.review-question-row{position:relative;justify-content:center;padding-inline:78px}
.review-question-row>strong{text-align:center}
.review-question-row>span{position:absolute;right:12px;top:50%;transform:translateY(-50%)}

/* Student names anchor one centred, evenly spaced group of compact metadata tags. */
.student-row-copy>.student-row-meta,.saved-result-row .result-student>.result-meta{justify-content:center;align-items:center;gap:8px 12px}
.student-row-meta>.tile-tag,.saved-result-row .result-meta>.tile-tag{display:inline-flex;margin:0;min-height:24px;padding:4px 7px;font-size:10px;line-height:1.3;color:var(--on-brand);background:var(--brand-purple);border-radius:5px;justify-content:center;text-align:center}
.student-row-copy>strong{margin-bottom:8px}
.saved-result-row>.result-student{padding-inline:0}
.saved-result-row .result-student>strong{padding-inline:28px;margin-bottom:8px}
.saved-result-row .result-meta>.result-score{display:inline-flex;align-items:center;justify-content:center;min-height:24px;margin:0;padding:4px 7px;font-size:12px;line-height:1.3}
.saved-result-row>.arrow{top:12px;transform:none}
@media(min-width:650px){.student-row-copy>.student-row-meta,.saved-result-row .result-student>.result-meta{column-gap:16px}}
/* Results filters stay directly below the current, shrinking hero height. */
.results-page>.results-filters{position:sticky;top:var(--flow-hero-height,112px);z-index:6;background:var(--page);flex-wrap:wrap;gap:6px;margin:0;padding:4px 0 8px;overflow:visible}
.results-page>.results-filters>button{flex:1 1 auto;font-size:11px;padding:7px 9px}

@media(max-width:649px){.results-page>.results-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.results-page>.results-filters>button{width:100%;min-width:0;padding-inline:4px;font-size:10px}}

/* Data and action labels must fit the available phone column, including with the rail open. */
.student-row-copy,.result-student,.student-list,.saved-results-list{min-width:0}
.student-row-copy>strong,.result-student>strong{overflow-wrap:anywhere}
.capture-controls,.student-editor-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
.capture-controls>button,.student-editor-controls>button{min-width:0;white-space:normal}
.capture-controls>button>span,.student-editor-controls>button>span{min-width:0;overflow-wrap:anywhere}
.capture-controls>button>svg,.student-editor-controls>button>svg{flex-shrink:0}
.results-page>.results-filters>button{white-space:normal;overflow-wrap:anywhere;min-height:44px}
@media(max-width:374px){.capture-controls>.camera-choice,.capture-controls>.gallery-choice,.student-editor-controls>.camera-choice,.student-editor-controls>.gallery-choice{flex-direction:column;gap:4px;padding:6px 4px;font-size:12px}.capture-controls>.capture-done{font-size:12px;padding:8px;gap:6px}}
@media(min-width:650px){.capture-controls{grid-template-columns:repeat(3,minmax(0,1fr))}.student-editor-controls{grid-template-columns:repeat(4,minmax(0,1fr))}}

.upload-demo-tile{position:relative;display:block;width:100%;text-align:center;cursor:pointer;color:var(--action-ink)}
.upload-demo-tile .test-copy{display:block;padding-inline:28px}
.upload-demo-tile strong{display:block;font-size:18px;margin-bottom:8px}
.upload-demo-tile>.arrow{position:absolute;right:12px;top:50%;transform:translateY(-50%);width:28px;height:28px}
.reading-panel progress{display:block;width:100%;accent-color:var(--brand-purple);margin:16px 0}
.reading-panel .demo-checking-count{font-weight:700;margin-bottom:8px}

/* Text-only primary actions use a centred label, just like icon-and-label actions. */
.reading-primary:not(:has(>.arrow)),.save-demo-review{justify-content:center;text-align:center}
/* Avoid iOS focus zoom from inherited 12–15px form text; preserve manual pinch zoom. */
@media(max-width:649px){input:not([type=checkbox]):not([type=radio]):not([type=file]),textarea,select,.demo-flow-panel input:not([type=checkbox]),.demo-flow-panel textarea{font-size:16px}}

/* Open purple chevrons are reserved for paper/sheet page controls. */
button .sheet-chevron{color:var(--action-ink);fill:none;filter:none}
button .sheet-chevron path{fill:none;stroke:currentColor;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}

/* Individual-screen return action: left edge, immediately after the hero, before student details. */
.individual-list-navigation{display:flex;justify-content:flex-start;align-items:center;margin:0 0 4px;min-height:44px;flex:none}
.individual-list-navigation>.icon-button{width:44px;height:44px;min-width:44px;min-height:44px;padding:6px;color:var(--action-ink);background:transparent;border:0}
.individual-list-navigation .sheet-chevron{width:30px;height:30px}

/* Directional icons share the open chevron style across every flow. */
.individual-list-navigation>.icon-button{display:inline-flex;align-items:center;justify-content:center;width:auto;gap:4px;padding:6px 12px 6px 6px;font-size:14px;font-weight:700}
.individual-list-navigation>.icon-button>span{line-height:1.2}

/* Quiet answer regions preserve every stroke of the original handwriting. */
.sheet-annotation{border:1.5px dotted #286449;background:transparent;color:#286449;border-radius:2px;overflow:visible;box-shadow:none}
.sheet-annotation.annotation-low,.sheet-annotation.annotation-middle{border-color:#A43F37;background:transparent;color:#A43F37}
.sheet-annotation.annotation-neutral{border-color:var(--muted);background:transparent;color:var(--legacy-ink-655c6d,var(--muted))}
.sheet-annotation>span{top:auto;bottom:calc(100% + 2px);left:0;right:auto;padding:1px 3px;background:rgb(var(--surface-rgb)/0.9098);font-size:9px;line-height:1.25;pointer-events:none}
.sheet-annotation.annotation-label-below>span{top:calc(100% + 2px);bottom:auto}
.sheet-annotation.annotation-label-right>span{left:auto;right:0}
.review-photo-area .sheet-annotation>span{font-size:8px}
.sheet-annotation.annotation-selected,.has-explanation .inspection-answer-active{outline:none;background:transparent}
/* Marks hides score labels/details, not the answer-region borders. */
.hide-annotations .sheet-annotation{display:block}
.hide-annotations .sheet-annotation>span{display:none}
.review-page:has(.review-photo-area .hide-annotations)>.review-details{display:none}

/* Longer broken strokes, with transparent interiors, keep answer regions readable. */
.sheet-annotation{border-style:dashed}
/* Returning focus to a preview must not draw the browser's blue image outline. */
img[role=button]:focus,img[role=button]:focus-visible,.paper-preview:focus,.review-image-plane>img:focus{outline:none}

/* Compact single-line tile metadata; review state remains distinguishable. */
.student-row-meta,.saved-result-row .result-student>.result-meta{flex-wrap:nowrap;gap:8px;min-width:0}
.student-row-meta>.tile-tag,.saved-result-row .result-meta>.tile-tag{min-height:20px;padding:3px 5px;font-size:9px;line-height:1.2;white-space:nowrap;overflow-wrap:normal;word-break:normal;flex-shrink:0;border-radius:4px}
.saved-result-row .result-meta>.result-score{min-height:20px;padding:3px 5px;font-size:10px;white-space:nowrap;flex-shrink:0}
.saved-result-row .result-meta>.status-not-reviewed{background:#fff;color:var(--action-ink)}
.student-row[data-sheet-state]{border:2.5px solid var(--brand-purple)}
.student-row[data-sheet-state="uploaded"]{border-color:#2e8764}
.student-row[data-sheet-state="absent"]{border-color:#b5413b}
.final-result-tile{cursor:default;text-transform:uppercase}
/* One fixed primary-action box, including the first and last flow actions. */
.reading-primary,.capture-controls>.capture-done{box-sizing:border-box;height:56px;min-height:56px;max-height:56px;width:100%;max-width:680px;margin-inline:auto;flex-shrink:0;border-radius:12px;padding:8px 12px;font-size:14px;line-height:1.15;white-space:nowrap;text-align:center}
.reading-primary>span,.capture-controls>.capture-done>span{min-width:0;white-space:nowrap}
.reading-primary>.arrow,.capture-controls>.capture-done>svg{width:26px;height:26px;flex-shrink:0}
@media(max-width:374px){.reading-primary,.capture-controls>.capture-done{font-size:12px;padding-inline:8px}.student-row-meta,.saved-result-row .result-student>.result-meta{gap:6px}.student-row-meta>.tile-tag,.saved-result-row .result-meta>.tile-tag{font-size:8px;padding:3px 4px}.saved-result-row .result-meta>.result-score{font-size:9px;padding:3px 4px}}

/* Filter and photo-source controls match the Back to Sheets purple tile. */
.results-page>.results-filters>button,.camera-choice,.gallery-choice{background:var(--brand-purple);color:var(--on-brand);border:1px solid var(--brand-purple);border-bottom:3px solid var(--brand-dark);border-radius:10px;font-weight:600;justify-content:center;text-align:center}
.results-page>.results-filters>button[aria-pressed=true]{background:var(--brand-dark);border-color:var(--brand-dark);border-bottom-color:var(--ink)}
.results-page>.results-filters>button{white-space:nowrap;overflow-wrap:normal}
.camera-choice svg,.gallery-choice svg{color:inherit}

/* One complete photo frame across capture, upload, doubts, evaluation and inspection. */
.paper-stage,.camera-stage,.review-photo-area,.doubt-paper-stage,.doubts-paper>.inspect-paper,.inspection-sheet{border:4px solid var(--brand-purple);border-radius:14px;box-sizing:border-box}
.doubt-paper-stage>.inspect-paper{border:0;border-radius:10px}

/* Final Results contains report actions, separate from the editable Evaluate list. */
.results-report-toolbar{position:sticky;top:var(--flow-hero-height,68px);z-index:6;background:var(--page);padding:4px 0 10px;flex:none}
.results-report-toolbar>.reading-primary{margin-top:0}
.result-report-action{display:flex;align-items:center;justify-content:center;min-height:44px;border:1px solid var(--brand-purple);border-bottom:3px solid var(--brand-dark);border-radius:10px;background:var(--brand-purple);color:var(--on-brand);padding:8px 10px;font-size:11px;font-weight:600;text-align:center;cursor:pointer}
.final-result-tile>.final-result-name{display:block;font-size:18px;text-align:center;margin:0}
.final-result-tile>.final-result-mark{display:table;margin:8px auto 12px;padding:4px 8px;border-radius:5px;font-size:14px;font-weight:700;white-space:nowrap}
.final-result-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.final-result-actions>.result-report-action{width:100%;min-width:0;white-space:nowrap}
@media(max-width:374px){.final-result-actions>.result-report-action{font-size:9px;padding-inline:6px}}

/* Keep an empty photo surface visible, with a single circular camera affordance. */
.paper-stage.capture-empty{position:relative;display:grid;place-items:center;width:100%;height:clamp(220px,42dvh,440px);margin:0;padding:48px 16px 16px;background:#eee7da}
.capture-empty>p{position:absolute;top:14px;left:12px;right:12px;margin:0;text-align:center;font-size:14px;color:var(--muted)}
.capture-add-camera{display:grid;place-items:center;box-sizing:border-box;width:64px;height:64px;min-width:64px;min-height:64px;padding:0;border:0;border-bottom:4px solid var(--brand-dark);border-radius:50%;background:var(--brand-purple);color:var(--on-brand);font:400 42px/1 Poppins,Arial,sans-serif;cursor:pointer}
.capture-add-camera:disabled{opacity:.45;cursor:default}

/* Shared paper topics on Reading Paper and Paper Doubts. */
.paper-topic-tags{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px 6px;flex:none;margin:4px 0 10px;padding:0 2px}
.paper-topic-label{font-size:10px;color:var(--legacy-ink-50395c,var(--brand-dark));font-weight:600}
.paper-topic-tags>.tile-tag{margin:0;padding:3px 6px;min-height:20px;max-width:100%;font-size:9px;line-height:1.3;white-space:normal;overflow-wrap:anywhere}

/* The data source stays visible while keeping the existing teacher controls. */
.live-mode-label{margin:8px 0;text-align:center}
.engine-error,.live-stage{max-width:560px;margin:16px auto;text-align:center}
.live-refresh{min-height:44px;padding:8px 16px;margin-top:12px;font:700 14px Poppins,sans-serif;color:var(--legacy-ink-6b4c7a,var(--brand));background:#FAF4E6;border:1px solid var(--brand);border-radius:12px}
#engine-base,#live-test-name{font-size:16px;max-width:100%;box-sizing:border-box}

.engine-classes .class-copy{grid-column:2}
.engine-classes .class-card>.arrow{grid-column:3}
.engine-classes .class-name{margin-bottom:6px}

.engine-paper-capture .capture-controls{grid-template-columns:repeat(2,minmax(0,1fr));flex:none}
.engine-paper-capture .capture-done{grid-column:1/-1}
.engine-paper-capture .page-change{font-size:32px;font-weight:700;line-height:1}
.engine-paper-capture>.live-mode-label{margin:4px 0;font-size:11px;flex:none}
.engine-paper-capture .live-paper-message{min-height:24px;flex:none}
.engine-paper-capture>.live-refresh{flex:none}
.engine-paper-capture .paper-image-area>p{padding:36px;text-align:center}
.doubts-page textarea{font-size:16px}
.engine-paper-capture .paper-image-area{height:clamp(180px,calc(100svh - 530px),470px)}
.engine-paper-capture .camera-stage video{height:clamp(180px,calc(100svh - 530px),470px)}

/* Engine evidence keeps its original sentence case and appears once per card. */
.engine-doubts .doubt-row,.engine-doubts .paper-question-link{text-transform:none}
.engine-doubts .doubt-row>span:last-child{min-width:0}
.engine-doubts .doubt-summary:empty{display:none}
.engine-doubts .doubt-card>.doubt-evidence{padding:0 12px 12px;margin:0;font-size:14px;line-height:1.5;text-transform:none;white-space:pre-wrap;overflow-wrap:anywhere}
.engine-doubts .paper-question-links{flex-wrap:wrap}
.engine-doubts .doubt-choice{min-width:0;white-space:normal;overflow-wrap:anywhere}

/* Live class stack, using the existing teacher colours, type and action sizes. */
.engine-stack .stack-body,.engine-stack .stack-footer,.engine-stack .stack-upload-panel,.engine-stack .stack-child-pages{width:100%;max-width:680px;margin-inline:auto}
.engine-stack .stack-match-count{text-align:center}
.engine-stack .stack-sorting{text-align:center;color:var(--action-ink);margin:12px 0}
.engine-stack .stack-whose{margin:12px 0}
.engine-stack .stack-whose h2{font-size:20px;margin:0 0 12px;text-align:center}
.engine-stack .stack-page-image{display:block;width:100%;height:auto;max-height:52svh;object-fit:contain;border:4px solid var(--brand-purple);border-radius:12px;cursor:zoom-in;background:#eee7da}
.engine-stack .stack-read-label{font-size:12px;color:var(--muted);margin:12px 0 4px}
.engine-stack .stack-read-text{font-size:16px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 12px}
.stack-candidates,.stack-picker-list{display:grid;gap:8px}
.stack-candidate{min-height:56px;padding:12px;border:1px solid rgb(var(--brand-rgb)/0.33333);border-radius:12px;background:var(--surface);color:var(--text);font:600 16px Poppins,Arial,sans-serif;white-space:normal;overflow-wrap:anywhere;text-transform:none;cursor:pointer}
.stack-small{min-height:44px;margin:8px 6px 0 0;padding:8px;border:1px solid rgb(var(--brand-rgb)/0.33333);border-radius:8px;background:var(--page);color:var(--action-ink);font:14px Poppins,Arial,sans-serif;cursor:pointer}
.engine-stack .stack-children{display:grid;gap:8px;margin-block:16px}
.engine-stack .stack-absent{font-size:14px;margin:16px 0}
.engine-stack .stack-absent ul{list-style:none}
.engine-stack .stack-footer{position:sticky;bottom:0;background:var(--page);padding:8px 0 max(8px,env(safe-area-inset-bottom));z-index:6}
.engine-stack .stack-footer .reading-primary{margin-top:8px}
.engine-stack .stack-footer button:disabled{opacity:.45}
.engine-stack .stack-blocker{font-size:14px;line-height:1.4;margin:8px 0;color:var(--muted)}
.engine-stack .stack-message{font-size:14px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere}
.engine-stack .stack-message:empty{display:none}
.engine-stack .stack-counts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;text-align:center}
.engine-stack .stack-counts p{padding:12px;border:1px solid rgb(var(--brand-rgb)/0.33333);border-radius:10px;margin:0}
.engine-stack .stack-capture-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
.engine-stack .stack-capture-choices button{min-height:56px;border-radius:12px;font:600 16px Poppins,Arial,sans-serif}
.engine-stack .stack-pending{padding:0;list-style:none}
.engine-stack .stack-pending li{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid rgb(var(--brand-rgb)/0.2);padding:8px 0}
.engine-stack .stack-pending span{min-width:0;overflow-wrap:anywhere}
.engine-stack .stack-pending button{flex:none;min-height:44px}
.engine-stack .stack-page-navigation{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0;font-size:13px}
.engine-stack.student-editor{display:block;overflow:auto}
.engine-stack .stack-child-pages{margin-top:12px}
.stack-class-picker{max-height:85dvh;overflow:auto}
@media(min-width:650px){.stack-candidates{grid-template-columns:repeat(3,minmax(0,1fr))}.engine-stack .stack-counts{grid-template-columns:repeat(4,minmax(0,1fr))}}

main.engine-stack{padding-bottom:0}
.engine-paper-capture [hidden],.engine-stack [hidden]{display:none}

.engine-stack .stack-child-pages .stack-page-image{max-height:none}
/* Engine results reuse the existing sheet viewer and report surfaces. */
.engine-results .live-result-row{flex-wrap:wrap;cursor:default}.engine-results .live-result-row .result-student{flex-basis:55%}.engine-results .live-result-row .final-result-actions{width:100%}.engine-results .live-result-row p{font-size:13px;white-space:pre-line}.engine-results .result-report-action:disabled{opacity:.65;cursor:default}.engine-results .live-results-footer{flex:none;background:var(--page);padding:8px 0 max(8px,env(safe-area-inset-bottom))}.engine-results .live-results-footer button{min-height:44px}.engine-results .live-report-gap{padding-block:8px;border-bottom:1px solid rgb(var(--brand-rgb)/0.13333)}.engine-results .live-report-gap .paper-question-link{margin:4px;min-height:44px}.engine-results .live-skill progress{width:100%;height:14px;accent-color:var(--brand-purple)}.engine-results.review-page>.live-mode-label{flex:none;margin:2px 0 6px}.engine-results .review-tabs{flex:none}.engine-results .review-image-plane>img{cursor:default}.engine-results .saved-report-section{overflow-wrap:anywhere}.engine-results .review-question-row{white-space:normal}
.engine-results.live-report-tab:has(.review-photo-area .hide-annotations)>.review-details{display:block}
.engine-results .final-result-actions>.result-report-action{white-space:normal;overflow-wrap:normal;min-height:56px;line-height:1.35}.engine-results .result-report-action:disabled{opacity:1}.engine-results .result-student>.tile-tag{color:#fff}
.engine-doubts .doubt-card{position:relative}.engine-doubts .live-doubt-page{display:flex;align-items:center;gap:10px;margin:8px 14px;max-width:100%;border:1px solid rgb(var(--brand-rgb)/0.26667);border-radius:8px;background:var(--page);padding:6px;cursor:pointer}.engine-doubts .live-doubt-page img{display:block;width:64px;height:84px;object-fit:contain}.engine-doubts .live-doubt-page span{font-size:12px}.engine-doubts .doubt-blocks{margin:8px 14px;font-size:13px;color:#A43F37}.engine-doubts .doubt-card>.tile-tag{display:inline-block;margin:6px 14px}.live-paper-total{font-size:15px;text-align:center;font-weight:600;margin:4px 0 10px}.engine-doubts .doubt-field input,.engine-doubts .doubt-field textarea{font-size:16px;max-width:100%;box-sizing:border-box}@media(min-width:650px){.engine-doubts .live-doubt-page{float:right;margin-top:0}.engine-doubts .doubt-body{clear:both}}
.engine-doubts .doubt-card:has(>.live-doubt-page){display:grid;grid-template-columns:minmax(0,1fr) 86px;align-items:start}.engine-doubts .doubt-card:has(>.live-doubt-page)>.doubt-row,.engine-doubts .doubt-card:has(>.live-doubt-page)>.doubt-evidence{grid-column:1}.engine-doubts .doubt-card>.live-doubt-page{grid-column:2;grid-row:1 / span 2;float:none;flex-direction:column;gap:4px;margin:8px 4px;padding:4px}.engine-doubts .doubt-card>.live-doubt-page span{font-size:10px}.engine-doubts .doubt-card>.doubt-body,.engine-doubts .doubt-card>.tile-tag,.engine-doubts .doubt-card>.doubt-blocks,.engine-doubts .doubt-card>.live-refresh{grid-column:1 / -1}
/* Optional live step review, using the existing explanation surfaces. */
.live-review-step{margin:10px 0;border:1px solid rgb(var(--brand-rgb)/0.26667);border-radius:10px;padding:10px;background:var(--page);overflow-wrap:anywhere}.live-review-step.is-selected{border:2px solid var(--brand-purple);padding:9px}.live-step-select{display:block;width:100%;min-height:48px;border:0;border-radius:8px;background:var(--brand-tint);color:var(--action-ink);padding:10px;text-align:left;font:600 14px var(--font);cursor:pointer}.live-step-evidence{font-size:14px;white-space:pre-wrap;line-height:1.5}.live-review-reasons{display:grid;gap:8px}.live-review-reasons button{min-height:44px;text-transform:none}.live-review-field{display:block;margin:12px 0;font-size:14px}.live-review-field span{display:block;margin-bottom:6px}.live-review-field textarea{display:block;width:100%;max-width:100%;box-sizing:border-box;font:16px var(--font);padding:10px;border:1px solid rgb(var(--brand-rgb)/0.33333);border-radius:8px;background:var(--surface);color:var(--legacy-ink-111,#111)}.live-half-marks{display:flex;align-items:center;justify-content:center;gap:16px;margin:12px 0}.live-half-marks button{min-width:48px;min-height:48px;font-size:24px}.live-half-marks output{font-size:20px;font-weight:700}.live-review-message,.live-review-preview{white-space:pre-wrap;font-size:14px;line-height:1.5}.live-review-saved{font-size:14px;font-weight:600;color:#286449}.live-change-form h3{font-size:16px}.live-review-step button:disabled{opacity:.5}.inspection-answer-content .live-review-step{font-size:14px}.teacher-name-dialog input{font-size:16px}

/* Live uses the Local tile foundations; only its extra fact groups need a wrapper. */
main[data-source="live"] p{text-align:center}
main[data-source="live"] :is(.student-row>strong,.result-student>strong,.stack-candidate){text-transform:uppercase;font-weight:700}
main[data-source="live"] .live-tile-meta{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px 6px;min-width:0}
main[data-source="live"] .live-tile-meta>.tile-tag{margin:0}
main[data-source="live"] .engine-classes .class-symbol:empty::before{content:'';width:12px;height:12px;border:2px solid currentColor;border-radius:50%}
main[data-source="live"] .stack-children .live-tile-meta{width:100%}
main[data-source="live"] .live-result-row .result-student>.live-tile-meta{grid-column:1/-1}
main[data-source="live"]:has(>.engine-classes,>.test-list)>.live-mode-label{margin:12px 0 0}
main[data-source="live"] .live-tile-meta>.tile-tag:empty{padding:0;min-height:0;background:transparent}
@media(min-width:650px){main[data-source="live"]:has(>.engine-classes,>.test-list)>.live-mode-label{margin-top:22px}}

/* L2: Live capture and class-stack docks use Local controls and own their pinned edges. */
main[data-source="live"].engine-paper-capture{display:flex;flex-direction:column}
main[data-source="live"].engine-paper-capture>.capture-workspace{flex:1 0 auto;width:100%}
main[data-source="live"].engine-paper-capture>.capture-controls{width:100%;margin-top:auto}
main[data-source="live"].engine-paper-capture>.capture-controls[hidden]{display:none}
.engine-paper-capture .page-change svg{width:24px;height:24px}
main[data-source="live"] .live-paper-message:empty{display:none}

/* A compact, still-inspectable reference leaves the doubt form in view. */
main[data-source="live"].engine-doubts .inspect-paper{height:76px}
.engine-doubts .paper-question-link::before{content:'!';margin-right:5px}
.engine-doubts .paper-question-link.answered::before{content:'✓'}
.engine-doubts .doubt-row strong{text-transform:uppercase}
.engine-doubts .doubt-kind{font:inherit}
.engine-doubts .doubt-card:has(>.live-doubt-page){display:block}
.engine-doubts .doubt-card>.doubt-prompt{padding:0 12px 12px;font-size:15px;color:var(--text)}
.engine-doubts .doubt-card>.live-doubt-page{display:flex;flex-direction:row;float:none;width:fit-content;max-width:calc(100% - 24px);margin:0 12px 10px;padding:4px 8px}
.engine-doubts .live-doubt-page img{width:28px;height:36px}
.engine-doubts .live-doubt-page span{font-size:11px}
.engine-doubts .doubts-footer>.live-refresh{margin:6px 0 0}

body.stage-path-preview>main.engine-stack.student-roster:has(>.flow-hero-shell),main[data-source="live"].engine-stack-upload{display:flex;flex-direction:column}
.engine-stack.student-roster>.stack-body,.engine-stack-upload>.stack-upload-panel{flex:1 0 auto;max-width:none}
.engine-stack .stack-body>.student-list,.engine-stack .stack-absent>.student-list{overflow:visible;min-height:0;flex:none}
.engine-stack .stack-children{gap:10px}
.engine-stack .student-row-copy{grid-column:2;grid-row:1}
.engine-stack .student-row>.student-avatar{grid-column:1;grid-row:1}
.engine-stack .student-row>.arrow{grid-column:3;grid-row:1}
.engine-stack .student-row .student-row-meta{width:auto;gap:4px}
.engine-stack .stack-footer{flex:none;max-width:none;margin-top:auto}
.engine-stack .stack-footer>.stack-match-count{font-size:12px;font-weight:400;margin:6px 0}
.engine-stack .stack-upload-action{display:block;width:100%;max-width:680px;min-height:52px;padding:10px 12px;margin:0 auto 8px;font:600 16px Poppins,Arial,sans-serif;cursor:pointer}
.engine-stack .stack-upload-footer .stack-capture-choices{position:static;padding:0;margin:0 auto 8px;max-width:680px;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.engine-stack .stack-whose>.doubt-card{padding:12px}
.engine-stack .stack-whose .stack-page-image{height:108px;max-height:none;object-fit:contain;margin-bottom:10px}
.engine-stack .stack-whose .stack-read-label{font-size:11px;margin-top:0}
.engine-stack .stack-whose .stack-read-text{font-size:14px;text-align:center}
.engine-stack .stack-whose .stack-candidates{grid-template-columns:minmax(0,1fr)}
.engine-stack .stack-sorting,.engine-stack .stack-blocker{font-size:12px;color:var(--muted);text-align:center}

.engine-stack .student-row-copy>strong{text-transform:uppercase;font-weight:700}
.engine-doubts .doubts-footer>.live-refresh{display:block;width:100%;max-width:680px;margin:0 auto 6px}

.engine-paper-capture .capture-done:has(>.sheet-chevron){position:relative;padding-inline:48px}
.engine-paper-capture .capture-done>.sheet-chevron{position:absolute;right:14px;top:50%;transform:translateY(-50%)}
/* Short doubt pages keep the same bottom dock as populated phone pages. */
main[data-source="live"].engine-doubts{display:flex;flex-direction:column}
.engine-doubts>.doubt-list{flex:1 0 auto}
.engine-doubts>:is(.class-hero,.live-mode-label,.live-paper-total,.doubts-paper,.doubts-footer){flex:none}

/* L3: Evaluate uses Local's native whole-row action and compact metadata. */
.engine-results button.live-evaluate-row{cursor:pointer}
.engine-results .live-evaluate-row .result-student>.result-meta{flex-wrap:nowrap;gap:8px}
.engine-results .live-evaluate-row .result-meta>.result-score{width:auto;flex:none;display:inline-flex}
.engine-results .live-evaluate-row .result-meta>.tile-tag{font-size:9px;min-height:20px;padding:3px 5px;white-space:nowrap}
.engine-results .live-evaluate-row .field-error{margin:8px 0 0}
.engine-results .live-evaluate-row .result-student>p:last-child{margin-bottom:0}
/* Keep the shared image plane and gesture surface intact while the paper pins. */
.engine-results.review-page>.review-paper-sticky{position:sticky;top:0;z-index:6;padding-top:0}
.engine-results .review-student-navigation>div{min-width:0;text-align:center}
.engine-results .review-final-mark{width:fit-content;margin-inline:auto}
.engine-results .review-engine-mark{margin-top:4px}
.engine-results .live-evaluate-row .result-student>p{text-transform:none}

.engine-results.review-page .review-photo-area{transition:none}

/* Long engine waits stay calm and readable without replacing the working screen. */

/* Live-only paper/doubt simplification; Local selectors above remain unchanged. */
main[data-source="live"] .live-secondary{display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;padding:8px 16px;margin:8px 6px 0 0;font:600 14px Poppins,Arial,sans-serif;text-align:center;white-space:normal;cursor:pointer;background:var(--brand-purple);color:var(--on-brand);border:1px solid var(--brand-purple);border-bottom:3px solid var(--brand-dark);border-radius:10px}
main[data-source="live"] .live-secondary:disabled{opacity:.4;cursor:default}
main[data-source="live"].engine-paper-capture>.live-secondary{flex:none}
main[data-source="live"].engine-doubts .doubt-row strong{font-size:24px;line-height:1.2}
main[data-source="live"].engine-doubts .doubt-card>.doubt-prompt{font-size:12px}
@media(min-width:650px){main[data-source="live"].engine-doubts .doubt-row strong{font-size:28px}}
main[data-source="live"].live-field-focus>:is(.doubts-paper,.doubts-footer,.capture-controls){display:none}
main[data-source="live"].engine-doubts.live-field-focus{overflow-y:auto}
main[data-source="live"].engine-doubts.live-field-focus>.doubt-list{overflow:visible;min-height:0}
main[data-source="live"].engine-doubts .doubt-field input{scroll-margin-block:12px}

/* Live field focus: do not shrink and clip the document a second time on iOS. */
body.stage-path-preview:has(>main[data-source="live"].live-field-focus){height:100%}
body.stage-path-preview>main[data-source="live"].engine-doubts.live-field-focus{height:var(--live-field-height,calc(var(--app-viewport-height,100dvh) - var(--stage-header-height,64px)))}

/* Live class stacks: plain student names and the same photo capture structure as paper. */
main:is([data-source="live"],[data-source="local"]).engine-stack .stack-children{display:flex;flex-direction:column;gap:0;padding:0;margin:12px 0}
main:is([data-source="live"],[data-source="local"]).engine-stack .stack-student-link{display:block;width:100%;min-height:44px;padding:10px 4px;border:0;border-bottom:1px solid rgb(var(--brand-rgb)/0.13333);border-radius:0;background:transparent;color:var(--action-ink);font:400 14px Poppins,Arial,sans-serif;text-align:left;cursor:pointer}
main:is([data-source="live"],[data-source="local"]).engine-stack .stack-student-link strong{font:inherit;text-transform:none}
main:is([data-source="live"],[data-source="local"]).engine-stack .stack-absent-names{list-style:none;margin:8px 0;padding:0;font-size:14px}
main:is([data-source="live"],[data-source="local"]).engine-stack .stack-absent-name{padding:6px 4px}
main:is([data-source="live"],[data-source="local"]).engine-stack-upload>.stack-upload-panel{width:100%;max-width:680px;flex:1 0 auto;margin-inline:auto}
main:is([data-source="live"],[data-source="local"]).engine-stack-upload .paper-image-area{position:relative;width:100%;height:clamp(180px,calc(100svh - 530px),470px);display:grid;place-items:center}
main:is([data-source="live"],[data-source="local"]).engine-stack-upload .paper-preview{display:block;width:100%;height:100%;object-fit:contain}
main:is([data-source="live"],[data-source="local"]).engine-stack-upload .stack-add-photo{position:absolute;left:50%;bottom:12px;transform:translateX(-50%)}
main:is([data-source="live"],[data-source="local"]).engine-stack-upload .stack-remove-draft{position:absolute;top:8px;right:8px;width:44px;height:44px;border-radius:50%;background:var(--page);font-size:28px}
main:is([data-source="live"],[data-source="local"]).engine-stack-upload .stack-file-preview{max-width:100%;padding:16px;overflow-wrap:anywhere;text-align:center}
main:is([data-source="live"],[data-source="local"]).engine-stack-upload .stack-upload-footer .stack-capture-choices{grid-template-columns:minmax(0,1fr)}
main:is([data-source="live"],[data-source="local"]).engine-stack-upload .stack-upload-footer .gallery-choice{width:100%;min-height:52px}
main:is([data-source="live"],[data-source="local"]).engine-stack-upload .capture-empty .capture-add-camera{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}
main:is([data-source="live"],[data-source="local"]).engine-stack-upload .capture-empty .paper-image-area>p{position:absolute;top:calc(50% - 72px);margin:0;text-align:center}
main:is([data-source="live"],[data-source="local"]).engine-stack-upload .paper-image-area>.paper-preview{position:absolute;inset:0;min-width:0;min-height:0;max-height:100%;width:100%;height:100%;object-fit:contain}

/* Live checking counts share one solid brand treatment. */
main[data-source="live"].engine-stack .stack-counts p{background:var(--brand-purple);color:var(--on-brand);border-color:var(--brand-purple)}

/* Live Evaluate has one centred forward action. */
main[data-source="live"].engine-results .live-results-footer{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}

/* Device class-stack controls use the Live capture geometry and touch sizes. */
.reading-success-burby { display:flex; justify-content:center; margin:8px 0 14px; }
.reading-success-burby img { display:block; width:172px; max-width:100%; height:auto; }
.local-class-stack .stack-upload-action { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; }
.local-class-stack .stack-upload-action svg { width:30px; height:30px; flex:none; }
.local-class-stack .local-stack-student-label { display:block; margin:16px 0; font-size:16px; }
.local-stack-student-label select { display:block; width:100%; min-height:48px; margin-top:6px; padding:10px; border:1px solid var(--brand); border-radius:10px; background:var(--page); color:var(--legacy-ink-000,#000); font:16px Poppins,sans-serif; }
.local-class-stack .local-stack-page-actions { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 20px; }
.local-class-stack .stack-student-link .tile-tag { margin-left:12px; }
.local-class-stack .stack-upload-footer .stack-capture-choices { grid-template-columns:1fr 1fr; }
.local-class-stack .stack-whose>.reading-primary { width:100%; margin-bottom:8px; }
.local-class-stack .live-completion { width:min(100%,360px); margin:12px auto; text-align:center; }

/* iPhone Safari: no focus zoom in device paper-details/teacher-review forms. */
main[data-source="local"] :is(input,textarea,select) { font-size:16px; }
.local-paper-details .paper-details-message:empty { display:none; }

/* stage-path.css */
/* Isolated, removable navigation preview. */
body.stage-path-preview{--stage-rail-width:96px;--stage-header-height:64px;display:grid;grid-template-columns:var(--stage-rail-width) minmax(0,1fr);grid-template-rows:auto 1fr;align-items:start}
.stage-path-preview>.topbar{grid-column:1/-1;position:sticky;top:0;z-index:15;background:var(--page)}
.stage-path-preview>main{grid-column:2;grid-row:2;width:100%;max-width:880px;margin:0 auto;padding-left:12px;padding-right:12px}
.stage-path{grid-column:1;grid-row:2;position:sticky;top:var(--stage-header-height);height:calc(100dvh - var(--stage-header-height));padding:12px 6px 12px 8px;border-right:1px solid rgb(var(--brand-rgb)/0.13333);background:var(--page);overflow-y:auto;overflow-x:hidden;z-index:8}
.stage-path-caption{font-size:10px;color:var(--legacy-ink-6b4c7a,var(--brand));margin:0 0 12px;text-align:center}
.stage-path-track{position:relative}.stage-path-pipe{position:absolute;left:14px;top:28px;bottom:28px;width:4px;border-radius:4px;background:rgb(var(--brand-rgb)/0.14902);pointer-events:none}.stage-path-pipe:before{content:'';display:block;width:100%;height:var(--stage-progress,0%);border-radius:4px;background:var(--brand-purple)}
.stage-path-buttons{display:flex;flex-direction:column;gap:6px}.stage-path-step{position:relative;width:100%;min-height:58px;display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:4px;padding:2px 0;background:transparent;border:0;color:var(--action-ink);text-align:left;font:11px Poppins,Arial,sans-serif;cursor:pointer}.stage-path-node{position:relative;justify-self:center;display:grid;place-items:center;width:26px;height:26px;border:2px solid var(--brand-soft);border-radius:50%;background:var(--page);font:700 16px Arial,sans-serif;color:#315f40}.stage-path-name{overflow-wrap:normal;line-height:1.3}.stage-path-step.is-complete .stage-path-node{background:var(--tint-green);border-color:var(--tint-green-edge)}.stage-path-step.is-current .stage-path-node{width:38px;height:38px;border:2px solid var(--brand-purple);background:var(--page)}.stage-path-step.is-current .stage-path-name{font-weight:700}.stage-path-step:disabled{color:var(--legacy-ink-8f8297,var(--absent));cursor:default;opacity:.6}.stage-path-step:not(:disabled):hover .stage-path-name{text-decoration:underline}.stage-path-step:focus-visible{outline:2px solid var(--brand-purple);outline-offset:0;border-radius:6px}.stage-teacher-face{display:block;width:34px;height:34px;border-radius:50%;background-image:url('t-mascot/welcome-v1.png');background-size:122px 122px;background-position:center 0;background-repeat:no-repeat;animation:stage-teacher-bob 2.8s ease-in-out infinite}.stage-path-step.is-current .stage-path-node{animation:stage-teacher-bob 2.8s ease-in-out infinite}.stage-path-step.is-current .stage-teacher-face{animation:none}
.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading)>div:not(.hero-illustration){width:calc(100% - 104px)}
.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading)>.hero-illustration{width:96px;right:0}
.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading) h1{font-size:23px}
.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading) .hint{font-size:16px}
.stage-path-preview .capture-controls button{font-size:15px;gap:6px}.stage-path-preview .capture-controls svg{width:24px;height:24px}.stage-path-preview .student-row{padding:10px;gap:8px}.stage-path-preview .student-row-copy strong{font-size:16px}.stage-path-preview .result-score{font-size:13px;padding:5px}.stage-path-preview .result-student strong{font-size:16px}.stage-path-preview .saved-result-row{gap:6px;padding:10px}.stage-path-preview .continue-doubts{font-size:15px;padding-left:34px;padding-right:34px}.stage-path-preview .continue-doubts .arrow{right:8px;width:26px;height:26px}
@keyframes stage-teacher-bob{0%,100%{transform:translateY(-2px)}50%{transform:translateY(2px)}}
@media(min-width:650px){body.stage-path-preview{--stage-rail-width:176px}.stage-path{padding:16px}.stage-path-caption{font-size:13px;text-align:left;margin-left:44px}.stage-path-step{grid-template-columns:40px 1fr;gap:12px;font-size:15px;min-height:64px}.stage-path-pipe{left:18px;top:32px;bottom:32px}.stage-path-node{width:30px;height:30px}.stage-path-step.is-current .stage-path-node{width:44px;height:44px}.stage-teacher-face{width:40px;height:40px;background-size:142px 142px}.stage-path-preview>main{padding-left:24px;padding-right:24px}.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading)>div:not(.hero-illustration){width:calc(100% - 188px)}.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading)>.hero-illustration{width:172px}.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading) h1{font-size:34px}.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading) .hint{font-size:24px}.stage-path-preview .result-score{font-size:15px}.stage-path-preview .result-student strong{font-size:18px}}
@media(max-height:720px){.stage-path-step{min-height:48px}.stage-path-buttons{gap:2px}.stage-path-caption{margin-bottom:6px}}
@media(prefers-reduced-motion:reduce){.stage-path-step.is-current .stage-path-node{animation:none}}

/* Stage links replace the redundant back arrow on main flow screens. */
.stage-path-preview>main :is(.welcome,.class-hero,.capture-heading,.paper-heading)>.go-back{display:none}

/* Tighter outer gutters and a centred face crop. */
body.stage-path-preview{--stage-rail-width:92px}
.stage-path{padding-left:6px;padding-right:4px}
.stage-path-preview>main{padding-left:8px;padding-right:8px}
.stage-teacher-face{background-position:calc(50% + 5px) 0}
@media(min-width:650px){body.stage-path-preview{--stage-rail-width:160px}.stage-path{padding-left:12px;padding-right:12px}.stage-path-step{gap:10px}.stage-path-preview>main{padding-left:16px;padding-right:16px}.stage-teacher-face{background-position:calc(50% + 6px) 0}}

/* Keep the flow toggle available while the stage track is collapsed. */
.stage-path-toggle{display:grid;place-items:center;width:36px;height:36px;margin:0 auto 10px;padding:6px;border:0;border-radius:8px;background:transparent;color:var(--action-ink);cursor:pointer}
.stage-path-toggle svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round}
.stage-path-toggle:hover{background:rgb(var(--brand-rgb)/0.07059)}
.stage-path-toggle:focus-visible{outline:2px solid var(--brand-purple);outline-offset:2px}
.stage-path-track[hidden]{display:none}
body.stage-path-preview.stage-path-collapsed{--stage-rail-width:48px}
.stage-path-collapsed .stage-path{padding-left:5px;padding-right:5px}
@media(min-width:650px){.stage-path-toggle{margin-left:0}.stage-path-collapsed .stage-path-toggle{margin-left:auto}}

/* The closed flow occupies no column; the toggle floats above the content. */
body.stage-path-preview{transition:grid-template-columns .3s ease}
.stage-path{border-right:0;padding:8px 6px 12px;overflow:visible}
.stage-path-toggle{position:absolute;top:8px;left:6px;margin:0;z-index:10;background:var(--page)}
.stage-path-track{width:82px;margin-top:44px;max-height:calc(100dvh - var(--stage-header-height) - 60px);overflow-y:auto;overflow-x:hidden;opacity:1;visibility:visible;transition:opacity .2s ease,visibility .2s}
.stage-path-preview>main{padding-top:48px}
body.stage-path-preview.stage-path-collapsed{--stage-rail-width:0px}
.stage-path-collapsed .stage-path{padding:0;width:0;min-width:0}
.stage-path-collapsed .stage-path-track{opacity:0;visibility:hidden;pointer-events:none}
@media(min-width:650px){.stage-path{padding-left:12px;padding-right:12px}.stage-path-toggle{left:12px}.stage-path-track{width:136px}}
@media(prefers-reduced-motion:reduce){body.stage-path-preview,.stage-path-track{transition:none}}

/* Give the moving marker its own full-width column, inside the scroll area. */
body.stage-path-preview:not(.stage-path-collapsed){--stage-rail-width:98px}
.stage-path-track{width:86px;padding-top:4px;padding-bottom:4px}
.stage-path-step{grid-template-columns:40px minmax(0,1fr);gap:4px}
.stage-path-pipe{left:18px;top:32px;bottom:32px}
.stage-path-name{overflow-wrap:anywhere}
@media(min-width:650px){body.stage-path-preview:not(.stage-path-collapsed){--stage-rail-width:160px}.stage-path-track{width:136px}.stage-path-step{grid-template-columns:48px minmax(0,1fr);gap:8px}.stage-path-pipe{left:22px;top:36px;bottom:36px}}

/* Compact, centred hero pairs across teacher screens. */
.stage-path-preview>main{padding-top:40px}
.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading){display:grid;grid-template-columns:minmax(0,1fr) 110px;align-items:center;gap:12px;width:100%;max-width:420px;height:112px;min-height:112px;padding:0;margin:0 auto 12px;overflow:hidden}
.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading)>div:not(.hero-illustration){position:static;width:auto;max-width:none;min-width:0}
.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading) h1{display:block;height:auto;font-size:28px;line-height:1.12;margin:0 0 8px;overflow-wrap:normal}
.stage-path-preview .welcome h1{font-size:32px;margin:0}
.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading) .hint{font-size:17px;line-height:1.25;margin:0}
.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading)>.hero-illustration{position:relative;top:auto;right:auto;width:110px;height:112px;align-self:start;overflow:hidden}
.stage-path-preview .hero-illustration :is(.mascot,.planning){width:220px;height:220px;left:calc(50% - 110px);top:0}
@media(min-width:650px){.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading){max-width:480px;grid-template-columns:minmax(0,1fr) 140px;gap:20px;height:132px;min-height:132px;margin-bottom:14px}.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading) h1{font-size:36px}.stage-path-preview .welcome h1{font-size:40px}.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading) .hint{font-size:21px}.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading)>.hero-illustration{width:140px;height:132px}.stage-path-preview .hero-illustration :is(.mascot,.planning){width:260px;height:260px;left:calc(50% - 130px)}}
@media(max-width:374px){.stage-path-preview:not(.stage-path-collapsed) :is(.welcome,.class-hero,.capture-heading,.paper-heading){grid-template-columns:minmax(0,1fr) 90px;gap:8px}.stage-path-preview:not(.stage-path-collapsed) :is(.welcome,.class-hero,.capture-heading,.paper-heading)>.hero-illustration{width:90px}.stage-path-preview:not(.stage-path-collapsed) :is(.welcome,.class-hero,.capture-heading,.paper-heading) h1{font-size:25px}}

.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading){grid-template-columns:minmax(0,max-content) 110px;justify-content:center}
.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading)>div:not(.hero-illustration){max-width:280px}
.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading)>.hero-illustration{max-width:none}
@media(min-width:650px){.stage-path-preview :is(.welcome,.class-hero,.capture-heading,.paper-heading){grid-template-columns:minmax(0,max-content) 140px}}
@media(max-width:374px){.stage-path-preview:not(.stage-path-collapsed) :is(.welcome,.class-hero,.capture-heading,.paper-heading){grid-template-columns:minmax(0,max-content) 90px}}

.stage-path-preview :is(.class-hero,.capture-heading,.paper-heading) h1{font-size:26px}
@media(min-width:650px){.stage-path-preview :is(.class-hero,.capture-heading,.paper-heading) h1{font-size:36px}}
@media(max-width:374px){.stage-path-preview:not(.stage-path-collapsed) :is(.class-hero,.capture-heading,.paper-heading) h1{font-size:24px}}

/* Wordmark and menu share one left alignment, without a header divider. */
.stage-path-preview>.topbar{border-bottom:0}
.stage-path-toggle{left:var(--stage-toggle-left,18px);top:0}
@media(min-width:650px){.stage-path-toggle{left:var(--stage-toggle-left,34px)}}

/* The classes title always remains one line, including beside the open menu. */
.stage-path-preview .welcome h1{white-space:nowrap}
@media(max-width:649px){.stage-path-preview:not(.stage-path-collapsed) .welcome{grid-template-columns:minmax(0,max-content) 90px;gap:8px}.stage-path-preview:not(.stage-path-collapsed) .welcome h1{font-size:clamp(20px,6vw,28px)}.stage-path-preview:not(.stage-path-collapsed) .welcome>.hero-illustration{width:90px;height:90px;align-self:center}.stage-path-preview:not(.stage-path-collapsed) .welcome .mascot{width:180px;height:180px;left:calc(50% - 90px)}}
@media(max-width:374px){.stage-path-preview:not(.stage-path-collapsed) .welcome{grid-template-columns:minmax(0,max-content) 72px}.stage-path-preview:not(.stage-path-collapsed) .welcome>.hero-illustration{width:72px;height:76px}.stage-path-preview:not(.stage-path-collapsed) .welcome .mascot{width:152px;height:152px;left:calc(50% - 76px)}}

/* All hero headings and context stay on a single line; measured sizing is shared. */
body.stage-path-preview>main :is(.welcome,.class-hero,.capture-heading,.paper-heading){grid-template-columns:minmax(0,1fr) var(--hero-mascot-width,90px);gap:var(--hero-gap,12px)}
body.stage-path-preview>main :is(.welcome,.class-hero,.capture-heading,.paper-heading)>div:not(.hero-illustration){max-width:none;width:100%}
body.stage-path-preview>main :is(.welcome,.class-hero,.capture-heading,.paper-heading) :is(h1,.hint){white-space:nowrap;overflow-wrap:normal;word-break:normal}
body.stage-path-preview>main :is(.welcome,.class-hero,.capture-heading,.paper-heading)>.hero-illustration{width:var(--hero-mascot-width,90px);height:var(--hero-crop-height,90px);align-self:center}
body.stage-path-preview>main .hero-illustration :is(.mascot,.planning){width:var(--hero-image-size,180px);height:var(--hero-image-size,180px);left:calc(50% - var(--hero-mascot-width,90px))}

/* App-bar menu: a stable leading control beside the brand, independent of rail width. */
.stage-path-preview>.topbar{padding: max(12px,env(safe-area-inset-top)) 16px 12px}
.stage-path-preview .topbar-inner{max-width:none;width:100%;gap:12px;justify-content:flex-start}
.stage-path-preview .topbar-inner>.stage-path-toggle{position:static;display:grid;flex:0 0 44px;width:44px;height:44px;margin:0;padding:10px;border-radius:10px;background:transparent}
.stage-path-preview .topbar-inner>.stage-path-toggle:hover{background:rgb(var(--brand-rgb)/0.07059)}
.stage-path-preview .topbar-inner>.wordmark{width:min(174px,45vw);flex:none;margin-right:auto}
.stage-path-preview .topbar-inner>.role{flex:none}
.stage-path-preview>main{padding-top:12px}
.stage-path-track{margin-top:0;max-height:calc(100dvh - var(--stage-header-height) - 24px)}
@media(min-width:650px){.stage-path-preview>.topbar{padding: max(16px,env(safe-area-inset-top)) 16px 16px}.stage-path-preview .topbar-inner>.wordmark{width:210px}}

.stage-path-name{white-space:nowrap;overflow-wrap:normal}
@media(max-width:649px){.stage-path-step{font-size:9px;letter-spacing:0;gap:2px;grid-template-columns:38px minmax(0,1fr)}}

/* The original hero pair contracts inside a shared sticky parent. */
body.stage-path-preview>main>.flow-hero-shell{position:sticky;top:0;z-index:7;height:112px;margin:0 0 12px;background:var(--page);overflow:clip;overflow-anchor:none}
body.stage-path-preview>main>.flow-hero-shell>:is(.welcome,.class-hero,.capture-heading,.paper-heading){position:absolute;left:50%;top:50%;margin:0;transform:translate(-50%,-50%) scale(var(--flow-hero-scale,1));transform-origin:center;will-change:transform}
@media(min-width:650px){body.stage-path-preview>main>.flow-hero-shell{height:132px;margin-bottom:14px}}

/* Flush each collapsing hero to the app bar with no scrolling-tile strip. */
body.stage-path-preview>main:has(>.flow-hero-shell){padding-top:0}
body.stage-path-preview>main>.flow-hero-shell{margin-bottom:0}

/* Roster/results use the same page scroll as the hero, rather than a nested list. */
body.stage-path-preview>main:is(.student-roster,.results-page):has(>.flow-hero-shell){display:block}
body.stage-path-preview>main:has(>.flow-hero-shell)>.flow-hero-shell{flex:none}
body.stage-path-preview>main:has(>.flow-hero-shell)>:is(.student-list,.saved-results-list){overflow:visible;flex:none}
body.stage-path-preview>main.student-roster:has(>.flow-hero-shell)>.student-roster-footer{position:sticky;bottom:0;z-index:5;background:var(--page);padding-bottom:max(8px,env(safe-area-inset-bottom))}

/* Review's shrinking sheet reference meets the app bar without a content-leak strip. */
body.stage-path-preview>main.review-page{padding-top:0}
body.stage-path-preview>main.review-page>.review-paper-sticky{padding-top:0}

/* Scroll padding belongs inside pinned panels, never outside their viewport boundary. */
body.stage-path-preview>main:has(>:is(.student-roster-footer,.capture-controls,.student-editor-controls,.doubts-footer)){padding-bottom:0}
body.stage-path-preview>main>:is(.student-roster-footer,.capture-controls,.student-editor-controls,.doubts-footer){bottom:0;margin-bottom:0;padding-bottom:max(8px,env(safe-area-inset-bottom));background:var(--page);isolation:isolate}
/* Doubts uses the same flush sheet boundary as Review, without changing its scroll model. */
body.stage-path-preview>main.doubts-page{padding-top:0}
body.stage-path-preview>main.doubts-page>.doubts-paper{padding-top:0}
/* Empty capture status should not create a second blank footer after the actions. */
body.stage-path-preview>main>.capture-message:empty{display:none}

/* One app scroll area: keyboard resizing must not scroll the logo off the document. */
html:has(>body.stage-path-preview){height:100%;overflow:hidden}
body.stage-path-preview{height:var(--app-viewport-height,100dvh);min-height:0;overflow:hidden;grid-template-rows:auto minmax(0,1fr)}
body.stage-path-preview>main{height:calc(var(--app-viewport-height,100dvh) - var(--stage-header-height,64px));min-height:0}

/* Focus uses an inset tint, never an extra outside stroke on app buttons. */
body button:focus,body button:focus-visible{outline:none}
body button:focus-visible{box-shadow:inset 0 0 0 100vmax rgb(var(--brand-rgb)/0.09412)}
body .test-tile:has(.test-action:focus-visible){outline:none;background:var(--brand-tint)}
/* Answer-selection outlines carry meaning independently of keyboard focus. */
body button.sheet-annotation:focus,body button.sheet-annotation:focus-visible{outline:none;box-shadow:none}

/* Current heroes are compact text only; no image column or reserved mascot space. */
body.stage-path-preview>main :is(.welcome,.class-hero,.capture-heading,.paper-heading){grid-template-columns:minmax(0,1fr);gap:0;min-height:0;max-width:none;padding:8px 0;margin:0 auto 8px}
body.stage-path-preview>main :is(.welcome,.class-hero,.capture-heading,.paper-heading)>div:not(.hero-illustration){display:flex;flex-direction:column;justify-content:center;gap:4px;max-width:none;width:100%;text-align:center}
body.stage-path-preview>main :is(.welcome,.class-hero,.capture-heading,.paper-heading) h1{line-height:1.2;margin:0;height:auto}
body.stage-path-preview>main :is(.welcome,.class-hero,.capture-heading,.paper-heading) .hint{line-height:1.35;margin:0;white-space:normal;overflow-wrap:anywhere}
body.stage-path-preview>main>.flow-hero-shell{height:68px}
body.stage-path-preview>main>.flow-hero-shell>:is(.welcome,.class-hero,.capture-heading,.paper-heading){margin:0}
body.stage-path-preview>main:has(>:is(.welcome,.class-hero,.capture-heading,.paper-heading)){padding-top:0}
.stage-path-step.is-current .stage-path-node{animation:none}
@media(min-width:650px){body.stage-path-preview>main>.flow-hero-shell{height:76px}}

/* Review return action shares the title's vertical centre without shifting either horizontally. */
body.stage-path-preview>main.review-page>.review-heading-with-back{position:relative;margin-bottom:4px}
body.stage-path-preview>main .review-heading-with-back>div:first-of-type{align-items:center}
body.stage-path-preview>main .review-heading-with-back>.individual-list-navigation{position:absolute;left:0;transform:translateY(-50%);display:flex;flex-direction:row;width:auto;max-width:none;min-height:44px;margin:0;gap:0;z-index:1}
.review-page .review-student-navigation{margin-bottom:4px;gap:6px}
.review-page .review-final-mark{font-size:16px;line-height:1.3;padding:2px 8px}
.review-page .review-engine-mark{margin-top:2px;line-height:1.3}
.review-page .saved-review-warning{font-size:10px;line-height:1.3;margin-bottom:4px}
@media(max-width:649px){body.stage-path-preview>main .review-heading-with-back>.individual-list-navigation>.icon-button{width:64px;padding:4px 0;gap:1px;font-size:11px}.review-heading-with-back .individual-list-navigation .sheet-chevron{width:20px;height:24px}}

body.stage-path-preview>main .review-heading-with-back>.individual-list-navigation{width:fit-content;justify-content:flex-start;flex-direction:row}

/* Live Burby SVG centred between the menu and role with equal horizontal gaps. */
body.stage-path-preview .topbar-inner{display:grid;grid-template-columns:44px minmax(0,1fr) max-content;align-items:center;gap:12px}
body.stage-path-preview .topbar-inner>.wordmark{display:block;width:clamp(190px,50vw,240px);max-width:100%;height:auto;margin:0;justify-self:center;mix-blend-mode:normal}
body.stage-path-preview .topbar-inner>.role{justify-self:end;margin:0}
@media(max-width:374px){body.stage-path-preview .topbar-inner{gap:8px}.stage-path-preview .topbar-inner>.role{font-size:12px}}

/* Reserved account space until account functionality is connected. */
.stage-path-preview .topbar-inner>.account-placeholder{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:rgb(var(--brand-rgb)/0.07059);color:var(--action-ink)}
.account-placeholder>svg{width:24px;height:24px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

body.stage-path-preview>main.student-editor>.review-heading-with-back{position:relative;margin-bottom:4px}

/* Compact horizontal journey replaces the side rail at every viewport size. */
body.stage-path-preview.compact-journey-app{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);--stage-rail-width:0px}
.compact-journey-app>.topbar{grid-column:1;grid-row:1}
.compact-journey-app>.test-journey{grid-column:1;grid-row:2}
body.stage-path-preview.compact-journey-app>main{grid-column:1;grid-row:3;max-width:880px}
.test-journey{display:grid;grid-template-rows:0fr;opacity:0;background:var(--page);transition:grid-template-rows 260ms cubic-bezier(.22,1,.36,1),opacity 180ms ease;z-index:10}
.test-journey.is-visible{grid-template-rows:1fr;opacity:1}
.journey-clip{overflow:hidden;min-height:0}
.journey-track{display:grid;grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr) 12px minmax(0,1fr);align-items:center;max-width:680px;margin:0 auto;padding:0 12px 4px;height:32px}
.journey-step{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:28px;border:0;border-radius:6px;background:transparent;padding:2px 3px;font-size:10px;color:var(--legacy-ink-786c7e,var(--muted));white-space:nowrap;cursor:pointer}
.journey-node{display:grid;place-items:center;width:14px;height:14px;flex:none;border:1px solid rgb(var(--brand-rgb)/0.31373);border-radius:50%;font-size:8px;line-height:1}
.journey-step.is-current{font-weight:700;color:var(--action-ink)}
.journey-step.is-current .journey-node{background:var(--brand-purple);border-color:var(--brand-purple);color:var(--on-brand)}
.journey-step.is-complete{color:var(--action-ink)}
.journey-step:disabled{opacity:.4;cursor:default}
.journey-connector{height:1px;background:rgb(var(--brand-rgb)/0.25098)}
.teacher-app-menu{position:absolute;top:100%;left:16px;z-index:30;display:grid;gap:4px;min-width:180px;padding:8px;background:var(--page);border:1px solid rgb(var(--brand-rgb)/0.20784);border-radius:10px}
.teacher-app-menu[hidden]{display:none}
.teacher-app-menu button{padding:10px;border:0;border-radius:6px;text-align:left;background:transparent;color:var(--action-ink);font-size:13px;cursor:pointer}
.teacher-app-menu button:hover{background:rgb(var(--brand-rgb)/0.07059)}
/* Reuse the same centred-title/left-Back layout on every non-home flow screen. */
body.stage-path-preview>main>.review-heading-with-back{position:relative;margin-bottom:4px}
.individual-list-navigation>.go-back{position:static;display:inline-flex;top:auto;left:auto}
@media(max-width:374px){.journey-track{padding-inline:8px;grid-template-columns:minmax(0,1fr) 8px minmax(0,1fr) 8px minmax(0,1fr)}.journey-step{font-size:9px;gap:3px}.journey-node{width:12px;height:12px;font-size:7px}}
@media(prefers-reduced-motion:reduce){.test-journey{transition:none}}

/* Mobile-first journey pipe: major and minor steps share one horizontal baseline. */
.test-journey{transition:grid-template-rows 900ms cubic-bezier(.4,0,.2,1),opacity 650ms ease 100ms}
.journey-track{position:relative;isolation:isolate;grid-template-columns:repeat(72,minmax(0,1fr));align-items:start;max-width:none;width:100%;height:56px;padding:2px 6px 5px;gap:0}
.journey-track::before{content:'';position:absolute;z-index:-1;left:calc((100% - 12px)/12 + 6px);right:calc((100% - 12px)/12 + 6px);top:11px;height:6px;border-radius:6px;background:var(--brand-purple);transform:scaleX(0);transform-origin:left;transition:transform 1000ms cubic-bezier(.4,0,.2,1) 100ms}
.is-visible .journey-track::before{transform:scaleX(1)}
.journey-step{display:grid;grid-template-rows:24px auto;justify-items:center;align-items:start;align-content:start;min-height:44px;width:100%;padding:0 1px;gap:3px;background:transparent;color:var(--action-ink);border-radius:4px;white-space:normal;opacity:1;--journey-dot-size:16px}
/* Equal main-stage centres: 1/12, 1/2, 11/12. Minor steps divide each interval. */
.journey-track>.journey-step{grid-row:1;grid-column:span 12}
.journey-track>[data-stage="paper"]{grid-column:1 / span 12}
.journey-track>[data-stage="reading"]{grid-column:11 / span 12}
.journey-track>[data-stage="doubts"]{grid-column:21 / span 12}
.journey-track>[data-stage="sheets"]{grid-column:31 / span 12}
.journey-track>[data-stage="evaluate"]{grid-column:46 / span 12}
.journey-track>[data-stage="results"]{grid-column:61 / span 12}
.journey-step.journey-minor{--journey-dot-size:7px}
.journey-node-slot{position:relative;display:grid;place-items:center;width:100%;height:24px}
.journey-node-slot::before{content:'';position:absolute;width:calc(var(--journey-dot-size) + 6px);height:calc(var(--journey-dot-size) + 6px);border-radius:50%;background:var(--page)}
.journey-step .journey-node{position:relative;display:block;flex:none;width:var(--journey-dot-size);height:var(--journey-dot-size);border:0;border-radius:50%;background:var(--brand-purple);opacity:.25;transition:opacity 450ms ease}
.journey-label{display:block;max-width:100%;font-size:9px;font-weight:700;line-height:1.15;text-align:center;opacity:.28;transition:opacity 450ms ease}
.journey-minor .journey-label{font-size:7.5px;font-weight:400}
.journey-step.is-current .journey-node,.journey-step.is-current .journey-label{opacity:1}
.journey-step:disabled{opacity:1}
@media(min-width:390px){.journey-label{font-size:10px}.journey-minor .journey-label{font-size:8px}}
@media(prefers-reduced-motion:reduce){.test-journey,.journey-track::before,.journey-node,.journey-label{transition:none}}

/* Align controls with the visible wordmark, preserving Burby's animation headroom. */
body.stage-path-preview .topbar-inner{grid-template-columns:48px minmax(0,1fr) 48px}
body.stage-path-preview .topbar-inner>.stage-path-toggle,body.stage-path-preview .topbar-inner>.account-placeholder{position:relative;left:auto;right:auto;top:var(--wordmark-optical-offset,16px);width:48px;height:48px;align-self:center}
body.stage-path-preview .topbar-inner>.stage-path-toggle{padding:8px}
body.stage-path-preview .topbar-inner>.stage-path-toggle>svg{width:30px;height:30px}
body.stage-path-preview .topbar-inner>.account-placeholder>svg{width:28px;height:28px}

/* Clearer app-menu edges, labels and option separation. */
.teacher-app-menu{border:2px solid var(--brand-purple);gap:0}
.teacher-app-menu button{min-height:44px;font-size:14px;font-weight:600;line-height:1.35;color:var(--legacy-ink-50395c,var(--brand-dark));border-radius:0}
.teacher-app-menu button+button{border-top:1px solid rgb(var(--brand-rgb)/0.50196)}
.teacher-app-menu button:first-child{border-radius:5px 5px 0 0}
.teacher-app-menu button:last-child{border-radius:0 0 5px 5px}

/* class-report.css */
/* Report chapters share the teacher app's tokens, hero, chevrons and button press
 * behaviour. All distances follow an 8px grid; desk targets are at least 44px. */
main.class-report-page{padding-inline:16px;padding-bottom:max(24px,env(safe-area-inset-bottom));overflow-x:hidden}
.report-provenance{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;margin:8px 0 16px;font-size:11px;font-weight:500;text-align:center}
.report-source-tag{display:inline-flex;align-items:center;padding:4px 8px;border-radius:8px;background:var(--brand-purple);color:var(--on-brand);text-transform:uppercase;font-size:10px;letter-spacing:.5px;font-weight:700}
.report-test-context{min-width:0;overflow-wrap:anywhere}
.report-chapters{display:grid;gap:16px}
.report-chapter{min-width:0;border-radius:16px;background:var(--surface);padding:16px}
.report-chapter h2{margin:0 0 16px;color:var(--action-ink);font-size:21px;font-weight:700;line-height:1.3;letter-spacing:-.5px;text-align:center;text-transform:none}
.report-room{padding:0 0 8px}
.report-chalkboard{width:64%;height:32px;margin:0 auto 16px;border:4px solid color-mix(in srgb,var(--brand-purple) 65%,var(--page));border-bottom-width:6px;border-radius:4px;background:var(--brand-purple);display:grid;place-items:center;color:#ffffff42}
.report-chalkboard svg{width:72%;height:16px}
.report-desks{display:grid;grid-template-columns:repeat(var(--desk-columns,6),minmax(0,1fr));gap:4px}
.report-desk{position:relative;width:100%;min-width:0;min-height:44px;height:44px;padding:4px 2px 8px;border:0;border-radius:8px;background:transparent;cursor:pointer;color:var(--report-band-color,var(--muted));isolation:isolate}
.report-desk-top{display:flex;align-items:center;justify-content:center;height:30px;border-radius:6px;background:var(--report-band-color);color:var(--surface);font-size:15px;font-weight:700;line-height:1}
.report-desk::before,.report-desk::after{content:'';position:absolute;z-index:-1;bottom:4px;width:4px;height:12px;border-radius:2px;background:var(--report-band-color)}
.report-desk::before{left:8px}.report-desk::after{right:8px}
.report-desk:is(:hover,:focus-visible),.report-desk[aria-expanded=true]{background:color-mix(in srgb,var(--brand-purple) 12%,transparent)}
.report-desk:focus-visible{outline:0;box-shadow:inset 0 0 0 2px var(--brand-purple)}
.report-desk.report-band-absent .report-desk-top{border:1.5px dashed var(--report-band-color);background:transparent;color:var(--report-band-color)}
.report-desk.report-band-absent::before,.report-desk.report-band-absent::after{background:transparent}
.report-band-high{--report-band-color:var(--marks-strong)}.report-band-middle{--report-band-color:var(--marks-middle)}.report-band-low{--report-band-color:var(--marks-help)}.report-band-absent,.report-band-neutral{--report-band-color:#727272}
.report-band-neutral .report-desk-top{background:var(--page);color:var(--muted);border:1px solid #727272}
.report-band-pills{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:8px 0 0;padding:0;list-style:none}
.report-band-pills li{display:flex;align-items:center;justify-content:flex-start;gap:8px;min-height:32px;min-width:0;font-size:11px;line-height:1.2;font-weight:500;border-radius:16px;padding:4px 8px;background:color-mix(in srgb,var(--report-band-color) 10%,var(--surface))}
.report-pill-glyph{display:grid;place-items:center;flex:none;width:20px;height:20px;border-radius:50%;background:var(--report-band-color);color:var(--surface);font-size:12px;font-weight:700}
.report-band-absent .report-pill-glyph{border:1.5px dashed var(--report-band-color);background:transparent;color:var(--report-band-color)}
.report-average{display:flex;align-items:center;justify-content:center;gap:24px;padding:8px 24px}
.report-average h2{font-size:18px;margin:0;max-width:120px;text-align:left;color:var(--text)}
.report-gauge{position:relative;width:128px;height:128px;flex:none}
.report-gauge svg{width:100%;height:100%;transform:rotate(-90deg)}
.report-gauge circle{fill:none;stroke-width:10}
.report-gauge-track{stroke:color-mix(in srgb,var(--brand-purple) 12%,var(--surface))}
.report-gauge-fill{stroke:var(--brand-purple);stroke-linecap:round;stroke-dasharray:0 100}
.report-big-number{position:absolute;inset:0;display:grid;place-items:center;font:700 32px/1 var(--font);font-variant-numeric:tabular-nums;color:var(--action-ink);letter-spacing:-1px}
.report-student-detail{grid-column:1/-1;position:relative;display:grid;gap:8px;margin:8px 0;padding:16px 40px 16px 16px;background:var(--page);border-radius:12px;font-size:12px;scroll-margin-block:16px;overflow-wrap:anywhere}
.report-student-detail[hidden]{display:none}.report-student-detail strong,.report-student-detail div>span{display:block}.report-student-detail strong{font-size:15px;margin-bottom:4px}.report-sheet-link{font-size:11px;color:var(--muted)}a.report-sheet-link{display:flex;align-items:center;min-height:44px;color:var(--action-ink);font-weight:700;text-decoration:underline;text-underline-offset:3px;text-transform:uppercase}
.report-detail-close{position:absolute;right:0;top:0;width:44px;height:44px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--action-ink);font-size:24px;cursor:pointer}
.report-enter .report-chapter{animation:report-chapter-in 320ms ease-out both}.report-enter .report-average{animation-delay:80ms}
.report-enter .report-desk-top{animation:report-desk-in 240ms ease-out both;animation-delay:calc(var(--desk-row,0)*40ms)}
@keyframes report-chapter-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes report-desk-in{from{opacity:.12}to{opacity:1}}
@media(min-width:650px){main.class-report-page{padding-inline:32px}.report-provenance{font-size:13px;margin-bottom:24px}.report-chapter{padding:24px}.report-chapter h2{font-size:26px;margin-bottom:24px}.report-chalkboard{height:40px;max-width:320px;margin-bottom:24px}.report-desks{gap:8px 4px}.report-band-pills{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:16px}.report-band-pills li{font-size:11px}.report-average{padding:16px;gap:32px}.report-average h2{font-size:22px;max-width:none}.report-gauge{width:144px;height:144px}.report-big-number{font-size:40px}.report-student-detail{font-size:14px}}
@media(prefers-reduced-motion:reduce){.report-chapters *{animation:none;transition:none}}

/* Maths topic chapter: the icon and disclosure stay brand-purple. Only the
 * percentage, bar and evidenced attainment state use performance colours. */
.report-topics{scroll-margin-top:var(--flow-hero-height,68px)}
.report-topic-row{border-radius:12px;overflow:hidden}
.report-topic-row+.report-topic-row{margin-top:8px}
.report-topic-teach{background:var(--tint-red)}
.report-topic-toggle{display:grid;grid-template-columns:40px minmax(0,1fr) auto 20px;gap:8px;align-items:center;width:100%;min-height:112px;border:0;border-radius:12px;padding:16px 8px;background:transparent;cursor:pointer;text-align:left;text-transform:none;color:var(--text)}
.report-topic-toggle:is(:hover,:focus-visible){background:color-mix(in srgb,var(--brand-purple) 5%,transparent)}
.report-topic-toggle:focus-visible{outline:0;box-shadow:inset 0 0 0 2px var(--brand-purple)}
.report-topic-icon{grid-column:1;grid-row:1/3;width:40px;height:40px;display:grid;place-items:center;color:var(--action-ink);background:color-mix(in srgb,var(--brand-purple) 7%,var(--surface));border-radius:12px}
.maths-topic-icon{display:block;width:32px;height:32px;flex:none;color:var(--action-ink)}
.report-topic-name{grid-column:2;grid-row:1;font-size:15px;line-height:1.3;font-weight:700;min-width:0;overflow-wrap:anywhere;text-align:left}
.report-topic-number{grid-column:3;grid-row:1;font:700 28px/1 var(--font);font-variant-numeric:tabular-nums;letter-spacing:-1px;color:var(--report-band-color);text-align:right}
.report-topic-chevron{grid-column:4;grid-row:1/3;color:var(--action-ink);display:flex;justify-content:center;transform:rotate(90deg)}
.report-topic-chevron .arrow{width:20px;height:24px}
.report-topic-toggle[aria-expanded=true] .report-topic-chevron{transform:rotate(-90deg)}
.report-topic-track{grid-column:2/4;grid-row:2;display:block;height:16px;border-radius:16px;background:color-mix(in srgb,var(--brand-purple) 8%,var(--surface));overflow:hidden}
.report-topic-track>span{display:block;height:100%;border-radius:inherit;background:var(--report-band-color)}
.report-topic-status{grid-column:2/4;display:flex;align-items:center;gap:8px;font-size:10px;line-height:1.2;font-weight:500;color:var(--muted)}
.report-topic-status>span:first-child{color:var(--report-band-color);font-size:12px;font-weight:700}
.report-teach-tag{grid-column:2/4;justify-self:start;border-radius:8px;padding:4px 8px;font:700 10px/1.3 var(--font);letter-spacing:.3px;background:var(--surface);color:var(--marks-help)}
.report-topic-students{padding:8px 16px 16px;border-top:1px solid color-mix(in srgb,var(--brand-purple) 10%,transparent)}
.report-topic-students[hidden]{display:none}
.report-topic-students p,.report-topic-empty{font-size:12px;line-height:1.5;font-weight:500;margin:0 0 8px}
.report-topic-students ul{display:flex;flex-wrap:wrap;gap:8px;padding:0;margin:0;list-style:none}
.report-topic-roll,.report-topic-no-roll{display:grid;place-items:center;min-width:40px;min-height:40px;padding:8px;border-radius:50%;background:var(--marks-help);color:var(--surface);font-size:14px;font-weight:700;font-variant-numeric:tabular-nums}
.report-topic-no-roll{border-radius:12px;font-size:11px}
.report-enter .report-topics{animation-delay:160ms}
@media(min-width:650px){.report-topic-toggle{grid-template-columns:48px minmax(0,1fr) auto 24px;gap:8px 16px;padding:16px;min-height:120px}.report-topic-icon{height:48px;width:48px}.report-topic-name{font-size:19px}.report-topic-number{font-size:36px}.report-topic-status{font-size:12px}.report-topic-students{padding:16px 24px}.report-topic-students p{font-size:14px}}
/* Short landscape tablets keep all four sample rows beneath the pinned hero. */
@media(min-width:900px) and (max-height:850px){.report-topics{padding:16px 24px}.report-topics h2{font-size:24px;margin-bottom:16px}.report-topic-toggle{min-height:96px;padding-block:8px}.report-topic-number{font-size:32px}.report-topic-status{font-size:11px}}

/* Shared mistake: only the cropped canvas enters the page. The source photograph
 * is never used as an <img> or a CSS background in this chapter. */
.report-mistake-toggle{display:block;position:relative;width:100%;padding:0 0 8px;border:0;border-radius:12px;background:transparent;text-transform:none;cursor:pointer}
.report-mistake-toggle:focus-visible{outline:0;box-shadow:inset 0 0 0 2px var(--brand-purple)}
.report-notebook-crop{padding:16px;min-height:112px;border-radius:12px;overflow:hidden;background:repeating-linear-gradient(0deg,transparent 0,transparent 23px,rgb(var(--brand-rgb)/0.07843) 23px,rgb(var(--brand-rgb)/0.07843) 24px),var(--surface);border:1px solid rgb(var(--brand-rgb)/0.12549)}
.report-notebook-crop canvas{display:block;width:100%;height:auto;background:var(--surface)}
.report-notebook-crop>svg{display:block;width:100%;height:auto}
.report-illustration-label{display:table;margin:0 0 8px;font-size:9px}
.report-sample-writing{font:italic 24px cursive;fill:var(--ink)}.report-sample-cross{fill:none;stroke:var(--marks-help);stroke-width:3;stroke-linecap:round}.report-sample-correct{font:italic 27px cursive;fill:var(--marks-strong)}
.report-crop-status{display:block;font-size:12px;line-height:1.5;color:var(--muted);text-align:center;padding:24px 8px}
.report-mistake-count{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:80px;height:80px;margin:8px 8px 8px auto;border-radius:50%;background:color-mix(in srgb,var(--brand-purple) 10%,var(--surface));color:var(--action-ink);font-size:11px;font-weight:500}
.report-mistake-count strong{font:700 30px/1.1 var(--font);font-variant-numeric:tabular-nums}
.report-mistake-caption{display:block;text-align:center;font-size:17px;line-height:1.4;font-weight:700;color:var(--text);margin:0;padding:0 24px}
.report-mistake-disclosure{display:flex;justify-content:center;transform:rotate(90deg);color:var(--action-ink);margin-top:8px}.report-mistake-disclosure .arrow{width:24px;height:24px}.report-mistake-toggle[aria-expanded=true] .report-mistake-disclosure{transform:rotate(-90deg)}
.report-mistake-detail{border-top:1px solid rgb(var(--brand-rgb)/0.12549);margin-top:8px;padding-top:16px;font-size:12px;line-height:1.5}.report-mistake-detail[hidden]{display:none}.report-mistake-detail>p{margin:0 0 8px}.report-mistake-example{font-weight:700}.report-mistake-pupils{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:0 0 16px}.report-mistake-detail summary{color:var(--action-ink);cursor:pointer;min-height:44px;display:flex;align-items:center;text-decoration:underline;text-underline-offset:3px}.report-mistake-detail details ul{margin:0 0 16px;padding-left:20px}.report-mistake-detail details li+li{margin-top:8px}
.report-no-mistake{display:grid;place-items:center;padding:16px;color:var(--action-ink)}.report-no-mistake svg{height:80px;width:80px}.report-no-mistake+.report-mistake-caption{font-weight:500;font-size:15px;padding-bottom:16px}
.report-enter .report-mistake{animation-delay:240ms}
@media(min-width:650px){.report-notebook-crop{padding:24px}.report-notebook-crop>svg{max-width:480px;margin:auto}.report-mistake-count{width:88px;height:88px}.report-mistake-caption{font-size:21px}.report-mistake-detail{font-size:14px}}
.report-local-preview-link{flex-basis:100%;display:flex;align-items:center;justify-content:center;min-height:44px;color:var(--action-ink);font-size:11px;font-weight:500;text-decoration:underline;text-underline-offset:3px}

/* Roll identifiers carry evidenced attainment, never points or rewards. */
.report-help-pupils{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px 8px;list-style:none;padding:0;margin:0 0 24px}
.report-help-student{display:flex;flex-direction:column;align-items:center;gap:8px;width:100%;min-height:88px;border:0;padding:4px 0;background:transparent;border-radius:12px;cursor:pointer;text-transform:none;color:var(--text)}
.report-help-roll{display:grid;place-items:center;width:48px;height:48px;background:var(--marks-help);color:var(--surface);border-radius:50%;font:700 23px/1 var(--font);font-variant-numeric:tabular-nums}
.report-help-name{max-width:100%;font-size:12px;font-weight:500;overflow-wrap:anywhere}
.report-help-student:focus-visible{outline:0;box-shadow:inset 0 0 0 2px var(--brand-purple)}
.report-support-caption{margin:0;text-align:center;font-size:13px;font-weight:500;line-height:1.5;overflow-wrap:anywhere}
.report-help-clear{display:flex;justify-content:center;color:var(--action-ink);margin-bottom:16px}.report-help-clear svg{height:64px;width:80px}
.report-growth-arrow{display:block;width:100%;max-width:560px;margin:-8px auto 0;overflow:visible}
.report-growth-path{fill:none;stroke:var(--brand-purple);stroke-width:5;stroke-linecap:round;stroke-linejoin:round}
.report-growth-arrow circle{fill:var(--marks-strong);stroke:var(--surface);stroke-width:2}
.report-growth-arrow text{fill:var(--surface);font:700 14px var(--font);text-anchor:middle;font-variant-numeric:tabular-nums}
.report-improvement-pending{background:transparent;padding-block:8px}.report-improvement-pending h2{font-size:17px;margin-bottom:8px}.report-improvement-pending p{color:var(--muted);font-size:12px}
.report-actions{display:grid;gap:8px}.report-actions .reading-primary{margin-top:8px;max-width:none}.report-all-students{display:flex;align-items:center;justify-content:center;min-height:48px;color:var(--action-ink);font-size:11px;font-weight:500;text-decoration:underline;text-underline-offset:4px}
.report-preview-dialog{max-width:560px;max-height:calc(100dvh - 32px);padding:24px;overflow:auto;overscroll-behavior:contain}.report-preview-dialog h2{font-size:23px;line-height:1.3;color:var(--action-ink)}.report-preview-dialog h3{font-size:18px;margin:0 0 8px;overflow-wrap:anywhere}.report-preview-dialog .report-dialog-source{font-size:11px;color:var(--action-ink);margin-bottom:24px}.report-preview-dialog p{font-size:13px}.report-preview-dialog .report-preview-notice{padding:12px;border-radius:12px;background:rgb(var(--brand-rgb)/0.06275);font-weight:700;color:var(--action-ink)}
.report-student-topics,.report-practice-recipients{display:grid;gap:16px;list-style:none;margin:0;padding:0}.report-student-topics li,.report-practice-recipients li{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere;font-size:13px;padding-bottom:16px;border-bottom:1px solid rgb(var(--brand-rgb)/0.09412)}.report-student-topics li span{color:var(--report-band-color);font-size:12px}.report-practice-recipients li span{font-size:12px;line-height:1.5}.report-dialog-close{display:block;margin:24px 0 0;min-height:48px;width:100%;background:transparent;border:1px solid rgb(var(--brand-rgb)/0.31373);border-radius:12px;color:var(--action-ink);font:700 13px var(--font);cursor:pointer}
.report-enter .report-help{animation-delay:320ms}.report-enter .report-improved{animation-delay:400ms}
@media(min-width:650px){.report-help-pupils{grid-template-columns:repeat(8,minmax(0,1fr));gap:16px 8px}.report-help-roll{width:56px;height:56px;font-size:26px}.report-help-name{font-size:13px}.report-support-caption{font-size:15px}.report-improvement-pending h2{font-size:20px}}
/* Keep dismissal reachable while a long recipient preview scrolls inside. */
.report-preview-dialog[open]{display:flex;flex-direction:column;overflow:hidden}.report-preview-dialog>h2,.report-preview-dialog>.report-dialog-source,.report-preview-dialog>.report-dialog-close{flex:none}.report-dialog-body{min-height:0;overflow:auto;overscroll-behavior:contain}.report-preview-dialog>.report-dialog-close{margin-top:16px}
.report-actions .report-practice-button{font-size:14px}
@media(max-width:374px){.report-actions .report-practice-button{font-size:12px}}
@media(min-width:650px){.report-actions .report-practice-button{font-size:16px}.report-growth-arrow{max-width:480px}}

/* Batch 6: fixed desk geometry and name-first identities. Ink variants retain
 * the approved performance fills while meeting 4.5:1 for small text. */
.report-band-high{--report-band-ink:#216650;--report-on-band:#000}
.report-band-middle{--report-band-ink:#795609;--report-on-band:#000}
.report-band-low{--report-band-ink:#9D392E;--report-on-band:#fff}
.report-band-absent,.report-band-neutral{--report-band-ink:#555;--report-on-band:#fff}
.class-report-page{scroll-padding-top:calc(var(--flow-hero-height,68px) + 16px)}
.class-report-page :is(button,a,summary){scroll-margin-block:calc(var(--flow-hero-height,68px) + 16px) 24px}
.report-desk-top{gap:4px;padding-inline:4px;color:var(--report-on-band);font-size:12px}
.report-desk-glyph{flex:none;font-size:12px;line-height:1}
.report-desk-label{min-width:0;font:700 12px/1.2 var(--font);white-space:nowrap}
.report-pill-glyph{color:var(--report-on-band)}
.report-desk.report-band-absent .report-desk-top{color:var(--report-band-ink)}
.report-topic-number,.report-topic-status>span:first-child,.report-teach-tag,.report-student-topics li span{color:var(--report-band-ink)}
.report-sample-correct{fill:#216650}
.report-person-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere;min-width:0;max-width:100%;font-size:14px;font-weight:500;line-height:1.4;text-align:left;text-transform:none}
.report-name-chip{display:flex;align-items:center;gap:8px;min-height:48px;width:100%;min-width:0;max-width:100%;padding:8px;border:1px solid color-mix(in srgb,var(--report-band-color) 28%,var(--surface));border-radius:12px;background:color-mix(in srgb,var(--report-band-color) 8%,var(--surface));color:var(--text);text-align:left;cursor:pointer;text-transform:none;font-family:var(--font)}
.report-chip-roll{flex:none;display:grid;place-items:center;min-width:24px;height:24px;padding:2px;border-radius:50%;font:500 12px/1 var(--font);font-variant-numeric:tabular-nums;background:var(--report-band-color);color:var(--report-on-band)}
.report-chip-roll:empty{display:none}
.report-name-chip:is(:hover,:focus-visible){background:color-mix(in srgb,var(--report-band-color) 14%,var(--surface))}
.report-name-chip:focus-visible,.class-report-page :is(a,summary):focus-visible,.report-preview-dialog button:focus-visible{outline:0;box-shadow:inset 0 0 0 2px var(--brand-purple);border-radius:8px}
.report-topic-students ul,.report-mistake-pupils,.report-help-pupils,.report-improved-pupils{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0;list-style:none}
.report-topic-students li,.report-mistake-pupils li,.report-help-pupils li,.report-improved-pupils li{min-width:0}
.report-help-pupils{margin-bottom:24px}
.report-help-student{flex-direction:row;min-height:64px;height:100%;padding:12px 8px;gap:8px}
.report-help-student .report-person-name{font-weight:700;font-size:14px}
.report-improved-pupils{margin:0 0 16px}
.report-growth-arrow{max-width:320px;margin:-8px auto 0}
.report-mistake-pupils{margin-bottom:16px}
.report-snapshot-owner{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere;font:500 12px/1.5 var(--font);text-transform:none;color:var(--muted);margin-top:8px;text-align:left}
.report-crop-slot{position:relative;display:grid;place-items:center;width:100%;min-height:56px;overflow:hidden}
.report-crop-slot canvas{width:100%;height:100%;position:absolute;inset:0;object-fit:contain}
.report-crop-slot .report-crop-status{position:absolute;padding:8px;font-size:12px}
.report-preview-dialog h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;text-overflow:ellipsis}
.report-preview-dialog .report-person-name{font-size:14px;font-weight:700}
.report-practice-recipients li span{overflow-wrap:anywhere}
.report-mistake-example{overflow-wrap:anywhere}
.report-topic-name{font-size:16px}
.report-support-caption{font-size:14px}
.report-topic-toggle{min-height:104px;padding-block:12px}
.report-provenance,.report-topic-status,.report-mistake-detail,.report-local-preview-link{font-size:12px}
@media(min-width:650px){.report-topic-students ul,.report-mistake-pupils,.report-help-pupils,.report-improved-pupils{grid-template-columns:repeat(4,minmax(0,1fr))}.report-help-student .report-person-name{font-size:14px}.report-topic-name{font-size:19px}.report-growth-arrow{max-width:360px}.report-topic-toggle{min-height:112px}.report-chapters{gap:24px}.report-help-pupils{margin-bottom:24px}}
.report-desk{text-transform:none}
/* Preserve the journey's faded dots while keeping its actionable labels legible. */
body:has(main.class-report-page) .journey-step:not(:disabled) .journey-label{opacity:1;color:var(--action-ink)}
body:has(main.class-report-page) .journey-label{font-size:10px}
body:has(main.class-report-page) .journey-minor .journey-label{font-size:9px}
.report-student-detail strong,.report-topic-name{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}
.report-student-detail strong{-webkit-line-clamp:2;line-clamp:2}
.report-topic-name{-webkit-line-clamp:3;line-clamp:3}
.report-band-absent .report-pill-glyph{color:var(--report-band-ink)}
.report-recipient-name{display:flex;align-items:center;gap:8px;min-width:0}.report-recipient-name>.report-person-name{flex:1}.report-recipient-roll{flex:none;font:500 12px/1.4 var(--font);color:var(--muted)}.report-recipient-roll:empty{display:none}
.report-name-chip.report-duplicate-placeholder{flex-wrap:wrap}.report-duplicate-placeholder>.report-person-name{flex-basis:100%}.report-chip-record{font:500 12px/1.4 var(--font);color:var(--muted);overflow-wrap:anywhere;max-width:100%}

/* student-report.css */
.student-report-dialog{box-sizing:border-box;width:min(960px,100%);max-width:100%;height:min(1100px,100dvh);max-height:100dvh;margin:auto;padding:0;border:0;border-radius:16px;background:var(--page);color:var(--text);overflow:hidden}
.student-report-dialog[open]{display:flex;flex-direction:column}.student-report-dialog::backdrop{background:#0008}
.student-report-dialog header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 16px;background:var(--surface);flex:none}.student-report-dialog h2{margin:0;font-size:20px;color:var(--action-ink)}
.student-report-close,.student-report-zoom{min-height:44px;padding:8px;border:0;background:transparent;color:var(--action-ink);font:700 14px var(--font);cursor:pointer}.student-report-close{display:flex;align-items:center;gap:4px}.student-report-close svg{width:24px;height:24px}
.student-report-notice{padding:8px 16px;margin:0;font-size:13px;flex:none}.student-report-view{overflow:auto;min-height:0;flex:1;padding:0 12px 12px;overscroll-behavior:contain}.student-report-view canvas{display:block;width:min(100%,560px);height:auto;margin:auto;background:var(--page)}.student-report-view.is-zoomed canvas{width:1080px;max-width:none;margin:0}
.student-report-description{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%)}
.student-report-dialog footer{padding:8px 16px max(12px,env(safe-area-inset-bottom));background:var(--page);flex:none}.student-report-dialog .reading-primary{width:100%;margin:0;min-height:52px}.student-report-status{margin:4px 0 0;font-size:13px;min-height:20px}.student-report-unavailable{font-size:12px;color:var(--muted);text-align:center;margin:8px 0 0}.result-report-action:disabled{opacity:.55;cursor:default}
@media(prefers-reduced-motion:reduce){.student-report-dialog *{animation:none;transition:none}}

.student-report-dialog .reading-primary{background:var(--brand-purple);color:var(--on-brand);border:0;border-bottom:4px solid var(--brand-dark)}
.report-student-report-link{padding:8px 12px;border:0;background:transparent;color:var(--action-ink);font:700 14px var(--font);min-height:44px;cursor:pointer}

/* Real item counts only; reading/writing have no percentage contract. */
.live-completion { width: min(100%, 360px); margin: 8px auto 16px; text-align: center; }
.live-completion p { margin: 0 0 6px; font-weight: 600; }
.live-completion progress { display: block; width: 100%; height: 12px; accent-color: var(--brand); }

/* engine-screen-motion.css */
/* These snapshots exist only during explicit teacher navigation, never polling. */
main:is([data-source="live"],[data-source="local"]) { view-transition-name: live-screen; }
::view-transition-group(live-screen) { animation-duration: 300ms; }
::view-transition-old(live-screen) {
  animation: live-screen-leave 180ms ease-out both;
  mix-blend-mode: normal;
}
::view-transition-new(live-screen) {
  animation: live-screen-enter 300ms cubic-bezier(.22,1,.36,1) both;
  mix-blend-mode: normal;
}
/* Keep the app bar/logo stationary while the content changes. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
@keyframes live-screen-leave { to { opacity: 0; translate: var(--screen-leave-x, -12px) 0; } }
@keyframes live-screen-enter {
  from { opacity: 0; translate: var(--screen-enter-x, 24px) 0; }
  to { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(live-screen),
  ::view-transition-old(live-screen),
  ::view-transition-new(live-screen) { animation: none; }
}

/* class-camera.css */
/* One stable full-screen camera: no remount or native Retake/Use Photo between shots. */
.class-sheet-camera {
  position:fixed; inset:0; width:100%; height:100dvh; max-width:none; max-height:none;
  margin:0; padding:0; border:0; background:var(--camera); color:#fff;
  overscroll-behavior:none; box-sizing:border-box;
}
.class-sheet-camera[open] { display:flex; flex-direction:column; }
.class-sheet-camera::backdrop { background:var(--camera); }
.class-sheet-camera header {
  flex:none; display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:max(10px,env(safe-area-inset-top)) 16px 10px; background:var(--camera);
}
.class-sheet-camera h2 { margin:0; font:600 18px Poppins,sans-serif; color:#fff; }
.class-sheet-camera button { min-width:48px; min-height:48px; font:600 16px Poppins,sans-serif; cursor:pointer; }
.class-camera-done { border:0; border-radius:12px; padding:8px 20px; background:var(--brand); color:var(--on-brand); }
.class-camera-view { flex:1; min-height:0; display:grid; place-items:center; overflow:hidden; background:#000; }
.class-camera-view video { display:block; width:100%; height:100%; object-fit:contain; }
.class-sheet-camera footer { flex:none; padding:8px 16px max(12px,env(safe-area-inset-bottom)); text-align:center; background:var(--camera); }
.class-camera-count { margin:0 0 6px; font:500 14px Poppins,sans-serif; }
.class-camera-thumbnails { display:flex; justify-content:center; gap:6px; height:40px; margin:0 0 8px; }
.class-camera-thumbnails:empty { height:0; margin:0; }
.class-camera-thumbnails img { display:block; width:32px; height:40px; border-radius:4px; object-fit:contain; background:var(--photo); }
.class-sheet-camera .class-camera-shutter { display:grid; place-items:center; width:76px; height:76px; padding:4px; margin:0 auto; border:3px solid #fff; border-radius:50%; background:transparent; }
.class-camera-shutter span { display:block; width:58px; height:58px; border-radius:50%; background:#fff; }
.class-camera-shutter:disabled { opacity:.4; }
.class-camera-status { min-height:1.5em; margin:8px 0 0; font:400 13px/1.5 Poppins,sans-serif; }
.class-camera-recovery { display:flex; justify-content:center; gap:8px; flex-wrap:wrap; margin-top:8px; }
.class-camera-recovery[hidden] { display:none; }
.class-camera-recovery button { border:1px solid var(--brand-soft); border-radius:10px; padding:8px 12px; background:var(--brand); color:var(--on-brand); }
.class-sheet-camera button:disabled { cursor:default; }
@media (orientation:landscape) and (max-height:550px) {
  .class-sheet-camera[open] { display:grid; grid-template-columns:minmax(0,1fr) 170px; grid-template-rows:auto minmax(0,1fr); }
  .class-sheet-camera header { grid-column:1 / -1; }
  .class-sheet-camera footer { overflow-y:auto; padding-right:max(12px,env(safe-area-inset-right)); }
  .class-camera-thumbnails { height:auto; flex-wrap:wrap; }
}

/* A direct tap can start preview playback when iPhone blocks autoplay. */
.class-camera-view{position:relative}
.class-camera-start{position:absolute;z-index:1;left:50%;top:50%;transform:translate(-50%,-50%);border:0;border-radius:16px;padding:12px 20px;background:var(--brand,var(--brand));color:#fff}
.class-camera-start[hidden]{display:none}

/* ds-components.css */
/* Namespaced foundations: existing application selectors are never restyled here. */
.ds-gallery,.ds-card,.ds-header,.ds-title,.ds-rail,.ds-dock{font-family:var(--font);color:var(--ink)}
[class^="ds-"],[class*=" ds-"]{box-sizing:border-box}
.ds-gallery input{font-family:inherit}.ds-gallery button{cursor:pointer}.ds-gallery button:disabled{cursor:default}
.ds-gallery :focus-visible{outline:3px solid rgb(var(--brand-rgb)/.35);outline-offset:3px}
.ds-icon{display:inline-block;flex:none;vertical-align:middle}.ds-logo{display:block;max-width:100%;height:auto;object-fit:contain}
.ds-card{background:var(--surface);border:0;border-radius:var(--card-radius);box-shadow:var(--shadow-tile),0 0 0 1px rgb(var(--brand-rgb)/.08)}
.ds-eyebrow{display:block;color:var(--action-ink);font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.14em;line-height:1.4}
.ds-caption{display:block;color:var(--muted);font-size:11px;font-weight:400;line-height:1.4;text-transform:none;letter-spacing:normal}
.ds-hint{color:var(--muted);font-size:13px;font-weight:400;line-height:1.4;margin:4px 0 0}.ds-wrap{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.ds-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ds-primary,.ds-secondary{font-family:var(--font);border:0;min-width:0;font-weight:700;text-transform:uppercase;border-radius:var(--control-radius);transition:transform .15s var(--ease-spring),box-shadow .15s,background-color .15s}
.ds-primary{display:grid;width:100%;max-width:680px;grid-template-columns:36px minmax(0,1fr) 36px;gap:8px;align-items:center;height:56px;padding:0 10px;background:var(--forward);color:var(--on-forward);box-shadow:var(--shadow-btn-forward);font-size:14px;letter-spacing:.08em}
.ds-primary.ds-captioned{height:64px}.ds-primary.ds-tonal{background:var(--tint-green);color:var(--tint-green-ink);box-shadow:inset 0 0 0 1px var(--tint-green-edge)}
.ds-primary:disabled{background:rgb(var(--forward-rgb)/.35);box-shadow:none}.ds-primary.ds-tonal:disabled{background:var(--tint-green);opacity:.4}
.ds-button-copy{display:flex;flex-direction:column;align-items:center;line-height:1.25;min-width:0}.ds-button-copy>span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ds-primary .ds-caption{color:inherit;opacity:.75;margin-top:2px}
.ds-button-arrow{display:grid;width:36px;height:36px;place-items:center;border-radius:50%;background:rgb(255 255 255/.16);transition:transform .2s var(--ease-spring)}.ds-tonal>.ds-button-arrow{background:var(--forward);color:var(--on-forward)}
.ds-primary:enabled:hover,.ds-secondary.ds-solid:enabled:hover{transform:translateY(-1px)}.ds-primary:enabled:hover .ds-button-arrow{transform:translateX(2px)}.ds-primary:enabled:active,.ds-secondary:enabled:active{transform:translateY(1px);box-shadow:var(--shadow-btn-pressed)}
.ds-secondary{display:inline-flex;width:100%;align-items:center;justify-content:center;gap:8px;padding:8px 12px;min-height:52px;font-size:13px;line-height:1.25;letter-spacing:.06em;overflow-wrap:anywhere;background:var(--brand);color:var(--on-brand);box-shadow:var(--shadow-btn-brand)}
.ds-secondary.ds-tonal{background:var(--brand-tint);color:var(--action-ink-dark);box-shadow:inset 0 0 0 1px rgb(var(--brand-rgb)/.1)}.ds-secondary.ds-ghost{background:transparent;color:var(--action-ink);box-shadow:none}.ds-secondary[aria-pressed=true]{background:var(--brand-dark);color:var(--on-brand);box-shadow:var(--shadow-btn-pressed)}.ds-secondary.ds-size-sm{min-height:44px;font-size:12px}.ds-secondary.ds-stacked{flex-direction:column;gap:4px}.ds-secondary:disabled{opacity:.4}
.ds-spinner{width:16px;height:16px;border:2px solid rgb(255 255 255/.3);border-top-color:white;border-radius:50%;animation:ds-spin 1s linear infinite}
.ds-tag{--tone:var(--brand);--tone-bg:var(--brand-tint);--tone-ink:var(--brand-dark);--tone-edge:rgb(var(--brand-rgb)/.1);display:inline-flex;width:fit-content;max-width:100%;flex:none;align-items:center;justify-content:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;background:var(--tone-bg);color:var(--tone-ink);box-shadow:inset 0 0 0 1px var(--tone-edge);font:700 10px var(--font);text-transform:uppercase;letter-spacing:.07em;white-space:nowrap}
.ds-tone-green{--tone:var(--forward);--tone-bg:var(--tint-green);--tone-ink:var(--tint-green-ink);--tone-edge:var(--tint-green-edge)}.ds-tone-amber{--tone:var(--marks-middle);--tone-bg:var(--tint-yellow);--tone-ink:var(--score-middle);--tone-edge:var(--tint-yellow-edge)}.ds-tone-red{--tone:var(--marks-help);--tone-bg:var(--tint-red);--tone-ink:var(--score-low);--tone-edge:var(--tint-red-edge)}
.ds-tag.ds-solid{background:var(--tone);color:white;box-shadow:none}.ds-tag.ds-tone-amber.ds-solid{color:var(--ink)}.ds-tag.ds-outline{background:var(--surface);color:var(--action-ink);box-shadow:inset 0 0 0 1px rgb(var(--brand-rgb)/.35)}.ds-tag.ds-size-compact{height:20px;padding:0 8px;font-size:9px;letter-spacing:.06em}.ds-dot{display:inline-block;flex:none;width:6px;height:6px;border-radius:50%;background:var(--tone,currentColor)}.ds-solid .ds-dot{background:currentColor}
.ds-high{--band:var(--marks-strong);--band-bg:var(--tint-green);--band-ink:var(--score-high);--band-edge:var(--tint-green-edge)}.ds-middle{--band:var(--marks-middle);--band-bg:var(--tint-yellow);--band-ink:var(--score-middle);--band-edge:var(--tint-yellow-edge)}.ds-low{--band:var(--marks-help);--band-bg:var(--tint-red);--band-ink:var(--score-low);--band-edge:var(--tint-red-edge)}.ds-neutral,.ds-absent{--band:var(--absent);--band-bg:var(--surface);--band-ink:var(--muted);--band-edge:rgb(var(--muted-rgb)/.2)}
.ds-score{display:inline-flex;flex:none;align-items:center;justify-content:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;font:700 12px var(--font);font-variant-numeric:tabular-nums;white-space:nowrap;background:var(--band-bg);color:var(--band-ink);box-shadow:inset 0 0 0 1px var(--band-edge)}.ds-score .ds-dot{background:var(--band)}.ds-score.ds-size-sm{height:20px;padding:0 8px;gap:4px;font-size:10px}.ds-score.ds-size-lg{height:32px;padding:0 12px;gap:8px;font-size:15px}
.ds-round{border:0;background:var(--surface);color:var(--action-ink);box-shadow:var(--shadow-tile),0 0 0 1px rgb(var(--brand-rgb)/.1);border-radius:50%;width:44px;height:44px;display:grid;place-items:center;padding:0;flex:none}.ds-round:active{transform:scale(.95)}
.ds-title{position:relative;width:100%;padding:12px 0;background:var(--page)}.ds-title-copy{display:flex;flex-direction:column;align-items:center;text-align:center}.ds-title .ds-sided{padding:0 56px}.ds-title h1{margin:0;font:700 26px/1.15 var(--font);letter-spacing:-.025em}.ds-title .ds-eyebrow{margin-bottom:4px}.ds-title .ds-hint{font-size:15px;overflow-wrap:anywhere}.ds-back{position:absolute;left:0;top:50%;translate:0 -50%}
.ds-header{position:relative;width:100%;padding:12px 16px 8px;background:rgb(var(--page-rgb)/.85);backdrop-filter:blur(24px) saturate(1.5);z-index:20}.ds-sticky{position:sticky;top:0}.ds-header-row{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:12px;align-items:center}.ds-header .ds-logo{justify-self:center}.ds-header-row>.ds-round{position:relative;top:14px}.ds-header [aria-expanded=true]{background:var(--brand);color:var(--on-brand)}.ds-menu{position:absolute;left:16px;top:calc(100% - 4px);width:240px;display:grid;gap:2px;padding:6px;border-radius:20px;background:var(--surface);box-shadow:var(--shadow-pop);z-index:30;animation:ds-enter .25s var(--ease-spring)}.ds-menu[hidden]{display:none}.ds-menu-item{border:0;background:transparent;min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;text-align:left;border-radius:12px;color:var(--action-ink)}.ds-menu-item[aria-current],.ds-menu-item:hover{background:var(--brand-tint)}
.ds-rail{position:relative;height:62px;background:var(--page);width:100%;padding:0 4px}.ds-track{position:absolute;left:8.333%;right:8.333%;top:13px;height:4px;background:rgb(var(--brand-rgb)/.12);border-radius:999px}.ds-track>span{display:block;height:100%;background:var(--brand);border-radius:inherit;transition:width .5s var(--ease-spring)}.ds-stage{position:absolute;top:0;translate:-50% 0;display:flex;flex-direction:column;align-items:center;gap:4px;width:64px;padding:0 0 4px;border:0;background:none;color:var(--muted);font:400 8.5px/1.15 var(--font);text-transform:uppercase;letter-spacing:.05em;min-height:44px}.ds-stage>span:last-child{max-width:64px}.ds-stage.ds-major{font-size:9.5px}.ds-stage-dot{position:relative;display:grid;place-items:center;flex:none;width:12px;height:12px;margin:9px 0;background:var(--surface);border:1.5px solid rgb(var(--brand-rgb)/.25);border-radius:50%;box-shadow:0 0 0 4px var(--page)}.ds-major .ds-stage-dot{width:22px;height:22px;margin:4px 0}.ds-stage.ds-done{color:var(--action-ink);font-weight:700}.ds-done .ds-stage-dot{background:var(--brand);color:var(--on-brand);border:0}.ds-stage[aria-current]{color:var(--action-ink);font-weight:700}.ds-stage[aria-current] .ds-stage-dot{border:2px solid var(--brand)}.ds-stage[aria-current] .ds-stage-dot:before{content:'';position:absolute;inset:-2px;border-radius:50%;background:rgb(var(--brand-rgb)/.25);animation:ds-breathe 1.8s ease-out infinite}.ds-stage-dot>i{width:4px;height:4px;border-radius:50%;background:var(--brand)}.ds-major .ds-stage-dot>i{width:8px;height:8px}
.ds-dock{width:100%;z-index:5}.ds-dock-sticky{position:sticky;bottom:0}.ds-dock-inner{display:grid;gap:10px}.ds-dock.ds-bar{padding:12px 16px max(12px,env(safe-area-inset-bottom));background:rgb(var(--page-rgb)/.85);box-shadow:var(--shadow-dock);backdrop-filter:blur(24px);border-top:1px solid rgb(var(--brand-rgb)/.06)}.ds-dock.ds-floating{padding:8px 0 12px}.ds-floating>.ds-dock-inner{padding:10px;background:rgb(var(--surface-rgb)/.9);border-radius:20px;box-shadow:var(--shadow-pop)}.ds-message{text-align:center;font-size:12px;color:var(--muted);margin:0}
.ds-tile{display:flex;align-items:center;width:100%;gap:12px;padding:16px;text-align:left;transition:transform .2s var(--ease-spring),box-shadow .2s;color:var(--ink);font-family:var(--font)}.ds-tile:hover{transform:translateY(-2px);box-shadow:var(--shadow-lift)}.ds-tile:active{transform:scale(.99)}.ds-tile-copy{display:flex;flex-direction:column;min-width:0;flex:1;gap:6px}.ds-tile strong{font-size:17px;line-height:1.2;overflow-wrap:anywhere}.ds-grade{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:60px;height:64px;flex:none;border-radius:16px;background:var(--brand-tint);color:var(--action-ink);font-size:28px;font-weight:700}.ds-grade .ds-eyebrow{font-size:8px}.ds-pending{position:absolute;right:-5px;top:-5px;background:var(--marks-help);color:white;border-radius:50%;min-width:20px;padding:2px;font-size:11px;text-align:center}.ds-tile-arrow{display:grid;width:32px;height:32px;place-items:center;flex:none;border-radius:50%;background:var(--brand-tint);color:var(--action-ink)}.ds-tile:hover .ds-tile-arrow{background:var(--brand);color:var(--on-brand)}
.ds-test{display:flex;align-items:stretch;flex-direction:column;gap:10px;padding:16px}.ds-test-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.ds-test-footer{display:flex;align-items:center;justify-content:space-between;border-top:1px solid rgb(var(--brand-rgb)/.08);padding-top:10px;color:var(--action-ink);font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.ds-test.ds-ready .ds-test-footer{color:var(--forward)}.ds-ready .ds-tile-arrow{background:var(--forward);color:var(--on-forward)}.ds-progress{height:5px;background:var(--brand-tint);border-radius:999px;overflow:hidden}.ds-progress>span{display:block;height:100%;background:var(--brand);border-radius:inherit;transition:width .8s var(--ease-spring)}
.ds-avatar{position:relative;display:grid;place-items:center;width:40px;height:40px;flex:none;border-radius:50%;background:var(--brand-tint);color:var(--action-ink);font-size:13px;font-weight:700;box-shadow:0 0 0 2px rgb(var(--brand-rgb)/.15)}.ds-student{padding:12px;border-radius:12px}.ds-student strong{font-size:15px}.ds-state-uploaded .ds-avatar{background:var(--tint-green);color:var(--forward);box-shadow:0 0 0 2px var(--tint-green-edge)}.ds-state-uploaded .ds-avatar:after,.ds-state-absent .ds-avatar:after{content:'';position:absolute;right:0;bottom:0;width:8px;height:8px;border-radius:50%;background:var(--forward);box-shadow:0 0 0 2px var(--surface)}.ds-state-absent{opacity:.65}.ds-state-absent strong{text-decoration:line-through}.ds-state-absent .ds-avatar:after{background:var(--marks-help)}
.ds-doubt{border-left:4px solid var(--marks-help);overflow:hidden}.ds-doubt.ds-answered{border-left-color:var(--forward)}.ds-doubt-head{border:0;background:none;display:flex;align-items:flex-start;width:100%;gap:12px;text-align:left;padding:14px 12px 14px 16px;color:var(--ink)}.ds-doubt-head strong{font-size:20px}.ds-doubt-symbol{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--tint-red);color:var(--marks-help);font-weight:700;flex:none}.ds-answered .ds-doubt-symbol{background:var(--tint-green);color:var(--forward)}.ds-answered .ds-hint{color:var(--tint-green-ink);font-weight:700}.ds-doubt-body{padding:0 16px 16px;animation:ds-enter .25s var(--ease-spring)}.ds-evidence{margin:0 0 12px;padding:10px 12px;border-radius:12px;background:var(--page);font-size:12px;white-space:pre-wrap}.ds-evidence p{margin:4px 0 0;color:var(--muted)}.ds-prompt{font-size:15px;font-weight:700}.ds-options{display:grid;gap:8px;margin-bottom:12px}.ds-option{display:flex;align-items:center;gap:12px;min-height:48px;border-radius:12px;padding:10px 12px;box-shadow:inset 0 0 0 1px rgb(var(--brand-rgb)/.15);font-size:14px}.ds-option:has(:checked){background:var(--brand-tint);box-shadow:inset 0 0 0 2px var(--brand)}.ds-option input{accent-color:var(--brand);width:20px;height:20px;flex:none}
.ds-chapter{padding:20px;min-width:0}.ds-chapter-head{display:flex;justify-content:space-between;align-items:end;gap:12px;margin-bottom:16px}.ds-chapter h2{margin:4px 0 0;font-size:18px;line-height:1.25;letter-spacing:-.02em}.ds-chapter.ds-quiet{background:transparent;border:1px dashed rgb(var(--brand-rgb)/.25);box-shadow:none;color:var(--muted)}
.ds-gauge{display:flex;align-items:center;gap:20px;padding:20px}.ds-gauge-ring{position:relative;width:120px;height:120px;flex:none}.ds-gauge-ring svg{width:100%;height:100%;transform:rotate(-90deg)}.ds-ring-track{stroke:rgb(var(--brand-rgb)/.1)}.ds-ring-value{stroke:var(--brand);animation:ds-ring 1.1s var(--ease-spring)}.ds-gauge-value{position:absolute;inset:0;display:grid;place-items:center;font-size:30px;font-weight:700;letter-spacing:-.04em}.ds-gauge .ds-score{margin-top:8px}
.ds-name-chip{display:flex;align-items:center;gap:8px;width:100%;min-width:0;min-height:44px;border:0;border-radius:999px;padding:6px 12px 6px 6px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow-tile),inset 0 0 0 1px var(--band-edge);text-align:left;font-family:var(--font)}.ds-roll{display:grid;place-items:center;flex:none;min-width:28px;height:28px;padding:0 4px;border-radius:50%;background:var(--band);color:white;font-size:12px;font-weight:700}.ds-middle .ds-roll{color:var(--ink)}.ds-absent .ds-roll{background:var(--surface);border:1.5px dashed var(--absent);color:var(--muted)}.ds-name{font-size:13px;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.ds-distribution{display:flex;height:10px;gap:2px;border-radius:999px;overflow:hidden}.ds-distribution>span{background:var(--band)}.ds-legend{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0 20px;font-size:12px;color:var(--muted)}.ds-room{padding:12px;border-radius:18px;background:var(--page)}.ds-board{display:grid;place-items:center;width:60%;height:28px;margin:0 auto 12px;background:var(--brand-dark);color:rgb(255 255 255/.4);border-radius:6px;text-transform:uppercase;font-size:8px;font-weight:700;letter-spacing:.3em}.ds-desk-grid{display:grid;gap:6px}.ds-desk{height:44px;min-width:0;border:0;background:var(--band);color:white;border-radius:7px;font:700 11px var(--font);overflow:hidden;text-overflow:ellipsis;padding:2px;box-shadow:inset 0 -8px 0 rgb(var(--page-rgb)/.8);transition:transform .15s}.ds-desk.ds-middle{color:var(--ink)}.ds-desk.ds-absent{background:var(--surface);border:1.5px dashed var(--absent);color:var(--muted)}.ds-desk[aria-expanded=true]{transform:translateY(-2px);outline:2px solid var(--brand)}.ds-desk-detail{font-size:12px;color:var(--action-ink);background:var(--surface);padding:12px;border-radius:12px}
.ds-topic{padding:12px;border-radius:16px;box-shadow:inset 0 0 0 1px rgb(var(--brand-rgb)/.08);background:var(--surface)}.ds-topic.ds-low{background:var(--tint-red)}.ds-topic-head{display:flex;align-items:center;gap:10px;text-align:left;width:100%;border:0;background:none;padding:0 0 10px;color:var(--ink)}.ds-topic-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;color:var(--action-ink);background:var(--brand-tint);font-size:24px;flex:none}.ds-topic-head strong{font-size:14px}.ds-topic-percent{font-size:24px;font-weight:700;color:var(--band-ink);font-variant-numeric:tabular-nums}.ds-topic .ds-progress{background:rgb(var(--brand-rgb)/.08)}.ds-topic .ds-progress>span{background:var(--band)}.ds-topic-body{padding-top:12px;display:grid;grid-template-columns:1fr 1fr;gap:8px}.ds-topic-body>.ds-eyebrow{grid-column:1/-1}.ds-topic-body[hidden]{display:none}
.ds-viewer-summary{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.ds-switch{border:0;border-radius:999px;background:var(--brand-tint);color:var(--action-ink);padding:10px 12px;font-size:12px;min-height:44px}.ds-switch:after{content:'';display:inline-block;width:14px;height:14px;margin-left:8px;border-radius:50%;background:var(--muted);vertical-align:middle}.ds-switch[aria-checked=true]:after{background:var(--brand)}.ds-photo-frame{position:relative;width:100%;background:var(--photo);border:2px solid var(--brand);border-radius:16px;box-shadow:var(--shadow-lift)}.ds-sheet{display:block;width:100%;height:100%;object-fit:contain;border-radius:14px}.ds-answer{position:absolute;border:2px dashed var(--band);border-radius:5px;background:transparent;padding:0;transition:opacity .2s}.ds-answer.ds-dim{opacity:.25}.ds-answer-label{position:absolute;left:0;bottom:calc(100% + 3px);display:flex;align-items:center;background:var(--surface);border-radius:5px;padding:2px 4px;color:var(--ink);font-size:10px;white-space:nowrap;box-shadow:var(--shadow-tile)}.ds-answer-label.ds-below{bottom:auto;top:calc(100% + 3px)}.ds-reason{margin-top:16px;border-left:4px solid var(--band);padding:16px;animation:ds-enter .3s var(--ease-spring)}.ds-reason-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}.ds-timeline{padding-left:20px;font-size:13px}.ds-timeline li{padding:8px 0 8px 4px;border-left:1px solid var(--brand-tint)}.ds-timeline .ds-score{margin-left:8px}.ds-reason>.ds-wrap{margin-top:12px}.ds-loading{animation:ds-pulse 1.4s infinite}.ds-photo-error{position:absolute;inset:35% 0;text-align:center;color:var(--muted);font-size:13px}
.ds-toast{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 20px;border-radius:999px;background:var(--brand-dark);color:var(--on-brand);box-shadow:var(--shadow-pop);font-size:13px;animation:ds-enter .2s var(--ease-spring)}.ds-slide{animation:ds-forward .3s var(--ease-spring)}.ds-slide.ds-backward{animation-name:ds-backward}.ds-palette{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.ds-swatch{display:block;height:48px;border-radius:12px;box-shadow:inset 0 0 0 1px rgb(var(--brand-rgb)/.12)}
.ds-gallery{position:fixed;inset:0;z-index:1000;background:var(--page);overflow:auto;padding:16px;color:var(--ink);overscroll-behavior:contain}.ds-gallery[hidden]{display:none}.ds-gallery-inner{max-width:820px;margin:auto}.ds-gallery-nav{display:flex;gap:8px;position:sticky;top:-16px;padding:12px 0;background:var(--page);z-index:50}.ds-gallery-nav>*{flex:1}.ds-gallery h1{font-size:26px;margin:16px 0}.ds-gallery h2{font-size:18px;margin:24px 0 12px}.ds-gallery-section{padding:16px;border:1px solid rgb(var(--brand-rgb)/.15);border-radius:20px;margin:16px 0}.ds-gallery-examples{display:grid;gap:16px;max-width:390px;margin:auto}.ds-gallery .ds-header{z-index:2}.ds-gallery .ds-dock{position:relative}.ds-gallery p{line-height:1.5}.ds-gallery-label{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
@keyframes ds-spin{to{transform:rotate(360deg)}}@keyframes ds-breathe{to{transform:scale(1.9);opacity:0}}@keyframes ds-enter{from{opacity:0;transform:translateY(-8px) scale(.97)}to{opacity:1;transform:none}}@keyframes ds-forward{from{opacity:0;transform:translateX(24px)}to{opacity:1;transform:none}}@keyframes ds-backward{from{opacity:0;transform:translateX(-24px)}to{opacity:1;transform:none}}@keyframes ds-pulse{50%{opacity:.5}}@keyframes ds-ring{from{stroke-dasharray:0 100}}
@media(prefers-reduced-motion:reduce){[class^="ds-"],[class*=" ds-"],[class^="ds-"]:before,[class*=" ds-"]:before{animation:none;transition:none;scroll-behavior:auto}}

/* Preserve component typography against the host app's generic controls. */
.ds-gallery button{font-family:var(--font)}
.ds-gallery-nav{gap:8px;flex-wrap:wrap}
.ds-gallery-nav>*{min-width:120px}
.ds-topic-empty{grid-column:1/-1;margin:0;font-size:12px;color:var(--muted)}
.ds-topic-head{min-height:44px}
.ds-title-copy+*{position:absolute;right:0;top:50%;translate:0 -50%}
.ds-gallery-section[data-component="AppHeader"] .ds-header:last-of-type{margin-bottom:100px}
.ds-gallery-open{overflow:hidden}

/* teacher-shell.css */
/* Batch 2 shell. Screen content and data controls keep their own selectors. */
body.stage-path-preview>.topbar{padding:max(12px,env(safe-area-inset-top)) 16px 8px;background:rgb(var(--page-rgb)/.85);backdrop-filter:blur(24px) saturate(1.5);border:0;z-index:20}
body.stage-path-preview .topbar-inner{max-width:880px;margin:auto;grid-template-columns:44px minmax(0,1fr) 44px;gap:12px}
body.stage-path-preview .topbar-inner>.wordmark{width:clamp(180px,48vw,230px);max-width:100%;margin:0;mix-blend-mode:normal}
body.stage-path-preview .topbar-inner>:is(.stage-path-toggle,.account-placeholder){top:14px;width:44px;height:44px;min-height:44px;border:0;border-radius:50%;padding:0;background:var(--surface);color:var(--action-ink);box-shadow:var(--shadow-tile),0 0 0 1px rgb(var(--brand-rgb)/.1)}
body.stage-path-preview .topbar-inner>.stage-path-toggle:hover{background:var(--surface);box-shadow:var(--shadow-lift)}
body.stage-path-preview .topbar-inner>.stage-path-toggle[aria-expanded=true]{background:var(--brand);color:var(--on-brand)}
body.stage-path-preview .topbar-inner>.stage-path-toggle>svg{width:22px;height:22px}
body.stage-path-preview .topbar-inner>.account-placeholder>svg{width:24px;height:24px}
.teacher-app-menu{left:max(16px,calc((100% - 880px)/2));top:calc(100% - 4px);width:240px;max-width:calc(100vw - 32px);padding:6px;gap:2px;background:var(--surface);border:0;border-radius:var(--card-radius);box-shadow:var(--shadow-pop);animation:ds-enter .25s var(--ease-spring)}
.teacher-app-menu button{min-height:48px;padding:10px 12px;border:0;border-radius:12px;color:var(--action-ink);font:700 11px/1.4 var(--font);text-transform:uppercase;letter-spacing:.08em}
.teacher-app-menu button:hover{background:var(--brand-tint)}
.test-journey{transition:grid-template-rows .3s var(--ease-spring),opacity .2s ease}
.journey-track{height:62px;max-width:880px;padding:0 4px;margin:auto}
.journey-track:before,.is-visible .journey-track:before{left:8.333%;right:8.333%;top:13px;height:4px;background:rgb(var(--brand-rgb)/.12);transform:none;transition:none;z-index:-2}
.journey-track:after{content:'';position:absolute;left:8.333%;top:13px;width:calc(83.334% * var(--shell-journey-fill,0));height:4px;border-radius:999px;background:var(--brand);z-index:-1;transition:width .5s var(--ease-spring)}
.journey-step{grid-template-rows:30px auto;gap:4px;min-height:44px;padding:0 0 4px;border-radius:var(--tile-radius);color:var(--muted);font-family:var(--font)}
.journey-node-slot{height:30px}.journey-node-slot:before{display:none}
.journey-step .journey-node{display:grid;place-items:center;width:22px;height:22px;border:1.5px solid rgb(var(--brand-rgb)/.25);background:var(--surface);opacity:1;box-shadow:0 0 0 4px var(--page)}
.journey-minor .journey-node{width:12px;height:12px}
.journey-label{max-width:64px;font-size:9.5px;font-weight:400;opacity:.6;letter-spacing:.05em}
.journey-minor .journey-label{font-size:8.5px;font-weight:400}
.journey-step:is(.shell-done,.shell-reachable) .journey-label{color:var(--action-ink);opacity:.75;font-weight:700}
.journey-step.shell-done .journey-node{border:0;background:var(--brand);color:var(--on-brand)}
.journey-major.shell-done .journey-node:after{content:'';width:6px;height:10px;border:solid currentColor;border-width:0 2px 2px 0;transform:translateY(-1px) rotate(45deg)}
.journey-step.is-current .journey-node{border:2px solid var(--brand);background:var(--surface);color:var(--action-ink)}
.journey-step.is-current .journey-node:after{content:'';width:8px;height:8px;border-radius:50%;background:var(--brand)}
.journey-minor.is-current .journey-node:after{width:4px;height:4px}
.journey-step.is-current .journey-node-slot:before{display:block;width:22px;height:22px;background:rgb(var(--brand-rgb)/.25);animation:ds-breathe 1.8s ease-out infinite}
.journey-minor.is-current .journey-node-slot:before{width:12px;height:12px}
.journey-step.is-current .journey-label{opacity:1;color:var(--action-ink);font-weight:700}
body.stage-path-preview>main .shell-title{background:var(--page);padding:12px 0}
body.stage-path-preview>main .shell-title .shell-title-copy{align-items:center;gap:0;width:100%;text-align:center}
body.stage-path-preview>main .shell-title h1{font-size:26px;line-height:1.15;letter-spacing:-.025em;font-weight:700}
body.stage-path-preview>main .shell-title .hint{font-size:15px;line-height:1.4;margin:6px 0 0;color:var(--muted)}
.shell-eyebrow{margin:0 0 4px;color:var(--action-ink);font:700 10px/1.4 var(--font);letter-spacing:.14em;text-transform:uppercase;overflow-wrap:anywhere}
body.stage-path-preview>main .shell-title.review-heading-with-back>.individual-list-navigation{width:44px;min-height:44px;left:0}
body.stage-path-preview>main .shell-title .shell-back{display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:var(--surface);color:var(--action-ink);box-shadow:var(--shadow-tile),0 0 0 1px rgb(var(--brand-rgb)/.1)}
.shell-back>span{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.shell-back>svg{width:20px;height:20px}
body.stage-path-preview>main .shell-title.review-heading-with-back .shell-title-copy{padding-inline:56px}
body.stage-path-preview>main>.shell-action-dock,.shell-action-dock{isolation:isolate;position:sticky;bottom:0;z-index:8;display:flex;flex-direction:column;gap:10px;margin:0;padding:12px 16px max(12px,env(safe-area-inset-bottom));border:0;border-top:1px solid rgb(var(--brand-rgb)/.06);border-radius:0;background:var(--page);box-shadow:var(--shadow-dock)}
body.stage-path-preview>main:has(>.shell-action-dock){padding-bottom:0}
.shell-action-dock.shell-inline-dock{margin:16px -16px -16px;position:relative}
.shell-action-dock>.shell-secondary-row{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0;margin:0;border:0;box-shadow:none;background:none}
body .shell-action-dock .shell-dock-message{font:400 12px/1.4 var(--font);color:var(--muted);text-align:center;margin:0}
.shell-action-dock .shell-dock-message:empty{display:none}
body button.shell-primary{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;max-width:680px;min-height:56px;height:auto;margin:0 auto;padding:12px 54px;border:0;border-radius:var(--control-radius);background:var(--forward);color:var(--on-forward);box-shadow:var(--shadow-btn-forward);font:700 14px/1.3 var(--font);letter-spacing:.08em;text-align:center;text-transform:uppercase;cursor:pointer;transition:transform .15s var(--ease-spring),box-shadow .15s,background-color .15s}
body button.shell-primary:after{content:'';position:absolute;right:10px;top:calc(50% - 18px);width:36px;height:36px;border-radius:50%;background:rgb(255 255 255/.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none'%3E%3Cpath d='M15 8L27 20L15 32' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat;pointer-events:none}
body button.shell-primary>.shell-existing-forward{display:none}
body button.shell-primary:enabled:hover{transform:translateY(-1px)}
body button.shell-primary:enabled:active,body button.shell-primary.is-pressed{transform:translateY(1px);box-shadow:var(--shadow-btn-pressed)}
body button.shell-primary:disabled{background:rgb(var(--forward-rgb)/.35);color:white;opacity:1;box-shadow:none;cursor:not-allowed}
body button.shell-secondary{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:52px;margin:0;padding:8px 12px;border:0;border-radius:var(--control-radius);background:var(--brand);color:var(--on-brand);box-shadow:var(--shadow-btn-brand);font:700 13px/1.25 var(--font);letter-spacing:.06em;text-transform:uppercase;cursor:pointer;transition:transform .15s var(--ease-spring),box-shadow .15s}
body button.shell-secondary.shell-tonal{background:var(--brand-tint);color:var(--action-ink-dark);box-shadow:inset 0 0 0 1px rgb(var(--brand-rgb)/.1)}
body button.shell-secondary svg{position:static;width:22px;height:22px;flex:none;color:inherit}
body button.shell-secondary:disabled{opacity:.4;cursor:not-allowed}
body button.shell-secondary:enabled:active{transform:translateY(1px);box-shadow:var(--shadow-btn-pressed)}
.shell-undo:not(:empty){display:flex;align-items:center;justify-content:center;gap:12px;width:fit-content;max-width:100%;margin:16px auto;padding:12px 20px;border:0;border-radius:999px;background:var(--brand-dark);color:var(--on-brand);box-shadow:var(--shadow-pop);font-size:13px}
.shell-undo button{background:transparent;color:white;border:0;min-height:44px;font-weight:700;text-transform:uppercase}
.shell-toast{position:fixed;bottom:max(24px,env(safe-area-inset-bottom));left:50%;translate:-50% 0;max-width:calc(100vw - 32px);width:max-content;z-index:100;text-align:center;pointer-events:none}
body button:is(.shell-primary,.shell-secondary,.shell-back):focus-visible,body .stage-path-toggle:focus-visible,body .journey-step:focus-visible{box-shadow:inset 0 0 0 3px rgb(var(--brand-rgb)/.35)}
@media(prefers-reduced-motion:reduce){.test-journey,.journey-track:after,.journey-step .journey-node,.teacher-app-menu,.shell-toast,.shell-primary,.shell-secondary{animation:none;transition:none}.journey-step.is-current .journey-node-slot:before{animation:none;opacity:0}}

.stage-path-toggle[data-shell-icon]>.ds-icon:last-child{display:none}
.stage-path-toggle[data-shell-icon][aria-expanded=true]>.ds-icon:first-child{display:none}
.stage-path-toggle[data-shell-icon][aria-expanded=true]>.ds-icon:last-child{display:block}
/* Locks and availability own visibility, including hidden capture docks. */
body :is(.shell-action-dock,.shell-secondary-row,.shell-primary,.shell-secondary)[hidden]{display:none}
/* Short screens still put the dock on the viewport edge; long screens scroll. */
body.stage-path-preview.compact-journey-app>main:has(>.shell-action-dock){display:flex;flex-direction:column}
body.stage-path-preview>main>.shell-action-dock{flex:none;margin-top:auto}
body.stage-path-preview>main>.flow-hero-shell{flex:none}
body.stage-path-preview>main>.capture-workspace{flex:none;width:100%}
body.stage-path-preview>main:has(>.reading-panel>.shell-inline-dock){display:flex;flex-direction:column}
body.stage-path-preview>main>.reading-panel:has(>.shell-inline-dock){display:flex;flex-direction:column;flex:1;width:100%}
.reading-panel>.shell-inline-dock{margin-top:auto}

/* The dock owns the screen's single emerald action. Other moves use plum. */
body button.shell-primary.shell-supporting-action{background:var(--brand);color:var(--on-brand);box-shadow:var(--shadow-btn-brand)}
body.stage-path-preview button.shell-primary:disabled{opacity:1}
body button.shell-primary.shell-supporting-action:disabled{background:rgb(var(--brand-rgb)/.35);box-shadow:none}

/* teacher-lists.css */
/* Batch 3: Classes and Tests only. All colours use the shared theme. */
.classes.lists-classes{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;width:100%;max-width:680px;margin:0 auto}
body .classes .class-card.lists-class{display:flex;align-items:center;gap:16px;width:100%;min-height:0;height:auto;margin:0;padding:16px;text-align:left;text-transform:none;background:var(--surface);color:var(--ink);border:0;border-radius:var(--card-radius);box-shadow:var(--shadow-tile),0 0 0 1px rgb(var(--brand-rgb)/.08);transition:transform .2s var(--ease-spring),box-shadow .2s;animation:lists-enter .3s var(--ease-spring) both;animation-delay:var(--list-delay,0ms)}
body .classes .class-card.lists-class:hover{background:var(--surface);transform:translateY(-2px);box-shadow:var(--shadow-lift),0 0 0 1px rgb(var(--brand-rgb)/.08)}
body .classes .class-card.lists-class:active,body .classes .class-card.lists-class.is-pressed{transform:scale(.99);margin:0}
.lists-class .ds-grade{width:56px;height:56px;border-radius:14px;box-shadow:inset 0 0 0 1px rgb(var(--brand-rgb)/.1);font-size:24px;line-height:1;font-variant-numeric:tabular-nums;gap:3px}
.lists-class .ds-grade .ds-eyebrow{font-size:8px;letter-spacing:.14em;opacity:.7}
.lists-class .ds-tile-copy{gap:6px;align-items:flex-start;text-align:left}
.lists-class .ds-tile-copy strong{font-size:17px;font-weight:700;line-height:1.25;letter-spacing:-.01em;text-transform:none}
.lists-class .ds-hint{margin:0;font-size:12px;line-height:1.4;text-transform:none}
.lists-class .ds-tile-arrow{width:36px;height:36px;border-radius:50%;background:var(--page)}
.lists-class .ds-tile-arrow svg{width:18px;height:18px}
.lists-class .ds-pending{top:-6px;right:-6px;min-width:20px;height:20px;padding:0 4px;display:grid;place-items:center;font-size:10px;font-weight:700;box-shadow:0 0 0 2px var(--surface)}
.lists-section-label{max-width:680px;margin:20px auto 12px;padding:0 4px;color:var(--muted);font:700 10px/1.4 var(--font);letter-spacing:.14em;text-transform:uppercase;text-align:left}
.lists-all-label{margin-top:16px}
.test-list.lists-tests{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;width:100%;max-width:680px;margin:0 auto 32px}
.lists-test-group{min-width:0;margin:0}
.lists-test-group>.lists-section-label{margin-top:0}
.lists-test-group-body{display:grid;gap:12px}
body .test-tile.lists-test{position:relative;isolation:isolate;display:block;min-height:0;margin:0;padding:0;overflow:hidden;border:0;border-radius:var(--card-radius);background:var(--surface);color:var(--ink);box-shadow:var(--shadow-tile),0 0 0 1px rgb(var(--brand-rgb)/.08);text-align:left;transition:transform .2s var(--ease-spring),box-shadow .2s;animation:lists-enter .3s var(--ease-spring) both;animation-delay:var(--list-delay,0ms)}
body .test-tile.lists-test:hover{transform:translateY(-2px);box-shadow:var(--shadow-lift),0 0 0 1px rgb(var(--brand-rgb)/.08)}
body .test-tile.lists-test.is-pressed{transform:scale(.99)}
.lists-test-body{display:grid;gap:12px;padding:16px 16px 12px}
.lists-test-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-right:40px;min-height:28px}
body .lists-test-head h2{margin:0;min-width:0;font:700 17px/1.25 var(--font);letter-spacing:-.01em;text-transform:none;text-align:left;overflow-wrap:anywhere}
.lists-test-date{flex:none;padding-top:2px;color:var(--muted);font:400 11px/1.4 var(--font);white-space:nowrap}
.lists-test-progress{display:flex;align-items:center;gap:12px}
.lists-test-progress>.ds-progress{height:6px;flex:1;min-width:0;background:rgb(var(--brand-rgb)/.1)}
.lists-test-progress>span{flex:none;font:700 11px/1.4 var(--font);color:var(--action-ink);font-variant-numeric:tabular-nums}
body .lists-test .test-action.lists-test-action{position:static;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;width:100%;height:auto;margin:0;padding:10px 16px;border:0;border-top:1px solid rgb(var(--brand-rgb)/.07);border-radius:0;background:rgb(var(--page-rgb)/.5);color:var(--action-ink-dark);font:700 12px/1.3 var(--font);letter-spacing:.08em;text-transform:uppercase;text-align:left;box-shadow:none}
.lists-test-action:after{content:'';position:absolute;inset:0;z-index:1;cursor:pointer}
.lists-test-action-label{min-width:0;overflow-wrap:anywhere}
.lists-test-arrow{display:grid;place-items:center;width:32px;height:32px;flex:none;border-radius:50%;background:var(--surface);color:var(--action-ink);box-shadow:var(--shadow-tile),0 0 0 1px rgb(var(--brand-rgb)/.1);transition:transform .2s var(--ease-spring)}
.lists-test:hover .lists-test-arrow{transform:translateX(2px)}
body .lists-test .lists-test-action.lists-ready{background:var(--tint-green);color:var(--tint-green-ink);border-color:var(--tint-green-edge)}
.lists-ready .lists-test-arrow{background:var(--forward);color:var(--on-forward);box-shadow:var(--shadow-btn-forward)}
body .lists-test .delete-test.lists-delete{position:absolute;z-index:2;right:8px;top:8px;display:grid;place-items:center;width:44px;height:44px;min-width:44px;margin:0;padding:10px;border:0;border-radius:50%;background:transparent;color:var(--muted);box-shadow:none;cursor:pointer}
body .lists-test .delete-test.lists-delete:hover{background:var(--brand-tint);color:var(--action-ink)}
.lists-delete>svg{width:20px;height:20px}
body .test-tile.create-test-tile.lists-create{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:56px;height:auto;margin:0;padding:12px;border:1.5px dashed rgb(var(--brand-rgb)/.3);border-radius:var(--card-radius);background:transparent;color:var(--action-ink);box-shadow:none;font:700 12px/1.3 var(--font);letter-spacing:.08em;text-transform:uppercase;cursor:pointer}
body .test-tile.create-test-tile.lists-create:hover{border-color:var(--brand);background:var(--brand-tint)}
.lists-create .create-plus{width:auto;height:auto;min-width:0;background:none;font-size:20px;line-height:1}
.lists-resume{display:flex;align-items:center;gap:16px;width:100%;max-width:680px;margin:4px auto 24px;padding:16px;border:0;border-radius:var(--card-radius);background:var(--brand);color:var(--on-brand);box-shadow:var(--shadow-btn-brand);text-align:left;cursor:pointer;transition:transform .2s var(--ease-spring);animation:lists-enter .3s var(--ease-spring)}
.lists-resume:hover{transform:translateY(-2px)}
.lists-resume:active{transform:scale(.99)}
.lists-resume-number{display:grid;place-items:center;width:48px;height:48px;flex:none;border-radius:50%;background:rgb(255 255 255/.15);font:700 18px var(--font)}
.lists-resume-copy{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.lists-resume-eyebrow{font:700 10px/1.4 var(--font);letter-spacing:.14em;text-transform:uppercase;opacity:.7}
.lists-resume-copy strong{font:700 15px/1.25 var(--font);text-transform:none;overflow-wrap:anywhere}
.lists-resume-hint{font:400 12px/1.4 var(--font);text-transform:none;opacity:.75}
.lists-resume-arrow{display:grid;place-items:center;width:36px;height:36px;flex:none;border-radius:50%;background:rgb(255 255 255/.15)}
body .lists-test-action:focus-visible:after{box-shadow:inset 0 0 0 3px rgb(var(--brand-rgb)/.3);border-radius:var(--card-radius)}
body :is(.lists-class,.lists-create,.lists-resume,.lists-delete):focus-visible{box-shadow:inset 0 0 0 3px rgb(var(--brand-rgb)/.35)}
@keyframes lists-enter{from{opacity:.9;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){body .lists-class,body .lists-test,.lists-resume,.lists-test-arrow{animation:none;transition:none}}
/* List titles stay centred before the shared resize/fit frame runs. */
body.stage-path-preview>main:has(.lists-tests) .shell-title:has(.shell-back) .shell-title-copy{padding-inline:56px}
body.stage-path-preview>main:has(.lists-tests) .shell-title>.shell-back{position:absolute;left:0;top:50%;transform:translateY(-50%)}
body.stage-path-preview>main:has(.lists-tests) .shell-title>.individual-list-navigation{top:50%}

/* teacher-paper.css */
/* Batch 4 — Lilac Dusk paper capture, factual reading and doubt cards. */
body.stage-path-preview main.paper-screen-view>.capture-workspace{display:flex;flex-direction:column;gap:16px;overflow:visible;max-width:680px;margin:0 auto 20px}
body .paper-screen-view .paper-stage{border:1px solid rgb(var(--brand-rgb)/.1);background:var(--surface);border-radius:var(--card-radius);box-shadow:var(--shadow-tile)}
body .paper-screen-view .paper-stage:not(.capture-empty){display:none}
body .paper-screen-view .capture-empty{height:auto;min-height:300px;aspect-ratio:3/3.3;border:2px dashed rgb(var(--brand-rgb)/.25);padding:28px;display:flex;flex-direction:column;justify-content:center;gap:16px;background:rgb(var(--surface-rgb)/.6);text-align:center}
body .paper-screen-view .capture-empty>p{margin:0;font-size:15px;font-weight:700;color:var(--ink)}
body .paper-screen-view .capture-empty .paper-empty-hint{font-size:12px;line-height:1.6;font-weight:400;color:var(--muted);max-width:270px}
body .paper-screen-view .capture-add-camera{position:static;order:-1;display:grid;place-items:center;width:64px;height:64px;min-height:64px;border:0;border-radius:50%;background:var(--brand-tint);color:var(--action-ink);box-shadow:none;transform:none}
body .paper-screen-view .photo-thumbnails{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%;padding:0;overflow:visible}
.paper-thumb-tile{position:relative;min-width:0}
body .paper-screen-view .photo-thumbnail{position:relative;width:100%;height:auto;aspect-ratio:3/4;border:1px solid rgb(var(--brand-rgb)/.1);border-radius:var(--tile-radius,18px);overflow:hidden;background:var(--photo);box-shadow:var(--shadow-tile);padding:0;transform:none}
body .paper-screen-view .photo-thumbnail[aria-pressed=true]{outline:2px solid var(--brand);outline-offset:2px}
body .paper-screen-view .photo-thumbnail img{width:100%;height:100%;object-fit:contain}
body .paper-screen-view .photo-thumbnail>span{position:absolute;bottom:8px;left:8px;top:auto;right:auto;padding:4px 10px;border-radius:999px;background:var(--surface);color:var(--action-ink-dark);font-size:11px;font-weight:700}
body .paper-thumb-remove{position:absolute;z-index:2;top:4px;right:4px;width:44px;height:44px;border:0;border-radius:50%;font:24px var(--font);background:var(--surface);color:var(--ink);box-shadow:var(--shadow-tile)}
body .paper-thumb-remove[hidden]{display:none}
body .paper-screen-view .camera-choice.shell-secondary{background:var(--brand);color:var(--on-brand);box-shadow:var(--shadow-btn-brand)}
body .paper-screen-view .gallery-choice.shell-secondary{background:var(--brand-tint);color:var(--action-ink-dark)}
body .paper-screen-view .capture-done:has(.paper-page-caption){position:relative;min-height:64px;padding-bottom:19px}
.paper-page-caption{position:absolute;bottom:8px;left:36px;right:36px;text-align:center;font-size:10px;letter-spacing:0;font-weight:400;text-transform:none;opacity:.8}
body .paper-reading-panel{gap:12px;padding:0;max-width:680px;margin:0 auto;text-align:center;background:transparent;border:0;box-shadow:none}
body .paper-reading-panel>.burby-waiting,body .paper-reading-panel>.reading-success-burby{display:none}
.paper-reading-facts{width:100%;margin:0 auto 12px}
.reading-paper-photo{position:relative;width:62%;max-width:260px;aspect-ratio:3/4;overflow:hidden;margin:8px auto 24px;border-radius:var(--tile-radius,18px);background:var(--photo);box-shadow:var(--shadow-lift);border:1px solid rgb(var(--brand-rgb)/.1)}
.reading-paper-photo img{display:block;width:100%;height:100%;object-fit:contain}
.reading-paper-photo.no-preview{display:grid;place-items:center;aspect-ratio:auto;min-height:80px;box-shadow:var(--shadow-tile);padding:16px}
.reading-preview-unavailable{font-size:12px;color:var(--muted)}
.paper-scan-line{position:absolute;left:0;right:0;height:22%;top:0;border-bottom:2px solid var(--brand);background:linear-gradient(transparent,rgb(var(--brand-rgb)/.15));animation:paper-scan 2.4s ease-in-out infinite}
@keyframes paper-scan{0%{transform:translateY(-100%)}100%{transform:translateY(460%)}}
.paper-checklist{list-style:none;padding:0;margin:20px auto;display:grid;gap:12px;max-width:310px;text-align:left}
.paper-checklist li{display:flex;gap:12px;align-items:center;font-size:13px;color:var(--muted)}
.paper-checklist li.is-done,.paper-checklist li.is-active{font-weight:700;color:var(--ink)}
.paper-check-icon{display:grid;place-items:center;flex:none;width:24px;height:24px;border-radius:50%;background:var(--brand-tint);color:var(--action-ink)}
.is-done>.paper-check-icon{background:var(--forward);color:var(--on-forward)}
.paper-local-note{font-size:12px;line-height:1.5;color:var(--muted)}
.paper-summary{display:flex;margin:24px 0 0;padding:16px 0;background:var(--surface);border-radius:var(--card-radius);box-shadow:var(--shadow-tile)}
.paper-summary>div{flex:1;text-align:center}.paper-summary>div+div{border-left:1px solid rgb(var(--brand-rgb)/.1)}
.paper-summary dt{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.12em;color:var(--muted)}.paper-summary dd{font-size:24px;font-weight:700;font-variant-numeric:tabular-nums;margin:4px 0 0}
.paper-doubt-progress{display:flex;gap:12px;align-items:center;margin:4px 0 16px;font-size:11px;color:var(--muted);font-weight:700;font-variant-numeric:tabular-nums}
.paper-doubt-segments{display:flex;flex:1;gap:6px}.paper-doubt-segments>span{height:6px;flex:1;border-radius:99px;background:rgb(var(--brand-rgb)/.1)}.paper-doubt-segments>.is-done{background:var(--forward)}
body .paper-doubt-card{border:1px solid var(--tint-red-edge);border-left:4px solid var(--marks-help);border-radius:var(--card-radius);background:var(--surface);box-shadow:var(--shadow-tile);overflow:hidden;margin:0 0 12px}
body .paper-doubt-card.answered{border-color:var(--tint-green-edge);border-left-color:var(--forward)}
body .paper-doubt-card .doubt-row{padding:16px 14px;gap:12px;background:transparent;text-align:left;color:var(--ink);border:0;min-height:64px}
body .paper-doubt-card .doubt-symbol{background:var(--tint-red);color:var(--marks-help);width:32px;height:32px;min-width:32px;border-radius:50%;display:grid;place-items:center;font-size:17px}
body .paper-doubt-card.answered .doubt-symbol{background:var(--tint-green);color:var(--forward)}
body .paper-doubt-card .doubt-row strong{font-size:20px}.paper-doubt-card .doubt-kind{font-size:10px;color:var(--marks-help);text-transform:uppercase}
body .paper-doubt-card .doubt-summary{font-size:13px;line-height:1.5;color:var(--muted);margin-top:6px}
body .paper-doubt-card .doubt-body{padding:0 16px 16px}
body .paper-doubt-card .doubt-choice{border:1px solid rgb(var(--brand-rgb)/.18);border-radius:12px;background:var(--surface);color:var(--action-ink-dark);min-height:48px;padding:12px;font:700 13px var(--font);text-transform:none}
body .paper-doubt-card .doubt-choice[aria-pressed=true]{background:var(--brand-tint);border-color:var(--brand);box-shadow:inset 0 0 0 1px var(--brand)}
body .paper-doubt-card .doubt-field input,body .local-paper-details input{min-height:48px;border:1px solid rgb(var(--brand-rgb)/.25);border-radius:12px;background:var(--surface);color:var(--ink);font:16px var(--font);padding:10px 12px}
body .paper-doubt-card .save-doubt{min-height:44px;border-radius:12px;background:var(--brand);color:var(--on-brand);font:700 12px var(--font);border:0}
body .paper-doubt-card .cancel-doubt{min-height:44px;border-radius:12px;background:var(--brand-tint);color:var(--action-ink-dark);border:0}
.paper-doubt-caption{margin:0 0 8px;font-size:11px;color:var(--muted);text-align:center}
body .local-paper-details{background:var(--surface);border:1px solid rgb(var(--brand-rgb)/.1);border-radius:var(--card-radius);box-shadow:var(--shadow-tile);padding:20px}
body .paper-doubt-card :focus-visible,body .paper-screen-view :focus-visible{outline:3px solid rgb(var(--brand-rgb)/.35);outline-offset:3px}
@media(prefers-reduced-motion:reduce){.paper-scan-line{animation:none;top:45%}}
.paper-doubt-progress:has(.paper-summary){flex-wrap:wrap}.paper-doubt-progress>.paper-summary{flex-basis:100%;margin:0 0 4px;order:-1}
body .paper-screen-view .camera-stage{border:1px solid rgb(var(--brand-rgb)/.15);border-radius:var(--card-radius);overflow:hidden}
body .paper-screen-view .capture-empty>p{position:static;inset:auto}
body .paper-screen-view .capture-empty{min-height:220px;max-height:380px;aspect-ratio:auto}
body .paper-screen-view .capture-done:has(.paper-page-caption){height:64px;max-height:64px}

/* teacher-sheets.css */
/* Batch 5 — class collection, matching and answer-sheet capture. */
body.stage-path-preview>main.sheets-screen-view{display:flex;flex-direction:column;gap:0}
body .sheets-screen-view>.stack-body{width:100%;max-width:680px;margin:0 auto;flex:1 0 auto;padding-bottom:16px}
.sheets-counter{padding:16px;margin:0 0 16px;background:var(--surface);border-radius:var(--card-radius);box-shadow:var(--shadow-tile),0 0 0 1px rgb(var(--brand-rgb)/.08)}
.sheets-counter-top{display:flex;align-items:baseline;justify-content:space-between;gap:12px;color:var(--muted);font-size:11px}
.sheets-counter-top>span:first-child{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.14em}
.sheets-counter-value{display:flex;align-items:baseline;gap:5px;margin:5px 0 12px;font-variant-numeric:tabular-nums}.sheets-counter-value strong{font-size:32px;line-height:1;letter-spacing:-.04em}.sheets-counter-value>span{font-size:16px;font-weight:700;color:var(--muted)}
.sheets-counter-bar{display:block;appearance:none;-webkit-appearance:none;width:100%;height:8px;border:0;border-radius:99px;overflow:hidden;background:rgb(var(--brand-rgb)/.1);accent-color:var(--brand)}
.sheets-counter-bar::-webkit-progress-bar{background:rgb(var(--brand-rgb)/.1);border-radius:99px}.sheets-counter-bar::-webkit-progress-value{background:var(--brand);border-radius:99px;transition:width .35s var(--ease-spring)}.sheets-counter-bar::-moz-progress-bar{background:var(--brand);border-radius:99px}
.sheets-counter-caption{margin:10px 0 0;font-size:11px;line-height:1.5;color:var(--muted)}
body .sheets-screen-view .stack-children{display:grid;gap:10px;margin:0;padding:0;overflow:visible;max-height:none;border:0}
body .sheets-screen-view .sheets-student-tile{display:flex;width:100%;gap:12px;align-items:center;min-height:74px;padding:12px;text-align:left;background:var(--surface);border:0;border-radius:var(--card-radius);box-shadow:var(--shadow-tile),0 0 0 1px rgb(var(--brand-rgb)/.08);color:var(--ink);font-family:var(--font);text-transform:none}
body .sheets-screen-view .sheets-student-tile strong{font-size:15px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
body .sheets-screen-view .sheets-student-tile .ds-avatar{width:44px;height:44px;font-size:13px;box-shadow:0 0 0 2px rgb(var(--brand-rgb)/.15)}
body .sheets-screen-view .sheets-student-tile.ds-state-uploaded .ds-avatar{background:var(--brand-tint);color:var(--action-ink-dark);box-shadow:0 0 0 2px var(--forward)}
body .sheets-screen-view .sheets-student-tile.ds-state-absent .ds-avatar{background:var(--photo);color:var(--muted);box-shadow:0 0 0 2px rgb(var(--marks-help-rgb)/.6)}
body .sheets-screen-view .sheets-student-tile .ds-tile-copy{flex:1;min-width:0}.sheets-student-tile .ds-wrap{margin-top:5px}.sheets-student-tile .ds-caption{font-size:11px}
.sheets-student-static>.ds-icon{visibility:hidden}body .sheets-screen-view .stack-absent{background:transparent;border:0;padding:0;margin:12px 0;color:var(--muted);font-size:11px;line-height:1.5}
.sheets-screen-view .stack-absent-names[hidden]{display:none}
body .sheets-screen-view .stack-footer{width:100%;max-width:680px;flex:none;margin-top:auto}
body .sheets-screen-view .sheets-capture-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;margin:0}
body .sheets-screen-view .camera-choice.shell-secondary:not(.live-secondary){background:var(--brand);color:var(--on-brand);box-shadow:var(--shadow-btn-brand)}
body .sheets-screen-view .gallery-choice{background:var(--brand-tint);color:var(--action-ink-dark)}
body .sheets-screen-view .sheets-review-upload{min-height:44px;border:1px solid rgb(var(--brand-rgb)/.15);border-radius:var(--control-radius);background:var(--brand-tint);color:var(--action-ink-dark);font:700 12px var(--font);padding:10px 16px;text-transform:none}
body .sheets-screen-view .sheets-review-upload[hidden]{display:none}
body .sheets-screen-view .sheets-captioned{position:relative;height:64px;min-height:64px;max-height:64px;padding-bottom:20px}
.sheets-action-caption{position:absolute;bottom:8px;left:36px;right:36px;font-size:10px;line-height:1.3;letter-spacing:0;text-align:center;text-transform:none;font-weight:400;opacity:.8}
.sheets-dock-status{margin:0;font-size:11px;line-height:1.5;color:var(--muted);text-align:center}
body .sheets-screen-view .stack-match-count{font-size:11px;color:var(--muted);margin:0;text-align:center}
body .sheets-screen-view .stack-whose{margin:16px 0;max-width:none;border:0;background:none;padding:0}
body .sheets-screen-view .sheets-whose-card{display:block;overflow:hidden;margin:0 0 16px;padding:16px;border:1px solid var(--tint-red-edge);border-left:4px solid var(--marks-help);border-radius:var(--card-radius);background:var(--surface);box-shadow:var(--shadow-tile)}
body .sheets-screen-view .sheets-whose-card h2{margin:0 0 14px;color:var(--ink);font-size:20px;line-height:1.4;text-align:left;text-transform:none;letter-spacing:-.02em}
body .sheets-screen-view .sheets-whose-card>.stack-page-image{display:block;width:62%;max-width:230px;height:230px;margin:0 auto 16px;object-fit:contain;border:1px solid rgb(var(--brand-rgb)/.1);border-radius:var(--tile-radius);background:var(--photo);box-shadow:var(--shadow-tile)}
body .sheets-screen-view .stack-read-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);margin:12px 0 4px}
body .sheets-screen-view .stack-read-text{padding:12px;margin:0 0 12px;background:var(--photo);border-radius:var(--tile-radius);color:var(--ink);font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
body .sheets-screen-view .stack-candidates,.sheets-local-candidates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
.sheets-local-candidates{max-height:240px;overflow:auto;padding:3px}
body .sheets-screen-view .sheets-whose-card .doubt-choice{min-height:48px;border:1px solid rgb(var(--brand-rgb)/.2);border-radius:12px;background:var(--surface);color:var(--action-ink-dark);font:700 13px var(--font);text-transform:none;line-height:1.4;padding:10px;white-space:normal;overflow-wrap:anywhere}
body .sheets-screen-view .sheets-whose-card .doubt-choice[aria-pressed=true]{background:var(--brand-tint);border-color:var(--brand);box-shadow:inset 0 0 0 1px var(--brand)}
body .sheets-screen-view .sheets-whose-card>button:not(.reading-primary){min-height:44px;border-radius:12px;background:var(--brand-tint);color:var(--action-ink-dark);border:0;padding:10px 14px;margin:4px;font-size:12px;text-transform:none}
.sheets-candidate-select{display:grid;gap:6px;font-size:12px;color:var(--muted)}.sheets-candidate-select select{min-height:48px;width:100%;padding:10px;border:1px solid rgb(var(--brand-rgb)/.2);border-radius:12px;font:16px var(--font);background:var(--surface);color:var(--ink)}
body .sheets-screen-view .live-completion{width:100%;padding:16px;border:1px solid rgb(var(--brand-rgb)/.08);border-radius:var(--card-radius);background:var(--surface);box-shadow:var(--shadow-tile);margin:12px 0 16px}
body .sheets-screen-view .live-completion p{font-size:12px;line-height:1.5;color:var(--action-ink-dark);font-weight:700;margin:0 0 10px}
body .sheets-screen-view .live-completion progress{display:block;width:100%;height:8px;accent-color:var(--brand);border:0;border-radius:99px;overflow:hidden}
body .sheets-screen-view .live-completion progress::-webkit-progress-bar{background:rgb(var(--brand-rgb)/.1)}body .sheets-screen-view .live-completion progress::-webkit-progress-value{background:var(--brand);border-radius:99px}
body .sheets-screen-view .stack-sorting{font-size:15px;font-weight:700;color:var(--action-ink);margin:12px 0}
body .sheets-screen-view.engine-stack-upload .paper-stage{border:1px solid rgb(var(--brand-rgb)/.15);border-radius:var(--card-radius);background:var(--photo);box-shadow:var(--shadow-tile)}
body .sheets-screen-view.engine-stack-upload .capture-empty{border:2px dashed rgb(var(--brand-rgb)/.25);background:rgb(var(--surface-rgb)/.6)}
body .sheets-screen-view :focus-visible{outline:3px solid rgb(var(--brand-rgb)/.35);outline-offset:3px}
@media(max-width:374px){body .sheets-screen-view .stack-candidates{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.sheets-counter-bar::-webkit-progress-value{transition:none}}
.sheets-counter.is-complete .sheets-counter-bar{accent-color:var(--forward)}.sheets-counter.is-complete .sheets-counter-bar::-webkit-progress-value{background:var(--forward)}.sheets-counter.is-complete .sheets-counter-bar::-moz-progress-bar{background:var(--forward)}
/* Override the older compact stack list rules without affecting other screens. */
body.stage-path-preview main.sheets-screen-view.engine-stack .stack-children{display:grid;gap:10px;margin:0;padding:0}
body.stage-path-preview main.sheets-screen-view.engine-stack .sheets-student-tile{display:flex;align-items:center;gap:12px;min-height:74px;padding:12px;border:0;border-radius:var(--card-radius);background:var(--surface);box-shadow:var(--shadow-tile),0 0 0 1px rgb(var(--brand-rgb)/.08);color:var(--ink);font:400 13px var(--font)}
body.stage-path-preview main.sheets-screen-view.engine-stack .sheets-student-tile strong{font:700 15px/1.4 var(--font);text-transform:none}
body.stage-path-preview main.sheets-screen-view.engine-stack-upload .stack-upload-footer .stack-capture-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%}
body .sheets-screen-view .stack-footer>.stack-match-count{display:none}
body .sheets-screen-view .stack-body>.sheets-review-upload{margin:12px 0;width:100%}

/* teacher-evaluate.css */
/* Batch 6 — real checking, evaluation tiles and the checked-sheet viewer. */
body.stage-path-preview>main:is(.eval-list-view,.eval-review-view,.eval-checking-view){display:flex;flex-direction:column}
body.stage-path-preview main.eval-list-view .saved-results-list{display:grid;gap:10px;width:100%;max-width:680px;margin:0 auto 16px;overflow:visible;padding:2px}
body.stage-path-preview main.eval-list-view .eval-student-tile,body.stage-path-preview main.eval-checking-view .eval-student-tile{display:flex;width:100%;min-height:74px;align-items:center;gap:12px;padding:12px;border:0;border-radius:var(--card-radius);background:var(--surface);color:var(--ink);font:400 13px var(--font);text-align:left;text-transform:none;box-shadow:var(--shadow-tile),0 0 0 1px rgb(var(--brand-rgb)/.08)}
body.stage-path-preview main.eval-list-view .eval-student-tile strong{font:700 15px/1.4 var(--font);white-space:normal;overflow-wrap:anywhere}
.eval-student-tile .ds-tile-copy{flex:1;min-width:0}.eval-student-tile .ds-wrap{margin-top:5px}.eval-student-tile>.ds-score{margin-left:auto}.eval-static>.ds-icon{visibility:hidden}
body .eval-student-tile[hidden]{display:none}
.eval-filters,body .eval-list-view .results-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%;max-width:680px;margin:8px auto 16px;padding:0;background:transparent;border:0;flex:none}
.eval-filters button,body .eval-list-view .results-filters button{min-height:44px;border:0;border-radius:var(--control-radius);background:var(--brand-tint);color:var(--action-ink-dark);font:700 11px var(--font);padding:8px;text-transform:none;box-shadow:inset 0 0 0 1px rgb(var(--brand-rgb)/.1)}
.eval-filters button[aria-pressed=true],body .eval-list-view .results-filters button[aria-pressed=true]{background:var(--brand);color:var(--on-brand);box-shadow:var(--shadow-btn-brand)}
body .eval-list-view .results-filters button:nth-child(n+4){font-size:10px;min-height:36px;background:var(--surface);color:var(--muted)}
body .eval-list-view .results-filters button:nth-child(n+4)[aria-pressed=true]{background:var(--brand-dark);color:var(--on-brand)}
.eval-filter-empty{padding:32px 16px;text-align:center;border-radius:var(--card-radius);background:var(--surface);font-size:13px;color:var(--muted)}
.eval-checking-card{padding:20px 16px;margin:8px auto 20px;max-width:680px;width:100%;text-align:center}
.eval-checking-count{display:flex;align-items:baseline;justify-content:center;gap:4px;font-variant-numeric:tabular-nums}
.eval-checking-count strong{font-size:56px;font-weight:700;letter-spacing:-.05em;line-height:1}.eval-checking-count span{font-size:24px;font-weight:700;color:var(--muted)}
.eval-checking-card p{font-size:12px;line-height:1.5;color:var(--muted);margin:12px 0 18px}
.eval-checking-card progress{display:block;width:100%;height:8px;appearance:none;-webkit-appearance:none;border:0;border-radius:99px;overflow:hidden;background:rgb(var(--brand-rgb)/.1);accent-color:var(--brand)}
.eval-checking-card progress::-webkit-progress-bar{background:rgb(var(--brand-rgb)/.1)}.eval-checking-card progress::-webkit-progress-value{background:var(--brand);border-radius:99px}
.eval-completed-list{display:grid;gap:8px;margin:0 0 20px}.eval-completed-list>.eval-row-arrived{animation:eval-row-in .25s var(--ease-spring)}
@keyframes eval-row-in{from{opacity:.9;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
body .eval-checking-view .sheets-counter,body .eval-checking-view .stack-counts,body .eval-checking-view .stack-body>.live-completion{display:none}
.eval-class-pages{margin:16px 0;color:var(--muted);font-size:12px}.eval-class-pages>summary{min-height:44px;padding:12px;cursor:pointer}
body .eval-review-view .review-student-navigation{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;min-height:0;margin:4px auto 16px;width:100%;padding:0;border:0;background:transparent}
body .eval-review-view .review-student-navigation>div{display:flex;align-items:center;justify-content:center;gap:8px}
body .eval-review-view .review-final-mark{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:5px 12px;min-height:32px;font:700 15px var(--font);font-variant-numeric:tabular-nums;background:var(--surface);box-shadow:inset 0 0 0 1px rgb(var(--muted-rgb)/.2);color:var(--muted)}
body .eval-review-view .review-final-mark.score-high{background:var(--tint-green);color:var(--score-high);box-shadow:inset 0 0 0 1px var(--tint-green-edge)}
body .eval-review-view .review-final-mark.score-middle{background:var(--tint-yellow);color:var(--score-middle);box-shadow:inset 0 0 0 1px var(--tint-yellow-edge)}
body .eval-review-view .review-final-mark.score-low{background:var(--tint-red);color:var(--score-low);box-shadow:inset 0 0 0 1px var(--tint-red-edge)}
.eval-review-position,body .eval-review-view .review-engine-mark{font-size:10px;line-height:1.5;color:var(--muted);font-weight:400}
body .eval-review-view .review-paper-sticky{width:100%;max-width:680px;margin:0 auto 16px;background:var(--page)}
body .eval-review-view .review-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px;margin:0;padding:4px 0 8px;min-height:44px;border:0;background:transparent}
.eval-answer-summary{display:flex;flex-wrap:wrap;align-items:center;gap:10px;flex:1;font-size:10px;color:var(--muted)}
.eval-answer-summary>span:before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--muted);margin-right:4px}.eval-answer-summary>.eval-summary-high:before{background:var(--marks-strong)}.eval-answer-summary>.eval-summary-middle:before{background:var(--marks-middle)}.eval-answer-summary>.eval-summary-low:before{background:var(--marks-help)}
body .eval-review-view .review-page-label{order:3;width:100%;text-align:center;font-size:10px;color:var(--muted)}
body .eval-review-view .marks-switch{border:0;min-height:44px;background:transparent;color:var(--action-ink);font:700 10px var(--font);letter-spacing:.1em;text-transform:uppercase;padding:4px}
body .eval-review-view .marks-switch-track{background:rgb(var(--brand-rgb)/.2);width:40px;height:24px;border-radius:99px;box-shadow:none;border:0}.eval-review-view .marks-switch[aria-checked=true] .marks-switch-track{background:var(--brand)}
body .eval-review-view .marks-switch-track:after{background:var(--surface);width:20px;height:20px;top:2px;left:2px;border:0;box-shadow:var(--shadow-tile)}
body .eval-review-view .marks-switch[aria-checked=true] .marks-switch-track:after{transform:translateX(16px)}
body .eval-review-view .review-photo-area,body .eval-review-view .inspection-sheet{border:4px solid var(--brand);border-radius:22px;background:var(--photo);box-shadow:var(--shadow-lift);overflow:hidden}
body .eval-review-view .sheet-annotation{border:2px dashed var(--marks-strong);border-radius:6px;color:var(--score-high);background:rgb(var(--marks-strong-rgb)/.07);box-shadow:none}
body .eval-review-view .sheet-annotation.annotation-middle{border-color:var(--marks-middle);color:var(--score-middle);background:rgb(var(--marks-middle-rgb)/.07)}
body .eval-review-view .sheet-annotation.annotation-low{border-color:var(--marks-help);color:var(--score-low);background:rgb(var(--marks-help-rgb)/.07)}
body .eval-review-view .sheet-annotation.annotation-neutral{border-color:var(--muted);color:var(--muted);background:transparent}
body .eval-review-view .sheet-annotation>span{background:var(--surface);color:inherit;font:700 10px/1.3 var(--font);padding:3px 6px;border-radius:999px;box-shadow:var(--shadow-tile);white-space:nowrap}
body .eval-review-view .hide-annotations .sheet-annotation{visibility:hidden;pointer-events:none}
body .eval-review-view .review-image-plane:not(.hide-annotations):has(.annotation-selected):after{content:'';position:absolute;inset:0;background:rgb(var(--brand-dark-rgb)/.1);pointer-events:none;z-index:1}
body .eval-review-view .review-image-plane:has(.annotation-selected) .sheet-annotation{z-index:2;opacity:.4}body .eval-review-view .review-image-plane .sheet-annotation.annotation-selected{z-index:3;opacity:1;background:transparent}
body .eval-review-view .review-details{width:100%;max-width:680px;margin:0 auto;padding:0 0 20px;overflow:visible}
body .eval-review-view .review-question{margin:0 0 12px;background:var(--surface);border:1px solid rgb(var(--brand-rgb)/.1);border-radius:var(--card-radius);box-shadow:var(--shadow-tile);overflow:hidden}
body .eval-review-view .review-question-row{display:flex;align-items:center;justify-content:space-between;width:100%;padding:16px;min-height:64px;background:transparent;color:var(--ink);border:0;text-align:left}
body .eval-review-view .review-question-row strong{font-size:20px;line-height:1.3;text-align:left}
body .eval-review-view .review-question-row>span{position:static;transform:none;border-radius:999px;padding:4px 10px;font-size:13px;font-weight:700;background:var(--brand-tint)}
body .eval-review-view .review-question:has(>.review-question-row>.score-high){border-top:4px solid var(--marks-strong)}body .eval-review-view .review-question:has(>.review-question-row>.score-middle){border-top:4px solid var(--marks-middle)}body .eval-review-view .review-question:has(>.review-question-row>.score-low){border-top:4px solid var(--marks-help)}
body .eval-review-view .review-question-body{padding:0 16px 16px;background:transparent;border:0}
body .eval-review-view .live-review-step,body .eval-review-view .review-question-body>.review-step{position:relative;margin:12px 0 12px 8px;padding:0 0 12px 18px;border:0;border-left:1px solid rgb(var(--brand-rgb)/.2);border-radius:0;background:transparent;font-size:13px;line-height:1.6;box-shadow:none}
body .eval-review-view .live-review-step:before,body .eval-review-view .review-question-body>.review-step:before{content:'';position:absolute;left:-6px;top:14px;width:10px;height:10px;border-radius:50%;background:var(--brand);box-shadow:0 0 0 3px var(--surface)}
body .eval-review-view .live-step-select{border:0;background:var(--page);border-radius:12px;padding:12px;width:100%;min-height:44px;color:var(--ink);font:700 13px var(--font);text-align:left}
body .eval-review-view .live-step-evidence{font-size:13px;line-height:1.6;margin:10px 0;color:var(--muted)}
body .eval-review-view .live-step-evidence strong{color:var(--ink)}
body .eval-review-view .live-review-reasons{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
body .eval-review-view .live-review-reasons .doubt-choice{width:auto;min-height:40px;border:1px solid rgb(var(--brand-rgb)/.2);border-radius:999px;padding:8px 14px;background:var(--surface);color:var(--action-ink-dark);font:400 13px var(--font);text-transform:none}
body .eval-review-view .live-review-reasons .doubt-choice[aria-pressed=true]{background:var(--brand-tint);border-color:var(--brand)}
body .eval-review-view .live-review-field,body .eval-review-view .review-details label{display:grid;gap:6px;font-size:12px;color:var(--muted);margin:12px 0}
body .eval-review-view .review-details input,body .eval-review-view .review-details textarea{font:16px/1.5 var(--font);background:var(--surface);color:var(--ink);border:1px solid rgb(var(--brand-rgb)/.25);border-radius:12px;min-height:48px;padding:10px 12px;width:100%;box-sizing:border-box}
body .eval-review-view .live-half-marks{display:flex;align-items:center;justify-content:center;gap:12px;margin:12px 0}
body .eval-review-view .live-half-marks button{width:44px;min-height:44px;border:0;border-radius:12px;background:var(--brand-tint);color:var(--action-ink)}
body .eval-review-view .live-review-preview{padding:12px;background:var(--tint-yellow);color:var(--score-middle);border-radius:12px;font-size:13px;line-height:1.5}
body .eval-review-view .review-details .camera-choice{min-height:44px;border:0;border-radius:12px;padding:10px 14px;margin:4px;background:var(--brand-tint);color:var(--action-ink-dark);font:700 12px var(--font);box-shadow:none}
body .eval-review-view .eval-review-dock{margin-top:auto;width:100%;max-width:680px}
body .eval-review-view .eval-review-secondary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;margin:0}
.eval-review-status{font-size:11px;line-height:1.5;color:var(--muted);text-align:center;margin:0}.eval-review-status:empty{display:none}
body :is(.eval-list-view,.eval-review-view,.eval-checking-view) :focus-visible{outline:3px solid rgb(var(--brand-rgb)/.35);outline-offset:3px}
@media(prefers-reduced-motion:reduce){.eval-completed-list>.eval-row-arrived{animation:none}}
body .eval-review-view .review-question-row>.score-high{background:var(--tint-green);color:var(--score-high)}body .eval-review-view .review-question-row>.score-middle{background:var(--tint-yellow);color:var(--score-middle)}body .eval-review-view .review-question-row>.score-low{background:var(--tint-red);color:var(--score-low)}
body .eval-review-view .review-student-navigation>[hidden]{display:none}
body .eval-review-view .eval-review-dock .eval-review-secondary>button{background:var(--brand-tint);color:var(--action-ink-dark);box-shadow:inset 0 0 0 1px rgb(var(--brand-rgb)/.1)}
body .eval-list-view>.live-results-footer{width:100%;max-width:680px;margin-top:auto}
.eval-reviewed-count{margin:0;text-align:center;color:var(--muted);font-size:11px;line-height:1.5}
body.stage-path-preview main.eval-list-view .saved-results-list{align-content:start;flex:none}
body.stage-path-preview main.eval-list-view.engine-results>.live-results-footer{display:flex;flex-direction:column;align-items:stretch;width:100%;max-width:680px}
body.stage-path-preview main.eval-list-view.engine-results>.live-results-footer>button.reading-primary{width:100%;min-height:56px;background:var(--forward);color:var(--on-forward);box-shadow:var(--shadow-btn-forward)}
body .eval-review-view .review-details{flex:0 0 auto}

/* teacher-reports.css */
/* ReportScreen / ReportChapter, with original report controls and geometry. */
main.class-report-page .report-chapters{gap:16px}
main.class-report-page .report-chapter{padding:20px;border:1px solid rgb(var(--brand-rgb)/.08);border-radius:var(--card-radius);box-shadow:var(--shadow-tile);background:var(--surface)}
main.class-report-page .report-chapter h2{margin:4px 0 18px;text-align:left;color:var(--ink);font-size:18px;letter-spacing:-.02em}
.reports-chapter-eyebrow{margin:0}
main.class-report-page .report-average{justify-content:flex-start;gap:20px;background:var(--surface)}
main.class-report-page .report-average h2{margin:6px 0 8px;max-width:none}
.reports-gauge-copy{min-width:0}.reports-gauge-copy p{margin:0}
main.class-report-page .report-gauge{width:120px;height:120px}
main.class-report-page .report-big-number{font-size:30px;color:var(--ink)}
main.class-report-page .report-room{padding:12px;border-radius:18px;background:var(--page)}
main.class-report-page .report-chalkboard{height:28px;border:0;border-radius:6px;background:var(--brand-dark);margin-bottom:12px}
/* Horizontal gap remains 4px: the original name-fitting calculation uses it. */
main.class-report-page .report-desks{column-gap:4px}
main.class-report-page .report-band-pills{gap:8px;margin-top:16px}
main.class-report-page .report-band-pills li{font-size:12px;background:transparent;padding:2px 0}
main.class-report-page .report-topic-row{border:1px solid rgb(var(--brand-rgb)/.09);border-radius:16px;background:var(--surface)}
main.class-report-page .report-topic-teach{background:var(--tint-red)}
main.class-report-page .report-topic-toggle{padding:12px;gap:8px;min-height:104px}
main.class-report-page .report-topic-name{font-size:14px}
main.class-report-page .report-topic-number{font-size:24px}
main.class-report-page .report-topic-track{height:8px}
main.class-report-page .report-topic-status{font-size:12px}
main.class-report-page .report-topic-students{padding:12px}
main.class-report-page .reports-support-title{margin:0 0 10px;color:var(--action-ink)}
main.class-report-page .report-name-chip{min-height:48px;border-radius:var(--card-radius);background:var(--surface);box-shadow:var(--shadow-tile);padding:6px 10px 6px 6px}
main.class-report-page .report-name-chip .report-chip-roll{min-width:28px;height:28px}
main.class-report-page .report-name-chip .report-person-name{font-size:13px;font-weight:700}
main.class-report-page .report-help-pupils{margin-bottom:16px;gap:8px}
main.class-report-page .report-help-student{min-height:48px}
main.class-report-page .report-support-caption{font-size:12px;color:var(--muted);text-align:left}
main.class-report-page .report-improvement-pending{background:transparent;border-style:dashed;box-shadow:none}
main.class-report-page .report-provenance{justify-content:flex-start;text-align:left;color:var(--muted)}
main.class-report-page .report-source-tag{background:var(--brand-tint);color:var(--action-ink);border-radius:999px}
main.class-report-page .report-actions{background:transparent;border:0;box-shadow:none;padding:0;position:static}
main.class-report-page .reports-preview-button{width:100%;min-height:52px;border:1px solid rgb(var(--brand-rgb)/.2);border-radius:18px;background:var(--brand-tint);color:var(--action-ink);font:700 13px var(--font);cursor:pointer}
main.class-report-page .report-all-students{font-size:12px;text-transform:none}
.reports-finish-dock{flex:none;margin-top:16px}
/* Results entry points: original names, scores, eligibility and callbacks. */
main.results-page:not(.eval-list-view) .saved-results-list{display:grid;gap:12px;align-content:start;flex:none}
main.results-page :is(.final-result-tile,.live-result-row:has(.final-result-actions)){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:18px;border:1px solid rgb(var(--brand-rgb)/.08);border-radius:20px;background:var(--surface);box-shadow:var(--shadow-tile)}
main.results-page .final-result-name,main.results-page .final-result-tile .result-student strong{font-size:15px;color:var(--ink);overflow-wrap:anywhere}
main.results-page .final-result-mark{padding:6px 10px;border-radius:999px;font-size:13px;font-weight:700;background:var(--brand-tint)}
main.results-page .final-result-mark.score-high{background:var(--tint-green);color:var(--marks-strong)}
main.results-page .final-result-mark.score-middle{background:var(--tint-yellow);color:var(--marks-middle)}
main.results-page .final-result-mark.score-low{background:var(--tint-red);color:var(--marks-help)}
main.results-page .final-result-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px}
main.results-page .final-result-actions button{flex:1;min-width:120px;min-height:44px;border:1px solid rgb(var(--brand-rgb)/.16);border-radius:14px;background:var(--brand-tint);color:var(--action-ink);padding:8px 12px;font:700 12px var(--font);text-transform:none}
main.results-page .final-result-actions button:disabled{opacity:.55;cursor:default}
main.results-page .student-report-unavailable{grid-column:1/-1;margin:0;text-align:left}
main.results-page .results-report-toolbar{margin:0 0 16px}
main.results-page .saved-results-source{font-size:12px;color:var(--muted)}
main.live-report-tab .saved-report-section{border:1px solid rgb(var(--brand-rgb)/.1);border-radius:20px;padding:20px;background:var(--surface);box-shadow:var(--shadow-tile)}
/* Chrome only: report canvas, asset content, zoom and share approval unchanged. */
.student-report-dialog{border-radius:var(--card-radius);box-shadow:var(--shadow-tile)}
.student-report-dialog header{padding:12px 16px;border-bottom:1px solid rgb(var(--brand-rgb)/.1)}
.student-report-dialog h2{font-size:18px;color:var(--ink)}
.student-report-close,.student-report-zoom{border-radius:999px;background:var(--brand-tint);font-size:12px;padding:10px 14px}
.student-report-dialog footer{background:var(--surface);border-top:1px solid rgb(var(--brand-rgb)/.1);padding:16px max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom))}
.student-report-dialog .reading-primary{border:0;border-radius:18px;background:var(--brand);box-shadow:var(--shadow-btn-brand);font:700 14px var(--font)}
.student-report-status{font-size:12px;color:var(--muted)}
.report-preview-dialog{border:1px solid rgb(var(--brand-rgb)/.15);border-radius:var(--card-radius);background:var(--surface);color:var(--ink);box-shadow:var(--shadow-tile)}
.report-preview-dialog .report-preview-notice{background:var(--brand-tint);color:var(--action-ink)}
.report-preview-dialog .report-dialog-close{border-radius:16px;background:var(--brand-tint);border-color:transparent}
@media(min-width:650px){main.class-report-page .report-chapter{padding:24px}main.class-report-page .report-topic-name{font-size:16px}main.results-page :is(.final-result-tile,.live-result-row:has(.final-result-actions)){padding:20px}}
@media(max-width:374px){main.class-report-page .report-average{gap:12px;padding:16px}main.class-report-page .report-gauge{width:104px;height:104px}.student-report-dialog header{padding:8px;gap:4px}.student-report-dialog h2{font-size:15px}.student-report-close,.student-report-zoom{padding:8px;font-size:11px}}

.reports-distribution{display:flex;height:10px;gap:2px;overflow:hidden;border-radius:999px;margin-bottom:12px}.reports-distribution>span{background:var(--report-band-color)}
main.class-report-page .reports-distribution+.report-band-pills{margin:0 0 16px}
main.results-page .results-report-toolbar>.result-report-action:not(.reading-primary){width:100%;min-height:52px;border:1px solid rgb(var(--brand-rgb)/.16);border-radius:18px;background:var(--brand-tint);color:var(--action-ink);font:700 14px var(--font);padding:12px}

/* teacher-night.css */
/* Theme settings use the same tokens in both modes. */
.theme-settings-dialog{width:min(440px,calc(100% - 32px));border:1px solid rgb(var(--brand-rgb)/.15);border-radius:var(--card-radius);background:var(--surface);color:var(--ink);padding:24px;box-shadow:var(--shadow-pop)}
.theme-settings-dialog h2{font:700 24px/1.25 var(--font);margin:4px 0 24px;color:var(--ink)}
.theme-setting-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.theme-setting-row strong{font-size:15px}.theme-setting-row p{margin:4px 0 0;font-size:12px;color:var(--muted)}
.theme-switch{flex:none;position:relative;width:56px;min-height:44px;border:0;border-radius:999px;padding:0;background:transparent;cursor:pointer}
.theme-switch:before{content:'';position:absolute;inset:6px 0;border-radius:999px;background:var(--photo);box-shadow:inset 0 0 0 1px var(--brand-soft)}
.theme-switch>span{position:absolute;width:24px;height:24px;left:4px;top:10px;border-radius:50%;background:var(--muted);transition:transform .2s var(--ease-spring),background .2s}
.theme-switch[aria-checked=true]:before{background:var(--brand)}.theme-switch[aria-checked=true]>span{transform:translateX(24px);background:var(--on-brand)}
.theme-setting-status{min-height:36px;margin:16px 0;font-size:12px;color:var(--muted)}
.theme-settings-close{width:100%;min-height:48px;border:0;border-radius:var(--control-radius);background:var(--brand-tint);color:var(--action-ink);font:700 14px var(--font);cursor:pointer}
.theme-settings-dialog button:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
/* Legacy page chrome: photos and exported report artwork retain their colours. */
[data-theme=night] .confirm-dialog{background:var(--surface);color:var(--ink);border-color:var(--brand-soft)}
[data-theme=night] :is(input,textarea,select){background-color:var(--surface);color:var(--ink);border-color:var(--brand-soft)}
[data-theme=night] :is(.report-band-high){--report-band-ink:var(--score-high);--report-on-band:var(--page)}
[data-theme=night] :is(.report-band-middle){--report-band-ink:var(--score-middle);--report-on-band:var(--page)}
[data-theme=night] :is(.report-band-low){--report-band-ink:var(--score-low);--report-on-band:var(--page)}
[data-theme=night] :is(.report-band-absent,.report-band-neutral){--report-band-color:var(--absent);--report-band-ink:var(--muted);--report-on-band:var(--page)}
[data-theme=night] .report-sample-correct{fill:var(--score-high)}
[data-theme=night] .report-sample-writing{fill:var(--ink)}
[data-theme=night] :is(.score-high,.final-result-mark.score-high){color:var(--score-high)}
[data-theme=night] :is(.score-middle,.final-result-mark.score-middle){color:var(--score-middle)}
[data-theme=night] :is(.score-low,.final-result-mark.score-low){color:var(--score-low)}
@media(prefers-reduced-motion:reduce){.theme-switch>span{transition:none}}
[data-theme=night] body :is(.demo-flow-panel,.live-change-form) :is(input,textarea){background:var(--surface);color:var(--ink);border-color:var(--brand-soft)}
[data-theme=night] .live-review-saved{color:var(--score-high)}
[data-theme=night] .local-stack-student-label select{color:var(--ink)}
[data-theme=night] body main .reading-panel{background:var(--surface);color:var(--ink);border-color:var(--brand-soft)}
[data-theme=night] body main .reading-panel h2{color:var(--ink)}
body main .doubt-paper-stage,body main .doubt-paper-stage .inspect-paper{background:var(--photo)}
/* A single round Back control in review, with the original navigation guard. */
body.stage-path-preview main .review-heading-with-back:has(.individual-list-navigation)>.go-back{display:none}
body.stage-path-preview main .individual-list-navigation button{width:44px;height:44px;padding:0;border:0;border-radius:50%;background:var(--surface);color:var(--action-ink);box-shadow:var(--shadow-tile)}
body.stage-path-preview main .individual-list-navigation button>span{display:none}
body.stage-path-preview main.results-page .final-result-tile,body.stage-path-preview main[data-source=live] .result-student>strong{text-transform:none}

}
