/**
 * Contrast surfaces, ALL Ready themes, ALL schemes.
 * Law:
 *  - Light page / light band → dark type (--ink / --on-light)
 *  - Dark / photo / ink fill → light type (--on-dark / --on-ink / --cta-fg)
 *  - Never let page-link ink paint selected chips, solid CTAs, or manifesto quotes
 */

/* , ,  Manifesto: default light band → dark type; dark themes override in contrast-lock , ,  */
body.atelier .an-manifesto:not([data-surface="dark"]),
body.atelier .an-manifesto:not([data-surface="dark"]) .an-wrap,
body.atelier .an-manifesto:not([data-surface="dark"]) blockquote,
body.atelier .an-manifesto:not([data-surface="dark"]) p,
body.atelier .an-manifesto:not([data-surface="dark"]) .an-manifesto__text {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
/* Default proof band is light, dark type; niche dark proof bands re-assert below */
body.atelier .an-proof-band:not([data-tone="dark"]) {
  color: var(--ink);
}
body.atelier .an-proof-band:not([data-tone="dark"]) .an-lead,
body.atelier .an-proof-band:not([data-tone="dark"]) .an-h2,
body.atelier .an-proof-band:not([data-tone="dark"]) p {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  opacity: 1 !important;
}
/* T3 / other niche dark emerald proof bands */
body.atelier.theme-t3 .an-proof-band,
body.atelier.theme-t3 .an-proof-band .an-lead,
body.atelier.theme-t3 .an-proof-band .an-h2,
body.atelier.theme-t3 .an-proof-band p,
body.atelier.theme-t3 .an-proof-band .an-trust-item strong,
body.atelier.theme-t3 .an-proof-band .an-trust-item span {
  color: #ecfdf5 !important;
  -webkit-text-fill-color: #ecfdf5 !important;
}
body.atelier.theme-t3 .an-proof-band .an-trust-item span {
  color: #a7f3d0 !important;
  -webkit-text-fill-color: #a7f3d0 !important;
}

/* Niche skins that keep a dark manifesto , ,  light type */
body.atelier .niche-skin--manifesto .an-manifesto,
body.atelier.theme-t1 .niche-skin--manifesto .an-manifesto,
body.atelier.theme-t1 .niche-skin--manifesto .an-manifesto blockquote,
body.atelier.theme-t1 .niche-skin--manifesto .an-manifesto p {
  color: #f4efe6 !important;
  -webkit-text-fill-color: #f4efe6 !important;
}

/* , ,  Filters / chips / toggles: selected = ink fill + contrasting label , ,  */
body.atelier .an-filter,
body.atelier .ui-chip,
body.atelier .an-filters button {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  opacity: 1 !important;
  background: color-mix(in srgb, var(--bg) 94%, var(--ink) 6%);
  border-color: var(--line);
}
body.atelier .an-filter.is-on,
body.atelier .ui-chip.is-on,
body.atelier .ui-chip--accent,
body.atelier .an-filters button.is-on,
body.atelier .an-switcher__chip.is-on {
  background: var(--cta-bg, var(--ink)) !important;
  color: var(--cta-fg, var(--on-ink, #fff)) !important;
  border-color: var(--cta-border, var(--ink)) !important;
  -webkit-text-fill-color: var(--cta-fg, var(--on-ink, #fff)) !important;
  opacity: 1 !important;
}

/* Option chips (PDP) already handled, keep fill contrast locked */
body.atelier .an-chip:has(input:checked),
body.atelier .an-chip.is-on,
body.atelier .chip:has(input:checked),
body.atelier .chip.is-on {
  background: var(--cta-bg, var(--ink)) !important;
  color: var(--cta-fg, var(--on-ink, #fff)) !important;
  border-color: var(--cta-border, var(--ink)) !important;
  -webkit-text-fill-color: var(--cta-fg, var(--on-ink, #fff)) !important;
}

/* , ,  Hero kickers / meta on photo , ,  */
body.atelier .hx__chip,
body.atelier .hx__chip,
body.atelier .hx__stamp,
body.atelier .hx__still-title,
body.atelier .hx__strip-label {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}

/* , ,  Hero / photo overlays: copy white; SOLID CTAs dark-on-white , ,  */
body.atelier.scheme-light .hx .hx__frame .ui-btn--solid,
body.atelier.scheme-dark .hx .hx__frame .ui-btn--solid,
body.atelier.scheme-light .hx .hx__frame .an-btn--solid,
body.atelier.scheme-dark .hx .hx__frame .an-btn--solid,
body.atelier.scheme-light .hx .hx__frame .ui-btn--invert,
body.atelier.scheme-dark .hx .hx__frame .ui-btn--invert,
body.atelier .hx .hx__frame .ui-btn--solid,
body.atelier .hx .hx__frame .an-btn--solid,
body.atelier .hx .hx__actions .ui-btn--solid,
body.atelier .hx .hx__actions .an-btn--solid {
  background: #ffffff !important;
  color: #141210 !important;
  border-color: #ffffff !important;
  -webkit-text-fill-color: #141210 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
body.atelier.scheme-light .hx .hx__frame .ui-btn--solid *,
body.atelier.scheme-dark .hx .hx__frame .ui-btn--solid *,
body.atelier.scheme-light .hx .hx__frame .an-btn--solid *,
body.atelier.scheme-dark .hx .hx__frame .an-btn--solid *,
body.atelier .hx .hx__frame .ui-btn--solid *,
body.atelier .hx .hx__frame .an-btn--solid *,
body.atelier .hx .hx__actions .ui-btn--solid .an-btn__label,
body.atelier .hx .hx__actions .an-btn--solid .an-btn__label {
  color: #141210 !important;
  -webkit-text-fill-color: #141210 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

/* Ghost / outline on hero stays white */
body.atelier.scheme-light .hx .hx__frame .ui-btn--ghost,
body.atelier.scheme-dark .hx .hx__frame .ui-btn--ghost,
body.atelier.scheme-light .hx .hx__frame .an-btn--ghost,
body.atelier.scheme-dark .hx .hx__frame .an-btn--ghost,
body.atelier.scheme-light .hx .hx__frame .an-btn--ghost-dark,
body.atelier.scheme-dark .hx .hx__frame .an-btn--ghost-dark,
body.atelier.scheme-light .hx .hx__frame .ui-btn--outline,
body.atelier.scheme-dark .hx .hx__frame .ui-btn--outline,
body.atelier .hx .hx__actions .ui-btn--ghost,
body.atelier .hx .hx__actions .an-btn--ghost-dark {
  background: rgba(0, 0, 0, 0.45) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.85) !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
}
body.atelier.scheme-light .hx .hx__frame .ui-btn--ghost *,
body.atelier.scheme-dark .hx .hx__frame .ui-btn--ghost *,
body.atelier.scheme-light .hx .hx__frame .an-btn--ghost *,
body.atelier.scheme-dark .hx .hx__frame .an-btn--ghost *,
body.atelier.scheme-light .hx .hx__frame .an-btn--ghost-dark *,
body.atelier.scheme-dark .hx .hx__frame .an-btn--ghost-dark * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
}

/* Sale / rose CTAs on hero, white on accent */
body.atelier.scheme-light .hx .hx__frame .ui-btn--sale,
body.atelier.scheme-dark .hx .hx__frame .ui-btn--sale,
body.atelier.scheme-light .hx .hx__frame .an-btn--sale,
body.atelier.scheme-dark .hx .hx__frame .an-btn--sale,
body.atelier.scheme-light .hx .hx__frame .ui-btn--rose,
body.atelier.scheme-dark .hx .hx__frame .ui-btn--rose {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
}

/* , ,  Page solid CTAs (outside hero, hero rules above win via higher specificity) , ,  */
body.atelier main .an-section .an-btn--solid,
body.atelier main .an-rail-block .an-btn--solid,
body.atelier main .an-desire .an-btn--solid,
body.atelier main .an-fomo .an-btn--solid,
body.atelier main .an-complete .an-btn--solid,
body.atelier main .an-footer-cta .an-btn--solid,
body.atelier .an-btn--solid .an-btn__label,
body.atelier .an-bag-cta {
  color: var(--cta-fg, var(--on-ink, #fff)) !important;
  -webkit-text-fill-color: var(--cta-fg, var(--on-ink, #fff)) !important;
  opacity: 1 !important;
}

/* Quick-add / inverted chrome on product media */
body.atelier .an-product__quick {
  color: var(--on-ink, #fff) !important;
  -webkit-text-fill-color: var(--on-ink, #fff) !important;
}

/*
 * Product badges + cues, every theme / niche skin.
 * Fill + label use contrast tokens (never assume white on sale).
 */
body.atelier .an-product__badge,
body.atelier .an-fomo__badge,
body.atelier[class*="theme-t"] .an-product__badge {
  background: var(--sale, #b91c1c) !important;
  color: var(--on-sale, #ffffff) !important;
  -webkit-text-fill-color: var(--on-sale, #ffffff) !important;
  border-color: transparent !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
body.atelier .an-product__badge--sale,
body.atelier[class*="theme-t"] .an-product__badge--sale {
  background: var(--sale, #b91c1c) !important;
  color: var(--on-sale, #ffffff) !important;
  -webkit-text-fill-color: var(--on-sale, #ffffff) !important;
}
body.atelier .an-product__badge--fomo,
body.atelier[class*="theme-t"] .an-product__badge--fomo {
  background: #be123c !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
body.atelier .an-product__cue,
body.atelier[class*="theme-t"] .an-product__cue {
  background: var(--ink) !important;
  color: var(--on-ink, #ffffff) !important;
  -webkit-text-fill-color: var(--on-ink, #ffffff) !important;
  border-color: transparent !important;
  opacity: 1 !important;
  text-shadow: none !important;
  backdrop-filter: none !important;
}
/* Niche shape only, never override fill/type above */
body.atelier.theme-t2 .an-product__badge,
body.atelier.theme-t6 .an-product__badge { border-radius: 999px !important; }
body.atelier.theme-t1 .an-product__badge,
body.atelier.theme-t4 .an-product__badge,
body.atelier.theme-t8 .an-product__badge { border-radius: 0 !important; }

/* News / sale / urgency bands, white type; solid CTA = dark on white */
body.atelier .an-news .an-btn--solid,
body.atelier .an-sale-banner .an-btn--solid,
body.atelier .an-cta-band--urgency .an-btn--solid,
body.atelier .an-news .an-btn--solid .an-btn__label,
body.atelier .an-sale-banner .an-btn--solid .an-btn__label {
  background: #fff !important;
  color: #141210 !important;
  border-color: #fff !important;
  -webkit-text-fill-color: #141210 !important;
}
body.atelier .an-news .an-btn--ghost,
body.atelier .an-news .an-btn--ghost-dark,
body.atelier .an-sale-banner .an-btn--ghost-dark,
body.atelier .an-cta-band--urgency .an-btn--ghost-dark {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.75) !important;
  -webkit-text-fill-color: #fff !important;
}
