:root {
  --navy: #1b2a5e;
  --orange: #f2994a;
  --peach: #fdeee0;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --yes: #1f8a3d;
  --no: #c0392b;
  --neutral: #2563eb;
  --card-bg: #ffffff;
  --page-bg: #f7f7f9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--page-bg);
  color: var(--ink);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.badge {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

.wordmark {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
}

.tagline {
  color: var(--orange);
  font-weight: 600;
}

.lede {
  color: var(--muted);
  line-height: 1.5;
}

.lede a { color: var(--navy); }

.zip-finder {
  background: var(--peach);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 20px 0;
}

.zip-finder label {
  display: block;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 8px;
}

.zip-finder-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zip-finder-row input {
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  flex: 1 1 200px;
  max-width: 320px;
}

@media (max-width: 559px) {
  .zip-finder-row input {
    flex-basis: 100%;
    max-width: none;
  }
}

.zip-finder-row button {
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

#zipSubmit {
  background: var(--navy);
  color: #fff;
}

#zipSubmit:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: default;
}

.zip-clear {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy) !important;
}

.zip-message {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

.zip-message-applied {
  font-size: 16px;
  color: var(--ink);
}

/* #altMessage - the "not valid"/prompt text and the "may not appear on
   your ballot" caveat are mutually exclusive (never both showing at
   once, see site.js) but share this one style, matching the old
   "Sorry, ... is not valid." look (same values as the unapplied
   .zip-message above). */
.alt-message {
  font-size: 13px;
  color: var(--muted);
}


.jumpnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.jumpnav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  background: var(--peach);
  border-radius: 999px;
  padding: 6px 12px;
  text-decoration: none;
}

.jumpnav a:hover { background: #fbd9b7; }

.category {
  margin: 36px 0;
}

.category h2.section-title,
.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  border-bottom: 3px solid var(--orange);
  padding-bottom: 6px;
  margin-bottom: 18px;
}

.jurisdiction-group {
  margin-bottom: 22px;
}

.jurisdiction-group h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 0 0 10px;
}

/* Cards never grow past their desktop width: 6 columns, then 3, then 2. */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 163px));
  gap: 18px;
}

.card-grid .row-start {
  grid-column-start: 1;
}

@media (min-width: 560px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 163px));
  }
}

@media (min-width: 1082px) {
  .card-grid {
    grid-template-columns: repeat(6, minmax(0, 163px));
  }

  .card-grid .row-start {
    grid-column-start: auto;
  }
}

.candidate-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  color: inherit;
  text-decoration: none;
}

a.candidate-card:hover {
  border-color: var(--orange);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

a.candidate-card:hover .candidate-name {
  text-decoration: underline;
}

.candidate-designation {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.candidate-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  object-fit: cover;
  margin: 0 0 10px;
  background: var(--peach);
  display: block;
}

.candidate-photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-weight: 800;
  font-size: 32px;
}

.candidate-name {
  font-weight: 800;
  font-size: 16px;
  color: var(--orange);
  text-transform: uppercase;
}

.measure-list {
  border-top: 1px solid var(--border);
}

.measure-row {
  display: block;
  padding: 10px 12px;
  margin: 0 -12px;
  border-bottom: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px transparent;
  color: inherit;
  text-decoration: none;
}

a.measure-row:hover {
  box-shadow: inset 0 0 0 1px var(--orange), 0 6px 16px rgba(0, 0, 0, 0.2);
}

a.measure-row:hover .position-phrase {
  text-decoration: underline;
}

.measure-locale {
  font-size: 14px;
  font-weight: 800;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.measure-body {
  font-size: 14px;
}

.measure-title {
  color: var(--ink);
}

.position-phrase {
  font-weight: 400;
  color: var(--ink);
  white-space: nowrap;
}

.position-text {
  font-weight: 800;
  letter-spacing: 0.3px;
}

.position-text.support { color: var(--yes); }
.position-text.oppose { color: var(--no); }
.position-text.neutral { color: var(--neutral); }
.position-text.unknown { color: var(--muted); }

.disclaimer-wrap {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}

.disclaimer {
  /* Legal disclaimer text - black/white is a compliance requirement, not
     part of the site's color theme, so it's hardcoded rather than pulled
     from --ink/--card-bg. */
  padding: 6px;
  border: 1px solid black;
  background: white;
  color: black;
  font-size: 12px;
  text-align: center;
}

.fine-print { margin-top: 6px; }
