/* Near Social — dark-first, mint accent */
:root {
  --bg: #06100b;
  --surface: #0c1712;
  --surface-2: #111f18;
  --surface-3: #16271e;
  --border: rgba(160, 255, 210, 0.08);
  --border-strong: rgba(160, 255, 210, 0.16);
  --text: #e9f5ef;
  --text-2: #b5c7be;
  --muted: #7d9188;
  --mint: #00e599;
  --mint-2: #5bffc0;
  --mint-soft: rgba(0, 229, 153, 0.12);
  --on-mint: #03130c;
  --pink: #ff4f8b;
  --amber: #ffb547;
  --up: #2fe39a;
  --down: #ff5f7a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 16px 40px -24px rgba(0, 0, 0, 0.8);
  --violet: #8b5cf6;
  --cyan: #2dd4ff;
  --grid-dot: rgba(160, 255, 210, 0.06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f8f6;
  --surface: #ffffff;
  --surface-2: #f1f6f3;
  --surface-3: #e6f0eb;
  --border: rgba(10, 60, 40, 0.09);
  --border-strong: rgba(10, 60, 40, 0.18);
  --text: #0b1a13;
  --text-2: #2c4339;
  --muted: #5f7469;
  --mint: #00a86f;
  --mint-2: #00c785;
  --mint-soft: rgba(0, 168, 111, 0.1);
  --on-mint: #ffffff;
  --pink: #e0306f;
  --amber: #b86e00;
  --up: #00905e;
  --down: #d23452;
  --violet: #6d4cff;
  --shadow: 0 1px 2px rgba(10, 40, 25, 0.05), 0 12px 32px -22px rgba(10, 40, 25, 0.3);
  --grid-dot: rgba(10, 60, 40, 0.07);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(50rem 26rem at 30% -8%, rgba(0, 229, 153, 0.13), transparent 60%),
    radial-gradient(40rem 26rem at 95% 10%, rgba(139, 92, 246, 0.10), transparent 60%),
    radial-gradient(40rem 30rem at 60% 115%, rgba(45, 212, 255, 0.06), transparent 60%),
    radial-gradient(circle at 1px 1px, var(--grid-dot) 1px, transparent 1.5px) 0 0 / 22px 22px;
  mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 100%);
}
a { color: var(--mint); text-decoration: none; }
a:hover { color: var(--mint-2); }
button, input, textarea { font: inherit; color: inherit; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 17px; height: 17px; }
.muted { color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 8px; }

/* ---------- layout ---------- */
.layout {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 250px minmax(0, 620px) 330px;
  gap: 28px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
  justify-content: center;
}
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 0; display: flex; flex-direction: column; gap: 22px; }
.main { min-height: 100vh; padding: 22px 0 110px; outline: none; }
.rail { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 0; display: flex; flex-direction: column; gap: 14px; scrollbar-width: none; }

.brand { display: flex; align-items: center; gap: 11px; font: 700 21px/1 var(--display); color: var(--text); letter-spacing: -0.02em; padding: 0 10px; }
.brand:hover { color: var(--text); }
.brand img { border-radius: 10px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 14px; color: var(--text-2); font-weight: 600; font-size: 15.5px; transition: background 0.15s, color 0.15s; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--mint-soft); color: var(--mint); }
.nav .cta { margin-top: 10px; justify-content: center; }

.account { margin-top: auto; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.me-card:hover { background: var(--surface-2); color: var(--text); }
.me-card .who { min-width: 0; flex: 1; line-height: 1.25; }
.me-card .who b, .me-card .who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- surfaces ---------- */
.card {
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(150deg, color-mix(in srgb, var(--mint) 22%, transparent), var(--border) 35%, var(--border) 70%, color-mix(in srgb, var(--violet) 18%, transparent)) border-box;
  border: 1px solid transparent; border-radius: var(--radius); box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }
.pad { padding: 18px; }
.stack > * + * { margin-top: 14px; }
.section-title { font: 700 12px/1 var(--font); text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); margin: 0 0 12px; }
.page-head { margin: 4px 2px 18px; }
.page-head h1 { font: 700 28px/1.15 var(--display); letter-spacing: -0.02em; margin: 0 0 6px; }
.page-head p { margin: 0; color: var(--muted); }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font-weight: 650; font-size: 14.5px; cursor: pointer; white-space: nowrap;
  transition: transform 0.08s, background 0.15s, border-color 0.15s, filter 0.15s;
}
.btn:hover { background: var(--surface-3); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--mint-2), var(--mint)); border-color: transparent; color: var(--on-mint); box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--mint) 70%, transparent); }
.btn.primary:hover { background: var(--mint-2); color: var(--on-mint); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn.lg { height: 48px; padding: 0 24px; font-size: 16px; }

input[type="text"], input[type="number"], input[type="search"], textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 11px 14px;
  transition: border-color 0.15s, background 0.15s;
}
input:focus, textarea:focus { outline: none; border-color: var(--mint); background: var(--surface); }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 42px; border-radius: 999px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; width: max-content; max-width: 100%; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.tabs a { padding: 7px 16px; border-radius: 999px; color: var(--muted); font-weight: 650; font-size: 14px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- avatar ---------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font: 700 17px/1 var(--display); text-transform: uppercase; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border-strong); }
.avatar.xl { width: 96px; height: 96px; font-size: 38px; box-shadow: 0 0 0 5px var(--surface), 0 0 0 6px var(--border-strong); }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; box-shadow: none; }

/* ---------- composer ---------- */
.composer { display: flex; gap: 14px; padding: 16px 18px; }
.composer form { flex: 1; min-width: 0; }
.composer textarea { resize: none; min-height: 64px; background: transparent; border: 0; padding: 8px 0; font-size: 17px; border-radius: 0; }
.composer textarea:focus { background: transparent; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.ring { width: 22px; height: 22px; }

/* ---------- posts ---------- */
.feed > .post, .feed > .repost-wrap { border-bottom: 1px solid var(--border); }
.feed > :last-child { border-bottom: 0; }
.post { display: flex; gap: 13px; padding: 16px 18px; transition: background 0.15s; }
.post:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.post-body { min-width: 0; flex: 1; }
.post-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.3; }
.post-head .name { font-weight: 700; color: var(--text); }
.post-head .name:hover { text-decoration: underline; }
.handle { color: var(--muted); font-size: 14px; }
.post-text { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; margin: 5px 0 10px; font-size: 15.5px; color: var(--text); }
.post-text .ticker { color: var(--mint); font-weight: 650; }
.repost-line { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); padding: 12px 18px 0 50px; }
.repost-line a { color: var(--muted); }
.reply-line { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.actions { display: flex; justify-content: space-between; max-width: 420px; margin-left: -9px; }
.act { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted); padding: 7px 9px; border-radius: 999px; cursor: pointer; font-size: 13.5px; font-weight: 600; transition: color 0.15s, background 0.15s; }
.act .n { font-variant-numeric: tabular-nums; min-width: 1ch; }
.act.reply:hover { color: var(--mint); background: var(--mint-soft); }
.act.repost:hover, .act.repost.on { color: var(--up); }
.act.repost:hover { background: color-mix(in srgb, var(--up) 12%, transparent); }
.act.like:hover, .act.like.on { color: var(--pink); }
.act.like:hover { background: color-mix(in srgb, var(--pink) 12%, transparent); }
.act.like.on svg { fill: var(--pink); }
.act.tip:hover, .act.tip.on { color: var(--amber); }
.act.tip:hover { background: color-mix(in srgb, var(--amber) 12%, transparent); }
.act.more:hover { color: var(--text); background: var(--surface-3); }

/* ---------- trade card ---------- */
.trade-card { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; margin: 6px 0 10px; }
.trade-card .t-main { flex: 1; min-width: 0; }
.trade-card .t-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.trade-card .t-token { font-weight: 700; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trade-card .t-amt { flex: none; }
.trade-card .t-sub { font-size: 13px; color: var(--muted); }
.trade-card .t-amt { text-align: right; }
.token-icon { width: 36px; height: 36px; border-radius: 50%; flex: none; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; font: 700 13px/1 var(--display); color: var(--text-2); overflow: hidden; }
.token-icon.sm { width: 24px; height: 24px; font-size: 10px; }
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; }
.badge.buy { background: color-mix(in srgb, var(--up) 16%, transparent); color: var(--up); }
.badge.sell { background: color-mix(in srgb, var(--down) 16%, transparent); color: var(--down); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 30px 26px 26px; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(30rem 16rem at 100% 0%, rgba(0, 229, 153, 0.22), transparent 70%), radial-gradient(20rem 14rem at 0% 120%, rgba(255, 79, 139, 0.10), transparent 70%); pointer-events: none; }
.hero > * { position: relative; }
.hero .kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--mint); background: var(--mint-soft); padding: 5px 11px; border-radius: 999px; margin-bottom: 14px; }
.hero h1 { font: 700 34px/1.08 var(--display); letter-spacing: -0.03em; margin: 0 0 12px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--mint-2), var(--mint)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0 0 18px; color: var(--text-2); font-size: 16px; max-width: 34em; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 20px; }
.feature { background: color-mix(in srgb, var(--surface-2) 80%, transparent); border: 1px solid var(--border); border-radius: 14px; padding: 12px; font-size: 13.5px; color: var(--text-2); }
.feature svg { color: var(--mint); margin-bottom: 6px; }
.feature b { display: block; color: var(--text); font-size: 14px; }

/* ---------- profile ---------- */
.cover { height: 150px; border-radius: var(--radius) var(--radius) 0 0; position: relative; overflow: hidden; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.35)); }
.profile-head { padding: 0 20px 18px; }
.profile-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: -48px; position: relative; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.profile-name { font: 700 26px/1.2 var(--display); letter-spacing: -0.02em; margin: 12px 0 2px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.bio { margin: 12px 0 0; color: var(--text); white-space: pre-wrap; }
.stat-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; font-size: 14px; color: var(--muted); }
.stat-row b { color: var(--text); font-weight: 700; }
.profile-tabs { padding: 0 16px; }

/* ---------- tiles & tables ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.tile .label { font-size: 12px; font-weight: 600; color: var(--muted); }
.tile .value { font: 700 21px/1.3 var(--display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.tile .sub { font-size: 12px; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
td.r, th.r { text-align: right; }
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
tr:last-child td { border-bottom: 0; }
.cell-user, .cell-token { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 600; }
.rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-3); font-weight: 800; font-size: 12.5px; }
.rank.r1 { background: linear-gradient(135deg, #ffe08a, #f5b000); color: #3a2900; }
.rank.r2 { background: linear-gradient(135deg, #f1f5f9, #b8c2cc); color: #1f2933; }
.rank.r3 { background: linear-gradient(135deg, #ffc49b, #d9772b); color: #3b1d06; }

.person { display: flex; align-items: center; gap: 13px; padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--text); }
.person:last-child { border-bottom: 0; }
.person:hover { background: var(--surface-2); color: var(--text); }
.person .who { min-width: 0; flex: 1; }
.person .bio-line { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 34px; height: 34px; color: var(--border-strong); display: block; margin: 0 auto 10px; }
.loading { padding: 44px 20px; display: grid; place-items: center; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--mint); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { background: var(--mint-soft); border: 1px solid color-mix(in srgb, var(--mint) 30%, transparent); color: var(--text-2); border-radius: 14px; padding: 11px 14px; font-size: 14px; margin-bottom: 14px; }
.foot-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

/* ---------- about ---------- */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.how .feature { background: var(--surface-2); }
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.step { display: flex; gap: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--on-mint); font: 700 14px/1 var(--display); }
.step svg { color: var(--mint); display: none; }
.step b { display: block; margin-bottom: 2px; }
.step p { margin: 0; color: var(--text-2); font-size: 14px; }
ul.plain { margin: 6px 0 0; padding-left: 16px; }
ul.plain li + li { margin-top: 2px; }
.faq { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq:last-child { border-bottom: 0; padding-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--mint); font-weight: 700; }
.faq[open] summary::after { content: "−"; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin: 8px 0 0; color: var(--text-2); }

/* ---------- rail ---------- */
.rail h3 { margin: 0 0 12px; font: 700 16px/1.2 var(--display); }
.mini { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--text); font-size: 14px; }
.mini:hover { color: var(--text); }
.mini:hover .who b { text-decoration: underline; }
.mini .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-foot { font-size: 12.5px; color: var(--muted); padding: 0 6px; }
.rail-foot a { color: var(--muted); }

/* ---------- toast & modal ---------- */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 10px); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-weight: 650; font-size: 14.5px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; max-width: calc(100vw - 32px); z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
dialog { border: 1px solid var(--border-strong); border-radius: 22px; background: var(--surface); color: var(--text); padding: 0; width: min(440px, calc(100vw - 28px)); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7); }
dialog::backdrop { background: rgba(2, 8, 5, 0.7); backdrop-filter: blur(4px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 6px; font: 700 18px/1.2 var(--display); }
.modal-body { padding: 10px 20px 20px; }
.close { background: var(--surface-2); border: 0; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.close:hover { color: var(--text); }
.wallet-list { display: grid; gap: 8px; }
.wallet-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; text-align: left; font-weight: 650; }
.wallet-btn:hover { border-color: var(--mint); background: var(--surface-3); }
.wallet-btn img { width: 34px; height: 34px; border-radius: 10px; }
.wallet-btn .w-sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.presets .btn.on { border-color: var(--mint); color: var(--mint); }

/* ---------- mobile ---------- */
.mobile-top { display: none; }
@media (max-width: 1220px) {
  .layout { grid-template-columns: 230px minmax(0, 620px); }
  .rail { display: none; }
}
@media (max-width: 780px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 0 12px; gap: 0; }
  .sidebar { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; z-index: 30; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--border); flex-direction: row; }
  .sidebar .brand, .sidebar .account, .nav .cta, .nav a[data-route="about"] { display: none; }
  .nav { flex-direction: row; justify-content: space-around; width: 100%; gap: 0; }
  .nav a { flex-direction: column; gap: 3px; padding: 6px 2px; font-size: 10.5px; flex: 1; border-radius: 12px; }
  .nav a.active { background: none; }
  .main { padding-top: 10px; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 12px; position: sticky; top: 0; z-index: 20; padding: 8px 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
  .mobile-top .brand { padding: 0; font-size: 19px; }
  .hero { padding: 24px 18px 20px; }
  .hero h1 { font-size: 28px; }
  .features, .how, .steps { grid-template-columns: 1fr; }
  .post { padding: 14px; }
  .repost-line { padding-left: 46px; }
  .page-head h1 { font-size: 24px; }
}

/* ---------- copy trading ---------- */
.copy-hero { padding: 16px; margin-bottom: 14px; background: radial-gradient(30rem 12rem at 100% 0%, var(--mint-soft), transparent 70%), var(--surface); }
.copy-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.copy-points > div { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: start; }
.copy-points svg { color: var(--mint); grid-row: span 2; margin-top: 2px; }
.copy-points b { font-size: 14.5px; }
.copy-points span { font-size: 13px; color: var(--muted); }
.signal { display: flex; gap: 13px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.signal:last-child { border-bottom: 0; }
.signal-body { flex: 1; min-width: 0; }
.signal-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.signal-meta b { color: var(--text); }
.signal-actions { display: flex; gap: 6px; flex: none; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px var(--mint-soft); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
.copy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.copy-grid > .card + .card { margin-top: 0; }
.trader-card, .copy-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.trader-card:hover { border-color: var(--border-strong); }
.trader-top { display: flex; align-items: center; gap: 11px; color: var(--text); min-width: 0; }
.trader-top:hover { color: var(--text); }
.trader-top .who { min-width: 0; line-height: 1.25; }
.trader-top .who b, .trader-top .who .handle { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trader-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.trader-stats > div { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; }
.trader-stats span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.trader-stats b { font-variant-numeric: tabular-nums; }
.trader-sim { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--border-strong); padding-top: 10px; }
.trader-sim b { font-size: 14.5px; }
.copy-pnl { font: 700 28px/1 var(--display); letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 8px; }
.copy-pnl small { font: 600 14px/1 var(--font); }
.sim-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; min-height: 64px; }
.sim-box .loading { padding: 8px; }
.sim-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sim-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; font-size: 14px; }
.sim-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
.btn.copying { border-color: var(--mint); color: var(--mint); }

/* ---------- token page ---------- */
.token-head { padding: 20px; }
.token-title { display: flex; align-items: center; gap: 14px; }
.token-title h1 { margin: 0; font: 700 26px/1.1 var(--display); letter-spacing: -0.02em; }
.token-title > div:nth-child(2) { flex: 1; min-width: 0; }
.token-price { text-align: right; }
.token-price b { display: block; font: 700 22px/1.2 var(--display); }
.token-icon.lg { width: 56px; height: 56px; font-size: 18px; }

/* ---------- profile overview & podium ---------- */
.overview { padding: 0 20px; }
.overview .tiles { margin-bottom: 4px; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; margin-bottom: 14px; }
.podium .card + .card { margin-top: 0; }
.podium-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px; text-align: center; color: var(--text); position: relative; }
.podium-card:hover { color: var(--text); border-color: var(--border-strong); }
.podium-card .rank { position: absolute; top: 12px; left: 12px; }
.podium-card.p1 { padding-top: 24px; background: radial-gradient(18rem 10rem at 50% 0%, rgba(245, 176, 0, 0.16), transparent 70%), var(--surface); }
.avatar.lg { width: 64px; height: 64px; font-size: 26px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--border-strong); }
.podium-name { font: 700 16px/1.2 var(--display); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-pnl { font: 700 20px/1.1 var(--display); }

@media (max-width: 780px) {
  .copy-points, .copy-grid { grid-template-columns: 1fr; }
  .signal { flex-wrap: wrap; }
  .signal-actions { width: 100%; padding-left: 57px; }
  .podium { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .podium-card { padding: 14px 6px; }
  .podium-card .avatar.xl, .podium-card .avatar.lg { width: 48px; height: 48px; font-size: 20px; }
  .podium-pnl { font-size: 15px; }
  .podium-card .handle { font-size: 11px; }
  .overview { padding: 0 14px; }
  .nav a[data-route="people"] { display: none; }
}

/* ---------- theme toggle ---------- */
.theme-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); display: grid; place-items: center; cursor: pointer; flex: none; }
.theme-btn:hover { color: var(--text); background: var(--surface-2); }
.side-foot { display: flex; gap: 8px; align-items: center; margin-top: auto; }
.side-foot .account { margin-top: 0; flex: 1; min-width: 0; }

/* ---------- landing (signed out) ---------- */
body.landing .rail { display: none; }
body.landing .layout { grid-template-columns: 250px minmax(0, 980px); }
.grad-text { background: linear-gradient(100deg, var(--mint-2), var(--mint) 40%, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; align-items: center; padding: 36px 34px; position: relative; overflow: hidden; }
.landing-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(34rem 20rem at 100% 0%, rgba(0, 229, 153, 0.16), transparent 70%), radial-gradient(26rem 18rem at 0% 110%, rgba(139, 92, 246, 0.14), transparent 70%); }
.landing-hero > * { position: relative; }
.landing-hero h1 { font: 700 52px/1.02 var(--display); letter-spacing: -0.035em; margin: 14px 0 16px; }
.landing-hero .lead { font-size: 17.5px; color: var(--text-2); margin: 0 0 24px; max-width: 32em; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.trust { margin-top: 22px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.trust span { padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-weight: 600; }

.mock { position: relative; }
.mock-card { background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--border-strong); border-radius: 22px; padding: 18px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8); transform: rotate(1.5deg); }
.mock-tag { position: absolute; top: -12px; right: 16px; z-index: 2; font: 700 11px/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase; background: var(--violet); color: #fff; padding: 6px 10px; border-radius: 999px; }
.mock-head { display: flex; align-items: center; gap: 10px; }
.mock-head .who { flex: 1; line-height: 1.2; }
.mock-head .who b { display: block; }
.mock-pnl { font: 700 34px/1 var(--display); letter-spacing: -0.02em; margin: 16px 0 2px; color: var(--up); }
.mock-sub { font-size: 13px; color: var(--muted); }
.mock-chart { display: block; width: 100%; height: 86px; margin: 12px 0 6px; }
.mock-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.mock-row .cell-token { font-weight: 650; }
.mock-float { position: absolute; display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8); font-size: 13.5px; font-weight: 650; }
.mock-float.tip { left: -26px; bottom: 70px; color: var(--amber); transform: rotate(-3deg); }
.mock-float.copy { right: -14px; bottom: -16px; color: var(--mint); transform: rotate(2deg); }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 16px 0; }
.stat-strip > div { padding: 18px 20px; border-right: 1px solid var(--border); }
.stat-strip > div:last-child { border-right: 0; }
.stat-strip b { display: block; font: 700 28px/1.1 var(--display); letter-spacing: -0.02em; }
.stat-strip span { font-size: 13px; color: var(--muted); font-weight: 600; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 16px 0; }
.feature-card { padding: 20px; }
.feature-card .f-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; color: var(--mint); background: var(--mint-soft); }
.feature-card:nth-child(3n+2) .f-icon { color: var(--violet); background: color-mix(in srgb, var(--violet) 14%, transparent); }
.feature-card:nth-child(3n) .f-icon { color: var(--amber); background: color-mix(in srgb, var(--amber) 14%, transparent); }
.feature-card h3 { margin: 0 0 6px; font: 700 17px/1.25 var(--display); }
.feature-card p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 28px 2px 12px; gap: 12px; }
.section-head h2 { margin: 0; font: 700 22px/1.2 var(--display); letter-spacing: -0.02em; }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; align-items: start; }
.split .card + .card { margin-top: 0; }
.cta-band { margin-top: 18px; padding: 30px; text-align: center; background: radial-gradient(30rem 12rem at 50% 0%, rgba(0, 229, 153, 0.18), transparent 70%), var(--surface); }
.cta-band h2 { margin: 0 0 8px; font: 700 28px/1.15 var(--display); letter-spacing: -0.02em; }
.cta-band p { margin: 0 0 18px; color: var(--text-2); }
.empty-cta { padding: 18px; text-align: center; color: var(--muted); font-size: 14px; }
.empty-cta b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* ---------- tip dialog ---------- */
.token-pick { display: grid; gap: 6px; max-height: 210px; overflow-y: auto; margin-bottom: 14px; padding-right: 2px; }
.token-opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; text-align: left; width: 100%; }
.token-opt:hover { border-color: var(--border-strong); }
.token-opt.on { border-color: var(--mint); background: var(--mint-soft); }
.token-opt .t-name { flex: 1; min-width: 0; font-weight: 650; }
.token-opt .t-bal { text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.amount-row { position: relative; margin-bottom: 0; }
.amount-row input { padding-right: 110px; font-size: 18px; font-weight: 650; }
.amount-row .max { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.usd-est { font-size: 13px; color: var(--muted); margin: 6px 2px 14px; }
.tip-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--amber); background: color-mix(in srgb, var(--amber) 13%, transparent); margin-bottom: 8px; }

@media (max-width: 1220px) {
  body.landing .layout { grid-template-columns: 230px minmax(0, 1fr); }
  .landing-hero { grid-template-columns: 1fr; }
  .mock { max-width: 420px; margin: 10px auto 0; }
}
@media (max-width: 780px) {
  body.landing .layout { grid-template-columns: minmax(0, 1fr); }
  .landing-hero { padding: 26px 18px; }
  .landing-hero h1 { font-size: 36px; }
  .mock-float.tip { left: -6px; }
  .mock-float.copy { right: -4px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip > div:nth-child(2) { border-right: 0; }
  .stat-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .feature-grid, .split { grid-template-columns: 1fr; }
  .side-foot { display: none; }
}

/* grid children may shrink below their content width (prevents sideways scroll) */
.split > *, .landing-hero > *, .feature-grid > *, .copy-grid > *, .tiles > * { min-width: 0; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--mint); background: var(--mint-soft); padding: 5px 11px; border-radius: 999px; }
.mock-float.tip { bottom: auto; top: 168px; left: -30px; }
@media (max-width: 780px) { .mock-float.tip { left: -8px; top: 150px; } }

/* ---------- profile picture ---------- */
img.avatar { object-fit: cover; background: var(--surface-3); }
.avatar-edit { display: flex; gap: 18px; align-items: center; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.avatar-edit b { display: block; }
.avatar-edit p { margin: 2px 0 10px; font-size: 13.5px; }
label.btn { cursor: pointer; }

/* Official CA + X card */
.ca-card { padding: 16px 18px; margin: 16px 0; border-color: rgba(0, 229, 153, 0.35); background: linear-gradient(135deg, rgba(0, 229, 153, 0.08), transparent 60%), var(--surface); }
.stack > .ca-card, .rail > .ca-card { margin: 0; }
.ca-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.ca-label { font: 700 12px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: #03130c; background: var(--mint); padding: 5px 9px; border-radius: 7px; }
.ca-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ca-value { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 600 16px/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--surface-2); border: 1px dashed rgba(0, 229, 153, 0.45); border-radius: 10px; padding: 9px 12px; color: var(--text); }
.ca-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ca-actions:empty { display: none; }
.ca-warn { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.ca-card.compact { padding: 14px; }
.ca-card.compact .ca-value { font-size: 13px; padding: 8px 10px; }
.ca-card.compact .ca-head .muted { display: none; }
