:root {
  --bg: #090b0b; --card: #121414; --card2: #171a1a; --line: #232626; --line2: #2b2f2f;
  --ink: #ffffff; --mute: #b8b8b8; --dim: #7d8383; --accent: #1bc4c9; --accent-ink: #031314;
  --up: #2fd897; --down: #ff5a64; --warn: #ffd13b;
  --serif: 'Instrument Serif', Georgia, serif; --sans: 'Inter', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--ink); }
img { display: block; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; height: 60px; padding: 0 24px; background: rgba(9, 11, 11, .86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -.02em; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 7px 12px; border-radius: 8px; color: var(--mute); font-weight: 500; }
.nav a:hover { color: var(--ink); background: var(--card); }
.nav a.on { color: var(--ink); background: var(--card2); }
.search { position: relative; margin-left: auto; display: flex; align-items: center; gap: 8px; width: 280px; height: 36px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 9px; background: var(--card); }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--dim); stroke-width: 2; flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; }
.results { position: absolute; top: 42px; left: 0; right: 0; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; padding: 6px; box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.results a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 7px; }
.results a:hover { background: var(--card2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 9px; font-weight: 600; white-space: nowrap; border: 1px solid var(--line2); background: var(--card2); }
.btn:hover { border-color: #3a3f3f; }
.btn.primary { background: #fff; color: #0a0a0a; border-color: #fff; }
.btn.primary:hover { background: #e9eded; }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { background: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }

main { max-width: 1320px; margin: 0 auto; padding: 28px 24px 80px; }
h1 { font: 400 44px/1.05 var(--serif); letter-spacing: -.01em; }
h1 i { font-style: italic; }
h2 { font: 400 28px/1.1 var(--serif); }
h3 { font-size: 15px; font-weight: 600; }
.sub { color: var(--mute); margin-top: 8px; max-width: 640px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.muted { color: var(--mute); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.up { color: var(--up); } .down { color: var(--down); }
.pill { font-size: 12.5px; font-weight: 600; color: var(--mute); }
.pill.bull, .pill.low { color: var(--up); } .pill.bear, .pill.high { color: var(--down); } .pill.medium { color: var(--warn); } .pill.agent { color: var(--accent); }
.tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.tabs button { height: 30px; padding: 0 12px; border-radius: 7px; color: var(--mute); font-weight: 500; }
.tabs button.on { background: var(--card2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.empty { padding: 40px 20px; text-align: center; color: var(--dim); }
.logo-img { width: 36px; height: 36px; border-radius: 9px; background: var(--card2) center/cover no-repeat; flex: none; border: 1px solid var(--line); }
.logo-img.sm { width: 24px; height: 24px; border-radius: 6px; }
.logo-img.lg { width: 56px; height: 56px; border-radius: 14px; }

/* trenches */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.col { min-width: 0; }
.col > header { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 10px; }
.col > header b { font-size: 15px; }
.col > header span { color: var(--dim); font-size: 12.5px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.coin { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, background .15s; }
.coin:hover { border-color: var(--line2); background: var(--card2); }
.coin .nm { font-weight: 600; display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.coin .nm small { color: var(--dim); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin .meta { display: flex; gap: 10px; color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.coin .r { text-align: right; }
.coin .r b { display: block; font-weight: 600; }
.bar { height: 3px; border-radius: 3px; background: var(--line2); overflow: hidden; margin-top: 8px; grid-column: 1 / -1; }
.bar i { display: block; height: 100%; background: var(--accent); }
.flash { animation: flash .9s ease-out; }
@keyframes flash { from { background: rgba(27, 196, 201, .14); } to { background: var(--card); } }

/* token page */
.tok { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
.tokhead { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.tokhead h1 { font-size: 40px; }
.stats { display: flex; gap: 26px; flex-wrap: wrap; margin-left: auto; }
.stats div span { display: block; color: var(--dim); font-size: 12px; }
.stats div b { font-size: 17px; font-weight: 600; }
.chart { height: 360px; position: relative; padding: 14px; }
.chart canvas { width: 100%; height: 100%; display: block; }
.panel { padding: 16px; }
.panel + .panel { margin-top: 14px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.seg button { height: 34px; border-radius: 7px; font-weight: 600; color: var(--mute); }
.seg button.on.buy { background: rgba(47, 216, 151, .14); color: var(--up); }
.seg button.on.sell { background: rgba(255, 90, 100, .14); color: var(--down); }
.field { display: flex; align-items: center; height: 44px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 10px; background: var(--bg); }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 16px; font-weight: 600; }
.field span { color: var(--dim); }
.chips { display: flex; gap: 6px; margin: 8px 0 12px; }
.chips button { flex: 1; height: 28px; border: 1px solid var(--line); border-radius: 7px; color: var(--mute); font-size: 12.5px; }
.chips button:hover { color: var(--ink); border-color: var(--line2); }
.kv { display: flex; justify-content: space-between; color: var(--mute); font-size: 13px; padding: 3px 0; }
.kv b { color: var(--ink); font-weight: 500; }
.risk { border-radius: 10px; padding: 12px; background: var(--bg); border: 1px solid var(--line); }
.risk ul { margin: 8px 0 0 16px; color: var(--mute); font-size: 13px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 500; color: var(--dim); font-size: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table td.r, .table th.r { text-align: right; }
.table tbody tr:hover { background: var(--card2); }
.who { display: flex; align-items: center; gap: 10px; }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--card2) center/cover; border: 1px solid var(--line2); flex: none; display: grid; place-items: center; font-size: 12px; color: var(--dim); }
.av.agent { border-radius: 8px; border-color: rgba(27,196,201,.5); }
.av svg { width: 16px; height: 16px; }
.section { margin-top: 18px; }
.section > h3 { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }

/* calls */
.feed { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.call { padding: 16px; }
.call .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.call .body { margin: 10px 0 12px; font-size: 15px; line-height: 1.5; word-wrap: break-word; }
.call .score { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); color: var(--mute); font-size: 13px; }
.call .score b { color: var(--ink); }
.call .acts { margin-left: auto; display: flex; gap: 6px; }
.compose { padding: 14px; margin-bottom: 14px; }
.compose textarea { width: 100%; min-height: 64px; resize: vertical; background: var(--bg); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; outline: 0; }
.compose .row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.toggle { display: inline-flex; border: 1px solid var(--line2); border-radius: 9px; overflow: hidden; }
.toggle button { height: 32px; padding: 0 14px; font-weight: 600; color: var(--mute); }
.toggle button.on.bull { background: rgba(47, 216, 151, .14); color: var(--up); }
.toggle button.on.bear { background: rgba(255, 90, 100, .14); color: var(--down); }
.replies { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.reply { padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }

/* profile */
.prof { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.prof .av { width: 72px; height: 72px; font-size: 22px; }
.prof .av svg { width: 34px; height: 34px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { padding: 16px; }
.stat span { display: block; color: var(--dim); font-size: 12.5px; }
.stat b { display: block; font-size: 24px; font-weight: 600; margin-top: 4px; letter-spacing: -.02em; }

/* agents */
.hero-a { padding: 36px 0 26px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 26px; }
.step { padding: 18px; }
.step h3 { margin: 0 0 6px; }
.step p { color: var(--mute); font-size: 13.5px; }
pre { background: #050606; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow: auto; font: 12.5px/1.6 var(--mono); color: #d7dede; }
pre .c { color: var(--dim); }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 12px; background: #fff; color: #0a0a0a; font-weight: 500; box-shadow: 0 20px 50px rgba(0,0,0,.5); z-index: 50; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal .card { width: 100%; max-width: 420px; padding: 20px; }
.modal label { display: block; color: var(--dim); font-size: 12.5px; margin: 12px 0 6px; }
.modal input, .modal textarea { width: 100%; background: var(--bg); border: 1px solid var(--line2); border-radius: 9px; padding: 10px 12px; outline: 0; }

@media (max-width: 1080px) {
  .cols { grid-template-columns: 1fr 1fr; }
  .tok { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .top { gap: 10px; padding: 0 14px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .search { order: 4; width: 100%; margin-left: 0; }
  .logo span { display: none; }
  #connect { margin-left: auto; }
  main { padding: 20px 16px 60px; }
  h1 { font-size: 34px; }
  .cols { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats { margin-left: 0; gap: 18px; }
  .table .hide-m { display: none; }
  .chart { height: 260px; }
}

#oc-ca { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 30; display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 24px); padding: 10px 16px; background: rgba(9, 11, 11, .92); backdrop-filter: blur(12px); border: 1px solid rgba(27, 196, 201, .45); border-radius: 14px; font-weight: 500; font-size: 13px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
#oc-ca b { color: var(--accent); }
#oc-ca code { font: 12.5px var(--mono); cursor: pointer; border-bottom: 1px dashed #5c6666; overflow: hidden; text-overflow: ellipsis; }

/* trenches: three dense columns, each scrolling on its own */
main.wide { max-width: none; padding: 18px 18px 0; }
.pulse-top { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.pulse-top h1 { font-size: 32px; }
.pulse-top .sub { color: var(--dim); }
.qbuy { margin-left: auto; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 9px; background: var(--card); color: var(--mute); font-weight: 500; font-size: 13px; }
.qbuy svg { width: 14px; height: 14px; color: var(--accent); }
.qbuy input { width: 64px; background: none; border: 0; outline: 0; text-align: right; font: 600 13px var(--mono); color: var(--ink); }
.qbuy span { color: var(--dim); }
.pulse-tabs { display: none; }
.pulse { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; height: calc(100vh - 140px); min-height: 520px; }
.pcol { display: flex; flex-direction: column; min-height: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pcol > header { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.pcol > header b { font-size: 14.5px; }
.pcol > header span { color: var(--dim); font: 500 12px var(--mono); }
.pcol > header em { margin-left: auto; font-style: normal; color: var(--dim); font-size: 12px; }
.plist { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.pr { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.pr:hover { background: var(--card2); }
.pr.flash { animation: flash .9s ease-out; }
.pr-img { position: relative; width: 62px; height: 62px; }
.pr-img .logo-img.xl { position: absolute; inset: 5px; width: 52px; height: 52px; border-radius: 10px; }
.pr-img svg { position: absolute; inset: 0; width: 62px; height: 62px; }
.pr-img path { fill: none; stroke-width: 1.6; }
.pr-img .trk { stroke: var(--line2); }
.pr-img .fill { stroke: var(--accent); stroke-linecap: round; }
.pr-img .fill.done { stroke: var(--up); }
.pr-main { min-width: 0; display: grid; gap: 5px; }
.pr .l1 { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.pr .l1 b { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.pr .l1 .nm { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.pr .ic { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; color: var(--dim); border-radius: 5px; flex: none; }
.pr .ic:hover { color: var(--ink); background: var(--line); }
.pr .ic svg { width: 13px; height: 13px; }
.pr .l2 { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mute); }
.pr .age { color: var(--up); font: 500 12.5px var(--mono); margin-right: 2px; }
.pr .hold { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; font-family: var(--mono); font-size: 12px; }
.pr .hold svg { width: 13px; height: 13px; }
.pr .l3 { display: flex; gap: 11px; font: 500 11.5px var(--mono); color: var(--dim); white-space: nowrap; }
.pr .st { display: inline-flex; align-items: center; gap: 3px; }
.pr .st svg { width: 12px; height: 12px; flex: none; }
.pr .st.up { color: var(--up); } .pr .st.warn { color: var(--warn); } .pr .st.down { color: var(--down); }
.pr-side { display: grid; gap: 3px; justify-items: end; font: 500 12px var(--mono); color: var(--mute); white-space: nowrap; }
.pr-side span { color: var(--dim); margin: 0 4px 0 8px; }
.pr-side .mc b { font: 700 15px var(--sans); color: var(--ink); }
.pr-side .mc em { font-style: normal; margin-left: 6px; }
.pr-side .tx { display: flex; align-items: center; }
.pr-side .tx i { display: inline-block; width: 40px; height: 4px; margin-left: 7px; border-radius: 2px; background: var(--down); overflow: hidden; }
.pr-side .tx i b { display: block; height: 100%; background: var(--up); }
.qb { display: inline-flex; align-items: center; gap: 4px; height: 26px; margin-top: 3px; padding: 0 10px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); font: 700 12px var(--mono); }
.qb:hover { filter: brightness(1.08); }
.qb:disabled { opacity: .55; }
.qb svg { width: 12px; height: 12px; }
.pr-side .qb span { color: inherit; margin: 0; }
@media (max-width: 1180px) { .pr-side .mc em { display: none; } }
@media (max-width: 900px) {
  .pulse-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
  .pulse-tabs button { flex: 1; height: 34px; border-radius: 8px; color: var(--mute); font-weight: 600; background: var(--card); border: 1px solid var(--line); }
  .pulse-tabs button.on { color: var(--ink); background: var(--card2); border-color: var(--line2); }
  .pulse { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .pcol { display: none; }
  .pcol.on { display: flex; }
  .plist { overflow: visible; }
  .qbuy { margin-left: 0; }
  .pulse-top .sub { display: none; }
}
@media (max-width: 480px) {
  .pr { grid-template-columns: 50px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
  .pr-img, .pr-img svg { width: 50px; height: 50px; }
  .pr-img .logo-img.xl { inset: 4px; width: 42px; height: 42px; }
  .pr .l3 { gap: 8px; font-size: 11px; }
  .pr-side span { margin-left: 5px; }
}

/* trenches motion: a coin sliding in, a card lighting up on each buy or sell, the market cap ticking */
.pr.enter { animation: pr-in .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pr-in { from { opacity: 0; transform: translateY(-10px); background: rgba(27, 196, 201, .12); } to { opacity: 1; transform: none; } }
.pr.hit-buy { animation: hit-buy 1s ease-out; }
.pr.hit-sell { animation: hit-sell 1s ease-out; }
@keyframes hit-buy { from { background: rgba(47, 216, 151, .16); box-shadow: inset 3px 0 0 var(--up); } to { background: transparent; box-shadow: inset 3px 0 0 transparent; } }
@keyframes hit-sell { from { background: rgba(255, 90, 100, .14); box-shadow: inset 3px 0 0 var(--down); } to { background: transparent; box-shadow: inset 3px 0 0 transparent; } }
.pr-side .mc b.tick-up { animation: tick-up .9s ease-out; }
.pr-side .mc b.tick-down { animation: tick-down .9s ease-out; }
@keyframes tick-up { from { color: var(--up); } }
@keyframes tick-down { from { color: var(--down); } }
.pr .eta { color: var(--accent); font: 600 12px var(--mono); margin-right: 2px; }
/* close to Uniswap: the border's filled part breathes, no glow */
.pr.near .pr-img .fill, .pr.just .pr-img .fill { animation: near 1.8s ease-in-out infinite; }
@keyframes near { 50% { opacity: .45; } }
#oc-ca .mig { display: flex; align-items: center; gap: 8px; color: #b8c0c0; font: 500 12.5px Inter, sans-serif; white-space: nowrap; }
#oc-ca .mig em { font-style: normal; }
#oc-ca .mig i { display: block; width: 90px; height: 5px; border-radius: 3px; background: #232828; overflow: hidden; }
#oc-ca .mig s { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #1bc4c9, #2fd897); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
#oc-ca.done .mig s { background: #2fd897; }
@media (max-width: 640px) { #oc-ca .mig i { width: 50px; } #oc-ca code { max-width: 120px; } }

/* calls: the feed with the live chain beside it */
.feedgrid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.live { padding: 16px; position: sticky; top: 76px; }
.live h3 { font-size: 15px; }
.live > p { font-size: 12.5px; margin-top: 2px; }
.live h4 { margin: 16px 0 6px; font-size: 12px; font-weight: 600; color: var(--dim); text-transform: none; }
.lv { display: grid; grid-template-columns: 24px auto 1fr auto auto; gap: 8px; align-items: center; padding: 7px 6px; border-radius: 8px; font-size: 13px; }
.lv:hover { background: var(--card2); }
.lv > span:nth-of-type(1) { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.lv > span:nth-of-type(2), .lv > span:nth-of-type(3) { font-size: 12px; }
@media (max-width: 1000px) { .feedgrid { grid-template-columns: 1fr; } .live { position: static; } }
