/* Night mode for the funnel lead pages (Noel, 11 Nov 2026): follows the visitor's browser setting, like YouTube.
   Light stays the default; with a dark browser the page runs black from top to bottom into the moons section, so the
   white-to-black fade is no longer needed. Mend orange buttons, the logo and fonts are unchanged. */
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])){ color-scheme: dark; }
  html:where(:not([data-theme="light"])) body:has(.optin-a){ background: #000; color: #fff; }
  html:where(:not([data-theme="light"])) body:has(.optin-a) .wrap,html:where(:not([data-theme="light"])) body:has(.optin-a) main.optin-a{ background: #000; }
  html:where(:not([data-theme="light"])) body .optin-a{ --oa-ink: #FFFFFF; --oa-muted: #B3C6D1; --oa-line: #2a3238; --oa-soft: rgba(229,158,76,.16); --oa-ok: #6fcf97; color: #fff; }
  html:where(:not([data-theme="light"])) body .optin-a :is(h1, h2, h3){ color: #fff; }
  html:where(:not([data-theme="light"])) body .optin-a :is(p, li){ color: inherit; }
  html:where(:not([data-theme="light"])) body .optin-a .oa-lead,html:where(:not([data-theme="light"])) body .optin-a .oa-why,html:where(:not([data-theme="light"])) body .optin-a .oa-proof,html:where(:not([data-theme="light"])) body .optin-a details p,html:where(:not([data-theme="light"])) body .optin-a .oa-benefits p,html:where(:not([data-theme="light"])) body .optin-a .oa-steps p{ color: #B3C6D1; }
  html:where(:not([data-theme="light"])) body .optin-a a:not(.oa-cta){ color: #F2C58F; }
  /* form, inputs and question cards */
  html:where(:not([data-theme="light"])) body .optin-a .oa-form{ background: #0d1215; border-color: #2a3238; box-shadow: none; }
  html:where(:not([data-theme="light"])) body .optin-a .oa-row input[type=email]{ background: #000; color: #fff; border-color: #3a444b; }
  html:where(:not([data-theme="light"])) body .optin-a .oa-row input[type=email]::placeholder{ color: #7f8f99; }
  html:where(:not([data-theme="light"])) body .optin-a .oa-row input.oa-valid{ background-color: #000; }
  html:where(:not([data-theme="light"])) body .optin-a .oa-opt input[type=checkbox]{ accent-color: #E59E4C; }
  html:where(:not([data-theme="light"])) body .optin-a .oa-error{ color: #ff9b85; }
  html:where(:not([data-theme="light"])) body .optin-a .oa-unlocked{ background: #0f2219; color: #fff; }
  html:where(:not([data-theme="light"])) body .optin-a .oa-alt{ background: #000; }
  html:where(:not([data-theme="light"])) body .optin-a details{ background: #0d1215; border-color: #2a3238; color: #fff; }
  html:where(:not([data-theme="light"])) body .optin-a .oa-steps li::before{ background: #fff; color: #172026; }
  html:where(:not([data-theme="light"])) body .optin-a .oa-ic{ color: #fff; }
  html:where(:not([data-theme="light"])) body .optin-a :is(.oa-cta, .oa-cta:hover){ color: #172026; }
  /* the questions block was a white-to-black fade into the moons; in night mode it is black already */
  html:where(:not([data-theme="light"])) body:has(.fs-moons) .optin-a > section.oa-block:last-of-type::before{ background: #000; }
  html:where(:not([data-theme="light"])) body:has(.fs-moons) .optin-a > section.oa-block:last-of-type h2{ color: #fff; }
  /* black header (as on the home page) and sticky button bar */
  html:where(:not([data-theme="light"])) body:has(.optin-a) .mend-head{ background: #000; border-color: #1d2328; }
  html:where(:not([data-theme="light"])) body:has(.optin-a) .mend-head :is(a, span, strong){ color: #fff; }
  html:where(:not([data-theme="light"])) body .oa-sticky{ background: rgba(0,0,0,.94); border-top-color: #1d2328; }
  /* the play arrow stays dark on its white circle; the video frame gets a faint rim so it does not melt into the black */
  html:where(:not([data-theme="light"])) body .optin-a .oa-play svg{ fill: #172026; }
  html:where(:not([data-theme="light"])) body .optin-a .oa-media{ box-shadow: 0 0 0 1px #2a3238; }
  html:where(:not([data-theme="light"])) body .oa-sticky a,html:where(:not([data-theme="light"])) body .oa-sticky a:hover{ color: #172026; }
}
/* saved Mend look (html[data-theme]) wins over the browser setting */
:root:where([data-theme="dark"]){ color-scheme: dark; }
  html:where([data-theme="dark"]) body:has(.optin-a){ background: #000; color: #fff; }
  html:where([data-theme="dark"]) body:has(.optin-a) .wrap,html:where([data-theme="dark"]) body:has(.optin-a) main.optin-a{ background: #000; }
  html:where([data-theme="dark"]) body .optin-a{ --oa-ink: #FFFFFF; --oa-muted: #B3C6D1; --oa-line: #2a3238; --oa-soft: rgba(229,158,76,.16); --oa-ok: #6fcf97; color: #fff; }
  html:where([data-theme="dark"]) body .optin-a :is(h1, h2, h3){ color: #fff; }
  html:where([data-theme="dark"]) body .optin-a :is(p, li){ color: inherit; }
  html:where([data-theme="dark"]) body .optin-a .oa-lead,html:where([data-theme="dark"]) body .optin-a .oa-why,html:where([data-theme="dark"]) body .optin-a .oa-proof,html:where([data-theme="dark"]) body .optin-a details p,html:where([data-theme="dark"]) body .optin-a .oa-benefits p,html:where([data-theme="dark"]) body .optin-a .oa-steps p{ color: #B3C6D1; }
  html:where([data-theme="dark"]) body .optin-a a:not(.oa-cta){ color: #F2C58F; }
  /* form, inputs and question cards */
  html:where([data-theme="dark"]) body .optin-a .oa-form{ background: #0d1215; border-color: #2a3238; box-shadow: none; }
  html:where([data-theme="dark"]) body .optin-a .oa-row input[type=email]{ background: #000; color: #fff; border-color: #3a444b; }
  html:where([data-theme="dark"]) body .optin-a .oa-row input[type=email]::placeholder{ color: #7f8f99; }
  html:where([data-theme="dark"]) body .optin-a .oa-row input.oa-valid{ background-color: #000; }
  html:where([data-theme="dark"]) body .optin-a .oa-opt input[type=checkbox]{ accent-color: #E59E4C; }
  html:where([data-theme="dark"]) body .optin-a .oa-error{ color: #ff9b85; }
  html:where([data-theme="dark"]) body .optin-a .oa-unlocked{ background: #0f2219; color: #fff; }
  html:where([data-theme="dark"]) body .optin-a .oa-alt{ background: #000; }
  html:where([data-theme="dark"]) body .optin-a details{ background: #0d1215; border-color: #2a3238; color: #fff; }
  html:where([data-theme="dark"]) body .optin-a .oa-steps li::before{ background: #fff; color: #172026; }
  html:where([data-theme="dark"]) body .optin-a .oa-ic{ color: #fff; }
  html:where([data-theme="dark"]) body .optin-a :is(.oa-cta, .oa-cta:hover){ color: #172026; }
  /* the questions block was a white-to-black fade into the moons; in night mode it is black already */
  html:where([data-theme="dark"]) body:has(.fs-moons) .optin-a > section.oa-block:last-of-type::before{ background: #000; }
  html:where([data-theme="dark"]) body:has(.fs-moons) .optin-a > section.oa-block:last-of-type h2{ color: #fff; }
  /* black header (as on the home page) and sticky button bar */
  html:where([data-theme="dark"]) body:has(.optin-a) .mend-head{ background: #000; border-color: #1d2328; }
  html:where([data-theme="dark"]) body:has(.optin-a) .mend-head :is(a, span, strong){ color: #fff; }
  html:where([data-theme="dark"]) body .oa-sticky{ background: rgba(0,0,0,.94); border-top-color: #1d2328; }
  /* the play arrow stays dark on its white circle; the video frame gets a faint rim so it does not melt into the black */
  html:where([data-theme="dark"]) body .optin-a .oa-play svg{ fill: #172026; }
  html:where([data-theme="dark"]) body .optin-a .oa-media{ box-shadow: 0 0 0 1px #2a3238; }
  html:where([data-theme="dark"]) body .oa-sticky a,html:where([data-theme="dark"]) body .oa-sticky a:hover{ color: #172026; }

