/* PBISC-Diffusion pages: recorded sampling videos, figures, and the one-cell tool. Builds on /styles.css. */

:root {
  --font-mono: var(--font-sans);
}

.trajectory-player,
.trajectory-reading,
.trajectory-keyframes,
.trajectory-methods,
.trajectory-tabs,
.trajectory-volcano,
.trajectory-study {
  width: min(1280px, calc(100vw - 2 * var(--gutter, 24px)));
  margin-inline: auto;
}

.trajectory-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.trajectory-tabs a {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
}

.trajectory-tabs a:hover {
  background: var(--surface-2);
}

.trajectory-player {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.trajectory-player-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.trajectory-player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #fff;
}


.trajectory-player figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 22px;
  color: var(--muted);
  font-size: 14px;
}

.trajectory-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-size: 14px;
}

.trajectory-links a {
  color: var(--blue);
  font-weight: 500;
}

.trajectory-links a:hover,
.trajectory-gene-source a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.trajectory-player .trajectory-links {
  flex-shrink: 0;
}

.trajectory-reading {
  padding-top: 18px;
}

.trajectory-label-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 14px;
}

.trajectory-label-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trajectory-label-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--label-color);
}

.trajectory-label-legend.trajectory-direction-legend {
  padding-bottom: 16px;
}

.trajectory-label-legend i.trajectory-gene-outline {
  width: 12px;
  height: 12px;
  border: 2px solid #111827;
  background: transparent;
}

.trajectory-short-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.trajectory-keyframes {
  margin-top: clamp(56px, 7vw, 88px);
}

.trajectory-keyframes-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.trajectory-keyframes h2,
.trajectory-volcano-intro h2,
.trajectory-methods h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.015em;
}

.trajectory-keyframes figure > a,
.trajectory-comparison > a {
  display: block;
  padding: clamp(12px, 2vw, 28px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.trajectory-keyframes img,
.trajectory-comparison img {
  width: 100%;
  height: auto;
}

.trajectory-volcano {
  margin-top: clamp(72px, 9vw, 120px);
}

.trajectory-volcano-intro {
  margin-bottom: 22px;
}

.trajectory-volcano-intro .section-label {
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
}

.trajectory-volcano-intro h2 {
  margin: 6px 0 16px;
}

.trajectory-volcano-intro .trajectory-links {
  margin-top: 16px;
}

.trajectory-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trajectory-badges span {
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--surface);
  font-size: 13px;
}

.trajectory-volcano-player {
  width: 100%;
}

.trajectory-comparison {
  margin-block: 24px 16px;
}

.trajectory-comparison figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.trajectory-axis-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.trajectory-methods {
  padding-top: clamp(64px, 8vw, 104px);
}

.trajectory-method-downloads {
  margin-top: 20px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: var(--surface);
}

.trajectory-method-downloads summary {
  font-weight: 500;
  cursor: pointer;
}

.trajectory-method-downloads .trajectory-badges,
.trajectory-method-downloads .trajectory-links {
  margin-top: 16px;
}

.trajectory-method-downloads .trajectory-badges span {
  background: #fff;
}

.trajectory-gene-source {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* Interactive study shells; the widgets own their controls and plots. */
.trajectory-study {
  scroll-margin-top: 20px;
}

.trajectory-study + .trajectory-study {
  margin-top: clamp(64px, 8vw, 104px);
}

.trajectory-study-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 22px;
}

.trajectory-study-head .section-label {
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}

.trajectory-study-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.015em;
}

.trajectory-study-link {
  margin-top: 16px;
}

.trajectory-archive {
  margin-top: 20px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trajectory-archive > summary {
  width: fit-content;
  max-width: 100%;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.trajectory-archive[open] > summary {
  margin-bottom: 18px;
}

.trajectory-archive .trajectory-player {
  width: 100%;
}

.trajectory-archive > .trajectory-links {
  margin-top: 16px;
}

@media (max-width: 720px) {
  .trajectory-player-top,
  .trajectory-player figcaption {
    padding: 12px 16px;
    font-size: 13px;
  }

  .trajectory-player figcaption,
  .trajectory-keyframes-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
