:root {
  --bg: #f2eee4;
  --panel: rgba(255, 252, 246, 0.92);
  --ink: #1a1f1d;
  --muted: #5d625c;
  --line: rgba(26, 31, 29, 0.12);
  --accent: #c14c2f;
  --accent-deep: #7c2d1d;
  --blue: #205493;
  --red: #b2372f;
  --shadow: 0 20px 60px rgba(54, 43, 23, 0.12);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f7f3ea 0%, #efe7d6 100%);
  color: var(--ink);
  font-family: var(--sans);
}

.background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(26, 31, 29, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 31, 29, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 70%);
}

.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(8px);
  opacity: 0.6;
}

.blob-one {
  width: 30rem;
  height: 30rem;
  background: radial-gradient(circle, rgba(193, 76, 47, 0.24), transparent 65%);
  top: -8rem;
  left: -6rem;
}

.blob-two {
  width: 32rem;
  height: 32rem;
  background: radial-gradient(circle, rgba(32, 84, 147, 0.2), transparent 65%);
  right: -10rem;
  bottom: -10rem;
}

.app-shell {
  position: relative;
  width: min(1080px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero {
  padding: 1rem 0 1.5rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--accent-deep);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  max-width: 11ch;
}

.lede {
  margin: 1rem 0 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  border-radius: 28px;
  padding: 1.5rem;
}

.stack > * + * {
  margin-top: 1rem;
}

.card h2,
.card h3 {
  margin: 0;
  font-family: var(--serif);
  line-height: 1.08;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(26, 31, 29, 0.05);
  color: var(--muted);
  font-size: 0.92rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.action-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff8ef;
  padding: 0.9rem 1.2rem;
  font: inherit;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

.action-button.secondary {
  background: rgba(26, 31, 29, 0.08);
  color: var(--ink);
}

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

.action-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.question-card,
.intro-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.55);
}

.question-title {
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.option-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.option {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdfa;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.option:hover {
  border-color: rgba(26, 31, 29, 0.28);
  transform: translateY(-1px);
}

.option.selected {
  border-color: var(--accent);
  background: rgba(193, 76, 47, 0.07);
}

.option-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--ink);
}

.option-text {
  color: var(--muted);
  line-height: 1.6;
}

.conjoint-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

table.conjoint {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #fffdfa;
  border: 1px solid var(--line);
}

.conjoint th,
.conjoint td {
  border: 1px solid var(--line);
  padding: 0.95rem;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}

.conjoint th {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: rgba(26, 31, 29, 0.04);
}

.conjoint td:first-child,
.conjoint th:first-child {
  width: 28%;
}

.party {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: var(--ink);
}

.party::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  display: inline-block;
}

.party.dem::before {
  background: var(--blue);
}

.party.rep::before {
  background: var(--red);
}

.vote-block {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(26, 31, 29, 0.03);
}

.vote-options {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.vote-option {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdfa;
  padding: 0.9rem 1rem;
  cursor: pointer;
}

.vote-option input {
  margin-top: 0.25rem;
}

.summary-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1rem;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.55);
}

.small {
  font-size: 0.9rem;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100vw - 1rem, 100%);
    padding-top: 1rem;
  }

  .card {
    padding: 1rem;
    border-radius: 22px;
  }

  .hero h1 {
    max-width: 12ch;
  }
}
