/* ==========================================================================
   MindBag — design system
   palette: deep forest night + leaf green + mint
   ========================================================================== */

:root {
  --bg: #080e09;
  --panel: #0e170f;
  --panel-2: #152116;
  --line: #213123;
  --line-2: #324a36;
  --ink: #f2f6f0;
  --ink-2: #c3d2c6;
  --mute: #85a08a;
  --brand: #7ee787;
  --brand-ink: #0a1408;
  --mint: #5ff2cf;
  --up: #54e8a2;
  --down: #ff6e5e;
  --warn: #ffc95c;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-sans: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg, video { display: inline-block; }
ul, ol { list-style: none; }
::selection { background: rgba(126, 231, 135, .35); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}

.display-heading {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

/* ============================ header ============================ */

.site-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 20, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 72rem; height: 56px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: 22px; height: 22px; }
.brand-name {
  font-size: 15px; font-weight: 600; letter-spacing: 0.2em;
}

.nav-desktop { display: none; align-items: center; gap: 4px; }
.nav-desktop a {
  padding: 6px 10px; border-radius: 6px;
  font-size: 14px; color: var(--mute);
  transition: color .15s ease;
}
.nav-desktop a:hover { color: var(--ink); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.ca-desktop { display: none; margin-right: 4px; }
.ca-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: border-color .15s ease;
}
.ca-pill:hover { border-color: var(--line-2); }
.ca-label { font-weight: 700; color: var(--brand); font-size: 13px; }
.ca-value { min-width: 11ch; text-align: center; font-size: 12.5px; color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; font-size: 12px; font-weight: 500;
  transition: filter .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-ghost {
  border: 1px solid var(--line); color: var(--ink);
  padding: 6px 10px;
}
.btn-ghost:hover { border-color: var(--line-2); }
.btn-brand {
  height: 44px; padding: 0 20px;
  background: var(--brand); color: var(--brand-ink);
  font-weight: 600; font-size: 14px;
}
.btn-brand:hover { filter: brightness(1.08); }
.btn-brand-sm {
  display: none; height: 34px; padding: 0 14px;
  background: var(--brand); color: var(--brand-ink);
  font-weight: 600; font-size: 13px;
}
.btn-brand-sm:hover { filter: brightness(1.08); }

.icon-btn {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 6px;
  color: var(--ink-2);
  transition: color .15s ease, border-color .15s ease;
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }

.ca-mobile { display: block; }
.ca-mobile-btn {
  width: 100%; height: 32px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: var(--brand-ink);
}
.ca-mobile .ca-label { color: var(--brand-ink); font-size: 12px; }
.ca-mobile .ca-value { color: var(--brand-ink); font-size: 12px; min-width: auto; }
.ca-hint { font-size: 11px; opacity: .75; }

/* ============================ hero ============================ */

.hero-wrap { padding: 8px 8px 0; }

.hero-frame {
  position: relative; overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.hero-media {
  position: absolute; inset: 0;
  background-image: url("../media/hero-mobile-540.webp");
  background-size: cover;
  background-position: bottom;
  filter: hue-rotate(48deg) saturate(.88);
}

.hero-video {
  pointer-events: none;
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 70% center;
  filter: hue-rotate(48deg) saturate(.88);
  display: none;
}

.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(10,10,20,.9) 0%, rgba(10,10,20,.72) 34%, rgba(10,10,20,.22) 56%, rgba(10,10,20,0) 70%, rgba(10,10,20,.3) 100%);
}

.hero-inner {
  position: relative;
  display: flex; flex-direction: column;
  padding: 36px 20px 24px;
  min-height: clamp(600px, calc(100svh - 164px), 780px);
}

.hero-top {
  display: flex; flex-direction: column; gap: 28px;
  margin-top: auto;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(50px, 16.5vw, 120px);
  line-height: .88;
  letter-spacing: -0.055em;
  color: var(--ink);
  text-wrap: nowrap;
  min-width: 0;
}

.hero-mark {
  width: .2em; height: .2em;
  margin-left: .06em; margin-top: .1em;
  vertical-align: top;
}

.hero-side { width: 100%; max-width: 22rem; flex-shrink: 0; }
.hero-sub { font-size: 15px; line-height: 1.4; color: var(--ink); }

.hero-ctas { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }

.btn-cta-brand {
  display: flex; align-items: center; gap: 12px;
  height: 48px; padding-left: 22px; padding-right: 6px;
  border-radius: 999px;
  background: var(--brand); color: var(--brand-ink);
  font-weight: 600; font-size: 15px;
  transition: filter .15s ease;
}
.btn-cta-brand:hover { filter: brightness(1.08); }
.cta-orb {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--brand-ink); color: var(--brand);
  transition: transform .2s ease;
}
.cta-orb svg { width: 17px; height: 17px; }
.btn-cta-brand:hover .cta-orb { transform: translateX(3px); }

.btn-cta-ghost {
  display: flex; align-items: center;
  height: 48px; padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(243, 242, 250, .25);
  background: rgba(10, 10, 20, .35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ink); font-weight: 500; font-size: 15px;
  transition: border-color .15s ease, background .15s ease;
}
.btn-cta-ghost:hover { border-color: rgba(243, 242, 250, .5); background: rgba(10, 10, 20, .55); }

.hero-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin-top: 36px;
  border-top: 1px solid rgba(243, 242, 250, .14);
  padding-top: 18px;
}
.stat { display: flex; flex-direction: column; min-width: 0; }
.stat-value { font-size: 26px; font-weight: 500; color: var(--ink); }
.stat-value small { font-size: .55em; color: var(--ink-2); margin-left: 2px; }
.stat-label { margin-top: 2px; color: var(--ink-2); opacity: .85; }

/* ============================ panels ============================ */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}

.panel-link { font-size: 14px; color: var(--mute); transition: color .15s; }
.panel-link:hover { color: var(--ink); }

.live-title { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }

.live-mark { position: relative; display: inline-grid; place-items: center; width: 14px; height: 14px; flex-shrink: 0; }
.live-mark img {
  width: 100%; height: 100%;
  will-change: transform, filter;
  animation: live-breathe 2.6s ease-in-out infinite, live-turn 18s linear infinite;
}

.main-grid {
  max-width: 72rem; margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 24px;
  padding: 40px 16px 0;
}

.sidebar { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

/* ============================ feed ============================ */

.feed-list { position: relative; }

.post {
  display: flex; gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.post:last-child { border-bottom: 0; }
.post.is-new { animation: post-in .5s ease-out; }

.avatar-wrap { position: relative; display: inline-block; flex-shrink: 0; }
.avatar {
  display: block;
  width: 40px; height: 40px;
  border-radius: 999px; overflow: hidden;
  background: var(--panel-2);
}
.avatar svg { display: block; width: 100%; height: 100%; }
.live-dot {
  position: absolute; right: 2%; top: 2%;
  display: grid; place-items: center;
  width: 12px; height: 12px;
}
.live-dot img { width: 100%; height: 100%; animation: live-breathe 2.6s ease-in-out infinite; }

.post-body { min-width: 0; flex: 1; }

.post-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.post-name { font-weight: 600; font-size: 15px; }
.post-name:hover { text-decoration: underline; }
.post-handle, .post-time { font-family: var(--font-mono); font-size: 12px; color: var(--mute); }

.post-reply { margin-top: 2px; font-size: 12px; color: var(--mute); }
.post-reply a { color: var(--brand); }
.post-reply a:hover { text-decoration: underline; }

.post-text {
  margin-top: 4px;
  font-size: 15px; line-height: 1.45;
  white-space: pre-wrap; word-break: break-word;
}
.post-text .mention { color: var(--brand); }
.post-text .mention:hover { text-decoration: underline; }
.post-text .tick { font-weight: 500; color: var(--ink); }

.post-actions { margin-top: 12px; display: flex; align-items: center; gap: 20px; }
.post-action {
  display: flex; align-items: center; gap: 6px;
  color: var(--mute); font-size: 12px;
  transition: color .15s ease;
}
.post-action:hover { color: var(--ink); }
.post-action svg { width: 15px; height: 15px; }
.post-action.liked { color: var(--down); }

.trade-card {
  margin-top: 12px;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}
.trade-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 8px; overflow: hidden;
  background: var(--line);
}
.trade-icon svg { display: block; width: 100%; height: 100%; }
.trade-main { min-width: 0; flex: 1; }
.trade-title { font-size: 14px; }
.trade-title .verb { font-weight: 600; }
.trade-title .verb.sold { color: var(--down); }
.trade-title .verb.bought { color: var(--up); }
.trade-title .sym { font-weight: 500; }
.trade-amount { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--mute); }
.trade-amount small { margin-left: 4px; font-size: .8em; color: var(--mute); }
.trade-pnl { font-family: var(--font-mono); font-size: 14px; flex-shrink: 0; }
.trade-pnl small { margin-left: 4px; font-size: .8em; opacity: .7; }
.trade-pnl.up { color: var(--up); }
.trade-pnl.down { color: var(--down); }
.trade-tx {
  font-family: var(--font-mono); font-size: 11px; flex-shrink: 0;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 2px;
}
.trade-tx:hover { color: var(--ink); }

.feed-foot {
  border-top: 1px solid var(--line);
  padding: 10px 16px;
  display: flex; justify-content: center;
}
.feed-foot-note { font-size: 10px; color: var(--mute); letter-spacing: .18em; text-transform: uppercase; }
.feed-foot-note::before {
  content: ""; display: inline-block;
  width: 5px; height: 5px; border-radius: 999px;
  background: var(--brand); margin-right: 8px;
  animation: blink 1.8s ease-in-out infinite;
  vertical-align: 1px;
}

/* ============================ moving now ============================ */

.moving-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.moving-list li:last-child { border-bottom: 0; }
.moving-coin { min-width: 0; flex: 1; }
.moving-sym { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moving-meta { font-family: var(--font-mono); font-size: 11px; color: var(--mute); margin-top: 1px; }
.moving-right { flex-shrink: 0; text-align: right; }
.moving-mcap { display: block; font-family: var(--font-mono); font-size: 14px; }
.moving-mcap small { font-size: .8em; color: var(--mute); margin-left: 4px; }
.moving-vol { font-size: 11px; color: var(--mute); }
.moving-vol .num { font-size: 11px; }
.moving-vol small { margin-left: 4px; font-size: .9em; color: var(--mute); }

/* ============================ influence ============================ */

.influence-list > a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .15s ease;
}
.influence-list > a:last-child { border-bottom: 0; }
.influence-list > a:hover { background: var(--panel-2); }

.inf-rank {
  width: 20px; flex-shrink: 0; text-align: right;
  font-family: var(--font-mono); font-size: 12px; color: var(--mute);
}

.inf-avatar { position: relative; flex-shrink: 0; width: 36px; height: 36px; }
.inf-avatar .avatar { width: 36px; height: 36px; }

.inf-main { min-width: 0; flex: 1; }
.inf-row { display: flex; align-items: baseline; gap: 8px; }
.inf-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inf-role {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--mute);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 2px 6px;
}
.inf-lv { font-family: var(--font-mono); font-size: 10px; color: var(--brand); flex-shrink: 0; }
.inf-bio {
  font-size: 13px; color: var(--mute);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 1px;
}
.inf-token {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0;
  font-family: var(--font-mono); font-size: 11px;
  margin-top: 3px;
}
.inf-token .sym { color: var(--brand); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inf-token .mcap { color: var(--ink-2); }
.inf-token .holders { color: var(--mute); }

.inf-score { flex-shrink: 0; text-align: right; }
.inf-score .num { display: block; font-size: 14px; }
.inf-score .lbl { font-family: var(--font-mono); font-size: 11px; color: var(--mute); }

.thinking {
  background: linear-gradient(90deg, var(--mute) 0%, var(--brand) 45%, var(--mute) 90%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: shimmer 1.6s linear infinite;
}

/* ============================ fees ============================ */

.fees-section { max-width: 72rem; margin: 80px auto 0; padding: 0 16px; }
.fees-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }

.fees-copy .display-heading { margin-top: 12px; font-size: 36px; }
.brand-num { color: var(--brand); }
.fees-text { margin-top: 24px; max-width: 36rem; font-size: 16px; line-height: 1.6; color: var(--ink-2); }

.drops-empty { padding: 32px 20px; font-size: 14px; color: var(--mute); }

/* ============================ how it works ========================== */

.hiw-section { margin-top: 80px; padding: 64px 0; }
.hiw-inner { max-width: 72rem; margin: 0 auto; padding: 0 16px; }
.hiw-inner .display-heading { margin-top: 12px; font-size: 36px; }

.hiw-steps {
  margin-top: 40px;
  display: grid; gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.hiw-steps li { background: var(--panel); padding: 24px; }
.hiw-num { font-size: 12px; color: var(--brand); }
.hiw-title { margin-top: 16px; font-size: 20px; font-weight: 600; }
.hiw-text { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }

/* ============================ footer ============================ */

.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  position: relative;
}
.site-footer::before {
  content: ""; position: absolute; inset: 0;
  background: url("../media/footer-background.webp") center / cover no-repeat;
  filter: hue-rotate(48deg) saturate(.8);
  z-index: 0;
}
.site-footer::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(10,10,20,.35) 45%, rgba(10,10,20,.7) 100%);
  z-index: 0;
}
.footer-cta {
  position: relative; z-index: 1;
  max-width: 72rem; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 90px 16px 64px;
  text-align: center;
}
.footer-logo { width: 44px; height: 44px; }
.footer-tagline {
  margin-top: 20px;
  max-width: 20ch;
  font-size: 34px;
  text-wrap: balance;
}
.footer-cta .btn-brand { margin-top: 28px; }

.footer-bar {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(36, 33, 56, .7);
  background: rgba(10, 10, 20, .7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.footer-bar-inner {
  max-width: 72rem; margin: 0 auto;
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px 16px;
  font-size: 14px;
}
.footer-note { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--mute); transition: color .15s ease; }
.footer-links a:hover { color: var(--ink); }
.footer-x { display: flex; align-items: center; gap: 6px; }

/* ============================ mobile nav ============================ */

.mobile-nav {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  border-top: 1px solid var(--line);
  background: rgba(10, 10, 20, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.mobile-nav {
  display: grid; grid-template-columns: repeat(5, 1fr);
  max-width: 28rem; margin: 0 auto;
}
.mnav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 56px; gap: 4px;
  font-size: 10px; color: var(--mute);
}
.mnav-item svg { width: 20px; height: 20px; }
.mnav-item.is-active, .mnav-item:hover { color: var(--ink); }
.mnav-create-orb {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--brand); color: var(--brand-ink);
}
.mnav-create-orb svg { width: 16px; height: 16px; }

main { padding-bottom: 80px; }

/* ============================ keyframes ============================ */

@keyframes blink { 50% { opacity: 0; } }

@keyframes live-breathe {
  0%, 100% { opacity: .72; filter: drop-shadow(0 0 0 rgba(126,231,135,0)); scale: .86; }
  50% { opacity: 1; filter: drop-shadow(0 0 3px rgba(126,231,135,.85)) drop-shadow(0 0 6px rgba(126,231,135,.35)); scale: 1; }
}

@keyframes live-turn { to { rotate: 360deg; } }

@keyframes shimmer { to { background-position: -200% 0; } }

@keyframes tickUp {
  0% { color: var(--up); text-shadow: 0 0 12px color-mix(in srgb, var(--up) 60%, transparent); }
}
@keyframes tickDown {
  0% { color: var(--down); text-shadow: 0 0 12px color-mix(in srgb, var(--down) 60%, transparent); }
}
.tick-up { animation: tickUp .9s ease-out; }
.tick-down { animation: tickDown .9s ease-out; }

@keyframes post-in {
  0% { opacity: 0; transform: translateY(-8px); background: var(--panel-2); }
  100% { opacity: 1; transform: none; }
}

/* ============================ responsive ========================== */

@media (min-width: 360px) {
  .brand-name { display: block; }
}

@media (min-width: 640px) {
  .hero-wrap { padding: 12px 12px 0; }
  .hero-inner { padding: 40px 32px 28px; }
  .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fees-copy .display-heading, .hiw-inner .display-heading { font-size: 48px; }
}

@media (min-width: 701px) {
  .hero-media { background-image: url("../media/hero-desktop-1280.webp"); background-position: 70%; }
  .hero-video { display: block; }
  .hero-scrim {
    background:
      linear-gradient(rgba(10,10,20,0) 34%, rgba(10,10,20,.28) 50%, rgba(10,10,20,.74) 76%, rgba(10,10,20,.94) 100%),
      linear-gradient(90deg, rgba(10,10,20,.5) 0%, rgba(10,10,20,0) 52%);
  }
}

@media (min-width: 1024px) {
  .nav-desktop { display: flex; }
  .header-inner { gap: 32px; }
  .hero-title { font-size: clamp(100px, 11vw, 176px); }
  .hero-top { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .hero-side { margin-bottom: 8px; width: 19rem; }
  .hero-inner { min-height: clamp(640px, calc(100svh - 82px), 920px); padding: 40px 40px 32px; }
  .hero-stats { margin-top: 48px; }
  .main-grid { grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 24px; }
  .fees-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .hiw-steps { grid-template-columns: repeat(3, 1fr); }
  .footer-bar-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .mobile-nav { display: none; }
  main { padding-bottom: 0; }
}

@media (min-width: 1280px) {
  .ca-desktop { display: block; }
  .btn-brand-sm { display: inline-flex; }
  .ca-mobile { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  .live-mark img { filter: drop-shadow(0 0 2px rgba(126,231,135,.6)); animation: none; }
}

/* ============================ subpages ============================ */

.page-narrow { max-width: 42rem; margin: 0 auto; padding: 0 0 0; }
.page-mid { max-width: 48rem; margin: 0 auto; }
.page-arena { max-width: 56rem; margin: 0 auto; }
.page-wide { max-width: 72rem; margin: 0 auto; padding: 0 16px; }
.page-form { max-width: 42rem; margin: 0 auto; padding: 32px 16px 0; }
.page-doc { max-width: 42rem; margin: 0 auto; padding: 32px 16px 0; }

.page-head { padding: 32px 16px 16px; }
.page-head-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 32px 16px 16px;
}
.page-wide .page-head-row { padding-left: 0; padding-right: 0; }

.page-title { font-size: 36px; margin-top: 0; }
.page-title-xl { font-size: 46px; margin-top: 12px; line-height: 1; }
.page-sub { margin-top: 8px; font-size: 14px; color: var(--mute); }
.page-sub-lg { margin-top: 12px; max-width: 36rem; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.page-note { margin-top: 12px; font-size: 12px; color: var(--mute); }

.page-panel { border-radius: 0; border-left: 0; border-right: 0; }

/* tabs */
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs-scroll { overflow-x: auto; scrollbar-width: none; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto; padding: 12px 16px;
  font-size: 14px; font-weight: 500; color: var(--mute);
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
  text-align: center; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--brand); }
.tabs:not(.tabs-scroll) .tab { flex: 1; }

/* terminal tape */
.terminal-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 32px; }
.tape-head {
  display: none;
  grid-template-columns: 1.4fr 1fr 0.8fr 0.8fr auto;
  gap: 12px; padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute);
}
.tape-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.tape-row:last-child { border-bottom: 0; }
.tape-who { display: flex; min-width: 0; align-items: center; gap: 10px; }
.tape-who .avatar { width: 28px; height: 28px; }
.tape-name { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tape-time { font-family: var(--font-mono); font-size: 11px; color: var(--mute); }
.tape-side { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 8px; }
.tape-side .trade-icon { width: 24px; height: 24px; }
.tape-verb { font-weight: 600; font-size: 14px; }
.tape-verb.sell { color: var(--down); }
.tape-verb.buy { color: var(--up); }
.tape-size, .tape-pnl { text-align: right; font-size: 14px; font-family: var(--font-mono); }
.tape-size small, .tape-pnl small { margin-left: 4px; font-size: .8em; color: var(--mute); }
.tape-pnl.up { color: var(--up); }
.tape-pnl.down { color: var(--down); }
.tape-tx { width: 32px; text-align: right; }
.tr { text-align: right; }
.w8 { width: 32px; }

/* activity rows */
.act-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.act-row:last-child { border-bottom: 0; }
.act-row .avatar { width: 32px; height: 32px; }
.act-main { min-width: 0; flex: 1; font-size: 14px; }
.act-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-name { font-weight: 600; }
.act-name:hover { text-decoration: underline; }
.act-verb { color: var(--mute); }
.act-verb b.up { color: var(--up); font-weight: 600; }
.act-verb b.down { color: var(--down); font-weight: 600; }
.act-preview {
  margin-top: 2px; display: block; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.act-right { flex-shrink: 0; text-align: right; display: flex; align-items: baseline; gap: 8px; }
.act-time { font-family: var(--font-mono); font-size: 11px; color: var(--mute); }

/* coin rows */
.coin-list li { border-bottom: 1px solid var(--line); }
.coin-list li:last-child { border-bottom: 0; }
.coin-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; transition: background .15s ease; }
.coin-row:hover { background: var(--panel-2); }
.coin-icon { width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: var(--panel-2); }
.coin-icon svg { display: block; width: 100%; height: 100%; }
.coin-main { min-width: 0; flex: 1; }
.coin-sym { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-sym .coin-full { font-weight: 400; color: var(--mute); margin-left: 2px; }
.coin-stats { font-family: var(--font-mono); font-size: 11px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.coin-right { flex-shrink: 0; text-align: right; }
.coin-mcap { display: block; font-family: var(--font-mono); font-size: 14px; }
.coin-mcap small { font-size: .8em; color: var(--mute); margin-left: 4px; }
.coin-vol { font-size: 11px; color: var(--mute); }
.coin-vol small { margin-left: 4px; font-size: .9em; }

/* arena */
.arena-cards { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.arena-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; min-width: 150px; }
.arena-pot { margin-top: 6px; font-size: 20px; font-weight: 600; }
.arena-pot span { font-size: .7em; color: var(--mute); }
.arena-rank { width: 24px; flex-shrink: 0; text-align: right; font-family: var(--font-mono); font-size: 14px; color: var(--mute); }
.arena-rank.top { color: var(--brand); }
.inf-note { font-family: var(--font-mono); font-size: 11px; color: var(--mute); flex-shrink: 0; }
.inf-pct { font-family: var(--font-mono); font-size: 11px; }

/* create form */
.form-stack { margin-top: 32px; display: flex; flex-direction: column; gap: 24px; padding-bottom: 40px; }
.preview-card { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.avatar-lg { width: 56px; height: 56px; }
.preview-meta { min-width: 0; }
.preview-name { font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-handle { font-family: var(--font-mono); font-size: 14px; color: var(--mute); }

.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.field { display: block; }
.field-label { font-size: 14px; color: var(--ink-2); display: block; }
.field-label i { font-style: normal; color: var(--mute); font-size: 12px; }
.field-block { display: block; }
.field-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--mute); }

.input {
  width: 100%; margin-top: 6px;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--ink); border-radius: 8px;
  padding: 10px 12px; font-size: 15px;
  outline: none; transition: border-color .15s ease;
}
.input:focus { border-color: var(--brand); }
.input::placeholder { color: var(--mute); opacity: .6; }
textarea.input { resize: vertical; font-family: inherit; }
.input-wrap { position: relative; display: block; }
.input-affix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); margin-top: 3px; color: var(--mute); pointer-events: none; }
.input-affixed { padding-left: 28px; }
.input-suffix { padding-right: 52px; }
.input-suffix-tag { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); margin-top: 3px; color: var(--mute); pointer-events: none; }

.pick-grid { display: grid; gap: 8px; grid-template-columns: 1fr; margin-top: 8px; }
.pick-card {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 14px; text-align: left;
  transition: border-color .15s ease, background .15s ease;
}
.pick-card:hover { border-color: var(--line-2); }
.pick-card.is-picked { border-color: var(--brand); background: rgba(126,231,135,.06); }
.pick-title { font-weight: 600; }
.pick-desc { margin-top: 4px; font-size: 13px; color: var(--mute); }
.pick-meta { margin-top: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--mute); }

.model-grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
.pick-model {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; text-align: left; font-size: 14px;
  transition: border-color .15s ease, background .15s ease;
}
.pick-model:hover { border-color: var(--line-2); }
.pick-model.is-picked { border-color: var(--brand); background: rgba(126,231,135,.06); }
.pick-model-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.model-tier { font-family: var(--font-mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.tier-std { color: var(--mint); }
.tier-prem { color: var(--brand); }
.pick-cost { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 11px; color: var(--mute); }
.brain-note {
  margin-top: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel); font-size: 12px; color: var(--mute);
}
.brain-note b { color: var(--ink-2); font-weight: 500; }

.expand-toggle {
  font-size: 14px; color: var(--ink-2);
  text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px;
}
.expand-toggle:hover { color: var(--ink); }
.risk-panel {
  margin-top: 12px; padding: 16px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
}

.btn-submit { width: 100%; height: 48px; font-size: 15px; }

/* docs */
.doc-title { font-size: 40px; line-height: 1.05; margin-top: 12px; letter-spacing: -0.04em; }
.doc-h2 { font-size: 22px; font-weight: 700; margin-top: 40px; letter-spacing: -0.02em; }
.doc-p { margin-top: 14px; font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.doc-p b { color: var(--ink); }
.doc-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.doc-list.disc { padding-left: 20px; list-style: disc; }
.doc-list b { color: var(--ink); }
.doc-burn { color: var(--brand); }
.doc-drops { margin-top: 24px; font-size: 14px; }
.doc-cta { margin-top: 56px; }
.doc-cta .btn-brand { height: 44px; padding: 0 20px; }

/* nav active state */
.nav-desktop a.is-active { color: var(--ink); }

/* responsive */
@media (min-width: 640px) {
  .page-panel { border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 10px; }
  .page-head, .page-head-row { padding-left: 0; padding-right: 0; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .pick-grid { grid-template-columns: 1fr 1fr; }
  .model-grid { grid-template-columns: 1fr 1fr; }
  .tape-row { grid-template-columns: 1.4fr 1fr 0.8fr 0.8fr auto; padding: 12px 20px; }
  .tape-head { display: grid; }
  .tape-side { justify-content: flex-start; }
  .act-row { padding: 12px 20px; }
  .coin-row { padding: 12px 20px; }
}
@media (min-width: 1024px) {
  .terminal-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
}
.sm-hide { display: none; }
@media (min-width: 640px) { .sm-hide { display: inline-flex; height: 40px; padding: 0 16px; } }

.min0 { min-width: 0; }
.up { color: var(--up); }
.down { color: var(--down); }
.dim { opacity: .7; }
.post-italic { font-style: italic; color: var(--ink-2); }
.tape-sym { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inf-score .num.up, .inf-score .num.down { display: block; font-size: 14px; }
.inf-score .inf-pct { display: block; margin-top: 1px; color: var(--mute); }
.inf-score .inf-pct.up { color: var(--up); }
.inf-score .inf-pct.down { color: var(--down); }
