/* ─── Flint — the Stryke market terminal ──────────────────────────────────────
 *
 * A trading screener is read at a glance, in a hurry, usually while something
 * is moving. So the design rules here are:
 *
 *   * DENSITY OVER AIR. A row is 40px. More rows on screen beats more padding.
 *   * NUMBERS ALIGN. Every figure is tabular-nums and right-aligned, so
 *     magnitudes line up vertically and a 10x jump is visible without reading.
 *   * COLOUR MEANS ONE THING. Green is up, red is down. Nothing else in the
 *     palette is allowed to be green or red, so those two never compete for
 *     attention with a button or a link.
 *   * NO LAYOUT SHIFT. Column widths are fixed and skeletons occupy the exact
 *     final geometry, because a table that reflows when data lands is unusable
 *     on a live feed.
 *
 * There is no inline style anywhere in this app: the Content-Security-Policy is
 * style-src 'self' with no 'unsafe-inline'. Dynamic values go through CSS
 * custom properties set via CSSOM, which CSP permits.
 */

:root {
    color-scheme: dark;

    --bg: #0a0b0e;
    --bg-raised: #101217;
    --bg-hover: #171a21;
    --bg-input: #0d0f13;
    --border: #1e222b;
    --border-strong: #2a2f3a;

    --text: #e8eaed;
    --text-dim: #9aa3b2;
    --text-faint: #626b7b;

    --up: #16c784;
    --up-bg: rgba(22, 199, 132, 0.10);
    --down: #ea3943;
    --down-bg: rgba(234, 57, 67, 0.10);

    --accent: #ff7a29;          /* flint spark */
    --accent-dim: rgba(255, 122, 41, 0.14);
    --warn: #f5a623;

    --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;

    --row-h: 40px;
    --radius: 6px;
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #ffffff;
    --bg-raised: #f7f8fa;
    --bg-hover: #eef0f4;
    --bg-input: #ffffff;
    --border: #e3e6ec;
    --border-strong: #cdd2dc;
    --text: #12141a;
    --text-dim: #5b6472;
    --text-faint: #8b95a5;
    --up: #0f9d63;
    --up-bg: rgba(15, 157, 99, 0.10);
    --down: #d32029;
    --down-bg: rgba(211, 32, 41, 0.10);
    --accent: #e2620c;
    --accent-dim: rgba(226, 98, 12, 0.12);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; color: inherit; }

/* Numbers everywhere in this app are tabular so columns align optically. */
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ─── app frame ─────────────────────────────────────────────────────────── */

#app { min-height: 100vh; display: flex; flex-direction: column; }

header.top {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 14px;
    height: 52px;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -0.02em; font-size: 15px; }
.brand .spark { width: 18px; height: 18px; flex: none; }
.brand small { color: var(--text-faint); font-weight: 500; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }

nav.tabs { display: flex; gap: 2px; }
nav.tabs a {
    padding: 6px 11px;
    border-radius: var(--radius);
    color: var(--text-dim);
    font-weight: 500;
    white-space: nowrap;
}
nav.tabs a:hover { background: var(--bg-hover); color: var(--text); }
nav.tabs a.on { background: var(--accent-dim); color: var(--accent); }

.grow { flex: 1 1 auto; }

/* ─── search ────────────────────────────────────────────────────────────── */

.search { position: relative; width: 300px; max-width: 40vw; }
.search input {
    width: 100%;
    height: 32px;
    padding: 0 10px 0 30px;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 12.5px;
    outline: none;
}
.search input:focus { border-color: var(--accent); }
.search .icon { position: absolute; left: 9px; top: 8px; width: 15px; height: 15px; color: var(--text-faint); pointer-events: none; }
.search kbd {
    position: absolute; right: 8px; top: 8px;
    font-family: var(--mono); font-size: 10px; color: var(--text-faint);
    border: 1px solid var(--border-strong); border-radius: 3px; padding: 1px 4px;
    pointer-events: none;
}
.search input:focus ~ kbd { display: none; }

.results {
    position: absolute; top: 38px; left: 0; right: 0;
    background: var(--bg-raised);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
    max-height: 420px; overflow-y: auto;
    z-index: 50;
}
.results .r {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; cursor: pointer; border-bottom: 1px solid var(--border);
}
.results .r:last-child { border-bottom: 0; }
.results .r:hover, .results .r.sel { background: var(--bg-hover); }
.results .r .sym { font-weight: 600; }
.results .r .nm { color: var(--text-faint); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results .empty { padding: 14px; color: var(--text-faint); text-align: center; }

/* ─── filter bar ────────────────────────────────────────────────────────── */

.filters {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 9px 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky; top: var(--header-h, 52px); z-index: 30;
}

.chip {
    display: inline-flex; align-items: center; gap: 5px;
    height: 28px; padding: 0 10px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-dim);
    cursor: pointer;
    white-space: nowrap;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.on { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }

.sep { width: 1px; height: 20px; background: var(--border); }

/* The timeframe group reads as one control, not four loose chips. */
.chip.tf { padding: 0 9px; min-width: 38px; justify-content: center; font-variant-numeric: tabular-nums; }

select.ctl, input.ctl {
    height: 28px;
    padding: 0 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    outline: none;
}
select.ctl:focus, input.ctl:focus { border-color: var(--accent); }
input.ctl { width: 96px; font-family: var(--mono); }
label.ctl-l { color: var(--text-faint); font-size: 11px; }

/* ─── table ─────────────────────────────────────────────────────────────── */

/* ─── WHY THIS WRAPPER HAS NO overflow ──────────────────────────────────────
 *
 * It had `overflow-x: auto`, and that silently broke the sticky header. Any
 * element with a non-visible overflow becomes the SCROLL CONTAINER for its
 * sticky descendants — so `position: sticky; top: 89px` on the header stopped
 * meaning "89px below the viewport top" and started meaning "89px below the top
 * of this wrapper", which parked the header row on top of rows two and three at
 * rest. `overflow-x: auto` cannot be paired with `overflow-y: visible` either:
 * the spec computes the second to `auto`, so there is no way to keep horizontal
 * scrolling here AND a viewport-sticky header.
 *
 * The table keeps its min-width, so on a narrow screen the PAGE scrolls
 * horizontally instead of the wrapper. Same result for the reader, and the
 * header pins where it should.
 */
.table-wrap { flex: 1; }

table.pairs { width: 100%; border-collapse: collapse; min-width: 1180px; }

table.pairs thead th {
    /* --sticky-top is measured from the real header + filter heights by app.js
     * and set on :root, because both bars wrap at narrow widths and any
     * hard-coded number here is wrong at some viewport. */
    position: sticky; top: var(--sticky-top, 89px); z-index: 20;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 7px 10px;
    text-align: right;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}
table.pairs thead th:hover { color: var(--text); }
table.pairs thead th.l { text-align: left; }
table.pairs thead th.sorted { color: var(--accent); }
table.pairs thead th .arrow { font-size: 9px; }

table.pairs tbody tr {
    height: var(--row-h);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
table.pairs tbody tr:hover { background: var(--bg-hover); }
table.pairs td { padding: 0 10px; text-align: right; white-space: nowrap; }
table.pairs td.l { text-align: left; }

.rank { color: var(--text-faint); font-size: 11px; width: 42px; }

/* The watchlist star. A ghost until hovered or set, so a hundred of them do not
 * compete with the numbers for attention. */
td.star, th.star { width: 30px; padding-right: 0; }
.star-btn {
    background: none; border: 0; cursor: pointer; padding: 2px 4px;
    color: var(--text-faint); opacity: .35; font-size: 14px; line-height: 1;
}
tr:hover .star-btn { opacity: .8; }
.star-btn.on { color: var(--accent); opacity: 1; }
.star-btn:hover { color: var(--accent); opacity: 1; }
.star-btn:focus-visible { outline: 1px solid var(--accent); border-radius: 3px; }

.pair-cell { display: flex; align-items: center; gap: 9px; min-width: 210px; }
.logo {
    width: 26px; height: 26px; border-radius: 50%; flex: none;
    background: var(--bg-hover);
    display: grid; place-items: center;
    font-size: 10px; font-weight: 700; color: var(--text-dim);
    overflow: hidden;
}
/* The picture sits ON TOP of the monogram, so a slow host shows the fallback
   until the image decodes and a dead one keeps showing it. */
.logo { position: relative; }
.logo img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
    background: var(--bg-panel);
}
.logo.has-img { color: transparent; }
.pair-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pair-name .a { font-weight: 600; }
.pair-name .a i { color: var(--text-faint); font-style: normal; font-weight: 500; }
.pair-name .b {
    display: flex; align-items: center; gap: 5px;
    color: var(--text-faint); font-size: 11px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pair-name .b .pill.stale { font-size: 9.5px; padding: 1px 5px; flex: 0 0 auto; }
/* The venue is the only part of this line that may give way — the chain tag and
   the staleness pill both carry meaning that cannot be abbreviated. */
.pair-name .b .venue { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--text-faint); }

/* A change cell with no data must not read as 0.00%. */
.na { color: var(--text-faint); opacity: .55; }

.chain-tag {
    display: inline-block; padding: 1px 5px; border-radius: 3px;
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    background: var(--bg-hover); color: var(--text-dim);
}

/* Marks a row whose volume comes from a pool with no measured depth. It is
 * shown, because hiding data is its own kind of lie — but it is never allowed
 * to look like a verified number. */
.untrusted { color: var(--warn); cursor: help; }

.skel { display: inline-block; height: 10px; border-radius: 3px; background: var(--bg-hover); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .45; } 50% { opacity: .85; } }

.empty-state { padding: 60px 20px; text-align: center; color: var(--text-faint); }
.empty-state h3 { color: var(--text-dim); margin: 0 0 6px; font-size: 14px; }

/* ─── pair detail ───────────────────────────────────────────────────────── */

.detail { padding: 14px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
@media (max-width: 1080px) { .detail { grid-template-columns: minmax(0, 1fr); } }

.card { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 8px; }
.card h4 {
    margin: 0; padding: 9px 12px; border-bottom: 1px solid var(--border);
    font-size: 11px; font-weight: 600; color: var(--text-faint);
    text-transform: uppercase; letter-spacing: 0.05em;
}
.card .body { padding: 12px; }

.headline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px; }
.headline .price { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.headline .sym { font-size: 17px; font-weight: 700; }
.headline .badge {
    padding: 3px 8px; border-radius: 5px; font-weight: 600;
    font-family: var(--mono); font-size: 12px;
}
.headline .badge.u { background: var(--up-bg); color: var(--up); }
.headline .badge.d { background: var(--down-bg); color: var(--down); }

.tf-row { display: flex; gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; }
/* min-width: 0 is load-bearing. A flex item defaults to min-width: auto and so
 * refuses to shrink below its own content — which made this row overflow the
 * card and clip "$39.53M" and "4.9K TX" at the right edge rather than dividing
 * the available width between four cells. */
.tf-row div { flex: 1 1 0; min-width: 0; background: var(--bg-raised); padding: 7px 4px; text-align: center; }
.tf-row div .k { font-size: 9.5px; color: var(--text-faint); text-transform: uppercase; white-space: nowrap; }
.tf-row div .v { font-family: var(--mono); font-weight: 600; margin-top: 2px; font-size: 12px; }
.tf-row div .k.num { font-family: var(--mono); font-size: 10px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; align-items: baseline; }
.kv dt { color: var(--text-faint); font-size: 11.5px; }
.kv dd { margin: 0; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.addr { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 11px; color: var(--text-dim); cursor: pointer; }
.addr:hover { color: var(--accent); }

.pill { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 10.5px; font-weight: 600; }
.pill.good { background: var(--up-bg); color: var(--up); }
.pill.bad { background: var(--down-bg); color: var(--down); }
.pill.unknown { background: var(--bg-hover); color: var(--text-faint); }

/* buy/sell pressure bar — width arrives as a custom property from JS, because
 * CSP forbids an inline style attribute. */
.bar { height: 6px; border-radius: 3px; background: var(--down); overflow: hidden; margin-top: 6px; }
.bar > span { display: block; height: 100%; background: var(--up); width: var(--buy-pct, 50%); }

canvas.chart { display: block; width: 100%; height: 340px; }

.tape { max-height: 460px; overflow-y: auto; }
.tape table { width: 100%; border-collapse: collapse; }
.tape th {
    position: sticky; top: 0; background: var(--bg-raised);
    padding: 6px 10px; text-align: right; font-size: 10px;
    color: var(--text-faint); text-transform: uppercase; border-bottom: 1px solid var(--border);
}
.tape th.l, .tape td.l { text-align: left; }
.tape td { padding: 5px 10px; text-align: right; font-family: var(--mono); font-size: 11.5px; border-bottom: 1px solid var(--border); }
.tape tr.new { animation: flash 1.1s ease-out; }
@keyframes flash { from { background: var(--accent-dim); } to { background: transparent; } }

/* ─── footer / provenance ───────────────────────────────────────────────── */

footer.prov {
    padding: 10px 14px; border-top: 1px solid var(--border);
    color: var(--text-faint); font-size: 11px;
    display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
}
footer.prov b { color: var(--text-dim); font-weight: 600; }

.live { display: inline-flex; align-items: center; gap: 5px; }
.live .led { width: 6px; height: 6px; border-radius: 50%; background: var(--up); animation: blink 2s ease-in-out infinite; }
/* The stream is down and EventSource is reconnecting. The panel must not keep
 * claiming to be live while it is not. */
.live .led.down { background: var(--text-faint); animation: none; }
.card h4 .live { float: right; font-weight: 500; text-transform: none; letter-spacing: 0; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.toast {
    position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
    background: var(--bg-raised); border: 1px solid var(--border-strong);
    border-radius: var(--radius); padding: 9px 14px; z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
    /* Copy confirmations are two words; connect messages are a sentence. Both
       have to be readable, and neither may run off a phone. */
    max-width: min(520px, calc(100vw - 32px));
    text-align: center; line-height: 1.45;
}

/* The connected wallet sits in the header beside the theme toggle. It is a
   chip like the others, and `on` is what says a wallet is attached. */
#connect { font-variant-numeric: tabular-nums; }
#connect.on { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

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

/* Marks a dollar figure this API computed rather than read off the tape. The
 * EVM followers write no USD price at all (measured: 0% on eth and base), so
 * every value in those tapes is derived from token prices at read time — real,
 * but an estimate over a price that moves, and it says so. */
.derived { border-bottom: 1px dotted var(--text-faint); cursor: help; }

/* ─── narrow screens ────────────────────────────────────────────────────────
 *
 * A 1,180px table on a 420px phone is horizontal scrolling, which is not a
 * design — it is a compromise the reader pays for. So columns are dropped in
 * priority order instead, and the table's min-width goes with them.
 *
 * What survives to the smallest breakpoint is the irreducible question a
 * screener answers: WHICH pair, at WHAT price, moving WHICH way, on HOW MUCH
 * volume. Rank, the intermediate timeframes, transactions, FDV and age all go
 * — they are comparisons, and there is no room to compare on a phone.
 *
 * nth-child indices, in order:
 *   1 star  2 rank  3 pair  4 price  5 5M  6 1H  7 6H  8 24H
 *   9 volume  10 txns  11 liquidity  12 FDV  13 age
 */
@media (max-width: 1180px) {
    table.pairs { min-width: 940px; }
    table.pairs th:nth-child(5),  table.pairs td:nth-child(5),      /* 5M  */
    table.pairs th:nth-child(12), table.pairs td:nth-child(12) {    /* FDV */
        display: none;
    }
}

@media (max-width: 940px) {
    table.pairs { min-width: 700px; }
    table.pairs th:nth-child(2),  table.pairs td:nth-child(2),      /* rank */
    table.pairs th:nth-child(7),  table.pairs td:nth-child(7),      /* 6H   */
    table.pairs th:nth-child(10), table.pairs td:nth-child(10) {    /* txns */
        display: none;
    }
}

@media (max-width: 700px) {
    table.pairs { min-width: 0; }
    table.pairs th:nth-child(6),  table.pairs td:nth-child(6),      /* 1H        */
    table.pairs th:nth-child(11), table.pairs td:nth-child(11),     /* liquidity */
    table.pairs th:nth-child(13), table.pairs td:nth-child(13) {    /* age       */
        display: none;
    }
    table.pairs td, table.pairs th { padding: 0 5px; }
    .pair-cell { min-width: 0; }
    .logo { width: 22px; height: 22px; }

    /* MEASURED at 405px of viewport: the five surviving columns wanted 479px,
     * and 107px of that was the header "Volume 24H ▼" refusing to wrap. Letting
     * the headers wrap and letting the pair name ellipsis is what closes the
     * gap — the alternative, another horizontal scrollbar, is the thing these
     * breakpoints exist to remove. */
    table.pairs thead th { white-space: normal; line-height: 1.15; }
    table.pairs { table-layout: fixed; width: 100%; }
    table.pairs th:nth-child(1)  { width: 9%; }    /* star   */
    table.pairs th:nth-child(3)  { width: 36%; }   /* pair   */
    table.pairs th:nth-child(4)  { width: 18%; }   /* price  */
    table.pairs th:nth-child(8)  { width: 18%; }   /* 24H    */
    table.pairs th:nth-child(9)  { width: 22%; }   /* volume */
    .pair-name { max-width: none; min-width: 0; }
    table.pairs td { overflow: hidden; text-overflow: ellipsis; }
    .pair-name .a, .pair-name .b {
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    /* The staleness pill must survive the ellipsis: it is the ONLY thing on the
       row that explains why the row is dimmed. Shrinking is not an option, so
       the venue name gives way instead — and below this width it gives way
       entirely, because "which DEX" is a detail and "this pair is dead" is not. */
    .pair-name .b .pill.stale { flex: 0 0 auto; }
    tr.stale .pair-name .b .venue { display: none; }
}

/* The header is a single row that must never wrap into the table. Below the
 * breakpoint the tab strip scrolls horizontally on its own instead. */
@media (max-width: 860px) {
    header.top { gap: 10px; }
    nav.tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    nav.tabs::-webkit-scrollbar { display: none; }
    .brand small { display: none; }
    .search { width: 180px; max-width: 45vw; }
    .search kbd { display: none; }
}

@media (max-width: 560px) {
    /* The brand mark alone; the word is redundant next to the tab strip. */
    .brand span { display: none; }
    .filters { padding: 8px 10px; gap: 6px; }
    footer.prov { font-size: 10px; }
}

/* ─── the token page ───────────────────────────────────────────────────────── */

/* A qualifier beside a card heading — "across all markets" on the token chart.
   Not a second heading: it has to read as a footnote to the one it follows, or
   the card looks like it has two titles. */
h4 .sub {
    margin-left: 8px;
    font-weight: 400;
    font-size: 11px;
    color: var(--text-faint);
    letter-spacing: 0;
    text-transform: none;
}

/* A sentence of context under a stat block. Used for the contamination gap,
   which is a number that needs a clause to be honest rather than alarming. */
.note {
    margin: 10px 0 0;
    padding: 8px 10px;
    border-left: 2px solid var(--border-strong);
    background: var(--bg-sunken, rgba(255, 255, 255, 0.02));
    color: var(--text-dim);
    font-size: 11px;
    line-height: 1.5;
}

/* The pair cell on the markets table carries a trailing "quote" pill; without
   this it butts straight against the symbol. */
.tape td.l .pill { margin-left: 6px; }

/* ─── a pair that has stopped trading ──────────────────────────────────────── */

/* Sorted by 24h volume, a pool that pumped and died hours ago can top the
   chain. The row is dimmed rather than hidden — the numbers are real, they just
   describe a window the pair is no longer trading in — and the pill says how
   long it has been. */
.pill.stale {
    background: color-mix(in srgb, var(--down) 14%, transparent);
    border-color: color-mix(in srgb, var(--down) 40%, transparent);
    color: var(--down);
}
tr.stale td { opacity: 0.55; }
tr.stale:hover td { opacity: 1; }

/* ─── the buy/sell cell ────────────────────────────────────────────────────── */

/* Two numbers and a bar in the height of one row. The numbers carry the exact
   counts because a bar alone cannot tell 8/2 from 800/200, and the bar carries
   the ratio because two numbers alone are slow to compare down a column. */
td.bs { padding-top: 5px; padding-bottom: 5px; }
.bs-nums {
    display: flex;
    justify-content: flex-end;
    gap: 3px;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.bs-nums .sep { color: var(--text-faint); }
.bs-bar {
    margin-top: 3px;
    margin-left: auto;
    width: 54px;
    height: 3px;
    border-radius: 2px;
    background: var(--down);
    overflow: hidden;
}
.bs-bar > span {
    display: block;
    height: 100%;
    width: var(--buy-pct, 50%);
    background: var(--up);
}

/* A split taken from a window other than the one the timeframe selected. The
   label sits where the number is read, not only in the tooltip. */
.bs-nums .bs-win {
    color: var(--text-faint);
    font-size: 9px;
    align-self: center;
}
td.bs.fellback .bs-bar { opacity: 0.65; }

/* The venue column on a token tape. Dimmed because it is context for the row,
   not the row's subject — the price and the value are. */
.tape td.dim { color: var(--text-dim); font-size: 11px; }

/* A read that is taking a while. The rows stay legible — they are still the
   last true answer — and the card says it is working rather than looking
   frozen. Animated on the border so the table itself does not move. */
.card.pending > h4::after {
    content: '';
    display: inline-block;
    margin-left: 8px;
    width: 9px;
    height: 9px;
    vertical-align: -1px;
    border: 1.5px solid var(--border-strong);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: flint-spin 0.7s linear infinite;
}
.card.pending .tape { opacity: 0.55; transition: opacity 120ms ease; }
@keyframes flint-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .card.pending > h4::after { animation: none; border-top-color: var(--border-strong); }
}

/* ─── links, copy buttons and blurbs ────────────────────────────────────────
   A data site that shows an address you cannot copy and a project you cannot
   look up feels like a database dump. These are small and they are the
   difference. */
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 2px; }
.chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg-hover);
    color: var(--text-dim); font-size: 11px; font-weight: 600;
    text-decoration: none; white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--accent); background: var(--bg-raised); }
.chip.link-twitter:hover { border-color: #1d9bf0; color: #1d9bf0; }
.chip.link-telegram:hover { border-color: #2aabee; color: #2aabee; }
.chip.link-discord:hover { border-color: #5865f2; color: #5865f2; }

.blurb {
    margin: 10px 12px 0; padding: 0;
    color: var(--text-dim); font-size: 11.5px; line-height: 1.5;
    /* Untrusted, arbitrary-length text from token metadata: it must not be
       allowed to stretch the sidebar or run off the end of it. */
    overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}

.addr { display: inline-flex; align-items: center; gap: 5px; }
.addr .mono { color: var(--text-dim); text-decoration: none; }
.addr a.mono:hover { color: var(--accent); text-decoration: underline; }
button.copy {
    border: 0; background: transparent; cursor: pointer; padding: 0 2px;
    color: var(--text-faint); font-size: 11px; line-height: 1;
    border-radius: 3px;
}
button.copy:hover { color: var(--text); background: var(--bg-hover); }
button.copy.done { color: var(--up); }

/* The pair headline now leads with the token's picture. */
.headline .logo { margin-right: 2px; }

/* ─── the holders card ───────────────────────────────────────────────────── */
.hold-share { margin-top: 10px; }
.hold-share-head { display: flex; align-items: baseline; gap: 6px; font-size: 12px; }
.hold-share .bar { background: var(--surface-2, rgba(127, 127, 127, 0.18)); }
.hold-share .bar > span { width: 0; background: var(--accent, var(--up)); }
.hold-list {
    margin-top: 12px;
    border-top: 1px solid var(--border);
    padding-top: 6px;
    /* Ten rows fit; a longer list scrolls inside the card rather than pushing
       the page down past everything else on it. */
    max-height: 260px;
    overflow-y: auto;
}
.hold-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    font-size: 12px;
    border-bottom: 1px solid var(--border-faint, transparent);
}
.hold-row:last-child { border-bottom: 0; }
.hold-row .rank { min-width: 18px; color: var(--text-faint); }
.note.dim { color: var(--text-faint); }
.hold-list.cohorts { max-height: none; overflow: visible; }
.hold-list.cohorts .hold-row { gap: 10px; }
.hold-list.cohorts .dim { color: var(--text-faint); font-size: 11px; white-space: nowrap; }
.hold-list.cohorts .num.d { color: var(--down); }

/* A reading that deserves attention without being a refusal: a transfer fee
   small enough to be a fee rather than a trap. */
.pill.warn { background: var(--accent-dim); color: var(--accent); }
