/* Shared public-site palette. No image inversion and no per-page theme storage. */
:root {color-scheme:light dark;--site-page:#f8fafc;--site-surface:#fff;--site-soft:#f1f5f9;--site-ink:#172238;--site-muted:#52647b;--site-line:#e2e8f0;--site-link:#1d4ed8;--site-action:#3659e3;--site-action-hover:#2546bd;--site-on-action:#fff}
:root {
    --site-success:#166534;--site-success-bg:#f0fdf4;--site-success-line:#bbf7d0;--site-success-action:#157347;
    --site-danger:#b91c1c;--site-danger-bg:#fef2f2;--site-danger-line:#fecaca;--site-danger-action:#b42330;
    --site-warning:#854d0e;--site-warning-bg:#fefce8;--site-warning-line:#fde68a;
    --site-info:#075985;--site-info-bg:#f0f9ff;--site-info-line:#bae6fd;
    --site-accent:#6d28d9;--site-accent-bg:#f5f3ff;--site-accent-line:#ddd6fe;
}
.ut-theme-toggle {flex:none}
html[data-site-theme="dark"] {
    color-scheme: dark;
    --site-page:#101624;--site-surface:#1a2234;--site-soft:#222d42;--site-ink:#edf1f8;--site-muted:#c3d1e4;--site-line:#36435b;--site-link:#a6bdff;
    --site-success:#75d9a8;--site-success-bg:#19382c;--site-success-line:#32694c;
    --site-danger:#ffaaa5;--site-danger-bg:#402528;--site-danger-line:#78464a;
    --site-warning:#ffe2a3;--site-warning-bg:#392f1c;--site-warning-line:#665332;
    --site-info:#7dc7ee;--site-info-bg:#173348;--site-info-line:#2a536c;
    --site-accent:#c4b5fd;--site-accent-bg:#342d53;--site-accent-line:#645183;
    --we-bg:var(--site-page);--we-bg-card:var(--site-surface);--we-bg-alt:var(--site-soft);--we-surface:var(--site-surface);
    --we-text:var(--site-ink);--we-secondary:var(--site-ink);--we-text-muted:var(--site-muted);--we-text-light:#a0adc2;--we-muted:var(--site-muted);--we-border:var(--site-line);--we-border-hover:#52627e;
    --we-primary:var(--site-link);--we-primary-dark:#c6d5ff;--we-primary-light:#283554;--we-accent:#7dc7ee;
    --eu-bg:var(--site-page);--eu-dark:var(--site-ink);--eu-muted:var(--site-muted);--eu-border:var(--site-line);--eu-primary:var(--site-link);
    --public-ink:var(--site-ink);--public-muted:var(--site-muted);
    --mag-bg-surface:var(--site-surface);--mag-bg-subtle:var(--site-soft);--mag-border:var(--site-line);--mag-border-hover:#52627e;--mag-text-main:var(--site-ink);--mag-text-muted:var(--site-muted);--mag-primary:var(--site-link);--mag-primary-hover:#c6d5ff;
    --color-surface:var(--site-page);--color-surface-bright:var(--site-surface);--color-surface-dim:var(--site-page);--color-surface-container-lowest:var(--site-surface);--color-surface-container-low:var(--site-surface);--color-surface-container:var(--site-soft);--color-surface-container-high:var(--site-soft);--color-surface-container-highest:#2b3850;
    --color-on-surface:var(--site-ink);--color-on-surface-variant:var(--site-muted);--color-outline-variant:var(--site-line);--color-primary:#3659e3;--color-on-primary:#fff;--color-primary-container:#2345a3;--color-on-primary-container:#dbe6ff;--color-primary-fixed:#283554;--color-on-primary-fixed:#edf1f8;
    --aw-page:var(--site-page);--aw-surface:var(--site-surface);--aw-soft:var(--site-soft);--aw-ink:var(--site-ink);--aw-muted:var(--site-muted);--aw-line:var(--site-line);--aw-control:#52627e;--aw-accent:#b7a8ff;--aw-tint:#342d53;
    --ac-text:var(--site-ink);--ac-muted:var(--site-muted);--ac-border:var(--site-line);--ac-bg-soft:var(--site-soft);--ac-primary:var(--site-link);--ac-primary-light:#283554;--ac-primary-border:#435582;
    --bs-body-bg:var(--site-page);--bs-body-color:var(--site-ink);--bs-secondary-color:var(--site-muted);--bs-tertiary-color:#a0adc2;--bs-border-color:var(--site-line);--bs-link-color:var(--site-link);--bs-link-hover-color:#c6d5ff;
    --bs-emphasis-color:var(--site-ink);--bs-secondary-bg:var(--site-surface);--bs-tertiary-bg:var(--site-soft);
    --bs-primary-text-emphasis:var(--site-link);--bs-primary-bg-subtle:#283554;--bs-primary-border-subtle:#435582;
    --bs-secondary-text-emphasis:var(--site-muted);--bs-secondary-bg-subtle:var(--site-soft);--bs-secondary-border-subtle:var(--site-line);
    --bs-light-text-emphasis:var(--site-ink);--bs-light-bg-subtle:var(--site-soft);--bs-light-border-subtle:var(--site-line);
    --bs-dark-text-emphasis:var(--site-ink);--bs-dark-bg-subtle:var(--site-soft);--bs-dark-border-subtle:var(--site-line);
    --bs-success-text-emphasis:var(--site-success);--bs-success-bg-subtle:var(--site-success-bg);--bs-success-border-subtle:var(--site-success-line);
    --bs-danger-text-emphasis:var(--site-danger);--bs-danger-bg-subtle:var(--site-danger-bg);--bs-danger-border-subtle:var(--site-danger-line);
    --bs-warning-text-emphasis:var(--site-warning);--bs-warning-bg-subtle:var(--site-warning-bg);--bs-warning-border-subtle:var(--site-warning-line);
    --bs-info-text-emphasis:var(--site-info);--bs-info-bg-subtle:var(--site-info-bg);--bs-info-border-subtle:var(--site-info-line);
}
html[data-site-theme="dark"] :is(.st-page,.pt-page,.ej-page,.portal-scope) {
    --st-ink:var(--site-ink);--st-muted:var(--site-muted);--st-border:var(--site-line);--st-accent:#b7a8ff;
    --pt-ink:var(--site-ink);--pt-muted:var(--site-muted);--pt-line:var(--site-line);--pt-blue:var(--site-link);
    --ej-ink:var(--site-ink);--ej-muted:var(--site-muted);--ej-line:var(--site-line);
    --eh-ink:var(--site-ink);--eh-muted:var(--site-muted);--eh-line:var(--site-line);
    background:var(--site-page);color:var(--site-ink);
}
html[data-site-theme="dark"] .lr-page {--lr-bg:var(--site-page);--lr-surface:var(--site-surface);--lr-ink:var(--site-ink);--lr-muted:var(--site-muted);--lr-line:var(--site-line);--lr-accent:var(--site-link)}
html[data-site-theme="dark"] body {background:var(--site-page);color:var(--site-ink)}
html[data-site-theme="dark"] :is(.ut-site-header,.ut-site-footer,.ut-drawer,.ut-mobile-dock,.modal-content,.dropdown-menu,.offcanvas) {background:var(--site-surface);color:var(--site-ink);border-color:var(--site-line)}
html[data-site-theme="dark"] :is(.ut-brand,.ut-desktop-nav a,.ut-header-search,.ut-drawer nav a,.ut-mobile-dock a,.ut-mobile-dock button,.ut-section-nav-title,.ut-section-links>a,.ut-footer-grid h2) {color:var(--site-ink)}
html[data-site-theme="dark"] :is(.ut-icon-button,.ut-state-options a,.ut-drawer-context,.ut-section-nav) {background:var(--site-soft);color:var(--site-ink);border-color:var(--site-line)}
html[data-site-theme="dark"] :is(.ut-desktop-nav a.is-active,.ut-desktop-nav a:hover,.ut-brand>span>span,.ut-mobile-dock .is-active,.ut-section-links>a.is-active) {color:var(--site-link)}
html[data-site-theme="dark"] :is(.ut-header-account,.ut-brand-mark,.ut-account-submit) {background:#3659e3;color:#fff;border-color:#3659e3}
html[data-site-theme="dark"] :is(.ut-drawer nav a:hover,.ut-section-links>a:hover,.ut-mobile-dock a.is-active,.ut-section-links>a.is-active) {background:var(--site-soft)}
html[data-site-theme="dark"] :is(.ut-site-footer p,.ut-site-footer a:not(.btn),.ut-footer-bottom,.ut-drawer p,.ut-state-options small) {color:var(--site-muted)}
html[data-site-theme="dark"] .btn-close {filter:invert(1) grayscale(100%) brightness(200%)}

/* Bootstrap and home-page utilities use the same surfaces as the custom layouts. */
html[data-site-theme="dark"] :is(.bg-white,.bg-body,.card,.we-card,.bg-background-light) {background-color:var(--site-surface)!important;color:var(--site-ink);border-color:var(--site-line)!important}
html[data-site-theme="dark"] :is(.bg-light,.bg-slate-50,.bg-slate-100,.bg-gray-50,.bg-gray-100,.bg-blue-50,.bg-indigo-50) {background-color:var(--site-soft)!important}
html[data-site-theme="dark"] :is(.text-dark,.text-body,.text-secondary,.text-slate-900,.text-slate-800,.text-slate-700,.text-gray-900,.text-gray-800,.text-gray-700) {color:var(--site-ink)!important}
html[data-site-theme="dark"] :is(.text-muted,.text-body-secondary,.text-slate-600,.text-slate-500,.text-gray-600,.text-gray-500) {color:var(--site-muted)!important}
html[data-site-theme="dark"] :is(.text-primary,.text-blue-600,.text-blue-700,.text-indigo-600) {color:var(--site-link)!important}
html[data-site-theme="dark"] .text-success {color:#75d9a8!important}
html[data-site-theme="dark"] .text-danger {color:#ffaaa5!important}
html[data-site-theme="dark"] .border-light-subtle {border-color:var(--site-line)!important}
html[data-site-theme="dark"] :is(h1,h2,h3,h4,h5,h6):not(.text-white,.eu-spotlight__headline,.eu-spotlight__banner-title) {color:var(--site-ink)}
html[data-site-theme="dark"] .bg-warning.text-dark {color:#172238!important}
html[data-site-theme="dark"] :is(input:not([type=checkbox]):not([type=radio]):not([type=submit]),select,textarea,.form-control,.form-select) {background-color:var(--site-soft);color:var(--site-ink);border-color:#52627e}
html[data-site-theme="dark"] :is(input,textarea)::placeholder {color:#a0adc2;opacity:1}
html[data-site-theme="dark"] :is(input,select,textarea):disabled {color:#9aa8c0;background-color:#20293b}
html[data-site-theme="dark"] .table {--bs-table-bg:var(--site-surface);--bs-table-color:var(--site-ink);--bs-table-border-color:var(--site-line);--bs-table-striped-bg:var(--site-soft);--bs-table-striped-color:var(--site-ink);--bs-table-hover-bg:var(--site-soft);--bs-table-hover-color:var(--site-ink)}
html[data-site-theme="dark"] :is(.btn-light,.btn-outline-secondary) {background:var(--site-soft);border-color:var(--site-line);color:var(--site-ink)}

/* Content, discovery, store and account components keep their existing layouts. */
html[data-site-theme="dark"] :is(.ut-feed-card,.ut-quiz-card,.ut-hof-panel,.ut-news-card,.ut-resource,.ut-story-body,.ut-board,.pt-card,.pt-notice,.pt-exam-card,.dc-hero-note,.dc-context,.dc-search,.ej-article,.ej-story-card,.ej-card-body,.ej-sidebar-card,.ac-board-card,.st-card,.st-panel,.st-order-row,.st-empty,.ut-account-card,.eh-featured-post-card,.eh-mini-post-card) {background:var(--site-surface);color:var(--site-ink);border-color:var(--site-line)}
html[data-site-theme="dark"] :is(.ut-account-page,.pt-hero,.dc-hero,.ut-hof-panel-heading,.ut-hof-periods,.ut-feed-empty,.st-status,.st-cover,.ej-taxonomy>*,.ej-reader-tools,.ut-topic-rail>a,.ut-quick-classes>a,.eh-board-card) {background:var(--site-soft);border-color:var(--site-line);color:var(--site-ink)}
html[data-site-theme="dark"] :is(.ut-hof-periods a[aria-current],.ut-account-card-icon,.ut-account-benefit i,.dc-note-icon,.dc-context>button,.st-tag,.st-cover-icon) {background:var(--site-soft);border-color:var(--site-line);color:var(--site-link)}
html[data-site-theme="dark"] :is(.ut-feed-card h3 a,.ut-quiz-card h3 a,.ut-resource h3,.ut-news-card h3,.ut-news-card h4,.pt-card h4,.pt-notice h4,.ej-story-card h3,.eh-mini-post-title,.eh-mini-post-title a,.eh-featured-post-title a,.ut-hof-steps strong,.ut-hof-panel-heading h3,.ut-account-field label,.ut-account-remember,.dc-hero-note strong,.st-body h2) {color:var(--site-ink)}
html[data-site-theme="dark"] :is(.ut-feed-card p,.ut-quiz-card p,.ut-feed-meta,.ut-feed-footer,.ut-news-meta,.ut-guide-excerpt,.ut-hof-steps small,.ut-ranking-intro>p,.ut-hof-kicker,.ut-hof-region-row,.ut-account-intro>p,.ut-account-benefit,.ut-account-copy,.ut-account-switch,.ut-account-note,.dc-hero>div>p,.dc-hero .dc-hero-note p,.dc-section-heading p,.dc-result-count,.st-description,.eh-mini-post-excerpt,.ej-prose,.ej-meta,.ej-takeaway>p:last-child) {color:var(--site-muted)}
html[data-site-theme="dark"] :is(.ut-account-guest,.ut-account-switch a,.st-link,.dc-actions a:not(.dc-primary),.dc-breadcrumb a,.ej-breadcrumb a,.ut-hof-full-link) {color:var(--site-link)}
html[data-site-theme="dark"] .st-btn-outline {background:var(--site-soft);color:var(--site-link)!important;border-color:#52627e}
html[data-site-theme="dark"] :is(.st-btn:not(.st-btn-outline),.sw-button) {background:#6252c7;color:#fff!important}
html[data-site-theme="dark"] :is(.st-alert,.alert-warning) {background:#392f1c;border-color:#665332;color:#ffe2a3}
html[data-site-theme="dark"] :is(.st-error,.ut-account-error) {color:#ffaaa5}
html[data-site-theme="dark"] :is(.ej-prose blockquote,.ej-prose pre,.ej-takeaway,.ut-hof-personal,.ut-hof-empty) {background:var(--site-soft);border-color:var(--site-line);color:var(--site-ink)}
html[data-site-theme="dark"] .ej-prose a {color:var(--site-link)}
html[data-site-theme="dark"] :is(.mag-ticker-wrap,.mag-horizontal-card,.mag-grid-card,.mag-card,.mag-widget,.mag-internal-cat-col,.side-card,.ref-blog-card,.in-article-toolkit-card,.domain-card-box,.embed-plugin-card,.ebook-store-item) {background:var(--site-surface);border-color:var(--site-line);color:var(--site-ink)}
html[data-site-theme="dark"] :is(.mag-main-cat-pill:not(.active),.mag-subcat-pill:not(.active),.mag-category-pill:not(.active),.mag-tool-pill,.mag-card-media,.mag-gcard-media,.mag-popular-thumb,.mag-subcat-wrapper,.mag-internal-linking-wrap,.blog-toc-accordion .accordion-item,.blog-toc-accordion .accordion-button,.blog-content-body th,.blog-action-bar,.side-card-header,.ebook-icon-box,.toolkit-top-bar,.domain-carousel-section,.domain-filter-pill,.embed-card-topbar,.embed-meta-pill,.embed-product-cover-wrap,.embed-product-action-box,.embed-stat-item) {background:var(--site-soft);border-color:var(--site-line);color:var(--site-ink)}
html[data-site-theme="dark"] :is(.mag-main-cat-pill.active,.mag-subcat-pill.active,.mag-category-pill.active) {background:#3659e3;border-color:#3659e3;color:#fff}
html[data-site-theme="dark"] :is(.blog-content-body,.blog-content-body p,.blog-content-body li,.blog-content-body td,.blog-content-body blockquote,.side-card p,.ref-blog-card p) {color:var(--site-ink)}
html[data-site-theme="dark"] :is(.ut-account-kicker,.mag-hcard-meta,.mag-hcard-meta span,.blog-meta,.blog-meta-item,.blog-excerpt) {color:var(--site-muted)}
html[data-site-theme="dark"] :is(.blog-author-name,.blog-date-badge strong) {color:var(--site-ink)}
html[data-site-theme="dark"] :is(.blog-author-meta,.blog-date-badge) {color:var(--site-muted)}
html[data-site-theme="dark"] :is(.blog-badge-primary,.blog-badge-secondary,.blog-badge-muted,.blog-share-btn,.blog-short-description) {background:var(--site-soft);color:var(--site-ink);border-color:var(--site-line)}
html[data-site-theme="dark"] .blog-submeta-row {border-color:var(--site-line)}
html[data-site-theme="dark"] main :is([style*="background: #f8fafc"],[style*="background-color: #f8fafc"],[style*="background: #fff"],[style*="background-color: #fff"]) {background:var(--site-soft)!important;color:var(--site-ink)}

/* Local component palettes must change with their surfaces. Root variables alone
   cannot override the light tokens declared on .eh-page and other page shells. */
html[data-site-theme="dark"] .eh-page {
    --eh-ink:var(--site-ink);--eh-muted:var(--site-muted);--eh-line:var(--site-line);--eh-blue:var(--site-link);
    background:var(--site-page);color:var(--site-ink);
}
html[data-site-theme="dark"] :is(.eh-article,.eh-panel,.eh-directory,.eh-home-search,.eh-youtube-link,.eh-ebook-card,.ee-exam-card,.sch-card-item,.ca-dual-card,.eu-card,.eu-search-box) {
    background:var(--site-surface);color:var(--site-ink);border-color:var(--site-line);
}
html[data-site-theme="dark"] :is(.eh-practice-strip,.eh-quiz-item,.eh-directory-tab,.eh-directory-scroll,.eh-directory-class,.eh-directory-class-body,.eh-directory-footer,.ee-card-facts,.sch-card-media,.ca-blog-item,.dc-active-filter) {
    background:var(--site-soft);color:var(--site-ink);border-color:var(--site-line);
}
html[data-site-theme="dark"] .eh-page :is(h1,h2,h3,h4) {color:var(--site-ink)}
html[data-site-theme="dark"] .eh-page :is(.eh-link,.eh-article-footer a) {color:var(--site-link)!important}
html[data-site-theme="dark"] :is(.eh-article-body>p,.eh-section-head p,.eh-kicker,.eh-article-meta,.eh-article-meta time,.eh-article-footer,.eh-quiz-item small,.eh-practice-strip small,.eh-youtube-link small,.ee-fact-label,.mag-subcat-label,.mag-subcat-label span) {color:var(--site-muted)}
html[data-site-theme="dark"] :is(.eh-article-meta>span,.eh-directory-kicker) {color:var(--site-link)}
html[data-site-theme="dark"] .eh-article-image {background-color:var(--site-soft)}
html[data-site-theme="dark"] .eh-article-footer {border-color:var(--site-line)}
html[data-site-theme="dark"] .eh-directory-tab[aria-selected="true"] {background:var(--site-action);color:var(--site-on-action);border-color:var(--site-action)}
html[data-site-theme="dark"] :is(.mag-internal-post-title,.mag-internal-cat-col a,.mag-internal-cat-col .text-truncate) {color:var(--site-ink)!important}
html[data-site-theme="dark"] .sch-tag-pill {background:var(--site-soft)!important;color:var(--site-link)!important}
html[data-site-theme="dark"] body .ut-read-link.ut-read-link {background:var(--site-soft)!important;color:var(--site-link)!important;border-color:var(--site-line)!important}
html[data-site-theme="dark"] body .ut-read-link.ut-read-link:is(:hover,:focus-visible) {background:var(--site-action)!important;color:var(--site-on-action)!important;border-color:var(--site-action)!important}
html[data-site-theme="dark"] :is(.eh-directory-subject,.eh-directory-kicker,.eh-directory-class-head,.eh-directory-subject-list,.eh-directory-empty,.eh-directory-class-hub) {background:var(--site-soft);border-color:var(--site-line);color:var(--site-ink)}
html[data-site-theme="dark"] :is(.eh-muted,.eh-directory-intro,.eh-directory-subject small,.ee-card-desc,.sch-card-desc,.sch-deadline-note,.sch-deadline-note span) {color:var(--site-muted)}
html[data-site-theme="dark"] .ee-fact-val {color:var(--site-ink)}
html[data-site-theme="dark"] .eh-directory :is(.eh-directory-context,.eh-directory-details,.eh-directory-children,.eh-directory-all,.eh-directory-context span,.eh-directory-row-count,.eh-directory-chevron,.eh-directory-row-icon) {background:var(--site-soft);border-color:var(--site-line);color:var(--site-ink)}
html[data-site-theme="dark"] .eh-directory :is(.eh-directory-context strong,.eh-directory-details>summary,.eh-directory-details>summary strong) {color:var(--site-ink)}
html[data-site-theme="dark"] .eh-directory .eh-directory-footer {color:var(--site-link)!important}
html[data-site-theme="dark"] .eh-directory-subject small {background:#19382c;color:#75d9a8}
html[data-site-theme="dark"] .sch-assist-form-wrap {background:var(--site-surface);color:var(--site-ink)}
html[data-site-theme="dark"] .sch-form-label {color:var(--site-ink)}
html[data-site-theme="dark"] .sch-count-status {color:var(--site-muted)}
html[data-site-theme="dark"] :is(.eh-video-channel,.eh-store-banner,.eh-product) {background:var(--site-surface);color:var(--site-ink);border-color:var(--site-line)}
html[data-site-theme="dark"] :is(.eh-quiz-panel>p,.eh-video-channel small,.eh-store-banner p,.ut-hof-periods a,.ut-hof-regions a,.ut-hof-region-row>span,.ut-hof-empty p,.ut-hof-personal p,.ut-hof-rules) {color:var(--site-muted)}
html[data-site-theme="dark"] :is(.ut-hof-personal strong,.ut-hof-spark) {color:var(--site-ink)}
html[data-site-theme="dark"] :is(.ut-hof-empty a,.ut-hof-rules a) {color:var(--site-link)}
html[data-site-theme="dark"] .ut-hof-guest-actions a:not(.ut-hof-join) {color:var(--site-link)}
html[data-site-theme="dark"] .ut-hof-emblem {background:var(--site-soft)}
html[data-site-theme="dark"] .eh-youtube-link p {color:#ffaaa5}
html[data-site-theme="dark"] #faqs button {background:var(--site-surface)}
html[data-site-theme="dark"] .text-tertiary {color:#75d9a8!important}
html[data-site-theme="dark"] .bg-primary.text-on-primary {color:var(--site-on-action)!important}
html[data-site-theme="dark"] .eh-product>span {color:var(--site-link)}
html[data-site-theme="dark"] .ut-hof-regions a[aria-current] {background:var(--site-soft);color:var(--site-link)}

/* Article summaries, related cards and embedded resources use the same reader
   palette as the main prose, including their own explicitly styled labels. */
html[data-site-theme="dark"] :is(.blog-breadcrumb-link,.blog-breadcrumb-link span,.blog-breadcrumb-item.active,.ebook-meta,.ebook-meta span,.domain-card-meta,.domain-card-meta span,.domain-tax-tag,.ref-card-meta) {color:var(--site-muted)}
html[data-site-theme="dark"] :is(.blog-short-desc-text,.ref-card-title a,.domain-card-title a) {color:var(--site-ink)}
html[data-site-theme="dark"] .blog-short-desc-badge .d-inline-flex {color:var(--site-link)}
html[data-site-theme="dark"] .btn-ebook-store {background:#0f766e!important;color:var(--site-on-action)}
html[data-site-theme="dark"] .btn-ebook-store:is(:hover,:focus-visible) {background:#115e59!important}
html[data-site-theme="dark"] .side-card .btn-primary {background:var(--site-action)!important;color:var(--site-on-action)!important}
html[data-site-theme="dark"] .side-card .btn-success {background:#157347!important;color:#fff!important}

/* A bright link color is not a filled-button background: white on that pastel
   was almost invisible in search, quiz cards and legacy portal actions. */
html[data-site-theme="dark"] :is(.btn-we-primary,.btn-eu-primary,.eh-button,.dc-primary) {background:var(--site-action);border-color:var(--site-action);color:var(--site-on-action)!important}
html[data-site-theme="dark"] :is(.btn-we-primary,.btn-eu-primary,.eh-button,.dc-primary):is(:hover,:focus-visible) {background:var(--site-action-hover);border-color:var(--site-action-hover);color:var(--site-on-action)!important}
html[data-site-theme="dark"] .btn-outline-primary {color:var(--site-link);border-color:var(--site-link)}
html[data-site-theme="dark"] .btn-outline-primary:is(:hover,:focus-visible,:active) {background:var(--site-action);border-color:var(--site-action);color:var(--site-on-action)}
html[data-site-theme="dark"] .btn-outline-dark {color:var(--site-ink);border-color:var(--site-muted)}
html[data-site-theme="dark"] .btn-outline-dark:is(:hover,:focus-visible,:active) {background:var(--site-ink);color:var(--site-page)}
html[data-site-theme="dark"] :is(.btn-warning,.text-bg-warning,.bg-warning:not(.bg-opacity-10,.bg-opacity-25,.bg-opacity-50,.bg-opacity-75)) {color:#172238!important}
html[data-site-theme="dark"] .aw-shell .ac-promo-slide-item .badge.text-primary {background-color:var(--site-soft)!important;color:var(--site-link)!important}
html[data-site-theme="dark"] .ut-site-footer .btn {color:var(--site-link)!important}

/* Bootstrap's tinted badge pairs need a dark surface as well as light text. */
html[data-site-theme="dark"] .bg-primary:is(.bg-opacity-10,.bg-opacity-15,.bg-opacity-25) {background-color:#283554!important;color:var(--site-link)!important}
html[data-site-theme="dark"] .bg-success.bg-opacity-10 {background-color:#19382c!important;color:#75d9a8!important}
html[data-site-theme="dark"] .bg-warning.bg-opacity-10 {background-color:#392f1c!important;color:#ffe2a3!important}
html[data-site-theme="dark"] .bg-danger.bg-opacity-10 {background-color:#402528!important;color:#ffaaa5!important}

@media(max-width:575px) {
 .ut-site-header .ut-header-actions{gap:6px}.ut-site-header .ut-icon-button{width:36px;height:36px}.ut-site-header .ut-header-row{gap:8px}
 .ut-site-header .ut-header-account{width:36px;min-height:36px;padding:8px;justify-content:center}.ut-header-account>span{display:none}.ut-theme-toggle i{font-size:15px}
 .ut-site-header .ut-brand{font-size:18px;gap:7px}.ut-site-header .ut-brand-mark{width:30px;height:30px;font-size:16px}
}
@media(max-width:360px) {.ut-site-header .ut-brand small{display:none}.ut-site-header .ut-brand{font-size:17px}}
@media(min-width:1101px) and (max-width:1399px) {.ut-site-header .ut-header-row{gap:12px}.ut-header-search>span{display:none}.ut-site-header .ut-desktop-nav{gap:8px}}

/* Modern Web Guidance: KaTeX & Scrollbar Dark Mode Optimization */
html[data-site-theme="dark"] .katex {
    color: var(--site-ink) !important;
}
html[data-site-theme="dark"] .katex-display {
    text-align: left !important;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.35rem 0;
}
html[data-site-theme="dark"] ::-webkit-scrollbar-thumb {
    background-color: #36435b;
}
html[data-site-theme="dark"] ::-webkit-scrollbar-track {
    background-color: #101624;
}

/* Test Runner Option Cards & Responsive Styling */
.we-test-option {
    background-color: #ffffff;
    border-color: #e2e8f0 !important;
    transition: all 0.15s ease-in-out;
}
.we-test-option:hover {
    border-color: #93c5fd !important;
    background-color: #f8fafc;
}
.we-test-option.we-test-option-selected {
    background-color: #eff6ff !important;
    border-color: #1d4ed8 !important;
}
.we-test-option-badge {
    background-color: #f1f5f9;
    color: #1e293b;
    transition: all 0.15s ease-in-out;
}
.we-test-option-badge.selected {
    background-color: #1d4ed8 !important;
    color: #ffffff !important;
}

/* Test Runner Dark Mode Adaptations */
html[data-site-theme="dark"] .we-test-container {
    background-color: var(--site-surface) !important;
    border-color: var(--site-line) !important;
    color: var(--site-ink);
}
html[data-site-theme="dark"] .we-test-container h5,
html[data-site-theme="dark"] .we-test-container h6 {
    color: var(--site-ink) !important;
}
html[data-site-theme="dark"] .we-test-container .bg-light {
    background-color: var(--site-soft) !important;
}
html[data-site-theme="dark"] .we-test-option {
    background-color: var(--site-surface) !important;
    border-color: var(--site-line) !important;
    color: var(--site-ink);
}
html[data-site-theme="dark"] .we-test-option:hover {
    background-color: var(--site-soft) !important;
    border-color: #3b82f6 !important;
}
html[data-site-theme="dark"] .we-test-option.we-test-option-selected {
    background-color: rgba(37, 99, 235, 0.25) !important;
    border-color: #3b82f6 !important;
}
html[data-site-theme="dark"] .we-test-option-badge {
    background-color: var(--site-soft);
    color: var(--site-ink);
}
html[data-site-theme="dark"] .we-test-option-badge.selected {
    background-color: #2563eb !important;
    color: #ffffff !important;
}
html[data-site-theme="dark"] .we-test-option-text {
    color: var(--site-ink) !important;
}
html[data-site-theme="dark"] .we-palette-btn {
    background: var(--site-soft) !important;
    border-color: var(--site-line) !important;
    color: var(--site-ink) !important;
}
html[data-site-theme="dark"] .we-palette-btn.active {
    background: var(--site-action) !important;
    border-color: var(--site-action) !important;
    color: #ffffff !important;
}
html[data-site-theme="dark"] .we-palette-btn.answered {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
}
html[data-site-theme="dark"] .we-palette-btn.marked {
    background: #d97706 !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
}

