/* Visual foundation copied from the MTTV Elections frontend (nextgen.css). */
:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --panel: #ffffff;
  --panel-soft: #eef4f1;
  --ink: #172033;
  --muted: #5b667a;
  --line: #d8e0eb;
  --line-strong: #bbc7d6;
  --nav: #12203a;
  --blue: #164ea6;
  --green: #1f7a58;
  --gold: #9a5a00;
  --red: #a0392a;
  --shadow: 0 8px 18px rgba(23, 32, 51, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--blue);
}

a:hover {
  color: #0d397d;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--nav);
  color: #fff;
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
  gap: 0.65rem;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 148px;
  height: 38px;
  border-radius: 4px;
  object-fit: contain;
  background: #fff;
}

.brand span {
  white-space: nowrap;
}

.site-header nav,
.site-footer nav,
.related-links,
.jump-nav,
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.site-header nav {
  justify-content: flex-end;
  min-width: 0;
  row-gap: 0.35rem;
}

.site-header nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.25rem;
  color: #e8eef9;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.site-header nav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.3rem;
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.related-links {
  margin: 0.5rem 0 1rem;
  font-size: 0.92rem;
}

.related-links span {
  color: var(--muted);
  font-weight: 800;
}

.related-links a,
.jump-nav a,
.hero-actions a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  background: #e8eef7;
  border: 1px solid #d3ddeb;
  border-radius: 6px;
  color: #123b74;
  font-weight: 700;
  text-decoration: none;
}

.related-links a[aria-current="page"] {
  background: #dff1ea;
  border-color: #a9d1c2;
  color: #14543d;
}

.jump-nav {
  margin: 0 0 1rem;
  padding: 0.65rem 0;
  border-block: 1px solid var(--line);
}

.hero {
  padding: 1.75rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  align-items: start;
  gap: 1.5rem;
}

.hero h1 {
  max-width: 820px;
  margin: 0.25rem 0 0.75rem;
  font-size: 3rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  margin-top: 1rem;
}

.hero-panel,
.metric,
.event-card,
.question-card,
.rule-panel,
.state-card,
.glossary-list div,
.resource-list li,
.fact-list div,
.faq-list details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 1rem;
}

.index-finder {
  display: grid;
  gap: 1rem;
}

.hero-panel dl {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.hero-panel dl div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.hero-panel dl div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.hero-panel dt,
.metric span,
.state-card span,
.fact-list dt {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.hero-panel dd,
.fact-list dd {
  min-width: 0;
  margin: 0;
  font-weight: 700;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.source-note,
.trust-note {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  background: var(--panel-soft);
  border: 1px solid #cddfd7;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  color: #314157;
}

.source-note a,
.trust-note a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  font-weight: 800;
}

.ad-slot {
  margin: 1.25rem 0;
  padding: 0.75rem 0;
  border-block: 1px solid var(--line);
  min-height: 120px;
}

.ad-slot ins {
  min-height: 90px;
}

.ad-label {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-intro {
  max-width: 760px;
  margin: -0.4rem 0 1rem;
  color: var(--muted);
}

.state-finder {
  display: grid;
  gap: 0.55rem;
}

.state-finder label {
  color: var(--ink);
  font-weight: 800;
}

.state-finder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.state-finder select,
.state-finder button {
  min-height: 42px;
  border-radius: 6px;
  font: inherit;
}

.state-finder select {
  width: 100%;
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.state-finder button {
  padding: 0 0.85rem;
  border: 1px solid #123b74;
  background: #164ea6;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.state-finder button:hover:not(:disabled) {
  background: #123b74;
}

.state-finder button:disabled {
  border-color: #aeb9c8;
  background: #c8d1dd;
  color: #5b667a;
  cursor: not-allowed;
}

.election-table-wrap {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.election-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

.election-table th,
.election-table td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.election-table thead th {
  background: #e8eef7;
  color: #123b74;
  font-size: 0.86rem;
  text-transform: uppercase;
}

.election-table tbody tr:last-child th,
.election-table tbody tr:last-child td {
  border-bottom: 0;
}

.election-table a {
  font-weight: 800;
}

.primary-comparison-table {
  min-width: 760px;
}

.electoral-comparison-table {
  min-width: 760px;
}

.type-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.type-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  background: #e8eef7;
  border: 1px solid #d3ddeb;
  border-radius: 999px;
  color: #123b74;
  font-size: 0.88rem;
  font-weight: 800;
}

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.metric {
  min-height: 124px;
  padding: 1rem;
}

.metric strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.35rem;
  line-height: 1.15;
}

.metric em,
.state-card em {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-style: normal;
}

.section-heading {
  margin: 2.25rem 0 1rem;
}

.section-heading h2 {
  margin: 0.25rem 0 0;
  font-size: 1.75rem;
  line-height: 1.2;
}

.event-list {
  display: grid;
  gap: 1rem;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.event-card {
  padding: 1rem;
}

.question-card,
.rule-panel {
  padding: 1rem;
}

.event-card-header {
  margin-bottom: 0.5rem;
}

.event-card h3,
.question-card h3,
.rule-panel h3 {
  margin: 0.2rem 0 0;
  font-size: 1.45rem;
  line-height: 1.2;
}

.question-card h3,
.rule-panel h3 {
  color: #123b74;
  font-size: 1.28rem;
}

.question-card p,
.rule-panel p {
  color: #37445a;
}

.rules-stack {
  display: grid;
  gap: 1rem;
}

.event-card details {
  margin-top: 0.75rem;
}

.event-card summary {
  min-height: 36px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 800;
}

.source-link,
.content-link {
  margin: 0.75rem 0 0;
  font-weight: 800;
}

.source-link a,
.content-link a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
}

.deadline-list {
  display: grid;
  gap: 0.75rem;
  padding-left: 1.25rem;
}

.deadline-list time {
  display: block;
  color: var(--gold);
  font-weight: 800;
}

.deadline-list p {
  margin: 0.25rem 0 0;
  color: #37445a;
}

.resource-list,
.fact-list,
.faq-list,
.glossary-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.resource-list li,
.fact-list div,
.glossary-list div {
  padding: 0.85rem;
}

.glossary-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.glossary-list dt {
  color: #123b74;
  font-size: 1.08rem;
  font-weight: 900;
}

.glossary-list dd {
  margin: 0.4rem 0 0;
  color: #37445a;
}

.resource-list a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  font-weight: 800;
}

.faq-list details {
  padding: 0.85rem 1rem;
}

.faq-list summary {
  min-height: 36px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 800;
}

.faq-list p {
  margin: 0.75rem 0 0;
  color: #37445a;
}

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

.state-card {
  min-height: 126px;
  padding: 1rem;
  text-decoration: none;
}

.state-card strong {
  display: block;
  margin-top: 0.5rem;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.2;
}

.state-card p {
  margin: 0.35rem 0 0;
  color: #37445a;
  font-size: 0.92rem;
}

.state-card-detailed {
  min-height: 176px;
}

.state-jump {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
}

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

.state-jump select {
  width: 100%;
  min-height: 40px;
  padding: 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.footer-copyright {
  flex-basis: 100%;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .site-header {
    position: static;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.75rem;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    justify-content: stretch;
    width: 100%;
  }

  .site-header nav a {
    justify-content: center;
    min-width: 0;
    min-height: 42px;
    padding: 0.5rem 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    text-align: center;
    white-space: normal;
  }

  .site-header nav a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.16);
  }

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

  .coverage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 0.75rem 1rem;
  }

  .site-header nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  main {
    width: min(100% - 1rem, 1180px);
  }

  .brand span {
    white-space: normal;
  }

  .hero {
    padding-top: 1.25rem;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .hero-panel dl div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .election-table-wrap {
    overflow-x: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .election-table {
    min-width: 0;
  }

  .election-table,
  .election-table tbody,
  .election-table tr,
  .election-table th,
  .election-table td {
    display: block;
  }

  .election-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .election-table tbody {
    display: grid;
    gap: 0.85rem;
  }

  .election-table tbody tr {
    padding: 0.9rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .election-table tbody th {
    padding: 0 0 0.7rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.02rem;
  }

  .election-table tbody td {
    display: grid;
    grid-template-columns: minmax(7.5rem, 42%) minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
  }

  .election-table tbody td:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .election-table tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 800;
  }

  .metric-grid,
  .question-grid,
  .state-grid,
  .coverage-grid,
  .glossary-list,
  .state-finder-row {
    grid-template-columns: 1fr;
  }
}

/* Officials directory additions. */
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 100; padding: 0.75rem 1rem; background: #fff; color: var(--ink); }
.skip-link:focus { top: 0.5rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
#main:focus { outline: none; }
#coverage { scroll-margin-top: 8rem; }
.coverage-section { padding-top: 2rem; }
.office-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.office-card { padding: 1.25rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.office-card h3 { margin: 0 0 0.65rem; font-size: 1.12rem; }
.office-card p { color: var(--muted); margin: 0 0 1rem; }
.availability { display: inline-block; font-size: 0.8rem; font-weight: 700; color: #14543d; background: #dff1ea; border-radius: 4px; padding: 0.25rem 0.5rem; }
.hero-panel h2 { margin: 0.5rem 0; }
@media (max-width: 860px) { .office-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .office-grid { grid-template-columns: 1fr; } .brand span { white-space: normal; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* California directory and profiles. */
[hidden] { display: none !important; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; list-style: none; gap: 0.5rem; padding: 0; margin: 0.8rem 0; color: var(--muted); font-size: 0.9rem; }
.breadcrumbs li + li::before { content: '/'; margin-right: 0.5rem; color: var(--muted); }
.breadcrumbs li { overflow-wrap: anywhere; }
.hero-actions .primary-action { background: var(--blue); color: white; border-color: var(--blue); }
.office-card .eyebrow { margin-bottom: 0.65rem; }
.text-action { font-weight: 700; }
.small-note, .record-date { color: var(--muted); font-size: 0.9rem; }
.directory-section { padding: 1rem 0; }
.directory-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; background: var(--panel); padding: 1.25rem; border: 1px solid var(--line); border-radius: 8px; }
.directory-filters > div { flex: 1 1 170px; }
.directory-filters > div:first-child { flex-grow: 2; }
.directory-filters label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.directory-filters input, .directory-filters select, .directory-filters button { min-height: 44px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 0.6rem; font: inherit; background: white; color: var(--ink); }
.directory-filters input, .directory-filters select { width: 100%; min-width: 0; }
.directory-filters button { cursor: pointer; font-weight: 700; }
.result-count { color: var(--muted); font-weight: 700; }
.official-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.official-card { display: flex; flex-direction: column; align-items: start; padding: 1.25rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.official-card h2 { font-size: 1.3rem; margin: 0.6rem 0; }
.party-label { margin: 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: auto; font-weight: 700; }
.card-actions a { padding: 0.35rem 0; }
.empty-state { padding: 2rem; background: var(--panel-soft); border: 1px solid var(--line); }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.content-panel { padding: 1.5rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.content-panel h2 { margin: 0 0 1rem; font-size: 1.4rem; }
.content-panel h3 { font-size: 1.1rem; }
.profile-section { margin-top: 1.25rem; scroll-margin-top: 7rem; }
.profile-grid section { scroll-margin-top: 7rem; }
.profile-facts { margin: 0; }
.profile-facts > div { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.profile-facts dt { color: var(--muted); font-weight: 700; font-size: 0.9rem; }
.profile-facts dd { margin: 0.2rem 0 0; white-space: pre-line; }
.content-panel, .official-card { overflow-wrap: anywhere; }
.assignment-list { padding-left: 1.25rem; }
.assignment-list > li { padding: 0.5rem 0 1.2rem; border-bottom: 1px solid var(--line); }
.assignment-list ul { margin-top: 0.75rem; }
.assignment-list li li { margin: 0.5rem 0; }
.source-links li { margin: 0.6rem 0; }
.reading-column { max-width: 850px; }
@media (max-width: 1080px) { .site-header { position: static; } .site-header nav { flex-wrap: wrap; } }
@media (max-width: 860px) { .official-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .profile-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .official-grid { grid-template-columns: 1fr; } .directory-filters > div { flex-basis: 100%; } .content-panel { padding: 1rem; } }

/* Nationwide jurisdiction browsing and source comparisons. */
.jurisdiction-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.jurisdiction-card { display: flex; flex-direction: column; gap: 0.3rem; padding: 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); text-decoration: none; }
.jurisdiction-card:hover { border-color: var(--blue); background: #eef4ff; }
.jurisdiction-card span { color: var(--muted); font-size: 0.9rem; }
.source-warning { padding: 1.2rem; margin: 1.5rem 0; border: 1px solid #c9aa69; border-left: 4px solid var(--gold); border-radius: 6px; background: #fff8e9; overflow-wrap: anywhere; }
.source-warning h2 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.source-warning li { margin: 0.75rem 0; }
#jurisdictions { scroll-margin-top: 7rem; }
@media (max-width: 860px) { .jurisdiction-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .jurisdiction-grid { grid-template-columns: 1fr; } }

/* Officials overview follows the Electoral College index layout. */
.officials-section { scroll-margin-top: 7rem; }
.partisan-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; width: 100%; }
.partisan-overview > .partisan-metric { min-width: 0; }
.partisan-metric { padding: 1.15rem; }
.partisan-metric .eyebrow { font-size: 0.7rem; margin-bottom: 0.5rem; }
.partisan-metric .metric-total { margin: 1rem 0; color: var(--muted); }
.metric-total strong { font-size: 2rem; line-height: 1; color: var(--ink); }
.party-bar { display: flex; height: 12px; width: 100%; overflow: hidden; border-radius: 3px; background: #e6eaf0; }
.party-democrat { background: #2563ad; color: #fff; }
.party-republican { background: #b43e42; color: #fff; }
.party-independent { background: #7254a3; color: #fff; }
.party-other { background: #287568; color: #fff; }
.party-unknown { background: #697586; color: #fff; }
.party-vacant { background: repeating-linear-gradient(135deg, #d8dde5 0 4px, #f7f9fc 4px 8px); color: #263349; }
.party-review { background: #926014; color: #fff; }
.party-missing { background: #e2e7ef; color: #364359; }
.party-dot { display: inline-block; width: 10px; height: 10px; flex: 0 0 10px; border-radius: 2px; }
.party-counts { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; padding: 0; margin: 0.6rem 0 0; list-style: none; font-size: 0.8rem; color: #37445a; }
.party-counts li { display: flex; align-items: baseline; gap: 0.35rem; }
.party-counts small { white-space: nowrap; font-size: inherit; color: var(--muted); }
.partisan-metric .party-counts { display: grid; grid-template-columns: 1fr; }
.composition-method { margin: 1.2rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); }
.composition-method summary { font-weight: 700; cursor: pointer; }
.composition-method p { max-width: 90ch; }
.party-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.8rem; color: var(--muted); }
.party-legend > span { display: flex; align-items: center; gap: 0.35rem; }
.officials-comparison { table-layout: fixed; min-width: 900px; }
.officials-comparison th:first-child { width: 21%; }
.officials-comparison th:nth-child(2) { width: 35%; }
.officials-comparison small { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 500; text-transform: none; margin-top: 0.25rem; }
.officials-comparison tbody tr:hover { background: #f3f6fa; }
.executive-offices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-bottom: 0.8rem; }
.office-affiliation { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.72rem; color: var(--muted); }
.party-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 27px; border-radius: 4px; font-weight: 800; font-size: 0.78rem; }
.composition-empty { margin: 0; color: var(--muted); font-size: 0.85rem; }
.office-level { margin: 0; font-size: 0.78rem; font-weight: 700; color: var(--green); }
.glossary-list dd p { margin-top: 0.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 1023px) { .partisan-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .partisan-overview { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .hero h1 { font-size: 2.3rem; } .glossary-list, .question-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .officials-comparison { min-width: 0; }
  .officials-comparison tbody th { width: auto; }
  .officials-comparison tbody td { display: block; }
  .officials-comparison tbody td::before { display: block; margin-bottom: 0.6rem; font-size: 0.8rem; }
}

.officials-comparison small.jurisdiction-type { display: inline; }

/* Prominent proportional charts for the national overview. */
.overview-chart { margin-top: 1rem; }
.party-donut { position: relative; width: min(180px, 100%); aspect-ratio: 1; margin: 0 auto 1.1rem; }
.party-donut svg { display: block; width: 100%; max-width: 180px; height: auto; aspect-ratio: 1; }
.donut-total { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-total strong { font-size: 2.35rem; line-height: 1.1; letter-spacing: -0.06rem; font-variant-numeric: tabular-nums; }
.donut-total span { margin-top: 0.25rem; font-size: 0.8rem; color: var(--muted); }
.overview-legend { list-style: none; padding: 0; margin: 0; }
.overview-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 0.55rem; padding: 0.45rem 0; border-top: 1px solid #edf0f5; font-size: 0.85rem; }
.overview-party-label { min-width: 0; }
.overview-party-value { text-align: right; font-size: 0.78rem; color: var(--muted); }
.overview-party-value b { color: var(--ink); }
.overview-legend b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.overview-legend .party-dot { width: 12px; height: 12px; border-radius: 3px; }
.party-percentage { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (min-width: 561px) and (max-width: 1100px), (max-width: 380px) {
  .overview-legend li { grid-template-columns: 12px minmax(0, 1fr); row-gap: 0; }
  .overview-party-value { grid-column: 2; text-align: left; }
}

/* State pages: a single composition row and branch-grouped official tables. */
.state-composition { min-width: 700px; }
.state-composition th:first-child { width: 44%; }
.state-composition th:nth-child(2), .state-composition th:nth-child(3) { width: 28%; }
.state-composition td { padding: 1.15rem; }
.official-branch { margin-top: 1.75rem; }
.branch-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.branch-heading h3 { margin: 0; color: #123b74; font-size: 1.25rem; }
.branch-heading > span { color: var(--muted); font-size: 0.85rem; }
.current-officials-table { min-width: 600px; }
.current-officials-table th:first-child { width: 40%; }
.current-officials-table th:nth-child(2) { width: 38%; }
.official-party { display: inline-flex; align-items: baseline; gap: 0.45rem; }
.listing-source { display: block; font-weight: 400; font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }
.branch-glossary { margin-top: 2rem; }
.branch-glossary > h3 { color: #123b74; font-size: 1.25rem; }
.office-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.office-guide h4 { margin: 0 0 1rem; font-size: 1.2rem; color: #123b74; }
.office-guide dl { margin: 0; }
.office-guide dt { font-size: 0.82rem; font-weight: 800; color: var(--green); margin-top: 1rem; }
.office-guide dd { margin: 0.35rem 0 0; color: #37445a; }
.office-guide .source-link { font-size: 0.8rem; }
.qualification-status { display: block; margin-top: 0.5rem; color: var(--muted); font-size: 0.85rem; }
#current-officials, #source-comparisons { scroll-margin-top: 7rem; }
@media (max-width: 560px) {
  .state-composition, .current-officials-table { min-width: 0; }
  .current-officials-table th:first-child { width: auto; }
  .current-officials-table td { overflow-wrap: anywhere; }
  .office-guide-grid { grid-template-columns: 1fr; }
}

.profile-image-card { padding: 1rem; width: 100%; max-width: 380px; justify-self: end; }
.profile-portrait { display: block; width: 100%; height: 320px; object-fit: contain; border-radius: 4px; background: var(--panel); }
@media (max-width: 760px) {
  .profile-image-card { justify-self: start; }
  .profile-portrait { height: 280px; }
}

.ad-slot { margin: 2rem 0; padding: 1rem 0; min-width: 0; border-top: 1px solid #d8e1ed; border-bottom: 1px solid #d8e1ed; }
.ad-slot[hidden] { display: none; }
.ad-label { margin: 0 0 .75rem; text-align: center; font-size: .75rem; color: #596579; }
.ad-slot .adsbygoogle { min-height: 250px; }
.ad-slot .adsbygoogle[data-ad-status="unfilled"] { display: none !important; min-height: 0; }
