/* Quiet photo frames, sized before the image arrives. */
.post-container .article-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--photo-width) / var(--photo-height);
  margin: 1.5em auto 1.6em;
  overflow: hidden;
  isolation: isolate;
  background: #f3f2ef;
}
.post-container .article-image img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  opacity: 1;
}
.article-image::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: '';
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(255, 255, 255, .65) 48%, transparent 72%);
}
.article-image.is-loading::before {
  opacity: 1;
  animation: photo-skeleton 2.2s ease-in-out infinite;
}
.post-container .article-image.is-loading img,
.post-container .article-image.is-error img { opacity: 0; }
.article-image.is-revealing img { animation: photo-develop .55s cubic-bezier(.22, .61, .36, 1) both; }
.article-image .article-image__error[hidden] { display: none; }
.article-image__error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  color: #76746e;
  text-align: center;
  font-size: 14px;
}
.article-image__error button {
  padding: 5px 17px;
  color: #526b70;
  background: rgba(255, 255, 255, .65);
  border: 1px solid #c4cecd;
  border-radius: 2px;
  font: inherit;
}
.article-image__error button:hover { background: #fff; }
.article-image__error button:focus-visible { outline: 2px solid #0085a1; outline-offset: 3px; }
@keyframes photo-skeleton {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
@keyframes photo-develop {
  from { opacity: 0; transform: scale(1.012); }
  to { opacity: 1; transform: scale(1); }
}
@supports not (aspect-ratio: 1 / 1) {
  .post-container .article-image { height: 0; padding-bottom: var(--photo-padding); }
}
@media (prefers-reduced-motion: reduce) {
  .article-image.is-loading::before,
  .article-image.is-revealing img { animation: none; }
}
