/**
 * Shared public page background — SSOT for lite/marketing shells.
 * Requires design-tokens.css (--toket-bg-page, --toket-bg-glow).
 * Load after lite-theme.css so body/glow overrides win over lite-theme forks.
 */

/* —— Bridge lite-chrome --site-page-bg to Toket page tokens —— */
html.site-unified-chrome:has(body.news-lite-doc):is([data-theme="light"], [data-theme="dark"], .dark),
html.site-unified-chrome:has(body.pricing-doc):is([data-theme="light"], [data-theme="dark"], .dark),
html.site-unified-chrome:has(body.early-access-doc):is([data-theme="light"], [data-theme="dark"], .dark),
html.site-unified-chrome:has(body.legal-doc):is([data-theme="light"], [data-theme="dark"], .dark),
html.site-unified-chrome:has(body.seo-lite-doc):is([data-theme="light"], [data-theme="dark"], .dark),
html.site-unified-chrome.page-toket-news:is([data-theme="light"], [data-theme="dark"], .dark),
html.site-unified-chrome:has(body.page-toket-news):is([data-theme="light"], [data-theme="dark"], .dark),
html.site-unified-chrome.page-home:not(.page-cost-v2):not(.page-v1-calculator):is([data-theme="light"], [data-theme="dark"], .dark) {
  --site-page-bg: var(--toket-bg-page, var(--dt-page-bg, var(--bg, #f7f7fa)));
}

html.site-unified-chrome:has(body.news-lite-doc)[data-theme="light"] body,
html.site-unified-chrome:has(body.news-lite-doc):not([data-theme="dark"]):not(.dark) body,
html.site-unified-chrome:has(body.pricing-doc)[data-theme="light"] body,
html.site-unified-chrome:has(body.pricing-doc):not([data-theme="dark"]):not(.dark) body,
html.site-unified-chrome:has(body.early-access-doc)[data-theme="light"] body,
html.site-unified-chrome:has(body.early-access-doc):not([data-theme="dark"]):not(.dark) body,
html.site-unified-chrome:has(body.legal-doc)[data-theme="light"] body,
html.site-unified-chrome:has(body.legal-doc):not([data-theme="dark"]):not(.dark) body,
html.site-unified-chrome:has(body.seo-lite-doc)[data-theme="light"] body,
html.site-unified-chrome:has(body.seo-lite-doc):not([data-theme="dark"]):not(.dark) body,
html.site-unified-chrome.page-toket-news:not([data-theme="dark"]):not(.dark) body,
html.site-unified-chrome.page-toket-news:not([data-theme="dark"]):not(.dark) body.page-toket-news,
html.site-unified-chrome:has(body.page-toket-news)[data-theme="light"] body,
html.site-unified-chrome:has(body.page-toket-news):not([data-theme="dark"]):not(.dark) body,
html.site-unified-chrome.page-home:not(.page-cost-v2):not(.page-v1-calculator)[data-theme="light"] body,
html.site-unified-chrome.page-home:not(.page-cost-v2):not(.page-v1-calculator):not([data-theme="dark"]):not(.dark) body {
  background: var(--toket-bg-page, var(--site-page-bg, #f6f8fc));
  background-attachment: fixed;
}

html.site-unified-chrome:has(body.news-lite-doc):is([data-theme="dark"], .dark) body,
html.site-unified-chrome:has(body.pricing-doc):is([data-theme="dark"], .dark) body,
html.site-unified-chrome:has(body.early-access-doc):is([data-theme="dark"], .dark) body,
html.site-unified-chrome:has(body.legal-doc):is([data-theme="dark"], .dark) body,
html.site-unified-chrome:has(body.seo-lite-doc):is([data-theme="dark"], .dark) body,
html.site-unified-chrome.page-toket-news:is([data-theme="dark"], .dark) body,
html.site-unified-chrome.page-toket-news:is([data-theme="dark"], .dark) body.page-toket-news,
html.site-unified-chrome:has(body.page-toket-news):is([data-theme="dark"], .dark) body,
html.site-unified-chrome.page-home:not(.page-cost-v2):not(.page-v1-calculator):not(.page-toket-news):not(:has(body.page-toket-news)):not(:has(body.seo-lite-doc)):is([data-theme="dark"], .dark) body {
  background: var(--toket-bg-page, var(--site-page-bg, var(--bg, #0b0d12)));
  background-attachment: fixed;
}

/* —— Glow overlay (DOM: .home-bg-glow) —— */
html.site-unified-chrome .home-bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.15), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(99, 102, 241, 0.08), transparent 50%);
}

html.site-unified-chrome:has(body.news-lite-doc):is([data-theme="dark"], .dark) .home-bg-glow,
html.site-unified-chrome:has(body.pricing-doc):is([data-theme="dark"], .dark) .home-bg-glow,
html.site-unified-chrome:has(body.early-access-doc):is([data-theme="dark"], .dark) .home-bg-glow,
html.site-unified-chrome:has(body.legal-doc):is([data-theme="dark"], .dark) .home-bg-glow,
html.site-unified-chrome:has(body.seo-lite-doc):is([data-theme="dark"], .dark) .home-bg-glow,
html.site-unified-chrome.page-toket-news:is([data-theme="dark"], .dark) .home-bg-glow,
html.site-unified-chrome:has(body.page-toket-news):is([data-theme="dark"], .dark) .home-bg-glow {
  opacity: 1;
}

html.site-unified-chrome.page-home:not(.page-cost-v2):not(.page-v1-calculator):not(.page-toket-news):not(:has(body.page-toket-news)):not(:has(body.seo-lite-doc)):is([data-theme="dark"], .dark) .home-bg-glow {
  opacity: 0.45;
}

/* —— Content stacking above glow —— */
html.site-unified-chrome:has(body.news-lite-doc) .news-lite,
html.site-unified-chrome:has(body.news-lite-doc) #liteShellMount,
html.site-unified-chrome:has(body.news-lite-doc) #siteFooterMount,
html.site-unified-chrome:has(body.pricing-doc) .pricing-page,
html.site-unified-chrome:has(body.pricing-doc) #liteShellMount,
html.site-unified-chrome:has(body.pricing-doc) #siteFooterMount,
html.site-unified-chrome:has(body.early-access-doc) .early-access-checkout,
html.site-unified-chrome:has(body.early-access-doc) #liteShellMount,
html.site-unified-chrome:has(body.early-access-doc) #siteFooterMount,
html.site-unified-chrome:has(body.legal-doc) .wrap,
html.site-unified-chrome:has(body.legal-doc) #liteShellMount,
html.site-unified-chrome:has(body.legal-doc) #siteFooterMount,
html.site-unified-chrome:has(body.seo-lite-doc) .seo-lite,
html.site-unified-chrome:has(body.seo-lite-doc) #liteShellMount,
html.site-unified-chrome:has(body.seo-lite-doc) #siteFooterMount,
html.site-unified-chrome.page-toket-news .guide-article-wrap,
html.site-unified-chrome.page-toket-news #liteShellMount,
html.site-unified-chrome.page-toket-news #siteFooterMount,
html.site-unified-chrome:has(body.page-toket-news) .guide-article-wrap,
html.site-unified-chrome:has(body.page-toket-news) #liteShellMount,
html.site-unified-chrome:has(body.page-toket-news) #siteFooterMount,
html.site-unified-chrome.page-home:not(.page-cost-v2):not(.page-v1-calculator) .home-page,
html.site-unified-chrome.page-home:not(.page-cost-v2):not(.page-v1-calculator) #siteFooterMount {
  position: relative;
  z-index: 1;
}
