:root {
  color-scheme: dark;
  --ink: #f4f8ef;
  --muted: #b8c5b8;
  --field: #0d3b24;
  --field-bright: #15713e;
  --midnight: #07130e;
  --panel: #0b2117;
  --line: rgb(236 247 227 / 0.16);
  --accent: #d6f561;
  --danger: #ff9b87;
  --radius: 18px;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--midnight);
}

button, input { font: inherit; }
button { cursor: pointer; }

.app-shell {
  display: grid;
  min-height: 100dvh;
  background: var(--midnight);
}

.hero {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  isolation: isolate;
  background: #0a2e1c url("./stadium.png") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.46;
  background-image: linear-gradient(90deg, rgb(255 255 255 / 0.09) 1px, transparent 1px), linear-gradient(rgb(255 255 255 / 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.hero__shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgb(5 18 12 / .96) 0%, rgb(5 18 12 / .72) 48%, rgb(5 18 12 / .16) 100%), linear-gradient(0deg, var(--midnight) 0%, transparent 36%);
}

.hero__content {
  max-width: 660px;
  padding: 42px 26px 64px;
}

.league-mark, .eyebrow, .hero__season {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  max-width: 9ch;
  margin: 16px 0;
  font-size: clamp(3rem, 11vw, 5.4rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.86;
  text-transform: uppercase;
}

.hero__copy {
  max-width: 34rem;
  margin-bottom: 0;
  color: #e1ebdc;
  font-size: 1rem;
  line-height: 1.5;
}

.hero__season {
  position: absolute;
  right: 26px;
  bottom: 28px;
  color: #e6efdf;
  writing-mode: vertical-rl;
}

.ballot-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  margin: -28px auto 0;
  padding: 0 16px 36px;
}

.screen {
  border: 1px solid rgb(236 247 227 / .22);
  border-radius: var(--radius);
  color: #f4f8ef;
  background: linear-gradient(155deg, rgb(19 54 33 / .99), rgb(8 27 18 / 1));
  box-shadow: 0 20px 70px rgb(0 0 0 / .28);
  padding: 28px 22px;
}

.screen h2 { color: #f4f8ef; }
.screen .screen-copy { color: #c4d0c1; }
.screen label { color: #edf4e9; }

.screen.is-active { animation: rise .28s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

h2 {
  margin: 8px 0 8px;
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.screen-copy { color: var(--muted); line-height: 1.5; }
form { margin-top: 24px; }
label { display: block; font-size: 0.9rem; font-weight: 750; }
input[type="text"] {
  width: 100%;
  margin-top: 8px;
  border: 1px solid rgb(236 247 227 / .28);
  border-radius: 10px;
  outline: none;
  padding: 14px 15px;
  color: var(--ink);
  background: rgb(4 17 10 / .7);
  font-size: 1.05rem;
}
input[type="text"]::placeholder { color: #809082; }
input[type="text"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(214 245 97 / .16); }

.button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 50px;
  margin-top: 18px;
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 850;
  letter-spacing: 0.01em;
  transition: transform .14s ease-out, background-color .14s ease-out, opacity .14s ease-out;
}
.button:active { transform: translateY(1px) scale(.99); }
.button:focus-visible, .link-button:focus-visible, .punishment-option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.button--primary { color: #142109; background: var(--accent); }
.button--primary:hover:not(:disabled) { background: #e2ff80; }
.button--primary:disabled { cursor: not-allowed; opacity: .42; }
.button--secondary { color: var(--ink); background: transparent; border: 1px solid rgb(236 247 227 / .4); }
.button--secondary:hover { background: rgb(236 247 227 / .08); }

.privacy-note { margin: 15px 0 0; color: #8fa091; font-size: .78rem; text-align: center; }
.form-error { min-height: 1.2em; margin: 10px 0 0; color: var(--danger); font-size: .88rem; }

.ballot-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.vote-counter { flex: 0 0 auto; margin: 4px 0 0; color: var(--muted); font-size: .82rem; text-align: right; }
.vote-counter strong { display: block; color: var(--accent); font-size: 1.55rem; line-height: 1; }
fieldset { display: grid; gap: 9px; margin: 0; padding: 0; border: 0; }

.punishment-option {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: #eaf1e6;
  background: rgb(4 17 10 / .42);
  font-size: .96rem;
  cursor: pointer;
  transition: border-color .14s ease-out, background-color .14s ease-out, transform .14s ease-out;
}
.punishment-option:hover { border-color: rgb(214 245 97 / .6); }
.punishment-option:has(input:checked) { border-color: var(--accent); background: rgb(214 245 97 / .11); }
.punishment-option:has(input:checked) .option-check { border-color: var(--accent); background: var(--accent); }
.punishment-option:has(input:checked) .option-check::after { opacity: 1; transform: rotate(45deg) scale(1); }
.punishment-option input { position: absolute; opacity: 0; pointer-events: none; }
.option-check { position: relative; width: 22px; height: 22px; border: 1px solid rgb(236 247 227 / .48); border-radius: 5px; }
.option-check::after { content: ""; position: absolute; top: 3px; left: 7px; width: 5px; height: 10px; border: solid #12200d; border-width: 0 2px 2px 0; opacity: 0; transform: rotate(45deg) scale(.5); transition: opacity .14s ease-out, transform .14s ease-out; }

.result-summary { margin: 22px 0 12px; border-radius: 10px; padding: 15px; background: rgb(214 245 97 / .1); color: #e8f5d4; line-height: 1.4; }
.results-list { display: grid; gap: 8px; }
.result-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.result-row:last-child { border-bottom: 0; }
.result-label { font-size: .92rem; line-height: 1.3; }
.result-count { color: var(--accent); font-size: .84rem; font-weight: 800; white-space: nowrap; }
.link-button { display: block; margin: 22px auto 0; border: 0; padding: 4px; color: var(--muted); background: transparent; font-size: .8rem; text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (min-width: 680px) {
  .app-shell { grid-template-columns: minmax(380px, .84fr) minmax(460px, 1.16fr); align-items: stretch; }
  .hero { min-height: 100dvh; }
  .hero__content { position: sticky; top: 0; padding: 12vh 8vw 40px 8vw; }
  .ballot-panel { align-self: center; margin: 0; padding: 38px; }
  .screen { padding: 34px; }
  .hero__season { right: 38px; bottom: 38px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
