:root {
  --bg: #08090b; --panel: #111318; --panel-2: #1a1d24; --ink: #f5f6f8; --body: #a9adb8; --muted: #71757f;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .12); --blue: #0878ff; --up: #3ed197; --down: #ff6b6a;
  --sans: "IBM Plex Sans", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; }
html { background: var(--bg); color-scheme: dark; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* nav */
.nav { border-bottom: 1px solid var(--line); }
.nav-in, .wrap { max-width: 1120px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left)); }
.nav-in { display: flex; align-items: center; justify-content: space-between; padding-block: 16px; }
.nav-l { display: flex; align-items: center; gap: 36px; }
.logo { font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.links { display: flex; gap: 28px; font-size: 15px; color: var(--body); }
.links .on { color: var(--ink); font-weight: 500; }
.cta { background: var(--blue); color: #fff; font-weight: 500; font-size: 14px; padding: 9px 16px; border-radius: 8px; }

/* type */
.wrap { padding-block: 64px 120px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.wrap > * { min-width: 0; }
.crumb { font: 400 13px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.crumb a:hover { color: var(--body); }
h1 { font-weight: 600; font-size: clamp(36px, 5vw, 56px); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
.lede { font-size: 18px; line-height: 1.55; color: var(--body); max-width: 62ch; }
.head { display: grid; gap: 16px; }
h2 { font-weight: 600; font-size: 24px; letter-spacing: -.01em; }
.sub { color: var(--body); font-size: 15px; margin-top: 6px; }

/* controls */
.controls { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
.seg { display: inline-flex; gap: 2px; padding: 4px; background: var(--panel); border-radius: 10px; }
.seg button { padding: 7px 16px; border-radius: 7px; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--ink); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; color: var(--body); white-space: nowrap; }
.chip:hover { color: var(--ink); border-color: rgba(255,255,255,.24); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 500; }
.chip.soon { border-style: dashed; color: var(--muted); cursor: default; }

/* posters */
.poster { background: var(--panel-2); border-radius: 6px; overflow: hidden; flex: none; display: grid; place-items: center; aspect-ratio: 2 / 3; }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster.logo img { object-fit: contain; padding: 6px; }
.poster .init { font-weight: 600; color: var(--body); font-size: 18px; }

/* #1 feature */
.feature { display: flex; gap: 48px; background: var(--panel); border-radius: 16px; padding: 32px 40px 32px 32px; }
.feature .poster { width: 232px; border-radius: 8px; }
.feature .poster .init { font-size: 40px; }
.f-body { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-width: 0; flex: 1; }
.rank1 { font: 500 15px var(--mono); letter-spacing: .04em; color: var(--blue); }
.f-title { font-weight: 600; font-size: 48px; line-height: 1.1; letter-spacing: -.02em; margin-top: 12px; }
.meta { font: 400 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.f-title + .meta { margin-top: 12px; }
.f-spark { max-width: 620px; width: 100%; }
.chart { padding-left: 52px; }
.c-plot { position: relative; height: 140px; touch-action: pan-y; cursor: crosshair; }
.c-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.c-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line); }
.c-grid span { position: absolute; right: calc(100% + 10px); transform: translateY(-50%); font: 400 11px var(--mono); color: var(--muted); white-space: nowrap; }
.c-x { position: relative; height: 22px; margin-top: 8px; }
.c-x span { position: absolute; transform: translateX(-50%); font: 400 11px var(--mono); color: var(--muted); white-space: nowrap; }
.c-x span:first-child { transform: none; }
.c-x span:last-child { transform: translateX(-100%); }
.c-guide { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--line-2); pointer-events: none; }
.c-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #0878ff; box-shadow: 0 0 0 3px var(--panel); transform: translate(-50%, 50%); pointer-events: none; }
.c-tip { position: absolute; top: -6px; transform: translate(10px, -100%); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; display: grid; gap: 2px; white-space: nowrap; pointer-events: none; z-index: 2; }
.c-tip.flip { transform: translate(calc(-100% - 10px), -100%); }
.c-tip b { font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums; }
.c-tip span { font: 400 11px var(--mono); color: var(--muted); }
.f-spark .cap { font: 400 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.stats { display: flex; gap: 48px; align-items: flex-end; flex-wrap: wrap; }
.big { font-weight: 300; font-size: 72px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 14px; color: var(--body); margin-top: 6px; }
.chg-big { font-weight: 500; font-size: 28px; font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); }

.rows .feature { margin-bottom: 8px; }
.rows .row + .feature { margin-top: 8px; }
.feature.open { cursor: pointer; animation: grow .22s ease-out; }
.feature.open .rank1 { color: var(--body); }
@keyframes grow { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .feature.open { animation: none; } }

/* rows */
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 24px; padding-block: 16px; border-top: 1px solid var(--line); }
.row { cursor: pointer; }
.row:hover .r-title { color: #fff; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.r-rank { font: 400 18px var(--mono); letter-spacing: .04em; color: var(--muted); width: 40px; flex: none; }
.row .poster { width: 56px; }
.r-text { flex: 1; min-width: 0; display: grid; gap: 6px; }
.r-title { font-weight: 500; font-size: 22px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta.sm { font-size: 12px; }
.r-spark svg { width: 168px; height: 40px; display: block; }
.r-val { width: 150px; flex: none; text-align: right; display: grid; gap: 4px; }
.r-views { font-weight: 500; font-size: 22px; font-variant-numeric: tabular-nums; }
.r-chg { font: 400 13px var(--mono); }
.r-chg.flat { color: var(--muted); }

/* landing */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.hero h1 { font-size: clamp(40px, 6vw, 64px); max-width: 14ch; }
.hero .lede { margin-top: 18px; max-width: 52ch; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { background: var(--panel); border-radius: 16px; padding: 24px; display: grid; gap: 20px; align-content: start; transition: background .2s; }
.card:hover { background: #151821; }
.card-h { display: flex; justify-content: space-between; align-items: center; }
.card-h b { font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.card-h span { font: 400 12px var(--mono); letter-spacing: .06em; color: var(--body); }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini { display: grid; }
.mini div { display: flex; align-items: center; gap: 12px; padding-block: 10px; border-top: 1px solid var(--line); font-size: 15px; }
.mini i { font: normal 13px var(--mono); color: var(--muted); width: 14px; }
.mini div:first-child i { color: var(--blue); }
.mini span { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini em { font: normal 13px var(--mono); color: var(--body); }
.section { display: grid; gap: 16px; }
.soon-card { border: 1px dashed var(--line-2); background: transparent; }
a.soon-card:hover { background: var(--panel); }
.soon-card .card-h span { color: var(--muted); }
.soon-card .mini span { font-weight: 400; color: var(--body); }

.method { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line); }
.method p { font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 64ch; }
.method span { font: 400 12px var(--mono); letter-spacing: .06em; color: var(--muted); }

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .feature { flex-direction: column; padding: 20px; gap: 24px; }
  .feature .poster { width: 160px; }
  .f-title { font-size: 34px; }
  .big { font-size: 52px; }
  .r-spark { display: none; }
  .row { gap: 14px; }
  .r-title { font-size: 17px; }
  .r-views { font-size: 17px; }
  .r-val { width: 84px; }
  .r-rank { width: 26px; font-size: 15px; }
  .links { display: none; }
  .controls .chips { flex: 1 1 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; margin-inline: -20px; padding-inline: 20px; scrollbar-width: none; }
  .controls .chips::-webkit-scrollbar { display: none; }
  .wrap { padding-block: 40px 80px; }
}
.c-tip[hidden], .c-guide[hidden] { display: none; }

/* wordmark, same as the Forum index explorer: icon + "Forum" + gray suffix */
.logo { display: flex; align-items: center; gap: .5625rem; white-space: nowrap; letter-spacing: -.025em; }
.logo img { width: 1.5rem; height: 1.5rem; filter: brightness(0) invert(1); }
.brand-suffix { margin-left: .125rem; color: #6b7079; }
/* nav spans the full width like indices.forum.market: logo pinned 30px from the left edge, same 64px bar */
.nav-in { max-width: none; padding-inline: max(30px, env(safe-area-inset-left)) max(30px, env(safe-area-inset-right)); min-height: 64px; padding-block: 12px; }
@media (max-width: 700px) { .nav-in { padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); } }
