/**
 * Appily Forty — global readability (loaded LAST).
 * Ink on light surfaces · white on named dark islands · buttons never lose label contrast.
 */

/* ── Kill invisible gradient / clipped headlines ── */
body.a40-store h1,
body.a40-store h2,
body.a40-store h3,
body.a40-store h4,
body.a40-store h5,
body.a40-store h6,
body.a40-store h1 span,
body.a40-store h2 span,
body.a40-store h3 span,
body.a40-store .a40-vegist-slide h1,
body.a40-store [class*="-hero"] h1,
body.a40-store [class*="-hero"] h1 span,
body.a40-store [class*="-hero"] h2 span {
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  color: var(--a40-ink) !important;
  -webkit-text-fill-color: var(--a40-ink) !important;
}

body.a40-store h1 span,
body.a40-store h2 span,
body.a40-store [class*="-hero"] h1 span {
  color: var(--a40-orange) !important;
  -webkit-text-fill-color: var(--a40-orange) !important;
}

/* ── Base ink ── */
body.a40-store,
body.a40-store .page-wrap,
body.a40-store .page-main,
body.a40-store [class*="-forty"],
body.a40-store [class*="page-"] {
  color: var(--a40-ink) !important;
  -webkit-font-smoothing: antialiased;
}

body.a40-store p,
body.a40-store li,
body.a40-store dt,
body.a40-store dd,
body.a40-store label,
body.a40-store th,
body.a40-store td,
body.a40-store small,
body.a40-store strong,
body.a40-store em,
body.a40-store figcaption,
body.a40-store summary,
body.a40-store legend {
  color: var(--a40-ink) !important;
  -webkit-text-fill-color: currentColor;
}

body.a40-store a:not([class*="-btn"]):not(.btn):not([class*="cta"]):not([class*="-pill"]):not([class*="-tab"]) {
  color: var(--a40-link) !important;
}

body.a40-store [class*="-lede"],
body.a40-store [class*="-note"],
body.a40-store [class*="-hint"],
body.a40-store [class*="-muted"],
body.a40-store .mini-copy,
body.a40-store .hero-lede {
  color: var(--a40-muted) !important;
}

body.a40-store [class*="-eyebrow"],
body.a40-store .eyebrow {
  color: var(--a40-orange) !important;
}

/* Forms — dark on light (except dark-island fields below) */
body.a40-store input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
body.a40-store select,
body.a40-store textarea {
  color: #1c1916 !important;
  -webkit-text-fill-color: #1c1916 !important;
  background-color: #fff !important;
  border-color: var(--a40-border) !important;
}
body.a40-store input::placeholder,
body.a40-store textarea::placeholder {
  color: #6f6860 !important;
  -webkit-text-fill-color: #6f6860 !important;
  opacity: 1 !important;
}

/* ── Chrome: light header / promo / footer ── */
body.a40-store .a40-promo-strip,
body.a40-store .a40-promo-strip p,
body.a40-store .a40-promo-account,
body.a40-store .a40-header--vegist,
body.a40-store .a40-main-nav-link,
body.a40-store .a40-logo,
body.a40-store .a40-tool-btn {
  color: var(--a40-ink) !important;
  -webkit-text-fill-color: currentColor;
}
body.a40-store .a40-promo-strip strong { color: var(--a40-orange) !important; }
body.a40-store .a40-logo-text strong {
  color: var(--a40-orange) !important;
  -webkit-text-fill-color: var(--a40-orange) !important;
}
body.a40-store .a40-logo-text em {
  color: var(--a40-green) !important;
  -webkit-text-fill-color: var(--a40-green) !important;
}
body.a40-store .a40-main-nav-link:hover,
body.a40-store .a40-main-nav-link.is-active { color: var(--a40-orange) !important; }
body.a40-store .a40-search-compact input,
body.a40-store .a40-mobile-search input {
  color: #1c1916 !important;
  background: #fff !important;
}

body.a40-store .a40-footer--vegist,
body.a40-store .a40-footer--vegist a,
body.a40-store .a40-footer--vegist p,
body.a40-store .a40-footer--vegist span,
body.a40-store .a40-footer--vegist li {
  color: var(--a40-ink) !important;
  -webkit-text-fill-color: currentColor;
}
body.a40-store .a40-footer--vegist .a40-footer-brand p,
body.a40-store .a40-footer--vegist .a40-footer-base,
body.a40-store .a40-footer--vegist .a40-footer-base span,
body.a40-store .a40-footer--vegist .a40-footer-col a {
  color: var(--a40-muted) !important;
}
body.a40-store .a40-footer--vegist .a40-footer-col h4 {
  color: var(--a40-green-dark) !important;
}
body.a40-store .a40-footer--vegist .a40-logo-text strong {
  color: var(--a40-orange) !important;
  -webkit-text-fill-color: var(--a40-orange) !important;
}
body.a40-store .a40-footer--vegist .a40-logo-text em {
  color: var(--a40-green) !important;
  -webkit-text-fill-color: var(--a40-green) !important;
}

body.a40-store .a40-service-strip,
body.a40-store .a40-service-strip * {
  color: var(--a40-ink) !important;
}
body.a40-store .a40-service-strip strong {
  color: var(--a40-green-dark) !important;
}

/* Light newsletter (vegist) — never force white text */
body.a40-store .a40-newsletter--vegist,
body.a40-store .a40-newsletter--vegist h2,
body.a40-store .a40-newsletter--vegist p,
body.a40-store .a40-newsletter--vegist span,
body.a40-store .a40-newsletter--vegist label {
  color: var(--a40-ink) !important;
  -webkit-text-fill-color: currentColor;
  background-image: none;
}
body.a40-store .a40-newsletter--vegist {
  background: #fff !important;
}
body.a40-store .a40-newsletter--vegist .a40-newsletter-copy p {
  color: var(--a40-muted) !important;
}
body.a40-store .a40-newsletter--vegist .a40-newsletter-form input {
  color: #1c1916 !important;
  -webkit-text-fill-color: #1c1916 !important;
  background: #fff !important;
}
body.a40-store .a40-newsletter--vegist .a40-newsletter-form button {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: var(--a40-orange) !important;
}

/* Light cards / filters — ink copy only (not buttons / badges) */
body.a40-store .a40-shop-card,
body.a40-store .a40-product-card,
body.a40-store .a40-shop-filters,
body.a40-store .a40-shop-empty,
body.a40-store .a40-cart-item,
body.a40-store .a40-cat-card,
body.a40-store .panel {
  color: var(--a40-ink) !important;
}
body.a40-store .a40-shop-card h3,
body.a40-store .a40-shop-card p,
body.a40-store .a40-shop-card span:not([class*="-badge"]):not([class*="-sale"]):not([class*="-discount"]),
body.a40-store .a40-product-card h3,
body.a40-store .a40-product-card p,
body.a40-store .a40-product-card span:not([class*="-badge"]):not([class*="-sale"]):not([class*="-discount"]),
body.a40-store .a40-shop-filters h3,
body.a40-store .a40-shop-filters h4,
body.a40-store .a40-shop-filters label,
body.a40-store .a40-shop-filters p,
body.a40-store .a40-shop-filters legend,
body.a40-store .a40-cart-item h3,
body.a40-store .a40-cart-item p,
body.a40-store .a40-cart-item span:not([class*="-badge"]) {
  color: var(--a40-ink) !important;
  -webkit-text-fill-color: currentColor;
}

/* Soft-lightened category band */
body.a40-store .a40-categories.section-muted,
body.a40-store .a40-categories .a40-section-title,
body.a40-store .a40-categories .a40-section-tag,
body.a40-store .a40-cat-card,
body.a40-store .a40-cat-count,
body.a40-store .a40-cat-body {
  color: var(--a40-ink) !important;
  -webkit-text-fill-color: currentColor;
}
body.a40-store .a40-categories .a40-section-title em {
  color: var(--a40-orange) !important;
  -webkit-text-fill-color: var(--a40-orange) !important;
}
body.a40-store .a40-cat-card {
  background: var(--a40-surface-elevated) !important;
  border-color: var(--a40-border) !important;
}

/* Auth / buy panels — light + ink (buttons rescued below) */
body.a40-store .a40-acct-auth,
body.a40-store .a40-acct-auth-panel,
body.a40-store .a40-acct-form,
body.a40-store .a40-acct-dashboard,
body.a40-store .a40-acct-main,
body.a40-store .a40-acct-panel,
body.a40-store .auth-split-panel,
body.a40-store .auth-form,
body.a40-store .dash-panel,
body.a40-store .a40-pd-buy-card,
body.a40-store .buy-box,
body.a40-store .buy-form {
  color: var(--a40-ink) !important;
  background-color: var(--a40-surface-elevated) !important;
}
body.a40-store .a40-acct-auth-tab,
body.a40-store .auth-split-tab {
  color: var(--a40-muted) !important;
}
body.a40-store .a40-acct-auth-tab.is-active,
body.a40-store .auth-split-tab.is-active {
  color: var(--a40-ink) !important;
}

/* Policy / page-hero — cream + ink */
body.a40-store .page-hero {
  background: var(--a40-hero-gradient) !important;
  color: var(--a40-ink) !important;
}
body.a40-store .page-hero h1,
body.a40-store .page-hero p {
  color: var(--a40-ink) !important;
}
body.a40-store .page-hero .eyebrow { color: var(--a40-orange) !important; }
body.a40-store .page-hero .hero-lede { color: var(--a40-muted) !important; }
body.a40-store .policy-page,
body.a40-store .policy-page p,
body.a40-store .policy-page li,
body.a40-store .policy-page h2,
body.a40-store .policy-page h3 {
  color: var(--a40-ink) !important;
}

/* Mega + mobile drawer */
body.a40-store .a40-mega,
body.a40-store .a40-mega a,
body.a40-store .a40-mega strong,
body.a40-store .a40-mega span,
body.a40-store .a40-mega p,
body.a40-store .a40-mobile-panel,
body.a40-store .a40-mobile-panel a,
body.a40-store .a40-mobile-panel strong,
body.a40-store .a40-mobile-panel span,
body.a40-store .a40-mobile-panel p {
  color: var(--a40-ink) !important;
  -webkit-text-fill-color: currentColor;
}
body.a40-store .a40-mega a:hover { color: var(--a40-orange) !important; }

/* Reveal — never hide forever */
[class*="-reveal"],
.a40-reveal {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* ── Dark islands (white copy) ── */
body.a40-store .a40-deal-inner,
body.a40-store .a40-os-support-card,
body.a40-store .a40-track-order,
body.a40-store .a40-cart-summary-card,
body.a40-store .a40-co-summary-card,
body.a40-store .a40-help-dock-card--primary,
body.a40-store .a40-ab-benefit,
body.a40-store .a40-ok-next,
body.a40-store .a40-acct-perks {
  background: linear-gradient(160deg, var(--a40-green-dark) 0%, #1a3d2e 100%) !important;
  color: #fff !important;
}
body.a40-store .a40-deal-inner h2,
body.a40-store .a40-deal-inner p,
body.a40-store .a40-deal-inner span,
body.a40-store .a40-deal-inner strong,
body.a40-store .a40-os-support-card h2,
body.a40-store .a40-os-support-card h3,
body.a40-store .a40-os-support-card p,
body.a40-store .a40-os-support-card label,
body.a40-store .a40-os-support-card span,
body.a40-store .a40-track-order h2,
body.a40-store .a40-track-order h3,
body.a40-store .a40-track-order p,
body.a40-store .a40-track-order strong,
body.a40-store .a40-track-order span,
body.a40-store .a40-track-order label,
body.a40-store .a40-cart-summary-card h2,
body.a40-store .a40-cart-summary-card h3,
body.a40-store .a40-cart-summary-card dt,
body.a40-store .a40-cart-summary-card dd,
body.a40-store .a40-cart-summary-card p,
body.a40-store .a40-cart-summary-card span,
body.a40-store .a40-co-summary-card h2,
body.a40-store .a40-co-summary-card h3,
body.a40-store .a40-co-summary-card dt,
body.a40-store .a40-co-summary-card dd,
body.a40-store .a40-co-summary-card p,
body.a40-store .a40-co-summary-card span,
body.a40-store .a40-help-dock-card--primary h2,
body.a40-store .a40-help-dock-card--primary h3,
body.a40-store .a40-help-dock-card--primary p,
body.a40-store .a40-help-dock-card--primary span,
body.a40-store .a40-ab-benefit h2,
body.a40-store .a40-ab-benefit h3,
body.a40-store .a40-ab-benefit p,
body.a40-store .a40-ab-benefit li,
body.a40-store .a40-ok-next h2,
body.a40-store .a40-ok-next h3,
body.a40-store .a40-ok-next p,
body.a40-store .a40-ok-next li,
body.a40-store .a40-acct-perks h3,
body.a40-store .a40-acct-perks li,
body.a40-store .a40-acct-perks p {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body.a40-store .a40-os-support-card input,
body.a40-store .a40-os-support-card select,
body.a40-store .a40-os-support-card textarea,
body.a40-store .a40-track-order input,
body.a40-store .a40-track-order select,
body.a40-store .a40-track-order textarea {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}
body.a40-store .a40-os-support-card input::placeholder,
body.a40-store .a40-os-support-card textarea::placeholder,
body.a40-store .a40-track-order input::placeholder,
body.a40-store .a40-track-order textarea::placeholder {
  color: rgba(255, 255, 255, 0.7) !important;
}
body.a40-store .a40-os-support-card select option,
body.a40-store .a40-track-order select option {
  color: #1c1916 !important;
  background: #fff !important;
}

/* ══════════════════════════════════════════
   BUTTONS & BADGES — last so labels always win
   ══════════════════════════════════════════ */

/* Filled CTAs on light surfaces → white on dark/orange */
body.a40-store [class*="-btn--primary"],
body.a40-store [class*="-btn-primary"],
body.a40-store [class*="-btn--buy"],
body.a40-store .btn-primary,
body.a40-store .a40-forty-cta,
body.a40-store .a40-btn-shop,
body.a40-store .a40-btn-all,
body.a40-store .a40-price-apply,
body.a40-store .a40-filter-toggle.is-open,
body.a40-store .a40-filter-mobile-toggle,
body.a40-store .a40-shop-hero-search-form button,
body.a40-store .a40-scroll-btn,
body.a40-store .a40-help-dock-cta,
body.a40-store .a40-track-submit,
body.a40-store button[type="submit"],
body.a40-store .a40-pd-btn--buy,
body.a40-store .a40-pd-btn--primary,
body.a40-store .a40-acct-btn--primary,
body.a40-store .a40-pd-pill.is-active,
body.a40-store .a40-tab-labels button.is-active,
body.a40-store .a40-shop-cat-pill.is-active,
body.a40-store .a40-cat-pill.is-active,
body.a40-store [class*="-chip"].is-active,
body.a40-store [class*="-pill"].is-active {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Ensure filled CTA backgrounds stay dark enough for white text */
body.a40-store .a40-price-apply,
body.a40-store .a40-pd-btn--buy,
body.a40-store .a40-pd-pill.is-active,
body.a40-store .a40-forty-cta {
  background: var(--a40-ink) !important;
}
body.a40-store .a40-price-apply:hover,
body.a40-store .a40-pd-btn--buy:hover,
body.a40-store .a40-forty-cta:hover {
  background: var(--a40-green-dark) !important;
  color: #fff !important;
}

/* Outline / ghost on light → ink */
body.a40-store [class*="-btn--outline"],
body.a40-store [class*="-btn--ghost"],
body.a40-store [class*="-btn-outline"],
body.a40-store [class*="-btn-ghost"],
body.a40-store .btn-outline,
body.a40-store .btn-light,
body.a40-store [class*="-btn--soft"],
body.a40-store .a40-pd-btn--cart,
body.a40-store [class*="-qty-btn"],
body.a40-store .a40-pd-stepper button,
body.a40-store .a40-cart-qty-btn,
body.a40-store [class*="-view-btn"]:not(.is-active),
body.a40-store [class*="-sort-btn"]:not(.is-active) {
  color: var(--a40-ink) !important;
  -webkit-text-fill-color: var(--a40-ink) !important;
}
body.a40-store .a40-pd-btn--cart {
  color: var(--a40-green-dark) !important;
  -webkit-text-fill-color: var(--a40-green-dark) !important;
  background: rgba(64, 145, 108, 0.12) !important;
}

/* Inverted primaries on dark summary / support / dock cards → dark on white */
body.a40-store .a40-cart-summary-card [class*="-btn--primary"],
body.a40-store .a40-co-summary-card [class*="-btn--primary"],
body.a40-store .a40-os-support-card [class*="-btn--primary"],
body.a40-store .a40-os-support .a40-os-btn--primary,
body.a40-store .a40-track-order [class*="-btn--primary"],
body.a40-store .a40-help-dock-card--primary [class*="-btn--primary"],
body.a40-store .a40-ok-next [class*="-btn--primary"],
body.a40-store .a40-ab-benefit [class*="-btn--primary"] {
  color: var(--a40-green-dark) !important;
  -webkit-text-fill-color: var(--a40-green-dark) !important;
  background: #fff !important;
}
body.a40-store .a40-cart-summary-card [class*="-btn--primary"]:hover,
body.a40-store .a40-co-summary-card [class*="-btn--primary"]:hover,
body.a40-store .a40-os-support-card [class*="-btn--primary"]:hover,
body.a40-store .a40-os-support .a40-os-btn--primary:hover,
body.a40-store .a40-track-order [class*="-btn--primary"]:hover,
body.a40-store .a40-help-dock-card--primary [class*="-btn--primary"]:hover {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: var(--a40-orange) !important;
}

/* Outline on dark islands → white */
body.a40-store .a40-cart-summary-card [class*="-btn--outline"],
body.a40-store .a40-co-summary-card [class*="-btn--outline"],
body.a40-store .a40-os-support-card [class*="-btn--outline"],
body.a40-store .a40-track-order [class*="-btn--outline"],
body.a40-store .a40-help-dock-card--primary [class*="-btn--outline"],
body.a40-store .a40-ok-next [class*="-btn--outline"],
body.a40-store .a40-ab-benefit [class*="-btn--outline"],
body.a40-store .a40-cart-summary-card [class*="-btn--ghost"],
body.a40-store .a40-co-summary-card [class*="-btn--ghost"] {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
}

/* Badges / sale / hot chips → white on accent */
body.a40-store [class*="-badge"],
body.a40-store [class*="-sale"],
body.a40-store .a40-discount,
body.a40-store .a40-nav-hot,
body.a40-store .a40-tool-badge,
body.a40-store .a40-mobile-quick-badge,
body.a40-store .a40-pd-badge,
body.a40-store .a40-pd-sale-tag,
body.a40-store .a40-deal-flash,
body.a40-store .a40-shop-sale {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Primary hover — never pale gold with white text */
body.a40-store [class*="-btn--primary"]:hover,
body.a40-store [class*="-btn-primary"]:hover,
body.a40-store button[type="submit"]:hover,
body.a40-store .a40-help-dock-cta:hover,
body.a40-store .a40-track-submit:hover,
body.a40-store .btn-primary:hover {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
