/* The leaderboard page. Brand rules (shaftkings-style): dark only, Unbounded
   for display, Clash Grotesk for the rest, purple for selection, one piece of
   art (the safe city scene), the RG line in the footer. Tokens and the
   lockup/pill come from tokens.css and components.css, copied verbatim. */

* { box-sizing: border-box; }
html { background: var(--page); }
body {
  margin: 0; min-height: 100vh; background: var(--page); color: var(--text);
  font: 600 14px/18px var(--font-body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding-inline: 24px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  height: 64px; padding-inline: max(24px, calc((100vw - 880px) / 2 + 24px));
  background: rgba(16, 14, 20, .72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.top__logo { height: 24px; width: auto; display: block; }
.status {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
  border-radius: var(--radius-full); background: var(--white-6); font: 600 13px/1 var(--font-body); color: var(--text-80);
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-subtle); }
body[data-phase="live"] .status { color: var(--text); }
body[data-phase="live"] .status__dot { background: var(--green); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .status__dot { animation: none !important; } }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; padding-block: 56px 40px; }
.hero__art {
  position: absolute; inset: 0; z-index: -1;
  background: url(/assets/art/scenes/neon-city-safe.webp) 75% 30% / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%);
}
.hero__art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--page) 0%, rgba(16, 14, 20, .8) 40%, rgba(16, 14, 20, .2) 80%);
}
.sub { max-width: 46ch; margin: 20px 0 28px; color: var(--text-80); font: 500 16px/1.5 var(--font-body); }

.clock {
  display: inline-grid; grid-template-columns: auto; gap: 4px; padding: 16px 20px;
  border-radius: var(--radius-12, 12px); background: var(--white-6); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.clock__label { font: 600 12px/16px var(--font-body); color: var(--text-80); text-transform: uppercase; letter-spacing: .06em; }
.clock__value { font: 700 32px/1.1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.clock__when { font: 500 13px/18px var(--font-body); color: var(--text-subtle); }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.tile {
  display: flex; flex-direction: column; gap: 6px; padding: 16px;
  background: var(--dark-gray); border: 1px solid var(--border); border-radius: var(--radius-12, 12px);
}
.tile__value { font: 700 24px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.tile__label { font: 500 12px/16px var(--font-body); color: var(--text-80); }

/* Board */
.board {
  margin-top: 24px; background: var(--dark-gray); border: 1px solid var(--border);
  border-radius: var(--radius-12, 12px); overflow: hidden;
}
.board__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 20px 20px 12px; }
.board__head h2, .how h2 { margin: 0; font: 600 20px/24px var(--font-display); }
.board__updated { font: 500 12px/16px var(--font-body); color: var(--text-subtle); white-space: nowrap; }

.lb-head, .lb-row {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: 36px minmax(0, 1fr) 64px 72px 64px 72px;
  padding-inline: 20px;
}
/* What a top-3 place pays: green is the brand's money colour (wins on the site). */
.lb-num.lb-prize { color: var(--green); font: 700 15px/1 var(--font-display); }
.lb-head {
  height: 36px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  font: 600 12px/16px var(--font-body); color: var(--text-subtle);
}
.lb { list-style: none; margin: 0; padding: 0; }
.lb-row { min-height: 52px; border-bottom: 1px solid var(--border); }
.lb-row:last-child { border-bottom: 0; }
.lb-rank { font: 700 14px/1 var(--font-display); color: var(--text-80); font-variant-numeric: tabular-nums; }
.lb-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: isolate;
  font: 600 15px/20px var(--font-body);
}
.lb-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-80); }
.lb-num--main { color: var(--text); font: 700 16px/1 var(--font-display); }
.lb-head .lb-num, .lb-head .lb-num--main { font: 600 12px/16px var(--font-body); color: var(--text-subtle); }

/* The top three sit on glass; purple marks first place (selection colour, never yellow). */
.lb-row--top { background: var(--white-6); }
.lb-row--1 .lb-rank { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--purple); color: var(--text); }
.lb-row--2 .lb-rank, .lb-row--3 .lb-rank { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--white-16); color: var(--text); }
.lb-empty { padding: 32px 20px; color: var(--text-80); font: 500 14px/20px var(--font-body); text-align: center; }

/* How it counts */
.how { margin-top: 32px; }
.how__list { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 12px; color: var(--text-80); font: 500 14px/1.55 var(--font-body); }
.how__list strong { color: var(--text); font-weight: 600; }
.how__list--plain { list-style: none; padding-left: 0; }
.prize { white-space: pre-line; }

/* A competition's own name, when the lockup doesn't say it already. */
.eyebrow { margin: 0 0 12px; font: 600 13px/16px var(--font-body); color: var(--text-80); text-transform: uppercase; letter-spacing: .08em; }

.foot { padding-block: 40px 48px; margin-top: 40px; border-top: 1px solid var(--border); }
.foot p { margin: 0 0 8px; font: 500 12px/1.65 var(--font-body); color: var(--text-subtle); }
.foot__legal { color: var(--text-80) !important; }

@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  .top { height: 56px; padding-inline: 16px; }
  .top__logo { height: 20px; }
  .hero { padding-block: 32px 24px; }
  .sub { font-size: 15px; margin-block: 16px 20px; }
  .clock { width: 100%; }
  .clock__value { font-size: 28px; }
  .tiles { gap: 8px; }
  .tile { padding: 12px; }
  .tile__value { font-size: 20px; }
  .board__head { padding: 16px 16px 10px; }
  .lb-head, .lb-row { grid-template-columns: 26px minmax(0, 1fr) 44px 52px 42px 42px; gap: 6px; padding-inline: 12px; }
  .lb-num.lb-prize { font-size: 13px; }
  .board__head { flex-wrap: wrap; }
  .board__updated { white-space: normal; }
  .lb-head { font-size: 11px; }
  .lb-head .lb-num { font-size: 11px; }
  .lb-row--1 .lb-rank, .lb-row--2 .lb-rank, .lb-row--3 .lb-rank { width: 24px; height: 24px; }
}
