/**
 * Single agency profile layout.
 *
 * The agency components themselves (logo, score split, criterion bars,
 * pros/cons, fact grids) live in style.css and are shared with the ranking.
 * Only this page's arrangement of them is here.
 */

.profileHeader {
    display: grid;
    gap: var(--space6);
    margin-top: var(--space6);
    align-items: start;
}

@media (min-width: 62rem) {
    .profileHeader {
        grid-template-columns: minmax(0, 1fr) 20rem;
    }
}

.profileIdentity {
    display: flex;
    align-items: flex-start;
    gap: var(--space5);
}

.profileIdentity .agencyLogo {
    inline-size: 5.5rem;
    block-size: 5.5rem;
}

.profileIdentity .agencyMeta {
    margin-top: var(--space3);
}

/* Pills never wrap — that is what makes them read as chips — so on the
   narrowest phones the logo plus a long one ("Nummer 2 in onze vergelijking")
   is wider than the viewport. Stacking the logo above the name gives the pill
   the full column and reads better on a phone regardless. */
@media (max-width: 30rem) {
    .profileIdentity {
        flex-direction: column;
        gap: var(--space4);
    }
}

.profileVerdict {
    display: flex;
    flex-direction: column;
    gap: var(--space3);
    padding: var(--space5);
    border: 1px solid var(--colorBorder);
    border-radius: var(--radiusLg);
    background-color: var(--colorSurfaceRaised);
}

.profileVerdict .scoreMeterValue {
    font-size: var(--text2xl);
}

.profileGrid {
    display: grid;
    gap: var(--space7);
    align-items: start;
}

/* Grid items default to min-width:auto, so the widest thing inside the column
   — here the review-source table — stretches the whole track and pushes the
   page sideways on a phone. Zeroing the minimum lets the track shrink and hands
   the overflow back to .tableScroll, which is built to scroll on its own. */
.profileMain,
.profileSidebar {
    min-inline-size: 0;
}

@media (min-width: 62rem) {
    .profileGrid {
        grid-template-columns: minmax(0, 1fr) 20rem;
    }

    /* The summary card follows the reader down the long left column. */
    .profileSidebar {
        position: sticky;
        top: 7rem;
    }
}

.profileBlock {
    margin-top: var(--space8);
    padding-top: var(--space6);
    border-top: 1px solid var(--colorBorder);
}

.profileFacts {
    display: flex;
    flex-direction: column;
    gap: var(--space4);
}

.profileFacts dt {
    font-size: var(--textXs);
    font-weight: var(--weightSemibold);
    letter-spacing: var(--trackingWide);
    text-transform: uppercase;
    color: var(--colorInkSubtle);
}

.profileFacts dd {
    margin: var(--space1) 0 0;
    font-size: var(--textSm);
    text-wrap: pretty;
}

.relatedAgency {
    text-decoration: none;
    color: inherit;
}

.relatedScore {
    font-size: var(--textLg);
    font-weight: var(--weightSemibold);
}
