/**
 * Type + spacing contract for ALL Ready themes.
 * - Active scheme colors type via --ink (never faded mixes)
 * - Cards get real padding / gap so lines don’t merge
 * - Badges/cues don’t collide
 */

/* , ,  Type colors follow active scheme, full opacity , ,  */
body.atelier,
body.atelier.scheme-light,
body.atelier.scheme-dark {
  --type: var(--ink);
  /* Soft = same as ink, palettes must not gray-out body copy */
  --type-soft: var(--ink);
}
body.atelier .an-kicker {
  color: var(--moss) !important;
  opacity: 1 !important;
  margin: 0 0 0.4rem !important;
  line-height: 1.3;
}
body.atelier .an-h2,
body.atelier .an-footer__brand,
body.atelier main > *:not(.hx) h1,
body.atelier main .an-section h2,
body.atelier main .an-rail-block h2,
body.atelier main .an-section h3,
body.atelier main .an-rail-block h3,
body.atelier .an-product__meta h3,
body.atelier .an-fomo__body h3,
body.atelier .an-complete__meta h3,
body.atelier .an-look h3,
body.atelier .an-review h3 {
  color: var(--type, var(--ink)) !important;
  opacity: 1 !important;
  -webkit-text-fill-color: var(--type, var(--ink));
  line-height: 1.2 !important;
}
body.atelier .an-lead,
body.atelier .an-footer__tag,
body.atelier .an-press__label,
body.atelier .an-footer-cta__lead,
body.atelier .an-desire .an-lead,
body.atelier .an-complete .an-lead,
body.atelier .an-fomo .an-lead,
body.atelier .an-look p,
body.atelier .an-craft li {
  color: var(--type-soft, var(--ink)) !important;
  opacity: 1 !important;
  -webkit-text-fill-color: var(--type-soft, var(--ink));
  line-height: 1.5 !important;
  margin: 0 !important;
}
/* Overlay surfaces stay white, handled in theme-overlay-type.css (higher priority via later load + selectors) */

body.atelier .an-section {
  padding-block: clamp(0.75rem, 1.8vw, 1.15rem) !important;
}
body.atelier .an-section--tight {
  padding-block: clamp(0.5rem, 1.2vw, 0.8rem) !important;
}
body.atelier .an-rail-block {
  padding-block: clamp(0.65rem, 1.5vw, 1rem) !important;
}

/* Section heads, tight stack before grids */
body.atelier .an-head,
body.atelier .an-rail__head,
body.atelier .an-fomo__head,
body.atelier .an-complete__head,
body.atelier .an-desire__copy {
  display: grid !important;
  gap: 0.3rem !important;
  margin: 0 0 0.75rem !important;
  max-width: 46rem;
}
body.atelier .an-head .an-h2,
body.atelier .an-rail__copy .an-h2,
body.atelier .an-fomo__head .an-h2,
body.atelier .an-complete__head .an-h2 {
  margin: 0 !important;
}

/* , ,  Product cards: padding + stacked type (no merge) , ,  */
body.atelier .an-grid {
  gap: 1.35rem 1.15rem !important;
}
@media (min-width: 900px) {
  body.atelier .an-grid {
    gap: 1.65rem 1.35rem !important;
  }
}
body.atelier .an-product,
body.atelier .an-product--niche,
body.atelier .an-product--desire {
  display: grid !important;
  grid-template-rows: auto 1fr;
  gap: 0 !important;
  overflow: hidden;
  color: var(--ink) !important;
}
body.atelier .an-product__media {
  margin: 0 !important;
}
/* Badge left · cue right, never stacked on top of each other */
body.atelier .an-product__badge {
  top: 0.7rem !important;
  left: 0.7rem !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 3;
  padding: 0.32rem 0.55rem !important;
  line-height: 1.2 !important;
  max-width: calc(100% - 5.5rem);
}
body.atelier .an-product__cue {
  top: 0.7rem !important;
  right: 0.7rem !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 3;
  padding: 0.32rem 0.5rem !important;
  line-height: 1.2 !important;
  max-width: 46%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.atelier .an-product__meta {
  display: grid !important;
  gap: 0.35rem !important;
  padding: 0.75rem 0 0.2rem !important;
  align-content: start;
  color: var(--ink) !important;
}
body.atelier .an-product__meta .an-stars {
  margin: 0 !important;
  line-height: 1 !important;
}
body.atelier .an-product__social {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
  color: var(--moss) !important;
  opacity: 1 !important;
  font-size: 0.68rem !important;
}
body.atelier .an-product__meta h3 {
  margin: 0 !important;
  padding: 0 !important;
  font-size: clamp(0.95rem, 1.6vw, 1.08rem) !important;
  line-height: 1.3 !important;
  letter-spacing: -0.015em;
  color: var(--ink) !important;
  opacity: 1 !important;
  -webkit-text-fill-color: var(--ink) !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.atelier .an-price {
  display: flex !important;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem !important;
  margin: 0.1rem 0 0 !important;
  font-size: 0.92rem !important;
  line-height: 1.25 !important;
}
body.atelier .an-price span {
  color: var(--ink) !important;
  opacity: 1 !important;
  font-weight: 750;
}
body.atelier .an-price s {
  color: var(--muted) !important;
  opacity: 1 !important;
}
body.atelier .an-product__invite {
  display: inline-block !important;
  margin: 0.2rem 0 0 !important;
  padding: 0 !important;
  line-height: 1.35 !important;
  color: var(--ink) !important;
  opacity: 1 !important;
}

/* Rail slides inherit card padding */
body.atelier .an-rail__slide .an-product__meta {
  padding: 0.85rem 0.85rem 1rem !important;
}
body.atelier .an-rail {
  margin-top: 0.25rem;
}
body.atelier .an-rail__track {
  gap: 0.85rem;
}

/* , ,  FOMO / complete / review / trust cards , ,  */
body.atelier .an-fomo__grid {
  gap: 1.15rem !important;
}
body.atelier .an-fomo__card {
  display: grid !important;
  gap: 0 !important;
  overflow: hidden;
}
body.atelier .an-fomo__body {
  display: grid !important;
  gap: 0.4rem !important;
  padding: 1rem 1.05rem 1.15rem !important;
}
body.atelier .an-fomo__pulse {
  margin: 0 !important;
  line-height: 1.3 !important;
}
body.atelier .an-fomo__body h3 {
  margin: 0 !important;
  line-height: 1.3 !important;
  font-size: 1.05rem !important;
}
body.atelier .an-fomo__price {
  margin: 0.1rem 0 0 !important;
  line-height: 1.3 !important;
}
body.atelier .an-fomo__actions {
  margin-top: 0.45rem !important;
  gap: 0.5rem !important;
}
body.atelier .an-fomo__foot {
  margin-top: 1.5rem !important;
  gap: 0.65rem !important;
}

body.atelier .an-complete__grid {
  gap: 1.15rem !important;
  margin-top: 0 !important;
}
body.atelier .an-complete__card {
  display: grid !important;
  gap: 0 !important;
}
body.atelier .an-complete__meta {
  display: grid !important;
  gap: 0.35rem !important;
  padding: 0.95rem 1rem 1.1rem !important;
}
body.atelier .an-complete__meta h3 {
  margin: 0 !important;
  line-height: 1.3 !important;
  color: var(--ink) !important;
}
body.atelier .an-complete__meta p {
  margin: 0 !important;
  color: var(--ink) !important;
  opacity: 1 !important;
}
body.atelier .an-complete__add {
  margin-top: 0.2rem !important;
}
body.atelier .an-complete__foot {
  margin-top: 1.5rem !important;
  gap: 0.85rem !important;
}

body.atelier .an-review {
  padding: 1.35rem 1.35rem 1.45rem !important;
  gap: 0.95rem !important;
}
body.atelier .an-review__quote {
  margin: 0 !important;
  line-height: 1.45 !important;
  color: var(--ink) !important;
  opacity: 1 !important;
}
body.atelier .an-desire__moment,
body.atelier .an-pain__levers li,
body.atelier .an-trust-convert__row li {
  padding: 0.9rem 1rem !important;
  gap: 0.35rem !important;
}
body.atelier .an-desire__moment strong,
body.atelier .an-pain__levers strong,
body.atelier .an-trust-convert__row strong {
  display: block;
  margin: 0 0 0.25rem !important;
  line-height: 1.25 !important;
  color: var(--moss) !important;
  opacity: 1 !important;
}
body.atelier .an-desire__moment span,
body.atelier .an-pain__levers span,
body.atelier .an-trust-convert__row span {
  display: block;
  margin: 0 !important;
  line-height: 1.4 !important;
  color: var(--ink) !important;
  opacity: 1 !important;
}
body.atelier .an-desire__moments,
body.atelier .an-pain__levers,
body.atelier .an-trust-convert__row {
  gap: 0.7rem !important;
}
body.atelier .an-desire__actions,
body.atelier .an-pain__actions,
body.atelier .an-trust-convert__actions,
body.atelier .an-section__cta {
  margin-top: 1.15rem !important;
  gap: 0.65rem !important;
}

/* AOV / global bars */
body.atelier .an-aov-nudge__in {
  gap: 0.85rem 1.1rem !important;
  padding-block: 0.35rem;
}
body.atelier .an-aov-nudge__copy p {
  margin: 0 !important;
  line-height: 1.4 !important;
  color: var(--ink) !important;
  opacity: 1 !important;
}
body.atelier .an-aov-nudge__sub {
  margin-top: 0.3rem !important;
  color: var(--type-soft) !important;
  opacity: 1 !important;
}
body.atelier .an-global__in {
  gap: 0.75rem 1rem !important;
}
body.atelier .an-global__msg {
  margin: 0 !important;
  color: var(--ink) !important;
  opacity: 1 !important;
  line-height: 1.4 !important;
}

/* Look / cinema body spacing on page (not over image) */
body.atelier .an-look {
  gap: 0.85rem !important;
}
body.atelier .an-look__body {
  gap: 0.4rem !important;
  padding: 0.15rem 0.1rem 0.25rem !important;
}
body.atelier .an-look h3 {
  margin: 0 !important;
  line-height: 1.25 !important;
  color: var(--ink) !important;
  opacity: 1 !important;
}
body.atelier .an-cinema {
  gap: 1.15rem !important;
}
body.atelier .an-cinema--dense {
  gap: 1rem !important;
}

/* Option legends + chips, every theme */
body.atelier .an-option__legend,
body.atelier .an-buy legend {
  display: block;
  margin: 0 0 0.55rem !important;
  font-weight: 750;
  font-size: 0.95rem;
  color: var(--ink) !important;
  opacity: 1 !important;
  line-height: 1.3;
}
body.atelier .an-chip {
  color: var(--ink) !important;
}
body.atelier .an-chip:has(input:checked),
body.atelier .an-chip.is-on {
  background: var(--cta-bg, var(--ink)) !important;
  color: var(--cta-fg, var(--bg)) !important;
  border-color: var(--cta-border, var(--ink)) !important;
}
body.atelier .an-chip:has(input:checked) > span,
body.atelier .an-chip.is-on > span {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
}

/* Dense catalog themes still need readable meta padding */
body.theme-t5 .an-product__meta {
  padding: 0.75rem 0.7rem 0.9rem !important;
  gap: 0.3rem !important;
}
body.theme-t5 .an-grid {
  gap: 0.95rem 0.75rem !important;
}
body.theme-t10 .an-product__meta {
  padding: 0.8rem 0.8rem 1rem !important;
}

/* Mobile: keep card type from crushing */
@media (max-width: 700px) {
  body.atelier .an-product__meta {
    padding: 0.8rem 0.75rem 0.95rem !important;
    gap: 0.3rem !important;
  }
  body.atelier .an-product__meta h3 {
    font-size: 0.95rem !important;
  }
  body.atelier .an-grid {
    gap: 1.1rem 0.75rem !important;
  }
  body.atelier .an-fomo__body,
  body.atelier .an-complete__meta {
    padding: 0.85rem 0.85rem 1rem !important;
  }
}
