:root {
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --wash: #f8fafc;
  --accent: #1d4ed8;
  --buy-bg: #dbeafe;
  --buy-fg: #1e3a8a;
  --sell-bg: #ffedd5;
  --sell-fg: #7c2d12;
  --motion-100: 100ms;
  --motion-150: 150ms;
  --motion-200: 200ms;
  --motion-300: 300ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.page { max-width: 1120px; margin: 0 auto; padding: 0 32px; }

a { color: var(--accent); }
a:hover { color: #1e3a8a; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 24px 0; }
.brand { font-family: "Space Grotesk", Inter, sans-serif; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.updated { font-size: 14px; color: var(--muted); }

/* Hero: the name rolls up through a clipped slot, one letter after another. */
.hero { padding: 56px 0 40px; }
h1 {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 9vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
h1 > span { display: block; }
.hero-slot { position: relative; height: 1.3em; margin-top: 0.08em; overflow: hidden; }
.hero-item { position: absolute; inset: 0; display: flex; align-items: center; gap: 0.28em; white-space: nowrap; }
.hero-face {
  width: 1.12em; height: 1.12em; flex: none;
  border-radius: 50%; object-fit: cover; object-position: 50% 18%; background: var(--line);
  opacity: 0; transform: scale(0.4) rotate(-24deg);
}
.hero-name { color: var(--accent); }
.ch { display: inline-block; white-space: pre; opacity: 0; transform: translateY(110%); }

.hero-item.is-in .hero-face {
  opacity: 1; transform: none;
  transition: transform var(--motion-300) var(--ease-out) var(--motion-200), opacity var(--motion-200) var(--ease-out) var(--motion-200);
}
.hero-item.is-in .ch {
  opacity: 1; transform: none;
  transition: transform var(--motion-300) var(--ease-out), opacity var(--motion-200) var(--ease-out);
  /* Starts after the old name has left the slot. */
  transition-delay: calc(var(--motion-300) + var(--i) * 22ms);
}
.hero-item.is-out .hero-face {
  opacity: 0; transform: scale(0.4) rotate(24deg);
  transition: transform var(--motion-200) var(--ease-in), opacity var(--motion-200) var(--ease-in);
}
.hero-item.is-out .ch {
  opacity: 0; transform: translateY(-110%);
  transition: transform var(--motion-200) var(--ease-in), opacity var(--motion-200) var(--ease-in);
  transition-delay: calc(var(--i) * 6ms);
}

.lede { margin: 20px 0 0; max-width: 34rem; font-size: 1.125rem; line-height: 1.55; color: var(--muted); }

.faces { display: flex; flex-wrap: wrap; gap: 8px 10px; padding-bottom: 40px; }
.face {
  min-width: 76px; min-height: 96px; padding: 8px 6px;
  border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--muted);
}
.face-pic { position: relative; width: 56px; height: 56px; border-radius: 50%; background: #f1f5f9; display: grid; place-items: center; }
.face-pic img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 18%; }
.face-pic::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 3px solid var(--accent);
  opacity: 0; transform: scale(0.8);
  transition: transform var(--motion-150) var(--ease-in), opacity var(--motion-150) var(--ease-in);
}
.face[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.face[aria-pressed="true"] .face-pic::after {
  opacity: 1; transform: none;
  transition: transform var(--motion-200) var(--ease-out), opacity var(--motion-200) var(--ease-out);
}
.face:active .face-pic { transform: scale(0.98); }

h2 { margin: 0 0 4px; font-family: "Space Grotesk", Inter, sans-serif; font-weight: 600; font-size: 1.375rem; letter-spacing: -0.01em; }
.hint { margin: 0 0 16px; color: var(--muted); font-size: 14px; min-height: 21px; }

.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; min-width: 860px; border-collapse: collapse; }
th { text-align: left; padding: 12px 16px; font-size: 13px; font-weight: 500; color: var(--muted); background: var(--wash); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sub { display: block; font-size: 13px; color: var(--muted); }
.who { display: flex; align-items: center; gap: 12px; }
.who img { width: 36px; height: 36px; flex: none; border-radius: 50%; object-fit: cover; object-position: 50% 18%; background: var(--line); }
.strong { font-weight: 600; }
.who .strong { white-space: nowrap; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.buy { background: var(--buy-bg); color: var(--buy-fg); }
.pill.sell { background: var(--sell-bg); color: var(--sell-fg); }
.pill.none { background: #f1f5f9; color: var(--muted); }
td a { display: inline-block; padding: 10px 0; font-size: 14px; }

/* Rows rise in after a pick, so the eye lands on what changed. */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
tbody tr { animation: rise var(--motion-200) var(--ease-out) backwards; }

.empty { margin: 0; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 40px 24px; text-align: center; color: var(--muted); }
.more { display: block; margin: 16px auto 0; min-height: 44px; padding: 0 20px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; font-weight: 500; cursor: pointer; }
.more:hover { border-color: var(--ink); }

footer { margin-top: 48px; border-top: 1px solid var(--line); padding: 24px 0 48px; font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 46rem; }
footer p { margin: 0 0 8px; }

@media (max-width: 600px) {
  .page { padding: 0 16px; }
  .hero { padding: 32px 0 28px; }
  /* One swipeable strip, so the table stays near the top on a phone. */
  .faces { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 8px 16px 28px; }
  .face { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
