/* ==========================================================================
   Truck. Kept deliberately plain: header, title, three stats, board, footer.
   Two colors, one accent. Saira Condensed carries the two display lines only;
   everything else is Sora.
   ========================================================================== */

:root {
  --bg:      #12151a;
  --panel:   #171b21;
  --panel-2: #1d222a;
  --line:    #2a3038;
  --ink:     #f2f5f7;
  --mut:     #9aa4b0;
  --key:     #c6f24a;
  --key-dim: rgba(198, 242, 74, 0.12);

  --wrap: 1060px;
  --pad: clamp(1.15rem, 4vw, 2rem);
  --r: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: Sora, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2 { margin: 0; }
a { color: inherit; }
.mut { color: var(--mut); }
.key { color: var(--key); }

::selection { background: var(--key); color: var(--bg); }

:focus-visible { outline: 2px solid var(--key); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: var(--pad); top: 0;
  transform: translateY(-140%);
  z-index: 30;
  background: var(--key); color: var(--bg);
  padding: 0.7rem 1.1rem; font-weight: 700; text-decoration: none;
  border-radius: 0 0 var(--r) var(--r);
  transition: transform 180ms ease;
}
.skip:focus-visible { transform: translateY(0); }

/* Background scene. The gradient is also the reduced-motion and
   no-script fallback, so the page is never a flat slab. */
#road {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  background:
    radial-gradient(115% 65% at 78% 4%, #1e242c 0%, transparent 62%),
    radial-gradient(85% 50% at 10% 98%, rgba(80, 110, 30, 0.28) 0%, transparent 66%),
    var(--bg);
}

.site, main { position: relative; z-index: 10; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

/* -------------------------------------------------------------- header -- */

header.site { border-bottom: 1px solid var(--line); }

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  font-family: "Saira Condensed", Sora, sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.links { display: flex; gap: 0.25rem; margin-left: auto; }
.links a {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 0.7rem;
  color: var(--mut); text-decoration: none; font-size: 0.9375rem;
  border-radius: var(--r);
  transition: color 180ms ease, background-color 180ms ease;
}
.links a:hover { color: var(--ink); background: var(--panel); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 1.15rem;
  border: 0; border-radius: var(--r);
  background: var(--key); color: var(--bg);
  font: inherit; font-weight: 700; font-size: 0.9375rem;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: filter 180ms ease;
}
.btn:hover { filter: brightness(1.08); }

.btn.ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn.ghost:hover { background: var(--key-dim); box-shadow: inset 0 0 0 1px var(--key); }

@media (max-width: 34rem) {
  .nav { flex-wrap: wrap; padding-block: 0.75rem; min-height: 0; row-gap: 0.5rem; }
  .links { order: 3; margin-left: 0; width: 100%; }
  .links a { padding-inline: 0 0.9rem; }
}

/* ---------------------------------------------------------------- hero -- */

.hero { padding-block: clamp(2.5rem, 9vw, 5rem) clamp(1.75rem, 5vw, 2.5rem); text-align: center; }

.hero h1 {
  font-family: "Saira Condensed", Sora, sans-serif;
  font-weight: 800;
  font-size: clamp(3.5rem, 14vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  margin-bottom: 1.25rem;
}

.code {
  display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 46px; padding: 0 1rem;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); color: var(--ink);
  font: inherit; cursor: pointer;
  transition: border-color 180ms ease;
}
.code:hover { border-color: var(--key); }
.code b { color: var(--mut); font-weight: 600; font-size: 0.8125rem; }
.code span { font-weight: 700; }
.code i { color: var(--key); font-style: normal; font-weight: 700; font-size: 0.8125rem; }

.what {
  max-width: 46ch;
  margin: 1rem auto 0;
  color: var(--mut);
  font-size: 0.9375rem;
}
.what a { color: var(--key); text-decoration: none; }
.what a:hover { text-decoration: underline; }

.copy-live { min-height: 1.4em; margin: 0.6rem 0 0; color: var(--key); font-size: 0.875rem; }

/* --------------------------------------------------------------- stats -- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: clamp(2rem, 6vw, 3rem);
}

.stat { background: var(--panel); padding: clamp(0.9rem, 3vw, 1.25rem); text-align: center; }
.stat .n {
  font-weight: 700;
  font-size: clamp(1.05rem, 0.75rem + 1.5vw, 1.6rem);
  line-height: 1.2;
  white-space: nowrap;
}
.stat .l { color: var(--mut); font-size: 0.75rem; margin-top: 0.15rem; }

/* --------------------------------------------------------------- board -- */

#board { padding-bottom: clamp(3rem, 8vw, 5rem); }

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.9rem;
}

#board h2 {
  font-family: "Saira Condensed", Sora, sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
  letter-spacing: 0.03em;
}

/* Source credit. The Waste mark is the one place a third colour is allowed:
   a sponsor should look like itself, not be repainted to match the site. Kept
   small so it reads as attribution rather than as a second brand. */
.by {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 180ms ease;
}
.by:hover { opacity: 1; }
.by span { color: var(--mut); font-size: 0.75rem; }
.by img { width: auto; height: 19px; display: block; }

/* ------------------------------------------------------------- podium -- */

.podium {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.podium-slot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  min-width: 0;
}
.podium-slot.p1 { border-color: var(--key); }

.pr {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 1.9rem;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--mut);
  font-weight: 700;
  font-size: 0.9375rem;
}
.podium-slot.p1 .pr { background: var(--key); color: var(--bg); }

.pb { display: flex; flex-direction: column; min-width: 0; }
.pn { font-weight: 700; overflow-wrap: anywhere; line-height: 1.25; }
.pw { color: var(--mut); font-size: 0.8125rem; }
.pz { color: var(--key); font-weight: 700; font-size: 0.8125rem; }

@media (min-width: 44rem) {
  /* DOM order stays 1, 2, 3 for mobile and screen readers; desktop reorders
     visually so first place takes the wider centre column. */
  .podium { grid-template-columns: 1fr 1.2fr 1fr; align-items: end; gap: 0.75rem; }
  .podium-slot {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 1rem;
    min-height: 122px;
    justify-content: flex-end;
  }
  .podium-slot.p1 { order: 2; min-height: 148px; background: var(--panel-2); }
  .podium-slot.p2 { order: 1; }
  .podium-slot.p3 { order: 3; }
  .podium-slot.p1 .pn { font-size: 1.15rem; }
}

.board {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--panel);
}

.board th {
  background: var(--panel-2);
  color: var(--mut);
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

/* Ranks 4 and down are a dense scan list, not a feature. The top three carry
   the visual weight in the podium above, so these rows stay tight. */
.board td {
  padding: 0.5rem 0.8rem;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--line);
}
.board tr:last-child td { border-bottom: 0; }
.board tbody tr:hover { background: var(--panel-2); }

.c-rk { width: 3rem; color: var(--mut); font-weight: 700; }
.c-nm { font-weight: 600; overflow-wrap: anywhere; }
.c-wg, .c-pz { text-align: right; white-space: nowrap; }
.board td.c-pz { color: var(--key); font-weight: 700; }
.board td.c-pz.none { color: var(--mut); font-weight: 400; }

/* Top three get a quiet marker. The rank numeral still carries the order, so
   nothing depends on color alone. */
.board tbody tr.top .c-rk { color: var(--key); }

.more { margin-top: 0.9rem; }
.empty, .note { margin: 0.9rem 0 0; font-size: 0.875rem; }

@media (max-width: 30rem) {
  .board th, .board td { padding: 0.65rem 0.5rem; font-size: 0.9375rem; }
  .c-rk { width: 2.1rem; }
}

/* -------------------------------------------------------------- footer -- */

footer.site { border-top: 1px solid var(--line); }

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding-block: 1.5rem 2rem;
  color: var(--mut);
  font-size: 0.8125rem;
}
.foot-links { display: flex; gap: 1rem; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--key); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
