.references-gallery {
  margin-block-start: clamp(32px, 5vw, 68px);
  scroll-margin-block-start: 120px;
}

.references-gallery h2 {
  margin: 0 0 clamp(16px, 2vw, 28px);
  color: #162136;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.2;
}

.references-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 26px);
}

.references-gallery--app .references-gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-inline-size: 740px;
}

.references-gallery figure {
  min-inline-size: 0;
  margin: 0;
  padding: clamp(12px, 2vw, 24px);
  border: 1px solid #d5deea;
  border-radius: 18px;
  background: #fff;
}

.references-gallery figure a {
  display: block;
  color: #18416c;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.references-gallery figure a:focus-visible, .references-gallery-jump:focus-visible {
  outline: 2px solid #982d0e;
  outline-offset: 3px;
}

.references-gallery figure img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  border: 1px solid #dce2ea;
  border-radius: 9px;
}

.references-gallery--app figure img {
  inline-size: min(100%, 280px);
  margin-inline: auto;
}

.references-gallery figcaption { margin-block-start: .65rem; }
.references-case-aside .references-gallery-jump {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  margin-inline-start: .52em;
  color: #18416c;
  text-decoration: underline;
  text-underline-offset: .2em;
}

@media (max-width: 925px) {
  .references-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 580px) {
  .references-gallery-grid,
  .references-gallery--app .references-gallery-grid { grid-template-columns: minmax(0, 1fr); }
}
