/* Zecca — Leaderboard. One big teal chapter: a poster line, two tabs, a real table with a sticky header. */

.js .nav { opacity: 1; transition: none; }
.nav { color: var(--field-on); }
.nav__links a[aria-current] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }

.lb {
  --field: var(--cad); --field-on: var(--ink);
  min-height: 100svh; padding: 150px var(--m) 72px;
  overflow: visible; /* a sticky header needs a chapter that does not clip */
}

/* ---------- the poster line ---------- */
.lb__top {
  font-size: 11.5vw; line-height: .9; letter-spacing: -.04em; white-space: nowrap;
}
.lb__sub { margin-top: 20px; font-size: var(--step-lead); line-height: 1.3; font-weight: 500; max-width: 36ch; }

.lb__bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 48px 0 12px; }
.lb__note { font-size: var(--step-body); max-width: 30ch; text-align: right; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; }
.tabs button {
  min-height: 64px; padding: 0 32px; border: 0; border-radius: 0;
  background: color-mix(in srgb, var(--ink) 16%, transparent); color: var(--ink);
  font-family: var(--display); font-weight: 400; font-size: 1.75rem; letter-spacing: -.015em;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.tabs button:hover { transform: translateY(-3px); }
.tabs button:active { transform: translateY(1px) scale(.97); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tabs button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- the table ---------- */
.lb__tile {
  background: var(--paper); color: var(--ink);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.lbt { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.lbt thead th {
  position: sticky; top: 0; z-index: 3;
  background: var(--ink); color: var(--paper);
  padding: 18px 24px; text-align: left; font-weight: 600; font-size: 1rem;
}
.lbt .short { display: none; }
.lbt .c-rank { width: 7%; }
.lbt .c-num, .lbt .c-pro { text-align: right; }
.lbt td { padding: 16px 24px; background: var(--paper); font-size: 1.1875rem; font-weight: 500; height: 76px; transition: background-color .2s var(--ease); }
.lbt tbody tr:nth-child(even) td { background: var(--paper-2); }
.lbt tbody tr:hover td { background: #cfd5cc; }
.lbt td.c-rank { font-family: var(--display); font-weight: 300; font-size: 2.25rem; letter-spacing: -.03em; }
.lbt td.c-wal { font-family: var(--display); font-weight: 400; font-size: 1.875rem; letter-spacing: -.02em; }
.lbt td.c-pro { font-family: var(--display); font-weight: 400; font-size: 1.875rem; letter-spacing: -.02em; }
.lbt .sq { display: inline-block; width: 16px; height: 16px; margin-right: 12px; vertical-align: -1px; background: var(--c); }
.lbt .nm { margin-left: 6px; font-weight: 400; }
.lbt tbody tr:first-child td { background: var(--inr); }
.lbt tbody tr:first-child:hover td { background: #f7c764; }

/* ---------- faces on top ---------- */
.lbc {
  --field: var(--paper-2); --field-on: var(--ink);
  min-height: 0; padding: 96px var(--m) 56px;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); row-gap: 10px;
  grid-template-areas:
    "t t t t t t t t t t t t"
    "n n n n n a a a a a a a"
    "n n n n n b b b b c c c"
    "cr cr cr cr cr cr cr cr cr cr cr cr";
  align-items: start;
}
.lbc__text { grid-area: t; margin-bottom: 40px; }
.lbc__title { font-size: clamp(2.5rem, 6.4vw, 6.5rem); margin-bottom: 20px; }
.lbc__p { font-size: var(--step-lead); line-height: 1.3; font-weight: 500; max-width: 34ch; }
.lbc__fig { margin: 0; }
.lbc__fig--note { grid-area: n; grid-row: 2 / 4; }
.lbc__fig--a { grid-area: a; }
.lbc__fig--b { grid-area: b; }
.lbc__fig--c { grid-area: c; }
.lbc__fig img { width: 100%; height: auto; background: #8a8d90; transition: transform .8s var(--ease); }
.lbc__fig { overflow: hidden; }
.lbc__fig:hover img { transform: scale(1.04); }
.lbc__fig figcaption { padding: 10px 0 14px; font-size: 1rem; line-height: 1.35; background: var(--paper-2); position: relative; }
.lbc__credits { grid-area: cr; margin-top: 40px; max-width: 64ch; font-size: 1rem; line-height: 1.5; }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .lb { padding: 108px 0 56px; }
  .lb__head, .lb__bar { padding-inline: var(--m); }
  .lb__top { font-size: 15.5vw; }
  .lb__sub { font-size: 1.375rem; }
  .lb__bar { flex-direction: column; align-items: stretch; gap: 14px; margin: 32px 0 16px; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; min-height: 60px; padding: 0 12px; font-size: 1.5rem; }
  .lb__note { text-align: left; max-width: none; font-size: 1rem; }

  .lb__tile { clip-path: none; }
  .lbt .full { display: none; }
  .lbt .short { display: inline; }
  .lbt thead th { padding: 14px 6px; font-size: .8125rem; }
  .lbt td { padding: 12px 5px; font-size: 1rem; height: 64px; }
  .lbt thead th:first-child, .lbt td:first-child { padding-left: var(--m); }
  .lbt thead th:last-child, .lbt td:last-child { padding-right: var(--m); }
  .lbt .c-rank { width: 11%; }
  .lbt td.c-wal, .lbt td.c-cur, .lbt td.c-pro { white-space: nowrap; }
  .lbt td.c-rank { font-size: 1.5rem; }
  .lbt td.c-wal, .lbt td.c-pro { font-size: 1.0625rem; letter-spacing: -.01em; }
  .lbt .nm { display: none; }
  .lbt .sq { width: 14px; height: 14px; margin-right: 8px; }

  .lbc { display: block; padding: 64px var(--m) 40px; }
  .lbc__title { font-size: 12vw; }
  .lbc__p { font-size: 1.375rem; }
  .lbc__text { margin-bottom: 28px; }
  .lbc__fig { margin-bottom: 14px; }
}

/* phone footer: clocks and sentence get full-width tiles so nothing wraps into a sliver */
@media (max-width: 860px) {
  .ft--time { grid-column: 1 / -1; order: 4; min-height: 150px; }
  .ft--say { grid-column: 1 / -1; order: 5; min-height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  .tabs button:hover { transform: none; }
  .lbc__fig:hover img { transform: none; }
}
