.index-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1rem;
}

.index-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-background-secondary);
  color: var(--color-foreground);
  text-align: left;
  overflow-wrap: anywhere;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.index-card__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.index-card__subtitle {
  margin: 0 0 0.75rem;
  color: var(--color-foreground-secondary);
  font-size: 0.8rem;
  line-height: 1.4;
}

.index-card__detail {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  min-height: 1.4em;
  margin: 0 0 1rem;
  color: var(--color-foreground-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
}

.index-card__icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.index-card__meta {
  margin: auto 0 0;
  color: var(--color-foreground-secondary);
  font-size: 0.75rem;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .index-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

.index-card[href]:is(:hover, :focus-visible) {
  transform: translateY(-2px);
  border-color: var(--color-primary-light);
  box-shadow: 0 3px 8px color-mix(in srgb, var(--color-foreground) 12%, transparent);
}

.index-card[href]:focus-visible {
  outline: 2px solid var(--color-foreground);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .index-card {
    transition: none;
  }

  .index-card[href]:is(:hover, :focus-visible) {
    transform: none;
  }
}

.index-card--media {
  flex-direction: row;
  gap: 1rem;
}

.index-card__figure {
  flex: 0 0 5rem;
  align-self: flex-start;
  width: 5rem;
  margin: 0.4rem 0 0;
}

.index-card__caption {
  margin-top: 0.25rem;
  color: var(--color-foreground-secondary);
  font-size: 0.65rem;
  line-height: 1.3;
  text-align: center;
}

.index-card__media {
  width: 100%;
  height: 5rem;
  overflow: hidden;
  border-radius: 10px;
  background: var(--color-background-tertiary);
}

.index-card__media > * {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.index-card__media svg {
  max-width: 70%;
  max-height: 70%;
}

.index-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

@media (max-width: 480px) {
  .index-card--media {
    gap: 0.75rem;
  }

  .index-card__figure {
    flex-basis: 4rem;
    width: 4rem;
  }

  .index-card__media {
    height: 4rem;
  }
}
