.team-group {
    margin-top: 3rem;
}

.team-group h3 {
    margin: 0 0 1.35rem;
    font-size: 1.4rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1.8rem 1rem;
}

.team-grid article {
    display: grid;
    justify-items: center;
    align-content: start;
    min-width: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: center;
}

.team-portrait {
    position: relative;
    display: block;
    width: 156px;
    max-width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border: 5px solid #fff;
    border-radius: 50%;
    background: #071426;
    box-shadow: 0 12px 30px rgba(7, 20, 38, .18), 0 0 0 1px rgba(7, 20, 38, .12);
}

.team-portrait::after {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(7, 20, 38, .3);
    mix-blend-mode: multiply;
    content: "";
    pointer-events: none;
    transition: opacity .25s ease;
}

.team-grid .team-portrait img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center top;
    filter: saturate(.82) contrast(1.04);
    transition: filter .25s ease, transform .25s ease;
}

.team-grid article:hover .team-portrait::after,
.team-grid article:focus-within .team-portrait::after {
    opacity: .12;
}

.team-grid article:hover .team-portrait img,
.team-grid article:focus-within .team-portrait img {
    filter: saturate(1) contrast(1.02);
    transform: scale(1.025);
}

.team-grid article > div {
    display: grid;
    justify-items: center;
    gap: .25rem;
    padding: .85rem .4rem 0;
}

.team-grid article > div > span {
    color: #617080;
    font-size: .88rem;
    line-height: 1.45;
}

.team-group-administration .team-grid {
    grid-template-columns: minmax(0, 1fr);
}

.team-group-administration .team-portrait {
    width: 312px;
    border-width: 7px;
    box-shadow: 0 20px 46px rgba(7, 20, 38, .2), 0 0 0 1px rgba(7, 20, 38, .14);
}

.team-group-administration .team-grid article > div > strong {
    font-size: 1.12rem;
}

.team-grid a {
    margin-top: .3rem;
    color: #0d7183;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
}

.team-history {
    margin-top: clamp(4rem, 8vw, 7rem);
    padding-top: clamp(2.5rem, 5vw, 4.5rem);
    border-top: 1px solid #d9e2e8;
}

.team-history > summary {
    position: relative;
    cursor: pointer;
    list-style: none;
}

.team-history > summary::-webkit-details-marker {
    display: none;
}

.team-history > summary:focus-visible {
    border-radius: 12px;
    outline: 3px solid rgba(13, 113, 131, .28);
    outline-offset: 8px;
}

.team-history-heading {
    display: grid;
    grid-template-columns: minmax(0, .7fr) minmax(320px, 1.3fr);
    gap: clamp(1.5rem, 6vw, 5rem);
    align-items: end;
    margin-bottom: 0;
    padding-right: 3.25rem;
}

.team-history-heading h3 {
    margin: .35rem 0 0;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
}

.team-history-heading > p {
    margin: 0;
    color: #596878;
    line-height: 1.7;
}

.team-history-count {
    display: inline-flex;
    margin-top: .85rem;
    padding: .35rem .6rem;
    border-radius: 999px;
    color: #315069;
    background: #eaf0f4;
    font-size: .72rem;
    font-weight: 800;
}

.team-history-toggle {
    position: absolute;
    top: 50%;
    right: .2rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #071426;
    transform: translateY(-50%);
}

.team-history-toggle::before,
.team-history-toggle::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: .9rem;
    height: 2px;
    background: #fff;
    content: "";
    transform: translate(-50%, -50%);
    transition: transform .2s ease;
}

.team-history-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.team-history[open] .team-history-toggle::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.team-history-content {
    padding-top: 2.4rem;
}

.team-history-grid {
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 1.6rem .75rem;
}

.team-history-grid .team-portrait {
    width: 112px;
    border-width: 4px;
    box-shadow: 0 9px 22px rgba(7, 20, 38, .14), 0 0 0 1px rgba(7, 20, 38, .1);
}

.team-history-grid article > div {
    padding-top: .7rem;
}

.team-history-grid article > div > strong {
    font-size: .9rem;
}

.team-history-grid article > div > span {
    font-size: .75rem;
}

.team-history-grid a {
    font-size: .72rem;
}

@media (max-width: 960px) {
    .team-history-heading {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.6rem .65rem;
    }

    .team-portrait {
        width: min(142px, 100%);
    }

    .team-group-administration .team-portrait {
        width: min(240px, 82vw);
    }

    .team-history-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .team-history-grid .team-portrait {
        width: min(96px, 100%);
    }
}

@media (max-width: 430px) {
    .team-history-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .team-portrait::after,
    .team-portrait img {
        transition: none;
    }
}
