/* Single shared student-control layer. Loaded last on both landing and app. */
:root{--student-ink:#17233f;--student-muted:#63718b;--student-line:#e1e4ed;--student-accent:#6069ed;--student-paper:#fffdf9;--student-focus:0 0 0 3px #6069ed25}
body{color:var(--student-ink);background:#f8f8fc;font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif}
button,input,select,textarea{font-family:inherit;font-size:inherit;box-sizing:border-box}
button{cursor:pointer}
button:not([class]):not([data-question]):not([data-unit]):not([data-topic]):not([data-type]):not([data-paper]){border:1px solid var(--student-line);border-radius:12px;background:#fff;color:#435477;padding:10px 14px}
button:disabled{cursor:default;opacity:.48}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--student-accent);outline-offset:3px}
button:not(.option):not([data-question]):not([data-unit]):not([data-topic]):not([data-paper]):not([data-type]){min-height:44px}
.primary{border:1px solid transparent;border-radius:12px;background:#6069ed;color:#fff;font-weight:700;padding:12px 20px;box-shadow:0 4px 10px #6069ed15;text-decoration:none}
.secondary,.quiet-button,.question-breadcrumb button,.catalog-tools button,.actions button:not(.primary){display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;border:1px solid var(--student-line);border-radius:12px;background:#fff;color:#435477;padding:10px 16px;font-weight:600;text-decoration:none}
.primary:hover:not(:disabled){background:#535cdb}.secondary:hover:not(:disabled){border-color:#a8b0e3;background:#f9f9ff}
input:not([type=checkbox]):not([type=radio]),select,textarea{border:1px solid var(--student-line);border-radius:12px;background:#fff;color:var(--student-ink);padding:12px;min-height:44px;max-width:100%}
textarea{line-height:1.7;resize:vertical}
.loading,.empty{color:var(--student-muted);line-height:1.7}
.toast{font-size:14px;line-height:1.6}.error{color:#a23b48}
.app-header{background:var(--student-paper)}
.sidebar-foot>span{min-width:0;max-width:calc(100% - 62px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-foot button{flex-shrink:0;min-width:56px;white-space:nowrap;padding:8px;border:0;background:transparent}
.card{border-color:var(--student-line);box-shadow:0 6px 24px #17233f04}
.question-breadcrumb{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px;color:var(--student-muted);font-size:14px}
.question-breadcrumb span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.question-card h2{font-family:inherit;font-size:21px;font-weight:600;line-height:1.7;overflow-wrap:anywhere}
.question-meta{flex-wrap:wrap;gap:8px;font-size:13px;line-height:1.6}
.question-outline{display:flex;flex-wrap:wrap;align-items:start;justify-content:space-between;gap:8px;margin-top:10px;color:#69758f;font-size:12px;line-height:1.7}.question-outline details{max-width:100%}.question-outline summary{cursor:pointer;min-height:28px;color:#6069ed}.question-outline p{margin:6px 0;overflow-wrap:anywhere}.question-outline a{color:#6069ed}
.question-outline summary{min-height:44px;display:flex;align-items:center}.teacher-close{width:44px;height:44px}.group-nav button{min-width:44px;min-height:44px}
.question-material p{font-size:16px;line-height:1.85;white-space:pre-line}
.material-table{width:100%;border-collapse:collapse;border:1px solid #dfe3ed;background:#fff;table-layout:fixed}.material-table caption{padding:10px 0;text-align:left;font-size:14px;color:#435477}.material-table th,.material-table td{padding:10px;border:1px solid #e3e6ee;text-align:left;vertical-align:top;overflow-wrap:anywhere;font-size:16px;line-height:1.7}.material-table thead{background:#eef0fc}.material-table th:first-child{width:58px;white-space:nowrap}.material-table tbody th{font-size:14px;font-weight:600;color:#556395;background:#fafafe}
.actions{display:flex;flex-wrap:wrap;gap:10px;margin:22px 0 12px}
.draft-save-notice{margin:8px 0;color:#63718b;font-size:13px;line-height:1.65;overflow-wrap:anywhere}
.option{min-height:52px;line-height:1.65;text-align:left;font-size:16px;border-radius:12px}
.option.selected{box-shadow:var(--student-focus)}
.option:disabled{opacity:1;cursor:default}
.option:disabled span{color:#63718b}
.catalog-heading h2{font-size:30px}.catalog-heading small,.catalog-heading>span{font-size:13px}
.subject-switch button,.bank-tabs button,.review-tabs button{font-size:15px;min-height:44px}
.catalog-chapter>summary small,.catalog-chapter>summary span:last-child,.catalog-topics button small{font-size:13px;line-height:1.6}
.catalog-chapter>summary strong{font-size:21px}
.catalog-topics button{min-height:52px;font-size:15px}.catalog-topics button>span:last-child{font-size:13px}
.outline-parent{margin:14px 5px 4px;font-size:15px;color:#435477}
.outline-empty{display:flex;justify-content:space-between;gap:16px;min-height:44px;align-items:center;padding:8px 13px;background:#fafafc;border-radius:10px;color:#7c879a;font-size:14px}
.outline-empty small{font-size:12px;white-space:nowrap}
.outline-source{font-size:13px;color:var(--student-muted);line-height:1.8}.outline-source a{color:var(--student-accent)}
.catalog-question{padding:18px;gap:15px}.catalog-question strong{font-size:16px;line-height:1.75;overflow-wrap:anywhere}.catalog-question small,.question-state{font-size:12px;line-height:1.7}
.catalog-tools label{font-size:14px}.catalog-tools select{padding:9px 12px}
.catalog-search{display:flex;align-items:center;gap:8px;margin-left:auto;max-width:440px;min-width:0}.catalog-search input{min-width:0;width:100%;font-size:15px}.catalog-result-count{font-size:13px;color:var(--student-muted);margin:0 0 12px}.catalog-search button{flex-shrink:0}
.type-grid button,.paper-grid button{border-radius:16px}.type-grid strong,.paper-grid strong{font-size:19px}.type-grid small,.paper-grid small,.paper-grid span{font-size:13px}
.range-complete{padding:32px;background:#fff;border:1px solid var(--student-line);border-radius:18px;text-align:center}
.teacher-message,.message-bubble,.analysis-body{font-size:16px;line-height:1.8;overflow-wrap:anywhere}
.teacher-head p,.teacher-identity small,.teacher-message small{font-size:13px;line-height:1.6}
.teacher-panel-body{min-width:0}.teacher-panel-body textarea{font-size:16px}
.analysis-card{border:1px solid var(--student-line);border-radius:14px;background:#fffdf9;padding:16px}.analysis-card p{font-size:16px;line-height:1.8}
.static-explanation{border:1px solid var(--student-line);border-radius:14px;background:#fffdf9;padding:16px}.static-explanation p,.companion-thread p{font-size:16px;line-height:1.8;overflow-wrap:anywhere}
.teacher-bubble,.student-bubble{font-size:16px;line-height:1.8;overflow-wrap:anywhere}.teacher-bubble small,.student-bubble small{font-size:12px}
.chat-thread>*{flex-shrink:0}
.teacher-dock input{border:0;background:transparent;font-size:16px;padding:10px;min-width:0}
.mistake-card h3{font-size:17px;line-height:1.7}.mistake-card>div:first-child{font-size:13px}.mistake-card footer button{min-height:44px;font-size:14px}
.upcoming-reviews,.question-history{font-size:14px;line-height:1.8}
.plan-result,.today-focus,.hero-card{background:var(--student-paper);color:var(--student-ink);border:1px solid var(--student-line);box-shadow:0 8px 28px #17233f05}
.hero-card:before{display:none}.hero-card p,.command-top small{color:var(--student-muted)}.hero-card .primary{background:#6069ed;color:#fff;border:0}
.plan-result:before,.today-focus:before{display:none}
.plan-result .result-head small,.plan-result h3,.plan-result .result-note{color:var(--student-muted)}
.plan-result .result-head span{background:#f0f0ff;color:#6069ed}
.plan-result li{background:#f4f5fa;color:var(--student-ink);border-radius:12px}.plan-result li b{color:#5966c8}
.plan-result .reason{border-left:3px solid #a0a7ef;color:var(--student-muted);background:#f6f6fc}
.plan-result .primary{background:#6069ed}.today-focus small,.today-focus p{color:var(--student-muted)}
.plan-step .actions{justify-content:space-between}.form-note,.result-note{line-height:1.7}
.today-title,h1,h2{text-wrap:balance}
@media(max-width:600px){
 body{font-size:16px}#view{padding:16px 14px 108px}.app-header{padding:16px 14px}.app-header h1{font-size:23px}
 .card{padding:18px;border-radius:18px}.catalog-heading{margin:0 0 16px;align-items:start}.catalog-heading h2{font-size:25px;line-height:1.35}.catalog-heading small{font-size:12px}.catalog-heading>span{font-size:12px;white-space:normal;max-width:84px}
 .catalog-tools{gap:12px;flex-wrap:wrap;margin:14px 0}.catalog-tools label{font-size:14px}.question-breadcrumb{margin-bottom:12px}.question-breadcrumb button{padding:9px 12px;font-size:14px;flex-shrink:0}
 .catalog-search{width:100%;max-width:none;margin-left:0}.catalog-search input{font-size:16px}.catalog-result-count{font-size:13px}.catalog-question strong{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
 .question-card h2{font-size:19px;margin:18px 0;line-height:1.75}.question-meta{font-size:13px}.question-progress{margin-bottom:14px}.option{font-size:16px;padding:12px;min-height:52px}.actions{gap:8px}.actions button{flex:1;min-width:90px;font-size:15px}
 .catalog-question{padding:14px;grid-template-columns:28px minmax(0,1fr)}.catalog-question .question-state{grid-column:2;justify-self:start}.catalog-question strong{font-size:16px}.catalog-number{font-size:13px}
 .catalog-chapter>summary{padding:16px;min-height:80px}.catalog-chapter>summary strong{font-size:21px}.catalog-topics{padding:0 10px 12px}.catalog-topics button{font-size:16px}.catalog-topics button>span:last-child{white-space:normal;max-width:74px;font-size:12px}
 .catalog-tabs,.bank-tabs,.subject-switch{max-width:100%}.subject-switch{width:100%;box-sizing:border-box}.subject-switch button{flex:1;min-width:0}.outline-empty{font-size:14px;padding:10px;flex-wrap:wrap;gap:4px}
 .teacher-head strong{font-size:18px}.teacher-panel-body .teacher-message{font-size:16px}.teacher-panel-body p{line-height:1.8}.teacher-panel-body textarea{min-height:80px;font-size:16px}.teacher-dock{padding:8px 10px}.teacher-dock .avatar{width:36px;height:36px;font-size:20px}.teacher-dock button{min-width:44px;font-size:14px}
 .practice-focus .teacher-dock input,.practice-focus .tutor-compose textarea{font-size:16px}
 .practice-focus .suggested-prompts{flex-wrap:nowrap;max-height:none;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;padding:2px 0 4px;gap:7px}.practice-focus .suggested-prompts::-webkit-scrollbar{display:none}.practice-focus .suggested-prompts button{min-height:44px;flex:0 0 auto;white-space:nowrap;font-size:13px;padding:8px 12px}.practice-focus .tutor-compose textarea{height:64px;min-height:64px;max-height:100px;resize:none}.practice-focus .tutor-compose{gap:6px;margin-top:4px}.practice-focus .teacher-close{width:44px;height:44px}.practice-focus .question-material{max-height:none;overflow:visible}
 .mobile-nav a b{font-size:14px}.mobile-nav a small{font-size:10px}.mobile-nav a{min-height:48px}.teacher-demo-notice,.greeting-fallback{font-size:13px}.teacher-topline{padding:12px}.teacher-identity strong{font-size:18px}.teacher-chat-form textarea{font-size:16px}
 .teacher-topline{flex-direction:column}.teacher-identity{width:100%}.teacher-identity>div{min-width:0}.teacher-identity strong{white-space:normal;overflow:visible}.teacher-toolbar{width:100%;justify-content:space-between}.teacher-workspace .teacher-chat{padding:0;min-height:0}.teacher-workspace .companion-thread{min-height:160px;max-height:36dvh;margin:0;padding:14px;flex:none}.companion-compose textarea{font-size:16px}.companion-compose{padding:12px}.companion-compose>div:last-child{flex-direction:row;align-items:center}.companion-compose>div:last-child small{max-width:155px;line-height:1.6}.companion-compose .primary{width:auto;min-width:92px}
 .teacher-toolbar>.secondary,.teacher-menu>summary{min-height:44px;font-size:13px}.teacher-quota{font-size:12px}
 .today-focus h2{font-size:28px;line-height:1.35}.today-focus p{font-size:16px}.today-focus .primary{font-size:16px}.today-task-list li{font-size:16px}.exam-metrics small,.stage-line span,.stage-line small{font-size:13px}.exam-metrics strong{font-size:23px}.stage-line strong{font-size:17px;line-height:1.65}
 .hero-card h2{font-size:28px;margin-top:24px}.hero-card p{font-size:16px}.progress-glance small,.command-top small{font-size:13px}.progress-glance strong{font-size:23px}.task span{font-size:16px}
 .today-brief{display:block;margin-top:12px;padding:16px}.today-brief .task{padding:12px}.today-brief>small{font-size:14px}
 .form-grid label,.profile-form label,.plan-form label,legend{font-size:14px;line-height:1.6}.form-note,.result-note{font-size:12px}.plan-result li,.plan-result .reason{font-size:15px}.plan-result .today-title{font-size:25px}.result-head small{font-size:12px}.choice span{height:44px;font-size:14px}
 .report-summary,.report-subjects,.policy-grid{min-width:0}.report-subjects p,.report-summary p,.policy-result p{font-size:16px;line-height:1.8}
}
.brand>span:has(img){background:none;box-shadow:none;padding:0;overflow:hidden}.brand>span img{display:block;width:100%;height:100%;object-fit:contain}.brand>div{min-width:0}.brand strong{white-space:nowrap;letter-spacing:.02em}.brand small{line-height:1.5}
@media(max-width:600px){.topbar .brand{gap:8px;min-width:0}.topbar .brand strong{font-size:19px}.topbar .brand small{font-size:10px}.topbar .brand>span{width:38px;height:38px;flex-shrink:0}.topbar #enterButton{min-height:44px;padding:8px 11px;font-size:13px;flex-shrink:0}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
