/* The layers scene: a picture that holds still in the lower part of the screen,
   in the column, while the steps' words scroll past it like any paragraph and are
   read in the band above it. The picture is its own page
   (layers-stack.html); the words are the article's, so the desk edits them and
   the contents list shows them. Touches pass through the picture, so scrolling
   just works. */
.cs .stack { position: relative; }
.cs .stack iframe { position: sticky; top: 22svh; display: block; width: 100%; height: 78svh; margin: 0 0 -78svh; border: 0; border-radius: 0; background: none; pointer-events: none; }
.cs .toc { z-index: 5; }
/* A scene that follows a paragraph starts below that paragraph's reach: the frosted
   band behind its first words spreads about 5.5rem upwards and would blur it. */
.cs :is(p, .frost) + .stack { margin-top: 6rem; }

/* The section's heading and its opening words pass over the room on its way down
   from the cover, so they ride on one label together, above the first step's. It spans the column, as the
   steps' glass does. The first step's words start low enough to come up the
   screen just as the picture settles, so they arrive with the apps. */
.article.cs .prose > .frost { position: relative; z-index: 2; isolation: isolate; max-width: none; }
.cs .stack iframe + .step { padding-top: 65svh; min-height: 130svh; }

/* A screen a step, so each step's picture holds a moment before the next words arrive.
   The last stays longer, so the two screens hold until they have been compared. */
.cs .stack .step { position: relative; z-index: 1; min-height: 100svh; }
/* The last ("Too abstract.") doesn't hold: its lines draw as the words pass, and the
   scene scrolls away with the section soon after, like any picture. */
.cs .stack .step:last-child { min-height: 60svh; }
/* Some steps hold their words in place while the picture plays on under them:
   "It's slow." for the wait itself, so the clock only creeps up however fast you
   scroll, and the last so its finished lines stay a while before the next section. */
.cs .stack .step.hold .say { position: sticky; top: 16svh; }
.cs .stack .step.slow { min-height: 160svh; }
.cs .stack .step.hold:last-child { min-height: 150svh; }
/* The picture takes no room of its own (its negative margin), so a sticky element
   would only let go once its top reached the end of the box and then cover what
   follows. Room for it at the end, outside the box's content, lets it leave with the
   section instead. */
.cs .stack { padding-bottom: 70svh; }
/* Each step's words ride on a band of frosted glass as wide as the picture, so
   they read cleanly while they pass over it and it shows through softly behind
   them. The band has no sides, only a top and bottom that thin out the way a lens
   blur does: a light, tall layer of pure blur under a stronger, lightly papered
   one held close to the words. Each fades over a long distance on a curve that
   starts and ends flat (smootherstep), so no point along it reads as an edge. A
   blur darkens the band just inside its own edge, so each layer stays fully clear
   across that band (--clear) before it fades in. The column clips it sideways. */
.cs .stack { overflow-x: clip; }
.article.cs .stack .say { position: relative; isolation: isolate; max-width: 37rem; }
.article.cs :is(.stack .say, .prose > .frost)::before, .article.cs :is(.stack .say, .prose > .frost)::after { content: ""; position: absolute; left: -50vw; right: -50vw; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent var(--clear), rgb(0 0 0 / 0.0) calc(var(--clear) + var(--fade) * 0.0), rgb(0 0 0 / 0.009) calc(var(--clear) + var(--fade) * 0.1), rgb(0 0 0 / 0.058) calc(var(--clear) + var(--fade) * 0.2), rgb(0 0 0 / 0.163) calc(var(--clear) + var(--fade) * 0.3), rgb(0 0 0 / 0.317) calc(var(--clear) + var(--fade) * 0.4), rgb(0 0 0 / 0.5) calc(var(--clear) + var(--fade) * 0.5), rgb(0 0 0 / 0.683) calc(var(--clear) + var(--fade) * 0.6), rgb(0 0 0 / 0.837) calc(var(--clear) + var(--fade) * 0.7), rgb(0 0 0 / 0.942) calc(var(--clear) + var(--fade) * 0.8), rgb(0 0 0 / 0.991) calc(var(--clear) + var(--fade) * 0.9), rgb(0 0 0 / 1.0) calc(var(--clear) + var(--fade) * 1.0), rgb(0 0 0 / 1.0) calc(100% - var(--clear) - var(--fade) * 1.0), rgb(0 0 0 / 0.991) calc(100% - var(--clear) - var(--fade) * 0.9), rgb(0 0 0 / 0.942) calc(100% - var(--clear) - var(--fade) * 0.8), rgb(0 0 0 / 0.837) calc(100% - var(--clear) - var(--fade) * 0.7), rgb(0 0 0 / 0.683) calc(100% - var(--clear) - var(--fade) * 0.6), rgb(0 0 0 / 0.5) calc(100% - var(--clear) - var(--fade) * 0.5), rgb(0 0 0 / 0.317) calc(100% - var(--clear) - var(--fade) * 0.4), rgb(0 0 0 / 0.163) calc(100% - var(--clear) - var(--fade) * 0.3), rgb(0 0 0 / 0.058) calc(100% - var(--clear) - var(--fade) * 0.2), rgb(0 0 0 / 0.009) calc(100% - var(--clear) - var(--fade) * 0.1), rgb(0 0 0 / 0.0) calc(100% - var(--clear) - var(--fade) * 0.0), transparent calc(100% - var(--clear)));
  mask-image: linear-gradient(transparent var(--clear), rgb(0 0 0 / 0.0) calc(var(--clear) + var(--fade) * 0.0), rgb(0 0 0 / 0.009) calc(var(--clear) + var(--fade) * 0.1), rgb(0 0 0 / 0.058) calc(var(--clear) + var(--fade) * 0.2), rgb(0 0 0 / 0.163) calc(var(--clear) + var(--fade) * 0.3), rgb(0 0 0 / 0.317) calc(var(--clear) + var(--fade) * 0.4), rgb(0 0 0 / 0.5) calc(var(--clear) + var(--fade) * 0.5), rgb(0 0 0 / 0.683) calc(var(--clear) + var(--fade) * 0.6), rgb(0 0 0 / 0.837) calc(var(--clear) + var(--fade) * 0.7), rgb(0 0 0 / 0.942) calc(var(--clear) + var(--fade) * 0.8), rgb(0 0 0 / 0.991) calc(var(--clear) + var(--fade) * 0.9), rgb(0 0 0 / 1.0) calc(var(--clear) + var(--fade) * 1.0), rgb(0 0 0 / 1.0) calc(100% - var(--clear) - var(--fade) * 1.0), rgb(0 0 0 / 0.991) calc(100% - var(--clear) - var(--fade) * 0.9), rgb(0 0 0 / 0.942) calc(100% - var(--clear) - var(--fade) * 0.8), rgb(0 0 0 / 0.837) calc(100% - var(--clear) - var(--fade) * 0.7), rgb(0 0 0 / 0.683) calc(100% - var(--clear) - var(--fade) * 0.6), rgb(0 0 0 / 0.5) calc(100% - var(--clear) - var(--fade) * 0.5), rgb(0 0 0 / 0.317) calc(100% - var(--clear) - var(--fade) * 0.4), rgb(0 0 0 / 0.163) calc(100% - var(--clear) - var(--fade) * 0.3), rgb(0 0 0 / 0.058) calc(100% - var(--clear) - var(--fade) * 0.2), rgb(0 0 0 / 0.009) calc(100% - var(--clear) - var(--fade) * 0.1), rgb(0 0 0 / 0.0) calc(100% - var(--clear) - var(--fade) * 0.0), transparent calc(100% - var(--clear))); }
.article.cs :is(.stack .say, .prose > .frost)::before { --clear: 0.75rem; --fade: 4rem; top: -5.5rem; bottom: -5.5rem; z-index: -2;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.article.cs :is(.stack .say, .prose > .frost)::after { --clear: 1.25rem; --fade: 3rem; top: -5rem; bottom: -5rem; z-index: -1;
  background: color-mix(in srgb, var(--paper) 55%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.article.cs .stack .say > * { margin: 0; }
.article.cs .stack .say > p.fine { margin-top: 0.4rem; color: var(--faint); font-size: var(--fs-s); line-height: 1.45; }
.article.cs .prose > .frost::before, .article.cs .prose > .frost::after { left: 0; right: 0; }

/* The steps say little, and the picture says the rest, so their words are set as
   large body text: sentences to read, a size up from the article's, not headings. */
.article.cs .stack .say > p:not(.fine) { color: var(--ink); font-size: 1.3rem; font-weight: 400; letter-spacing: -0.005em; line-height: 1.45; text-wrap: balance; }

/* The words sit on a plain white label cropped close to them, square, with no glass:
   it holds them clear of whatever passes underneath without blurring the rest. */
.article.cs :is(.stack .say, .prose > .frost) { width: fit-content; }
.article.cs :is(.stack .say, .prose > .frost)::before { display: none; }
.article.cs :is(.stack .say, .prose > .frost)::after { inset: -0.3rem -0.6rem; background: var(--paper);
  -webkit-mask-image: none; mask-image: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
/* heading and words on one label: no gap left under the last line */
.article.cs .prose > .frost > :last-child { margin-bottom: 0; }
