/* 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;
  }
}

/* Revision 2: DueByte's contrast hierarchy, rather than grey area coverage.
   Broad work areas stay near-black; medium tones belong to contained panels.
   Action/state/brand tokens remain unchanged. */
html[data-theme="light"]:has(#root .sunphi-post-market-panel) {
  --home-adjacent: #dfe3e8;
  --home-section: #d5dae0;
}
html[data-theme="light"]:has(#root .sunphi-post-market-panel) body :is(.landing-global-header, .sunphi-footer) {
  background-color: var(--home-canvas) !important;
}
html[data-theme="light"]:has(#root .sunphi-post-market-panel) body .sunphi-partner-heading-card {
  background-color: #d5dae0 !important;
}
html[data-theme="light"]:has(#root .sunphi-post-market-panel) body .a2a-market-table-row:nth-child(even):not(:hover) {
  background-color: #e8ebef !important;
}
html:is([data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) {
  --home-adjacent: #14171c;
  --home-section: #0b0e12;
  --home-raised: #1c2026;
}
html:is([data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body :is(.landing-global-header, .sunphi-footer) {
  background-color: #000000 !important;
}
html:is([data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body #a2a-market-signals-band.a2a-market-signals,
html:is([data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body .a2a-market-filter-shell {
  background-color: var(--home-canvas) !important;
}
html:is([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: #07090c !important;
}
html:is([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: #0d1014 !important;
}
html:is([data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body :is(.sunphi-agent-feature-card, .sunphi-partner-heading-card, .sunphi-partner-card, .sunphi-release-card) {
  border-color: #3d444d !important;
}
html:is([data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body .a2a-market-table-head,
html:is([data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body #a2a-market-signals-band .a2a-market-signals-label {
  color: #b9c2cc !important;
}
/* The first heading contains status-filter buttons, not a text label. */
html:is([data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body .a2a-market-table-head:first-child {
  color: #8b949e !important;
}

/* Listing detail planes: section headings, alternating rows, label column.
   The 206px split follows existing 16px padding + 180px label + half 20px gap.
   No grid, spacing, content, or interaction changes are needed. */
html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) {
  --detail-row-a: #ffffff;
  --detail-row-b: #f0f1f3;
  --detail-label-a: #e8ebef;
  --detail-label-b: #dfe3e8;
  --detail-heading: #d5dae0;
  --detail-label-text: #344252;
}
html:is([data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) {
  --detail-row-a: #0b0e12;
  --detail-row-b: #14171c;
  --detail-label-a: #14171c;
  --detail-label-b: #1c2026;
  --detail-heading: #242930;
  --detail-label-text: #b9c2cc;
}
html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body .a2a-market-detail-row {
  --detail-row: var(--detail-row-a);
  --detail-label: var(--detail-label-a);
  background-color: var(--detail-row) !important;
}
html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body .a2a-market-detail-row:nth-child(even) {
  --detail-row: var(--detail-row-b);
  --detail-label: var(--detail-label-b);
}
html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body .a2a-market-details-section-header {
  background-color: var(--detail-heading) !important;
}
html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body .a2a-market-detail-row-label {
  background-color: var(--detail-label) !important;
  color: var(--detail-label-text) !important;
}
html:is([data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body :is(.a2a-market-details-header, .contact-modal-header, .contact-modal-footer, .product-walkthrough-stage-header) {
  background-color: #1c2026 !important;
}
@media (min-width: 640px) {
  html:is([data-theme="light"], [data-theme="graphite"], [data-theme="dark-graphite"]):has(#root .sunphi-post-market-panel) body .a2a-market-detail-row {
    background-image: linear-gradient(to right, var(--detail-label) 0 206px, var(--detail-row) 206px 100%) !important;
  }
}
