@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

/* pump.fun colours: navy ground, the pill's green, white, a yellow for the newest coin */
:root {
  --bg: #1b1d28;
  --bg-deep: #14151d;
  --panel: #2e303a;
  --edge: #3b3e4b;
  --text: #ffffff;
  --soft: #a6abbd;
  --green: #86efac;
  --green-2: #4ade80;
  --green-ink: #15803d;
  --yellow: #fde047;
  --ink: #0f1117;
  --ink-soft: #4b5563;
  --line: #e5e7eb;
  --red: #f87171;
  --red-ink: #b91c1c;
  --radius-big: 28px;
  --pop: 6px 6px 0 var(--green-2);
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  font-family: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  font-variation-settings: "opsz" 14;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-variation-settings: "opsz" 96; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.05; font-weight: 800; font-stretch: 85%; }
h3 { font-size: 20px; line-height: 1.2; font-weight: 700; }
p { margin: 0; }
.quiet { color: var(--soft); }

/* header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: var(--bg-deep);
  border-bottom: 1px solid var(--edge);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; font-stretch: 80%; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; color: var(--soft); }
.nav a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.wallet {
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 18px;
  background: var(--green);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
  white-space: nowrap;
}
.wallet:hover { background: var(--green-2); }
.wallet:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.wallet.on { background: var(--panel); color: var(--text); border-color: var(--edge); }

/* hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  grid-template-areas: "copy latest" "bubble latest";
  gap: 32px 48px;
  padding: clamp(36px, 6vw, 72px) clamp(16px, 4vw, 48px) clamp(56px, 8vw, 96px);
}
.hero-copy { grid-area: copy; max-width: 720px; }
.hero h1 {
  font-size: clamp(56px, 9vw, 120px);
  line-height: 0.88;
  font-weight: 800;
  font-stretch: 78%;
  letter-spacing: -0.035em;
}
.lede { margin-top: 22px; max-width: 58ch; font-size: 19px; color: #c7cbd8; }
.lede a { color: var(--green); font-weight: 700; text-underline-offset: 3px; }

.bubble {
  grid-area: bubble;
  position: relative;
  padding: 26px 28px 24px;
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius-big);
  box-shadow: 10px 10px 0 var(--green-2);
  animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
  transform-origin: 12% 100%;
}
.bubble::after {
  content: "";
  position: absolute;
  left: 46px;
  bottom: -26px;
  width: 36px;
  height: 26px;
  background: #fff;
  border: 3px solid var(--ink);
  border-top: 0;
  border-right: 0;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.line {
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.1;
  font-weight: 800;
  font-stretch: 82%;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.kw { color: var(--green-ink); }
.slot { border-bottom: 4px solid var(--line); color: #6b7280; transition: border-color 0.2s, color 0.2s; }
.slot.filled { color: var(--ink); border-color: var(--green-2); }
.slot.bad { color: var(--red-ink); border-color: var(--red-ink); border-bottom-style: dashed; }
.fields { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 14px 16px; margin-top: 22px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.wide { grid-column: 1 / -1; }
.field span { font-size: 14px; font-weight: 700; }
.field input {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  background: #f4f5f7;
  font-size: 17px;
}
.field input:focus { outline: none; border-color: var(--green-ink); box-shadow: 0 0 0 3px #bbf7d0; background: #fff; }
.field input[aria-invalid="true"] { border-color: var(--red-ink); }
.field small { font-size: 13px; color: var(--ink-soft); }
.field input[aria-invalid="true"] + small { color: var(--red-ink); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.copy {
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 12px 26px;
  background: var(--green);
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
}
.copy:hover:not(:disabled) { background: var(--green-2); }
.copy:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.copy:disabled { background: #e5e7eb; color: #8b919d; border-color: #c4c8d0; box-shadow: none; cursor: not-allowed; }
.copy.done { background: var(--yellow); color: var(--ink); }
.ghost { font-weight: 700; text-underline-offset: 4px; }
.note { margin-top: 14px; font-size: 14px; color: var(--ink-soft); }

.latest {
  grid-area: latest;
  align-self: start;
  padding: 22px;
  background: var(--yellow);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius-big);
  box-shadow: var(--pop);
  transform: rotate(2deg);
}
.latest-head { font-weight: 800; font-size: 18px; margin-bottom: 14px; }
.latest-img { width: 100%; aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; background: #fff; }
.latest-img img, .latest-img .face { width: 100%; height: 100%; object-fit: cover; }
.latest-name { margin-top: 14px; font-size: 30px; line-height: 1; font-weight: 800; font-stretch: 80%; overflow-wrap: anywhere; }
.latest-meta { margin-top: 6px; font-size: 15px; }
.latest-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-weight: 700; }
.latest-empty p + p { margin-top: 8px; }
.latest .quiet { color: var(--ink); }

/* steps */
.how, .coins, .fees { padding: clamp(48px, 7vw, 88px) clamp(16px, 4vw, 48px); max-width: 1280px; margin: 0 auto; }
.how { border-top: 3px solid var(--edge); }
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin: 36px 0 0;
  padding: 0;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--green);
  color: var(--ink);
  font-size: 26px;
  font-weight: 800;
}
.steps li:nth-child(2)::before { background: var(--yellow); }
.steps li:nth-child(3)::before { background: #fff; }
.steps li:nth-child(4)::before { background: var(--green-2); }
.steps p { margin-top: 8px; color: var(--soft); max-width: 34ch; }

/* coins */
.coins { border-top: 3px solid var(--edge); }
.coins-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
.search {
  width: min(360px, 100%);
  border: 2px solid var(--green);
  border-radius: 999px;
  padding: 11px 18px;
  background: var(--green);
  color: var(--ink);
}
.search::placeholder { color: #1f5133; }
.search:focus { outline: none; border-color: #fff; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 26px 20px;
  margin-top: 30px;
}
.coin { display: block; text-decoration: none; }
.coin-img { aspect-ratio: 1; border: 3px solid var(--edge); border-radius: 18px; overflow: hidden; background: var(--panel); transition: transform 0.15s, box-shadow 0.15s; }
.coin:hover .coin-img, .coin:focus-visible .coin-img { transform: translate(-3px, -3px); box-shadow: var(--pop); }
.coin-img img, .coin-img .face { width: 100%; height: 100%; object-fit: cover; }
.coin-name { margin-top: 10px; font-size: 20px; line-height: 1.15; font-weight: 800; overflow-wrap: anywhere; }
.coin-meta { font-size: 14px; color: var(--soft); overflow-wrap: anywhere; }
.face { display: grid; place-items: center; font-size: 56px; font-weight: 800; font-stretch: 75%; color: #fff; }
.empty {
  grid-column: 1 / -1;
  padding: 36px;
  border: 3px dashed var(--edge);
  border-radius: var(--radius-big);
  background: var(--panel);
}
.empty h3 { font-size: 26px; }
.empty p { margin-top: 8px; color: var(--soft); max-width: 56ch; }
.empty a { display: inline-block; margin-top: 16px; font-weight: 800; color: var(--green); }

/* fees */
.fees { border-top: 3px solid var(--edge); }
.split {
  display: flex;
  height: 92px;
  margin-top: 32px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--pop);
}
.part { display: flex; align-items: center; gap: 14px; padding: 12px 22px; min-width: 0; color: var(--ink); }
.part + .part { border-left: 3px solid var(--ink); }
.part b { font-size: 36px; font-weight: 800; font-stretch: 78%; }
.part span { font-weight: 600; }
.part.you { background: var(--green); }
.part.burn { justify-content: center; padding: 12px 8px; background: var(--yellow); min-width: 74px; }
.part.burn b { font-size: 24px; }
.part.ops { padding: 12px 0; background: #fff; min-width: 18px; }
.split-key { list-style: none; display: grid; gap: 10px; margin: 26px 0 0; padding: 0; max-width: 64ch; color: #c7cbd8; }
.split-key li { display: flex; gap: 12px; align-items: baseline; }
.dot { flex: none; width: 14px; height: 14px; border-radius: 50%; transform: translateY(1px); }
.dot.you { background: var(--green); }
.dot.burn { background: var(--yellow); }
.dot.ops { background: #fff; }
.mine { margin-top: 40px; padding: 26px; background: var(--panel); border: 3px solid var(--edge); border-radius: var(--radius-big); }
.mine-list { display: grid; gap: 12px; margin-top: 16px; }
.mine-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-top: 12px; border-top: 2px solid var(--edge); }
.mine-row:first-child { padding-top: 0; border-top: 0; }
.mine-row .thumb { width: 48px; height: 48px; border: 2px solid var(--edge); border-radius: 10px; overflow: hidden; }
.mine-row .thumb img, .mine-row .thumb .face { width: 100%; height: 100%; object-fit: cover; font-size: 18px; }
.mine-row b { font-size: 18px; }

/* shared buttons and messages */
.claim-btn {
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 18px;
  background: var(--green);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
}
.claim-btn:hover { background: var(--green-2); }
.claim-btn:disabled { opacity: 0.6; cursor: wait; }
.msg { font-size: 14px; font-weight: 600; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green); }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  transform: translateX(-50%);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 4px 4px 0 var(--green-2);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 28px clamp(16px, 4vw, 48px);
  background: var(--bg-deep);
  border-top: 1px solid var(--edge);
  color: var(--soft);
  font-size: 15px;
}
.foot a { color: var(--text); margin-left: 16px; }

/* token page */
.coin-page { max-width: 1080px; margin: 0 auto; padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 48px) 96px; }
.back { display: inline-block; font-weight: 700; margin-bottom: 26px; color: var(--green); }
.coin-layout { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 44px; align-items: start; }
.coin-hero-img { aspect-ratio: 1; border: 3px solid var(--edge); border-radius: var(--radius-big); overflow: hidden; background: var(--panel); box-shadow: 10px 10px 0 var(--green-2); }
.coin-hero-img img, .coin-hero-img .face { width: 100%; height: 100%; object-fit: cover; font-size: 110px; }
.coin-title { font-size: clamp(44px, 6vw, 76px); line-height: 0.92; font-weight: 800; font-stretch: 78%; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.coin-ticker { margin-top: 10px; font-size: 22px; font-weight: 700; color: var(--green); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; margin: 28px 0 0; }
.facts dt { color: var(--soft); }
.facts dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.addr { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mini {
  border: 2px solid var(--edge);
  border-radius: 999px;
  padding: 2px 12px;
  background: var(--panel);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.mini:hover { border-color: var(--green); }
.trade {
  display: inline-block;
  margin-top: 30px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 14px 30px;
  background: var(--green);
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 4px 4px 0 #000;
}
.trade:hover { background: var(--green-2); }
.claim-box { margin-top: 30px; padding: 22px; background: var(--panel); border: 3px solid var(--edge); border-radius: 20px; }
.claim-box p + p, .claim-box p + button, .claim-box button + p { margin-top: 10px; }
.missing { padding: 40px; border: 3px dashed var(--edge); border-radius: var(--radius-big); background: var(--panel); }
.missing h1 { font-size: 40px; font-weight: 800; }
.missing p { margin-top: 10px; color: var(--soft); }
.missing a { color: var(--green); }

@keyframes pop {
  from { opacity: 0; transform: scale(0.85) rotate(-2deg); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "bubble" "latest"; }
  .latest { transform: none; max-width: 420px; margin-top: 18px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coin-layout { grid-template-columns: minmax(0, 1fr); }
  .coin-hero-img { max-width: 420px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top { gap: 12px; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 18px; }
  .wallet { margin-left: auto; padding: 7px 14px; }
  .lede { font-size: 17px; }
  .bubble { padding: 20px 18px; box-shadow: 6px 6px 0 var(--green-2); }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .coin-name { font-size: 17px; }
  .face { font-size: 40px; }
  .split { height: 76px; }
  .part { padding: 10px 14px; }
  .part b { font-size: 28px; }
  .part.you span { display: none; }
  .part.burn { min-width: 56px; }
  .part.burn b { font-size: 18px; }
  .foot a { margin-left: 0; margin-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bubble { animation: none; }
  .coin-img, .slot { transition: none; }
}
