:root {
  --ink: #1a1a1a;
  --muted: #5a5a5a;
  --bg: #ffffff;
  --bg-alt: #f6f6f4;
  --line: #dcdcd8;
  --dem: #2255a4;
  --rep: #b3282d;
  --other: #6b6b6b;
  --accent: #1a1a1a;
  --max-width: 880px;
}

* { box-sizing: border-box; }

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

header.site-header {
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem;
}
.site-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}
.site-tagline {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--muted); }

h1 { font-size: 1.6rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
h3 { font-size: 1rem; margin: 1.25rem 0 0.5rem; }

.quick-answer {
  font-size: 1.05rem;
  background: var(--bg-alt);
  border-left: 3px solid var(--ink);
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
}

.table-wrap { overflow-x: auto; }
table.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.results-table th, table.results-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.results-table thead th {
  border-bottom: 2px solid var(--ink);
  font-weight: 600;
}
.party-democratic { color: var(--dem); font-weight: 600; }
.party-republican { color: var(--rep); font-weight: 600; }
.party-other { color: var(--other); font-weight: 600; }
.data-gap { color: var(--muted); font-style: italic; white-space: normal; }

.chart-caption { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.5rem; }

ul.related-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.35rem 1rem;
}
ul.related-links li { padding: 0.15rem 0; }
ul.related-links a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
ul.related-links a:hover { border-bottom-color: var(--ink); }

.pilot-note { color: var(--muted); font-size: 0.9rem; }

footer.sourcing-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
footer.sourcing-footer h2 { border-top: none; padding-top: 0; font-size: 0.95rem; margin-top: 0; }

footer.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

svg.margin-chart { max-width: 100%; height: auto; }

.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  font-size: 0.85rem;
}
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.cookie-banner-actions button {
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}
#cookie-accept { background: #fff; color: var(--ink); }
