/* Uniform translucent paint. Its opacity fades on scroll, never across the box.
   No gradients, masks or blur; foreground content stays fully opaque. */
.dm-detail-preview__balance:has(.dm-project-results--detail), .dm-project-content .dm-project-results--detail { --dm-surface-color: rgb(255 253 233 / .86); }
.dm-project-next, .home .dm-garden-entry { --dm-surface-color: rgb(229 222 238 / .86); }
.home #leistungen.dm-home-fields, .dm-home-clear #leistungen { --dm-surface-color: rgb(191 225 182 / .8); }
.home #about.dm-home-about { --dm-surface-color: rgb(242 235 166 / .3); }
.dm-contact-band, .dm-contact-page .dm-contact-project { --dm-surface-color: rgb(215 232 240 / .86); }
.dm-contact-band--direct { --dm-surface-color: rgb(228 221 242 / .86); }
.entry-content .wp-block-quote, .dm-post-zitat { --dm-surface-color: rgb(220 255 220 / .86); }
.dm-service-story .dm-service-case { --dm-surface-color: rgb(238 237 231 / .86); }
.dm-service-story .dm-service-process { --dm-surface-color: rgb(0 0 0 / .96); }
.dm-home-cta, .dm-home-cta--compact, .dm-home-clear #termin, .dm-project-intent { --dm-surface-color: rgb(110 23 199 / .96); }
.dm-scrolly-cta-zone { --dm-surface-color: rgb(129 99 234 / .96); }
.dm-article-practice, .dm-service-extra, .dm-service-story .dm-service-scope, .dm-case-hero, .dm-project-intro, .dm-project-content, #wf-post-footer { --dm-surface-color: rgb(249 248 245 / .88); }
#ftr2 { --dm-surface-color: rgb(238 237 232 / .88); }
.dm-lab-preview__feed, .home #blog { --dm-surface-color: rgb(212 232 242 / .8); }
#termin:not([data-static-background]):not(.dm-home-cta) { --dm-surface-color: rgb(102 56 240 / .82); }

body :is(
  .dm-detail-preview__balance:has(.dm-project-results--detail), .dm-project-content .dm-project-results--detail,
  .dm-project-next, .dm-garden-entry, .dm-page-path,
  .ux-info, .ux-projects, .wf-seo-block, #wf-download,
  .home #leistungen.dm-home-fields, .dm-home-clear #leistungen,
  .home #about.dm-home-about,
  .dm-contact-band, .dm-contact-page .dm-contact-project,
  .dm-contact-band--direct,
  .entry-content .wp-block-quote, .dm-post-zitat,
  .dm-service-story .dm-service-case,
  .dm-service-story .dm-service-process,
  .dm-home-cta, .dm-home-cta--compact, .dm-home-clear #termin, .dm-project-intent,
  .dm-scrolly-cta-zone,
  .dm-article-practice, .dm-service-extra, .dm-service-story .dm-service-scope, .dm-case-hero, .dm-project-intro, .dm-project-content, #wf-post-footer,
  #ftr2,
  .dm-lab-preview__feed, .home #blog,
  #termin:not([data-static-background]):not(.dm-home-cta)
) {
  position: relative;
  isolation: isolate;
  background: transparent !important;
}
body :is(
  .dm-detail-preview__balance:has(.dm-project-results--detail), .dm-project-content .dm-project-results--detail,
  .dm-project-next, .dm-garden-entry, .dm-page-path,
  .ux-info, .ux-projects, .wf-seo-block, #wf-download,
  .home #leistungen.dm-home-fields, .dm-home-clear #leistungen,
  .home #about.dm-home-about,
  .dm-contact-band, .dm-contact-page .dm-contact-project,
  .dm-contact-band--direct,
  .entry-content .wp-block-quote, .dm-post-zitat,
  .dm-service-story .dm-service-case,
  .dm-service-story .dm-service-process,
  .dm-home-cta, .dm-home-cta--compact, .dm-home-clear #termin, .dm-project-intent,
  .dm-scrolly-cta-zone,
  .dm-article-practice, .dm-service-extra, .dm-service-story .dm-service-scope, .dm-case-hero, .dm-project-intro, .dm-project-content, #wf-post-footer,
  #ftr2,
  .dm-lab-preview__feed, .home #blog,
  #termin:not([data-static-background]):not(.dm-home-cta)
)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--dm-surface-color);
  opacity: var(--dm-surface-opacity, 1);
  -webkit-mask-image: none;
  mask-image: none;
}
/* Nested summary renderers share the outer yellow field. */
body .dm-detail-preview__balance .dm-project-results--detail::before { content: none !important; }
/* Contact bands keep their established color when they share the base class. */
.dm-contact-band.dm-contact-band--direct { --dm-surface-color: rgb(228 221 242 / .86); }

/* Shared editorial endings and neutral navigation strips use the same paint. */
.dm-garden-entry:not(.home .dm-garden-entry), .dm-page-path, #wf-download { --dm-surface-color: rgb(249 248 245 / .88); }
.ux-info, .ux-projects, .wf-seo-block { --dm-surface-color: rgb(10 9 9 / .96); }
body .dm-scrolly-cta-zone #wf-download::before { content: none !important; }

/* Keep dark-page text readable as the light surfaces enter the viewport.
   The even overlay still animates from 86% to the existing 88% total alpha. */
#wf-download.ux-contact { --dm-contrast-surface: 249 248 245; }
#ftr2 { --dm-contrast-surface: 238 237 232; }
body:is(.dm-scrollytelling, .page-template-page-service-frankfurt-php, .page-john-dreimorgen) #wf-download.ux-contact,
body:is(.dm-scrollytelling, .page-template-page-service-frankfurt-php, .page-john-dreimorgen):not(.dm-scrolly-journal-article, .page-wie-wird-ein-buch-lesbar) #ftr2 {
  background: rgb(var(--dm-contrast-surface) / .86) !important;
  --dm-surface-color: rgb(var(--dm-contrast-surface) / .142857);
}

#ftr2 .ftr2-nl-input:not(:focus) { border-color: #666; }
#ftr2 .ftr2-nl-input::placeholder { color: #555; opacity: 1; }
