/* QE V24-A atmosphere: the existing Bosch image and portfolio grain, behind all content. */
html[data-theme],
html[data-qe-palette-scope],
html[data-theme]:has(body.qe-home),
html[data-theme]:has(body:not(.qe-home)) {
  background:#030405;
  color-scheme:dark;
  overscroll-behavior-y:none;
}
html[data-theme] body,
html[data-theme] body.qe-home,
html[data-theme] body:not(.qe-home) {
  isolation:isolate;
  background:transparent;
  --qe-atmosphere-shade:.88;
  --qe-atmosphere-dots:rgba(46,92,255,.6);
}
html[data-theme] body.qe-home {
  --qe-atmosphere-shade:.78;
}

/* Both fixed layers cover the large viewport, including the area revealed as
   mobile browser controls retract. No body filter touches text or controls. */
html[data-theme] body::after,
html[data-theme] body.qe-home::after,
html[data-theme] body:not(.qe-home)::after {
  display:block;
  content:'';
  position:fixed;
  inset:0 0 auto;
  width:auto;
  height:100vh;
  pointer-events:none;
  z-index:-2;
  background-image:linear-gradient(rgba(0,0,0,var(--qe-atmosphere-shade)),rgba(0,0,0,var(--qe-atmosphere-shade))),url('silhouettes/painting-image-infill.png');
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  filter:grayscale(1);
  opacity:1;
  transform:scale(1.14);
}
html[data-theme] body::before,
html[data-theme] body.qe-home::before,
html[data-theme] body.qe-home:not(.qe-interior-open)::before,
html[data-theme] body:not(.qe-home)::before {
  display:block;
  content:'';
  position:fixed;
  inset:0 0 auto;
  width:auto;
  height:100vh;
  pointer-events:none;
  z-index:-1;
  background-image:radial-gradient(var(--qe-atmosphere-dots) .7px,transparent 1px),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='gamma' exponent='5.2' amplitude='1.5'/%3E%3CfeFuncG type='gamma' exponent='5.2' amplitude='1.5'/%3E%3CfeFuncB type='gamma' exponent='5.2' amplitude='1.5'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-position:-1px -1px,0 0;
  background-size:60px 50px,200px 200px;
  background-repeat:repeat;
  opacity:.16;
  mix-blend-mode:normal;
  filter:none;
  transform:none;
}
@supports (height:100lvh) {
  html[data-theme] body::before,
  html[data-theme] body::after,
  html[data-theme] body.qe-home::before,
  html[data-theme] body.qe-home::after,
  html[data-theme] body.qe-home:not(.qe-interior-open)::before,
  html[data-theme] body:not(.qe-home)::before,
  html[data-theme] body:not(.qe-home)::after {
    height:100lvh;
  }
}

/* The inherited root grain/vignette used to sit over content at z399/400.
   The same grain is now composed beneath it, alongside the quiet blue lattice. */
html[data-theme]::before,
html[data-theme]::after,
html[data-theme]:has(body.qe-home)::before,
html[data-theme]:has(body.qe-home)::after,
html[data-theme]:has(body.qe-home:not(.qe-interior-open))::before,
html[data-theme]:has(body.qe-home:not(.qe-interior-open))::after,
html[data-theme]:has(body:not(.qe-home))::before,
html[data-theme]:has(body:not(.qe-home))::after {
  display:none;
}
