/* Global readability hardening for Lumen Fog — load last.
   Goal: every label, button, and body copy stays readable on its surface. */

/* Darker mute for pearl / foam panels (WCAG-friendlier) */
:root {
  --lm-mute: #3a3f4a;
  --a80-nav-mute: #3a3f4a;
}

/* —— Buttons —— */
.lm-btn,
.a80-btn,
button.lm-btn,
a.lm-btn {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}

.lm-btn--copper,
.a80-btn--copper,
.a80-btn--cobalt,
button.lm-btn--copper,
a.lm-btn--copper {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}

.lm-btn--ghost,
.a80-btn--ghost,
a.lm-btn--ghost,
button.lm-btn--ghost,
a.lm-btn.lm-btn--ghost,
button.lm-btn.lm-btn--ghost {
  color: #16181f !important;
  -webkit-text-fill-color: #16181f !important;
  background: #ffffff !important;
  border: 1px solid rgba(22, 24, 31, 0.22) !important;
}

.lm-btn--ghost:hover,
.a80-btn--ghost:hover,
a.lm-btn--ghost:hover,
button.lm-btn--ghost:hover,
a.lm-btn.lm-btn--ghost:hover,
button.lm-btn.lm-btn--ghost:hover {
  color: #16181f !important;
  -webkit-text-fill-color: #16181f !important;
  background: var(--lm-champagne) !important;
}

/* Ghost on dark ink panels → light text */
.lm-chamber-identity .lm-btn--ghost,
.lm-chamber-identity button.lm-btn--ghost,
.lm-chamber-identity a.lm-btn--ghost,
.lm-invite .lm-btn--ghost,
.lm-invite a.lm-btn--ghost,
.lm-help-rail-card--ink .lm-btn--ghost,
.lm-help-rail-card--ink a.lm-btn--ghost,
.lm-hero-actions .lm-btn--ghost,
.lm-hero-actions a.lm-btn--ghost,
.lm-hero-actions a.lm-btn.lm-btn--ghost,
.lm-terrace .lm-btn--ghost,
.lm-terrace a.lm-btn--ghost,
.lm-terrace button.lm-btn--ghost {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
}

.lm-chamber-identity .lm-btn--ghost:hover,
.lm-invite .lm-btn--ghost:hover,
.lm-help-rail-card--ink .lm-btn--ghost:hover,
.lm-hero-actions .lm-btn--ghost:hover,
.lm-hero-actions a.lm-btn--ghost:hover,
.lm-hero-actions a.lm-btn.lm-btn--ghost:hover {
  color: #16181f !important;
  -webkit-text-fill-color: #16181f !important;
  background: #ffffff !important;
}

.lm-dash-tile:nth-child(4) span,
.lm-dash-tile:nth-child(4) strong {
  color: #ffffff !important;
}

/* Default solid buttons on dark panels stay white */
/* Solid buttons on dark panels: prefer light fill + dark ink (account chamber pattern) */
.lm-chamber-identity .lm-btn:not(.lm-btn--ghost),
.lm-chamber-identity a.lm-btn:not(.lm-btn--ghost),
.lm-chamber-identity button.lm-btn:not(.lm-btn--ghost) {
  color: #16181f !important;
  -webkit-text-fill-color: #16181f !important;
  background: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.lm-invite .lm-btn:not(.lm-btn--ghost),
.lm-terrace .lm-btn:not(.lm-btn--ghost) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* —— Forms —— */
input,
textarea,
select,
.lm-field input,
.lm-field textarea,
.st-field input {
  color: var(--lm-ink) !important;
  -webkit-text-fill-color: var(--lm-ink) !important;
  background-color: #ffffff !important;
}

::placeholder {
  color: #5a6070 !important;
  opacity: 1 !important;
}

.lm-field span,
.lm-field > label,
label.lm-field span {
  color: #2f3440 !important;
  font-weight: 700 !important;
}

/* Quantity steppers */
.lm-cart-qty input,
.lm-cart-qty input[type="number"],
.lm-product-stepper input,
.lm-product-stepper input[type="number"] {
  color: var(--lm-ink) !important;
  -webkit-text-fill-color: var(--lm-ink) !important;
  background-color: #ffffff !important;
  opacity: 1 !important;
}

.lm-cart-qty button,
.lm-product-stepper button {
  color: var(--lm-ink) !important;
  -webkit-text-fill-color: var(--lm-ink) !important;
  background-color: #ffffff !important;
}

.lm-cart-qty button {
  color: var(--lm-copper-deep) !important;
  -webkit-text-fill-color: var(--lm-copper-deep) !important;
}

.lm-cart-qty button:hover,
.lm-product-stepper button:hover {
  color: var(--lm-copper-deep) !important;
  background-color: var(--lm-champagne) !important;
}

.a80-dock-bag {
  color: var(--lm-ink) !important;
  background-color: #ffffff !important;
  -webkit-text-fill-color: var(--lm-ink) !important;
}

/* —— Dark surfaces → light text —— */
.lm-chamber-identity,
.lm-invite,
.lm-terrace,
.lm-help-rail-card--ink,
.lm-dash-tile:nth-child(4),
.lm-cinematic-caption,
.lm-burst-ring a,
.lm-orbit a.is-live,
.lm-shop-aisle.is-on,
.lm-help-pill.is-on,
.lm-product-pill.is-on,
.lm-pages .is-active,
.st-spine-stamp,
.st-spine-nav a.active,
.st-spine-nav a.is-active,
.lm-success-bead.is-on,
.lm-success-bead.is-live,
.lm-success-step.is-live .lm-success-step-mark,
.lm-status-step.is-live .lm-status-step-mark,
.lm-status-node.is-current .lm-status-node-star,
.lm-contact-hero-aside,
.lm-company-orb--ink,
.lm-catalog-cta--ink {
  color: #ffffff;
}

.lm-help-pill.is-on em,
.lm-chamber-identity .lm-kicker,
.st-spine-label,
.st-spine-kicker {
  color: #ffd7b8 !important;
}

/* Tabs / segments: self-contained active state (no glider dependency) */
.lm-gate-tab,
.lm-segment,
.auth-split-tab {
  color: var(--lm-ink) !important;
  -webkit-text-fill-color: var(--lm-ink) !important;
}

.lm-gate-tab.is-active,
.lm-segment.is-active,
.auth-split-tab.is-active {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: var(--lm-ink) !important;
}

.lm-gate-glider,
.lm-segment-glider {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* —— Light panels → ink text —— */
.lm-panel-card,
.lm-gate-card,
.lm-help-chapter-head,
.lm-help-entry,
.lm-shop-hero,
.lm-shop-bar,
.lm-filter-sheet,
.lm-account-hero,
.lm-cinematic-copy,
.a80-panel,
.lm-track-console,
.lm-track-mast,
.lm-cart-mast,
.lm-cart-empty,
.lm-checkout-mast,
.lm-checkout-gate,
.lm-corridor-panel,
.lm-checkout-orb,
.lm-orders-mast,
.lm-status-mast,
.lm-status-miss,
.lm-status-docket,
.lm-success-mast,
.lm-contact-atrium,
.lm-contact-hero,
.lm-contact-form,
.lm-contact-channels,
.lm-catalog-hero,
.lm-catalog-cta,
.lm-company-hero,
.lm-company-legal,
.lm-product-wrap,
.lm-product-empty,
.lm-runway-body,
.lm-stream-card,
.lm-petal-body,
.lm-node,
.lm-dash-tile:not(:nth-child(4)),
.lm-perks,
.lm-desk-order,
.lm-help-rail-card:not(.lm-help-rail-card--ink) {
  color: var(--lm-ink);
}

.lm-mute,
.lm-lead,
.lm-shop-count,
.lm-shop-hero p,
.lm-petal-body em,
.lm-runway-body span,
.lm-stream-card span,
.lm-field span {
  color: var(--lm-mute) !important;
}

/* Secondary page titles under brandline (light panels only) */
.lm-account-hero h1,
.lm-shop-hero h1,
.lm-help-hero h1,
.lm-contact-hero h1,
.lm-company-hero h1,
.lm-catalog-hero h1,
.lm-track-mast h1,
.lm-cart-mast h1,
.lm-orders-mast h1,
.lm-checkout-mast h1,
.lm-status-mast h1,
.lm-success-mast h1 {
  color: var(--lm-mute) !important;
}

.lm-account-hero h1 em,
.lm-shop-hero h1 em,
.lm-help-hero h1 em,
.lm-contact-hero h1 em,
.lm-company-hero h1 em,
.lm-catalog-hero h1 em,
.lm-track-mast h1 em,
.lm-cart-mast h1 em,
.lm-orders-mast h1 em,
.lm-checkout-mast h1 em,
.lm-status-mast h1 em,
.lm-success-mast h1 em {
  color: var(--lm-copper) !important;
}

/* Prices / meta on light cards stay dark enough */
.lm-petal-body strong,
.lm-runway-body strong,
.lm-stream-card strong,
.lm-desk-order-meta,
.lm-product-price,
.lm-cart-ribbon-price {
  color: var(--lm-ink) !important;
}

.lm-petal-body em,
.lm-shop-hero-stats span,
.lm-catalog-stats span {
  color: #2f3440 !important;
  font-weight: 600 !important;
}

/* —— Dock nav codes —— */
.a80-dock-code {
  color: #ffffff !important;
  background: var(--lm-ink) !important;
}

.a80-dock-nav a.is-live .a80-dock-code {
  color: #16181f !important;
  background: #ffffff !important;
}

.a80-dock-nav a:not(.is-live) .a80-dock-code {
  color: #ffffff !important;
  background: #2a2e3a !important;
}

.a80-dock-tool-ico {
  color: #ffffff !important;
}

.a80-dock-tool-label {
  color: inherit;
}

.a80-dock-tool {
  color: var(--lm-ink) !important;
}

.a80-dock-tool--copper .a80-dock-tool-label,
.a80-dock-tool.a80-dock-tool--copper .a80-dock-tool-label {
  color: var(--lm-ink) !important;
}

.a80-dock-tool--copper .a80-dock-tool-ico,
.a80-dock-tool.a80-dock-tool--copper .a80-dock-tool-ico {
  color: #ffffff !important;
}

.a80-dock-mark {
  color: #ffffff !important;
}

.a80-dock-toggle {
  color: #ffffff !important;
  background: #16181f !important;
}

/* —— Lumen Terrace (dark) —— */
.lm-terrace-signal-row input {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background-color: rgba(14, 16, 22, 0.45) !important;
}

.lm-terrace-signal-row input::placeholder {
  color: rgba(255, 255, 255, 0.55) !important;
}

.lm-terrace-lead,
.lm-terrace-copy,
.lm-terrace-title em,
.lm-terrace-linkgrid a,
.lm-terrace-stack a,
.lm-terrace-policies a,
.lm-terrace-social-tile span,
.lm-terrace-pays span {
  color: rgba(255, 255, 245, 0.94) !important;
}

.lm-terrace-title strong,
.lm-terrace-brand,
.lm-terrace-social-tile strong,
.lm-terrace-copy strong,
.lm-terrace-mark {
  color: #ffffff !important;
}

.lm-terrace-facet-label,
.lm-terrace-signal-kicker,
.lm-terrace-idx,
.lm-terrace-policies a:hover {
  color: #ffd7b8 !important;
}

.lm-terrace .lm-btn--copper,
.lm-terrace a.lm-btn--copper,
.lm-terrace button.lm-btn--copper {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: linear-gradient(135deg, var(--lm-copper), var(--lm-copper-deep)) !important;
}

/* —— Chips / pills on light —— */
.lm-chip {
  color: var(--lm-ink) !important;
}

.lm-shop-aisle:not(.is-on),
.lm-help-pill:not(.is-on),
.lm-pages a,
.lm-pages span:not(.is-active) {
  color: var(--lm-ink) !important;
}

/* Notices / empty states */
.notice,
.lm-account-loading,
.lm-shop-empty,
.lm-cart-empty,
.lm-orders-empty,
.lm-help-empty {
  color: var(--lm-ink) !important;
}

.lm-cart-empty p,
.lm-shop-empty p,
.lm-orders-empty p {
  color: var(--lm-mute) !important;
}
