/* Portrait cards inside the existing institutional directory. */
.vm-cluster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vm-cluster-card--summary:has(.profile-card) { padding: 0; border: 0; border-radius: 0; background: transparent; }
.vm-cluster-grid .vm-cluster-card__members { width: 100%; }
.vm-cluster-grid .profile-card__body { text-align: center; }
.vm-cluster-grid .profile-card__media {
    width: min(var(--vm-cluster-photo-width, 120px), calc(100% - 2 * var(--profile-card-media-inset)));
    aspect-ratio: 4 / 5;
    margin: var(--vm-space-md) auto 0;
}
.vm-cluster-grid .profile-card .profile-card__media:has(> .is-visible) {
    aspect-ratio: auto;
    min-height: 0;
}
.vm-cluster-grid .profile-card .profile-card__fallback.is-visible {
    position: relative;
    inset: auto;
    height: auto;
    min-height: calc(var(--vm-cluster-photo-width, 120px) * 1.25);
    padding: var(--vm-space-xs);
    gap: var(--vm-space-xs);
}
.vm-cluster-grid .profile-card .profile-card__initials { font-size: 1.75rem; line-height: 1.2; }
.vm-cluster-grid .profile-card__fallback > :last-child { font-size: .75rem; line-height: 1.4; }
@media (max-width: 64rem) {
    .vm-cluster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 48rem; margin-inline: auto; }
}
@media (max-width: 40rem) {
    .vm-cluster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; gap: var(--vm-space-sm); }
    .vm-cluster-grid .profile-card__media { margin-top: var(--vm-space-sm); }
    .vm-cluster-grid .profile-card__body { padding: var(--vm-space-sm) var(--vm-space-sm) var(--vm-space-md); }
    .vm-cluster-grid .profile-card .profile-card__name { font-size: var(--vm-text-md); }
}
@media (max-width: 30rem) {
    .vm-cluster-grid .profile-card .profile-card__name { min-block-size: 2.8em; }
}
