/* How targets work: the "lab" page. Loads after styles.css. */
.lab {
  --ink: #ffffff;
  --ink-2: #c9ccd2;
  --muted: #8b9098;
  --grid: rgba(255, 255, 255, .08);
  --fig: #16171b;
  --fig-2: #1c1d22;
  --green: #1db06b;       /* chart marks (validated on the dark surface) */
  --blue: #4f87ff;
  --neutral: #5d626b;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  background: #0c0c0e;
}

/* ---------- Hero ---------- */
.lab-hero { position: relative; isolation: isolate; min-height: min(92vh, 900px); display: flex; align-items: flex-end; overflow: hidden; }
.lab-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("img/photos/lab-hero.webp") center / cover; transform: scaleX(-1);
}
.lab-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(12,12,14,.96) 0%, rgba(12,12,14,.82) 38%, rgba(12,12,14,.15) 70%, rgba(12,12,14,.35) 100%),
    linear-gradient(0deg, #0c0c0e 0%, rgba(12,12,14,0) 30%);
}
.lab-hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: end; padding: 140px 0 72px; }
.lab-hero .eyebrow { font-family: var(--mono); letter-spacing: .18em; color: var(--accent); }
.lab-hero h1 { font-size: clamp(46px, 6.4vw, 96px); line-height: .95; letter-spacing: -0.055em; font-weight: 400; margin: 0 0 28px; max-width: 9.5em; }
.lab-hero .lede { color: var(--ink-2); max-width: 30em; font-size: clamp(17px, 1.4vw, 19px); }
.hero-grid-lines { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: linear-gradient(90deg, #000 0%, transparent 60%); -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 60%); }

/* Live readout card */
.readout {
  justify-self: end; width: min(380px, 100%);
  background: rgba(20, 21, 25, .72); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; padding: 20px 22px 18px;
  backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.readout header { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.readout .live { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); }
.readout .live i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(47,224,138,.6); animation: pulse 2.2s ease-out infinite; }
.readout h3 { margin: 10px 0 2px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.readout .spark { display: block; width: 100%; height: 70px; margin: 10px 0 6px; overflow: visible; }
.readout dl { display: grid; grid-template-columns: 1fr auto; gap: 9px 12px; margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--grid); font-size: 14px; }
.readout dt { color: var(--muted); }
.readout dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); text-align: right; }
.readout .next { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.05); display: flex; justify-content: space-between; align-items: baseline; }
.readout .next small { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.readout .next b { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.readout .next b i { font-style: normal; font-size: 14px; color: var(--muted); font-weight: 500; }

/* Stat strip */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #0e0e10; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 30px 24px 28px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { display: block; font-size: clamp(34px, 3.6vw, 52px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.stat span { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; max-width: 16em; }

/* ---------- Body: sticky index + chapters ---------- */
.lab-body .wrap { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding: 96px 0 40px; }
.toc { position: sticky; top: 96px; align-self: start; font-size: 14px; }
.toc p { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: flex; gap: 12px; padding: 8px 0 8px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); text-decoration: none; transition: color .2s, border-color .2s; }
.toc a span { font-family: var(--mono); font-size: 12px; opacity: .7; padding-top: 1px; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-left-color: var(--accent); }

.chapter { padding: 0 0 112px; max-width: 860px; scroll-margin-top: 90px; }
.chapter .num { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--accent); margin: 0 0 14px; }
.chapter h2 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 500; margin: 0 0 20px; max-width: 16em; }
.chapter > p, .chapter li { color: var(--ink-2); font-size: 17px; max-width: 40em; }
.chapter ul { padding-left: 20px; }
.chapter li { margin: 8px 0; }
.chapter li b, .chapter p b { color: var(--ink); font-weight: 600; }
.chapter a { color: var(--accent); }

/* ---------- Figures ---------- */
.fig { margin: 36px 0 0; background: linear-gradient(180deg, var(--fig-2), var(--fig)); border: 1px solid rgba(255,255,255,.08); border-radius: 22px; padding: 22px 24px 18px; position: relative; }
.fig-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; margin-bottom: 16px; }
.fig-title small { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.fig-title b { font-size: 16px; font-weight: 600; }
.fig figcaption { color: var(--muted); font-size: 13px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--grid); }
.fig svg { display: block; width: 100%; overflow: visible; }
.fig svg text { font-family: var(--font); fill: var(--muted); font-size: 12px; }
.fig svg .mono { font-family: var(--mono); font-size: 11px; }
.fig svg .ink { fill: var(--ink); }
.fig svg .ink2 { fill: var(--ink-2); }
.fig .grid line { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.06); }
.seg button { border: 0; background: none; border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; transition: background-color .25s, color .25s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: #fff; color: #0a0a0a; }
.ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 13px; color: var(--muted); }
.ctrl output { font-family: var(--mono); color: var(--ink); min-width: 4.5em; }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: none; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.icon-btn:hover { background: rgba(255,255,255,.08); }
.icon-btn svg { width: 14px; height: 14px; fill: currentColor; }

input[type="range"].slider { -webkit-appearance: none; appearance: none; width: 180px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.14); outline-offset: 6px; }
input[type="range"].slider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 4px rgba(255,255,255,.12); cursor: grab; }
input[type="range"].slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; cursor: grab; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip-stat { padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--grid); min-width: 130px; }
.chip-stat small { display: block; color: var(--muted); font-size: 12px; }
.chip-stat b { font-family: var(--mono); font-weight: 500; font-size: 17px; color: var(--ink); }

.tip { position: absolute; z-index: 5; pointer-events: none; opacity: 0; transform: translate(-50%, calc(-100% - 12px)); transition: opacity .15s;
  background: #0b0b0d; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 8px 11px; font-size: 12px; color: var(--ink-2); white-space: nowrap; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.tip b { color: var(--ink); font-weight: 600; }
.tip.on { opacity: 1; }

/* Rules table inside Fig 2: the rule that fired lights up */
.rules { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 14px; }
.rules td { padding: 11px 12px; border-top: 1px solid var(--grid); vertical-align: top; color: var(--muted); transition: color .3s, background-color .3s; }
.rules td:first-child { width: 46%; }
.rules tr.on td { color: var(--ink); background: rgba(29,176,107,.10); }
.rules tr.on td:first-child { box-shadow: inset 2px 0 0 var(--green); }

/* Fig 3: mini logger */
.logger { display: grid; gap: 8px; }
.lrow { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid transparent; transition: background-color .3s, border-color .3s, opacity .3s; }
.lrow .n { font-family: var(--mono); color: var(--muted); font-size: 12px; }
.lrow .w { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lrow .w i { font-style: normal; color: var(--muted); font-size: 13px; font-weight: 500; }
.lrow .why { color: var(--muted); font-size: 13px; text-align: right; max-width: 22em; }
.lrow.now { border-color: rgba(29,176,107,.55); background: rgba(29,176,107,.08); }
.lrow.later { opacity: .5; }
.lrow .tag { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 2px; }
.rep-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.rep-pick button { min-width: 38px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: none; color: var(--ink-2); font-family: var(--mono); font-size: 13px; cursor: pointer; transition: background-color .2s, color .2s; }
.rep-pick button:hover { background: rgba(255,255,255,.08); }
.rep-pick button[aria-pressed="true"] { background: #fff; color: #0a0a0a; border-color: #fff; }

/* Fig 5: plates beside a photo */
.split { display: grid; grid-template-columns: 1fr 220px; gap: 20px; align-items: stretch; }
.split .photo { border-radius: 16px; background: url("img/photos/lab-plates.webp") center / cover; min-height: 200px; }
.loaded { font-size: 15px; color: var(--ink-2); margin-top: 6px; }
.loaded b { color: var(--ink); font-weight: 600; }

.pull { margin: 40px 0 0; display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; }
.pull .photo { aspect-ratio: 1; border-radius: 18px; background: url("img/photos/lab-grip.webp") center / cover; }
.pull blockquote { margin: 0; font-size: clamp(22px, 2.3vw, 30px); line-height: 1.25; letter-spacing: -0.02em; color: var(--ink); }
.pull blockquote span { color: var(--muted); }

.datatable { margin-top: 12px; }
.datatable summary { padding: 6px 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.datatable summary::after { width: 7px; height: 7px; }
.datatable table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 4px 0 10px; }
.datatable th, .datatable td { text-align: left; padding: 7px 10px; border-top: 1px solid var(--grid); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.datatable th { color: var(--muted); font-weight: 500; }

.refs { list-style: none; padding: 0 !important; counter-reset: r; }
.refs li { max-width: none !important; counter-increment: r; position: relative; padding: 14px 0 14px 44px; border-top: 1px solid var(--grid); font-size: 15px !important; margin: 0 !important; }
.refs li::before { content: "[" counter(r) "]"; position: absolute; left: 0; top: 14px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.refs i { color: var(--muted); }
.lab .cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-top: 32px; border-top: 1px solid var(--line); }
.lab .cta-row .note { color: var(--muted); font-size: 15px; }

/* Reveal */
.js .lab .rise { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .9s cubic-bezier(.16,1,.3,1); }
.js .lab .rise.in { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  .lab-hero .wrap { grid-template-columns: 1fr; padding-top: 110px; }
  .readout { justify-self: start; }
  .lab-hero::after { background: linear-gradient(0deg, #0c0c0e 10%, rgba(12,12,14,.75) 60%, rgba(12,12,14,.5) 100%); }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .lab-body .wrap { grid-template-columns: 1fr; padding-top: 64px; }
  .toc { display: none; }
  .split, .pull { grid-template-columns: 1fr; }
  .split .photo { min-height: 160px; }
  .pull .photo { aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  .fig { padding: 18px 16px 14px; border-radius: 18px; }
  .lrow { grid-template-columns: 36px 1fr; }
  .lrow .why { grid-column: 1 / -1; text-align: left; }
  .stat { padding: 22px 14px 20px; }
  .rules td:first-child { width: 50%; }
  input[type="range"].slider { width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .lab .rise { opacity: 1; transform: none; transition: none; }
}

/* ================= Micro-details ================= */
.lab ::selection { background: rgba(47,224,138,.35); color: #fff; }
.lab :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Reading progress, a hairline under the nav */
.read-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.read-progress i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, rgba(47,224,138,0), var(--accent) 60%, #b9ffd9); box-shadow: 0 0 12px rgba(47,224,138,.6); }

/* Hero: drifting light, chalk dust, words that rise */
.hero-light { position: absolute; inset: -20%; z-index: -1; pointer-events: none; mix-blend-mode: screen; opacity: .5;
  background: radial-gradient(28% 40% at 70% 35%, rgba(255, 214, 160, .16), transparent 70%); animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(-3%, -2%) scale(1); } to { transform: translate(4%, 3%) scale(1.08); } }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.lab-hero h1 .wd { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.lab-hero h1 .wd > span { display: inline-block; transform: translateY(105%); animation: word-up 1.1s cubic-bezier(.16,1,.3,1) forwards; animation-delay: calc(.15s + var(--w) * 70ms); }
@keyframes word-up { to { transform: none; } }
.lab-hero .eyebrow::after { content: "_"; margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.js .lab-hero .lede, .js .readout { animation: rise .9s cubic-bezier(.16,1,.3,1) both; }
.js .lab-hero .lede { animation-delay: .55s; }
.js .readout { animation-delay: .75s; }

/* Spotlight borders that follow the pointer */
.readout, .fig { --mx: 50%; --my: 0%; }
.readout::before, .fig::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(47,224,138,.55), rgba(255,255,255,.08) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .4s;
}
.fig::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255,255,255,.035), transparent 60%); opacity: 0; transition: opacity .4s; }
.readout:hover::before, .fig:hover::before, .fig:hover::after { opacity: 1; }
.readout { position: relative; }

/* The readout's numbers roll when they change */
.roll { display: inline-block; animation: roll .5s cubic-bezier(.16,1,.3,1); }
@keyframes roll { from { transform: translateY(45%); opacity: 0; filter: blur(4px); } }
.spark .halo { transform-box: fill-box; transform-origin: center; animation: halo 2.2s ease-out infinite; fill: var(--green); }

/* Chapter numbers decode as they arrive */
.chapter .num { font-variant-numeric: tabular-nums; }
.chapter .num::before { content: ""; display: inline-block; width: 18px; height: 1px; background: currentColor; vertical-align: middle; margin-right: 10px; transform-origin: left; transform: scaleX(0); transition: transform .8s cubic-bezier(.16,1,.3,1) .1s; }
.chapter .num.lit::before { transform: none; }

/* Sticky index: a sliding marker */
.toc ol { position: relative; }
.toc-ink { position: absolute; left: -1px; top: 0; width: 1px; background: var(--accent); box-shadow: 0 0 10px rgba(47,224,138,.7); transition: transform .5s cubic-bezier(.65,0,.35,1), height .5s cubic-bezier(.65,0,.35,1); }
.toc a.on { border-left-color: transparent; }
.toc a span { transition: color .3s; }
.toc a.on span { color: var(--accent); opacity: 1; }

/* Segmented controls: a sliding pill */
.seg { position: relative; isolation: isolate; }
.seg .thumb { position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 0; border-radius: 999px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.35);
  transition: transform .45s cubic-bezier(.65,0,.35,1), width .45s cubic-bezier(.65,0,.35,1); }
.seg.has-thumb button[aria-pressed="true"] { background: transparent; }
.seg button { transition: color .35s; }
.seg button:active { transform: scale(.96); }

/* Fig 2's play button shows time until the next session */
.icon-btn { position: relative; transition: transform .25s cubic-bezier(.34,1.56,.64,1), background-color .2s; }
.icon-btn:active { transform: scale(.9); }
.icon-btn .ring { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); pointer-events: none; }
.icon-btn .ring circle { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.icon-btn.ticking .ring circle { opacity: 1; animation: ring 1.7s linear forwards; }

/* Charts: hover states */
.fig .dot { transform-box: fill-box; transform-origin: center; transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.fig g:hover > .dot, .fig g:focus > .dot { transform: scale(1.6); }
.fig .col path { transition: filter .2s; }
.fig .col:hover path { filter: brightness(1.25); }
.tip { transform: translate(-50%, calc(-100% - 4px)) scale(.96); transition: opacity .18s, transform .25s cubic-bezier(.16,1,.3,1); }
.tip.on { transform: translate(-50%, calc(-100% - 12px)); }

/* Controls */
input[type="range"].slider::-webkit-slider-thumb { transition: box-shadow .2s, transform .2s; }
input[type="range"].slider:active::-webkit-slider-thumb { transform: scale(1.15); box-shadow: 0 0 0 7px rgba(47,224,138,.25); }
.slider-fill { --v: 50%; }
input[type="range"].slider { background: linear-gradient(90deg, var(--accent) var(--v, 0%), rgba(255,255,255,.14) var(--v, 0%)); }
output.flash { animation: flash .5s ease; }
@keyframes flash { 30% { color: var(--accent); text-shadow: 0 0 12px rgba(47,224,138,.6); } }
.rep-pick button { transition: background-color .2s, color .2s, transform .2s cubic-bezier(.34,1.56,.64,1); }
.rep-pick button:active { transform: scale(.9); }

/* Logger: the new target shimmers in */
.lrow { position: relative; overflow: hidden; }
.lrow.now::after { content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-100%);
  background: linear-gradient(100deg, transparent 30%, rgba(47,224,138,.18) 50%, transparent 70%); }
.lrow.now.pop::after { animation: sheen .9s cubic-bezier(.16,1,.3,1); }
@keyframes sheen { to { transform: translateX(100%); } }
.lrow.pop .w { animation: roll .5s cubic-bezier(.16,1,.3,1); }
.lrow.later.pop .w { animation-delay: .12s; animation-fill-mode: backwards; }

/* Backtest: a delta badge pops in */
.delta { display: inline-flex; align-items: center; gap: 8px; margin: -4px 0 14px; padding: 6px 12px 6px 10px; border-radius: 999px; font-size: 13px; color: var(--ink-2);
  background: rgba(29,176,107,.12); border: 1px solid rgba(29,176,107,.35); }
.delta::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.delta b { color: var(--ink); font-weight: 600; }
.js .fig .delta { opacity: 0; transform: translateY(6px) scale(.96); transition: opacity .5s ease 1.2s, transform .6s cubic-bezier(.34,1.56,.64,1) 1.2s; }
.js .fig.in .delta { opacity: 1; transform: none; }

/* Pull quote and photos: slow zoom when seen */
.pull .photo, .split .photo { transition: transform 1.6s cubic-bezier(.16,1,.3,1), filter 1.6s; transform: scale(1.06); filter: brightness(.8); }
.in .pull .photo, .pull.in .photo, .fig.in .split .photo { transform: none; filter: none; }
.fig .split .photo { overflow: hidden; }

/* Stat strip: hairline sweeps in, numbers settle */
.stats { position: relative; }
.stats::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); transform: scaleX(0); animation: sweep 1.6s cubic-bezier(.16,1,.3,1) 1s forwards; opacity: .7; }
@keyframes sweep { to { transform: scaleX(1); opacity: 0; } }
.stat b { font-variant-numeric: tabular-nums; }

/* References: a little arrow on hover */
.refs li { transition: color .2s, padding-left .3s cubic-bezier(.16,1,.3,1); }
.refs li:hover { color: var(--ink); padding-left: 50px; }

@media (prefers-reduced-motion: reduce) {
  .hero-light, .dust { display: none; }
  .lab-hero h1 .wd > span { transform: none; animation: none; }
  .lab-hero .eyebrow::after { animation: none; }
}
