/* Illustrated boards with profile and company information. */
body#glink-site .section-profile .p-profile {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1200px;
  padding-inline: var(--section-margin);
  margin-top: 0;
  gap: 0;
}

body#glink-site .section-profile .c-profile-board {
  container-type: inline-size;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.c-profile-board-surface {
  position: absolute;
  inset: 5.4cqw 10cqw 10.9cqw;
  z-index: 0;
  border-radius: 14px;
  background: #fbf6ec;
  pointer-events: none;
}

.c-profile-board-illustration {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.c-profile-board-illustration img {
  position: absolute;
  bottom: 0;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
}

.c-profile-board-illustration .c-profile-board-supporter {
  display: none;
}

.c-profile-board-content {
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
  margin: 10cqw 16cqw 16cqw;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4cqw;
}

.c-profile-board-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.c-profile-board-column > .c-def {
  display: flex;
  flex-direction: column;
  flex: 1;
}

body#glink-site .c-profile-board-content .c-card-title {
  font-size: clamp(19px, 2.2cqw, 25px);
  line-height: 1.5;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-color: #b3d4ce;
}

body#glink-site .c-profile-board-content .c-def-row {
  flex: 1;
  gap: 12px;
  padding-block: 12px;
}

body#glink-site .c-profile-board-content .c-def-row dt {
  width: 6.3em;
  font-size: 13px;
}

body#glink-site .c-profile-board-content .c-def-row dd {
  flex: 1;
  min-width: 0;
  font-size: clamp(14px, 1.4cqw, 16px);
  line-height: 1.85;
  overflow-wrap: anywhere;
}

body#glink-site .c-profile-board-content .c-profile-sign {
  width: min(150px, 75%);
  margin-top: 20px;
}

@media (max-width: 1200px) {
  body#glink-site .section-profile .c-profile-board {
    aspect-ratio: auto;
  }

  .c-profile-board-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    margin-bottom: 16cqw;
  }

  /* Extend the single board for wrapped text; preserve the people’s proportions. */
  .c-profile-board-surface {
    border: 2px solid #113544;
    box-shadow: inset 0 0 0 4px #cde7dc, inset 0 0 0 7px #199b9c;
  }

  .c-profile-board-illustration .c-profile-board-art {
    display: none;
  }

  .c-profile-board-illustration .c-profile-board-supporter {
    display: block;
  }

  .c-profile-board-supporter--left {
    clip-path: polygon(0 25%, 16% 25%, 16% 88%, 23% 88%, 23% 100%, 0 100%);
  }

  .c-profile-board-supporter--right {
    clip-path: polygon(84% 25%, 100% 25%, 100% 100%, 77% 100%, 77% 88%, 84% 88%);
  }
}

@media (max-width: 600px) {
  body#glink-site .c-profile-board-content .c-def-row {
    display: block;
  }

  body#glink-site .c-profile-board-content .c-def-row dt {
    width: auto;
    margin-bottom: 3px;
  }
}

@media (max-width: 767px) {
  body#glink-site .section-profile .p-profile {
    padding-inline: clamp(10px, 3vw, 22px);
    margin-top: 12px;
  }

  .c-profile-board > .c-profile-board-surface,
  .c-profile-board > .c-profile-board-illustration {
    display: none;
  }

  body#glink-site .c-profile-board-content {
    --profile-holder-width: min(100cqw, 420px);
    --profile-holder-inset: calc(var(--profile-holder-width) * .094);
    margin: 0 0 24px;
    gap: 40px;
  }

  .c-profile-board-column {
    position: relative;
    margin-inline: var(--profile-holder-inset);
    padding: 16px 16px 18px;
    border: 2px solid #113544;
    border-radius: 14px;
    background: #fbf6ec;
    box-shadow: inset 0 0 0 4px #cde7dc, inset 0 0 0 7px #199b9c;
  }

  /* Mobile-only likenesses; align the inward-facing hands with each frame. */
  .c-profile-board-column::before,
  .c-profile-board-column::after {
    content: '';
    position: absolute;
    bottom: calc(-1 * var(--profile-holder-inset));
    width: calc(var(--profile-holder-width) * 4 / 15);
    height: calc(var(--profile-holder-width) * .4);
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
  }

  .c-profile-board-column::before {
    left: calc(var(--profile-holder-width) * -.184);
    background-image: url('../img/profile/supporter-left-identity-v1.webp');
  }

  .c-profile-board-column::after {
    right: calc(var(--profile-holder-width) * -.176);
    background-image: url('../img/profile/supporter-right-identity-v1.webp');
  }

  /* Restore the original pair on the personal profile board. */
  .c-profile-board-column--person::before,
  .c-profile-board-column--person::after {
    width: calc(var(--profile-holder-width) * .135);
    height: calc(var(--profile-holder-width) * 971 / 1620);
    background-image: url('../img/profile/shared-board-compact-v4.webp');
    background-size: var(--profile-holder-width) 100%;
  }

  .c-profile-board-column--person::before {
    left: calc(-1 * var(--profile-holder-inset) - 2px);
    background-position: left;
    clip-path: polygon(
      0 24%, 69.6% 24%,
      69.6% 42.9%, 87.4% 42.9%, 87.4% 48.7%, 69.6% 48.7%,
      69.6% 51%, 87.4% 51%, 87.4% 55.8%, 69.6% 55.8%,
      69.6% 84.5%, 100% 84.5%, 100% 100%, 0 100%
    );
  }

  .c-profile-board-column--person::after {
    right: calc(-1 * var(--profile-holder-inset) - 2px);
    background-position: right;
    clip-path: polygon(
      30.4% 24%, 100% 24%, 100% 100%, 0 100%, 0 84.5%, 30.4% 84.5%,
      30.4% 56.4%, 12.6% 56.4%, 12.6% 51.9%, 30.4% 51.9%,
      30.4% 50%, 12.6% 50%, 12.6% 44.6%, 30.4% 44.6%
    );
  }

  body#glink-site .c-profile-board-column > .c-def {
    flex: none;
  }

  body#glink-site .c-profile-board-content .c-card-title {
    margin-bottom: 8px;
    padding-bottom: 8px;
    font-size: 18px;
  }

  body#glink-site .c-profile-board-content .c-def-row {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    flex: none;
    align-items: baseline;
    gap: 4px 8px;
    padding-block: 7px;
  }

  body#glink-site .c-profile-board-content .c-def-row dt {
    width: auto;
    margin-bottom: 0;
    line-height: 1.7;
    letter-spacing: .02em;
  }

  body#glink-site .c-profile-board-content .c-def-row dd {
    line-height: 1.7;
    letter-spacing: .02em;
  }

  body#glink-site .c-profile-board-column--person .c-def-row:last-child,
  body#glink-site .c-profile-board-column--company .c-def-row:nth-last-child(-n+2) {
    grid-template-columns: minmax(0, 1fr);
  }

  body#glink-site .c-profile-board-content .c-profile-sign {
    width: 112px;
    margin-top: 10px;
  }

}

/* A wider, shorter desktop board keeps the illustrated people in proportion. */
@media (min-width: 1201px) {
  body#glink-site .section-profile .p-profile {
    max-width: 1440px;
    padding-inline: calc(var(--section-margin) * 1.2);
    margin-top: -16px;
  }

  body#glink-site .section-profile .c-profile-board {
    aspect-ratio: 5 / 3;
  }

  body#glink-site .c-profile-board-content {
    margin-block: 8cqw 12cqw;
  }

  body#glink-site .c-profile-board-content .c-card-title {
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  body#glink-site .c-profile-board-content .c-def-row {
    padding-block: 8px;
  }

  body#glink-site .c-profile-board-content .c-profile-sign {
    margin-top: 16px;
  }
}

/* The full profile keeps every field and extends the shared board to fit. */
.is-profile-page .l-page-content {
  max-width: 1280px;
  padding-inline: 0;
}

.is-profile-page .c-page-lead,
.is-profile-page .c-article-sign,
.is-profile-page .p-latest {
  max-width: 840px;
  margin-inline: auto;
}

body#glink-site.is-profile-page .c-profile-page-boards {
  padding: 0;
  overflow-x: clip;
}

body#glink-site.is-profile-page .c-profile-board {
  aspect-ratio: auto;
}

.is-profile-page .c-profile-board-surface {
  inset-inline: 9.4cqw;
  border: 2px solid #113544;
  box-shadow: inset 0 0 0 4px #cde7dc, inset 0 0 0 7px #199b9c;
}

.is-profile-page .c-profile-board-illustration .c-profile-board-art {
  display: none;
}

.is-profile-page .c-profile-board-illustration .c-profile-board-supporter {
  display: block;
}

.is-profile-page .c-profile-board-supporter--left {
  clip-path: polygon(0 24%, 9.4% 24%, 9.4% 42.9%, 11.8% 42.9%, 11.8% 48.7%, 9.4% 48.7%, 9.4% 51%, 11.8% 51%, 11.8% 55.8%, 9.4% 55.8%, 9.4% 84.5%, 13.5% 84.5%, 13.5% 100%, 0 100%);
}

.is-profile-page .c-profile-board-supporter--right {
  clip-path: polygon(90.6% 24%, 100% 24%, 100% 100%, 86.5% 100%, 86.5% 84.5%, 90.6% 84.5%, 90.6% 56.4%, 88.2% 56.4%, 88.2% 51.9%, 90.6% 51.9%, 90.6% 50%, 88.2% 50%, 88.2% 44.6%, 90.6% 44.6%);
}

.is-profile-page .c-profile-board-content .c-profile-sign {
  margin-bottom: 0;
}

.is-profile-page .c-profile-page-facts {
  max-width: 840px;
  margin: 32px auto 0;
  padding: 28px 32px;
  border: 1px solid #c6e8f5;
  border-radius: 24px;
  background: #fff;
}

.is-profile-page .c-profile-page-facts > .c-page-h2:first-child {
  margin-top: 0;
  font-size: 22px;
}

.is-profile-page .c-profile-page-facts > :last-child {
  margin-bottom: 0;
}

@media (max-width: 1200px) {
  .is-profile-page .c-page-lead,
  .is-profile-page .c-article-sign,
  .is-profile-page .p-latest,
  .is-profile-page .c-profile-page-facts {
    width: calc(100% - 40px);
  }
}

@media (max-width: 767px) {
  body#glink-site.is-profile-page .c-profile-board-column--person .c-def-row:nth-last-child(-n+2) {
    grid-template-columns: minmax(0, 1fr);
  }

  .is-profile-page .c-profile-page-facts {
    margin-top: 16px;
    padding: 16px 20px;
  }

  .is-profile-page .c-profile-page-facts > .c-page-h2:first-child {
    margin-bottom: 14px;
    padding-bottom: 0;
    font-size: 20px;
    line-height: 1.4;
  }

  .is-profile-page .c-profile-page-facts > p,
  .is-profile-page .c-profile-page-facts .c-page-list li {
    line-height: 1.72;
  }

  .is-profile-page .c-profile-page-facts > p,
  .is-profile-page .c-profile-page-facts > .c-page-list {
    margin-bottom: 14px;
  }

  .is-profile-page .c-profile-page-facts > .c-page-list {
    padding: 0;
  }

  .is-profile-page .c-profile-page-facts .c-page-list li + li {
    margin-top: 7px;
  }
}
