.tpf-brand-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) auto;
    align-items: end;
    gap: 16px;
    padding: 20px;
    background: #f8f4f8;
}

.tpf-brand-filters label {
    display: grid;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}
.tpf-brand-filters input,
.tpf-brand-filters select,
.tpf-brand-filters button {
    box-sizing: border-box;
    min-width: 0;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #d8cbd9;
    border-radius: 0;
    background: #fff;
    color: var(--tpf-ink);
    font: inherit;
    font-size: 16px;
    font-weight: 400;
}
.tpf-brand-filters button {
    padding-inline: 20px;
    border-color: var(--tpf-purple);
    background: var(--tpf-purple);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}
.tpf-brand-filters button:hover { background: #592c58; }

.tpf-brand-results {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px 18px;
    flex-wrap: wrap;
    padding: 0 0 12px;
    font-size: 14px;
    color: var(--tpf-muted);
}
.tpf-brand-results p { margin: 0; }
.tpf-brand-results a { color: var(--tpf-purple); text-underline-offset: 3px; }

.tpf-brand-alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tpf-line);
}
.tpf-brand-alphabet a {
    display: grid;
    place-items: center;
    min-width: 34px;
    min-height: 34px;
    background: #f8f4f8;
    color: var(--tpf-purple);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.tpf-brand-alphabet a:hover { background: #eee4ef; }

.tpf-brand-group { margin-top: 26px; scroll-margin-top: 24px; }
.tpf-brand-group h3 { margin: 0 0 12px; font-family: inherit; font-size: 24px; color: var(--tpf-purple); }
.tpf-brand-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tpf-brand-cards li { display: flex; min-width: 0; }
.tpf-brand-directory a.tpf-brand-card {
    --logo-column: 116px;
    --logo-height-limit: 76px;
    display: grid;
    grid-template-columns: var(--logo-column) minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-height: 96px;
    padding: 14px 16px;
    border: 1px solid var(--tpf-line);
    color: var(--tpf-ink);
    text-decoration: none;
}
.tpf-brand-directory a.tpf-brand-card:hover {
    border-color: #bda4bf;
    background: #f8f4f8;
    text-decoration: none;
}
.tpf-brand-card-label { display: grid; gap: 2px; overflow-wrap: anywhere; }
.tpf-brand-card-label strong { font-size: 15px; line-height: 1.25; }
.tpf-brand-card-label span { font-size: 12px; color: var(--tpf-muted); }
.tpf-brand-origins { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.tpf-brand-origin { display: inline-flex; align-items: baseline; gap: 5px; }
.tpf-brand-origin-icon { flex-shrink: 0; }
.tpf-brand-arrow { color: var(--tpf-purple); }
.tpf-brand-directory :focus-visible { outline: 2px solid var(--tpf-purple); outline-offset: 3px; }

@media (max-width: 880px) {
    .tpf-brand-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tpf-brand-directory a.tpf-brand-card { --logo-column: 96px; --logo-height-limit: 66px; }
}
@media (max-width: 600px) {
    .tpf-brand-filters, .tpf-brand-cards { grid-template-columns: minmax(0, 1fr); }
    .tpf-brand-filters { gap: 12px; padding: 16px; }
}
@media (max-width: 380px) {
    .tpf-brand-directory a.tpf-brand-card { gap: 12px; padding-inline: 12px; }
}

.tpf-brand-filter-heading {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 20px;
}

.tpf-brand-filter-heading h2 {
    margin: 0;
    font-family: inherit;
    font-size: clamp(22px, 3vw, 27px);
    font-weight: 600;
    letter-spacing: -.025em;
}

.tpf-brand-filter-heading a {
    color: var(--tpf-purple);
    font-size: 14px;
    font-weight: 600;
    text-underline-offset: 4px;
}

.tpf-brand-list { margin-top: 36px; }
