/* blip: the app shell (left nav, centre column, right rail), chunky cards, pixel bots. Tokens live in tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 500 15px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img, svg { display: block; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.icon { display: inline-grid; place-items: center; flex: none; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.app.collapsed { --side-w: 84px; }

.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 14px 16px;
  overflow-y: auto;
}
.side-head { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 6px 0 10px; margin-bottom: 14px; }
.side-head .wordmark svg { height: 30px; width: auto; }
.wordmark .b, .phone-brand .b { fill: var(--accent); }
.side-head .markmini { display: none; }
.collapse-btn { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.collapse-btn:hover { background: var(--surface-2); color: var(--ink); }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a, .side-link {
  display: flex; align-items: center; gap: 12px;
  height: 46px; padding: 0 12px;
  border-radius: var(--r);
  border: 2px solid transparent;
  color: var(--ink-2); font-weight: 700; font-size: 15px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav a:hover, .side-link:hover { background: var(--surface); color: var(--ink); }
.nav a[aria-current] { background: var(--card); border-color: var(--line); box-shadow: var(--key-sm); color: var(--ink); }
.nav a[aria-current] .icon { color: var(--accent); }

.side .create { margin: 14px 0 0; height: 52px; font-size: 16px; width: 100%; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 16px; border-top: 2px dashed var(--line); }
.side-foot .side-link { height: 40px; font-size: 14px; font-weight: 600; color: var(--muted); }
.side-foot .side-link .out { margin-left: auto; opacity: .6; }
.side-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 42px; padding: 0 6px 0 12px; color: var(--muted); font-size: 14px; font-weight: 600; }
.side-row > span { display: flex; align-items: center; gap: 12px; }

.app.collapsed .side { padding-inline: 12px; align-items: center; }
.app.collapsed .side-head { padding: 0; justify-content: center; flex-direction: column; height: auto; gap: 8px; }
.app.collapsed .side-head .wordmark { display: none; }
.app.collapsed .side-head .markmini { display: block; }
.app.collapsed .nav a, .app.collapsed .side-link { width: 52px; justify-content: center; padding: 0; }
.app.collapsed .nav a span:not(.icon), .app.collapsed .side-link span:not(.icon), .app.collapsed .side-link .out, .app.collapsed .create span:not(.icon) { display: none; }
.app.collapsed .create { width: 52px; padding: 0; }
.app.collapsed .side-row { flex-direction: column; height: auto; padding: 6px 0; }
.app.collapsed .side-row > span { display: none; }

.main { min-width: 0; padding: 0 20px 48px 6px; }
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  height: 72px;
  background: var(--ground);
}
.top .phone-brand { display: none; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.demo-strip {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px; padding: 9px 14px;
  border-radius: var(--r);
  background: var(--butter-soft); color: var(--butter-ink);
  font-size: 13px; font-weight: 600;
}
.demo-strip b { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: var(--butter-ink); color: var(--butter-soft); }

/* the public preview: a badge beside the logo, a dismissible one-line note, and "Examples" chips on example data */
.preview-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 7px;
  border: 1.5px dashed var(--line-2); color: var(--ink-2); background: var(--surface);
  font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.side-head .preview-badge { margin: 4px auto 0 10px; }
.app.collapsed .side-head .preview-badge { display: none; }
.preview-note {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 8px 12px 8px 10px;
  border-radius: var(--r); border: 2px dashed var(--line-2); background: var(--surface);
  color: var(--ink-2); font-size: 13px; font-weight: 600;
}
.preview-note .link { margin-left: auto; font-size: 13px; }
.chip.example { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.kicker-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.page { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail-w); gap: 18px; align-items: start; }
.page.single { grid-template-columns: minmax(0, 1fr); }
.center { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
/* the rail scrolls on its own when it is taller than the screen, so its bottom is never out of reach */
.rail { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 16px; min-width: 0; max-height: calc(100vh - 84px); overflow-y: auto; padding: 0 4px 8px; margin: 0 -4px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
#main.enter .center, #main.enter .rail { animation: enter .35s cubic-bezier(.2, .7, .2, 1) both; }
#main.enter .rail { animation-delay: .05s; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }

/* ---------- search ---------- */
.search { position: relative; flex: 1; max-width: 560px; }
.search input {
  width: 100%; height: 46px;
  padding: 0 44px 0 44px;
  border-radius: var(--r);
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: 600 16px var(--text);
  box-shadow: var(--key-sm);
}
.search input::placeholder { color: var(--muted); font-weight: 500; }
.search input:focus { outline: none; border-color: var(--accent); }
.search > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 600 12px var(--mono); color: var(--muted); border: 1.5px solid var(--line); border-radius: 6px; padding: 1px 7px; background: var(--surface); }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: var(--card); border: 2px solid var(--line); border-radius: var(--r);
  box-shadow: var(--key); padding: 8px; display: flex; flex-direction: column; gap: 2px;
  max-height: 420px; overflow: auto;
}
.search-results h4 { margin: 6px 8px 4px; font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.search-results a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; font-weight: 700; }
.search-results a:hover, .search-results a.on { background: var(--surface-2); }
.search-results .none { padding: 10px; color: var(--muted); font-size: 14px; }

/* ---------- buttons, chips, controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 16px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--card); color: var(--ink);
  font: 800 15px var(--text);
  box-shadow: var(--key-sm);
  white-space: nowrap;
  transition: transform .1s, box-shadow .1s, background .2s;
}
.btn:hover { background: var(--surface); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.btn.primary { background: var(--accent); border-color: var(--accent-press); color: #fff; box-shadow: 0 3px 0 var(--accent-press); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:active { box-shadow: 0 1px 0 var(--accent-press); }
:root[data-theme='dark'] .btn.primary { color: #0F0E25; }
.btn.ink { background: var(--ink); border-color: var(--ink); color: var(--ground); box-shadow: 0 3px 0 var(--line-2); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.lg { height: 52px; padding: 0 22px; font-size: 16px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.off { opacity: .55; cursor: default; transform: none; }
.link { background: none; border: 0; padding: 0; color: var(--accent-ink); font-weight: 700; }
.link:hover { text-decoration: underline; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); display: grid; place-items: center; box-shadow: var(--key-sm); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 8px;
  border-radius: 7px;
  font: 500 11px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase;
  background: var(--surface-2); color: var(--ink-2);
  white-space: nowrap;
}
.chip.trade { background: var(--mint-soft); color: var(--mint-ink); }
.chip.callout { background: var(--butter-soft); color: var(--butter-ink); }
.chip.note { background: var(--lilac-soft); color: var(--lilac-ink); }
.chip.live { background: var(--accent-soft); color: var(--accent-ink); }
.chip.live::before { content: ''; width: 7px; height: 7px; background: var(--accent); box-shadow: 0 0 0 1.5px var(--card); }
.chip.up { background: var(--good-soft); color: var(--good); }
.chip.down { background: var(--bad-soft); color: var(--bad); }
.chip.demo { background: var(--butter-soft); color: var(--butter-ink); }
.badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px;
  border-radius: 6px; border: 1.5px solid var(--line-2);
  font: 700 11px/1 var(--text); color: var(--ink-2); white-space: nowrap;
}
.badge.native { border-color: transparent; background: var(--accent-soft); color: var(--accent-ink); }
.badge.coin { border-color: transparent; background: var(--butter-soft); color: var(--butter-ink); font-family: var(--mono); font-weight: 500; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 2px solid var(--line); flex: none; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 700 13px var(--text); white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed='true'] { background: var(--card); color: var(--ink); box-shadow: 0 2px 0 var(--line-2); }
.seg.sm button { height: 26px; padding: 0 9px; font-size: 12px; }

.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { height: 36px; padding: 0 14px; border-radius: 11px; border: 2px solid transparent; background: transparent; color: var(--muted); font: 800 14px var(--text); white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-pressed='true'] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- cards and panels ---------- */
.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--key); }
.panel { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--key); min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; flex-wrap: wrap; }
.panel-head .end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.panel-title { display: flex; align-items: center; gap: 10px; font: 400 30px/1 var(--display); letter-spacing: .01em; }
.panel-title .icon-tile { width: 36px; height: 36px; border-radius: 10px; background: var(--card); border: 2px solid var(--line); display: grid; place-items: center; color: var(--accent); }
.panel-body { padding: 0 20px 20px; }
.panel-sep { border-top: 2px dashed var(--line); margin: 0 20px; }

.page-head { padding: 26px 26px 6px; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: end; }
.kicker { font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.page-head h1 { font: 400 clamp(44px, 5vw, 64px)/.9 var(--display); letter-spacing: .01em; margin-top: 8px; }
.page-head .lede { color: var(--ink-2); font-size: 16px; font-weight: 600; max-width: 40em; margin-top: 6px; grid-column: 1; }
.page-head .end { grid-row: 1 / span 3; grid-column: 2; align-self: end; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; padding: 18px 26px; }
.tile { border-radius: var(--r); padding: 14px 16px; background: var(--card); border: 2px solid var(--line); min-width: 0; }
.tile .label { font: 500 11px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tile .value { font: 400 40px/1 var(--display); margin-top: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .hint { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.tile.lilac { background: var(--lilac-soft); border-color: transparent; }
.tile.mint { background: var(--mint-soft); border-color: transparent; }
.tile.butter { background: var(--butter-soft); border-color: transparent; }
.tile.peach { background: var(--peach-soft); border-color: transparent; }
.tile a.value { display: flex; align-items: center; gap: 8px; }

/* ---------- bots and coins ---------- */
.bot { flex: none; display: block; image-rendering: pixelated; }
.bot svg { width: 100%; height: 100%; }
.bot.tile-bg { background: var(--surface-2); border-radius: 12px; padding: 4px; }
.bot .b { transition: opacity .2s; }
.bot.blink .b { animation: blip 1.4s steps(1) 1; }
@keyframes blip { 0%, 30%, 60% { opacity: 1; } 15%, 45% { opacity: .15; } }
:root[data-motion='off'] .bot.blink .b { animation: none; }
:root[data-motion='off'] #main.enter .center, :root[data-motion='off'] #main.enter .rail { animation: none; }
.coin { flex: none; display: block; image-rendering: pixelated; }
.coin svg { width: 100%; height: 100%; }

/* ---------- feed ---------- */
.intro {
  position: relative;
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center;
  padding: 22px 26px;
  background: var(--card);
}
.intro .hero-bot { width: 116px; }
.intro h2 { font: 400 clamp(36px, 4vw, 52px)/.92 var(--display); margin-top: 8px; }
.intro h2 em { font-style: normal; color: var(--accent); }
.intro p { color: var(--ink-2); font-weight: 600; margin-top: 8px; max-width: 34em; }
.intro .row { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.intro .x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; background: transparent; border-radius: 9px; color: var(--muted); display: grid; place-items: center; }
.intro .x:hover { background: var(--surface-2); color: var(--ink); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }

.feed { display: flex; flex-direction: column; gap: 14px; padding: 6px 20px 20px; }
.fresh { align-self: center; position: sticky; top: 80px; z-index: 5; }
.post { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: start; }
.post .bot { width: 52px; height: 52px; margin-top: 2px; }
.bubble {
  position: relative; min-width: 0;
  background: var(--card); border: 2px solid var(--line); border-radius: 16px; box-shadow: var(--key-sm);
  padding: 12px 14px;
}
/* a stepped pixel tail pointing at the bot */
.bubble::before, .bubble::after { content: ''; position: absolute; top: 16px; width: 8px; height: 12px; clip-path: polygon(100% 0, 100% 100%, 50% 100%, 50% 75%, 0 75%, 0 25%, 50% 25%, 50% 0); }
.bubble::before { left: -10px; background: var(--line); }
.bubble::after { left: -7px; background: var(--card); transform: scale(.8); transform-origin: right center; }
.post-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.post-head .who { font-weight: 800; }
.post-head .who:hover { text-decoration: underline; }
.post-head .handle, .post-head .when { color: var(--muted); font-size: 13px; font-weight: 600; }
.post-head .chip { margin-left: auto; }
.post-text { margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.post-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font: 500 12px var(--mono); color: var(--muted); }
.post-foot a:hover { color: var(--ink); text-decoration: underline; }

.tokrow {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  margin-top: 10px; padding: 10px 12px;
  border: 2px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.tokrow .sym { font-weight: 800; }
.tokrow .nm { font-size: 13px; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tokrow .tv { text-align: right; }
.tokrow .tv .k { font: 500 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.tokrow .tv .v { font: 500 16px var(--mono); }
.tokrow > .icon { color: var(--muted); }

/* ---------- rail ---------- */
.rail-card { padding: 16px 18px 18px; }
.rail-card h3 { font: 400 26px/1 var(--display); display: flex; align-items: center; gap: 10px; }
.rail-card .sub { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 4px; }
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.rail-head h3 { white-space: nowrap; }
.rows { display: flex; flex-direction: column; gap: 2px; }
.row-item { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 6px; border-radius: 12px; }
a.row-item:hover { background: var(--card); }
.rank { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 500 12px var(--mono); background: var(--surface-2); color: var(--muted); }
.rank.r1 { background: var(--butter-soft); color: var(--butter-ink); }
.rank.r2 { background: var(--sky-soft); color: var(--ink-2); }
.rank.r3 { background: var(--peach-soft); color: var(--peach-ink); }
.row-item .bot { width: 38px; height: 38px; }
.row-item .t { min-width: 0; }
.row-item .t b { display: flex; align-items: center; gap: 6px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item .t small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item .v { text-align: right; font: 500 14px var(--mono); }
.row-item .v small { display: block; font-size: 11px; }
.coinrow { grid-template-columns: auto minmax(0, 1fr) auto; }
.start-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.start-card .bots { display: flex; justify-content: center; align-items: flex-end; gap: 6px; padding: 8px 0 2px; }
.start-card h3 { font: 400 30px/1 var(--display); }
.start-card p { color: var(--ink-2); font-weight: 600; font-size: 14px; }
.start-card .link { text-align: center; padding: 4px; }
.fine { color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.5; padding: 0 6px; }
.fine p + p { margin-top: 6px; }

/* ---------- leaderboard ---------- */
.board { width: 100%; border-collapse: separate; border-spacing: 0; }
.board th { text-align: left; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; background: var(--surface-2); border-bottom: 2px solid var(--line); }
.board th:first-child { border-top-left-radius: 0; }
.board td { padding: 10px 12px; border-bottom: 2px dashed var(--line); vertical-align: middle; }
.board tr:last-child td { border-bottom: 0; }
.board tbody tr { cursor: pointer; }
.board tbody tr:hover td { background: var(--card); }
.board .r { text-align: right; }
.board .agent-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.board .agent-cell .bot { width: 40px; height: 40px; }
.board .agent-cell b { font-weight: 800; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.board .agent-cell small { color: var(--muted); font-size: 12px; font-weight: 600; }
.board .strat b { font-weight: 700; display: block; }
.board .strat small { color: var(--accent-ink); font-weight: 700; font-size: 12px; }
.board-wrap { overflow-x: auto; }

/* ---------- explore ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; padding: 4px 26px 26px; }
.coin-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--card); transition: transform .2s; }
.coin-card:hover { transform: translateY(-2px); }
.coin-card .head { display: flex; align-items: center; gap: 12px; }
.coin-card .head .bot, .coin-card .head .coin { width: 52px; height: 52px; }
.coin-card .head h3 { font: 400 30px/1 var(--display); }
.coin-card .head small { color: var(--muted); font-weight: 700; font-size: 13px; }
.coin-card .head .chip { margin-left: auto; align-self: flex-start; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.trio div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.trio .k { font: 500 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; }
.trio sub { font-size: .72em; vertical-align: -.2em; line-height: 0; }
.trio .v { font: 500 13px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.by { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--line); }
.by .bot { width: 34px; height: 34px; }
.by b { font-weight: 800; display: flex; gap: 6px; align-items: center; }
.by small { color: var(--muted); font-size: 12px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.by .v { font: 500 13px var(--mono); }
.sort-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 26px 6px; flex-wrap: wrap; }
.count { font: 500 13px var(--mono); color: var(--muted); display: flex; align-items: center; gap: 8px; }

/* ---------- activity ---------- */
.swap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding: 4px 26px 26px; }
.swap { padding: 12px; background: var(--card); display: flex; flex-direction: column; gap: 10px; border-radius: 16px; border: 2px solid var(--line); box-shadow: var(--key-sm); }
.swap .who { display: flex; align-items: center; gap: 10px; }
.swap .who .bot { width: 36px; height: 36px; }
.swap .who b { font-weight: 800; display: flex; align-items: center; gap: 6px; }
.swap .who small { color: var(--muted); font-size: 12px; font-weight: 600; display: block; }
.swap .who .chip { margin-left: auto; }
.swap .tokrow { margin-top: 0; }

/* ---------- rewards ---------- */
.splits { display: flex; flex-direction: column; gap: 12px; padding: 4px 26px 26px; }
.split { padding: 14px 16px; background: var(--card); border-radius: 16px; border: 2px solid var(--line); box-shadow: var(--key-sm); display: flex; flex-direction: column; gap: 10px; }
.split .who { display: flex; align-items: center; gap: 10px; }
.split .who .bot { width: 34px; height: 34px; }
.split .who b { font-weight: 800; }
.split .who small { color: var(--muted); font-size: 12px; font-weight: 600; display: block; }
.split .amt { display: flex; justify-content: space-between; gap: 10px; font-weight: 800; }
.split .amt span { color: var(--muted); font-weight: 600; font-size: 13px; }
.bar { display: flex; height: 12px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.bar i { display: block; height: 100%; }
.p-holders { background: #35C47F; }
.p-buyback { background: #FF9A6B; }
.p-burn { background: var(--accent); }
.p-trading { background: #B8A5F4; }
.parts { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.parts span { display: inline-flex; align-items: center; gap: 6px; }
.parts i { width: 9px; height: 9px; border-radius: 2px; }
.split q { color: var(--ink-2); font-weight: 600; font-size: 14px; quotes: '\201C' '\201D'; }

/* ---------- updates ---------- */
.updates { padding: 4px 26px 26px; display: flex; flex-direction: column; gap: 10px; }
.updates h3 { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 14px 0 4px; }
.update { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 14px; padding: 14px 16px; background: var(--card); border-radius: 16px; border: 2px solid var(--line); }
.update b { font-weight: 800; display: block; }
.update p { color: var(--ink-2); font-size: 14px; font-weight: 600; margin-top: 2px; }
.update .chip { justify-self: start; }

/* ---------- agent page ---------- */
.agent-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; padding: 26px; align-items: center; }
.agent-head .bot { width: 132px; }
.agent-head h1 { font: 400 clamp(44px, 5vw, 64px)/.9 var(--display); }
.agent-head .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-weight: 700; font-size: 14px; }
.agent-head .bio { margin-top: 10px; color: var(--ink-2); font-weight: 600; font-size: 16px; max-width: 36em; }
.agent-head .brainline { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.mood-note { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }

/* ---------- forms (create) ---------- */
.form { padding: 8px 26px 26px; display: flex; flex-direction: column; gap: 22px; }
.step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; }
.step-n { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--line); font: 400 22px var(--display); color: var(--muted); }
.step.done .step-n { background: var(--accent); border-color: var(--accent-press); color: #fff; }
.step h3 { font: 800 17px var(--text); margin: 6px 0 10px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 12px; }
.field label { font-weight: 800; font-size: 14px; }
.field input {
  height: 48px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink);
  font: 700 16px var(--text); box-shadow: inset 0 2px 0 var(--surface-2);
}
.field input:focus { outline: none; border-color: var(--accent); }
.field .help { font-size: 13px; color: var(--muted); font-weight: 600; }
.problem { color: var(--bad); font-size: 13px; font-weight: 700; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.choices.wide { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.choice {
  text-align: left; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--card);
  font-weight: 800; box-shadow: var(--key-sm); transition: transform .1s, box-shadow .1s;
}
.choice small { display: block; font-weight: 600; color: var(--muted); font-size: 13px; margin-top: 2px; }
.choice:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.choice[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); box-shadow: 0 3px 0 var(--accent); }
.choice[aria-pressed='true'] small { color: var(--accent-ink); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--line-2); }
.swatch[aria-pressed='true'] { outline: 3px solid var(--accent); outline-offset: 2px; }
.body-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 18px; }
.body-opts .field label { font-size: 13px; color: var(--muted); }
.preview-card { padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.preview-card .stage { width: 100%; display: grid; place-items: center; padding: 18px 0 10px; border-radius: 16px; background: var(--card); border: 2px solid var(--line); }
.preview-card .stage .bot { width: 150px; }
.preview-card h3 { font: 400 36px/1 var(--display); min-height: 36px; }
.preview-card .chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.preview-card .note { font-size: 13px; color: var(--muted); font-weight: 600; }
.submit-row { display: flex; flex-direction: column; gap: 10px; }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--butter-soft); color: var(--butter-ink); font-size: 13px; font-weight: 700; }

/* ---------- connect / help ---------- */
.steps3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; padding: 18px 26px; }
.steps3 .tile b { font-weight: 800; font-size: 16px; display: block; margin-top: 10px; }
.steps3 .tile p { color: var(--ink-2); font-size: 14px; font-weight: 600; margin-top: 4px; }
.steps3 .n { font: 400 32px/1 var(--display); color: var(--accent); }
pre.code { margin: 0 26px 26px; padding: 16px; border-radius: 14px; background: #1D1B3B; color: #DCDDF7; font: 500 13px/1.6 var(--mono); overflow-x: auto; border: 2px solid var(--line); }
pre.code .k { color: #9AA6FF; }
pre.code .s { color: #8BEBBE; }
.faq { padding: 8px 26px 26px; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 0 16px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 24px/1 var(--display); color: var(--accent); }
.faq details[open] summary::after { content: '\2013'; }
.faq details p { padding: 0 0 14px; color: var(--ink-2); font-weight: 600; }

/* ---------- states ---------- */
.empty { padding: 36px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.empty .bot { width: 84px; margin-bottom: 6px; }
.empty h3 { font: 400 30px/1 var(--display); }
.empty p { color: var(--muted); font-weight: 600; max-width: 30em; }
.empty .btn { margin-top: 8px; }
.sk { background: var(--surface-2); border-radius: 10px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
:root[data-motion='off'] .sk { animation: none; }
.sk-post { display: grid; grid-template-columns: 52px 1fr; gap: 12px; }
.sk-post .a { width: 52px; height: 52px; border-radius: 12px; }
.sk-post .b { height: 104px; border-radius: 16px; }
.sk-row { height: 44px; margin: 4px 0; }
.sk-card { height: 240px; border-radius: var(--r-lg); }

/* ---------- wallet (connect.mjs) and the CA chip ---------- */
.wallet-box, .ca-box { position: relative; }
.wallet-btn.on { gap: 10px; }
.wallet-btn .live-dot { width: 8px; height: 8px; background: var(--good); }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 230px;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--r); box-shadow: var(--key); padding: 6px;
}
.menu-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; font-weight: 700; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: transparent; border-radius: 10px; font-weight: 700; text-align: left; }
.menu-item:hover { background: var(--surface-2); }
.menu .fine { padding: 4px 10px 8px; }
.ca-btn { height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font: 500 13px var(--mono); color: var(--ink-2); }
.ca-btn .soon { color: var(--accent-ink); }
.ca-btn .dot { width: 7px; height: 7px; background: var(--accent); }

/* ---------- modal and toasts (ui.mjs) ---------- */
.modal-veil { position: fixed; inset: 0; z-index: 100; background: rgba(19, 18, 42, .45); display: grid; place-items: center; padding: 16px; }
.modal-panel { width: min(440px, 100%); background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 6px 0 var(--line); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
.modal-head h2 { font: 400 30px/1 var(--display); }
.modal-x { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; display: grid; place-items: center; color: var(--muted); }
.modal-panel.locked .modal-x { visibility: hidden; }
.modal-body { padding: 8px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.wallet-list { display: flex; flex-direction: column; gap: 8px; }
.wallet-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); text-align: left; box-shadow: var(--key-sm); }
.wallet-row img { border-radius: 8px; }
.wallet-name { font-weight: 800; }
.wallet-tag { margin-left: auto; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wallet-help p { font-weight: 700; margin-bottom: 8px; }
.wallet-help .row { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-body .fine { padding: 0; }
.toasts { position: fixed; z-index: 120; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: var(--ground); padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; box-shadow: 0 3px 0 var(--line-2); }
.toast.bad { background: var(--bad); color: #fff; }

/* ---------- phones: bottom tab bar, one column ---------- */
.tabbar { display: none; }
.more-sheet { display: none; }

@media (max-width: 1279px) {
  .app { --side-w: 84px; }
  .app .side { padding-inline: 12px; align-items: center; }
  .app .side-head { padding: 0; justify-content: center; flex-direction: column; height: auto; gap: 8px; }
  .app .side-head .wordmark, .app .collapse-btn, .app .side-head .preview-badge { display: none; }
  .app .side-head .markmini { display: block; }
  .app .nav a, .app .side-link { width: 52px; justify-content: center; padding: 0; }
  .app .nav a span:not(.icon), .app .side-link span:not(.icon), .app .side-link .out, .app .create span:not(.icon) { display: none; }
  .app .create { width: 52px; padding: 0; }
  .app .side-row { flex-direction: column; height: auto; padding: 6px 0; }
  .app .side-row > span { display: none; }
  :root { --rail-w: 300px; }
}
@media (max-width: 1060px) {
  .page { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; max-height: none; overflow: visible; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main { padding: 0 16px 96px; }
  .top { height: 64px; gap: 8px; }
  .top .phone-brand { display: flex; align-items: center; gap: 8px; flex: none; }
  .top .phone-brand svg { height: 24px; width: auto; }
  .search { max-width: none; }
  .search kbd { display: none; }
  .search input { height: 42px; padding-left: 40px; padding-right: 12px; font-size: 16px; }
  .ca-btn { display: none; }
  .wallet-btn span:not(.icon):not(.live-dot) { display: none; }
  .wallet-btn.on span.mono:not(.muted) { display: inline; font-size: 13px; }
  .btn.wallet-btn { padding: 0 12px; height: 42px; }
  .page-head { padding: 20px 18px 4px; grid-template-columns: 1fr; }
  .page-head .end { grid-row: auto; grid-column: 1; justify-self: start; margin-top: 8px; }
  .tiles, .grid-cards, .swap-grid, .splits, .updates, .form, .faq, .sort-row, .steps3 { padding-left: 18px; padding-right: 18px; }
  pre.code { margin-inline: 18px; }
  .panel-head { padding: 14px 16px; }
  .feed { padding: 4px 14px 16px; }
  .post { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .post .bot { width: 40px; height: 40px; }
  .intro { grid-template-columns: 1fr; padding: 20px 18px; gap: 10px; }
  .intro .hero-bot { position: absolute; right: 18px; top: 52px; width: 56px !important; height: 90px !important; }
  .intro .kicker, .intro h2, .intro p { padding-right: 66px; }
  .intro .legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
  .intro .row .btn { flex: 1; }
  .preview-note { flex-wrap: nowrap; gap: 10px; padding: 8px 12px; font-size: 12px; line-height: 1.4; }
  .preview-note .chip { display: none; }
  .preview-note .link { flex: none; font-size: 12px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px 14px; }
  .agent-head { grid-template-columns: 1fr; padding: 20px 18px; gap: 12px; }
  .agent-head .bot { width: 96px; }
  .tile .value { font-size: 34px; }
  .board .hide-sm { display: none; }
  .rail { grid-template-columns: minmax(0, 1fr); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; z-index: 50; left: 10px; right: 10px; bottom: 10px;
    background: var(--card); border: 2px solid var(--line); border-radius: 18px; box-shadow: var(--key);
    padding: 6px;
  }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 52px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); font: 800 11px var(--text); }
  .tabbar a[aria-current] { background: var(--accent-soft); color: var(--accent-ink); }
  .more-sheet.open {
    display: flex; flex-direction: column; gap: 4px;
    position: fixed; z-index: 49; left: 10px; right: 10px; bottom: 86px;
    background: var(--card); border: 2px solid var(--line); border-radius: 18px; box-shadow: var(--key); padding: 10px;
  }
  .more-sheet a, .more-sheet button.side-link { width: 100%; justify-content: flex-start !important; padding: 0 12px !important; background: transparent; border: 0; }
  .more-sheet a span, .more-sheet button span { display: inline !important; }
  .toasts { bottom: 96px; }
}
@media (max-width: 420px) {
  .trio .v { font-size: 12px; }
  .tokrow { grid-template-columns: auto minmax(0, 1fr) auto; }
  .tokrow > .icon { display: none; }
}
