*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: #fff;
  color: #121212;
  font-family: "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 64px;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid #e2e2e2;
}

.wordmark {
  color: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}

.nav-link,
.sign-in {
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}

.nav-link {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
}

.nav-link:hover {
  text-decoration: underline;
}

.sign-in {
  color: inherit;
  padding: 9px 14px;
  border: 1px solid #121212;
  background: #fff;
  text-decoration: none;
}

.sign-in:hover {
  background: #d0d0d0;
  border-color: #d0d0d0;
}

.wordmark:focus-visible,
.nav-link:focus-visible,
.sign-in:focus-visible,
.filter:focus-visible,
.begin:focus-visible {
  outline: 2px solid #121212;
  outline-offset: 3px;
}

.home {
  padding: 88px 24px 64px;
}

.today {
  width: min(920px, 100%);
  margin: 0 auto;
}

.today-label {
  margin: 0;
  color: #5a5a5a;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.countdown {
  margin: 28px 0 0;
  padding-bottom: 28px;
  border-bottom: 1px solid #c8c8c8;
  font-size: 180px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 0.85;
  text-align: center;
}

.catalog {
  min-height: calc(100dvh - 64px);
  scroll-margin-top: 64px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 56px;
}

.filter {
  padding: 9px 14px;
  border: 1px solid #121212;
  background: #fff;
  color: #121212;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.filter:hover {
  background: #f5f5f5;
}

.filter[aria-pressed="true"] {
  background: #121212;
  color: #fff;
}

.filter[aria-pressed="true"]:hover {
  background: #2a2a2a;
}

.games {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 28px;
}

.games-empty {
  margin: 0;
  color: #6f6f6f;
  font-size: 14px;
  font-weight: 500;
}

.game-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.game-row[hidden],
.games-empty[hidden] {
  display: none;
}

.game-title,
.game-status {
  margin: 0;
}

.game-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.game-category {
  color: #b0b0b0;
  font-size: 15px;
  font-weight: 500;
}

.game-status {
  margin-top: 4px;
  color: #6f6f6f;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}

.begin {
  flex-shrink: 0;
  padding: 10px 22px;
  border: 1px solid #121212;
  background: #121212;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.begin:hover {
  background: #2a2a2a;
}

.school-leaderboard {
  width: min(920px, calc(100% - 48px));
  margin: 56px auto;
}

.school-leaderboard h1 {
  margin: 0;
  line-height: 1.15;
}

.school-leaderboard p {
  color: #4d4d4d;
  line-height: 1.5;
}

.school-leaderboard a {
  color: inherit;
}

.school-leaderboard table {
  width: 100%;
  margin: 28px 0;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.school-leaderboard :is(th, td) {
  padding: 12px;
  border-bottom: 1px solid #e2e2e2;
}

.school-leaderboard tr > :nth-child(2) {
  overflow-wrap: anywhere;
  text-align: left;
}

@media (max-width: 720px) {
  .site-header {
    gap: 16px;
    padding: 12px 16px;
  }

  .wordmark {
    font-size: 13px;
    letter-spacing: 0.04em;
  }

  .site-nav {
    gap: 14px;
  }

  .home {
    padding-top: 48px;
  }

  .today-label {
    font-size: 15px;
    letter-spacing: 0.12em;
  }

  .countdown {
    margin-top: 16px;
    padding-bottom: 16px;
    font-size: 64px;
  }

  .leaderboard-header,
  .leaderboard-header .site-nav {
    flex-wrap: wrap;
  }

  .school-leaderboard {
    width: calc(100% - 32px);
    margin-top: 32px;
  }

  .school-leaderboard :is(th, td) {
    padding: 8px 4px;
    font-size: 13px;
  }
}
