@font-face { font-family: "Geist"; src: url("/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Pixel"; src: url("/fonts/geist-pixel.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* Dark is the first theme. Every colour is a token, so the light theme only redefines tokens. */
:root {
  --bg: #0a0a0a;
  --card: #131313;
  --card-2: #1a1a1a;
  --field: #141414;
  --glass: rgba(10, 10, 10, .92);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --line-3: rgba(255, 255, 255, .32);
  --hair: rgba(255, 255, 255, .07);
  --track: rgba(255, 255, 255, .12);
  --hover: rgba(255, 255, 255, .06);
  --sheen: rgba(255, 255, 255, .05);
  --ink: #ffffff;
  --on-ink: #0a0a0a;
  --text: #d6dae3;
  --nav: rgba(255, 255, 255, .7);
  --dim: rgba(255, 255, 255, .56);
  --faint: rgba(255, 255, 255, .36);
  --volt: #e5f43a;
  --volt-ink: #0a0a0a;
  --volt-ring: rgba(229, 244, 58, .55);
  --volt-ring-0: rgba(229, 244, 58, 0);
  --up: #e5f43a;
  --up-soft: rgba(229, 244, 58, .5);
  --down: #ff6a55;
  --down-soft: rgba(255, 106, 85, .13);
  --down-mid: rgba(255, 106, 85, .5);
  --warn: #f5b83d;
  --warn-soft: rgba(245, 184, 61, .12);
  --flag-ink: #0a0a0a;
  --on-chain: #0a0a0a;
  --shade: rgba(0, 0, 0, .66);
  --r: 16px;
  --r-sm: 12px;
  --pill: 999px;
  --rail: 232px;
  --face: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pixel: "Geist Pixel", "Geist Mono", ui-monospace, monospace;
  --strip: 0px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f5f1;
  --card: #ffffff;
  --card-2: #eef0e9;
  --field: #ffffff;
  --glass: rgba(244, 245, 241, .92);
  --line: rgba(10, 12, 0, .1);
  --line-2: rgba(10, 12, 0, .17);
  --line-3: rgba(10, 12, 0, .4);
  --hair: rgba(10, 12, 0, .09);
  --track: rgba(10, 12, 0, .1);
  --hover: rgba(10, 12, 0, .05);
  --sheen: rgba(10, 12, 0, .05);
  --ink: #0b0c0a;
  --on-ink: #ffffff;
  --text: #2b2d28;
  --nav: rgba(10, 12, 0, .72);
  --dim: rgba(10, 12, 0, .62);
  --faint: rgba(10, 12, 0, .46);
  --volt: #e5f43a;
  --volt-ink: #0a0a0a;
  --volt-ring: rgba(120, 140, 0, .45);
  --volt-ring-0: rgba(120, 140, 0, 0);
  --up: #55700a;
  --up-soft: rgba(85, 112, 10, .45);
  --down: #cf3a23;
  --down-soft: rgba(207, 58, 35, .12);
  --down-mid: rgba(207, 58, 35, .45);
  --warn: #a96a00;
  --warn-soft: rgba(169, 106, 0, .13);
  --flag-ink: #ffffff;
  --on-chain: #ffffff;
  --shade: rgba(20, 22, 10, .45);
  color-scheme: light;
}
/* While the theme changes, colours glide instead of snapping. The class is on for under half a second. */
:root.theming *, :root.theming *::before, :root.theming *::after { transition: background-color .35s ease, color .35s ease, border-color .35s ease, fill .35s ease, stroke .35s ease !important; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: var(--face); font-size: 15px; line-height: 1.4; font-variant-numeric: tabular-nums; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--up); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.rail { display: none; }
.page { min-width: 0; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px calc(92px + env(safe-area-inset-bottom, 0px)); max-width: 1500px; width: 100%; margin: 0 auto; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -.02em; color: var(--ink); }
.logo { width: 30px; height: 30px; flex: none; display: block; border-radius: 8px; }
.brand a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; }

.top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
.live { justify-self: end; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dim); border: 1px solid var(--line); border-radius: var(--pill); padding: 6px 12px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on { background: var(--up); box-shadow: 0 0 0 0 var(--volt-ring); animation: ping 2s infinite; }
.dot.bad { background: var(--down); }
@keyframes ping { 70% { box-shadow: 0 0 0 8px var(--volt-ring-0); } 100% { box-shadow: 0 0 0 0 var(--volt-ring-0); } }

.searchrow { display: flex; gap: 8px; margin-top: 14px; }
.search { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: var(--pill); background: var(--field); color: var(--faint); }
.search:focus-within { border-color: var(--up); }
.search svg { width: 17px; height: 17px; flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 16px; color: var(--ink); }
.search input::placeholder { color: var(--faint); }
.pillbtn { height: 44px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: var(--pill); font-weight: 500; font-size: 14px; color: var(--text); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.pillbtn[aria-expanded="true"], .pillbtn[aria-pressed="true"] { border-color: var(--up); color: var(--up); }
.pillbtn .n { background: var(--volt); color: var(--volt-ink); border-radius: var(--pill); font-size: 11px; font-weight: 600; padding: 1px 7px; }
.pillbtn .n:empty { display: none; }

.titlerow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 20px; }
.titlerow h1 { margin: 0; font-weight: 500; font-size: clamp(24px, 6vw, 30px); letter-spacing: -.025em; color: var(--ink); line-height: 1.1; }
.sub { font-size: 13px; color: var(--dim); margin-top: 4px; }
.sub b { color: var(--text); font-weight: 500; }
.sub .err { color: var(--down); }

/* ---------- kpis ---------- */
.kpis { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(140px, 1fr); gap: 10px; margin-top: 16px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.kpis::-webkit-scrollbar, .scroll::-webkit-scrollbar { display: none; }
.kpi { border: 1px solid var(--line); border-radius: var(--r); padding: 13px 16px; background: var(--card); min-width: 0; scroll-snap-align: start; }
.kpi .k { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v { font-weight: 500; font-size: clamp(24px, 6vw, 34px); letter-spacing: -.03em; line-height: 1.15; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.kpi .v.volt { color: var(--up); }
.kpi .s { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

/* ---------- toolbar ---------- */
.toolbar { margin-top: 14px; display: grid; gap: 10px; }
.scroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--pill); font-size: 13px; font-weight: 500; color: var(--dim); transition: background .15s, color .15s, border-color .15s; }
.chip:hover { border-color: var(--line-3); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.tools { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tools.open { display: grid; }
.pick { position: relative; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--pill); font-size: 13px; color: var(--dim); background: var(--field); min-width: 0; white-space: nowrap; transition: border-color .15s; }
.pick:hover, .pick:focus-within { border-color: var(--line-3); }
.pick select { appearance: none; -webkit-appearance: none; background: none; border: 0; outline: 0; color: var(--ink); font: inherit; font-weight: 500; padding: 0 18px 0 0; min-width: 0; flex: 1; cursor: pointer; text-overflow: ellipsis; }
.pick select option { background: var(--card); color: var(--ink); }
.pick:has(select)::after { content: ""; position: absolute; right: 14px; top: 50%; width: 6px; height: 6px; border-right: 1.6px solid var(--dim); border-bottom: 1.6px solid var(--dim); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.pick.toggle { color: var(--dim); font-weight: 500; justify-content: center; }
.pick.toggle svg { width: 16px; height: 16px; flex: none; }
.pick.toggle[aria-pressed="true"] { border-color: var(--up); color: var(--up); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--pill); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; height: 30px; padding: 0 12px; border-radius: var(--pill); font-size: 12.5px; font-weight: 500; color: var(--dim); white-space: nowrap; transition: color .15s, background .15s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }

/* ---------- list ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 16px; }
.list { container-type: inline-size; min-width: 0; }
.colhead { display: none; }
#list { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 40px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); transition: background .15s, border-color .15s; }
.row:hover { background: var(--card-2); border-color: var(--line-2); }
.skel { height: 74px; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(100deg, var(--card) 30%, var(--card-2) 50%, var(--card) 70%); background-size: 300% 100%; animation: sweep 1.6s linear infinite; }
@keyframes sweep { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.row.sel { border-color: var(--line-2); background: var(--card-2); }
.row.justin { border-color: var(--up-soft); }
.main { text-align: left; display: grid; gap: 12px; padding: 14px 4px 14px 14px; min-width: 0; border-radius: var(--r);
  grid-template-columns: minmax(0, 1fr) 46px 64px;
  grid-template-areas: "token token heat" "tags tags tags" "price spark spark" "vol flow flow" "liq liq liq"; }
.c-token { grid-area: token; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 1px 12px; align-items: center; min-width: 0; }
.ico { grid-row: span 2; width: 38px; height: 38px; border-radius: 50%; background: var(--card-2); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; font-size: 15px; color: var(--dim); overflow: hidden; }
.ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sym { font-weight: 600; font-size: 17px; letter-spacing: -.015em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.meta { font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .ch { color: var(--text); font-weight: 500; }
.tags { grid-area: tags; display: flex; flex-wrap: wrap; gap: 6px; }
.tags:empty { display: none; }
.tag { font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 3px 9px; border-radius: var(--pill); line-height: 1.35; white-space: nowrap; }
.tag.solid { background: var(--ink); color: var(--on-ink); }
.tag.volt { background: var(--volt); color: var(--volt-ink); }
.tag.line { border: 1px solid var(--line-2); color: var(--dim); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.down { background: var(--down-soft); color: var(--down); }
.c-heat { grid-area: heat; text-align: right; }
.heat { font-weight: 500; font-size: 30px; line-height: 1; letter-spacing: -.03em; color: var(--dim); }
.heat.hot { color: var(--up); }
.heat.mid { color: var(--ink); }
.lbl { font-size: 11px; color: var(--faint); font-weight: 400; }
.c-heat .lbl { display: block; margin-top: 3px; }
.c-price { grid-area: price; min-width: 0; }
.px { font-weight: 500; font-size: 17px; color: var(--ink); transition: color .5s; letter-spacing: -.01em; }
.px.tick-up { color: var(--up); transition: none; }
.px.tick-down { color: var(--down); transition: none; }
.chg { display: flex; flex-wrap: wrap; gap: 1px 10px; font-size: 12.5px; color: var(--dim); margin-top: 2px; }
.chg b { font-weight: 500; }
.up { color: var(--up); }
.dn { color: var(--down); }
.c-spark { grid-area: spark; align-self: center; min-width: 0; }
.spark { width: 100%; height: 38px; display: block; color: var(--dim); overflow: visible; }
.spark.up { color: var(--up); }
.spark.down { color: var(--down); }
.c-vol { grid-area: vol; min-width: 0; }
.big { font-weight: 500; font-size: 16px; color: var(--ink); letter-spacing: -.01em; }
.small { font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.c-flow { grid-area: flow; align-self: center; min-width: 0; }
.flow { height: 6px; background: var(--track); display: block; border-radius: var(--pill); overflow: hidden; }
.flow i { display: block; height: 100%; background: var(--up); border-radius: var(--pill); }
.c-liq { grid-area: liq; display: flex; gap: 14px; font-size: 12.5px; color: var(--dim); }
.c-liq b { color: var(--text); font-weight: 500; }
.star { display: grid; place-items: start center; padding-top: 18px; color: var(--faint); border-radius: var(--r); }
.star svg { width: 20px; height: 20px; }
.star[aria-pressed="true"] { color: var(--up); }
.star[aria-pressed="true"] svg path { fill: var(--up); }
.empty { padding: 30px 18px; color: var(--dim); font-size: 15px; border: 1px dashed var(--line-2); border-radius: var(--r); max-width: 64ch; }
.empty b { color: var(--ink); font-weight: 500; }

@container (min-width: 620px) and (max-width: 899px) {
  #list { gap: 6px; }
  .main { grid-template-columns: minmax(140px, 1.4fr) 70px minmax(136px, 1.1fr) minmax(104px, .9fr) 44px; grid-template-areas: "token spark price vol heat" "tags tags price vol heat"; align-items: center; gap: 6px 12px; padding: 12px 4px 12px 16px; }
  .main:has(.tags:empty) { grid-template-areas: "token spark price vol heat"; }
  .c-flow, .c-liq { display: none; }
  .tags { padding-left: 50px; flex-wrap: nowrap; overflow: hidden; gap: 5px; }
  .tags .tag { font-size: 10.5px; padding: 2px 8px; }
  .heat { font-size: 26px; }
  .c-heat .lbl { display: none; }
  .star { place-items: center; padding-top: 0; }
  .chg { font-size: 12px; gap: 0 8px; }
  .chg span:nth-child(3) { display: none; }
}
@container (min-width: 900px) {
  .colhead { display: grid; grid-template-columns: minmax(220px, 1.5fr) 104px minmax(214px, 1.1fr) minmax(170px, 1fr) 128px minmax(96px, .6fr) 58px 40px; gap: 16px; padding: 10px 0 10px 17px; font-size: 12px; color: var(--faint); position: sticky; top: 0; z-index: 5; background: var(--bg); }
  .colhead span:nth-child(7) { text-align: right; }
  #list { gap: 6px; }
  .main { grid-template-columns: minmax(220px, 1.5fr) 104px minmax(214px, 1.1fr) minmax(170px, 1fr) 128px minmax(96px, .6fr) 58px; grid-template-areas: "token spark price vol flow liq heat" "tags tags price vol flow liq heat"; align-items: center; gap: 6px 16px; padding: 12px 4px 12px 16px; }
  .tags { padding-left: 50px; align-self: start; flex-wrap: nowrap; overflow: hidden; gap: 5px; }
  .tags .tag { font-size: 10.5px; padding: 2px 8px; }
  .c-token { align-self: end; }
  .tags:empty + .c-spark, .main:has(.tags:empty) .c-token { align-self: center; }
  .main:has(.tags:empty) { grid-template-areas: "token spark price vol flow liq heat"; }
  .c-liq { display: grid; gap: 1px; }
  .star { place-items: center; padding-top: 0; }
  .heat { font-size: 28px; }
  .c-heat .lbl { display: none; }
  .chg { flex-wrap: nowrap; gap: 0 9px; white-space: nowrap; font-size: 12px; overflow: hidden; }
}

/* ---------- detail ---------- */
.detail { position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.dbar { position: sticky; top: 0; z-index: 2; background: var(--bg); display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dbar .sp { flex: 1; }
.btn { border: 1px solid var(--line-2); border-radius: var(--pill); padding: 0 16px; height: 40px; font-weight: 500; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--text); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); font-weight: 600; }
.btn[aria-pressed="true"] { border-color: var(--up); color: var(--up); }
.dbody { padding: 18px 16px 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 820px; margin: 0 auto; }
.dbody > * { min-width: 0; }
.dtitle { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 2px 14px; align-items: center; }
.dtitle .ico { width: 52px; height: 52px; font-size: 20px; grid-row: 1 / span 2; }
.dtitle h2 { margin: 0; font-weight: 500; font-size: clamp(26px, 7vw, 34px); line-height: 1.1; letter-spacing: -.03em; color: var(--ink); overflow-wrap: anywhere; }
.dtitle .meta { white-space: normal; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.addr { font-size: 12.5px; color: var(--faint); overflow-wrap: anywhere; }
.dprice .p { font-weight: 500; font-size: clamp(34px, 9vw, 44px); line-height: 1.05; letter-spacing: -.03em; color: var(--ink); }
.dprice .chg { font-size: 14px; margin-top: 6px; }
.depth { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--dim); }
.depth b { color: var(--ink); font-weight: 500; }
.sec { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); padding: 16px; }
.sec h3 { margin: 0 0 12px; font-size: 13px; color: var(--dim); font-weight: 400; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sec h3 b { color: var(--ink); font-weight: 500; }
.chartbox { overflow-x: auto; scrollbar-width: none; }
.sec h3 .seg button { height: 26px; padding: 0 10px; font-size: 12px; }
.chart { width: 100%; height: auto; display: block; }
.chart .cl { fill: none; stroke: var(--up); stroke-width: 2; stroke-linejoin: round; }
.chart.down .cl { stroke: var(--down); }
.chart .cl.tail { stroke-dasharray: 6 6; stroke-linecap: round; }
.chart .wick { stroke-width: 1.2; }
.chart .wick.up { stroke: var(--up); }
.chart .wick.down { stroke: var(--down); }
.chart .body.up { fill: var(--up); }
.chart .body.down { fill: var(--down); }
.chart .now { stroke: var(--line-3); stroke-width: 1; stroke-dasharray: 2 5; }
.chart .tagbox { fill: var(--ink); }
.chart .tagtext { fill: var(--on-ink); font-size: 12px; font-weight: 600; font-family: var(--face); }
.chartnote { margin-top: 8px; }
.chart .cd { fill: var(--up); }
.chart.down .cd { fill: var(--down); }
.chart .cg { stroke: var(--hair); stroke-width: 1; }
.chart .ct { fill: var(--dim); font-size: 12px; font-family: var(--face); }
.chart .ct.strong { fill: var(--ink); font-weight: 500; }
.chart .vb.up { fill: var(--up-soft); }
.chart .vb.down { fill: var(--down-mid); }
.tablebox { overflow-x: auto; scrollbar-width: none; margin: -4px -6px; }
table { border-collapse: collapse; width: 100%; min-width: 470px; font-size: 13.5px; }
th, td { padding: 9px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; color: var(--faint); font-weight: 400; }
td { color: var(--text); }
th:first-child, td:first-child { text-align: left; color: var(--dim); }
tr:last-child td { border-bottom: 0; }
.parts { display: grid; gap: 12px; }
.part { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; font-size: 13.5px; color: var(--text); }
.part .bar2 { grid-column: 1 / -1; height: 6px; background: var(--track); border-radius: var(--pill); overflow: hidden; }
.part .bar2 i { display: block; height: 100%; background: var(--up); border-radius: var(--pill); }
.part > span:nth-child(2) { color: var(--dim); text-align: right; }
.facts { display: grid; gap: 10px; }
.fact { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13.5px; color: var(--dim); }
.trade { display: grid; grid-template-columns: 46px 52px minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: center; }
.trade:last-child { border-bottom: 0; }
.trade .w { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.trade .t { color: var(--faint); }
.trade b { color: var(--ink); font-weight: 500; }
.fine { font-size: 12.5px; color: var(--faint); max-width: 70ch; }

/* ---------- mobile tab bar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); }
.tabbar button { display: grid; justify-items: center; gap: 3px; padding: 7px 2px; font-size: 11px; font-weight: 500; color: var(--dim); border-radius: 12px; }
.tabbar button svg { width: 23px; height: 23px; }
.tabbar button[aria-selected="true"] { color: var(--ink); }
.tabbar button[aria-selected="true"] svg { color: var(--up); }
.tabbar .n { color: var(--faint); font-weight: 400; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--on-ink); font-weight: 500; padding: 10px 16px; font-size: 14px; z-index: 50; max-width: calc(100vw - 32px); text-align: center; border-radius: var(--pill); }
.foot { margin-top: 28px; display: grid; gap: 6px; font-size: 12.5px; color: var(--faint); max-width: 90ch; }

/* ---------- desktop ---------- */
@media (min-width: 1000px) {
  .shell { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .rail { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; padding: 18px 14px; border-right: 1px solid var(--line); }
  .rail .brand { padding: 6px 10px 18px; }
  .nav { display: grid; gap: 2px; }
  .nav button { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: var(--pill); font-size: 16px; color: var(--nav); text-align: left; width: 100%; }
  .nav button:hover { background: var(--hover); }
  .nav button svg { width: 22px; height: 22px; flex: none; }
  .nav button[aria-selected="true"] { color: var(--ink); font-weight: 600; }
  .nav button[aria-selected="true"] svg { color: var(--up); }
  .nav .n { margin-left: auto; font-size: 12.5px; color: var(--faint); font-weight: 400; }
  .railfoot { margin-top: auto; display: grid; gap: 10px; padding: 0 6px; }
  .railfoot .live { justify-self: start; }
  .page { padding: 18px 28px 60px; }
  .top .brand, .top .live { display: none; }
  .top { display: block; }
  .searchrow { margin-top: 0; max-width: 640px; margin-inline: auto; }
  #filtersbtn { display: none; }
  .tabbar { display: none; }
  .toast { bottom: 24px; }
  .titlerow { margin-top: 26px; }
  .kpis { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; margin-top: 18px; }
  .kpi { padding: 15px 18px; }
  .toolbar { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
  .tools, .tools.open { display: flex; gap: 8px; }
  .pick { height: 34px; padding: 0 12px; }
  .pick:has(select)::after { right: 12px; }
}
@media (min-width: 1000px) and (max-width: 1279px) {
  :root { --rail: 76px; }
  .rail .brand span, .nav button span, .railfoot .fine, .nav .n { display: none; }
  .nav button { justify-content: center; padding: 12px; }
  .railfoot .live span:last-child { display: none; }
  .railfoot .live { padding: 8px; }
}
@media (min-width: 1280px) {
  .cols.open { grid-template-columns: minmax(0, 1fr) 470px; }
  .detail { position: sticky; top: 14px; inset: auto; height: calc(100vh - 28px); border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); padding: 0; z-index: 1; }
  .dbar { background: var(--bg); border-radius: var(--r) var(--r) 0 0; }
}
@media (prefers-reduced-motion: reduce) { .dot.on { animation: none; } }

/* ---------- majors strip ---------- */
.majors { display: flex; gap: 18px; align-items: center; overflow-x: auto; scrollbar-width: none; margin-top: 12px; padding: 2px 0; font-size: 12.5px; color: var(--dim); white-space: nowrap; min-height: 22px; }
.majors::-webkit-scrollbar { display: none; }
.majors:empty { display: none; }
.mj { display: inline-flex; align-items: center; gap: 6px; }
.mj i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.mj b { color: var(--text); font-weight: 500; }
.mj em { font-style: normal; }
.mj .t { color: var(--faint); font-size: 11.5px; letter-spacing: .02em; }
.majors .src { color: var(--faint); font-size: 11.5px; margin-left: auto; padding-left: 12px; }

/* ---------- risk ---------- */
.tag.risk-danger { background: var(--down); color: var(--flag-ink); }
.tag.risk-warn { background: var(--warn); color: var(--flag-ink); }
.risk { display: grid; gap: 2px; }
.rf { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--text); }
.rf:last-child { border-bottom: 0; }
.rf .mk { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; justify-self: center; background: var(--faint); }
.rf.danger .mk { background: var(--down); }
.rf.warn .mk { background: var(--warn); }
.rf.good .mk { background: var(--up); }
.rf.danger .tx { color: var(--ink); }
.rf .more { display: block; color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.rf .by { color: var(--faint); font-size: 11.5px; white-space: nowrap; padding-top: 2px; }
.risksum { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- socials ---------- */
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials .btn { height: 36px; padding: 0 14px; font-size: 13.5px; }
.socials .btn svg { width: 14px; height: 14px; flex: none; }

/* ---------- market ---------- */
.market { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; container-type: inline-size; }
.market .sec { min-width: 0; }
.market .sec h3 { flex-wrap: wrap; }
.market .sec h3 > span:first-child { color: var(--ink); font-weight: 500; font-size: 15px; }
.market .ctl { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; }
.hm { position: relative; width: 100%; border-radius: var(--r-sm); overflow: hidden; background: var(--bg); }
.hm.wide { aspect-ratio: 1000 / 520; }
.hm.tall { aspect-ratio: 1000 / 1250; }
.hm-chain { position: absolute; pointer-events: none; border: 2px solid var(--card); border-radius: 8px; z-index: 2; }
.hm-name { position: absolute; left: 0; top: 0; right: 0; height: 22px; padding: 0 8px; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--dim); background: var(--card); white-space: nowrap; overflow: hidden; border-radius: 6px 6px 0 0; }
.hm-name i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.hm-name b { color: var(--text); font-weight: 500; }
.hm-tile { position: absolute; border: 1px solid var(--card); overflow: hidden; display: grid; align-content: center; justify-items: center; gap: 1px; padding: 2px; text-align: center; line-height: 1.15; transition: filter .12s; min-width: 0; }
.hm-tile > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-tile:hover, .hm-tile:focus-visible { filter: brightness(1.18); z-index: 3; }
.hm-sym { font-weight: 600; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-val { font-size: 12px; font-weight: 500; opacity: .9; }
.hm-sub { font-size: 11px; opacity: .7; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 12px; font-size: 11.5px; color: var(--dim); }
.lg { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.lg i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.lg i.round { border-radius: 50%; width: 9px; height: 9px; }
.ramp { display: inline-flex; border-radius: 3px; overflow: hidden; }
.ramp i { width: 18px; height: 12px; display: block; }
.chains { display: grid; gap: 4px; }
.chainrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "name name top" "bar bar bar" "n1 n3 n4"; gap: 10px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.chainrow:last-child { border-bottom: 0; }
.cr-name { grid-area: name; display: grid; grid-template-columns: 9px minmax(0, 1fr); gap: 0 8px; align-items: center; min-width: 0; }
.cr-name i { width: 9px; height: 9px; border-radius: 50%; }
.cr-name b { color: var(--ink); font-weight: 500; font-size: 15px; }
.cr-name span { grid-column: 2; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-bar { grid-area: bar; height: 10px; background: var(--hair); border-radius: var(--pill); overflow: hidden; }
.cr-bar i { display: block; height: 100%; border-radius: var(--pill); }
.cr-num { display: grid; gap: 1px; min-width: 0; }
.cr-num b { color: var(--ink); font-weight: 500; font-size: 15px; }
.cr-num span { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.chainrow .cr-num:nth-of-type(3) { grid-area: n1; }
.chainrow .cr-num:nth-of-type(4) { display: none; }
.chainrow .cr-num:nth-of-type(5) { grid-area: n3; }
.chainrow .cr-num:nth-of-type(6) { grid-area: n4; }
.chainrow .cr-num:nth-of-type(7) { display: none; }
.cr-top { grid-area: top; display: grid; grid-template-columns: auto auto; gap: 0 8px; align-items: baseline; justify-content: end; text-align: right; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 6px 12px; min-width: 0; }
span.cr-top { border: 0; }
.cr-top span { grid-column: 1 / -1; font-size: 11px; color: var(--faint); }
.cr-top b { color: var(--ink); font-weight: 600; font-size: 14px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-top em { font-style: normal; color: var(--up); font-weight: 500; font-size: 14px; }
.pulse { display: grid; gap: 4px; }
.pr { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; align-items: center; }
.pr-name { font-size: 12.5px; color: var(--text); display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; }
.pr-name i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pr-cells { display: grid; gap: 2px; }
.pc { display: block; height: 26px; border-radius: 3px; min-width: 0; }
.pc.none { background: repeating-linear-gradient(135deg, var(--sheen) 0 3px, transparent 3px 6px); }
.pr-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); }
.bubbles { width: 100%; height: auto; display: block; }
.bubbles .bg { stroke: var(--hair); stroke-width: 1; }
.bubbles .bt { fill: var(--dim); font-size: 12px; font-family: var(--face); }
.bubbles .bub { cursor: pointer; }
.bubbles .bub circle { fill-opacity: .78; stroke: var(--card); stroke-width: 2; transition: fill-opacity .12s; }
.bubbles .bub:hover circle, .bubbles .bub:focus-visible circle { fill-opacity: 1; stroke: var(--ink); }
.bubbles .bub:focus { outline: none; }
.bubbles .bn { fill: var(--on-chain); font-size: 11px; font-weight: 600; font-family: var(--face); pointer-events: none; }
.scrollx { overflow-x: auto; scrollbar-width: none; }
.scrollx::-webkit-scrollbar { display: none; }
details.alt { margin-top: 12px; }
details.alt summary { cursor: pointer; font-size: 12.5px; color: var(--dim); list-style: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: var(--pill); padding: 5px 12px; }
details.alt summary::-webkit-details-marker { display: none; }
details.alt[open] summary { margin-bottom: 12px; color: var(--ink); }

/* ---------- maker, tip ---------- */
.maker { display: grid; gap: 8px; font-size: 12.5px; color: var(--dim); }
.maker a { color: var(--text); text-decoration: none; }
.maker a:hover { color: var(--ink); }
.wordmark { font-family: var(--pixel); font-size: 15px; letter-spacing: .01em; color: var(--ink); display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.wordmark span { font-family: var(--face); font-weight: 500; letter-spacing: -.01em; }
.wordmark sup { font-family: var(--face); font-size: 9px; color: var(--faint); margin-left: -3px; }
.tipbtn { justify-self: start; border: 1px solid var(--line-2); border-radius: var(--pill); height: 32px; padding: 0 13px; font-size: 12.5px; font-weight: 500; color: var(--text); display: inline-flex; align-items: center; gap: 7px; }
.tipbtn:hover { border-color: var(--up); color: var(--up); }
.tipbtn svg { width: 14px; height: 14px; }
dialog.sheet { border: 1px solid var(--line-2); border-radius: 20px; background: var(--card); color: var(--text); padding: 0; width: min(460px, calc(100vw - 24px)); max-height: calc(100vh - 40px); }
dialog.sheet::backdrop { background: var(--shade); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet-in { padding: 22px; display: grid; gap: 16px; }
.sheet h2 { margin: 0; font-weight: 500; font-size: 22px; letter-spacing: -.02em; color: var(--ink); }
.sheet p { margin: 0; font-size: 14px; color: var(--dim); }
.tipline { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; background: var(--bg); }
.tipline b { color: var(--ink); font-weight: 500; font-size: 14px; }
.tipline span { font-size: 12px; color: var(--faint); }
.tipline code { grid-column: 1 / -1; font-family: var(--mono); font-size: 12px; color: var(--text); overflow-wrap: anywhere; line-height: 1.45; }
.tipline .btn { grid-row: 1 / span 2; grid-column: 2; height: 34px; padding: 0 14px; font-size: 13px; }

/* ---------- phones: room for the tab bar ---------- */
.foot a { color: var(--text); }

/* ---------- desktop additions ---------- */
@container (min-width: 760px) {
  .chainrow { grid-template-columns: minmax(150px, 1.1fr) minmax(120px, 1.6fr) repeat(5, minmax(70px, auto)) minmax(120px, auto); grid-template-areas: none; gap: 16px; padding: 12px 0; }
  .chainrow > * { grid-area: auto !important; }
  .chainrow .cr-num:nth-of-type(4), .chainrow .cr-num:nth-of-type(7) { display: grid; }
  .cr-num { text-align: right; }
}
@media (min-width: 1000px) {
  :root { --strip: 34px; }
  .majors { position: fixed; left: var(--rail); right: 0; bottom: 0; z-index: 25; margin: 0; height: var(--strip); padding: 0 28px; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .majors:empty { display: flex; }
  .page { padding-bottom: calc(60px + var(--strip)); }
  .toast { bottom: calc(24px + var(--strip)); }
  .rail { padding-bottom: 18px; }
}
@media (min-width: 1000px) and (max-width: 1279px) {
  .maker { display: none; }
}
@media (min-width: 1280px) {
  .detail { height: calc(100vh - 28px - var(--strip)); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}


/* ---------- small pieces ---------- */
.c-name { display: grid; min-width: 0; }
.fine.padded { padding: 26px 2px; }
.toast.down { background: var(--down); color: var(--flag-ink); }
.lost { display: grid; gap: 18px; align-content: start; justify-items: start; padding-top: 12vh; max-width: 620px; }
.lost h1 { margin: 0; font-weight: 500; font-size: clamp(28px, 7vw, 40px); letter-spacing: -.03em; color: var(--ink); line-height: 1.1; }
.lost p { margin: 0; }

/* ---------- detail: actions, links, activity ---------- */
.actions { flex-wrap: nowrap; align-items: stretch; }
.actions #d-share { display: contents; }
.btn.grow { flex: 1 1 auto; justify-content: center; height: 46px; font-size: 15px; }
.actions .btn { height: 46px; }
.btn.icon { width: 46px; padding: 0; justify-content: center; flex: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
button.addr { text-align: left; font-family: var(--mono); font-size: 12px; color: var(--faint); overflow-wrap: anywhere; line-height: 1.4; }
button.addr:hover { color: var(--dim); }
.linkrow { display: flex; flex-wrap: wrap; gap: 6px; }
.linkrow:empty { display: none; }
.lk { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--pill); font-size: 12.5px; font-weight: 500; color: var(--dim); text-decoration: none; white-space: nowrap; transition: color .15s, border-color .15s; }
.lk:hover { color: var(--ink); border-color: var(--line-2); }
.lk svg { width: 12px; height: 12px; flex: none; }
.wins { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 6px; }
.win { display: grid; gap: 2px; justify-items: center; padding: 10px 4px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); transition: border-color .15s, background .15s; }
.win span { font-size: 11.5px; color: var(--faint); }
.win b { font-weight: 500; font-size: 14px; color: var(--text); }
.win b.up { color: var(--up); }
.win b.dn { color: var(--down); }
.win:hover { border-color: var(--line-2); }
.win[aria-pressed="true"] { border-color: var(--line-3); background: var(--card-2); }
.win[aria-pressed="true"] span { color: var(--text); }
.act { display: grid; gap: 14px; margin-top: 16px; }
.act-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; color: var(--dim); }
.act-line b { color: var(--ink); font-weight: 500; font-size: 17px; letter-spacing: -.01em; }
.split { display: grid; gap: 6px; }
.split-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; font-size: 13px; color: var(--dim); }
.split-head b { color: var(--ink); font-weight: 500; }
.split-head span:last-child { text-align: right; }
.split-head .pc { font-size: 11.5px; color: var(--faint); }
.split-bar { display: flex; gap: 3px; height: 8px; }
.split-bar i { display: block; height: 100%; border-radius: var(--pill); min-width: 3px; }
.split-bar .l { background: var(--up); }
.split-bar .r { background: var(--down); }
.c-liq:empty, .small:empty, .chg:empty { display: none; }
.chartbox.wait { height: 200px; display: grid; place-items: center; border-radius: var(--r-sm); }
.chartbox.busy { background: linear-gradient(100deg, transparent 30%, var(--sheen) 50%, transparent 70%); background-size: 300% 100%; animation: sweep 1.6s linear infinite; }

/* ---------- trends ---------- */
.trendbox { min-width: 0; }
.trend { width: 100%; height: auto; display: block; touch-action: pan-y; }
.trend .tg { stroke: var(--hair); stroke-width: 1; }
.trend .tt { fill: var(--dim); font-size: 12px; font-family: var(--face); }
.trend .tl { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend .te { stroke: var(--card); stroke-width: 2; }
.trend .tc { stroke: var(--line-3); stroke-width: 1; }
.trend .td { stroke: var(--card); stroke-width: 2; }
.trend-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--dim); margin-bottom: 10px; }
.tk { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tk i { width: 10px; height: 3px; border-radius: 2px; flex: none; }
.tk b { color: var(--ink); font-weight: 500; min-width: 3ch; }
.tk.when { margin-left: auto; color: var(--faint); }
.sub-h { margin: 20px 0 10px; font-size: 12.5px; font-weight: 400; color: var(--dim); }

/* ---------- theme switch ---------- */
.themebtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--pill); font-size: 12.5px; font-weight: 500; color: var(--dim); white-space: nowrap; transition: border-color .15s, color .15s; }
.themebtn:hover { border-color: var(--line-3); color: var(--ink); }
.themebtn svg { width: 15px; height: 15px; flex: none; }
.top { grid-template-columns: auto minmax(0, 1fr) auto; }
.top .themebtn { width: 36px; height: 36px; padding: 0; }
.top .themebtn span { display: none; }
.railfoot .themebtn { justify-self: start; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .38s; animation-timing-function: ease; }
@media (min-width: 1000px) { .top .themebtn { display: none; } }
@media (min-width: 1000px) and (max-width: 1279px) { .railfoot .themebtn span { display: none; } .railfoot .themebtn { width: 36px; padding: 0; } }

/* ---------- numbers ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.tile { display: grid; gap: 3px; align-content: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); min-width: 0; }
.tile .k { font-size: 12px; color: var(--dim); }
.tile b { font-weight: 500; font-size: 22px; letter-spacing: -.02em; color: var(--ink); line-height: 1.15; }
.tile.warn b { color: var(--warn); }
.tile.down b { color: var(--down); }
.tile .n { font-size: 11.5px; color: var(--faint); line-height: 1.35; }
