/* V01 · Edge-to-edge content surfaces, three selectable alpha profiles.
 * Only decorative section pseudos change. Foreground, layout, motion and footer
 * remain independent. JS supplies clientWidth, excluding ordinary scrollbars;
 * no viewport-width box is enabled until a valid measurement is available.
 * The fully opaque core begins at least 12px before desktop text and 4px
 * before the narrowest supported mobile text. All profiles share this core.
 * A4 compensates its existing sidebar offset, without moving content.
 */
@media screen and (forced-colors: none) {
@supports ((mask-image: linear-gradient(#000, transparent)) and (mask-composite: intersect)) or ((-webkit-mask-image: linear-gradient(#000, transparent)) and (-webkit-mask-composite: source-in)) {
html:root[data-surface-profile="klar"] { --sp-a1: .65; --sp-a2: .92; --sp-a3: 1; }
html:root[data-surface-profile="weich"] { --sp-a1: .20; --sp-a2: .50; --sp-a3: .85; }
html:root[data-surface-profile="luftig"] { --sp-a1: .02; --sp-a2: .12; --sp-a3: .45; }
html:root[data-variant="a1"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) :is(.intro,.cutaway,.services,.process,.questions),
html:root[data-variant="a2"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) :is(.lab-intro,.lab-system,.lab-offer,.lab-process,.lab-questions),
html:root[data-variant="a3"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) :is(.intro,.services,.process,.faq-section),
html:root[data-variant="a4"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) .chapter,
html:root[data-variant="b1"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) main > .section,
html:root[data-variant="b2"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) main > .section,
html:root[data-variant="b3"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) main > .section,
html:root[data-variant="b4"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) main > .section {
  --sp-edge: 14px;
  --sp-center-offset: 0px;
}
html:root[data-variant="a1"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) :is(.intro,.cutaway,.services,.process,.questions)::before,
html:root[data-variant="a2"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) :is(.lab-intro,.lab-system,.lab-offer,.lab-process,.lab-questions)::before,
html:root[data-variant="a3"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) :is(.intro,.services,.process,.faq-section)::before,
html:root[data-variant="a4"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) .chapter::before,
html:root[data-variant="b1"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) main > .section::before,
html:root[data-variant="b2"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) main > .section::before,
html:root[data-variant="b3"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) main > .section::before,
html:root[data-variant="b4"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) main > .section::before {
  width: var(--surface-viewport-width);
  left: calc(50% - var(--sp-center-offset));
  -webkit-mask-image: var(--sp-horizontal-mask), var(--sp-vertical-mask);
  mask-image: var(--sp-horizontal-mask), var(--sp-vertical-mask);
  --sp-horizontal-mask: linear-gradient(90deg,
    transparent, rgb(0 0 0 / var(--sp-a1)) calc(var(--sp-edge) * .25),
    rgb(0 0 0 / var(--sp-a2)) calc(var(--sp-edge) * .50),
    rgb(0 0 0 / var(--sp-a3)) calc(var(--sp-edge) * .75),
    #000 var(--sp-edge), #000 calc(100% - var(--sp-edge)),
    rgb(0 0 0 / var(--sp-a3)) calc(100% - var(--sp-edge) * .75),
    rgb(0 0 0 / var(--sp-a2)) calc(100% - var(--sp-edge) * .50),
    rgb(0 0 0 / var(--sp-a1)) calc(100% - var(--sp-edge) * .25), transparent);
  --sp-vertical-mask: linear-gradient(180deg,
    transparent, rgb(0 0 0 / var(--sp-a1)) calc(var(--wf-edge-top) * .25),
    rgb(0 0 0 / var(--sp-a2)) calc(var(--wf-edge-top) * .50),
    rgb(0 0 0 / var(--sp-a3)) calc(var(--wf-edge-top) * .75),
    #000 var(--wf-edge-top), #000 calc(100% - var(--wf-edge-bottom)),
    rgb(0 0 0 / var(--sp-a3)) calc(100% - var(--wf-edge-bottom) * .75),
    rgb(0 0 0 / var(--sp-a2)) calc(100% - var(--wf-edge-bottom) * .50),
    rgb(0 0 0 / var(--sp-a1)) calc(100% - var(--wf-edge-bottom) * .25), transparent);
}
@media (min-width: 751px) {
html:root[data-variant="a1"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) :is(.intro,.cutaway,.services,.process,.questions),
html:root[data-variant="a2"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) :is(.lab-intro,.lab-system,.lab-offer,.lab-process,.lab-questions) {
  --sp-edge: max(8px, calc(max(0px, (var(--surface-viewport-width) - 1440px) / 2) + clamp(22px, 5vw, 84px) - 12px));
}
html:root[data-variant="a3"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) :is(.intro,.process,.faq-section) {
  --sp-edge: max(8px, calc(max(0px, (var(--surface-viewport-width) - 1920px) / 2) + 6vw - 12px));
}
html:root[data-variant="a3"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) .services {
  --sp-edge: max(8px, calc(max(0px, (var(--surface-viewport-width) - 1920px) / 2) + 4vw - 12px));
}
html:root[data-variant="a4"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) .chapter {
  --sp-edge: max(8px, calc(max(0px, (var(--surface-viewport-width) - 1800px) / 2) + 4vw - 12px));
  --sp-center-offset: 100px;
}
html:root[data-variant="a4"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) .side-index { z-index: 1; isolation: isolate; }
html:root[data-variant="b1"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) main > .section,
html:root[data-variant="b2"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) main > .section,
html:root[data-variant="b3"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) main > .section,
html:root[data-variant="b4"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) main > .section {
  --sp-edge: max(8px, calc(max(0px, (var(--surface-viewport-width) - var(--wf-wrap-max)) / 2) + var(--pad) - 12px));
}
}
@media (min-width: 751px) and (max-width: 1100px) {
html:root[data-variant="a4"]:is([data-surface-profile="klar"],[data-surface-profile="weich"],[data-surface-profile="luftig"]):not([data-backdrop="off"]) .chapter { --sp-center-offset: 80px; }
}
}
}
