:root {
  --ink: #111827;
  --ink-soft: #263447;
  --muted: #5a6472;
  --paper: #f4f6f8;
  --surface: #ffffff;
  --surface-quiet: #f8fafc;
  --line: #d4d9e1;
  --line-strong: #aab3c0;
  --navy: #10233f;
  --navy-2: #1d3557;
  --blue: #2f6f9f;
  --blue-soft: #dce9f4;
  --red: #b23a48;
  --red-soft: #f5dfe2;
  --gold: #bf8f2f;
  --gold-soft: #f6ead1;
  --green: #356859;
  --green-soft: #dce9e4;
  --focus: #0b4ea2;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.08);
  --shadow-md: 0 16px 38px rgba(16, 35, 63, 0.12);
  --shadow-lg: 0 26px 70px rgba(16, 35, 63, 0.18);
  --radius: 8px;
  --radius-sm: 6px;
  --max-page: 1500px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  background:
    linear-gradient(180deg, rgba(16, 35, 63, 0.08) 0, transparent 360px),
    repeating-linear-gradient(90deg, rgba(178, 58, 72, 0.06) 0 1px, transparent 1px 64px),
    var(--paper);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 14px 14px, rgba(255, 255, 255, 0.42) 0 1px, transparent 1px),
    linear-gradient(135deg, rgba(16, 35, 63, 0.05), transparent 34%);
  background-size: 28px 28px, auto;
  mask-image: linear-gradient(180deg, #000 0, transparent 380px);
}

a {
  color: #0b5f9f;
  font-weight: 760;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
}

a:hover {
  color: #083f73;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input,
a {
  outline-offset: 3px;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 12px max(24px, calc((100vw - var(--max-page)) / 2 + 24px));
  color: #fff;
  background:
    linear-gradient(90deg, var(--navy) 0 30%, #f8fafc 30% 31.5%, var(--red) 31.5% 33%, var(--navy-2) 33% 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 32px rgba(16, 35, 63, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  background: #fff;
  color: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  box-shadow: inset 0 -8px 0 rgba(178, 58, 72, 0.16);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: auto 7px 7px;
  height: 4px;
  background: var(--red);
  border-radius: 99px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.1rem;
  letter-spacing: 0;
}

.brand small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.8rem;
  font-weight: 650;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-nav a {
  min-height: 44px;
  padding: 11px 14px;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.top-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

main {
  width: min(var(--max-page), calc(100% - 32px));
  margin: 0 auto;
}

section[id] {
  scroll-margin-top: 96px;
}

.notice-bar {
  position: relative;
  margin: 22px 0 0;
  padding: 13px 16px 13px 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: #493918;
  font-size: 0.95rem;
}

.notice-bar strong {
  color: var(--navy);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  min-height: calc(100dvh - 126px);
  padding: 18px 0;
}

.map-pane,
.questionnaire,
.brief-layout,
.comparison,
.signals,
.impact,
.sources {
  position: relative;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.map-pane::before,
.brief-layout::before,
.sources::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--navy) 0 36%, #fff 36% 40%, var(--red) 40% 54%, var(--gold) 54% 58%, var(--blue) 58% 100%);
}

.map-pane {
  min-height: calc(100dvh - 164px);
  padding: 26px;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 22px;
}

.section-heading.compact {
  margin-bottom: 16px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 9px;
  color: var(--red);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  background: var(--navy);
  border-radius: 99px;
}

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

h1,
h2 {
  margin-bottom: 10px;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.4rem, 6vw, 5.7rem);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.85rem);
}

h3 {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 1.1rem;
}

h4 {
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading p:not(.eyebrow),
.bio,
.helper {
  color: var(--muted);
}

.location-form {
  max-width: 700px;
  margin-bottom: 18px;
}

.location-form label,
.brief-toolbar label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 850;
}

.location-fields {
  display: grid;
  grid-template-columns: minmax(190px, 0.55fr) minmax(280px, 1fr);
  gap: 10px;
  align-items: end;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

input,
select {
  min-height: 48px;
  width: 100%;
  padding: 0 13px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(17, 24, 39, 0.03);
}

input:hover,
select:hover {
  border-color: var(--navy-2);
}

button {
  min-height: 44px;
  border: 1px solid var(--navy);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

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

.input-row button,
.brief-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-sm);
  font-weight: 850;
}

.input-row button:hover,
.brief-toolbar button:hover {
  background: #0b1a30;
  box-shadow: 0 10px 22px rgba(16, 35, 63, 0.2);
}

.helper {
  margin: 9px 0 0;
  font-size: 0.86rem;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
  font-size: 0.84rem;
  font-weight: 760;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  gap: 7px;
  padding: 5px 9px;
  background: var(--surface-quiet);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lean {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(17, 24, 39, 0.22);
  border-radius: 4px;
}

.lean-blue {
  background: var(--blue);
}

.lean-red {
  background: var(--red);
}

.lean-open {
  background: var(--gold);
}

.lean-split {
  background: linear-gradient(135deg, var(--blue) 0 50%, var(--red) 50% 100%);
}

.state-map {
  position: relative;
  width: 100%;
  max-width: none;
  aspect-ratio: 959 / 593;
  margin-top: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.82)),
    url("assets/us-map.svg") center / contain no-repeat,
    #eef3f8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.64);
}

.state-map::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(16, 35, 63, 0.05) 0 1px, transparent 1px),
    linear-gradient(180deg, rgba(16, 35, 63, 0.05) 0 1px, transparent 1px);
  background-size: 54px 54px;
}

.map-label {
  position: absolute;
  z-index: 0;
  color: rgba(16, 35, 63, 0.4);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

.map-label.continental {
  left: 48%;
  top: 7%;
}

.map-label.alaska {
  left: 7%;
  top: 69%;
}

.map-label.hawaii {
  left: 22%;
  top: 79%;
}

.state-tile {
  position: absolute;
  z-index: 1;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  display: flex;
  width: clamp(27px, 3.2vw, 43px);
  height: clamp(25px, 2.8vw, 36px);
  min-height: 25px;
  align-items: center;
  justify-content: center;
  padding: 3px;
  color: var(--ink);
  background: #fff;
  border-color: rgba(16, 35, 63, 0.26);
  box-shadow: 0 3px 8px rgba(16, 35, 63, 0.08);
  text-align: center;
  transform: translate(-50%, -50%);
}

.state-tile::before {
  content: "";
  position: absolute;
  inset: -5px;
}

.state-tile:hover {
  border-color: var(--navy);
  box-shadow: 0 9px 18px rgba(16, 35, 63, 0.18);
  transform: translate(-50%, -50%) translateY(-2px);
}

.state-tile.active {
  border: 3px solid var(--navy);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.95), 0 12px 26px rgba(16, 35, 63, 0.24);
}

.state-tile span {
  font-size: clamp(0.64rem, 1vw, 0.94rem);
  font-weight: 950;
}

.state-tile small {
  display: none;
}

.state-tile.compact-state {
  width: clamp(21px, 2.2vw, 30px);
  height: clamp(20px, 2vw, 28px);
  min-height: 20px;
  padding: 2px;
  border-radius: 6px;
}

.state-tile.compact-state span {
  font-size: clamp(0.5rem, 0.74vw, 0.72rem);
}

.state-tile.micro-state {
  width: clamp(12px, 1.15vw, 16px);
  height: clamp(12px, 1.05vw, 15px);
  min-height: 12px;
  padding: 1px;
  border-radius: 4px;
}

.state-tile.micro-state span {
  font-size: clamp(0.35rem, 0.48vw, 0.46rem);
}

.state-tile.micro-state.active {
  border-width: 1px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95), 0 9px 18px rgba(16, 35, 63, 0.2);
}

.state-tile.blue {
  background: var(--blue-soft);
}

.state-tile.red {
  background: var(--red-soft);
}

.state-tile.split {
  background:
    linear-gradient(135deg, rgba(47, 111, 159, 0.24) 0 50%, rgba(178, 58, 72, 0.24) 50% 100%),
    #fff;
}

.state-tile.open {
  background: var(--gold-soft);
}

.map-source {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.empty-state {
  padding: 15px;
  background: var(--surface-quiet);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}

.empty-state.wide {
  grid-column: 1 / -1;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
}

.empty-state p {
  margin-bottom: 0;
}

.questionnaire,
.brief-layout,
.comparison,
.signals,
.impact,
.sources {
  margin: 18px 0;
  padding: 24px;
}

.signals::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--blue) 0 48%, #fff 48% 52%, var(--red) 52% 100%);
}

.signal-disclosure {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  padding: 12px 14px;
  color: #fff;
  background: var(--navy);
  border-left: 5px solid var(--gold);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.signal-disclosure span {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.signals-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.poll-panel,
.ratings-panel {
  min-width: 0;
  padding: 20px;
  background: #fff;
}

.ratings-panel {
  background: var(--surface-quiet);
  border-left: 1px solid var(--line);
}

.signal-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.signal-panel-heading h3 {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
}

.signal-panel-heading > p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.signal-kicker {
  margin: 0 0 4px;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sponsor-badge {
  max-width: 270px;
  padding: 7px 9px;
  color: #563700;
  background: var(--gold-soft);
  border: 1px solid rgba(191, 143, 47, 0.45);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 850;
}

.poll-rows {
  display: grid;
  gap: 15px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.poll-row {
  display: grid;
  gap: 7px;
}

.poll-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  font-weight: 850;
}

.poll-label strong {
  color: var(--navy);
  font-size: 1.15rem;
}

.poll-track {
  height: 18px;
  overflow: hidden;
  background: #e7ebf0;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.poll-fill {
  display: block;
  width: var(--poll-value);
  height: 100%;
  background: var(--green);
}

.poll-fill.democratic {
  background: var(--blue);
}

.poll-fill.republican {
  background: var(--red);
}

.poll-method {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.poll-method div {
  min-width: 0;
  padding: 10px;
  background: #fff;
}

.poll-method dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.poll-method dd {
  margin: 3px 0 0;
  font-size: 0.88rem;
  font-weight: 800;
}

.method-note {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.signal-links {
  color: var(--muted);
  font-size: 0.8rem;
}

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

.rating-row {
  display: grid;
  grid-template-columns: minmax(125px, 0.9fr) auto;
  gap: 6px 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.rating-row > div span,
.rating-row > div small {
  display: block;
}

.rating-row > div span {
  color: var(--navy);
  font-weight: 900;
}

.rating-row > div small {
  margin-top: 2px;
  color: var(--muted);
}

.rating-row > strong {
  align-self: start;
  padding: 5px 8px;
  color: #fff;
  background: var(--navy);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.rating-row p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.rating-row > a {
  grid-column: 1 / -1;
  width: max-content;
  font-size: 0.8rem;
}

.endorsement-section {
  margin-top: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.endorsement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.endorsement-column {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.endorsement-column::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--green);
}

.endorsement-column.democratic::before {
  background: var(--blue);
}

.endorsement-column.republican::before {
  background: var(--red);
}

.endorsement-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 5px;
}

.endorsement-heading span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.endorsement-heading h3 {
  margin-top: 2px;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.endorsement-heading b {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
}

.endorsement-column > p {
  color: var(--muted);
  font-size: 0.84rem;
}

.endorsement-column ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.endorsement-column li {
  min-width: 0;
  padding: 9px;
  background: var(--surface-quiet);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.endorsement-column li span,
.endorsement-column li small {
  display: block;
}

.endorsement-column li span {
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 850;
}

.endorsement-column li small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.priority-grid {
  display: grid;
  grid-template-columns: 1.25fr 1.25fr 0.8fr;
  gap: 16px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 10px;
  color: var(--navy);
  font-weight: 900;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.segmented label {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-weight: 760;
}

.chip:has(input:checked),
.segmented label:has(input:checked) {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}

.chip input,
.segmented input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--red);
}

.segmented {
  display: grid;
  gap: 8px;
}

.brief-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 420px) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}

.candidate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.candidate-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.candidate-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--green);
}

.candidate-card.party-democratic::before {
  background: var(--blue);
}

.candidate-card.party-republican::before {
  background: var(--red);
}

.candidate-head {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 16px;
  padding: 8px 0 14px;
  border-bottom: 1px solid var(--line);
}

.candidate-photo {
  width: 118px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef2f6;
  box-shadow: 0 10px 22px rgba(16, 35, 63, 0.14);
}

.image-credit {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.candidate-intro {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.candidate-head h3 {
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 2.6vw, 2.45rem);
  line-height: 1.04;
}

.party {
  margin-bottom: 6px;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.party-democratic .party {
  color: var(--blue);
}

.party-republican .party {
  color: var(--red);
}

.source-count {
  flex: 0 0 auto;
  padding: 7px 9px;
  color: #563700;
  background: var(--gold-soft);
  border: 1px solid rgba(191, 143, 47, 0.45);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-size: 0.8rem;
  font-weight: 900;
}

.bio {
  margin: 15px 0;
}

.brief-block {
  margin-top: 14px;
}

.political-core {
  padding: 13px;
  background: linear-gradient(180deg, var(--surface-quiet), #fff);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
}

.political-core p {
  margin-bottom: 0;
}

.personal-snapshot {
  display: grid;
  grid-template-columns: 0.55fr 1.35fr 1fr;
  gap: 8px;
  margin: 13px 0 0;
  padding: 11px;
  background: #fbfcfd;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.personal-snapshot div {
  min-width: 0;
}

.personal-snapshot dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.personal-snapshot dd {
  margin: 2px 0 0;
  font-size: 0.9rem;
  font-weight: 760;
}

.brief-block ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
}

.brief-block li::marker {
  color: var(--red);
}

.folded-record {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
}

.folded-record > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.folded-record div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.folded-record div span {
  padding: 5px 9px;
  color: var(--ink-soft);
  background: #eef2f6;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 760;
}

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

table {
  width: 100%;
  min-width: 780px;
  background: #fff;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th {
  color: #fff;
  background: var(--navy);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

tbody tr:nth-child(even) {
  background: #f9fbfd;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.impact-item {
  padding: 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.impact-item:nth-child(2) {
  border-top-color: var(--red);
}

.impact-item:nth-child(3) {
  border-top-color: var(--gold);
}

.impact-item span,
.timeline-item span {
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.timeline-item time {
  color: var(--muted);
  font-weight: 850;
}

.timeline-item h3 {
  margin: 4px 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px max(24px, calc((100vw - var(--max-page)) / 2 + 24px));
  color: rgba(255, 255, 255, 0.78);
  background: var(--navy);
  border-top: 5px solid var(--red);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1080px) {
  .workspace,
  .priority-grid,
  .candidate-grid,
  .signals-grid,
  .endorsement-grid,
  .impact-grid {
    grid-template-columns: 1fr;
  }

  .ratings-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .state-map {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .app-header,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .app-header {
    padding: 12px 16px;
    background: var(--navy);
    border-bottom: 5px solid var(--red);
  }

  .top-nav {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .top-nav a {
    padding-inline: 8px;
    text-align: center;
    font-size: 0.86rem;
  }

  .brand small {
    white-space: normal;
    line-height: 1.25;
  }

  main {
    width: min(100% - 20px, var(--max-page));
  }

  section[id] {
    scroll-margin-top: 204px;
  }

  .map-pane,
  .questionnaire,
  .brief-layout,
  .comparison,
  .signals,
  .impact,
  .sources {
    padding: 16px;
  }

  h1 {
    font-size: clamp(2.15rem, 13vw, 3.5rem);
  }

  .location-fields,
  .input-row,
  .brief-toolbar,
  .poll-method,
  .timeline-item {
    grid-template-columns: 1fr;
  }

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

  .signal-disclosure span {
    margin-left: 0;
    white-space: normal;
  }

  .endorsement-column ul {
    grid-template-columns: 1fr;
  }

  .state-map {
    aspect-ratio: 1 / 0.76;
  }

  .map-label {
    font-size: 0.58rem;
  }

  .state-tile {
    width: clamp(18px, 5.4vw, 30px);
    height: clamp(17px, 4.8vw, 26px);
  }

  .state-tile span {
    font-size: clamp(0.44rem, 2.2vw, 0.68rem);
  }

  .state-tile.compact-state {
    width: clamp(15px, 4.2vw, 22px);
    height: clamp(14px, 3.8vw, 20px);
  }

  .state-tile.micro-state {
    width: clamp(12px, 3.4vw, 17px);
    height: clamp(11px, 3vw, 15px);
  }

  .candidate-head,
  .personal-snapshot {
    grid-template-columns: 1fr;
  }

  .candidate-intro {
    flex-direction: column;
  }

  .candidate-photo {
    width: min(100%, 190px);
  }
}

@media (max-width: 430px) {
  .top-nav a {
    font-size: 0.82rem;
  }

  .map-legend span {
    width: 100%;
  }

  .candidate-card {
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
