/* ==========================================================================
   Promptly Found: site-wide depth layer
   Load on every page after the site stylesheet. Every rule is scoped to
   html.pfd, a class that site-depth.js adds on every page. The homepage adds
   its own layer on top of this one (home-depth.css, scoped to html.pfx).
   Pages that people come to read get only motion tied to data or to the
   visitor's action: no body text moves.
   ========================================================================== */

@property --pfx-fill { syntax: "<percentage>"; inherits: false; initial-value: 0%; }

.pfd {
  --pfx-ease: cubic-bezier(.2, .7, .2, 1);
  --pfx-spring: cubic-bezier(.3, 1.5, .5, 1);
  --pfx-shade: 24 24 27;
  --pfx-lift-1: 0 1px 1px rgb(var(--pfx-shade) / .04), 0 6px 14px -8px rgb(var(--pfx-shade) / .14);
  --pfx-lift-2: 0 1px 1px rgb(var(--pfx-shade) / .05), 0 14px 26px -14px rgb(var(--pfx-shade) / .2),
    0 40px 70px -40px rgb(var(--pfx-shade) / .3);
}

/* ---- Header: frosted bar with a reading-progress line ------------------- */
.pfd .pf-header {
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
}
.pfd .pf-header::after {
  content: ""; position: absolute; inset: auto 0 -1px; height: 2px;
  background: var(--accent); transform-origin: 0 50%;
  scale: var(--pfx-scroll, 0) 1; pointer-events: none;
}

/* ---- Buttons: a small lift under the pointer ----------------------------
   Not the Check buttons of the tools, which sit inside an input bar. */
.pfd .pf-btn:not(.pf-check__go) {
  transition: border-color .15s, background-color .15s, color .15s,
    transform .3s var(--pfx-ease), box-shadow .3s var(--pfx-ease);
}
.pfd .pf-btn--primary:not(.pf-check__go) {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), 0 8px 16px -10px rgb(var(--pfx-shade) / .6);
}
.pfd .pf-btn:not(.pf-check__go):hover { transform: translateY(-2px); box-shadow: 0 12px 20px -12px rgb(var(--pfx-shade) / .45); }
.pfd .pf-btn--primary:not(.pf-check__go):hover {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 14px 22px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}
.pfd .pf-btn:not(.pf-check__go):active { transform: none; transition-duration: .08s; }

/* ---- Search boxes: the home hero box and the large box (search, 404) ---- */
.pfd :is(.pf-home-hero .pf-search, .pf-search--l) {
  box-shadow: var(--pfx-lift-1);
  transition: border-color .15s, box-shadow .3s var(--pfx-ease);
}
.pfd :is(.pf-home-hero .pf-search, .pf-search--l):focus-within {
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--focus) 12%, transparent), var(--pfx-lift-1);
}

/* ---- Headline figures: the ink rule above them draws in ------------------
   The figure strip (guides, home), the at-a-glance strip (reports) and the
   latest report on the research hub. The numbers count up (site-depth.js). */
.pfd :is(.pf-figstrip, .pf-glance, .pf-leadrep) { position: relative; border-top-color: transparent; }
.pfd :is(.pf-figstrip, .pf-glance, .pf-leadrep)::before {
  content: ""; position: absolute; inset: -2px 0 auto; height: 2px;
  background: var(--ink); transform-origin: 0 50%;
  transition: scale 1.2s var(--pfx-ease);
}
.pfd :is(.pf-figstrip, .pf-glance, .pf-leadrep)[data-pfx]:not(.pfx-in)::before { scale: 0 1; }

/* ---- Crawler grid: a raised sheet, dots that plot in, legend filter ---- */
.pfd .pf-bots { box-shadow: 0 1px 1px rgb(var(--pfx-shade) / .04), 0 12px 22px -16px rgb(var(--pfx-shade) / .25); }
.pfd .pf-bot { transition: background-color .2s, opacity .35s; }
.pfd .pf-bot i { transition: scale .5s var(--pfx-spring), box-shadow .3s; }
.pfd .pf-bot div { transition: opacity .6s; }
.pfd .pf-bots[data-pfx] .pf-bot i { transition-delay: calc(var(--pfx-d, 0) * 1ms + 250ms); }
.pfd .pf-bots[data-pfx] .pf-bot div { transition-delay: calc(var(--pfx-d, 0) * 1ms + 330ms); }
.pfd .pf-bots[data-pfx]:not(.pfx-in) .pf-bot i { scale: 0; }
.pfd .pf-bots[data-pfx]:not(.pfx-in) .pf-bot div { opacity: 0; }
.pfd .pf-bot:hover { background: color-mix(in srgb, var(--c) 8%, var(--paper)); }
.pfd .pf-bot:hover i { scale: 1.25; box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 20%, transparent); }
.pfd .pf-bot--token:hover i {
  box-shadow: inset 0 0 0 1.5px var(--c), 0 0 0 5px color-mix(in srgb, var(--c) 20%, transparent);
}
.pfd .pf-bot.pfx-dim { opacity: .2; }
.pfd .pf-bots__legend li { cursor: default; transition: color .2s; }
.pfd .pf-bots__legend li:hover { color: var(--ink); }

/* ---- Reading path: bars that grow in order and rise on hover ------------ */
.pfd .pf-track a span {
  transform-origin: 50% 100%;
  transition: opacity .15s, transform .4s var(--pfx-spring), box-shadow .3s;
}
.pfd .pf-track a:hover span {
  transform: translateY(-6px);
  box-shadow: 0 12px 16px -10px color-mix(in srgb, var(--h) 80%, transparent);
}
.pfd .pf-track[data-pfx] li { transition: opacity .5s var(--pfx-ease) calc(var(--pfx-i, 0) * 45ms); }
.pfd .pf-track[data-pfx] a span { transition: scale .8s var(--pfx-ease) calc(var(--pfx-i, 0) * 45ms); }
.pfd .pf-track[data-pfx]:not(.pfx-in) li { opacity: 0; }
.pfd .pf-track[data-pfx]:not(.pfx-in) a span { scale: 1 0; }
.pfd .pf-entry--step .pf-entry__num { transition: translate .35s var(--pfx-ease); }
.pfd .pf-entry--step:hover .pf-entry__num { translate: 0 -4px; }

/* ---- Evidence marks fill up to their grade ------------------------------ */
.pfd .pf-ev--confirmed .pf-ev__mark,
.pfd .pf-ev--tested .pf-ev__mark,
.pfd .pf-ev--observed .pf-ev__mark {
  background: conic-gradient(var(--ink) 0 var(--pfx-fill), transparent 0);
  transition: --pfx-fill 1.1s var(--pfx-ease) calc(var(--pfx-i, 0) * 70ms + var(--pfx-m, 0) * 140ms + 200ms);
}
.pfd .pf-ev--confirmed .pf-ev__mark { --pfx-fill: 100%; }
.pfd .pf-ev--tested .pf-ev__mark { --pfx-fill: 75%; }
.pfd .pf-ev--observed .pf-ev__mark { --pfx-fill: 50%; }
.pfd [data-pfx-marks]:not(.pfx-in) .pf-ev__mark { --pfx-fill: 0%; }

/* ---- Charts: build in once ------------------------------------------------
   site-depth.js marks each chart data-pfx="chart" and adds .pfx-in when it
   scrolls into view. --pfx-r is the row, --pfx-k the item, for the stagger.
   Without the script the charts show at once. Transitions sit on the shown
   state only, so a chart hides at once and only its reveal animates. */
.pfd [data-pfx="chart"] :is(.pf-bar__fill, .pf-pair__bar span:first-child, .pf-bmx__bar i, .pf-range__span) { transform-origin: 0 50%; }
.pfd [data-pfx="chart"].pfx-in :is(.pf-bar__fill, .pf-pair__bar span:first-child, .pf-bmx__bar i, .pf-range__span) {
  transition: scale .9s var(--pfx-ease) calc(var(--pfx-r, var(--pfx-k, 0)) * 60ms + 150ms);
}
.pfd [data-pfx="chart"]:not(.pfx-in) :is(.pf-bar__fill, .pf-pair__bar span:first-child, .pf-bmx__bar i, .pf-range__span) { scale: 0 1; }
.pfd [data-pfx="chart"].pfx-in :is(.pf-bar__val, .pf-bar__note, .pf-pair__bar b, .pf-pair__gap, .pf-bmx__val, .pf-range__vals) {
  transition: opacity .5s calc(var(--pfx-r, var(--pfx-k, 0)) * 60ms + 450ms);
}
.pfd [data-pfx="chart"]:not(.pfx-in) :is(.pf-bar__note, .pf-pair__gap, .pf-bmx__val, .pf-range__vals) { opacity: 0; }
/* stacked bars reveal from the left so their labels do not squash */
.pfd [data-pfx="chart"] .pf-stbar__bar { clip-path: inset(0 -1px 0 0); }
.pfd [data-pfx="chart"].pfx-in .pf-stbar__bar { transition: clip-path 1s var(--pfx-ease) calc(var(--pfx-r, 0) * 90ms + 150ms); }
.pfd [data-pfx="chart"]:not(.pfx-in) .pf-stbar__bar { clip-path: inset(0 100% 0 0); }
/* columns rise; the clip leaves room above for the value label */
.pfd [data-pfx="chart"] :is(.pf-cols__col, .pf-hist__col) { clip-path: inset(-40px -40px 0 -40px); }
.pfd [data-pfx="chart"].pfx-in :is(.pf-cols__col, .pf-hist__col) {
  transition: clip-path .9s var(--pfx-ease) calc(var(--pfx-r, var(--pfx-k, 0)) * 70ms + 150ms);
}
.pfd [data-pfx="chart"]:not(.pfx-in) :is(.pf-cols__col, .pf-hist__col) { clip-path: inset(100% -40px 0 -40px); }
.pfd [data-pfx="chart"].pfx-in .pf-hist__bracket { transition: opacity .6s .9s; }
.pfd [data-pfx="chart"]:not(.pfx-in) .pf-hist__bracket { opacity: 0; }
/* range ends, dots, matrix cells and shaded cells pop or fade in */
.pfd [data-pfx="chart"].pfx-in :is(.pf-range__dot, .pf-range__mid) { transition: opacity .4s, scale .5s var(--pfx-spring); transition-delay: calc(var(--pfx-k, 0) * 60ms + 600ms); }
.pfd [data-pfx="chart"]:not(.pfx-in) :is(.pf-range__dot, .pf-range__mid) { opacity: 0; scale: .2; }
.pfd [data-pfx="chart"] .pf-dots__plot circle { transform-box: fill-box; transform-origin: center; }
.pfd [data-pfx="chart"].pfx-in .pf-dots__plot circle { transition: opacity .3s, scale .45s var(--pfx-spring); transition-delay: calc(var(--pfx-k, 0) * 5ms + 150ms); }
.pfd [data-pfx="chart"]:not(.pfx-in) .pf-dots__plot circle { opacity: 0; scale: 0; }
.pfd [data-pfx="chart"].pfx-in .pf-pmx__cell { transition: opacity .5s, scale .6s var(--pfx-spring); transition-delay: calc(var(--pfx-k, 0) * 90ms + 150ms); }
.pfd [data-pfx="chart"]:not(.pfx-in) .pf-pmx__cell { opacity: 0; scale: .85; }
.pfd .pf-heat[data-pfx="chart"].pfx-in tbody td { transition: opacity .6s calc(var(--pfx-r, 0) * 70ms + 100ms); }
.pfd .pf-heat[data-pfx="chart"]:not(.pfx-in) tbody td { opacity: 0; }
/* the curve draws from the left, then its marks appear */
.pfd [data-pfx="chart"] .pf-curve__line { stroke-dasharray: 1; }
.pfd [data-pfx="chart"].pfx-in .pf-curve__line { transition: stroke-dashoffset 1.6s var(--pfx-ease) .2s; }
.pfd [data-pfx="chart"]:not(.pfx-in) .pf-curve__line { stroke-dashoffset: 1; }
.pfd [data-pfx="chart"].pfx-in .pf-curve__area { transition: opacity 1s .6s; }
.pfd [data-pfx="chart"]:not(.pfx-in) .pf-curve__area { opacity: 0; }
.pfd [data-pfx="chart"].pfx-in .pf-curve__mark { transition: opacity .5s calc(var(--pfx-k, 0) * 250ms + 900ms); }
.pfd [data-pfx="chart"]:not(.pfx-in) .pf-curve__mark { opacity: 0; }
/* the donuts above the headline figures draw round from the top, in step with the numbers */
.pfd .pf-glance[data-pfx].pfx-in .pf-glance__arc { transition: stroke-dasharray 1.5s var(--pfx-ease) .15s; }
.pfd .pf-glance[data-pfx]:not(.pfx-in) .pf-glance__arc { stroke-dasharray: 0 100; }

/* ---- Charts: answer the pointer ------------------------------------------ */
.pfd .pf-chart:not([data-pfx]) :is(tbody tr, table > tr, .pf-stbar__seg, .pf-pair__bar, .pf-cols__col, .pf-hist__bin, .pf-range__row, .pf-pmx__cell, .pf-dots__plot circle) {
  transition-property: opacity, scale, box-shadow; transition-duration: .2s;
}
.pfd .pf-chart .pfx-dim { opacity: .3; }
.pfd .pf-chart :is(tr, .pf-range__row).pfx-on th, .pfd .pf-chart .pf-range__row.pfx-on .pf-range__label { color: var(--ink); }
.pfd .pf-chart .pf-stbar__seg.pfx-on { box-shadow: inset 0 0 0 2px rgb(0 0 0 / .18); }
.pfd .pf-chart .pf-pmx__cell.pfx-on { scale: 1.04; box-shadow: inset 0 0 0 2px var(--ink); }
.pfd .pf-chart .pf-dots__plot circle.pfx-on { scale: 1.12; }
.pfd .pf-chart :is(.pf-pair__key, .pf-stbar__key, .pf-cols__key, .pf-dots__key) { cursor: default; transition: color .2s; }
.pfd .pf-chart :is(.pf-pair__key, .pf-stbar__key, .pf-cols__key, .pf-dots__key):hover { color: var(--ink); }
/* tables: the row and column of the cell under the pointer stay strong */
.pfd :is(.pf-heat, .pf-bmx):not([data-pfx]) table tbody td { transition: opacity .2s, box-shadow .2s; }
.pfd :is(.pf-heat, .pf-bmx) table.pfx-x tbody td:not(.pfx-col) { opacity: .45; }
.pfd :is(.pf-heat, .pf-bmx) table.pfx-x tbody tr.pfx-row td { opacity: 1; }
.pfd :is(.pf-heat, .pf-bmx) table.pfx-x td.pfx-cell { box-shadow: inset 0 0 0 2px var(--ink); }
.pfd :is(.pf-heat, .pf-bmx) table.pfx-x :is(tr.pfx-row th, th.pfx-col) { color: var(--ink); }
/* the curve: a guide line and a reading for the point under the pointer */
.pfd .pf-curve__hit { cursor: crosshair; }
.pfd .pf-curve.pfx-hover .pf-curve__hover { display: block; }
.pfd .pf-curve__readout { transition: opacity .15s; }
.pfd .pf-curve.pfx-hover .pf-curve__readout { opacity: 1; }
/* tooltip for small parts (stacked segments, dots, matrix cells) */
.pfd .pfx-tip {
  position: fixed; left: 0; top: 0; z-index: 60; max-width: 300px; padding: 6px 10px;
  border-radius: var(--radius-m); background: var(--ink); color: var(--paper);
  font: 500 13px/18px var(--font-sans); font-variant-numeric: tabular-nums;
  pointer-events: none; opacity: 0; transition: opacity .12s; box-shadow: var(--pfx-lift-1);
}
.pfd .pfx-tip.is-on { opacity: 1; }

/* ---- Footer sits in a recessed well ------------------------------------- */
.pfd .pf-footer { box-shadow: inset 0 1px 0 var(--line), inset 0 18px 26px -24px rgb(var(--pfx-shade) / .22); }

@media (prefers-reduced-motion: reduce) {
  .pfd *, .pfd ::before, .pfd ::after { animation: none !important; transition: none !important; }
}
