/* Subject diagram gallery for the /study/* landing pages: real app captures of
   questions that carry the subject's own diagram (T-accounts, code traces,
   phase diagrams, ...). Self-contained; nothing else on the page depends on it. */

.subject-shots__grid {
  display: grid;
  grid-template-columns: repeat(var(--subject-shots-count, 3), minmax(0, 1fr));
  gap: clamp(18px, 3vw, 34px);
  margin: 44px auto 0;
  max-width: calc(var(--subject-shots-count, 3) * 300px + (var(--subject-shots-count, 3) - 1) * 34px);
}

.subject-shot {
  min-width: 0;
  margin: 0;
}

.subject-shot figcaption {
  margin-top: 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.subject-shot figcaption strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 700;
}

.subject-shots__note {
  max-width: 760px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

@media (max-width: 820px) {
  .subject-shots__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 620px;
  }
  .subject-shots__grid > .subject-shot:nth-child(3):last-child {
    grid-column: 1 / -1;
    width: min(100%, 300px);
    justify-self: center;
  }
}

@media (max-width: 520px) {
  .subject-shots__grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 290px;
    margin-top: 32px;
  }
  .subject-shots__grid > .subject-shot:nth-child(3):last-child { width: 100%; }
}
