/* Shared palette. White stays white for text on brand buttons and illustrations. */
html[data-theme="dark"]{
    color-scheme:dark;
    --site-bg:#101b2a;--site-surface:#19293d;--site-soft:#20344c;
    --site-ink:#e5edf8;--site-muted:#b0c0d3;--site-line:#354a63;--site-link:#8bbcff;
    --gray-900:#edf3fc;--gray-800:#e0e9f5;--gray-700:#c3d0e0;--gray-600:#a9bbcf;
    --gray-500:#9bafc7;--gray-400:#6d839e;--gray-300:#41566f;--gray-200:#2e425a;--gray-100:#142235;
    --primary-light:#203c60;--dark:#0a1422;--dark-light:#182940;
    --shadow-sm:0 1px 4px #0003;--shadow-md:0 4px 18px #0004;--shadow-lg:0 10px 40px #0004;
    background:var(--site-bg);
}
html[data-theme="dark"] body{background:var(--site-bg);color:var(--site-ink)}
html[data-theme="dark"] .header{background:#101b2af2;border-color:var(--site-line)}
html[data-theme="dark"] :is(.mobile-nav,.hero-card,.hero-badge,.floating-badge,.price-explain-card,.advantage-card,.coverage-card,.coverage-table-wrapper,.tips-card,.faq-item,.modal-content,.guide-card,.guide-priority,.guide-priority-links a,.article-card-main,.article-side-card,.directory-card,.directory-summary,.directory-nav a,.article-faq-item,.related-article-card,.comparison-table-wrap,.timeline-grid>div,.tool-card,.calculator-widget-card,.article-calculator-card,.calculator-benefits span){background:var(--site-surface);border-color:var(--site-line)}
html[data-theme="dark"] :is(.calculator,.coverage,.how-it-works,.article-layout,.directory-intro,.directory-content,.directory-final-cta){background:var(--site-bg)}
html[data-theme="dark"] :is(.hero,.price-explain,.guide-section,.tools-hero,.calculator-integrated,.calculator-integrated.calculator-simple){background:radial-gradient(ellipse at 15% 0%,#1a3761 0%,transparent 65%),var(--site-bg)}
html[data-theme="dark"] :is(.calculator-shell,.widget-card-top,.widget-card-steps,.widget-card-footer,.calculator-iframe-container--framed){background:var(--site-surface);border-color:var(--site-line)}
/* The partner calculator keeps its own colors; never invert forms or question images. */
html[data-theme="dark"] :is(.calculator-iframe-container--simple,.calculator-iframe-container--simple iframe){background:#fff;color-scheme:light}
html[data-theme="dark"] :is(.section-badge,.hero-note,.price-explain-badge,.calculator-trust-note,.calculator-notice--compact,.article-toc,.article-inline-cta,.example-box,.formula-box,.tool-inline-link,.tool-app,.tool-result,.tool-result-list li,.driver-tool,.app-download-banner,.app-release-card,.apk-hash,.article-check-list li,.mistake-list li,.article-steps li){background:var(--site-soft);border-color:var(--site-line);color:var(--site-ink)}
html[data-theme="dark"] :is(.article-toc a,.tool-field input,.tool-field select,.driver-tool select,.driver-tool input[type=date],.driver-tool .tool-secondary){background:var(--site-surface);color:var(--site-ink);border-color:var(--site-line)}
html[data-theme="dark"] :is(.article-card-main h2,.article-card-main h3,.article-side-card h3,.article-toc strong,.article-inline-cta strong,.article-faq-item summary,.related-article-card strong,.directory-summary h2,.directory-nav span,.directory-category-heading h2,.directory-card--link h3,.formula-box strong,.tools-hero h1,.tool-card h2,.tool-field label,.tool-field>span,.driver-tool label,.app-brand h2,.app-release-card strong,.app-version-list dt){color:var(--site-ink)}
html[data-theme="dark"] :is(.article-card-main p,.article-card-main li,.article-side-card a,.source-list li,.article-inline-cta span,.related-article-card span,.related-article-card small,.directory-summary p,.directory-nav small,.directory-category-heading p,.directory-card-top,.directory-card--link p,.formula-box span,.timeline-grid span,.tool-inline-link span,.tools-hero p,.tool-card p,.tool-note,.app-download-banner p,.app-download-banner li){color:var(--site-muted)}
html[data-theme="dark"] .article-lead{color:var(--site-ink)!important}
html[data-theme="dark"] .article-disclaimer{color:var(--site-muted)!important}
html[data-theme="dark"] :is(.btn-outline,.guide-priority-links a,.article-toc a,.timeline-grid strong,.tool-card strong,.pampadu-widget-help,.nav-link[aria-current="page"],.mobile-nav-link[aria-current="page"],.hero-badge,.section-badge,.price-explain-badge){color:var(--site-link)}
html[data-theme="dark"] .btn-outline:hover{color:#fff;background:#1557b0}
html[data-theme="dark"] .btn-secondary{background:#23466f;color:#fff;border-color:#577da9}
html[data-theme="dark"] :is(.nav-link:hover,.mobile-nav-link:hover,.guide-priority-links a:hover,.directory-nav i,.tool-card i,.tool-card>.ui-icon){background:var(--site-soft);color:var(--site-link)}
html[data-theme="dark"] :is(.info-box,.article-table th){background:#203b60;color:#bcd7ff;border-color:#486a95}
html[data-theme="dark"] :is(.guide-note,.warning-box,.coverage-note,.pampadu-widget-noscript){background:#3b3020;color:#ffdfac;border-color:#8b6d3d}
html[data-theme="dark"] .success-box{background:#163d35;color:#b2ebd4;border-color:#396e5f}
html[data-theme="dark"] :is(.article-table td,.comparison-table td,.comparison-table th,.table-scroll,.article-toc,.article-side-card a,.article-update){border-color:var(--site-line)}
html[data-theme="dark"] .pampadu-widget-fallback{background:var(--site-surface);border-color:var(--site-line)}
html[data-theme="dark"] .pampadu-widget-fallback__content strong{color:var(--site-ink)}
html[data-theme="dark"] :is(.pampadu-widget-fallback__content p,.pampadu-widget-fallback__note){color:var(--site-muted)}
html[data-theme="dark"] .pampadu-widget-status{color:#bbd7fb}
html[data-theme="dark"] .pampadu-widget-status[data-state="ready"]{color:#a3e9c8}
html[data-theme="dark"] .pampadu-widget-status[data-state="slow"]{color:#ffda9b}
html[data-theme="dark"] .pampadu-widget-status[data-state="error"]{color:#ffc0c0}
html[data-theme="dark"] :is(.guide-card--accent,.directory-count,.article-cta){background:linear-gradient(135deg,#195fae,#16477f);color:#fff}
html[data-theme="dark"] .article-cta :is(h2,p){color:#fff}
html[data-theme="dark"] .calc-float-btn::before{background:var(--site-surface)}
/* Reuse the trainer palette across training, account and reference pages. */
html[data-theme="dark"] .driver-page{--d-bg:var(--site-bg);--d-surface:var(--site-surface);--d-ink:var(--site-ink);--d-muted:var(--site-muted);--d-line:var(--site-line);--d-blue:#78aff6;background:var(--d-bg);color:var(--d-ink)}
html[data-theme="dark"] .driver-btn.primary{background:#2369c2;border-color:#397bcf;color:#fff}
html[data-theme="dark"] .driver-btn.primary:hover{background:#1b57a1}
html[data-theme="dark"] .driver-btn:not(.primary):hover{background:var(--site-soft)}
html[data-theme="dark"] .driver-btn.danger{color:#ffadb6}
html[data-theme="dark"] :is(.driver-pill,.driver-mode .mode-icon){background:var(--site-soft);color:var(--site-link)}
html[data-theme="dark"] :is(.traffic-search-card,.rules-toc,.rules-chapter,.fine-table-wrap){background:var(--site-surface);border-color:var(--site-line)}
html[data-theme="dark"] :is(.traffic-heading>p,.traffic-date,.traffic-date>span:last-child,.rules-toc a,.rules-text p,.rules-source,.fine-table p){color:var(--site-muted)}
html[data-theme="dark"] :is(.fine-table strong,.fine-amount){color:var(--site-ink)}
html[data-theme="dark"] :is(.traffic-search-card input,.traffic-search-card select){background:var(--site-bg);color:var(--site-ink);border-color:var(--site-line)}
html[data-theme="dark"] :is(.pdd-resource-nav,.fine-table th,.fine-category,.rules-chapter[open]>summary,.rules-text p:target){background:var(--site-soft);color:var(--site-link);border-color:var(--site-line)}
html[data-theme="dark"] .pdd-resource-nav{border-color:var(--site-line)}
html[data-theme="dark"] .pdd-resource-nav a{color:var(--site-muted)}
html[data-theme="dark"] :is(.pdd-resource-nav a:hover,.pdd-resource-nav a[aria-current="page"],.rules-toc a:hover){background:var(--site-surface);color:var(--site-link)}
html[data-theme="dark"] :is(.fine-table a,.traffic-source-links a){color:var(--site-link)}
html[data-theme="dark"] :is(.fine-table td,.chapter-toggle){border-color:var(--site-line)}
html[data-theme="dark"] .rules-text p:target{outline-color:var(--site-soft)}
html[data-theme="dark"] .rules-text mark{background:#6e541c;color:#fff1c2}
@media(max-width:600px){html[data-theme="dark"] .fine-table tr{background:var(--site-surface);border-color:var(--site-line)}html[data-theme="dark"] .fine-table td:before{color:var(--site-muted)}}
html[data-theme="dark"] :is(.app-hero-promo,.install-panel){background:var(--site-soft);border-color:var(--site-line)}
html[data-theme="dark"] :is(.app-hero-promo strong,.install-panel h2){color:var(--site-ink)}
html[data-theme="dark"] :is(.app-hero-promo p,.app-hero-promo small,.install-panel p,.install-panel li,.install-panel small){color:var(--site-muted)}
html[data-theme="dark"] .install-summary p{color:#dbeafe}
html[data-theme="dark"] .app-download-page :is(.article-card-main,.article-side-card) a.btn{color:#fff}
