/* Cogents. Night-sky navy, white type, one accent; each bot's colour lives only on its mind.
   System: 8 type sizes, 4px spacing grid, radii 6 (chips) / 10 (controls) / 16 (cards). */

@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* Palette from the banner: the night sky for the page, snow for the type, the ice-blue of the bot's mind for the one accent. */
:root {
  --bg: #070a14;
  --surface: #0b0f1d;
  --raised: #121728;
  --raised-hover: #171d31;
  --field: #0a0e1a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #f4f6fb;
  --ink-2: #a4abbf;
  --ink-3: #8089a2;
  --accent: #7fdcff;
  --accent-ink: #04131c;
  --up: #5fd49a;
  --down: #ff6b7e;
  --live: #f0455a;
  --amber: #7fdcff;
  --bot: var(--accent);
  --r-chip: 6px;
  --r-ctl: 12px;
  --r-card: 20px;
  --topbar-h: 76px;
  --font: "Bricolage Grotesque", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 var(--font); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.7); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 600; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* data is set in the mono face: numbers, tickers, addresses, times */
.mono, .stats3 dd, .cam-stats dd, .rank-ret, .tile-ret, .s-live-stats, .wallet-big, .wallet-change, .kv dd, .bags, .trades, .podium-ret, .podium-pnl, .my-stats dd,
.lb td.c-num, .c-meta, .feed time, .feed-text, .thumb-top .chip, .scr-mcap, .scr-chg, .scr-tf, .scr-title b, .scr-scan, .alert, .tv-chip span, .tv-ticker-inner, .cam-plate span, .who small, .podium-sub, .s-sub, .my-tags .role-text, .ca-chip code, .thinking-text, .counter, .create-url, .live-id span, .c-trade {
  font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}

.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--ink-2); }
.muted { color: var(--ink-3); }
.empty { color: var(--ink-3); list-style: none; font-size: 14px; }
.link { color: var(--ink); font-size: 15px; font-weight: 500; opacity: 0.85; }
.link:hover { opacity: 1; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
button.link { border: 0; background: none; padding: 0; cursor: pointer; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------ icons */
.ico { display: inline-flex; flex-shrink: 0; width: 16px; height: 16px; }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.logo-icon { fill: currentColor; }

/* ------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font: 600 15px/1 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 56px; padding: 0 26px; font-size: 17px; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: #ffffff; }
.btn-secondary { background: rgba(255, 255, 255, 0.06); border-color: var(--line-strong); color: var(--ink); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }

.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.btn-danger { background: transparent; border-color: rgba(255, 92, 122, 0.4); color: var(--down); }
.btn-danger:hover { background: rgba(255, 92, 122, 0.1); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.is-busy { cursor: progress; opacity: 0.7; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--r-ctl);
  background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn-box { width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); }
.icon-btn:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .ico { width: 18px; height: 18px; }
.icon-btn-sm { width: 32px; height: 32px; }
.icon-btn-sm svg, .icon-btn-sm .ico { width: 16px; height: 16px; }

/* ------------------------------------------------ chips and badges */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--r-chip);
  border: 1px solid var(--line-strong); color: var(--ink-2); font: 500 11px/1 var(--mono); letter-spacing: 0.02em; white-space: nowrap;
}
.chip-real { color: var(--ink); border-color: rgba(255, 255, 255, 0.3); }
.chip-amber { color: var(--ink); }
.chip-amber::before, .demo-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); flex-shrink: 0; }
.chip-dark { border-color: transparent; background: rgba(7, 10, 20, 0.78); color: var(--ink); }
.live-badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px;
  background: var(--live); color: #fff; font: 700 11px/1 var(--mono); letter-spacing: 0.06em;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); flex-shrink: 0; }

/* ------------------------------------------------ avatars (each bot's real mind, as a still image) */
.avatar { display: block; flex-shrink: 0; width: var(--s); height: var(--s); object-fit: contain; }
.orb {
  display: inline-block; flex-shrink: 0; width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ffffff 0, var(--c) 42%, color-mix(in srgb, var(--c) 55%, #000) 100%);
}

/* ------------------------------------------------ form controls */
input, textarea, select {
  width: 100%; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl);
  background: var(--field); color: var(--ink); font: 400 16px/1.4 var(--font);
}
textarea { height: auto; padding: 10px 12px; line-height: 1.5; resize: none; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8b5d9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08); }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.field { display: grid; gap: 8px; }
.label, legend { font-size: 14px; font-weight: 500; line-height: 20px; color: var(--ink); padding: 0; }
.hint { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.field-foot { display: flex; justify-content: space-between; gap: 12px; }
.counter { flex-shrink: 0; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
.form-error, .chat-error { font-size: 14px; color: var(--down); }
.form-error:empty, .chat-error:empty { display: none; }

/* option rows: one selected style for every choice on the site */
.option {
  position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--field); cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.option:hover { border-color: var(--line-strong); }
.option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.option-dot { width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; }
.option-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform 0.15s; }
.option-body b { display: block; font-size: 15px; font-weight: 600; line-height: 20px; }
.option-body small { display: block; margin-top: 2px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.option:has(input:checked) { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.04); }
.option:has(input:checked) .option-dot { border-color: var(--ink); }
.option:has(input:checked) .option-dot::after { transform: scale(1); }
.option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.option.is-disabled { opacity: 0.5; cursor: not-allowed; }

.disclosure > summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary:hover { color: var(--ink); }
.disclosure > summary .ico { transition: transform 0.15s; }
.disclosure[open] > summary .ico { transform: rotate(90deg); }

/* ------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  background: rgba(7, 10, 20, 0.86); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
body[data-route="home"]:not(.scrolled) .topbar { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
body[data-route="home"] .hero { margin-top: calc(-1 * var(--topbar-h)); }
.topbar-inner { height: 100%; padding: 0 24px; display: flex; align-items: center; gap: 36px; }
.brand { display: flex; align-items: center; gap: 12px; }
.wordmark { font-size: 15px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; }
.demo-chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--r-chip); border: 1px solid var(--line-strong); color: var(--ink-2); font: 500 11px/1 var(--mono); letter-spacing: 0.04em; }
.mainnav { display: flex; gap: 2px; }
.mainnav a { padding: 8px 12px; border-radius: 8px; color: var(--ink-3); font-size: 16px; font-weight: 500; }
.mainnav a:hover { color: var(--ink); }
.mainnav a[aria-current="page"] { color: var(--ink); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ca-chip { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.ca-chip:hover { background: rgba(255, 255, 255, 0.05); }
.ca-label { font-weight: 700; color: var(--ink-2); font-size: 14px; }

.ca-chip code { font: 500 14px/1 var(--mono); color: var(--ink-2); }
#wallet-btn.is-connected { font-family: var(--mono); font-weight: 500; font-size: 14px; }
#wallet-btn.is-connected::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--up); }

/* ------------------------------------------------ page structure */
.section { margin-top: 72px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { font-size: 34px; line-height: 40px; letter-spacing: -0.03em; }
.page-head { padding: 56px 0 36px; }
.page-head h1 { font-size: 56px; line-height: 1; letter-spacing: -0.035em; font-weight: 800; }
.lede { margin-top: 16px; max-width: 58ch; font-size: 19px; line-height: 28px; color: var(--ink-2); text-wrap: pretty; }
.panel, .card { background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line); border-radius: var(--r-card); }
.card { padding: 24px; min-width: 0; }
.card-title { font-size: 20px; line-height: 26px; }
.panel { padding: 8px 24px; display: flex; flex-direction: column; min-width: 0; }
.who { min-width: 0; }
.who b { display: block; font-size: 17px; line-height: 22px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.who small > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.creator::before { content: "·"; margin-right: 8px; }

/* ------------------------------------------------ home: hero */
.hero { position: relative; margin: 0; height: clamp(640px, 78vh, 860px); overflow: hidden; isolation: isolate; }
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: 72% 50%; }
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(0deg, var(--bg) 0%, rgba(7, 10, 20, 0.92) 10%, rgba(7, 10, 20, 0.55) 26%, rgba(7, 10, 20, 0.1) 48%, rgba(7, 10, 20, 0) 62%),
    linear-gradient(180deg, rgba(7, 10, 20, 0.5) 0%, rgba(7, 10, 20, 0) 18%),
    linear-gradient(90deg, rgba(7, 10, 20, 0.45) 0%, rgba(7, 10, 20, 0.15) 36%, rgba(7, 10, 20, 0) 56%);
}
.hero-content { position: absolute; inset: 0; max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 28px; padding: 56px 24px 40px; }
.hero-text { max-width: 760px; }
.hero h1 { max-width: 10ch; font-size: clamp(56px, 6.6vw, 104px); line-height: 0.95; letter-spacing: -0.035em; font-weight: 700; font-stretch: 94%; text-wrap: balance; }
.hero-sub { max-width: 40ch; margin-top: 18px; font-size: 19px; line-height: 28px; color: #e2e6f0; text-wrap: pretty; }
.hero-actions { display: none; }
.hero-row { display: flex; align-items: flex-end; gap: 16px; width: 100%; }
.hero-row .btn { flex-shrink: 0; }
.live-tile {
  position: relative; display: flex; flex-direction: column; gap: 12px; width: 420px; flex-shrink: 0; padding: 14px 16px 16px;
  border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(7, 10, 20, 0.72); color: var(--ink);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s, transform 0.2s;
}
.live-tile:hover { border-color: rgba(255, 255, 255, 0.28); transform: translateY(-2px); }
.tile-head { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); }
.tile-coin { margin-left: auto; color: var(--ink); font-weight: 500; }
.tile-body { position: relative; height: 150px; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.tile-chart { position: absolute; inset: 0 0 0 0; }
.tile-chart .cg { opacity: 0.9; }
.tile-mind { position: absolute; right: 8px; bottom: 6px; width: 92px; height: 92px; display: grid; place-items: center; }
.tile-mind .mind-canvas, .tile-mind .mind-svg { width: 92px !important; height: 92px !important; }
.tile-foot { display: grid; gap: 4px; }
.tile-who { display: flex; align-items: baseline; gap: 8px; font-size: 16px; }
.tile-who span { font-size: 12px; color: var(--ink-3); }
.tile-quote { font-size: 14px; line-height: 20px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 20px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; max-width: 1280px; margin: 8px auto 0; padding: 0 24px; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 24px 0; border-top: 1px solid var(--line); min-width: 0; color: inherit; }
.stat-label { font-size: 14px; line-height: 18px; color: var(--ink-3); }
.stat-value { font: 600 40px/44px var(--font); letter-spacing: -0.035em; }
.stat-sub { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.stat:hover .stat-value { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

.section-first { margin-top: 56px; }

/* home: live now */
.live-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.live-card { display: flex; flex-direction: column; overflow: hidden; background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line); border-radius: var(--r-card); transition: border-color 0.2s; }
.live-card:hover { border-color: var(--line-strong); }
.thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line);
  background: radial-gradient(55% 75% at 50% 48%, color-mix(in srgb, var(--bot) 22%, transparent), transparent 72%), linear-gradient(180deg, #0e1326, #080b17);
}
.thumb::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px; -webkit-mask-image: radial-gradient(65% 75% at 50% 45%, #000, transparent); mask-image: radial-gradient(65% 75% at 50% 45%, #000, transparent);
}
.thumb-mind { position: absolute; inset: 0 0 18% 0; display: grid; place-items: center; }
.thumb-mind .mind-canvas, .thumb-mind .mind-svg { width: 44% !important; height: auto !important; aspect-ratio: 1; max-width: 168px; }
.thumb-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; gap: 6px; }
.thumb-top .chip { height: 20px; }
.thumb-top .thumb-status { margin-left: auto; }
.thumb-quote {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 18px 14px; font-size: 14px; line-height: 20px; color: #dde3f0;
  background: linear-gradient(0deg, rgba(7, 10, 20, 0.94) 30%, rgba(7, 10, 20, 0));
}
.thumb-quote span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.live-body { display: flex; flex-direction: column; padding: 18px 20px 20px; }
.live-id { display: flex; align-items: baseline; gap: 10px; }
.live-id h3 { font-size: 22px; line-height: 26px; }
.live-id span { font-size: 12px; color: var(--ink-3); }
.live-title { margin-top: 4px; font-size: 15px; line-height: 20px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.stats3 dt { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.stats3 dd { margin: 4px 0 0; font-size: 16px; line-height: 20px; font-weight: 500; white-space: nowrap; }

/* home: leaderboard + trading floor */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.split-col { display: flex; flex-direction: column; min-width: 0; }
.split-col > .panel { flex: 1; padding-top: 8px; padding-bottom: 8px; }
.panel-foot { display: block; margin-top: auto; padding: 14px 0 8px; border-top: 1px solid var(--line); }
.rank-list, .feed { list-style: none; margin: 0; padding: 0; }
.rank-list li + li, .feed li + li { border-top: 1px solid var(--line); }
.rank-row { display: grid; grid-template-columns: 24px 36px minmax(0, 1fr) auto; gap: 14px; align-items: center; height: 72px; padding: 0 8px; margin: 0 -8px; border-radius: var(--r-ctl); }
.rank-row:hover { background: rgba(255, 255, 255, 0.03); }
.rank-n { font: 400 15px var(--mono); color: var(--ink-3); }
.rank-list li:first-child .rank-n { color: var(--ink); }
.rank-ret { font-size: 17px; font-weight: 500; }
.feed li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; align-items: start; height: 72px; padding-top: 14px; }
.feed .avatar { margin-top: 2px; }
.feed-meta { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.feed-meta b { font-size: 16px; line-height: 22px; font-weight: 600; }
.feed-meta time { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.feed-text { font-size: 13px; line-height: 20px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-text .side { font-weight: 600; }
.feed-text .side.buy { color: var(--up); }
.feed-text .side.sell { color: var(--down); }

/* home: new bots */
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bot-tile {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 80px; padding: 14px 20px;
  background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line); border-radius: var(--r-card); transition: border-color 0.2s;
}
.bot-tile:hover { border-color: var(--line-strong); }
.bot-tile.is-paused { opacity: 0.6; }
.tile-ret { font-size: 16px; font-weight: 500; }
.tile-create { border-style: dashed; border-color: var(--line-strong); background: transparent; color: var(--ink-2); }
.tile-create:hover { color: var(--ink); background: rgba(255, 255, 255, 0.02); }
.tile-plus { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--ink); }
.tile-create .who b { color: var(--ink); }

/* ------------------------------------------------ leaderboard */
.lb-controls { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.lb-period { font-size: 13px; color: var(--ink-3); }
.segmented { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.segmented button { height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 15px; font-weight: 500; cursor: pointer; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; align-items: end; }
.podium-card {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 16px 24px;
  background: radial-gradient(90% 60% at 50% 0%, color-mix(in srgb, var(--bot) 14%, transparent), transparent 70%), rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line); border-radius: var(--r-card); transition: border-color 0.2s;
}
.podium-card:hover { border-color: var(--line-strong); }
.place-1 { order: 2; padding-top: 28px; border-color: rgba(255, 255, 255, 0.3); }
.place-2 { order: 1; }
.place-3 { order: 3; }
.place { position: absolute; top: 14px; left: 14px; }
.place-1 .place { background: var(--ink); color: var(--bg); border-color: transparent; font-weight: 600; }
.podium-mind .mind-canvas, .podium-mind .mind-svg { width: 104px !important; height: 104px !important; }
.podium-name { margin-top: 4px; font-size: 20px; line-height: 26px; font-weight: 600; }
.podium-sub { display: flex; gap: 6px; font-size: 12px; line-height: 18px; color: var(--ink-3); }
.podium-ret { margin-top: 12px; font-size: 30px; line-height: 34px; font-weight: 500; letter-spacing: -0.03em; }
.podium-pnl { font-size: 13px; color: var(--ink-2); }
.lb-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: rgba(255, 255, 255, 0.02); }
.lb { width: 100%; border-collapse: collapse; font-size: 15px; }
.lb th { text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 16px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.lb th button { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.lb th button:hover, .lb th[aria-sort] { color: var(--ink); }
.lb td { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.lb tbody tr { cursor: pointer; }
.lb tbody tr:last-child td { border-bottom: 0; }
.lb tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.c-rank { width: 64px; font: 400 15px var(--mono); color: var(--ink-3); }
.lb tbody tr:first-child .c-rank { color: var(--ink); }
.c-num { text-align: right !important; white-space: nowrap; }
.c-ret { font-weight: 500; font-size: 16px; }
.lb-bot { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lb th .ico { width: 14px; height: 14px; }
.lb th button[title] .ico:first-of-type { color: var(--ink-3); cursor: help; }
.lb .c-meta { display: none; }
.lb-note { margin-top: 12px; font-size: 13px; color: var(--ink-3); }

/* ------------------------------------------------ live page (Twitch-style) */
body[data-route="bot"] .foot { display: none; }
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; min-height: calc(100vh - var(--topbar-h)); }
.watch-main { min-width: 0; padding: 20px 24px 48px; }

.player {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-card); overflow: hidden; isolation: isolate;
  background: #080b17; container-type: inline-size; user-select: none;
}
.p-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(42% 70% at 86% 45%, color-mix(in srgb, var(--bot) 18%, transparent), transparent 72%), linear-gradient(180deg, #0c1122, #070a14); }
.p-stage { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 29%; gap: 1.2cqw; padding: 1.2cqw; }
.screen { position: relative; display: flex; flex-direction: column; min-height: 0; border-radius: 1.1cqw; overflow: hidden; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); }
.scr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: max(36px, 3.7cqw); padding: 0 max(12px, 1.3cqw); border-bottom: 1px solid var(--line); font-size: max(12px, 1.15cqw); white-space: nowrap; flex-shrink: 0; }
.scr-title { display: flex; align-items: center; gap: max(8px, 0.8cqw); min-width: 0; overflow: hidden; }
.scr-title b { font-size: 1.1em; font-weight: 600; }
.scr-title .chip { height: auto; padding: 0.25em 0.55em; font-size: 0.85em; }
.scr-mcap, .scr-chg { color: var(--ink-2); }
.scr-tf { color: var(--ink-3); font-size: 0.9em; }
.scr-chart { position: relative; flex: 1; min-height: 0; }
.cg { display: block; }
.cg-grid { stroke: rgba(150, 178, 255, 0.07); stroke-width: 1; shape-rendering: crispEdges; }
.cg-axis { fill: #667090; font: 400 11px var(--mono); }
.cg-tag { fill: #fff; font: 500 11px var(--mono); }
.cg-tag-dark { fill: #07090f; }
.cg-entry { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 5 4; shape-rendering: crispEdges; }
.scr-scan { list-style: none; margin: 0; padding: 0.4cqw 1.3cqw; flex: 1; display: grid; align-content: start; font-size: max(11px, 1.2cqw); }
.scr-scan li { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.6fr 0.9fr; gap: 1cqw; align-items: center; padding: 0.6cqw 0; border-bottom: 1px solid rgba(150, 178, 255, 0.06); }
.scan-spark { height: max(16px, 2.4cqw); display: block; }
.scan-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); animation: pulse 1.6s infinite; align-self: center; }
@keyframes pulse { 70% { box-shadow: 0 0 0 6px rgba(61, 220, 151, 0); } 0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.5); } }

.p-side { display: flex; flex-direction: column; gap: 1.2cqw; min-height: 0; }
.cam {
  position: relative; flex: 1; min-height: 0; border-radius: 1.1cqw; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(70% 70% at 50% 45%, color-mix(in srgb, var(--bot) 22%, transparent), transparent 75%), rgba(255, 255, 255, 0.025);
  border: 1px solid color-mix(in srgb, var(--bot) 35%, rgba(255, 255, 255, 0.08));
}
.cam-mind { margin-bottom: 6cqw; }
.cam-mind .mind-canvas, .cam-mind .mind-svg { width: min(25cqw, 92%) !important; height: auto !important; aspect-ratio: 1; }
.player.has-chat .cam-mind { margin-bottom: 4cqw; }
.player.has-chat .cam-mind .mind-canvas, .player.has-chat .cam-mind .mind-svg { width: min(17cqw, 78%) !important; }
.player:not(.is-tv) .cam-stats { display: none; }
.cam-plate { position: absolute; left: 1cqw; top: 1cqw; display: flex; align-items: baseline; gap: 0.6cqw; padding: 0.4cqw 0.8cqw; border-radius: 0.6cqw; background: rgba(5, 11, 31, 0.82); font-size: max(11px, 1.1cqw); }
.cam-plate b { font-weight: 600; }
.cam-plate span { color: var(--ink-2); }
.thinking-chip { position: absolute; top: 1cqw; right: 1cqw; display: inline-flex; align-items: center; gap: 3px; padding: 0.3cqw 0.8cqw; border-radius: 99px; background: rgba(5, 11, 31, 0.82); font-size: max(11px, 1cqw); color: var(--ink-2); }
.thinking-chip i { width: 4px; height: 4px; border-radius: 50%; background: var(--bot); animation: blink 1.2s infinite; }
.thinking-chip i:first-of-type { margin-left: 3px; }
.thinking-chip i:nth-child(2) { animation-delay: 0.2s; }
.thinking-chip i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.cam-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6cqw; margin: 0; padding: 1cqw 1.2cqw; border-radius: 1.1cqw; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); font-size: max(11px, 1.05cqw); }
.cam-stats dt { color: var(--ink-3); font-size: 0.9em; }
.cam-stats dd { margin: 0.2em 0 0; font-weight: 600; font-size: 1.15em; white-space: nowrap; }

.alerts { position: absolute; top: 6cqw; left: 1.2cqw; width: calc(71% - 2.4cqw); display: flex; flex-direction: column; align-items: center; gap: 0.6cqw; pointer-events: none; }
.alert {
  display: inline-flex; align-items: center; gap: 0.9cqw; padding: 0.7cqw 1.2cqw; border-radius: 0.8cqw; border: 1px solid;
  background: rgba(5, 11, 31, 0.97); box-shadow: 0 0.8cqw 2.4cqw rgba(0, 0, 0, 0.45); font-size: max(12px, 1.35cqw);
  animation: alert-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2); transition: opacity 0.5s, transform 0.5s;
}
.alert.buy { border-color: var(--up); }
.alert.sell { border-color: var(--down); }
.alert-kind { font-weight: 700; }
.alert.buy .alert-kind { color: var(--up); }
.alert.sell .alert-kind { color: var(--down); }
.alert.out { opacity: 0; transform: translateY(-0.8cqw); }
@keyframes alert-in { from { opacity: 0; transform: translateY(-1.5cqw) scale(0.96); } }

.subs { position: absolute; left: 1cqw; right: 1cqw; bottom: 1cqw; display: flex; flex-direction: column; align-items: center; text-align: center; pointer-events: none; transition: transform 0.2s; }
.subs .cap-kind { margin-bottom: 0.4cqw; padding: 0.2cqw 0.6cqw; border-radius: 5px; background: rgba(5, 11, 31, 0.9); color: var(--ink-2); font-size: max(10px, 1cqw); font-weight: 600; }
.subs .cap-text { padding: 0.5cqw 0.9cqw; border-radius: 0.6cqw; background: rgba(5, 11, 31, 0.9); color: #fff; font-size: max(13px, 1.35cqw); font-weight: 500; line-height: 1.4; -webkit-box-decoration-break: clone; box-decoration-break: clone; text-wrap: balance; }

.unmute {
  position: absolute; top: 1cqw; right: 1cqw; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.6cqw; padding: 0.5cqw 1cqw; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(7, 10, 20, 0.88); color: #fff; font: 600 max(12px, 1.1cqw) var(--font); cursor: pointer;
}
.cam:has(.unmute:not([hidden])) .thinking-chip { top: auto; bottom: 1cqw; left: 1cqw; right: auto; }
.cam:has(.cap-kind) .thinking-chip { display: none; }
.unmute:hover { background: rgba(5, 11, 31, 0.98); }
.unmute .ico { width: 1.2em; height: 1.2em; }
.controls {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 20px 12px 10px;
  background: linear-gradient(0deg, rgba(3, 7, 20, 0.85), transparent); opacity: 0; pointer-events: none; transition: opacity 0.2s; font-size: 13px;
}
.player:hover .controls, .player:focus-within .controls, .player.show-ctl .controls { opacity: 1; pointer-events: auto; }
.player:hover .subs, .player.show-ctl .subs { transform: translateY(-30px); }
.ctl { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; }
.ctl:hover { background: rgba(255, 255, 255, 0.12); }
.ctl .ico { width: 20px; height: 20px; }
.ctl-vol { width: 90px; height: auto; padding: 0; border: 0; background: none; accent-color: #fff; }
.ctl-live { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; }
.ctl-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.ctl-spacer { flex: 1; }
.player:fullscreen { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; border: 0; }
@media (hover: none) {
  .player:hover .subs { transform: none; }
  .player.show-ctl .subs { transform: translateY(-30px); }
  .player:focus-within:not(.show-ctl) .controls, .player:hover:not(.show-ctl) .controls { opacity: 0; pointer-events: none; }
  .ctl-vol { display: none; }
}

/* stream info row */
.s-info { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 20px 0 8px; }
.s-avatar { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bot); background: radial-gradient(circle, color-mix(in srgb, var(--bot) 18%, transparent), transparent 70%); }
.s-avatar .live-badge { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); }
.s-meta h1 { font-size: 24px; line-height: 32px; }
.s-title { font-size: 15px; line-height: 22px; color: var(--ink-2); }
.s-tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.s-sub { display: flex; gap: 6px; font-size: 13px; color: var(--ink-3); }
.s-meta h1 { display: flex; align-items: center; gap: 10px; }
.s-live-inline { display: none; }
.s-right { display: flex; align-items: center; gap: 16px; }
.s-live-stats { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--ink-3); white-space: nowrap; }
.s-viewers { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.s-viewers .ico { color: var(--ink-2); }
.tabs { display: none; }

/* panels under the player */
.s-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.card-trades { grid-column: 1 / -1; }
.wallet-big { margin-top: 12px; font-size: 28px; line-height: 32px; font-weight: 600; letter-spacing: -0.02em; }
.wallet-change { margin-top: 4px; font-size: 14px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.kv dt { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.kv dd { margin: 4px 0 0; font-size: 16px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wallet .link { display: inline-block; margin-top: 16px; }
.thinking-text { margin-top: 12px; color: var(--ink-2); font-size: 15px; line-height: 22px; }
.bags, .trades { list-style: none; padding: 0; margin: 12px 0 0; font-size: 14px; }
.bags li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 16px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.bags li:first-child, .trades li:first-child { border-top: 0; }
.bags a { font-weight: 600; }
.bags a:hover { color: var(--accent); }
.bags .muted, .trades .muted { color: var(--ink-3); }
.bags li.empty, .trades li.empty { display: block; padding: 4px 0; }
.trades li { display: grid; grid-template-columns: 64px minmax(0, 1fr) 96px 96px 72px; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.trades .side { font-weight: 600; }
.trades li.buy .side { color: var(--up); }
.trades li.sell .side { color: var(--down); }
.trades .sym { font-weight: 600; }
.trades .amt, .trades .res, .trades .when { text-align: right; }
.trades .when { color: var(--ink-3); font-size: 13px; }
a.when:hover { color: var(--accent); }

/* chat */
.s-chat { position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); display: flex; flex-direction: column; border-left: 1px solid var(--line); background: #080b17; }
.s-chat-head { display: flex; align-items: center; justify-content: space-between; height: 48px; flex-shrink: 0; padding: 0 16px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.s-chat-head .muted { font-weight: 500; font-size: 13px; }
.s-chat-list {
  list-style: none; margin: 0; padding: 16px 12px 8px; flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  font-size: 14px; line-height: 20px; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 20px); mask-image: linear-gradient(180deg, transparent 0, #000 20px);
}
.s-chat-list li { padding: 4px 8px; border-radius: 6px; overflow-wrap: anywhere; }
.s-chat-list li:hover { background: rgba(255, 255, 255, 0.03); }
.c-user { font-weight: 600; }
.c-user::after { content: ":"; color: var(--ink-3); font-weight: 400; margin-right: 6px; }
.c-text { color: var(--ink); }
.cl-bot { margin: 4px 0; padding: 6px 10px !important; border-left: 2px solid var(--bot); border-radius: 0 6px 6px 0 !important; background: var(--raised) !important; }
.cl-bot .avatar { display: inline-block; vertical-align: -3px; margin-right: 6px; }
.c-sys { color: var(--ink-3); font-size: 13px; }
.c-trade { margin: 4px 0; padding: 5px 10px !important; border-left: 2px solid; border-radius: 0 6px 6px 0 !important; background: rgba(255, 255, 255, 0.03); color: var(--ink-2); }
.c-trade.buy { border-color: var(--up); }
.c-trade.sell { border-color: var(--down); }
.c-trade .side { font-weight: 600; }
.c-trade.buy .side { color: var(--up); }
.c-trade.sell .side { color: var(--down); }
.c-welcome { margin-bottom: 8px; color: var(--ink-3); font-size: 13px; line-height: 18px; }
.s-chat-form { display: grid; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.s-chat-row { display: flex; gap: 8px; }
.s-chat-row input { height: 40px; }
.s-chat-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.s-chat-meta .link { font-size: 12px; }
.s-name-input { height: 32px !important; font-size: 13px !important; }

/* ------------------------------------------------ create */
.create-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.create-form { display: grid; gap: 0; }
.wallet-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: rgba(255, 255, 255, 0.02); font-size: 15px; color: var(--ink-2); }
.wallet-line b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.wallet-line .wallet-ok { display: flex; align-items: center; gap: 10px; }
.form-group { display: grid; gap: 20px; padding: 28px 0; border-top: 1px solid var(--line); }
.wallet-line + .form-group { border-top: 0; padding-top: 12px; }
legend { margin-bottom: 8px; }
.form-group > h2 { font-size: 18px; line-height: 24px; }
.phone-preview { display: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.swatch:has(input:checked) { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 6px; }
.style-list, .money { display: grid; gap: 8px; }
.limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.disclosure .hint { margin-top: 8px; }
.risk-note { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.submit-row { display: grid; gap: 8px; padding-top: 8px; }
.submit-row .btn { width: 100%; }
.create-side {
  position: sticky; top: calc(var(--topbar-h) + 24px); display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 24px;
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: radial-gradient(70% 55% at 50% 30%, color-mix(in srgb, var(--bot) 20%, transparent), transparent 70%), rgba(255, 255, 255, 0.02);
}
.create-preview .mind-canvas, .create-preview .mind-svg { width: 200px !important; height: 200px !important; }
.create-side h2 { margin-top: 8px; font-size: 24px; line-height: 32px; overflow-wrap: anywhere; }
.create-side .role-line { font-size: 14px; color: var(--ink-2); }
.create-url { margin-top: 12px; padding: 6px 10px; border-radius: var(--r-chip); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.create-side .hint { margin-top: 16px; }

/* ------------------------------------------------ my bots */
.mine .page-head { padding-bottom: 24px; }
.mine .page-head h1 { font-size: 40px; }
.mine-wallet { margin-top: 16px; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.mine-wallet b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.my-note { min-height: 0; margin-bottom: 16px; color: var(--ink-2); font-size: 14px; }
.my-note:empty { display: none; }
.my-list { display: grid; gap: 16px; }
.my-bot { display: grid; gap: 20px; padding: 20px; }
.my-bot.is-new { border-color: var(--line-strong); }
.my-head { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.my-mind .mind-canvas, .my-mind .mind-svg { width: 56px !important; height: 56px !important; }
.my-head h2 { font-size: 18px; line-height: 24px; }
.my-head h2 a:hover { color: var(--accent); }
.my-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.my-tags .role-text { font-size: 13px; color: var(--ink-3); }
.my-actions { display: flex; align-items: center; gap: 8px; }
.my-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.my-stats dt { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.my-stats dd { margin: 4px 0 0; font-size: 16px; line-height: 20px; font-weight: 600; white-space: nowrap; }
.deposit { display: grid; gap: 10px; padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); }
.deposit-title { font-size: 14px; font-weight: 600; }
.addr-field { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 6px 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--bg); }
.addr-field code { flex: 1; min-width: 0; font: 500 14px/1 var(--mono); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; }
.deposit .hint a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 180px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 14px; background: #121728; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
.menu-pop button { display: flex; width: 100%; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font-size: 14px; text-align: left; cursor: pointer; }
.menu-pop button:hover { background: rgba(255, 255, 255, 0.06); }
.menu-pop .danger { color: var(--down); }
.slot-card { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1px dashed var(--line-strong); border-radius: var(--r-card); color: var(--ink-2); }
.slot-card:hover { color: var(--ink); background: rgba(255, 255, 255, 0.02); }
.slot-card b { display: block; color: var(--ink); font-weight: 600; }
.slot-card small { font-size: 13px; color: var(--ink-3); }
.connect-card { display: grid; justify-items: start; gap: 14px; padding: 28px; border: 1px solid var(--line); border-radius: var(--r-card); background: rgba(255, 255, 255, 0.02); color: var(--ink-2); }

/* ------------------------------------------------ how it works */
.shot { margin: 0 0 16px; }
.shot img { width: 100%; height: auto; border-radius: var(--r-card); border: 1px solid var(--line); }
.shot figcaption { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { padding: 28px; border: 1px solid var(--line); border-radius: var(--r-card); background: rgba(255, 255, 255, 0.02); }
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.step-n { font: 400 13px var(--mono); color: var(--ink-3); }
.step-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--ink); }
.step-icon .ico { width: 20px; height: 20px; }
.step h2 { font-size: 22px; line-height: 28px; }
.step p { margin-top: 8px; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.rules { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 32px; padding: 32px; }
.rules h2 { font-size: 30px; line-height: 36px; }
.rules > div > p { margin-top: 12px; color: var(--ink-2); font-size: 15px; line-height: 22px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; font-size: 15px; line-height: 22px; color: var(--ink-2); text-wrap: pretty; }
.check { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.check .ico { width: 14px; height: 14px; }
.faq { margin-top: 64px; }
.faq > h2 { font-size: 30px; line-height: 36px; margin-bottom: 16px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; list-style: none; cursor: pointer; font-size: 19px; font-weight: 600; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary .ico { color: var(--ink-3); transition: transform 0.15s; }
.faq-item[open] > summary .ico { transform: rotate(180deg); }
.faq-item > p { max-width: 68ch; padding: 0 0 20px; color: var(--ink-2); font-size: 15px; line-height: 24px; }
.faq-item a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.about-end { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.about-end p { font-size: 13px; color: var(--ink-3); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------ footer, toast */
.foot { margin-top: 112px; border-top: 1px solid var(--line); }
.foot-inner { max-width: 1280px; margin: 0 auto; padding: 40px 24px 48px; display: grid; gap: 24px; color: var(--ink-3); font-size: 13px; line-height: 18px; }
.foot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.foot-tag { margin-top: 12px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.foot-links { display: flex; align-items: center; gap: 24px; }
.foot-links > a { color: var(--ink-2); font-size: 15px; }
.foot-links > a:hover { color: var(--ink); }
.foot-legal { max-width: 70ch; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 999px; font-size: 14px;
  background: #121728; border: 1px solid var(--line-strong); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); transition: opacity 0.2s, transform 0.2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.tabbar { display: none; }

/* ------------------------------------------------ Cogents TV (1280x720, scaled to fit) */
body.tv-mode { overflow: hidden; background: #000; }
body.tv-mode .topbar, body.tv-mode .foot, body.tv-mode .tabbar { display: none !important; }
.tv { position: fixed; width: 1280px; height: 720px; transform-origin: 0 0; overflow: hidden; display: grid; grid-template-rows: 60px 1fr 52px; background: #070a14; }
.tv-top { display: flex; align-items: center; gap: 14px; padding: 0 20px; background: #090d1a; border-bottom: 1px solid var(--line); }
.tv-top img { width: 26px; height: 26px; }
.tv-top > b { font-size: 16px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; }
.tv-now { margin-left: 20px; padding-left: 20px; border-left: 1px solid var(--line); display: flex; align-items: baseline; gap: 10px; font-size: 19px; color: var(--ink-2); }
.tv-now b { color: var(--ink); font-weight: 600; }
.tv-right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 17px; color: var(--ink-2); }
.tv-right b { color: var(--ink); font-weight: 600; }
.tv-right .demo-chip { height: 28px; font-size: 15px; padding: 0 10px; }
.player.is-tv .scr-head { height: 56px; font-size: 19px; padding: 0 18px; }
.player.is-tv .scr-tf { font-size: 16px; }
.player.is-tv .cam-plate { font-size: 17px; padding: 6px 10px; }
.player.is-tv .thinking-chip { font-size: 15px; padding: 5px 10px; }
.player.is-tv .cam-stats { font-size: 15px; padding: 12px 16px; }
.player.is-tv .cam-stats dd { font-size: 1.35em; }
.player.is-tv .subs .cap-text { font-size: 21px; padding: 8px 12px; border-radius: 8px; }
.player.is-tv .subs .cap-kind { font-size: 14px; }
.player.is-tv .alert { font-size: 22px; padding: 10px 18px; border-radius: 10px; gap: 12px; }
.player.is-tv .scr-title .chip { font-size: 15px; }
.tv-slot { min-height: 0; }
.tv .player.is-tv { height: 100%; aspect-ratio: auto; border-radius: 0; border: 0; }
.player.is-tv .alerts { top: 2.4cqw; }
.player.has-chat .p-side { gap: 0.9cqw; }
.player.has-chat .cam { flex: 0 0 52%; }
.cam-chat-box { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0.8cqw 1cqw; border-radius: 1.1cqw; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); }
.cam-chat-title { font-size: 15px; font-weight: 600; color: var(--ink-2); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.cam-chat {
  list-style: none; margin: 0; padding: 0.4cqw 0 0; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  font-size: 17px; line-height: 1.35;
}
.cam-chat li { padding: 0.2cqw 0; overflow-wrap: anywhere; flex-shrink: 0; }
.cam-chat .cl-bot, .cam-chat .c-trade { padding: 0.35cqw 0.6cqw !important; margin: 0.25cqw 0; }
.cam-chat .avatar { display: none !important; }
.tv-bottom { display: flex; align-items: center; gap: 18px; padding: 0 16px; background: #090d1a; border-top: 1px solid var(--line); overflow: hidden; }
.tv-lineup { display: flex; gap: 8px; flex-shrink: 0; }
.tv-chip { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 8px; border-radius: 99px; border: 1px solid var(--line); font-size: 15px; font-variant-numeric: tabular-nums; }
.tv-chip b { font-weight: 600; }
.tv-chip.is-live { border-color: var(--bot); box-shadow: inset 0 0 0 1px var(--bot); }
.tv-ticker { flex: 1; overflow: hidden; white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.tv-ticker-inner { display: inline-flex; gap: 32px; font-size: 16px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tick b { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------ medium screens */
@media (max-width: 1180px) {
  .topbar-create, .ca-chip { display: none; }
}
@media (max-width: 1100px) {
  .watch { grid-template-columns: minmax(0, 1fr) 300px; }
  .s-panels { grid-template-columns: 1fr; }
  .mainnav a { padding: 8px 9px; font-size: 15px; }
  .topbar-inner { gap: 20px; }
  .rules { grid-template-columns: 1fr; gap: 20px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
}

/* ------------------------------------------------ phones: menu moves to the bottom */
@media (max-width: 820px) {
  :root { --topbar-h: 60px; }
  .wrap, .topbar-inner { padding: 0 16px; }
  .mainnav, .topbar-right [data-link="twitch"], .topbar-right [data-link="x"] { display: none; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .wordmark { font-size: 14px; }
  #wallet-btn { height: 38px; padding: 0 14px; font-size: 14px; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 6px 2px calc(6px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; color: var(--ink-3); font-size: 10.5px; font-weight: 500; white-space: nowrap; }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .tabbar a[aria-current="page"] svg { stroke: var(--ink); }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }

  .section { margin-top: 56px; }
  .section-head h2 { font-size: 24px; line-height: 30px; }
  .page-head { padding: 32px 0 24px; }
  .page-head h1, .mine .page-head h1 { font-size: 40px; line-height: 1; }
  .lede { font-size: 17px; line-height: 25px; }
  .card { padding: 18px; }
  .panel { padding: 4px 16px; }

  .hero { margin: 0; height: auto; min-height: 0; border-radius: 0; }
  body[data-route="home"] .hero { margin-top: calc(-1 * var(--topbar-h)); }
  .hero-media, .hero-media img { position: relative; inset: auto; height: 400px; object-position: 50% 45%; }
  .hero-shade { height: 400px; background: linear-gradient(0deg, var(--bg) 0%, rgba(7, 10, 20, 0.6) 26%, rgba(7, 10, 20, 0) 50%), linear-gradient(180deg, rgba(7, 10, 20, 0.5) 0%, rgba(7, 10, 20, 0) 25%); }
  .hero-content { position: relative; inset: auto; display: grid; gap: 20px; padding: 0 16px 16px; margin-top: -64px; }
  .hero-text { max-width: none; }
  .hero h1 { font-size: 44px; line-height: 0.96; max-width: none; }
  .hero-sub { font-size: 16px; line-height: 24px; margin-top: 14px; }
  .hero-row { flex-direction: column; align-items: stretch; }
  .hero-row .btn { width: 100%; height: 50px; }
  .live-tile { width: 100%; padding: 12px 14px 14px; }
  .tile-body { height: 132px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 0 20px; margin: 8px auto 0; padding: 0 16px; }
  .stat { padding: 16px 0; }
  .stat-value { font-size: 32px; line-height: 36px; }
  .section-first { margin-top: 40px; }

  .live-grid, .split, .tile-grid { grid-template-columns: 1fr; }

  .podium { gap: 8px; margin-bottom: 16px; }
  .podium-card { padding: 36px 8px 16px; border-radius: 14px; }
  .place { top: 10px; left: 10px; }
  .podium-mind .mind-canvas, .podium-mind .mind-svg { width: 72px !important; height: 72px !important; }
  .lb-period { width: 100%; }
  .podium-name { font-size: 14px; line-height: 20px; }
  .podium-sub { display: none; }
  .podium-ret { margin-top: 6px; font-size: 18px; line-height: 24px; }
  .podium-pnl { font-size: 12px; }
  .lb thead { display: none; }
  .lb, .lb tbody { display: block; }
  .lb tbody tr { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .lb tbody tr:last-child { border-bottom: 0; }
  .lb td { padding: 0; border: 0; }
  .lb .c-rank { grid-row: 1 / span 2; width: auto; }
  .lb .c-bot { grid-column: 2; grid-row: 1; min-width: 0; }
  .lb .c-ret { grid-column: 3; grid-row: 1; font-size: 16px; }
  .lb .c-pnl, .lb .c-win, .lb .c-trades, .lb .c-wallet { display: none; }
  .lb .c-meta { grid-column: 2 / 4; grid-row: 2; display: flex; gap: 12px; padding-left: 44px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
  .lb-bot .who small .creator { display: none; }

  .watch { display: block; }
  .watch-main { padding: 0 0 12px; }
  .player { aspect-ratio: 16 / 10; border-radius: 0; border-left: 0; border-right: 0; }
  .p-stage { grid-template-columns: 1fr; padding: 8px; gap: 8px; }
  .screen { grid-area: 1 / 1; border-radius: 12px; padding-bottom: 46px; }
  .scr-head { height: 48px; padding-right: 64px; font-size: 13px; }
  .scr-tf, .scr-mcap { display: none; }
  .p-side { grid-area: 1 / 1; justify-self: end; align-self: start; margin: 4px 4px 0 0; z-index: 2; }
  .cam { position: static; flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: visible; }
  .cam-mind { margin: 0; }
  .cam-mind .mind-canvas, .cam-mind .mind-svg { width: 44px !important; }
  .cam-plate, .thinking-chip, .cam-stats { display: none; }
  .alerts { top: 64px; left: 16px; width: calc(100% - 32px); }
  .alert { padding: 6px 10px; gap: 8px; font-size: 12px; border-radius: 8px; }
  .subs { left: 16px; right: 16px; bottom: 16px; }
  .subs .cap-text { font-size: 13px; padding: 4px 8px; border-radius: 6px; }
  .subs .cap-kind { display: none; }
  .player.show-ctl .subs { transform: none; }
  .unmute { position: absolute; left: auto; right: 12px; top: 60px; font-size: 12px; padding: 6px 10px; }
  .alerts { top: auto; bottom: 64px; }
  .controls { padding: 16px 8px 6px; }
  .s-info { grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 16px 16px 8px; }
  .s-right { grid-column: 1 / -1; justify-content: space-between; }
  .s-live-stats { font-size: 13px; gap: 12px; }
  .s-avatar { display: none; }
  .s-live-inline { display: inline-flex; }
  .s-info { grid-template-columns: minmax(0, 1fr); }
  .s-meta h1 { font-size: 20px; line-height: 28px; }
  .s-title { font-size: 14px; line-height: 20px; }
  .tabs { display: inline-flex; gap: 2px; margin: 4px 16px 10px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); }
  .tabs button { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 14px; font-weight: 500; }
  .tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
  .s-panels { padding: 0 16px; margin-top: 0; }
  .watch[data-tab="chat"] .s-panels { display: none; }
  .watch[data-tab="stats"] .s-chat { display: none; }
  .s-chat { position: static; height: 64vh; margin: 0 16px; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
  .s-info { padding-bottom: 4px; }
  .s-title { display: none; }
  .s-tags { margin-top: 6px; }
  .tabbar a[data-route="how"] { display: none; }
  .tabbar { grid-template-columns: repeat(4, 1fr); }
  .tabbar a { font-size: 12px; }
  /* the message box stays on screen above the tab bar, like a phone stream app */
  .watch[data-tab="chat"] { padding-bottom: 96px; }
  .watch[data-tab="chat"] .s-chat-form { position: fixed; left: 0; right: 0; bottom: calc(63px + env(safe-area-inset-bottom)); z-index: 55; padding: 8px 16px 10px; background: var(--bg); border-top: 1px solid var(--line); }
  .s-chat-head { display: none; }
  .bags li { grid-template-columns: minmax(0, 1fr) auto auto; }
  .bags li .age { display: none; }
  .trades li { grid-template-columns: 52px minmax(0, 1fr) auto 64px; }
  .trades li .when { display: none; }

  .create-grid { grid-template-columns: 1fr; gap: 0; }
  .create-side { display: none; }
  .phone-preview { display: flex; align-items: center; gap: 12px; }
  .phone-preview .mind-canvas, .phone-preview .mind-svg { width: 56px !important; height: 56px !important; }
  .phone-preview b { display: block; font-size: 16px; }
  .phone-preview small { font-size: 13px; color: var(--ink-3); }
  .wallet-line { flex-direction: column; align-items: stretch; margin-bottom: 8px; }
  .form-group { padding: 24px 0; }
  .limits { grid-template-columns: 1fr; }
  .submit-row { padding-top: 8px; }

  .my-head { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; }
  .my-mind .mind-canvas, .my-mind .mind-svg { width: 48px !important; height: 48px !important; }
  .my-actions .btn-label { display: none; }
  .my-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }

  .rules { padding: 20px; }
  .faq { margin-top: 48px; }
  .about-end { flex-direction: column; align-items: stretch; }
  .cta-row .btn { flex: 1; }

  .foot { margin-top: 72px; }
  .foot-inner { padding: 32px 16px 36px; gap: 20px; }
  .foot-top { flex-direction: column; align-items: flex-start; }
  .foot-tag { font-size: 20px; }
  .foot-links { flex-wrap: wrap; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
