/* Final theme-aware contrast repair. Loaded last on every sample page. */

body.samples-library .eyebrow {
  color: #41585c !important;
}

/* Meridian RCM Partners: black and gold with explicit light foregrounds. */
html body.theme-metallic-luxe .site-header .brand strong {
  color: #f2cf67 !important;
}

html body.theme-metallic-luxe .site-header .brand small,
html body.theme-metallic-luxe .site-header .nav-links a {
  color: #fff4d2 !important;
}

html body.theme-metallic-luxe main :is(.hero, .studio-hero, .page-hero, .service-detail-hero) :is(h1, h2, h3, h4, p, li, dt, dd, strong, small),
html body.theme-metallic-luxe main :is(.specialty-card, .service-card, .resource-card, .testimonial-card, .fit-card, .process-card, .detail-card, .article-body, .contact-section) :is(h1, h2, h3, h4, strong) {
  color: #fff4d2 !important;
  text-shadow: none !important;
}

html body.theme-metallic-luxe main :is(.specialty-card, .service-card, .resource-card, .testimonial-card, .fit-card, .process-card, .detail-card, .article-body, .contact-section) :is(p, li, dd, small) {
  color: #d8cdb6 !important;
  opacity: 1 !important;
}

html body.theme-metallic-luxe main :is(.hero, .studio-hero, .page-hero, .service-detail-hero, .section-heading, .article-body) :is(.eyebrow, .tag, .badge, .pill) {
  color: #120d04 !important;
  background: #f2cf67 !important;
}

html body.theme-metallic-luxe .button.primary,
html body.theme-metallic-luxe a.button.primary,
html body.theme-metallic-luxe button.button.primary {
  color: #120d04 !important;
  background: linear-gradient(135deg, #fff4d2, #e5c256) !important;
  border-color: #f2cf67 !important;
}

html body.theme-metallic-luxe .button.secondary,
html body.theme-metallic-luxe a.button.secondary {
  color: #fff4d2 !important;
  background: #211a0e !important;
  border-color: rgba(242, 207, 103, .58) !important;
}

html body.theme-metallic-luxe :is(.link-more, .open),
html body.theme-metallic-luxe .site-footer a,
html body.theme-metallic-luxe .site-footer strong {
  color: #f2cf67 !important;
}

html body.theme-metallic-luxe .site-footer p {
  color: #d8cdb6 !important;
}

/* ClaimSync: dark command-center panels with bright foregrounds. */
html body.theme-neon-grid .site-header .brand strong {
  color: #67e8ff !important;
}

html body.theme-neon-grid .site-header .brand small {
  color: #bfd0e2 !important;
}

html body.theme-neon-grid .site-header .nav-links a {
  color: #f4fbff !important;
}

html body.theme-neon-grid main :is(.hero, .studio-hero, .page-hero, .service-detail-hero) :is(h1, h2, h3, h4, p, li, dt, dd, strong, small),
html body.theme-neon-grid main :is(.specialty-card, .service-card, .resource-card, .testimonial-card, .fit-card, .process-card, .detail-card, .article-body, .contact-section) :is(h1, h2, h3, h4, strong) {
  color: #f4fbff !important;
  text-shadow: none !important;
}

html body.theme-neon-grid main :is(.specialty-card, .service-card, .resource-card, .testimonial-card, .fit-card, .process-card, .detail-card, .article-body, .contact-section) :is(p, li, dd, small) {
  color: #bfd0e2 !important;
  opacity: 1 !important;
}

html body.theme-neon-grid main :is(.hero, .studio-hero, .page-hero, .service-detail-hero, .section-heading, .article-body) :is(.eyebrow, .tag, .badge, .pill) {
  color: #061018 !important;
  background: linear-gradient(90deg, #67e8ff, #d9f77b 56%, #ff9dcc) !important;
}

html body.theme-neon-grid .button.primary,
html body.theme-neon-grid a.button.primary,
html body.theme-neon-grid button.button.primary {
  color: #061018 !important;
  background: linear-gradient(135deg, #fff0a8, #9ceeff) !important;
  border-color: transparent !important;
}

html body.theme-neon-grid .button.secondary,
html body.theme-neon-grid a.button.secondary {
  color: #f4fbff !important;
  background: #111c2d !important;
  border-color: rgba(103, 232, 255, .52) !important;
}

html body.theme-neon-grid :is(.link-more, .open),
html body.theme-neon-grid .site-footer a,
html body.theme-neon-grid .site-footer strong {
  color: #67e8ff !important;
}

html body.theme-neon-grid .site-footer p {
  color: #bfd0e2 !important;
}

/* Keep light modal surfaces dark, even inside the two dark themes. */
html body:is(.theme-metallic-luxe, .theme-neon-grid) :is(.asset-modal__panel, .package-modal__panel) :is(h1, h2, h3, h4, p, li, dt, dd, span, strong, small, label) {
  color: #172033 !important;
}

html body:is(.theme-metallic-luxe, .theme-neon-grid) :is(.asset-modal__panel, .package-modal__panel) :is(.eyebrow, .package-modal__eyebrow) {
  color: #17333a !important;
  background: #eef9f4 !important;
}

/* BrightPath: retain the energetic palette while darkening small pink text. */
html body.theme-vibrant-prism .summary-card dt,
html body.theme-vibrant-prism main :is(.service-list, .support-grid, .systems-grid, .resource-grid, .testimonial-grid, .faq-list) dt,
html body.theme-vibrant-prism .site-footer a {
  color: #a31957 !important;
}

html body.theme-vibrant-prism main .wrap.cta,
html body.theme-vibrant-prism main section.wrap.cta {
  color: #ffffff !important;
}

html body.theme-vibrant-prism main .wrap.cta h2 {
  color: #ffffff !important;
}

html body.theme-vibrant-prism main .wrap.cta p {
  color: #e2e8f5 !important;
}

/* Cedar Ridge: deepen the olive and clay accents used for small labels. */
html body.theme-terra-claims :is(.eyebrow, .tag, .badge, .pill) {
  color: #fffaf2 !important;
  background: #5b6635 !important;
}

html body.theme-terra-claims .summary-card :is(dt, h3),
html body.theme-terra-claims main :is(.service-list, .support-grid, .systems-grid, .resource-grid, .testimonial-grid, .faq-list) :is(dt, h3, strong),
html body.theme-terra-claims .site-footer a {
  color: #9b452f !important;
}

/* Light themes: remove the low-contrast pink inherited by footer links. */
html body.theme-coastal-ledger .site-footer a {
  color: #0f6f78 !important;
}

html body.theme-kinetic-ledger .site-footer a {
  color: #214bc5 !important;
}

html body[class*="theme-"] :is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid currentColor !important;
  outline-offset: 3px !important;
}

/* Specificity lock for legacy rules that target nested anchors and card grids. */
html body.theme-metallic-luxe.theme-metallic-luxe .site-header.site-header .brand.brand strong,
html body.theme-metallic-luxe.theme-metallic-luxe .site-footer.site-footer strong {
  color: #f2cf67 !important;
}

html body.theme-metallic-luxe.theme-metallic-luxe main :is(.service-list, .support-grid, .systems-grid, .trust-grid, .mosaic-grid, .reason-stack, .resource-grid, .testimonial-grid, .faq-list, .specialty-grid) > article :is(h1, h2, h3, h4, strong),
html body.theme-metallic-luxe.theme-metallic-luxe main .specialty-polish .service-list article :is(h1, h2, h3, h4, strong) {
  color: #fff4d2 !important;
}

html body.theme-metallic-luxe.theme-metallic-luxe main :is(.service-list, .support-grid, .systems-grid, .trust-grid, .mosaic-grid, .reason-stack, .resource-grid, .testimonial-grid, .faq-list, .specialty-grid) > article :is(p, li, dd, small),
html body.theme-metallic-luxe.theme-metallic-luxe main .specialty-polish .service-list article :is(p, li, dd, small) {
  color: #d8cdb6 !important;
}

html body.theme-neon-grid.theme-neon-grid .site-header.site-header .brand.brand strong,
html body.theme-neon-grid.theme-neon-grid .site-footer.site-footer strong {
  color: #67e8ff !important;
}

html body.theme-neon-grid.theme-neon-grid main :is(.service-list, .support-grid, .systems-grid, .trust-grid, .mosaic-grid, .reason-stack, .resource-grid, .testimonial-grid, .faq-list, .specialty-grid) > article :is(h1, h2, h3, h4, strong),
html body.theme-neon-grid.theme-neon-grid main .specialty-polish .service-list article :is(h1, h2, h3, h4, strong) {
  color: #f4fbff !important;
}

html body.theme-neon-grid.theme-neon-grid main :is(.service-list, .support-grid, .systems-grid, .trust-grid, .mosaic-grid, .reason-stack, .resource-grid, .testimonial-grid, .faq-list, .specialty-grid) > article :is(p, li, dd, small),
html body.theme-neon-grid.theme-neon-grid main .specialty-polish .service-list article :is(p, li, dd, small) {
  color: #bfd0e2 !important;
}

/* Keep the long contact forms spacious enough to scan on desktop. */
@media (min-width: 981px) {
  html body:is(.theme-metallic-luxe, .theme-neon-grid) main .contact-section:has(> .quote-form) {
    grid-template-columns: minmax(260px, 0.36fr) minmax(0, 1fr) !important;
    align-items: start !important;
  }

  html body:is(.theme-metallic-luxe, .theme-neon-grid) main .contact-section > .quote-form {
    width: 100% !important;
    max-width: none !important;
    margin-top: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body:is(.theme-metallic-luxe, .theme-neon-grid) main .contact-section > .quote-form label:has(textarea),
  html body:is(.theme-metallic-luxe, .theme-neon-grid) main .contact-section > .quote-form :is(.form-note, .form-status) {
    grid-column: 1 / -1 !important;
  }

  html body:is(.theme-metallic-luxe, .theme-neon-grid) main .contact-section > .scheduler-box {
    grid-column: 2 !important;
  }
}
