/* VM2 / CGL Contrast Safety Layer v3.0.4
   Purpose: deterministic high-contrast typography without DOM mutation.
   Rule: dark text on light surfaces, light text on dark surfaces. */
:root{
  --cgl-text-dark:#0b1933;
  --cgl-text-body:#263650;
  --cgl-text-muted:#52617a;
  --cgl-text-light:#ffffff;
  --cgl-text-light-soft:#e8eef9;
  --cgl-text-light-muted:#c7d3e6;
}

/* ---------- Global light surfaces ---------- */
body{color:var(--cgl-text-body)!important}
main section:not(:first-child){color:var(--cgl-text-body)}
main section:not(:first-child) h1,
main section:not(:first-child) h2,
main section:not(:first-child) h3,
main section:not(:first-child) h4,
main section:not(:first-child) h5,
main section:not(:first-child) h6{color:var(--cgl-text-dark)}

/* Explicit light utility/surface classes always carry dark text. */
.bg-white,.bg-gray-50,.bg-gray-100,.bg-slate-50,.bg-slate-100,
[class*="bg-[#fff"],[class*="bg-[#FFF"],[class*="bg-[#f"],[class*="bg-[#F"],
[class*="bg-white"],[class*="bg-gray-"],[class*="bg-slate-"]{
  color:var(--cgl-text-body)!important;
}
.bg-white h1,.bg-white h2,.bg-white h3,.bg-white h4,.bg-white h5,.bg-white h6,
[class*="bg-[#fff"] h1,[class*="bg-[#fff"] h2,[class*="bg-[#fff"] h3,[class*="bg-[#fff"] h4,
[class*="bg-[#f"] h1,[class*="bg-[#f"] h2,[class*="bg-[#f"] h3,[class*="bg-[#f"] h4{
  color:var(--cgl-text-dark)!important;
}
.bg-white p,.bg-white span,.bg-white li,.bg-white label,
[class*="bg-[#fff"] p,[class*="bg-[#fff"] span,[class*="bg-[#fff"] li,[class*="bg-[#fff"] label,
[class*="bg-[#f"] p,[class*="bg-[#f"] span,[class*="bg-[#f"] li,[class*="bg-[#f"] label{
  color:var(--cgl-text-body)!important;
}

/* ---------- Header / navigation: dark surface => light content ---------- */
body>nav,
body>nav a:not(.bg-white),
body>nav button,
body>nav span,
body>nav svg{color:var(--cgl-text-light)!important}
body>nav a.bg-white,
body>nav a.bg-white span,
body>nav a.bg-white svg{color:#173f91!important}

/* Full-screen / mega menu uses dark branded background. */
body>nav+div.fixed,
body>nav+div.fixed h1,body>nav+div.fixed h2,body>nav+div.fixed h3,body>nav+div.fixed h4,
body>nav+div.fixed p,body>nav+div.fixed span,body>nav+div.fixed li,body>nav+div.fixed a,
body>nav+div.fixed button,body>nav+div.fixed svg{color:var(--cgl-text-light)!important}

/* ---------- Hero / image-overlay sections ---------- */
.cgl-home main>section:first-child,
.cgl-home main>section:first-child h1,.cgl-home main>section:first-child h2,.cgl-home main>section:first-child h3,
.cgl-home main>section:first-child p,.cgl-home main>section:first-child span,.cgl-home main>section:first-child label,
.cgl-home main>section:first-child a:not([class*="bg-white"]){color:var(--cgl-text-light)!important}

/* Inner-page hero is always dark/image overlay. */
.cgl-inner main>section:first-child,
.cgl-inner main>section:first-child h1,.cgl-inner main>section:first-child h2,.cgl-inner main>section:first-child h3,
.cgl-inner main>section:first-child p,.cgl-inner main>section:first-child span,.cgl-inner main>section:first-child li,
.cgl-inner main>section:first-child a:not([class*="bg-white"]){color:var(--cgl-text-light)!important}

/* Light cards/forms sitting inside dark hero must return to dark typography. */
main>section:first-child .bg-white,
main>section:first-child [class*="bg-white"],
main>section:first-child [class*="bg-[#fff"],
main>section:first-child [class*="bg-[#f"],
main>section:first-child input,main>section:first-child select,main>section:first-child textarea{
  color:var(--cgl-text-dark)!important;
}
main>section:first-child .bg-white h1,main>section:first-child .bg-white h2,main>section:first-child .bg-white h3,
main>section:first-child .bg-white p,main>section:first-child .bg-white span,main>section:first-child .bg-white label,
main>section:first-child [class*="bg-white"] h1,main>section:first-child [class*="bg-white"] h2,
main>section:first-child [class*="bg-white"] h3,main>section:first-child [class*="bg-white"] p,
main>section:first-child [class*="bg-white"] span,main>section:first-child [class*="bg-white"] label{
  color:var(--cgl-text-body)!important;
}

/* ---------- Known dark homepage sections ---------- */
.cgl-home main>section:nth-child(3),
.cgl-home main>section:nth-child(6),
.cgl-home main>section:nth-child(9),
.cgl-home main>section:nth-child(12),
.cgl-home main>section:nth-child(13),
.cgl-home main>section:nth-child(14){color:var(--cgl-text-light)!important}
.cgl-home main>section:nth-child(3)>div>h1,.cgl-home main>section:nth-child(3)>div>h2,
.cgl-home main>section:nth-child(6) h1,.cgl-home main>section:nth-child(6) h2,.cgl-home main>section:nth-child(6) h3,
.cgl-home main>section:nth-child(9) h1,.cgl-home main>section:nth-child(9) h2,.cgl-home main>section:nth-child(9) h3,
.cgl-home main>section:nth-child(12) h1,.cgl-home main>section:nth-child(12) h2,.cgl-home main>section:nth-child(12) h3,
.cgl-home main>section:nth-child(13) h1,.cgl-home main>section:nth-child(13) h2,.cgl-home main>section:nth-child(13) h3,
.cgl-home main>section:nth-child(14) h1,.cgl-home main>section:nth-child(14) h2,.cgl-home main>section:nth-child(14) h3,
.cgl-home main>section:nth-child(6) p,.cgl-home main>section:nth-child(6) span,.cgl-home main>section:nth-child(6) li,
.cgl-home main>section:nth-child(9) p,.cgl-home main>section:nth-child(9) span,.cgl-home main>section:nth-child(9) li,
.cgl-home main>section:nth-child(12) p,.cgl-home main>section:nth-child(12) span,.cgl-home main>section:nth-child(12) li,
.cgl-home main>section:nth-child(13) p,.cgl-home main>section:nth-child(13) span,.cgl-home main>section:nth-child(13) li,.cgl-home main>section:nth-child(13) label,
.cgl-home main>section:nth-child(14) p,.cgl-home main>section:nth-child(14) span,.cgl-home main>section:nth-child(14) li{
  color:var(--cgl-text-light)!important;
}

/* Section 3 contains white feature cards on a dark background. */
.cgl-home main>section:nth-child(3) [class*="rounded"],
.cgl-home main>section:nth-child(3) [class*="rounded"] h1,
.cgl-home main>section:nth-child(3) [class*="rounded"] h2,
.cgl-home main>section:nth-child(3) [class*="rounded"] h3,
.cgl-home main>section:nth-child(3) [class*="rounded"] h4,
.cgl-home main>section:nth-child(3) [class*="rounded"] p,
.cgl-home main>section:nth-child(3) [class*="rounded"] span,
.cgl-home main>section:nth-child(3) [class*="rounded"] li{color:var(--cgl-text-body)!important}
.cgl-home main>section:nth-child(3) [class*="rounded"] h1,
.cgl-home main>section:nth-child(3) [class*="rounded"] h2,
.cgl-home main>section:nth-child(3) [class*="rounded"] h3,
.cgl-home main>section:nth-child(3) [class*="rounded"] h4{color:var(--cgl-text-dark)!important}

/* Dark translucent cards stay light. */
.cgl-home main>section:nth-child(6) [class*="bg-white"],
.cgl-home main>section:nth-child(9) [class*="bg-white"]{color:var(--cgl-text-light)!important}
.cgl-home main>section:nth-child(6) [class*="bg-white"] *,
.cgl-home main>section:nth-child(9) [class*="bg-white"] *{color:var(--cgl-text-light)!important}

/* Contact form: dark field surfaces use light text; true white fields use dark text. */
.cgl-home main>section:nth-child(13) input,.cgl-home main>section:nth-child(13) textarea,.cgl-home main>section:nth-child(13) select{
  color:var(--cgl-text-light)!important;
}
.cgl-home main>section:nth-child(13) input::placeholder,.cgl-home main>section:nth-child(13) textarea::placeholder{
  color:var(--cgl-text-light-muted)!important;opacity:1!important;
}
.cgl-home main>section:nth-child(14) input,.cgl-home main>section:nth-child(14) input::placeholder{color:var(--cgl-text-dark)!important}

/* ---------- Generic dark utility surfaces ---------- */
.bg-black,.bg-slate-900,.bg-gray-900,.bg-blue-900,.bg-indigo-900,
[class*="bg-[#0"],[class*="bg-[#1"],[class*="bg-[#2"],
[class*="from-[#0"],[class*="from-[#1"],[class*="from-[#2"]{
  color:var(--cgl-text-light)!important;
}
.bg-black h1,.bg-black h2,.bg-black h3,.bg-black h4,.bg-black p,.bg-black span,.bg-black li,.bg-black label,.bg-black a,
.bg-slate-900 h1,.bg-slate-900 h2,.bg-slate-900 h3,.bg-slate-900 h4,.bg-slate-900 p,.bg-slate-900 span,.bg-slate-900 li,.bg-slate-900 label,.bg-slate-900 a,
[class*="bg-[#0"] h1,[class*="bg-[#0"] h2,[class*="bg-[#0"] h3,[class*="bg-[#0"] h4,[class*="bg-[#0"] p,[class*="bg-[#0"] span,[class*="bg-[#0"] li,[class*="bg-[#0"] label,[class*="bg-[#0"] a,
[class*="bg-[#1"] h1,[class*="bg-[#1"] h2,[class*="bg-[#1"] h3,[class*="bg-[#1"] h4,[class*="bg-[#1"] p,[class*="bg-[#1"] span,[class*="bg-[#1"] li,[class*="bg-[#1"] label,[class*="bg-[#1"] a,
[class*="bg-[#2"] h1,[class*="bg-[#2"] h2,[class*="bg-[#2"] h3,[class*="bg-[#2"] h4,[class*="bg-[#2"] p,[class*="bg-[#2"] span,[class*="bg-[#2"] li,[class*="bg-[#2"] label,[class*="bg-[#2"] a{
  color:var(--cgl-text-light)!important;
}

/* ---------- Footer: fix the exact production issue shown in screenshot ---------- */
footer,footer div,footer section,footer article,footer nav,
footer h1,footer h2,footer h3,footer h4,footer h5,footer h6,
footer p,footer span,footer li,footer label,footer address,
footer a:not([class*="bg-white"]),footer strong,footer b,footer small{
  color:var(--cgl-text-light-soft)!important;
}
footer h1,footer h2,footer h3,footer h4,footer h5,footer h6,
footer strong,footer b{color:var(--cgl-text-light)!important}
footer a{color:#e7efff!important}
footer a:hover{color:#ffffff!important}
footer p,footer li,footer address,footer small{color:#d2dcef!important}
footer .text-gray-300,footer [class*="text-gray"],footer [class*="text-[#"]{color:#d2dcef!important}
footer input,footer textarea,footer select,
footer input *,footer textarea *,footer select *{color:var(--cgl-text-dark)!important}
footer input::placeholder,footer textarea::placeholder{color:#62718a!important;opacity:1!important}
footer button,footer button span,footer button svg{color:#ffffff!important}
footer [class*="bg-white"],footer [class*="bg-white"] *{color:var(--cgl-text-dark)!important}

/* Bottom legal bar is still on dark footer, so override its original text-[#555]. */
footer [class*="border-t"] p,
footer [class*="border-t"] span,
footer [class*="border-t"] a{color:#d6e0f2!important}
footer [class*="border-t"] a:hover{color:#ffffff!important}

/* ---------- Buttons ---------- */
button[class*="bg-[#0"],button[class*="bg-[#1"],button[class*="bg-[#2"],
a[class*="bg-[#0"],a[class*="bg-[#1"],a[class*="bg-[#2"],
.bg-black button,.bg-black a{color:#fff!important}
button.bg-white,a.bg-white,button[class*="bg-white"],a[class*="bg-white"]{color:#173f91!important}

/* Kicker: dark on light, light when used inside dark regions. */
.cgl-kicker{color:#174aa6!important}
.cgl-home main>section:nth-child(3)>.cgl-kicker,
.cgl-home main>section:nth-child(6) .cgl-kicker,
.cgl-home main>section:nth-child(9) .cgl-kicker,
.cgl-home main>section:nth-child(12) .cgl-kicker,
.cgl-home main>section:nth-child(13) .cgl-kicker,
.cgl-home main>section:nth-child(14) .cgl-kicker,
footer .cgl-kicker{color:#fff!important}

@media(max-width:767px){
  footer p,footer a,footer span,footer li{color:#e4ebf7!important}
}
