/* ═══════════════════════════════════════════════════════════════
   Organizing committee
   ---------------------------------------------------------------
   155 names across eight committees. A flat list of that is unusable,
   so the page gives it three affordances: a sticky index that tracks
   where you are, a search that filters every list at once, and two
   densities — a card for people with a named role, a chip for the
   long membership lists.
   ═══════════════════════════════════════════════════════════════ */

.committee-shell {
  display: grid;
  min-width: 0;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  max-width: 1120px;
}

/* min-width:0 or the nav strip's eight nowrap links set the grid's
   min-content width, which drags the whole page sideways on a phone. */
.committee-aside { position: sticky; top: 92px; min-width: 0; }

.committee-search { position: relative; display: flex; align-items: center; margin-bottom: 10px; }
.committee-search svg {
  position: absolute;
  left: 12px;
  width: 15px;
  height: 15px;
  color: var(--ink-subtle);
  pointer-events: none;
}
.committee-search input {
  width: 100%;
  min-height: 42px;
  padding: 10px 34px;
  font-family: var(--font-body);
  font-size: var(--text-body-sm);
  font-weight: 500;
  color: var(--ink);
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.committee-search input::-webkit-search-decoration,
.committee-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.committee-search input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px var(--brand-blue-ring);
}
/* display:grid would override the browser's own [hidden] rule. */
.committee-search-clear[hidden] { display: none; }
.committee-search-clear {
  position: absolute;
  right: 8px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: var(--surface-sunk);
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.committee-search-clear:hover { background-color: var(--line); color: var(--ink); }

.committee-search-status {
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-muted);
  margin: 0 0 12px;
}
.committee-search-status:empty { display: none; }

.committee-nav { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.committee-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}
.committee-nav-link:hover { background-color: var(--surface); color: var(--ink); text-decoration: none; }
.committee-nav-link.is-active { background-color: var(--brand-blue-soft); color: var(--brand-blue); }
.committee-nav-count {
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-subtle);
}
.committee-nav-link.is-active .committee-nav-count { color: var(--brand-blue); }

/* ── Committee blocks ── */
.committee-main { min-width: 0; }

.committee-block {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 28px;
  margin-bottom: 16px;
  scroll-margin-top: 96px;
}
.committee-block[hidden] { display: none; }

.committee-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.committee-block-head h2 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.committee-block-head p {
  font-size: var(--text-caption);
  line-height: 1.5;
  color: var(--ink-muted);
  margin: 4px 0 0;
  max-width: 52ch;
}
.committee-tally {
  flex-shrink: 0;
  min-width: 34px;
  height: 26px;
  padding: 0 9px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background-color: var(--surface-sunk);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}

.committee-group + .committee-group { margin-top: 22px; }
.committee-group[hidden] { display: none; }

.group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin: 0 0 12px;
}
.group-count {
  padding: 1px 6px;
  border-radius: 999px;
  background-color: var(--brand-blue-soft);
  font-size: 10px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* ── People with a named role ── */
.person-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 10px;
}
.person-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 12px;
  background-color: var(--surface-sunk);
  border: 1px solid transparent;
  transition: border-color 180ms var(--ease-out), background-color 180ms var(--ease-out);
}
.person-card:hover { background-color: var(--surface); border-color: var(--line-strong); }
.person-card[hidden] { display: none; }

/* A monogram beats a stock avatar: it is real, and it costs no request. */
.person-monogram {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--brand-blue), var(--brand-indigo));
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.person-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.person-text strong {
  font-size: var(--text-body-sm);
  font-weight: 650;
  color: var(--ink);
  line-height: 1.35;
}
.person-text span { font-size: 11px; line-height: 1.4; color: var(--ink-muted); }

/* ── Long membership lists ── */
.person-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 3px 18px;
}
.person-chip {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 2px;
  border-radius: 7px;
  transition: background-color 150ms var(--ease-out);
}
.person-chip:hover { background-color: var(--surface-sunk); }
.person-chip[hidden] { display: none; }
.chip-dot {
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--brand-gold);
  transform: translateY(-2px);
}
.chip-text { font-size: var(--text-body-sm); line-height: 1.4; color: var(--ink); min-width: 0; }
.chip-org { display: block; font-size: 10px; color: var(--ink-subtle); line-height: 1.4; }

.committee-noresults {
  padding: 40px 24px;
  text-align: center;
  font-size: var(--text-body-sm);
  color: var(--ink-muted);
  background-color: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
}

/* ── Tablet and below ── */
@media (max-width: 1000px) {
  .committee-shell { grid-template-columns: 1fr; gap: 18px; }

  /* The index becomes a scrolling strip pinned under the nav. */
  .committee-aside {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 10px 0;
    margin: 0 -16px;
    background-color: var(--surface-sunk);
  }
  .committee-search,
  .committee-search-status { margin: 0 16px 8px; }
  .committee-nav {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    padding: 0 16px 2px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 90%, transparent 100%);
    mask-image: linear-gradient(to right, #000 90%, transparent 100%);
  }
  .committee-nav::-webkit-scrollbar { display: none; }
  .committee-nav-link {
    flex-shrink: 0;
    background-color: var(--surface);
    border: 1px solid var(--line);
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .committee-block { padding: 20px 18px; border-radius: 16px; }
  .committee-block-head { gap: 12px; padding-bottom: 14px; margin-bottom: 16px; }
  .committee-block-head h2 { font-size: 17px; }
  .person-cards { grid-template-columns: 1fr; }
  .person-chips { grid-template-columns: 1fr; gap: 1px; }
  .person-monogram { width: 34px; height: 34px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .person-card, .person-chip, .committee-nav-link { transition: none; }
}
