.article-inline-image {
  width: min(100%, 920px);
  margin: 34px auto;
}

.article-inline-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: contain;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.article-inline-image figcaption {
  margin-top: 10px;
  padding: 0 6px;
  color: #aaa4b1;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.article-gallery {
  width: min(100%, 920px);
  margin: 34px auto;
  outline: none;
}

.article-gallery:focus-visible .article-gallery__viewport {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

.article-gallery__viewport {
  position: relative;
}

.article-gallery__track {
  position: relative;
  width: 100%;
}

.article-gallery .article-inline-image {
  display: none;
  width: 100%;
  margin: 0;
}

.article-gallery .article-inline-image.is-active {
  display: block;
}

.article-gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(8, 8, 12, 0.72);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  place-items: center;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.article-gallery__nav:hover,
.article-gallery__nav:focus-visible {
  background: rgba(8, 8, 12, 0.92);
  transform: translateY(-50%) scale(1.06);
}

.article-gallery__nav--prev {
  left: 14px;
}

.article-gallery__nav--next {
  right: 14px;
}

.article-gallery__counter {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  min-width: 54px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(8, 8, 12, 0.72);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  backdrop-filter: blur(8px);
}

.article-content > p {
  margin-bottom: 1.35em;
}

.article-content > p:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .article-inline-image,
  .article-gallery {
    margin: 26px auto;
  }

  .article-inline-image img {
    border-radius: 12px;
  }

  .article-inline-image figcaption {
    font-size: 13px;
  }

  .article-gallery__nav {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .article-gallery__nav--prev {
    left: 8px;
  }

  .article-gallery__nav--next {
    right: 8px;
  }

  .article-gallery__counter {
    top: 8px;
    right: 8px;
  }
}
