@layer components {
  @supports (grid-template-rows: subgrid) {
    .bod__grid {
      display: grid;
      grid-template-columns: 1fr;
      grid-auto-rows: auto;
    }
    @media (min-width: 768px) {
      .bod__grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }
    @media (min-width: 1200px) {
      .bod__grid {
        grid-template-columns: repeat(3, 1fr);
      }
    }
    .bod__grid > div[class*=col-] {
      width: 100%;
      max-width: 100%;
    }
    .bod__grid .profiles__wrapper {
      height: auto;
    }
    .bod__grid > div[class*=col-],
    .bod__grid .profiles__wrapper {
      display: grid;
      grid-row: span 2;
      grid-template-rows: subgrid;
    }
    .bod__grid .profile-card {
      grid-row: 1;
      height: 100%;
    }
    .bod__grid .profile-detail {
      grid-row: 2;
      margin-block-end: var(--sm-3);
    }
  }
  @supports not (grid-template-rows: subgrid) {
    .bod__grid {
      row-gap: var(--sm-3);
    }
    @media (min-width: 768px) {
      .bod__grid .profiles__wrapper {
        display: flex;
        flex-direction: column;
      }
      .bod__grid .profile-card {
        flex: 1 1 auto;
      }
    }
    .bod__grid:has(.profile-detail--visible) .profile-card {
      flex: 0 0 auto;
    }
  }
  .bod .profile-detail {
    max-height: 0;
    transition: none;
  }
  .bod .profile-detail__title-wrapper {
    display: none;
  }
  .bod .profile-detail--visible {
    max-height: 300rem;
    transition: max-height 3s;
  }
  .bod .profile-detail__wrapper {
    margin-top: 0;
    padding-top: var(--md-2);
  }
  .bod--popup .popover-modal__header {
    border: none;
    justify-content: flex-end !important;
    padding-bottom: 0;
  }
  .bod--popup .popover-modal__content {
    padding: 0;
  }
  .bod--popup .popover-modal .profile-detail__wrapper {
    margin-top: 0;
  }
  .bod--popup .profile-detail {
    max-height: none;
  }
  .bod--popup .profile-detail__title-wrapper {
    display: block;
  }
  .bod--popup .profile-detail__wrapper {
    margin-top: 0;
  }
  .bod--popup .profile-detail__button {
    display: none !important;
  }
  .bod--popup .profile-detail--visible .profile-detail {
    max-height: 100%;
  }
  .bod--popup .profile-detail {
    inset-inline-start: 0;
  }
  @media (min-width: 768px) {
    .bod .profile-detail__title-wrapper {
      display: block;
    }
    .bod .profile-detail__wrapper {
      padding-top: 0;
    }
    .bod div[class*=col-] .profile-detail--visible {
      margin-top: var(--sm-3);
      width: calc(200% + var(--bs-gutter-x));
    }
    .bod div[class*=col-]:nth-child(2n) .profile-detail {
      inset-inline-start: calc(-100% - var(--bs-gutter-x));
    }
    .bod--popup div[class*=col-] .profile-detail--visible {
      width: 100%;
    }
    .bod--popup div[class*=col-]:nth-child(2n) .profile-detail {
      inset-inline-start: 0;
    }
  }
  @media (min-width: 992px) {
    .bod .profile-card__card-link:focus-within .cta--text-link:focus-visible {
      outline: transparent;
    }
  }
  @media (min-width: 1200px) {
    .bod div[class*=col-] .profile-detail--visible {
      width: calc(300% + var(--bs-gutter-x) * 2);
    }
    .bod div[class*=col-]:nth-child(2n) .profile-detail {
      inset-inline-start: 0;
    }
    .bod div[class*=col-]:nth-child(3n+2) .profile-detail {
      inset-inline-start: calc(-100% - var(--bs-gutter-x));
    }
    .bod div[class*=col-]:nth-child(3n) .profile-detail {
      inset-inline-start: calc(-200% - var(--bs-gutter-x) * 2);
    }
    .bod--popup div[class*=col-] .profile-detail--visible {
      width: 100%;
    }
    .bod--popup div[class*=col-]:nth-child(2n) .profile-detail {
      inset-inline-start: 0;
    }
    .bod--popup div[class*=col-]:nth-child(3n+2) .profile-detail {
      inset-inline-start: 0;
    }
    .bod--popup div[class*=col-]:nth-child(3n) .profile-detail {
      inset-inline-start: 0;
    }
  }
}