/*
  Recurse Center post: a narrower reading column with a sticky "stage" on the right
  that shows captures of the project being read (built by stage.js).
  Without JavaScript the captures simply stay inline under each project.
*/

.recurse { --measure: 520px; }

.recurse .name { font-weight: 600; transition: color .15s; }
.recurse .big { margin-bottom: 24px !important; }
.recurse .big .name { font-size: 1.375rem; }
.recurse .ttl { font-weight: 600; }
.recurse li.on::before { color: var(--accent); font-weight: 700; }
.recurse li.on .name { color: var(--accent); }

/* ---------- Captures ---------- */

.ifig { margin: 12px 0 4px; }
.frame { position: relative; max-width: 100%; background: var(--panel); }

/* No JavaScript: every capture is shown, stacked. */
.shot { display: block; width: 100%; height: auto; margin-bottom: 8px; }

/* With JavaScript: one capture at a time, crossfading in a fixed frame. */
.js .frame { aspect-ratio: 1.52; overflow: hidden; }
.js .frame .shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  opacity: 0;
  transition: opacity .25s ease;
}
.js .frame .shot.on { opacity: 1; }
.card { display: grid; place-items: center; font-size: 1.875rem; font-style: italic; color: var(--faded); }

.capt { font-size: .9375rem; line-height: 1.4; color: var(--muted); margin-top: 10px; }
.capt b { font-weight: 600; color: var(--ink); }
.count { font-family: var(--mono); font-size: .75rem; color: var(--faded); margin-left: 6px; white-space: nowrap; }

.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumbs:empty { display: none; }
.th { padding: 0; border: 1px solid transparent; background: none; cursor: pointer; line-height: 0; }
.th img { display: block; width: 72px; aspect-ratio: 1.52; object-fit: cover; opacity: .55; transition: opacity .15s; }
.th:hover img { opacity: .85; }
.th[aria-pressed="true"] { border-color: var(--ink); }
.th[aria-pressed="true"] img { opacity: 1; }

.snote {
  font-size: .9375rem;
  line-height: 1.4;
  color: var(--muted);
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

.stagecol { display: none; }

@media (max-width: 640px) {
  .th img { width: 64px; }
}

/* ---------- Wide: text column plus stage ---------- */

@media (min-width: 960px) {
  .recurse .head,
  .recurse .split > .col { margin-left: 0; }
  .recurse .split { display: flex; gap: 48px; align-items: stretch; }
  .recurse .split > .col { flex: none; }

  .has-stage .stagecol { display: block; flex: 1 1 0; min-width: 0; padding-top: 50px; }
  .has-stage .stage { position: sticky; top: var(--stick); }
  .has-stage .ifig { display: none; }
  /* Notes for staged projects appear under their capture instead of in the margin. */
  .has-stage .split .note { display: none !important; }
}

/* Between 960 and 1240 there's no outline rail; keep the tail left so its side note fits. */
@media (min-width: 960px) and (max-width: 1239px) {
  .recurse .tail { margin-left: 0; }
}
