/* AVIX Water v97 — global contrast/accessibility correction
   Loaded LAST. Fixes invisible/low-contrast text and separates readable text
   colours from decorative brand accents. */

:root{
  --avix-brand:#4BC8EF;
  --avix-brand-text:#147C9D;
  --avix-ink:#12272E;
  --avix-body:#26383E;
  --avix-muted:#4A5B60;
  --avix-dark-copy:#D8E0E2;
  --avix-dark-muted:#B8C8CC;
  --avix-warm:#F7F6F2;
}

/* ---------- 1. Readable text on LIGHT surfaces ---------- */
html body main :is(
  .sr-home-scientific-need,.sr-standard,.sr-market,.sr-science-profile,
  .s12-manufacturing,.sr-avix-science,.sr-product-range,.sr-product-platform,
  .sr-product-launch,.sr-portfolio,.co18-section--soft,.co18-section--upside,
  .team9-founder-section,.team9-build,.fp2-profile,.fp2-water,.fp-ventures,
  .tc-contact-path,.tc-contact-main,.avix-utility-body,.s12-sources
) :is(p,li,dd,address){
  color:var(--avix-body)!important;
}
html body main :is(
  .sr-home-scientific-need,.sr-standard,.sr-market,.sr-science-profile,
  .s12-manufacturing,.sr-avix-science,.sr-product-range,.sr-product-platform,
  .sr-product-launch,.sr-portfolio,.co18-section--soft,.co18-section--upside,
  .team9-founder-section,.team9-build,.fp2-profile,.fp2-water,.fp-ventures,
  .tc-contact-path,.tc-contact-main,.avix-utility-body,.s12-sources
) :is(.av5-eyebrow,.eyebrow,.tc-kicker,.fp2-profile-kicker){
  color:var(--avix-brand-text)!important;
}

/* Readable AVIX blue for actual TEXT on light backgrounds. */
html body main :is(
  .sr-product-number,.sr-stage-label,.v76-format-label,.co18-proof-card>span,
  .co18-market-stage>span,.co18-upside-stats article>span,.co18-upside-route-label,
  .team9-build-card>span,.fp-venture-card>span,.fp2-profile-kicker,
  .s12-sources summary,.note-blue,.note-red
){
  color:var(--avix-brand-text)!important;
}

/* ---------- 2. Readable text on DARK surfaces / nested dark cards ---------- */
html body main :is(
  .v76-positioning-band,.sr-readiness,.av5-products,.av5-founder,
  .team9-avix-team,.co18-section--dark,.fp-career-strip,
  .fp-venture-card--primary,.tc-direct,.tc-office-card,
  .co18-upside-stats .is-highlight,.co18-upside-core,
  .sr-profile-visual article.is-finish
) :is(h1,h2,h3,strong){
  color:#F8F8F5!important;
  -webkit-text-fill-color:#F8F8F5!important;
}
html body main :is(
  .v76-positioning-band,.sr-readiness,.av5-products,.av5-founder,
  .team9-avix-team,.co18-section--dark,.fp-career-strip,
  .fp-venture-card--primary,.tc-direct,.tc-office-card,
  .co18-upside-stats .is-highlight,.co18-upside-core,
  .sr-profile-visual article.is-finish
) :is(p,li,dd,address,small){
  color:var(--avix-dark-copy)!important;
  -webkit-text-fill-color:var(--avix-dark-copy)!important;
}

/* Explicit high-risk contrast fixes observed in v96. */
html body.avix-home-page .v76-positioning-brand p,
html body.avix-home-page .v76-positioning-metrics span{
  color:var(--avix-dark-copy)!important;
}
html body.science-v12 .sr-profile-visual article.is-finish p,
html body.science-v12 .sr-profile-visual article.is-finish p span{
  color:var(--avix-dark-copy)!important;
  -webkit-text-fill-color:var(--avix-dark-copy)!important;
}
html body.co18-page .co18-upside-stats article.is-highlight p,
html body.co18-page .co18-upside-core small{
  color:var(--avix-dark-copy)!important;
  -webkit-text-fill-color:var(--avix-dark-copy)!important;
}
html body.fp-page .fp-venture-card--primary p{
  color:var(--avix-dark-copy)!important;
}
html body.fp-page .fp-venture-card--primary b{
  color:#9BE6F8!important;
}
html body.fp-page .fp-career-strip .av5-section-head :is(h2,p),
html body.fp-page .fp-career-strip .fp-career-track :is(strong,small){
  color:#F8F8F5!important;
  -webkit-text-fill-color:#F8F8F5!important;
}
html body.fp-page .fp-career-strip .fp-career-track small{
  color:var(--avix-dark-muted)!important;
  -webkit-text-fill-color:var(--avix-dark-muted)!important;
}
html body.tc-contact-page .tc-direct>p:not(.tc-kicker),
html body.tc-contact-page .tc-office-card address{
  color:var(--avix-dark-copy)!important;
  -webkit-text-fill-color:var(--avix-dark-copy)!important;
}
html body.tc-contact-page .tc-direct h3 a{
  color:#F8F8F5!important;
  -webkit-text-fill-color:#F8F8F5!important;
}

/* ---------- 3. Pre-footers are LIGHT globally ---------- */
html body :is(.av5-cta,.tc-prefooter,.fp-cta,.co18-prefooter,.avix-utility-prefooter){
  background:var(--avix-warm)!important;
  color:var(--avix-ink)!important;
}
html body :is(.av5-cta,.tc-prefooter,.fp-cta,.co18-prefooter,.avix-utility-prefooter) :is(h2,h2 span,h3){
  color:var(--avix-ink)!important;
  -webkit-text-fill-color:var(--avix-ink)!important;
}
html body :is(.av5-cta,.tc-prefooter,.fp-cta,.co18-prefooter,.avix-utility-prefooter) p:not(.av5-eyebrow):not(.eyebrow){
  color:#36545D!important;
  -webkit-text-fill-color:#36545D!important;
}
html body :is(.av5-cta,.tc-prefooter,.fp-cta,.co18-prefooter,.avix-utility-prefooter) :is(.av5-eyebrow,.eyebrow){
  color:var(--avix-brand-text)!important;
}

/* ---------- 4. Large headings never bright teal ---------- */
html body main :is(h1,h2),
html body main :is(h1,h2) > span,
html body main :is(h1,h2) .hero-teal{
  text-shadow:none;
}
/* Dark large-title surfaces */
html body main :is(.avix-home-hero,.avix-principal-hero,.sr-readiness,.av5-products,.av5-founder,.team9-avix-team,.co18-section--dark,.fp-career-strip) :is(h1,h2,h1 span,h2 span,.hero-teal){
  color:#F8F8F5!important;
  -webkit-text-fill-color:#F8F8F5!important;
}
/* Light large-title surfaces */
html body main :is(.sr-home-scientific-need,.sr-standard,.sr-market,.sr-science-profile,.s12-manufacturing,.sr-avix-science,.sr-product-range,.sr-product-platform,.sr-product-launch,.sr-portfolio,.co18-section--soft,.co18-section--upside,.team9-founder-section,.team9-build,.fp2-profile,.fp2-water,.fp-ventures,.tc-contact-path,.tc-contact-main) :is(h1,h2,h1 span,h2 span,.hero-teal){
  color:var(--avix-ink)!important;
  -webkit-text-fill-color:var(--avix-ink)!important;
}

/* ---------- 5. Brand blue remains bright for GRAPHIC accents ---------- */
html body main :is(.av5-button--aqua,.avix-utility-btn.primary){
  background:var(--avix-brand)!important;
  border-color:var(--avix-brand)!important;
  color:var(--avix-ink)!important;
}
html body main :is(.av5-button--aqua-outline,.av5-button--outline,.avix-utility-btn.secondary){
  border-color:var(--avix-brand)!important;
}

/* ---------- 6. Mobile safety: avoid low-contrast inherited colours ---------- */
@media(max-width:767px){
  html body main :is(.tc-direct,.tc-office-card,.fp-venture-card--primary,.co18-upside-core,.co18-upside-stats .is-highlight,.sr-profile-visual article.is-finish) :is(p,address,small){
    color:var(--avix-dark-copy)!important;
    -webkit-text-fill-color:var(--avix-dark-copy)!important;
  }
  html body main :is(.av5-cta,.tc-prefooter,.fp-cta,.co18-prefooter,.avix-utility-prefooter) :is(h2,h2 span){
    color:var(--avix-ink)!important;
    -webkit-text-fill-color:var(--avix-ink)!important;
  }
}

/* ---------- 7. Standalone plant diagram: readable text, bright blue only for lines/arrows ---------- */
html body.page-diagram{
  --blue:#147C9D!important;
  --blue-lt:#4BC8EF!important;
  --cyan:#147C9D!important;
  --red:#147C9D!important;
  --ink-60:#4A5B60!important;
}
html body.page-diagram :is(.mast p,.sub,.note-blue,.note-red,.stream b,.brow span,.legend li,.notes li){
  color:var(--avix-body)!important;
}
html body.page-diagram :is(.note-blue,.note-red,.stream.is-red b){
  color:var(--avix-brand-text)!important;
}
