/* D39 — audited route/section foreground-to-surface reconciliation.
   Each selector is restricted to a named page and a known section/component.
   No global `h1`, `p`, `a`, `button`, or whole-site palette overrides. */

/* /individuals/ — professional learner introduction: intentionally dark hero. */
body:is(.ce39-route-individuals,.ce39-route-learners) .ce-individuals-page > .ce20-experience__intro,
/* /for-instructors/ — parallel teacher journey introduction. */
body.ce39-route-for-instructors .ce20-teachers > .ce20-experience__intro {
  background:linear-gradient(115deg,#083640 0%,#0b2339 46%,#171626 100%) !important;
  color:#f8fbff !important;
  color-scheme:dark;
}
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  .ce20-experience__intro .ce-page-header :is(h1,h2,h3,strong) {color:#fff !important;}
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  .ce20-experience__intro .ce-page-header > p:not(.ce-eyebrow) {color:#d9e9f5 !important;}
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  .ce20-experience__intro .ce-page-header > .ce-eyebrow {color:#8ee6ed !important;}
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  .ce20-experience__intro .ce-page-header .ce-button--primary {
  background:#1255ab !important;border-color:#8eadd1 !important;color:#fff !important;
  box-shadow:0 10px 28px rgba(0,0,0,.22);
}
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  .ce20-experience__intro .ce-page-header .ce-button--ghost {
  background:rgba(255,255,255,.09) !important;border-color:#a8c6d8 !important;color:#fff !important;
}
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  .ce20-experience__intro .ce-page-header :is(.ce-button--primary,.ce-button--ghost):is(:hover,:focus-visible){
  background:#0b3c76 !important;color:#fff !important;border-color:#e1effa !important;
  outline:2px solid #e8f6ff;outline-offset:3px;
}
/* Light catalogue and steps stay light: never inherit the dark hero's text. */
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  :is(.ce20-experience__catalogue,.ce20-experience__next){background:#f5f8fc !important;color:#132b41 !important;color-scheme:light;}
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  :is(.ce20-experience__catalogue,.ce20-experience__next) :is(.ce-section-heading h2,.ce20-pathway-card h3,.ce20-step-grid strong){color:#10263b !important;}
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  :is(.ce20-experience__catalogue,.ce20-experience__next) :is(.ce-section-heading .ce-eyebrow,.ce20-disclosure){color:#315a72 !important;}
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  .ce20-experience__catalogue :is(.ce-pathway-card,.ce-empty-state){background:#fff !important;border-color:#cbd8e4 !important;}
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  .ce20-experience__catalogue :is(.ce-pathway-card,.ce-empty-state) p{color:#42566b !important;}
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  .ce20-experience__catalogue :is(.ce-pathway-card,.ce-empty-state) .ce-button--ghost,
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  .ce20-experience__catalogue :is(.ce-pathway-card,.ce-empty-state) a:not(.ce-button){
  color:#134e86 !important;background:#eef6fe !important;border-color:#9cb7d0 !important;
}
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  .ce20-experience__next .ce20-step-grid>li{background:#fff !important;color:#172d42 !important;}
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  .ce20-experience__next .ce20-step-grid :is(span,small){color:#334e62 !important;}
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  .ce20-experience__next .ce20-disclosure a{color:#12518d !important;text-decoration:underline;}

/* /about/, /how-it-works/, /employers/, /partners/, /partner-academies/,
   /employer-missions/, /ai-use-policy/, /insights/ and /pathways/:
   light informational sections with the dark-mode copy token still attached. */
body:is(.ce39-route-about,.ce39-route-how-it-works,.ce39-route-employers,.ce39-route-partners,.ce39-route-partner-academies,.ce39-route-employer-missions,.ce39-route-ai-use-policy,.ce39-route-insights,.ce39-route-pathways)
  .ce-main > .ce-section:not(.ce-section--dark):not([data-ce-surface="dark"]):not(.ce-page-hero--dark)
  :is(.ce-page-header>p:not(.ce-eyebrow),.ce-section-heading p:not(.ce-eyebrow),.ce-section-header p:not(.ce-eyebrow),.ce-card>p:not(.ce-eyebrow),.ce-feature-card>p:not(.ce-eyebrow),.ce-story-card>p:not(.ce-eyebrow)) {
  color:#3b5168 !important;
}
body:is(.ce39-route-about,.ce39-route-how-it-works,.ce39-route-employers,.ce39-route-partners,.ce39-route-partner-academies,.ce39-route-employer-missions,.ce39-route-ai-use-policy,.ce39-route-insights,.ce39-route-pathways)
  .ce-main > .ce-section:not(.ce-section--dark):not([data-ce-surface="dark"]):not(.ce-page-hero--pathway)
  :is(.ce-page-header>.ce-eyebrow,.ce-section-heading .ce-eyebrow,.ce-section-header .ce-eyebrow){color:#0e6086 !important;}
body:is(.ce39-route-about,.ce39-route-how-it-works,.ce39-route-employers,.ce39-route-partners,.ce39-route-partner-academies,.ce39-route-employer-missions,.ce39-route-ai-use-policy,.ce39-route-insights,.ce39-route-pathways)
  .ce-main > .ce-section:not(.ce-section--dark):not([data-ce-surface="dark"]):not(.ce-page-hero--pathway)
  :is(.ce-page-header,.ce-section-heading,.ce-section-header) :is(h1,h2,h3,strong){color:#10283d !important;}
body:is(.ce39-route-about,.ce39-route-how-it-works,.ce39-route-employers,.ce39-route-partners,.ce39-route-partner-academies,.ce39-route-employer-missions,.ce39-route-ai-use-policy,.ce39-route-insights,.ce39-route-pathways)
  .ce-main > .ce-section:not(.ce-section--dark):not([data-ce-surface="dark"])
  .ce-page-header .ce-button--ghost{
  color:#164f86 !important;background:#f2f7fd !important;border-color:#a8c1d9 !important;
}
body:is(.ce39-route-about,.ce39-route-how-it-works,.ce39-route-employers,.ce39-route-partners,.ce39-route-partner-academies,.ce39-route-employer-missions,.ce39-route-ai-use-policy,.ce39-route-insights,.ce39-route-pathways)
  .ce-main > .ce-section:not(.ce-section--dark):not([data-ce-surface="dark"])
  .ce-page-header .ce-button--primary{background:#14549e !important;color:#fff !important;}

/* /ai-actions/ and /ai-memory/: action-control and memory-overview cards are light,
   while the introductory hero remains an intentionally dark product surface. */
body:is(.ce39-route-ai-actions,.ce39-route-ai-memory)
  :is(.ce-actions-hero,.ce-memory-hero){background:linear-gradient(120deg,#081e35,#123c55)!important;color:#fff!important;}
body:is(.ce39-route-ai-actions,.ce39-route-ai-memory)
  :is(.ce-actions-hero,.ce-memory-hero) .ce-page-header :is(h1,h2,h3,strong){color:#fff!important;}
body:is(.ce39-route-ai-actions,.ce39-route-ai-memory)
  :is(.ce-actions-hero,.ce-memory-hero) .ce-page-header>p:not(.ce-eyebrow){color:#e0ebf7!important;}
body:is(.ce39-route-ai-actions,.ce39-route-ai-memory)
  :is(.ce-actions-hero,.ce-memory-hero) .ce-page-header>.ce-eyebrow{color:#94e6f0!important;}
body:is(.ce39-route-ai-actions,.ce39-route-ai-memory)
  :is(.ce-actions-hero,.ce-memory-hero) .ce-button--ghost{color:#fff!important;border-color:#a1c9dd!important;background:rgba(255,255,255,.09)!important;}
body:is(.ce39-route-ai-actions,.ce39-route-ai-memory)
  :is(.ce-actions-hero,.ce-memory-hero) .ce-button--primary{color:#fff!important;background:#1455a2!important;}
body:is(.ce39-route-ai-actions,.ce39-route-ai-memory)
  :is(.ce-actions-principles,.ce-actions-controls-section,.ce-memory-principles,.ce-memory-controls-section) .ce-card>p{color:#3b5166!important;}

/* /certifiedge-demo/: the reference demo has both white and dark instructional blocks. */
body.ce39-route-certifiedge-demo .ce-demo .ce-section--light{background:#f5f8fc!important;color:#0b2038!important;}
body.ce39-route-certifiedge-demo .ce-demo .ce-section--light :is(h1,h2,h3,strong){color:#10283d!important;}
body.ce39-route-certifiedge-demo .ce-demo .ce-section--light :is(p,li,small){color:#3b5167!important;}
body.ce39-route-certifiedge-demo .ce-demo .ce-section--light .ce-eyebrow{color:#0e6086!important;}
body.ce39-route-certifiedge-demo .ce-demo .ce-demo__failure{background:#0d2038!important;color:#eff8ff!important;}
body.ce39-route-certifiedge-demo .ce-demo .ce-demo__failure :is(h2,h3,strong){color:#fff!important;}
body.ce39-route-certifiedge-demo .ce-demo .ce-demo__failure :is(p,li,small){color:#e0ecf7!important;}
body.ce39-route-certifiedge-demo .ce-demo .ce-demo__failure .ce-eyebrow{color:#9debf0!important;}

/* /dashboard/ and /tvet-dashboard/: dark authenticated workspace panels. */
body.ce39-route-dashboard .ce30-workspace-tools{color:#edf6ff!important;}
body.ce39-route-dashboard .ce30-workspace-tools :is(h2,h3,h4,strong){color:#fff!important;}
body.ce39-route-dashboard .ce30-workspace-tools :is(p,small){color:#cbdbea!important;}
body.ce39-route-tvet-dashboard .ce2-main>.ce2-section:first-child{color:#f5faff!important;}
body.ce39-route-tvet-dashboard .ce2-main>.ce2-section:first-child :is(h1,h2,h3,strong){color:#fff!important;}
body.ce39-route-tvet-dashboard .ce2-main>.ce2-section:first-child :is(p,small){color:#d5e6f4!important;}

/* /for-universities/ lifecycle rail and /for-higher-education-intelligence/ CTA. */
body.ce39-route-for-universities .ce-up-hero{
  background:linear-gradient(120deg,#0a2845,#0f394f)!important;color:#f7fbff!important;
}
body.ce39-route-for-universities .ce-up-hero :is(h1,h2,h3,strong,li){color:#f9fcff!important;}
body.ce39-route-for-universities .ce-up-hero :is(p,small){color:#d9e9f6!important;}
body.ce39-route-for-higher-education-intelligence .ce-heip-cta :is(h2,h3,strong){color:#fff!important;}
body.ce39-route-for-higher-education-intelligence .ce-heip-cta :is(p,li,small){color:#dcebf4!important;}

/* /ask-certifiedge/ response anatomy: white note cards, not dark text panels. */
body.ce39-route-ask-certifiedge .ce-r14-answer-anatomy .ce-card,
body.ce39-route-ask-certifiedge .ce-r14-answer-anatomy article{background:#fff!important;color:#10283d!important;}
body.ce39-route-ask-certifiedge .ce-r14-answer-anatomy :is(h2,h3,strong){color:#f8fbff!important;}
body.ce39-route-ask-certifiedge .ce-r14-answer-anatomy :is(p,li,small){color:#dceaf8!important;}
body.ce39-route-ask-certifiedge .ce-r14-answer-anatomy :is(.ce-card,article) :is(h2,h3,strong){color:#10283d!important;}
body.ce39-route-ask-certifiedge .ce-r14-answer-anatomy :is(.ce-card,article) :is(p,li,small){color:#3b5167!important;}

/* /verify/: individual proof cards have bright surfaces; reset inherited white strong. */
body.ce39-route-verify .ce-phase20-shared-record :is(strong,h3,h4){color:#10283d!important;}
body.ce39-route-verify .ce-phase20-shared-record :is(p,small,span){color:#3b5268!important;}
body.ce39-route-verify .ce-phase20-shared-record{background:#fbfcfe!important;color:#10283d!important;}

/* /contact/: a light multi-step form's Back controls need dark labels. */
body.ce39-route-contact .ce-service-step button:not(.ce-button--primary),
body.ce39-route-contact .ce-service-desk__body .ce-button--ghost{
  color:#164c80!important;background:#f6f9fd!important;border-color:#a2bbd3!important;
}
body.ce39-route-contact .ce-service-desk__body li{color:#405873!important;}

/* /pricing/, /affiliates/: dark commercial hero, brighter ghost actions. */
body.ce39-route-pricing .ce10-pricing-hero,
body.ce39-route-affiliates .ce26-commercial-hero{
  background:linear-gradient(114deg,#09293f,#0f203b)!important;color:#f8fcff!important;
}
body.ce39-route-pricing .ce10-pricing-hero :is(h1,h2,h3,strong),
body.ce39-route-affiliates .ce26-commercial-hero :is(h1,h2,h3,strong){color:#fff!important;}
body.ce39-route-pricing .ce10-pricing-hero :is(p,li,small),
body.ce39-route-affiliates .ce26-commercial-hero :is(p,li,small){color:#dce9f6!important;}
body.ce39-route-pricing .ce10-pricing-hero .ce-button--ghost,
body.ce39-route-affiliates .ce26-commercial-hero .ce-button--ghost{
  color:#fff!important;background:rgba(255,255,255,.08)!important;border-color:#a4c4df!important;
}
body.ce39-route-affiliates .ce26-affiliate-page>.ce-section:not(.ce26-commercial-hero) :is(p,li,span){color:#3e5269!important;}

/* /register.../, /join/, /payments-and-billing/, /policy-governance/: light action rows. */
body:is(.ce39-route-register,.ce39-route-register-cbc,.ce39-route-register-professional,.ce39-route-register-school,.ce39-route-join)
  :is(.ce-registration-page__body,.ce-registration-router__body) .ce-button--ghost,
body.ce39-route-payments-and-billing .ce-finance-public-hero .ce-button--ghost,
body.ce39-route-policy-governance .ce5-policy-main .ce-button--ghost{
  color:#124d85!important;background:#f1f7fc!important;border-color:#a5bed4!important;
}

/* An explicit high-contrast keyboard focus state, only on audited page controls. */
body[class*="ce39-route-"] main :is(.ce-button,a,button,input,textarea,select):focus-visible{
  outline:3px solid #0f76a5;outline-offset:3px;
}
body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors,
.ce39-route-pricing,.ce39-route-affiliates,.ce39-route-ai-actions,.ce39-route-ai-memory)
  main :is(.ce20-experience__intro,.ce10-pricing-hero,.ce26-commercial-hero,.ce-actions-hero,.ce-memory-hero)
  :is(a,button):focus-visible{outline-color:#e2f6ff;}
@media (forced-colors:active){
 body:is(.ce39-route-individuals,.ce39-route-learners,.ce39-route-for-instructors)
  :is(.ce20-experience__intro,.ce20-experience__catalogue,.ce20-experience__next){background:Canvas!important;color:CanvasText!important;}
 body[class*="ce39-route-"] main :is(.ce-button,a,button):focus-visible{outline-color:Highlight!important;}
}

/* D39 deep audit, pass 2: light canvas sections erroneously inheriting a dark
   backdrop in dark-mode. Explicit route + component grouping, not a sitewide
   theme-variable or tag override. Dark heroes and data-ce-surface=dark excluded. */
body:is(.ce39-route-partners,.ce39-route-partner-academies,.ce39-route-employers,
.ce39-route-employer-missions,.ce39-route-ai-use-policy,.ce39-route-how-it-works,
.ce39-route-trust,.ce39-route-proof-passport,.ce39-route-pathways,.ce39-route-insights)
  .ce-main > .ce-section.ce-section--tight:not([data-ce-surface="dark"]):not(.ce-section--dark):not(.ce-page-hero--pathway){
  background:#f7f9fc!important;color:#10283d!important;color-scheme:light;
}
body.ce39-route-affiliates .ce26-affiliate-page>.ce-section--soft,
body.ce39-route-pricing :is(.ce10-pricing-intro,.ce10-pricing-faq),
body.ce39-route-for-instructors .ce-main>.ce-section--tight:not([data-ce-surface="dark"]){
  background:#f7f9fc!important;color:#10283d!important;color-scheme:light;
}
body:is(.ce39-route-affiliates,.ce39-route-pricing)
  :is(.ce-section--soft,.ce10-pricing-intro,.ce10-pricing-faq) :is(h2,h3,h4,strong){color:#10283d!important;}
body:is(.ce39-route-affiliates,.ce39-route-pricing)
  :is(.ce-section--soft,.ce10-pricing-intro,.ce10-pricing-faq) :is(p,li,span,small){color:#3b5167!important;}
body.ce39-route-affiliates .ce-section--soft .ce-eyebrow,
body.ce39-route-pricing .ce10-pricing-intro .ce-eyebrow{color:#16547b!important;}
body.ce39-route-pricing .ce10-value-section{
  background:#10263f!important;color:#f2f9ff!important;color-scheme:dark;
}
body.ce39-route-pricing .ce10-value-section :is(h2,h3,h4,strong){color:#f8fbff!important;}
body.ce39-route-pricing .ce10-value-section :is(p,li,small){color:#dceaf7!important;}
body.ce39-route-pricing .ce10-value-section :is(.ce-card,article){background:#fff!important;color:#172e42!important;color-scheme:light;}
body.ce39-route-pricing .ce10-value-section :is(.ce-card,article) :is(h2,h3,strong){color:#13283b!important;}
body.ce39-route-pricing .ce10-value-section :is(.ce-card,article) :is(p,li,small){color:#40536a!important;}
/* Pathway directory: dark hero; pale catalogue below it. */
body.ce39-route-pathways .ce-page-hero--pathway{
  background:linear-gradient(115deg,#082c40,#16213d)!important;color:#fff!important;color-scheme:dark;
}
body.ce39-route-pathways .ce-page-hero--pathway :is(h1,h2,h3,strong){color:#fff!important;}
body.ce39-route-pathways .ce-page-hero--pathway :is(p,li,small){color:#e0edf8!important;}
body.ce39-route-pathways .ce-page-hero--pathway .ce-eyebrow{color:#8ce2eb!important;}
/* Registration confirmation, join and payments hero: naturally light forms. */
body.ce39-route-confirm-email .ce-registration-page__hero,
body.ce39-route-join .ce-registration-router__hero,
body.ce39-route-payments-and-billing .ce-finance-public-hero{
  background:#f5f8fc!important;color:#10283d!important;color-scheme:light;
}
body.ce39-route-confirm-email .ce-registration-page__hero :is(h1,h2,h3,strong),
body.ce39-route-join .ce-registration-router__hero :is(h1,h2,h3,strong),
body.ce39-route-payments-and-billing .ce-finance-public-hero :is(h1,h2,h3,strong){color:#10283d!important;}
body.ce39-route-confirm-email .ce-registration-page__hero :is(p,li,span,small),
body.ce39-route-join .ce-registration-router__hero :is(p,li,span,small),
body.ce39-route-payments-and-billing .ce-finance-public-hero :is(p,li,span,small){color:#3c5066!important;}
body.ce39-route-confirm-email .ce-registration-page__hero .ce-eyebrow,
body.ce39-route-join .ce-registration-router__hero .ce-eyebrow,
body.ce39-route-payments-and-billing .ce-finance-public-hero .ce-eyebrow{color:#12557e!important;}
/* Account, partner and professional-access buttons that use a white surface. */
body.ce39-route-account .ce-section--tight :is(button,a).ce-button:not(.ce-button--primary),
body.ce39-route-professional-course-access .ce-section button:not(.ce-button--primary),
body:is(.ce39-route-partners,.ce39-route-partner-academies,.ce39-route-employer-missions,.ce39-route-organizations,
.ce39-route-ai-use-policy,.ce39-route-insights,.ce39-route-proof-passport) .ce-section--tight .ce-button--ghost {
  background:#eef5fc!important;color:#104e86!important;border-color:#a2bdd7!important;
}
body.ce39-route-insights .ce-section--tight .ce-card :is(strong,h3,h4),
body.ce39-route-proof-passport .ce-section--tight .ce-card :is(strong,h3,h4),
body.ce39-route-verify .ce-section--tight .ce-card strong,
body.ce39-route-support .ce23-section .ce-card strong{
  color:#142c42!important;
}
/* Targeted light cards under dark workspace background. */
body.ce39-route-reality-labs-dashboard .ce-reality-boundary :is(p,small){color:#45586d!important;}
body.ce39-route-pathways-example .ce-section:not(.ce-section--dark):not([data-ce-surface="dark"]){background:#f7f9fc!important;color:#13293b!important;}
/* Specific ghost-action and card foreground corrections discovered in pass 2. */
body:is(.ce39-route-employers,.ce39-route-how-it-works,.ce39-route-pathways,
.ce39-route-organizations) .ce-main .ce-section--tight .ce-button--ghost,
body.ce39-route-professional-course-access .ce-section .ce-button--ghost {
 background:#edf5fc!important;color:#14518b!important;border-color:#a7bfd5!important;
}
body.ce39-route-pricing :is(.ce10-organization-plans,.ce10-pricing-answers){
 background:#f7f9fc!important;color:#142b41!important;color-scheme:light;
}
body.ce39-route-pricing :is(.ce10-organization-plans,.ce10-pricing-answers) :is(h2,h3,strong){color:#142b41!important;}
body.ce39-route-pricing :is(.ce10-organization-plans,.ce10-pricing-answers) :is(p,li,small){color:#3a5167!important;}
body.ce39-route-pricing :is(.ce10-organization-plans,.ce10-pricing-answers) .ce-eyebrow{color:#165787!important;}
body.ce39-route-ask-certifiedge .ce-r14-answer-card{
 background:#fff!important;color:#142b40!important;color-scheme:light;
}
body.ce39-route-ask-certifiedge .ce-r14-answer-card :is(h3,strong){color:#142b40!important;}
body.ce39-route-ask-certifiedge .ce-r14-answer-card :is(p,span,small){color:#42586d!important;}
body.ce39-route-insights .ce-section--tight :is(.ce-insight-card,.ce-card) strong,
body.ce39-route-trust .ce-section--tight :is(.ce-trust-state,.ce-card,.ce-status-card) strong,
body.ce39-route-verify .ce-section--tight :is(.ce-card,.ce-phase20-record) strong,
body.ce39-route-support .ce23-section strong {color:#142b40!important;}
/* Pass 3: explicit light card action labels and status legends. */
body.ce39-route-insights .ce-section--tight article strong,
body.ce39-route-trust .ce-section--tight article strong,
body.ce39-route-verify .ce13-trust-note strong{color:#172c40!important;}
body.ce39-route-organizations .ce-main .ce-section--tight a.ce-button--ghost,
body.ce39-route-professional-course-access .ce-access-gate button.ce-button--ghost{
 background:#eef5fc!important;color:#124e86!important;border-color:#a2bfd5!important;
}
body.ce39-route-pathway-view .ce-main > .ce-section:not([data-ce-surface="dark"]):first-child{
 background:#f6f9fc!important;color:#122b41!important;
}
body.ce39-route-pathway-view .ce-main > .ce-section:not([data-ce-surface="dark"]):first-child :is(h1,h2,h3){color:#122b41!important;}
body.ce39-route-pathway-view .ce-main > .ce-section:not([data-ce-surface="dark"]):first-child a:not(.ce-button){color:#135487!important;}

body.ce39-route-pathway-view .ce-access-gate button.ce-button--ghost{
 background:#eef5fc!important;color:#124e86!important;border-color:#a2bfd5!important;
}
