.cms-cast {
    box-sizing: border-box;
    width: min(100% - 32px, 1200px);
    margin: 24px auto;
    color: inherit;
}

.cms-cast > h2 {
    margin: 0 0 12px;
    font-size: 1.25rem;
}

.cms-cast .cms-cast-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, max(240px, 30%)), 1fr));
    align-items: stretch;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cms-cast .cms-cast-card {
    display: grid;
    grid-template-columns: clamp(76px, 8.5vw, 92px) minmax(0, 1fr);
    align-content: start;
    gap: 12px;
    min-width: 0;
    padding: 12px;
    border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, currentColor 5%, transparent);
    overflow-wrap: anywhere;
}

.cms-cast .cms-cast-portrait {
    display: grid;
    place-items: center;
    position: relative;
    align-self: start;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 6px;
    background: color-mix(in srgb, currentColor 11%, transparent);
}

.cms-cast .cms-cast-portrait img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cms-cast .cms-cast-portrait img.cms-cast-commons-photo { object-fit: contain; }

.cms-cast .cms-cast-photo-credit {
    margin: 7px 0 0;
    font-size: .75rem;
    line-height: 1.4;
}

.cms-cast .cms-cast-photo-credit p { margin: 5px 0 0; }

.cms-cast .cms-cast-initial {
    display: none;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1;
}

.cms-cast .cms-cast-copy { min-width: 0; }

.cms-cast .cms-cast-copy h3 {
    margin: 0 0 4px;
    font-size: 1rem;
    line-height: 1.35;
}

.cms-cast .cms-cast-role,
.cms-cast .cms-cast-bio {
    margin: 4px 0 0;
    font-size: .875rem;
    line-height: 1.45;
}

.cms-cast :is(.cms-cast-bio, .cms-cast-photo-credit) summary { cursor: pointer; }

.cms-cast .cms-cast-bio p {
    margin: 6px 0 0;
    white-space: pre-line;
}

.cms-cast .cms-cast-source {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 8px 0 0;
    font-size: .75rem;
}

.cms-cast .cms-cast-source small { font-size: inherit; }
.cms-cast .cms-cast-source .cms-cast-logo { width: 54px; height: auto; vertical-align: middle; }

@media (max-width: 540px) {
    .cms-cast .cms-cast-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .cms-cast .cms-cast-card {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 9px;
        padding: 10px;
    }

    .cms-cast .cms-cast-portrait { aspect-ratio: 3 / 4; }
}

.cms-cast .cms-cast-card--text {
    grid-template-columns: 34px minmax(0, 1fr);
    align-self: start;
    gap: 9px;
    padding: 10px;
}

.cms-cast .cms-cast-card--text .cms-cast-portrait {
    aspect-ratio: 1;
    border-radius: 50%;
}

.cms-cast .cms-cast-card--text .cms-cast-initial { display: block; }
.cms-cast .cms-cast-card--text .cms-cast-photo-credit { display: none; }

@media (max-width: 360px) {
    .cms-cast .cms-cast-list:has(> .cms-cast-card--text) { grid-template-columns: minmax(0, 1fr); }
}
