/* ==========================================================================
   NDF — team.html: the team grid and one author's profile.
   Colours only through site tokens (classic / editorial skins).
   ========================================================================== */

.team-head{ padding-bottom:var(--s3); border-bottom:1px solid var(--rule); }
.team-head h1{ font-size:clamp(38px,6vw,72px); line-height:1; margin:var(--s1) 0 var(--s2); }
.team-head .hero-lede{ max-width:62ch; margin:0; color:var(--ink-2); }
.team-cta{ margin:var(--s3) 0 0; }
.team-status{ margin-top:var(--s3); color:var(--ink-3); }
.team-status.is-down{ padding:var(--s3); background:var(--paper); border:1px solid var(--rule-soft); border-top:3px solid var(--stamp); color:var(--ink-2); font-size:13px; }

.team-group{ margin-top:var(--s5); }
.team-group-head{ display:flex; align-items:baseline; justify-content:space-between; gap:8px var(--s3); flex-wrap:wrap;
  padding-bottom:var(--s2); margin-bottom:var(--s3); border-bottom:2px solid var(--ink); }
.team-group-head h2{ font-size:clamp(24px,3vw,34px); margin:0; }
.team-group-head .meta{ margin:0; color:var(--ink-3); }

.team-grid{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:var(--s3); }
.team-grid > li{ display:flex; min-width:0; }
.team-card{
  position:relative; flex:1; min-width:0; display:flex; flex-direction:column;
  background:var(--paper); border:1px solid var(--rule-soft);
  transition:border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.team-card:hover, .team-card:focus-within{ border-color:var(--stamp); transform:translateY(-3px); box-shadow:0 12px 26px -16px rgba(0,0,0,.45); }
.team-photo{ position:relative; aspect-ratio:1/1; background:var(--paper-2); overflow:hidden; }
.team-photo img, .team-profile-photo img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
.team-photo img{ filter:grayscale(.15); transition:filter .4s var(--ease), transform .5s var(--ease); }
.team-card:hover .team-photo img{ filter:none; transform:scale(1.03); }
.team-ph{ position:absolute; inset:0; display:grid; place-items:center; font-family:var(--display); font-size:54px; letter-spacing:.04em; color:var(--rule); }
.team-card-body{ padding:16px 18px 18px; display:flex; flex-direction:column; gap:6px; flex:1; }
.team-name{ font-size:21px; line-height:1.2; margin:0; }
.team-link{ color:var(--ink); }
.team-link::after{ content:""; position:absolute; inset:0; z-index:1; }   /* whole card is the link */
.team-link:focus-visible{ outline:none; }
.team-card:has(.team-link:focus-visible){ outline:2px solid var(--stamp); outline-offset:2px; }
.team-card:hover .team-link{ color:var(--stamp); }
.team-role{ margin:0; font-family:var(--mono); font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--stamp); }
.team-bio{ margin:4px 0 0; font-size:15px; line-height:1.5; color:var(--ink-2); font-weight:300;
  display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }

.team-socials{ list-style:none; margin:auto 0 0; padding:12px 0 0; display:flex; flex-wrap:wrap; gap:6px; position:relative; z-index:2; }
.team-social{
  display:inline-flex; align-items:center; gap:8px; height:36px; min-width:36px; justify-content:center;
  border:1px solid var(--rule); color:var(--ink-2); background:var(--paper);
  transition:color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.team-social svg{ width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.team-social:hover, .team-social:focus-visible{ color:var(--stamp-ink); background:var(--stamp); border-color:var(--stamp); }
.team-socials.is-labelled .team-social{ padding:0 12px; font-family:var(--mono); font-size:11.5px; letter-spacing:.06em; text-transform:uppercase; }

/* ---------- one author ---------- */
.team-back{ display:inline-flex; gap:8px; color:var(--ink-2); }
.team-back:hover{ color:var(--stamp); }
.team-profile{ display:grid; grid-template-columns:minmax(180px,300px) minmax(0,1fr); gap:var(--s5); align-items:start; margin-top:var(--s3);
  padding-bottom:var(--s4); border-bottom:1px solid var(--rule); }
.team-profile-photo{ position:relative; aspect-ratio:4/5; background:var(--paper-2); overflow:hidden; border:1px solid var(--rule-soft); }
.team-profile-photo .team-ph{ font-size:84px; }
.team-profile-info{ min-width:0; }
.team-profile-name{ font-size:clamp(36px,5.4vw,64px); line-height:1.02; margin:var(--s1) 0 var(--s1); overflow-wrap:anywhere; }
.team-profile-role{ margin:0 0 var(--s3); font-family:var(--mono); font-size:13px; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-2); }
.team-profile-bio{ max-width:68ch; font-size:18px; line-height:1.65; }
.team-profile-bio p{ margin:0; }
.team-profile-bio p + p{ margin-top:1em; }
.team-profile .team-socials{ margin-top:var(--s3); padding-top:0; }
.team-posts{ margin-top:var(--s5); }
.team-posts .section-head{ display:flex; justify-content:space-between; align-items:baseline; gap:var(--s2); flex-wrap:wrap; }
.team-posts .art-empty{ border:1px solid var(--rule-soft); }
.team-missing{ margin-top:var(--s3); padding:var(--s4); background:var(--paper); border:1px solid var(--rule-soft); border-top:3px solid var(--stamp); }
.team-missing h1{ font-size:clamp(26px,3.4vw,40px); margin:0 0 8px; }
.team-missing p{ color:var(--ink-2); max-width:60ch; }

@media (max-width:760px){
  .team-profile{ grid-template-columns:1fr; gap:var(--s3); }
  .team-profile-photo{ max-width:220px; aspect-ratio:1/1; }
  .team-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--s2); }
  .team-card-body{ padding:12px 12px 14px; }
  .team-name{ font-size:18px; }
  .team-bio{ -webkit-line-clamp:3; font-size:14px; }
}
@media (max-width:440px){
  .team-grid{ grid-template-columns:1fr; }
  .team-card{ flex-direction:row; }
  .team-photo{ flex:0 0 112px; aspect-ratio:auto; min-height:140px; }
  .team-ph{ font-size:34px; }
}

/* credits (team.js): an article the member is credited on, not the lead author of */
.team-posts .art-body .art-credit{ display:block; margin-top:auto; padding-top:6px; color:var(--ink-3); }

/* ==========================================================================
   Bento by hierarchy (team.js bento; Pages › Team › the team widget's layout).
   Each profile's level sets its room: lead 2×2 (Leadership), senior a wide tile beside it, member a square
   (The team), intern a compact strip (Interns). A photo fills its tile, framed as set in Admin › Team; without
   one the name leads over a large monogram. The tile is a stacking context, so the picture sits behind the text
   (z-index -1) and the name's link still covers the whole tile (.team-link::after).
   ========================================================================== */
.tb-group{ margin-top:var(--s5); }
.tb-grid{ list-style:none; margin:0; padding:0; display:grid; gap:var(--s2); }
.tb-cell{ display:flex; min-width:0; }
.tb-tile{
  position:relative; isolation:isolate; flex:1; min-width:0; display:flex; overflow:hidden;
  background:var(--paper); border:1px solid var(--rule-soft); color:var(--ink);
  transition:border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.tb-tile:hover, .tb-tile:focus-within{ border-color:var(--stamp); transform:translateY(-3px); box-shadow:0 14px 30px -18px rgba(0,0,0,.5); }
.tb-tile:has(.team-link:focus-visible){ outline:2px solid var(--stamp); outline-offset:2px; }
.tb-pic{ position:relative; overflow:hidden; background:linear-gradient(158deg,var(--field-a),var(--field-b)); }
.tb-pic img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; transition:transform .6s var(--ease); }
.tb-tile:hover .tb-pic img{ transform:scale(1.03); }
.tb-mono{ font-family:var(--display); font-weight:700; line-height:.82; letter-spacing:-.02em; color:var(--field-ink); user-select:none; }
.tb-tile.has-photo .tb-mono{ display:none; }
.tb-body{ display:flex; flex-direction:column; gap:6px; min-width:0; padding:16px 18px 18px; }
.tb-name{ margin:0; font-family:var(--display); font-weight:700; line-height:1.08; overflow-wrap:anywhere; text-wrap:balance; }
.tb-name .team-link{ color:inherit; }
.tb-tile:hover .tb-name .team-link, .tb-name .team-link:focus-visible{
  text-decoration:underline; text-decoration-thickness:2px; text-underline-offset:5px; text-decoration-color:var(--stamp);
}
.tb-role{ margin:0; font-family:var(--mono); font-size:11px; line-height:1.45; letter-spacing:.1em; text-transform:uppercase; color:var(--stamp); }
.tb-text{ margin:4px 0 0; font-size:15px; line-height:1.5; color:var(--ink-2); font-weight:300;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
.tb-more{ margin-top:auto; padding-top:10px; font-family:var(--mono); font-size:11px; letter-spacing:.12em; text-transform:uppercase; }
.tb-tile .team-socials{ margin-top:auto; padding-top:10px; }

/* ---------- Leadership: lead 2×2, senior 2×1 beside it ---------- */
.tb-grid-lead{ grid-template-columns:repeat(4,minmax(0,1fr)); grid-auto-rows:minmax(250px,auto); grid-auto-flow:row dense; }
.tb-cell-lead{ grid-column:span 2; grid-row:span 2; }
.tb-cell-senior{ grid-column:span 2; }
.tb-grid-lead.is-solo .tb-cell-lead, .tb-cell-full{ grid-column:1 / -1; }   /* team.js: no holes in the block */

.tb-lead{ flex-direction:column; justify-content:flex-end; min-height:520px; color:var(--field-ink); border-color:transparent; border-top:3px solid var(--stamp); }
.tb-lead .tb-pic{ position:absolute; inset:0; z-index:-1; }
.tb-lead .tb-body{ padding:var(--s4); gap:10px; }
.tb-lead.has-photo .tb-body{
  padding-top:var(--s6);
  background:linear-gradient(to top, rgba(9,10,12,.95) 0%, rgba(9,10,12,.84) 55%, rgba(9,10,12,.5) 80%, rgba(9,10,12,0) 100%);
}
.tb-lead .tb-mono{ position:absolute; top:var(--s3); right:var(--s3); font-size:clamp(150px,16vw,290px); color:transparent;
  -webkit-text-stroke:1.5px rgba(255,255,255,.16); }
.tb-lead .tb-name{ font-size:clamp(36px,3.8vw,58px); color:var(--field-ink); }
.tb-lead .tb-role, .tb-lead .tb-more{ color:var(--field-ink); opacity:.88; }
.tb-lead .tb-role::before{ content:""; display:inline-block; width:18px; height:2px; margin-right:10px; vertical-align:middle; background:var(--stamp); }
.tb-lead .tb-text{ color:var(--field-ink); opacity:.86; font-size:17px; font-weight:400; max-width:58ch; -webkit-line-clamp:4; }
.tb-lead .team-social{ background:transparent; color:var(--field-ink); border-color:rgba(255,255,255,.28); }

.tb-senior{ flex-direction:row; min-height:250px; }
.tb-senior .tb-pic{ flex:0 0 40%; display:grid; place-items:center; }
.tb-senior .tb-mono{ font-size:clamp(56px,5.2vw,88px); }
.tb-senior.no-photo .tb-pic{ border-right:3px solid var(--stamp); }
.tb-cell-full .tb-senior .tb-pic{ flex-basis:22%; }   /* a senior on a full row keeps a senior-sized picture */
.tb-senior .tb-body{ flex:1 1 auto; justify-content:center; padding:var(--s3); gap:8px; }
.tb-senior .tb-name{ font-size:clamp(24px,2.3vw,34px); }
.tb-senior .tb-text{ -webkit-line-clamp:3; }

/* ---------- The team: squares ---------- */
.tb-grid-team{ grid-template-columns:repeat(4,minmax(0,1fr)); }
.tb-grid-team.cols-3{ grid-template-columns:repeat(3,minmax(0,1fr)); }   /* team.js: 3 when it fills the rows better */
.tb-member{ flex-direction:column; justify-content:flex-end; aspect-ratio:1 / 1; }
.cols-3 .tb-member{ aspect-ratio:16 / 10; }   /* wider tiles, shorter: still smaller than a senior's */
.tb-member .tb-name{ font-size:clamp(20px,1.7vw,25px); }
.tb-member .tb-text{ -webkit-line-clamp:2; font-size:14px; }
.tb-member.has-photo{ color:var(--field-ink); }
.tb-member.has-photo .tb-pic{ position:absolute; inset:0; z-index:-1; }
.tb-member.has-photo .tb-body{
  padding-top:var(--s5);
  background:linear-gradient(to top, rgba(9,10,12,.94) 0%, rgba(9,10,12,.8) 55%, rgba(9,10,12,0) 100%);
}
.tb-member.has-photo .tb-role, .tb-member.has-photo .tb-text{ color:var(--field-ink); opacity:.86; }
/* no photo: the name leads, a large outlined monogram behind it */
.tb-member.no-photo{ border-top:2px solid var(--stamp); }
.tb-member.no-photo .tb-pic{ position:absolute; inset:0; z-index:-1; background:transparent; }
.tb-member.no-photo .tb-mono{ position:absolute; top:var(--s2); left:var(--s2); font-size:clamp(84px,7.4vw,128px); color:transparent;
  -webkit-text-stroke:1.5px var(--ink-3); opacity:.32; }
.tb-member.no-photo .tb-name{ font-size:clamp(22px,1.9vw,28px); }

/* ---------- Interns: a compact strip ---------- */
.tb-grid-interns{ grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); }
.tb-intern{ flex-direction:row; align-items:center; gap:14px; padding:12px; }
.tb-intern .tb-pic{ flex:0 0 64px; height:64px; display:grid; place-items:center; }
.tb-intern .tb-mono{ font-size:24px; line-height:1; }
.tb-intern .tb-body{ padding:0; gap:3px; }
.tb-intern .tb-name{ font-size:18px; line-height:1.15; }
.tb-intern .tb-role{ font-size:10.5px; }
.tb-intern .tb-text{ margin:2px 0 0; font-size:13.5px; -webkit-line-clamp:2; }

@media (max-width:1080px){
  .tb-grid-lead{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tb-grid-team, .tb-grid-team.cols-3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  .cols-3 .tb-member{ aspect-ratio:1 / 1; }
}
@media (max-width:760px){
  .tb-grid-lead{ grid-template-columns:1fr; grid-auto-rows:auto; }
  .tb-cell-lead, .tb-cell-senior, .tb-grid-lead.is-solo .tb-cell-lead, .tb-cell-full{ grid-column:auto; grid-row:auto; }
  .tb-lead{ min-height:440px; }
  .tb-lead .tb-body{ padding:var(--s3); }
  .tb-senior{ min-height:200px; }
  .tb-senior .tb-pic{ flex-basis:36%; }
  .tb-senior .tb-body{ padding:var(--s2) var(--s3); }
  .tb-grid-team, .tb-grid-team.cols-3{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tb-member .tb-body{ padding:12px; }
  .tb-member .tb-text{ display:none; }
  .tb-member .tb-name, .tb-member.no-photo .tb-name{ font-size:18px; }
}
@media (prefers-reduced-motion: reduce){
  .tb-tile, .tb-pic img{ transition:none; }
  .tb-tile:hover, .tb-tile:focus-within, .tb-tile:hover .tb-pic img{ transform:none; }
}
