/* ==========================================================================
   People (round 37): the Team page and the biographies.
   - Team: r07's row of portrait cards, five across on wide screens, in
     the order Kevin Benoit, Joseph Mercer, Bo Baskin, Jay Turner, Carrie
     Cain. Each card: photo, name, title and a Biography link (r40: no
     summaries, no contact lines; routing sits once, below the cards).
   - Biographies: the person first (portrait, name, title in the night band),
     then the biography beside a short register (r40: no team strip).
   r40 readability overrides for shared rules live in r40-team.css.
   Names stay in the serif display face; everything a person reads (bios,
   summaries, notes) is set in the sans at a comfortable size, never italic.
   Loaded after frame.css (and edition.css on the Team page).
   ========================================================================== */

.drp-team-page main, .drp-person-page main { display: block; }

/* reading text on the Team page: sans, upright */
.drp-team-page .ed-band-lede { font: 400 clamp(16px, 1.2vw, 17.5px)/1.6 var(--sans); }
.drp-team-page .ed-ch-stand,
.drp-team-page .ed-reach-p { font-family: var(--sans); }
.drp-team-page .ed-ch-stand { font-size: 17px; }

/* ---------- the Team page: the row of cards ---------- */
.crew { padding: clamp(22px, 3vh, 36px) 0 clamp(60px, 7vw, 100px); background: #fff; }
.members {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}
.member {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-areas: "photo id" "rest rest";
  gap: 0 20px;
  align-content: start;
  margin: 0;
  padding: 24px 0 28px;
  border-bottom: 1px solid var(--rule);
}
.member-photo { grid-area: photo; display: block; overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper); }
.member-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform 0.4s ease; }
.member-photo.is-square img { object-position: 50% 36%; }
.member-photo:hover img { transform: scale(1.025); }
.member-id { grid-area: id; align-self: center; }
.member-rest { grid-area: rest; padding-top: 18px; }
html body .member-name {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(25px, 1.9vw, 29px);
  font-weight: 400;
  line-height: 1.12;
}
.member-name a, .member-name a:visited { color: var(--ink); text-decoration: none; }
.member-name a:hover, .member-name a:focus-visible { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.member-role { margin: 7px 0 0; color: var(--muted); font: 500 14.5px/1.45 var(--sans); }
.member-more { margin: 14px 0 0; }
.member-more a, .member-more a:visited {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  font: 600 15px/1.3 var(--sans);
  text-decoration: none;
}
.member-more a:after { content: "\2192"; font-weight: 400; transition: transform 0.2s ease; }
.member-more a:hover:after { transform: translateX(3px); }

@media (min-width: 700px) and (max-width: 1099px) {
  .members { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
  .member { grid-template-columns: 128px minmax(0, 1fr); }
}
@media (min-width: 1100px) {
  /* five equal columns, a hairline in the middle of each gap */
  .members { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: clamp(28px, 2.6vw, 44px); }
  .member {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "photo" "id" "rest";
    padding: 26px 0 6px;
    border-bottom: 0;
  }
  .member + .member:before {
    content: "";
    position: absolute;
    top: 26px;
    bottom: 0;
    left: calc(clamp(28px, 2.6vw, 44px) / -2);
    border-left: 1px solid var(--rule);
  }
  .member-photo { margin-bottom: 18px; }
  .member-id { align-self: start; }
  .member-rest { padding-top: 12px; }
    }
@media (min-width: 1100px) and (max-width: 1279px) {
  html body .member-name { font-size: 23px; }
  .member-role { font-size: 13.5px; }
}
@media (max-width: 420px) {
  .member { grid-template-columns: 96px minmax(0, 1fr); gap: 0 16px; }
  html body .member-name { font-size: 23px; }
}

/* ---------- biographies ---------- */
.ph--bio .bio-role { font-family: var(--sans); font-size: clamp(16px, 1.3vw, 18.5px); font-weight: 500; letter-spacing: 0.005em; }

.bio-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  padding-top: clamp(40px, 5vw, 72px);
  padding-bottom: clamp(56px, 7vw, 100px);
}
@media (min-width: 900px) {
  .bio-body { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(48px, 7vw, 104px); align-items: start; }
  .bio-aside { position: sticky; top: calc(var(--bar-h) + 28px); }
}
/* narrow screens: the person, then the biography, then the register */
@media (max-width: 899px) { .bio-aside { order: 2; } }
.bio-register { margin: 0; border-top: 2px solid var(--ink); font-family: var(--sans); }
.bio-register > div { padding: 13px 0 14px; border-bottom: 1px solid var(--rule); }
.bio-register dt { margin: 0 0 4px; color: var(--muted); font: 600 11.5px/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; }
.bio-register dd { margin: 0; color: var(--slate); font: 400 15.5px/1.55 var(--sans); overflow-wrap: anywhere; }
.bio-register dd + dd { margin-top: 6px; }
.bio-register a, .bio-register a:visited { color: var(--ink); }
.bio-register .is-route dt { color: var(--ink); }

.bio-text { max-width: 40em; }
.bio-text p { margin: 0 0 1.2em; color: var(--slate); font: 400 18px/1.75 var(--sans); }
.bio-more { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 36px 0 0; }
.bio-more a, .bio-more a:visited {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  font: 600 16px/1.3 var(--sans);
  text-decoration: none;
}
.bio-more a:hover { border-bottom-width: 2px; padding-bottom: 1px; }
@media (max-width: 560px) {
  .bio-text p { font-size: 17px; line-height: 1.7; }
}

@media print {
  .bio-aside { position: static; }
}

/* r38/r40: one shared baseline per row across the five cards (photo, name,
   title, Biography). Each card spans four rows of the list grid and adopts
   them as a subgrid, so a two-line title moves that row down for every card. */
@media (min-width: 1100px) {
  @supports (grid-template-rows: subgrid) {
    .members { grid-template-rows: repeat(4, auto); row-gap: 0; }
    .member {
      grid-row: span 4;
      grid-template-rows: subgrid;
      grid-template-areas: none;
      row-gap: 0;
    }
    .member-id, .member-rest { display: contents; }
    .member-photo, .member-name, .member-role, .member-more { grid-column: 1; }
    .member-photo { grid-area: auto; grid-row: 1; }
    .member-name { grid-row: 2; align-self: start; }
    .member-role { grid-row: 3; align-self: start; }
    .member-more { grid-row: 4; align-self: start; }
  }
}
