/* ==========================================================================
   Case pages: what sits on the light ground of a case study. Loads after
   site.css and live.css on every page under research/.
   ========================================================================== */

/* Figures. */

/* A figure is a white card on the page, like the cards in the videos. */
.fig-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* A live figure never scrolls sideways. On a phone the engine zooms to the
   box of the step that is lit, so the drawing fits the card at any width. */
.fig-frame[data-scene] { overflow: hidden; }
.fig-frame[data-scene] svg { min-width: 0; }
.fig:has(.fig-frame[data-scene]) .fig-hint { display: none; }
@media (max-width: 760px) {
  .fig-frame[data-scene] { padding: 8px; }
}

/* What moves inside a case figure. The drawings run at about 1.2x on a
   desktop, so the traveling pieces are lighter than on the hub covers. */
.fig-frame .lv-glow { stroke-width: 2.5; }
.fig-frame .lv-dot { stroke-width: 3; }
/* A node that is working right now lights up in the accent, then settles. */
.lv-ring { fill: none; stroke: var(--accent); stroke-width: 1.8; }
/* An agent's own sub-agents, for the moment they exist. */
.lv-kid { fill: var(--accent); }

/* The rest of the page. */

/* The callout label is an eyebrow, but `.prose p` and `.callout p` outrank
   `.eyebrow`, so it rendered at body size in body gray. */
.callout p.eyebrow { font-size: 12px; color: var(--accent); margin-bottom: 10px; }

/* A 1px line on this ground barely shows, so the next and previous pages
   are white cards like the figures. */
.pager a {
  background: var(--surface);
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.2s ease;
}
.pager a:hover { border-color: var(--accent-edge); }
@media (hover: hover) and (pointer: fine) {
  .pager a:hover { box-shadow: var(--shadow-lift); }
}

/* Nothing a reader needs is set under 12px. */
.eyebrow, .legend span, .foot-note { font-size: 12px; }
.pager .dir, .spec th { font-size: 12px; }
.lv-rail i { font-size: 12px; }

/* Links that are not inside a sentence get a full 44px to press. */
.dh-back { min-height: 44px; margin-bottom: 8px; }
.foot-links { gap: 0 22px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- applied pages (gtm, quoter, kangroo) ---------- */

/* KangRoo's phone captures hold their frame before the lazy images load, so
   the page no longer jumps by the height of five screens as they arrive. */
.shots--phone .shot img { aspect-ratio: 780 / 1688; }

/* ---------- project color (Nov 7 revision) ---------- */
/* Each case page wears its project's color, the same one its card carries on
   the hub (site.css, "project colors"): a header band of the project's tint,
   figures staged on it, and links, labels and the step rail in its darker,
   readable shade. */
body[class*="pc-"] {
  --accent: var(--pc-ink);
  --accent-deep: color-mix(in srgb, var(--pc-ink) 82%, #000000);
  --accent-soft: var(--pc-soft);
  --accent-edge: var(--pc-edge);
  --marker: color-mix(in srgb, var(--pc) 22%, #ffffff);
}
body[class*="pc-"] .dh {
  background: var(--pc-soft);
  border-bottom: 1px solid color-mix(in srgb, var(--pc) 22%, #e1e4df);
}
body[class*="pc-"] .fig-frame {
  background: color-mix(in srgb, var(--pc) 6%, #ffffff);
  border-color: color-mix(in srgb, var(--pc) 24%, #e1e4df);
}

