/* ==========================================================================
   Design system (concept A "Ledger" + the 3D sorter hero)
   Pure black, white type, Geist + Geist Mono. Colour comes ONLY from the five
   rank colours and from coin images. Fonts never below 12px.

   Class index (what other pages build with)
   - Layout ....... .page (1240px container)  .section  .sec-head  .grow  .h-display  .h-page  .h2  .lede
   - Chrome ....... .hdr (rendered by ui.js mountChrome)  .ftr (footer)
   - Text ......... .mono  .num (tabular)  .mute  .dim  .note (quiet 13px)  .soft (grey tail in a headline)
   - Rank colour .. [data-tier="legend|proven|clean|unknown|farmer"] sets --c ; .dot uses it
   - Controls ..... .btn (white)  .btn.ghost  .btn.sm  .icon-btn  .switch[aria-checked]  .check (label + switch)
                    .tabs > .tab(.on)  .menu (popover list, ui.js openMenu)  .panel (popover card)  .tip (ui.js popover)
                    .sort (ui.js sortHeadHTML button)  .sort-sel (ui.js sortSelectHTML)
   - Data ......... .stats > .stat > b + span     .board (table card) > .board-bar + .row.head + .rows > .row
                    .row cells: .coin (.av + .coin-t)  .rank  .line  .cap  .acts > .act
                    .card  .card-head  .kv (dl grid)  .meter > i
   - States ....... .skel (shimmer)  .empty  .row.in / .row.out (height in/out)  .row.checking  .rank.checking
   - Feedback ..... .toasts > .toast(.show) (core.js toast)
   ========================================================================== */

/* ---------- 1. tokens ---------- */
:root {
  color-scheme: dark;
  /* grey scale */
  --g0: #0a0a0a;
  --g1: #111111;
  --g2: #161616;
  --g3: #1f1f1f;
  --g4: #262626;
  --g5: #333333;

  --bg: var(--g0);
  --panel: var(--g1);    /* cards, the board */
  --raise: var(--g2);    /* hover / raised inside a panel */
  --pop: #121212;        /* popovers, toasts */
  --line: var(--g3);     /* hairlines */
  --line-2: var(--g4);   /* popover borders, inputs on focus */
  --row-line: #181818;   /* between table rows */
  --text: #f2f2f2;
  --mute: #8b8b8b;
  --dim: #7f7f7f;        /* quiet text: 4.5:1+ at 12–13px on the board panel (and on row hover) */
  --dim-ui: #5c5c5c;     /* lines, icons, placeholders, inactive marks: never body text */
  --soft: #636363;       /* grey third line of the headline */

  /* rank colours (lib/rank.js) */
  --legend: #f3c969;
  --proven: #5fd68b;
  --clean: #6aa8ff;
  --unknown: #7d7d7d;
  --farmer: #ff6b5e;

  --r-sm: 8px;
  --r: 10px;
  --r-lg: 16px;
  --r-xl: 20px;

  --gutter: 32px;
  --page: 1240px;
  --hdr-h: 68px;
  --nav-h: 0px;          /* phones: the folding nav row under the header */

  /* type scale */
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-17: 17px;
  --fs-19: 19px;
  --fs-28: 28px;
  --fs-40: 40px;

  --font: Geist, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  /* motion: smooth, never snappy */
  --ease: cubic-bezier(0.33, 1, 0.68, 1);      /* ease-out (cubic) for things arriving */
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);   /* in-out for things moving or leaving */
  --t-1: 160ms;
  --t-2: 280ms;
  --t-3: 560ms;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

[data-tier='legend'] { --c: var(--legend); }
[data-tier='proven'] { --c: var(--proven); }
[data-tier='clean'] { --c: var(--clean); }
[data-tier='unknown'] { --c: var(--unknown); }
[data-tier='farmer'] { --c: var(--farmer); }

/* ---------- 2. base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; scroll-padding-top: calc(var(--hdr-h) + var(--nav-h) + 12px); } /* anchors and keyboard focus land below the sticky header */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip; /* clip, not hidden: hidden makes body a scroll box and the sticky header stops sticking */
}
body > main { flex: 1; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.mute { color: var(--mute); }
.dim { color: var(--dim); }
.note { color: var(--dim); font-size: var(--fs-13); }
.grow { flex: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; background: var(--c, var(--unknown)); }

/* ---------- 3. layout + headings ---------- */
.page { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.section { margin: 0 0 64px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.sec-head p { color: var(--mute); font-size: var(--fs-14); }

.h-display { font-size: 80px; line-height: 0.95; letter-spacing: -0.05em; font-weight: 600; }
.h-page { font-size: 56px; line-height: 1; letter-spacing: -0.045em; font-weight: 600; }
.h2 { font-size: var(--fs-28); line-height: 1.15; letter-spacing: -0.03em; font-weight: 600; }
.soft { color: var(--soft); }
.lede { margin-top: 24px; font-size: var(--fs-19); color: var(--mute); max-width: 540px; }
.hero .lede { font-size: var(--fs-17); max-width: 580px; margin-top: 22px; }

/* ---------- 4. header (ui.js mountChrome) ---------- */
.hdr {
  position: sticky; top: 0; z-index: 40;
  height: var(--hdr-h);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.86);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  view-transition-name: hdr;
}
/* same width as .page, so the brand lines up with the content below it */
.hdr-in { position: relative; height: 100%; max-width: var(--page); margin: 0 auto; display: flex; align-items: center; gap: 36px; padding: 0 var(--gutter); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--fs-19); letter-spacing: -0.02em; flex: none; }
.brand svg { width: 22px; height: 22px; color: var(--text); }
.nav { display: flex; gap: 26px; color: var(--mute); font-size: var(--fs-14); }
.nav a { white-space: nowrap; transition: color var(--t-2) var(--ease); }
.nav a:hover, .nav a.on { color: var(--text); }
.hdr-tools { display: flex; align-items: center; gap: 10px; flex: none; }

/* search field + results */
.search {
  position: relative; width: 340px; height: 40px; flex: 0 1 340px; min-width: 200px;
  display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px;
  border: 1px solid var(--line); border-radius: var(--r); background: #0d0d0d;
  transition: border-color var(--t-2) var(--ease);
}
.search:focus-within { border-color: #4a4a4a; }
.search > svg { width: 15px; height: 15px; color: var(--dim-ui); flex: none; }
.search input {
  all: unset; flex: 1; min-width: 0; height: 100%; font-size: var(--fs-14); color: var(--text);
}
.search input::placeholder { color: var(--dim); }
.search input::-webkit-search-cancel-button { display: none; }
.search-x { display: none; }
/* the dropdown is exactly as wide as the field */
.search-res {
  position: absolute; left: -1px; right: -1px; top: calc(100% + 8px);
  max-height: 440px; overflow: auto; padding: 6px;
  background: var(--pop); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow);
  animation: popIn var(--t-1) var(--ease);
}
.res {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer;
}
.res.on, .res:hover { background: #1b1b1b; }
.res .av { width: 32px; height: 32px; border-radius: 9px; }
.res-main { min-width: 0; }
.res b { display: block; font-weight: 600; font-size: var(--fs-14); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res small { display: block; color: var(--dim); font-size: var(--fs-12); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-nl { color: var(--mute); }
.res .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.res-mc { font: var(--fs-13) var(--mono); color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.res-rank { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); font-weight: 600; color: var(--text); white-space: nowrap; }
.res-rank .dot { width: 6px; height: 6px; }
.res-rank.muted { color: var(--mute); font-weight: 500; }
.res-rank.muted .dot { opacity: 0.55; }
.res-rank.pend { color: var(--dim); font-weight: 400; }
.res-rank.pend .dot { background: var(--dim-ui); animation: blink 1.1s ease-in-out infinite; }
.res-note { padding: 14px 12px; color: var(--mute); font-size: var(--fs-13); }
.res-glyph { width: 32px; height: 32px; border-radius: 9px; background: #1a1a1a; display: grid; place-items: center; color: var(--mute); }
.res-glyph svg { width: 15px; height: 15px; }

/* square icon button (search on small screens, alerts bell) */
.icon-btn {
  position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--r); background: #0d0d0d; color: var(--mute); cursor: pointer;
  transition: color var(--t-2) var(--ease), border-color var(--t-2) var(--ease);
}
.icon-btn:hover, .icon-btn[aria-expanded='true'] { color: var(--text); border-color: var(--g5); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.armed::after { content: ''; position: absolute; top: 8px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 2px #0d0d0d; }
.search-btn { display: none; }

/* CA plate (always visible). With a CA: the white plate; one click copies it. A thin border beam
   (a rotated conic pseudo-element: compositor only) runs twice, then only on hover.
   Before launch: a quiet outline chip that links to the explainer. */
.ca { position: relative; height: 40px; flex: none; display: flex; border-radius: var(--r); }
.ca:not(.soon) { padding: 1.5px; overflow: hidden; isolation: isolate; background: #dcdcdc; }
.ca:not(.soon)::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 280px; height: 280px; margin: -140px 0 0 -140px; z-index: -1;
  background: conic-gradient(from 0deg, transparent 0 60%, var(--legend) 80%, transparent 94%);
  opacity: 0; will-change: transform, opacity; pointer-events: none;
  animation: beam 9s linear 1.2s 2 both;
}
.ca:not(.soon):hover::before { animation: beam 9s linear infinite; }
@keyframes beam { 0% { transform: rotate(0deg); opacity: 0; } 6%, 94% { opacity: 0.6; } 100% { transform: rotate(360deg); opacity: 0; } }
.ca-btn {
  all: unset; box-sizing: border-box; cursor: pointer; height: 100%; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 13px;
  border-radius: 8.5px; background: var(--text); color: #0a0a0a; font-weight: 600; font-size: var(--fs-14); white-space: nowrap;
}
.ca-btn .addr { font: 500 var(--fs-13) var(--mono); color: #444; }
.ca-btn svg { width: 14px; height: 14px; color: #6a6a6a; transition: color var(--t-1) var(--ease); }
.ca-btn:hover svg { color: #0a0a0a; }
.ca-btn:focus-visible { box-shadow: inset 0 0 0 2px #0a0a0a; }
.ca-soon {
  display: flex; align-items: center; gap: 9px; height: 100%; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r);
  font-weight: 600; font-size: var(--fs-14); white-space: nowrap; transition: border-color var(--t-2) var(--ease), background var(--t-2) var(--ease);
}
.ca-soon .addr { font: 500 var(--fs-12) var(--mono); color: var(--dim); }
.ca-soon:hover { border-color: #3a3a3a; background: var(--raise); }

/* popover card (alerts panel) */
.pop-wrap { position: relative; }
.panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; width: 330px; padding: 8px;
  background: var(--pop); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow);
  animation: popIn var(--t-2) var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: translateY(-6px); } }
.panel h3 { font-size: var(--fs-15); font-weight: 600; padding: 10px 12px 2px; }
.panel .panel-sub { color: var(--mute); font-size: var(--fs-13); padding: 0 12px 8px; }
.panel-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 8px 12px; border-radius: var(--r-sm); font-size: var(--fs-14); }
.panel-row:hover { background: var(--raise); }
.panel-row label { display: flex; align-items: center; gap: 9px; cursor: pointer; flex: 1; }
.panel-row small { display: block; color: var(--dim); font-size: var(--fs-12); }
.panel hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.panel .link { all: unset; cursor: pointer; color: var(--mute); font-size: var(--fs-13); }
.panel .link:hover { color: var(--text); }
.panel-link { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 8px 12px; border-radius: var(--r-sm); color: var(--mute); font-size: var(--fs-14); }
.panel-link:hover { color: var(--text); background: var(--raise); }
.panel .link:focus-visible, .toast-act:focus-visible, .hdr.searching .search-x:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* ---------- 5. controls ---------- */
.btn {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r); background: var(--text); color: #0a0a0a; font-weight: 600; font-size: var(--fs-14); white-space: nowrap;
  transition: opacity var(--t-2) var(--ease), background var(--t-2) var(--ease), border-color var(--t-2) var(--ease);
}
.btn:hover { opacity: 0.88; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn.ghost:hover { opacity: 1; border-color: #3a3a3a; background: var(--raise); }
.btn.sm { height: 32px; padding: 0 12px; font-size: var(--fs-13); border-radius: var(--r-sm); }
.btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* switch: <button class="switch" role="switch" aria-checked="true|false"> */
.switch {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative; flex: none;
  width: 34px; height: 20px; border-radius: 99px; background: var(--g4); transition: background var(--t-2) var(--ease);
}
.switch::after {
  content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--mute);
  transition: transform var(--t-2) var(--ease), background var(--t-2) var(--ease);
}
.switch[aria-checked='true'] { background: var(--text); }
.switch[aria-checked='true']::after { transform: translateX(14px); background: #0a0a0a; }
.switch:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
/* label + switch, used in toolbars (the label is the 40px tap target) */
.check { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; color: var(--mute); font-size: var(--fs-14); cursor: pointer; white-space: nowrap; user-select: none; transition: color var(--t-1) var(--ease); }
.check:hover { color: var(--text); }

/* tabs */
.tabs { display: flex; align-items: center; gap: 4px; min-width: 0; }
.tab {
  all: unset; cursor: pointer; position: relative; display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--mute); font-size: var(--fs-14); white-space: nowrap; transition: background var(--t-2) var(--ease), color var(--t-2) var(--ease);
}
.tab::after { content: ''; position: absolute; inset: -3px 0; } /* 40px tap target */
.tab:hover { color: var(--text); }
.tab.on { background: #1d1d1d; color: var(--text); }
.tab:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }

/* popover menu (ui.js openMenu) */
.menu {
  position: fixed; z-index: 70; min-width: 210px; padding: 6px;
  background: #141414; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
  animation: popIn var(--t-1) var(--ease);
}
.menu button, .menu a {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 40px; padding: 9px 12px; border-radius: var(--r-sm); font-size: var(--fs-14); color: var(--text);
}
.menu button:hover, .menu a:hover, .menu .on { background: var(--g3); }
.menu button:focus-visible, .menu a:focus-visible { background: var(--g3); outline: 2px solid var(--text); outline-offset: -2px; }
.menu .sub { color: var(--dim); font-size: var(--fs-12); padding: 6px 12px 4px; }

/* popover (ui.js: rank badges, [data-tip]) */
.tip {
  position: fixed; z-index: 90; width: max-content; max-width: min(300px, calc(100vw - 16px)); padding: 12px 14px;
  background: var(--pop); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
  color: var(--mute); font-size: var(--fs-13); line-height: 1.45; text-align: left;
  opacity: 0; transform: translateY(4px); transition: opacity var(--t-1) var(--ease), transform var(--t-1) var(--ease);
}
.tip[data-side='above'] { transform: translateY(-4px); }
.tip.on { opacity: 1; transform: none; }
.tip b { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--text); font-size: var(--fs-14); font-weight: 600; }
.tip b.muted .dot { opacity: 0.55; }
.tip b span { margin-left: auto; padding-left: 16px; color: var(--dim); font-size: var(--fs-12); font-weight: 400; }
.tip .tip-sc { margin-top: 6px; color: var(--dim); font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.tip .tip-go { display: inline-flex; align-items: center; min-height: 32px; margin-top: 6px; color: var(--text); font-weight: 500; }
.tip .tip-go:hover { text-decoration: underline; text-underline-offset: 3px; }

/* sortable table head (ui.js sortHeadHTML) */
.sort {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: inline-flex; align-items: center; gap: 6px;
  color: inherit; white-space: nowrap; transition: color var(--t-1) var(--ease);
}
.sort::after { content: ''; position: absolute; top: -12px; bottom: -12px; left: 50%; width: max(calc(100% + 8px), 44px); transform: translateX(-50%); } /* tap target ≥ 40×44 */
.sort:hover, .sort.on { color: var(--text); }
.sort:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }
.sort:not(.on) .sort-i { display: none; }
.sort-i { width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: 0; transition: opacity var(--t-1) var(--ease), transform var(--t-2) var(--ease); }
.sort.on .sort-i { opacity: 1; }
.sort[aria-sort='ascending'] .sort-i { transform: translateY(1px) rotate(-135deg); }
.sort-sep { margin: 0 6px; color: var(--dim-ui); }
/* narrow screens: one select (ui.js sortSelectHTML) */
.sort-sel { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font-size: var(--fs-13); }
.sort-sel select {
  appearance: none; -webkit-appearance: none; height: 36px; padding: 0 30px 0 11px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #0d0d0d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b8b8b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center;
  color: var(--text); font: 500 var(--fs-13) var(--font); cursor: pointer;
}
.sort-sel select:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }

/* ---------- 6. hero + stats ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 560px; gap: 32px; align-items: stretch; padding: 6px 0 8px; }
.hero-copy { display: flex; flex-direction: column; padding: 40px 0 4px; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: auto; padding-top: 28px; }
.stat { border-top: 1px solid var(--line); padding-top: 14px; min-width: 0; }
.stat b { display: block; font-size: var(--fs-40); font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat b.wait { color: var(--dim-ui); }
.stat b.in { animation: statIn var(--t-2) var(--ease) both; }
@keyframes statIn { from { opacity: 0; } }
.stat > span { display: block; color: var(--mute); font-size: var(--fs-14); margin-top: 6px; line-height: 1.35; }
.stat .sh { display: none; } /* the phone wording */
.stats-note { margin-top: 12px; color: var(--dim); font-size: var(--fs-13); min-height: 19px; }

/* ---------- 7. the 3D sorter stage (sorter.js) ---------- */
.stage { position: relative; height: 510px; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.9s var(--ease); }
.stage.ready canvas { opacity: 1; }
.poster {
  position: absolute; left: 50%; top: 9%; height: 76%; aspect-ratio: 10.8 / 13; transform: translateX(-50%);
  border: 1px solid #1c1c1c; border-radius: 20px;
  background: radial-gradient(circle, #262626 1.6px, transparent 2.2px) 50% 18% / 34px 26px, #0d0d0d;
  transition: opacity 0.9s var(--ease);
}
.stage.ready .poster { opacity: 0; }
.ov { position: absolute; inset: 0; pointer-events: none; }
.bl { position: absolute; left: 0; top: 0; text-align: center; white-space: nowrap; will-change: transform; transition: opacity 0.6s var(--ease); }
.bl .n { display: block; font: 500 22px/1 var(--mono); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text); transition: color 0.8s var(--ease); }
.bl .t { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 7px; font-size: var(--fs-12); color: var(--mute); }
.bl.hit .n { color: var(--c); transition: none; }
.reader {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: 4px 11px 4px 4px; border-radius: var(--r);
  white-space: nowrap; background: rgba(18, 18, 18, 0.9); border: 1px solid var(--line-2); font-size: var(--fs-13);
  opacity: 0; transition: opacity 0.4s var(--ease); will-change: transform;
}
.reader.on { opacity: 1; }
.reader img { position: relative; overflow: hidden; }
.reader img::before { content: ''; position: absolute; inset: 0; background: #222; border-radius: inherit; } /* broken or still loading: a quiet tile */
.reader.noimg { padding-left: 11px; }
.reader.noimg img { display: none; }
.reader img, .reader .av { width: 24px; height: 24px; border-radius: 7px; object-fit: cover; background: #222; font-size: var(--fs-12); }
.reader .tk { font-family: var(--mono); color: var(--text); max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.reader .rk { font-weight: 600; color: var(--c); min-width: 64px; }
.reader::after { content: ''; position: absolute; left: var(--tail, 50%); top: 100%; width: 1px; height: 14px; background: linear-gradient(#555, transparent); }
.stage:not(.ready):not(.still) .bl { opacity: 0; }
/* no WebGL / reduced motion (.still): sorter.js keeps the poster, draws the bin levels and places the counters */
.fbins { position: absolute; left: 4%; right: 4%; bottom: 3%; height: 28%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 3%; align-items: end; }
.fbins i { height: var(--h, 0%); border-top: 2px solid var(--c); background: linear-gradient(color-mix(in srgb, var(--c) 28%, transparent), transparent); transition: height 0.8s var(--ease); }
/* sorter DOM: the bin counters are buttons (tap a bin → that rank's tab), the caption, the pill's text run */
.stage .bl { appearance: none; -webkit-appearance: none; background: none; border: 0; margin: 0; padding: 0; font: inherit; color: inherit;
  display: flex; flex-direction: column; align-items: center; cursor: default; pointer-events: none; border-radius: 8px; -webkit-tap-highlight-color: transparent; }
.stage .bl .t { transition: color .3s ease; }
.stage.tappable .bl { pointer-events: auto; cursor: pointer; }
.stage.tappable .bl:hover .t { color: var(--text); }
.stage .bl:focus-visible { outline: 1px solid var(--line-2, #262626); outline-offset: 4px; }
.stage .sorter-cap { position: absolute; left: 0; top: 0; font-size: var(--fs-12); line-height: 16px; color: var(--dim); white-space: nowrap; pointer-events: none; transition: opacity .6s ease; }
.stage:not(.ready):not(.still):not(.seeded) .sorter-cap { opacity: 0; }
.stage .reader .rc { display: flex; align-items: center; gap: inherit; min-width: 0; overflow: hidden; }
.stage .reader .rc > * { flex: none; }
.stage.nodot .bl .t .dot { display: none; }
.stage.crop .reader::after, .stage.still .reader::after { display: none; }

/* ---------- 8. the board (live table) ---------- */
.board { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; }
/* #8 spotlight that follows the pointer */
.board::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(420px circle at var(--x, 50%) var(--y, 0), rgba(255, 255, 255, 0.03), transparent 60%);
  opacity: 0; transition: opacity var(--t-2) var(--ease);
}
.board:hover::before { opacity: 1; }
.board-bar { display: flex; align-items: center; gap: 6px 16px; padding: 7px 12px 7px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.board-bar .tabs { flex: 1 1 auto; }
.board-tools { display: flex; align-items: center; gap: 18px; padding-right: 4px; }
.filters { display: flex; align-items: center; gap: 18px; }
.filt-btn, .board-tools .sort-wrap { display: none; }

/* one quiet line: what the ranks mean, and what "listed" means */
.board-legend { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 20px; padding: 7px 20px 8px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: var(--fs-12); line-height: 1.5; }
.board-legend .lg { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
.board-legend .lg > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.board-legend .lg-lead { color: var(--mute); }
.board-legend .dot { width: 6px; height: 6px; }
.board-legend .lg-cap { color: var(--mute); white-space: nowrap; flex: none; }

/* live status dot: .live-status[data-state="live|slow|reconnecting|connecting"] */
.live-status { display: flex; align-items: center; gap: 9px; font-weight: 600; margin-right: 4px; white-space: nowrap; min-width: 54px; font-size: var(--fs-14); }
.live-status i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--dim-ui); flex: none; }
.live-status[data-state='live'] i { background: var(--text); }
.live-status[data-state='live'] i::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; background: var(--text);
  opacity: 0; animation: ring 2.4s var(--ease-io) infinite;
}
.live-status[data-state='slow'] i { background: var(--mute); }
.live-status[data-state='slow'] span { color: var(--mute); font-weight: 500; }
.live-status[data-state='reconnecting'] i, .live-status[data-state='connecting'] i { animation: blink 1.2s ease-in-out infinite; }
.live-status[data-state='reconnecting'] span { color: var(--mute); font-weight: 500; }
@keyframes ring { 0% { transform: scale(0.5); opacity: 0.3; } 70%, 100% { transform: scale(1.3); opacity: 0; } }
@keyframes pulse { 50% { opacity: 0.5; } }
@keyframes blink { 50% { opacity: 0.3; } }

/* "Paused · move the mouse away" pill, floats over the column labels (no layout shift) */
.board-pause {
  position: absolute; left: 50%; z-index: 3; transform: translate(-50%, -4px); pointer-events: none;
  padding: 5px 12px; border-radius: 99px; background: #1d1d1d; border: 1px solid var(--line-2); color: var(--text); font-size: var(--fs-13);
  opacity: 0; transition: opacity var(--t-2) var(--ease), transform var(--t-2) var(--ease); white-space: nowrap;
}
.board.paused .board-pause { opacity: 1; transform: translate(-50%, 0); }
.board-pause span { color: var(--mute); }

/* rows (shared grid, other boards build on it): coin | dev rank | record | mcap/ATH | actions */
.row {
  position: relative; display: grid; grid-template-columns: minmax(0, 290px) 150px minmax(0, 1fr) 112px 66px;
  align-items: center; gap: 20px; padding: 0 14px 0 20px; height: 62px; border-bottom: 1px solid var(--row-line);
}
.rows .row:last-child { border-bottom: 0; }
.row.head { height: 40px; color: var(--dim); font-size: var(--fs-12); letter-spacing: 0.04em; text-transform: uppercase; }
.row.head .r { text-align: right; }
.rows .row { transition: background var(--t-1) var(--ease); }
.rows .row:hover { background: var(--raise); }
.rows .row.moving { z-index: 1; }
.row.new { animation: rowFade var(--t-3) var(--ease) both; }
@keyframes rowFade { from { opacity: 0; transform: translateY(-6px); } }

/* the live board (home): coin | dev rank · score | record | activity | mcap/ATH | actions
   (.dv wraps rank + record: display:contents here, a line of its own on phones) */
.lv .row { grid-template-columns: minmax(0, 250px) 150px minmax(0, 1fr) 204px 108px 72px; gap: 18px; padding: 0 12px 0 20px; height: 60px; }
.lv .row .dv { display: contents; }
.lv .row.head { height: 36px; }
.lv .row.head > div { white-space: nowrap; }
.lv .row.head > :nth-child(5) { justify-self: end; text-align: right; }
.lv .rows .row { background: var(--panel); }
.lv .rows .row:not(.sk) { cursor: pointer; }
.lv .rows .row:hover { background: var(--raise); }
/* D4: real height in (--row-h, measured), height + padding out */
.row.in { animation: rowIn var(--row-in, var(--t-3)) var(--ease) both; overflow: hidden; }
.lv .rows .row.new:not(.in) { animation: none; } /* rowIn already faded it in: no second fade once it ends (the glow stays) */
@keyframes rowIn { from { height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; transform: translateY(-6px); } to { height: var(--row-h); opacity: 1; transform: none; } }
.row.out {
  overflow: hidden; opacity: 0; padding-top: 0 !important; padding-bottom: 0 !important; border-bottom-color: transparent; pointer-events: none;
  transition: height var(--row-out, 380ms) var(--ease-io), padding var(--row-out, 380ms) var(--ease-io), opacity 240ms var(--ease-io), border-color var(--row-out, 380ms) var(--ease-io);
}
.row.new::after, .row.lit::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--c, var(--unknown)), transparent 55%); opacity: 0; animation: glow 2.6s var(--ease) both;
}
@keyframes glow { 0% { opacity: 0.12; } 100% { opacity: 0; } }
@keyframes rowOut { to { height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; } }

.coin { display: flex; align-items: center; gap: 12px; min-width: 0; }
.coin-t { min-width: 0; }
.coin b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin small { display: block; color: var(--dim); font-size: var(--fs-13); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin .nm { display: block; min-width: 0; }
a.coin:hover b, .coin a.nm:hover b { text-decoration: underline; text-decoration-color: #444; text-underline-offset: 3px; }
.copycat { color: var(--mute); }
/* ticker that copies the contract address */
.tk { all: unset; cursor: pointer; position: relative; border-radius: 4px; transition: color var(--t-1) var(--ease); }
.tk::after { content: ''; position: absolute; inset: -12px -4px; }
.tk:hover { color: var(--text); }
.tk:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }

/* coin avatar: <img class="av"> or <span class="av ph">A</span> */
.av { width: 38px; height: 38px; border-radius: var(--r); object-fit: cover; background: #1c1c1c; flex: none; }
.av.ph { display: grid; place-items: center; color: var(--mute); font-weight: 600; font-size: var(--fs-15); text-transform: uppercase; }
/* a broken <img> renders its pseudo-elements: while a fallback loads (or before ui.js swaps in the tile)
   it shows the letter tile instead of the browser's broken-image icon */
img.av { position: relative; overflow: hidden; }
img.av::before {
  content: attr(data-ph); position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit;
  background: #1c1c1c; color: var(--mute); font-weight: 600; text-transform: uppercase;
}
.av.sm { width: 28px; height: 28px; border-radius: 8px; font-size: var(--fs-12); }
.av.lg { width: 64px; height: 64px; border-radius: 16px; font-size: 22px; }

/* rank badge (ui.js rankBadge): dot + word + quiet score; hover/tap opens the popover */
.rank { position: relative; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; min-width: 0; }
.rank em { font-style: normal; color: var(--dim); font-weight: 400; font-family: var(--mono); font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
a.rank::after { content: ''; position: absolute; inset: -10px -6px; } /* 40px tap target */
a.rank:hover .rk { text-decoration: underline; text-decoration-color: #444; text-underline-offset: 3px; }
.rank.muted .rk { color: var(--mute); font-weight: 500; }
.rank.muted .dot { opacity: 0.55; }
.rank[data-bot] .dot, .res-rank[data-bot] .dot { background: var(--unknown); }
.rank.checking { color: var(--mute); font-weight: 500; }
.rank.checking .dot { background: var(--dim-ui); animation: blink 1.1s ease-in-out infinite; }
.rkc { position: relative; display: flex; align-items: center; min-width: 0; }

.line { position: relative; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* in-place change (rank word, record line): the old content fades out over the new */
.xf-out { position: absolute; inset: 0; display: flex; align-items: center; pointer-events: none; animation: xfOut var(--t-2) var(--ease) both; }
.line > .xf-out { display: block; overflow: hidden; text-overflow: ellipsis; white-space: inherit; }
.xf-in { animation: xfIn var(--t-2) var(--ease) both; }
@keyframes xfOut { to { opacity: 0; } }
@keyframes xfIn { from { opacity: 0; } }

/* activity: "12 buys · 9 traders · $1.4K" ("vol" spelled out where no column header says it) */
.actv { color: var(--mute); font-size: var(--fs-13); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (min-width: 961px) { .lv .actv .u { display: none; } }

.cap { text-align: right; font-family: var(--mono); font-size: var(--fs-14); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cap small { display: block; color: var(--dim); font-size: var(--fs-12); }
.cap.painted .mc { color: var(--mute); cursor: help; text-decoration: underline dotted var(--dim-ui); text-underline-offset: 4px; }

/* quiet row actions: watch bell + ⋯ menu */
.acts { display: flex; justify-content: flex-end; gap: 4px; }
.act {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative; width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-sm);
  color: var(--dim-ui); transition: background var(--t-1) var(--ease), color var(--t-1) var(--ease);
}
.act::after { content: ''; position: absolute; inset: -4px; } /* 40px tap target */
.act svg { width: 15px; height: 15px; }
.row:hover .act, .act:focus-visible, .act[aria-expanded='true'] { color: var(--mute); }
.act:hover { background: var(--g3); color: var(--text); }
.act.on { color: var(--text); }
.act.on svg { fill: currentColor; }
.act:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; color: var(--text); }

.board-more { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-top: 1px solid var(--row-line); color: var(--mute); font-size: var(--fs-14); transition: color var(--t-1) var(--ease), background var(--t-1) var(--ease); }
.board-more:hover { color: var(--text); background: var(--raise); }

/* phones: rows that arrived while the reader was down the board */
.new-pill {
  all: unset; box-sizing: border-box; cursor: pointer; position: fixed; z-index: 45; left: 50%; top: calc(var(--hdr-h) + var(--nav-h) + 10px);
  transform: translateX(-50%); min-height: 40px; padding: 0 18px; display: flex; align-items: center; border-radius: 99px;
  background: var(--text); color: #0a0a0a; font-weight: 600; font-size: var(--fs-13); box-shadow: var(--shadow);
  animation: pillIn var(--t-2) var(--ease) both; transition: top var(--t-2) var(--ease);
}
.hdr.tuck + main .new-pill { top: calc(var(--hdr-h) + 10px); }
@keyframes pillIn { from { opacity: 0; transform: translate(-50%, -6px); } }

/* ---------- 9. cards (dev / coin pages) ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { font-size: var(--fs-15); font-weight: 600; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px 24px; }
.kv dt { color: var(--mute); font-size: var(--fs-13); }
.kv dd { margin: 4px 0 0; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.meter { height: 6px; border-radius: 99px; background: #1d1d1d; overflow: hidden; }
.meter > i { display: block; height: 100%; width: var(--v, 0%); background: var(--c, var(--text)); border-radius: inherit; transition: width 0.8s var(--ease); }

/* ---------- 10. loading + empty ---------- */
/* shimmer as a moving pseudo-element (transform only: no repaint of the bar itself) */
.skel { position: relative; overflow: hidden; display: inline-block; height: 12px; width: 60%; border-radius: 6px; vertical-align: middle; background: #181818; }
.skel::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: sheen 1.6s var(--ease-io) infinite;
}
@keyframes sheen { to { transform: translateX(100%); } }
@keyframes shimmer { to { background-position: -300% 0; } } /* kept for page styles that shimmer a background */
.empty { padding: 48px 20px; text-align: center; color: var(--mute); }

/* ---------- 11. toasts (#16, core.js toast) ---------- */
.toasts {
  position: fixed; left: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 10px;
  width: min(420px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  pointer-events: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; align-items: center;
  padding: 12px 14px 12px 16px; background: var(--pop); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow);
  transform: translateY(160%); opacity: 0; transition: transform var(--t-3) var(--ease), opacity 0.4s var(--ease);
}
.toast.show { transform: none; opacity: 1; }
.toast > :not(.toast-act) { grid-column: 1; min-width: 0; }
.toast b { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--fs-14); }
.toast span, .toast small { display: block; color: var(--mute); font-size: var(--fs-13); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast p { color: var(--mute); font-size: var(--fs-13); line-height: 1.4; margin-top: 2px; }
.toast-act {
  all: unset; cursor: pointer; grid-column: 2; grid-row: 1 / span 3; min-height: 32px; padding: 0 12px; display: flex; align-items: center; border-radius: var(--r-sm);
  border: 1px solid var(--g5); font-size: var(--fs-13); font-weight: 600; color: var(--text);
}
.toast-act:hover { background: #1d1d1d; }

/* ---------- 12. footer ---------- */
.ftr { border-top: 1px solid var(--line); margin-top: 72px; }
.ftr-in { max-width: var(--page); margin: 0 auto; display: flex; align-items: center; gap: 10px 24px; flex-wrap: wrap; padding: 26px var(--gutter); color: var(--dim); font-size: var(--fs-13); }
.ftr-in p { color: var(--mute); }
.ftr-in a { color: var(--mute); transition: color var(--t-1) var(--ease); }
.ftr-in a:hover { color: var(--text); }

/* ---------- 13. page transitions (#17, cross-document, Chrome 126+) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .ca:not(.soon)::before, .skel::after, .live-status i::after { display: none; }
}

/* ---------- 14. responsive ---------- */
@media (max-width: 1240px) {
  .hdr-in { gap: 28px; }
  .nav { gap: 22px; }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .hero { grid-template-columns: minmax(0, 1fr) 440px; }
  .h-display { font-size: 64px; }
  .stats { gap: 16px; }
  .stat b { font-size: 32px; }
  .row { grid-template-columns: minmax(0, 220px) 130px minmax(0, 1fr) 100px 66px; gap: 16px; }
  .lv .row { grid-template-columns: minmax(0, 186px) 132px minmax(0, 1fr) 176px 92px 72px; gap: 12px; padding-left: 16px; }
  .lv .actv { font-size: var(--fs-12); }
  .board-legend { flex-wrap: wrap; }
}
/* below 1100 the search field folds into an icon; tapping it opens the field over the header */
@media (max-width: 1100px) {
  .search { display: none; }
  .search-btn { display: grid; }
  .hdr.searching .search {
    display: flex; position: absolute; left: var(--gutter); right: var(--gutter); top: 13px; width: auto; z-index: 5; background: #0d0d0d; border-color: var(--g5);
  }
  .hdr.searching .search-x { all: unset; cursor: pointer; display: grid; place-items: center; width: 32px; height: 32px; color: var(--mute); }
}
/* portrait tablets: the hero stacks (headline, machine, stats); each row puts the record under the rank
   and the activity under the coin */
@media (max-width: 960px) and (min-width: 761px) {
  .hero { grid-template-columns: 1fr; gap: 0; padding: 32px 0 24px; }
  .hero-copy { display: contents; }
  .h-display { font-size: 72px; }
  .lede { max-width: 600px; }
  .stage { order: 3; height: 500px; margin-top: 24px; }
  .stats { order: 4; margin-top: 24px; padding-top: 0; }
  .stats-note { order: 5; }
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) 96px 66px; gap: 3px 16px; height: auto; min-height: 62px; padding-top: 10px; padding-bottom: 10px; }
  .row.head { min-height: 0; padding-top: 0; padding-bottom: 0; }
  .row.head > :nth-child(3) { display: none; }
  .rows .row .coin { grid-column: 1; grid-row: 1 / span 2; }
  .rows .row .rank { grid-column: 2; grid-row: 1; align-self: end; }
  .rows .row .line { grid-column: 2; grid-row: 2; align-self: start; font-size: var(--fs-13); }
  .rows .row .cap { grid-column: 3; grid-row: 1 / span 2; }
  .rows .row .acts { grid-column: 4; grid-row: 1 / span 2; }

  .lv .rows .row:not(.sk) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 96px 72px; grid-template-areas: 'coin dv cap acts' 'actv dv cap acts';
    gap: 2px 16px; height: auto; min-height: 60px; padding-top: 10px; padding-bottom: 10px;
  }
  .lv .rows .row .coin, .lv .rows .row .rank, .lv .rows .row .line, .lv .rows .row .cap, .lv .rows .row .acts { grid-column: auto; grid-row: auto; }
  .lv .rows .row .coin { grid-area: coin; }
  .lv .rows .row .actv { grid-area: actv; padding-left: 50px; font-size: var(--fs-12); }
  .lv .rows .row .dv { grid-area: dv; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
  .lv .rows .row .line { width: 100%; }
  .lv .rows .row .cap { grid-area: cap; }
  .lv .rows .row .acts { grid-area: acts; }
  .lv .row.head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 96px 72px; gap: 16px; }
  .lv .row.head > :nth-child(3), .lv .row.head > :nth-child(4) { display: none; }
  .lv .row.sk { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 96px 72px; height: 62px; }
  .lv .row.sk > :nth-child(3), .lv .row.sk > :nth-child(4) { display: none; }
}
/* narrow tablets: with a real CA the plate keeps ticker + copy icon and drops the short address */
@media (max-width: 900px) and (min-width: 761px) {
  .hdr-in { gap: 20px; }
  .nav { gap: 18px; }
  .ca-btn .addr { display: none; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; --hdr-h: 58px; --nav-h: 46px; }
  /* one row (brand + tools) that stays; the nav row under it folds away while scrolling down */
  .hdr { margin-bottom: var(--nav-h); }
  .hdr-in { gap: 8px; }
  .brand { font-size: 18px; }
  .hdr-tools { gap: 6px; min-width: 0; }
  .nav {
    position: absolute; left: 0; right: 0; top: calc(100% + 1px); height: var(--nav-h); align-items: center; justify-content: space-between; gap: 12px;
    padding: 0 var(--gutter); background: rgba(10, 10, 10, 0.96); border-bottom: 1px solid var(--line);
    transition: opacity var(--t-2) var(--ease), transform var(--t-2) var(--ease), visibility 0s;
  }
  .nav a { display: flex; align-items: center; min-height: 40px; }
  .hdr.tuck .nav { opacity: 0; transform: translateY(-8px); visibility: hidden; pointer-events: none; transition: opacity var(--t-2) var(--ease), transform var(--t-2) var(--ease), visibility 0s linear var(--t-2); }
  .ca-btn { gap: 8px; padding: 0 11px 0 12px; }
  .ca-btn .addr { display: none; }
  .ca-soon { gap: 7px; padding: 0 12px; }
  .icon-btn { width: 40px; height: 40px; }
  .hdr.searching .search { top: 9px; }
  .panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }

  .section { margin-bottom: 48px; }
  .h-display { font-size: 40px; }
  .h-page { font-size: 40px; }
  .h2 { font-size: 24px; }
  .lede { font-size: var(--fs-15); margin-top: 14px; }

  .hero { grid-template-columns: 1fr; gap: 0; padding: 12px 0 10px; }
  .hero-copy { display: contents; }
  .h-display { font-size: 38px; }
  .stage { order: 3; height: 320px; margin: 6px calc(-1 * var(--gutter)) 0; }
  .stats { order: 4; gap: 12px; margin-top: 6px; padding-top: 0; }
  .stats-note { display: none; }
  .stat { padding-top: 9px; }
  .stat b { font-size: var(--fs-28); }
  .stat > span { font-size: var(--fs-12); margin-top: 3px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stat .lg-w { display: none; }
  .stat .sh { display: inline; }
  .bl .n { font-size: 16px; }
  .bl .t { font-size: var(--fs-12); margin-top: 5px; }
  .bl .t .dot { display: none; }
  .reader { font-size: var(--fs-12); gap: 6px; padding: 3px 9px 3px 3px; }
  .reader img, .reader .av { width: 20px; height: 20px; border-radius: 6px; }
  .reader .rk { min-width: 56px; }

  .board { margin: 0 calc(-1 * var(--gutter) + 6px); }
  .board-bar { padding: 3px 8px 1px 12px; gap: 0 8px; }
  .board-bar .tabs {
    order: 3; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -8px 0 -12px; padding: 0 28px 0 8px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  }
  .board-bar .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 7px 10px; }
  /* the tools join the bar's own wrap: [status · sort · Filters] / [switches, when open] / [tabs] */
  .board-tools { display: contents; }
  .board-tools .sort-wrap { display: block; margin-left: auto; }
  .sort-sel > span { display: none; }
  .sort-sel select { height: 40px; }
  .filt-btn {
    all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
    background: #0d0d0d; color: var(--text); font-weight: 500; font-size: var(--fs-13); white-space: nowrap;
  }
  .filt-btn[aria-expanded='true'] { border-color: var(--g5); }
  .filt-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
  .filters { display: none; order: 2; flex: 1 1 100%; gap: 0 18px; flex-wrap: wrap; padding: 2px 0 2px 2px; }
  .board.filters-open .filters { display: flex; }
  .check { font-size: var(--fs-13); gap: 8px; }
  .board-legend { display: block; padding: 6px 14px 8px; line-height: 1.4; }
  .board-legend .lg { gap: 0 10px; }
  .board-legend .lg-cap { display: inline; }
  .board-legend .lg-cap::before { content: ''; }

  /* coin + mcap on top; activity under the coin; rank + record (+ actions) on the last line,
     everything hanging off the name column (avatar 38 + gap 12) */
  /* shared rows: coin + mcap on top; rank, record and actions hang off the name column (avatar 38 + gap 12) */
  .row { grid-template-columns: minmax(0, 1fr) auto; height: auto; padding: 12px 8px 13px 14px; gap: 2px 12px; }
  .row.head { display: none; }
  .row .coin { grid-column: 1; grid-row: 1; }
  .row .cap { grid-column: 2; grid-row: 1; padding-right: 6px; }
  .row .rank { grid-column: 1; grid-row: 2; margin-left: 50px; }
  .row .acts { grid-column: 2; grid-row: 2; }
  .row .line { grid-column: 1 / -1; grid-row: 3; padding: 0 6px 0 50px; font-size: var(--fs-13); white-space: normal; }

  /* the live board: coin + mcap; activity under the coin; rank + record (+ actions) on the last line */
  .lv .rows .row:not(.sk) {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'coin cap' 'actv actv' 'dv acts';
    height: auto; padding: 11px 8px 11px 14px; gap: 1px 10px;
  }
  .lv .rows .row .coin, .lv .rows .row .cap, .lv .rows .row .rank, .lv .rows .row .line, .lv .rows .row .acts { grid-column: auto; grid-row: auto; margin-left: 0; padding: 0; }
  .lv .rows .row .coin { grid-area: coin; }
  .lv .rows .row .cap { grid-area: cap; padding-right: 6px; }
  .lv .rows .row .actv { grid-area: actv; padding-left: 50px; font-size: var(--fs-12); }
  .lv .rows .row .dv { grid-area: dv; display: flex; align-items: center; gap: 10px; padding-left: 50px; min-width: 0; }
  .lv .rows .row .rkc { flex: none; min-height: 30px; }
  .lv .rows .row .line { flex: 1 1 auto; font-size: var(--fs-13); white-space: nowrap; }
  .lv .rows .row .acts { grid-area: acts; align-self: center; }
  .lv .row.sk { grid-template-columns: minmax(0, 1fr) 72px; height: 66px; padding: 0 14px; gap: 12px; }
  .lv .row.sk > :nth-child(2), .lv .row.sk > :nth-child(3), .lv .row.sk > :nth-child(4), .lv .row.sk > :nth-child(6) { display: none; }
  .board-pause { display: none; }

  .ftr { margin-top: 48px; }
  .toasts { left: 12px; bottom: 12px; width: calc(100vw - 24px); }
}
/* small phones: the headline, the machine and the board say it; the lede goes */
@media (max-width: 400px) {
  .lede { display: none; }
}
@media (max-width: 370px) {
  .brand span { display: none; } /* very narrow phones: the mark alone */
}
