* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: #12141a;
  color: #f4f1ea;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.page {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.mast h1,
.wordmark {
  margin: 0;
  color: #f4f1ea;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.95;
  text-decoration: none;
}

.tagline {
  margin: 12px 0 0;
  color: #ddd9d0;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ad-slot {
  width: min(728px, 100%);
  min-height: 90px;
  margin: 18px auto 0;
  background: transparent;
}

.board { margin-top: 22px; }

.lead {
  position: absolute;
  z-index: 3;
  top: 50%;
  margin: 0;
  color: #f4f1ea;
  font-size: clamp(3rem, 7vw, 4.6rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transform: translateY(-50%);
}

.lead-red { left: 28px; }

.lead-blue { right: 28px; }

.meter {
  position: relative;
  height: 128px;
  border-radius: 32px;
  overflow: hidden;
  background: #1b1f28;
  box-shadow: inset 0 0 0 3px #323846;
}

.meter-fill {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 50%;
  width: 0;
  transition: left 90ms linear, width 90ms linear;
}

.meter-fill.is-red {
  background: #e10600;
  border-radius: 18px 0 0 18px;
}

.meter-fill.is-blue {
  background: #1c4ed8;
  border-radius: 0 18px 18px 0;
}

.meter-zero {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: #f4f1ea;
}

.meter-tie {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: #f4f1ea;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.meter-tie[hidden] { display: none; }

.clicks {
  margin: 14px 0 0;
  color: #b7b2a8;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.race-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 72px;
}

.choice {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plea {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
}

.plea-red { color: #ff6a5c; }

.plea-blue { color: #8eafff; }

.race-button {
  width: 100%;
  min-height: 188px;
  border: 0;
  border-radius: 32px;
  color: #fff;
  font: inherit;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.race-button-red {
  background: #e10600;
  box-shadow: 0 8px 0 #8c0400;
}

.race-button-blue {
  background: #1c4ed8;
  box-shadow: 0 8px 0 #102f86;
}

.race-button:active {
  transform: translateY(4px);
}

.race-button-red:active { box-shadow: 0 4px 0 #8c0400; }

.race-button-blue:active { box-shadow: 0 4px 0 #102f86; }

.race-button:focus-visible {
  outline: 3px solid #f4f1ea;
  outline-offset: 4px;
}

.race-button.is-cooling {
  cursor: default;
  filter: brightness(0.78);
  pointer-events: none;
}

.race-button.is-cooling:active {
  transform: none;
}

.pace {
  min-height: 1.4rem;
  margin: 14px 0 0;
  color: #b7b2a8;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}

.pace[hidden] { display: none; }

.site-footer {
  margin-top: 18px;
  text-align: center;
}

.site-footer a {
  color: #b7b2a8;
  font-size: 0.95rem;
  font-weight: 700;
}

.legal { max-width: 40rem; margin-top: 28px; }

.legal h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.legal h2 {
  margin: 1.7rem 0 0.4rem;
  font-size: 1.15rem;
}

.legal p {
  margin: 0 0 0.8rem;
  color: #ddd9d0;
  line-height: 1.55;
}

.legal a { color: #f4f1ea; }

.updated { color: #a7a39a; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 640px) {
  .page { padding-top: 22px; }
  .meter { height: 104px; }
  .race-buttons { margin-top: 48px; gap: 12px; }
  .plea { font-size: 0.9rem; }
  .race-button { min-height: 136px; border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .meter-fill, .race-button { transition: none; }
}
