@import url("https://fonts.googleapis.com/css2?family=Anton&family=Archivo+Black&family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap");

:root {
  color-scheme: light;
  --bg: #ececec;
  --surface: #f4f4f4;
  --surface-soft: #e3e3e3;
  --ink: #0a0a0a;
  --muted: #5b5b5b;
  --line: #0a0a0a;
  --green: #0a0a0a;
  --green-soft: #e3e3e3;
  --blue: #1e6f9a;
  --amber: #0a0a0a;
  --red: #d92020;
  --chart-red: #ef4444;
  --chart-blue: #0ea5e9;
  --chart-green: #10b981;
  --shadow: 0 1px 0 0 rgba(0,0,0,0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
  background-image:
    radial-gradient(rgba(0,0,0,0.05) 1px, transparent 1px),
    linear-gradient(180deg, #f2f2f2 0%, #e6e6e6 100%);
  background-size: 3px 3px, 100% 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 4vw, 48px) 32px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: transparent;
  position: relative;
}

.ticker-strip {
  display: none;
}

.topbar-inner {
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.topbar-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  padding-top: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  background: var(--ink);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  line-height: 1;
}
.brand-mark::before {
  content: "";
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(217,32,32,0.2);
}

.mono {
  font-family: "IBM Plex Mono", monospace;
}

.tiny {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar-copy {
  max-width: 620px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 1rem;
}

.headline-ticker {
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 2px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.ticker-track {
  display: flex;
  gap: 22px;
  width: max-content;
  padding: 8px 0;
  animation: scroll-x 44s linear infinite;
  white-space: nowrap;
}

.ticker-track a,
.ticker-track span,
.ticker-track b {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ticker-track a {
  color: #fff !important;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.ticker-track a:visited {
  color: #fff !important;
}

.ticker-track a strong {
  color: var(--yellow);
  margin-right: 8px;
}

.ticker-track a:hover,
.ticker-track a:focus-visible {
  color: #fff;
  background: rgba(255,255,255,0.1);
  outline: 0;
}

.headline-ticker:hover .ticker-track,
.headline-ticker:focus-within .ticker-track {
  animation-play-state: paused;
}

.ticker-track b {
  color: var(--red);
  font-size: 1rem;
  line-height: 1;
}

@keyframes scroll-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-family: "Anton", "Archivo Black", sans-serif;
  font-size: clamp(2.4rem, 6.5vw, 6rem);
  line-height: 0.88;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: none;
}

h2 {
  font-family: "Inter", sans-serif;
  font-size: 1.24rem;
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: 0;
}

h3 {
  font-size: 1rem;
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 20px auto 56px;
}

.eyebrow {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.status-pill {
  min-width: 132px;
  border: 2px solid var(--line);
  border-radius: 0;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 3px 3px 0 0 var(--ink);
}

.stamp {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 2px solid currentColor;
  background: var(--surface);
  color: var(--red);
  padding: 4px 9px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-3deg);
}

.stamp-tilt {
  justify-self: start;
  margin-bottom: 18px;
  transform: rotate(-7deg);
}

.toolbar,
.filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
}

.toolbar {
  position: relative;
  margin-bottom: 22px;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  overflow-x: auto;
  box-shadow: 4px 4px 0 0 var(--ink);
}

.community-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 16px 0;
  padding: 18px 20px;
  border: 2px solid var(--ink);
  background: #202522;
  color: var(--surface);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.community-banner::after {
  content: "";
  position: absolute;
  inset: auto -20px -46px auto;
  width: 220px;
  height: 120px;
  border: 2px solid rgba(251, 247, 236, 0.3);
  transform: rotate(-10deg);
}

.community-banner .eyebrow {
  color: var(--amber);
}

.community-banner h2 {
  font-size: clamp(1.35rem, 3vw, 2.35rem);
  text-shadow: 3px 3px 0 #000;
  max-width: 760px;
}

.community-banner span {
  display: block;
  max-width: 760px;
  margin-top: 8px;
  color: #dfe7e1;
  font-size: 0.98rem;
  line-height: 1.4;
}

.community-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 2px solid var(--ink);
  background: var(--amber);
  color: var(--ink);
  padding: 10px 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 3px 3px 0 0 #000;
}

.tab {
  border: 0;
  border-radius: 0;
  padding: 9px 14px;
  background: transparent;
  color: var(--muted);
  min-height: 38px;
  white-space: nowrap;
}

.tab.active {
  background: var(--ink);
  color: var(--surface);
}

.icon-button,
.secondary-button,
.primary-button {
  min-height: 40px;
  border-radius: 0;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 9px 13px;
  font-weight: 750;
  box-shadow: 3px 3px 0 0 var(--ink);
}

.icon-button {
  width: 42px;
  padding: 0;
}

#refreshButton {
  position: absolute;
  right: 0;
}

.secondary-button:hover,
.icon-button:hover {
  border-color: #a7b6ad;
}

.primary-button {
  border-color: var(--green);
  background: var(--green);
  color: var(--surface);
}

.filters {
  justify-content: flex-start;
  align-items: end;
  flex-wrap: wrap;
  width: 100%;
  min-height: 0;
  margin: 0 0 16px;
  padding: 0;
  background: transparent;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 10px;
}

textarea {
  resize: vertical;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

main > .view {
  min-width: 0;
}

.source-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  background: var(--surface);
  box-shadow: 4px 4px 0 0 var(--ink);
}

.source-note strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1rem;
}

.source-note span {
  color: var(--muted);
  line-height: 1.35;
}

.source-note a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 2px solid var(--green);
  background: var(--green-soft);
  color: var(--green);
  padding: 8px 11px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

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

.dashboard-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, 0.96fr);
  gap: 18px;
  align-items: stretch;
  margin: 16px 0 18px;
}

.trend-card {
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand-block {
  display: grid;
  align-content: center;
  min-height: 250px;
  padding: 30px 34px;
  overflow: hidden;
}

.brand-block h2 {
  font-family: "Archivo Black", sans-serif;
  max-width: 100%;
  font-size: clamp(2.25rem, 4.2vw, 4.2rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 4px 4px 0 var(--amber);
  overflow-wrap: anywhere;
}

.brand-block p:not(.eyebrow) {
  max-width: 440px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.35;
}

.method-seal {
  justify-self: start;
  margin-top: 18px;
  border: 2px solid var(--ink);
  background: var(--amber);
  color: var(--ink);
  padding: 8px 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 0 var(--ink);
}

.trend-card {
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr);
  gap: 16px;
  min-height: 320px;
  padding: 18px;
  background: var(--surface-soft);
  overflow: hidden;
}

.trend-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(16, 32, 24, 0.16);
}

.trend-head h2 {
  font-size: 1.45rem;
}

.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  color: var(--ink);
  font-weight: 750;
}

.trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 8px;
  border: 2px solid var(--line);
  background: var(--surface);
  font-size: 0.84rem;
  white-space: nowrap;
}

.trend-legend i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.trend-chart {
  min-height: 320px;
  height: 100%;
  align-self: stretch;
  border: 2px solid var(--line);
  background: #e9ecec;
}

.trend-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}

.trend-chart text {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.trend-chart .x-label {
  font-size: 12px;
}

.trend-chart .point-label {
  font-size: 12px;
  paint-order: stroke;
  stroke: #e9ecec;
  stroke-linejoin: round;
  stroke-width: 5px;
}

.trend-chart .watermark {
  fill: rgba(23, 32, 27, 0.06);
  font-size: 58px;
  font-weight: 900;
  font-family: "Archivo Black", sans-serif;
}

.trend-chart .threshold-label {
  font-size: 12px;
  paint-order: stroke;
  stroke: #e9ecec;
  stroke-linejoin: round;
  stroke-width: 5px;
}

.round-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  margin: 0 0 16px;
}

.round-card {
  display: grid;
  gap: 7px;
  min-height: 104px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  padding: 16px 18px;
  text-align: left;
  box-shadow: var(--shadow);
}

.round-card span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.round-card strong {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.05;
}

.round-card small {
  color: var(--muted);
  font-size: 0.9rem;
}

.round-card.active {
  border-color: var(--ink);
  background: #202522;
  color: var(--surface);
}

.round-card.active span,
.round-card.active small {
  color: #dfe7e1;
}

.round-connector {
  height: 4px;
  border-radius: 0;
  background: linear-gradient(90deg, var(--chart-red), var(--chart-blue));
  position: relative;
}

.round-connector::before,
.round-connector::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 4px solid var(--ink);
  transform: translateY(-50%);
}

.round-connector::before {
  left: -4px;
}

.round-connector::after {
  right: -4px;
}

.victory-panel {
  margin: 0;
  overflow: hidden;
}

.victory-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 100%;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  padding: 18px;
  text-align: left;
  box-shadow: var(--shadow);
}

.victory-trigger small {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.victory-trigger strong {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.02;
  font-weight: 950;
  text-shadow: none;
}

.victory-trigger b {
  border: 2px solid #9a7000;
  background: #fff3bd;
  color: #7a5300;
  padding: 8px 10px;
  font-size: 0.95rem;
  white-space: nowrap;
}

.victory-trigger:hover {
  transform: translate(-1px, -1px);
  box-shadow: 7px 7px 0 0 var(--ink);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 32, 24, 0.62);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(900px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 3px 3px 0 0 var(--ink);
}

body.modal-open {
  overflow: hidden;
}

.victory-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}

.victory-main {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 14px;
  border: 2px solid var(--line);
  background: #fffaf0;
}

.victory-matchup {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-weight: 850;
}

.victory-matchup span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.victory-matchup b {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
}

.victory-main strong {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1.02;
  font-weight: 950;
  text-shadow: none;
}

.victory-chart-wrap {
  display: grid;
  gap: 8px;
  align-content: center;
}

.victory-chart {
  min-height: 150px;
  border: 2px solid var(--line);
  background: #fffaf0;
  overflow: hidden;
}

.victory-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.victory-chart text {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.metric,
.panel {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow);
}

.metric {
  padding: 14px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 750;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 1.55rem;
  line-height: 1;
}

.dashboard-lower,
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.dashboard-side {
  display: grid;
  gap: 14px;
}

.ai-summary-panel {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(217, 32, 32, 0.08), transparent 46%),
    #fffaf0;
}

.ai-summary {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 2px solid var(--line);
  border-top: 8px solid #d92020;
  background:
    linear-gradient(180deg, #fff3bd 0, #fff3bd 72px, var(--surface) 72px),
    var(--surface);
  box-shadow: inset 0 0 0 1px rgba(217, 32, 32, 0.1);
}

.ai-summary h3 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.08;
  font-weight: 950;
  text-shadow: none;
  color: #b91c1c;
}

.ai-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.ai-summary .ai-deck {
  width: min(100%, 780px);
  border: 2px solid var(--line);
  background: #fffdf5;
  color: #334155;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.55;
  padding: 12px 14px;
  box-shadow: 4px 4px 0 0 rgba(16, 32, 24, 0.16);
}

.ai-copy-list {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.ai-copy-list p {
  border: 2px solid rgba(16, 32, 24, 0.85);
  border-left: 8px solid var(--amber);
  background: #fffdf5;
  color: #4b5563;
  padding: 10px 12px 10px 14px;
}

.ai-copy-list strong {
  color: var(--ink);
}

.ai-copy-list p:nth-child(2) {
  border-left-color: var(--chart-blue);
}

.ai-copy-list p:nth-child(3) {
  border-left-color: var(--chart-green);
}

.ai-copy-list p:nth-child(4) {
  border-left-color: var(--red);
}

.ai-summary small {
  justify-self: start;
  border: 2px solid rgba(16, 32, 24, 0.8);
  background: #eef6ea;
  color: #174c32;
  padding: 5px 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 800;
}

.latest-panel .panel-heading {
  margin-bottom: 10px;
}

.home-rules {
  width: min(520px, 100%);
  margin: 44px auto 0;
}

.criteria-layout {
  margin-top: 16px;
}

.map-panel {
  margin: 16px 0 14px;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(280px, 1.05fr);
  gap: 18px;
  align-items: center;
}

.region-map {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfcfa, #eef4ef);
  overflow: hidden;
}

.region-map svg {
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: block;
}

.region-shape {
  stroke: #fbfcfa;
  stroke-width: 4;
  cursor: pointer;
  outline: none;
  transition: opacity 160ms ease, transform 160ms ease, filter 160ms ease;
  transform-origin: center;
}

.region-shape:hover,
.region-shape:focus,
.region-shape.active {
  opacity: 1;
  filter: drop-shadow(0 10px 12px rgba(23, 32, 27, 0.18));
  transform: translateY(-2px);
}

.region-label {
  pointer-events: none;
  fill: #17201b;
  font-size: 15px;
  font-weight: 850;
}

.region-value {
  pointer-events: none;
  fill: #44514a;
  font-size: 12px;
  font-weight: 750;
}

.region-details {
  display: grid;
  gap: 10px;
}

.region-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.region-card.active {
  border-color: var(--green);
  box-shadow: inset 4px 0 0 var(--green);
}

.region-card strong {
  font-size: 1rem;
}

.region-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.panel {
  padding: 18px;
}

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

.panel-heading.compact {
  margin: 0 0 10px;
}

.notice {
  display: none;
}

.notice.active {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 11px 12px;
  border: 2px solid var(--ink);
  background: #fff4c7;
  box-shadow: 3px 3px 0 0 var(--ink);
}

.notice strong,
.notice span {
  display: block;
}

.notice strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.notice span {
  color: var(--muted);
  font-size: 0.9rem;
}

.trust-panel,
.governors-panel,
.senate-panel {
  min-height: 100%;
}

.governor-content,
.senate-content {
  display: grid;
  gap: 14px;
}

.governor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.governor-hero,
.governor-results,
.governor-latest {
  padding: 16px;
  border: 2px solid var(--line);
  background: var(--surface);
}

.governor-hero {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
  min-height: 260px;
  box-shadow: var(--shadow);
}

.governor-hero h3 {
  max-width: 100%;
  font-family: "Inter", sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 950;
  line-height: 1;
  text-shadow: none;
  overflow-wrap: anywhere;
}

.governor-round {
  display: inline-flex;
  width: fit-content;
  border: 2px solid var(--line);
  padding: 6px 10px;
  background: #fff6c7;
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 0 var(--ink);
}

.governor-hero p {
  max-width: 100%;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.governor-results,
.governor-latest {
  background: #fffaf0;
}

.senate-note {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 2px solid var(--line);
  background: #fff6c7;
  box-shadow: 4px 4px 0 0 var(--ink);
}

.senate-note strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.senate-note span {
  color: var(--muted);
  line-height: 1.4;
}

.senate-scenario-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.senate-scenario-button {
  appearance: none;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  background: #fffaf0;
  color: var(--ink);
  box-shadow: 4px 4px 0 0 var(--ink);
  text-align: left;
  cursor: pointer;
}

.senate-scenario-button span {
  color: #b91c1c;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.senate-scenario-button strong {
  font-size: 0.95rem;
  line-height: 1.25;
}

.senate-scenario-button.active,
.senate-scenario-button:hover,
.senate-scenario-button:focus-visible {
  background: var(--ink);
  color: #fff;
  outline: 0;
}

.senate-scenario-button.active {
  box-shadow: 2px 2px 0 0 var(--yellow);
  transform: translate(2px, 2px);
}

.senate-scenario-button.active span,
.senate-scenario-button:hover span,
.senate-scenario-button:focus-visible span {
  color: var(--yellow);
}

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

.senate-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 2px solid var(--line);
  background: #fffaf0;
  box-shadow: var(--shadow);
}

.senate-card .panel-heading h2 {
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.senate-bars {
  gap: 12px;
}

.senate-zone {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 2px solid var(--line);
  background: var(--ink);
  color: #fff;
}

.senate-zone small {
  color: var(--yellow);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.senate-zone p {
  color: rgba(255,255,255,0.78);
  line-height: 1.35;
  margin: 0;
}

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

.senate-ticket-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 2px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
}

.senate-ticket-item span {
  color: var(--yellow);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.senate-ticket-item strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.senate-ticket-item b {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 0.9;
}

.senate-reserve {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 2px solid #c9c0ae;
  background: #efe8da;
}

.senate-reserve > strong {
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.senate-reserve span {
  padding: 6px 8px;
  border: 1px solid #b8ae9c;
  background: #fffaf0;
  color: var(--muted);
  font-size: 0.82rem;
}

.senate-source {
  display: block;
  padding: 10px 12px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: #fff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none !important;
}

.senate-source:visited {
  color: var(--ink);
}

.senate-source:hover,
.senate-source:focus-visible {
  background: var(--yellow);
  color: var(--ink);
  outline: 0;
}

.rule-list,
.criteria-list,
.latest-list {
  display: grid;
  gap: 10px;
}

.rule-list article,
.criteria-list article,
.latest-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 2px solid var(--line);
  background: #fffaf0;
}

.rule-list strong,
.criteria-list strong,
.latest-item strong {
  font-size: 0.96rem;
}

.rule-list span,
.criteria-list span,
.latest-item span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.latest-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px dashed var(--line);
}

.latest-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.latest-link {
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.latest-link:hover {
  background: #fffaf0;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--ink);
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 14px;
  min-height: 300px;
  align-content: center;
  padding: clamp(22px, 4vw, 44px);
  border: 2px dashed var(--line);
  background: #fffaf0;
}

.empty-state.compact {
  min-height: 240px;
}

.empty-state h3 {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 0.9;
  text-shadow: 4px 4px 0 var(--amber);
}

.empty-state p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.state-picker {
  min-width: 120px;
}

.betting-panel {
  margin-top: 16px;
}

.betting-disclaimer {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 12px;
  border: 2px solid var(--line);
  background: #fff4c7;
}

.betting-disclaimer span {
  color: var(--muted);
  line-height: 1.4;
}

.polymarket-snapshot {
  display: grid;
  gap: 12px;
  margin: 16px 0 14px;
}

.snapshot-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.snapshot-top h3 {
  font-size: clamp(1.45rem, 2.4vw, 2.25rem);
}

.snapshot-frame {
  position: relative;
  aspect-ratio: 1273 / 703;
  min-height: 0;
  margin: 0;
  border: 2px solid var(--line);
  background: #14191e;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.snapshot-frame img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: top center;
}

.snapshot-fallback {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
  min-height: inherit;
  padding: clamp(22px, 4vw, 46px);
  color: var(--ink);
}

.snapshot-fallback strong {
  max-width: 720px;
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 0.9;
  text-shadow: 4px 4px 0 var(--amber);
}

.snapshot-fallback p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.45;
}

[hidden] {
  display: none !important;
}

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

.betting-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 2px solid var(--line);
  background: #fffaf0;
}

.betting-head,
.betting-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.betting-head strong {
  font-size: 1.05rem;
}

.betting-head span {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.45rem;
}

.betting-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.betting-meta a,
.table-wrap a {
  color: var(--green);
  font-weight: 850;
}

.quarantine-panel {
  margin-top: 16px;
}

.quarantine-hero {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin-bottom: 16px;
  padding: clamp(18px, 3vw, 28px);
  border: 2px solid var(--line);
  background: #fff4c7;
  color: var(--ink);
  box-shadow: 5px 5px 0 0 var(--ink);
}

.quarantine-hero h3 {
  max-width: 780px;
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 0.9;
  text-shadow: 4px 4px 0 var(--amber);
}

.quarantine-hero p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.45;
}

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

.quarantine-card {
  display: grid;
  gap: 10px;
  min-height: 220px;
  padding: 14px;
  border: 2px solid var(--line);
  background: #fffaf0;
  box-shadow: 4px 4px 0 0 var(--ink);
  position: relative;
  overflow: hidden;
}

.quarantine-card::after {
  content: "BARRADO";
  position: absolute;
  right: -38px;
  top: 18px;
  width: 150px;
  padding: 5px 0;
  background: var(--amber);
  border-block: 2px solid var(--line);
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
  transform: rotate(28deg);
}

.quarantine-card span {
  font-family: "Archivo Black", sans-serif;
  font-size: 2rem;
  color: var(--red);
  line-height: 1;
}

.quarantine-card strong {
  max-width: 85%;
  font-size: 1.1rem;
}

.quarantine-card p {
  color: var(--muted);
  line-height: 1.4;
}

.quarantine-card b {
  align-self: end;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.bars {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-row.muted-result {
  opacity: 0.78;
}

.bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 780;
}

.candidate-name,
.transfer-label span,
.transfer-origin strong {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  min-width: 0;
}

.party-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  background: #f2e7cf;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.candidate-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 3px 3px 0 0 var(--ink);
}

.candidate-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.candidate-avatar .avatar-initials {
  display: none;
}

.candidate-avatar.sm {
  width: 34px;
  height: 34px;
}

.candidate-avatar.lg {
  width: 82px;
  height: 82px;
  border-width: 3px;
  box-shadow: 8px 8px 0 0 var(--ink);
}

.candidate-avatar.xs {
  width: 28px;
  height: 28px;
  box-shadow: 2px 2px 0 0 var(--ink);
}

.candidate-avatar.fallback {
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 900;
}

.candidate-avatar.cartoon {
  position: relative;
  background:
    radial-gradient(circle at 50% 36%, #ffe1aa 0 24%, transparent 25%),
    radial-gradient(circle at 50% 72%, var(--avatar-color, var(--amber)) 0 34%, transparent 35%),
    var(--surface);
}

.candidate-avatar.cartoon::before,
.candidate-avatar.cartoon::after {
  content: "";
  position: absolute;
  border: 2px solid var(--ink);
  background: var(--ink);
}

.candidate-avatar.cartoon::before {
  top: 9px;
  left: 50%;
  width: 18px;
  height: 9px;
  border-radius: 999px 999px 3px 3px;
  transform: translateX(-50%);
}

.candidate-avatar.cartoon::after {
  top: 18px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  box-shadow: 8px 0 0 var(--ink);
  transform: translateX(-7px);
}

.candidate-avatar.cartoon span,
.candidate-avatar.cartoon .avatar-initials {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 16px;
  margin-top: 22px;
  padding: 0 3px;
  border: 2px solid var(--ink);
  background: var(--surface);
  line-height: 1;
}

.candidate-avatar.sm.cartoon span,
.candidate-avatar.xs.cartoon span {
  display: none;
}

.bar-track {
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--surface);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: calc(var(--value) * 1%);
  max-width: 100%;
  border-radius: 0;
  background: var(--bar-color, var(--green));
  background-image: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(255, 255, 255, 0.18) 6px, rgba(255, 255, 255, 0.18) 12px);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

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

th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pending-list,
.pollster-list,
.transfer-grid {
  display: grid;
  gap: 12px;
}

.transfer-panel {
  margin-top: 16px;
}

.transfer-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

.transfer-origin {
  display: grid;
  align-content: center;
  gap: 6px;
}

.transfer-origin span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.transfer-origin strong {
  font-size: 1.1rem;
}

.transfer-bars {
  display: grid;
  gap: 10px;
}

.transfer-bar {
  display: grid;
  grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.transfer-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 760;
}

.transfer-track {
  height: 16px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--surface);
  overflow: hidden;
}

.transfer-fill {
  width: calc(var(--value) * 1%);
  height: 100%;
  border-radius: 0;
  background: var(--bar-color, var(--green));
  background-image: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(255, 255, 255, 0.18) 6px, rgba(255, 255, 255, 0.18) 12px);
}

.transfer-notes {
  margin-top: 14px;
}

.pending-item,
.pollster-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

.pending-head,
.pollster-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 2px solid currentColor;
  border-radius: 0;
  padding: 4px 9px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 850;
  white-space: nowrap;
}

.tag.warning {
  background: #f2e7cf;
  color: #875f00;
}

.pending-meta,
.pollster-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

.result-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 2px solid var(--line);
  border-radius: 0;
  padding: 5px 9px;
  background: var(--surface);
  font-size: 0.82rem;
}

.pending-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.danger-button {
  min-height: 40px;
  border: 2px solid var(--red);
  border-radius: 0;
  background: #fff7f6;
  color: var(--red);
  padding: 9px 13px;
  font-weight: 750;
}

.form-panel {
  display: grid;
  gap: 16px;
}

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

.full {
  width: 100%;
}

.results-editor {
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

.result-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 42px;
  gap: 8px;
  margin-bottom: 8px;
  align-items: end;
}

.empty {
  color: var(--muted);
  padding: 20px;
  border: 2px dashed var(--line);
  border-radius: 0;
  text-align: center;
}

@media (max-width: 880px) {
  body {
    background-size: 3px 3px;
  }

  .topbar,
  .toolbar,
  .community-banner,
  .source-note,
  .filters,
  .pending-head,
  .pollster-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    gap: 10px;
    padding: 0 14px 14px;
  }

  .topbar-inner {
    padding-top: 28px;
  }

  .topbar-side {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 0;
  }

  .brand-row {
    gap: 8px;
    margin-bottom: 8px;
  }

  .brand-mark {
    min-height: 28px;
    font-size: 1rem;
  }

  .tiny {
    font-size: 0.66rem;
  }

  h1 {
    font-size: clamp(2.7rem, 13.5vw, 4.35rem);
    line-height: 0.84;
    text-shadow: none;
  }

  .topbar-copy {
    margin-top: 8px;
    font-size: 1rem;
    line-height: 1.32;
  }

  .stamp {
    min-height: 26px;
    padding: 3px 7px;
    font-size: 0.64rem;
    transform: rotate(-2deg);
  }

  .status-pill {
    min-width: 0;
    min-height: 32px;
    padding: 6px 9px;
    font-size: 0.7rem;
    box-shadow: 2px 2px 0 0 var(--ink);
  }

  .ticker-track {
    gap: 18px;
    padding: 7px 0;
  }

  .ticker-track a,
  .ticker-track span,
  .ticker-track b {
    font-size: 0.74rem;
  }

  main {
    width: calc(100% - 16px);
    margin: 10px auto 34px;
  }

  .toolbar {
    gap: 8px;
    margin-bottom: 10px;
  }

  .tabs {
    width: 100%;
    gap: 3px;
    padding: 3px;
    box-shadow: 3px 3px 0 0 var(--ink);
  }

  .tab {
    flex: 1 0 auto;
    padding: 10px 11px;
    font-size: 0.96rem;
  }

  .icon-button {
    align-self: flex-end;
    width: 38px;
    min-height: 36px;
    box-shadow: 2px 2px 0 0 var(--ink);
  }

  .filters {
    align-items: stretch;
    gap: 8px;
    margin-bottom: 12px;
  }

  .filters label,
  .state-picker {
    width: 100%;
  }

  select,
  input,
  textarea {
    width: 100%;
    min-height: 42px;
  }

  .summary-grid,
  .hero-card,
  .dashboard-showcase,
  .dashboard-lower,
  .split,
  .map-layout,
  .governor-grid,
  .senate-grid,
  .senate-ticket,
  .betting-grid,
  .quarantine-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-showcase,
  .dashboard-lower,
  .dashboard-side,
  .summary-grid,
  .governor-content,
  .governor-grid,
  .betting-grid,
  .pollster-list,
  .transfer-grid {
    gap: 10px;
  }

  .dashboard-showcase {
    margin: 10px 0 12px;
  }

  .source-note {
    gap: 8px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 3px 3px 0 0 var(--ink);
  }

  .source-note strong {
    font-size: 0.95rem;
  }

  .source-note span {
    font-size: 0.9rem;
  }

  .source-note a {
    width: 100%;
    min-height: 34px;
    padding: 6px 9px;
  }

  .panel,
  .metric,
  .trend-card,
  .victory-trigger,
  .round-card,
  .governor-hero,
  .governor-results,
  .governor-latest,
  .latest-item,
  .pollster-item,
  .transfer-row,
  .betting-card {
    box-shadow: 3px 3px 0 0 var(--ink);
  }

  .panel {
    padding: 13px;
  }

  .panel-heading {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
  }

  .eyebrow {
    font-size: 0.68rem;
    margin-bottom: 4px;
  }

  h2 {
    font-size: 1.24rem;
    line-height: 1.08;
  }

  .muted {
    font-size: 0.94rem;
  }

  .trend-card {
    grid-template-rows: auto minmax(260px, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 12px;
  }

  .trend-head {
    display: grid;
    gap: 8px;
    padding-bottom: 9px;
  }

  .trend-head h2 {
    font-size: 1.6rem;
  }

  .trend-legend {
    justify-content: flex-start;
    gap: 5px;
  }

  .trend-legend span {
    min-height: 27px;
    padding: 3px 7px;
    font-size: 0.82rem;
  }

  .trend-chart {
    min-height: 260px;
  }

  .trend-chart text,
  .trend-chart .x-label,
  .trend-chart .point-label,
  .trend-chart .threshold-label {
    font-size: 20px;
  }

  .trend-chart .watermark {
    font-size: 34px;
    opacity: 0.55;
  }

  .trend-chart .point-label {
    stroke-width: 8px;
  }

  .round-panel,
  .victory-grid,
  .transfer-row,
  .transfer-bar {
    grid-template-columns: 1fr;
  }

  .round-panel {
    gap: 8px;
    margin-bottom: 10px;
  }

  .round-card {
    min-height: 76px;
    gap: 5px;
    padding: 12px;
  }

  .round-card strong {
    font-size: 1.15rem;
  }

  .round-card small {
    font-size: 0.88rem;
  }

  .round-connector {
    width: 4px;
    height: 24px;
    justify-self: center;
    background: linear-gradient(180deg, var(--chart-red), var(--chart-blue));
  }

  .round-connector::before,
  .round-connector::after {
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .round-connector::before {
    top: -2px;
  }

  .round-connector::after {
    top: calc(100% + 2px);
  }

  .split {
    gap: 10px;
  }

  .victory-main {
    gap: 7px;
    padding: 11px;
  }

  .victory-trigger {
    min-height: 118px;
    padding: 12px;
  }

  .victory-trigger strong {
    font-size: 1.34rem;
  }

  .victory-trigger b {
    align-self: start;
    padding: 6px 8px;
    font-size: 0.82rem;
  }

  .modal-backdrop {
    align-items: end;
    padding: 8px;
  }

  .modal-card {
    max-height: 92vh;
  }

  .victory-main strong {
    font-size: 1.55rem;
  }

  .victory-chart {
    min-height: 120px;
  }

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

  .metric {
    padding: 10px;
  }

  .metric span {
    font-size: 0.58rem;
    line-height: 1.1;
  }

  .metric strong {
    margin-top: 5px;
    font-size: 1.35rem;
  }

  .latest-item {
    padding: 9px;
  }

  .ai-summary {
    gap: 8px;
    padding: 10px;
  }

  .ai-summary h3 {
    font-size: 1.2rem;
    line-height: 1.12;
    text-shadow: none;
  }

  .rule-list {
    gap: 8px;
  }

  .rule-list article,
  .criteria-list article {
    padding: 10px;
  }

  .bar-row {
    gap: 5px;
  }

  .candidate-line {
    gap: 8px;
  }

  .candidate-name {
    font-size: 1rem;
  }

  .bar-value {
    font-size: 1rem;
  }

  .candidate-avatar {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 520px) {
  main {
    width: calc(100% - 12px);
    margin-top: 8px;
  }

  .panel {
    padding: 11px;
  }

  .topbar {
    padding-inline: 10px;
  }

  h1 {
    font-size: clamp(2.85rem, 16vw, 4rem);
    line-height: 0.82;
    text-shadow: none;
  }

  .topbar-copy {
    font-size: 0.98rem;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .tab {
    flex: 0 0 auto;
    min-width: max-content;
    scroll-snap-align: start;
    padding: 9px 10px;
    font-size: 0.94rem;
  }

  .filters {
    display: grid;
    grid-template-columns: 1fr 0.74fr;
  }

  .filters label {
    width: auto;
  }

  label span {
    font-size: 0.76rem;
  }

  .trend-card {
    padding: 10px;
  }

  .trend-chart {
    min-height: 285px;
  }

  .trend-chart .watermark {
    font-size: 30px;
  }

  .trend-legend span {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 0.92rem;
  }

  .trend-chart text,
  .trend-chart .x-label,
  .trend-chart .point-label,
  .trend-chart .threshold-label {
    font-size: 26px;
    font-weight: 950;
  }

  .trend-chart .point-label {
    stroke-width: 9px;
  }

  .summary-grid {
    gap: 6px;
  }

  .metric {
    padding: 8px;
  }

  .metric strong {
    font-size: 1.25rem;
  }

  .panel-heading {
    flex-direction: column;
  }

  .victory-main strong {
    font-size: 1.45rem;
  }

  .victory-trigger {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .victory-trigger b {
    justify-self: start;
  }

  .ai-summary h3 {
    font-size: 1.12rem;
    line-height: 1.08;
  }

  .round-card {
    min-height: 68px;
    padding: 10px;
  }

  .round-card strong {
    gap: 8px;
  }

  .candidate-avatar.sm {
    width: 32px;
    height: 32px;
  }

  .snapshot-top {
    align-items: stretch;
    flex-direction: column;
  }

  .snapshot-frame {
    aspect-ratio: 1273 / 703;
  }

  .result-line {
    grid-template-columns: 1fr 92px 38px;
  }

  .table-wrap table {
    min-width: 640px;
  }
}

/* Dark dashboard visual direction */
:root {
  color-scheme: dark;
  --bg: #101827;
  --paper: #182235;
  --paper-soft: #202c43;
  --ink: #fbfcff;
  --muted: #c2cbe0;
  --line: #36435f;
  --line-strong: #4a5a7a;
  --chart-blue: #55a4ff;
  --chart-red: #ff6574;
  --chart-yellow: #ffb21a;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
}

body {
  background:
    radial-gradient(circle at 50% -8%, rgba(93, 149, 255, 0.22), transparent 34rem),
    linear-gradient(180deg, #141c2c 0%, #101827 52%, #0e1522 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before { opacity: 0.11; filter: invert(1); }
.topbar, .headline-ticker, main { width: min(100% - 32px, 1080px); }
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  margin-top: 20px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(93, 149, 255, 0.16), transparent 38%),
    linear-gradient(180deg, #1a263b 0%, var(--paper) 100%);
  box-shadow: var(--shadow);
}
.ticker-strip { display: none; }
.topbar-inner, .topbar-side { padding: 0; }
.topbar-side { align-self: end; align-items: flex-end; }
.brand-row { margin-bottom: 18px; }
.brand-mark { border-radius: 999px; background: #05070d; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
.brand-mark::before { background: #f43f5e; }
h1 { max-width: 860px; color: #fff; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: clamp(3rem, 8vw, 6rem); font-weight: 950; line-height: 0.9; letter-spacing: -0.03em; text-transform: uppercase; text-shadow: none; }
h2, h3, .round-card strong, .metric strong { color: #fff; }
.topbar-copy { max-width: 760px; margin-top: 14px; color: #d0d8ec; font-size: clamp(1rem, 2vw, 1.35rem); }
.headline-ticker { border: 1px solid var(--line); border-radius: 14px; background: #152033; color: #eef4ff; overflow: hidden; box-shadow: var(--shadow); }
.ticker-track a { color: #dfe6ff; text-decoration: none; }
.ticker-track a strong, .ticker-track b { color: var(--chart-blue); }
.toolbar { position: sticky; top: 10px; z-index: 20; border: 1px solid var(--line); border-radius: 14px; background: rgba(24, 34, 53, 0.9); backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.tab, .icon-button, select, input, textarea { border-radius: 10px; color: var(--muted); background: transparent; box-shadow: none; }
.tab.active, .tab:hover, .icon-button:hover, select:focus { background: #24324c; color: #fff; border-color: #5d77a8; box-shadow: inset 0 0 0 1px rgba(93,149,255,0.28); }
.source-note, .panel, .trend-card, .victory-trigger, .round-card, .metric, .governor-results, .governor-latest, .senate-card, .senate-note, .senate-scenario-button, .latest-item, .pollster-item, .rule-list article, .criteria-list article { border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.source-note { background: linear-gradient(135deg, rgba(93,149,255,0.18), transparent 44%), var(--paper); }
.source-note strong, .panel-heading h2, .trend-head h2, .bar-label, .ai-summary h3 { color: #fff; }
.topbar-copy, .muted, .tiny, .notice span, .ai-summary p, .senate-note span { color: var(--muted); }
.dashboard-showcase { grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.65fr); align-items: stretch; }
.dashboard-lower { grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); }
.summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.trend-card { min-height: 520px; padding: 24px; }
.trend-head { align-items: flex-start; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.trend-head h2 { font-size: clamp(2rem, 5vw, 4.2rem); line-height: 0.9; letter-spacing: -0.035em; }
.trend-legend { justify-content: flex-end; }
.trend-legend span { border: 1px solid var(--line-strong); border-radius: 999px; background: #1c2940; color: #f5f8ff; padding: 6px 10px; font-weight: 850; }
.trend-chart, .ai-summary, .latest-item, .senate-source { border: 1px solid var(--line); border-radius: 14px; background: #162033; color: var(--ink); overflow: hidden; }
.trend-chart, .trend-chart svg { min-height: 360px; }
.trend-chart text { fill: var(--muted); }
.trend-chart .point-label { fill: #fff; paint-order: stroke; stroke: #101827; stroke-width: 6px; font-size: 20px; font-weight: 950; }
.trend-chart .watermark { fill: rgba(255,255,255,0.055); }
.victory-trigger { align-content: end; min-height: 100%; padding: 22px; background: linear-gradient(160deg, rgba(255,101,116,0.18), rgba(85,164,255,0.08) 62%, transparent), var(--paper); }
.victory-trigger strong { color: #fff; font-size: clamp(2.1rem, 4.8vw, 4rem); line-height: 0.92; }
.metric { background: var(--paper-soft); }
.metric span, .eyebrow, th { color: #b7c1d7; }
.metric strong { color: var(--chart-blue); font-size: clamp(2rem, 5vw, 3.3rem); }
.results-panel, .latest-panel, .ai-summary-panel, .trust-panel, .governors-panel, .senate-panel, .betting-panel { background: #151f31; }
.notice.active, .betting-disclaimer { border: 1px solid rgba(93,149,255,0.35); border-radius: 12px; background: rgba(93,149,255,0.12); color: var(--ink); box-shadow: none; }
.ai-summary { border-color: rgba(93,149,255,0.32); background: linear-gradient(135deg, rgba(93,149,255,0.18), transparent 42%), #162033; }
.ai-summary h3 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -0.03em; }
.ai-summary p { color: #d7dbea; }
.ai-summary blockquote { border-left-color: var(--chart-blue); }
.latest-link:hover, .senate-source:hover { border-color: rgba(93,149,255,0.55); background: #1d2b43; }
.bar-label > span:last-child { color: #fff; font-size: clamp(1.75rem, 4vw, 2.8rem); font-weight: 950; }
.bar-track { height: 16px; border: 1px solid #4a5875; border-radius: 999px; background: #111927; overflow: hidden; }
.bar-fill { border-radius: 999px; background-image: none; box-shadow: 0 0 18px color-mix(in srgb, var(--bar-color), transparent 60%); }
.candidate-avatar { border: 2px solid #536482; border-radius: 999px; background: #121b2b; box-shadow: 0 0 0 3px rgba(255,255,255,0.045); }
.candidate-avatar.lg { width: 64px; height: 64px; }
.senate-bars .bar-row { gap: 10px; }
.senate-bars .bar-label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}
.senate-bars .candidate-name {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  flex-wrap: nowrap;
}
.senate-bars .candidate-name .candidate-avatar {
  grid-row: 1 / span 2;
}
.senate-bars .candidate-name .party-badge {
  justify-self: start;
  margin-left: 0;
}
.senate-bars .bar-label > span:last-child {
  white-space: nowrap;
}
.party-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; border: 1px solid #30384d; border-radius: 999px; background: #0d111b; color: #cbd3e4; padding: 2px 7px; font-size: 0.72em; line-height: 1; vertical-align: middle; }
.party-badge img { width: 18px; height: 18px; object-fit: contain; image-rendering: auto; }
.stamp, .status-pill, .tag { border: 1px solid #31394e; border-radius: 999px; background: #171d2b; color: var(--muted); box-shadow: none; }
.senate-scenario-button.active, .senate-scenario-button:hover, .senate-scenario-button:focus-visible { background: rgba(93,149,255,0.14); border-color: rgba(93,149,255,0.55); box-shadow: none; transform: none; }
td, th { border-color: var(--line); }
.state-picker select { min-height: 46px; border-color: #4a5875; background: #162033; color: var(--ink); }
@media (max-width: 760px) {
  .topbar, .headline-ticker, main { width: min(100% - 16px, 1080px); }
  .topbar { grid-template-columns: 1fr; padding: 20px 16px; gap: 16px; }
  .topbar-side { align-items: flex-start; }
  h1 { font-size: clamp(2.55rem, 15vw, 4.4rem); }
  .toolbar { top: 6px; overflow-x: auto; }
  .tabs { flex-wrap: nowrap; }
  .tab { flex: 0 0 auto; min-height: 42px; font-size: 0.95rem; }
  .dashboard-showcase, .dashboard-lower { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .trend-card { min-height: auto; padding: 14px; }
  .trend-head { display: grid; }
  .trend-head h2 { font-size: clamp(2rem, 13vw, 3.5rem); }
  .trend-legend { justify-content: flex-start; }
  .trend-chart, .trend-chart svg { min-height: 330px; }
  .trend-chart .point-label { font-size: 24px; stroke-width: 7px; }
  .victory-trigger { min-height: auto; }
  .metric strong, .bar-label > span:last-child { font-size: 2.25rem; }
  .candidate-avatar.lg { width: 58px; height: 58px; }
  .senate-bars .bar-label {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }
  .senate-bars .candidate-name {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    font-size: 1rem;
    line-height: 1.1;
  }
  .senate-bars .candidate-name .candidate-avatar.lg {
    width: 54px;
    height: 54px;
  }
  .senate-bars .bar-label > span:last-child {
    font-size: 1.55rem;
  }
  .ai-summary h3 { font-size: 2rem; }
}

/* Compact first-round popup trigger */
.dashboard-showcase { grid-template-columns: 1fr; }
.victory-trigger {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
}
.victory-trigger strong {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
}
.victory-trigger small {
  margin-bottom: 8px;
  color: #9fb7e9;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
}
.victory-trigger b {
  border-color: rgba(255, 205, 74, 0.55);
  border-radius: 8px;
  background: rgba(255, 205, 74, 0.13);
  color: #ffdc70;
  box-shadow: none;
}
.victory-panel .panel-heading {
  padding-right: 54px;
}
.victory-panel .panel-heading h2 {
  color: #fff;
}
.victory-panel .tag {
  margin-right: 8px;
}
.victory-main {
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: #fffaf0;
  color: #08130f;
}
.victory-main strong,
.victory-matchup,
.victory-matchup span {
  color: #08130f;
}
.victory-main .muted {
  color: #526070;
}
.victory-matchup b {
  color: #6b7280;
}
.victory-chart {
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: #0d111b;
}
.victory-chart text {
  fill: #fff;
}
@media (max-width: 760px) {
  .victory-trigger {
    align-items: stretch;
    flex-direction: row;
    padding: 14px 16px;
  }

  .victory-trigger strong {
    font-size: clamp(1.35rem, 7.5vw, 1.75rem);
    line-height: 1.05;
  }

  .victory-trigger small {
    font-size: 0.66rem;
    color: #b8c8eb;
  }

  .victory-trigger b {
    align-self: center;
    padding: 6px 8px;
    font-size: 0.74rem;
  }

  .victory-panel .panel-heading {
    padding-right: 42px;
  }

  .victory-panel .tag {
    margin-right: 0;
  }

  .victory-main strong {
    font-size: 1.55rem;
    line-height: 1.06;
  }
}

/* Dark layout fixes after visual QA */
.topbar,
.headline-ticker,
main {
  margin-left: auto;
  margin-right: auto;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
}

.toolbar .tabs {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.toolbar .tab {
  border: 1px solid transparent;
  background: transparent;
  color: #aeb7cc;
}

.toolbar .tab.active {
  background: #1b2233;
  color: #fff;
  border-color: #3b4662;
}

.icon-button {
  flex: 0 0 auto;
}

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

.metric {
  min-width: 0;
  overflow: hidden;
}

.metric strong {
  max-width: 100%;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.ai-summary {
  gap: 16px;
  padding: 18px;
}

.ai-summary h3 {
  color: #fff;
  text-wrap: balance;
}

.ai-summary .ai-deck {
  width: 100%;
  margin: 0;
  padding: 16px;
  border: 1px solid #d9dfeb;
  border-radius: 10px;
  background: #f7f4e8;
  color: #162033;
  box-shadow: none;
  font-weight: 850;
}

.ai-summary .ai-copy-list {
  display: grid;
  gap: 10px;
}

.ai-summary .ai-copy-list p {
  margin: 0;
  padding: 13px 14px;
  border: 1px solid #2e3850;
  border-left: 5px solid var(--chart-blue);
  border-radius: 10px;
  background: #101827;
  color: #dce5f7;
  box-shadow: none;
}

.ai-summary .ai-copy-list p strong {
  color: #fff;
}

.ai-summary small {
  border-color: rgba(93, 149, 255, 0.36);
  background: rgba(93, 149, 255, 0.12);
  color: #dce7ff;
}

@media (max-width: 760px) {
  .toolbar {
    align-items: stretch;
    overflow: hidden;
  }

  .toolbar .tabs {
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .toolbar .tabs::-webkit-scrollbar {
    display: none;
  }

  .icon-button {
    width: 44px;
  }

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

  .metric strong {
    font-size: 2.35rem;
  }

  .ai-summary {
    padding: 14px;
  }

  .ai-summary .ai-deck,
  .ai-summary .ai-copy-list p {
    padding: 12px;
  }
}

/* Mobile headline and toolbar fit */
@media (max-width: 760px) {
  h1 {
    font-size: clamp(2.15rem, 11.5vw, 3.05rem);
    letter-spacing: -0.035em;
  }

  .toolbar {
    gap: 6px;
  }

  .toolbar .tabs {
    min-width: 0;
    flex: 1 1 auto;
  }

  .toolbar .icon-button {
    display: none;
  }
}

/* Straighten the whole page column */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  display: block;
}

.topbar,
.headline-ticker,
main,
.toolbar,
.source-note,
.trend-card,
.victory-trigger,
.round-panel,
.dashboard-lower,
.trust-panel {
  box-sizing: border-box;
}

.topbar,
.headline-ticker,
main {
  width: min(1080px, calc(100vw - 32px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  transform: none !important;
  left: auto !important;
  right: auto !important;
}

.headline-ticker {
  display: block;
}

.toolbar {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.toolbar .tabs {
  transform: none !important;
}

.dashboard-showcase,
.round-panel,
.dashboard-lower,
.trust-panel {
  width: 100%;
}

@media (max-width: 760px) {
  .topbar,
  .headline-ticker,
  main {
    width: min(100vw - 16px, 1080px) !important;
  }
}

/* Editorial dashboard polish */
:root {
  --bg: #111a29;
  --paper: #18243a;
  --paper-soft: #22314d;
  --surface: #172238;
  --ink: #fbfdff;
  --muted: #c6d1e7;
  --line: #344768;
  --line-strong: #58709d;
  --chart-blue: #38bdf8;
  --chart-red: #ff5668;
  --chart-yellow: #f6a91a;
  --chart-gray: #aab5c6;
  --focus: #9cc9ff;
  --shadow: 0 22px 60px rgba(4, 10, 22, 0.32);
}

html {
  background: #0f1724;
}

body {
  background:
    radial-gradient(circle at 20% -8%, rgba(56, 189, 248, 0.18), transparent 32rem),
    radial-gradient(circle at 88% 8%, rgba(255, 86, 104, 0.12), transparent 26rem),
    linear-gradient(180deg, #172134 0%, #111a29 42%, #0f1724 100%);
}

body::before {
  opacity: 0.08;
}

.topbar,
.headline-ticker,
main {
  width: min(1180px, calc(100vw - 32px)) !important;
}

main {
  display: grid;
  gap: 20px;
  margin-top: 18px;
  padding-bottom: 64px;
}

.topbar {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) 180px;
  margin-top: 18px;
  padding: clamp(22px, 4vw, 38px);
  border-color: rgba(156, 201, 255, 0.22);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.18), transparent 32%),
    radial-gradient(circle at 100% 20%, rgba(255, 86, 104, 0.16), transparent 24rem),
    linear-gradient(180deg, rgba(31, 45, 72, 0.98), rgba(22, 32, 51, 0.98));
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto 24px 20px auto;
  width: min(34vw, 360px);
  height: 150px;
  border: 1px solid rgba(198, 209, 231, 0.16);
  border-radius: 999px;
  transform: rotate(-9deg);
  pointer-events: none;
}

.brand-row {
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(18px, 3vw, 28px);
}

.brand-mark {
  background: #07111f;
  letter-spacing: 0.04em;
}

h1 {
  max-width: 840px;
  font-size: clamp(3.4rem, 7vw, 5.9rem);
  line-height: 0.88;
  letter-spacing: -0.055em;
}

.topbar-copy {
  max-width: 820px;
  color: #d8e4f7;
}

.topbar-side {
  position: relative;
  z-index: 1;
  justify-content: flex-end;
}

.stamp,
.status-pill,
.tag {
  border-color: rgba(156, 201, 255, 0.28);
  background: rgba(10, 19, 34, 0.58);
  color: #d7e5ff;
}

.headline-ticker {
  margin-top: 10px;
  border-color: rgba(156, 201, 255, 0.18);
  border-radius: 18px;
  background: rgba(10, 18, 31, 0.86);
}

.ticker-track {
  padding-block: 10px;
}

.ticker-track a {
  color: #edf5ff;
}

.ticker-track a strong,
.ticker-track b {
  color: #63c7ff;
}

.toolbar {
  top: 12px;
  padding: 9px;
  border-color: rgba(156, 201, 255, 0.22);
  border-radius: 18px;
  background: #172238;
  box-shadow: 0 14px 34px rgba(4, 10, 22, 0.34);
}

.toolbar .tabs {
  gap: 4px;
}

.toolbar .tab {
  min-height: 44px;
  padding-inline: 16px;
  color: #c5d0e5;
}

.toolbar .tab.active,
.toolbar .tab:hover {
  background: linear-gradient(180deg, #edf5ff, #dce8ff);
  color: #111827;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(3, 9, 20, 0.22);
}

.icon-button {
  min-width: 44px;
  min-height: 44px;
}

.source-note {
  align-items: center;
  padding: 18px 20px;
  border-radius: 18px;
  border-color: rgba(156, 201, 255, 0.18);
  background:
    linear-gradient(90deg, rgba(56, 189, 248, 0.14), transparent 48%),
    rgba(24, 36, 58, 0.92);
}

.source-note strong {
  font-size: 1.05rem;
}

.source-note span {
  color: #d2ddf0;
}

.dashboard-showcase {
  display: grid;
  gap: 16px;
}

.trend-card,
.panel,
.round-card,
.metric,
.victory-trigger {
  border-color: rgba(156, 201, 255, 0.18);
  box-shadow: 0 18px 42px rgba(4, 10, 22, 0.24);
}

.trend-card {
  padding: clamp(18px, 3vw, 28px);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(33, 48, 76, 0.98), rgba(21, 31, 49, 0.98)),
    var(--paper);
}

.trend-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  padding-bottom: 18px;
  border-bottom-color: rgba(198, 209, 231, 0.16);
}

.trend-head h2 {
  font-size: clamp(2.5rem, 6vw, 4.85rem);
  letter-spacing: -0.06em;
}

.trend-legend {
  gap: 8px;
  max-width: 420px;
}

.trend-legend span {
  border-color: rgba(156, 201, 255, 0.22);
  background: rgba(12, 21, 36, 0.62);
  color: #f8fbff;
}

.trend-chart {
  min-height: 420px;
  border-radius: 20px;
  border-color: rgba(156, 201, 255, 0.14);
  background:
    radial-gradient(circle at 52% 45%, rgba(56, 189, 248, 0.08), transparent 24rem),
    #101827;
}

.trend-chart svg rect {
  fill: #101827;
}

.trend-chart svg line {
  stroke: rgba(198, 209, 231, 0.16);
}

.trend-chart .watermark {
  fill: rgba(255, 255, 255, 0.045);
}

.trend-chart .point-label {
  stroke: #101827;
}

.victory-trigger {
  border-radius: 22px;
  padding: 22px 24px;
  background:
    linear-gradient(90deg, rgba(255, 86, 104, 0.18), rgba(56, 189, 248, 0.12)),
    rgba(24, 36, 58, 0.98);
}

.victory-trigger strong {
  letter-spacing: -0.045em;
}

.victory-trigger b {
  border-color: rgba(255, 214, 102, 0.42);
  background: rgba(255, 214, 102, 0.12);
}

.round-panel {
  gap: 12px;
}

.round-card {
  border-radius: 20px;
  padding: 18px;
  background: rgba(24, 36, 58, 0.88);
}

.round-card.active {
  border-color: rgba(255, 255, 255, 0.86);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(255, 86, 104, 0.08)),
    rgba(30, 43, 64, 0.96);
}

.round-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-lower {
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 20px;
}

.panel {
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(25, 37, 59, 0.96), rgba(20, 30, 48, 0.96)),
    var(--paper);
}

.panel-heading {
  align-items: start;
}

.panel-heading h2 {
  letter-spacing: -0.035em;
}

.notice.active {
  border-color: rgba(156, 201, 255, 0.22);
  background: rgba(56, 189, 248, 0.11);
}

.bars {
  gap: 16px;
}

.bar-label {
  gap: 16px;
}

.bar-label > span:last-child {
  color: #fff;
  letter-spacing: -0.035em;
}

.bar-track {
  height: 14px;
  border-color: rgba(198, 209, 231, 0.22);
  background: rgba(8, 14, 24, 0.72);
}

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

.metric {
  min-height: 118px;
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(160deg, rgba(56, 189, 248, 0.1), transparent 52%),
    var(--paper-soft);
}

.metric span {
  color: #b7c6df;
}

.metric strong {
  color: #6fb6ff;
  letter-spacing: -0.055em;
}

.ai-summary {
  border-radius: 20px;
  background:
    radial-gradient(circle at 95% 4%, rgba(255, 86, 104, 0.12), transparent 14rem),
    linear-gradient(150deg, rgba(56, 189, 248, 0.14), transparent 48%),
    #142035;
}

.ai-summary h3 {
  color: #fff;
  line-height: 0.98;
}

.ai-summary .ai-deck {
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(245, 248, 255, 0.96);
  color: #111827;
}

.ai-summary .ai-copy-list p {
  border-color: rgba(156, 201, 255, 0.18);
  background: rgba(10, 18, 31, 0.52);
}

.latest-item {
  border-radius: 16px;
  background: rgba(15, 25, 42, 0.78);
}

.candidate-avatar {
  border-color: rgba(255, 255, 255, 0.74);
}

.party-badge {
  border-color: rgba(156, 201, 255, 0.26);
  background: rgba(12, 21, 36, 0.62);
}

.table-wrap,
.snapshot-frame {
  border-radius: 18px;
}

.modal-card {
  border-radius: 24px;
}

@media (max-width: 960px) {
  .dashboard-lower {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .topbar,
  .headline-ticker,
  main {
    width: min(100vw - 16px, 1180px) !important;
  }

  main {
    gap: 14px;
    margin-top: 12px;
    padding-bottom: 40px;
  }

  .topbar {
    grid-template-columns: 1fr;
    margin-top: 8px;
    padding: 18px;
    border-radius: 20px;
  }

  .topbar::after {
    display: none;
  }

  .brand-row {
    gap: 8px;
    margin-bottom: 18px;
  }

  .brand-mark {
    font-size: 0.84rem;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 3.55rem);
    line-height: 0.92;
  }

  .topbar-copy {
    font-size: 1rem;
    line-height: 1.35;
  }

  .topbar-side {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  .headline-ticker {
    margin-top: 8px;
    border-radius: 14px;
  }

  .toolbar {
    top: 6px;
    padding: 6px;
    border-radius: 16px;
  }

  .toolbar .tab {
    min-height: 40px;
    padding-inline: 12px;
  }

  .source-note {
    padding: 14px;
  }

  .trend-card,
  .panel {
    border-radius: 20px;
  }

  .trend-card {
    padding: 16px;
  }

  .trend-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 14px;
  }

  .trend-head > div:first-child {
    width: 100%;
  }

  .trend-head h2 {
    font-size: clamp(2.3rem, 12.5vw, 3.55rem);
  }

  .trend-legend {
    width: 100%;
    gap: 6px;
    justify-content: flex-start;
  }

  .trend-legend span {
    padding: 5px 8px;
    font-size: 0.78rem;
  }

  .trend-chart,
  .trend-chart svg {
    min-height: 330px;
  }

  .victory-trigger {
    padding: 16px;
    border-radius: 18px;
  }

  .round-panel {
    gap: 8px;
  }

  .round-card {
    padding: 14px;
    border-radius: 18px;
  }

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

  .metric {
    min-height: 86px;
  }

  .ai-summary h3 {
    font-size: clamp(1.8rem, 9vw, 2.35rem);
  }
}

/* X-inspired clean social-dashboard pass */
:root {
  --bg: #141a21;
  --paper: #19212b;
  --paper-soft: #202a36;
  --surface: #18202a;
  --ink: #f2f5f8;
  --muted: #9aa8b8;
  --line: #31404f;
  --line-strong: #465a70;
  --chart-blue: #1d9bf0;
  --chart-red: #f04452;
  --chart-yellow: #f59e0b;
  --shadow: none;
}

body {
  background: #141a21;
  color: var(--ink);
}

body::before {
  opacity: 0;
}

.topbar,
.headline-ticker,
.toolbar,
.source-note,
.trend-card,
.victory-trigger,
.round-card,
.panel,
.metric,
.latest-item,
.senate-source,
.senate-scenario-button,
.pollster-item,
.rule-list article,
.criteria-list article {
  box-shadow: none;
}

.topbar {
  overflow: hidden;
  margin-top: 16px;
  border-color: var(--line);
  border-radius: 22px 22px 0 0;
  background:
    linear-gradient(90deg, rgba(29, 155, 240, 0.16), transparent 48%),
    #18202a;
}

.topbar::after {
  border-color: rgba(242, 245, 248, 0.08);
}

.brand-mark {
  background: #0f1419;
  color: #fff;
}

.brand-mark::before {
  background: var(--chart-blue);
}

h1 {
  letter-spacing: -0.065em;
}

.topbar-copy {
  color: #d7dee8;
}

.stamp,
.status-pill,
.tag {
  border-color: var(--line);
  background: #141a21;
  color: #b9c5d2;
}

.headline-ticker {
  margin-top: 0;
  border-top: 0;
  border-color: var(--line);
  border-radius: 0 0 22px 22px;
  background: #10161d;
}

.ticker-track {
  padding-block: 11px;
}

.ticker-track a {
  color: #d8e1eb;
}

.ticker-track a strong,
.ticker-track b {
  color: var(--chart-blue);
}

.toolbar {
  top: 10px;
  border-color: var(--line);
  border-radius: 999px;
  background: rgba(20, 26, 33, 0.88);
  backdrop-filter: blur(18px);
}

.toolbar .tabs {
  gap: 2px;
}

.toolbar .tab {
  color: var(--muted);
  border-radius: 999px;
  transition: background-color 160ms ease, color 160ms ease;
}

.toolbar .tab.active,
.toolbar .tab:hover {
  background: #e7eef6;
  color: #0f1419;
  box-shadow: none;
}

.icon-button {
  border-radius: 999px;
}

.source-note,
.trend-card,
.victory-trigger,
.round-card,
.panel,
.metric {
  border-color: var(--line);
  background: var(--paper);
}

.source-note {
  border-radius: 18px;
  background: #18202a;
}

.source-note span,
.topbar-copy,
.muted,
.tiny,
.notice span,
.ai-summary p,
.senate-note span {
  color: #aeb9c7;
}

.dashboard-showcase,
.dashboard-lower {
  gap: 14px;
}

.trend-card {
  border-radius: 22px;
  background: #18202a;
}

.trend-head {
  border-bottom-color: var(--line);
}

.trend-head h2 {
  color: #fff;
}

.trend-legend span {
  border-color: var(--line);
  background: #141a21;
  color: #edf2f7;
}

.trend-chart {
  border-color: var(--line);
  background: #141a21;
}

.trend-chart svg rect {
  fill: #141a21;
}

.trend-chart svg line {
  stroke: #2f3d4d;
}

.trend-chart .watermark {
  fill: rgba(255, 255, 255, 0.04);
}

.victory-trigger {
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(29, 155, 240, 0.12), rgba(240, 68, 82, 0.1)),
    #18202a;
}

.victory-trigger b {
  border-color: rgba(29, 155, 240, 0.5);
  background: rgba(29, 155, 240, 0.12);
  color: #8fd0ff;
}

.round-card {
  border-radius: 18px;
  background: #18202a;
}

.round-card.active {
  border-color: #e7eef6;
  background: #202a36;
}

.round-connector {
  background: var(--line);
}

.round-connector::before,
.round-connector::after {
  border-color: #e7eef6;
  background: #141a21;
}

.panel {
  border-radius: 22px;
  background: #18202a;
}

.panel-heading {
  border-bottom-color: transparent;
}

.eyebrow,
.metric span,
th {
  color: #93a3b5;
}

.notice.active,
.betting-disclaimer {
  border-color: rgba(29, 155, 240, 0.35);
  background: rgba(29, 155, 240, 0.1);
}

.bar-track {
  border-color: #2f3d4d;
  background: #10161d;
}

.metric {
  border-radius: 18px;
  background: #202a36;
}

.metric strong {
  color: var(--chart-blue);
}

.ai-summary {
  border-color: var(--line);
  background: #141a21;
}

.ai-summary .ai-deck {
  border-color: var(--line);
  background: #eef4fb;
  color: #111827;
}

.ai-summary .ai-copy-list p {
  border-color: var(--line);
  border-left-color: var(--chart-blue);
  background: #18202a;
}

.latest-item,
.senate-source {
  border-color: var(--line);
  background: #141a21;
}

.latest-link:hover,
.senate-source:hover {
  border-color: rgba(29, 155, 240, 0.56);
  background: #1d2733;
}

.candidate-avatar {
  border-color: #e7eef6;
  background: #10161d;
}

.party-badge {
  border-color: var(--line);
  background: #141a21;
  color: #c7d2df;
}

.state-picker select,
select,
input,
textarea {
  border-color: var(--line);
  background: #141a21;
  color: var(--ink);
}

td,
th {
  border-color: var(--line);
}

.modal-backdrop {
  background: rgba(5, 9, 14, 0.72);
}

.victory-main {
  background: #eef4fb;
  color: #111827;
}

.victory-chart {
  background: #141a21;
}

.party-badge {
  min-height: 28px;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1;
}

.party-badge img {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.bar-label .party-badge,
.round-card .party-badge,
.victory-matchup .party-badge {
  transform: translateY(1px);
}

/* Compact closing section */
main {
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.trust-panel.home-rules {
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin: 18px 0 0;
  padding: 18px;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(29, 155, 240, 0.08), transparent 42%),
    rgba(24, 32, 42, 0.86);
}

.home-rules .panel-heading {
  margin-bottom: 12px;
}

.home-rules .panel-heading h2 {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.home-rules .rule-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-rules .rule-list article {
  min-height: 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(15, 22, 31, 0.78);
}

.home-rules .rule-list strong {
  color: #f4f8ff;
  font-size: 0.9rem;
}

.home-rules .rule-list span {
  color: #aeb9c7;
  font-size: 0.82rem;
}

@media (max-width: 760px) {
  body {
    background: #141a21;
  }

  .topbar {
    border-radius: 20px;
    background:
      linear-gradient(135deg, rgba(29, 155, 240, 0.15), transparent 52%),
      #18202a;
  }

  .headline-ticker {
    margin-top: 8px;
    border-top: 1px solid var(--line);
    border-radius: 18px;
  }

  .toolbar {
    border-radius: 18px;
  }

  .toolbar .tab {
    border-radius: 14px;
  }

  .party-badge {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 0.82rem;
  }

  .party-badge img {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  main {
    padding-bottom: 18px;
    margin-bottom: 18px;
  }

  .trust-panel.home-rules {
    margin-top: 12px;
    padding: 14px;
  }

  .home-rules .rule-list {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x mandatory;
  }

  .home-rules .rule-list article {
    flex: 0 0 min(78vw, 300px);
    min-width: 0;
    scroll-snap-align: start;
  }

  .home-rules .rule-list strong {
    font-size: 0.88rem;
  }

  .home-rules .rule-list span {
    font-size: 0.8rem;
  }
}
