/**
 * SOLID TYPE, every Ready theme × every color palette.
 * Law: page copy = --ink at opacity 1. Never muted-wash body text. Never opacity fades.
 */

body.atelier,
body.atelier.scheme-light,
body.atelier.scheme-dark {
  --type: var(--ink);
  --type-soft: var(--ink);
  color: var(--ink);
}

/* Kill opacity on all readable text */
body.atelier :is(
  h1, h2, h3, h4, h5, h6,
  p, li, a, label, legend, blockquote, figcaption,
  dt, dd, small, strong, em, b, i, cite, summary, span,
  .an-kicker, .an-lead, .an-h2, .an-logo, .an-logo__theme,
  .an-btn__label, .an-btn, .ui-btn, .ui-badge, .ui-chip,
  .an-filter, .an-chip, .chip, .an-nav a, .an-util,
  .an-product__meta h3, .an-product__social, .an-product__invite,
  .an-product__badge, .an-product__cue, .an-product__quick,
  .an-price, .an-fomo__badge, .an-fomo__pulse, .an-fomo__price,
  .an-complete__meta h3, .an-complete__role, .an-look h3, .an-look p,
  .an-review h3, .an-review p, .an-journal h3, .an-journal p,
  .an-manifesto blockquote, .an-manifesto p, .an-manifesto__text,
  .an-footer a, .an-footer__tag, .an-footer__brand, .an-footer__legal,
  .an-press__label, .an-press__mark, .an-trust-item strong, .an-trust-item span,
  .an-stars__count, .an-topbar, .an-topbar a, .an-topbar p,
  .an-marquee span, .an-sale-banner .an-h2, .an-sale-banner p, .an-sale-banner .an-lead,
  .an-news .an-h2, .an-news p, .an-cta-band .an-h2, .an-cta-band .an-lead,
  .an-global__msg, .an-aov-nudge__copy p, .an-aov-nudge__sub,
  .an-desire .an-lead, .an-option__legend, .hx__chip, .hx__brand, .hx__line,
  .hx__sub, .hx__proof, .hx__timer, .hx__timer b, .hx__timer small,
  .hx__still-name, .hx__stamp, .hx__spec, .hx__role, .hx__dossier-id,
  .an-dest__title, .an-dest__meta, .an-card__body h3, .an-card__body p,
  .an-mosaic__body, .an-cats__label, .an-cats__meta
) {
  opacity: 1 !important;
}

/*
 * PAGE SURFACES (not on photography / dark bands):
 * All readable copy uses solid --ink, palettes must not gray-out leads/paragraphs.
 */
/*
 * Page ink, scoped to page chrome/sections only.
 * Do NOT target bare h1/h2/p (heroes use those and must stay white).
 */
body.atelier.scheme-light main :is(
  .an-h2, .an-lead, .an-product__meta h3,
  .an-product__social, .an-product__invite, .an-look h3, .an-look p,
  .an-review h3, .an-review p, .an-journal h3, .an-journal p,
  .an-fomo__body h3, .an-fomo__body h3 a, .an-fomo__pulse, .an-fomo__price span,
  .an-complete__meta h3, .an-footer__brand, .an-footer__tag,
  .an-footer__legal, .an-footer a:not(.an-btn), .an-price > span,
  .an-stars__count, .an-aov-nudge__copy p, .an-aov-nudge__sub, .an-global__msg,
  .an-trust-convert__row span, .an-pain__levers li, .rte, .an-policy__block p,
  .an-cart-line__meta p, .an-takeaway p, .an-craft li, .an-option__legend,
  .an-field__label, .an-check__text, .an-buy h1, .an-section .an-h2, .an-block .an-h2
),
body.atelier.scheme-light .an-header :is(.an-util, .an-util span, .an-logo__theme, .an-menu-btn),
body.atelier.scheme-light .an-header .an-nav a:not(:hover):not(:focus-visible):not(:active),
body.atelier.scheme-light .an-footer :is(.an-footer__brand, .an-footer__tag, a:not(.an-btn)) {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  opacity: 1 !important;
}

body.atelier.scheme-dark main :is(
  .an-h2, .an-lead, .an-product__meta h3,
  .an-product__social, .an-product__invite, .an-look h3, .an-look p,
  .an-review h3, .an-review p, .an-fomo__body h3, .an-fomo__body h3 a,
  .an-complete__meta h3, .an-footer__brand, .an-footer__tag,
  .an-footer a:not(.an-btn), .an-price > span, .an-aov-nudge__copy p, .an-global__msg, .an-buy h1
),
body.atelier.scheme-dark .an-header :is(.an-util, .an-util span, .an-logo__theme, .an-menu-btn),
body.atelier.scheme-dark .an-header .an-nav a:not(:hover):not(:focus-visible):not(:active) {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  opacity: 1 !important;
}

/* Kickers: contrast-safe accent (falls back to ink when accent washes on page bg) */
body.atelier .an-kicker:not(.an-kicker--on-dark) {
  color: var(--kicker, var(--ink)) !important;
  -webkit-text-fill-color: var(--kicker, var(--ink)) !important;
  opacity: 1 !important;
}

/* Strikethrough / true tertiary only */
body.atelier .an-price s,
body.atelier s {
  color: var(--muted) !important;
  -webkit-text-fill-color: var(--muted) !important;
  opacity: 1 !important;
}

/* Dark ecommerce bands, solid white (base; FINAL block at file end wins over page-ink) */
body.atelier :is(
  .an-topbar, .an-news, .an-marquee, .an-sale-banner,
  .an-cta-band--urgency, .an-cta-band[data-surface="dark"], [data-surface="dark"]
)
  :is(p, a:not(.an-btn):not(.ui-btn), span, .an-h2, .an-lead, .an-kicker, .an-news__lead, small, strong, h1, h2, h3) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}

/* Heroes, PHOTO overlay frames only. Light desk / twin / swiss must NOT get white type. */
body.atelier main .hx:has(.hx__media) :is(
  .hx__frame, .hx__thumb-top, .hx__thumb-dock, .hx__mast, .hx__caption
) :is(
  h1, h2, h3, p, span, small, strong,
  .hx__brand, .hx__line, .hx__sub, .hx__proof, .hx__chip, .hx__stamp, .hx__spec,
  .hx__role, .hx__dossier-id, .hx__still-name, .hx__timer, .hx__timer b, .hx__timer small,
  .an-kicker
) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}
/* Light heroes / panels, dark ink */
body.atelier main .hx:not(:has(.hx__media)) :is(
  h1, h2, h3, p, span:not(.an-btn__label), small, strong,
  .hx__brand, .hx__line, .hx__sub, .hx__proof, .hx__chip, .an-kicker
),
body.atelier main .hx :is(.hx__twin-copy, .hx__swiss-cell--type, .hx__split-copy) :is(
  h1, h2, h3, p, span:not(.an-btn__label), .hx__brand, .hx__line, .hx__sub, .hx__proof, .an-kicker
) {
  color: #141210 !important;
  -webkit-text-fill-color: #141210 !important;
  opacity: 1 !important;
}

body.atelier .an-dest__title,
body.atelier .an-dest__meta,
body.atelier .an-card__body h3,
body.atelier .an-card__body p,
body.atelier .an-mosaic__body,
body.atelier .an-mosaic__body strong,
body.atelier .an-mosaic__body span,
body.atelier .an-mosaic__tile span,
body.atelier .an-cats__label,
body.atelier .an-cats__meta,
body.atelier .an-look__tag,
body.atelier .an-kicker--on-dark {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}

/* Links on page = ink, never hero / dark-band links */
body.atelier.scheme-light main a:not(.an-btn):not(.ui-btn):not(.an-bag-cta):not(.an-product):not(.an-filter):not(.hx__still):not(.an-dest__panel):not(.an-mosaic__tile):not(.an-cats__tile):not(.hx a):not(.an-news a):not(.an-cta-band a):not(.an-topbar a):not(.an-sale-banner a),
body.atelier.scheme-dark main a:not(.an-btn):not(.ui-btn):not(.an-bag-cta):not(.an-product):not(.an-filter):not(.hx__still):not(.an-dest__panel):not(.an-mosaic__tile):not(.an-cats__tile):not(.hx a):not(.an-news a):not(.an-cta-band a):not(.an-topbar a):not(.an-sale-banner a) {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  opacity: 1 !important;
}

/*
 * FINAL CONTRAST LAW, must beat scheme-light/dark page-ink !important above.
 * Dark / colored fills → #fff type. Light CTA bands keep page ink via data-surface="light".
 */
body.atelier.scheme-light main :is(
  .an-topbar,
  .an-news,
  .an-marquee,
  .an-sale-banner,
  .an-cta-band--urgency,
  .an-cta-band[data-surface="dark"],
  [data-surface="dark"]
) :is(
  h1, h2, h3, h4, p, span:not(.an-btn__label), small, strong, em, li, label,
  .an-h2, .an-lead, .an-kicker, .an-news__lead,
  a:not(.an-btn):not(.ui-btn)
),
body.atelier.scheme-dark main :is(
  .an-topbar,
  .an-news,
  .an-marquee,
  .an-sale-banner,
  .an-cta-band--urgency,
  .an-cta-band[data-surface="dark"],
  [data-surface="dark"]
) :is(
  h1, h2, h3, h4, p, span:not(.an-btn__label), small, strong, em, li, label,
  .an-h2, .an-lead, .an-kicker, .an-news__lead,
  a:not(.an-btn):not(.ui-btn)
),
body.atelier.theme-t1 main .an-cta-band :is(h1, h2, h3, p, .an-h2, .an-lead, .an-kicker, span:not(.an-btn__label)),
body.atelier.theme-t2 main .an-cta-band :is(h1, h2, h3, p, .an-h2, .an-lead, .an-kicker, span:not(.an-btn__label)),
body.atelier.theme-t5 main .an-cta-band :is(h1, h2, h3, p, .an-h2, .an-lead, .an-kicker, span:not(.an-btn__label)),
body.atelier.theme-t7 main .an-cta-band :is(h1, h2, h3, p, .an-h2, .an-lead, .an-kicker, span:not(.an-btn__label)),
body.atelier.theme-t8 main .an-cta-band :is(h1, h2, h3, p, .an-h2, .an-lead, .an-kicker, span:not(.an-btn__label)),
body.atelier.theme-t10 main .an-cta-band :is(h1, h2, h3, p, .an-h2, .an-lead, .an-kicker, span:not(.an-btn__label)) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}

body.atelier.scheme-light main :is(
  .an-topbar, .an-news, .an-marquee, .an-sale-banner,
  .an-cta-band--urgency, .an-cta-band[data-surface="dark"], [data-surface="dark"]
) :is(.an-btn--ghost, .an-btn--ghost-dark),
body.atelier.scheme-dark main :is(
  .an-topbar, .an-news, .an-marquee, .an-sale-banner,
  .an-cta-band--urgency, .an-cta-band[data-surface="dark"], [data-surface="dark"]
) :is(.an-btn--ghost, .an-btn--ghost-dark),
body.atelier.theme-t1 main .an-cta-band :is(.an-btn--ghost, .an-btn--ghost-dark),
body.atelier.theme-t2 main .an-cta-band :is(.an-btn--ghost, .an-btn--ghost-dark),
body.atelier.theme-t5 main .an-cta-band :is(.an-btn--ghost, .an-btn--ghost-dark),
body.atelier.theme-t7 main .an-cta-band :is(.an-btn--ghost, .an-btn--ghost-dark),
body.atelier.theme-t8 main .an-cta-band :is(.an-btn--ghost, .an-btn--ghost-dark),
body.atelier.theme-t10 main .an-cta-band :is(.an-btn--ghost, .an-btn--ghost-dark) {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.75) !important;
  background: transparent !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.atelier.scheme-light main :is(
  .an-topbar, .an-news, .an-marquee, .an-sale-banner,
  .an-cta-band--urgency, .an-cta-band[data-surface="dark"], [data-surface="dark"]
) :is(.an-btn--ghost, .an-btn--ghost-dark) .an-btn__label,
body.atelier.scheme-dark main :is(
  .an-topbar, .an-news, .an-marquee, .an-sale-banner,
  .an-cta-band--urgency, .an-cta-band[data-surface="dark"], [data-surface="dark"]
) :is(.an-btn--ghost, .an-btn--ghost-dark) .an-btn__label,
body.atelier.theme-t1 main .an-cta-band :is(.an-btn--ghost, .an-btn--ghost-dark) .an-btn__label,
body.atelier.theme-t2 main .an-cta-band :is(.an-btn--ghost, .an-btn--ghost-dark) .an-btn__label,
body.atelier.theme-t5 main .an-cta-band :is(.an-btn--ghost, .an-btn--ghost-dark) .an-btn__label,
body.atelier.theme-t7 main .an-cta-band :is(.an-btn--ghost, .an-btn--ghost-dark) .an-btn__label,
body.atelier.theme-t8 main .an-cta-band :is(.an-btn--ghost, .an-btn--ghost-dark) .an-btn__label,
body.atelier.theme-t10 main .an-cta-band :is(.an-btn--ghost, .an-btn--ghost-dark) .an-btn__label {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}

/* Inverted white solids on dark bands → dark label (never white-on-white) */
body.atelier main :is(.hx, .an-news, .an-sale-banner, .an-cta-band--urgency, .an-topbar) :is(.an-btn--solid, .ui-btn--solid),
body.atelier main :is(.hx, .an-news, .an-sale-banner, .an-cta-band--urgency, .an-topbar) :is(.an-btn--solid, .ui-btn--solid) .an-btn__label {
  background: #ffffff !important;
  color: #141210 !important;
  border-color: #ffffff !important;
  -webkit-text-fill-color: #141210 !important;
}
