/* Staff / governance listing (SiteController::renderModule('recommendations')).
   Scoped .stf-* rules; the .person class and data-id stay on the card because
   function.js binds the bio-popup to them. Rules are written as
   `.stf-grid .person` where they need to beat the legacy .person styles. */

:root { --stf-brand: #E32D44; --stf-ink: #2c2c38; --stf-muted: #5A5A67; }

.stf-wrap {
    position: relative;
    z-index: 2;
    /* no negative pull-up here: the first element is a bare group heading, not
       a white card, so overlapping the red cover would put dark text on red */
    margin-top: 38px;
    padding-bottom: 90px;
}

.stf-group { margin-bottom: 40px; }
.stf-group:last-child { margin-bottom: 0; }
.stf-group__title {
    margin: 0 0 20px;
    padding-left: 14px;
    border-left: 4px solid var(--stf-brand);
    font-size: 21px;
    line-height: 1.3;
    color: var(--stf-ink);
}

.stf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}

.stf-grid .person.stf-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #ebebf0;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(30, 22, 40, .05);
    cursor: pointer;
    transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
}
.stf-grid .person.stf-card:hover,
.stf-grid .person.stf-card:focus-visible {
    /* legacy filled the whole card brand-red on hover — too heavy at this size */
    background: #fff;
    transform: translateY(-3px);
    border-color: rgba(227, 45, 68, .32);
    box-shadow: 0 14px 30px rgba(30, 22, 40, .12);
}
.stf-grid .person.stf-card:focus-visible {
    outline: 2px solid var(--stf-brand);
    outline-offset: 3px;
}

.stf-card__cover {
    flex: 0 0 auto;
    width: 84px;
    height: 84px;
    margin: 0;
    border-radius: 50%;
    overflow: hidden;
    background: #f3f3f7;
}
.stf-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.stf-card__body { min-width: 0; }

.stf-grid .person.stf-card .stf-card__name {
    margin: 0 0 5px;
    font-size: 15.5px;
    line-height: 1.35;
    color: var(--stf-ink);
    transition: color .2s ease;
}
.stf-grid .person.stf-card:hover .stf-card__name { color: var(--stf-brand); }

.stf-grid .person.stf-card .stf-card__desc {
    display: block;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--stf-muted);
}

@media (max-width: 767px) {
    .stf-wrap { margin-top: 26px; padding-bottom: 56px; }
    .stf-grid { grid-template-columns: 1fr; gap: 12px; }
    .stf-grid .person.stf-card { padding: 15px 16px; gap: 14px; border-radius: 12px; }
    .stf-card__cover { width: 68px; height: 68px; }
    .stf-group__title { font-size: 18px; }
}

/* ---------- directory filter ---------- */
/* Sits above the first group heading, in the same white-card idiom as the rest
   of the site so it reads as part of the page, not a browser widget. */
.stf-search {
    background: #fff;
    border: 1px solid #ebebf0;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(30, 22, 40, .05);
    padding: 20px 22px;
    margin-bottom: 34px;
}

.stf-search__label {
    display: block;
    font-size: 14px;
    color: var(--stf-muted);
    margin-bottom: 9px;
}

.stf-search__box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e2e2ea;
    border-radius: 10px;
    padding: 0 12px;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.stf-search__box:focus-within {
    border-color: var(--stf-brand);
    box-shadow: 0 0 0 3px rgba(227, 45, 68, .12);
}

.stf-search__icon { flex: none; color: var(--stf-muted); }

.stf-search__input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: none;
    padding: 12px 0;
    font-size: 15px;
    color: var(--stf-ink);
    background: transparent;
}
/* the built-in clear control duplicates our own button */
.stf-search__input::-webkit-search-cancel-button { display: none; }

.stf-search__clear {
    flex: none;
    border: 0;
    background: transparent;
    color: var(--stf-muted);
    font-size: 22px;
    line-height: 1;
    padding: 4px 6px;
    cursor: pointer;
    border-radius: 6px;
}
.stf-search__clear:hover { color: var(--stf-brand); }
.stf-search__clear:focus-visible { outline: 2px solid var(--stf-brand); outline-offset: 2px; }

.stf-search__count {
    margin: 10px 0 0;
    min-height: 21px;   /* reserve the line so results do not jump as you type */
    font-size: 14px;
    color: var(--stf-muted);
}
.stf-search__count.is-empty { color: var(--stf-brand); }

@media (max-width: 640px) {
    .stf-search { padding: 16px; }
}

/* `.stf-grid .person.stf-card { display:flex }` outranks the UA's
   `[hidden] { display:none }`, so filtered-out cards would stay on screen.
   These two rules are what actually make the filter visible. */
.stf-grid .person.stf-card[hidden] { display: none !important; }
.stf-group[hidden] { display: none !important; }
