.case-card-cover .case-cover-art {
  width: 100%;
  container-type: inline-size;
}

.case-card-cover .case-cover-art > a {
  display: block;
  position: relative;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 512 / 331;
}

.case-card-cover .case-cover-art > a:focus-visible {
  outline-offset: -3px;
}

.case-card-cover .case-cover-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Keep the top of the tall source screens at the framing used by the cards. */
.case-card-cover[data-case-cover="reports"] img {
  object-fit: cover;
  object-position: center top;
}

.case-card-cover[data-case-cover="city"] img {
  position: absolute;
  top: 0;
  left: -22.35%;
  width: 144.7%;
  height: auto;
  max-width: none;
}

.case-card-cover[data-case-cover="mobile"] .case-cover-art {
  --phone-gap: var(--review-gap, 24px);
  display: flex;
  align-items: flex-start;
  gap: var(--phone-gap);
}

.case-card-cover[data-case-cover="mobile"] .case-cover-art > a {
  flex: 0 0 calc((100% - 2 * var(--phone-gap)) / 3);
  aspect-ratio: 606 / 1324;
  container-type: inline-size;
}

@supports (width: round(down, 100%, 4px)) and (width: 1cqw) {
  .case-card-cover:not([data-case-cover="mobile"]) .case-cover-art > a {
    height: round(nearest, calc(100cqw * 331 / 512), 4px);
  }

  .case-card-cover[data-case-cover="mobile"] .case-cover-art > a {
    flex-basis: round(down, calc((100% - 2 * var(--phone-gap)) / 3), 4px);
    aspect-ratio: auto;
  }

  .case-card-cover[data-case-cover="mobile"] img {
    height: round(nearest, calc(100cqw * 1324 / 606), 4px);
  }
}

@media (max-width: 700px) {
  .case-card-cover[data-case-cover="mobile"] .case-cover-art {
    --phone-gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .case-card-cover[data-case-cover="mobile"] .case-cover-art > a {
    flex-basis: min(72%, 16rem);
    flex-basis: round(down, min(72%, 16rem), 4px);
    scroll-snap-align: start;
  }
}

@media print {
  .case-card-cover[data-case-cover="mobile"] .case-cover-art { overflow: visible; }
  .case-card-cover[data-case-cover="mobile"] .case-cover-art > a { flex-basis: calc((100% - 2 * var(--phone-gap)) / 3); }
}
