/* The problem, round 5 (Chief, Nov 12): "three panes fuse into one". The grass is the section's
   full-bleed ground; three liquid-glass panes, one statement each, sit out of register on it and
   fuse into one card as the reader scrolls (glass.js draws them and moves the text with CSS
   transforms). This file owns the FUSED layout (p = 1): one card on columns 2-11, the label over
   three statement columns with their rules. glass.js measures it and derives the three panes.
   Linked after full.css; same selectors win by order, so this only restates what changes. */
.section.prob { display: block; padding: 0; }
.prob .prob__panel { height: auto; border-radius: 0; padding: 96px var(--margin); background-position: 50% 50%; }
/* Desktop pin (glass.js adds .is-pin when WebGL2 is there, the width is > 760 and motion is
   allowed): the section becomes a 180vh track and the grass panel sticks under the nav, so the
   fuse plays over about one viewport of native scroll. */
.prob.is-pin { height: 180vh; }
.prob.is-pin .prob__panel { position: sticky; top: 0; height: 100vh; /* fixed: the header is always gone by here, so the panel never resizes (no image zoom) */
  display: grid; align-content: center; padding-top: 0; padding-bottom: 0; }
/* Columns 2-11 of the 12-column grid: one column + gap in from the content box, ten columns wide.
   Each pane spans the label row and the statement row (subgrid), so all three rules share one line. */
.prob .prob__card { position: relative; inset: auto; margin: 0 0 0 calc((100% + var(--gap)) / 12);
  width: calc((100% + var(--gap)) * 10 / 12 - var(--gap)); border-radius: 24px; padding: 48px;
  grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto; gap: 0 var(--gap); }
.prob__pane { grid-row: span 2; display: grid; grid-template-rows: subgrid; transform-origin: 0 0; }
.prob__pane .label { grid-row: 1; margin: 0 0 32px; }
.prob__pane .pain { grid-row: 2; }
.is-glass .prob__pane { will-change: transform; }
@media (max-width: 760px) {
  /* Inset 24; 88px of grass above and below leaves room for the panes' 40px spread at p = 0. */
  .prob .prob__panel { padding: 88px 24px; background-position: 70% 50%; }
  .prob .prob__card { margin: 0; width: auto; border-radius: 16px; padding: 24px;
    grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 24px; }
  .prob__pane { grid-row: auto; display: block; }
  .prob__pane .label { margin-bottom: 24px; }
}

/* Chief (Kassem: "three boxes connect but nothing about the text changes"): the words follow the glass.
   glass.js writes the fuse progress to --fuse (0 = three panes, 1 = one pane). The three problems step
   back as the panes join, and the answer rises into the one pane; the label turns from problem to
   answer. Scrolling back reverses it. No rules above the statements: they only read as stray lines. */
.prob__card { --fuse: 1; --ans: clamp(0, calc((var(--fuse) - .72) * 3.6), 1); }
.is-glass .prob__card { --fuse: 0; }
.prob__pane .pain { border-top: 0; padding-top: 0; opacity: calc(1 - var(--fuse) * .55);
  transform: translateY(calc(var(--fuse) * -6px)); }
.prob__label { position: relative; }
/* The two words never overlap: "problem" fades fully out over --ans 0..0.5, "answer" fades in over 0.5..1. */
.prob__label-a { opacity: clamp(0, calc(1 - var(--ans) * 2), 1); }
.prob__label-b { position: absolute; left: 0; top: 0; opacity: clamp(0, calc((var(--ans) - .5) * 2), 1);
  transform: translateY(calc((1 - clamp(0, (var(--ans) - .5) * 2, 1)) * 6px)); }
.prob__answer { grid-column: 1 / -1; margin: 48px 0 0; font: 600 clamp(40px, 5.2vw, 76px) / 1 var(--font);
  letter-spacing: -.025em; color: var(--ink); opacity: var(--ans); transform: translateY(calc((1 - var(--ans)) * 18px)); }
@media (max-width: 760px) { .prob__answer { margin-top: 32px; } }
@media (prefers-reduced-motion: reduce) { .prob__card, .is-glass .prob__card { --fuse: 1; } }
