/* wallet-tracker public board. Dark graphite by default, light on request; one accent, buy/sell semantics.
   Type: Bricolage Grotesque (display) · Instrument Sans (body) · JetBrains Mono (numbers). */

:root {
  --bg: #0B0D12; --surface: #12151C; --surface-2: #171B24; --line: #222836; --line-2: #2E3646;
  --text: #E9ECF3; --muted: #9AA3B8; --dim: #6B7590;
  --accent: #8B9DFF; --accent-ink: #0B0D12; --accent-soft: rgba(139,157,255,.14);
  --buy: #34D399; --buy-soft: rgba(52,211,153,.13); --sell: #FB7185; --sell-soft: rgba(251,113,133,.13); --warn: #FBBF24;
  --shadow: 0 24px 60px rgba(0,0,0,.55);
  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 12px; --r-sm: 8px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F5F6FA; --surface: #FFFFFF; --surface-2: #F0F2F7; --line: #E3E6EE; --line-2: #CFD4E0;
  --text: #151A26; --muted: #5B6478; --dim: #8A93A8;
  --accent: #4F5FE0; --accent-ink: #FFFFFF; --accent-soft: rgba(79,95,224,.10);
  --buy: #0F9F6E; --buy-soft: rgba(15,159,110,.12); --sell: #DC3D5A; --sell-soft: rgba(220,61,90,.10); --warn: #B7791F;
  --shadow: 0 24px 60px rgba(20,25,40,.18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--body); min-height: 100dvh; display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ── header ── */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 0 clamp(16px, 4vw, 40px); height: 60px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.mark { width: 26px; height: 26px; }
.mark rect { fill: var(--surface-2); stroke: var(--line-2); }
.mark path { stroke: var(--buy); }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { padding: 6px 12px; border-radius: 999px; color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.nav a.on { color: var(--text); background: var(--surface-2); }
.live { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--buy); box-shadow: 0 0 0 0 var(--buy); animation: ping 2s ease-out infinite; }
.live.off i { background: var(--dim); animation: none; box-shadow: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--buy) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
button.icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; cursor: pointer; color: var(--muted); }
button.icon:hover { color: var(--text); border-color: var(--line-2); }
button.icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#theme .sun { display: none; }
:root[data-theme="light"] #theme .sun { display: block; }
:root[data-theme="light"] #theme .moon { display: none; }
.banner { padding: 8px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); color: var(--text); border-bottom: 1px solid var(--line); font-size: 13px; }

/* ── layout ── */
main { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 48px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 1fr); gap: 32px; align-items: end; padding: 36px 0 22px; }
.hero.slim { padding-bottom: 12px; }
h1 { margin: 0 0 8px; font-family: var(--display); font-weight: 700; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.lede { margin: 0; color: var(--muted); max-width: 52ch; font-size: 15px; }
.lede b { color: var(--text); font-weight: 600; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 18px; padding-top: 24px; } }

/* pulse: buys per bucket over the window (the one chart on the page) */
.pulse { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 10px; }
.pulse-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.pulse-head span:first-child { font-weight: 600; color: var(--text); }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 64px; }
.bars i { flex: 1; min-width: 2px; background: var(--buy); opacity: .85; border-radius: 3px 3px 0 0; transition: height .25s ease-out; cursor: default; }
.bars i.zero { background: var(--line-2); opacity: 1; height: 2px !important; }
.bars i:hover, .bars i.on { opacity: 1; background: var(--accent); }
.pulse-axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--dim); margin-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -.02em; margin-top: 2px; }
.stat .s { font-size: 12px; color: var(--dim); }

/* toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 0 14px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; color: var(--muted); cursor: pointer; font-weight: 500; font-size: 13px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.check { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.check:has(input:checked) { color: var(--text); border-color: var(--line-2); }
.check input { appearance: none; width: 16px; height: 16px; border: 1.5px solid var(--line-2); border-radius: 5px; margin: 0; display: grid; place-items: center; cursor: pointer; background: var(--bg); }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--accent-ink); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.search { display: flex; align-items: center; gap: 8px; margin-left: auto; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 220px; flex: 0 1 280px; }
.search:focus-within { border-color: var(--accent); }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--dim); stroke-width: 1.8; stroke-linecap: round; flex: 0 0 auto; }
.search input { border: 0; background: transparent; color: var(--text); padding: 8px 0; font: inherit; font-size: 14px; width: 100%; outline: none; }
.search input::placeholder { color: var(--dim); }
@media (max-width: 700px) { .search { margin-left: 0; flex-basis: 100%; } }

/* ── feed rows ── */
.feed { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.row { display: grid; grid-template-columns: 104px minmax(150px, 1.1fr) minmax(210px, 1.5fr) 86px 78px 82px 68px 56px 66px 132px;
  gap: 12px; align-items: center; padding: 10px 14px 10px 18px; border-top: 1px solid var(--line); position: relative; }
.row.head { border-top: 0; background: var(--surface-2); padding-top: 9px; padding-bottom: 9px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.row.head .c-num, .row.head .c-time { text-align: inherit; font-family: inherit; }
.row.head button { background: transparent; border: 0; padding: 0; cursor: pointer; text-align: left; text-transform: inherit; letter-spacing: inherit; font-weight: inherit; color: inherit; }
.row.head button.c-num { text-align: right; }
.row.head button:hover, .row.head button.sorted { color: var(--text); }
.row.head button.sorted::after { content: " ↓"; color: var(--accent); }
.row.head button.sorted.asc::after { content: " ↑"; }
.row.item { cursor: pointer; transition: background .15s; }
.row.item:hover { background: var(--surface-2); }
.row.item::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--buy); opacity: 0; }
.row.item.hot::before { opacity: 1; }
.row.item.warm::before { opacity: .4; }
.row.item.multi { background: color-mix(in srgb, var(--buy-soft) 45%, transparent); }
.row.item.fresh { animation: land .9s ease-out 1; }
@keyframes land { from { background: var(--accent-soft); } to { background: transparent; } }
.c-time { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.c-time b { font-weight: 500; display: block; }
.c-time span { color: var(--dim); font-size: 11.5px; display: block; overflow: hidden; text-overflow: ellipsis; }
.c-num { text-align: right; font-family: var(--mono); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-num .dim { color: var(--dim); }
.pos { color: var(--buy); } .neg { color: var(--sell); } .zero, .dim { color: var(--dim); }
.hot-vol { color: var(--buy); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg); font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip.serious { border-color: color-mix(in srgb, var(--warn) 50%, var(--line-2)); }
.chip.serious::before { content: "★"; color: var(--warn); font-size: 10px; }
.chip.sold { color: var(--dim); text-decoration: line-through; }
.chip.more { color: var(--muted); }
.c-coin { display: flex; align-items: center; gap: 10px; min-width: 0; }
.c-coin img, .c-coin .noimg { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); object-fit: cover; flex: 0 0 auto; }
.c-coin .noimg { display: grid; place-items: center; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.c-coin .names { min-width: 0; }
.c-coin .sym { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.c-coin .nm { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { font-size: 10.5px; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-weight: 500; letter-spacing: .02em; }
.tag.curve { color: var(--warn); }
.tag.chain { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); }   /* 2026-09-26: coin bought on another chain */
.nat { font-style: normal; color: var(--dim); margin-left: 5px; }   /* 2026-09-27: the cash side as paid, next to the dollars */
.c-links { display: flex; gap: 4px; justify-content: flex-end; }
.c-links a { font-size: 11.5px; font-weight: 600; padding: 4px 8px; border-radius: 7px; border: 1px solid var(--line); color: var(--muted); background: var(--bg); }
.c-links a:hover { text-decoration: none; color: var(--text); border-color: var(--line-2); }
.empty { text-align: center; padding: 56px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); margin-top: 12px; }
.empty p { margin: 4px 0; }
.empty b { color: var(--text); }
.foot-note { color: var(--dim); font-size: 12.5px; margin: 12px 4px; }

@media (max-width: 980px) {
  .row.head { display: none; }
  .row { grid-template-columns: 1fr 1fr 1fr; grid-template-areas: "coin coin time" "who who who" "mcap liq vol" "chg age buyers" "links links links"; gap: 8px 12px; padding: 12px 14px 12px 18px; }
  .c-coin { grid-area: coin; } .c-time { grid-area: time; text-align: right; } .c-who { grid-area: who; } .c-links { grid-area: links; justify-content: flex-start; }
  .c-num { text-align: left; }
  .c-num[data-l]::before { content: attr(data-l); display: block; font-family: var(--body); font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
  .c-num.n-mcap { grid-area: mcap; } .c-num.n-liq { grid-area: liq; } .c-num.n-vol { grid-area: vol; } .c-num.n-chg { grid-area: chg; } .c-num.n-age { grid-area: age; } .c-num.n-buyers { grid-area: buyers; }
}

/* ── traders ── */
.traders { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.tcard .th { display: flex; align-items: center; gap: 8px; }
.tcard .nm { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.tcard .wn { color: var(--dim); font-size: 12.5px; }
.badge { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.badge.serious, .badge.both { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--surface-2)); }
.tcard .tm { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.tcard .tm b { color: var(--text); font-weight: 500; }
.tcard .style { color: var(--muted); font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.tcard .style.open { display: block; }
.tcard .tf { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--dim); }
.tcard .tf a { margin-left: auto; font-size: 12px; }
.copy { cursor: copy; }
.copy.copied { color: var(--buy); }
.quiet { opacity: .6; }
.tcard { cursor: pointer; }
.tcard:hover { border-color: var(--line-2); }
.tcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* entry mcap ("bought in at"): feed Mcap cell + the coin panel tx list (2026-10-14) */
.entry { color: var(--dim); font-family: var(--mono); font-size: 11px; font-style: normal; }
.n-mcap .entry { display: block; margin-top: 1px; }
.tx .amt .entry { margin-left: 4px; }

/* trader panel: what a wallet is holding (2026-10-14) */
.panel-title .tavatar { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 13px; text-transform: uppercase; font-weight: 600; flex: none; }
.tmeta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); align-items: center; }
.tmeta b { color: var(--text); font-weight: 500; }
.tmeta a { margin-left: auto; }
.desc.small { font-size: 12px; margin: -6px 0 10px; }
.holdings { display: flex; flex-direction: column; gap: 8px; }
.holding { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.holding:hover { border-color: var(--line-2); }
.holding:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.holding img, .holding .noimg { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; flex: none; font-size: 10px; }
.holding .hn { flex: 1 1 120px; min-width: 0; }
.holding .hn .sym { font-weight: 600; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.holding .hn .nm { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holding .hnum { font-family: var(--mono); text-align: right; min-width: 54px; }
.holding .hnum .k { display: block; font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; font-family: var(--body); }
.holding .hnum b { font-size: 13px; font-weight: 500; }

/* ── panel (coin details) ── */
.scrim { position: fixed; inset: 0; background: rgba(6,8,12,.55); z-index: 30; }
.panel { position: fixed; top: 0; right: 0; height: 100dvh; width: min(520px, 100vw); background: var(--surface); border-left: 1px solid var(--line); z-index: 31; overflow-y: auto; box-shadow: var(--shadow); animation: slide .22s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.panel-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 1; }
.panel-title { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 20px; min-width: 0; }
.panel-title img, .panel-title .noimg { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); object-fit: cover; }
.panel-title .sub { display: block; font-family: var(--body); font-weight: 400; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-body { padding: 16px 18px 40px; display: flex; flex-direction: column; gap: 18px; }
.addr { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); word-break: break-all; }
.links { display: flex; flex-wrap: wrap; gap: 6px; }
.links a { font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.links a:hover { text-decoration: none; border-color: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; }
.tile .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tile .v { font-family: var(--mono); font-size: 14px; margin-top: 2px; }
h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.chart { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 8px 4px; }
.chart svg { display: block; width: 100%; height: 96px; overflow: visible; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: url(#fade); }
.chart .xh { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.chart .lbl { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--muted); padding: 4px 2px 0; }
.chart .lbl b { color: var(--text); font-weight: 500; }
.txs { display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow: auto; }
.tx { display: grid; grid-template-columns: 74px 44px 1fr auto 20px; gap: 8px; align-items: baseline; font-size: 13px; padding: 5px 8px; border-left: 2px solid var(--line); border-radius: 0 6px 6px 0; }
.tx.buy { border-left-color: var(--buy); background: color-mix(in srgb, var(--buy-soft) 40%, transparent); }
.tx.sell { border-left-color: var(--sell); background: color-mix(in srgb, var(--sell-soft) 40%, transparent); }
.tx .t { color: var(--dim); font-family: var(--mono); font-size: 11.5px; }
.tx .k { font-family: var(--mono); font-size: 11px; text-transform: uppercase; font-weight: 600; }
.tx.buy .k { color: var(--buy); } .tx.sell .k { color: var(--sell); }
.tx .who b { font-weight: 600; } .tx .who span { color: var(--dim); font-size: 12px; }
.tx .amt { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.tx a { color: var(--dim); } .tx a:hover { color: var(--accent); }
.desc { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.tip { position: fixed; z-index: 40; pointer-events: none; background: var(--text); color: var(--bg); font-family: var(--mono); font-size: 12px; padding: 5px 8px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }

/* ── footer ── */
.bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 18px clamp(16px, 4vw, 40px); border-top: 1px solid var(--line); color: var(--dim); font-size: 12.5px; }

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