/* UX Review R1: scoped polish. Active CBT templates do not load this asset. */
.public-body .ud-public-menu-toggle{display:none}
.public-body .ud-public-menu-toggle>span{display:grid;gap:4px;width:19px}
.public-body .ud-public-menu-toggle i{height:2px;border-radius:2px;background:currentColor;transition:transform .16s ease,opacity .16s ease}
.public-body .ud-public-menu-toggle[aria-expanded="true"] i:nth-child(1){transform:translateY(6px) rotate(45deg)}
.public-body .ud-public-menu-toggle[aria-expanded="true"] i:nth-child(2){opacity:0}
.public-body .ud-public-menu-toggle[aria-expanded="true"] i:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
.public-body .ud-public-menu-toggle:focus-visible,.public-body .nav-links a:focus-visible{outline:3px solid #b2a3ff;outline-offset:3px}
@media(max-width:900px){
 .public-body.ud-public-menu-ready .site-header{position:sticky;top:0;z-index:1000;background:#fff;overflow:visible}
 .public-body.ud-public-menu-ready .navbar{display:flex!important;align-items:center;justify-content:space-between;position:relative;flex-wrap:wrap;gap:10px;min-height:68px;padding-block:10px}
 .public-body.ud-public-menu-ready .ud-public-menu-toggle:not([hidden]){display:flex!important;align-items:center;gap:8px;min-height:44px;padding:10px 13px;border:1px solid #ddd6fa;border-radius:13px;color:#5b43c4;background:#f6f3ff;font:700 13px/1.2 system-ui;cursor:pointer}
 .public-body.ud-public-menu-ready .nav-links:not([hidden]){display:grid!important;grid-template-columns:1fr 1fr;width:100%;gap:8px;padding:12px;background:#fff;border:1px solid #e5e0f4;border-radius:18px;box-shadow:0 15px 35px #48378714;animation:ud-ux-menu-in .16s ease-out}
 .public-body.ud-public-menu-ready .nav-links a{display:flex!important;justify-content:center;align-items:center;min-height:46px;margin:0!important;padding:10px 12px!important;border-radius:11px;font-size:14px!important;text-align:center}
 .public-body.ud-public-menu-ready .nav-links a:hover{background:#f3efff}
 .public-body .public-auth-appearance{margin-left:auto}
}
@keyframes ud-ux-menu-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
/* Real card growth: x:auto + y:visible computes to y:auto in browsers. */
.student-body .ktr-page :is(.ktr-main,.ktr-question,.ktr-question-body,.ktr-option,.ktr-option>div,.ktr-option .iqb-math-content,.ktr-answer-reveal,.ktr-solution,.ktr-solution .iqb-math-content){height:auto!important;max-height:none!important;min-width:0;overflow:visible!important}
.student-body .ktr-page .ktr-option{align-items:start!important}
.student-body .ktr-page .ktr-option :is(span,p){max-height:none!important;overflow:visible!important}
.student-body .ktr-page :is(.ktr-question-body,.ktr-option>div,.ktr-solution){overflow-wrap:anywhere}
.student-body .ktr-page mjx-container{overflow:visible!important;max-height:none!important;height:auto!important}
.student-body .ktr-page .ktr-question{scroll-margin-top:130px}
.student-body .ktr-page .ktr-question:focus{outline:none}
.student-body .ktr-page .ktr-question:focus-visible{outline:2px solid var(--ud-accent,#7658df);outline-offset:3px}
/* Border hue retains the outcome; the current question gets an independent ring. */
.student-body .ktr-page.ktr-page .ktr-palette-grid button{--ux-outcome:#64748b;--ux-fill:#f1f5f9;--ux-ink:#475569;border:2px solid var(--ux-outcome)!important;background:var(--ux-fill)!important;color:var(--ux-ink)!important;border-radius:11px!important;min-height:40px;line-height:1.2;box-shadow:none!important;transition:box-shadow .14s ease,background .14s ease}
.student-body .ktr-page.ktr-page .ktr-palette-grid button.correct{--ux-outcome:#16834d;--ux-fill:#eefaf2;--ux-ink:#12633b}
.student-body .ktr-page.ktr-page .ktr-palette-grid button.incorrect{--ux-outcome:#d33d53;--ux-fill:#fff0f3;--ux-ink:#ac2339}
.student-body .ktr-page.ktr-page .ktr-palette-grid button.awarded{--ux-outcome:#8254d7;--ux-fill:#f4efff;--ux-ink:#6937bb}
.student-body .ktr-page.ktr-page .ktr-palette-grid button.active{outline:2px solid var(--ud-text,#172033)!important;outline-offset:3px;box-shadow:0 0 0 4px var(--ud-surface,#fff)!important}
:root[data-theme-resolved="dark"] .student-body .ktr-page.ktr-page .ktr-palette-grid button{--ux-outcome:#91a0b5;--ux-fill:#1a2940;--ux-ink:#dce4f1}
:root[data-theme-resolved="dark"] .student-body .ktr-page.ktr-page .ktr-palette-grid button.correct{--ux-outcome:#4cd99a;--ux-fill:#15382e;--ux-ink:#adf3ce}
:root[data-theme-resolved="dark"] .student-body .ktr-page.ktr-page .ktr-palette-grid button.incorrect{--ux-outcome:#ff8095;--ux-fill:#382330;--ux-ink:#ffd0d8}
:root[data-theme-resolved="dark"] .student-body .ktr-page.ktr-page .ktr-palette-grid button.awarded{--ux-outcome:#b699ff;--ux-fill:#312550;--ux-ink:#eadcff}
.student-body .ktr-page .ktr-legend{opacity:1!important}
.student-body .ktr-page .ktr-subject-tabs button.active{border:2px solid var(--ud-accent,#7658df)!important}
.student-body .ktr-page .ktr-question-head{flex-wrap:wrap}
.student-body .ktr-page .ud-question-tool{min-width:40px!important;min-height:40px!important}
.student-body .ktr-page .ud-question-tool:disabled{opacity:.45;cursor:not-allowed}
.student-body .ud-ux-empty-action{display:block;margin:16px auto 0;min-height:44px;width:fit-content;padding:11px 16px;border-radius:12px;background:var(--ud-accent,#7052df);color:var(--ud-on-accent,#fff)!important;text-decoration:none;font-weight:750}
.student-body .ud-ux-adaptive-advice{font-size:15px!important;line-height:1.65!important;max-width:80ch}
.student-body :is(.dashboard-exam-trends-title,.dashboard-exam-trends-title>div,.dashboard-exam-trends-title h2,.dashboard-exam-trends-title p){background:transparent!important;box-shadow:none!important}
.student-body .dashboard-exam-trends-title p{font-size:12px!important;line-height:1.5!important}
.student-body .dashboard-exam-subjects :is(small,.dashboard-exam-topic-meta span){font-size:11px!important}
.student-body .dashboard-exam-subjects article>strong{font-size:13px!important}
.teacher-body :is(.td-assignment-card p,.td-panel-heading p,.td-actions-panel a>span,.td-stats small){font-size:12px!important;line-height:1.5!important;color:#596779}
.teacher-body .td-assignment-year{font-size:11px!important}
.teacher-body :is(.td-assignment-card a,.td-actions-panel a){min-height:44px}
.teacher-body :is(input,select,textarea):focus-visible{outline:3px solid #b4a4ff;outline-offset:2px}
@media(max-width:820px){
 .student-body :is(.udb-tabs a,.udb-filters input,.udb-filters select,.udb-filters button,.udb-new-notebook input,.udb-new-notebook button,.udg-segment button,.udg-option-grid button,.uad-subject,.et3-section-nav button){min-height:44px!important}
 .student-body .ktr-page .ktr-question{padding:14px!important}
 .student-body .ktr-page .ktr-nav{bottom:calc(var(--ud-v3r6-nav-h,70px) + env(safe-area-inset-bottom))!important;z-index:6}
 .student-body .ktr-page .ud-question-tool{min-width:44px!important;min-height:44px!important}
 .student-body .ktr-page .ktr-question-head h2{font-size:19px!important}
 .student-body .ktr-page.ktr-page .ktr-palette-grid button{min-height:44px}
 .student-body .ud-qtools-modal{width:min(620px,calc(100vw - 24px))!important;max-height:calc(100dvh - 28px)!important}
}
@media(prefers-reduced-motion:reduce){.public-body .nav-links,.public-body .ud-public-menu-toggle i,.student-body .ktr-page.ktr-page .ktr-palette-grid button{animation:none!important;transition:none!important}}

/* Cumulative R2: honest status without replacing the existing visual language. */
.student-body .ud-ux-plan-notice,.student-body .ud-ux-plan-sync{padding:14px 16px;border:1px solid var(--ud-accent,#7658df);border-radius:14px;background:var(--ud-surface,#fff);color:var(--ud-text,#172033);font-size:13px;line-height:1.6;margin:0 0 16px}
.student-body .ud-ux-plan-notice p{margin:4px 0 0;color:var(--ud-muted,#657186)}
.student-body .ud-day-plan-pill.is-stale{border-color:var(--ud-accent,#7658df)}
