/* =========================================================
   AstronovAI v18.17 - Full Space Night Mode System
   Central dark-mode layer loaded after all page CSS.
   Trigger: html[data-ai-theme="dark"]
   ========================================================= */

html[data-ai-theme="dark"]{
    color-scheme:dark;
    --ai-night-space:#020617;
    --ai-night-deep:#050b16;
    --ai-night-navy:#071426;
    --ai-night-panel:#0b1426;
    --ai-night-panel-2:#101b30;
    --ai-night-panel-3:#111f36;
    --ai-night-input:#0f1b2e;
    --ai-night-glass:rgba(11,20,38,.82);
    --ai-night-glass-strong:rgba(15,27,46,.92);
    --ai-night-ink:#f8fafc;
    --ai-night-text:#d6deec;
    --ai-night-muted:#94a3b8;
    --ai-night-muted-2:#71809a;
    --ai-night-line:rgba(255,255,255,.11);
    --ai-night-line-soft:rgba(255,255,255,.075);
    --ai-night-primary:#60a5fa;
    --ai-night-primary-strong:#3b82f6;
    --ai-night-secondary:#818cf8;
    --ai-night-violet:#a78bfa;
    --ai-night-cyan:#22d3ee;
    --ai-night-green:#34d399;
    --ai-night-yellow:#fbbf24;
    --ai-night-red:#fb7185;
    --ai-night-shadow:0 22px 60px rgba(0,0,0,.38);
    --ai-night-shadow-soft:0 14px 40px rgba(0,0,0,.28);

    --ai-bg:var(--ai-night-deep);
    --ai-surface:var(--ai-night-panel);
    --ai-surface-2:var(--ai-night-panel-2);
    --ai-surface-3:var(--ai-night-panel-3);
    --ai-ink:var(--ai-night-ink);
    --ai-text:var(--ai-night-text);
    --ai-muted:var(--ai-night-muted);
    --ai-line:var(--ai-night-line);
    --ai-line-soft:var(--ai-night-line-soft);
    --ai-primary:var(--ai-night-primary);
    --ai-secondary:var(--ai-night-secondary);
    --ai-accent:var(--ai-night-cyan);
    --ai-soft:rgba(96,165,250,.12);
    --ai-primary-soft:rgba(96,165,250,.14);
    --ai-gradient:radial-gradient(circle at 18% 12%,rgba(96,165,250,.25),transparent 32%),radial-gradient(circle at 82% 16%,rgba(167,139,250,.20),transparent 30%),linear-gradient(135deg,#061020 0%,#0b1426 55%,#050b16 100%);
    --ai-gradient-dark:radial-gradient(circle at 24% 18%,rgba(34,211,238,.20),transparent 30%),radial-gradient(circle at 78% 20%,rgba(129,140,248,.28),transparent 34%),linear-gradient(135deg,#020617 0%,#061225 52%,#0b1220 100%);
}

html[data-ai-theme="dark"],
html[data-ai-theme="dark"] body,
html[data-ai-theme="dark"] body.astronovai-premium-theme{
    background-color:var(--ai-night-deep) !important;
    color:var(--ai-night-text) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme{
    background-image:
        radial-gradient(circle at 11% 8%,rgba(96,165,250,.20),transparent 26%),
        radial-gradient(circle at 86% 12%,rgba(167,139,250,.16),transparent 28%),
        radial-gradient(circle at 50% 100%,rgba(34,211,238,.09),transparent 34%),
        radial-gradient(circle at 18px 24px,rgba(255,255,255,.26) 0 1px,transparent 1.4px),
        radial-gradient(circle at 88px 76px,rgba(147,197,253,.22) 0 1px,transparent 1.3px),
        linear-gradient(180deg,#020617 0%,#050b16 40%,#071426 100%) !important;
    background-size:auto,auto,auto,140px 140px,220px 220px,auto !important;
    background-attachment:fixed,fixed,fixed,fixed,fixed,fixed !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme::before{
    content:"";
    position:fixed;
    inset:0;
    z-index:0;
    pointer-events:none;
    background:
        radial-gradient(circle at 22% 24%,rgba(96,165,250,.15),transparent 22%),
        radial-gradient(circle at 72% 18%,rgba(129,140,248,.16),transparent 24%),
        radial-gradient(circle at 48% 70%,rgba(34,211,238,.08),transparent 30%);
    opacity:.9;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme > *{
    position:relative;
    z-index:1;
}

html[data-ai-theme="dark"] #page,
html[data-ai-theme="dark"] .site,
html[data-ai-theme="dark"] .site-content,
html[data-ai-theme="dark"] .ast-container,
html[data-ai-theme="dark"] .content-area,
html[data-ai-theme="dark"] .site-main,
html[data-ai-theme="dark"] .entry-content,
html[data-ai-theme="dark"] .ast-article-single,
html[data-ai-theme="dark"] .ast-article-post{
    background:transparent !important;
    color:var(--ai-night-text) !important;
}

/* =========================================================
   Typography
   ========================================================= */
html[data-ai-theme="dark"] :where(h1,h2,h3,h4,h5,h6,.entry-title,.page-title,.ai-section-title,.ai-title,strong,b){
    color:var(--ai-night-ink) !important;
}

html[data-ai-theme="dark"] :where(p,li,dd,dt,td,th,label,legend,small,span,em){
    border-color:var(--ai-night-line-soft);
}

html[data-ai-theme="dark"] :where(.ai-muted,.muted,.description,.entry-meta,.post-meta,.blog-meta,.tool-meta,.ai-help,.ai-note,.ai-card-text,.ai-card p,.ai-section p,.ai-lead,.ai-subtitle,.ai-supporting-text,.taxonomy-description,.archive-description){
    color:var(--ai-night-muted) !important;
}

html[data-ai-theme="dark"] a:not(.ai-account-btn):not(.ai-static-btn):not(.ai-btn):not(.button):not(.wp-block-button__link){
    color:var(--ai-night-primary) !important;
}

html[data-ai-theme="dark"] a:not(.ai-account-btn):not(.ai-static-btn):not(.ai-btn):not(.button):hover{
    color:#93c5fd !important;
}

/* =========================================================
   Global surfaces / cards / glass panels
   ========================================================= */
html[data-ai-theme="dark"] :where(
    .ai-card,
    .ai-panel,
    .ai-section,
    .home-section,
    .tool-card,
    .ai-tool-card,
    .blog-card,
    .ai-blog-card,
    .comparison-card,
    .compare-card,
    .ai-account-panel,
    .ai-profile-card-pro,
    .ai-account-sidebar,
    .ai-login-required-box,
    .ai-login-modal-card,
    .ai-save-comparison-box,
    .ai-static-card,
    .ai-static-panel,
    .ai-static-doc,
    .ai-static-aside-card,
    .ai-static-summary-card,
    .ai-favorites-card,
    .favorites-card,
    .category-card,
    .taxonomy-card,
    .ai-mini-tool,
    .ai-feature-card,
    .ai-stat-card,
    .ai-metric-card,
    .ai-search-panel,
    .ai-filter-panel,
    .ai-table-wrap,
    .ai-comment-card,
    .ai-discussion-card
){
    background:
        linear-gradient(180deg,rgba(15,27,46,.92),rgba(11,20,38,.92)) !important;
    border-color:var(--ai-night-line) !important;
    color:var(--ai-night-text) !important;
    box-shadow:var(--ai-night-shadow-soft) !important;
}

html[data-ai-theme="dark"] :where(
    .ai-card,
    .tool-card,
    .blog-card,
    .ai-account-panel,
    .ai-static-card,
    .ai-static-panel,
    .ai-static-doc,
    .compare-card,
    .comparison-card,
    .home-section
)::before{
    border-color:rgba(255,255,255,.08) !important;
}

html[data-ai-theme="dark"] :where(.ai-soft,.ai-chip,.ai-pill,.pill,.badge,.tag,.ai-tag,.tool-tag,.blog-tag,.ai-kicker,.ai-eyebrow,.ai-panel-kicker,.ai-static-kicker){
    background:rgba(96,165,250,.13) !important;
    border-color:rgba(96,165,250,.22) !important;
    color:#bfdbfe !important;
}

html[data-ai-theme="dark"] :where(.ai-number,.ai-icon,.ai-icon-box,.ai-static-card-icon,.ai-static-card-number,.ai-profile-avatar,.ai-profile-avatar-uploaded,.ai-user-avatar-comment){
    background:linear-gradient(135deg,rgba(96,165,250,.18),rgba(129,140,248,.16)) !important;
    border-color:rgba(147,197,253,.20) !important;
    color:#bfdbfe !important;
    box-shadow:0 14px 34px rgba(37,99,235,.14) !important;
}

html[data-ai-theme="dark"] :where(hr,.separator,.divider,.ai-divider){
    border-color:var(--ai-night-line-soft) !important;
    background:var(--ai-night-line-soft) !important;
}

/* =========================================================
   Header / navigation / footer
   ========================================================= */
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-site-header,
html[data-ai-theme="dark"] .ai-site-header{
    background:rgba(2,6,23,.82) !important;
    border-color:rgba(255,255,255,.09) !important;
    box-shadow:0 18px 50px rgba(0,0,0,.26) !important;
    backdrop-filter:blur(18px) saturate(140%) !important;
}

html[data-ai-theme="dark"] .ai-site-header::after{
    background:linear-gradient(90deg,transparent,rgba(96,165,250,.38),rgba(129,140,248,.28),transparent) !important;
}

html[data-ai-theme="dark"] .ai-logo-text,
html[data-ai-theme="dark"] .site-title,
html[data-ai-theme="dark"] .ai-primary-nav a{
    color:var(--ai-night-ink) !important;
}

html[data-ai-theme="dark"] .ai-primary-nav a:hover,
html[data-ai-theme="dark"] .ai-primary-nav .current-menu-item > a{
    color:#bfdbfe !important;
    background:rgba(96,165,250,.10) !important;
}

html[data-ai-theme="dark"] .ai-header-search,
html[data-ai-theme="dark"] .ai-search-box,
html[data-ai-theme="dark"] .search-form,
html[data-ai-theme="dark"] .ai-header-filter-toggle,
html[data-ai-theme="dark"] .ai-mobile-menu-toggle{
    background:rgba(15,27,46,.74) !important;
    border-color:rgba(255,255,255,.12) !important;
    color:var(--ai-night-text) !important;
    box-shadow:0 12px 32px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.07) !important;
}

html[data-ai-theme="dark"] .ai-header-search input,
html[data-ai-theme="dark"] .ai-header-search input::placeholder{
    color:var(--ai-night-muted) !important;
}

html[data-ai-theme="dark"] .ai-site-footer,
html[data-ai-theme="dark"] footer,
html[data-ai-theme="dark"] .site-footer{
    background:linear-gradient(180deg,#050b16 0%,#020617 100%) !important;
    border-color:rgba(255,255,255,.08) !important;
    color:var(--ai-night-muted) !important;
}

html[data-ai-theme="dark"] .ai-site-footer a,
html[data-ai-theme="dark"] footer a{
    color:#dbeafe !important;
}

/* =========================================================
   Forms / inputs / dropdowns / tables
   ========================================================= */
html[data-ai-theme="dark"] :where(input,select,textarea,.select2-selection,[contenteditable="true"]){
    background:rgba(15,27,46,.92) !important;
    border-color:rgba(255,255,255,.13) !important;
    color:var(--ai-night-ink) !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05) !important;
}

html[data-ai-theme="dark"] :where(input,textarea)::placeholder{
    color:rgba(148,163,184,.78) !important;
}

html[data-ai-theme="dark"] :where(input,select,textarea,button,a):focus-visible{
    outline:3px solid rgba(96,165,250,.34) !important;
    outline-offset:2px !important;
}

html[data-ai-theme="dark"] :where(table,thead,tbody,tr,th,td){
    border-color:var(--ai-night-line-soft) !important;
}

html[data-ai-theme="dark"] :where(table,.comparison-table,.quick-comparison-table,.ai-table){
    background:rgba(11,20,38,.74) !important;
    color:var(--ai-night-text) !important;
}

html[data-ai-theme="dark"] :where(th,thead td){
    background:rgba(96,165,250,.10) !important;
    color:var(--ai-night-ink) !important;
}

html[data-ai-theme="dark"] :where(td){
    color:var(--ai-night-text) !important;
}

/* =========================================================
   Buttons / CTA states
   ========================================================= */
html[data-ai-theme="dark"] :where(.ai-btn,.button,.wp-block-button__link,.ai-account-btn,.ai-primary-btn,.ai-static-btn-primary,.submit-tool-btn,.favorite-button,.ai-cta-primary){
    background:linear-gradient(135deg,#2563eb,#4f46e5) !important;
    border-color:rgba(147,197,253,.28) !important;
    color:#ffffff !important;
    box-shadow:0 16px 38px rgba(37,99,235,.26) !important;
}

html[data-ai-theme="dark"] :where(.ai-btn:hover,.button:hover,.wp-block-button__link:hover,.ai-account-btn:hover,.ai-primary-btn:hover,.ai-static-btn-primary:hover,.submit-tool-btn:hover,.favorite-button:hover,.ai-cta-primary:hover){
    background:linear-gradient(135deg,#3b82f6,#6366f1) !important;
    color:#ffffff !important;
    transform:translateY(-1px);
}

html[data-ai-theme="dark"] :where(.ai-secondary,.ai-secondary-btn,.ai-static-btn-secondary,.ai-btn-secondary,.ai-ghost-btn,.secondary,.outline,.is-style-outline .wp-block-button__link){
    background:rgba(15,27,46,.78) !important;
    border:1px solid rgba(255,255,255,.13) !important;
    color:#dbeafe !important;
    box-shadow:0 12px 30px rgba(0,0,0,.18) !important;
}

html[data-ai-theme="dark"] :where(.ai-secondary:hover,.ai-secondary-btn:hover,.ai-static-btn-secondary:hover,.ai-btn-secondary:hover,.ai-ghost-btn:hover,.secondary:hover,.outline:hover){
    background:rgba(96,165,250,.14) !important;
    border-color:rgba(147,197,253,.24) !important;
    color:#ffffff !important;
}

html[data-ai-theme="dark"] :where(.danger,.delete,.remove,.report,.ai-danger,.ai-delete-btn,.ai-report-btn){
    color:#fecdd3 !important;
    border-color:rgba(251,113,133,.28) !important;
    background:rgba(251,113,133,.10) !important;
}

html[data-ai-theme="dark"] :where(.success,.verified,.ai-success,.pros,.pro,.positive){
    color:#bbf7d0 !important;
    border-color:rgba(52,211,153,.25) !important;
    background:rgba(52,211,153,.10) !important;
}

html[data-ai-theme="dark"] :where(.warning,.notice,.highlight,.rank,.featured){
    color:#fde68a !important;
    border-color:rgba(251,191,36,.25) !important;
    background:rgba(251,191,36,.10) !important;
}

/* =========================================================
   Home / explorer / taxonomy archive
   ========================================================= */
html[data-ai-theme="dark"] :where(.home-hero,.home-hero-section,.ai-home-hero,.ai-smart-hero,.taxonomy-hero,.archive-hero,.ai-tools-hero){
    background:
        radial-gradient(circle at 16% 12%,rgba(96,165,250,.25),transparent 28%),
        radial-gradient(circle at 82% 20%,rgba(167,139,250,.22),transparent 28%),
        linear-gradient(135deg,rgba(15,27,46,.90),rgba(5,11,22,.92)) !important;
    border-color:rgba(147,197,253,.16) !important;
    box-shadow:var(--ai-night-shadow) !important;
}

html[data-ai-theme="dark"] :where(.category-strip,.home-category-strip,.ai-category-strip,.ai-filter-shell,.filters-panel,.tool-filters,.taxonomy-filters){
    background:rgba(11,20,38,.78) !important;
    border-color:var(--ai-night-line) !important;
    color:var(--ai-night-text) !important;
}

html[data-ai-theme="dark"] :where(.category-pill,.filter-pill,.ai-filter-chip,.ai-filter-btn,.tax-filter-btn){
    background:rgba(15,27,46,.88) !important;
    color:#dbeafe !important;
    border-color:rgba(255,255,255,.12) !important;
}

html[data-ai-theme="dark"] :where(.category-pill.is-active,.filter-pill.is-active,.ai-filter-chip.is-active,.ai-filter-btn.is-active,.tax-filter-btn.is-active){
    background:linear-gradient(135deg,rgba(37,99,235,.28),rgba(79,70,229,.25)) !important;
    color:#ffffff !important;
    border-color:rgba(147,197,253,.34) !important;
}

html[data-ai-theme="dark"] :where(.pagination,.page-numbers,.ai-pagination){
    color:#dbeafe !important;
}

html[data-ai-theme="dark"] :where(.page-numbers.current,.ai-pagination .current){
    background:#2563eb !important;
    color:#fff !important;
    border-color:#60a5fa !important;
}

/* =========================================================
   Tool cards / single tool pages
   ========================================================= */
html[data-ai-theme="dark"] :where(.tool-card,.ai-tool-card,.tool-mini-card,.ai-mini-tool){
    background:
        radial-gradient(circle at 12% 8%,rgba(96,165,250,.10),transparent 34%),
        linear-gradient(180deg,rgba(15,27,46,.94),rgba(11,20,38,.94)) !important;
    border-color:rgba(255,255,255,.10) !important;
}

html[data-ai-theme="dark"] :where(.tool-card:hover,.ai-tool-card:hover,.tool-mini-card:hover){
    border-color:rgba(96,165,250,.32) !important;
    box-shadow:0 22px 58px rgba(0,0,0,.34),0 0 0 1px rgba(96,165,250,.08) !important;
}

html[data-ai-theme="dark"] :where(.tool-card h3,.tool-card-title,.tool-name,.ai-tool-title){
    color:var(--ai-night-ink) !important;
}

html[data-ai-theme="dark"] :where(.tool-card p,.tool-card-desc,.tool-description,.ai-tool-desc){
    color:var(--ai-night-muted) !important;
}

html[data-ai-theme="dark"] :where(.modern-tool-hero,.single-tool-hero,.tool-hero,.tool-snapshot,.tool-section,.tool-panel,.tool-details-card,.tool-pricing-card,.tool-faq-card,.tool-review-card,.tool-discussion-card,.related-tools-section,.similar-tools-section,.compare-alternatives-section){
    background:
        radial-gradient(circle at 12% 0%,rgba(96,165,250,.16),transparent 32%),
        linear-gradient(180deg,rgba(15,27,46,.92),rgba(11,20,38,.92)) !important;
    border-color:var(--ai-night-line) !important;
    color:var(--ai-night-text) !important;
    box-shadow:var(--ai-night-shadow-soft) !important;
}

html[data-ai-theme="dark"] :where(.modern-tool-hero.dark,.single-tool-hero.dark){
    background:
        radial-gradient(circle at 78% 16%,rgba(34,211,238,.18),transparent 30%),
        radial-gradient(circle at 18% 20%,rgba(129,140,248,.22),transparent 34%),
        linear-gradient(135deg,#020617,#071426 56%,#0b1426) !important;
}

html[data-ai-theme="dark"] :where(.tool-snapshot-item,.tool-detail-row,.tool-meta-row,.pricing-row,.feature-row,.use-case-row,.pros-cons-card,.integration-card,.language-card,.tech-card){
    background:rgba(15,27,46,.70) !important;
    border-color:var(--ai-night-line-soft) !important;
    color:var(--ai-night-text) !important;
}

html[data-ai-theme="dark"] :where(.favorite-heart,.ai-favorite-article-btn,.ai-favorite-comparison-btn){
    background:rgba(15,27,46,.90) !important;
    border-color:rgba(255,255,255,.13) !important;
    color:#dbeafe !important;
}

html[data-ai-theme="dark"] :where(.favorite-heart.active,.ai-favorite-article-btn.active,.ai-favorite-comparison-btn.active){
    background:rgba(251,191,36,.14) !important;
    border-color:rgba(251,191,36,.32) !important;
    color:#fde68a !important;
}

/* =========================================================
   Blog / articles / related posts
   ========================================================= */
html[data-ai-theme="dark"] :where(.ai-blog-wrap,.blog-wrap,.blog-archive,.blog-page,.article-page,.single-post,.ai-article,.ai-blog-single){
    color:var(--ai-night-text) !important;
}

html[data-ai-theme="dark"] :where(.blog-hero,.ai-blog-hero,.article-hero,.ai-article-hero,.single-article-hero){
    background:
        radial-gradient(circle at 14% 8%,rgba(96,165,250,.22),transparent 30%),
        radial-gradient(circle at 84% 18%,rgba(167,139,250,.18),transparent 30%),
        linear-gradient(135deg,rgba(15,27,46,.94),rgba(5,11,22,.94)) !important;
    border-color:rgba(147,197,253,.15) !important;
    color:var(--ai-night-text) !important;
    box-shadow:var(--ai-night-shadow) !important;
}

html[data-ai-theme="dark"] :where(.blog-card,.article-card,.related-article-card,.ai-related-article,.blog-sidebar,.blog-widget,.article-content,.article-body,.post-content,.entry-content .wp-block-group){
    background:linear-gradient(180deg,rgba(15,27,46,.92),rgba(11,20,38,.92)) !important;
    border-color:var(--ai-night-line) !important;
    color:var(--ai-night-text) !important;
}

html[data-ai-theme="dark"] :where(.article-content,.article-body,.post-content,.entry-content){
    color:var(--ai-night-text) !important;
}

html[data-ai-theme="dark"] :where(.article-content p,.article-body p,.post-content p,.entry-content p,.article-content li,.article-body li,.post-content li,.entry-content li){
    color:var(--ai-night-text) !important;
}

html[data-ai-theme="dark"] :where(blockquote,.wp-block-quote,.article-callout,.blog-callout,.ai-callout){
    background:rgba(96,165,250,.10) !important;
    border-color:rgba(96,165,250,.26) !important;
    color:#dbeafe !important;
}

html[data-ai-theme="dark"] :where(code,pre,.wp-block-code){
    background:#020617 !important;
    border-color:rgba(255,255,255,.12) !important;
    color:#bfdbfe !important;
}

html[data-ai-theme="dark"] :where(.ai-tabs,.article-tabs,.discussion-tabs,.tabs-nav){
    background:rgba(2,6,23,.44) !important;
    border-color:var(--ai-night-line-soft) !important;
}

html[data-ai-theme="dark"] :where(.ai-tab,.article-tab,.tabs-nav button){
    color:var(--ai-night-muted) !important;
    background:transparent !important;
}

html[data-ai-theme="dark"] :where(.ai-tab.is-active,.article-tab.is-active,.tabs-nav button.active){
    color:#ffffff !important;
    background:rgba(96,165,250,.16) !important;
    border-color:rgba(147,197,253,.26) !important;
}

/* =========================================================
   Compare pages
   ========================================================= */
html[data-ai-theme="dark"] :where(.compare-page,.ai-compare-page,.comparison-page){
    color:var(--ai-night-text) !important;
}

html[data-ai-theme="dark"] :where(.compare-hero,.ai-compare-hero,.comparison-hero){
    background:
        radial-gradient(circle at 18% 16%,rgba(96,165,250,.22),transparent 32%),
        radial-gradient(circle at 78% 12%,rgba(129,140,248,.23),transparent 30%),
        linear-gradient(135deg,#020617,#071426 56%,#0b1426) !important;
    border-color:rgba(147,197,253,.15) !important;
    color:var(--ai-night-text) !important;
    box-shadow:var(--ai-night-shadow) !important;
}

html[data-ai-theme="dark"] :where(.compare-section,.compare-panel,.compare-table-wrap,.compare-summary,.compare-verdict,.compare-methodology,.compare-faq,.compare-related,.compare-choose-card,.compare-highlight-card,.compare-tool-card){
    background:linear-gradient(180deg,rgba(15,27,46,.92),rgba(11,20,38,.92)) !important;
    border-color:var(--ai-night-line) !important;
    color:var(--ai-night-text) !important;
    box-shadow:var(--ai-night-shadow-soft) !important;
}

html[data-ai-theme="dark"] :where(.compare-table th,.compare-table td,.ai-compare-table th,.ai-compare-table td){
    background:rgba(11,20,38,.78) !important;
    border-color:var(--ai-night-line-soft) !important;
    color:var(--ai-night-text) !important;
}

html[data-ai-theme="dark"] :where(.compare-table th,.ai-compare-table th){
    background:rgba(96,165,250,.12) !important;
    color:var(--ai-night-ink) !important;
}

html[data-ai-theme="dark"] :where(.compare-floating-bar,.compare-tray,.ai-compare-tray){
    background:rgba(2,6,23,.88) !important;
    border-color:rgba(255,255,255,.12) !important;
    color:var(--ai-night-text) !important;
    box-shadow:0 22px 58px rgba(0,0,0,.42) !important;
    backdrop-filter:blur(18px) !important;
}

/* =========================================================
   Account / auth / submit tool / favorites
   ========================================================= */
html[data-ai-theme="dark"] :where(.ai-dashboard-premium,.ai-submit-premium,.ai-auth-premium,.ai-account-wrap,.ai-dashboard-pro){
    --ai-soft:rgba(15,27,46,.90);
    --ai-primary-soft:rgba(96,165,250,.15);
    --ai-account-line:var(--ai-night-line);
    color:var(--ai-night-text) !important;
}

html[data-ai-theme="dark"] :where(.ai-dashboard-premium .ai-account-hero-pro,.ai-dashboard-hero,.ai-submit-hero,.ai-auth-card,.ai-auth-panel){
    background:
        radial-gradient(circle at 18% 12%,rgba(96,165,250,.22),transparent 30%),
        radial-gradient(circle at 82% 18%,rgba(167,139,250,.18),transparent 30%),
        linear-gradient(135deg,rgba(15,27,46,.94),rgba(5,11,22,.94)) !important;
    border-color:rgba(147,197,253,.17) !important;
    box-shadow:var(--ai-night-shadow) !important;
}

html[data-ai-theme="dark"] :where(.ai-dashboard-premium .ai-profile-card-pro,.ai-dashboard-premium .ai-account-sidebar,.ai-dashboard-premium .ai-account-panel,.ai-preference-group,.ai-account-overview-card,.ai-stats-grid > div,.ai-quick-links a,.ai-comparison-list a,.ai-consent-check,.ai-consent-box-merged .ai-consent-check,.ai-avatar-upload-label input[type="file"]){
    background:linear-gradient(180deg,rgba(15,27,46,.92),rgba(11,20,38,.92)) !important;
    border-color:var(--ai-night-line) !important;
    color:var(--ai-night-text) !important;
    box-shadow:var(--ai-night-shadow-soft) !important;
}

html[data-ai-theme="dark"] :where(.ai-consent-title,.ai-consent-text,.ai-avatar-upload-label,.ai-login-modal h2,.ai-login-required-box h2,.ai-login-required-box strong){
    color:var(--ai-night-ink) !important;
}

html[data-ai-theme="dark"] :where(.ai-consent-note,.ai-consent-note-outside,.ai-login-modal-message,.ai-login-modal-note,.ai-avatar-help){
    color:var(--ai-night-muted) !important;
}

html[data-ai-theme="dark"] .ai-login-modal-backdrop{
    background:rgba(2,6,23,.76) !important;
    backdrop-filter:blur(14px) !important;
}

html[data-ai-theme="dark"] .ai-login-modal-close{
    background:rgba(15,27,46,.92) !important;
    color:var(--ai-night-ink) !important;
    border:1px solid var(--ai-night-line) !important;
}

html[data-ai-theme="dark"] :where(.favorites-guest-note,.ai-account-notice-info){
    background:rgba(96,165,250,.11) !important;
    border-color:rgba(96,165,250,.24) !important;
    color:#bfdbfe !important;
}

html[data-ai-theme="dark"] :where(.ai-account-notice-success){
    background:rgba(52,211,153,.10) !important;
    border-color:rgba(52,211,153,.24) !important;
    color:#bbf7d0 !important;
}

html[data-ai-theme="dark"] :where(.ai-account-notice-error,.ai-inline-error){
    background:rgba(251,113,133,.10) !important;
    border-color:rgba(251,113,133,.24) !important;
    color:#fecdd3 !important;
}

/* =========================================================
   Static pages: About / Privacy / Terms
   ========================================================= */
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-static-page{
    --static-ink:var(--ai-night-ink);
    --static-text:var(--ai-night-text);
    --static-muted:var(--ai-night-muted);
    --static-line:var(--ai-night-line);
    --static-soft:rgba(15,27,46,.90);
    color:var(--ai-night-text) !important;
}

html[data-ai-theme="dark"] .ai-static-hero,
html[data-ai-theme="dark"] .ai-static-band,
html[data-ai-theme="dark"] .ai-static-cta{
    background:
        radial-gradient(circle at 14% 10%,rgba(96,165,250,.24),transparent 30%),
        radial-gradient(circle at 82% 16%,rgba(167,139,250,.18),transparent 30%),
        linear-gradient(135deg,rgba(15,27,46,.94),rgba(5,11,22,.94)) !important;
    border-color:rgba(147,197,253,.17) !important;
    box-shadow:var(--ai-night-shadow) !important;
}

html[data-ai-theme="dark"] .ai-static-visual,
html[data-ai-theme="dark"] .ai-static-signal,
html[data-ai-theme="dark"] .ai-static-meta-pill,
html[data-ai-theme="dark"] .ai-static-aside-links a,
html[data-ai-theme="dark"] .ai-static-note{
    background:rgba(15,27,46,.82) !important;
    border-color:var(--ai-night-line) !important;
    color:var(--ai-night-text) !important;
}

/* =========================================================
   Discussions / comments / FAQ / accordions
   ========================================================= */
html[data-ai-theme="dark"] :where(.comments-area,.comment-respond,.comment-list .comment,.comment-body,.comment-content,.ai-discussion,.ai-discussion-panel,.ai-discussion-thread,.ai-comment,.ai-comment-form,.ai-report-modal,.ai-reply-form,.faq-item,.accordion-item,.ai-faq-item){
    background:linear-gradient(180deg,rgba(15,27,46,.92),rgba(11,20,38,.92)) !important;
    border-color:var(--ai-night-line) !important;
    color:var(--ai-night-text) !important;
    box-shadow:var(--ai-night-shadow-soft) !important;
}

html[data-ai-theme="dark"] :where(.comment-metadata,.comment-meta,.comment-author,.ai-comment-meta,.ai-character-count,.faq-answer,.accordion-content){
    color:var(--ai-night-muted) !important;
}

html[data-ai-theme="dark"] :where(.faq-question,.accordion-title,.ai-faq-question,summary){
    color:var(--ai-night-ink) !important;
    background:rgba(15,27,46,.65) !important;
    border-color:var(--ai-night-line-soft) !important;
}

html[data-ai-theme="dark"] :where(.admin-badge,.ai-admin-badge){
    background:rgba(96,165,250,.14) !important;
    color:#bfdbfe !important;
    border-color:rgba(96,165,250,.28) !important;
}

/* =========================================================
   Search overlays / results / menus
   ========================================================= */
html[data-ai-theme="dark"] :where(.ai-search-results,.search-results-panel,.search-suggestions,.ai-dropdown,.dropdown-menu,.menu-panel,.filter-dropdown,.global-tool-explorer,.ai-tool-explorer){
    background:rgba(2,6,23,.92) !important;
    border-color:rgba(255,255,255,.12) !important;
    color:var(--ai-night-text) !important;
    box-shadow:0 24px 70px rgba(0,0,0,.44) !important;
    backdrop-filter:blur(16px) !important;
}

html[data-ai-theme="dark"] :where(.search-result-item,.ai-search-result,.dropdown-item,.menu-panel a,.global-tool-explorer a){
    background:transparent !important;
    color:var(--ai-night-text) !important;
    border-color:var(--ai-night-line-soft) !important;
}

html[data-ai-theme="dark"] :where(.search-result-item:hover,.ai-search-result:hover,.dropdown-item:hover,.menu-panel a:hover,.global-tool-explorer a:hover){
    background:rgba(96,165,250,.11) !important;
    color:#ffffff !important;
}

/* =========================================================
   Media / images / logos
   ========================================================= */
html[data-ai-theme="dark"] :where(img,video,canvas,svg){
    border-color:var(--ai-night-line-soft);
}

html[data-ai-theme="dark"] :where(.tool-logo,.ai-logo-mark,.blog-card img,.article-card img,.wp-post-image){
    box-shadow:0 14px 36px rgba(0,0,0,.25) !important;
}

html[data-ai-theme="dark"] :where(.placeholder,.image-placeholder,.no-image){
    background:linear-gradient(135deg,rgba(96,165,250,.12),rgba(129,140,248,.10)) !important;
    color:var(--ai-night-muted) !important;
}

/* =========================================================
   Brand colors and social share buttons
   ========================================================= */
html[data-ai-theme="dark"] :where(.share-btn,.social-share a,.ai-share-btn){
    border-color:rgba(255,255,255,.12) !important;
    box-shadow:0 14px 34px rgba(0,0,0,.24) !important;
}

html[data-ai-theme="dark"] :where(.share-linkedin,.linkedin){background:#0a66c2 !important;color:#fff !important;}
html[data-ai-theme="dark"] :where(.share-facebook,.facebook){background:#1877f2 !important;color:#fff !important;}
html[data-ai-theme="dark"] :where(.share-whatsapp,.whatsapp){background:#128c7e !important;color:#fff !important;}
html[data-ai-theme="dark"] :where(.share-x,.twitter,.x-share){background:#020617 !important;color:#fff !important;border-color:rgba(255,255,255,.18) !important;}

/* =========================================================
   Scrollbar / selection
   ========================================================= */
html[data-ai-theme="dark"] ::selection{
    background:rgba(96,165,250,.38);
    color:#fff;
}

html[data-ai-theme="dark"] *{
    scrollbar-color:rgba(96,165,250,.45) rgba(2,6,23,.72);
}

html[data-ai-theme="dark"] *::-webkit-scrollbar{
    width:12px;
    height:12px;
}

html[data-ai-theme="dark"] *::-webkit-scrollbar-track{
    background:rgba(2,6,23,.72);
}

html[data-ai-theme="dark"] *::-webkit-scrollbar-thumb{
    background:linear-gradient(180deg,#2563eb,#4f46e5);
    border:3px solid rgba(2,6,23,.72);
    border-radius:999px;
}

/* =========================================================
   Mobile polish
   ========================================================= */
@media(max-width:782px){
    html[data-ai-theme="dark"] .ai-primary-nav{
        background:rgba(2,6,23,.94) !important;
        border-color:rgba(255,255,255,.11) !important;
        box-shadow:0 24px 70px rgba(0,0,0,.42) !important;
        backdrop-filter:blur(18px) !important;
    }

    html[data-ai-theme="dark"] body.astronovai-premium-theme{
        background-size:auto,auto,auto,118px 118px,180px 180px,auto !important;
    }
}

/* =========================================================
   AstronovAI v18.18 - Space Night Mode Readability Repair
   Stronger selectors + final load dependencies.
   ========================================================= */

html[data-ai-theme="dark"] body.astronovai-premium-theme{
    --ai-night-page:#050b16;
    --ai-night-page-2:#071426;
    --ai-night-card:#0b1426;
    --ai-night-card-2:#101b30;
    --ai-night-card-3:#14223a;
    --ai-night-soft:#17243b;
    --ai-night-text-strong:#f8fafc;
    --ai-night-text-main:#dbe7f6;
    --ai-night-text-soft:#9fb0c7;
    --ai-night-text-faint:#7d8da6;
    --ai-night-border:rgba(255,255,255,.12);
    --ai-night-border-soft:rgba(255,255,255,.08);
}

/* Keep the space layer global, but stop page templates from painting white slabs. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .home-container,
    .ai-tools-directory-page,
    .taxonomy-page,
    .ai-category-premium-page,
    .modern-tool-page,
    .single-blog-page,
    .blog-container,
    .blog-category-page,
    .ai-favorites-page,
    .compare-container,
    .ai-dashboard-premium,
    .ai-submit-premium,
    .ai-auth-premium,
    .ai-static-page
){
    background:transparent !important;
    color:var(--ai-night-text-main) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .site-main,
    .entry-content,
    .ast-container,
    .content-area,
    .ast-article-single,
    .ast-article-post,
    .modern-tool-shell,
    .single-blog-layout,
    .single-blog-main,
    .premium-blog-article
){
    background:transparent !important;
    color:var(--ai-night-text-main) !important;
}

/* Typography: repair invisible dark text left by light-mode CSS. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .home-container,
    .ai-tools-directory-page,
    .taxonomy-page,
    .modern-tool-page,
    .single-blog-page,
    .blog-container,
    .ai-favorites-page,
    .compare-container,
    .ai-dashboard-premium,
    .ai-submit-premium,
    .ai-static-page
) :is(h1,h2,h3,h4,h5,h6,.entry-title,.page-title,strong,b){
    color:var(--ai-night-text-strong) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .home-container,
    .ai-tools-directory-page,
    .taxonomy-page,
    .modern-tool-page,
    .single-blog-page,
    .blog-container,
    .ai-favorites-page,
    .compare-container,
    .ai-dashboard-premium,
    .ai-submit-premium,
    .ai-static-page
) :is(p,li,dd,dt,td,th,label,legend,small,em,.description,.excerpt,.meta,.entry-meta){
    color:var(--ai-night-text-main) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .section-copy p,
    .blog-card-meta,
    .tool-meta,
    .tool-subtitle,
    .modern-tool-tagline,
    .modern-tool-rich-text,
    .modern-tool-affiliate-note,
    .modern-score-label,
    .modern-tool-sidebar-metrics span,
    .single-blog-meta,
    .single-blog-breadcrumbs,
    .blog-breadcrumbs,
    .taxonomy-description,
    .category-description,
    .ai-account-card-copy,
    .ai-avatar-help,
    .favorites-empty p
){
    color:var(--ai-night-text-soft) !important;
}

/* Premium space surfaces. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .home-section,
    .latest-blog-section,
    .featured-comparisons-section,
    .home-stats-strip,
    .ai-category-strip,
    .ai-directory-section,
    .ai-tools-category-directory,
    .ai-tools-all-section,
    .taxonomy-tool-board,
    .taxonomy-intro-card,
    .taxonomy-ranking-card,
    .taxonomy-faq-section,
    .category-seo-section,
    .related-categories,
    .popular-comparisons-section,
    .modern-tool-section,
    .modern-tool-sidebar-card,
    .modern-tool-bottom-hub,
    .modern-tool-bottom-head,
    .users-viewed-section,
    .related-tools-section,
    .compare-suggestions-section,
    .single-blog-hero,
    .single-blog-content,
    .blog-related-section,
    .single-blog-community-hub,
    .single-blog-discussion-wrap,
    .single-blog-discussion-standalone,
    .single-blog-section-tabs,
    .blog-sidebar-cta,
    .blog-toc-card,
    .blog-inline-cta,
    .favorites-section,
    .favorites-stat-card,
    .favorites-login-box,
    .ai-account-panel,
    .ai-profile-card-pro,
    .ai-account-sidebar,
    .ai-account-overview-card,
    .ai-stat-card-pro,
    .ai-submit-card,
    .ai-submit-steps,
    .ai-submit-quality,
    .ai-auth-card,
    .ai-auth-panel,
    .ai-static-card,
    .ai-static-panel,
    .ai-static-doc,
    .ai-static-aside-card,
    .compare-section,
    .compare-table-section,
    .compare-verdict-box,
    .compare-faq,
    .compare-methodology,
    .compare-related
){
    background:
        radial-gradient(circle at 12% 0%,rgba(96,165,250,.10),transparent 32%),
        linear-gradient(180deg,rgba(16,27,48,.94),rgba(8,17,32,.95)) !important;
    border-color:var(--ai-night-border) !important;
    color:var(--ai-night-text-main) !important;
    box-shadow:0 22px 60px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.045) !important;
}

/* Deep hero blocks: space, not gray/white. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .ai-hero-shell,
    .home-hero,
    .ai-tools-directory-hero,
    .premium-category-hero,
    .category-hero,
    .taxonomy-hero,
    .modern-tool-hero,
    .blog-archive-hero,
    .blog-category-hero,
    .compare-hero,
    .compare-hero-premium,
    .favorites-hero,
    .ai-dashboard-hero,
    .ai-account-hero-pro,
    .ai-submit-hero,
    .ai-static-hero,
    .ai-static-band,
    .ai-static-cta
){
    background:
        radial-gradient(circle at 18% 16%,rgba(96,165,250,.24),transparent 31%),
        radial-gradient(circle at 80% 20%,rgba(129,140,248,.25),transparent 34%),
        radial-gradient(circle at 62% 86%,rgba(34,211,238,.10),transparent 38%),
        linear-gradient(135deg,#020617 0%,#071426 54%,#0f1b35 100%) !important;
    border-color:rgba(147,197,253,.18) !important;
    color:var(--ai-night-text-strong) !important;
    box-shadow:0 28px 76px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.06) !important;
}

/* All tool cards: boost specificity over body .tool-card final CSS. */
html[data-ai-theme="dark"] body.astronovai-premium-theme .tool-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-tool-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .tool-card-premium,
html[data-ai-theme="dark"] body.astronovai-premium-theme .home-tool-mini-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .taxonomy-mini-tool-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-info-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-feature-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-review-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-review-empty-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .blog-feature-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .blog-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .blog-article-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .blog-tool-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .blog-card-dark,
html[data-ai-theme="dark"] body.astronovai-premium-theme .featured-comparison-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .compare-suggestion-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .related-compare-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .favorites-comparison-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .favorites-article-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-tools-category-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-category-item,
html[data-ai-theme="dark"] body.astronovai-premium-theme .related-category-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .comparison-link-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .category-flow-step,
html[data-ai-theme="dark"] body.astronovai-premium-theme .category-hero-pick,
html[data-ai-theme="dark"] body.astronovai-premium-theme .taxonomy-decision-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-account-tool-card,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-account-comparison-card-pro,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-account-review-card-pro,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-account-submission-card-pro{
    background:
        radial-gradient(circle at 14% 8%,rgba(96,165,250,.11),transparent 36%),
        linear-gradient(180deg,rgba(17,31,54,.96),rgba(9,18,34,.96)) !important;
    background-color:var(--ai-night-card) !important;
    background-image:
        radial-gradient(circle at 14% 8%,rgba(96,165,250,.11),transparent 36%),
        linear-gradient(180deg,rgba(17,31,54,.96),rgba(9,18,34,.96)) !important;
    border-color:rgba(255,255,255,.13) !important;
    color:var(--ai-night-text-main) !important;
    box-shadow:0 18px 46px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.045) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .tool-card:hover,
html[data-ai-theme="dark"] body.astronovai-premium-theme .home-tool-mini-card:hover,
html[data-ai-theme="dark"] body.astronovai-premium-theme .blog-feature-card:hover,
html[data-ai-theme="dark"] body.astronovai-premium-theme .featured-comparison-card:hover{
    border-color:rgba(96,165,250,.36) !important;
    box-shadow:0 24px 64px rgba(0,0,0,.38),0 0 0 1px rgba(96,165,250,.10) !important;
}

/* Card internals. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .tool-card .tool-title,
    .tool-card .tool-title a,
    .home-tool-mini-card .home-mini-title,
    .home-tool-mini-card h3,
    .blog-feature-card h3,
    .featured-comparison-title,
    .favorites-comparison-card strong,
    .favorites-article-card strong,
    .ai-tools-category-card strong,
    .ai-category-item strong,
    .modern-tool-card strong,
    .modern-tool-card h3,
    .modern-tool-feature-card strong,
    .modern-tool-info-card strong
){
    color:var(--ai-night-text-strong) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .tool-card p,
    .tool-card .tool-pricing,
    .tool-card .tool-rating,
    .tool-card .tool-reviews-count,
    .home-mini-category,
    .home-mini-meta,
    .home-mini-rating,
    .blog-feature-card p,
    .featured-comparison-card em,
    .compare-suggestion-meta,
    .favorites-comparison-card span,
    .favorites-article-card span,
    .ai-tools-category-card span,
    .ai-category-item span,
    .modern-tool-card p,
    .modern-tool-info-card p,
    .modern-tool-feature-card p
){
    color:var(--ai-night-text-soft) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .tool-logo-wrap,
    .tool-card .tool-logo-wrap,
    .home-mini-logo,
    .modern-tool-logo,
    .blog-tool-logo-wrap,
    .featured-comparison-logo-wrap,
    .ai-category-icon,
    .ai-category-glyph,
    .category-flow-icon,
    .favorites-empty-icon,
    .section-heading-visual
){
    background:rgba(255,255,255,.07) !important;
    background-color:rgba(255,255,255,.07) !important;
    border-color:rgba(255,255,255,.14) !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 12px 28px rgba(0,0,0,.18) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .tool-card .official-btn,
html[data-ai-theme="dark"] body.astronovai-premium-theme .tool-card .compare-btn,
html[data-ai-theme="dark"] body.astronovai-premium-theme .official-btn,
html[data-ai-theme="dark"] body.astronovai-premium-theme .compare-btn,
html[data-ai-theme="dark"] body.astronovai-premium-theme .home-mini-official,
html[data-ai-theme="dark"] body.astronovai-premium-theme .home-mini-compare{
    background:rgba(15,27,46,.92) !important;
    background-color:rgba(15,27,46,.92) !important;
    border-color:rgba(255,255,255,.14) !important;
    color:#dbeafe !important;
    box-shadow:none !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .tool-card .visit-btn,
html[data-ai-theme="dark"] body.astronovai-premium-theme .visit-btn,
html[data-ai-theme="dark"] body.astronovai-premium-theme .home-mini-visit{
    background:linear-gradient(135deg,#2563eb,#4f46e5) !important;
    color:#fff !important;
    border-color:rgba(147,197,253,.24) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .favorite-heart,
html[data-ai-theme="dark"] body.astronovai-premium-theme .home-mini-favorite,
html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-favorite-btn{
    background:rgba(15,27,46,.96) !important;
    background-color:rgba(15,27,46,.96) !important;
    border-color:rgba(255,255,255,.14) !important;
    color:#e0f2fe !important;
    box-shadow:0 12px 30px rgba(0,0,0,.26) !important;
}

/* Badges / pills that were pastel in light mode. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .auto-badge,
    .ai-recommendation-badge,
    .home-mini-status,
    .home-mini-growth,
    .blog-card-badge,
    .blog-card-badge,
    .featured-comparison-badge,
    .favorites-kicker,
    .favorites-card-label,
    .panel-kicker,
    .modern-tool-info-eyebrow,
    .modern-tool-section-head span,
    .taxonomy-nav-label,
    .ai-eyebrow,
    .ai-static-kicker
){
    background:rgba(96,165,250,.14) !important;
    background-color:rgba(96,165,250,.14) !important;
    border-color:rgba(96,165,250,.24) !important;
    color:#bfdbfe !important;
}

/* Blog archive and single article readability. */
html[data-ai-theme="dark"] body.astronovai-premium-theme .blog-card-thumb,
html[data-ai-theme="dark"] body.astronovai-premium-theme .blog-article-thumb,
html[data-ai-theme="dark"] body.astronovai-premium-theme .single-blog-thumb,
html[data-ai-theme="dark"] body.astronovai-premium-theme .single-blog-image,
html[data-ai-theme="dark"] body.astronovai-premium-theme .blog-visual-card{
    background:rgba(15,27,46,.92) !important;
    border-color:rgba(255,255,255,.13) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .single-blog-content :is(p,li,blockquote,figcaption),
html[data-ai-theme="dark"] body.astronovai-premium-theme .premium-blog-article :is(p,li,blockquote,figcaption),
html[data-ai-theme="dark"] body.astronovai-premium-theme .single-blog-main :is(p,li,blockquote,figcaption){
    color:#d8e3f2 !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .single-blog-content :is(h2,h3,h4),
html[data-ai-theme="dark"] body.astronovai-premium-theme .premium-blog-article :is(h2,h3,h4){
    color:#f8fafc !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(.blog-table-wrap,.blog-comparison-table,.quick-comparison-table,.single-blog-content table){
    background:rgba(13,24,43,.96) !important;
    color:#dbe7f6 !important;
    border-color:rgba(255,255,255,.14) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(.blog-table-wrap th,.blog-comparison-table th,.quick-comparison-table th,.single-blog-content th){
    background:rgba(96,165,250,.16) !important;
    color:#f8fafc !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(.blog-table-wrap td,.blog-comparison-table td,.quick-comparison-table td,.single-blog-content td){
    background:rgba(17,31,54,.82) !important;
    color:#dbe7f6 !important;
    border-color:rgba(255,255,255,.10) !important;
}

/* Account / submit form detail repair. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .ai-submit-field,
    .ai-submit-field input,
    .ai-submit-field select,
    .ai-submit-field textarea,
    .ai-account-form input,
    .ai-account-form select,
    .ai-account-form textarea,
    .modern-review-form-field input,
    .modern-review-form-field textarea,
    .modern-discussion-field textarea
){
    background:#0f1b2e !important;
    background-color:#0f1b2e !important;
    border-color:rgba(255,255,255,.15) !important;
    color:#f8fafc !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .ai-submit-field input::placeholder,
    .ai-submit-field textarea::placeholder,
    .ai-account-form input::placeholder,
    .ai-account-form textarea::placeholder,
    .modern-review-form-field input::placeholder,
    .modern-review-form-field textarea::placeholder,
    .modern-discussion-field textarea::placeholder
){
    color:rgba(159,176,199,.72) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .ai-submit-step,
    .ai-consent-check,
    .ai-preference-group,
    .ai-quick-links a,
    .ai-dashboard-list li,
    .ai-stats-grid > div,
    .ai-stats-grid-pro > div,
    .ai-community-metrics > div,
    .ai-profile-info-grid > div,
    .ai-account-overview-grid > div,
    .favorites-overview > div
){
    background:rgba(15,27,46,.82) !important;
    border-color:rgba(255,255,255,.12) !important;
    color:#dbe7f6 !important;
}

/* Filter drawer + smart search popups. */
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-filter-drawer__panel,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-global-explorer-panel,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-global-explorer,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-search-results,
html[data-ai-theme="dark"] body.astronovai-premium-theme .search-suggestions,
html[data-ai-theme="dark"] body.astronovai-premium-theme .search-results-panel{
    background:linear-gradient(180deg,rgba(11,20,38,.98),rgba(5,11,22,.98)) !important;
    background-color:#0b1426 !important;
    border-color:rgba(255,255,255,.14) !important;
    color:#dbe7f6 !important;
    box-shadow:0 30px 90px rgba(0,0,0,.54), inset 0 1px 0 rgba(255,255,255,.06) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-filter-drawer__body,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-filter-section,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-global-filter-group,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-global-explorer-results,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-global-results-list,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ac-section{
    background:rgba(15,27,46,.72) !important;
    border-color:rgba(255,255,255,.12) !important;
    color:#dbe7f6 !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-filter-chip,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-filter-active,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-global-chip-grid button,
html[data-ai-theme="dark"] body.astronovai-premium-theme .filter-item,
html[data-ai-theme="dark"] body.astronovai-premium-theme .filter-pill,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ac-item,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-search-result,
html[data-ai-theme="dark"] body.astronovai-premium-theme .search-result-item{
    background:rgba(16,27,48,.95) !important;
    background-color:rgba(16,27,48,.95) !important;
    border-color:rgba(255,255,255,.13) !important;
    color:#e5efff !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-filter-chip.is-active,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-filter-chip[aria-pressed="true"],
html[data-ai-theme="dark"] body.astronovai-premium-theme .filter-item.active,
html[data-ai-theme="dark"] body.astronovai-premium-theme .filter-pill.is-active{
    background:linear-gradient(135deg,rgba(37,99,235,.36),rgba(79,70,229,.36)) !important;
    border-color:rgba(147,197,253,.38) !important;
    color:#fff !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-filter-drawer__actions{
    background:rgba(2,6,23,.95) !important;
    border-color:rgba(255,255,255,.12) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-filter-reset{
    background:#f8fafc !important;
    color:#071426 !important;
    border-color:#f8fafc !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-filter-submit{
    background:linear-gradient(135deg,#2563eb,#4f46e5) !important;
    color:#fff !important;
    border-color:rgba(147,197,253,.30) !important;
}

/* FAQ / tabs / accordions. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .faq-item,
    .faq-question,
    .faq-answer,
    .single-blog-community-tabs,
    .single-blog-tab-panel,
    .modern-tool-bottom-tabs,
    .modern-tool-tab-panel,
    .modern-tool-panel-intro,
    .compare-faq-accordion,
    .compare-decision-panel
){
    background:rgba(15,27,46,.88) !important;
    border-color:rgba(255,255,255,.12) !important;
    color:#dbe7f6 !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .is-active,
    .active,
    .current,
    .modern-tool-bottom-tabs .is-active,
    .single-blog-community-tabs .is-active,
    .single-blog-section-tabs .is-active
):not(.tool-card):not(.favorite-heart){
    border-color:rgba(96,165,250,.34) !important;
}

/* Avoid washed-out white gradients on page panels. */
html[data-ai-theme="dark"] body.astronovai-premium-theme [class*="card"][style*="background"],
html[data-ai-theme="dark"] body.astronovai-premium-theme [class*="panel"][style*="background"],
html[data-ai-theme="dark"] body.astronovai-premium-theme [class*="section"][style*="background"]{
    color:var(--ai-night-text-main) !important;
}

/* Preserve brand/social colors where needed. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(.modern-share-btn,.ai-share-btn,.share-btn){
    color:#fff !important;
}

@media(max-width:782px){
    html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
        .home-section,
        .featured-comparisons-section,
        .ai-directory-section,
        .modern-tool-section,
        .single-blog-content,
        .favorites-section,
        .ai-submit-card
    ){
        border-radius:22px !important;
    }
}

/* =========================================================
   AstronovAI v18.19 - Space Night Mode Final Polish
   White-surface contrast hardening + cinematic nightfall transition.
   ========================================================= */

html[data-ai-theme="dark"] body.astronovai-premium-theme{
    --ai-night-card-solid:#0b1426;
    --ai-night-card-elevated:#101b30;
    --ai-night-card-deep:#071426;
    --ai-night-readable:#e6edf8;
    --ai-night-readable-soft:#a9b8cf;
    --ai-night-readable-faint:#8190a7;
    --ai-night-border-clear:rgba(191,219,254,.18);
    --ai-night-glow-blue:0 24px 70px rgba(0,0,0,.36),0 0 0 1px rgba(96,165,250,.08),inset 0 1px 0 rgba(255,255,255,.055);
}

/* Smooth color morph after the initial page load. */
@media (prefers-reduced-motion:no-preference){
    html.ai-theme-ready body.astronovai-premium-theme,
    html.ai-theme-ready body.astronovai-premium-theme :is(
        .ai-site-header,
        .ai-header-search,
        .home-section,
        .tool-card,
        .home-tool-mini-card,
        .blog-card,
        .blog-article-card,
        .modern-tool-section,
        .modern-tool-card,
        .modern-tool-feature-card,
        .modern-tool-info-card,
        .modern-tool-hero,
        .taxonomy-surface-block,
        .taxonomy-tool-board,
        .compare-section,
        .compare-table-section,
        .single-blog-hero,
        .single-blog-content,
        .favorites-section,
        .ai-account-panel,
        .ai-profile-card-pro,
        .ai-submit-card,
        .ai-filter-drawer__panel,
        .ai-global-explorer-panel,
        input,
        select,
        textarea,
        button,
        a
    ){
        transition:
            background-color .72s cubic-bezier(.22,1,.36,1),
            background .72s cubic-bezier(.22,1,.36,1),
            color .58s cubic-bezier(.22,1,.36,1),
            border-color .72s cubic-bezier(.22,1,.36,1),
            box-shadow .72s cubic-bezier(.22,1,.36,1),
            filter .72s cubic-bezier(.22,1,.36,1),
            opacity .42s ease,
            transform .42s ease;
    }

    body.astronovai-premium-theme .ai-theme-skyfall{
        position:fixed;
        inset:-8vh -8vw;
        z-index:2147483647;
        pointer-events:none;
        opacity:0;
        transform:translateY(-18%);
        will-change:opacity,transform,clip-path;
    }

    body.astronovai-premium-theme .ai-theme-skyfall--night{
        background:
            radial-gradient(circle at 16% 8%,rgba(96,165,250,.40),transparent 22%),
            radial-gradient(circle at 76% 14%,rgba(129,140,248,.38),transparent 27%),
            radial-gradient(circle at 52% 110%,rgba(34,211,238,.18),transparent 38%),
            radial-gradient(circle at 20px 22px,rgba(255,255,255,.58) 0 1px,transparent 1.4px),
            radial-gradient(circle at 92px 82px,rgba(147,197,253,.40) 0 1px,transparent 1.4px),
            linear-gradient(180deg,rgba(2,6,23,.98),rgba(5,11,22,.94) 58%,rgba(7,20,38,.80));
        background-size:auto,auto,auto,135px 135px,220px 220px,auto;
        animation:ai-night-descends 1.08s cubic-bezier(.22,1,.36,1) both;
    }

    body.astronovai-premium-theme .ai-theme-skyfall--day{
        background:
            radial-gradient(circle at 18% 0%,rgba(255,255,255,.95),transparent 28%),
            radial-gradient(circle at 80% 10%,rgba(219,234,254,.82),transparent 28%),
            linear-gradient(180deg,rgba(248,250,252,.98),rgba(239,246,255,.88));
        animation:ai-dawn-rises .92s cubic-bezier(.22,1,.36,1) both;
    }

    @keyframes ai-night-descends{
        0%{opacity:0;transform:translateY(-20%);clip-path:inset(0 0 100% 0);filter:saturate(1.05)}
        44%{opacity:.96;transform:translateY(0);clip-path:inset(0 0 0 0);filter:saturate(1.18)}
        100%{opacity:0;transform:translateY(5%);clip-path:inset(0 0 0 0);filter:saturate(1)}
    }

    @keyframes ai-dawn-rises{
        0%{opacity:0;transform:translateY(8%);clip-path:inset(100% 0 0 0)}
        42%{opacity:.86;transform:translateY(0);clip-path:inset(0 0 0 0)}
        100%{opacity:0;transform:translateY(-4%);clip-path:inset(0 0 0 0)}
    }
}

@media (prefers-reduced-motion:reduce){
    body.astronovai-premium-theme .ai-theme-skyfall{display:none !important;}
    html.ai-theme-ready body.astronovai-premium-theme,
    html.ai-theme-ready body.astronovai-premium-theme *{transition:none !important;}
}

/* A strong, readable dark canvas for containers that were still painting white. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .home-container,
    .ai-tools-directory-page,
    .taxonomy-page,
    .taxonomy-page.ai-category-premium-v4,
    .modern-tool-page,
    .modern-tool-shell,
    .single-blog-page,
    .single-blog-premium-page,
    .blog-container,
    .compare-container,
    .ai-favorites-page,
    .ai-dashboard-premium,
    .ai-submit-premium,
    .ai-auth-premium,
    .ai-static-page
){
    background:transparent !important;
    background-color:transparent !important;
    color:var(--ai-night-readable) !important;
}

/* Text system: readable by default on every dark-mode page. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .home-container,
    .ai-tools-directory-page,
    .taxonomy-page,
    .modern-tool-page,
    .single-blog-page,
    .blog-container,
    .compare-container,
    .ai-favorites-page,
    .ai-dashboard-premium,
    .ai-submit-premium,
    .ai-static-page
) :is(h1,h2,h3,h4,h5,h6,.entry-title,.page-title,.section-title,.section-heading,strong,b){
    color:#ffffff !important;
    text-shadow:0 1px 14px rgba(15,23,42,.18);
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .home-container,
    .ai-tools-directory-page,
    .taxonomy-page,
    .modern-tool-page,
    .single-blog-page,
    .blog-container,
    .compare-container,
    .ai-favorites-page,
    .ai-dashboard-premium,
    .ai-submit-premium,
    .ai-static-page
) :is(p,li,dd,dt,label,legend,figcaption,.description,.excerpt,.meta,.entry-meta,.small,.ai-muted){
    color:var(--ai-night-readable-soft) !important;
}

/* Single tool page: all white/gray islands become space panels. */
html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-page :is(
    .modern-tool-hero,
    .modern-tool-snapshot,
    .modern-tool-section,
    .modern-discussion-section,
    .modern-tool-overview-board,
    .modern-tool-feature-cards,
    .modern-tool-usecase-cards,
    .modern-tool-limitations,
    .modern-tool-pros,
    .modern-tool-cons,
    .modern-tool-two-column .modern-tool-section,
    .modern-tool-sidebar-card,
    .modern-tool-score-panel,
    .modern-tool-bottom-head,
    .modern-tool-bottom-hub,
    .modern-tool-tab-panel,
    .modern-tool-panel-intro,
    .modern-tool-related .related-tools-section,
    .modern-tool-related .users-viewed-section,
    .modern-tool-related .compare-suggestions-section,
    .modern-tool-related .faq-section,
    .users-viewed-section,
    .related-tools-section,
    .compare-suggestions-section,
    #overview,
    #features,
    #use-cases,
    #pros-cons,
    #pricing,
    #languages,
    #integrations,
    #technical
){
    background:
        radial-gradient(circle at 12% 0%,rgba(96,165,250,.12),transparent 32%),
        radial-gradient(circle at 90% 8%,rgba(129,140,248,.10),transparent 28%),
        linear-gradient(180deg,rgba(16,27,48,.96),rgba(8,17,32,.98)) !important;
    background-color:var(--ai-night-card-solid) !important;
    border-color:var(--ai-night-border-clear) !important;
    color:var(--ai-night-readable) !important;
    box-shadow:var(--ai-night-glow-blue) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-page :is(
    .modern-tool-card,
    .modern-tool-card-grid.inner .modern-tool-card,
    .modern-tool-info-card,
    .modern-tool-feature-card,
    .modern-tool-chip-cards .modern-tool-feature-card,
    .modern-tool-language-cards .modern-tool-feature-card,
    .modern-tool-resource-links a,
    .modern-tool-technical-collapsible,
    .modern-tool-technical-toggle,
    .modern-tool-technical-section,
    .modern-tool-related .compare-suggestion-card,
    .modern-tool-faq-section .faq-item,
    .modern-review-card,
    .modern-review-empty-card,
    .modern-discussion-comment-card,
    .modern-discussion-composer-card
){
    background:
        linear-gradient(180deg,rgba(20,34,58,.98),rgba(10,20,38,.98)) !important;
    background-color:var(--ai-night-card-elevated) !important;
    border-color:rgba(191,219,254,.17) !important;
    color:var(--ai-night-readable) !important;
    box-shadow:0 14px 38px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.05) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-page .modern-tool-feature-cards::before,
html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-page .modern-tool-usecase-cards::before,
html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-page .modern-tool-limitations::before,
html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-page .modern-tool-pros::before,
html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-page .modern-tool-cons::before,
html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-page .modern-tool-two-column .modern-tool-section::before,
html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-page .modern-tool-feature-card::before,
html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-page .modern-tool-usecase-cards .modern-tool-feature-card::before{
    background:
        radial-gradient(circle at 0 0,rgba(96,165,250,.13),transparent 34%),
        linear-gradient(180deg,rgba(96,165,250,.045),rgba(15,27,46,0)) !important;
    opacity:.95 !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-page :is(
    .modern-tool-section-head h2,
    .modern-discussion-head h2,
    .modern-tool-info-card strong,
    .modern-tool-card strong,
    .modern-tool-feature-card p,
    .modern-tool-rich-text,
    .modern-tool-list li,
    .modern-tool-faq-section .faq-question,
    .modern-tool-faq-section .faq-answer,
    .compare-suggestion-title,
    .compare-suggestion-meta
){
    color:var(--ai-night-readable) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-page :is(
    .modern-tool-tagline,
    .modern-tool-section-head-row p,
    .modern-tool-info-card p,
    .modern-tool-card span,
    .modern-tool-card-grid.inner .modern-tool-card span,
    .modern-tool-affiliate-note,
    .modern-tool-panel-intro p
){
    color:var(--ai-night-readable-soft) !important;
}

/* Taxonomy and AI tools archive: prevent the mid-page white slab. */
html[data-ai-theme="dark"] body.astronovai-premium-theme .taxonomy-page :is(
    .taxonomy-surface-block,
    .taxonomy-tool-board,
    .taxonomy-tools-section,
    .taxonomy-top-rated-section,
    .taxonomy-faq-section,
    .taxonomy-intro-card,
    .taxonomy-decision-card,
    .taxonomy-knowledge-grid > *,
    .taxonomy-bottom-grid > *,
    .taxonomy-signal-grid > *,
    .taxonomy-mini-board,
    .related-categories,
    .related-category-card,
    .popular-comparisons-section,
    .taxonomy-category-nav,
    .taxonomy-brief-list li,
    .taxonomy-guide-points li
){
    background:
        radial-gradient(circle at 10% 0%,rgba(96,165,250,.10),transparent 34%),
        linear-gradient(180deg,rgba(16,27,48,.96),rgba(8,17,32,.98)) !important;
    background-color:var(--ai-night-card-solid) !important;
    border-color:var(--ai-night-border-clear) !important;
    color:var(--ai-night-readable) !important;
    box-shadow:var(--ai-night-glow-blue) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .taxonomy-page .taxonomy-category-nav :is(a,button,.taxonomy-nav-search){
    background:rgba(12,24,44,.95) !important;
    border-color:rgba(191,219,254,.16) !important;
    color:#eaf2ff !important;
    box-shadow:none !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .taxonomy-page .taxonomy-category-nav :is(a:hover,button:hover,a.is-active,button.is-active){
    background:linear-gradient(135deg,#2563eb,#4f46e5) !important;
    color:#fff !important;
    border-color:rgba(191,219,254,.28) !important;
}

/* Blog archive + single article: hero/content/sidebar stay readable. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .blog-archive-hero,
    .blog-category-hero,
    .single-blog-hero,
    .single-blog-article,
    .single-blog-content,
    .single-blog-sidebar > *,
    .single-blog-share-card,
    .single-blog-decision-strip,
    .blog-inline-cta,
    .blog-related-section,
    .single-blog-community-hub,
    .single-blog-discussion-wrap,
    .single-blog-discussion-standalone,
    .single-blog-section-tabs,
    .single-blog-tab-panel,
    .related-articles,
    .blog-card,
    .blog-article-card
){
    background:
        radial-gradient(circle at 12% 0%,rgba(96,165,250,.11),transparent 34%),
        linear-gradient(180deg,rgba(16,27,48,.96),rgba(8,17,32,.98)) !important;
    background-color:var(--ai-night-card-solid) !important;
    border-color:var(--ai-night-border-clear) !important;
    color:var(--ai-night-readable) !important;
    box-shadow:var(--ai-night-glow-blue) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .single-blog-content,
    .single-blog-article,
    .premium-blog-article
) :is(p,li,blockquote,td,th){
    color:#dbe7f6 !important;
}

/* Compare pages: tables, methodology, related panels, and discussion. */
html[data-ai-theme="dark"] body.astronovai-premium-theme .compare-container :is(
    .compare-hero,
    .compare-hero-premium,
    .compare-hero-tool,
    .compare-share-card,
    .compare-decision-strip,
    .compare-decision-strip .summary-card,
    .compare-summary-grid > *,
    .compare-section,
    .compare-table-section,
    .compare-premium-table,
    .compare-seo-content,
    .compare-methodology,
    .compare-methodology-grid > *,
    .compare-verdict-section,
    .compare-verdict-box,
    .compare-related-section,
    .compare-related-premium,
    .compare-faq,
    .compare-container .modern-discussion-section.compare-discussion-premium,
    .comparison-card,
    .related-compare-card,
    .compare-suggestion-card
){
    background:
        radial-gradient(circle at 12% 0%,rgba(96,165,250,.11),transparent 34%),
        linear-gradient(180deg,rgba(16,27,48,.96),rgba(8,17,32,.98)) !important;
    background-color:var(--ai-night-card-solid) !important;
    border-color:var(--ai-night-border-clear) !important;
    color:var(--ai-night-readable) !important;
    box-shadow:var(--ai-night-glow-blue) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .compare-container :is(
    .compare-row,
    .compare-row > div,
    .compare-premium-table .compare-row,
    .compare-premium-table .compare-row > div,
    .compare-faq .faq-item,
    .compare-decision-panel,
    .compare-tool,
    .compare-usecase-row
){
    background:rgba(15,27,46,.96) !important;
    background-color:rgba(15,27,46,.96) !important;
    border-color:rgba(191,219,254,.14) !important;
    color:#dbe7f6 !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .compare-container :is(.compare-row.header,.compare-premium-table .compare-row.header,.compare-row.header > div){
    background:rgba(96,165,250,.18) !important;
    color:#fff !important;
}

/* Account, favorites, submit, and activity rows. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .favorites-section,
    .favorites-stat-card,
    .favorites-empty,
    .favorites-comparison-card,
    .favorites-article-card,
    .favorites-login-box,
    .ai-dashboard-premium .ai-profile-card-pro,
    .ai-dashboard-premium .ai-account-sidebar,
    .ai-dashboard-premium .ai-account-panel,
    .ai-dashboard-premium .ai-account-community-panel-pro,
    .ai-dashboard-premium .ai-stat-card-pro,
    .ai-dashboard-premium .ai-account-overview-card,
    .ai-dashboard-premium .ai-account-tool-card,
    .ai-dashboard-premium .ai-account-comparison-card-pro,
    .ai-dashboard-premium .ai-account-review-card-pro,
    .ai-dashboard-premium .ai-account-submission-card-pro,
    .ai-dashboard-premium .ai-empty-state-pro,
    .ai-dashboard-premium .ai-dashboard-list a,
    .ai-dashboard-premium .ai-activity-item,
    .ai-dashboard-premium .ai-preference-group,
    .ai-dashboard-premium .ai-preference-options .ai-check,
    .ai-submit-card,
    .ai-submit-form-card,
    .ai-submit-side > *,
    .ai-submit-steps li,
    .ai-submit-guidelines,
    .ai-submit-review-note,
    .ai-submit-back,
    .ai-consent-box,
    .ai-consent-check
){
    background:
        radial-gradient(circle at 12% 0%,rgba(96,165,250,.10),transparent 34%),
        linear-gradient(180deg,rgba(16,27,48,.96),rgba(8,17,32,.98)) !important;
    background-color:var(--ai-night-card-solid) !important;
    border-color:var(--ai-night-border-clear) !important;
    color:var(--ai-night-readable) !important;
    box-shadow:var(--ai-night-glow-blue) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .ai-dashboard-premium .ai-profile-info-grid > div,
    .ai-dashboard-premium .ai-community-metrics > div,
    .ai-dashboard-premium .ai-community-status-copy dl div,
    .ai-dashboard-premium .ai-account-sidebar a,
    .ai-dashboard-premium .ai-dashboard-tabs-pages,
    .favorites-overview > div,
    .ai-stats-grid > div,
    .ai-stats-grid-pro > div
){
    background:rgba(15,27,46,.92) !important;
    border-color:rgba(191,219,254,.14) !important;
    color:#dbe7f6 !important;
}

/* Forms and selectable controls: no white inputs with pale text. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="url"],
    input[type="search"],
    input[type="file"],
    input[type="number"],
    select,
    textarea,
    .ai-filter-select,
    .ai-global-explorer-search,
    .ai-header-search input,
    .ai-submit-field input,
    .ai-submit-field select,
    .ai-submit-field textarea,
    .ai-account-form input,
    .ai-account-form select,
    .ai-account-form textarea,
    .modern-review-form-field input,
    .modern-review-form-field textarea,
    .modern-discussion-field textarea
){
    background:#0f1b2e !important;
    background-color:#0f1b2e !important;
    border-color:rgba(191,219,254,.18) !important;
    color:#f8fafc !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.04) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(input,select,textarea)::placeholder{
    color:rgba(169,184,207,.72) !important;
}

/* Filter drawer/search overlays: keep the panel space-dark but readable. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .ai-filter-drawer__panel,
    .ai-filter-drawer__body,
    .ai-filter-section,
    .ai-global-explorer,
    .ai-global-explorer-panel,
    .ai-global-explorer-results,
    .ai-global-filter-group,
    .ai-global-results-list,
    .ai-search-results,
    .search-suggestions,
    .search-results-panel,
    .ac-section
){
    background:linear-gradient(180deg,rgba(11,20,38,.99),rgba(5,11,22,.99)) !important;
    background-color:#0b1426 !important;
    border-color:rgba(191,219,254,.16) !important;
    color:#e6edf8 !important;
    box-shadow:0 32px 96px rgba(0,0,0,.56),inset 0 1px 0 rgba(255,255,255,.055) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .ai-filter-chip,
    .ai-global-chip-grid button,
    .filter-item,
    .filter-pill,
    .ac-item,
    .ai-search-result,
    .search-result-item
){
    background:rgba(16,27,48,.96) !important;
    border-color:rgba(191,219,254,.14) !important;
    color:#e6edf8 !important;
}

/* If a late stylesheet still paints a known content island white, at least keep its text readable. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .single-blog-hero,
    .single-blog-content,
    .compare-seo-content,
    .compare-methodology,
    .favorites-empty,
    .ai-empty-state-pro,
    .ai-activity-item,
    .ai-submit-card,
    .modern-tool-section,
    .taxonomy-surface-block
) :is(h1,h2,h3,h4,h5,h6,strong,b,p,li,span,small,label,em){
    text-shadow:none;
}

/* Buttons that should stay bright and clear on dark panels. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .visit-btn,
    .home-mini-visit,
    .modern-tool-btn.primary,
    .compare-primary-action,
    .ai-submit-primary,
    .ai-filter-submit,
    .favorites-primary-btn
){
    background:linear-gradient(135deg,#2563eb,#4f46e5) !important;
    color:#ffffff !important;
    border-color:rgba(191,219,254,.25) !important;
    box-shadow:0 16px 38px rgba(37,99,235,.24) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .official-btn,
    .compare-btn,
    .modern-tool-btn.secondary,
    .compare-secondary-action,
    .favorites-secondary-btn,
    .ai-filter-reset
){
    background:rgba(15,27,46,.92) !important;
    color:#dbeafe !important;
    border-color:rgba(191,219,254,.16) !important;
}

/* Final table repair across articles, taxonomy guides, and comparisons. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(table,.compare-table,.compare-premium-table,.quick-comparison-table,.blog-comparison-table){
    background:#0b1426 !important;
    color:#dbe7f6 !important;
    border-color:rgba(191,219,254,.16) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(th,td,.compare-row > div){
    border-color:rgba(191,219,254,.12) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(th,.compare-row.header > div){
    background:rgba(96,165,250,.18) !important;
    color:#fff !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(td,.compare-row:not(.header) > div){
    background:rgba(15,27,46,.88) !important;
    color:#dbe7f6 !important;
}

/* =========================================================
   AstronovAI v18.20 - Nightfall Contrast Seal
   Guarantees readable copy on any remaining light islands and
   gives the theme switch a softer "night descends" feeling.
   ========================================================= */

html[data-ai-theme="dark"] body.astronovai-premium-theme{
    --ai-night-seal-bg:#081426;
    --ai-night-seal-bg-2:#101d33;
    --ai-night-seal-bg-3:#14243d;
    --ai-night-seal-line:rgba(191,219,254,.20);
    --ai-night-seal-text:#edf5ff;
    --ai-night-seal-muted:#b8c7dd;
    --ai-night-seal-faint:#8ea2bd;
    --ai-night-seal-gradient:
        radial-gradient(circle at 12% 0%,rgba(96,165,250,.14),transparent 34%),
        radial-gradient(circle at 92% 6%,rgba(129,140,248,.13),transparent 32%),
        linear-gradient(180deg,rgba(16,29,51,.98),rgba(8,20,38,.99));
    --ai-night-seal-shadow:0 26px 76px rgba(0,0,0,.40),inset 0 1px 0 rgba(255,255,255,.06);
}

/* Remaining white/light content islands are converted to space glass. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .ai-night-force-surface,
    .compare-container .compare-fit-card,
    .compare-container .highlight-card,
    .compare-container .compare-choice-card,
    .compare-container .methodology-card,
    .compare-container .compare-final-cta,
    .compare-container .compare-final-cta-premium,
    .compare-container .compare-related-section,
    .compare-container .compare-related-premium,
    .compare-container .compare-related-grid .related-compare-card,
    .compare-container .compare-alt-card,
    .compare-container .compare-suggestion-card,
    .compare-container .modern-discussion-head.premium,
    .compare-container .modern-discussion-guidelines div,
    .compare-container .modern-discussion-stats div,
    .compare-container .modern-discussion-composer-card,
    .compare-container .modern-discussion-form,
    .compare-container .modern-discussion-field,
    .compare-container .modern-discussion-empty-card,
    .compare-container .modern-discussion-comment-card,
    .compare-container .modern-discussion-box,
    .single-blog-discussion-wrap .modern-discussion-head.premium,
    .single-blog-discussion-wrap .modern-discussion-head,
    .single-blog-discussion-wrap .modern-discussion-box,
    .single-blog-discussion-wrap .modern-discussion-guidelines div,
    .single-blog-discussion-wrap .modern-discussion-stats div,
    .single-blog-discussion-wrap .modern-discussion-composer-card,
    .single-blog-discussion-wrap .modern-discussion-form,
    .single-blog-discussion-wrap .modern-discussion-field,
    .single-blog-discussion-wrap .modern-discussion-empty-card,
    .single-blog-discussion-wrap .modern-discussion-comment-card,
    .single-blog-decision-strip div,
    .single-blog-share-card,
    .premium-blog-actions .ai-favorite-article-btn,
    .single-blog-content .blog-review-notice,
    .single-blog-content .blog-review-notice-item,
    .single-blog-content .blog-table-wrap,
    .blog-sidebar-card,
    .blog-sidebar-tool,
    .modern-tool-page .modern-tool-card,
    .modern-tool-page .modern-tool-info-card,
    .modern-tool-page .modern-tool-card-grid.inner > *,
    .modern-tool-page .modern-tool-feature-card,
    .modern-tool-page .modern-tool-feature-cards .modern-tool-feature-card,
    .modern-tool-page .modern-tool-usecase-cards .modern-tool-feature-card,
    .modern-tool-page .modern-tool-limitations .modern-tool-feature-card,
    .modern-tool-page #languages.modern-tool-language-cards .modern-tool-feature-card,
    .modern-tool-page .modern-tool-language-cards .modern-tool-feature-card,
    .modern-tool-page #integrations .modern-tool-feature-card,
    .modern-tool-page .modern-tool-list li,
    .modern-tool-page .modern-tool-score-stats > *,
    .modern-tool-page .modern-tool-score-details > *,
    .modern-tool-page .modern-tool-resource-links a,
    .modern-tool-page .modern-tool-sidebar-card,
    .modern-tool-page .modern-tool-panel-intro,
    .modern-tool-page .modern-tool-panel-shortcuts a,
    .modern-tool-page .modern-tool-review-summary,
    .modern-tool-page .modern-review-card,
    .taxonomy-page .taxonomy-surface-block,
    .taxonomy-page .taxonomy-intro-card,
    .taxonomy-page .taxonomy-decision-card,
    .taxonomy-page .taxonomy-mini-board,
    .taxonomy-page .taxonomy-mini-tool-grid > *,
    .taxonomy-page .taxonomy-knowledge-grid > *,
    .taxonomy-page .taxonomy-bottom-grid > *,
    .taxonomy-page .category-flow-step,
    .taxonomy-page .category-hero-pick,
    .taxonomy-page .taxonomy-faq-section,
    .taxonomy-page .category-seo-section,
    .ai-dashboard-premium .ai-account-panel,
    .ai-dashboard-premium .ai-profile-card-pro,
    .ai-dashboard-premium .ai-account-sidebar,
    .ai-dashboard-premium .ai-account-sidebar a,
    .ai-dashboard-premium .ai-stat-card-pro,
    .ai-dashboard-premium .ai-account-overview-card,
    .ai-dashboard-premium .ai-account-tool-card,
    .ai-dashboard-premium .ai-empty-state,
    .ai-dashboard-premium .ai-empty-state-pro,
    .ai-dashboard-premium .ai-dashboard-list a,
    .ai-dashboard-premium .ai-activity-item,
    .ai-dashboard-premium .ai-preference-group,
    .ai-dashboard-premium .ai-preference-options .ai-check,
    .ai-submit-premium,
    .ai-submit-premium .ai-submit-card,
    .ai-submit-premium .ai-submit-steps li,
    .ai-submit-premium .ai-submit-review-note,
    .ai-submit-premium .ai-submit-back,
    .favorites-section .favorites-empty,
    .favorites-section .favorites-comparison-card,
    .favorites-section .favorites-article-card,
    .favorites-section .favorites-stat-card
){
    background:var(--ai-night-seal-gradient) !important;
    background-color:var(--ai-night-seal-bg) !important;
    border-color:var(--ai-night-seal-line) !important;
    color:var(--ai-night-seal-text) !important;
    box-shadow:var(--ai-night-seal-shadow) !important;
    text-shadow:none !important;
}

/* Child text inside sealed surfaces must never inherit pale-on-white colors. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .ai-night-force-surface,
    .compare-fit-card,
    .highlight-card,
    .compare-choice-card,
    .methodology-card,
    .compare-final-cta,
    .compare-related-section,
    .compare-related-premium,
    .related-compare-card,
    .compare-alt-card,
    .compare-suggestion-card,
    .modern-discussion-head,
    .modern-discussion-guidelines div,
    .modern-discussion-stats div,
    .modern-discussion-composer-card,
    .modern-discussion-form,
    .modern-discussion-empty-card,
    .single-blog-decision-strip div,
    .single-blog-share-card,
    .blog-sidebar-card,
    .blog-sidebar-tool,
    .modern-tool-card,
    .modern-tool-info-card,
    .modern-tool-feature-card,
    .modern-tool-list li,
    .modern-tool-sidebar-card,
    .modern-tool-panel-intro,
    .taxonomy-intro-card,
    .taxonomy-decision-card,
    .taxonomy-mini-board,
    .category-flow-step,
    .category-hero-pick,
    .ai-account-panel,
    .ai-profile-card-pro,
    .ai-account-sidebar,
    .ai-stat-card-pro,
    .ai-account-overview-card,
    .ai-account-tool-card,
    .ai-empty-state,
    .ai-empty-state-pro,
    .ai-dashboard-list a,
    .ai-activity-item,
    .ai-preference-group,
    .ai-submit-card,
    .ai-submit-steps li,
    .ai-submit-review-note,
    .ai-submit-back,
    .favorites-empty,
    .favorites-comparison-card,
    .favorites-article-card,
    .favorites-stat-card
) :is(h1,h2,h3,h4,h5,h6,strong,b,.compare-title,.modern-tool-card-title,.modern-tool-info-title,.modern-tool-section-title){
    color:#ffffff !important;
    text-shadow:0 1px 18px rgba(0,0,0,.20) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .ai-night-force-surface,
    .compare-fit-card,
    .highlight-card,
    .compare-choice-card,
    .methodology-card,
    .compare-final-cta,
    .compare-related-section,
    .compare-related-premium,
    .related-compare-card,
    .compare-alt-card,
    .compare-suggestion-card,
    .modern-discussion-head,
    .modern-discussion-guidelines div,
    .modern-discussion-stats div,
    .modern-discussion-composer-card,
    .modern-discussion-form,
    .modern-discussion-empty-card,
    .single-blog-decision-strip div,
    .single-blog-share-card,
    .blog-sidebar-card,
    .blog-sidebar-tool,
    .modern-tool-card,
    .modern-tool-info-card,
    .modern-tool-feature-card,
    .modern-tool-list li,
    .modern-tool-sidebar-card,
    .modern-tool-panel-intro,
    .taxonomy-intro-card,
    .taxonomy-decision-card,
    .taxonomy-mini-board,
    .category-flow-step,
    .category-hero-pick,
    .ai-account-panel,
    .ai-profile-card-pro,
    .ai-account-sidebar,
    .ai-stat-card-pro,
    .ai-account-overview-card,
    .ai-account-tool-card,
    .ai-empty-state,
    .ai-empty-state-pro,
    .ai-dashboard-list a,
    .ai-activity-item,
    .ai-preference-group,
    .ai-submit-card,
    .ai-submit-steps li,
    .ai-submit-review-note,
    .ai-submit-back,
    .favorites-empty,
    .favorites-comparison-card,
    .favorites-article-card,
    .favorites-stat-card
) :is(p,li,span,small,em,label,dd,dt,td,th){
    color:var(--ai-night-seal-muted) !important;
    text-shadow:none !important;
}

/* Preserve clear label/badge colors inside dark surfaces. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .compare-section-kicker,
    .ai-panel-kicker,
    .ai-eyebrow,
    .modern-tool-info-eyebrow,
    .modern-tool-section-head span,
    .blog-article-badge,
    .single-blog-share-copy span,
    .modern-discussion-composer-head span,
    .modern-discussion-stream-head span,
    .ai-profile-label,
    .ai-account-sidebar-title
){
    background:rgba(96,165,250,.16) !important;
    border-color:rgba(147,197,253,.22) !important;
    color:#bfdbfe !important;
    text-shadow:none !important;
}

/* Inputs may stay dark, but the surrounding composer/form panels must be readable. */
html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .modern-discussion-field textarea,
    .modern-discussion-edit-form textarea,
    .ai-submit-field input,
    .ai-submit-field select,
    .ai-submit-field textarea,
    .ai-preferences-pro input,
    .ai-preferences-pro select,
    .ai-preferences-pro textarea
){
    background:#0d1a2d !important;
    background-color:#0d1a2d !important;
    border-color:rgba(191,219,254,.22) !important;
    color:#f8fafc !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.055),0 0 0 1px rgba(96,165,250,.04) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme :is(
    .modern-discussion-field textarea,
    .modern-discussion-edit-form textarea,
    .ai-submit-field input,
    .ai-submit-field select,
    .ai-submit-field textarea,
    .ai-preferences-pro input,
    .ai-preferences-pro select,
    .ai-preferences-pro textarea
)::placeholder{
    color:rgba(184,199,221,.72) !important;
}

/* Light-on-light emergency fallback: if a surface is intentionally kept white, force dark ink. */
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-night-light-surface,
html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-night-light-surface :is(h1,h2,h3,h4,h5,h6,strong,b,p,li,span,small,em,label,td,th){
    color:#0f172a !important;
    text-shadow:none !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .ai-night-light-surface a{
    color:#2563eb !important;
}

/* Tool page high-specificity fixes for legacy !important feature/integration cards. */
html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-page :is(
    #features.modern-tool-feature-cards .modern-tool-feature-card,
    #use-cases.modern-tool-usecase-cards .modern-tool-feature-card,
    #limitations.modern-tool-limitations .modern-tool-feature-card,
    #languages.modern-tool-language-cards .modern-tool-feature-card,
    #integrations.modern-tool-chip-cards .modern-tool-feature-card,
    #pricing .modern-tool-card,
    #technical .modern-tool-card,
    .modern-tool-technical-section .modern-tool-card,
    .modern-tool-technical-section .modern-tool-card-grid.inner > *
){
    background:linear-gradient(180deg,rgba(16,29,51,.98),rgba(8,20,38,.99)) !important;
    background-color:#0b1426 !important;
    border-color:rgba(191,219,254,.20) !important;
    color:#edf5ff !important;
    box-shadow:0 18px 48px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.055) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .modern-tool-page :is(
    #features.modern-tool-feature-cards .modern-tool-feature-card,
    #use-cases.modern-tool-usecase-cards .modern-tool-feature-card,
    #limitations.modern-tool-limitations .modern-tool-feature-card,
    #languages.modern-tool-language-cards .modern-tool-feature-card,
    #integrations.modern-tool-chip-cards .modern-tool-feature-card,
    #pricing .modern-tool-card,
    #technical .modern-tool-card
) :is(p,strong,span,small){
    color:#edf5ff !important;
}

/* Compare page high-specificity white island fixes. */
html[data-ai-theme="dark"] body.astronovai-premium-theme .compare-container :is(
    .compare-fit-card,
    .compare-choice-card,
    .methodology-card,
    .compare-final-cta-premium,
    .compare-discussion-standalone .modern-discussion-head.premium,
    .compare-discussion-standalone .modern-discussion-composer-card,
    .compare-discussion-standalone .modern-discussion-stats div,
    .compare-discussion-standalone .modern-discussion-guidelines div
){
    background:var(--ai-night-seal-gradient) !important;
    background-color:#0b1426 !important;
    color:#edf5ff !important;
    border-color:rgba(191,219,254,.20) !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .compare-container :is(.compare-fit-card,.compare-choice-card,.methodology-card,.compare-final-cta-premium) :is(h2,h3,strong){
    color:#fff !important;
}

html[data-ai-theme="dark"] body.astronovai-premium-theme .compare-container :is(.compare-fit-card,.compare-choice-card,.methodology-card,.compare-final-cta-premium) :is(p,li,span,em){
    color:#b8c7dd !important;
}

/* Blog article/discussion sealed panels. */
html[data-ai-theme="dark"] body.astronovai-premium-theme .single-blog-page :is(
    .single-blog-hero,
    .single-blog-decision-strip div,
    .single-blog-share-card,
    .single-blog-discussion-wrap .modern-discussion-head.premium,
    .single-blog-discussion-wrap .modern-discussion-box,
    .single-blog-discussion-wrap .modern-discussion-stats div,
    .single-blog-discussion-wrap .modern-discussion-guidelines div,
    .single-blog-discussion-wrap .modern-discussion-composer-card,
    .single-blog-discussion-wrap .modern-discussion-empty-card
){
    background:var(--ai-night-seal-gradient) !important;
    background-color:#0b1426 !important;
    color:#edf5ff !important;
    border-color:rgba(191,219,254,.20) !important;
}

/* Give the actual switch moment a velvet dim, so the user feels night descending. */
@media (prefers-reduced-motion:no-preference){
    html.ai-theme-transitioning body.astronovai-premium-theme{
        transition:background-color .9s cubic-bezier(.22,1,.36,1), color .7s cubic-bezier(.22,1,.36,1) !important;
    }

    body.astronovai-premium-theme .ai-theme-skyfall--night{
        background:
            radial-gradient(circle at 18% 4%,rgba(125,211,252,.38),transparent 20%),
            radial-gradient(circle at 78% 12%,rgba(167,139,250,.42),transparent 26%),
            linear-gradient(180deg,rgba(2,6,23,1) 0%,rgba(4,12,26,.98) 45%,rgba(7,20,38,.88) 100%),
            radial-gradient(circle at 22px 30px,rgba(255,255,255,.62) 0 1px,transparent 1.4px),
            radial-gradient(circle at 92px 88px,rgba(147,197,253,.45) 0 1px,transparent 1.4px) !important;
        background-size:auto,auto,auto,132px 132px,220px 220px !important;
        animation:ai-night-descends-v20 1.26s cubic-bezier(.16,1,.3,1) both !important;
    }

    @keyframes ai-night-descends-v20{
        0%{opacity:0;transform:translateY(-26%);clip-path:inset(0 0 100% 0);filter:saturate(1.05) blur(0)}
        34%{opacity:.98;transform:translateY(-4%);clip-path:inset(0 0 6% 0);filter:saturate(1.18) blur(.2px)}
        62%{opacity:.72;transform:translateY(0);clip-path:inset(0 0 0 0);filter:saturate(1.10) blur(0)}
        100%{opacity:0;transform:translateY(7%);clip-path:inset(0 0 0 0);filter:saturate(1)}
    }
}
