/* Appily Forty — soft orchard surfaces + contrast-safe overrides */

.a40-promo-strip {
  background: var(--a40-surface-elevated);
  border-bottom: 1px solid var(--a40-border);
}

.a40-header--vegist {
  background: var(--a40-surface-elevated);
  box-shadow: 0 2px 14px rgba(44, 40, 36, 0.05);
}

.a40-header--vegist .a40-mobile-panel {
  background: linear-gradient(180deg, var(--a40-surface-elevated) 0%, var(--a40-cream) 48%, var(--a40-warm) 100%);
}

.a40-footer--vegist {
  background: linear-gradient(180deg, #E8E2D9 0%, #DDD6CC 100%);
  color: var(--a40-ink);
  border-top: 1px solid var(--a40-border);
}

.a40-footer--vegist .a40-footer-brand p {
  color: var(--a40-muted);
  max-width: 42ch;
  line-height: 1.65;
}

.a40-footer--vegist .a40-footer-col h4 {
  color: var(--a40-green-dark);
}

.a40-footer--vegist .a40-footer-col a {
  color: var(--a40-ink);
  opacity: 0.82;
}

.a40-footer--vegist .a40-footer-col a:hover {
  color: var(--a40-orange);
  opacity: 1;
}

.a40-footer--vegist .a40-footer-base {
  color: var(--a40-muted);
}

[class*="page-"][class*="-forty"],
.page-home.a40-home-forty {
  background: transparent;
  color: var(--a40-ink);
}

[class*="-forty"] [class*="-hero-bg"] {
  background: var(--a40-hero-gradient) !important;
}

[class*="-forty"] [class*="-blob--1"] {
  background: var(--a40-blob-warm) !important;
  opacity: 0.85;
}
[class*="-forty"] [class*="-blob--2"] {
  background: var(--a40-blob-cool) !important;
  opacity: 0.85;
}

/* Light cards & panels only — avoid substring matches like -order, -badge, -item */
/* Auth / buy / summary dark islands are handled in a40-readable.css */
[class*="-forty"] [class*="-card"]:not([class*="-summary-card"]):not([class*="-dock-card--primary"]):not([class*="-buy-card"]),
[class*="-forty"] [class*="-panel"]:not([class*="-tab-panel"]):not([class*="-auth-panel"]),
[class*="-forty"] [class*="-main"]:not([class*="-auth"]),
[class*="-forty"] [class*="-sidebar"]:not([class*="-auth"]),
[class*="-forty"] [class*="-lookup"],
[class*="-forty"] [class*="-info"],
[class*="-forty"] [class*="-gallery"],
[class*="-forty"] [class*="-trust-card"],
[class*="-forty"] [class*="-tabs"]:not([class*="-tab-link"]),
[class*="-forty"] [class*="-dock"]:not([class*="-dock-card--primary"]),
[class*="-forty"] [class*="-miss-inner"],
[class*="-forty"] [class*="-empty"],
[class*="-forty"] [class*="-log"],
[class*="-forty"] [class*="-details"],
[class*="-forty"] [class*="-items"],
[class*="-forty"] [class*="-timeline-wrap"],
[class*="-forty"] .a40-shop-card,
[class*="-forty"] .a40-shop-filters,
[class*="-forty"] .a40-shop-empty,
.page-home.a40-home-forty .a40-cat-circle,
.page-home.a40-home-forty .a40-product-card,
.page-home.a40-home-forty .a40-trio-card,
.page-home.a40-home-forty .a40-organic-box,
.a40-pages .panel,
.a40-pages-vegist .panel {
  background: var(--a40-surface);
  color: var(--a40-ink);
}

[class*="-forty"] [class*="-card-img"],
.a40-home-forty .a40-product-card-img,
.a40-home-forty .a40-cat-circle-img {
  background: var(--a40-photo-bg) !important;
}

/* Light form fields only (not inside dark panels) */
[class*="-forty"] [class*="-main"] input:not([type="checkbox"]):not([type="radio"]),
[class*="-forty"] [class*="-main"] select,
[class*="-forty"] [class*="-main"] textarea,
[class*="-forty"] [class*="-form"]:not(.a40-os-form) input:not([type="checkbox"]):not([type="radio"]),
[class*="-forty"] [class*="-form"]:not(.a40-os-form) select,
[class*="-forty"] [class*="-form"]:not(.a40-os-form) textarea,
[class*="-forty"] [class*="-panel"] input:not([type="checkbox"]):not([type="radio"]),
[class*="-forty"] [class*="-panel"] select,
[class*="-forty"] [class*="-panel"] textarea,
.a40-pages .panel input,
.a40-pages .panel select,
.a40-pages .panel textarea {
  background: var(--a40-surface-elevated);
  border-color: var(--a40-border);
  color: var(--a40-ink);
}

[class*="-forty"] [class*="-main"] input::placeholder,
[class*="-forty"] [class*="-main"] textarea::placeholder,
[class*="-forty"] [class*="-form"]:not(.a40-os-form) input::placeholder,
[class*="-forty"] [class*="-form"]:not(.a40-os-form) textarea::placeholder {
  color: var(--a40-muted);
}

.a40-home-forty .a40-promo-tile--grey { background: linear-gradient(145deg, #EDEAE4, #E4E0D9); }
.a40-home-forty .a40-promo-tile--blue { background: linear-gradient(145deg, #E4EBE8, #D9E3DE); }
.a40-home-forty .a40-promo-tile--sand { background: linear-gradient(145deg, #F0E8DC, #E6DDD0); }

.a40-help-forty .a40-help-panel-icon {
  filter: saturate(0.75);
}

.a40-forty-trending::before {
  background: linear-gradient(180deg, transparent, rgba(58, 107, 88, 0.03));
}

.page-home.a40-home-forty .a40-promo-trio {
  background: transparent;
}
.page-home.a40-home-forty .section-muted {
  background: rgba(235, 228, 218, 0.42) !important;
  color: var(--a40-ink);
}
.page-home.a40-home-forty .a40-categories.section-muted {
  background: rgba(235, 228, 218, 0.42) !important;
  color: var(--a40-ink) !important;
}
.page-home.a40-home-forty .a40-categories .a40-section-title,
.page-home.a40-home-forty .a40-categories .a40-section-tag,
.page-home.a40-home-forty .a40-cat-card,
.page-home.a40-home-forty .a40-cat-card * {
  color: var(--a40-ink) !important;
}
.page-home.a40-home-forty .a40-cat-card {
  background: var(--a40-surface-elevated) !important;
  border-color: var(--a40-border) !important;
}
.page-home.a40-home-forty .a40-cat-circle-img {
  background: var(--a40-photo-bg);
}
.page-home.a40-home-forty .a40-vegist-float {
  background: var(--a40-surface);
}

/* ── Dark orchard panels — keep white text readable ── */
.a40-os-support-card,
.a40-track-order,
.a40-cart-summary-card,
.a40-co-summary-card,
.a40-help-dock-card--primary,
.a40-ab-benefit,
.a40-ok-next,
.a40-acct-perks {
  background: linear-gradient(160deg, var(--a40-green-dark) 0%, #1a3d2e 100%) !important;
  color: #fff !important;
}

.a40-os-support-card h2,
.a40-os-support-card p,
.a40-os-support-card label span,
.a40-track-order,
.a40-track-order strong,
.a40-track-order span,
.a40-cart-summary-card,
.a40-cart-summary-card dt,
.a40-cart-summary-card dd,
.a40-co-summary-card,
.a40-co-summary-card dt,
.a40-co-summary-card dd,
.a40-help-dock-card--primary,
.a40-help-dock-card--primary p,
.a40-ab-benefit,
.a40-ok-next,
.a40-acct-perks,
.a40-acct-perks h3,
.a40-acct-perks li {
  color: #fff !important;
}

.a40-cart-summary-card .a40-cart-btn--primary,
.a40-co-summary-card .a40-co-btn--primary {
  background: var(--a40-surface) !important;
  color: var(--a40-green-dark) !important;
}

.a40-os-support-card input,
.a40-os-support-card select,
.a40-os-support-card textarea {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #fff !important;
}

.a40-os-support-card input::placeholder,
.a40-os-support-card textarea::placeholder {
  color: rgba(255, 255, 255, 0.55) !important;
}

.a40-os-support-card select option {
  color: var(--a40-ink);
  background: #fff;
}

/* Status badges — preserve tone colors */
.a40-os-status-badge {
  background: var(--a40-surface) !important;
}
.a40-os-status-badge.tone-delivered {
  border-color: rgba(64, 145, 108, 0.35) !important;
  background: rgba(64, 145, 108, 0.1) !important;
}
.a40-os-status-badge.tone-delivered strong {
  color: var(--a40-green-dark) !important;
}
.a40-os-status-badge.tone-shipped {
  border-color: rgba(212, 160, 74, 0.35) !important;
}
.a40-os-status-badge.tone-cancelled {
  border-color: rgba(168, 69, 80, 0.3) !important;
  background: rgba(168, 69, 80, 0.08) !important;
}
.a40-os-status-badge.tone-cancelled strong {
  color: var(--a40-berry) !important;
}
.a40-os-status-badge strong {
  color: var(--a40-green-dark) !important;
}
.a40-os-status-label {
  color: var(--a40-muted) !important;
}

/* Muted body copy on light panels */
[class*="-forty"] [class*="-lede"],
[class*="-forty"] [class*="-note"],
[class*="-forty"] [class*="-hint"],
[class*="-forty"] .mini-copy {
  color: var(--a40-muted);
}

/* Headline accent spans get full gradient treatment in a40-readable.css */
