/* ==== RESET / BASE ==== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --bg: #0d0d0d;
  --bg-soft: #171717;
  --surface: #1f1f1f;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.18);
  --ink: #ececec;
  --ink-soft: rgba(236,236,236,0.65);
  --ink-faint: rgba(236,236,236,0.4);
  --green: #10A37F;
  --green-dark: #0E8E6E;
  --green-soft: rgba(16,163,127,0.18);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100svh;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==== MARQUEE ==== */
.marquee {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 32px;
  background: #000;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  z-index: 6;
  display: flex;
  align-items: center;
}
.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: scroll-marquee 36s linear infinite;
  will-change: transform;
}
.marquee-track span {
  display: inline-block;
  padding: 0 18px;
  font-size: 12px;
  letter-spacing: 0.06em;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
}
.m-tag { color: #fff; }
.m-quote { color: rgba(255,255,255,0.55); font-style: italic; }
.m-dot { color: var(--green); font-size: 14px; }
@keyframes scroll-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==== NAV ==== */
.nav {
  position: fixed;
  top: 32px;
  left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(13,13,13,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.nav-brand img { width: 26px; height: 26px; border-radius: 6px; }
.nav-right { display: flex; align-items: center; gap: 6px; }
.nav-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-link svg { width: 14px; height: 14px; }
.btn-pill {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s;
  display: inline-flex; align-items: center;
  font-family: inherit;
  cursor: pointer;
}
.btn-solid {
  background: var(--green);
  color: #fff;
}
.btn-solid:hover { background: var(--green-dark); transform: translateY(-1px); }

/* ==== HERO ==== */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 130px 24px 100px;
  transition: padding 0.5s ease;
}
.hero-inner {
  width: 100%;
  max-width: 760px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  transition: gap 0.5s ease;
}

.hero-logo {
  width: 88px; height: 88px;
  border-radius: 18px;
  filter: drop-shadow(0 12px 36px rgba(16,163,127,0.35));
  transition: width 0.4s ease, height 0.4s ease;
}
.hero-title {
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1;
}
.hero-greet {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0;
  max-width: 460px;
  line-height: 1.5;
}

/* Chat mode collapse */
body.chatting .hero { align-items: flex-start; padding: 100px 24px 40px; }
body.chatting .hero-inner { gap: 16px; min-height: calc(100svh - 200px); }
body.chatting .hero-logo { width: 48px; height: 48px; }
body.chatting .hero-title { font-size: 24px; }
body.chatting .hero-greet,
body.chatting .suggestions,
body.chatting .ca-block { display: none; }

/* ==== PROMPT ==== */
.prompt {
  width: min(94vw, 720px);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 10px 12px 10px 18px;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.prompt:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.prompt-attach, .prompt-send {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
.prompt-attach:hover { color: #fff; background: rgba(255,255,255,0.06); }
.prompt-attach svg { width: 18px; height: 18px; }
.prompt-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
  padding: 8px 0;
  font-weight: 400;
}
.prompt-input::placeholder { color: var(--ink-faint); }
.prompt-meta { display: flex; align-items: center; gap: 4px; }

.mode-wrap { position: relative; }
.prompt-mode {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 6px 8px 6px 12px;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
  font-family: inherit;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.prompt-mode:hover { color: #fff; border-color: var(--line-strong); }
.prompt-mode svg { width: 14px; height: 14px; opacity: 0.7; }

.mode-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7);
  z-index: 20;
  animation: menuIn 0.15s ease-out;
}
@keyframes menuIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mode-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  border-radius: 10px;
  text-align: left;
  transition: background 0.12s;
}
.mode-opt:hover { background: rgba(255,255,255,0.05); }
.mode-opt.active { background: var(--green-soft); }
.mode-opt-name { font-size: 14px; font-weight: 600; }
.mode-opt-desc { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

.prompt-send {
  background: var(--green);
  color: #fff;
}
.prompt-send:hover { background: var(--green-dark); }
.prompt-send:disabled { background: rgba(255,255,255,0.08); color: var(--ink-faint); cursor: not-allowed; }
.prompt-send svg { width: 16px; height: 16px; }

/* ==== SUGGESTION CHIPS ==== */
.suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: min(94vw, 720px);
  margin-top: 4px;
}
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: var(--line-strong); }

/* ==== CHAT LOG ==== */
.chat-log {
  width: min(94vw, 720px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}
.chat-log:empty { display: none; }
.msg {
  animation: answerIn 0.35s ease-out;
  text-align: left;
  width: 100%;
}
.msg-user {
  align-self: flex-end;
  max-width: 85%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px 22px 6px 22px;
  padding: 12px 18px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  margin-left: auto;
}
.msg-assistant {
  background: rgba(16,163,127,0.04);
  border: 1px solid rgba(16,163,127,0.18);
  border-radius: 22px;
  padding: 18px 20px;
}
@keyframes answerIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.answer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.answer-avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--green);
}
.answer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.answer-name { font-weight: 700; font-size: 14px; color: #fff; }
.answer-status { font-size: 12px; color: var(--ink-faint); }
.answer-status.done { color: var(--green); }

.answer-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  min-height: 1.55em;
}
.answer-body .caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: currentColor;
  vertical-align: -2px;
  margin-left: 1px;
  animation: blink 0.8s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.answer-disclaimer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-faint);
  font-style: italic;
}

/* ==== CA BLOCK ==== */
.ca-block {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
  max-width: 92vw;
  overflow: hidden;
}
.ca-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
#ca {
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: inherit;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,0.08); border-color: var(--line-strong); }

/* ==== FOOTER ==== */
.foot {
  position: relative;
  z-index: 3;
  padding: 24px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
}
.foot em { color: var(--ink-soft); font-style: italic; }

/* ==== ELON SECTION ==== */
.elon {
  position: relative;
  z-index: 2;
  padding: 80px 24px 100px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
}
.elon-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}
.elon-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--green);
  font-weight: 600;
  text-transform: uppercase;
}
.elon-title {
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
  max-width: 820px;
}
.elon-lede {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0;
}
.elon-lede em { color: var(--green); font-style: italic; }

.elon-flagship {
  display: block;
  position: relative;
  margin: 24px 0 8px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
  transition: transform 0.18s, box-shadow 0.18s;
  text-decoration: none;
  max-width: 380px;
  width: 100%;
}
.elon-flagship:hover { transform: translateY(-2px); box-shadow: 0 24px 60px rgba(16,163,127,0.25); }
.elon-flagship img { width: 100%; height: auto; display: block; }
.elon-flagship-cap {
  position: absolute;
  bottom: 12px; right: 12px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}

/* tweet card grid */
.tweet-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  width: 100%;
  margin-top: 16px;
  text-align: left;
}
.tw-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  transition: border-color 0.15s, transform 0.15s;
}
.tw-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.tw-card--us {
  border-color: var(--green);
  background: linear-gradient(135deg, rgba(16,163,127,0.08), rgba(16,163,127,0.02));
}
.tw-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tw-av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1c1c1c, #444);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}
.tw-av--ca { background: var(--green); padding: 4px; }
.tw-av--ca img { width: 100%; height: 100%; object-fit: contain; }
.tw-name {
  font-weight: 700; font-size: 14px; line-height: 1.2;
  color: var(--ink);
  display: flex; align-items: center; gap: 4px;
}
.tw-handle { color: var(--ink-faint); font-size: 13px; line-height: 1.2; }
.tw-check {
  display: inline-block; width: 14px; height: 14px;
  background: #1d9bf0; border-radius: 50%;
  color: #fff; font-size: 9px; line-height: 14px;
  text-align: center; font-weight: 800;
}
.tw-check--ca { background: var(--green); }
.tw-body {
  font-size: 14px; line-height: 1.5;
  color: var(--ink);
}
.tw-body strong { background: rgba(16,163,127,0.18); padding: 0 4px; border-radius: 3px; }
.tw-body em { color: var(--ink-soft); font-style: italic; }
.tw-mention { color: #1d9bf0; font-weight: 500; }
.tw-meta {
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* pro-elon / anti-sam stance */
.stance {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-top: 24px;
  text-align: left;
}
.stance-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
}
.stance-card--anti { border-color: rgba(255,80,80,0.3); background: rgba(60,15,15,0.25); }
.stance-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--green);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.stance-card--anti .stance-tag { color: #ff6464; }
.stance ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.stance li {
  font-size: 14px; line-height: 1.5; color: var(--ink-soft);
  padding-left: 22px; position: relative;
}
.stance-card .stance li::before {
  content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 800;
}
.stance-card--anti .stance li::before {
  content: '✕'; color: #ff6464;
}
.stance-card:not(.stance-card--anti) li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.stance-card--anti li::before { content: '✕'; color: #ff6464; position: absolute; left: 0; font-weight: 800; }

@media (max-width: 720px) {
  .stance { grid-template-columns: 1fr; }
}

/* CTA strip */
.cta-strip {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: 28px;
}
.btn-large {
  padding: 14px 26px;
  font-size: 15px;
  border-radius: 999px;
}
.btn-ghost-pill {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  transition: all 0.15s;
}
.btn-ghost-pill:hover { background: rgba(255,255,255,0.05); border-color: #fff; }

/* ==== MOBILE ≤ 820 ==== */
@media (max-width: 820px) {
  /* marquee */
  .marquee { height: 28px; }
  .marquee-track span { font-size: 11px; padding: 0 14px; }

  /* nav */
  .nav { top: 28px; padding: 10px 14px; }
  .nav-brand img { width: 24px; height: 24px; }
  .nav-brand span { display: none; }
  .nav-right { gap: 4px; }
  .nav-link {
    padding: 6px 10px; font-size: 12px;
  }
  .btn-pill { padding: 7px 12px; font-size: 12px; }

  /* hero */
  .hero { padding: 96px 16px 60px; }
  .hero-inner { gap: 18px; }
  .hero-logo { width: 64px; height: 64px; }
  .hero-title { font-size: 36px; }
  .hero-greet { font-size: 14px; max-width: 88vw; }

  /* prompt */
  .prompt {
    width: min(94vw, 720px);
    border-radius: 22px;
    padding: 8px 8px 8px 14px;
    gap: 4px;
  }
  .prompt-attach { display: none; }
  .prompt-input { font-size: 15px; padding: 8px 0; }
  .prompt-mode {
    font-size: 12px;
    padding: 5px 6px 5px 10px;
  }
  .prompt-mode svg { width: 12px; height: 12px; }
  .prompt-send { padding: 7px; }

  /* mode menu */
  .mode-menu { min-width: 220px; right: -4px; }

  /* suggestion chips */
  .suggestions {
    gap: 6px;
    padding: 0 4px;
  }
  .chip {
    font-size: 12px;
    padding: 6px 11px;
  }

  /* CA block */
  .ca-block {
    padding: 8px 12px;
    font-size: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
  #ca {
    font-size: 11px;
    max-width: 56vw;
  }
  .ca-label { font-size: 10px; }
  .btn-ghost { padding: 4px 10px; font-size: 10px; }

  /* chat log */
  .chat-log { width: 96vw; }
  .msg-user { font-size: 14px; padding: 10px 14px; }
  .msg-assistant { padding: 14px 16px; }
  .answer-body { font-size: 14px; }

  /* chat-mode shrunk hero */
  body.chatting .hero { padding: 80px 12px 40px; }
  body.chatting .hero-logo { width: 38px; height: 38px; }
  body.chatting .hero-title { font-size: 18px; }

  /* elon section */
  .elon { padding: 56px 16px 72px; }
  .elon-title { font-size: 26px; }
  .elon-lede { font-size: 14px; }
  .elon-flagship { max-width: 100%; }

  /* tweet grid → single column on phones */
  .tweet-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .tw-card { padding: 14px 16px; border-radius: 14px; }
  .tw-body { font-size: 13.5px; }

  /* stance + cta */
  .stance { gap: 10px; }
  .stance-card { padding: 18px 18px; border-radius: 14px; }
  .stance-card li { font-size: 13.5px; }

  .cta-strip { gap: 8px; flex-direction: column; align-items: stretch; padding: 0 8px; }
  .btn-large, .btn-ghost-pill {
    padding: 12px 20px;
    font-size: 14px;
    text-align: center;
  }

  /* footer */
  .foot {
    flex-direction: column;
    gap: 6px;
    text-align: center;
    padding: 20px 16px;
  }
}

/* ==== TIGHT PHONE ≤ 420 ==== */
@media (max-width: 420px) {
  .marquee-track span { font-size: 10px; padding: 0 10px; }
  .nav { padding: 8px 10px; }
  .nav-link[href*="dexscreener"] { display: none; } /* hide Chart text link, keep X + Buy */
  .btn-pill { padding: 6px 11px; font-size: 11.5px; letter-spacing: 0.06em; }

  .hero { padding: 86px 12px 48px; }
  .hero-logo { width: 56px; height: 56px; }
  .hero-title { font-size: 30px; }
  .hero-greet { font-size: 13.5px; line-height: 1.45; }

  .prompt { padding: 6px 6px 6px 12px; border-radius: 20px; }
  .prompt-input { font-size: 14.5px; }
  .prompt-mode { font-size: 11px; padding: 4px 5px 4px 8px; }
  .prompt-send svg { width: 14px; height: 14px; }

  .chip { font-size: 11.5px; padding: 5px 10px; }

  .ca-block { width: 100%; }
  #ca { max-width: 48vw; }

  .elon-title { font-size: 22px; }
  .elon-eyebrow { font-size: 10px; letter-spacing: 0.16em; }

  .tw-name { font-size: 13px; }
  .tw-handle { font-size: 12px; }

  .stance-tag { font-size: 10px; }

  .foot { font-size: 10px; }
}

/* iOS keyboard / safe-area awareness when chatting */
body.chatting {
  padding-bottom: env(safe-area-inset-bottom);
}
