/* The coins board.
 *
 * Every other listing on Solana ranks coins by price action. The one thing
 * this board has that pump.fun's does not is WHAT THE FEE DOES, which is the
 * entire reason a coin launched here, so the job is given real estate and the
 * market numbers are not. A card showing mcap and volume and not the job would
 * be a worse pump.fun.
 *
 * It also has to look right with no market data at all, because that is the
 * state it is in until an indexer exists. Nothing here renders a zero we made
 * up: a number we do not have is absent, and the sort control says which
 * orderings carry information.
 */

.head { padding: 34px 0 20px; }
.head h1 { font: 600 30px/1.1 Geist, sans-serif; color: var(--txt-hero); letter-spacing: -.02em; }
.head .mid { margin-top: 8px; max-width: 46ch; font-size: 13.5px; line-height: 1.55; color: var(--txt-4); }

/* ------------------------------------------------------------------ sort */

.sortbar {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.sorts { display: flex; gap: 4px; border: 0; padding: 0; margin: 0; flex-wrap: wrap; }
.sorts input { position: absolute; opacity: 0; pointer-events: none; }
.sorts label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: var(--r-sm); cursor: pointer;
  font: 500 12px Geist, sans-serif; color: var(--txt-4);
  border: 1px solid transparent;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.sorts label:hover { background: var(--bg-2); color: var(--txt-2); }
.sorts input:checked + label {
  background: var(--accent-deep); border-color: var(--accent-line); color: var(--accent);
}
.sorts input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

/* An ordering whose column is zero on every row. Shown, not hidden: a reader
   looking for "biggest" should find the control and be told why it is empty,
   not conclude we forgot it. */
.sorts label.unmeasured { color: var(--txt-5); }
.sorts label.unmeasured::after {
  content: 'not measured';
  padding: 1px 4px; border-radius: 3px;
  font: 500 8.5px/1.5 'Geist Mono', monospace; letter-spacing: .06em; text-transform: uppercase;
  background: var(--bg-3); color: var(--txt-5);
}
.sort-note { font-size: 11.5px; line-height: 1.5; }

/* ----------------------------------------------------------------- board */

.board {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  margin-bottom: 20px;
}

/* The coin card (.coin and its parts) lives in style.css: the launch page
   draws the same card as a live preview of how this board will show a coin. */

/* Market numbers, when there are any. Absent, never zero. */
/* The figures wrap as WHOLE units. Without nowrap a narrow card printed
   "mcap 61.7" on one line and "SOL" alone on the next. */
.coin-nums { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.coin-num { font: 500 11px 'Geist Mono', monospace; color: var(--txt-4); font-variant-numeric: tabular-nums; white-space: nowrap; }
.coin-num span { color: var(--txt-5); }
/* WHEN the market cap was read. One reading an hour, so the figure without a
   time on it reads as live, which is what every other board on Solana means by
   a market cap. Smaller than the number and not wrapped away from it. */
.coin-num .coin-when { font-size: 10px; font-weight: 400; }

/* ------------------------------------------------- empty, loading, paging */

.coin.skel { pointer-events: none; }
.coin.skel .coin-ph, .coin.skel .coin-main > * { background: var(--bg-3); border-radius: var(--r-xs); color: transparent; }
.coin.skel .coin-main > * { height: 10px; margin-bottom: 6px; }
.coin.skel { animation: skel 1.3s var(--ease) infinite; }
@keyframes skel { 0%, 100% { opacity: .55; } 50% { opacity: .9; } }

.empty {
  grid-column: 1 / -1; padding: 44px 18px; text-align: center;
  border: 1px dashed var(--line-3); border-radius: var(--r-sm);
}
.empty b { display: block; font: 500 14px Geist, sans-serif; color: var(--txt-2); }
.empty p { margin-top: 7px; font-size: 12.5px; line-height: 1.6; color: var(--txt-5); }
.empty a:not(.btn) { color: var(--accent); }

.status { min-height: 18px; font-size: 12px; color: var(--txt-5); }
.more { display: block; margin: 0 auto 48px; }

/* .sr moved to style.css: the launch page needs it too and does not load this
   file, the same trap .seg-pick fell into. */

@media (max-width: 640px) {
  .head { padding: 24px 0 16px; }
  .head h1 { font-size: 25px; }
  .board { grid-template-columns: 1fr; }
  .sorts label { min-height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .coin { transition: none; }
  .coin:hover { transform: none; }
  .coin.skel { animation: none; }
}

/* The board stays readable while it re-sorts. It used to blank to skeletons on
   every sort change, which threw away the positions the FLIP needed and showed
   a grey flash instead of a move. Dimmed and not interactive is enough to say
   "fetching" without deleting what is on screen. */
#board[aria-busy="true"] .coin {
  opacity: .55;
  pointer-events: none;
  transition: opacity var(--t-fast);
}
@media (prefers-reduced-motion: reduce) {
  #board[aria-busy="true"] .coin { transition: none; }
}
