.adherent-explanation{
    display:grid;
    grid-template-columns:1fr auto 1fr auto 1fr;
    gap:14px;
    align-items:center;
    margin-bottom:20px;
}

.adherent-role{
    min-height:120px;
    display:flex;
    gap:13px;
    align-items:flex-start;
    padding:17px;
    border:1px solid var(--border);
    border-radius:17px;
    background:#fff;
    box-shadow:var(--shadow);
}

.adherent-role.primary-role{
    border-color:#bfd0fb;
    background:linear-gradient(135deg,#fff,#f4f7ff);
}

.role-icon{
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
    flex:0 0 auto;
    border-radius:14px;
    background:var(--blue-soft);
    font-size:22px;
}

.adherent-role span{
    font-size:9px;
    color:var(--blue);
    font-weight:900;
}

.adherent-role strong,
.adherent-role p{
    display:block;
}

.adherent-role strong{
    margin-top:3px;
    font-size:13px;
}

.adherent-role p{
    margin:5px 0 0;
    color:var(--muted);
    font-size:9px;
    line-height:1.5;
}

.role-arrow{
    color:var(--blue);
    font-size:22px;
    font-weight:900;
}

.automatic-member-card{
    display:flex;
    align-items:flex-start;
    gap:12px;
    padding:15px;
    margin-bottom:16px;
    border:1px solid #bfe8cf;
    border-radius:14px;
    background:var(--green-soft);
}

.automatic-member-icon{
    width:36px;
    height:36px;
    display:grid;
    place-items:center;
    flex:0 0 auto;
    border-radius:11px;
    background:var(--green);
    color:#fff;
    font-weight:900;
}

.automatic-member-card strong,
.automatic-member-card p{
    display:block;
}

.automatic-member-card p{
    margin:4px 0 0;
    color:#4e6d5c;
    font-size:10px;
    line-height:1.5;
}

.entity-legend{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:13px;
    margin-bottom:18px;
}

.entity-legend article{
    display:flex;
    align-items:center;
    gap:11px;
    padding:13px;
    border:1px solid var(--border);
    border-radius:14px;
    background:#fff;
}

.legend-icon{
    width:38px;
    height:38px;
    display:grid;
    place-items:center;
    border-radius:12px;
    font-weight:900;
}

.legend-icon.adherent{
    color:var(--blue);
    background:var(--blue-soft);
}

.legend-icon.family{
    color:var(--pink);
    background:var(--pink-soft);
}

.legend-icon.member{
    color:var(--green);
    background:var(--green-soft);
}

.entity-legend strong,
.entity-legend small{
    display:block;
}

.entity-legend strong{
    font-size:10px;
}

.entity-legend small{
    margin-top:3px;
    color:var(--muted);
    font-size:8px;
}

.adherent-avatar{
    background:linear-gradient(
        135deg,
        var(--blue-soft),
        var(--purple-soft)
    ) !important;
    color:var(--blue) !important;
}

.adherent-profile{
    border-left:5px solid var(--blue);
}

.family-structure{
    display:grid;
    gap:13px;
}

.family-owner-card{
    display:flex;
    align-items:center;
    gap:13px;
    padding:18px;
    border:1px solid #bfd0fb;
    border-radius:17px;
    background:linear-gradient(135deg,#fff,#f4f7ff);
    box-shadow:var(--shadow);
}

.family-owner-icon{
    width:48px;
    height:48px;
    display:grid;
    place-items:center;
    border-radius:15px;
    background:var(--blue);
    color:#fff;
    font-size:18px;
    font-weight:900;
}

.family-owner-card span,
.family-owner-card strong,
.family-owner-card small{
    display:block;
}

.family-owner-card span{
    color:var(--blue);
    font-size:8px;
    text-transform:uppercase;
    letter-spacing:.1em;
    font-weight:900;
}

.family-owner-card strong{
    margin:4px 0;
    font-size:15px;
}

.family-owner-card small{
    color:var(--muted);
}

.family-connector{
    text-align:center;
    color:var(--blue);
    font-size:24px;
    font-weight:900;
}

.family-members-card{
    padding:20px;
    border:1px solid var(--border);
    border-radius:18px;
    background:#fff;
    box-shadow:var(--shadow);
}

.family-members-card>header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:15px;
}

.family-members-card header span,
.family-members-card header strong{
    display:block;
}

.family-members-card header span{
    color:var(--muted);
    font-size:9px;
    text-transform:uppercase;
}

.family-members-card header strong{
    margin-top:4px;
}

.family-members-card header a{
    color:var(--blue);
    font-size:10px;
    font-weight:800;
    text-decoration:none;
}

.family-member-list{
    display:grid;
    gap:10px;
}

.family-member-list>article{
    display:grid;
    grid-template-columns:46px 1fr auto;
    gap:12px;
    align-items:center;
    padding:13px;
    border:1px solid var(--border);
    border-radius:14px;
    background:#fbfcff;
}

.family-member-list>article.is-holder{
    border-color:#bfd0fb;
    background:#f7f9ff;
}

.member-avatar{
    width:44px;
    height:44px;
    display:grid;
    place-items:center;
    border-radius:14px;
    background:var(--purple-soft);
    color:var(--purple);
    font-weight:900;
}

.member-identity span,
.member-identity strong,
.member-identity small{
    display:block;
}

.member-identity span{
    color:var(--blue);
    font-size:7px;
    font-weight:900;
    letter-spacing:.08em;
}

.member-identity strong{
    margin:4px 0;
    font-size:12px;
}

.member-identity small{
    color:var(--muted);
    font-size:9px;
}

.member-role-tags{
    display:flex;
    justify-content:flex-end;
    gap:5px;
    flex-wrap:wrap;
}

.tag.neutral{
    background:#edf1f6;
    color:#667085;
}

.member-distinction-banner{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    gap:14px;
    align-items:center;
    margin-bottom:18px;
}

.distinction-holder,
.distinction-member{
    display:flex;
    align-items:center;
    gap:11px;
    padding:14px;
    border:1px solid var(--border);
    border-radius:15px;
    background:#fff;
}

.distinction-holder>span,
.distinction-member>span{
    width:38px;
    height:38px;
    display:grid;
    place-items:center;
    border-radius:12px;
    font-weight:900;
}

.distinction-holder>span{
    background:var(--blue-soft);
    color:var(--blue);
}

.distinction-member>span{
    background:var(--green-soft);
    color:var(--green);
}

.distinction-holder strong,
.distinction-holder small,
.distinction-member strong,
.distinction-member small{
    display:block;
}

.distinction-holder small,
.distinction-member small{
    margin-top:3px;
    color:var(--muted);
    font-size:9px;
}

@media(max-width:900px){
    .adherent-explanation{
        grid-template-columns:1fr;
    }

    .role-arrow{
        transform:rotate(90deg);
        text-align:center;
    }

    .entity-legend{
        grid-template-columns:1fr;
    }
}

@media(max-width:650px){
    .family-member-list>article{
        grid-template-columns:44px 1fr;
    }

    .member-role-tags{
        grid-column:1 / -1;
        justify-content:flex-start;
    }

    .member-distinction-banner{
        grid-template-columns:1fr;
    }
}
