/* Person and room SURFACES — the profile masthead, the tab strip, and the four
 * ruled row lists (rooms, profile history, contribution calendar, partners).
 *
 * Split out of views.css, which passed 1200 lines during the Almanac pass. This
 * file is loaded AFTER views.css in index.html and the cascade depends on that
 * order: rules here are allowed to refine the shared row and leaf language
 * defined there.
 */
/* ============================================================================
 * PROFILE
 * ========================================================================== */

/* The masthead. A rule above it and the avatar in the rail column — no box, no
 * shadow, no radius. Same grid as every .leaf on the site. */
.profile-card {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  align-items: start;
  gap: 0 var(--gap-lg);
  padding-block: var(--gap-lg) var(--gap);
  border-top: 1px solid var(--rule);
  background: none; border-radius: 0; box-shadow: none;
}

/* Inline-block, not a stretched grid item: the presence dot is positioned
 * against the avatar's own box, and a full-width rail column would fling it to
 * the far edge of the margin. */
.profile-avatar { position: relative; display: inline-block; width: fit-content; }
.presence-dot {
  position: absolute; right: 2px; bottom: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 3px solid var(--surface);
  background: var(--void);
}
.profile-avatar.is-online .presence-dot { background: var(--live); }

.profile-main { min-width: 0; }
.profile-name-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.profile-name { font-size: var(--t-h1); letter-spacing: -0.03em; line-height: 1.05; }

.profile-id-row { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.profile-uid {
  padding: 3px 8px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line-soft);
  color: var(--text-dim); font-family: var(--mono); font-size: 11.5px;
}
.copy-btn {
  padding: 3px 9px; border-radius: var(--radius);
  background: transparent; border: 1px solid var(--line);
  color: var(--text-dim); font: inherit; font-size: 11.5px; cursor: pointer;
  transition-property: color, border-color; transition-duration: var(--fast);
}
.copy-btn:hover { color: var(--text); border-color: var(--text-mute); }

.profile-bio {
  margin-top: 10px; max-width: 62ch;
  color: var(--text-dim); font-size: 14px;
}

/* One quiet mono line: three counters we mirror from upstream plus "last seen",
 * which used to be a right-hand aside of its own. Nothing here was measured by
 * us, so nothing here competes with the presence sentence below. */
.profile-counts {
  margin-top: 10px;
  display: flex; flex-wrap: wrap; gap: var(--gap);
  font-family: var(--mono); font-size: var(--t-fine);
  font-variant-numeric: tabular-nums;
  color: var(--text-mute);
}
.profile-counts strong { font-weight: 500; color: var(--text-dim); }

/* ============================================================================
 * TABS
 * ========================================================================== */

.tabs { margin-top: var(--gap-lg); }

/* Sticky, and parked directly under the header bar rather than beneath it. The
 * bar is opaque and a click target across the full width, so anything that
 * scrolls under it is not merely hidden — it cannot be clicked at all. Tabs are
 * the one control a reader reaches for repeatedly, so they stay in reach.
 * The offset is exactly --topbar-h: the bar is flush now, not floated 10px
 * down, so any extra here would open a strip of page between the two. */
/* Ledger tabs: a rule across the strip, and the active tab is marked by ink
 * weight plus a 2px underline. The old filled-accent tab put white on --accent,
 * which measured 1.8:1 in dark mode and made this strip unreadable on every
 * person page. Emphasis here comes from rule weight, never from a fill.
 * The background is opaque because the strip is sticky over ruled paper. */
.tabstrip {
  position: sticky;
  top: var(--topbar-h);
  z-index: 20;
  display: flex;
  background: var(--bg);
  border: none;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
}

.tab {
  position: relative;
  flex: 1; min-height: 44px; padding: 0 16px;
  background: transparent; border: none;
  color: var(--text-mute); font: inherit; font-size: var(--t-small); font-weight: 500;
  cursor: pointer; text-align: center; white-space: nowrap;
  transition-property: color, background-color; transition-duration: var(--fast);
}
.tab:hover { color: var(--text); background: var(--ink-wash); }
.tab.is-active { background: transparent; color: var(--text); font-weight: 650; }
.tab.is-active:hover { background: var(--ink-wash); }
.tab.is-active::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--text);
}

.tabpanel { padding-top: var(--gap-lg); }

/* ============================================================================
 * ROOM CARDS
 * ========================================================================== */

/* Ruled rows, one column — the same object as the duo ledger and the partner
 * list, so the same thing looks the same wherever it appears. Faces stay: they
 * are the social object and they carry information here. */
.room-cards {
  margin-top: var(--gap);
  display: block;
  border-top: 1px solid var(--rule);
}

.room-card {
  display: flex; flex-direction: column;
  background: none;
  border: none;
  border-bottom: 1px solid var(--rule-faint);
  border-radius: 0;
  transition-property: background-color; transition-duration: var(--fast);
}
.room-card:hover { background: var(--ink-wash); }
/* Live is a marker in the left edge, not a tinted box. */
.room-card.is-live { box-shadow: inset 2px 0 0 var(--live); }

.room-card-head {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 10px 6px;
}
.room-card-title { min-width: 0; flex: 1; }
.room-langs { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font-size: 14px; }
.room-langs strong { font-weight: 650; }
.room-langs .dim { font-size: 12px; }
.room-topic {
  margin-top: 2px; color: var(--accent); font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.live-pill {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  padding: 3px 9px; border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--live) 14%, transparent);
  color: var(--live); font-size: 11px; font-weight: 600;
}

.room-faces {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 4px 10px 10px;
  min-height: 52px;
}
.face { display: inline-flex; border-radius: 50%; }
.face.is-here .avatar { box-shadow: 0 0 0 2px var(--live); }
/* A button, not an ornament: it opens the roster. The dashed ring says "there
 * is more behind this" where the solid rings around it say "this is a person". */
.face-more {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px dashed var(--line);
  background: none; padding: 0; cursor: pointer;
  color: var(--text-mute); font: inherit; font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  transition-property: color, border-color, background-color;
  transition-duration: var(--fast);
}
.face-more:hover { color: var(--accent); border-color: var(--accent); }
/* The site-wide focus ring squares its corners; this control is a circle. */
.face-more:focus-visible { border-radius: 50%; }
.face-more[aria-expanded='true'] {
  border-style: solid; border-color: var(--accent);
  background: var(--accent-soft); color: var(--accent);
}

.room-card-foot {
  margin-top: auto;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px 10px;
  border-top: none;
  background: none;
  color: var(--text-dim); font-size: var(--t-fine);
  font-variant-numeric: tabular-nums;
}
.foot-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.foot-icon { font-size: 11px; opacity: 0.75; }
.room-details {
  margin-left: auto;
  background: none; border: none; padding: 0;
  color: var(--accent); font: inherit; font-size: 12px; cursor: pointer;
}
.room-details:hover { text-decoration: underline; text-underline-offset: 2px; }

.room-drawer {
  padding: var(--gap);
  border-top: 1px solid var(--line-soft);
  background: var(--bg-sunk);
}
.drawer-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--gap); margin-bottom: 10px; font-size: 12.5px;
}
.drawer-link { color: var(--accent); font-size: 12px; }
.drawer-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ----------------------------------------------------------- room sheet */

/* One room, one surface. Every row is a person AND their bar on a shared
 * clock, so there is nothing to toggle between: the roster is the timeline.
 *
 * Column widths are shared by the axis header and every row, which is what
 * keeps the ticks over the bars they label. */
.sheet {
  --sheet-who: minmax(0, 1.5fr);
  --sheet-track: minmax(0, 3fr);
  --sheet-times: minmax(0, 1.4fr);
  --sheet-dur: 6rem;
}
.sheet-line { margin: 0 0 10px; font-size: 12.5px; }
.is-here-count { color: var(--live); }

/* One template, used by the axis and by every row. They must stay literally
 * the same declaration — a tick is only meaningful if it sits in the same
 * column as the bar it describes. */
.sheet-axis, .sheet-row {
  display: grid; align-items: center; gap: 10px;
  grid-template-columns: 2.2ch var(--sheet-who) var(--sheet-track) var(--sheet-times) var(--sheet-dur);
  /* Shared, and load-bearing: `ch` resolves against each element's own font, so
   * an axis at a different size gets a different first column and slides every
   * tick off its bar. */
  font-size: 12.5px;
}
/* Pinned to the top of the scroll box: scrolling to row 40 with the clock gone
 * leaves forty bars and nothing to read them against. */
.sheet-axis {
  position: sticky; top: 0; z-index: 1;
  height: 20px;
  background: var(--bg-sunk);
  border-bottom: 1px solid var(--line-soft);
}
.sheet-axis-gap { display: block; }
.sheet-track { position: relative; height: 16px; }
.sheet-track-axis { height: 100%; }
.sheet-tick {
  position: absolute; bottom: 0; transform: translateX(-50%);
  font-size: 10px; color: var(--text-mute);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* The scroll lives here, around both, so the scrollbar narrows the axis and
 * the rows by the same amount.
 *
 * padding-right keeps the duration column off the scrollbar — flush against it
 * the numbers read as if the bar were sitting on them. scrollbar-gutter
 * reserves the track whether or not it is needed, so a room of six people and
 * a room of sixty put their durations in the same place. */
.sheet-scroll {
  max-height: 360px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding-right: 12px;
}
.sheet-rows {
  list-style: none; margin: 0; padding: 0;
  counter-reset: sheet;
}
.sheet-row {
  counter-increment: sheet;
  padding: 4px 0;
  border-bottom: 1px solid var(--line-soft);
}
/* The ordinal answers "who got here first" — content, not decoration. It is
 * generated, so the list is an <ol> and carries the same fact for readers who
 * never see the glyph. */
.sheet-row::before {
  content: counter(sheet);
  color: var(--text-mute); font-size: 11px;
  font-variant-numeric: tabular-nums; text-align: right;
}
.sheet-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sheet-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition-property: color; transition-duration: var(--fast);
}
.sheet-who:hover .sheet-name { color: var(--accent); }
.sheet-row.is-here .avatar { box-shadow: 0 0 0 2px var(--live); }

/* A hairline the bars sit on, not a filled slot — the same rule the SVG spine
 * follows. A filled track reads as a container waiting to be filled. */
.sheet-track::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: var(--rule-faint);
}
.sheet-track-axis::before { display: none; }
.sheet-bar {
  position: absolute; top: 50%; transform: translateY(-50%);
  height: 9px; border-radius: 2px; min-width: 2px;
}
.sheet-nobar { display: none; }

.sheet-times {
  display: flex; align-items: baseline; gap: 5px; min-width: 0;
  color: var(--text-dim); font-variant-numeric: tabular-nums;
}
.sheet-stamp { white-space: nowrap; }
/* Direction, not status: this says "to", never "good" or "bad". */
.sheet-arrow { color: var(--text-mute); font-size: 11px; }
.sheet-still { color: var(--live); white-space: nowrap; }
.sheet-dur {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 12px; text-align: right; white-space: nowrap;
}
.sheet-caveat { margin: 8px 0 0; font-size: 11.5px; color: var(--warn); }

/* The reference material, under the list rather than behind a tab. */
.sheet-facts {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.sheet-dl {
  margin: 0; display: grid; gap: 2px 14px;
  grid-template-columns: auto 1fr auto 1fr;
  font-size: 12px;
}
.sheet-dl dt { color: var(--text-mute); }
.sheet-dl dd { margin: 0; }
.sheet-creator { color: var(--accent); }
.sheet-creator:hover { text-decoration: underline; text-underline-offset: 2px; }

.sheet-changelog { margin-top: 10px; }
.sheet-more {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 12px; color: var(--accent);
}
.sheet-more:hover { text-decoration: underline; text-underline-offset: 2px; }
.sheet-changes { margin-top: 8px; }
.sheet-deep {
  display: inline-block; margin-top: 10px;
  color: var(--accent); font-size: 12px;
}
.sheet-deep:hover { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 720px) {
  .sheet-axis, .sheet-row { grid-template-columns: 2.2ch minmax(0, 1fr) var(--sheet-dur); }
  /* The bars need width more than the stamps do, and the stamps are already in
   * each bar's tooltip. The track moves to its own line under the name. */
  .sheet-times { display: none; }
  .sheet-track { grid-column: 2 / -1; grid-row: 2; }
  .sheet-row { grid-template-rows: auto auto; row-gap: 4px; }
  /* The axis keeps only its track, placed in the same columns the bars use. */
  .sheet-axis-gap { display: none; }
  .sheet-axis .sheet-track { grid-column: 2 / -1; grid-row: 1; }
  .sheet-dl { grid-template-columns: auto 1fr; }
}

/* ---------------------------------------------------------------- pager */

.pager {
  margin-top: var(--gap-lg);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  flex-wrap: wrap;
}
.pager:empty { display: none; }
.pager-btn {
  min-width: 36px; min-height: 36px; padding: 0 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-dim); font: inherit; font-size: 13px; cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition-property: color, border-color, background-color;
  transition-duration: var(--fast);
}
.pager-btn:hover:not(:disabled) { color: var(--text); border-color: var(--text-mute); }
.pager-btn:disabled { opacity: 0.4; cursor: default; }
.pager-btn.is-active {
  background: var(--accent); border-color: var(--accent);
  color: var(--on-accent); font-weight: 600;
}
.pager-gap { color: var(--text-mute); padding: 0 2px; }

/* ============================================================================
 * PROFILE HISTORY
 * ========================================================================== */

.history-list {
  margin-top: var(--gap);
  display: flex; flex-direction: column;
  border-top: 1px solid var(--rule);
}

.history-card {
  padding: var(--gap) 6px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--rule-faint);
  border-radius: 0;
}
.history-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--gap);
}
.history-when { color: var(--text-dim); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.history-count { color: var(--warn); font-size: 12px; font-weight: 600; }

.counter-row {
  margin-top: 12px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap);
  text-align: center;
}
/* The three-up counter row always wanted the measurement voice — these are
 * follower/following/friend counts read off a profile at a point in time. */
.counter-value {
  display: flex; align-items: baseline; justify-content: center; gap: 6px;
  font-family: var(--mono); font-size: var(--t-h3); font-weight: 500;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.counter-label {
  color: var(--text-mute); font-size: var(--t-micro);
  font-weight: 650; letter-spacing: 0.10em; text-transform: uppercase;
}
.counter-idle { opacity: 0.45; }

.delta { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.is-up { color: var(--live); }
.delta.is-down { color: var(--danger); }

.change-list {
  margin: 12px 0 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px;
}
.change-list li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.change-field { color: var(--text-mute); min-width: 96px; font-size: 12px; }
.change-from { color: var(--text-mute); text-decoration: line-through; }
.change-arrow { color: var(--text-mute); }
.change-to { font-weight: 550; }

/* ============================================================================
 * CONTRIBUTION CALENDAR
 * ========================================================================== */

/* The last of the nine identical boxes. Ruled off above, no fill. */
.hm-wrap {
  margin-top: var(--gap-lg);
  padding: var(--gap-lg) 0 0;
  background: none;
  border: none;
  border-top: 1px solid var(--rule-faint);
  border-radius: 0;
  overflow-x: auto;
}
/* Width comes from the SVG's own attributes — a fixed min-width would force a
 * horizontal scrollbar on a three-week-old database with nothing to scroll to. */
.hm { display: block; max-width: 100%; height: auto; }

.hm-cell { fill: var(--surface-2); stroke: var(--line-soft); stroke-width: 0.5; }
.hm-cell.lv-1 { fill: color-mix(in oklab, var(--accent) 22%, var(--surface)); stroke: none; }
.hm-cell.lv-2 { fill: color-mix(in oklab, var(--accent) 40%, var(--surface)); stroke: none; }
.hm-cell.lv-3 { fill: color-mix(in oklab, var(--accent) 60%, var(--surface)); stroke: none; }
.hm-cell.lv-4 { fill: color-mix(in oklab, var(--accent) 80%, var(--surface)); stroke: none; }
.hm-cell.lv-5 { fill: var(--accent); stroke: none; }
/* Not collected must not read as "nothing happened" Ã¢â‚¬â€ it is our gap, not theirs. */
.hm-cell.is-uncollected {
  fill: transparent;
  stroke: var(--line);
  stroke-dasharray: 2 2;
}

.hm-legend {
  margin-top: 10px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 11.5px;
}
.hm-legend .dim { margin-inline: 4px; }
.hm-key {
  width: 12px; height: 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line-soft);
}
.hm-key.lv-1 { background: color-mix(in oklab, var(--accent) 22%, var(--surface)); border-color: transparent; }
.hm-key.lv-2 { background: color-mix(in oklab, var(--accent) 40%, var(--surface)); border-color: transparent; }
.hm-key.lv-3 { background: color-mix(in oklab, var(--accent) 60%, var(--surface)); border-color: transparent; }
.hm-key.lv-4 { background: color-mix(in oklab, var(--accent) 80%, var(--surface)); border-color: transparent; }
.hm-key.lv-5 { background: var(--accent); border-color: transparent; }
.hm-key.is-uncollected {
  background: transparent; border-style: dashed; border-color: var(--line);
}

/* ============================================================================
 * PARTNER CARDS
 * ========================================================================== */

/* The same ruled row as the duo ledger — a partner and a duo are the same
 * object, and until now they did not look like it. */
.partner-cards {
  margin-top: var(--gap);
  display: block;
  border-top: 1px solid var(--rule);
}

.partner-card {
  display: flex; align-items: center; gap: var(--gap);
  padding: 12px 6px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--rule-faint);
  border-radius: 0;
  transition-property: background-color; transition-duration: var(--fast);
}
.partner-card:hover { background: var(--ink-wash); }
.partner-body { min-width: 0; flex: 1; }
.partner-name {
  font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.partner-id { display: block; color: var(--text-mute); font-family: var(--mono); font-size: 11px; }
.partner-meta { margin-top: 4px; font-size: 12.5px; }
.partner-side {
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
  text-align: right; font-size: 12.5px; white-space: nowrap;
}
.partner-time strong { font-variant-numeric: tabular-nums; }

/* ============================================================================
 * RESPONSIVE
 * ========================================================================== */

/* At phone width the row degrades to two lines — names above, figure below —
 * rather than a squeezed four-column card. Nothing scrolls sideways. */
@media (max-width: 700px) {
  .duo-row {
    grid-template-columns: 28px auto minmax(0, 1fr);
    row-gap: var(--gap-sm);
  }
  .duo-figure {
    grid-column: 2 / -1;
    align-items: flex-start; text-align: left;
    white-space: normal;
  }
  .duo-reason { justify-content: flex-start; }
}

@media (max-width: 860px) {
  .partner-cards { grid-template-columns: 1fr; }
  /* The masthead loses its rail with the leaves — see the .leaf rule at 900px.
   * Both children must return to auto placement or the rail collapses to 0. */
  .profile-card { grid-template-columns: minmax(0, 1fr); }
  .profile-avatar { margin-bottom: var(--gap); }
  .tabstrip { overflow-x: auto; scrollbar-width: none; }
  .tabstrip::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; }
}

@media (max-width: 640px) {
  .topbar-inner { gap: 8px; }
  .brand-text { display: none; }
  .room-cards { grid-template-columns: 1fr; }
  .counter-row { grid-template-columns: 1fr; text-align: left; }
  .counter-value { justify-content: flex-start; }
}

/* An open drawer holds a timeline, which is unreadable in a third of a row.
 * The card takes the full grid width for as long as it is open. */
.room-cards .room-card:has(.room-drawer:not([hidden])) { grid-column: 1 / -1; }

/* The reason a pair ranks, not just its position. */
.duo-signals {
  margin-top: 6px;
  display: flex; flex-wrap: wrap; gap: 5px;
}
.duo-signal {
  padding: 2px 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  color: var(--text-dim); font-size: 11.5px; white-space: nowrap;
  cursor: help;
}

/* The rank's justification — and, since the board is sorted by it, the loudest
 * thing on the row. The number leads; the rest of the phrase is its unit, so
 * the sentence still reads "5h 25m more than chance explains". */
.duo-reason {
  display: flex; align-items: baseline; justify-content: flex-end;
  gap: 5px; flex-wrap: wrap;
  color: var(--text-dim);
}
.duo-reason strong { color: var(--text); font-weight: 500; }
.duo-reason .figure-unit { white-space: nowrap; }
.duo-lift {
  padding: 0 5px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--text-dim); font-family: var(--mono); font-size: var(--t-micro);
  font-variant-numeric: tabular-nums;
}
.duo-why {
  display: inline-grid; place-items: center;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--surface-2); color: var(--text-mute);
  font-size: 10px; cursor: help;
}
.duo-why:hover, .duo-why:focus-visible { color: var(--text); }

/* ---------------------------------------------------------------- relations
   A leaderboard, not a list. Four columns: rank, faces, who, and the figure the
   board is ORDERED by. The last one is what makes it scannable — you can run
   your eye down the right edge and watch it decrease, and it is never a
   different number from the one in the sentence beside it. */

.rel-body { margin-top: 14px; }

.rel-stamp {
  margin: 6px 0 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.rel-list {
  margin-top: 16px;
  border-top: 2px solid var(--line);
}

.rel-row {
  display: grid;
  grid-template-columns: 3.2ch auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

/* Top three carry weight. Not colour-coded medals — colour is semantic
   everywhere else on this site (live / warn / void) and spending it on
   decoration would weaken the places it means something. */
.rel-row.is-podium .rel-rank { color: var(--ink); font-size: 22px; }
.rel-row.is-podium .rel-figure-value { font-size: 20px; }

/* A suspected duplicate account is DEMOTED, not hidden: the row still reads
   normally, it just stops competing visually with the rows we believe. */
.rel-row.is-suspect { opacity: 0.72; }

.rel-rank {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: right;
  line-height: 1.1;
}

.rel-faces { display: flex; }
.rel-faces > * + * { margin-left: -10px; }

.rel-who { min-width: 0; }

.rel-names {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px;
  font-size: 15px;
}

.rel-name { font-weight: 600; }
.rel-joiner { color: var(--ink-soft); }

.rel-claim {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

/* The ranking figure. Right-aligned and tabular so the column reads as one
   number down the page rather than as ragged text. */
.rel-figure {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rel-figure-value {
  display: block;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
}

.rel-figure-unit {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.rel-alt {
  grid-column: 3 / -1;
  margin: 6px 0 0;
  font-size: 12.5px;
}

.rel-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  grid-column: 3 / -1;
  margin-top: 4px;
  font-size: 13px;
  color: var(--live);
}

/* The collector has stopped, so the row states what was last OBSERVED instead
   of what is true now. --warn carries that meaning everywhere else on the site,
   which is why it is spent here and not on decorating a podium. */
.rel-live.is-stale { color: var(--warn); }

@media (max-width: 640px) {
  /* Rank and figure keep their own columns so the board still reads as ranked;
     the faces tuck under the names instead. */
  .rel-row {
    grid-template-columns: 3.2ch minmax(0, 1fr) auto;
    gap: 10px;
  }
  .rel-faces { grid-row: 2; grid-column: 2 / -1; margin-top: 6px; }
  .rel-alt, .rel-live { grid-column: 2 / -1; }
  .rel-figure-value { font-size: 15px; }
}
