/* Payout Ranked — SF Pro, generous whitespace, one accent. */

:root {
  --bg: #fbfbfd;
  --card: #ffffff;
  --tile: #f5f5f7;
  --track: rgba(120, 120, 128, .12);
  --seg-on: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --mut: #86868b;
  --line: #e8e8ed;
  --accent: #0071e3;
  --live: #30d158;
  --focus: rgba(0, 113, 227, .28);
  /* Apple's system colours, used for the gradient, the wash and the pace signal. */
  --c-blue: #007aff;
  --c-indigo: #5856d6;
  --c-purple: #af52de;
  --c-orange: #ff9500;
  --c-green: #2ca24a;
  --c-red: #ff3b30;
  --nav-bg: rgba(251, 251, 253, .72);
  --lift: 0 0 0 1px rgba(0, 0, 0, .035), 0 6px 20px rgba(0, 0, 0, .06);
  --seg-lift: 0 3px 8px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --tile: #2c2c2e;
    --track: rgba(120, 120, 128, .24);
    --seg-on: #55555a;
    --ink: #f5f5f7;
    --ink-2: #aeaeb2;
    --mut: #86868b;
    --line: #303034;
    --accent: #2997ff;
    --focus: rgba(41, 151, 255, .34);
    --c-blue: #0a84ff;
    --c-indigo: #5e5ce6;
    --c-purple: #bf5af2;
    --c-green: #30d158;
    --c-red: #ff453a;
    --nav-bg: rgba(0, 0, 0, .72);
    --lift: 0 0 0 1px rgba(255, 255, 255, .06);
    --seg-lift: 0 3px 8px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

a { color: inherit; text-decoration: none; }
.wrap { width: min(1120px, calc(100% - 44px)); margin-inline: auto; }
.num { text-align: right; }

/* ── nav ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.brand { display: flex; align-items: center; gap: 10px; }
.mark { flex: none; }
/* The wordmark is a logo, so it is set as one - uppercase and tracked out,
   unlike every other piece of type on the page. */
.wordmark { display: flex; gap: 5px; font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.wordmark b {
  font-weight: 700;
  background: linear-gradient(96deg, var(--c-blue), var(--c-indigo) 46%, var(--c-purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.links { display: flex; gap: 26px; }
.links a { font-size: 12px; color: var(--ink-2); }
.links a:hover { color: var(--ink); }

/* ── hero ────────────────────────────────────────────────────────────── */
.hero { position: relative; text-align: center; padding: 48px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -60px 0 auto; height: 420px; pointer-events: none;
  background:
    radial-gradient(42% 62% at 28% 24%, color-mix(in srgb, var(--c-blue) 16%, transparent), transparent 70%),
    radial-gradient(40% 58% at 74% 16%, color-mix(in srgb, var(--c-purple) 14%, transparent), transparent 70%);
  filter: blur(28px);
}
.hero > * { position: relative; }
h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.035em;
}
.grad {
  background: linear-gradient(96deg, var(--c-blue), var(--c-indigo) 46%, var(--c-purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* The full stop sits outside .grad: a child of a background-clip:text element
   has no paint of its own, so animating it there would do nothing. It carries
   the gradient's end colour instead, which reads as one continuous word. */
.stop { color: var(--c-purple); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 0%, 42% { opacity: 1; } 58%, 100% { opacity: .12; } }

.lede {
  margin: 18px auto 0; max-width: 560px;
  font-size: clamp(18px, 2vw, 21px); line-height: 1.42; letter-spacing: -.012em; color: var(--ink-2);
}
.live {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 22px 0 0; padding: 6px 14px 6px 12px;
  background: var(--track); border-radius: 980px;
  font-size: 12px; color: var(--ink-2); letter-spacing: 0;
}
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--live); animation: breathe 2.8s ease-in-out infinite; }
.live.frozen .pulse { background: var(--mut); animation: none; }
@keyframes breathe { 50% { opacity: .35; } }

/* The mark leads the headline and plays once on load: the chevrons arrive one
   at a time, then the word lands. Resting opacity lives on the elements
   themselves and the keyframes only fill backwards, so if animation is off or
   unsupported the headline is simply there - never invisible. */
.hero-mark { height: .72em; width: auto; margin-right: .26em; vertical-align: -.02em; }
/* Resting state, deliberately outside .intro: this is what shows when the
   entrance does not run at all. */
.hero-mark path:nth-of-type(1) { opacity: .38; --o: .38; }
.hero-mark path:nth-of-type(2) { opacity: .68; --o: .68; }
.hero-mark path:nth-of-type(3) { opacity: 1;   --o: 1;   }

/* Gated on .intro, which app.js only leaves in place when the page is actually
   being looked at. A hidden tab never advances an animation, so without the
   gate the backwards fill would hold the whole headline at opacity 0 until the
   visitor happened to switch to it. */
.intro .hero-mark path { animation: chevron-in .45s cubic-bezier(.2, .7, .3, 1) backwards; }
/* The stagger has to come after the shorthand above: `animation` resets every
   longhand it does not name, so delays declared earlier were being wiped and
   all three chevrons arrived at once. */
.intro .hero-mark path:nth-of-type(1) { animation-delay: .15s; }
.intro .hero-mark path:nth-of-type(2) { animation-delay: .37s; }
.intro .hero-mark path:nth-of-type(3) { animation-delay: .59s; }

@keyframes chevron-in {
  from { opacity: 0; transform: translateX(-5px); }
  to   { opacity: var(--o); transform: none; }
}

.grad, .stop { display: inline-block; }
.intro .grad { animation: word-in .5s cubic-bezier(.2, .7, .3, 1) .86s backwards; }
/* The full stop lands with the word, then picks up its blink once settled. */
.intro .stop {
  animation: word-in .5s cubic-bezier(.2, .7, .3, 1) .86s backwards,
             blink 1.6s ease-in-out 1.6s infinite;
}

@keyframes word-in {
  from { opacity: 0; transform: translateY(.14em); }
  to   { opacity: 1; transform: none; }
}

/* ── segmented control ───────────────────────────────────────────────── */
/* Narrower than the page: a table stretched to 1120px reads as empty space
   between the firm and its number. */
.board { padding-bottom: 40px; }
.segmented {
  display: flex; width: fit-content; margin: 0 auto; padding: 2px; gap: 2px;
  background: var(--track); border-radius: 980px;
}
.segmented button {
  border: 0; background: none; cursor: pointer; padding: 8px 22px; border-radius: 980px;
  font: 500 14px/1.2 inherit; letter-spacing: -.008em; color: var(--ink-2);
  transition: background .18s ease, color .18s ease;
}
.segmented button:hover { color: var(--ink); }
.segmented button.on { background: var(--seg-on); color: var(--ink); box-shadow: var(--seg-lift); }

/* ── headline figures ────────────────────────────────────────────────── */
.figures { display: flex; justify-content: center; gap: clamp(34px, 8vw, 96px); margin: 36px 0 30px; }
.figures div { text-align: center; }
.figures dt { font-size: 13px; color: var(--mut); letter-spacing: -.005em; }
.figures dd {
  margin: 6px 0 0; font-size: clamp(28px, 4vw, 40px); font-weight: 600;
  letter-spacing: -.03em; line-height: 1;
}

.search {
  display: flex; align-items: center; gap: 9px;
  width: min(460px, 100%); margin: 0 auto 18px; padding: 0 14px; height: 44px;
  background: var(--card); border-radius: 980px;
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .18s ease;
}
.search:focus-within { box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--focus); }
.search .glass { color: var(--mut); flex: none; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink);
  font: 400 16px/1 inherit; letter-spacing: -.01em;
}
.search input::placeholder { color: var(--mut); }
.search input::-webkit-search-cancel-button { display: none; }
.search button {
  display: grid; place-items: center; border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--mut); flex: none;
}
/* an explicit display would otherwise defeat the hidden attribute */
.search button[hidden] { display: none; }
.search button:hover { color: var(--ink-2); }

.matches { margin: 0 0 18px; text-align: center; font-size: 13px; color: var(--mut); letter-spacing: -.004em; }
.matches b { color: var(--ink-2); font-weight: 500; }
.empty { margin: 0; padding: 54px 24px; text-align: center; font-size: 15px; color: var(--mut); }
/* an empty table under a full header row reads as a broken page */
.card.blank thead, .card.blank table { display: none; }
.empty b { color: var(--ink); font-weight: 500; }

/* ── card + table ────────────────────────────────────────────────────── */
.card { background: var(--card); border-radius: 18px; box-shadow: var(--lift); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }

thead th {
  text-align: left; padding: 20px 20px 14px;
  font-size: 13px; font-weight: 400; color: var(--mut); letter-spacing: -.005em; white-space: nowrap;
}
thead th.num { text-align: right; }
.c-rank { width: 72px; }
.c-pace { width: 96px; }
.c-last { width: 92px; }

tbody td { padding: 16px 20px; border-top: 1px solid var(--line); }
tbody tr:hover td { background: color-mix(in srgb, var(--ink) 4%, transparent); }
tr.clickable, .row.clickable { cursor: pointer; }

td.rank { font-size: 15px; color: var(--mut); }

.firm { display: flex; align-items: center; gap: 14px; }
/* Logos arrive as squares, wordmarks, transparent PNGs and SVGs, most of them
   drawn for a light background. A white chip in both themes normalises the lot
   and keeps dark-ink marks visible on a dark page. */
.logo, .logo-gap { width: 38px; height: 38px; flex: none; border-radius: 10px; }
.logo { object-fit: contain; padding: 4px; }
.logo.on-light { background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07); }
.logo.on-dark { background: #16181c; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10); }

.firm-name { font-size: 17px; font-weight: 500; letter-spacing: -.016em; }
a.firm-name:hover { color: var(--accent); }

td.total { text-align: right; font-size: 17px; font-weight: 500; letter-spacing: -.018em; }

td.up { color: var(--c-green); }
td.down { color: var(--c-red); }
td.figure { text-align: right; font-size: 15px; color: var(--ink-2); letter-spacing: -.008em; }
td.soft { color: var(--mut); }
td.last { text-align: right; font-size: 15px; color: var(--mut); white-space: nowrap; }

.fineprint {
  margin: 26px auto 0; max-width: 640px; text-align: center;
  font-size: 13px; line-height: 1.5; color: var(--mut); letter-spacing: -.004em;
}

/* ── how it works ─────────────────────────────────────────────────────── */
.method { padding: 96px 0 104px; }
.method h2 {
  margin: 0 0 52px; text-align: center;
  font-size: clamp(28px, 3.6vw, 40px); font-weight: 600; letter-spacing: -.028em;
}
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 44px; }
.cols h3 { margin: 0 0 10px; font-size: 17px; font-weight: 600; letter-spacing: -.016em; }
.cols div:nth-child(1) h3 { color: var(--c-blue); }
.cols div:nth-child(2) h3 { color: var(--c-indigo); }
.cols div:nth-child(3) h3 { color: var(--c-purple); }
.cols p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); letter-spacing: -.008em; }

.disclaimer { padding: 8px 0 56px; }
.disclaimer h2 {
  margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .01em; color: var(--ink-2);
}
.disclaimer p {
  margin: 0 0 10px; max-width: 780px;
  font-size: 12px; line-height: 1.6; color: var(--mut); letter-spacing: -.002em;
}
.disclaimer b { color: var(--ink-2); font-weight: 500; }

/* ── footer ──────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); margin-top: 8px; }
.foot-in {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px 40px; align-items: start;
  padding: 30px 0 44px;
}
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-legal { margin: 0; font-size: 11.5px; line-height: 1.65; color: var(--mut); letter-spacing: -.002em; max-width: 620px; }
.foot-legal #copyright { color: var(--ink-2); }
.foot-meta { margin: 0; font-size: 11.5px; color: var(--mut); white-space: nowrap; }

/* ── compact ─────────────────────────────────────────────────────────── */
.rows { display: none; }
.row { display: flex; align-items: center; gap: 14px; padding: 15px 20px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .rk { width: 24px; flex: none; font-size: 14px; color: var(--mut); }
.row .body { flex: 1; min-width: 0; }
.row .line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
/* The amount must never be the thing that gets clipped - truncate the name. */
.row .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 16px; font-weight: 500; letter-spacing: -.016em; }
.row .amt { flex: none; font-size: 16px; font-weight: 500; letter-spacing: -.018em; }
.row .meta { margin-top: 2px; font-size: 13px; color: var(--mut); letter-spacing: -.004em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 820px) {
  table { display: none; }
  .rows { display: block; }
  .hero { padding: 36px 0 30px; }
  .figures { gap: 0; justify-content: space-between; margin: 32px 0 26px; }
  .figures div { flex: 1; }
  .figures dt { font-size: 12px; }
  .figures dd { font-size: 26px; margin-top: 4px; }
  .segmented button { padding: 8px 15px; font-size: 13px; }
  .search { width: 100%; }
  .row { padding: 14px 16px; gap: 12px; }
  .row .rk { width: 20px; font-size: 13px; }
  .row .logo, .row .logo-gap { width: 32px; height: 32px; border-radius: 9px; }
  .row .nm, .row .amt { font-size: 15px; }
  .row .meta { font-size: 12px; }
  .method { padding: 72px 0 64px; }
  .disclaimer { padding-bottom: 32px; }
  .foot-in { grid-template-columns: 1fr; gap: 16px; padding: 26px 0 40px; }
  .foot-meta { white-space: normal; }
  .row .meta { font-size: 12px; }
  .method h2 { margin-bottom: 38px; }
  .cols { gap: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse, .stop, .grad, .hero-mark path { animation: none; }
}
