:root {
  --shell-bg: #0a0a0a;
  --shell-card: #1a1a1a;
  --shell-card-deep: #111111;
  --shell-hover: #202020;
  --shell-line: #242424;
  --shell-line-strong: #2c2c2c;
  --shell-text: #f4f4f1;
  --shell-muted: #9b9d9c;
  --shell-faint: #707372;
  --rail-width: 275px;
  --rail-collapsed: 64px;
}

* { box-sizing: border-box; }

html,
body.app {
  min-height: 100%;
  margin: 0;
  background: var(--shell-bg);
  background-image: none;
  color: var(--shell-text);
}

body.app {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  overflow-x: hidden;
}

body.app svg { display: block; flex: none; }

/* Sidebar -------------------------------------------------------------- */

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--rail-width);
  display: flex;
  flex-direction: column;
  padding: 12px 18px 16px;
  background: var(--shell-bg);
  border-right: 1px solid var(--shell-line);
  transition: width 180ms ease;
}

.rail-head {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0 5px;
  margin-bottom: 10px;
}

.rail-brand {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  text-decoration: none;
}

.brand-glyph {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
}

.rail-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--shell-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--shell-muted);
  cursor: pointer;
}

.rail-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-toggle:hover { color: #fff; border-color: #696b6a; }
.rail-nav { display: grid; gap: 1px; }

.rail-link {
  min-height: 51px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 9px 8px;
  border-radius: 7px;
  color: #eeefed;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 140ms ease, background 140ms ease;
}

.rail-link:hover { background: #222323; }
.rail-link.is-active { color: #fff; background: transparent; font-weight: 600; }

.rail-icon {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-link.is-active .rail-icon { fill: currentColor; }
.rail-link.is-active .rail-icon path:not(:first-child) { fill: none; }

.rail-profile {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 6px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.rail-profile:hover { background: #222323; }
.rp-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2d2e2e;
  color: #fff;
}
.rp-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.rp-text { min-width: 0; display: grid; line-height: 1.25; }
.rp-name { font-size: 14px; font-weight: 700; }
.rp-handle { color: var(--shell-muted); font-size: 12px; }
.rp-x { margin-left: auto; color: #767877; }

body.rail-collapsed .rail { width: var(--rail-collapsed); }
body.rail-collapsed .rail-label,
body.rail-collapsed .rp-text,
body.rail-collapsed .rp-x { display: none; }
body.rail-collapsed .rail-toggle { transform: rotate(180deg); }
body.rail-collapsed .app-main {
  width: calc(100% - var(--rail-collapsed));
  margin-left: var(--rail-collapsed);
}

/* Header and content --------------------------------------------------- */

.app-main {
  width: calc(100% - var(--rail-width));
  min-height: 100vh;
  margin-left: var(--rail-width);
  overflow-x: hidden;
  transition: margin 180ms ease;
}

.app-top {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 64px;
  display: grid;
  grid-template-columns: 168px minmax(320px, 560px) 1fr;
  align-items: center;
  padding: 0 20px;
  background: rgba(10, 10, 10, 0.96);
  border-bottom: 1px solid var(--shell-line);
  backdrop-filter: blur(16px);
}

.app-search { position: relative; grid-column: 2; width: 100%; }
.app-search .search-icon,
.route-input .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  color: #929493;
}

.app-search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 33px;
  border: 1px solid #454747;
  border-radius: 999px;
  outline: none;
  background: #0a0a0a;
  color: #fff;
  font: inherit;
  font-size: 15px;
}

.app-search input::placeholder { color: #888b8a; }
.app-search input:focus { border-color: #777a79; }
.app-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app .btn {
  min-height: 36px;
  padding: 8px 17px;
  border-radius: 999px;
  border: 1px solid #464848;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.app .btn-primary { background: #f6f6f2; color: #171818; border-color: #f6f6f2; }
.app .btn-primary:hover { background: #fff; }
.app .btn-ghost { background: transparent; color: #f2f2ef; }
.app .btn-ghost:hover { border-color: #747675; }
.app-body { width: min(100%, 1165px); min-width: 0; margin: 0 auto; padding: 55px 24px 100px; overflow: hidden; }

/* Hero ----------------------------------------------------------------- */

.hero {
  max-width: 690px;
  margin: 0 auto 80px;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
}

.hero h1 {
  margin: 0;
  color: #f8f8f5;
  font-size: clamp(40px, 4.5vw, 58px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.hero p {
  max-width: 620px;
  margin: 25px auto 0;
  color: #aaaead;
  font-size: 16px;
  line-height: 1.58;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 2px;
  padding: 2px 8px;
  border: 1px solid #505252;
  border-radius: 999px;
  background: #343535;
  color: #f4f4f1;
  font-size: 10.5px;
  font-weight: 600;
  vertical-align: 1px;
}

/* The pump.fun mark, not an approximation of it. */
.pill-mark {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  flex: none;
  display: block;
}

.hero-cta { display: flex; justify-content: center; gap: 12px; margin-top: 39px; }
.hero .btn { min-height: 47px; padding-inline: 20px; font-size: 14px; }

/* Bento ---------------------------------------------------------------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 78px;
}

.tile {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--shell-line-strong);
  border-radius: 16px;
  background: var(--shell-card);
  color: inherit;
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease;
}

.tile:hover { border-color: #6b6d6c; transform: translateY(-1px); }
.tile-explore,
.tile-payouts { grid-column: span 3; }
.tile-fees,
.tile-route,
.tile-docs { grid-column: span 2; }
.tile-preview { position: relative; flex: 1; min-height: 236px; padding: 20px; overflow: hidden; }
.tile-explore .tile-preview,
.tile-payouts .tile-preview { min-height: 236px; }

.tile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 16px;
  border-top: 1px solid #292929;
  color: #f0f0ed;
  font-size: 14px;
  font-weight: 600;
}
.tile-open { color: #8d8d8d; font-size: 13px; font-weight: 500; }

.tile-explore .tile-preview {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding-top: 28px;
  background: #1a1a1a;
}

.pv-card {
  position: relative;
  width: 142px;
  height: 188px;
  flex: none;
  overflow: hidden;
  border: 1px solid #292929;
  border-radius: 9px 9px 0 0;
  background: #111;
}
.pv-card img { width: 100%; height: 100%; object-fit: cover; }
.pv-blank {
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 38%, #535353 0 10%, transparent 11%), linear-gradient(135deg, #111, #262626);
}
.pv-0 { transform: translateY(10px) rotate(-2deg); }
.pv-1 { z-index: 2; height: 204px; }
.pv-2 { transform: translateY(12px) rotate(2deg); }
.pv-name {
  position: absolute;
  left: 7px;
  bottom: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.74);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

.tile-preview.payouts { display: grid; align-content: center; gap: 7px; }
.po-row {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #060606;
}
.po-amount { color: #fff; font-size: 21px; font-weight: 650; }
.po-to { color: #8f9291; font-size: 12px; }
.po-left { line-height: 1; }
.po-amount { line-height: 1; }
.po-to { margin-top: 4px; line-height: 1.15; }
.po-to strong { color: #ddd; }
.po-right { display: flex; align-items: center; gap: 8px; }
.po-pair { width: 31px; height: 31px; border-radius: 50%; background: #2d2d2d; overflow: hidden; }
.po-pair img { width: 100%; height: 100%; object-fit: cover; }
.po-age { color: #777a79; font-size: 11px; }

.tile-preview.fees { display: flex; flex-direction: column; }
.fees-head { display: flex; justify-content: space-between; color: #888; font-size: 12px; }
.fees-label { font-weight: 600; }
.fees-value { margin-top: 6px; color: #fff; font-size: 34px; font-weight: 600; letter-spacing: -0.04em; }
.fees-chart { width: 100%; height: 64px; margin-top: auto; color: #a4a6a5; }

.tile-preview.route { display: grid; align-content: start; gap: 8px; }
.route-label,
.docs-eyebrow { color: #808080; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.route-input {
  position: relative;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 11px 0 33px;
  border: 2px solid #eee;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
}
.route-result { min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; background: #252525; }
.rr-avatar { width: 25px; height: 25px; border-radius: 50%; background: #737675; }
.rr-text { display: grid; line-height: 1.25; }
.rr-name { font-size: 10.5px; font-weight: 600; }
.rr-handle { color: #bbb; font-size: 9px; }
.caret { width: 1px; height: 12px; margin-left: 1px; background: #fff; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.tile-preview.docs { display: block; }
.docs-title { margin-top: 5px; color: #fff; font-size: 14px; font-weight: 650; }
.docs-copy { margin: 8px 0 12px; color: #888; font-size: 11px; line-height: 1.5; }
.docs-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 9px; }
.docs-table th { padding-bottom: 2px; color: #7f8281; text-align: left; }
.docs-table td { padding: 1px 0; color: #a5a8a7; }
.docs-table td:last-child { color: #dedfdd; }

/* Ranked lists --------------------------------------------------------- */

.lists { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, 1fr); gap: 26px; align-items: start; }
.list-head { min-height: 30px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.list-head h2 { margin: 0; color: #f5f5f2; font-size: 23px; font-weight: 400; letter-spacing: -0.035em; }
.list-head .pager { margin-left: auto; }
.list-main .feed { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.clippers { display: grid; gap: 8px; }
.cp {
  display: block;
  overflow: hidden;
  border: 1px solid var(--shell-line-strong);
  border-radius: 14px;
  background: #0d0d0d;
  color: inherit;
  text-decoration: none;
}
.cp:hover { border-color: #6a6d6c; }
.cp-banner { position: relative; height: 68px; background: linear-gradient(135deg, #3c3d3d, #202121); filter: grayscale(1); }
.cp-banner > img { width: 100%; height: 100%; object-fit: cover; }
.cp-avatar { position: absolute; left: 12px; bottom: -17px; }
.cp-avatar img { width: 42px; height: 42px; border: 2px solid #252626; border-radius: 50%; background: #3a3b3b; object-fit: cover; }
.cp-body { padding: 23px 12px 11px; }
.cp-name { font-size: 12.5px; font-weight: 650; }
.cp-handle { color: #8d908f; font-size: 10px; }
.cp-stats { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: #939695; font-size: 9.5px; }
.cp-stats strong { color: #eee; font-size: 10.5px; }

@media (max-width: 1050px) {
  .app-top { grid-template-columns: minmax(220px, 1fr) auto; }
  .app-search { grid-column: 1; max-width: 430px; justify-self: center; }
  .app-actions { grid-column: 2; }
  .lists { grid-template-columns: 1fr; }
  .list-main .feed { grid-template-columns: repeat(4, minmax(140px, 1fr)); }
}

@media (max-width: 780px) {
  :root { --rail-width: 58px; }
  .rail-label, .rp-text, .rp-x { display: none; }
  .rail-toggle { visibility: hidden; }
  .app-top { width: 100%; min-width: 0; height: auto; min-height: 54px; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px 14px; overflow: hidden; }
  .app-search, .app-actions { min-width: 0; grid-column: 1; }
  .app-search { grid-row: 2; max-width: none; }
  .app-actions { grid-row: 1; justify-self: stretch; justify-content: flex-end; }
  .app-body { padding: 40px 14px 64px; }
  .hero h1 { font-size: 32px; }
  .hero p { max-width: 38ch; font-size: 12px; }
  .bento { grid-template-columns: 1fr; }
  .tile-explore, .tile-payouts, .tile-fees, .tile-route, .tile-docs { grid-column: 1; }
  .pv-card { width: 88px; }
  .list-main .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 29px; }
  .hero-cta { flex-wrap: wrap; }
}

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