/* CustodyProviders.com — final contrast hardening, 2026-08-17
   Loaded last. Context-aware overrides only; no layout or SEO changes. */
:root{
  --cp-text:#172033;
  --cp-heading:#071a2f;
  --cp-muted:#475569;
  --cp-link:#1d4ed8;
  --cp-dark:#071a2f;
  --cp-dark-text:#f8fbff;
  --cp-dark-muted:#d7e3f4;
  --cp-dark-link:#dbeafe;
}

/* Light surfaces: explicit readable text. */
html body :where(.card,.content-card,.sidebar-card,.contact-card,.hero-card,.pricing-card,.pricing-tier-clean,.provider-card,.notice-card,.topic-card,.faq-card,.results-shell,.cta-panel,.matcher-shell,.matcher-result,.score-policy,.score-policy-item,.rfp-builder,.lead-policy-card,.procurement-item,.revenue-item,.pricing-lead-card,.provider-lead-cta,.mini-metrics>div,.meta-box,.signal,.metric,.faq-item,details){
  color:var(--cp-text)!important;
}
html body :where(.card,.content-card,.sidebar-card,.contact-card,.hero-card,.pricing-card,.pricing-tier-clean,.provider-card,.notice-card,.topic-card,.faq-card,.results-shell,.cta-panel,.matcher-shell,.matcher-result,.score-policy,.score-policy-item,.rfp-builder,.lead-policy-card,.procurement-item,.revenue-item,.pricing-lead-card,.provider-lead-cta,.mini-metrics>div,.meta-box,.signal,.metric,.faq-item,details) :where(h1,h2,h3,h4,h5,h6,strong,b,summary){
  color:var(--cp-heading)!important;
  -webkit-text-fill-color:var(--cp-heading)!important;
  opacity:1!important;
}
html body :where(.card,.content-card,.sidebar-card,.contact-card,.hero-card,.pricing-card,.pricing-tier-clean,.provider-card,.notice-card,.topic-card,.faq-card,.results-shell,.cta-panel,.matcher-shell,.matcher-result,.score-policy,.score-policy-item,.rfp-builder,.lead-policy-card,.procurement-item,.revenue-item,.pricing-lead-card,.provider-lead-cta,.mini-metrics>div,.meta-box,.signal,.metric,.faq-item,details) :where(p,li,span,small,dd,dt,figcaption,.muted,.small,.lead){
  color:var(--cp-muted)!important;
  -webkit-text-fill-color:var(--cp-muted)!important;
  opacity:1!important;
}
html body :where(.card,.content-card,.sidebar-card,.contact-card,.hero-card,.pricing-card,.provider-card,.topic-card,.faq-card,.cta-panel,.matcher-shell,.matcher-result,.rfp-builder) a:not(.btn):not(.pill){
  color:var(--cp-link)!important;
  -webkit-text-fill-color:var(--cp-link)!important;
}

/* Dark surfaces: these selectors intentionally outrank generic readability rules. */
html body :where(.lead-panel,.steps-section,.cta-band,.footer,.site-footer,.dark-section,.dark-panel,.dark-card,.navy-panel,.navy-card,[data-theme="dark"]){
  background-color:var(--cp-dark)!important;
  color:var(--cp-dark-text)!important;
}
html body :where(.lead-panel,.steps-section,.cta-band,.footer,.site-footer,.dark-section,.dark-panel,.dark-card,.navy-panel,.navy-card,[data-theme="dark"]) :where(h1,h2,h3,h4,h5,h6,strong,b,summary,.eyebrow,.section-eyebrow,.hero-eyebrow){
  color:var(--cp-dark-text)!important;
  -webkit-text-fill-color:var(--cp-dark-text)!important;
  opacity:1!important;
}
html body :where(.lead-panel,.steps-section,.cta-band,.footer,.site-footer,.dark-section,.dark-panel,.dark-card,.navy-panel,.navy-card,[data-theme="dark"]) :where(p,li,span,small,dd,dt,figcaption,.muted,.small,.lead,.footer-copy){
  color:var(--cp-dark-muted)!important;
  -webkit-text-fill-color:var(--cp-dark-muted)!important;
  opacity:1!important;
}
html body :where(.lead-panel,.steps-section,.cta-band,.footer,.site-footer,.dark-section,.dark-panel,.dark-card,.navy-panel,.navy-card,[data-theme="dark"]) a:not(.btn){
  color:var(--cp-dark-link)!important;
  -webkit-text-fill-color:var(--cp-dark-link)!important;
}

/* Lead panel in particular was vulnerable to global .muted/.strong rules. */
html body .lead-panel h2,
html body .lead-panel h3,
html body .lead-panel strong,
html body .lead-panel .eyebrow{color:#fff!important;-webkit-text-fill-color:#fff!important}
html body .lead-panel p,
html body .lead-panel .muted,
html body .lead-panel small,
html body .lead-panel span{color:#d7e3f4!important;-webkit-text-fill-color:#d7e3f4!important;opacity:1!important}
html body .lead-panel .btn-primary,
html body .lead-panel a.btn-primary,
html body .lead-panel button.btn-primary{background:#fff!important;border-color:#fff!important;color:#071a2f!important;-webkit-text-fill-color:#071a2f!important}

/* Dark economics cards retain dark treatment on desktop and mobile. */
html body .lead-economics-card{background:#071a2f!important;color:#fff!important}
html body .lead-economics-card strong{color:#fff!important;-webkit-text-fill-color:#fff!important}
html body .lead-economics-card span,
html body .lead-economics-card p{color:#d7e3f4!important;-webkit-text-fill-color:#d7e3f4!important}

/* Verification modal: high contrast at every breakpoint. */
#unverified-website-modal .ca-unverified-card{background:#071a2f!important;color:#fff!important}
#unverified-website-modal .ca-unverified-card h2{color:#fff!important;-webkit-text-fill-color:#fff!important}
#unverified-website-modal .ca-unverified-card p{color:#dbe7f7!important;-webkit-text-fill-color:#dbe7f7!important;opacity:1!important}
#unverified-website-modal .ca-unverified-card .ca-unverified-request{background:#2563eb!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border:1px solid #4f8cff!important}

/* Platform / verification pages intentionally use dark UI. */
body.ca-page{color:#f8fbff!important}
body.ca-page :where(h1,h2,h3,h4,h5,h6,strong,b,label,.ca-legend){color:#f8fbff!important;-webkit-text-fill-color:#f8fbff!important}
body.ca-page :where(p,li,span,small,dd,dt,.ca-muted,.ca-disclaimer){color:#cbd8ea!important;-webkit-text-fill-color:#cbd8ea!important;opacity:1!important}
body.ca-page a{color:#a9c7ff!important;-webkit-text-fill-color:#a9c7ff!important}
body.ca-page :where(input,textarea,select,option){background:#07162d!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
body.ca-page :where(input,textarea)::placeholder{color:#aebdd2!important;-webkit-text-fill-color:#aebdd2!important;opacity:1!important}

/* Primary actions always retain WCAG-safe white text on blue. */
html body :where(.btn-primary,.btn.primary,.nav-cta,[type="submit"].btn-primary){color:#fff!important;-webkit-text-fill-color:#fff!important}

@media(max-width:900px){
  /* Re-assert dark sections after legacy mobile rules that make every card white. */
  html body :where(.lead-panel,.steps-section,.cta-band,.footer,.site-footer,.dark-section,.dark-panel,.dark-card,.navy-panel,.navy-card,[data-theme="dark"]){background:#071a2f!important;color:#fff!important}
  html body :where(.lead-panel,.steps-section,.cta-band,.footer,.site-footer,.dark-section,.dark-panel,.dark-card,.navy-panel,.navy-card,[data-theme="dark"]) :where(h1,h2,h3,h4,h5,h6,strong,b,.eyebrow){color:#fff!important;-webkit-text-fill-color:#fff!important}
  html body :where(.lead-panel,.steps-section,.cta-band,.footer,.site-footer,.dark-section,.dark-panel,.dark-card,.navy-panel,.navy-card,[data-theme="dark"]) :where(p,li,span,small,.muted,.small,.lead){color:#d7e3f4!important;-webkit-text-fill-color:#d7e3f4!important}
}
.provider-index-grid{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.provider-index-grid .pill{display:inline-flex;align-items:center;min-height:42px;padding:9px 12px;background:#fff!important;color:#1e3a5f!important;border:1px solid #dbe4ef!important;border-radius:999px;text-decoration:none;font-weight:700}
.provider-index-grid .pill:hover{background:#eff6ff!important;color:#1d4ed8!important;border-color:#bfdbfe!important}
