:root {
  --bg: #F4F2EE;
  --surface: #FFFFFF;
  --ink: #141312;
  --ink-2: #4A4744;
  --muted: #8D8983;
  --line: #E3DFD8;
  --line-2: #D3CEC5;
  --soft: #EFECE6;
  --brass: #A8864B;
  --green: #3F8F5F;
  --radius: 18px;
  --serif: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --font: 'Geist', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
em { font-style: normal; }
section { scroll-margin-top: 90px; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

.demo-ribbon {
  background: var(--ink);
  color: #EDEAE4;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .02em;
  text-align: center;
  padding: 6px 16px;
}

/* ── floating pill nav ── */
.nav-shell { position: sticky; top: 12px; z-index: 20; padding: 0 16px; margin-top: 12px; }
.pill-nav {
  display: flex; align-items: center; gap: 14px;
  width: min(1080px, 100%); margin-inline: auto;
  padding: 7px 7px 7px 8px;
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 1px 2px rgba(20, 19, 18, .04), 0 8px 24px rgba(20, 19, 18, .05);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-cat { border-radius: 50%; }

.logo-word { width: auto; height: 23px; }
.nav-links { display: flex; gap: 2px; margin-right: auto; font-size: 14px; font-weight: 500; }
.nav-links a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); }
.nav-links a:hover { background: var(--soft); color: var(--ink); }

.ca {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 5px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink-2); font: 500 12.5px var(--mono); cursor: pointer;
}
.ca span { background: var(--soft); color: var(--muted); border-radius: 999px; padding: 2px 8px; font: 600 10.5px var(--font); letter-spacing: .08em; }
.ca:hover { border-color: var(--line-2); color: var(--ink); }

.round-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--ink-2); text-decoration: none;
}
.round-btn:hover { border-color: var(--line-2); color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 24px; border: 1px solid transparent; border-radius: 999px;
  font: 500 15px var(--font); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn.small { height: 34px; padding: 0 18px; font-size: 13.5px; }
.btn-dark { background: var(--ink); color: #F4F2EE; }
.btn-dark:hover { background: #2B2926; }
.btn-line { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-line:hover { background: var(--surface); border-color: var(--ink); }
.btn:disabled { opacity: .45; pointer-events: none; }
.wide { width: 100%; margin-top: 16px; }

/* ── intro ── */
.intro { text-align: center; padding: 84px 0 40px; }
.kicker {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 22px;
  color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
}
.kicker::before, .kicker::after { content: ''; width: 28px; height: 1px; background: var(--line-2); }
.intro h1 { font-size: clamp(48px, 8.2vw, 104px); line-height: .98; text-wrap: balance; }
.intro h1 em { font-style: italic; }
.lede { max-width: 54ch; margin: 26px auto 34px; color: var(--ink-2); font-size: 17px; text-wrap: balance; }
.cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* ── parade of newest cats ── */
.parade { overflow: hidden; padding: 24px 0 48px; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.parade-track { display: flex; gap: 16px; width: max-content; animation: march 80s linear infinite; }
.parade:hover .parade-track { animation-play-state: paused; }
.parade-item { flex: none; width: 128px; }
.parade-item img { width: 128px; height: 128px; border-radius: 14px; background: var(--soft); box-shadow: 0 1px 2px rgba(20, 19, 18, .06), 0 10px 24px rgba(20, 19, 18, .08); }
.parade-name { display: block; margin-top: 10px; font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.parade-trade { display: block; color: var(--muted); font-size: 11.5px; }
.parade-track.is-empty { width: 100%; justify-content: center; animation: none; }
.parade-empty { padding: 30px 16px; color: var(--muted); text-align: center; }
@keyframes march { to { transform: translateX(-50%); } }

/* ── stat tiles ── */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  padding: 20px 22px; min-height: 134px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.tile-big { grid-row: span 2; background: var(--ink); border-color: var(--ink); color: #F4F2EE; justify-content: flex-end; }
.tile-big .tile-k, .tile-big .tile-n { color: #A9A49C; }
.tile-big .tile-v { font-size: clamp(76px, 9vw, 120px); line-height: .9; margin: 10px 0 4px; }
.tile-ring { grid-column: span 2; flex-direction: row; align-items: center; justify-content: flex-start; gap: 22px; }
.tile-k { display: block; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.tile-v { display: block; font-family: var(--serif); font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.tile-n { display: block; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; text-wrap: pretty; }

.ring { width: 104px; height: 104px; flex: none; }

.ring.is-hired { animation: ring-shake .8s cubic-bezier(.36, .07, .19, .97); }
@keyframes ring-shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  12% { transform: translateX(-4px) rotate(-5deg) scale(1.04); }
  28% { transform: translateX(4px) rotate(4deg) scale(1.06); }
  44% { transform: translateX(-3px) rotate(-3deg) scale(1.04); }
  60% { transform: translateX(3px) rotate(2deg) scale(1.02); }
  78% { transform: translateX(-1px) rotate(-1deg); }
}
.ring-track { fill: none; stroke: var(--line); stroke-width: 4; }
.ring-fill {
  fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 0 100; transform: rotate(-90deg); transform-origin: 60px 60px;
  transition: stroke-dasharray .8s ease;
}

/* ── how ── */
.how { margin-top: 88px; }
.section-title { font-size: 36px; line-height: 1.1; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin: 26px 0 0; padding: 0; counter-reset: step; }
.steps li { padding-top: 16px; border-top: 1px solid var(--ink); counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--muted); }
.steps li > b { display: block; margin-top: 14px; font-size: 16px; font-weight: 600; }
.steps p b { display: inline; margin: 0; font-size: inherit; font-weight: 600; }
.steps p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; text-wrap: pretty; }

/* ── panels ── */
.panel { padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.roster { margin-top: 88px; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--soft); }
.seg-btn { border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 500 13.5px var(--font); padding: 6px 14px; cursor: pointer; }
.seg-btn em { margin-left: 6px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 19, 18, .08); }

.rows { list-style: none; margin: 0; padding: 0; }
.rows-head,
.row {
  display: grid; grid-template-columns: 32px 44px minmax(0, 1fr) 96px 150px;
  align-items: center; gap: 14px; padding: 9px 8px;
  text-decoration: none;
}
.rows-head { padding-top: 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.rows-head span:nth-child(1), .rows-head span:nth-child(4), .rows-head span:nth-child(5) { text-align: right; }
.row { border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row:hover { background: #FAF9F7; }
.rank { color: var(--muted); font: 400 12.5px var(--mono); text-align: right; }
.pfp { width: 44px; height: 44px; border-radius: 12px; background: var(--soft); object-fit: cover; }
.who { min-width: 0; display: flex; flex-direction: column; }
.who-name { font-weight: 500; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-sub { color: var(--muted); font: 400 12px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag {
  display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px;
  background: var(--ink); color: #F4F2EE;
  font: 500 10px var(--font); letter-spacing: .08em; text-transform: uppercase; vertical-align: 2px;
}
.amount { font: 400 13px var(--mono); text-align: right; }
.share { display: flex; align-items: center; gap: 10px; }
.share-bar { flex: 1; height: 3px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.share-bar i { display: block; height: 100%; background: var(--ink-2); }
.row.is-cat .share-bar i { background: var(--brass); }
.share-pct { width: 56px; text-align: right; color: var(--ink-2); font: 400 12.5px var(--mono); }
.fine { margin: 14px 4px 0; color: var(--muted); font-size: 12.5px; }
.empty { padding: 30px 0; color: var(--muted); text-align: center; list-style: none; }

/* ── feeds ── */
.feeds { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.feeds.has-x { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }

.notes { list-style: none; margin: 0; padding: 0; display: grid; }
.feeds:not(.has-x) #feed { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.note { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; animation: fade .4s ease; }
.note .pfp { width: 40px; height: 40px; border-radius: 50%; }
a.note:hover .note-text { color: var(--ink); }
.note-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.note-name { font-weight: 500; font-size: 13.5px; }
.note-time { color: var(--muted); font-size: 12px; }
.note-meta { margin-left: auto; color: var(--muted); font: 400 12px var(--mono); }
.note-text { margin-top: 3px; color: var(--ink-2); font-size: 14.5px; overflow-wrap: anywhere; }
.tweet-handle { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tweet-text { white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tweet-stats { margin-top: 4px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.pfp-letter { display: flex; align-items: center; justify-content: center; color: var(--ink-2); font-weight: 600; background: var(--soft); }
@keyframes fade { from { opacity: 0; } }

/* ── ledger ── */
.ledger { margin-top: 12px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 10px 40px; }
.ledger-copy p { margin: 12px 0 0; color: var(--ink-2); font-size: 14.5px; }
.ledger .fine { grid-column: 1 / -1; margin-top: 0; }
.addr { margin: 0; border-top: 1px solid var(--line); }
.addr > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.addr dt { color: var(--muted); font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.addr .pct { margin-left: 6px; color: var(--ink-2); font: 500 11.5px var(--mono); letter-spacing: 0; }
.addr dd { margin: 3px 0 0; min-width: 0; }
.addr a { font: 400 13px var(--mono); overflow-wrap: anywhere; text-decoration: none; }
.addr a[href]:hover { text-decoration: underline; }

.foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 72px; padding: 24px 0 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.foot a { color: var(--ink-2); font-weight: 500; text-decoration: none; }
.foot a:hover { color: var(--ink); }

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 40;
  transform: translate(-50%, 12px);
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: #F4F2EE; font-size: 13.5px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 920px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-big { grid-row: auto; grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feeds.has-x, .ledger { grid-template-columns: minmax(0, 1fr); }
  .feeds:not(.has-x) #feed { grid-template-columns: minmax(0, 1fr); }
  .nav-links { display: none; }
  .ca { margin-left: auto; }
  .rows-head, .row { grid-template-columns: 28px 44px minmax(0, 1fr) 80px 110px; gap: 10px; }
}

@media (max-width: 600px) {
  .pill-nav { gap: 8px; }
  .logo-word { height: 20px; }
  .intro { padding-top: 56px; }
  .lede { font-size: 16px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .rows-head, .row { grid-template-columns: 44px minmax(0, 1fr) 64px; }
  .rows-head span:nth-child(1), .rows-head span:nth-child(2), .rows-head span:nth-child(4), .rank, .amount, .share-bar { display: none; }
  .panel { padding: 18px; }
  .tile-v { font-size: 38px; }
  .parade-item, .parade-item img { width: 104px; }
  .parade-item img { height: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .parade { overflow-x: auto; }
}
