/* Галерея кадров «От данных к решению» на /hero-graph/.
   Статичный конспект примера: работает без JavaScript и при печати.
   Токены — из site.css. */

.flow-gallery .section-head .badge {
  justify-self: start;
}

.gallery-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 3vw, 40px);
}

.gallery-item figure {
  margin: 0;
  display: grid;
  gap: 12px;
  align-content: start;
}

.gallery-item img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px solid var(--line);
  /* Кадры нарисованы на светлом фоне и в тёмной теме остаются светлыми. */
  background: #f5f3ed;
}

.gallery-item figcaption {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 68ch;
}

.gallery-step {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
  color: var(--ink);
}

.gallery-item-alt .gallery-step {
  color: var(--warn-text);
}

/* Кадры 1600×900 с мелкими подписями: одна колонка не шире 1040 px,
   иначе на широком экране текст внутри кадра не читается. */
.gallery-list {
  max-width: 1040px;
}

/* Без JavaScript обзорный кадр уже стоит выше, в статичной схеме примера. */
.no-js .gallery-item[data-frame="overview"] {
  display: none;
}

@media print {
  .flow-gallery {
    padding-block: 0;
  }

  .gallery-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .gallery-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .gallery-item figcaption,
  .gallery-step {
    color: #000;
  }
}
