/* ═══════════════════════════════════════════════════════════════
   The Footnote† — GIANNIS TRADE LEDGER · by team
   A standings page: every suitor ranked by how often they were
   floated, their best offer + when, and the full slate of sub-pitches.
   Reuses :root + the detail panel + .p-* from timeline.css.
   ═══════════════════════════════════════════════════════════════ */

html, body { height: auto; }
body { overflow-y: auto; overflow-x: hidden; }

/* mode switch (shared visual with the other two views) */
.modeswitch {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 30;
  display: flex; border: 1px solid var(--card-rule-2);
  background: rgba(20,18,13,0.7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.modeswitch a {
  font-family: var(--fn-mono); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--card-muted); text-decoration: none; padding: 7px 12px; transition: color .14s, background .14s;
}
.modeswitch a + a { border-left: 1px solid var(--card-rule-2); }
.modeswitch a.on { color: var(--pin-ink); background: var(--gold); }
.modeswitch a:not(.on):hover { color: var(--gold); }

/* ───────── header ─────────────────────────────────────────── */
.l-head { max-width: 1200px; margin: 0 auto; padding: 40px 48px 0; }
.l-kicker { font-family: var(--fn-mono); font-size: 12px; letter-spacing: 4px; color: var(--gold); text-transform: uppercase; }
.l-title { font-family: var(--fn-serif-display); font-weight: 700; font-size: 58px; line-height: 0.96; letter-spacing: -1.8px; margin: 10px 0 0; color: var(--card-ink); }
.l-dek { font-family: var(--fn-serif-text); font-style: italic; font-size: 17px; line-height: 1.4; color: var(--card-muted); margin: 14px 0 0; max-width: 640px; }

/* summary stat bar */
.summary-bar { display: flex; flex-wrap: wrap; gap: 40px; margin: 30px 0 6px; padding: 20px 0; border-top: 1px solid var(--card-rule); border-bottom: 1px solid var(--card-rule); }
.stat { display: flex; flex-direction: column; gap: 5px; }
.stat .s-num { font-family: var(--fn-serif-display); font-weight: 700; font-size: 38px; line-height: 1; letter-spacing: -1px; color: var(--gold); }
.stat .s-lab { font-family: var(--fn-mono); font-size: 10.5px; letter-spacing: 1.6px; color: var(--card-muted); text-transform: uppercase; }

/* column key */
.ledger-key { max-width: 1200px; margin: 0 auto; padding: 18px 48px 0; display: grid; grid-template-columns: 300px 1fr; gap: 44px; }
.ledger-key div { font-family: var(--fn-mono); font-size: 10px; letter-spacing: 1.8px; color: #6b6354; text-transform: uppercase; }

/* ───────── the ledger ─────────────────────────────────────── */
.ledger { max-width: 1200px; margin: 0 auto; padding: 4px 48px 140px; }
.team-card {
  display: grid; grid-template-columns: 300px 1fr; gap: 44px;
  padding: 30px 0; border-top: 1px solid var(--card-rule);
}
.team-card:first-child { border-top: none; }

/* left: identity + volume */
.tc-id { display: flex; flex-direction: column; }
.tc-rank { font-family: var(--fn-mono); font-size: 12px; letter-spacing: 2px; color: var(--gold-deep); }
.tc-team { font-family: var(--fn-serif-display); font-weight: 700; font-size: 50px; line-height: 0.9; letter-spacing: -1.5px; color: var(--gold); margin: 6px 0 0; }
.tc-club { font-family: var(--fn-mono); font-size: 12px; letter-spacing: 1.5px; color: var(--card-muted); text-transform: uppercase; margin-top: 8px; }
.tc-vol { margin-top: 18px; }
.tc-count { font-family: var(--fn-mono); font-size: 11px; letter-spacing: 1.2px; color: var(--card-ink); text-transform: uppercase; }
.tc-count b { color: var(--gold); font-weight: 500; }
.tc-count .picks { color: var(--mustard); }
.tc-bar { position: relative; height: 7px; margin-top: 9px; background: rgba(255,255,255,0.05); border: 1px solid var(--card-rule); width: 240px; max-width: 100%; }
.tc-bar > .all { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold-deep); }
.tc-bar > .pick { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(to right, var(--mustard), var(--gold)); }

/* right: best offer + sub-pitches */
.tc-best { cursor: pointer; }
.tc-best-k { display: flex; align-items: baseline; gap: 12px; }
.tc-best-lab { font-family: var(--fn-mono); font-size: 10.5px; letter-spacing: 2px; color: var(--card-muted); text-transform: uppercase; white-space: nowrap; }
.tc-pickflag { font-family: var(--fn-mono); font-size: 9px; letter-spacing: 1.3px; color: var(--pin-ink); background: var(--gold); padding: 2px 7px; text-transform: uppercase; white-space: nowrap; }
.tc-when { font-family: var(--fn-mono); font-size: 10.5px; letter-spacing: 1.5px; color: var(--gold-deep); text-transform: uppercase; margin-left: auto; white-space: nowrap; }
.tc-best-head { font-family: var(--fn-serif-display); font-weight: 600; font-size: 25px; line-height: 1.08; letter-spacing: -0.5px; color: var(--card-ink); margin: 9px 0 9px; text-wrap: pretty; transition: color .14s; }
.tc-best:hover .tc-best-head { color: var(--gold); }
.tc-offer { font-family: var(--fn-mono); font-size: 12.5px; letter-spacing: 0.4px; line-height: 1.5; color: var(--card-muted); }
.tc-offer .lab { color: var(--mustard); letter-spacing: 1.5px; text-transform: uppercase; font-size: 10.5px; margin-right: 8px; }

/* sub-pitch list */
.tc-subs { margin-top: 22px; border-top: 1px dotted var(--card-rule); padding-top: 6px; }
.tc-subs-h { font-family: var(--fn-mono); font-size: 10px; letter-spacing: 1.8px; color: #6b6354; text-transform: uppercase; margin: 12px 0 4px; }
.sub {
  display: grid; grid-template-columns: 116px 1fr; gap: 14px; align-items: baseline;
  padding: 8px 8px 8px 10px; cursor: pointer; border-left: 2px solid transparent;
  transition: background .14s, border-color .14s;
}
.sub:hover { background: rgba(232,181,60,0.05); border-left-color: var(--gold-deep); }
.sub-when { font-family: var(--fn-mono); font-size: 11px; letter-spacing: 1px; color: var(--gold-deep); text-transform: uppercase; white-space: nowrap; }
.sub-head { font-family: var(--fn-serif-text); font-size: 15.5px; line-height: 1.3; color: var(--card-ink); text-wrap: pretty; }
.sub-head .mini-pick { font-family: var(--fn-mono); font-size: 8px; letter-spacing: 1px; color: var(--mustard); text-transform: uppercase; margin-left: 7px; vertical-align: 1px; }

/* panel body scrolls */
#pBody { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* ───────── responsive ─────────────────────────────────────── */
@media (max-width: 860px) {
  .l-head, .ledger, .ledger-key { padding-left: 22px; padding-right: 22px; }
  .l-title { font-size: 38px; }
  .ledger-key { display: none; }
  .team-card { grid-template-columns: 1fr; gap: 18px; }
  .tc-team { font-size: 40px; }
  .panel { width: 100vw; }
}

/* ═══════════════════════════════════════════════════════════════
   TEAM FILTER NAV — a sticky rail of every suitor. Click one to show
   just that team's slate; ◇ All teams resets. Desktop: a wrapping
   rail of all teams. Mobile: a collapsible dropdown.
   ═══════════════════════════════════════════════════════════════ */
.team-nav {
  position: sticky; top: 0; z-index: 22; padding: 52px 0 0;
  background: linear-gradient(to bottom, rgba(14,12,8,0.95) 60%, rgba(14,12,8,0.8));
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--card-rule);
}
.tn-rail {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: nowrap; gap: 8px; padding: 6px 48px 13px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
}
.tn-rail::-webkit-scrollbar { display: none; height: 0; }
.tn-chip {
  flex: 0 0 auto; white-space: nowrap;
  font-family: var(--fn-mono); font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--card-muted); background: rgba(22,20,15,0.8); border: 1px solid var(--card-rule-2);
  padding: 7px 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: color .14s, border-color .14s, background .14s;
}
.tn-chip:hover { color: var(--gold); border-color: var(--gold-deep); }
.tn-chip.active { color: var(--pin-ink); background: var(--gold); border-color: var(--gold); }
.tn-chip .tn-n { font-size: 9px; opacity: .55; }
.tn-chip.active .tn-n { color: var(--pin-ink); opacity: .65; }
.tn-chip.all { color: var(--card-ink); }
.tn-chip.all.active { color: var(--pin-ink); }

/* mobile dropdown toggle — hidden on desktop */
.tn-toggle { display: none; }
.tn-chev { width: 11px; height: 11px; color: var(--gold); transition: transform .2s; }

@media (max-width: 860px) {
  .team-nav { padding-top: 44px; }
  .tn-toggle {
    display: inline-flex; align-items: center; gap: 9px; margin: 2px 22px 11px;
    font-family: var(--fn-mono); font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
    color: var(--card-ink); background: rgba(22,20,15,0.92); border: 1px solid var(--card-rule-2);
    border-radius: 9px; padding: 10px 14px; cursor: pointer;
  }
  .team-nav.open .tn-chev { transform: rotate(180deg); }
  .tn-rail {
    display: none; position: absolute; left: 12px; right: 12px; top: calc(100% - 1px);
    flex-wrap: wrap; overflow-x: visible; max-height: 62vh; overflow-y: auto; margin: 0; padding: 12px;
    background: var(--card-bg-2); border: 1px solid var(--card-rule-2); border-radius: 12px;
    box-shadow: 0 26px 54px rgba(0,0,0,0.55);
    -webkit-mask-image: none; mask-image: none;
  }
  .team-nav.open .tn-rail { display: flex; }
  .tn-chip { padding: 9px 12px; }
}
