:root {
  --target-red: #cc0000;
  --target-red-dark: #a50000;
  --target-red-soft: #fff0f0;
  --ink: #222222;
  --muted: #6f6f6f;
  --line: #dedede;
  --surface: #ffffff;
  --page: #f7f7f7;
  --success: #208055;
  --warning: #9a5b00;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

button,
select {
  font: inherit;
}

.site-header {
  background: var(--target-red);
  color: #ffffff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 64px;
}

.wordmark {
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.vote-section {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.vote-shell {
  display: grid;
  gap: 30px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0 52px;
  text-align: center;
}

.question-block {
  display: grid;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(44px, 6.3vw, 72px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.vote-form {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.state-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

select {
  width: min(360px, 100%);
  height: 50px;
  padding: 0 16px;
  border: 1px solid #bdbdbd;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.vote-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 220px));
  gap: 16px;
  width: min(460px, 100%);
}

.vote-button {
  min-height: 78px;
  border: 2px solid var(--target-red);
  border-radius: 8px;
  cursor: pointer;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.02em;
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}

.vote-button:hover {
  transform: translateY(-1px);
}

.vote-button:focus-visible,
.text-button:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(204, 0, 0, 0.3);
  outline-offset: 3px;
}

.vote-yes {
  background: var(--target-red);
  color: #ffffff;
}

.vote-no {
  background: #ffffff;
  color: var(--target-red);
}

.vote-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.status-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.status-message.success {
  color: var(--success);
}

.status-message.warning {
  color: var(--warning);
}

.results-section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 42px;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.national-panel,
.leaderboard-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.national-panel {
  display: grid;
  gap: 24px;
  padding: 28px;
}

.leaderboard-panel {
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

#national-call {
  color: var(--target-red);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.result-bar {
  display: flex;
  overflow: hidden;
  height: 28px;
  border-radius: 999px;
  background: #ececec;
}

.bar-yes {
  min-width: 0;
  background: var(--target-red);
  transition: width 180ms ease;
}

.bar-no {
  min-width: 0;
  background: #2d2d2d;
  transition: width 180ms ease;
}

.stats-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.stats-line strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.selected-state {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.selected-state strong {
  color: var(--ink);
  font-weight: 900;
}

.text-button {
  border: 1px solid var(--target-red);
  border-radius: 6px;
  background: #ffffff;
  color: var(--target-red);
  cursor: pointer;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.text-button:hover {
  background: var(--target-red-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 15px 18px;
  border-top: 1px solid var(--line);
  text-align: left;
  font-size: 15px;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td {
  font-weight: 800;
}

.no-state-row td {
  color: var(--muted);
}

.no-state-row td:first-child {
  font-weight: 900;
}

td:nth-child(2),
td:nth-child(3),
th:nth-child(2),
th:nth-child(3) {
  text-align: right;
}

.leaderboard-panel .panel-heading {
  padding: 24px 24px 18px;
}

@media (max-width: 780px) {
  .header-inner,
  .vote-shell,
  .results-section {
    width: min(100% - 28px, 1120px);
  }

  .header-inner {
    min-height: 58px;
  }

  .vote-shell {
    gap: 24px;
    padding: 46px 0 34px;
  }

  h1 {
    font-size: clamp(38px, 12.5vw, 58px);
    line-height: 0.96;
  }

  .vote-buttons {
    grid-template-columns: 1fr;
  }

  .vote-button {
    min-height: 68px;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  #national-call {
    font-size: 30px;
  }

  th,
  td {
    padding: 13px 14px;
  }
}
