/* ==========================================================================
   Alumni Association  —  /page/alumni/
   --------------------------------------------------------------------------
   The committee is a grid of cards, one per member - see its own block
   below. The calendar is a table, and becomes one card per row below 700px:
   six columns at phone width either run off the screen or break a venue
   across four lines.

   The stacked layout prints each column's name from data-label on the cell,
   and the header row is moved off-screen rather than display: none, so a
   screen reader still announces which column a value belongs to.
   ========================================================================== */

.alum-pane__head {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: clamp(1.05rem, .98rem + .4vw, 1.3rem);
  font-weight: 800;
}
.alum-lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .92rem;
}
.alum-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: .85rem;
  font-style: italic;
}

/* A tab whose document has not arrived. Quiet rather than an error: it is a
   statement about the Association's paperwork, not a fault on the page. */
.alum-pending {
  margin: 0;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--page-alt);
  color: var(--muted);
  font-size: .92rem;
}

.alum-doc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  background: var(--accent-deep);
  color: #fff;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
}
.alum-doc:hover { background: var(--brand); color: #fff; }
.alum-doc:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ==========================================================================
   The committee  —  a card each, not a table row
   --------------------------------------------------------------------------
   Seven people with a portrait, a name and an office. A photograph inside a
   table cell makes the row as tall as the picture and leaves the other two
   columns mostly white space, so these are cards on a grid.

   A COUNTED NUMBER OF COLUMNS, not auto-fill. auto-fill on this shell fits
   six, which leaves the seventh member alone on a row of his own; four
   across reads as a board of office bearers, 4 + 3. It also keeps the count
   from changing under a scrollbar, and an eighth member simply fills the
   second row.
   ========================================================================== */
.alum-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));   /* phone first */
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 576px) {
  .alum-people { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
}
@media (min-width: 992px) {
  .alum-people { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* A 300px card carries a bigger portrait than a 170px one did. */
  .alum-person { padding: 26px 16px 20px; }
  .alum-person__photo { width: 112px; height: 112px; }
  .alum-person__photo--none { font-size: 2.2rem; }
}

.alum-people__item { display: flex; }   /* so the card fills the row height */

.alum-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 22px 14px 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-xs);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.alum-person:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.alum-person:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* The card is a button, which is not obvious from a portrait and a name.
   This says so, and comes forward on hover. */
.alum-person__more {
  margin-top: 8px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.alum-person:hover .alum-person__more,
.alum-person:focus-visible .alum-person__more { color: var(--accent-deep); }

@media (prefers-reduced-motion: reduce) {
  .alum-person { transition: none; }
  .alum-person:hover { transform: none; }
}

.alum-person__photo {
  width: 96px;
  height: 96px;
  margin-bottom: 10px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;   /* a head sits in the top half of a square */
  /* The ring reads as a frame on both the photographs and the initials, and
     keeps a light background from bleeding into the page behind it. */
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px rgb(var(--accent-rgb) / 45%);
  background: var(--page-alt);
}

/* The stand-in when there is no photograph yet. Same circle, same ring, so
   the row of cards keeps its rhythm. */
.alum-person__photo--none {
  display: grid;
  place-items: center;
  background: rgb(var(--accent-rgb) / 14%);
  color: var(--accent-deep);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.alum-person__name {
  color: var(--ink);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.3;
}
.alum-person__role {
  color: var(--accent-deep);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

@media (max-width: 575.98px) {
  .alum-person { padding: 18px 10px 14px; }
  .alum-person__photo { width: 78px; height: 78px; }
  .alum-person__photo--none { font-size: 1.5rem; }
  .alum-person__name { font-size: .88rem; }
  .alum-person__role { font-size: .7rem; }
}

/* ==========================================================================
   One member's details  —  a native <dialog>
   --------------------------------------------------------------------------
   showModal() gives the focus trap, the backdrop and Escape-to-close, so
   there is no z-index race with the fixed header to lose: the top layer sits
   above everything by definition.

   :modal rather than [open] - [open] also matches a non-modal dialog, and
   these are only ever opened modally.
   ========================================================================== */
.alum-modal {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg, 16px);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 60px rgb(0 0 0 / 28%);
  overflow: auto;
}
.alum-modal::backdrop { background: rgb(10 16 28 / 62%); }

/* The close button floats over the head, so the head keeps its own padding
   and the portrait is not pushed down by a row that holds one icon. */
.alum-modal__dismiss { position: sticky; top: 0; height: 0; text-align: right; z-index: 1; }
.alum-modal__close {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 10px 10px 0 0;
  border: 0;
  border-radius: 50%;
  background: rgb(var(--accent-rgb) / 16%);
  color: var(--accent-deep);
  cursor: pointer;
}
.alum-modal__close:hover { background: var(--accent-deep); color: #fff; }
.alum-modal__close:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.alum-modal__head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
}
.alum-modal__photo {
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px rgb(var(--accent-rgb) / 45%);
  background: var(--page-alt);
}
.alum-modal__photo--none {
  display: grid;
  place-items: center;
  background: rgb(var(--accent-rgb) / 14%);
  color: var(--accent-deep);
  font-size: 1.7rem;
  font-weight: 800;
}
.alum-modal__name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.25;
}
.alum-modal__role {
  margin: 3px 0 0;
  color: var(--accent-deep);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.alum-modal__facts { margin: 0; padding: 18px 22px 22px; }
.alum-fact {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 0 10px;
  align-items: start;
}
.alum-fact + .alum-fact { margin-top: 14px; }
.alum-fact__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgb(var(--accent-rgb) / 14%);
  color: var(--accent-deep);
}
.alum-fact__value {
  margin: 0;
  padding-top: 5px;              /* optical, to sit level with the icon */
  font-size: .92rem;
  line-height: 1.5;
  overflow-wrap: anywhere;       /* a long address wraps rather than widening
                                    the panel past the screen */
}
.alum-fact__value a { color: var(--accent-deep); text-decoration: none; font-weight: 700; }
/* Between two numbers. Outside the links so the comma is not underlined on
   hover and is not part of what a tap on the number hits. */
.alum-fact__sep { margin-right: 6px; color: var(--muted); }
.alum-fact__value a:hover { text-decoration: underline; }
.alum-fact__value a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (max-width: 575.98px) {
  .alum-modal__head { padding: 20px 16px 16px; gap: 13px; }
  .alum-modal__photo { width: 68px; height: 68px; }
  .alum-modal__facts { padding: 16px 16px 20px; }
}

/* ---- the tables --------------------------------------------------------- */
.alum-table-wrap {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow-x: auto;              /* a narrow laptop scrolls rather than clips */
}
.alum-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .89rem;
}
.alum-table th,
.alum-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.alum-table tbody tr:last-child th,
.alum-table tbody tr:last-child td { border-bottom: 0; }
.alum-table tbody tr:hover { background: rgb(var(--accent-rgb) / 4%); }

.alum-table thead th {
  /* 8%, the tint the fee and telephone tables use: --accent-deep on 10% falls
     under the 4.5:1 a heading this size needs. */
  background: rgb(var(--accent-rgb) / 8%);
  color: var(--accent-deep);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.alum-table tbody th { font-weight: 700; color: var(--ink); }

/* Campus or outstation, as a quiet pill rather than a word in a column. */
.alum-kind {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.alum-kind--campus {
  background: rgb(var(--accent-rgb) / 16%);
  color: var(--accent-deep);
}
.alum-kind--outstation {
  background: rgb(16 45 82 / 10%);
  color: var(--brand);
}

/* ==========================================================================
   One card per row, below 700px
   ========================================================================== */
@media (max-width: 699.98px) {
  .alum-table-wrap {
    background: none;
    box-shadow: none;
    overflow-x: visible;
  }
  .alum-table thead {
    /* Not display: none - that takes the header out of the accessibility tree
       too, and a screen reader still uses it to announce cells. */
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .alum-table,
  .alum-table tbody,
  .alum-table tr,
  .alum-table th,
  .alum-table td { display: block; }

  .alum-table tr {
    margin-bottom: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-xs);
  }
  .alum-table tr:last-child { margin-bottom: 0; }
  .alum-table tr:hover { background: var(--paper); }

  .alum-table th,
  .alum-table td {
    padding: 0;
    border-bottom: 0;
  }
  .alum-table td { margin-top: 9px; }

  .alum-table td::before,
  .alum-table tbody th::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .alum-table tbody th { font-size: 1rem; }

}
