/* =============================================================================
   People page (views/equipe.njk), scoped under .page-equipe, tokens only.
   Unlayered, so it wins over site.css; shared components are only adjusted
   inside this page.
   The page is the lab's organization tree, drawn like a precise figure:
   - ≥ 768px: centred levels joined by 1px hairlines (borders only, so they
     survive forced colours) with small junction dots. A trunk (.org-wire--stem)
     comes down the page axis and splits on a branch bar into the groups of a
     level (each branch draws its half of the bar and the drop into its head:
     .org-wire--arm); branches that lead on to a lower level rise back into the
     trunk on a merge bar (.org-wire--tail). Every level sits on one 3-column
     grid, so branches, sub-branches and registers share the same verticals.
     Red only at the root junction, and on the path to a hovered or targeted
     group. The wires draw in when revealed (static under reduced motion).
     The figure needs ~220px per column, hence 768px (below, names and link labels would
     break inside words).
   - < 768px: a file tree. A spine with an elbow to every group (.org-group
     ::before, continued by ::after) and to every person (.org-item), each
     level indented by --org-i.
   ============================================================================= */

.page-equipe .org {
  --org-g: clamp(16px, 2.2vw, 32px);          /* gap between branches */
  --org-stem: clamp(44px, 5.2vw, 76px);        /* trunk between levels */
  --org-drop: clamp(26px, 2.8vw, 40px);        /* bar → head */
  --org-twig: clamp(22px, 2.4vw, 32px);        /* head → member grid */
  --org-wire: color-mix(in srgb, var(--fg) 22%, var(--bg));  /* a little above --line-2 on --bg, opaque: crossings never double */
  --org-dot: var(--fg-3);
  --org-hot: var(--red-400);
  padding-block: clamp(48px, 6vw, 88px) clamp(56px, 7vw, 104px);
}

/* --- node heads ------------------------------------------------------------
   section_head, centred: eyebrow (tree index — group), title, headcount, lead.
   Sizes step down with the depth of the node. */
.page-equipe .org-head { position: relative; }
.page-equipe .org-head .section-head {
  gap: 10px;
  max-inline-size: 44rem;
  margin: 0 auto;
}
.page-equipe .org-head .section-head__meta { order: 2; }
.page-equipe .org-head .section-head__sub {
  order: 3;
  max-inline-size: 46ch;
  font-size: var(--fs-small);
  line-height: 1.55;
  text-wrap: balance;
}
.page-equipe .org-head .eyebrow__index { font-variant-numeric: tabular-nums; }
/* a long group label goes to its own line whole, centred under the index */
.page-equipe .org-head .eyebrow { flex-wrap: wrap; row-gap: 2px; }
.page-equipe .org-head--root .section-head__sub { font-size: var(--fs-lead); }
.page-equipe .org-head--tier h2.section-head__title { font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.75rem); }
.page-equipe .org-head--branch h2.section-head__title,
.page-equipe .org-head h3.section-head__title { font-size: clamp(1.4rem, 1.15rem + .95vw, 2rem); letter-spacing: -.025em; line-height: 1.12; }
.page-equipe .org-head h4.section-head__title { font-size: var(--fs-h3); line-height: 1.2; }

/* alumni registers: title and count on a hairline */
.page-equipe .org-head--register {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding-block: 14px;
  border-block-end: 1px solid var(--line-2);
}
.page-equipe .org-register__title { font-size: var(--fs-h3); line-height: 1.2; }
.page-equipe .org-register__count {
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* wires: base styles at every width, so a layout switch never restarts a transition */
.page-equipe .org-wire__line {
  position: absolute;
  inset: 0;
  border: 0 solid var(--org-wire);
  transition: border-color var(--dur-ui) var(--ease-out);
}

/* --- junction dots (borders: a filled disc that forced colours keep) -------- */
.page-equipe :is(.org-wire__line.has-top, .org-wire__line.has-joint)::before,
.page-equipe .org-wire__line.has-bottom::after,
.page-equipe .org-head:not(.org-head--root)::before {
  content: "";
  position: absolute;
  z-index: 1;
  inline-size: 0;
  block-size: 0;
  border: 3px solid var(--org-dot);
  border-radius: 50%;
  pointer-events: none;
  transition: border-color var(--dur-ui) var(--ease-out);
}

/* =============================================================================
   ≥ 768px: the figure
   A wire is two spans: the outer one is the box that reveals (data-reveal, site.js), the
   inner .org-wire__line draws with its borders and carries the dots.
   ============================================================================= */
@media (min-width: 768px) {
  .page-equipe .org-wire { position: absolute; pointer-events: none; }

  /* trunk: down the axis of its level, a dot at either end where it meets a bar or the root */
  .page-equipe .org-wire--stem {
    inset-block-start: 0;
    inset-inline-start: 50%;
    inline-size: 1px;
    block-size: var(--org-stem);
  }
  .page-equipe .org-wire--stem > .org-wire__line { border-inline-start-width: 1px; }
  .page-equipe .org-wire__line.has-top::before { inset-block-start: -3px; inset-inline-start: -3px; }
  .page-equipe .org-wire__line.has-bottom::after { inset-block-end: -3px; inset-inline-start: -3px; }
  /* the root junction: the one red mark at rest */
  .page-equipe .org-wire__line.is-root::before {
    inset-block-start: -4px;
    inset-inline-start: -4px;
    border-width: 4px;
    border-color: var(--org-hot);
    box-shadow: 0 0 0 4px rgb(224 50 63 / .14), 0 0 14px rgb(224 50 63 / .45);
  }

  /* heads: the pin on top (where the connector lands); a twig down to the members */
  .page-equipe .org-head:not(.org-head--root, .org-head--register) { padding-block-start: 16px; }
  .page-equipe .org-head:not(.org-head--root)::before { inset-block-start: -3px; inset-inline-start: calc(50% - 3px); }
  .page-equipe :is(.org-head--root, .org-head--branch) { margin-block-end: var(--org-twig); }
  .page-equipe :is(.org-head--root, .org-head--branch)::after {
    content: "";
    position: absolute;
    inset-block-start: 100%;
    inset-inline-start: 50%;
    block-size: var(--org-twig);
    border-inline-start: 1px solid var(--org-wire);
    pointer-events: none;
    transition: border-color var(--dur-ui) var(--ease-out);
  }
  .page-equipe .org-branch > .org-head--register { margin-block-end: 6px; }

  /* levels: one 3-column grid; a wide branch spans two columns */
  .page-equipe .org-level {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--org-g);
    padding-block-start: var(--org-stem);
  }
  .page-equipe .org-level > .org-branch--wide { grid-column: span 2; }
  .page-equipe .org-level--sub {
    flex: 1 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-equipe .org-tier { position: relative; padding-block-start: var(--org-stem); }

  .page-equipe .org-branch {
    position: relative;
    display: flex;
    flex-direction: column;
    min-inline-size: 0;
    padding-block-start: var(--org-drop);
  }

  /* arm: half of the branch bar (from the gap between branches to this branch's axis) and
     the drop into its head */
  .page-equipe .org-wire--arm { inset-block-start: 0; block-size: var(--org-drop); }
  .page-equipe .org-wire--arm > .org-wire__line { border-block-start-width: 1px; }
  .page-equipe .org-wire--stem + .org-branch > .org-wire--arm { inset-inline: 50% calc(var(--org-g) / -2); }
  .page-equipe .org-wire--stem + .org-branch > .org-wire--arm > .org-wire__line { border-inline-start-width: 1px; }
  .page-equipe .org-branch:last-child > .org-wire--arm { inset-inline: calc(var(--org-g) / -2) 50%; }
  .page-equipe .org-branch:last-child > .org-wire--arm > .org-wire__line { border-inline-end-width: 1px; }

  /* tail: the branch's riser down to the merge bar, and its half of that bar */
  .page-equipe .org-wire--tail {
    position: relative;
    flex: 1 0 var(--org-drop);
  }
  .page-equipe .org-branch--parent > .org-wire--tail { flex-grow: 0; }
  .page-equipe .org-wire--tail > .org-wire__line { border-block-end-width: 1px; }
  .page-equipe .org-wire--stem + .org-branch > .org-wire--tail > .org-wire__line {
    inset-inline: 50% calc(var(--org-g) / -2);
    border-inline-start-width: 1px;
  }
  .page-equipe .org-branch:last-child > .org-wire--tail > .org-wire__line {
    inset-inline: calc(var(--org-g) / -2) 50%;
    border-inline-end-width: 1px;
  }
  /* a parent branch's tail starts where its own sub-branches merge */
  .page-equipe .org-wire--stem + .org-branch > .org-wire--tail > .has-joint::before { inset-block-start: -3px; inset-inline-start: -3.5px; }
  .page-equipe .org-branch:last-child > .org-wire--tail > .has-joint::before { inset-block-start: -3px; inset-inline-end: -3.5px; }

  /* the path to a hovered or targeted group turns red */
  .page-equipe .org-branch:is(:hover, :target) > :is(.org-wire--arm, .org-wire--tail) > .org-wire__line,
  .page-equipe :is(.org-branch, .org-tier):is(:hover, :target) > .org-level > .org-wire--stem > .org-wire__line,
  .page-equipe .org-tier:is(:hover, :target) > .org-wire--stem > .org-wire__line,
  .page-equipe :is(.org-branch, .org-root):is(:hover, :target) > :is(.org-head--root, .org-head--branch)::after {
    border-color: var(--org-hot);
  }
  .page-equipe :is(.org-branch, .org-tier):is(:hover, :target) > .org-head::before { border-color: var(--org-hot); }
}
.page-equipe .org-leads { display: grid; gap: var(--org-g); }
@media (min-width: 768px) {
  .page-equipe .org-leads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The wires draw in from the junction they leave once they scroll in (the outer span reveals;
   its own fade is turned off). Without JS or with reduced motion they are simply there. */
.page-equipe .org-wire[data-reveal] { opacity: 1; animation: none; }
@media (prefers-reduced-motion: no-preference) {
  html.js .page-equipe .org-wire:not(.is-in) > .org-wire__line { clip-path: inset(-8px -400px 100% -400px); }
  html.js .page-equipe .org-wire.is-in > .org-wire__line { animation: org-draw .7s var(--ease-in-out) backwards; }
  html.js .page-equipe .org-wire--arm.is-in > .org-wire__line { animation-duration: .8s; animation-delay: .3s; }
  html.js .page-equipe .org-wire--tail.is-in > .org-wire__line { animation-duration: 1.2s; animation-delay: .2s; }
}
@keyframes org-draw {
  from { clip-path: inset(-8px -400px 100% -400px); }
  to { clip-path: inset(-8px -400px -8px -400px); }
}

/* =============================================================================
   < 768px: the file tree
   ============================================================================= */
@media (max-width: 767.98px) {
  .page-equipe .org {
    --org-i: 22px;            /* indent per level */
    --org-s: 4px;             /* spine: the centre of a node's dot */
    --org-elbow: 9px;         /* elbow height on a group: the eyebrow's middle */
    --org-gap-y: 36px;        /* below each group */
  }
  /* hidden, not display: none, so their draw-in never restarts when the layout switches */
  .page-equipe .org-wire { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; visibility: hidden; }

  .page-equipe :is(.org-group, .org-item) { position: relative; }
  .page-equipe .org-group:not(.org-root) { padding-inline-start: var(--org-i); }
  .page-equipe .org-group { padding-block-end: var(--org-gap-y); }
  .page-equipe .org-level .org-group:is(.is-last) { padding-block-end: 0; }
  .page-equipe .org-root { padding-block-end: var(--org-gap-y); }

  /* group: elbow from the parent's spine to the node's dot, then the spine goes on */
  .page-equipe .org-group:not(.org-root)::before,
  .page-equipe .org-group:not(.is-last)::after,
  .page-equipe .org-item::before,
  .page-equipe .org-item:not(:last-child)::after,
  .page-equipe .org-head::after {
    content: "";
    position: absolute;
    border: 0 solid var(--org-wire);
    pointer-events: none;
    transition: border-color var(--dur-ui) var(--ease-out);
  }
  .page-equipe .org-group:not(.org-root)::before {
    inset-block-start: 0;
    inset-inline-start: var(--org-s);
    inline-size: calc(var(--org-i) - var(--org-s));
    block-size: var(--org-elbow);
    border-inline-start-width: 1px;
    border-block-end-width: 1px;
  }
  .page-equipe .org-group:not(.is-last)::after {
    inset-block: var(--org-elbow) 0;
    inset-inline-start: var(--org-s);
    border-inline-start-width: 1px;
  }

  /* heads: left-aligned after the node's dot; the node's own spine leaves from under it */
  .page-equipe .org-head { padding-inline-start: 18px; padding-block-end: 18px; }
  .page-equipe .org-head .section-head { justify-items: start; margin: 0; text-align: start; }
  .page-equipe .org-head .section-head .eyebrow { justify-content: start; }
  .page-equipe .org-head::before,
  .page-equipe .org-head--root::before {
    content: "";
    position: absolute;
    inset-block-start: calc(var(--org-elbow) - 3px);
    inset-inline-start: calc(var(--org-s) - 3px);
    inline-size: 0;
    block-size: 0;
    border: 3px solid var(--org-dot);
    border-radius: 50%;
  }
  .page-equipe .org-head--root::before {
    inset-block-start: calc(var(--org-elbow) - 4px);
    inset-inline-start: calc(var(--org-s) - 4px);
    border-width: 4px;
    border-color: var(--org-hot);
    box-shadow: 0 0 0 3px rgb(224 50 63 / .14), 0 0 12px rgb(224 50 63 / .45);
  }
  .page-equipe .org-head::after {
    inset-block: calc(var(--org-elbow) + 4px) 0;
    inset-inline-start: var(--org-s);
    border-inline-start-width: 1px;
  }
  .page-equipe .org-head--register { padding-inline-start: 18px; padding-block: 0 12px; }
  .page-equipe .org-group:has(> .org-head--register) { --org-elbow: 12px; }
  .page-equipe .org-head .section-head__sub { text-wrap: pretty; }

  /* members: one indent further, an elbow to each (at the avatar's middle) */
  .page-equipe :is(.roster, .org-leads, .alumni__list) { padding-inline-start: var(--org-i); }
  .page-equipe .alumni__list { columns: auto; }
  .page-equipe .org-item { --org-y: 36px; --org-row-gap: 1px; }
  .page-equipe .org-leads { gap: 14px; }
  .page-equipe .org-leads .org-item { --org-y: 56px; --org-row-gap: 14px; }
  .page-equipe .roster--faculty .org-item { --org-y: 52px; }
  .page-equipe .alumni__list .org-item { --org-y: 23px; --org-row-gap: 0px; }
  .page-equipe .org-item::before {
    inset-block-start: calc(var(--org-row-gap) * -1);
    inset-inline-start: calc(var(--org-s) - var(--org-i));
    inline-size: calc(var(--org-i) - var(--org-s) - 2px);
    block-size: calc(var(--org-y) + var(--org-row-gap));
    border-inline-start-width: 1px;
    border-block-end-width: 1px;
  }
  .page-equipe .org-item:not(:last-child)::after {
    inset-block: var(--org-y) calc(var(--org-row-gap) * -1);
    inset-inline-start: calc(var(--org-s) - var(--org-i));
    border-inline-start-width: 1px;
  }

  /* a targeted or hovered person: the elbow to them turns red */
  .page-equipe .org-item:is(:hover, :has(> :target))::before { border-color: var(--org-hot); }
  .page-equipe .org-group:is(:hover, :target):not(.org-root)::before,
  .page-equipe .org-group:is(:hover, :target) > .org-head::before { border-color: var(--org-hot); }
}

/* --- person parts ---------------------------------------------------------- */
.page-equipe .person__tags { gap: 6px; }
/* keywords: a run of text whose separators never start a line; short keywords hold together
   (no-break spaces from the template) */
.page-equipe .person__kw {
  color: var(--fg-2);
  font-size: .875rem;
  line-height: 1.6;
  text-wrap: pretty;
}
.page-equipe .person__kw > li { display: inline; }
.page-equipe .person__kw > li:not(:last-child)::after {
  content: "\00a0·";
  content: "\00a0·" / "";
  color: var(--fg-3);
}

/* --- profile links: always labelled ------------------------------------------- */
.page-equipe .person__links { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.page-equipe .plink {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-inline-size: 100%;
  min-block-size: 32px;
  padding: .3rem .65rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: rgb(255 255 255 / .015);
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: var(--fs-label-sm);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: var(--tracking-mono);
  text-decoration: none;
  transition: color var(--dur-micro), border-color var(--dur-micro), background-color var(--dur-micro);
}
/* a 40px+ target around the 32px pill */
.page-equipe .plink::before { content: ""; position: absolute; inset: -4px -3px; }
.page-equipe .plink > svg { flex: none; color: var(--fg-3); transition: color var(--dur-micro), translate var(--dur-ui) var(--ease-out); }
.page-equipe .plink:hover { border-color: rgb(224 50 63 / .5); background: var(--red-950); color: var(--fg); }
.page-equipe .plink:hover > svg { color: var(--red-300); }
.page-equipe .plink:hover .plink__ext { translate: 2px -2px; }
.page-equipe .plink__text { min-inline-size: 0; overflow-wrap: anywhere; }

/* labelled links (coordinator cards): body-size text, 44px targets */
.page-equipe .person__links--labelled { gap: 10px; }
.page-equipe .person__links--labelled .plink {
  gap: 10px;
  min-block-size: 44px;
  padding: .55rem 1rem;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: .875rem;
  letter-spacing: 0;
  line-height: 1.25;
}
.page-equipe .person__links--labelled .plink::before { content: none; }
.page-equipe .person__links--labelled .plink--email .plink__text {
  font-family: var(--font-mono);
  font-size: .8125rem;
  letter-spacing: var(--tracking-mono);
}

/* --- avatars: only People's scan-line flourish (the ring, glow and ridges are site.css) --- */
.page-equipe .avatar::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  block-size: 45%;
  background: linear-gradient(to bottom, transparent, rgb(224 50 63 / .14) 82%, rgb(255 90 99 / .75) calc(100% - 1px), transparent 100%);
  opacity: 0;
  translate: 0 -100%;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .page-equipe [data-person]:hover .avatar::after { animation: people-scan 1.1s var(--ease-in-out) both; }
}
@keyframes people-scan {
  0% { opacity: 0; translate: 0 -100%; }
  12% { opacity: 1; }
  82% { opacity: 1; }
  100% { opacity: 0; translate: 0 122%; }
}

/* --- coordinators: feature cards -------------------------------------------------- */
.page-equipe .person--lead {
  container: people-lead / inline-size;
  --pad: clamp(20px, 2.8vw, 36px);
  display: flex;
  flex-direction: column;
  block-size: 100%;
  gap: 0;
  padding: 0;
  overflow: clip;
  background:
    radial-gradient(ellipse 55% 70% at 100% 0%, rgb(74 10 18 / .34), transparent 70%),
    linear-gradient(180deg, rgb(255 255 255 / .022), transparent 42%),
    var(--bg-2);
  transition: border-color var(--dur-ui) var(--ease-out);
}
.page-equipe .person--lead:hover { border-color: var(--line-2); }
.page-equipe .person--lead:target { border-color: rgb(224 50 63 / .55); }
.page-equipe .lead__body {
  display: grid;
  flex: 1 0 auto;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "avatar id"
    "tags tags";
  align-content: start;
  align-items: center;
  gap: 20px 18px;
  padding: var(--pad);
}
.page-equipe .person--lead .avatar { grid-area: avatar; --avatar-size: 96px; --_rk: 1.2; --_ra: .11; }
.page-equipe .person--lead .person__id { grid-area: id; gap: 8px; }
.page-equipe .person--lead .person__name {
  font-size: clamp(1.4rem, 1.15rem + .9vw, 1.9rem);
  line-height: 1.12;
  letter-spacing: -.025em;
}
.page-equipe .person--lead .person__tags { grid-area: tags; }
.page-equipe .lead__foot {
  padding: 16px var(--pad) 18px;
  border-block-start: 1px solid var(--line);
  background: rgb(255 255 255 / .012);
}
/* narrow cards: one link per row, so both cards' feet always have the same structure */
@container people-lead (max-width: 559px) {
  .page-equipe .person--lead .person__links--labelled { flex-direction: column; align-items: flex-start; }
}
/* the narrowest cards (320px screens): tighter padding, the md avatar, so the e-mail address
   keeps one line */
@container people-lead (max-width: 299px) {
  .page-equipe :is(.lead__body, .lead__foot) { --pad: 16px; }
  .page-equipe .person--lead .avatar { --avatar-size: 64px; --_rk: 1; --_ra: .13; }
  .page-equipe .person--lead .person__links--labelled .plink { padding-inline: .75rem; gap: 8px; }
  .page-equipe .person--lead .person__links--labelled .plink--email .plink__text { font-size: .75rem; letter-spacing: 0; }
}
@container people-lead (min-width: 500px) {
  .page-equipe .lead__body {
    grid-template-areas:
      "avatar id"
      "avatar tags";
    grid-template-rows: auto 1fr;
    align-items: start;
    column-gap: clamp(24px, 5cqi, 36px);
  }
  .page-equipe .person--lead .avatar { --avatar-size: 144px; --_rk: 1.45; --_ra: .095; }
}

/* --- member grids: ruled ---------------------------------------------------- */
/* Every cell draws a 1px ring that overlaps its neighbours' in the 1px gap (as .ruled), so
   lines never double. A 2-column faculty grid (from 960px) closes an odd last row with a
   hatched cell. */
.page-equipe .roster {
  display: grid;
  gap: 1px;
  padding: 1px;
  grid-template-columns: minmax(0, 1fr);
}
.page-equipe .roster > li { display: grid; }
.page-equipe .roster .person,
.page-equipe .roster::after { box-shadow: 0 0 0 1px var(--line); }
.page-equipe .roster::after {
  content: "";
  display: none;
  background: repeating-linear-gradient(-45deg, rgb(255 255 255 / .028) 0 1px, transparent 1px 9px);
}
@media (min-width: 960px) {
  .page-equipe .roster[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-equipe .roster[data-cols="2"][data-fill="1"]::after { display: block; }
}

.page-equipe .roster .person {
  background: var(--bg);
  transition: background-color var(--dur-ui) var(--ease-out);
}
.page-equipe .roster .person:is(:hover, :target) { background: var(--bg-1); }

/* faculty cells: avatar and identity, keywords, then the labelled links; wide cells (440px+)
   put the avatar beside everything */
.page-equipe .person--faculty { container: people-cell / inline-size; }
.page-equipe .person--faculty .person__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "avatar id"
    "kw kw"
    "links links";
  align-content: start;
  align-items: center;
  gap: 14px 16px;
  block-size: 100%;
  padding: clamp(18px, 2vw, 24px);
}
.page-equipe .person--faculty .avatar { grid-area: avatar; }
.page-equipe .person--faculty .person__id { grid-area: id; }
.page-equipe .person--faculty .person__kw { grid-area: kw; }
.page-equipe .person--faculty .person__links { grid-area: links; }
.page-equipe .person--faculty .person__name {
  font-size: clamp(1.125rem, 1.05rem + .25vw, 1.25rem);
  line-height: 1.25;
  letter-spacing: -.015em;
}
/* narrow cells (the 1-column collaborators branch at 768–959px): the avatar above, so a long
   role or name keeps the whole width */
@container people-cell (max-width: 299px) {
  .page-equipe .person--faculty .person__body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "avatar"
      "id"
      "kw"
      "links";
  }
}
@container people-cell (min-width: 440px) {
  .page-equipe .person--faculty .person__body {
    grid-template-areas:
      "avatar id"
      "avatar kw"
      "avatar links";
    align-items: start;
    column-gap: 22px;
    row-gap: 10px;
  }
}

/* student cells: avatar · name and "since", the links under the name */
.page-equipe .person--student {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "avatar id"
    ". links";
  align-content: start;
  align-items: center;
  gap: 10px 12px;
  padding: 14px clamp(14px, 1.4vw, 18px);
}
.page-equipe .person--student .avatar { grid-area: avatar; }
.page-equipe .person--student .person__id { grid-area: id; gap: 3px; }
.page-equipe .person--student .person__links { grid-area: links; }
.page-equipe .person--student .person__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.page-equipe .person__since {
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: var(--fs-label-sm);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: var(--tracking-mono);
}

/* --- alumni: name registers --------------------------------------------------------- */
.page-equipe .alumni__list {
  columns: 14rem;
  column-gap: var(--org-g);
  counter-reset: alumni;
}
.page-equipe .alumni__list > li {
  padding-block: 12px;
  border-block-end: 1px solid var(--line);
  break-inside: avoid;
  color: var(--fg-2);
  counter-increment: alumni;
}
.page-equipe .alumni__name { display: flex; align-items: baseline; gap: 14px; }
.page-equipe .alumni__name::before {
  content: counter(alumni, decimal-leading-zero);
  content: counter(alumni, decimal-leading-zero) / "";
  flex: none;
  min-inline-size: 2ch;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: var(--fs-label-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-mono);
  font-variant-numeric: tabular-nums;
}

/* --- join band: how students start research here ------------------------------------ */
.page-equipe .people-join { padding-block-start: 0; }
.page-equipe .join-steps {
  display: grid;
  gap: 1px;
  margin-block-start: clamp(20px, 3vw, 32px);
  padding: 1px;
  list-style: none;
}
.page-equipe .join-steps__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 4px 14px;
  padding: 16px 18px;
  background: rgb(6 6 7 / .55);
  box-shadow: 0 0 0 1px var(--line-2);
}
.page-equipe .join-steps__index {
  grid-row: span 2;
  color: var(--red-300);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: var(--tracking-mono);
  font-variant-numeric: tabular-nums;
}
.page-equipe .join-steps__title { font-size: 1.0625rem; line-height: 1.3; }
.page-equipe .join-steps__text { color: var(--fg-2); font-size: var(--fs-small); line-height: 1.55; }
@media (min-width: 900px) {
  .page-equipe .join-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- forced colours · print ---------------------------------------------------------- */
@media (forced-colors: active) {
  .page-equipe .org { --org-wire: CanvasText; --org-dot: CanvasText; --org-hot: Highlight; }
  .page-equipe .roster .person,
  .page-equipe .roster::after,
  .page-equipe .join-steps__item { outline: 1px solid CanvasText; }
}
@media print {
  /* hidden, not display: none, so their draw-in never restarts when the layout switches */
  .page-equipe .org-wire { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; visibility: hidden; }
  .page-equipe .org-level { padding-block-start: 16pt; }
}
