:root {
  --bg: #080A10;
  --panel: #11151F;
  --panel-2: #161C28;
  --border: #232B3A;
  --border-2: #2E3848;
  --text: #EAEEF6;
  --muted: #8B97AC;
  --dim: #5C6678;
  --accent: #E6A33E;
  --green: #3FB984;
  --red: #E0653E;
  --blue: #4F9DDE;
  --purple: #9B6BDF;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Segoe UI", -apple-system, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* background layers */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(120, 140, 180, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 140, 180, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(700px 380px at 78% 4%, rgba(230, 163, 62, 0.10), transparent 70%),
    radial-gradient(620px 420px at 12% 22%, rgba(79, 157, 222, 0.08), transparent 70%);
}

main { max-width: 1060px; margin: 0 auto; padding: 0 22px 80px; }
section { padding: 60px 0; }

h1 { font-size: 44px; line-height: 1.12; font-weight: 800; letter-spacing: -1px; }
h2 { font-size: 25px; font-weight: 800; letter-spacing: -0.4px; }
h3 { font-size: 16px; font-weight: 700; }
.accent { color: var(--accent); }
.muted { color: var(--muted); font-size: 14px; }
code { font-family: var(--mono); }

.section-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 2px;
  color: var(--accent); margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
.section-tag::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* top bar */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1060px; margin: 0 auto; padding: 18px 22px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  background: linear-gradient(160deg, #1d2433, #11151f);
  border: 1px solid var(--border-2); border-radius: 10px;
  color: var(--accent); font-family: Georgia, serif; font-size: 21px; font-weight: 700;
  box-shadow: 0 0 24px -10px rgba(230, 163, 62, 0.6);
}
.brand-name { font-weight: 800; letter-spacing: 2px; font-size: 18px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--border);
  padding: 6px 13px; border-radius: 999px;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3px rgba(63, 185, 132, 0.16);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-link {
  font-size: 13.5px; text-decoration: none; color: var(--muted);
  padding: 6px 11px; border-radius: 8px; border: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.topbar-link:hover { color: var(--text); border-color: var(--border-2); }
.topbar-link.active { color: var(--accent); }

/* hero — compact v2: tighter padding, inline pulse pill, single CTA + text
 * link, live-stats banner below. Goal is to fit the whole hero plus a peek
 * of the dashboard in the first 600px so visitors see real numbers fast. */
.hero { padding-top: 32px; padding-bottom: 8px; }
.hero-eyebrow-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 1.6px; color: var(--dim); margin: 0; }
.hero-live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px;
  background: rgba(63,185,132,0.08);
  border: 1px solid rgba(63,185,132,0.28);
  border-radius: 14px;
  font-family: var(--mono); font-size: 10px;
  color: var(--green); letter-spacing: 0.3px;
}
.hero-live-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--green);
  animation: live-pulse 1.8s ease-in-out infinite;
}
.hero-h1 {
  font-size: 38px; font-weight: 700; line-height: 1.15; letter-spacing: -0.6px;
  margin: 0 0 12px; max-width: 720px;
}
.hero-h1 .accent { color: var(--accent); }
.lede { color: var(--muted); font-size: 15.5px; line-height: 1.55; margin: 0 0 20px; max-width: 540px; }
.lede strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-cta-secondary { color: var(--muted); font-size: 13px; }
.hero-cta-secondary a { color: var(--blue); text-decoration: underline; text-decoration-color: rgba(79,157,222,0.3); }
.hero-cta-secondary a:hover { text-decoration-color: var(--blue); }

/* Live-stats banner below the hero CTAs — three quick numbers (funded /
 * paid / buyback) and an "updated Xs ago" timestamp. First impression
 * includes real data, not just copy. Wired up from the dashboard payload
 * so it self-updates on the normal 20s refresh cycle. */
.hero-stats {
  display: flex; align-items: center; gap: 28px;
  padding: 14px 16px; margin-top: 22px;
  background: linear-gradient(180deg, #131825 0%, #0e1219 100%);
  border: 1px solid #1d2433; border-radius: 12px;
  font-family: var(--mono); font-size: 11px;
  flex-wrap: wrap;
}
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat-label {
  color: var(--dim); letter-spacing: 1.5px; font-size: 9.5px;
}
.hero-stat-value {
  color: var(--text); font-size: 15px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.hero-stat-value.accent { color: var(--accent); }
.hero-stat-value.accent-green { color: var(--green); }
.hero-stat-time {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  color: var(--green); font-size: 10.5px;
}
.hero-stat-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: live-pulse 1.8s ease-in-out infinite;
}

/* ================= $THESIS STRIP (footer area) ================= */
/* Compact horizontal card just above the page footer. Holds the same
 * elements the old fat hero block did (description, chart link, BaseScan
 * link, CA + copy) but in roughly half the vertical real estate so the
 * fold stays focused on the live dashboard above. */
.token-strip { margin-top: 56px; }
.token-strip-card {
  position: relative; overflow: hidden;
  margin-top: 14px;
  background: linear-gradient(180deg, #0e1219 0%, #0a0e16 100%);
  border: 1px solid #1f2638; border-radius: 14px;
  padding: 20px 22px;
}
.token-strip-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230,163,62,0.4), transparent);
}
.token-strip-row {
  display: flex; align-items: flex-start; gap: 22px; flex-wrap: wrap;
}
.token-strip-left { flex: 1; min-width: 280px; }
.token-strip-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.token-strip-ticker { font-family: Georgia, serif; color: var(--accent); font-size: 20px; font-weight: 700; }
.token-strip-tag { font-family: var(--mono); color: var(--dim); font-size: 10px; letter-spacing: 1.4px; }
.token-strip-desc { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; }
.token-strip-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.token-strip-actions .btn { padding: 9px 16px; font-size: 13px; }
.token-strip-ca {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-top: 16px;
  background: #06080c; border: 1px solid #1d2433; border-radius: 8px;
}
.token-strip-ca-label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.5px;
  color: var(--dim);
}
.token-strip-ca-value {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px;
  color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.token-strip-copy {
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  background: transparent; border: 1px solid var(--border-2); border-radius: 5px;
  padding: 4px 10px; cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.token-strip-copy:hover { color: var(--accent); border-color: var(--accent); }

/* Narrow viewports — actions wrap and CA bar reflows. */
@media (max-width: 760px) {
  .hero-h1 { font-size: 28px; }
  .hero-stats { gap: 18px; font-size: 10.5px; }
  .hero-stat-time { margin-left: 0; }
  .token-strip-actions { width: 100%; }
}

/* buttons */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 11px;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--border-2); background: var(--panel-2); color: var(--text);
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: #45526b; }
.btn-primary {
  background: linear-gradient(160deg, #f0b455, #e09a2e);
  color: #1a1305; border-color: transparent;
  box-shadow: 0 8px 26px -12px rgba(230, 163, 62, 0.8);
}

/* ================= FACULTY ROOM ================= */
.room-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 16px;
}
.room-live {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 1px; color: var(--green);
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 12px var(--green); animation: blink 1.6s ease-in-out infinite;
}
.room-activity { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.submission-card {
  margin-top: 14px; background: linear-gradient(160deg, #141a26, #10141d);
  border: 1px solid var(--border-2); border-radius: 13px; padding: 18px 20px;
}
.sub-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 2px; color: var(--dim); }
.sub-author { font-weight: 800; font-size: 18px; margin-top: 4px; }
.sub-thesis { color: var(--muted); font-size: 14.5px; margin-top: 6px; font-style: italic; }
.sub-ca {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  color: var(--blue); text-decoration: none;
  background: var(--bg); border: 1px solid var(--border); border-radius: 7px; padding: 4px 9px;
}
.sub-actions { margin-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sub-btn {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--border-2);
  border-radius: 7px; padding: 4px 10px; cursor: pointer;
  text-decoration: none; transition: color 0.15s ease, border-color 0.15s ease;
  display: inline-flex; align-items: center;
}
.sub-btn:hover { color: var(--text); border-color: #45526b; }

.agents { margin-top: 16px; }
.agent-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.flow-link { width: 2px; height: 24px; margin: 6px auto; background: linear-gradient(var(--border-2), transparent); }

.agent {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 13px; padding: 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  opacity: 0.62;
}
.agent.wide { margin: 0; }
.agent.active {
  opacity: 1; border-color: var(--c);
  box-shadow: 0 0 0 1px var(--c), 0 14px 44px -20px var(--c);
}
.agent.done { opacity: 1; border-color: color-mix(in srgb, var(--c) 45%, var(--border)); }

.agent-head { display: flex; align-items: center; gap: 12px; }
.sig {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 10px; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, var(--panel-2));
  border: 1px solid color-mix(in srgb, var(--c) 40%, var(--border));
}
.sig svg { width: 22px; height: 22px; }
.agent-id { flex: 1; }
.agent-name { font-weight: 800; font-size: 15px; }
.agent-role { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: 0.4px; }
.agent-status {
  flex: none; width: 9px; height: 9px; border-radius: 50%;
  background: var(--dim); transition: background 0.2s ease;
}
.agent.active .agent-status { background: var(--c); box-shadow: 0 0 12px var(--c); animation: blink 1s ease-in-out infinite; }
.agent.done .agent-status { background: var(--c); }

.agent-body {
  margin-top: 13px; padding: 12px 13px; min-height: 116px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
}
.agent-idle { color: var(--dim); }
.agent.active .agent-body, .agent.done .agent-body { border-color: color-mix(in srgb, var(--c) 30%, var(--border)); }
.line {
  color: var(--muted); animation: lineIn 0.32s ease both;
  display: flex; gap: 8px;
}
.line::before { content: "›"; color: var(--c); }
.line.verdict { color: var(--text); font-weight: 700; }
.line.verdict::before { content: "■"; }
@keyframes lineIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.verdict-banner {
  margin-top: 18px; display: flex; align-items: center; gap: 18px;
  background: linear-gradient(160deg, #161d2b, #10141d);
  border: 1px solid var(--border-2); border-radius: 14px; padding: 18px 22px;
  animation: pop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}
@keyframes pop { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
.verdict-grade {
  flex: none; width: 64px; height: 64px; border-radius: 14px;
  display: grid; place-items: center; font-size: 36px; font-weight: 800;
}
.verdict-text { font-size: 16px; font-weight: 600; }
.verdict-text .vt-sub { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 2px; }

/* ================= DASHBOARD ================= */
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.dash-sub { color: var(--muted); font-size: 14px; margin-top: 3px; }
.wallet-link {
  font-family: var(--mono); font-size: 12px; color: var(--blue); text-decoration: none;
  border: 1px solid var(--border); background: var(--panel); border-radius: 8px; padding: 8px 12px;
}
.wallet-link:hover { border-color: var(--blue); }

/* Live Performance v2 — hero portfolio card (1.4x width) anchors the row,
 * three smaller secondary cards follow. Cards have a thin top highlight to
 * mimic brushed metal, and an icon next to each label for quick scan. */
.stat-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}
.stat-card {
  position: relative;
  background: linear-gradient(180deg, #131825 0%, #0e1219 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 16px 14px;
  overflow: hidden;
}
/* Hairline highlight at the top edge — fades in from the sides so it doesn't
 * look like a hard border. Subtle but adds the "premium" depth feel. */
.stat-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}
/* Hero variant — gets a richer gradient, more padding, and the accent-tinted
 * top highlight so it visibly outranks the secondary cards next to it. */
.stat-card.is-hero {
  background: linear-gradient(180deg, #1a2030 0%, var(--panel) 100%);
  border-color: var(--border-2);
  padding: 18px 20px 16px;
}
.stat-card.is-hero::before {
  background: linear-gradient(90deg, transparent, rgba(230,163,62,0.4), transparent);
}
.stat-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.stat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; color: var(--muted);
  flex-shrink: 0;
}
.stat-card.is-hero .stat-icon { color: var(--accent); }
.stat-label {
  font-family: var(--mono); color: var(--muted);
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
}
.stat-card.is-hero .stat-label { font-size: 10.5px; letter-spacing: 1.8px; }
.stat-value {
  font-size: 21px; font-weight: 700;
  letter-spacing: -0.3px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-card.is-hero .stat-value {
  font-size: 34px;
  letter-spacing: -0.7px;
  margin-bottom: 6px;
}
.stat-sub {
  color: var(--muted); font-size: 11px;
  margin-top: 6px; line-height: 1.45;
}
.stat-card.is-hero .stat-sub { font-size: 11.5px; }

/* "live · updated Xs ago" pill that sits top-right of the dashboard
 * section header. Pulsing green dot reads as "real, breathing system". */
.dash-top-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.dash-top-row .section-tag { margin-bottom: 0; flex: none; }
.dash-top-row .section-tag::after { display: none; }
.live-status {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 11px;
  background: rgba(63,185,132,0.08);
  border: 1px solid rgba(63,185,132,0.28);
  border-radius: 14px;
  font-family: var(--mono); font-size: 10.5px;
  color: var(--green); letter-spacing: 0.3px;
}
.live-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63,185,132,0.5); }
  50%      { box-shadow: 0 0 0 5px rgba(63,185,132,0); }
}

/* "Just now · Closed $TICKER +X Ξ for @author →" strip that sits below the
 * stat cards and surfaces the most recent profit close. Acts as a one-line
 * recap of what just happened and links to the close tweet on X. */
.activity-strip {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; margin-top: 14px;
  background: rgba(63,185,132,0.04);
  border: 1px solid rgba(63,185,132,0.18);
  border-radius: 10px;
  font-size: 12.5px;
  text-decoration: none; color: inherit;
  transition: background 120ms ease, border-color 120ms ease;
}
.activity-strip:hover {
  background: rgba(63,185,132,0.07);
  border-color: rgba(63,185,132,0.32);
}
.act-when {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 1.5px; color: var(--green);
  text-transform: uppercase;
}
.act-when::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--green);
}
.act-verb { color: var(--text); }
.act-token { font-family: var(--mono); color: var(--accent); }
.act-amount { font-family: var(--mono); color: var(--green); }
.act-amount.neg { color: var(--red); }
.act-tail { color: var(--muted); }
.act-tail .act-handle { color: var(--text); }
.act-arrow { margin-left: auto; color: var(--dim); font-family: var(--mono); font-size: 11px; }
.activity-strip:hover .act-arrow { color: var(--accent); }

/* Narrow viewports — fall back to 2-up grid so cards stay readable. */
@media (max-width: 760px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card.is-hero { grid-column: 1 / -1; }
  .activity-strip { flex-wrap: wrap; font-size: 12px; }
}

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; margin-top: 12px; }
.mini { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 13px 15px; }
.mini-value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-label { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

.funnel-line { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-top: 13px; }
.funnel-line b { color: var(--muted); font-weight: 600; }

.block-title { margin: 36px 0 4px; display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.block-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
/* Small outline icon that prefixes a section title. Color follows the accent
 * by default so it visually anchors the heading without overpowering it. */
.block-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; color: var(--accent);
  flex-shrink: 0;
}
.count-chip {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 8px;
  letter-spacing: 0.2px;
}

/* Premium table container — visible vertical gradient + hairline highlight
 * on top edge so the rows feel like they sit inside a card. Stronger
 * contrast than the V1 attempt because that one was too subtle to register.
 * Applied to every `.table-wrap` for visual consistency between Open
 * Positions and Closed Trades; the `.scroll-cap-table` overlay layers
 * cleanly on top because both extend from the same base. */
.table-wrap {
  position: relative;
  /* X-axis MUST be auto so mobile viewers can swipe to reach off-screen
   * columns (the data-table itself has min-width 640px so on narrow screens
   * the rightmost columns spill past the wrapper). Y-axis is auto for the
   * scroll-cap variants that bound height. */
  overflow-x: auto;
  overflow-y: auto;
  margin-top: 12px;
  background: linear-gradient(180deg, #11172480 0%, #0a0e16 100%);
  border: 1px solid #1f2638;
  border-radius: 12px;
  box-shadow: 0 1px 0 0 rgba(255,255,255,0.03) inset;
  /* iOS-style smooth momentum scrolling on touch devices. */
  -webkit-overflow-scrolling: touch;
}
.table-wrap::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent);
  z-index: 2;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.data-table th {
  text-align: left; color: var(--dim); font-family: var(--mono); font-weight: 500;
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px;
  padding: 12px 14px;
  background: rgba(13,17,26,0.85);
  border-bottom: 1px solid #1f2638;
}
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #131825;
}
/* Zebra striping — subtle but visible. Every other row sits on a slightly
 * lighter wash so the eye can track across long rows without overshooting.
 * Background overrides cleanly because the featured row + hover apply at a
 * higher specificity (own class / pseudo-class). */
.data-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.018);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr {
  transition: background 120ms ease, box-shadow 120ms ease;
}
.data-table tbody tr:hover {
  background: rgba(230,163,62,0.08);
}
.data-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tok { color: var(--blue); text-decoration: none; font-family: var(--mono); }
.tok:hover { text-decoration: underline; }

/* Token cell with $TICKER link + copy-CA icon button. Note the class is
 * `tok-copy` not `copy-btn` — `copy-btn` is already taken by the header's
 * "copy contract address" button with very different sizing rules. */
.tok-cell { display: inline-flex; align-items: center; gap: 8px; }
.tok-logo {
  width: 20px; height: 20px; min-width: 20px;
  border-radius: 50%;
  background: var(--panel-2);
  object-fit: cover;
  border: 1px solid var(--border-2);
  flex-shrink: 0;
}
.tok-copy {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; min-width: 24px;
  border-radius: 6px;
  background: var(--panel); border: 1px solid var(--border-2);
  color: var(--muted); cursor: pointer; padding: 0;
  font: inherit; line-height: 0;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.tok-copy svg { display: block; width: 14px; height: 14px; }
.tok-copy:hover { color: var(--text); border-color: #45526b; background: var(--panel-2); }
.tok-copy.copied { color: var(--green); border-color: var(--green); background: rgba(63,185,132,0.08); }
.tok-copy.copied svg { display: none; }
.tok-copy.copied::after { content: "\2713"; font-size: 13px; font-weight: 700; line-height: 1; font-family: var(--sans); }
.empty { color: var(--muted); font-size: 14px; padding: 16px 2px; }

.row-links { display: inline-flex; gap: 6px; }
.row-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--panel); border: 1px solid var(--border-2);
  color: var(--muted); text-decoration: none; font-size: 13px; line-height: 1;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.row-icon:hover { color: var(--text); border-color: #45526b; background: var(--panel-2); }

/* Author cell with avatar + "view thesis" — whole cell linked to the X post. */
.ac { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.ac-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--panel-2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 11px; font-weight: 600;
  font-family: var(--sans);
  object-fit: cover;
}
.ac-fallback { background: var(--panel-2); color: var(--muted); }
.ac-meta { display: flex; flex-direction: column; line-height: 1.2; }
.ac-handle { color: var(--text); font-size: 13px; font-weight: 500; }
.ac-view { color: var(--dim); font-size: 10px; font-family: var(--mono); letter-spacing: 0.5px; }
.ac:hover .ac-handle { color: var(--accent); }
.ac:hover .ac-view { color: var(--muted); }

/* Entry → now market cap cell. */
.mc { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.mc-entry { color: var(--dim); font-family: var(--mono); font-size: 11px; }
.mc-now { font-family: var(--mono); font-size: 13px; color: var(--text); }
.mc-now.up { color: var(--green); }
.mc-now.down { color: var(--red); }
.mc-na { color: var(--dim); font-family: var(--mono); }

/* Tier-progress cell — replaces the old "X/4 TP" text in the open
 * positions table. One segment per take-profit tier, filled green on hit,
 * gold partial fill on the current tier (% toward next target), grey on
 * future tiers. See tierProgressCell() in app.js for the data wiring. */
.tp-cell { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }
.tp-bar { display: flex; gap: 3px; }
.tp-seg {
  flex: 1; height: 6px; border-radius: 2px;
  background: var(--panel); position: relative; overflow: hidden;
}
.tp-seg.tp-hit { background: var(--green); }
.tp-seg.tp-future { background: var(--panel); }
.tp-seg.tp-current { background: var(--panel); }
.tp-seg.tp-current .tp-fill {
  position: absolute; inset: 0;
  background: var(--accent);
  transition: width 400ms ease-out;
}
.tp-caption {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 10px; color: var(--dim);
  letter-spacing: 0.2px;
}
.tp-caption .tp-good { color: var(--green); }
.tp-caption .tp-dim { color: var(--muted); }
.tp-fallback { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Scroll-capped containers used by the Closed trades table and the
 * Decision log feed on the homepage. We render every row to the DOM
 * (so anyone can scroll to it) but cap the visible window at roughly
 * 3 rows / items so neither section dominates the page. Custom
 * scrollbar styling so the bar reads as part of the dark UI, not as
 * the OS default. */
.scroll-cap { overflow-y: auto; }
.scroll-cap-table { max-height: 240px; }
/* Variant for Open Positions — caps the visible window at roughly 10 rows
 * (plus the sticky header) so the table doesn't dominate the page when
 * lots of positions are open. Rows beyond fold smoothly behind the
 * scrollbar with a partial view of the next one as an affordance. */
.scroll-cap-tall { max-height: 620px; }
.scroll-cap-feed { max-height: 340px; }
/* Sticky table header so the column labels stay visible while the body
 * scrolls. Without the background, body rows would bleed through. */
.scroll-cap-table thead th {
  position: sticky; top: 0;
  background: var(--panel);
  z-index: 1;
}
/* Webkit / Blink (Chrome, Safari, Edge) — thin, themed scrollbar. */
.scroll-cap::-webkit-scrollbar { width: 8px; }
.scroll-cap::-webkit-scrollbar-track { background: transparent; }
.scroll-cap::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 4px;
  border: 2px solid var(--bg);
}
.scroll-cap::-webkit-scrollbar-thumb:hover { background: var(--accent); }
/* Firefox — fewer knobs but still themable. */
.scroll-cap { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }

.pos { color: var(--green); }
.neg { color: var(--red); }
.badge { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.grade-A { background: rgba(63,185,132,.16); color: var(--green); }
.grade-B { background: rgba(79,157,222,.16); color: var(--blue); }
.grade-C { background: rgba(230,163,62,.16); color: var(--accent); }
.grade-D { background: rgba(224,101,62,.16); color: var(--red); }
.grade-F { background: rgba(224,101,62,.22); color: var(--red); }
.buy { background: rgba(63,185,132,.16); color: var(--green); }
.skip { background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); }

.feed { display: grid; gap: 10px; }
.feed-item { background: var(--panel); border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px; }
.feed-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feed-handle { font-weight: 700; }
.feed-scores { font-family: var(--mono); color: var(--muted); font-size: 12px; }
.feed-time { font-family: var(--mono); color: var(--dim); font-size: 11.5px; margin-left: auto; }
.feed-rationale { color: var(--muted); font-size: 13.5px; margin-top: 7px; }
.feed-skip { color: var(--accent); font-size: 12.5px; margin-top: 5px; }

.dist-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 12px; }
.dist-card { background: var(--panel); border: 1px solid var(--border); border-top: 3px solid var(--c); border-radius: 11px; padding: 16px; }
.dist-pct { font-family: var(--mono); font-size: 12px; color: var(--c); font-weight: 700; }
.dist-value { font-size: 20px; font-weight: 800; margin: 5px 0 2px; font-variant-numeric: tabular-nums; }
.dist-label { color: var(--muted); font-size: 12.5px; }

/* how it works */
.steps { list-style: none; display: grid; gap: 12px; }
.steps li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 11px; padding: 15px 17px; color: var(--muted);
}
.step-n {
  flex: none; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 13px;
  background: var(--panel-2); color: var(--accent); border: 1px solid var(--border-2);
}

/* register */
.register-intro { color: var(--muted); max-width: 620px; margin: 8px 0 22px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.reg-step-head { font-size: 16px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.reg-step p { color: var(--muted); margin-bottom: 16px; }
.dot {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--panel-2); border: 1px solid var(--border-2); color: var(--accent);
}
.dot.ok { background: var(--green); color: #08231a; border-color: var(--green); }

.docs-cta { margin-top: 22px; display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.docs-cta-note { color: var(--muted); font-size: 13px; }

/* ================= TOKEN LAUNCH ================= */
.token-launch .token-intro { color: var(--muted); max-width: 640px; margin: 10px 0 22px; font-size: 15px; }
.token-card {
  background: linear-gradient(160deg, #141a26, #10141d);
  border: 1px solid var(--border-2); border-radius: 14px;
  padding: 20px 22px;
}
.token-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.token-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 2px;
  color: var(--accent); text-transform: uppercase;
}
.token-ca {
  font-family: var(--mono); font-size: 13.5px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px;
  flex: 1; min-width: 0; word-break: break-all;
}
.copy-btn {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 8px 14px; cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.copy-btn:hover { color: var(--text); border-color: #45526b; }
.token-actions { display: flex; gap: 12px; flex-wrap: wrap; }

footer { border-top: 1px solid var(--border); padding: 30px 22px; text-align: center; }
.footer-nav { display: flex; gap: 22px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.footer-nav a:hover { color: var(--text); }
.x-icon { display: inline-block; }
.gh-icon { display: inline-block; }
footer p { color: var(--dim); font-size: 12.5px; max-width: 640px; margin: 0 auto; }

@media (max-width: 620px) {
  h1 { font-size: 33px; }
  .agent-row { grid-template-columns: 1fr; }
  .stat-value { font-size: 24px; }
}

/* ===================== MOBILE PASS (≤600px) =====================
 * Comprehensive mobile improvements for the homepage. Tables transform
 * into stacked "row cards" since horizontal scrolling for 7-column data
 * tables on a 375px viewport is awful UX. Padding, font sizes, and the
 * topbar all tighten so vertical space is the only thing you scroll. */
@media (max-width: 600px) {
  main { padding: 0 14px 60px; }
  .topbar { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .topbar-right { gap: 12px; flex-wrap: wrap; }
  .topbar-link { font-size: 12px; }

  /* Hero — drop padding, tighten headline, banner stacks vertically. */
  .hero { padding-top: 18px; }
  .hero-h1 { font-size: 24px; line-height: 1.2; }
  .lede { font-size: 14px; }
  .hero-stats {
    flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px;
  }
  .hero-stat-time { margin-left: 0; }

  /* Dashboard section — compact section header + smaller heading. */
  .dash-head h2 { font-size: 22px; }
  .dash-sub { font-size: 13px; }
  .live-status { font-size: 10px; padding: 3px 8px; }

  /* Stat cards — single column (instead of 2-up) so each is fully readable. */
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card.is-hero { grid-column: 1; }
  .stat-card.is-hero .stat-value { font-size: 28px; }

  /* Activity strip — wrap pieces vertically so nothing gets squeezed. */
  .activity-strip {
    flex-wrap: wrap; gap: 6px; padding: 10px 12px; font-size: 12px;
  }
  .activity-strip .act-arrow { margin-left: auto; }

  /* Section titles — slightly smaller. */
  .block-title { font-size: 15px; margin-top: 28px; }
  .block-sub { font-size: 13px; }

  /* === TABLE → CARD LAYOUT === */
  /* Each row becomes a stacked card. Cells stack vertically with a
   * lightweight label prefix sourced from the matching thead cell via
   * a data-label JS attribute (added in app.js renderOpen/renderClosed).
   * No more horizontal scroll; every field of every row is visible
   * without panning. */
  .table-wrap {
    /* Strip the desktop card chrome on mobile so each row card stands on
     * its own. KEEP the scroll-cap behaviour — the wrapper still bounds
     * its height and scrolls vertically. User swipes inside the container
     * to reach off-screen cards, same UX as desktop, no buttons needed. */
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-wrap::before { display: none; }

  /* Tight scroll-cap heights for mobile so each section shows ~3 cards by
   * default and the rest are reachable via swipe. Tuned for ~200px per card
   * + a peek of the next one as scroll affordance. */
  .table-wrap.scroll-cap-tall { max-height: 620px; }
  .table-wrap.scroll-cap-table { max-height: 460px; }
  .data-table { min-width: 0; font-size: 13px; }
  .data-table thead { display: none; }
  .data-table tbody tr {
    display: block;
    margin-bottom: 10px;
    padding: 12px 14px;
    background: linear-gradient(180deg, #131825 0%, #0e1219 100%);
    border: 1px solid #1d2433;
    border-radius: 12px;
  }
  /* Kill the zebra striping in card mode — each card already stands out. */
  .data-table tbody tr:nth-child(even) { background: linear-gradient(180deg, #131825 0%, #0e1219 100%); }
  .data-table tbody tr:hover { background: linear-gradient(180deg, #1a2030 0%, #11151f 100%); }
  .data-table td {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 6px 0; border: none; text-align: left;
  }
  .data-table td.num { text-align: right; }
  /* Inject the column label before each cell value via the data-label
   * attribute the JS sets. Falls back invisibly if not set. */
  .data-table td[data-label]::before {
    content: attr(data-label);
    font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px;
    color: var(--dim); text-transform: uppercase; flex-shrink: 0;
  }
  /* The first cell (token) and second cell (author) are special — they
   * already render rich blocks, so we hide the label there and let them
   * take full width. */
  .data-table tr td:first-child[data-label]::before,
  .data-table tr td:nth-child(2)[data-label]::before { display: none; }
  .data-table tr td:first-child { padding-top: 0; }
  .data-table tr td:last-child { padding-bottom: 0; }
  /* Tier progress bar — give it more room in card mode. */
  .tp-cell { min-width: 0; flex: 1; }
  .tp-bar { gap: 4px; }

  /* Profit distribution — 2x2 grid on mobile. */
  .dist-grid { grid-template-columns: 1fr 1fr; }

  /* $THESIS strip — tighter, stack actions below. */
  .token-strip-row { gap: 12px; }
  .token-strip-actions { width: 100%; gap: 8px; }
  .token-strip-ca-value { font-size: 11px; }

  /* Hero extras stack on mobile (recent wins + sparkline). */
  .hero-extras { grid-template-columns: 1fr; }
  .counters-card { grid-template-columns: 1fr 1fr; }
  .ticker-tape { font-size: 12px; }
}

/* === Dashboard improvements added 2026-05-31 === */

/* Live ticker tape — scrolling marquee of recent activity. Fixed-height
 * row at the top of the dashboard with a tiny pulsing "live" dot, then a
 * scrolling track of activity items. The track contains the items twice
 * back-to-back so the @keyframes animation loops without a visible gap. */
.ticker-tape {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--border-2);
  border-radius: 10px; padding: 8px 12px; margin: 0 0 14px;
  overflow: hidden; white-space: nowrap; font-size: 13px;
}
.ticker-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.6px;
  text-transform: uppercase; color: #E0653E; flex-shrink: 0;
}
.ticker-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #E0653E; display: inline-block;
  animation: tk-pulse 1.4s ease-in-out infinite;
}
@keyframes tk-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.ticker-track-wrap {
  flex: 1; overflow: hidden; position: relative;
}
.ticker-track {
  display: inline-flex; gap: 14px; align-items: center;
  white-space: nowrap;
  animation: tk-scroll 90s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes tk-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.tk-item { color: var(--muted); }
.tk-dot { color: var(--border-2); margin: 0 4px; }
.tk-buy     { color: var(--text); }
.tk-tp      { color: var(--green); font-weight: 500; }
.tk-sl      { color: var(--red); }
.tk-manual  { color: var(--text); }
.tk-aging   { color: var(--muted); }
.tk-lottery { color: #4F9DDE; }
.tk-burn    { color: #E0653E; }
.tk-skip    { color: var(--muted); }

/* Cumulative counters card — 4 columns of running totals. */
.counters-card {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin: 12px 0;
}
.counter {
  background: var(--panel); border: 1px solid var(--border-2);
  border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.counter-label {
  font-size: 10px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.6px; font-weight: 600;
}
.counter-value {
  font-size: 20px; font-weight: 600; color: var(--text);
  font-family: var(--mono);
}
.counter-sub { font-size: 11px; color: var(--muted); }

/* Hero extras row: recent wins + sparkline side-by-side on desktop. */
.hero-extras {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px;
  margin: 0 0 14px;
}
.recent-wins {
  background: var(--panel); border: 1px solid var(--border-2);
  border-radius: 10px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
}
.rw-icon {
  font-size: 22px; line-height: 1; color: var(--green); font-weight: 600;
}
.rw-body { flex: 1; }
.rw-headline { font-size: 14px; color: var(--text); }
.rw-headline b { font-weight: 600; }
.rw-profit { color: var(--green); font-family: var(--mono); }
.rw-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.sparkline-card {
  background: var(--panel); border: 1px solid var(--border-2);
  border-radius: 10px; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.sp-label {
  font-size: 10px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.6px; font-weight: 600;
}
.sp-chart { display: block; width: 100%; height: 50px; }

/* TP proximity hint below the tier progress bar. */
.tp-proximity {
  font-size: 10px; font-family: var(--mono); margin-top: 3px;
  letter-spacing: 0.2px;
}
.tp-prox-hot { color: var(--green); font-weight: 600; }
.tp-prox-far { color: var(--muted); }

/* Inline author stats badge "(3/8)" next to the handle. */
.author-stats {
  display: inline-block; margin-left: 6px;
  font-size: 10px; font-family: var(--mono); color: var(--muted);
  vertical-align: middle;
}
.author-stats.as-good { color: var(--green); }
.author-stats.as-mid { color: var(--muted); }
