/* D810-EMERGENCY-VISIBILITY-FIX — force text dark everywhere except accents */

/* === Force dark text on all content === */
body, body p, body div, body span, body h1, body h2, body h3, body h4, body h5, body h6,
body li, body td, body th, body section, body section *, body article, body article *,
body header h1, body header h2, body footer p, body main *, body aside *,
[class*="card"] p, [class*="card"] div:not([class*="badge"]):not([class*="logo"]),
[class*="card"] h1, [class*="card"] h2, [class*="card"] h3, [class*="card"] h4,
[class*="card"] span, [class*="card"] li,
[class*="panel"] *:not([class*="badge"]):not([class*="logo"]),
[class*="kpi"] *:not([class*="badge"]):not([class*="logo"]),
[class*="matrix"] *, [class*="pred"] *, [class*="dashboard"] *,
[class*="grid"] > *, [class*="row"] > *, [class*="block"] > *,
.partner-name, .partner-tier, [class*="partner"] *:not([class*="logo"]) {
  color: #1B1B1B !important;
}

/* === Muted secondary text === */
[class*="muted"], [class*="secondary"], [class*="sub"], [class*="caption"],
small, .text-muted, .text-secondary {
  color: #555555 !important;
}

/* === Brand/accent text preserved === */
[class*="brand"], [class*="accent"], [class*="primary-color"],
[style*="color:#"], [style*="color: #"] {
  color: revert;
}

/* === Banner CTA stays white text === */
#d466-sticky-cta-bar, #d466-sticky-cta-bar *,
[id*="sticky-cta"], [id*="sticky-cta"] *,
[class*="sticky-cta"], [class*="sticky-cta"] *,
[class*="cta-bar"], [class*="cta-bar"] * {
  color: #ffffff !important;
}
/* Except button which is indigo on white pill */
#d466-sticky-cta-bar a.cta-btn,
[id*="sticky-cta"] a.cta-btn, [id*="sticky-cta"] a:not(.close-x),
[class*="sticky-cta"] a.cta-btn {
  color: #3730A3 !important;
  background: #ffffff !important;
}

/* === Headings explicitly dark === */
h1, h2, h3, h4, h5, h6 { color: #1B1B1B !important; }

/* === Links - keep indigo brand === */
a:not([class*="btn"]):not([class*="button"]):not(.close-x) {
  color: #3730A3 !important;
}
a:hover { color: #4F46E5 !important; }

/* === Form elements === */
input, textarea, select, label {
  color: #1B1B1B !important;
  background-color: #ffffff !important;
}

/* === Status badges keep their colors === */
[class*="badge"], [class*="pill"]:not([class*="cta"]), [class*="chip"],
[class*="tag"]:not([class*="title"]), [class*="status"] {
  color: revert;
}

/* === Logos keep gradient text === */
[class*="logo"], [class*="brand-mark"], [class*="icon"] {
  color: revert;
}
