/* DeepScope pipeline figure: line-art panels joined by arrows, built stage by stage. */
.pipe { max-width: min(1240px, 100%); margin: clamp(40px, 6vh, 80px) auto 0; padding: 0 var(--side); }
.pipe .row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; position: relative; }
.pipe .row.two::after {               /* the arrow between the two side-by-side panels */
  content: ""; position: absolute; left: 50%; top: 45%; width: 22px; height: 1px; background: var(--ink);
  transform: translateX(-50%); opacity: .55;
}
.pipe .row.two::before {              /* its arrowhead */
  content: ""; position: absolute; left: calc(50% + 6px); top: 45%; width: 6px; height: 6px; margin-top: -3px;
  border-right: 1px solid var(--ink); border-top: 1px solid var(--ink); transform: rotate(45deg); opacity: .7;
}
.stage { min-width: 0; }
.stage-name { font-family: var(--sans); font-weight: 600; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.pc { display: block; width: 100%; aspect-ratio: 4 / 3.4; background: #fff; border: 1px solid var(--line); }
.pc.wide { aspect-ratio: 16 / 6.2; }
.pc.wide.short { aspect-ratio: 16 / 5; }
.eq { font-family: var(--math); font-size: clamp(16px, 1.05vw, 20px); line-height: 1.6; margin-top: 12px; color: var(--ink); }
.eq p { overflow-wrap: anywhere; }
.eq .dim { color: #8a857c; }
.eq i { font-style: italic; }
.eq sub, .eq sup { font-size: .72em; line-height: 0; }

.link { position: relative; height: 64px; margin: 6px 0; }
.link::before { content: ""; position: absolute; left: 50%; top: 4px; bottom: 9px; width: 1px; background: var(--ink); opacity: .55; }
.link::after {
  content: ""; position: absolute; left: 50%; bottom: 4px; width: 7px; height: 7px; margin-left: -3.5px;
  border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform: rotate(45deg); opacity: .7;
}
.link span { position: absolute; left: calc(50% + 14px); top: 50%; transform: translateY(-50%); font-family: var(--math); font-size: 15.5px; color: var(--muted); white-space: nowrap; }

.metrics { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.metrics td { padding: 5px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.metrics tr:first-child td { border-top: 1px solid var(--line); }
.metrics td:first-child { color: var(--text); padding-right: 10px; }
.metrics td.v { text-align: right; font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.metrics td.u { color: var(--muted); font-size: 11.5px; padding-left: 6px; white-space: nowrap; }

.margin { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; font-family: var(--math); font-size: 16px; color: var(--muted); }
.margin input { accent-color: var(--ink); width: 170px; }
.margin output { font-family: var(--mono); font-size: 13px; color: var(--ink); min-width: 3ch; }
.pipe-controls { margin-top: 36px; }
.pipe-controls button[aria-pressed="false"][data-act="motion"] { background: transparent; color: var(--muted); border-color: var(--muted); }
.pipe-controls button[aria-pressed="true"][data-act="pause"] { background: var(--ink); color: var(--bg); }
.pipe figcaption { max-width: 640px; margin: 18px auto 0; text-align: center; font-size: 14px; color: var(--muted); }
.prose-c figure.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }

/* stage-by-stage build: only when JS is running and motion is allowed */
html.js .pipe.building [data-step] { opacity: 0; transform: translateY(10px); }
html.js .pipe.building.link-in [data-step] { transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js .pipe.building [data-step].on { opacity: 1; transform: none; }
html.js .pipe.building .link[data-step]::before { transform-origin: top; transform: scaleY(0); transition: transform .6s var(--ease); }
html.js .pipe.building .link[data-step].on::before { transform: none; }
html.js .pipe.building .row.two::after, html.js .pipe.building .row.two::before { opacity: 0; transition: opacity .6s ease .5s; }
html.js .pipe.building .row.two:has(.stage.on + .stage.on)::after { opacity: .55; }
html.js .pipe.building .row.two:has(.stage.on + .stage.on)::before { opacity: .7; }

@media (max-width: 760px) {
  .pipe .row.two { grid-template-columns: 1fr; gap: 0; }
  .pipe .row.two > .stage + .stage { margin-top: 70px; position: relative; }
  .pipe .row.two > .stage + .stage::before {
    content: ""; position: absolute; left: 50%; top: -60px; height: 48px; width: 1px; background: var(--ink); opacity: .55;
  }
  .pipe .row.two::after, .pipe .row.two::before { display: none; }
  .pc.wide { aspect-ratio: 4 / 3; }
  .pc.wide.short { aspect-ratio: 4 / 2.6; }
  .eq { font-size: 15.5px; }
  .link span { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html.js .pipe.building [data-step] { opacity: 1 !important; transform: none !important; }
}

/* control buttons (these used to live in site.css) */
.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.buttons button {
  font: 600 11.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); background: transparent; cursor: pointer;
  border: 1px solid var(--ink); padding: 10px 13px; transition: background .2s ease, color .2s ease;
}
.buttons button:hover { background: var(--ink); color: var(--bg); }
.pc { background: #fff; }
