/* WEALSURE V51 - GLOBAL HEADING READABILITY AND LAYOUT REPAIR
   This file must load AFTER all legacy stylesheets. Solid colours (no
   transparent text gradients), safe wrapping, and dark-surface contrast.
   The supplied logo and existing contact information remain untouched.
*/
:root {
  --ws-v51-ink: #092c20;
  --ws-v51-gold: #bd934c;
  --ws-v51-muted: #53685d;
}

/* A prior rule placed uppercase / tracking on the whole section-kicker,
   which inherited into the headings and introductory paragraphs. */
html body main .section-kicker {
  text-transform: none !important;
  letter-spacing: normal !important;
  min-width: 0 !important;
  align-items: center !important;
  overflow: visible !important;
}
html body main .section-kicker > div,
html body main .section-kicker > p,
html body main .section-kicker > a {
  min-width: 0 !important;
  max-width: 100% !important;
}

/* Neutralise older transparent, background-clipped heading treatments.
   Explicitly restore fill and intrinsic height so glyphs cannot disappear
   or get trimmed by tight old line heights / constrained boxes. */
html body main :is(h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6,.display,.display-title,.page-title,.section-title,.section-heading,.hero-title,.hero-heading),
html body main .section-kicker :is(h1,h2,h3,.h1,.h2,.h3),
html body main section .section-kicker h2.h2 {
  color: var(--ws-v51-ink) !important;
  -webkit-text-fill-color: var(--ws-v51-ink) !important;
  background: transparent !important;
  background-image: none !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  text-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-transform: none !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  overflow: visible !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  box-sizing: border-box !important;
  text-overflow: clip !important;
}

/* Main display / H1 / H2: editorial serif with enough leading for every glyph. */
html body main :is(h1,h2,.h1,.h2,.display,.display-title,.page-title,.section-title,.section-heading,.hero-title,.hero-heading),
html body main section .section-kicker h2.h2 {
  font-family: Georgia, 'Times New Roman', serif !important;
  font-weight: 700 !important;
  font-style: normal !important;
  letter-spacing: -.035em !important;
  line-height: 1.22 !important;
  text-wrap: pretty !important;
  padding-block: .09em !important;
}
html body main section .section-kicker h2.h2,
html body main section .section-kicker h2 {
  font-size: clamp(34px, 3.8vw, 57px) !important;
  line-height: 1.22 !important;
  letter-spacing: -.035em !important;
  max-width: 100% !important;
  margin: 0 !important;
}
html body main :is(h3,h4,h5,h6,.h3,.h4,.h5,.h6) {
  line-height: 1.3 !important;
  letter-spacing: -.02em !important;
  text-transform: none !important;
}

/* Old theme made heading descendants transparent too; make inline spans legible. */
html body main :is(h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6,.display,.section-title,.page-title) :is(span,em,strong,b,i) {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
  background: none !important;
  background-image: none !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none !important;
  text-transform: inherit !important;
}
html body main :is(h1,h2,.h1,.h2,.display,.section-title,.page-title) em,
html body main section .section-kicker h2 em {
  color: var(--ws-v51-gold) !important;
  -webkit-text-fill-color: var(--ws-v51-gold) !important;
  font-family: inherit !important;
  font-style: normal !important;
  font-weight: inherit !important;
}

/* Paragraphs next to section headings should be sentence case, not all caps. */
html body main .section-kicker :is(.section-intro,p.section-intro) {
  color: var(--ws-v51-muted) !important;
  -webkit-text-fill-color: var(--ws-v51-muted) !important;
  font-family: 'Manrope', sans-serif !important;
  font-size: clamp(15px,1.15vw,18px) !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  line-height: 1.72 !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow-wrap: break-word !important;
  text-wrap: pretty !important;
}
html body main .section-kicker .eyebrow {
  color: #9e7439 !important;
  -webkit-text-fill-color: #9e7439 !important;
  text-transform: uppercase !important;
  letter-spacing: .14em !important;
}

/* Retain WHITE on real dark panels; preserve restrained gold emphasis. */
html body main :is(.feature-band,.cta-v18,.section-dark,.dark,.portfolio-shell,.hero:not(.hero-v18)) :is(h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.display,.section-title,.page-title),
html body main .solution-card:not(.solution-card-clean) .solution-content :is(h2,h3,h4),
html body main .insight:not(.insight-clean):first-child :is(h2,h3,h4) {
  color: #fffdf7 !important;
  -webkit-text-fill-color: #fffdf7 !important;
  background: none !important;
  background-image: none !important;
}
html body main :is(.feature-band,.cta-v18,.section-dark,.dark,.portfolio-shell,.hero:not(.hero-v18)) :is(h1,h2,h3,.h1,.h2,.h3) em {
  color: #dfbd7a !important;
  -webkit-text-fill-color: #dfbd7a !important;
}
html body main :is(.feature-band,.cta-v18,.section-dark,.dark,.portfolio-shell) :is(p,.lead,.section-intro,.section-copy) {
  color: #e0e9df !important;
  -webkit-text-fill-color: #e0e9df !important;
  opacity: 1 !important;
}
html body main .cta-v18 .eyebrow {
  color: #dfbd7a !important;
  -webkit-text-fill-color: #dfbd7a !important;
}

/* V50 text-only cards must not inherit white headings from photo overlays. */
html body main .audience-v18-clean .audience-clean :is(h2,h3,h4),
html body main .solutions-v18-clean .solution-card-clean :is(h2,h3,h4),
html body main .insights-v18-clean .insight-clean :is(h2,h3,h4) {
  color: var(--ws-v51-ink) !important;
  -webkit-text-fill-color: var(--ws-v51-ink) !important;
  background: none !important;
  line-height: 1.22 !important;
  opacity: 1 !important;
}
html body main .audience-v18-clean .audience-clean p,
html body main .solutions-v18-clean .solution-card-clean p,
html body main .insights-v18-clean .insight-clean p {
  color: var(--ws-v51-muted) !important;
  -webkit-text-fill-color: var(--ws-v51-muted) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  line-height: 1.7 !important;
  opacity: 1 !important;
}

/* Card / section containers get enough room for longer headings. */
html body main .section-kicker .h2,
html body main .cta-v18 .h2,
html body main .feature-band .h2,
html body main .hero-v18 h1,
html body main .service-hero :is(h1,.display) {
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
  line-height: 1.22 !important;
}
html body main .cta-v18 .inner > div {min-width:0 !important}
html body main .cta-v18 h2.h2 {max-width:15ch !important}

/* Responsive stacking rather than squeezing headlines into narrow columns. */
@media (max-width: 1080px) {
  html body main .section-kicker {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    align-items: start !important;
  }
  html body main .section-kicker .section-intro {max-width:760px !important}
}
@media (max-width: 767px) {
  html body main section .section-kicker h2.h2,
  html body main section .section-kicker h2 {
    font-size: clamp(31px, 8.5vw, 42px) !important;
    letter-spacing: -.03em !important;
    line-height: 1.23 !important;
  }
  html body main .hero-v18 h1,
  html body main .service-hero :is(h1,.display) {
    font-size: clamp(34px, 9vw, 46px) !important;
    line-height: 1.22 !important;
  }
  html body main .cta-v18 h2.h2 {max-width:100% !important}
  html body main .section-kicker .section-intro {font-size:15px !important;line-height:1.68 !important}
}
