/* =====================================================
   Safe IRA Rollover — Global Contrast Fix
   Fixes dark blocks with low-contrast slate/gold/brown text
   Last updated: 2026-07-10
   ===================================================== */

/* 1) Make dark content blocks readable */
.bg-slate-950,
.bg-slate-900,
.bg-slate-800,
.bg-black {
  color: #f8fafc !important;
}

/* 2) Force low-contrast text colors inside dark blocks to become readable */
.bg-slate-950 .text-slate-950,
.bg-slate-950 .text-slate-900,
.bg-slate-950 .text-slate-800,
.bg-slate-950 .text-slate-700,
.bg-slate-950 .text-slate-600,
.bg-slate-950 .text-gray-950,
.bg-slate-950 .text-gray-900,
.bg-slate-950 .text-gray-800,
.bg-slate-950 .text-gray-700,
.bg-slate-950 .text-gray-600,
.bg-slate-950 .text-brand-900,
.bg-slate-950 .text-brand-800,
.bg-slate-950 .text-brand-700,
.bg-slate-950 .text-brand-600,
.bg-slate-950 .text-brand-500,
.bg-slate-950 .text-warning-900,
.bg-slate-950 .text-amber-900,
.bg-slate-950 .text-amber-800,
.bg-slate-950 .text-amber-700,

.bg-slate-900 .text-slate-950,
.bg-slate-900 .text-slate-900,
.bg-slate-900 .text-slate-800,
.bg-slate-900 .text-slate-700,
.bg-slate-900 .text-slate-600,
.bg-slate-900 .text-gray-950,
.bg-slate-900 .text-gray-900,
.bg-slate-900 .text-gray-800,
.bg-slate-900 .text-gray-700,
.bg-slate-900 .text-gray-600,
.bg-slate-900 .text-brand-900,
.bg-slate-900 .text-brand-800,
.bg-slate-900 .text-brand-700,
.bg-slate-900 .text-brand-600,
.bg-slate-900 .text-brand-500,
.bg-slate-900 .text-warning-900,
.bg-slate-900 .text-amber-900,
.bg-slate-900 .text-amber-800,
.bg-slate-900 .text-amber-700,

.bg-slate-800 .text-slate-950,
.bg-slate-800 .text-slate-900,
.bg-slate-800 .text-slate-800,
.bg-slate-800 .text-slate-700,
.bg-slate-800 .text-slate-600,
.bg-slate-800 .text-brand-900,
.bg-slate-800 .text-brand-800,
.bg-slate-800 .text-brand-700,

.bg-black .text-slate-950,
.bg-black .text-slate-900,
.bg-black .text-slate-800,
.bg-black .text-slate-700,
.bg-black .text-slate-600,
.bg-black .text-brand-900,
.bg-black .text-brand-800,
.bg-black .text-brand-700 {
  color: #f8fafc !important;
}

/* 3) Muted text inside dark blocks should be light gray, not invisible */
.bg-slate-950 .text-slate-500,
.bg-slate-950 .text-slate-400,
.bg-slate-950 .text-gray-500,
.bg-slate-950 .text-gray-400,
.bg-slate-900 .text-slate-500,
.bg-slate-900 .text-slate-400,
.bg-slate-900 .text-gray-500,
.bg-slate-900 .text-gray-400,
.bg-black .text-slate-500,
.bg-black .text-slate-400 {
  color: #cbd5e1 !important;
}

/* 4) Eyebrow labels on dark blocks */
.bg-slate-950 .eyebrow-mono,
.bg-slate-900 .eyebrow-mono,
.bg-slate-800 .eyebrow-mono,
.bg-black .eyebrow-mono {
  color: #fef3c7 !important;
}

/* 5) Links inside dark blocks */
.bg-slate-950 a:not(.bg-white):not(.bg-amber-50):not(.bg-brand-50):not(.bg-slate-50),
.bg-slate-900 a:not(.bg-white):not(.bg-amber-50):not(.bg-brand-50):not(.bg-slate-50),
.bg-slate-800 a:not(.bg-white):not(.bg-amber-50):not(.bg-brand-50):not(.bg-slate-50),
.bg-black a:not(.bg-white):not(.bg-amber-50):not(.bg-brand-50):not(.bg-slate-50) {
  color: #ffffff !important;
  text-decoration-color: rgba(255,255,255,.7) !important;
}

/* 6) Convert dark CTA buttons into readable cream buttons */
a[class*="bg-slate-950"],
a[class*="bg-slate-900"],
a[class*="bg-black"],
button[class*="bg-slate-950"],
button[class*="bg-slate-900"],
button[class*="bg-black"] {
  background: #fff7ed !important;
  border: 1px solid #fdba74 !important;
  color: #111827 !important;
}

/* 7) Keep dark top disclosure bars readable if they stay dark */
div.bg-slate-950.text-slate-300,
div.bg-slate-900.text-slate-300,
div.bg-black.text-slate-300 {
  color: #e2e8f0 !important;
}

/* =====================================================
   Nested Light Card Reset
   Fixes white/cream cards inside dark footer sections
   such as "Explore Our Network"
   ===================================================== */

.bg-slate-950 .bg-white,
.bg-slate-900 .bg-white,
.bg-slate-800 .bg-white,
.bg-black .bg-white,

.bg-slate-950 .bg-slate-50,
.bg-slate-900 .bg-slate-50,
.bg-slate-800 .bg-slate-50,
.bg-black .bg-slate-50,

.bg-slate-950 .bg-brand-50,
.bg-slate-900 .bg-brand-50,
.bg-slate-800 .bg-brand-50,
.bg-black .bg-brand-50,

.bg-slate-950 .bg-amber-50,
.bg-slate-900 .bg-amber-50,
.bg-slate-800 .bg-amber-50,
.bg-black .bg-amber-50 {
  color: #0f172a !important;
}

/* Titles and normal text inside nested light cards */
.bg-slate-950 .bg-white *,
.bg-slate-900 .bg-white *,
.bg-slate-800 .bg-white *,
.bg-black .bg-white *,

.bg-slate-950 .bg-slate-50 *,
.bg-slate-900 .bg-slate-50 *,
.bg-slate-800 .bg-slate-50 *,
.bg-black .bg-slate-50 *,

.bg-slate-950 .bg-brand-50 *,
.bg-slate-900 .bg-brand-50 *,
.bg-slate-800 .bg-brand-50 *,
.bg-black .bg-brand-50 *,

.bg-slate-950 .bg-amber-50 *,
.bg-slate-900 .bg-amber-50 *,
.bg-slate-800 .bg-amber-50 *,
.bg-black .bg-amber-50 * {
  color: inherit !important;
}

/* Headings inside white network cards */
.bg-slate-950 .bg-white h2,
.bg-slate-950 .bg-white h3,
.bg-slate-950 .bg-white h4,
.bg-slate-950 .bg-white strong,
.bg-slate-900 .bg-white h2,
.bg-slate-900 .bg-white h3,
.bg-slate-900 .bg-white h4,
.bg-slate-900 .bg-white strong,
.bg-black .bg-white h2,
.bg-black .bg-white h3,
.bg-black .bg-white h4,
.bg-black .bg-white strong {
  color: #0f172a !important;
}

/* Descriptions inside white network cards */
.bg-slate-950 .bg-white p,
.bg-slate-950 .bg-white span,
.bg-slate-900 .bg-white p,
.bg-slate-900 .bg-white span,
.bg-black .bg-white p,
.bg-black .bg-white span {
  color: #475569 !important;
}

/* Links/cards remain readable */
.bg-slate-950 a.bg-white,
.bg-slate-900 a.bg-white,
.bg-slate-800 a.bg-white,
.bg-black a.bg-white {
  color: #0f172a !important;
  text-decoration-color: #9d8249 !important;
}

/* Brand/network names */
.bg-slate-950 a.bg-white .font-bold,
.bg-slate-950 a.bg-white .font-black,
.bg-slate-900 a.bg-white .font-bold,
.bg-slate-900 a.bg-white .font-black,
.bg-black a.bg-white .font-bold,
.bg-black a.bg-white .font-black {
  color: #1e293b !important;
}

/* Better mobile separation */
@media (max-width: 640px) {
  .bg-slate-950 a.bg-white,
  .bg-slate-900 a.bg-white,
  .bg-slate-800 a.bg-white,
  .bg-black a.bg-white {
    display: block;
    width: 100%;
    border: 1px solid #e2e8f0 !important;
    background: #fffefb !important;
    padding: 1rem !important;
  }
}
