/* Global readability / contrast overrides — loads last */

/* Darken soft “mute” tokens used for body copy on light surfaces */
body.zv-body,
body.lx-body,
body.vb-body,
body.fx-body,
body.tp-body,
body.st-body,
body.od-body,
body.ng-body,
body.ic-body,
body.qz-body,
body.rp-body,
body.cv-body,
body.kb-body,
body.rs-body,
body.cx-codex {
  --zv-mute: #3d5c57;
  --lx-mute: #3f4f63;
  --vb-mute: #3d4a5c;
  --fx-mute: #454056;
  --tp-mute: #3a4854;
  --st-mute: #3f4f63;
  --od-mute: #3f4f63;
  --ng-mute: #3f3f46;
  --ic-mute: #475569;
  --qz-mute: #3d4558;
  --rp-mute: #3d4b5a;
  --cv-mute: #3f4656;
  --kb-mute: #3f4f63;
  --rs-mute: #3f4654;
  --zvp-mute: #9eb8b2;
}

/* Dock: inactive links + search must stay bright on dark chrome */
nav.zv-dock .zv-dock-link,
.zv-dock-bar .zv-dock-link,
.zv-dock-rail .zv-dock-link {
  color: rgba(238, 246, 244, 0.92) !important;
}

nav.zv-dock .zv-dock-link.is-on,
.zv-dock-bar .zv-dock-link.is-on,
.zv-dock-rail .zv-dock-link.is-on {
  color: var(--zv-dock-void, #04151A) !important;
}

.zv-dock-rail .zv-dock-brand strong {
  opacity: 1;
  color: rgba(238, 246, 244, 0.82) !important;
}

.zv-dock-rail .zv-dock-seek input {
  background: rgba(238, 246, 244, 0.14) !important;
  color: #fff !important;
  border: 1px solid rgba(238, 246, 244, 0.32) !important;
}

.zv-dock-rail .zv-dock-seek input::placeholder {
  color: rgba(238, 246, 244, 0.82) !important;
  opacity: 1;
}

/* Forms: labels, eye toggles, placeholders */
label,
.lx-field label,
.ir-field label,
.st-field label,
.ng-field label,
.tp-field label,
.qz-qty-row label,
.rp-field label,
.ic-field > span,
.ic-field label {
  color: #1e293b !important;
}

/* Labels sitting on dark panels */
.st-settle label,
.tp-console label,
.tp-field label,
.vb-dock label,
.zv-dock label,
.ng-side label,
.lx-story label,
.zv-plinth label {
  color: rgba(248, 250, 252, 0.92) !important;
}

.lx-eyebrow-soft {
  color: #5ee1f0 !important; /* on dark story panels */
}

.lx-story .lx-eyebrow-soft,
.lx-story .lx-eyebrow {
  color: #7de3f0 !important;
}

.lx-glass label,
.lx-pane label,
.lx-vault label,
.auth-split-panel label {
  color: #334155 !important;
}

.lx-eye,
.ir-eye,
[data-ir-eye] {
  color: #1e293b !important;
  background: rgba(15, 23, 42, 0.1) !important;
}

.lx-eye:hover,
.ir-eye:hover,
[data-ir-eye]:hover {
  color: #0f172a !important;
  background: rgba(15, 23, 42, 0.16) !important;
}

.lx-seg-btn {
  color: #475569 !important;
}

.lx-seg-btn.is-active,
.lx-seg-btn:hover {
  color: #0f172a !important;
}

input::placeholder,
textarea::placeholder,
select::placeholder {
  color: #64748b !important;
  opacity: 1;
}

/* Dark search fields need light text + placeholders */
.fx-seek input,
.vb-dock-shell input,
.tp-console .tp-field input,
.zv-dock-seek input,
.st-promo-drawer input {
  color: #fff !important;
}

.fx-seek input::placeholder,
.vb-dock-shell input::placeholder,
.tp-console .tp-field input::placeholder,
.zv-dock-seek input::placeholder,
.st-promo-drawer input::placeholder {
  color: rgba(255, 255, 255, 0.78) !important;
  opacity: 1;
}

/* Ghost buttons on light surfaces: never white-on-white */
.od-btn-ghost,
.ng-btn-ghost,
.ic-btn-ghost,
.cv-btn-ghost,
.qz-btn-ghost,
.rs-btn-ghost,
.lx-btn-ghost,
.ir-btn-ghost,
.st-empty .st-btn-ghost,
.st-empty .st-btn-soft {
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.28) !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

/* Ghost buttons on dark settlement / tally panels */
.st-settle .st-btn-ghost,
.st-tally .st-btn-ghost,
.st-actions .st-btn-ghost,
.st-side .st-btn-ghost {
  color: #fff !important;
  border-color: rgba(248, 250, 252, 0.55) !important;
  background: transparent !important;
}

.st-promo-toggle,
.st-promo-toggle span,
.st-promo-toggle em,
.st-promo-drawer p,
.st-ship-note {
  color: rgba(248, 250, 252, 0.9) !important;
}

.st-promo-drawer input::placeholder {
  color: rgba(248, 250, 252, 0.65) !important;
}

/* Primary buttons: ensure white label */
button[type="submit"],
.lx-btn,
.ir-btn,
.st-btn:not(.st-btn-ghost):not(.st-btn-soft),
.ng-btn:not(.ng-btn-ghost),
.od-btn:not(.od-btn-ghost),
.tp-btn,
.vb-btn,
.qz-btn,
.rp-btn,
.ic-btn:not(.ic-btn-ghost),
.cv-btn:not(.cv-btn-ghost),
.rs-btn,
.fx-btn,
.fx-open,
.zv-btn-primary {
  color: #fff !important;
}

.zv-btn-ghost {
  color: #f8fafc !important;
  border-color: rgba(248, 250, 252, 0.75) !important;
  text-shadow: 0 1px 8px rgba(4, 21, 26, 0.45);
}

/* Body / helper copy on light pages */
.fx-dek,
.fx-aisle,
.fx-sku,
.fx-facet-meta .fx-sku,
.mini-copy,
.od-lede,
.st-lede,
.ng-lede,
.qz-lede,
.rp-lede,
.rs-lede,
.vb-lede,
.vb-faq-a,
.vb-card span,
.lx-story-lede,
.profile-item .k,
.order-row .mini-copy {
  color: #334155 !important;
}

.lx-story .lx-story-lede,
.lx-story p,
.lx-pips li {
  color: rgba(241, 245, 249, 0.92) !important;
}

/* Kickers on light backgrounds */
.fx-kicker,
.od-kicker,
.st-kicker,
.ng-kicker:not(.ng-kicker-dark),
.qz-kicker,
.rp-kicker:not(.rp-kicker-dark),
.rs-kicker,
.vb-kicker:not(.vb-kicker-invert),
.kb-kicker:not(.kb-kicker-on-dark),
.cv-kicker:not(.cv-kicker-on-dark),
.ic-kicker:not(.ic-kicker-on-dark),
.tp-kicker {
  opacity: 1;
}

/* Dark panels keep light text */
.lx-story,
.st-tally,
.st-side,
.ng-side,
.ic-receipt,
.cv-seal,
.kb-registry,
.rp-aside,
.vb-human,
.zv-signal,
.zv-hero,
.tp-console {
  --contrast-on-dark: #f8fafc;
}

.lx-story h2,
.st-tally,
.st-tally *,
.ng-side,
.ng-side .ng-kicker-dark,
.ng-totals span,
.ng-totals strong,
.ic-kicker-on-dark,
.cv-kicker-on-dark,
.kb-kicker-on-dark,
.rp-kicker-dark,
.vb-kicker-invert,
.zv-headline,
.zv-lede,
.tp-console h1,
.tp-console .tp-lede,
.tp-console .tp-kicker {
  color: #f8fafc !important;
}

.tp-console .tp-lede {
  color: rgba(232, 238, 241, 0.88) !important;
}

.tp-field label {
  color: rgba(232, 238, 241, 0.9) !important;
}

.st-tally-row span,
.st-tally-row strong,
.st-side,
.st-side p,
.st-side h2,
.ng-totals span {
  color: rgba(248, 250, 252, 0.88) !important;
}

.st-tally-row strong,
.ng-totals strong {
  color: #fff !important;
}

/* Product / shop meta */
.fx-facet-meta h2 a,
.fx-facet-meta h2 {
  color: #0f172a !important;
}

.fx-price {
  color: #0f766e !important;
}

/* Help FAQ answers */
.vb-fold-a,
.vb-faq-a {
  color: #334155 !important;
}

.vb-fold-a a,
.vb-faq-a a {
  color: #1d4ed8 !important;
  text-decoration: underline;
}

.vb-sector em {
  color: #3f4a5c !important;
}

.vb-fold-q {
  color: #0f172a !important;
}

/* Plinth footer links already light-on-dark; bump faint ones */
.zv-plinth-lede,
.zv-plinth-link,
.zv-plinth-copy,
.zv-plinth-disclaimer,
.zv-plinth-card span {
  color: rgba(238, 246, 244, 0.9) !important;
}

.zv-plinth-news input {
  color: #04151a !important;
  background: #eef6f4 !important;
}

.zv-plinth-news input::placeholder {
  color: #64748b !important;
}

.zv-plinth-news button {
  color: #04151a !important;
}
