/* =========================================================================
   Team module — storefront styles.

   Tokens only, every class prefixed `team-`, mobile first. Section tones
   (dark, brand-coloured) work by redefining the same tokens, so nothing here
   names a tone except the overlay card, which sits on a photo and is light-
   on-dark whatever the page around it is.
   ========================================================================= */

/* --- page shell ---------------------------------------------------------- */
.team-page,
.team-profile-page {
    width: 100%;
    max-width: var(--w-wide);
    margin: var(--s-6) auto var(--s-9);
    padding-inline: var(--gutter);
}

.team-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-1) var(--s-2);
    margin: 0 0 var(--s-6);
    padding: 0;
    list-style: none;
    font-size: var(--t-xs);
    color: var(--c-text-muted);
}

.team-crumbs li + li::before {
    content: '/';
    margin-inline-end: var(--s-2);
    color: var(--c-text-faint);
}

.team-crumbs a {
    color: var(--c-text-muted);
    text-decoration: none;
}

.team-crumbs a:hover { color: var(--c-link); text-decoration: underline; }
.team-crumbs [aria-current] { color: var(--c-text); }

.team-page__head {
    display: grid;
    gap: var(--s-6);
    align-items: end;
    margin-block: var(--s-7) var(--s-6);
}

.team-page__title {
    font-family: var(--font-display);
    font-size: var(--t-3xl);
    font-weight: var(--fw-heading);
    line-height: var(--lh-tight);
    letter-spacing: var(--tr-tight);
    color: var(--c-text-strong);
    text-wrap: balance;
}

.team-page__lead {
    max-width: 40rem;
    margin-block-start: var(--s-4);
    font-size: var(--t-md);
    line-height: 1.55;
    color: var(--c-text-muted);
    text-wrap: pretty;
}

.team-page__count {
    margin-block-start: var(--s-3);
    font-size: var(--t-sm);
    color: var(--c-text-muted);
    font-variant-numeric: tabular-nums;
}

.team-page__icon {
    display: inline-grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    margin-block-end: var(--s-4);
    border-radius: 999px;
    font-size: 1.5rem;
    color: var(--c-accent);
    background: var(--c-accent-soft);
}

.team-page__cover {
    border-radius: var(--r-lg);
    background: var(--c-surface-sunk);
}

@media (min-width: 56rem) {
    .team-page__head--department.has-cover {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
        gap: var(--s-8);
        align-items: center;
    }
}

/* --- department chips ---------------------------------------------------- */
.team-filter { margin-block-end: var(--s-7); }

.team-filter__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.team-filter__chip {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    min-height: 2.5rem;
    padding: 0.5rem 1.1rem;
    border: 1px solid var(--c-border-strong);
    border-radius: 999px;
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--c-text-strong);
    text-decoration: none;
    transition: background-color var(--dur, 140ms) ease, border-color var(--dur, 140ms) ease, color var(--dur, 140ms) ease;
}

.team-filter__chip .cms-icon { color: var(--c-accent); }
.team-filter__chip:hover { border-color: var(--c-text); color: var(--c-text-strong); }

.team-filter__chip.is-current {
    background: var(--c-text-strong);
    border-color: var(--c-text-strong);
    color: var(--c-bg);
}

.team-filter__chip.is-current .cms-icon { color: inherit; }

.team-filter__chip:focus-visible,
.team-tag:focus-visible,
.team-anchors a:focus-visible,
.team-messenger:focus-visible,
.team-bookcard__phone:focus-visible {
    outline: 2px solid var(--c-link);
    outline-offset: 3px;
}

/* --- grid of cards ------------------------------------------------------- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
    gap: var(--s-7) var(--s-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.team-grid--row { grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); }

@media (max-width: 30rem) {
    .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-3); }
}

.team-grid__item { min-width: 0; }

/* --- card ---------------------------------------------------------------- */
.team-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    height: 100%;
}

.team-card__media { position: relative; }

.team-card__photo {
    border-radius: var(--r-lg);
    background: var(--c-surface-sunk);
}

.team-card__photo > img {
    object-position: 50% 20%;
    transition: transform 400ms var(--ease, ease);
}

.team-card:hover .team-card__photo > img { transform: scale(1.035); }

.team-card__placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 3rem;
    color: var(--c-text-faint);
}

.team-card__badge {
    position: absolute;
    top: var(--s-3);
    left: var(--s-3);
    z-index: 1;
    max-width: calc(100% - var(--s-5));
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: var(--t-xs);
    font-weight: 650;
    line-height: 1.3;
    color: var(--c-text-strong);
    background: color-mix(in srgb, var(--c-surface) 90%, transparent);
    backdrop-filter: blur(6px);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}

.team-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--s-1);
}

.team-card__name {
    font-family: var(--font-display);
    font-size: var(--t-md);
    font-weight: var(--fw-heading);
    line-height: var(--lh-snug);
    letter-spacing: var(--tr-snug);
    color: var(--c-text-strong);
}

.team-card__link {
    color: inherit;
    text-decoration: none;
}

.team-card__link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: var(--r-lg);
}

.team-card__link:hover { color: var(--c-link); }
.team-card__link:focus-visible { outline: none; }
.team-card__link:focus-visible::after { outline: 2px solid var(--c-link); outline-offset: 4px; }

.team-card__position {
    font-size: var(--t-sm);
    font-weight: 550;
    line-height: 1.4;
    color: var(--c-mark-text);
}

.team-card__meta {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    margin-block-start: var(--s-1);
    font-size: var(--t-xs);
    font-weight: 550;
    color: var(--c-text-muted);
}

.team-card__meta .cms-icon { color: var(--c-text-faint); }

.team-card__excerpt {
    display: -webkit-box;
    margin-block-start: var(--s-2);
    overflow: hidden;
    font-size: var(--t-sm);
    line-height: 1.55;
    color: var(--c-text-muted);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.team-card__actions {
    position: relative;
    z-index: 2;
    margin-block-start: auto;
    padding-block-start: var(--s-3);
}

.team-card__actions .cms-btn {
    min-height: 40px;
    padding: 0.55rem 1.1rem;
}

/* cards: a quiet frame around photo and text */
.team-card--cards {
    padding: var(--s-2);
    gap: var(--s-3);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: calc(var(--r-lg) + var(--s-2));
    transition: border-color var(--dur, 140ms) ease, box-shadow var(--dur, 140ms) ease;
}

.team-card--cards:hover { border-color: var(--c-border-strong); box-shadow: var(--shadow-md); }
.team-card--cards .team-card__link::after { border-radius: calc(var(--r-lg) + var(--s-2)); }
.team-card--cards .team-card__body { padding: 0 var(--s-3) var(--s-3); }

/* round: centred portrait */
.team-card--round { align-items: center; text-align: center; }
.team-card--round .team-card__media { width: min(11rem, 72%); }
.team-card--round .team-card__photo { border-radius: 999px; box-shadow: 0 0 0 6px var(--c-surface), var(--shadow-md); }
.team-card--round .team-card__link::after { border-radius: var(--r-md); }
.team-card--round .team-card__body { align-items: center; }
.team-card--round .team-card__badge { position: static; align-self: center; margin-block-start: var(--s-2); background: var(--c-mark-soft, var(--c-accent-soft)); color: var(--c-mark-text); box-shadow: none; backdrop-filter: none; }

/* overlay: text on the photo */
.team-card--overlay {
    gap: 0;
    overflow: hidden;
    border-radius: var(--r-lg);
    isolation: isolate;
}

.team-card--overlay .team-card__photo { border-radius: 0; }
.team-card--overlay .team-card__photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgb(10 12 18 / 0.88) 0%, rgb(10 12 18 / 0.45) 38%, rgb(10 12 18 / 0) 62%);
}

.team-card--overlay .team-card__body {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    padding: var(--s-5);
}

.team-card--overlay :is(.team-card__name, .team-card__link) { color: #fff; }
.team-card--overlay .team-card__link:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.2em; }
.team-card--overlay .team-card__position { color: rgb(255 255 255 / 0.86); }
.team-card--overlay .team-card__meta,
.team-card--overlay .team-card__meta .cms-icon,
.team-card--overlay .team-card__excerpt { color: rgb(255 255 255 / 0.72); }

.team-card--overlay .team-card__actions .cms-btn--primary {
    background: #fff;
    color: #11141b;
}

/* two cards side by side on a phone: tighter everything */
@media (max-width: 30rem) {
    .team-grid .team-card--cards { padding: 0.375rem; border-radius: calc(var(--r-lg) + 0.375rem); }
    .team-grid .team-card--cards .team-card__body { padding: 0 var(--s-2) var(--s-2); }
    .team-grid .team-card__name { font-size: var(--t-base, 1rem); }
    .team-grid .team-card__position { font-size: var(--t-xs); }
    .team-grid .team-card__badge { top: var(--s-2); left: var(--s-2); max-width: calc(100% - var(--s-4)); padding: 0.2rem 0.5rem; border-radius: var(--r-sm); font-size: 0.6875rem; }
    .team-grid .team-card__actions .cms-btn { width: 100%; min-height: 38px; padding: 0.45rem 0.5rem; font-size: var(--t-xs); }
}

/* --- the booking status dot ---------------------------------------------- */
.team-status {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--c-success, #1f6b3b);
}

.team-status__dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent);
}

.team-status--off { color: var(--c-text-muted); }

/* --- profile layout -------------------------------------------------------
   Phones: photo, name, booking card, the rest. From 60rem: a left column
   with the photo and a booking card that stays in view. */
.team-profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'photo' 'head' 'book' 'main';
    gap: var(--s-6);
}

.team-profile__aside { display: contents; }
.team-profile__photo { grid-area: photo; }
.team-profile__head { grid-area: head; min-width: 0; }
.team-bookcard { grid-area: book; }
.team-profile__main { grid-area: main; min-width: 0; }

.team-profile__photo {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--r-lg);
    background: var(--c-surface-sunk);
}

.team-profile__photo > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
}

@media (min-width: 60rem) {
    .team-profile {
        grid-template-columns: minmax(17rem, 23rem) minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        grid-template-areas: 'aside head' 'aside main';
        column-gap: clamp(2.5rem, 5vw, 5rem);
        row-gap: var(--s-7);
    }

    .team-profile__aside {
        display: flex;
        flex-direction: column;
        gap: var(--s-5);
        grid-area: aside;
    }

    .team-profile__photo { aspect-ratio: 3 / 4; }

    .team-bookcard {
        position: sticky;
        top: var(--s-5);
    }
}

/* --- profile head -------------------------------------------------------- */
.team-profile__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    margin-block-end: var(--s-3);
    padding: 0.3rem 0.8rem 0.3rem 0.6rem;
    border-radius: 999px;
    font-size: var(--t-xs);
    font-weight: 650;
    color: var(--c-mark-text);
    background: var(--c-mark-soft, var(--c-accent-soft));
}

.team-profile__name {
    font-family: var(--font-display);
    font-size: var(--t-3xl);
    font-weight: var(--fw-heading);
    line-height: var(--lh-tight);
    letter-spacing: var(--tr-tight);
    color: var(--c-text-strong);
    text-wrap: balance;
}

.team-profile__position {
    margin-block-start: var(--s-3);
    font-size: var(--t-lg);
    line-height: var(--lh-snug);
    color: var(--c-text-muted);
}

.team-profile__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin: var(--s-5) 0 0;
    padding: 0;
    list-style: none;
}

.team-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    min-height: 2.25rem;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    font-size: var(--t-sm);
    font-weight: 550;
    color: var(--c-text);
    text-decoration: none;
    background: var(--c-surface);
}

.team-tag .cms-icon { color: var(--c-accent); }
a.team-tag:hover { border-color: var(--c-border-strong); color: var(--c-link); }

.team-tag--mark {
    border-color: transparent;
    color: var(--c-text-strong);
    background: var(--c-surface-sunk);
}

.team-tag--mark .cms-icon { color: var(--c-mark); }

.team-profile__lead {
    max-width: 44rem;
    margin-block-start: var(--s-5);
    font-size: var(--t-md);
    line-height: 1.6;
    color: var(--c-text);
    text-wrap: pretty;
}

/* --- quick facts --------------------------------------------------------- */
.team-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
    gap: var(--s-4) var(--s-5);
    margin: var(--s-6) 0 0;
}

.team-facts__item {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--s-1);
    padding-block-start: var(--s-4);
    border-top: 2px solid var(--c-text-strong);
}

.team-facts__value {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--t-xl);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: var(--tr-tight);
    color: var(--c-text-strong);
    font-variant-numeric: tabular-nums;
}

.team-facts__label {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    font-size: var(--t-sm);
    color: var(--c-text-muted);
}

.team-facts__label .cms-icon { color: var(--c-mark); }

.team-facts--compact .team-facts__item { border-top-width: 1px; border-top-color: var(--c-border-strong); padding-block-start: var(--s-3); }
.team-facts--compact .team-facts__value { font-size: var(--t-lg); }

/* --- booking card -------------------------------------------------------- */
.team-bookcard {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    padding: var(--s-5);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    background: var(--c-surface);
    box-shadow: var(--shadow-sm);
}

.team-bookcard .team-book { width: 100%; }

.team-bookcard__contacts {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    padding-block-start: var(--s-4);
    border-top: 1px solid var(--c-border);
}

.team-bookcard__phone {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-family: var(--font-display);
    font-size: var(--t-lg);
    font-weight: 650;
    color: var(--c-text-strong);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

.team-bookcard__phone .cms-icon { color: var(--c-accent); font-size: 0.85em; }
.team-bookcard__phone:hover { color: var(--c-link); }

.team-bookcard__messengers {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
}

.team-messenger {
    display: inline-flex;
    flex: 1 1 8rem;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    min-height: 2.5rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--c-border-strong);
    border-radius: var(--r-btn, var(--r-sm));
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--c-text-strong);
    text-decoration: none;
    transition: border-color var(--dur, 140ms) ease, color var(--dur, 140ms) ease;
}

.team-messenger .cms-brand { width: 1.15rem; height: 1.15rem; fill: currentColor; stroke: none; }
.team-messenger--telegram .cms-brand { color: #229ed9; }
.team-messenger--whatsapp .cms-brand { color: #25d366; }
.team-messenger:hover { border-color: var(--c-text); color: var(--c-text-strong); }

.team-bookcard__row {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding-block-start: var(--s-4);
    border-top: 1px solid var(--c-border);
}

.team-bookcard__label {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    font-size: var(--t-xs);
    font-weight: 650;
    letter-spacing: 0.02em;
    color: var(--c-text-muted);
}

.team-bookcard__lines {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--t-sm);
    line-height: 1.6;
    color: var(--c-text-strong);
    font-variant-numeric: tabular-nums;
}

.team-bookcard__text { font-size: var(--t-sm); line-height: 1.5; color: var(--c-text-strong); }

/* --- in-page navigation -------------------------------------------------- */
.team-anchors {
    margin-block-end: var(--s-6);
    border-bottom: 1px solid var(--c-border);
}

.team-anchors ul {
    display: flex;
    gap: var(--s-5);
    margin: 0;
    padding: 0;
    overflow-x: auto;
    list-style: none;
    scrollbar-width: none;
}

.team-anchors ul::-webkit-scrollbar { display: none; }

.team-anchors a {
    display: block;
    padding-block: var(--s-3);
    border-bottom: 2px solid transparent;
    margin-block-end: -1px;
    font-size: var(--t-sm);
    font-weight: 600;
    white-space: nowrap;
    color: var(--c-text-muted);
    text-decoration: none;
}

.team-anchors a:hover { color: var(--c-text-strong); border-bottom-color: var(--c-text-strong); }

.team-profile-page :is(.team-sec, .team-others) { scroll-margin-top: var(--s-6); }

/* --- quote --------------------------------------------------------------- */
.team-quote {
    position: relative;
    max-width: 44rem;
    margin: 0 0 var(--s-7);
    padding: var(--s-1) 0 var(--s-1) var(--s-6);
    border-left: 3px solid var(--c-mark);
    font-family: var(--font-prose, Georgia, serif);
    font-size: var(--t-lg);
    font-style: italic;
    line-height: 1.5;
    color: var(--c-text-strong);
}

.team-quote--feature { margin-block: var(--s-5) 0; font-size: var(--t-md); }

/* --- sections ------------------------------------------------------------ */
.team-sec { margin-block-start: var(--s-8); }
.team-anchors + .team-sec,
.team-quote + .team-sec,
.team-profile__main > .team-sec:first-child { margin-block-start: 0; }

.team-sec__title {
    margin-block-end: var(--s-5);
    font-family: var(--font-display);
    font-size: var(--t-xl);
    font-weight: var(--fw-heading);
    line-height: var(--lh-snug);
    letter-spacing: var(--tr-snug);
    color: var(--c-text-strong);
}

.team-sec__sub {
    margin-block: var(--s-6) var(--s-4);
    font-family: var(--font-display);
    font-size: var(--t-md);
    font-weight: var(--fw-heading);
    color: var(--c-text-strong);
}

.team-sec__prose { max-width: var(--w-prose); }
.team-sec__line { margin-block-start: var(--s-5); font-size: var(--t-sm); color: var(--c-text-muted); }
.team-sec__line strong { color: var(--c-text-strong); font-weight: 600; }
.team-sec__note { max-width: 44rem; margin-block-start: var(--s-4); font-size: var(--t-xs); line-height: 1.5; color: var(--c-text-faint); }

.team-sec__headrow {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-3) var(--s-5);
    margin-block-end: var(--s-5);
}

.team-sec__headrow .team-sec__title { margin: 0; }

/* chips */
.team-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.team-chip {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: var(--t-sm);
    font-weight: 550;
    color: var(--c-text-strong);
    background: var(--c-accent-soft);
}

/* --- prices -------------------------------------------------------------- */
.team-prices {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--t-sm);
}

.team-prices thead :is(th, td) {
    padding: 0 var(--s-3) var(--s-3) 0;
    border-bottom: 1px solid var(--c-border-strong);
    font-size: var(--t-xs);
    font-weight: 600;
    text-align: left;
    color: var(--c-text-muted);
}

.team-prices tbody :is(th, td) {
    padding: var(--s-4) var(--s-5) var(--s-4) 0;
    border-bottom: 1px solid var(--c-border);
    vertical-align: baseline;
}

.team-prices tbody tr:hover { background: color-mix(in srgb, var(--c-surface-sunk) 60%, transparent); }

.team-prices__name {
    font-weight: 600;
    text-align: left;
    color: var(--c-text-strong);
}

.team-prices__name span { display: block; font-size: var(--t-base, 1rem); line-height: 1.4; }

.team-prices__note {
    display: block;
    margin-block-start: var(--s-1);
    font-size: var(--t-xs);
    font-weight: 400;
    line-height: 1.45;
    color: var(--c-text-muted);
}

.team-prices__time {
    width: 1%;
    white-space: nowrap;
    color: var(--c-text-muted);
}

.team-prices__time .cms-icon { margin-inline-end: 0.35em; color: var(--c-text-faint); }

.team-prices .team-prices__price {
    width: 1%;
    padding-inline-end: var(--s-4);
    font-family: var(--font-display);
    font-size: var(--t-md);
    font-weight: 700;
    white-space: nowrap;
    text-align: right;
    color: var(--c-text-strong);
    font-variant-numeric: tabular-nums;
}

.team-prices thead .team-prices__price { font-size: var(--t-xs); font-family: inherit; font-weight: 600; color: var(--c-text-muted); }
.team-prices thead .team-prices__time { padding-inline-end: var(--s-5); }
.team-prices__action { width: 1%; padding-inline-end: 0 !important; text-align: right; white-space: nowrap; }

.team-prices__book.cms-btn {
    min-height: 36px;
    padding: 0.4rem 0.9rem;
    font-size: var(--t-xs);
}

@media (max-width: 40rem) {
    .team-prices thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .team-prices,
    .team-prices tbody { display: block; }

    .team-prices tbody tr {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas: 'name name' 'time price' 'action action';
        gap: var(--s-2) var(--s-3);
        padding-block: var(--s-4);
        border-bottom: 1px solid var(--c-border);
    }

    .team-prices tbody :is(th, td) { padding: 0; border: 0; }
    .team-prices__name { grid-area: name; }
    .team-prices__time { grid-area: time; width: auto; align-self: center; }
    .team-prices .team-prices__price { grid-area: price; width: auto; padding: 0; }
    .team-prices__action { grid-area: action; width: auto; text-align: left; }
    .team-prices__action:empty { display: none; }
}

/* --- education timeline -------------------------------------------------- */
ol.team-timeline {
    position: relative;
    display: grid;
    gap: var(--s-5);
    margin: 0;
    padding: 0 0 0 var(--s-6);
    list-style: none;
}

.team-timeline::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    left: 0.3rem;
    width: 1px;
    background: var(--c-border-strong);
}

.team-timeline__item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.team-timeline__item::before {
    content: '';
    position: absolute;
    top: 0.4rem;
    left: calc(-1 * var(--s-6) + 0.3rem - 0.3rem);
    width: 0.65rem;
    height: 0.65rem;
    border: 2px solid var(--c-mark);
    border-radius: 999px;
    background: var(--c-bg);
}

.team-timeline__when {
    font-size: var(--t-sm);
    font-weight: 650;
    color: var(--c-mark-text);
    font-variant-numeric: tabular-nums;
}

.team-timeline__what {
    font-size: var(--t-md);
    font-weight: 600;
    line-height: var(--lh-snug);
    color: var(--c-text-strong);
}

.team-timeline__detail { font-size: var(--t-sm); color: var(--c-text-muted); }

.team-timeline--compact { gap: var(--s-4); }
.team-timeline--compact .team-timeline__what { font-size: var(--t-base, 1rem); }

.team-awards {
    display: grid;
    gap: var(--s-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

.team-awards__item {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    font-weight: 550;
    color: var(--c-text-strong);
}

.team-awards__item > .cms-icon { margin-block-start: 0.2em; color: var(--c-mark); }
.team-awards__year { color: var(--c-mark-text); font-variant-numeric: tabular-nums; }

/* --- certificates -------------------------------------------------------- */
.team-docs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr));
    gap: var(--s-5) var(--s-4);
    margin: 0;
    padding: 0;
    list-style: none;
}

.team-docs__link {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    padding: var(--s-3);
    overflow: hidden;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    background: var(--c-surface-sunk);
}

.team-docs__img,
.team-docs__img > img {
    display: block;
    width: 100%;
    height: 100%;
}

.team-docs__img > img {
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.14);
}

.team-docs__zoom {
    position: absolute;
    right: var(--s-2);
    bottom: var(--s-2);
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    color: var(--c-text-strong);
    background: color-mix(in srgb, var(--c-surface) 92%, transparent);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.15);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity var(--dur, 140ms) ease, transform var(--dur, 140ms) ease;
}

:is(.team-docs__link, .team-works__link):is(:hover, :focus-visible) .team-docs__zoom { opacity: 1; transform: none; }
:is(.team-docs__link, .team-works__link):focus-visible { outline: 2px solid var(--c-link); outline-offset: 3px; }
.team-docs__link:hover { border-color: var(--c-border-strong); }

.team-docs__caption {
    margin-block-start: var(--s-2);
    font-size: var(--t-sm);
    font-weight: 550;
    line-height: 1.4;
    color: var(--c-text-strong);
}

.team-docs__caption span { font-weight: 400; color: var(--c-text-muted); }

@media (hover: none) {
    .team-docs__zoom { opacity: 1; transform: none; }
}

/* --- works --------------------------------------------------------------- */
.team-works {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
    gap: var(--s-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 30rem) {
    .team-works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.team-works__link {
    display: block;
    border-radius: var(--r-md);
    background: var(--c-surface-sunk);
}

.team-works__link > img { transition: transform 400ms var(--ease, ease); }
.team-works__link:hover > img { transform: scale(1.04); }

.team-ba-set {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: var(--s-6) var(--s-5);
}

.team-works + .team-sec__sub { margin-block-start: var(--s-7); }

/* --- reviews ------------------------------------------------------------- */
.team-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2) var(--s-3);
}

.team-rating__value {
    font-family: var(--font-display);
    font-size: var(--t-xl);
    font-weight: 700;
    line-height: 1;
    color: var(--c-text-strong);
    font-variant-numeric: tabular-nums;
}

.team-rating__count { font-size: var(--t-sm); color: var(--c-text-muted); }

.team-stars {
    display: inline-flex;
    gap: 0.1rem;
    font-size: 1.15rem;
    color: var(--c-border-strong);
}

.team-stars--sm { font-size: 0.95rem; }
.team-stars__star { display: inline-flex; }
.team-stars__star.is-on { color: var(--c-mark); }
.team-stars__star.is-on .cms-icon { fill: currentColor; }

.team-reviews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
    gap: var(--s-4);
    margin: 0;
    padding: 0;
    list-style: none;
}

.team-review__inner {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    height: 100%;
    margin: 0;
    padding: var(--s-5);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    background: var(--c-surface);
}

.team-review__text {
    margin: 0;
    font-size: var(--t-sm);
    line-height: 1.65;
    color: var(--c-text);
}

.team-review__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--s-1) var(--s-3);
    margin-block-start: auto;
    padding-block-start: var(--s-2);
    font-size: var(--t-xs);
    color: var(--c-text-muted);
    font-variant-numeric: tabular-nums;
}

.team-review__author { font-size: var(--t-sm); font-weight: 650; color: var(--c-text-strong); }
.team-review__source::before { content: '· '; }

/* --- closing call to action (phones: the sticky card is far above) ------- */
.team-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    margin-block-start: var(--s-8);
    padding: var(--s-5);
    border-radius: var(--r-lg);
    background: var(--c-surface-sunk);
}

.team-cta__text { font-size: var(--t-sm); color: var(--c-text-muted); }
.team-cta__text strong { color: var(--c-text-strong); }
.team-cta .cms-btn { flex: 1 1 12rem; }

@media (min-width: 60rem) {
    .team-cta { display: none; }
}

/* --- other specialists --------------------------------------------------- */
.team-others {
    margin-block-start: var(--s-9);
    padding-block-start: var(--s-7);
    border-top: 1px solid var(--c-border);
}

.team-others__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-2) var(--s-5);
    margin-block-end: var(--s-5);
}

.team-others__head .team-sec__title { margin: 0; }

/* --- "not sure who to see" ----------------------------------------------- */
.team-help {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-5);
    margin-block-start: var(--s-9);
    padding: clamp(1.5rem, 4vw, 3rem);
    border-radius: var(--r-lg);
    background: var(--c-surface-sunk);
}

.team-help__text { max-width: 36rem; }

.team-help__title {
    margin-block-end: var(--s-2);
    font-family: var(--font-display);
    font-size: var(--t-lg);
    font-weight: var(--fw-heading);
    color: var(--c-text-strong);
}

.team-help__text p { color: var(--c-text-muted); }

/* --- team_grid block ----------------------------------------------------- */
.team-block__more {
    display: flex;
    justify-content: center;
    margin-block-start: var(--s-7);
}

.team-block .cms-items--slider .team-card { height: 100%; }

/* --- team_member_card block ---------------------------------------------- */
.team-feature {
    display: grid;
    gap: var(--s-6);
    align-items: center;
}

.team-feature__media { position: relative; max-width: 30rem; }

.team-feature__photo {
    border-radius: var(--r-lg);
    background: var(--c-surface-sunk);
}

.team-feature__photo > img { object-position: 50% 20%; }

.team-feature__stamp {
    position: absolute;
    right: calc(-1 * var(--s-3));
    bottom: var(--s-6);
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    border-radius: var(--r-md);
    color: var(--c-accent-contrast);
    background: var(--c-accent);
    box-shadow: var(--shadow-lg);
}

.team-feature__stamp strong {
    font-family: var(--font-display);
    font-size: var(--t-2xl);
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.team-feature__stamp span { max-width: 6rem; font-size: var(--t-xs); font-weight: 600; line-height: 1.25; }

.team-feature__name {
    font-family: var(--font-display);
    font-size: var(--t-2xl);
    font-weight: var(--fw-heading);
    line-height: var(--lh-tight);
    letter-spacing: var(--tr-tight);
    color: var(--c-text-strong);
}

.team-feature__name a { color: inherit; text-decoration: none; }
.team-feature__name a:hover { color: var(--c-link); }

.team-feature__position {
    margin-block-start: var(--s-2);
    font-size: var(--t-md);
    color: var(--c-mark-text);
}

.team-feature__text {
    max-width: 38rem;
    margin-block-start: var(--s-5);
    font-size: var(--t-md);
    line-height: 1.6;
    color: var(--c-text-muted);
}

.team-feature .team-facts { margin-block-start: var(--s-6); }

.team-feature__services {
    display: grid;
    gap: var(--s-2);
    max-width: 34rem;
    margin: var(--s-6) 0 0;
    padding: 0;
    list-style: none;
    font-size: var(--t-sm);
}

.team-feature__services li { display: flex; align-items: baseline; gap: var(--s-2); color: var(--c-text); }
.team-feature__services strong { white-space: nowrap; color: var(--c-text-strong); font-variant-numeric: tabular-nums; }
.team-feature__dots { flex: 1; min-width: 1.5rem; border-bottom: 1px dotted var(--c-border-strong); transform: translateY(-0.25em); }

.team-feature__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-3) var(--s-5);
    margin-block-start: var(--s-6);
}

@media (min-width: 48rem) {
    .team-feature { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 6vw, 5.5rem); }
    .team-feature--right { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
    .team-feature--right .team-feature__media { order: 2; justify-self: end; width: 100%; }
    .team-feature--right .team-feature__stamp { right: auto; left: calc(-1 * var(--s-3)); }
}

@media (max-width: 47.99rem) {
    .team-feature__stamp { right: var(--s-3); }
}

/* --- reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .team-card__photo > img,
    .team-works__link > img,
    .team-docs__zoom { transition: none; }
    .team-card:hover .team-card__photo > img,
    .team-works__link:hover > img { transform: none; }
}
