body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

.page-header {
  background: var(--bg-card);
}

.page-header h1 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  letter-spacing: -.025em;
}

.page-header .subtitle {
  max-width: 820px;
  line-height: 1.55;
}

.as-of {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  color: var(--muted);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: .02em;
}

.as-of:empty { display: none; }

.board-wrap {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: var(--space-7) var(--space-6) 0;
}

/* No card box around the board: the table sits directly on the page ground,
   the ranking rows are the whole page. */
.table-container {
  flex: 1;
  min-width: 0;
  width: 100%;
  overflow-x: auto;
}

/* Airy, borderless board: taller rows via the component's spacing variable
   (fixed padding, not the vh-scaled clamp the jainam merge tried), and the
   row/header rules dropped by blanking the border tokens the table reads —
   rows separate by whitespace and hover instead of hairlines. */
gt-data-table {
  --space-3: 17px;
  --border: transparent;
  --border-soft: transparent;
}

#board { min-width: 0; width: 100%; }

/* No gt-data-table spacing overrides here: the component's own defaults are
   the pre-jainam-merge density, where the columns lined up tighter. The
   merge's vh-scaled row padding stretched cells unevenly and was reverted. */

.empty {
  margin: var(--space-7);
  padding: var(--space-7);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
  text-align: center;
}

.empty a { color: var(--accent-strong); }

#loading {
  padding: 80px var(--space-6);
  color: var(--muted-dim);
  font-size: var(--fs-sm);
  text-align: center;
}

/* nav.js appends the shared footer directly to body. The flexible main above
   keeps it at the viewport edge when the API returns only a handful of rows. */
.gt-footer {
  flex: 0 0 auto;
  width: 100%;
}

@media (max-width: 768px) {
  .page-header { padding: var(--space-5) var(--space-4); }
  .board-wrap { padding: var(--space-5) var(--space-3) 0; }
  .board-bar { align-items: flex-start; }
  .board-bar h2 { font-size: var(--fs-lg); }
  .entry-count { flex-direction: column; align-items: flex-end; gap: 0; }
  .table-container { border-radius: var(--radius-md); }
  gt-data-table { --space-3: 14px; }
}
