/* Stats page (#/stats). Tokens and the chamfered .panel come from app.css. */
.stats-page { max-width: 1280px; margin: 0 auto; display: grid; gap: 16px; }
.st-head { padding: 8px 4px 0; }
#stBody { display: grid; gap: 16px; }
.st-error { display: grid; justify-items: center; gap: 12px; }
.st-error p { margin: 0; color: var(--ink-2); }

.st-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; background: transparent; }
.st-tile { display: grid; gap: 6px; align-content: start; padding: 16px; background: var(--s2); min-width: 0; }
.st-tile > span { font-size: 12.5px; color: var(--ink-3); }
.st-tile b { font-size: 24px; font-weight: 800; font-stretch: var(--wide); line-height: 1.05; overflow-wrap: anywhere; }
.st-tile small { font-size: 12.5px; color: var(--ink-2); }
.st-hero { clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.st-hero .st-tile { padding: 20px; }
.st-hero .st-tile b { font-size: 34px; }
.st-hero .st-tile:first-child b { color: var(--mint); }
.st-day .st-tiles { background: transparent; border: 0; }
.st-day .st-tile { background: var(--s2); }

.st-bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding: 4px 16px 0; }
.st-bars i { flex: 1; min-width: 2px; height: var(--h); background: var(--mint); opacity: .85; transition: opacity 150ms var(--ease); }
.st-bars i:hover { opacity: 1; background: var(--mint-hi); }
.st-axis { display: flex; justify-content: space-between; padding: 8px 16px 14px; font-size: 11.5px; color: var(--ink-3); margin: 0 16px; padding-inline: 0; }

.st-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.st-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 16px; border: 0; color: inherit; text-decoration: none; }
.st-row:nth-child(even) { background: #141d17; }
.st-traders .st-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.st-row:hover { background: var(--s2); }
.st-row:focus-visible { outline: 2px solid var(--mint); outline-offset: -2px; }
.st-row > img, .st-row > .ic { width: 30px; height: 30px; object-fit: cover; background: var(--s3);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.st-rank { width: 18px; text-align: right; font-weight: 800; font-stretch: var(--semi); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.st-row:nth-child(-n+4) .st-rank { color: var(--mint); }
.st-id { display: grid; gap: 2px; min-width: 0; }
.st-id b { font-weight: 800; font-stretch: var(--wide); text-transform: uppercase; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-id b.st-name { text-transform: none; font-stretch: 100%; font-weight: 600; }
.st-id span { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-vol { display: grid; gap: 5px; justify-items: end; min-width: 96px; }
.st-vol b { font-size: 14px; font-weight: 700; white-space: nowrap; }
.st-vol span { font-size: 12px; color: var(--ink-3); }
.st-vol i { display: block; width: 96px; height: 4px; background: var(--s3); position: relative; }
.st-vol i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--mint); }

@media (max-width: 1000px) { .st-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .stats-page { gap: 12px; }
  #stBody { gap: 12px; }
  .st-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-hero .st-tile { padding: 14px; }
  .st-hero .st-tile b { font-size: 24px; }
  .st-tile b { font-size: 20px; }
  .st-bars { height: 110px; gap: 2px; padding-inline: 12px; }
  .st-row { padding: 10px 12px; gap: 10px; }
  .st-vol { min-width: 0; }
  .st-vol i { width: 64px; }
}
@media (prefers-reduced-motion: reduce) { .st-bars i { transition: none; } }
