/* Explicit dark palette; original illustrations and exported documents stay unchanged. */
.brand-motto-bar{display:flex!important;align-items:center;justify-content:center;gap:14px;padding-left:12px!important;padding-right:12px!important;min-height:36px;height:auto!important}
body{padding-top:36px}.auth-shell,.auth-intro{min-height:calc(100vh - 36px)}
@media(min-width:651px){.sidebar{top:36px}}
.theme-toggle{position:absolute;right:16px;top:4px;border:1px solid #d4b983;border-radius:20px;padding:3px 11px;font-size:12px;line-height:1.6;letter-spacing:0;color:#795024;background:#fffaf0;white-space:nowrap}
.theme-toggle:focus-visible{outline:3px solid #ba620f;outline-offset:2px}
html[data-theme=dark]{color-scheme:dark;--ink:#ece8df;--muted:#b5b1a7;--line:#49463f;--green:#ffbd77;--bg:#191b1e;--pale:#353128;--amber:#ffcf8a;--surface:#24272b;--brand-ink:#ede5d7;--brand-muted:#b9b2a5}
html[data-theme=dark] body{background:#191b1e!important;color:#ece8df!important}
html[data-theme=dark] :is(.auth-main,.sidebar,.topbar,.login-card,.stats,.search-panel,.question-card,.card,.file-card,.paper-outline,.paper-edition,.export-job,.account-form,.photo-upload-card,.photo-feedback-page,.photo-feedback-dialog,.solve-job,.practice-card,.history-question,.knowledge-detail,.knowledge-chapters,.knowledge-navigator,.portal-panel,.portal-action,.portal-stat,.portal-draft,.portal-recent,.authoring-card,.authoring-rule,.authoring-result,.authoring-outline,.tf-form,.tf-admin,.tf-thanks,.basket-dock,#dockItems,.admin-recent-questions,.admin-overview-statistics,.admin-module-card){background:#24272b!important;color:#ece8df!important;border-color:#49463f!important;box-shadow:none!important}
html[data-theme=dark] :is(.auth-intro,.photo-guide,.page-heading,.portal-heading,.brand-motto-bar,.exam-library-preparing,.exam-preparing,.tf-thanks){background:#2d2b26!important;background-image:none!important;color:#f2dec0!important;border-color:#49463f!important}
html[data-theme=dark] :is(dialog,.dialog-top,.detail-section,.inline-answer,.preview-answer,.practice-answer,.authoring-picked,.authoring-totals,.knowledge-subgroup,.knowledge-extra,.history-search,.tf-toolbar,.solve-waiting){background:#24272b!important;color:#ece8df!important;border-color:#49463f!important}
html[data-theme=dark] dialog::backdrop{background:#000b}
html[data-theme=dark] :is(input,select,textarea,option,.search-row>input,.portal-search input){background:#1b1e22!important;color:#eee9e0!important;border-color:#656057!important}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#aaa69d!important;opacity:1}
html[data-theme=dark] :is(h1,h2,h3,h4,label,.question-copy,.card-stem,.code,.user-menu>span,.topbar b,.admin-module-card strong){color:#ece8df!important}
html[data-theme=dark] :is(.muted,.help,.intro-copy p,.intro-footer,.auth-footnote,.sidebar-bottom,.sidebar-bottom p,.page-heading p,.stats span,.stats small,.card-top,.result-header,.result-header h2 span,.figure-caption,.history-meta,.history-source,.photo-guide p,.photo-guide-motto,.waiting-copy p,.portal-help,.knowledge-breadcrumb,.admin-module-card span,.admin-module-card small,small){color:#bdb7ab!important}
html[data-theme=dark] :is(a,.eyebrow,.text-button,.download-actions button,.knowledge-tag-row,.knowledge-chapter,.knowledge-mode,.knowledge-scope-button,.nav,.practice-button){color:#ffbf7d!important}
html[data-theme=dark] :is(.secondary,.outline-tag,.filter-chip,.badge,.tag,.knowledge-tag-row,.knowledge-chapter,.knowledge-mode,.knowledge-scope-button,.authoring-presets button,.notice,.main-exam-points,.practice-model,.practice-source-badge,.history-state,.admin-module-tabs button){background:#35312a!important;color:#f3cd98!important;border-color:#665642!important}
html[data-theme=dark] :is(.primary,.nav.active,[aria-pressed=true].knowledge-mode,[aria-pressed=true].knowledge-scope-button,.admin-module-tabs [aria-pressed=true]){background:#d98030!important;color:#17191c!important;border-color:#e4a15c!important}
html[data-theme=dark] .primary:hover{background:#f0a45d!important}
html[data-theme=dark] :is(.photo-dropzone,.tf-paste-zone){background:#1e2226!important;color:#efc693!important;border-color:#a27b4b!important}
html[data-theme=dark] :is(th,td){border-color:#49463f!important;color:#e8e4dc!important}
html[data-theme=dark] th{background:#323236!important}
html[data-theme=dark] :is(.error,.admin-record-error){color:#ffafa0!important}
html[data-theme=dark] :is(.analytics-track,.knowledge-tag-list){background:transparent!important}
html[data-theme=dark] .theme-toggle{background:#34302a;color:#ffe0a8;border-color:#8e7958}
html[data-theme=dark] :is(.question-figures img,.photo-preview img,.tf-preview,.history-thumb img,.admin-question-image,.figure-zoom-canvas img){background:white;border-radius:6px}
html[data-theme=dark] .institution-logo{background:#fff5df;border-radius:8px;padding:4px}
html[data-theme=dark] :is(.katex,.katex *){color:inherit}
html[data-theme=dark] :is(.footer,.auth-footnote,.filters,.card-actions,.dialog-top){border-color:#49463f!important}
@media(max-width:560px){.brand-motto-bar{justify-content:space-between!important;font-size:11px!important;letter-spacing:1px!important;padding-right:10px!important}.theme-toggle{position:static;font-size:11px;padding:3px 9px;flex-shrink:0}}

/* Answer highlights retain contrast in dark mode. */
html[data-theme=dark] :is(.solve-conclusion,.solution-method-idea,.preview-answer,.practice-answer,.main-exam-points){background:#35312a!important;color:#f1e7d6!important;border-color:#665642!important}

/* On phones, keep branding compact so the login form appears immediately. */
@media(max-width:650px){.auth-intro{min-height:0}}
