/* Load after homepage-theme.css. Preview components have a separate owner. */

/* Dark component surfaces; nested light panels retain their own text colors. */
body.internal-theme main :is(
  .glossary-term-card, .glossary-empty, .glossary-source-grid > a, .glossary-source-note,
  .lib-route-card, .lib-resource.is-featured,
  .adaptation-role-tabs, .adaptation-route-panel, .adaptation-period-card,
  .adaptation-evidence-board, .adaptation-evidence-action,
  .adaptation-digital-grid > .is-main, .adaptation-source-grid > .is-feature,
  .adaptation-form-result,
  .council-agenda-tabs, .council-agenda-panel, .council-stage-card,
  .council-role-grid > .is-main, .council-expertise-result,
  .council-digital-flow > article:nth-of-type(3), .council-source-grid > .is-feature,
  .council-form-result,
  .partner-program-card, .partner-program-card-main, .partner-operator-output,
  .partner-router-path, .partner-form-result, .partner-value-core,
  .solution-premise-grid > .is-main, .solution-pilot-question,
  .solution-scenario-grid > .is-confirmed, .solution-form-result, .solution-rights-core,
  .sys-portfolio-grid > a, .sys-pilot-scope, .sys-pilot-grid > article,
  .sys-architecture-layer.is-core, .sys-form-result,
  .news-featured-poster, .news-card.is-lead, .news-signal-grid > a,
  .hr-profile-explorer, .hr-layer-preview
):not(.site-preview, .site-preview *) {
  background: #0a2439;
  color: #f7f7f6;
  border-color: #425465;
  box-shadow: none;
}

body.internal-theme main :is(
  .adaptation-period-card, .adaptation-evidence-action,
  .council-stage-card, .council-expertise-result,
  .partner-program-card-main, .sys-pilot-scope, .news-featured-poster
):not(.site-preview, .site-preview *) {
  background: #001629;
}

/* Light insets are explicit, including those inside dark workspaces. */
body.internal-theme main :is(
  .glossary-search-panel, .glossary-relation-map,
  .lib-featured-cover, .lib-catalog-tools, .lib-resource:not(.is-featured),
  .adaptation-learning-grid > article, .adaptation-target-copy > div,
  .council-target-copy > div,
  .partner-router-data > article.is-accent,
  .solution-builder-result > article.is-accent,
  .sys-matrix-panel, .sys-matrix-head > div:last-child,
  .sys-matrix-result > article.is-accent,
  .sys-architecture-layer:not(.is-core),
  .news-featured-card, .news-card:not(.is-lead), .news-tools,
  .hr-skill-card, .hr-team-board, .hr-module-grid > article
):not(.site-preview, .site-preview *) {
  background: #f5f7f9;
  color: #071d35;
  border-color: #b9c7d1;
}

/* Glossary cards and alphabet remain dark; the search and dialog stay light. */
body.internal-theme main :is(
  .glossary-alphabet button, .hr-profile-tabs
):not(.site-preview, .site-preview *) {
  background: #001629;
  color: #b8c5d1;
  border-color: #425465;
}
body.internal-theme main :is(
  .glossary-term-head small, .glossary-term-aliases,
  .glossary-term-short, .glossary-term-card footer > span,
  .glossary-empty p, .glossary-source-grid p, .glossary-source-note > p,
  .glossary-dialog-shell > header small,
  .lib-route-card ol, .lib-resource.is-featured p
):not(.site-preview, .site-preview *) { color: #b8c5d1; }
body.internal-theme main :is(
  .glossary-term-head > span, .glossary-term-card footer > button, .glossary-source-note > span,
  .glossary-source-grid > a > span, .glossary-source-grid > a > strong,
  .lib-route-card > span, .lib-route-card strong,
  .lib-resource.is-featured > span, .lib-resource.is-featured a
):not(.site-preview, .site-preview *) { color: #73ccf4; }
body.internal-theme main :is(
  .glossary-term-card:hover, .glossary-source-grid > a:hover,
  .lib-route-card:hover, .lib-route-card:focus-visible,
  .lib-resource.is-featured:hover
):not(.site-preview, .site-preview *) { border-color: #73ccf4; }
body.internal-theme main :is(
  .glossary-alphabet button.is-active, .glossary-filter-row button.is-active
):not(.site-preview, .site-preview *) {
  background: #89d593;
  color: #001629;
  border-color: #89d593;
}

/* Adaptation and council: remove purple/plum surfaces and muted micro-labels. */
body.internal-theme main :is(
  .adaptation-role-tabs button > span, .adaptation-role-tabs button small,
  .adaptation-route-head p, .adaptation-periods button:not(.is-active),
  .adaptation-periods button:not(.is-active) span, .adaptation-period-card > small,
  .adaptation-period-card > p, .adaptation-period-card > div span,
  .adaptation-output-grid span, .adaptation-evidence-action p,
  .adaptation-evidence-board > header small, .adaptation-evidence-board article > div > small,
  .adaptation-digital-grid > .is-main p,
  .adaptation-source-grid > .is-feature p,
  .council-agenda-tabs button > span, .council-agenda-copy p,
  .council-stage-tabs button:not(.is-active), .council-stage-tabs button:not(.is-active) span,
  .council-stage-card > small, .council-stage-card > p,
  .council-stage-card > div span, .council-agenda-output span,
  .council-agenda-caption, .council-expertise-board > header small,
  .council-expertise-question span, .council-expertise-layers span,
  .council-expertise-result span, .council-expertise-result small,
  .council-role-grid > .is-main p,
  .council-digital-flow > article:nth-of-type(3) p,
  .council-source-grid > .is-feature p, .council-legacy-copy > div > small
):not(.site-preview, .site-preview *) { color: #b8c5d1; }
body.internal-theme main :is(
  .adaptation-route-head > span, .adaptation-digital-grid > .is-main span,
  .adaptation-digital-grid > .is-main strong,
  .council-agenda-copy > span, .council-role-grid > .is-main span,
  .council-role-grid > .is-main strong,
  .council-digital-flow > article:nth-of-type(3) > span,
  .council-digital-flow > article:nth-of-type(3) strong
):not(.site-preview, .site-preview *) { color: #73ccf4; }
body.internal-theme main .council-legacy-mark:not(.site-preview, .site-preview *) {
  background: transparent;
  border-color: #425465;
}
body.internal-theme main :is(
  .adaptation-evidence-board article > i b,
  .hr-skill-levels i.is-filled, .hr-team-coverage > div i
):not(.site-preview, .site-preview *) { background: #89d593; }

/* Partnership programs and compositional layers use the same technical palette. */
body.internal-theme main :is(
  .partner-program-card header small, .partner-program-card p,
  .partner-operator-output p, .partner-operator-arrow small, .partner-value-core small,
  .solution-composition-copy > p, .sys-portfolio-grid p,
  .sys-pilot-scope p, .sys-pilot-grid small,
  .sys-form-result > p, .sys-request-copy > div small,
  .sys-request-copy > div span, .solution-rights-core small,
  .solution-passport dt, .solution-request-copy > div > small
):not(.site-preview, .site-preview *) { color: #b8c5d1; }
body.internal-theme main :is(
  .partner-program-card header span, .partner-program-card a,
  .partner-operator-output > span, .partner-router-path span, .solution-rights-core > span,
  .sys-portfolio-grid span, .sys-portfolio-grid small,
  .sys-pilot-scope > span, .sys-pilot-grid span,
  .sys-architecture-layer.is-core > span,
  .sys-form-result > span, .sys-request-copy > div a,
  .sys-boundary-map .is-current > strong, .sys-value-core small
):not(.site-preview, .site-preview *) { color: #73ccf4; }
body.internal-theme main :is(
  .partner-router-request, .solution-builder-button, .sys-matrix-button
):not(.site-preview, .site-preview *) {
  background: #89d593;
  color: #001629;
  border-color: #89d593;
}
body.internal-theme main :is(
  .partner-router-request:hover, .solution-builder-button:hover,
  .sys-matrix-button:hover
):not(.site-preview, .site-preview *) { background: #a4e5ad; color: #001629; }
body.internal-theme main :is(
  .solution-layer-stack .is-interface, .solution-layer-stack .is-service
):not(.site-preview, .site-preview *) {
  background: #0a2439;
  color: #f7f7f6;
  border: 1px solid #425465;
}
body.internal-theme main .solution-layer-stack .is-template:not(.site-preview, .site-preview *) {
  background: #73ccf4;
  color: #001629;
}
body.internal-theme main .solution-layer-stack .is-config:not(.site-preview, .site-preview *) {
  background: #89d593;
  color: #001629;
}
body.internal-theme main .solution-layer-stack .is-system:not(.site-preview, .site-preview *) {
  background: #f5f7f9;
  color: #071d35;
}

/* Cyan is for dark surfaces. These labels sit on paper or white. */
body.internal-theme main :is(
  .sys-boundary-map article:not(.is-current) > span,
  .sys-boundary-map article:not(.is-current) > strong,
  .sys-role-tabs button:not([aria-selected="true"]) > span, .sys-matrix-head > div:first-child > span,
  .sys-matrix-head > div:last-child small,
  .sys-matrix-head > div:last-child a,
  .sys-journey-track > li > span, .sys-journey-track small,
  .sys-architecture-layer:not(.is-core) > span,
  .sys-quality-list > article > span,
  .sys-value-map > div:not(.sys-value-core) > span,
  .sys-scenario-grid header span, .sys-scenario-grid > article > strong,
  .sys-material-grid span,
  .hr-value-grid span, .hr-module-grid span, .hr-adaptation-flow span,
  .glossary-catalog-meta button, .glossary-relation-cards > article > span,
  .lib-featured-copy > span, .lib-result-count strong,
  .lib-resource:not(.is-featured) > span, .lib-resource:not(.is-featured) > a,
  .lib-principles-list > article > span,
  .adaptation-principle-flow > article > span, .adaptation-principle-flow > i,
  .adaptation-learning-grid > article > span, .adaptation-criteria-board > div > span,
  .council-role-grid > article:not(.is-main) > span, .council-cycle-flow > li > span,
  .council-digital-flow > article:not(:nth-of-type(3)) > span, .council-digital-flow > i,
  .solution-premise-grid > article:not(.is-main) > span,
  .solution-asset-tabs button:not([aria-selected="true"]) > span,
  .solution-builder-head > div > small, .solution-builder-head > div > a,
  .solution-journey-track > li > span, .solution-journey-track > li > div > small,
  .solution-economics-list > article > span,
  .solution-scenario-grid > article:not(.is-confirmed) > header > span,
  .solution-scenario-grid > article:not(.is-confirmed) > strong
):not(.site-preview, .site-preview *) { color: #236dc1; }
body.internal-theme main :is(
  .adaptation-roadmap-track > li > div > small, .council-expertise-copy > div > span
):not(.site-preview, .site-preview *) { color: #526578; }
body.internal-theme main :is(
  .hr-layer-output > span, .adaptation-role-grid > .is-employee > span,
  .council-participation-grid > article:first-child > span
):not(.site-preview, .site-preview *) { color: #173c2b; }
body.internal-theme main .hr-team-coverage b:not(.site-preview, .site-preview *) { color: #9b4524; }
body.internal-theme main .sys-architecture-layer.is-core strong:not(.site-preview, .site-preview *) {
  background: #001629;
  color: #f7f7f6;
}
body.internal-theme main .hr-adaptation-flow li:not(:last-child):not(.site-preview, .site-preview *)::after {
  color: #001629;
  background: #89d593;
}

/* News: dark editorial lead, readable metadata, neutral archive cards. */
body.internal-theme main :is(
  .news-card-mark, .news-card:not(.is-lead) a,
  .news-featured-copy > span, .news-editorial-list > article > span,
  .news-tools > p strong, .news-empty button
):not(.site-preview, .site-preview *) { color: #236dc1; }
body.internal-theme main :is(
  .news-card-mark > span, .news-card:not(.is-lead) > small,
  .news-card:not(.is-lead) p
):not(.site-preview, .site-preview *) { color: #526578; }
body.internal-theme main :is(
  .news-card.is-lead .news-card-mark, .news-card.is-lead a,
  .news-featured-poster > span, .news-featured-poster small,
  .news-signal-grid span, .news-signal-grid strong
):not(.site-preview, .site-preview *) { color: #73ccf4; }
body.internal-theme main :is(
  .news-card.is-lead .news-card-mark > span, .news-card.is-lead > small,
  .news-card.is-lead p, .news-featured-poster i,
  .news-featured-poster footer, .news-signal-grid p
):not(.site-preview, .site-preview *) { color: #b8c5d1; }
body.internal-theme main :is(
  .news-card:hover, .news-filters button:hover, .news-tools input:focus
):not(.site-preview, .site-preview *) { border-color: #236dc1; }

/* Green status bands have dark copy; inset panels keep their own surfaces. */
body.internal-theme main :is(
  .partner-target-mark > span, .partner-target-copy > div > span,
  .sys-target-mark > span, .sys-target-mark > strong, .sys-target-mark > small,
  .sys-target-copy > div > span,
  .solution-target-mark > span, .solution-target-mark > strong,
  .solution-target-mark > small, .solution-target-copy > div > span,
  .adaptation-target-copy span, .council-target-copy span, .hr-target-copy span
):not(.site-preview, .site-preview *) { color: #173c2b; }
body.internal-theme main :is(
  .partner-target-copy > p, .sys-target-copy > p, .solution-target-copy > p,
  .adaptation-target-copy > p, .council-target-copy > p, .hr-target-copy > p
):not(.site-preview, .site-preview *) { color: #315b46; }
body.internal-theme main :is(
  .partner-target-copy li, .sys-target-copy li, .solution-target-copy li
):not(.site-preview, .site-preview *)::before { color: #276c48; }

/* Explicit active-state children cannot inherit former pastel text on green. */
body.internal-theme main :is(
  .adaptation-periods button.is-active, .council-stage-tabs button.is-active,
  .sys-system-picker button[aria-pressed="true"],
  .solution-scenario-picker button[aria-pressed="true"]
):not(.site-preview, .site-preview *) {
  background: #89d593;
  color: #001629;
  border-color: #89d593;
}
body.internal-theme main :is(
  .adaptation-role-tabs button[aria-selected="true"] > span,
  .adaptation-role-tabs button[aria-selected="true"] strong,
  .adaptation-role-tabs button[aria-selected="true"] small,
  .adaptation-periods button.is-active span,
  .council-agenda-tabs button[aria-selected="true"] span,
  .council-agenda-tabs button[aria-selected="true"] strong,
  .council-stage-tabs button.is-active span,
  .sys-role-tabs button[aria-selected="true"] > span,
  .sys-role-tabs button[aria-selected="true"] small,
  .partner-router-tabs button[aria-selected="true"] span,
  .partner-router-tabs button[aria-selected="true"] small,
  .solution-asset-tabs button[aria-selected="true"] > span,
  .solution-asset-tabs button[aria-selected="true"] small,
  .hr-profile-tabs button[aria-selected="true"] span
):not(.site-preview, .site-preview *) { color: #001629; }
body.internal-theme main :is(
  .sys-role-tabs button[aria-selected="true"] > span,
  .partner-router-tabs button[aria-selected="true"] span,
  .solution-asset-tabs button[aria-selected="true"] > span
):not(.site-preview, .site-preview *) { background: #89d593; }

/* Arrow glyphs follow the actual link, including dark request sections. */
body.internal-theme main :is(
  .lib-featured-actions .arrow-link > span
):not(.site-preview, .site-preview *) { color: #236dc1; }
body.internal-theme main :is(
  .news-request .arrow-link > span, .lib-request .arrow-link > span,
  .hrchain-cta .arrow-link > span
):not(.site-preview, .site-preview *) { color: #73ccf4; }

/* Remaining report findings: selected controls and their explicit child labels. */
body.internal-theme main :is(
  .architecture-levels button[aria-selected="true"] > span,
  .bc-lifecycle-tabs button[aria-selected="true"] > span,
  .me-builder-tabs button[aria-selected="true"] > span,
  .eventflow-tabs button[aria-selected="true"] > span,
  .elk-context-tabs button[aria-selected="true"] > span,
  .sso-flow-tabs button[aria-selected="true"] > span,
  .education-router-tabs button[aria-selected="true"] > span,
  .diy-starts button[aria-selected="true"] > span,
  .diy-starts button[aria-selected="true"] > strong,
  .diy-starts button[aria-selected="true"] > small,
  .events-role-tabs button[aria-selected="true"] > span,
  .events-role-tabs button[aria-selected="true"] > small,
  .legal-software-tabs button[aria-selected="true"] > span,
  .legal-software-tabs button[aria-selected="true"] > small,
  .mi-designer-tabs button[aria-selected="true"] > small,
  .service-router-tabs button[aria-selected="true"] > span,
  .ms-selector-tabs button[aria-selected="true"] > small,
  .mt-explorer-tabs button[aria-selected="true"] > small,
  .accel-router-tabs button[aria-selected="true"] > small,
  .accel-project-cta .button > span, .elk-feed > article > i.is-hr
):not(.site-preview, .site-preview *) { color: #001629; }
body.internal-theme main .events-role-tabs button:not([aria-selected="true"]) > span:not(.site-preview, .site-preview *) {
  color: #73ccf4;
}
body.internal-theme main :is(
  .bc-audience-grid > article > span, .ms-boundary-grid > b,
  .mi-architecture-flow > article.is-core > span
):not(.site-preview, .site-preview *) { color: #236dc1; }
body.internal-theme main .legal-software-panel:not(.site-preview, .site-preview *) {
  background: #f5f7f9;
  color: #071d35;
}
body.internal-theme main :is(
  .mc-config-card > div > p, .mi-interface-card > div > p,
  .mt-template-card > div > p
):not(.site-preview, .site-preview *) { color: #b8c5d1; }
body.internal-theme main :is(
  .mc-config-card[open] > div > p, .mi-interface-card[open] > div > p,
  .mt-template-card[open] > div > p
):not(.site-preview, .site-preview *) { color: #526578; }
body.internal-theme main :is(
  .mc-target-note-grid > div > p, .mi-target-note-grid > div > p,
  .mt-target-note-grid > div > p, .accel-target-copy > p
):not(.site-preview, .site-preview *) { color: #315b46; }
body.internal-theme main :is(
  .accel-target-mark > span, .accel-target-mark > strong,
  .accel-target-mark > small, .accel-target-copy > div > span
):not(.site-preview, .site-preview *) { color: #173c2b; }

/* Product diagrams outside the hero: keep light cards and dark working areas. */
body.internal-theme main :is(
  .architecture-canvas, .bc-stage-interface, .bc-capability-grid > .is-accent,
  .me-builder-preview, .eventflow-stage-preview, .eventflow-integration-core,
  .elk-context-preview, .elk-integration-core,
  .sso-stage-preview, .sso-integration-core,
  .education-route-preview, .education-digital-core,
  .legacy-source-grid > .is-feature, .tprl-source-grid > .is-feature,
  .diy-route-panel, .diy-phase-card, .diy-role-grid > .is-owner,
  .diy-source-grid > .is-feature, .mi-screen-content > div,
  .service-route-preview, .service-result-board > article.is-outcome, .service-role-core
):not(.site-preview, .site-preview *) {
  background: #0a2439;
  color: #f7f7f6;
  border-color: #425465;
}
body.internal-theme main :is(
  .ecosystem-platforms .platform-card, .me-space-grid > article,
  .sso-security-grid > article, .diy-principle-board > .is-active,
  .tprl-premise-grid > article, .legacy-method-result,
  .legacy-module-grid > .is-final, .tprl-module-grid > .is-final, .tprl-roadmap-rule
):not(.site-preview, .site-preview *) {
  background: #f5f7f9;
  color: #071d35;
  border-color: #b9c7d1;
}
body.internal-theme main :is(
  .ecosystem-platforms .platform-card, .me-space-grid > article
):not(.site-preview, .site-preview *) {
  --platform-accent: #236dc1;
  --space-accent: #236dc1;
}
body.internal-theme main :is(
  .elk-space-symbol, .elk-role-person > span, .sso-context-user > div,
  .bc-stage-meter > i, .me-preview-progress > i,
  .event-packet-path > i.is-active, .sso-token-chain > i.is-active
):not(.site-preview, .site-preview *) {
  background: #89d593;
  color: #001629;
}
body.internal-theme main :is(
  .mi-anatomy-map li:last-child > span
):not(.site-preview, .site-preview *) { background: #236dc1; color: #fff; }
body.internal-theme main .mi-anatomy-screen main > div > strong:not(.site-preview, .site-preview *) {
  background: #236dc1;
}
body.internal-theme main .diy-phase-control button span:not(.site-preview, .site-preview *) {
  color: #b8c5d1;
}

/* Marketplace has a separate body class but shares the same light bands. */
body.marketplace-page main :is(.mp-catalog h2 > span, .mp-infra h2 > span) {
  color: #236dc1;
}
