/* Article-library-only repair. Load after styles.css with this dated filename. */
.content-grid.article-library-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

/* Author display rules must not override search/filter/load-more visibility. */
.article-library-grid .content-card[hidden] {
  display: none !important;
}

.article-library-grid .article-card,
.article-library-grid .article-card:first-child {
  display: flex;
  flex-direction: column;
  grid-column: auto;
  grid-template-columns: none;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}

/* renderCards emits separate text siblings, not a wrapped feature column. */
.article-library-grid .article-card:first-child h3 {
  font-size: clamp(1.18rem, 2vw, 1.55rem);
}

.article-library-grid .article-card .content-media,
.article-library-grid .article-card:first-child .content-media {
  width: 100%;
  margin: 0 0 1rem;
}

/* Show the entire photograph, including portrait originals, without clipping. */
.article-library-grid .article-card .content-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  margin: 0;
  border-radius: 8px;
  background: #f3f1eb;
}

.article-library-grid .article-card .content-media figcaption {
  padding-top: 0.55rem;
}

.article-library-grid .article-card .read-more-link {
  align-self: flex-start;
  margin-top: auto;
}

@media (max-width: 920px) {
  .content-grid.article-library-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Article detail images retain the full original framing, too. */
.article-detail-media img {
  width: 100%;
  height: auto;
  max-height: 560px;
  aspect-ratio: auto;
  object-fit: contain;
  background: #f3f1eb;
}

.image-unavailable {
  padding: 1rem;
  color: #515a52;
  background: #f3f1eb;
}
