/* SUN PHI home only. Dedicated surface tokens deliberately do not replace
   shared graphite, table, action or illustration variables. The :has boundary
   follows client-side navigation and also covers this page's body portals. */
html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) {
  --home-canvas: #f8f9fa;
  --home-card: #ffffff;
  --home-adjacent: #f0f1f3;
  --home-section: #e8ebef;
  --home-raised: #ffffff;
}
html:is([data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) {
  --home-canvas: #030305;
  --home-card: #14171c;
  --home-adjacent: #1c2026;
  --home-section: #242930;
  --home-raised: #2c323b;
}

html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel),
html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) :is(body, #root, .sunphi-shell, .sunphi-main, .a2a-market-signals-gap, .a2a-market-fullscreen, .a2a-market-fullscreen-body, .a2a-market-details-shell, .a2a-market-details-body, .product-walkthrough-modal) {
  background-color: var(--home-canvas) !important;
}
html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body :is(
  .landing-global-header, .sunphi-footer, .a2a-market-signals-band,
  .a2a-market-table-frame, .a2a-market-pagination,
  .sunphi-agent-feature-card, .sunphi-partner-card, .sunphi-release-card,
  .contact-modal, .contact-modal-body, .widget-guide-body,
  .a2a-market-details-section, .product-walkthrough-stage
) {
  background-color: var(--home-card) !important;
}
/* The signal rail has an existing ID-specific override in the legacy sheet. */
html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body #a2a-market-signals-band.a2a-market-signals {
  background-color: var(--home-card) !important;
}
html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body :is(
  .sunphi-partner-heading-card, .sunphi-code-block, .sunphi-release-placeholder,
  .contact-modal-header, .contact-modal-footer, .widget-guide-section,
  .a2a-market-table-head, .a2a-market-fullscreen-header,
  .a2a-market-details-header, .a2a-market-details-section-header,
  .a2a-market-details-description, .a2a-market-detail-row, .a2a-market-details-copy-card,
  .product-walkthrough-header, .product-walkthrough-step-nav,
  .product-walkthrough-stage-header, .product-walkthrough-footer, .product-walkthrough-scroll
) {
  background-color: var(--home-adjacent) !important;
}
html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body :is(.a2a-market-filter-shell, .a2a-market-table-scrollbar, .sunphi-widget-notice) {
  background-color: var(--home-section) !important;
}
html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body .a2a-market-table-row:nth-child(odd):not(:hover) {
  background-color: var(--home-card) !important;
}
html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body .a2a-market-table-row:nth-child(even):not(:hover) {
  background-color: var(--home-adjacent) !important;
}
html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body section[aria-label="Cookie consent"] {
  background-color: var(--home-raised) !important;
}
@media (max-width: 1160px) {
  html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body .landing-global-nav {
    background-color: var(--home-raised) !important;
  }
}
