:root {
  --background: hsl(45, 20%, 95%);
  --foreground: hsl(0, 0%, 8%);
  --muted: hsl(45, 10%, 85%);
  --muted-foreground: hsl(0, 0%, 35%);
}

.rankings-table tbody tr:last-child {
  border-bottom: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid transparent;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: "VT323", "Courier New", monospace;
}

.page {
  min-height: 100vh;
  background-color: var(--background);
}

.container {
  width: 100%;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Header */
.site-header {
  background-color: var(--foreground);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  display: block;
  height: 7.5rem;
  width: auto;
  max-width: 100%;
}

.week-badge {
  border: 2px solid var(--background);
  padding: 0.75rem 1.5rem;
  text-align: center;
}

.week-badge span {
  font-size: 1.125rem;
  line-height: 1.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--background);
}

/* Main Content */
.main-content {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.rankings-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2rem;
}

.section-title {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: 1rem;
}

/* Classification Tabs */
.tabs {
  display: flex;
  border: 2px solid var(--foreground);
}

.tab-btn {
  flex: 1 1 0%;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--background);
  color: var(--foreground);
  cursor: pointer;
  transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn:hover:not(.is-active) {
  background-color: var(--muted);
}

.tab-btn.is-active {
  background-color: var(--foreground);
  color: var(--background);
}

.tab-btn:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: -4px;
}

/* Rankings Table */
.table-box {
  margin-top: 1rem;
  border: 2px solid var(--foreground);
  padding: 1rem;
}

.rankings-table {
  width: 100%;
  border-collapse: collapse;
}

.rankings-table thead tr {
  border-bottom: 2px solid var(--foreground);
}

.rankings-table th {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rankings-table tbody tr {
  border-bottom: 1px solid var(--muted);
}

.rankings-table td {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  vertical-align: middle;
}

.col-rank {
  text-align: left;
  width: 4rem;
}

.col-team {
  text-align: left;
}

.col-record {
  text-align: right;
  width: 7rem;
}

.cell-rank {
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-variant-numeric: tabular-nums;
}

.cell-team {
  font-size: 1.25rem;
  line-height: 1.75rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.cell-record {
  font-size: 1.25rem;
  line-height: 1.75rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Footer */
.site-footer {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.footer-text {
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
}

/* Tablet / Desktop */
@media (min-width: 768px) {
  .header-inner {
    flex-direction: row;
  }

  .brand-logo {
    height: 6rem;
  }

  .week-badge span {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  .section-title {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .rankings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
  }
}