.profile-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
  align-items: stretch;
}

.profile-relationship-card,
.profile-disclosure-card {
  min-width: 0;
  min-height: 100%;
  padding: 1rem;
  background: var(--bs-body-bg);
}

.invite-type-card {
  cursor: pointer;
}

@media (max-width: 575.98px) {
  .invite-type-card .profile-card-header,
  .invite-type-card .profile-card-identity {
    justify-content: center;
  }

  .invite-type-card .profile-card-identity {
    flex-direction: column;
    gap: .5rem;
    text-align: center;
  }

  .invite-type-card .profile-card-leading {
    width: 2.5rem;
    height: 2.5rem;
    flex-basis: 2.5rem;
  }
}

.btn-check:focus-visible + .invite-type-card {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.btn-check:checked + .profile-disclosure-card,
.btn-check:checked + .invite-type-card {
  border-color: var(--bs-primary) !important;
  background: rgba(var(--bs-primary-rgb), 0.06);
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.16);
}

.profile-relationship-card[data-profile-card-href] {
  cursor: pointer;
}

.profile-relationship-card[data-profile-card-href]:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.profile-card-header,
.profile-card-identity,
.profile-card-trailing,
.profile-card-footer {
  display: flex;
  align-items: center;
}

.profile-card-header {
  justify-content: space-between;
  gap: .75rem;
}

.profile-card-identity {
  gap: .75rem;
  min-width: 0;
  flex: 1 1 auto;
}

.profile-card-leading {
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--bs-primary);
  background: var(--bs-primary-bg-subtle);
}

.profile-card-leading-person {
  border-radius: 50%;
}

.profile-card-leading-entity,
.profile-card-leading-record {
  border-radius: var(--bs-border-radius);
}

.profile-card-leading img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card-leading .bi {
  font-size: 1.15rem;
}

.profile-card-title-shell {
  min-width: 0;
}

.profile-card-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.profile-card-trailing {
  flex: 0 0 auto;
  align-self: flex-start;
  gap: .5rem;
}

.profile-card-details,
.profile-card-expanded {
  margin-top: .875rem;
  padding-top: .875rem;
  border-top: 1px solid var(--bs-border-color);
}

.profile-card-details {
  color: var(--bs-secondary-color);
}

.profile-card-footer {
  justify-content: flex-end;
  gap: .5rem;
  margin-top: auto;
  padding-top: .75rem;
  position: relative;
  z-index: 2;
}

.profile-card-contact-list {
  display: grid;
  gap: .5rem;
}

.profile-card-contact {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-width: 0;
}

.profile-card-contact .bi {
  flex: 0 0 auto;
  color: var(--bs-primary);
}

.profile-card-contact a,
.profile-card-contact span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-relationship-card.profile-card-compact {
  padding: .75rem;
}

.profile-card-compact .profile-card-leading {
  width: 2.5rem;
  height: 2.5rem;
  flex-basis: 2.5rem;
}

.profile-card-compact .profile-card-details {
  margin-top: .625rem;
  padding-top: .625rem;
}

.profile-card-compact .profile-card-contact-list {
  gap: .35rem;
}

.profile-card-compact .profile-card-footer {
  padding-top: .5rem;
}

.profile-disclosure-card > summary {
  cursor: pointer;
  list-style: none;
}

.profile-disclosure-card > summary::-webkit-details-marker {
  display: none;
}

.profile-card-disclosure-toggle {
  transition: transform .15s ease-in-out;
}

.profile-disclosure-card[open] .profile-card-disclosure-toggle {
  transform: rotate(180deg);
}

@media (max-width: 575.98px) {
  .profile-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-card-leading {
    width: 2.5rem;
    height: 2.5rem;
    flex-basis: 2.5rem;
  }

}
