/* Teacher task workspace and student reading home share the existing violet palette. */
.admin-app{grid-template-columns:220px minmax(0,1fr);grid-template-rows:64px minmax(0,1fr);background:#f6f7fb}
.admin-topbar{padding:10px 24px}.admin-brand strong{font-size:18px}.admin-brand b{font-size:12px}.admin-brand>span{width:34px;height:34px;border-radius:10px;font-size:18px}
.admin-main{padding:30px}.admin-nav button{border-radius:7px;min-height:48px;padding:0 12px}.admin-page-head h1{font-size:24px}.admin-page-head p{font-size:13px}
.task-card{background:#fff;border:1px solid #ebeef5;border-radius:16px;padding:24px;margin-bottom:24px;box-shadow:0 5px 22px #20234004;color:#292d41}
.task-card>header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.task-card h2{font-size:18px;margin:0 0 14px}.task-card p{color:#7b8092;font-size:13px;line-height:1.7}.task-card header h2{margin:0}
.teacher-task-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 0;border-bottom:1px solid #eff0f6}.teacher-task-row:last-child{border:0}.teacher-task-row strong{font-size:15px}.teacher-task-row p{margin:8px 0 0}.task-badge{display:inline-block;background:#f1efff;color:#6559d9;border-radius:6px;font-size:11px;padding:4px 8px;margin-left:12px;white-space:nowrap}.task-badge.published{background:#edf8f2;color:#279369}.task-badge.failed{background:#fff0ed;color:#a44231}.task-row-actions{display:flex;gap:8px;flex-shrink:0}.task-row-actions button{font-size:12px;padding:8px 12px;min-height:34px}
.task-form,.task-question{display:grid;gap:20px}.task-form h2{margin:0}.task-card label{display:grid;gap:8px;font-size:13px;line-height:1.6}.task-card input:not([type=checkbox]),.task-card select,.task-card textarea{width:100%;box-sizing:border-box;border:1px solid #dfe2ee;border-radius:8px;padding:11px 13px;background:#fff;color:#292d41;font:inherit;line-height:1.7}.task-card textarea{resize:vertical;min-height:80px}.task-card :is(input,textarea,select):focus{outline:2px solid #8c85ed;outline-offset:1px}.task-card fieldset{border:0;padding:0;margin:0;min-width:0}.task-card legend{font-size:13px;margin-bottom:8px}.task-form-row{display:grid;grid-template-columns:1fr 3fr;gap:24px;margin-bottom:14px}.task-class-picker{display:flex;flex-wrap:wrap;gap:10px;max-height:180px;overflow:auto;padding:4px}.task-class-picker label{display:flex;align-items:center;border:1px solid #e5e4f0;padding:8px 12px;border-radius:7px}.task-class-picker input{accent-color:#6658ef}.task-form>button{justify-self:start}.task-edit-content{margin:18px 0}.task-question-list{display:grid;gap:12px}.task-question{border:1px solid #e5e6f0;border-radius:10px;padding:18px}.task-question summary{cursor:pointer;font-size:14px;font-weight:600;line-height:1.7}.task-question label{margin-top:14px}.task-choice-editor{display:grid;grid-template-columns:1fr 1fr;gap:14px}.task-editor-actions{position:sticky;bottom:-34px;display:flex;justify-content:flex-end;align-items:center;gap:12px;background:white;border-top:1px solid #e9eaf2;padding:18px 0;z-index:3}.task-editor-actions span{margin-right:auto;color:#526751;font-size:13px}.task-empty{padding:24px 0}
.student-home{height:100dvh;overflow:auto;background:#f6f7fb;color:#282c40;font-family:inherit}.student-home[hidden]{display:none!important}.student-home-top{position:sticky;top:0;z-index:5;height:64px;box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;padding:0 5%;background:#ffffffee;border-bottom:1px solid #e9eaf2}.student-home-top strong{display:flex;align-items:center;gap:12px}.student-home-top i{color:#6658ef}.student-home-top button{background:white;border:1px solid #e4e6ef;border-radius:8px;padding:8px 16px;margin-left:10px;cursor:pointer}.student-home-main{max-width:1220px;margin:auto;padding:36px 28px}.home-welcome{display:flex;justify-content:space-between;align-items:center;padding:12px 0 24px}.home-welcome h1{font-size:28px;margin:8px 0 12px}.home-welcome p{color:#73798e;font-size:14px}.home-welcome>i{font-size:56px;color:#7b70ed}.home-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:26px}.home-summary article{padding:22px;background:white;border:1px solid #ebeef5;border-radius:12px;display:grid;gap:8px}.home-summary strong{font-size:30px;color:#6256db}.home-summary span{font-size:13px;color:#797e90}.home-task-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.home-task{border:1px solid #e9e8f5;border-radius:12px;padding:22px;display:flex;flex-direction:column;align-items:flex-start}.home-task .task-badge{margin:0}.home-task h3{margin:18px 0 4px;font-size:19px}.home-task button{margin-top:auto}.home-task p{margin-bottom:22px}.home-lower{display:grid;grid-template-columns:1fr 1fr;gap:24px}.profile-row{display:grid;grid-template-columns:100px 1fr 40px;gap:12px;align-items:center;padding:10px 0;font-size:13px}.profile-row meter{width:100%;height:14px}.profile-row meter::-webkit-meter-optimum-value{background:#8177e8}.profile-row small{color:#8a8da1}.home-history-row{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eeeef5;padding:15px 0;gap:14px}.home-history-row strong{font-size:14px}.home-history-row p{margin:6px 0 0}.home-return{position:fixed;top:18px;left:180px;z-index:15;padding:8px 12px;border:1px solid #dedbf7;border-radius:8px;background:white;color:#6557dc;cursor:pointer}
@media(max-width:900px){.admin-app{grid-template-columns:170px minmax(0,1fr)}.admin-main{padding:20px}.admin-brand b{display:none}.task-row-actions{flex-wrap:wrap}.home-task-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.task-form-row{grid-template-columns:1fr}.home-return{left:12px;top:66px}}
@media(max-width:600px){.admin-app{grid-template-columns:1fr;grid-template-rows:64px auto minmax(0,1fr)}.admin-nav{grid-row:2;padding:6px;border-bottom:1px solid #eee}.admin-nav nav{display:flex;overflow:auto}.admin-nav button{padding:8px;white-space:nowrap;font-size:12px}.admin-nav>p{display:none}.admin-main{grid-row:3;padding:14px}.admin-sync-status{display:none}.admin-account-copy{min-width:0}.task-card{padding:18px}.teacher-task-row{align-items:flex-start;flex-direction:column}.home-summary{gap:8px}.home-summary article{padding:14px}.student-home-main{padding:18px 14px}.home-task-grid,.home-lower{grid-template-columns:1fr}.home-welcome h1{font-size:22px}.task-choice-editor{grid-template-columns:1fr}.task-editor-actions{flex-wrap:wrap;bottom:-14px}.task-editor-actions span{width:100%}.home-welcome>i{display:none}}

/* Keep navigation inside the real header, above the reading panes. */
.home-return{position:static;flex-shrink:0;white-space:nowrap;min-height:36px;font-size:12px}
@media(max-width:600px){.journey-topbar .student-badge,.journey-topbar .assessment-timer,.journey-topbar .records-toggle{display:none!important}.journey-topbar{grid-template-columns:32px minmax(90px,1fr) auto!important}.journey-topbar .home-return{padding:7px;font-size:11px}.journey-topbar .user-menu-btn{max-width:42px}.journey-topbar .journey-steps strong{display:none}}

/* Closed dialogs must never occupy layout or create a second page scrollbar. */
dialog:not([open]){display:none!important}
html:has(#studentHome:not([hidden])),body:has(#studentHome:not([hidden])){overflow:hidden!important;height:100dvh!important;min-height:0!important}

@media(min-width:901px){.journey-topbar{grid-template-columns:minmax(180px,.8fr) minmax(270px,1fr) auto;gap:16px;padding-inline:20px}.topbar-actions{gap:8px}.topbar-actions>*{flex-shrink:0}.topbar-actions .records-toggle{white-space:nowrap;min-width:62px}.topbar-actions .user-menu-btn{min-width:88px}.student-badge{max-width:100px;overflow:hidden;text-overflow:ellipsis}.topbar-brand>span:last-child{display:none}}

#adminArticlesView{width:100%;max-width:none}

.mechanism-text{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;max-height:400px;overflow:auto;padding:16px;background:#f7f7fc}
#mechanismForm{display:grid;gap:18px}#mechanismForm label{display:grid;gap:8px}#mechanismList details{padding:16px;border-bottom:1px solid #e5e6f1}
.question-review-dialog{box-sizing:border-box;width:min(780px,94vw);max-height:88dvh;padding:0;border:1px solid #e5e6f1;border-radius:20px;overflow:hidden}
.question-review-dialog[open]{display:flex;flex-direction:column}.question-review-dialog::backdrop{background:#24243b66}
.question-review-dialog header,.question-review-dialog footer{flex-shrink:0;padding:20px;display:flex;align-items:center;justify-content:space-between;background:white}.question-review-dialog h2{font-size:20px;margin:0}
.question-review-body{min-height:0;overflow-y:scroll;scrollbar-gutter:stable;padding:0 24px;white-space:pre-wrap;overflow-wrap:anywhere}.question-review-body p{padding:14px;background:#f5f5fb;border-radius:12px;line-height:1.7}
.journey-history-item[role=button]{cursor:pointer}.journey-history-item[role=button]:focus-visible{outline:2px solid #635bff}
