:root {
  --bg: #000;
  --fg: #fff;
  --muted: #8f8f8f;
  --faint: #5c5c5c;
  --line: #1d1d1d;
  --line-strong: #2c2c2c;
  --panel: #0b0b0b;
  --buy: #22c55e;
  --burn: #f97316;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Outfit', ui-rounded, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; border-radius: 6px; }

/* Static starfield */
.stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 8% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 23% 64%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 37% 28%, #bbb 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 82%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 18%, #ccc 50%, transparent 51%),
    radial-gradient(1px 1px at 79% 47%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 76%, #aaa 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 14% 88%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 72% 6%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 46%, #999 50%, transparent 51%),
    radial-gradient(1px 1px at 96% 30%, #ddd 50%, transparent 51%),
    radial-gradient(1px 1px at 3% 52%, #bbb 50%, transparent 51%);
  background-size: 520px 520px;
}

/* Top bar */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
  padding: 0 max(20px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; font-size: 1.05rem; }
.brand img { border-radius: 8px; }
.links { display: flex; gap: 22px; margin-left: auto; }
.links a { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); text-decoration: none; transition: color 0.15s; }
.links a:hover { color: var(--fg); }
.ca {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg);
  transition: border-color 0.15s, background 0.15s;
}
.ca:hover { border-color: #555; background: #111; }
.ca-tag { color: var(--muted); }

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 16px 96px;
  text-align: center;
  overflow: hidden;
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 36px; }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--buy); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.icon { width: 76px; height: 76px; border-radius: 18px; display: block; box-shadow: 0 0 0 1px var(--line-strong), 0 0 60px rgba(255, 255, 255, 0.08); }
h1 {
  margin-top: 28px;
  font-weight: 800;
  font-size: clamp(3rem, 13vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
}
.stats { margin-top: clamp(48px, 8vw, 80px); display: flex; justify-content: center; }
.stat { padding: 0 clamp(22px, 6vw, 64px); min-width: 0; }
.stat + .stat { border-left: 1px solid var(--line-strong); }
.value { font-weight: 800; font-size: clamp(2rem, 6.4vw, 3.5rem); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
#buybacks { color: var(--buy); }
#burnt { color: var(--burn); }
.label { margin-top: 12px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.status { margin-top: 6px; font-family: var(--mono); font-size: 0.68rem; color: var(--faint); min-height: 1.2em; }
.cta {
  margin-top: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
}
.cta:hover { transform: translateY(-1px); opacity: 0.9; }
.horizon {
  position: absolute;
  left: 50%;
  bottom: -62vw;
  width: 140vw;
  height: 70vw;
  transform: translateX(-50%);
  border-radius: 50%;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.1), transparent 55%);
  box-shadow: 0 -30px 120px rgba(255, 255, 255, 0.06);
  pointer-events: none;
  z-index: -1;
}

/* Sections */
.section { max-width: 1080px; margin: 0 auto; padding: 96px 16px 0; }
.section-head { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 10px; align-items: baseline; margin-bottom: 32px; }
.index { font-family: var(--mono); font-size: 0.75rem; color: var(--faint); }
h2 { font-weight: 800; font-size: clamp(1.8rem, 4.5vw, 2.75rem); letter-spacing: -0.03em; line-height: 1; }
.section-head p { grid-column: 2; color: var(--muted); max-width: 560px; line-height: 1.5; }
.empty { padding: 28px 16px; color: var(--faint); font-family: var(--mono); font-size: 0.8rem; text-align: center; list-style: none; }

/* Chat */
.chat { border: 1px solid var(--line-strong); border-radius: 20px; background: var(--panel); overflow: hidden; }
.chat-log { height: min(440px, 60svh); overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; scroll-behavior: smooth; }
.msg { display: flex; gap: 12px; align-items: flex-start; max-width: 85%; }
.msg p { line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.bot img { border-radius: 8px; flex: none; margin-top: 1px; }
.msg.user { align-self: flex-end; }
.msg.user p { background: #1a1a1a; border: 1px solid var(--line-strong); padding: 10px 14px; border-radius: 16px 16px 4px 16px; }
.msg.error p { color: var(--burn); }
.msg.thinking p::after { content: '▍'; animation: blink 1s steps(1) infinite; color: var(--muted); }
@keyframes blink { 50% { opacity: 0; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 16px; }
.chips button { border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 13px; font-size: 0.85rem; color: var(--muted); transition: color 0.15s, border-color 0.15s; }
.chips button:hover { color: var(--fg); border-color: #555; }
.chat-form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.chat-form input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #000;
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
}
.chat-form input:focus { outline: none; border-color: #666; }
.chat-form button { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--fg); display: grid; place-items: center; transition: opacity 0.15s; }
.chat-form button svg { width: 18px; height: 18px; fill: none; stroke: #000; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chat-form button:disabled, .chat-form input:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-note { padding: 0 24px 14px; font-family: var(--mono); font-size: 0.68rem; color: var(--faint); }

/* Paired tokens */
.paired-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.table { border: 1px solid var(--line-strong); border-radius: 20px; overflow: hidden; background: var(--panel); }
.row {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 0.6fr) 20px;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.15s;
}
.row.head { border-top: 0; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
a.row:hover { background: #121212; }
.token { display: flex; align-items: center; gap: 12px; min-width: 0; }
.token img, .token .ph { width: 36px; height: 36px; border-radius: 10px; flex: none; object-fit: cover; background: #1a1a1a; }
.token-name { min-width: 0; }
.token-name strong { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.token-name span { display: block; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.num { font-variant-numeric: tabular-nums; font-weight: 500; }
.num small { display: block; font-family: var(--mono); font-size: 0.68rem; color: var(--faint); font-weight: 400; }
.bar { height: 4px; border-radius: 4px; background: #222; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--fg); border-radius: 4px; }
.bar.done i { background: var(--buy); }
.bar-label { margin-top: 6px; font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }
.age { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.go { color: var(--faint); font-size: 1rem; }
.more { display: block; margin: 16px auto 0; height: 40px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 999px; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.more:hover { color: var(--fg); border-color: #555; }

/* News */
.news { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.news li { border-bottom: 1px solid var(--line); }
.news a { display: grid; grid-template-columns: 150px minmax(0, 1fr) 20px; gap: 20px; align-items: baseline; padding: 18px 4px; text-decoration: none; transition: background 0.15s; }
.news a:hover { background: #0d0d0d; }
.news .when { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }
.news .when b { display: block; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news .title { font-size: 1.05rem; line-height: 1.4; }

/* Footer */
.footer { max-width: 1080px; margin: 0 auto; padding: 96px 16px 140px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer p { font-family: var(--mono); font-size: 0.7rem; color: var(--faint); }
.ca-full { max-width: 100%; height: auto; min-height: 36px; padding: 8px 14px; }
.ca-full span:last-child { overflow-wrap: anywhere; }

/* X community callout */
.community { position: fixed; z-index: 20; left: max(20px, env(safe-area-inset-left)); bottom: max(20px, env(safe-area-inset-bottom)); display: inline-flex; padding: 4px; color: var(--fg); text-decoration: none; }
.community .x { width: 22px; height: 22px; fill: currentColor; opacity: 0.85; transition: opacity 0.15s; }
.community:hover .x, .community:focus-visible .x { opacity: 1; }
.callout { position: absolute; left: 28px; bottom: 28px; pointer-events: none; animation: bob 2.4s ease-in-out infinite; transition: opacity 0.25s; }
.community.scrolled .callout { opacity: 0; }
.community.scrolled .bubble { pointer-events: none; }
.arrow { position: absolute; left: 0; bottom: 0; width: 58px; height: 60px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.bubble {
  position: absolute;
  left: 50px;
  bottom: 54px;
  padding: 12px 18px;
  border-radius: 20px 20px 20px 5px;
  background: var(--fg);
  color: var(--bg);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}
@keyframes bob { 50% { transform: translateY(-3px); } }

@media (max-width: 720px) {
  .links { display: none; }
  .ca { margin-left: auto; }
  .row { grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr) minmax(0, 1fr); padding: 14px 16px; gap: 12px; }
  .hide-sm, .go { display: none; }
  .news a { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .news .when b { display: inline; }
  .news .when b::after { content: ' · '; color: var(--faint); }
  .news .go-n { display: none; }
  .chat-log { padding: 18px; }
  .chips { padding: 0 18px 14px; }
  .msg { max-width: 100%; }
  .section-head p { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .callout, .pulse, .msg.thinking p::after { animation: none; }
}
