/* Wrench — pump.fun-style theme built from the logo palette
   outline #082820 · steel head #e8f0f0 · handle green #50c078 */
:root {
  --bg: #0c110f;
  --surface: #111814;
  --surface-strong: #172019;
  --border: #202c26;
  --border-strong: #2c3c34;
  --fg: #e8f0ee;
  --muted: #9fb3ab;
  --faint: #6c8078;
  --accent: #50c078;
  --accent-hover: #63d18a;
  --accent-strong: #3fae68;
  --accent-soft: #10261a;
  --ink: #082820;
  --steel: #b0c8c0;
  --positive: #4ade80;
  --negative: #f87171;
  --warn: #fbbf24;
  --radius: 14px;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Helvetica Neue", Helvetica, Arial, sans-serif; /* same face everywhere, labels keep their tracking */
}
* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(900px 420px at 50% -120px, rgba(80, 192, 120, 0.10), transparent 60%);
}
a { color: inherit; text-decoration: none; }
img { display: block; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: rgba(80, 192, 120, 0.35); }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

/* ---------- scattered background logos ---------- */
.bg-logos { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-logos img {
  position: absolute; top: -280px; opacity: .07; filter: blur(2.5px); user-select: none; will-change: transform;
  transform: translate(-50%, 0) rotate(var(--r, 0deg));
  animation: fall 24s linear infinite;
}
@keyframes fall {
  from { transform: translate(-50%, 0) rotate(var(--r, 0deg)); }
  to   { transform: translate(-50%, calc(100vh + 340px)) rotate(calc(var(--r, 0deg) + 90deg)); }
}
@media (prefers-reduced-motion: reduce) {
  .bg-logos img { animation: none; top: var(--y, 40%); transform: translate(-50%, -50%) rotate(var(--r, 0deg)); }
}

/* ---------- typography helpers (mirrors the pump.fun / terminal look) ---------- */
.label {
  font-family: var(--mono); font-size: 11px; line-height: 1;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint);
}
.tnum { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.accent { color: var(--accent); }
.positive { color: var(--positive); }
.negative { color: var(--negative); }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 20px; font-weight: 600; }
p { margin: 0; }

/* ---------- header ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.btn svg { width: 14px; height: 14px; }
.btn-icon { padding: 9px 11px; }
.btn-icon svg { width: 16px; height: 16px; }
@media (max-width: 480px) { .topbar-actions .btn { padding: 8px 12px; font-size: 13px; } }
.nav { display: flex; gap: 20px; font-family: var(--mono); font-size: 12px; }
.nav a { color: var(--faint); transition: color .15s; }
.nav a:hover, .nav a.active { color: var(--fg); }
@media (max-width: 640px) { .nav { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface-strong); color: var(--fg); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--positive); }

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 0 22px; }
.hero .logo { width: 104px; height: 104px; filter: drop-shadow(0 0 28px rgba(80,192,120,.35)); }
.hero h1 { margin-top: 14px; font-size: 40px; font-weight: 700; }
.hero .label { margin-top: 10px; }
.hero .blurb { max-width: 560px; margin-top: 18px; color: var(--muted); font-size: 15px; }
.hero .cta { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; justify-content: center; }

/* ---------- stats ---------- */
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 44px; padding: 10px 0 8px; text-align: center; }
.stats .v { margin-top: 6px; font-size: 15px; font-weight: 500; }

/* ---------- cards & sections ---------- */
.section { padding: 26px 0 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 12px; }
.section-head p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 22px; }
@media (max-width: 640px) { .card-pad { padding: 16px; } }

.live { display: inline-flex; align-items: center; gap: 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--positive); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1 } 50% { opacity: .4 } }
.scanline { position: relative; height: 1px; background: var(--border); overflow: hidden; margin: 8px 0; }
.scanline::after { content: ""; position: absolute; top: 0; left: -30%; width: 30%; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: scan 2.6s linear infinite; }
@keyframes scan { to { left: 100% } }

/* ---------- launch form ---------- */
.launch-grid { display: grid; grid-template-columns: 220px 1fr; gap: 22px; }
@media (max-width: 640px) { .launch-grid { grid-template-columns: 1fr; } .dropzone { max-width: 220px; margin: 0 auto; } }
.dropzone {
  aspect-ratio: 1; border: 0; outline: 0; box-shadow: none; border-radius: 12px;
  background: var(--surface-strong); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; cursor: pointer; text-align: center; padding: 16px; position: relative;
  transition: background .15s;
}
.dropzone:hover, .dropzone.drag { background: var(--accent-soft); }
.dropzone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.dropzone img[hidden] { display: none; }
.dropzone input { display: none; }
.dropzone .hint { font-size: 12px; color: var(--faint); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
.input, textarea.input {
  width: 100%; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; outline: none; transition: border-color .15s;
}
.input:focus { border-color: var(--accent); }
textarea.input { min-height: 84px; resize: vertical; }
.input-wrap { position: relative; }
.input-wrap .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); font-family: var(--mono); font-size: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border-strong); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 500; cursor: pointer; transition: all .15s;
}
.chip:hover, .chip.on { border-color: var(--accent); color: var(--fg); background: var(--accent-soft); }
.more-toggle { background: none; border: none; padding: 0; color: var(--faint); font-family: var(--mono); font-size: 12px; cursor: pointer; }
.more-toggle:hover { color: var(--fg); }
.mechanic-note {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px;
  background: var(--accent-soft); border: 1px solid rgba(80,192,120,.25); font-size: 13px; color: var(--muted); margin-bottom: 16px;
}
.mechanic-note b { color: var(--fg); }
.mechanic-note .ico { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.status { margin-top: 12px; font-size: 13px; color: var(--muted); min-height: 20px; }
.status.err { color: var(--negative); }
.status.ok { color: var(--positive); }
.result { margin-top: 16px; padding: 16px; border-radius: 12px; background: var(--surface-strong); border: 1px solid var(--border-strong); display: none; }
.result.show { display: block; }
.result .kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: 13px; margin-top: 10px; }
.result .kv .k { color: var(--faint); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; line-height: 1.7; }
.result .kv .v { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.result .actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* ---------- mechanism ---------- */
.mech { display: flex; flex-direction: column; }
.mech-head { padding: 22px 22px 14px; border-bottom: 1px solid var(--border); }
.mech-head p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.step { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: none; }
.step .n { font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 3px; }
.step h3 { font-size: 15px; font-weight: 600; }
.step p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.step p b { color: var(--fg); font-weight: 600; }
@media (max-width: 640px) { .step { padding: 16px; grid-template-columns: 40px 1fr; } .mech-head { padding: 16px 16px 12px; } }

/* ---------- coin rows ---------- */
.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.row:last-child { border-bottom: none; }
.row:hover { background: var(--surface-strong); }
.row .avatar { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--surface-strong); flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.row .avatar.ph { display: flex; align-items: center; justify-content: center; }
.row .main { min-width: 0; flex: 1; }
.row .name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.row .name .sym { font-family: var(--mono); color: var(--muted); font-weight: 500; font-size: 13px; }
.row .sub { display: flex; gap: 12px; margin-top: 3px; font-size: 12px; color: var(--faint); flex-wrap: wrap; }
.row .right { text-align: right; flex: none; }
.row .right .big { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.row .right .small { font-size: 12px; margin-top: 2px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--border-strong); color: var(--muted);
}
.pill.green { border-color: rgba(80,192,120,.5); color: var(--accent); background: var(--accent-soft); }
.pill.hot { border-color: rgba(248,113,113,.5); color: var(--negative); }
.empty { padding: 34px 16px; text-align: center; color: var(--faint); font-size: 14px; }
.empty b { color: var(--muted); font-weight: 500; }

/* ---------- faq ---------- */
.faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq details:last-child { border-bottom: none; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-family: var(--mono); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin-top: 8px; color: var(--muted); font-size: 14px; }

/* ---------- footer ---------- */
.footer { padding: 34px 0 40px; text-align: center; color: var(--faint); font-size: 12px; font-family: var(--mono); }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--fg); }

/* ---------- wallet modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-bg.show { display: flex; }
.modal { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; padding: 18px; }
.modal h3 { font-size: 16px; margin-bottom: 12px; }
.wallet-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-strong); cursor: pointer; margin-bottom: 8px; text-align: left; font-weight: 500; }
.wallet-btn:hover { border-color: var(--accent); }
.wallet-btn img { width: 26px; height: 26px; border-radius: 6px; }
.modal .note { font-size: 12px; color: var(--faint); margin-top: 6px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--surface-strong); border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 14px; font-size: 13px; display: none; z-index: 60; max-width: 90vw; }
.toast.show { display: block; }

/* ---------- demo mode (/?demo): scripted launch flow for screen recordings ---------- */
.demo-cursor { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; transform: translate(-100px, -100px); filter: drop-shadow(0 2px 3px rgba(0,0,0,.7)); }
.demo-cursor svg { width: 26px; height: 26px; display: block; }
.demo-cursor .ring { position: absolute; left: -7px; top: -10px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.demo-cursor.click .ring { animation: ring .45s ease-out; }
@keyframes ring { 0% { opacity: .9; transform: scale(.4) } 100% { opacity: 0; transform: scale(1.9) } }
.row.pop { animation: pop .6s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { 0% { opacity: 0; transform: translateY(-8px); background: var(--accent-soft) } 60% { opacity: 1; background: var(--accent-soft) } 100% { transform: none; background: transparent } }
.bump { animation: bump .6s ease-out; }
@keyframes bump { 0% { color: var(--accent); transform: scale(1.18) } 100% { transform: scale(1) } }
.demo-wallet { position: fixed; top: 76px; right: 24px; width: 320px; z-index: 250; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; padding: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.55); opacity: 0; transform: translateY(-10px) scale(.98); pointer-events: none; transition: opacity .25s, transform .25s; }
.demo-wallet.show { opacity: 1; transform: none; }
.dw-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.dw-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); }
.dw-site { margin-top: 6px; font-size: 12px; color: var(--faint); }
.dw-rows { margin: 12px 0; border-top: 1px solid var(--border); }
.dw-rows > div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.dw-rows b { color: var(--fg); font-weight: 500; }
.dw-actions { display: flex; gap: 8px; }
.dw-actions .btn { flex: 1; }
@media (max-width: 640px) { .demo-wallet { right: 12px; left: 12px; width: auto; } }
