/* Appily-Thirtynine — text contrast fixes (all pages)
   Loaded AFTER page stylesheets so contrast wins without breaking CTAs. */

:root {
  --a39-readable-ink: #14241f;
  --a39-readable-muted: #3a4f46;
  --a39-readable-on-dark: #ffffff;
  --a39-readable-on-dark-soft: rgba(255, 255, 255, 0.94);
  --a39-readable-on-dark-kicker: #c9f0d8;
}

/* ---------- Base (light parchment pages) ---------- */
body.a39-store {
  color: var(--a39-readable-ink);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body.a39-store .page-main,
body.a39-store .policy-content,
body.a39-store .policy-card,
body.a39-store .company-panel,
body.a39-store .a39-company-card,
body.a39-store .a39-company-body,
body.a39-store .a39-help-faq,
body.a39-store .a39-contact-form,
body.a39-store .a39-contact-body,
body.a39-store .a39-cart-body,
body.a39-store .a39-cart-packet,
body.a39-store .a39-dash,
body.a39-store .a39-shop-body,
body.a39-store .a39-shop-grid,
body.a39-store .a39-shop-card,
body.a39-store .product-layout,
body.a39-store .a39-pdp-stage,
body.a39-store .auth-page,
body.a39-store .a39-member-stage,
body.a39-store .a39-checkout-body,
body.a39-store .a39-orders-body,
body.a39-store .a39-track-body,
body.a39-store .a39-os-body {
  color: var(--a39-readable-ink);
}

body.a39-store .page-main h1,
body.a39-store .page-main h2,
body.a39-store .page-main h3,
body.a39-store .page-main h4,
body.a39-store .a39-shop-card h3,
body.a39-store .a39-shop-card h3 a,
body.a39-store .product-body h3,
body.a39-store .product-body h3 a,
body.a39-store .a39-discover-card h3,
body.a39-store .a39-discover-card h3 a,
body.a39-store .a39-vault-drawer h3,
body.a39-store .a39-vault-drawer h3 a,
body.a39-store .a39-cart-packet h3,
body.a39-store .a39-cart-packet h3 a,
body.a39-store .a39-company-card h2,
body.a39-store .a39-company-card h3,
body.a39-store .policy-content h1,
body.a39-store .policy-content h2,
body.a39-store .page-hero h1 {
  color: var(--a39-readable-ink);
}

/* Keep home gradient title clipped (do not force solid ink) */
body.a39-store .a39-hero-slide__title-bold {
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}

body.a39-store .lead,
body.a39-store .mini-copy,
body.a39-store .empty-state,
body.a39-store .a39-muted,
body.a39-store .a39-shop-card__cat,
body.a39-store .a39-shop-card__sku,
body.a39-store .a39-footer--light,
body.a39-store .a39-footer--light p,
body.a39-store .a39-footer--light a,
body.a39-store .policy-content .last-updated,
body.a39-store .a39-company-meta,
body.a39-store .a39-company-card__copy,
body.a39-store .a39-cart-packet__unit,
body.a39-store .a39-cart-packet__eyebrow,
body.a39-store .a39-cart-packet__variant,
body.a39-store .a39-account-chip__sub,
body.a39-store .page-hero .hero-lede,
body.a39-store .page-hero .eyebrow {
  color: var(--a39-readable-muted) !important;
}

body.a39-store .a39-footer--light a:hover {
  color: var(--a39-moss, #1B4332) !important;
}

body.a39-store .a39-footer--light .a39-footer-logo,
body.a39-store .a39-footer--light .a39-footer-logo strong,
body.a39-store .a39-footer--light h3 {
  color: var(--a39-readable-ink) !important;
}

/* Light-surface ledes only (never inside dark heroes) */
body.a39-store .a39-company-body [class*="__lede"],
body.a39-store .a39-cart-body [class*="__lede"],
body.a39-store .a39-help-body [class*="__lede"],
body.a39-store .a39-contact-body [class*="__lede"],
body.a39-store .a39-shop-body [class*="__lede"],
body.a39-store .a39-shop-main [class*="__lede"],
body.a39-store .a39-orders-body [class*="__lede"],
body.a39-store .a39-checkout-body [class*="__lede"],
body.a39-store .a39-track-body [class*="__lede"] {
  color: var(--a39-readable-muted) !important;
}

/* ---------- Form fields (light only) ---------- */
body.a39-store input[type="search"],
body.a39-store input[type="text"],
body.a39-store input[type="email"],
body.a39-store input[type="password"],
body.a39-store input[type="tel"],
body.a39-store input[type="number"],
body.a39-store input:not([type]),
body.a39-store textarea,
body.a39-store select {
  color: var(--a39-readable-ink) !important;
  background-color: #fff;
}
body.a39-store input::placeholder,
body.a39-store textarea::placeholder {
  color: #5a6d64 !important;
  opacity: 1;
}
body.a39-store .a39-search-bar input {
  color: var(--a39-readable-ink) !important;
  background: transparent !important;
}

/* Light / soft controls — dark ink (never white) */
body.a39-store .a39-shop-card__btn,
body.a39-store .a39-cart-btn--soft,
body.a39-store .a39-cart-btn--ghost,
body.a39-store .a39-btn--soft,
body.a39-store .a39-btn--ghost,
body.a39-store .a39-qty-btn,
body.a39-store .btn-outline,
body.a39-store .btn-soft,
body.a39-store .a39-vault-btn--soft,
body.a39-store .a39-footer-newsletter button,
body.a39-store .a39-hero-slide__cta--outline {
  color: var(--a39-readable-ink) !important;
}

body.a39-store .a39-shop-card__btn {
  color: var(--a39-moss, #1B4332) !important;
}
body.a39-store .a39-shop-card__btn:hover {
  color: #fff !important;
}

/* Ghost on dark dash head must stay white */
body.a39-store .a39-dash-head .a39-btn--ghost,
body.a39-store .a39-member-hero .a39-btn--ghost {
  color: #fff !important;
}

/* Copper primary keeps dark ink for contrast on gold */
body.a39-store .btn-primary {
  color: var(--a39-moss-dark, #081C15) !important;
}

/* Dark-green / moss CTAs — white on dark only */
body.a39-store .a39-search-bar button,
body.a39-store .a39-tab-link.is-active,
body.a39-store .a39-tab-link--cta,
body.a39-store .a39-cart-btn--primary,
body.a39-store .a39-hero-slide__cta:not(.a39-hero-slide__cta--outline),
body.a39-store .a39-vault-btn--primary,
body.a39-store .a39-contact-btn--primary,
body.a39-store .a39-checkout-btn--primary,
body.a39-store .a39-checkout-btn--primary span,
body.a39-store .a39-checkout-btn--primary strong,
body.a39-store button.a39-btn--primary,
body.a39-store .a39-btn--primary,
body.a39-store .a39-drawer-quick__btn--cta,
body.a39-store .a39-drawer-tile.is-active,
body.a39-store .auth-submit,
body.a39-store .a39-auth-submit,
body.a39-store .a39-shop-search-btn,
body.a39-store .a39-track-submit,
body.a39-store .a39-pdp-btn--primary,
body.a39-store .a39-os-btn--primary,
body.a39-store .buy-panel .btn-primary {
  color: #fff !important;
}

body.a39-store .a39-tab-link--cta:hover {
  color: var(--a39-moss-dark, #081C15) !important;
}

body.a39-store .a39-hero-slide__cta--outline:hover {
  color: #fff !important;
}

/* ---------- Dark surfaces: force readable light text ---------- */
/* Lock moss hero backgrounds so white copy never sits on cream overrides */
body.a39-store .a39-shop-hero,
body.a39-store .a39-cart-hero,
body.a39-store .a39-company-hero,
body.a39-store .a39-contact-hero,
body.a39-store .a39-help-hero,
body.a39-store .a39-member-hero,
body.a39-store .a39-track-hero,
body.a39-store .a39-orders-hero,
body.a39-store .a39-checkout-hero,
body.a39-store .a39-vault-hero,
body.a39-store .a39-pdp-hero,
body.a39-store .a39-os-hero,
body.a39-store .a39-success-hero,
body.a39-store .page-shop .a39-shop-hero {
  background: linear-gradient(135deg, #081C15 0%, #1B4332 52%, #24543f 100%) !important;
  color: var(--a39-readable-on-dark) !important;
}

body.a39-store .a39-announce,
body.a39-store .a39-masthead-brand-col,
body.a39-store .a39-masthead-brand,
body.a39-store .a39-drawer-head,
body.a39-store .a39-shop-hero,
body.a39-store .a39-cart-hero,
body.a39-store .a39-company-hero,
body.a39-store .a39-contact-hero,
body.a39-store .a39-help-hero,
body.a39-store .a39-member-hero,
body.a39-store .a39-track-hero,
body.a39-store .a39-orders-hero,
body.a39-store .a39-checkout-hero,
body.a39-store .a39-vault-hero,
body.a39-store .a39-pdp-hero,
body.a39-store .a39-os-hero,
body.a39-store .a39-footer-bottom,
body.a39-store .a39-footer-top,
body.a39-store .a39-footer-policy-strip,
body.a39-store .auth-split-tabs,
body.a39-store .a39-dash-head,
body.a39-store .a39-feature-bar {
  color: var(--a39-readable-on-dark) !important;
}

/* Keep search / form fields inside heroes dark-on-light */
body.a39-store .a39-shop-hero input,
body.a39-store .a39-help-hero input,
body.a39-store .a39-cart-hero input,
body.a39-store .a39-track-hero input,
body.a39-store .a39-os-hero input,
body.a39-store .a39-contact-hero input,
body.a39-store .a39-member-hero input,
body.a39-store .a39-shop-search input,
body.a39-store .a39-help-search input {
  color: var(--a39-readable-ink) !important;
}

body.a39-store .a39-shop-hero *,
body.a39-store .a39-cart-hero *,
body.a39-store .a39-company-hero *,
body.a39-store .a39-contact-hero *,
body.a39-store .a39-help-hero *,
body.a39-store .a39-member-hero *,
body.a39-store .a39-track-hero *,
body.a39-store .a39-orders-hero *,
body.a39-store .a39-checkout-hero *,
body.a39-store .a39-vault-hero *,
body.a39-store .a39-pdp-hero *,
body.a39-store .a39-os-hero *,
body.a39-store .a39-drawer-head *,
body.a39-store .a39-masthead-brand *,
body.a39-store .a39-footer-bottom *,
body.a39-store .a39-footer-top *,
body.a39-store .a39-dash-head *,
body.a39-store .a39-feature-bar * {
  color: inherit;
}

body.a39-store .a39-shop-hero h1,
body.a39-store .a39-cart-hero h1,
body.a39-store .a39-company-hero h1,
body.a39-store .a39-contact-hero h1,
body.a39-store .a39-help-hero h1,
body.a39-store .a39-member-hero h1,
body.a39-store .a39-track-hero h1,
body.a39-store .a39-orders-hero h1,
body.a39-store .a39-checkout-hero h1,
body.a39-store .a39-vault-hero h1,
body.a39-store .a39-pdp-hero h1,
body.a39-store .a39-os-hero h1,
body.a39-store .a39-shop-hero em,
body.a39-store .a39-cart-hero em,
body.a39-store .a39-company-hero em,
body.a39-store .a39-member-hero em,
body.a39-store .a39-contact-hero em,
body.a39-store .a39-help-hero em {
  color: #fff !important;
}

body.a39-store .a39-shop-hero [class*="__lede"],
body.a39-store .a39-cart-hero [class*="__lede"],
body.a39-store .a39-company-hero [class*="__lede"],
body.a39-store .a39-contact-hero [class*="__lede"],
body.a39-store .a39-help-hero [class*="__lede"],
body.a39-store .a39-member-hero [class*="__lede"],
body.a39-store .a39-track-hero [class*="__lede"],
body.a39-store .a39-orders-hero [class*="__lede"],
body.a39-store .a39-checkout-hero [class*="__lede"],
body.a39-store .a39-vault-hero [class*="__lede"],
body.a39-store .a39-shop-lede,
body.a39-store .a39-cart-hero p,
body.a39-store .a39-company-hero .lead {
  color: var(--a39-readable-on-dark-soft) !important;
}

body.a39-store .a39-shop-eyebrow,
body.a39-store .a39-shop-hero [class*="__kicker"],
body.a39-store .a39-cart-hero [class*="__kicker"],
body.a39-store .a39-company-hero [class*="__kicker"],
body.a39-store .a39-contact-hero [class*="__kicker"],
body.a39-store .a39-help-hero [class*="__kicker"],
body.a39-store .a39-member-hero [class*="__kicker"],
body.a39-store .a39-track-hero [class*="__kicker"],
body.a39-store .a39-orders-hero [class*="__kicker"],
body.a39-store .a39-checkout-hero [class*="__kicker"],
body.a39-store .a39-vault-hero [class*="__kicker"] {
  color: var(--a39-readable-on-dark-kicker) !important;
}

body.a39-store .a39-shop-crumb,
body.a39-store .a39-shop-crumb a,
body.a39-store .a39-shop-hero__chips span,
body.a39-store .a39-cart-hero__total span,
body.a39-store .a39-company-hero__stats span,
body.a39-store .a39-announce,
body.a39-store .a39-announce a,
body.a39-store .a39-footer-bottom a,
body.a39-store .a39-footer-copy,
body.a39-store .a39-footer-policy-links a,
body.a39-store .auth-split-tab {
  color: var(--a39-readable-on-dark-soft) !important;
}

body.a39-store .a39-shop-crumb a:hover,
body.a39-store .a39-announce-link,
body.a39-store .auth-split-tab.is-active {
  color: #fff !important;
}

body.a39-store .a39-cart-hero__total strong,
body.a39-store .a39-company-hero__stats strong,
body.a39-store .a39-member-hero__badge,
body.a39-store .a39-member-hero__badge strong,
body.a39-store .a39-member-hero__badge span,
body.a39-store .a39-member-hero__badge small,
body.a39-store .a39-dash-head h2,
body.a39-store .a39-dash-head__tag {
  color: #fff !important;
}
body.a39-store .a39-dash-head__tag {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Toolbar / chrome on light masthead */
body.a39-store .a39-masthead-main,
body.a39-store .a39-tab-nav,
body.a39-store .a39-seed-lanes,
body.a39-store .a39-toolbar-cart,
body.a39-store .a39-account-chip,
body.a39-store .a39-account-chip__label {
  color: var(--a39-readable-ink);
}
body.a39-store .a39-toolbar-cart-count {
  color: #fff !important;
}
body.a39-store .a39-tab-link {
  color: var(--a39-readable-ink);
}
body.a39-store .a39-tab-link.is-active,
body.a39-store .a39-tab-link--cta {
  color: #fff !important;
}

/* ---------- Cards / grids never hide ---------- */
body.a39-store .a39-shop-card,
body.a39-store .a39-packet-card,
body.a39-store .a39-discover-card,
body.a39-store .a39-vault-drawer,
body.a39-store .a39-company-collection,
body.a39-store .product-card,
body.a39-store .a39-pdp-shelf-card {
  opacity: 1 !important;
  filter: none !important;
}

body.a39-store .a39-shop-card__price,
body.a39-store .price,
body.a39-store .price-tag {
  color: var(--a39-moss, #1B4332) !important;
}

body.a39-store #accountLoading,
body.a39-store .a39-member-loading,
body.a39-store .notice {
  color: var(--a39-readable-ink) !important;
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  body.a39-store .a39-shop-card,
  body.a39-store .a39-packet-card,
  body.a39-store .a39-discover-card,
  body.a39-store .a39-vault-drawer {
    transition: none !important;
    transform: none !important;
  }
}
