/* Natural flex rows align buttons without fixed heights or truncated content. */
.vcex-staff-grid {
    align-items: stretch;
}

.vcex-staff-grid > .staff-entry {
    display: flex;
    flex-direction: column;
}

.vcex-staff-grid .staff-entry-inner,
.vcex-staff-grid .staff-entry-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.vcex-staff-grid .staff-entry-readmore-wrap {
    margin-top: auto !important;
    padding-top: 16px;
}

/* Keep the starts of names and roles aligned when one visible name wraps. */
.vcex-staff-grid .staff-entry-media {
    min-height: var(--svl-staff-media-height, 0px);
}

.vcex-staff-grid .staff-entry-title {
    min-height: var(--svl-staff-title-height, 0px);
}

/* Isotope positions cards absolutely, so flex alone cannot equalize their heights. */
.vcex-staff-grid.vcex-isotope-grid .staff-entry-inner {
    min-height: var(--svl-staff-card-height, 0px);
}

/* Opt in only after JS can measure the card. Without JS, normal wrapping remains. */
.vcex-staff-grid .staff-entry-excerpt.svl-staff-fit {
    font-size: var(--svl-staff-font-size, 1em) !important;
    white-space: pre !important;
    text-wrap: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}

/* Keep paragraphs/links/emphasis, but fit them using the same size per card. */
.vcex-staff-grid .staff-entry-excerpt.svl-staff-fit * {
    font-size: inherit !important;
    white-space: inherit !important;
    text-wrap: inherit !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}
