/* A neutral, responsive shell shared by all three roles. */
:root{--surface:#fff;--surface-soft:#f3f4f6;--canvas:#f7f7f9;--ink:#24262c;--muted:#6c707c;--line:#e7e8ed;--accent:#ef793e;--accent-soft:#fff0e6;--primary:#24262c;--kx-line:var(--line);--kx43-line:var(--line);--kx43-ink:var(--ink);--text:var(--ink);--border:var(--line);color-scheme:light}
html[data-theme=dark]{--surface:#1b1d22;--surface-soft:#24272e;--canvas:#111318;--ink:#f3f4f7;--muted:#b0b5c1;--line:#373b45;--accent:#ffab77;--accent-soft:#392b25;--primary:#f3f4f7;color-scheme:dark}
html{scroll-behavior:smooth;scrollbar-color:#a4a7b1 transparent}body,body.kx-redesign{background:var(--canvas)!important;color:var(--ink)!important;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;line-height:1.6;-webkit-font-smoothing:antialiased}
button,input,textarea,select{font:inherit}button,a{touch-action:manipulation;-webkit-tap-highlight-color:transparent}button{cursor:pointer;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,transform .16s cubic-bezier(.2,.8,.2,1)}button:active{transform:scale(.975)!important}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent)!important;outline-offset:3px}[hidden]{display:none!important}img{max-width:100%}a{color:inherit}h1,h2,h3,p{overflow-wrap:break-word}
/* Authentication is deliberately one centered, self-contained column. */
.auth-gate{padding:68px 20px 28px!important;background:var(--canvas)!important;overflow-y:auto;align-items:center!important;justify-content:center!important;min-height:100dvh}.auth-card{width:min(100%,440px)!important;max-width:440px!important;margin:auto!important;padding:30px 36px!important;background:var(--surface)!important;color:var(--ink)!important;border:1px solid var(--line)!important;border-radius:28px!important;box-shadow:0 20px 90px #11182708!important;display:block!important}.auth-card:before,.auth-card:after{display:none!important}.auth-brand{display:flex!important;align-items:center!important;flex-direction:column!important;text-align:center;gap:4px!important;margin-bottom:22px!important}.auth-logo{width:112px!important;height:112px!important;background:none!important;border-radius:0!important}.auth-mascot{width:100%!important;height:100%!important;object-fit:contain!important}.auth-title{font-size:30px!important;font-weight:800;letter-spacing:2px}.auth-subtitle{font-size:13px!important;color:var(--muted)!important}.auth-card h1{font-size:21px!important;margin:12px 0 6px!important;text-align:center;color:var(--ink)!important}.auth-description{text-align:center!important;font-size:13px!important;color:var(--muted)!important;margin-bottom:22px!important}.auth-role-tabs{display:flex!important;border-radius:14px!important;padding:4px!important;background:var(--surface-soft)!important;gap:4px!important}.auth-role-tabs button{min-height:44px;flex:1;background:transparent!important;color:var(--muted)!important;border:0!important;box-shadow:none!important}.auth-role-tabs button.active{background:var(--surface)!important;color:var(--ink)!important;box-shadow:0 2px 6px #00000009!important}.auth-card .text-input{min-height:48px!important;background:var(--surface-soft)!important;border:1px solid var(--line)!important;color:var(--ink)!important;box-shadow:none!important;border-radius:13px!important}.field-label{color:var(--ink)}.auth-card .field-label{font-size:13px;margin:18px 0 7px}.kx-consent{display:flex;align-items:flex-start;gap:8px;margin:20px 0;font-size:12px;line-height:1.8;color:var(--muted)}.kx-consent input{width:18px;height:18px;flex-shrink:0;margin-top:2px;accent-color:var(--accent)}.kx-consent a{text-decoration:underline;text-underline-offset:3px}.auth-submit{width:100%;min-height:49px}.auth-links{font-size:11px!important;color:var(--muted)!important;margin-top:15px!important;text-align:center!important;justify-content:center!important}.auth-help{font-size:12px;color:var(--muted)!important;border-color:var(--line)!important}.auth-help summary{cursor:pointer}.kx-company{margin:22px 0 0;font-size:11px;text-align:center;color:var(--muted)}.kx-portal-return{display:block;text-align:center;font-size:12px;color:var(--muted);margin-top:14px}.kx-theme-toggle{position:fixed;right:20px;top:18px;z-index:10001;border:1px solid var(--line)!important;background:var(--surface)!important;color:var(--ink)!important;border-radius:24px!important;min-height:42px;padding:8px 16px;white-space:nowrap;box-shadow:none!important}.kx-theme-in-app{position:static!important;z-index:auto!important;margin-left:auto;min-height:38px;font-size:12px}
/* Navigation grows by subject instead of adding another long row of tools. */
.app{max-width:1920px;margin:auto}.kx-redesign .sidebar,.sidebar{background:var(--surface)!important;border-right:1px solid var(--line)!important;padding:25px 14px!important}.brand{color:var(--ink)!important}.brand-icon{background:transparent!important;box-shadow:none!important;width:44px!important;height:44px!important}.brand-icon img{padding:0!important;border-radius:14px!important;object-fit:contain!important}.brand-label small{color:var(--muted)!important}.sidebar .nav{display:flex;flex-direction:column;gap:17px!important}.kx-nav-group{display:flex;flex-direction:column;gap:5px}.kx-nav-group>span{font-size:10px;font-weight:650;letter-spacing:1px;color:var(--muted);padding:6px 14px}.kx-redesign .sidebar .nav button{min-height:46px;padding:11px 13px!important;margin:0!important;border:0!important;background:transparent!important;color:var(--muted)!important;box-shadow:none!important;text-align:left;display:flex;align-items:center;gap:10px;width:100%}.kx-redesign .sidebar .nav button:hover,.kx-redesign .sidebar .nav button.active{background:var(--surface-soft)!important;color:var(--ink)!important}.kx-nav-tag{font-size:9px;color:var(--accent);margin-left:auto;white-space:nowrap}.nav .ico{font-size:17px!important;width:24px;flex-shrink:0}.main{min-width:0;padding:22px 38px 80px!important}.topbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:transparent!important;color:var(--muted)!important;padding-right:46px!important}.kx-redesign .primary,.kx-redesign .pill-button,.primary,.pill-button{background:var(--primary)!important;color:var(--canvas)!important;border:1px solid var(--primary)!important;box-shadow:none!important;border-radius:13px!important;min-height:44px}.kx-redesign .secondary,.secondary{background:var(--surface)!important;color:var(--ink)!important;border:1px solid var(--line)!important;box-shadow:none!important;min-height:42px}.kx-redesign .secondary:hover,.secondary:hover{background:var(--surface-soft)!important}
/* Quiet cards with legible content in either theme. */
.kx-redesign :is(.library-panel,.skill-panel,.category-card,.grade-card,.subject-card,.lesson-card,.manage-item,.vocab-section-panel,.v43-card,.kx-level-card,.kx-skill-tile,.kx-english-notebook,.kx-subject-empty,.kx-settings-tabs,.kx-review-cohort,.kx-review-row,.v42-panel,.v42-word,.v42-study-word,.kx-training-card,.kx-subject-tile,.modal,.v43-dialog,.kx-hub-dialog,.kx-paper-shelf,.kx-welcome-strip){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important;box-shadow:none!important}.kx-redesign :is(.page-head h1,.page-title,.panel-heading h2,.kx-section-heading h2,.kx-skill-tile strong,.kx-level-card strong,.v43-page-head h1){color:var(--ink)!important}.kx-redesign :is(.page-head p,.kx-section-heading>span,.kx-skill-tile small,.kx-level-card small,.kx-overline,.vocab-section-note,.lesson-meta){color:var(--muted)!important}.kx-dashboard-hero{display:grid!important;grid-template-columns:minmax(0,1.3fr) minmax(220px,.7fr)!important;min-height:290px!important;background:var(--surface)!important;border:1px solid var(--line)!important;border-radius:26px!important;box-shadow:none!important;padding:32px 38px!important;position:relative}.kx-dashboard-copy{z-index:1;min-width:0}.kx-dashboard-copy h1{color:var(--ink)!important;font-size:clamp(25px,2.7vw,39px)!important;line-height:1.3!important;max-width:530px}.kx-dashboard-copy p{color:var(--muted)!important;max-width:470px;font-size:14px!important}.kx-dashboard-art{background:transparent!important;position:relative!important;min-width:0!important;align-self:end!important;height:270px!important;inset:auto!important}.kx-dashboard-art img{object-fit:contain!important;object-position:center bottom!important;width:100%!important;height:100%!important;filter:none!important}.v45-home-fox{width:88px!important;height:100px!important;object-fit:contain!important;position:absolute!important;right:24px!important;bottom:18px!important;z-index:2}.kx-real-stats{color:var(--muted)!important;display:flex;gap:16px;flex-wrap:wrap}.kx-real-stats b{color:var(--ink)!important}.kx-hero-buttons{display:flex;gap:10px;flex-wrap:wrap}.kx-training-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}.kx-training-card{min-width:0!important;min-height:160px!important;padding:22px!important;transition:transform .2s,background .2s!important}.kx-training-card:hover{transform:translateY(-3px)!important;background:var(--surface-soft)!important}.kx-training-icon{background:var(--accent-soft)!important;color:var(--accent)!important;box-shadow:none!important;border-radius:13px!important}.kx-training-card strong{color:var(--ink)!important;font-size:17px!important}.kx-training-card small{color:var(--muted)!important}.kx-home-columns{display:block!important}.kx-coming-subjects{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.kx-coming-subjects article{padding:32px;border:1px solid var(--line);border-radius:22px;background:var(--surface)}.kx-coming-subjects b{font-size:34px;color:var(--accent)}.kx-coming-subjects p{color:var(--muted)}.kx-settings-tabs{background:var(--surface-soft)!important}.kx-settings-tabs button{color:var(--muted)!important}.kx-settings-tabs button[aria-selected=true]{background:var(--surface)!important;color:var(--ink)!important}.footer{color:var(--muted)!important;font-size:11px!important}.kx-brand-intro{display:none!important}.kx-character{background-image:url('/assets/fox-v50.webp')!important}.kx-terms-dialog{width:min(500px,calc(100vw - 32px));border:1px solid var(--line);border-radius:24px;padding:28px;background:var(--surface);color:var(--ink);max-height:90dvh;overflow:auto}.kx-terms-dialog::backdrop{background:#12182699;backdrop-filter:blur(6px)}.kx-terms-dialog label{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0;font-size:13px}.kx-terms-dialog input{width:19px;height:19px}.kx-terms-dialog button{margin:5px}.kx-terms-dialog p{color:var(--muted)}
html[data-theme=dark] .kx-redesign :is(.text-input,.select,input:not([type=checkbox]):not([type=radio]),textarea,select){background:var(--surface-soft)!important;color:var(--ink)!important;border-color:var(--line)!important}html[data-theme=dark] .kx-redesign :is(.v42-scope,.v42-toolbar,.v42-metric,.v42-tab,.v42-filter,.vocab-row,.word-study-card,.vocab-meaning-reveal,.item-list,.kx-review-word,.kx-review-step,.kx-lesson-row,#kxLearningFloat,#kxDictionary,#kxAssistant){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}html[data-theme=dark] .kx-redesign :is(.v42-word strong,.v42-study-word strong,.v42-study-word span,.v42-word small,.lesson-card h3,.lesson-card p,.v43-page-head p){color:var(--ink)!important}html[data-theme=dark] :is(#kxSidebarToggle,.kx-fullscreen){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}html[data-theme=dark] :is(.kx-tree,.v42-tree){filter:brightness(.9)}
@media(min-width:901px){.sidebar{position:sticky;top:0;height:100dvh;overscroll-behavior:contain}.kx-sidebar-hidden .sidebar{position:fixed}}
@media(max-width:1100px){.main{padding:20px 24px 80px!important}.kx-dashboard-hero{padding:28px!important;grid-template-columns:minmax(0,1fr) 220px!important}.kx-dashboard-art{height:240px!important}.kx-training-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.lesson-layout,.kx-english-workspace{grid-template-columns:1fr!important}}
@media(max-width:900px){.main{padding:18px 20px 90px!important}.sidebar{width:min(300px,86vw)!important;transition:transform .28s cubic-bezier(.22,.8,.3,1),visibility .28s!important}.kx-mobile-nav-open .sidebar{visibility:visible!important}.topbar{padding-left:44px!important;font-size:12px}.kx-dashboard-hero{grid-template-columns:minmax(0,1fr) 200px!important}.kx-dashboard-art{height:220px!important}.v45-home-fox{width:65px!important;height:75px!important}.kx-coming-subjects{grid-template-columns:1fr}.kx-settings-tabs{flex-wrap:nowrap!important;overflow:auto;-webkit-overflow-scrolling:touch}.kx-settings-tabs button{white-space:nowrap}.auth-card input{font-size:16px!important}}
@media(max-width:600px){.main{padding:16px 14px 86px!important}.kx-dashboard-hero{grid-template-columns:minmax(0,1fr) 112px!important;padding:22px!important;min-height:245px!important;gap:0!important}.kx-dashboard-copy h1{font-size:25px!important;max-width:250px}.kx-dashboard-copy p{font-size:12px!important;max-width:220px}.kx-dashboard-art{height:160px!important;align-self:start!important;margin-top:28px}.v45-home-fox{width:48px!important;height:58px!important;bottom:14px!important;right:14px!important}.kx-real-stats{font-size:10px!important;gap:5px!important}.kx-hero-buttons .primary{font-size:12px!important;padding:10px 13px!important}.kx-overline{font-size:9px!important;letter-spacing:1px!important}.kx-training-grid{gap:10px!important}.kx-training-card{min-height:143px!important;padding:17px!important}.kx-training-card strong{font-size:16px!important}.kx-training-card small{font-size:11px!important;line-height:1.6!important}.kx-section-heading{align-items:flex-start!important}.kx-section-heading h2{font-size:19px!important}.kx-section-heading>span{display:none!important}.lesson-card{padding:16px!important}.lesson-actions button{flex:1 1 140px;min-height:46px}.lesson-meta{grid-template-columns:1fr!important}.modal,.v43-dialog,.kx-hub-dialog{max-width:calc(100vw - 24px)!important;padding:20px!important;max-height:90dvh;overflow:auto}input:not([type=checkbox]):not([type=radio]),textarea,select{font-size:16px!important}.topbar{gap:6px}.kx-theme-in-app{padding:5px 10px!important;font-size:11px!important}.auth-gate{padding:65px 16px 24px!important}.auth-card{padding:20px 12px!important;border:0!important;box-shadow:none!important;background:transparent!important}.auth-logo{width:100px!important;height:100px!important}.auth-card h1{font-size:22px!important}.auth-links{line-height:1.7}.kx-theme-toggle{right:14px;top:14px}.v42-grid,.v42-study-list{overscroll-behavior:contain}.kx-home-columns{margin-top:22px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
body:not(.kx-signed-in) #kxSidebarToggle,body:not(.kx-signed-in) .kx-fullscreen{display:none!important}.kx-redesign .auth-title,.kx-redesign .auth-card .field-label{color:var(--ink)!important}.kx-redesign .auth-links span{color:var(--muted)!important}.kx-dashboard-copy{padding:0!important}.kx-dashboard-art{opacity:1!important;z-index:0!important}.kx-dashboard-art:after{display:none!important}
body.kx-redesign .app{background:transparent!important}#homePage .v50-hero{background:var(--surface)!important}#homePage .v50-hero .kx-dashboard-copy h1{color:var(--ink)!important}#homePage .v50-hero .kx-dashboard-copy p{color:var(--muted)!important}#homePage .v50-hero .kx-dashboard-copy{max-width:none!important}#homePage .v50-hero .kx-dashboard-art{width:auto!important}#homePage .v50-hero .kx-dashboard-art img{object-fit:contain!important;object-position:center bottom!important}#homePage .v50-hero .v45-home-fox{left:auto!important}#kxLearningLauncher{width:auto!important;min-width:0!important;max-width:150px!important;white-space:nowrap!important;writing-mode:horizontal-tb!important;padding:12px 18px!important;min-height:46px!important;background:var(--primary)!important;color:var(--canvas)!important;border:1px solid var(--line)!important;box-shadow:0 8px 24px #00000018!important}
html[data-theme=dark] .kx-redesign :is(.kx-review-summary,.kx-review-home,.kx-home-review,.kx-schedule-fold,.kx-empty,.empty-state,.v43-ledger,.kx-dashboard-stats){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}html[data-theme=dark] .kx-redesign :is(.kx-review-home h2,.kx-home-review h2,.kx-review-home p,.kx-home-review p){color:var(--ink)!important}
html[data-theme=dark] :is(#kxScopedCourse .paper-container,#kxScopedCourse .passage-column,#kxScopedCourse .question-card,#kxScopedCourse .paper-section){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}html[data-theme=dark] #kxScopedCourse :is(h1,h2,h3,p,.option-item,.question-stem){color:inherit!important}html[data-theme=dark] #kxScopedCourse :is(input,textarea,.option-item){background:var(--surface-soft)!important;color:var(--ink)!important;border-color:var(--line)!important}
body.kx-redesign .kx-dashboard-art{background:transparent!important}body.kx-redesign #kxHomeCourses{background:var(--surface)!important;border-color:var(--line)!important;color:var(--ink)!important;box-shadow:none!important;margin:0!important}body.kx-redesign #kxHomeCourses h2,body.kx-redesign #kxReviewOverview h2{color:var(--ink)!important;font-size:19px!important}body.kx-redesign #kxHomeCourses p,body.kx-redesign #kxReviewOverview p{color:var(--muted)!important;font-size:14px!important}body.kx-redesign #kxReviewOverview{margin:0!important}#homePage.active{gap:18px!important}html[data-theme=dark] .top-actions :is(.search,.account-pill){background:var(--surface)!important;color:var(--muted)!important;border-color:var(--line)!important}html[data-theme=dark] :is(.crumb,.crumb strong){color:var(--muted)!important}
@media(max-width:600px){.topbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;margin-bottom:20px!important}.topbar .crumb{grid-column:1;grid-row:1}.topbar>.kx-theme-toggle{grid-column:2;grid-row:1}.topbar>.top-actions{grid-column:1 / -1;grid-row:2;display:flex!important;flex-wrap:nowrap!important;width:100%!important;gap:7px!important}.top-actions .search{min-width:0!important;flex:1!important;width:auto!important}.top-actions .search input{width:100%!important;min-width:0!important}.top-actions .account-pill{display:none!important}.kx-dashboard-copy h1{font-size:24px!important}.kx-dashboard-hero{grid-template-columns:minmax(0,1fr) 100px!important}.kx-dashboard-art{height:150px!important}}
html[data-theme=dark] body.kx-redesign :is(.library-panel,.kx-home-courses,.kx-review-overview) :is(h2,h3,p){color:var(--ink)!important}html[data-theme=dark] :is(.kx-gallery-filters,.kx-gallery-layout,.kx-gallery-list,.kx-gallery-item,.kx-gallery-preview,.kx-gallery-empty,.kx-preview-dialog,.kx-preview-header,.kx-preview-controls,.v43-ledger>article,.v42-card,.v42-list,.v42-study,.v42-tools,.v42-scope,.v42-stats,.v42-stat,.v42-tabs,.v42-tab,.v42-stage,.v42-lesson,.v42-list-wrap,.v42-screen-progress){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}html[data-theme=dark] .v42-word small{color:var(--muted)!important}
html[data-theme=dark] #accountLabel{background:var(--surface)!important;color:var(--muted)!important;border-color:var(--line)!important}
html[data-theme=dark] .v42-workspace{color:var(--ink)!important}html[data-theme=dark] :is(.v42-hero,.v42-controls,.v42-growth-stats,.v42-empty,.v42-study-head,.v42-study-footer,.v42-test,.v42-count-picker){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}html[data-theme=dark] :is(.v42-controls label,.v42-heading p,.v42-scope,.v42-growth-stats p,.v42-study-note){color:var(--muted)!important}html[data-theme=dark] .v42-tabs button{background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}html[data-theme=dark] .v42-tabs button.active{border-color:var(--stage-color)!important;box-shadow:inset 0 -3px var(--stage-color)!important}html[data-theme=dark] .memory-tree text{fill:var(--ink)!important}
html[data-theme=dark] :is(.v42-list p,.v42-guide p,.v42-guide small,.v42-list-tools,.v42-meaning,.v42-pagination,.v42-note,.v42-stat span,.v46-ordinal){color:var(--muted)!important}html[data-theme=dark] :is(.v42-row,.v42-study-word){border-color:var(--line)!important}html[data-theme=dark] .v42-audio{background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}html[data-theme=dark] .v42-stepper span{background:var(--surface-soft)!important;color:var(--muted)!important}html[data-theme=dark] .v42-stepper .active{background:#263d34!important;color:#bce5d3!important}
