/* Focused student journey. Visibility is presentation only; server/RLS remain authoritative. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
body[data-student-mode=true] .flow-section[data-flow-hidden=true]{display:none!important}
body[data-student-mode=true] #pageDirectory{display:none!important}
#studentFlowNav{order:-1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin:4px 0 20px;padding:5px;border:1px solid var(--stroke);border-radius:20px;background:white}
#studentFlowNav a{display:flex;align-items:center;justify-content:center;text-align:center;min-height:48px;padding:9px 6px;border-radius:15px;color:var(--muted);font-size:14px;text-decoration:none;font-weight:650}
#studentFlowNav a[aria-current=page]{background:var(--brand-soft);color:var(--brand)}
body[data-student-page=aiReview] #uploadStageContent{display:none!important}
body[data-student-mode=true] #licenseStatus{font-size:12px;margin-bottom:8px}
body[data-student-mode=true] #scope{font-size:13px;margin-bottom:4px}
body[data-student-mode=true] #welcome{font-size:24px}
#reviewEmpty{background:var(--surface-soft);border-radius:20px;padding:22px}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--stroke);padding:4px;gap:4px;border-radius:18px;background:var(--surface-soft);margin:20px 0}
.auth-tabs button{background:transparent;color:var(--muted);margin:0;min-height:44px}
.auth-tabs button[aria-pressed=true]{background:white;color:var(--brand);box-shadow:0 2px 8px #2222330a}
.password-control{display:flex;align-items:stretch;gap:6px;min-width:0}
.password-control input{min-width:0;flex:1;width:0!important}
.password-control button{flex:0 0 auto;background:var(--surface-soft);color:var(--ink);min-width:52px;margin:0;font-size:13px;padding:10px}
#authForm{margin-bottom:12px}#authStepLabel{margin-top:0;color:var(--brand)}
#authSubmit{width:100%;margin:6px 0;min-height:50px}
#authBack{width:100%;margin:4px 0;background:var(--surface-soft);color:var(--ink)}
#authStatus:not(:empty){padding:12px 14px;border-radius:14px;background:var(--brand-soft);color:#68517f;font-size:14px;line-height:1.65}
#passwordHint{margin-top:-5px;font-size:13px}#authIntro{font-size:15px;line-height:1.7;color:var(--muted)}
#authLegalStep label{font-size:14px}#authLegalStep>p{font-size:13px}.account-summary{padding:12px 16px;background:var(--lavender);border-radius:14px;overflow-wrap:anywhere}
#googleOptions{margin:14px 0 0;font-size:13px;border-top:1px solid var(--stroke);padding-top:4px}#googleOptions summary{font-size:13px}
.settings-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.setting-summary{padding:16px 18px;border:1px solid #e5dce9;border-radius:18px;background:#f8f4fb;font-size:14px;line-height:1.65}
#schoolDetails,#learningGoalDetails,#schoolHistoryDetails,#academySharingDetails,#commonLinkDetails,#routineDetails,#profilePhotoInfo{border-top:1px solid var(--stroke);padding:8px 0}
#schoolForm{border:1px solid var(--stroke);border-radius:18px;padding:16px;min-width:0;margin:14px 0}
#schoolSave,#schoolSkip,#profileSave{min-height:48px;width:100%;margin:6px 0}
.secondary-action{background:var(--surface-soft)!important;color:var(--ink)!important;border:1px solid var(--stroke)!important}
#schoolSaveStatus:not(:empty),#profileStatus:not(:empty),#routineStatus:not(:empty){padding:13px 15px;border-radius:14px;background:var(--lavender);font-size:14px;line-height:1.65}
#schoolSearchStatus{font-size:13px;color:var(--muted)}#schoolSummary:empty{display:none}
.profile-summary{display:flex;align-items:center;gap:16px;margin-bottom:20px}.profile-initial{height:64px;width:64px;border-radius:50%;display:grid;place-items:center;font-size:26px;background:var(--brand-soft);color:var(--brand);font-weight:750;flex-shrink:0}.profile-summary strong{font-size:20px}.profile-summary p{font-size:14px;color:var(--muted);margin:6px 0}.inline-link{display:inline-flex;align-items:center;min-height:44px;padding:8px 0}
#profileForm{margin-bottom:12px}#studentPanel details p{font-size:14px}
#aiRows{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
#aiRows>.review-question{background:white;border:1px solid var(--stroke);border-radius:20px;padding:18px;min-width:0}
.answer-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.answer-pair label{font-size:14px}.answer-pair input{font-size:18px;font-weight:650;min-width:0}
.answer-outcome{font-weight:700;padding:10px 14px;border-radius:12px;background:var(--brand-soft);color:var(--danger)}.answer-outcome[data-outcome=correct]{background:#eaf6f0;color:var(--success,#176948)}
.row-advanced{margin-top:8px;border-top:1px solid var(--stroke)}.row-advanced p{font-size:13px;overflow-wrap:anywhere}
#reviewNextActions{background:var(--lavender);padding:18px;border-radius:20px;margin-top:18px}#reviewNextActions p{margin-top:0}#reviewNextActions button{width:100%;margin:4px 0}#reviewClassify{background:white;color:var(--ink)}
#reviewBack{margin-bottom:14px}#reviewProgress{margin:14px 0}
#aiRows [data-field=studentPage],#aiRows [data-field=keyPage]{max-width:100%}
@media(max-width:600px){
 main{padding:14px 12px calc(172px + env(safe-area-inset-bottom))}#login{padding:24px 20px;border-radius:24px;margin-top:4px}#login h1{font-size:26px}#login .legal-choices{padding:14px}#authForm label{margin:12px 0}
 .settings-fields{grid-template-columns:minmax(0,1fr);gap:0}.settings-fields label{margin:10px 0}.page-section.area{padding:20px 16px}
 #studentFlowNav{gap:3px;padding:4px;border-radius:17px;margin-bottom:16px}#studentFlowNav a{font-size:12px;min-height:46px;padding:8px 3px;border-radius:12px;line-height:1.4}
 body[data-student-mode=true] #welcome{font-size:22px}body[data-student-mode=true] #scope{font-size:12px}
 .legal-footer{display:flex;flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;scrollbar-width:none;height:calc(48px + env(safe-area-inset-bottom));min-height:48px;padding:0 10px env(safe-area-inset-bottom);gap:12px}
 .legal-footer a{font-size:11px;min-height:44px;flex-shrink:0}.legal-footer::-webkit-scrollbar{display:none}#bottomNav{bottom:calc(56px + env(safe-area-inset-bottom))}
 #aiRows>.review-question{padding:16px}.answer-pair{gap:10px}.answer-pair input{padding:12px 10px}.profile-initial{width:54px;height:54px;font-size:24px}#findSchool{padding:12px;min-width:54px}
 body[data-student-mode=true] .page-hint{font-size:13px;padding:12px 14px}
 #reviewNextActions button,#aiConfirm,#aiCheckDraft{min-height:48px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

#aiUploadQuota{padding:14px 16px;margin-bottom:12px}#aiRemaining{font-size:16px}#aiCountdown{font-size:13px;margin:6px 0 0}#uploadExamples{background:#fff9ed;border-radius:14px;padding:6px 12px;margin-bottom:14px}#uploadExamples summary{font-size:12px}#uploadExamples button{font-size:12px}#uploadContinue{width:100%;margin:10px 0 0;min-height:50px}#uploadStepStatus:not(:empty){padding:12px;background:var(--brand-soft);border-radius:14px;color:var(--danger);font-size:14px}.photo-prompt{font-size:14px;color:var(--muted);line-height:1.7}#uploadBackPhotos{margin-bottom:16px}#uploadPhotoStage>fieldset{margin:14px 0}#uploadPhotoStage label:has(input[type=file]){background:white;border:1px solid var(--stroke);border-radius:15px;padding:12px}#uploadPhotoStage input[type=file]{padding:8px;font-size:13px}

#bootStatus{padding:24px;border-radius:22px;background:white;color:var(--muted)}body[data-booting=true] #login{display:none!important}body:not([data-booting=true]) #bootStatus{display:none}

#progressOverview{margin-top:18px}#progressPanel>details{border-top:1px solid var(--stroke);padding:8px 0}#progressOverview .overview-item strong{font-size:24px}@media(max-width:600px){.progress-chart text{font-size:20px}#progressOverview{gap:6px}#progressOverview .overview-item{padding:14px 8px}#progressOverview .overview-item strong{font-size:21px}#progressOverview .overview-item span{font-size:10px}}

#studentPanel > .inline-link{display:flex;width:100%;min-height:48px;padding:10px 0;border-bottom:1px solid var(--line,#e7e3e8)}

.practice-option{display:flex;align-items:center;gap:12px;min-height:48px;padding:12px;border:1px solid var(--line,#ddd);border-radius:12px;margin:8px 0}.practice-option input{width:20px;min-height:20px;flex:0 0 20px}#practicePanel .study-action{overflow-wrap:anywhere}#practicePanel button{min-height:44px}

.writing-activity{border-top:1px solid var(--line,#ddd);margin-top:24px;padding-top:20px}.writing-activity textarea{box-sizing:border-box;resize:vertical;min-height:110px}.writing-activity label{display:block;margin:12px 0}.writing-review label{display:flex;align-items:flex-start;gap:10px}.writing-review input[type=checkbox]{flex:0 0 22px;min-width:22px;min-height:22px}.writing-review select{width:100%;max-width:100%;min-height:44px}.writing-activity details{margin:12px 0}.writing-activity button{margin:8px 0}

/* Meaning feedback: status is conveyed by words as well as color. */
.writing-feedback{padding:16px;margin:12px 0;border:1px solid #d9dce4;border-radius:16px;line-height:1.65;background:#f6f7fb;color:#242737;overflow-wrap:anywhere}
.writing-feedback h5{font-size:1.1rem;margin:0 0 8px;font-weight:750}
.writing-feedback p{margin:8px 0}
.writing-feedback.accepted{background:#edf8f2;border-color:#a8d5ba;color:#17543a}
.writing-feedback.revision{background:#fff7e9;border-color:#dfc796;color:#69480f}
.writing-feedback.pending{background:#f2f1fa;border-color:#c6c2dc;color:#403653}
.writing-steps{list-style:none;padding:0;display:flex;gap:8px;flex-wrap:wrap;font-size:.9rem}
.writing-steps li{padding:8px 12px;border-radius:12px;background:#f1f2f6;color:#505461}
.writing-steps [aria-current=step]{background:#fbe5eb;color:#8c1636;font-weight:700}
.writing-activity textarea{font-size:16px;line-height:1.6}
.writing-ai button{min-height:44px}
@media(max-width:600px){.writing-steps{gap:5px}.writing-steps li{padding:8px;font-size:.82rem}.writing-feedback{padding:14px}.writing-ai button{max-width:100%;white-space:normal}}

/* Short, optional reflection and separate recall history. */
.learning-history,.learning-reflection {padding:16px;margin:12px 0;background:#fff6f7;border:1px solid #efcbd0;border-radius:16px;line-height:1.6;}
.learning-history select,.learning-reflection select {font-size:16px;min-height:44px;max-width:100%;}
.learning-history button,.learning-reflection button {min-height:44px;white-space:normal;}
.learning-reflection label {display:block;margin:12px 0;}

/* 2026-10-24: reference-led visual refresh. App data and permission boundaries unchanged. */
:root{--brand:#786294;--brand-pressed:#68517f;--brand-soft:#f0ebf5;--canvas:#f7f8fc;--ink:#22243c;--muted:#62677c;--stroke:#e7e8f0;--lavender:#f0edff;--shadow-card:0 12px 40px #25244706;--radius-card:28px}
body{background:radial-gradient(ellipse at 8% 0,#fff0f5 0,transparent 38%),var(--canvas)}
body>header{border:0;background:#ffffffed;min-height:64px;box-shadow:0 1px 0 #e9e9f1;backdrop-filter:blur(20px)}
body>header strong{font-weight:780;letter-spacing:-.8px}header #questionBell{border-radius:50px}button{box-shadow:none}button:not(:disabled){font-weight:700}input:not([type=checkbox]):not([type=radio]),select,textarea{background:#f6f7fb;border-color:#e8e9f1;border-radius:16px}input[type=radio]{accent-color:var(--brand)}
.area,#academyWorkspace,#adminWorkspace>[data-admin-block]{border-color:#e9eaf2;box-shadow:0 12px 35px #29243a04;border-radius:28px}
body[data-student-mode=true] #workspace>article>.eyebrow,body[data-student-mode=true] #welcome,body[data-student-mode=true] #scope,body[data-student-mode=true] #licenseStatus{display:none}
#studentFlowNav{background:#fff;border:1px solid #e8e9f2;border-radius:20px;padding:5px;box-shadow:0 5px 24px #2a264505;margin:0 0 24px}
#studentFlowNav a{min-height:48px;border-radius:15px;font-size:14px;letter-spacing:-.3px}
#studentFlowNav a[aria-current=page]{background:#24263c;color:white;box-shadow:0 4px 10px #24263c17}
.student-hero{min-height:260px;background:linear-gradient(125deg,#bf244c 0,#e55778 78%,#f089a2 100%);border:0;border-radius:32px;padding:30px;box-shadow:0 18px 36px #bd254b1a;color:white;margin-bottom:20px}
.student-hero h2{font-size:38px;line-height:1.17;letter-spacing:-1.3px;max-width:680px;padding-right:130px;margin:14px 0}.student-hero p{color:#fff1f5;line-height:1.65;padding-right:120px;font-size:15px}.student-hero .hero-tag{color:#ffe7ee;letter-spacing:1px;font-size:11px}.hero-art{opacity:1;width:190px;height:190px;right:14px;top:30px;z-index:-1}.hero-actions{margin-top:22px}.hero-actions a{background:white;color:#68517f;border:0;border-radius:16px;box-shadow:0 4px 12px #68517f12}.hero-actions a.secondary{background:#ffffff1f;border:1px solid #ffffff55;color:white;box-shadow:none}
.study-overview{gap:12px;margin:0 0 18px}.overview-item{border:0;box-shadow:0 6px 28px #29244304;border-radius:24px;padding:22px 18px;background:white}.overview-item:first-child{background:#f0edff}.overview-item:nth-child(2){background:#eaf5f5}.overview-item:nth-child(3){background:#fff1e7}.overview-item strong{font-size:32px;letter-spacing:-1px;color:#282a44}.overview-item span{font-size:12px;color:#62677c}
.learning-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;overflow:visible;padding:0;margin:0 0 22px}.learning-shortcuts a{min-width:0;justify-content:center;flex-direction:column;gap:10px;padding:17px 8px;border-radius:22px;border:1px solid #ececf4;font-size:13px;line-height:1.3;text-align:center;box-shadow:0 6px 24px #24253c03}.learning-shortcuts .ui-icon{width:24px;height:24px;color:var(--brand)}
.home-insight{padding:22px;background:white;border:1px solid var(--stroke);border-radius:26px;margin-bottom:20px;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:14px}.home-insight h3{margin:0 0 10px;font-size:17px}.home-insight p{font-size:13px;color:var(--muted);line-height:1.6;margin:6px 0}.home-insight a{display:inline-flex;align-items:center;min-height:44px;font-size:13px;font-weight:700;text-decoration:none}.home-insight strong{font-size:30px;letter-spacing:-1px}.home-insight svg{display:block;width:100%;height:auto;max-height:120px}
#studyHome>h2,#progressPanel>h2,#conceptPanel>h2,#practicePanel>h2,#aiPanel h2{font-size:25px;letter-spacing:-.8px}.page-hint{border:0;background:#f5f5fb;color:#62677c;line-height:1.65;border-radius:18px}.study-action{border-radius:24px!important;background:#fff!important;border:1px solid var(--stroke)!important;padding:22px!important}.study-action h3,.study-action h4{font-size:19px}.study-action button{border-radius:14px}#studyActions>.study-action:first-child{background:#f1eeff!important}#studyActions>.study-action:nth-child(2){background:#f0ebf5!important}
#progressScores{background:white;border:1px solid var(--stroke);border-radius:26px;padding:22px;margin:22px 0}.progress-chart{display:block;width:100%;height:auto;background:linear-gradient(#fff,#fff9fb);border-radius:20px}.progress-chart text{font-family:inherit;fill:#73798c!important}.progress-chart polyline{stroke:var(--brand);stroke-linejoin:round;stroke-linecap:round}.progress-chart circle{fill:var(--brand);stroke:white;stroke-width:2}#progressScores>ul{padding-left:18px;font-size:12px;line-height:1.9;color:var(--muted)}#progressGroups>.area{background:#fff;box-shadow:none;border-radius:26px}
#uploadPhotoStage>fieldset{border:1px solid var(--stroke);border-radius:24px;padding:18px;background:#fff}#uploadPhotoStage legend{font-weight:750;font-size:17px;padding:0 8px}#uploadPhotoStage label:has(input[type=file]){background:#fafaff;border:1px dashed #c9cadb;border-radius:20px;padding:18px}input[type=file]::file-selector-button{font:inherit;border:0;border-radius:12px;padding:11px 16px;background:#edeafa;color:#42375c;margin-right:10px;cursor:pointer}.upload-steps li{background:#f2f1fa;border-radius:16px}.upload-steps li:first-child{background:var(--brand-soft)}#aiUploadQuota{border-radius:20px;background:#fff8ef;border:1px solid #f3e7d6}#aiRows>.review-question{border-radius:25px;box-shadow:0 8px 30px #24283d05}.answer-pair input{background:white!important;border:1px solid #dedfea!important;border-radius:18px;font-size:24px;text-align:center;min-height:64px}.answer-outcome{border-radius:16px;padding:14px 16px}.practice-option{border-radius:18px;background:white;padding:15px;min-height:54px}.practice-option:has(input:checked){background:var(--brand-soft);border-color:var(--brand);box-shadow:inset 0 0 0 1px var(--brand)}.writing-feedback{border-radius:22px;padding:20px}.learning-history,.learning-reflection{background:#f6f3ff;border-color:#e1d8f3;border-radius:22px}.resource-card{background:white;border-radius:26px;padding:24px;box-shadow:0 6px 24px #29244304}.resource-card>span{background:#f1edff;color:#5e467f}
#login{background:white;border-radius:32px;border:1px solid #ececf4;padding:36px;box-shadow:0 20px 60px #29243a07}#login h1{font-size:32px;letter-spacing:-1px}#login .eyebrow{color:var(--brand);font-size:12px;font-weight:750}.auth-tabs{border:0;border-radius:18px;background:#f2f2f8}#authSubmit{border-radius:17px;background:linear-gradient(115deg,#ba2048,#d73d60)}
#students>li,#seatRoster>li{background:#fff;border:1px solid #e8e9f1;padding:20px;border-radius:22px}#academySidebar{background:#fff;border:0;box-shadow:var(--shadow-card)}
/* Fixed role navigation remains authorized by server; legal links stay available on each screen. */
.legal-footer{position:fixed;bottom:0;left:0;right:0;height:32px!important;min-height:32px!important;padding:0 12px!important;display:flex!important;flex-wrap:nowrap!important;gap:16px!important;background:#ffffffed;backdrop-filter:blur(18px);border-top:1px solid #e8e9f1;justify-content:center;overflow-x:auto;z-index:40}.legal-footer a{min-height:32px!important;display:inline-flex;align-items:center;font-size:10px!important;white-space:nowrap;flex-shrink:0}
#bottomNav{bottom:40px!important;padding:5px;border:1px solid #e8e9f1;background:#fffffff2;border-radius:22px;box-shadow:0 8px 28px #24253c0d}#bottomNav button{min-height:42px!important;border-radius:17px;font-size:12px}#bottomNav:has(>button:only-child){max-width:168px}main{padding-bottom:136px!important}
@media(max-width:600px){body>header{padding:10px 18px;min-height:60px}header strong{font-size:16px}header button{min-height:38px;padding:8px 11px;font-size:11px}main{padding:18px 18px 136px!important}#studentFlowNav{gap:2px;margin-bottom:20px;padding:4px;border-radius:18px}#studentFlowNav a{font-size:11px;min-height:42px;padding:8px 4px}.student-hero{border-radius:28px;padding:24px;min-height:282px}.student-hero h2{font-size:31px;padding-right:30px;max-width:280px;letter-spacing:-1px}.student-hero p{padding-right:45px;font-size:13px}.hero-art{width:134px;height:134px;right:-16px;top:73px;opacity:.82}.hero-actions{gap:8px;margin-top:20px}.hero-actions a{font-size:13px;padding:12px 14px;min-height:46px;border-radius:14px}.study-overview{gap:9px}.overview-item{border-radius:21px;padding:18px 10px}.overview-item strong{font-size:27px}.overview-item span{font-size:10px;letter-spacing:-.3px}.learning-shortcuts{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-right:0}.learning-shortcuts a{font-size:11px;padding:15px 5px;gap:8px;border-radius:20px}.home-insight{padding:18px;gap:10px}.home-insight h3{font-size:15px}.home-insight strong{font-size:27px}.home-insight p{font-size:11px}.area,#academyWorkspace{padding:22px 18px!important;border-radius:26px}#workspace>article{padding:0!important}.page-hint{font-size:12px!important;line-height:1.65}#progressScores{padding:16px}#progressScores h3{font-size:16px}.progress-chart text{font-size:16px}#progressGroups>.area h3{font-size:17px}.answer-pair{gap:10px}.answer-pair label{font-size:13px}#login{padding:28px 22px!important}#login h1{font-size:29px}.legal-footer{justify-content:flex-start;gap:14px!important}#uploadPhotoStage>fieldset{padding:14px}.study-action{padding:20px!important}#progressOverview .overview-item span{font-size:10px}#studyActions>.study-action p{font-size:13px}.resource-card{padding:20px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
/* The graph and next action precede the detailed calculation notes. */
#progressPanel>.page-hint{padding:10px 13px;margin:12px 0 16px}#progressPanel>#progressOverview{margin-top:0;margin-bottom:16px}#progressPanel>h3{font-size:15px;color:var(--muted);margin:6px 0 0}#progressScores{margin-top:10px}#progressScores details{border-top:1px solid var(--stroke);margin-top:10px}#progressScores details ul{font-size:12px;color:var(--muted);line-height:1.9;padding-left:16px}.review-banner{margin-bottom:12px!important;border-radius:16px!important;padding:7px 13px!important;font-size:11px!important}.review-banner>summary{min-height:30px!important;padding:5px 0!important;font-size:11px!important}

/* Footer links also retain a 44px touch area. */
.legal-footer{height:44px!important;min-height:44px!important}.legal-footer a{min-height:44px!important}#bottomNav{bottom:52px!important}main{padding-bottom:148px!important}
body>header button,#studentFlowNav a,#bottomNav button{min-height:44px!important}
/* Reserve a real viewport for the fixed navigation: answers never scroll behind it. */
body{height:100dvh;overflow:hidden}body>main{height:calc(100dvh - 112px);overflow-y:auto;overscroll-behavior-y:contain;box-sizing:border-box;padding-bottom:28px!important;scroll-padding-top:18px}body:has(#workspace:not([hidden]))>main{height:calc(100dvh - 184px)}@media(max-width:600px){body>main{height:calc(100dvh - 108px)}body:has(#workspace:not([hidden]))>main{height:calc(100dvh - 180px)}}

body[data-student-mode=true] #aiPanel .upload-steps,body[data-student-mode=true] #aiPanel .upload-steps+p{display:none}
body[data-student-mode=true] #aiPanel h2:focus:not(:focus-visible){outline:0}
@media(max-width:680px){body[data-student-page=aiPanel] #aiPanel{padding-bottom:20px}}
