/* Mobile final contrast fix
   Purpose: prevent white text on white or light card backgrounds on mobile while keeping dark footer, mobile menu and primary buttons readable. */
@media (max-width: 900px){
  html, body{
    background:#f8fafc !important;
    color:#172033 !important;
    -webkit-text-fill-color:initial !important;
  }

  .hero,
  .hero-subpage,
  .section,
  main,
  .content-card,
  .sidebar-card,
  .contact-card,
  .pricing-card,
  .pricing-tier,
  .pricing-tier-clean,
  .provider-card,
  .card,
  .notice-card,
  .topic-card,
  .faq-card,
  .research-card,
  .legal-card,
  .filters-shell,
  .results-shell,
  .hero-card,
  .cta-panel,
  .mini-metrics div,
  .meta-box,
  .signal,
  .metric,
  .faq-item,
  details,
  summary,
  .lead-economics-card,
  .revenue-item,
  .pricing-lead-card,
  .provider-lead-cta{
    background:#ffffff !important;
    color:#172033 !important;
    -webkit-text-fill-color:initial !important;
    border-color:#dbe4f0 !important;
  }

  main h1, main h2, main h3, main h4, main h5, main h6,
  .hero h1, .hero h2, .hero h3,
  .content-card h1, .content-card h2, .content-card h3,
  .sidebar-card h3,
  .provider-card h3,
  .provider-name,
  .provider-logo-name,
  .mini-metrics strong,
  .meta-box strong,
  .signal strong,
  .metric strong,
  .faq-item summary,
  .section-title,
  label,
  .form-label,
  strong, b{
    color:#071a2f !important;
    -webkit-text-fill-color:#071a2f !important;
    opacity:1 !important;
  }

  main p, main li, main span, main small, main dd, main dt, main figcaption,
  .lead,
  .muted,
  .small,
  .provider-sub,
  .provider-description,
  .status-note,
  .footer-copy,
  .micro-note,
  .tier-copy,
  .plan-note,
  .tier-note,
  .price-period,
  .price-subline,
  .content-card p,
  .sidebar-card p,
  .card p,
  .provider-card p,
  .topic-card p,
  .faq-item p,
  .cta-panel p,
  .mini-metrics span,
  .meta-box span,
  .signal span,
  .metric span,
  .filter-hint,
  .count-pill{
    color:#334155 !important;
    -webkit-text-fill-color:#334155 !important;
    opacity:1 !important;
  }

  .eyebrow,
  .section-eyebrow,
  .hero-eyebrow,
  .toc-label,
  .provider-logo-label,
  main a:not(.btn):not(.pill):not(.topic-card):not(.provider-card){
    color:#1d4ed8 !important;
    -webkit-text-fill-color:#1d4ed8 !important;
  }

  .pill,
  a.pill,
  .badge,
  .badge-standard,
  .badge-featured,
  .badge-institutional{
    background:#f8fafc !important;
    color:#1e3a5f !important;
    -webkit-text-fill-color:#1e3a5f !important;
    border-color:#dbe4f0 !important;
  }

  input,
  textarea,
  select,
  option,
  .form-input,
  .form-select,
  .form-textarea,
  .search-input,
  .contact-card input,
  .contact-card textarea,
  .contact-card select,
  form input,
  form textarea,
  form select{
    background:#ffffff !important;
    color:#172033 !important;
    -webkit-text-fill-color:#172033 !important;
    border-color:#cbd5e1 !important;
    color-scheme:light !important;
  }

  input::placeholder,
  textarea::placeholder,
  .search-input::placeholder{
    color:#64748b !important;
    -webkit-text-fill-color:#64748b !important;
    opacity:1 !important;
  }

  .btn-primary,
  .btn.primary,
  a.btn-primary,
  button.btn-primary,
  .nav-cta,
  .header-actions .btn-primary,
  [type="submit"].btn-primary{
    background:#2563eb !important;
    border-color:#2563eb !important;
    color:#ffffff !important;
    -webkit-text-fill-color:#ffffff !important;
  }

  .btn-primary *,
  .btn.primary *,
  .nav-cta *{
    color:#ffffff !important;
    -webkit-text-fill-color:#ffffff !important;
  }

  .btn:not(.btn-primary):not(.primary),
  a.btn:not(.btn-primary):not(.primary),
  button.btn:not(.btn-primary):not(.primary){
    background:#ffffff !important;
    border-color:#cbd5e1 !important;
    color:#071a2f !important;
    -webkit-text-fill-color:#071a2f !important;
  }

  .header,
  .site-header,
  .nav{
    background:#ffffff !important;
    color:#071a2f !important;
    -webkit-text-fill-color:initial !important;
  }
  .brand,
  .brand span,
  .brand em,
  .logo,
  .logo span,
  .logo em{
    color:#071a2f !important;
    -webkit-text-fill-color:#071a2f !important;
  }
  .brand-mark,
  .logo-icon{
    background:#2563eb !important;
    color:#ffffff !important;
    -webkit-text-fill-color:#ffffff !important;
  }
  .mobile-toggle,
  .mobile-menu-toggle,
  #subpage-mobile-menu-toggle,
  .hamburger{
    background:#ffffff !important;
    color:#071a2f !important;
    -webkit-text-fill-color:#071a2f !important;
    border-color:#cbd5e1 !important;
  }
  .mobile-toggle span,
  .mobile-menu-toggle span,
  #subpage-mobile-menu-toggle span,
  .hamburger span{
    background:#071a2f !important;
  }

  .mobile-panel,
  .mobile-nav,
  #global-mobile-menu-panel,
  .footer,
  .site-footer,
  .cta-band,
  .lead-panel{
    background:#071a2f !important;
    color:#ffffff !important;
    -webkit-text-fill-color:initial !important;
    border-color:rgba(255,255,255,.16) !important;
  }
  .mobile-panel a,
  .mobile-nav a,
  #global-mobile-menu-panel a,
  .footer a,
  .footer p,
  .footer li,
  .footer h1,
  .footer h2,
  .footer h3,
  .footer h4,
  .footer strong,
  .site-footer a,
  .site-footer p,
  .site-footer li,
  .site-footer h1,
  .site-footer h2,
  .site-footer h3,
  .site-footer h4,
  .cta-band h2,
  .cta-band p,
  .lead-panel h2,
  .lead-panel h3,
  .lead-panel p{
    color:#ffffff !important;
    -webkit-text-fill-color:#ffffff !important;
  }
  .mobile-panel a,
  .mobile-nav a,
  #global-mobile-menu-panel a{
    background:#0f2748 !important;
  }
}
