/* LIGURR RANKINGS — styles.
   Sits next to the live mint site: Pastel Ice ground, ink #111, Archivo variable, square corners,
   2px black lines, one white board with the hard 4px offset shadow.
   One typeface. No gradients, no radius, no looping motion.
   Spec: ../DESIGN_SPEC.md (round 2 changes are marked R2 there and below).
   Class names are final; wire data into them, do not restyle. */

/* ============ 1. TOKENS ============ */
:root{
  /* ground + ink */
  --ice:#D3E7F2;            /* page ground (Pastel Ice) */
  --ink:#111111;            /* text, lines, shadow, selected fills */
  --paper:#FFFFFF;          /* the board, inputs */
  --paper-soft:rgba(255,255,255,.55); /* quiet cards on the ground (mint site .card) */
  --tint:#EEF5F9;           /* row hover, found row, find result, detail row (Ice at 40% on white) */

  /* text colours that carry meaning — all pass AA on paper, tint and ice */
  --mute:#4F5458;           /* secondary text */
  --gain:#00663D;           /* profit */
  --loss:#A8201A;           /* loss */

  /* pastels (brand palette) */
  --mint:#A8E0C8;           /* Perps tab + header band; Hyperliquid square */
  --mango:#FFD08A;          /* Spot tab + its coming-soon panel; fomo square */
  --periwinkle:#A6B3DF;     /* Onchain tab + its coming-soon panel */
  --lemon:#F4E48A;          /* rank 1 plate */
  --fog:#CFD2DF;            /* rank 2 plate */
  --peach:#FFD2B6;          /* rank 3 plate */
  --coral:#FBB49B;          /* errors only (as on the mint site) */

  /* lines + shadow */
  --line:2px solid var(--ink);
  --hair:1px solid var(--ink);
  --dash:2px dashed var(--ink);   /* dashed always means "not live yet" */
  --shadow:4px 4px 0 var(--ink);  /* the board only */

  /* type */
  --font:"Archivo","Helvetica Neue",Helvetica,Arial,sans-serif;
  --fs-display:26px;        /* h1 */
  --fs-head:24px;           /* h2 */
  --fs-body:15px;
  --fs-cell:15px;           /* table text */
  --fs-value:16px;          /* the ranked number */
  --fs-small:13px;
  --fs-label:11px;

  /* layout */
  --max:1120px;
  --pad:16px;               /* page side padding */
  --inset:12px;             /* padding inside the board */
  --sect:56px;              /* section rhythm */
  --ctl:36px;               /* control height */
  --row:60px;               /* table row height */

  --ease:120ms linear;      /* the only motion: colour/background on state change */
}
@media(min-width:768px){
  :root{ --pad:40px; --inset:20px; --sect:64px; --fs-display:36px; --fs-head:28px; --fs-body:17px }
}
@media(min-width:1024px){
  :root{ --pad:64px; --sect:72px; --fs-display:40px; --fs-head:32px }
}
@media(min-width:1280px){
  :root{ --fs-display:48px }
}
@media(min-width:1100px){
  :root{ --row:52px }
}

/* ============ 2. BASE ============ */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--ice); color:var(--ink);
  font-family:var(--font); font-size:var(--fs-body); line-height:1.5; font-weight:500;
  overflow-x:clip;                 /* clip, not hidden: keeps the sticky table header working */
}
h1,h2,h3,p,ul,ol,dl,dd,figure{margin:0}
ul,ol{padding:0; list-style:none}
h1,h2,h3{font-weight:900; line-height:1}
a{color:inherit}
b,strong{font-weight:800}
img{display:block; max-width:100%; height:auto}
button,input{font:inherit; color:inherit; border-radius:0}
button{cursor:pointer}
[hidden]{display:none!important}
::selection{background:var(--ink); color:var(--ice)}
:focus-visible{outline:2px solid var(--ink); outline-offset:2px}
.skip-link{position:absolute; left:var(--pad); top:-100px; z-index:10; padding:10px 14px; background:var(--ink); color:var(--paper); font-size:var(--fs-small); font-weight:800; text-decoration:none}
.skip-link:focus{top:8px}
.visually-hidden{position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0}

.wrap{
  width:100%; max-width:calc(var(--max) + 2 * var(--pad)); margin:0 auto;
  padding-left:var(--pad); padding-right:var(--pad);
}

/* shared small pieces */
.label{font-size:var(--fs-label); font-weight:800; letter-spacing:.12em; text-transform:uppercase; line-height:1.2}
.muted{color:var(--mute)}
.soon{
  display:inline-block; font-size:10px; font-weight:800; font-stretch:100%; letter-spacing:.12em; text-transform:uppercase;
  line-height:1; padding:3px 5px 2px; border:1.5px dashed currentColor; white-space:nowrap;
}

/* buttons (same family as the mint site) */
.btn{
  display:inline-flex; align-items:center; justify-content:center; min-height:var(--ctl);
  font-size:var(--fs-small); font-weight:800; letter-spacing:.08em; text-transform:uppercase; line-height:1.2;
  color:var(--paper); background:var(--ink); border:var(--line); padding:0 16px; text-decoration:none; white-space:nowrap;
  transition:background-color var(--ease), color var(--ease);
}
.btn:hover{background:transparent; color:var(--ink)}
.btn--ghost{background:transparent; color:var(--ink)}
.btn--ghost:hover{background:var(--ink); color:var(--paper)}
.btn:disabled,.btn[aria-disabled="true"]{opacity:.4; cursor:not-allowed; background:var(--ink); color:var(--paper)}

/* ============ 3. NAV + WORDMARK ============ */
.site-nav{display:flex; align-items:center; gap:24px; padding-top:10px; padding-bottom:10px; min-height:48px}
.wordmark{
  display:inline-flex; align-items:baseline; gap:.45em; text-decoration:none; text-transform:uppercase; line-height:1;
  font-size:15px; font-stretch:125%; letter-spacing:.02em; white-space:nowrap;
}
.wordmark__name{font-weight:900}            /* LIGURR: Archivo 900, width 125, exactly as the mint site */
.wordmark__product{font-weight:500}         /* RANKINGS: same size and width, weight 500 */
.site-nav__links{display:none; gap:24px; margin-left:auto; font-size:var(--fs-small); font-weight:700}
.site-nav__links a{text-decoration:none; border-bottom:var(--hair); line-height:1.3}
.site-nav__links a:hover{border-bottom-width:2px}
.site-nav__find{margin-left:auto; min-height:32px; padding:0 12px; letter-spacing:.04em; text-transform:none; font-size:var(--fs-small)}
@media(max-width:339px){ .site-nav{gap:10px} .wordmark{font-size:13px} .site-nav__find{padding:0 8px} .col-rank{width:46px} .col-value,.rank-table[data-rank-by="volume"] .col-volume{width:100px} .col-more{width:30px} }
@media(min-width:768px){
  .site-nav{min-height:60px; padding-top:16px; padding-bottom:16px}
  .wordmark{font-size:17px}
  .site-nav__links{display:flex}
  .site-nav__find{display:none}
}

/* ============ 4. HEADLINE ROW + TIGER ============ */
.head{position:relative; padding-top:8px; padding-bottom:12px}
.head__text{padding-right:104px; min-height:72px}          /* keeps the copy clear of the tiger */
.head__title{
  font-size:var(--fs-display); font-stretch:100%; letter-spacing:-.01em; line-height:.96; text-transform:uppercase;
  text-wrap:balance; max-width:13em;
}
.head__line{display:inline}
.head__sub{margin-top:8px; font-size:var(--fs-body); line-height:1.35; color:var(--mute); max-width:34em; text-wrap:pretty}
/* The tiger rests behind the board and looks over its top edge. The file is transparent: never give
   this element a background, border or shadow. The board (z-index 1) hides the bottom 24%. */
.head__tiger{
  position:absolute; z-index:0; right:calc(var(--pad) + 6px); bottom:-23px; width:96px; height:96px;
  pointer-events:none; user-select:none;
}
@media(max-width:374px){
  :root{ --fs-display:23px }
  .head__text{padding-right:92px}
  .head__tiger{width:84px; height:84px; bottom:-20px}
}
@media(min-width:768px){
  .head{padding-top:20px; padding-bottom:24px}
  .head__text{padding-right:220px; min-height:112px}
  .head__title{font-stretch:112%; letter-spacing:-.015em; line-height:.94; max-width:none}
  .head__sub{margin-top:12px}
  .head__tiger{width:176px; height:176px; bottom:-42px; right:calc(var(--pad) + 20px)}
}
@media(min-width:1024px){
  .head{padding-top:24px; padding-bottom:28px}
  .head__text{padding-right:264px; min-height:140px}
  .head__sub{max-width:none}
  .head__line{display:block}                 /* two set lines on desktop */
  .head__tiger{width:232px; height:232px; bottom:-56px; right:calc(var(--pad) + 32px)}
}

/* ============ 5. THE BOARD ============ */
.board{
  position:relative; z-index:1; background:var(--paper); border:var(--line); box-shadow:var(--shadow);
  --tab:var(--mint);
}
.board[data-tab="perps"]{--tab:var(--mint)}
.board[data-tab="spot"]{--tab:var(--mango)}
.board[data-tab="onchain"]{--tab:var(--periwinkle)}

/* ---- 5.1 top band: ranking tabs + find a wallet ---- */
.board__top{border-bottom:var(--line)}
.tabs{display:flex}
.tab{
  flex:1 1 0; min-width:0; min-height:48px; padding:5px 4px; border:0; border-right:var(--line); background:transparent;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  font-size:15px; font-weight:900; font-stretch:112%; letter-spacing:.02em; text-transform:uppercase; line-height:1;
  transition:background-color var(--ease);
}
.tab:last-child{border-right:0}
.tab:hover{background:var(--tint)}
.tab[aria-selected="true"]{background:var(--tab); box-shadow:inset 0 -4px 0 var(--ink)}   /* pastel + ink bar: not colour alone */
.tab:focus-visible{outline-offset:-4px}

.find{display:none; align-items:stretch; padding:var(--inset); border-top:var(--line)}
.find.is-open{display:flex}
.find__input{
  flex:1 1 auto; min-width:0; height:40px; padding:0 12px; background:var(--paper); border:var(--line); border-right:0;
  font-size:16px; font-weight:600; font-variant-numeric:tabular-nums;    /* 16px stops iOS zooming the page */
}
.find__input::placeholder{color:var(--mute); font-weight:500; opacity:1}
.find__input:focus-visible{outline-offset:-4px}
.find__input[aria-invalid="true"]{background:var(--coral)}
.find__btn{min-height:40px}

@media(min-width:768px){
  .tabs{flex:0 0 auto}
  .tab{flex:0 0 auto; flex-direction:row; gap:10px; min-height:56px; padding:0 28px; font-size:17px}
  .tab:last-child{border-right:var(--line)}
  .find{display:flex}                                   /* always visible from tablet up */
  .find__input{height:var(--ctl); font-size:14px}
  .find__btn{min-height:var(--ctl)}
}
@media(min-width:1024px){
  .board__top{display:flex; align-items:stretch}
  .find{flex:1 1 0; max-width:400px; margin-left:auto; align-items:center; padding:0 var(--inset); border-top:0}
}

/* ---- 5.2 controls: platform, period, ranked by ---- */
.board__controls{display:grid; gap:6px; padding:10px var(--inset)}
.control{display:grid; grid-template-columns:70px minmax(0,1fr); align-items:center}
.control__label{font-size:10px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--mute); line-height:1.2; white-space:nowrap}
.control__body{display:flex; flex-wrap:wrap; gap:8px; min-width:0}

.chip{
  display:inline-flex; align-items:center; gap:8px; height:var(--ctl); padding:0 12px; background:var(--paper); border:var(--line);
  font-size:var(--fs-small); font-weight:800; line-height:1; white-space:nowrap;
  transition:background-color var(--ease), color var(--ease);
}
.chip:hover{background:var(--tint)}
.chip[aria-pressed="true"]{background:var(--ink); color:var(--paper)}
.chip[aria-pressed="true"] .sq{border-color:var(--paper)}
.chip[aria-disabled="true"]{border:var(--dash); color:var(--mute); background:transparent; cursor:not-allowed}
.chip[aria-disabled="true"] .sq{border-color:var(--mute)}
/* R2: three live chips fit one line at 360 because, on phones only, the colour squares are dropped and
   "All platforms" reads "All" (the full name stays in aria-label). Type size does not change. */
@media(max-width:767px){ .chip{padding:0 9px; gap:6px} .chip .sq,.chip__long{display:none} .control__body{gap:6px} }

.sq{display:inline-block; flex:none; width:12px; height:12px; border:2px solid var(--ink); background:var(--paper)}
.sq--hyperliquid{background:var(--mint)}
.sq--lighter{background:var(--ink)}
.sq--fomo{background:var(--mango)}

.seg{display:inline-flex; border:var(--line); background:var(--paper); max-width:100%}
.seg__btn{
  height:calc(var(--ctl) - 4px); padding:0 12px; border:0; border-left:var(--line); background:transparent;
  font-size:var(--fs-small); font-weight:800; line-height:1; white-space:nowrap; font-variant-numeric:tabular-nums;
  transition:background-color var(--ease), color var(--ease);
}
.seg__btn:first-child{border-left:0}
.seg__btn:hover{background:var(--tint)}
.seg__btn[aria-pressed="true"]{background:var(--ink); color:var(--paper)}
.seg__btn:disabled{color:var(--mute); cursor:not-allowed; background:transparent; text-decoration:line-through}
.seg__btn:focus-visible{outline-offset:-4px}
.seg--fill{display:flex}
.seg--fill .seg__btn{flex:1 1 auto; padding:0 6px}

.board__meta{font-size:12px; line-height:1.35; color:var(--mute); font-variant-numeric:tabular-nums; padding-top:4px}
.board__meta b{color:var(--ink); font-weight:700}
.board__meta span{display:block}
/* R2: merged view = one lead line + one row per source (name left, its own update time right) */
.meta__lead{margin:0}
.meta__list{display:grid; grid-template-columns:max-content max-content; column-gap:12px; justify-content:start}
.meta__row{display:contents}
.meta__row dt{display:flex; align-items:center; gap:6px; color:var(--ink); font-weight:700}
.meta__row dt .sq{width:10px; height:10px; border-width:1.5px}

@media(min-width:768px){
  .board__controls{display:flex; flex-wrap:wrap; align-items:flex-end; gap:16px 28px; padding:16px var(--inset)}
  .control{display:block}
  .control__label{display:block; font-size:var(--fs-label); letter-spacing:.12em; margin-bottom:6px}
  .seg--fill{display:inline-flex}
  .seg--fill .seg__btn{flex:0 0 auto; padding:0 14px}
  .seg__btn{padding:0 14px}
  .board__meta{margin-left:auto; text-align:right; font-size:var(--fs-small); padding-top:0}
  .meta__list{justify-content:end}
}

/* ---- 5.2b R2: the honesty line (sits directly on top of the table header, on every live view) ----
   One sentence is always visible. "What to know" opens the rest in place: a native <details>, no modal, no animation. */
.board__note{border-top:var(--hair); background:var(--tint); font-size:12px; line-height:1.4}
.note__summary{display:block; list-style:none; cursor:pointer; padding:7px var(--inset)}
.note__summary::-webkit-details-marker{display:none}
.note__summary:focus-visible{outline-offset:-4px}
.note__text{font-weight:600}
.note__more{font-weight:800; white-space:nowrap; border-bottom:var(--hair); margin-left:2px}
.note__more::after{content:"\00a0+"}
.board__note[open] .note__more::after{content:"\00a0\2013"}
.note__list,.how__list{counter-reset:note; display:grid; gap:8px 32px}
.note__list{padding:2px var(--inset) 14px; max-width:1040px}
.note__list li,.how__list li{counter-increment:note; position:relative; padding-left:24px; text-wrap:pretty}
.note__list li::before,.how__list li::before{
  content:counter(note); position:absolute; left:0; top:.1em; width:15px; height:15px; border:var(--hair);
  display:grid; place-items:center; font-size:10px; font-weight:800; line-height:1; font-variant-numeric:tabular-nums;
}
@media(min-width:768px){
  .board__note{font-size:var(--fs-small)}
  .note__summary{padding:9px var(--inset)}
  .note__list{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ---- 5.3 find-a-wallet result (sits between the controls and the honesty line) ---- */
.find-result{margin:0 var(--inset) var(--inset); padding:12px; background:var(--tint); border:var(--line); position:relative}
.find-result__label{margin-bottom:6px; padding-right:72px; line-height:1.4}
.find-result__who{display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 10px; padding-right:64px}
.find-result__name{font-size:17px; font-weight:900; font-stretch:112%; line-height:1.15; font-variant-numeric:tabular-nums; overflow-wrap:anywhere}
.find-result__addr{font-size:var(--fs-small); font-weight:600; color:var(--mute); font-variant-numeric:tabular-nums}
.find-result__text{font-size:var(--fs-cell); line-height:1.4; max-width:84ch; padding-right:64px; text-wrap:pretty}
.find-result__text b{font-variant-numeric:tabular-nums}
.mini-btn,.find-result__clear{
  height:28px; padding:0 8px; background:transparent; border:var(--hair); white-space:nowrap;
  font-size:var(--fs-label); font-weight:800; letter-spacing:.1em; text-transform:uppercase;
  transition:background-color var(--ease), color var(--ease);
}
.mini-btn:hover,.find-result__clear:hover{background:var(--ink); color:var(--paper)}
.find-result__clear{position:absolute; top:10px; right:10px}

/* R2: one block per platform. Head = platform tag (+ the name that platform shows). Body = four time cells,
   or one message box when that platform has nothing to show (not on its board / still checking / did not answer). */
.find-platform{margin-top:10px}
.find-platform__head{display:flex; align-items:center; gap:10px; margin-bottom:6px; min-width:0}
.find-platform__name{font-size:var(--fs-small); font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0}
.find-result__windows{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:var(--line); background:var(--paper)}
.window{padding:7px 6px 8px; border-left:var(--line); min-width:0}
.window:first-child{border-left:0}
.window[aria-current="true"]{background:var(--tab)}          /* the time the table is showing */
.window__label{display:block; color:var(--mute); font-size:10px; letter-spacing:.06em; white-space:nowrap}
.window[aria-current="true"] .window__label{color:var(--ink)}
.window__rank{display:block; margin-top:4px; font-size:18px; font-weight:900; font-stretch:112%; line-height:20px; letter-spacing:-.01em; font-variant-numeric:tabular-nums; white-space:nowrap}
.window__rank small{font-size:.6em; font-weight:800; margin-right:1px}
.window__rank--long{font-size:13px; font-stretch:100%; font-weight:800; letter-spacing:0}   /* 1,000 and above */
.window__rank--long small{font-size:.85em}
.window__value{display:block; margin-top:3px; font-size:var(--fs-label); font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap}
.window[aria-current="true"] .window__value{color:var(--ink)}  /* ink on pastel: the sign still carries the meaning */
.window--none .window__value{color:var(--mute); font-weight:600}          /* no rank for this time: an en dash and "No data" */
.window--none[aria-current="true"] .window__value{color:var(--ink)}
.find-platform__msg{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px; min-height:44px;
  padding:8px 12px; border:var(--line); background:var(--paper); font-size:var(--fs-small); font-weight:600; color:var(--mute);
}
.find-platform__msg--error{background:var(--coral); color:var(--ink)}
.find-result--invalid{background:var(--coral)}
.find-result--loading .find-result__text{color:var(--mute)}
@media(min-width:768px){
  .find-result{padding:16px 20px}
  .find-platform{display:grid; grid-template-columns:190px minmax(0,1fr); column-gap:16px; align-items:center; margin-top:12px}
  .find-platform + .find-platform{margin-top:8px}
  .find-platform__head{flex-direction:column; align-items:flex-start; gap:6px; margin-bottom:0}
  .find-platform__name{max-width:100%}
  .window{padding:9px 12px 10px}
  .window__label{font-size:var(--fs-label); letter-spacing:.12em}
  .window__rank{font-size:24px; line-height:26px}
  .window__rank--long{font-size:17px}
  .window__value{font-size:var(--fs-small)}
  .find-platform__msg{min-height:62px; padding:10px 14px}
}
@media(min-width:1100px){          /* room to put the rank and the profit on one line */
  .window{display:grid; grid-template-columns:auto minmax(0,1fr); align-items:baseline; column-gap:10px; padding:9px 14px 10px}
  .window__label{grid-column:1 / -1}
  .window__value{margin-top:0}
}

/* ---- 5.4 the table ---- */
.rank-table{width:100%; border-collapse:separate; border-spacing:0; table-layout:fixed; font-size:var(--fs-cell)}
.rank-table th,.rank-table td{padding:0 8px; text-align:left; vertical-align:middle; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.rank-table thead th{
  position:sticky; top:0; z-index:2; height:32px; background:var(--tab);
  border-top:var(--line); border-bottom:var(--line);
  font-size:10px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; line-height:1;
}
.rank-table .is-sorted::after{              /* flat black triangle marks the column the board is ranked by */
  content:""; display:inline-block; margin-left:6px; vertical-align:1px;
  border-left:4px solid transparent; border-right:4px solid transparent; border-top:6px solid var(--ink);
}
.th-sub{font-weight:700; letter-spacing:.06em; margin-left:4px}
.rank-table tbody td{height:var(--row); border-bottom:var(--hair); background:var(--paper); transition:background-color var(--ease)}
.rank-table tbody tr:last-child td{border-bottom:0}
.rank-table .row:hover td,.rank-table .row:focus-within td{background:var(--tint)}
.rank-table .row.is-you td{background:var(--tint)}
.rank-table .row.is-you td:first-child{box-shadow:inset 4px 0 0 var(--ink)}

/* columns */
.col-rank{width:54px; padding-left:var(--inset)!important; padding-right:0!important}
.col-trader{width:auto}
.col-platform,.col-return,.col-volume,.col-account{display:none}
.col-value{width:108px; text-align:right!important}
.col-more{width:40px; padding:0!important; text-align:center!important}
td.col-rank,td.col-more{overflow:visible}

/* rank cell */
.rank{
  display:inline-flex; align-items:center; justify-content:center; min-width:32px; height:32px;
  font-size:var(--fs-cell); font-weight:700; font-variant-numeric:tabular-nums; line-height:1; color:var(--ink);
}
.rank--1,.rank--2,.rank--3{width:32px; border:var(--line); font-weight:900; font-stretch:112%; font-size:16px}
.rank--1{background:var(--lemon)}
.rank--2{background:var(--fog)}
.rank--3{background:var(--peach)}
.rank--long{font-size:12px; letter-spacing:-.01em; justify-content:flex-start}     /* 1,000 and above */

/* trader cell */
.trader{display:flex; align-items:baseline; gap:8px; min-width:0}
.trader__name{font-weight:800; overflow:hidden; text-overflow:ellipsis; flex:0 1 auto; min-width:0}   /* a long name is cut with …; the address never is */
.trader__addr{font-weight:700; font-variant-numeric:tabular-nums; letter-spacing:.01em; flex:none}
.trader__name + .trader__addr{display:none}             /* under 1280: a named trader shows the name only */
.cell-sub{display:flex; align-items:center; gap:6px; margin-top:5px; font-size:12px; font-weight:600; color:var(--mute); line-height:1; min-width:0}
.col-value .cell-sub{justify-content:flex-end; font-variant-numeric:tabular-nums}
.tag{display:inline-flex; align-items:center; gap:6px; font-size:var(--fs-small); font-weight:700; line-height:1; white-space:nowrap}
.cell-sub .tag{font-size:12px; font-weight:600}
.cell-sub .sq{width:10px; height:10px; border-width:1.5px}
.copy-btn{
  flex:none; height:22px; padding:0 6px; background:transparent; border:var(--hair);
  font-size:10px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; line-height:1;
  transition:background-color var(--ease), color var(--ease);
}
.copy-btn:hover,.copy-btn.is-copied{background:var(--ink); color:var(--paper)}
.trader .copy-btn,.cell-sub .copy-btn{display:none}      /* phone: copy lives in the opened row */

/* numbers: tabular, right aligned, one decimal, unit in a fixed slot so the decimal points line up */
.num{font-variant-numeric:tabular-nums; font-feature-settings:"tnum" 1; white-space:nowrap; font-weight:500}
.num__unit{display:inline-block; width:.92em; text-align:left}
.num__pad{visibility:hidden}
.num--value{font-size:var(--fs-value); font-weight:800}
.num--gain{color:var(--gain)}
.num--loss{color:var(--loss)}
td.num,th.num{text-align:right}

/* R2: ranked by Volume. The builder sets data-rank-by="volume" on the table and moves .is-sorted to the Volume
   header. No column moves. Volume becomes the bold number; on phones it replaces Profit as the one number shown,
   with Profit (signed, coloured) on the line under it. */
.col-volume .cell-sub{display:none}
.rank-table[data-rank-by="volume"] .col-volume > .num{font-size:var(--fs-value); font-weight:800}
.rank-table[data-rank-by="volume"] .col-value .num--value{font-size:var(--fs-cell); font-weight:700}
@media(max-width:767px){
  .rank-table[data-rank-by="volume"] .col-value{display:none}
  .rank-table[data-rank-by="volume"] .col-volume{display:table-cell; width:108px}
  .rank-table[data-rank-by="volume"] .col-volume .cell-sub{display:flex; justify-content:flex-end; font-weight:700}
}
@media(min-width:768px){          /* the ranked column takes the wider slot so "VOLUME 30D" and its arrow fit */
  .rank-table[data-rank-by="volume"] .col-volume{width:136px}
  .rank-table[data-rank-by="volume"] .col-value{width:118px}
}

/* phone: the row opens to show the rest */
.row-more{
  width:40px; height:var(--row); border:0; background:transparent; font-size:20px; font-weight:500; line-height:1; color:var(--ink);
}
.row-more:focus-visible{outline-offset:-6px}
.row-more[aria-expanded="true"]{font-weight:700}
.rank-table .row.is-open td{border-bottom-color:transparent}
.rank-table .row-detail td{height:auto; padding:0 var(--inset) 14px 54px; background:var(--tint); white-space:normal; overflow:visible}
.rank-table .row.is-open td{background:var(--tint)}
.detail{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 16px}
.detail dt{font-size:10px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color:var(--mute); line-height:1.2}
.detail dd{margin-top:3px; font-size:var(--fs-cell); font-weight:700; line-height:1.2}
.detail__wide{grid-column:1 / -1}
.detail__addr{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.detail__addr code{font:inherit; font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; min-width:0}

@media(min-width:768px){
  .rank-table th,.rank-table td{padding:0 12px}
  .rank-table thead th{height:40px; font-size:var(--fs-label); letter-spacing:.12em}
  .col-rank{width:72px}
  .col-value{width:132px}
  .col-volume{display:table-cell; width:118px}
  .col-account{display:table-cell; width:164px; padding-right:var(--inset)!important}
  .col-more,.rank-table .row-detail{display:none!important}
  .rank--long{font-size:var(--fs-small)}
}
@media(min-width:1024px){
  .col-return{display:table-cell; width:108px}
  .col-value .cell-sub{display:none}
}
@media(min-width:1100px){
  .col-platform{display:table-cell; width:132px}
  .col-value{width:140px}
  .col-return{width:104px}
  .col-volume{width:116px}
  .col-account{width:156px}
  .col-trader .cell-sub{display:none}
}
/* copy: tablet = on the second line; desktop = right after the address */
@media(min-width:768px) and (max-width:1099px){
  .cell-sub .copy-btn{display:inline-block; height:18px; margin-left:4px; color:var(--ink)}
}
@media(min-width:1100px){
  .trader .copy-btn{display:inline-block}
}
@media(min-width:1280px){
  .trader__name + .trader__addr{display:inline; font-size:var(--fs-small); font-weight:600; color:var(--mute)}
}
@media(hover:hover){
  .copy-btn{visibility:hidden}
  .row:hover .copy-btn,.row:focus-within .copy-btn,.row-detail .copy-btn,.copy-btn.is-copied{visibility:visible}
}

/* ---- 5.5 table states + board foot ---- */
.table-state{min-height:calc(var(--row) * 5); display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:12px; padding:24px var(--inset); border-top:0}
.table-state__title{font-size:17px; font-weight:900; font-stretch:112%; text-transform:uppercase; letter-spacing:.02em; line-height:1.1}
.table-state__text{font-size:var(--fs-cell); color:var(--mute); max-width:52ch}
.table-state--error{min-height:0; margin:var(--inset); padding:20px; background:var(--coral); border:var(--line)}
.table-state--error .table-state__text{color:var(--ink)}
.board__foot{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:var(--inset); border-top:var(--line); font-size:var(--fs-small); color:var(--mute); font-variant-numeric:tabular-nums}
.board__foot b{color:var(--ink)}
/* R2: line 1 = how many of the list are shown; line 2 (quiet) = how many traders each source ranks */
.board__foot-count{color:var(--ink); font-weight:600}
.board__foot-pool{margin-top:2px; font-size:12px}
.board__foot-end{color:var(--mute)}

/* ---- 5.6 coming-soon panel (a whole tab) ---- */
.soon-panel{position:relative; overflow:hidden; background:var(--tab); padding:24px var(--inset) 124px}
.soon-panel__body{position:relative; z-index:1; max-width:640px}
.soon-panel__title{margin-top:12px; font-size:var(--fs-head); font-stretch:112%; letter-spacing:-.015em; text-transform:uppercase; text-wrap:balance}
.soon-panel__text{margin-top:12px; font-size:var(--fs-body); line-height:1.45; max-width:54ch; text-wrap:pretty}
/* R2: the reasons sit on a white card inside the pastel, so long text is read on paper, not on colour */
.soon-why{margin-top:20px; padding:14px 14px 2px; background:var(--paper); border:var(--line)}
.soon-why__list{margin-top:10px}
.soon-why__row{display:grid; gap:6px; padding:12px 0; border-top:var(--hair)}
.soon-why__row dd{font-size:15px; line-height:1.45; text-wrap:pretty}
.soon-why__label--also{padding-top:14px; border-top:var(--hair); color:var(--mute)}
.soon-why__also{display:grid; gap:6px; padding:8px 0 12px; font-size:var(--fs-small); line-height:1.45; color:var(--mute)}
.soon-why__also b{color:var(--ink); font-weight:700; margin-right:4px}
.soon-panel .btn{margin-top:20px}
/* The paw trail: black on transparent, never near live data. It is anchored to the panel's bottom-right corner so
   the two edges where the file itself cuts a paw (its right and bottom) always land on the panel edge. */
.soon-panel__paws{position:absolute; z-index:0; right:12px; bottom:-172px; width:170px; height:auto; pointer-events:none; user-select:none}
@media(min-width:768px){
  .soon-panel{padding:40px var(--inset) 150px}
  .soon-why{padding:18px 20px 4px}
  .soon-why__row{grid-template-columns:132px minmax(0,1fr); column-gap:16px; align-items:baseline}
  .soon-panel__paws{width:220px; right:0; bottom:-212px}
}
@media(min-width:1100px){
  .soon-panel{padding:48px 40px 56px}
  .soon-panel__body{max-width:560px}
  .soon-panel__paws{width:340px; right:0; bottom:-48px}
}
@media(min-width:1280px){
  .soon-panel__body{max-width:640px}
  .soon-panel__paws{width:400px; bottom:-56px}
}

/* ============ 6. SECTIONS BELOW THE BOARD ============ */
.section{padding-top:var(--sect)}
.section::before{content:""; display:block; border-top:var(--hair); margin-bottom:var(--sect)}
.board + .section,.board-wrap + .section{padding-top:calc(var(--sect) + 4px)}
.section__head{display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; margin-bottom:12px}
.section__title{font-size:var(--fs-head); font-stretch:112%; letter-spacing:-.015em; text-transform:uppercase}
.section__sub{color:var(--mute); max-width:60ch; margin-bottom:24px; text-wrap:pretty}
.section .soon{font-size:var(--fs-label); padding:4px 7px 3px; border-width:2px}
.section__foot{margin-top:20px; font-size:var(--fs-small); color:var(--mute); max-width:72ch}
.section__foot a{color:var(--ink); font-weight:700; text-decoration:none; border-bottom:var(--hair); white-space:nowrap}

/* for LIGURR holders — coming. Dashed outline = not live. Nothing here is a button. */
.perks{display:grid; gap:12px}
.perk{border:var(--dash); background:var(--paper-soft); padding:16px}
.perk__n{color:var(--mute)}
.perk__title{margin-top:10px; font-size:17px; font-stretch:112%; letter-spacing:.02em; text-transform:uppercase; line-height:1.1}
.perk__text{margin-top:8px; font-size:15px; line-height:1.4}
@media(min-width:600px){ .perks{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media(min-width:1024px){ .perks{grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px} .perk{padding:20px} }

/* how it works: a ruled list, like the mint site schedule. R2: question left, answer right. */
.how{border-top:var(--hair); max-width:960px}
.how__row{display:grid; gap:6px; padding:16px 0; border-bottom:var(--hair)}
.how__term{font-size:17px; font-weight:800; line-height:1.25; text-wrap:balance}
.how__desc{max-width:62ch; line-height:1.5}
.how__list{font-size:15px; line-height:1.45}
@media(min-width:768px){
  .how__row{grid-template-columns:260px minmax(0,1fr); column-gap:40px; padding:18px 0}
}
@media(min-width:1024px){
  .how__row{grid-template-columns:300px minmax(0,1fr)}
}

/* footer: one line, then two lines of small print (R2) */
.site-footer{margin-top:var(--sect); padding-bottom:32px}
.site-footer__in{display:flex; justify-content:space-between; align-items:center; gap:12px 24px; flex-wrap:wrap; border-top:var(--hair); padding:24px 0 16px; font-size:var(--fs-small); font-weight:700}
.site-footer__links{display:flex; flex-wrap:wrap; gap:8px 20px}
.site-footer a{text-decoration:none; border-bottom:var(--hair); line-height:1.3}
.site-footer__small{font-size:12px; line-height:1.5; color:var(--mute); max-width:84ch}

/* ============ 7. MOTION ============ */
/* Only colour/background transitions above (120ms). Nothing moves, loops, counts up or fades in on load. */
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{transition:none!important; animation:none!important; scroll-behavior:auto!important}
}

/* ============ 8. BUILDER ADDITION (not in the approved mock; listed in team/BUILD_NOTES.md) ============ */
/* The ranked column's header carries the time beside its name. "30D" fits on one line, "ALL TIME" does not:
   it was cut to "PROFIT ALL TIM…" and the triangle that marks the ranked column was lost. So the time may
   drop to a second line, and the triangle now belongs to the time so the two always stay together.
   Headers that fit on one line ("PROFIT 30D") render exactly as before (checked: screenshots byte-identical). */
.rank-table thead th.is-sorted{white-space:normal; text-overflow:clip}
.rank-table thead th.is-sorted::after{content:none}
.th-sub{display:inline-block; white-space:nowrap}
.rank-table .is-sorted .th-sub::after{
  content:""; display:inline-block; margin-left:6px; vertical-align:1px;
  border-left:4px solid transparent; border-right:4px solid transparent; border-top:6px solid var(--ink);
}

/* DIRECTOR FIX (round 2). Phones, ranked by Volume: the profit line under the volume was caught by the
   ".col-volume > .num" rule above and came out 16px/800, fighting the ranked number. It is the spec's
   12px/700. Its sign and its green / red are unchanged. */
.rank-table[data-rank-by="volume"] .col-volume > .cell-sub{font-size:12px; font-weight:700}

/* ============ 9. ROUND 3 (director's fixes after QA; listed in team/BUILD_NOTES.md) ============ */

/* Fix 5. No jump on load. Until the first list is drawn, the live panel keeps the height it will have with its
   controls, the honesty line, the header band, 25 rows and the foot (measured at each breakpoint), with the
   loading state inside it. Nothing here moves or animates. The class is in index.html and app.js removes it. */
.board__panel.is-booting{min-height:1918px}
@media(min-width:600px){ .board__panel.is-booting{min-height:1853px} }
@media(min-width:768px){ .board__panel.is-booting{min-height:1816px} }
@media(min-width:1100px){ .board__panel.is-booting{min-height:1615px} }
@media(min-width:1280px){ .board__panel.is-booting{min-height:1546px} }

/* Fix 8. Desktop Copy buttons can be reached with the keyboard: they are no longer visibility:hidden (which also
   takes them out of the Tab order). They stay unseen until the row is hovered or something in it has keyboard
   focus. No new transition: opacity changes at once. */
@media(hover:hover){
  .copy-btn{visibility:visible; opacity:0}
  .row:hover .copy-btn,.row:focus-within .copy-btn,.row-detail .copy-btn,.copy-btn.is-copied,.copy-btn:focus-visible{opacity:1}
}
