*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --paper: #fbefe5;
  --paper-2: #f4e1d2;
  --paper-3: #ead3bf;
  --ink: #221c13;
  --ink-soft: #4d4234;
  --ink-muted: #665b4b;
  --rule: rgba(34, 28, 19, 0.16);
  --rule-strong: rgba(34, 28, 19, 0.44);
  --red: #8c2a2a;
  --red-soft: rgba(140, 42, 42, 0.58);
  --blue: #1d3c5e;
  --blue-soft: rgba(29, 60, 94, 0.58);
  --red-wash: rgba(140, 42, 42, 0.07);
  --blue-wash: rgba(29, 60, 94, 0.07);
  --gold: #a87623;
  --green: #35624c;
  --kalshi-green: #21c891;
  --polymarket-blue: #1f63ff;
  --white: #fffaf4;
  --font-display: "Source Serif 4", Georgia, serif;
  --font-clean-display: var(--font-display);
  --font-ui: var(--font-display);
  --font-sans: var(--font-display);
  --font-mono: var(--font-display);
  --font-watermark: "Fraunces", Georgia, serif;
  --font-brand: "IM Fell English SC", Georgia, serif;
  --text-xs: 13px;     /* kickers, fine print - replaces all 10-12px */
  --text-sm: 15px;
  --text-base: 17px;   /* body */
  --text-lg: 21px;
  --text-xl: 30px;     /* section headings */
  --text-section-title: clamp(36px, 4.4vw, 54px);
  --text-2xl: clamp(40px, 6vw, 62px);   /* display */
  --text-mega: clamp(56px, 12vw, 92px); /* reveal hero numbers */
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.dialog-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(34, 28, 19, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(34, 28, 19, 0.02) 1px, transparent 1px);
  background-size: 42px 42px;
  z-index: 0;
}

/* Paper grain - subtle multiplied noise over the whole viewport. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch' seed='5'/><feColorMatrix values='0 0 0 0 0.13  0 0 0 0 0.10  0 0 0 0 0.07  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
  mix-blend-mode: multiply;
  opacity: 0.05;
}

/* Declaration of Independence watermark - fixed, faint, behind everything. */
.paper-watermark {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 6vw 0;
}

.paper-watermark-body {
  max-width: 780px;
  color: var(--ink);
  opacity: 0.032;
  font-family: var(--font-watermark);
  font-size: clamp(20px, 2.2vw, 26px);
  font-style: italic;
  line-height: 1.55;
}

.paper-watermark-body p {
  margin: 0 0 1em;
  text-align: justify;
  hyphens: auto;
}

.paper-watermark-body p:first-of-type::first-letter {
  float: left;
  font-size: 2.6em;
  line-height: 0.9;
  padding-right: 8px;
  font-style: normal;
}

@media (max-width: 820px) {
  .paper-watermark {
    padding: 60px 28px 0;
  }
  .paper-watermark-body {
    opacity: 0.025;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::after { opacity: 0.06; }
}

button,
input {
  font: inherit;
  font-family: var(--font-ui);
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

.shell {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 36px 64px;
}

.masthead {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  padding-bottom: 14px;
  border-bottom: 4px double var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.brand-lockup {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.brand {
  font-family: var(--font-brand);
  font-size: 66px;
  font-weight: 400;
  line-height: 0.92;
  color: var(--ink);
  text-transform: none;
}

.brand-partisan {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-soft);
  text-transform: uppercase;
}

.masthead-status {
  position: absolute;
  top: 30px;
  right: 36px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink-muted);
}

@media (max-width: 820px) {
  .masthead-status {
    position: static;
    margin-top: 8px;
    text-align: center;
  }
}

.brand-party-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}

.kicker,
.status-label,
.spark-label,
.delta,
.source-meta,
.column-label,
.node-tag,
.scenario-title,
.history-stats,
.detail-stats,
.section-note {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0;
}

.kicker,
.status-label {
  margin: 0 0 8px;
  color: var(--ink-muted);
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 360;
  line-height: 1;
  letter-spacing: 0;
}

h1 {
  max-width: 950px;
  font-size: var(--text-xl);
  line-height: 1.14;
}

h2 {
  font-size: var(--text-xl);
}

.product-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 560px;
  margin: 8px auto 0;
  border-top: 4px double var(--ink);
  border-bottom: 4px double var(--ink);
}

.product-tabs button {
  min-height: 50px;
  border: 0;
  border-right: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.product-tabs button:last-child {
  border-right: 0;
}

.product-tabs button[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper);
}

.tab-panel {
  padding-top: 34px;
}

.runtime-notice {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--gold);
  background: rgba(168, 118, 35, 0.11);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.runtime-notice[hidden] {
  display: none;
}

.live-readout {
  border-top: 0;
}

/* Method page */
.method-section {
  max-width: 1060px;
  margin: 0 auto;
}

.method-hero {
  padding: 8px 0 30px;
  border-bottom: 4px double var(--ink);
}

.method-hero h1,
.method-hero h2 {
  max-width: 930px;
  margin: 0;
  font-size: var(--text-section-title);
  font-weight: 520;
  line-height: 1.04;
}

.method-lede {
  max-width: 830px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-lg);
  line-height: 1.36;
}

.method-thesis {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(260px, 0.82fr);
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--ink);
}

.method-thesis p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-base);
  line-height: 1.42;
}

.method-thesis p:first-child {
  color: var(--ink);
  font-size: var(--text-lg);
  line-height: 1.34;
}

.method-run-status {
  margin-top: 24px;
}

.method-run-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1.38fr);
  gap: 24px;
  padding: 18px 0 22px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.method-run-card h3 {
  margin: 0;
  font-family: var(--font-clean-display);
  font-size: var(--text-lg);
  font-weight: 560;
  line-height: 1.14;
}

.method-run-card p:last-child {
  grid-column: 2;
  margin: -6px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.method-run-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.method-run-facts div {
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid var(--rule-strong);
}

.method-run-facts dt {
  margin: 0;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.2;
  text-transform: uppercase;
}

.method-run-facts dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: var(--text-sm);
  line-height: 1.25;
}

.method-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.method-principles section {
  min-height: 145px;
  padding: 18px 18px 20px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.method-principles h3,
.method-step h3,
.method-reading h4,
.method-client h3 {
  margin: 0;
  font-family: var(--font-clean-display);
  font-weight: 600;
  line-height: 1.12;
}

.method-principles h3 {
  font-size: var(--text-lg);
}

.method-principles p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-base);
  line-height: 1.36;
}

.method-flow {
  margin-top: 34px;
  border-top: 4px double var(--ink);
}

.method-step {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule-strong);
}

.method-step-index {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  line-height: 1;
}

.method-step h3 {
  font-size: var(--text-xl);
}

.method-step p {
  max-width: 790px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-base);
  line-height: 1.42;
}

.method-signal-list {
  display: grid;
  gap: 10px;
  max-width: 790px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.method-signal-list li {
  padding: 11px 12px;
  border-left: 3px solid var(--ink);
  background: rgba(255, 250, 244, 0.62);
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: 1.38;
}

.method-signal-list b {
  color: var(--ink);
  font-weight: 650;
}

.method-step details {
  max-width: 840px;
  margin-top: 16px;
  padding-left: 16px;
  border-left: 2px solid var(--ink);
}

.method-step summary {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
}

.method-step pre {
  max-width: 100%;
  margin: 12px 0 0;
  padding: 12px;
  overflow-x: auto;
  border: 1px solid var(--rule-strong);
  background: rgba(255, 250, 244, 0.62);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.34;
  white-space: pre-wrap;
}

.method-source-wrap {
  margin-top: 14px;
}

.method-ontology-graph {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr) 58px minmax(0, 1fr);
  gap: 0;
  max-width: 900px;
  margin-top: 18px;
  align-items: stretch;
}

.method-ontology-column {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--ink);
  background: rgba(255, 250, 244, 0.46);
}

.method-ontology-column-mid {
  background: rgba(168, 118, 35, 0.10);
}

.method-ontology-column p {
  margin: 0 0 2px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.2;
  text-transform: uppercase;
}

.method-ontology-column span {
  display: block;
  padding: 7px 8px;
  border-left: 3px solid var(--rule-strong);
  background: rgba(251, 239, 229, 0.70);
  color: var(--ink);
  font-size: var(--text-sm);
  line-height: 1.2;
}

.method-ontology-column span:nth-of-type(1) {
  border-left-color: var(--red);
}

.method-ontology-column span:nth-of-type(2) {
  border-left-color: var(--blue);
}

.method-ontology-column span:nth-of-type(3) {
  border-left-color: var(--gold);
}

.method-ontology-links {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 22px 8px;
}

.method-ontology-links i {
  position: relative;
  display: block;
  height: 2px;
  background: var(--rule-strong);
}

.method-ontology-links i::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1px;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--rule-strong);
  border-right: 2px solid var(--rule-strong);
  transform: translateY(-50%) rotate(45deg);
}

.method-reading {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1.38fr);
  gap: 32px;
  margin-top: 36px;
  padding: 26px 0;
  border-top: 4px double var(--ink);
  border-bottom: 4px double var(--ink);
}

.method-reading h3 {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 520;
  line-height: 1.08;
}

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

.method-reading-grid section {
  padding-top: 4px;
  border-top: 1px solid var(--ink);
}

.method-reading h4 {
  font-size: var(--text-base);
}

.method-reading p,
.method-client p {
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-base);
  line-height: 1.4;
}

.method-client {
  max-width: 820px;
  margin-top: 30px;
  padding-left: 18px;
  border-left: 2px solid var(--ink);
}

.method-client h3 {
  font-size: var(--text-xl);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 42px;
  margin-top: 64px;
  padding: 24px 0 0;
  border-top: 4px double var(--ink);
}

.site-footer.site-footer-compact {
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0 0;
}

.footer-about-button,
.footer-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0;
  text-transform: uppercase;
  text-decoration: none;
}

.footer-brand-links {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.footer-about-button {
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.footer-about-button:hover,
.footer-about-button:focus-visible,
.footer-logo-link:hover,
.footer-logo-link:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--paper-3);
  outline: none;
}

.footer-logo-link {
  justify-content: center;
  width: 146px;
  min-width: 0;
  min-height: 38px;
}

.footer-logo-link span {
  white-space: nowrap;
}

.footer-logo-link img {
  display: block;
  width: auto;
  max-width: 118px;
  max-height: 22px;
  object-fit: contain;
}

.footer-logo-link-polybridge img {
  width: 23px;
  height: 23px;
}

.site-footer h2 {
  max-width: 520px;
  font-size: var(--text-lg);
  line-height: 1.08;
}

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

.footer-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-base);
  line-height: 1.35;
}

.footer-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  align-content: start;
}

.footer-bullets li {
  position: relative;
  padding-left: 16px;
  color: var(--ink-soft);
  font-size: var(--text-base);
  line-height: 1.35;
}

.footer-bullets li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 8px;
  height: 1px;
  background: var(--rule-strong);
}

/* Your America - selector screen */
.ya-selector {
  display: block;
}

.ya-selector-head {
  display: flex;
  max-width: none;
  margin: 0 0 24px;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.ya-selector-head .kicker {
  margin: 0 0 12px;
  font-size: var(--text-xs);
}

.ya-selector-headline {
  font-size: var(--text-section-title);
  line-height: 1.06;
}

.ya-selector-sub {
  max-width: 600px;
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-base);
  line-height: 1.4;
}

.source-inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0 0;
  padding: 8px 12px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.source-inline-passive {
  margin: 0;
}

.source-inline-button:hover,
.source-inline-button:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.source-hover-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  z-index: 4;
}

.source-hover-card {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 48px));
  padding: 12px;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 14px 40px rgba(34, 28, 19, 0.18);
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  text-align: left;
  text-transform: none;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
  visibility: hidden;
}

.source-hover-wrap:hover .source-hover-card,
.source-hover-wrap:focus-within .source-hover-card,
.ya-card:hover .source-hover-card,
.ya-card:focus-visible .source-hover-card {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.source-hover-title,
.source-hover-footer {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.25;
  text-transform: uppercase;
}

.source-hover-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  color: var(--ink-soft);
  font-size: var(--text-xs);
  line-height: 1.28;
}

.source-hover-row b {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.source-hover-footer {
  padding-top: 4px;
  border-top: 1px solid var(--rule);
}

.ya-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.ya-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-content: start;
  align-items: start;
  min-height: 150px;
  padding: 22px 22px 24px;
  border: 0;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.ya-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 250, 244, 0.48), transparent 16%),
    linear-gradient(135deg, rgba(34, 28, 19, 0.025), transparent 58%);
  opacity: 0.72;
  pointer-events: none;
}

.ya-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--rule-strong);
  transition: width 200ms ease;
}

.ya-card-mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 70px;
  height: 62px;
  background: transparent;
}

.ya-card-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 56px;
  max-height: 56px;
  object-fit: contain;
  filter: saturate(0.95);
  opacity: 0.94;
}

.ya-mark-crypto-reform .ya-card-logo {
  max-width: 50px;
  max-height: 50px;
}

.ya-mark-immigration-package .ya-card-logo,
.ya-mark-third-term-tail-risk .ya-card-logo {
  max-width: 52px;
  max-height: 52px;
}

.ya-mark-avoid-shutdown .ya-card-logo {
  max-width: 58px;
  max-height: 58px;
}

.ya-mark-markets-up .ya-card-logo {
  max-width: 68px;
  max-height: 32px;
}

.ya-mark-avoid-oil-shock .ya-card-logo {
  max-width: 64px;
  max-height: 52px;
}

.ya-card-name {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 360;
  line-height: 1.06;
}

.ya-card-blurb {
  color: var(--ink-muted);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.ya-card:hover {
  background: var(--ink);
  color: var(--paper);
}

.ya-card:hover .ya-card-mark {
  background: transparent;
}

.ya-card:hover .ya-card-logo {
  filter: saturate(1.04);
  opacity: 1;
}

.ya-card:hover .ya-card-blurb {
  color: rgba(251, 239, 229, 0.72);
}

.ya-card:hover .source-inline-passive,
.ya-card:focus-visible .source-inline-passive {
  border-color: rgba(251, 239, 229, 0.56);
  color: var(--paper);
}

.ya-card:hover::after {
  width: 8px;
  background: var(--paper);
}

.ya-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

@media (max-width: 640px) {
  .ya-card-grid {
    grid-template-columns: 1fr;
  }

  .ya-card {
    min-height: 0;
    grid-template-columns: auto minmax(0, 1fr);
  }
}

/* Your America - reveal screen */
.ya-reveal {
  display: block;
}

.reveal-back {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.reveal-toolbar {
  display: flex;
  max-width: 1000px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 24px;
}

.reveal-back:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.reveal-back:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.reveal-empty {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-base);
}

.reveal-beat {
  max-width: 900px;
  margin: 0 0 24px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .55s ease, transform .55s ease;
}

.reveal-beat.in {
  opacity: 1;
  transform: none;
}

.reveal-beat:last-child {
  margin-bottom: 0;
}

.reveal-kicker {
  margin: 0 0 10px;
  font-size: var(--text-xs);
}

.reveal-stake {
  max-width: 760px;
  font-size: var(--text-2xl);
  line-height: 1.04;
}

.reveal-headline-row {
  display: flex;
  max-width: 1000px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.reveal-sweep-beat {
  max-width: 1000px;
}

.reveal-today-row {
  display: grid;
  min-width: 210px;
  justify-items: end;
  gap: 5px;
  padding: 0 0 0 18px;
  border: 1px solid var(--rule-strong);
  border-width: 0 0 0 1px;
  background: transparent;
  text-align: right;
}

.reveal-today-label {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.reveal-today-row .source-inline-button {
  margin: 0;
}

.reveal-current {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 360;
  line-height: 1;
  color: var(--ink);
}

.reveal-current-gloss {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-lg);
  line-height: 1.35;
}

.reveal-pct-sign {
  margin-left: 0.06em;
  font-size: 0.42em;
  vertical-align: 0.2em;
}

.reveal-faces {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0;
}

.face {
  position: relative;
  overflow: hidden;
  min-height: 206px;
  padding: 22px 22px 26px;
  color: var(--paper);
}

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

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

.face-fill {
  position: absolute;
  inset: auto 0 0 0;
  height: var(--fill, 0%);
  background: rgba(251, 239, 229, 0.16);
  pointer-events: none;
  transition: height 1.3s ease;
}

.face-body {
  position: relative;
  display: grid;
  gap: 6px;
  justify-items: start;
}

.face-logo {
  width: 38px;
  height: 38px;
  margin-bottom: 4px;
  object-fit: contain;
  /* Render the colored party SVGs as white silhouettes so they read on the
     saturated face background. */
  filter: brightness(0) invert(1);
}

.face-party {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-base);
  line-height: 1.22;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(251, 239, 229, 0.92);
}

.face-pct {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 360;
  line-height: 1;
}

.face-sub {
  margin: 2px 0 0;
  font-size: var(--text-sm);
  color: rgba(251, 239, 229, 0.78);
}

.reveal-verdict {
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  line-height: 1.4;
  color: var(--ink);
}

.reveal-verdict .r {
  color: var(--red);
}

.reveal-verdict .b {
  color: var(--blue);
}

.reveal-verdict .g {
  color: var(--gold);
}

.reveal-twist {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  line-height: 1.45;
  color: var(--ink-soft);
}

.reveal-share-headline {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 420;
  line-height: 1.22;
  color: var(--ink);
}

.reveal-share-sub {
  margin: 0 0 18px;
  color: var(--ink-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.friend-shares {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.friend-share {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  text-align: left;
}

.friend-share-red {
  border-color: var(--red-soft);
  background: color-mix(in srgb, var(--red) 8%, var(--paper));
  color: var(--red);
}

.friend-share-blue {
  border-color: var(--blue-soft);
  background: color-mix(in srgb, var(--blue) 8%, var(--paper));
  color: var(--blue);
}

.friend-taunt {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.4;
}

.friend-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0;
  opacity: 0.78;
}

.friend-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.friend-actions .share-icon {
  border-color: currentColor;
  background: transparent;
  color: inherit;
}

.friend-actions .share-icon:hover,
.friend-actions .share-icon:focus-visible {
  background: currentColor;
}

.friend-share-red .friend-actions .share-icon:hover,
.friend-share-red .friend-actions .share-icon:focus-visible {
  color: var(--paper);
  background: var(--red);
}

.friend-share-blue .friend-actions .share-icon:hover,
.friend-share-blue .friend-actions .share-icon:focus-visible {
  color: var(--paper);
  background: var(--blue);
}

.reveal-modelnote {
  max-width: 640px;
  margin: 12px 0 0;
  color: var(--ink-muted);
  font-size: var(--text-xs);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .ya-selector-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ya-selector-actions,
  .reveal-toolbar-actions {
    justify-content: flex-start;
  }

  .scenario-surface-toggle {
    max-width: 100%;
  }

  .scenario-surface-button {
    padding-inline: 8px;
  }

  .reveal-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .reveal-headline-row {
    display: grid;
  }

  .reveal-today-row {
    min-width: 0;
    width: 100%;
    justify-items: start;
    padding: 12px 0 0;
    border-width: 1px 0 0;
    text-align: left;
  }

  .reveal-faces {
    grid-template-columns: 1fr;
  }

  .face {
    min-height: 0;
  }

  body.outcome-share-view .shell {
    padding-top: 10px;
    max-width: 100%;
    overflow-x: hidden;
  }

  body.outcome-share-view {
    overflow-x: hidden;
  }

  body.outcome-share-view .masthead {
    padding-bottom: 8px;
  }

  body.outcome-share-view .brand {
    font-size: 36px;
  }

  body.outcome-share-view .brand-party-logo {
    width: 28px;
    height: 28px;
  }

  body.outcome-share-view .brand-partisan {
    gap: 10px;
  }

  body.outcome-share-view .product-tabs {
    display: none;
  }

  body.outcome-share-view .tab-panel {
    padding-top: 18px;
  }

  body.outcome-share-view .reveal-toolbar {
    display: none;
  }

  body.outcome-share-view .reveal-stake {
    font-size: clamp(36px, 11vw, 44px);
    line-height: 1.02;
  }

  body.outcome-share-view .reveal-today-row {
    display: flex;
    width: 100%;
    align-items: baseline;
    gap: 10px;
    padding-top: 8px;
  }

  body.outcome-share-view .reveal-current {
    font-size: 34px;
  }

  body.outcome-share-view .reveal-today-row .source-inline-button {
    margin-left: auto;
  }

  body.outcome-share-view .reveal-faces {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  body.outcome-share-view .face {
    min-height: 112px;
    padding: 12px;
  }

  body.outcome-share-view .face-logo {
    display: none;
  }

  body.outcome-share-view .face-party {
    font-size: 11px;
    line-height: 1.15;
  }

  body.outcome-share-view .face-pct {
    font-size: 42px;
  }

  body.outcome-share-view .reveal-verdict,
  body.outcome-share-view .reveal-twist {
    font-size: var(--text-base);
  }

  body.outcome-share-view .friend-share,
  body.outcome-share-view .friend-taunt {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

.market-comparisons-section {
  margin-top: 0;
  padding-top: 26px;
  border-top: 0;
}

.market-comparison-cards {
  display: block;
  min-width: 0;
}

.mp-focus-card {
  min-width: 0;
}

.pm-comparison-panel {
  margin: 0 24px 24px;
  padding: 18px 18px 16px;
  border: 1px solid var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.66), rgba(255, 250, 244, 0.38)),
    var(--paper-2);
}

.pm-blend-table-wrap {
  margin-top: 1rem;
  border-top: 1px solid var(--rule-strong);
  overflow-x: auto;
}

.congress-blend-panel {
  margin-top: 8px;
  padding-top: 0;
}

.congress-blend-panel .pm-blend-table-wrap {
  margin-top: 0;
  border-top: 0;
}

.pm-blend-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.pm-blend-table th,
.pm-blend-table td {
  border-bottom: 1px solid var(--rule);
  padding: 0.74rem 0;
  vertical-align: middle;
}

.pm-blend-table thead th {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-align: left;
  text-transform: uppercase;
}

.pm-blend-table thead th:last-child,
.pm-blend-table td {
  text-align: right;
}

.pm-blend-table tbody th {
  width: 72%;
  padding-right: 1.25rem;
  text-align: left;
}

.pm-blend-table tbody th span {
  display: block;
  color: var(--ink);
  font-family: var(--font-clean-display);
  font-size: var(--text-base);
  font-weight: 440;
  line-height: 1.08;
}

.pm-blend-table tbody th em {
  display: block;
  margin-top: 0.22rem;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: 400;
  line-height: 1.28;
}

.pm-blend-table td strong {
  color: var(--ink);
  font-family: var(--font-clean-display);
  font-size: var(--text-lg);
  font-weight: 520;
  line-height: 1;
  white-space: nowrap;
}

.mp-card {
  min-width: 0;
  padding: 24px;
  background: rgba(255, 250, 244, 0.38);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mp-card-focus {
  min-height: 620px;
}

.mp-electability-unified-card {
  min-height: 0;
  padding: 24px;
  border: 1px solid var(--ink);
  background: rgba(255, 250, 244, 0.48);
  gap: 0;
}

.mp-electability-unified-table {
  border-top: 1px solid var(--ink);
}

.mp-electability-party-group {
  display: grid;
}

.mp-electability-party-label-row {
  min-height: 2.15rem;
  border-bottom: 1px solid var(--rule);
  background: rgba(34, 28, 19, 0.035);
}

.mp-electability-party-label {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

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

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

.mp-unified-electability-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mp-unified-electability-actions .source-hover-card {
  right: 0;
  left: auto;
}

.mp-unified-electability-actions .mp-source-button {
  padding: 0;
}

.mp-card-congress-control {
  min-height: 0;
}

.mp-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.mp-headline {
  margin: 0;
  font-family: var(--font-clean-display);
  font-size: var(--text-lg);
  font-weight: 420;
  line-height: 1.25;
}

.mp-takeaway {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--ink-soft);
}

.mp-takeaway-lede {
  max-width: 760px;
  padding-bottom: 0.2rem;
}

.mp-chart { width: 100%; height: auto; }
.mp-drill { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.mp-drill-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.mp-drill-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mp-drill-chip {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.mp-drill-chip:hover { background: var(--ink); color: var(--paper); }
.mp-drill-chip:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.mp-dumbbell {
  --mp-name-column: 8.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.mp-dumbbell-electability {
  --mp-name-column: 12.5rem;
  --mp-divider-left: calc(var(--mp-name-column) + 1.1rem + 26%);
  position: relative;
}
.mp-dumbbell-electability::after {
  content: "";
  position: absolute;
  top: 2.05rem;
  bottom: 1.55rem;
  left: var(--mp-divider-left);
  border-left: 1px dashed color-mix(in srgb, var(--ink-muted) 32%, transparent);
  transform: translateX(-0.5px);
  z-index: 2;
  pointer-events: none;
}
.mp-dumbbell-legend {
  display: flex; flex-wrap: wrap; gap: 1rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs); letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}
.mp-dot { display: inline-block; width: 0.62rem; height: 0.62rem; border-radius: 50%; }
.mp-dumbbell-legend .mp-dot { margin-right: 0.35rem; vertical-align: middle; }
.mp-dot-nominee { background: var(--ink); }
.mp-dot-elect { background: var(--red); }
.mp-dumbbell-key {
  display: grid;
  grid-template-columns: var(--mp-name-column) minmax(220px, 1fr);
  gap: 1.1rem;
  align-items: center;
  margin-bottom: 0.3rem;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.2;
}
.mp-dumbbell-key-track {
  display: grid;
  grid-template-columns: max-content max-content;
  justify-content: space-between;
  gap: 0.55rem 1.5rem;
  align-items: center;
}
.mp-dumbbell-key-track span {
  display: inline-flex;
  gap: 0.35rem;
  align-items: flex-start;
  min-width: 0;
}
.mp-dumbbell-key-track span:last-child {
  justify-self: start;
  justify-content: flex-start;
  text-align: left;
}
.mp-dumbbell-key .mp-dot {
  flex: 0 0 auto;
  width: 0.84rem;
  height: 0.84rem;
  margin-top: 0.08em;
}
.mp-dumbbell-key b { color: var(--ink); font-weight: 700; }
.mp-reference-lines {
  display: grid;
  grid-template-columns: var(--mp-name-column) minmax(220px, 1fr);
  gap: 1.1rem;
  align-items: start;
  min-height: 2rem;
  margin: 0.1rem 0 0.15rem;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}
.mp-reference-label {
  justify-self: end;
  padding-top: 0.18rem;
  color: var(--ink-muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}
.mp-reference-track {
  position: relative;
  display: block;
  min-height: 2rem;
}
.mp-reference-tick {
  position: absolute;
  top: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  max-width: 12rem;
  text-align: center;
  white-space: normal;
  transform: translateX(-50%);
  line-height: 1.1;
}
.mp-reference-tick i {
  width: 1px;
  height: 0.8rem;
  background: color-mix(in srgb, var(--ink-muted) 68%, transparent);
}
.mp-reference-caption {
  display: inline-flex;
  gap: 0.32rem;
  align-items: baseline;
  justify-content: center;
  min-width: max-content;
}
.mp-reference-caption b {
  color: var(--ink);
  font-weight: 700;
}
.mp-reference-caption em {
  color: var(--red);
  font-style: normal;
  font-weight: 700;
}
.mp-dumbbell-scale {
  display: grid;
  grid-template-columns: var(--mp-name-column) minmax(220px, 1fr);
  gap: 1.1rem;
  align-items: center;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}
.mp-scale-track {
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--rule);
}
.mp-scale-track i {
  font-style: normal;
}
.mp-baseline-chart {
  --mp-name-column: 12.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.mp-baseline-scale {
  display: grid;
  grid-template-columns: var(--mp-name-column) minmax(220px, 1fr);
  gap: 1.1rem;
  align-items: center;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}
.mp-baseline-scale-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.8rem;
  align-items: center;
}
.mp-baseline-scale-label {
  display: inline-flex;
  position: relative;
  align-items: center;
  gap: 0.35rem;
  justify-self: end;
  color: var(--ink-soft);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}
.mp-baseline-explainer {
  position: relative;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0;
  text-transform: none;
}
.mp-explainer-button {
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--ink-muted) 64%, transparent);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: help;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  line-height: 1;
}
.mp-explainer-tooltip {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  z-index: 30;
  width: min(22rem, calc(100vw - 48px));
  padding: 0.7rem 0.78rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 14px 40px rgba(34, 28, 19, 0.18);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(var(--mp-explainer-shift-x, 0), -4px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
  visibility: hidden;
  white-space: normal;
}
.mp-baseline-explainer:hover .mp-explainer-tooltip,
.mp-baseline-explainer:focus-within .mp-explainer-tooltip {
  opacity: 1;
  transform: translate(var(--mp-explainer-shift-x, 0), 0);
  visibility: visible;
}
.mp-explainer-button:hover,
.mp-explainer-button:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.mp-baseline-scale-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.32rem;
  border-bottom: 1px solid var(--rule);
}
.mp-baseline-scale-track::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.35rem;
  height: 0.85rem;
  border-left: 1px dashed color-mix(in srgb, var(--ink-muted) 48%, transparent);
}
.mp-baseline-scale-track i {
  font-style: normal;
}
.mp-baseline-scale-track i:nth-child(2) {
  color: var(--ink);
  font-weight: 700;
}
.mp-baseline-compare-button {
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0.28rem 0.52rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.mp-baseline-compare-button:hover,
.mp-baseline-compare-button:focus-visible {
  background: var(--ink);
  color: var(--paper);
}
.mp-electability-table-wrap {
  display: grid;
}
.mp-electability-table-toolbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}
.mp-electability-table-note {
  margin: 0;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.45;
}
.mp-exchange-table-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.66rem 0.78rem;
  border: 1px solid var(--rule-strong);
  background: rgba(255, 250, 244, 0.5);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.25;
  text-transform: uppercase;
}
.mp-exchange-table-note > span:first-child {
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}
.mp-electability-table {
  display: grid;
  border-top: 1px solid var(--ink);
}
.mp-electability-row {
  display: grid;
  grid-template-columns: minmax(12.5rem, 0.92fr) minmax(8.5rem, 0.55fr) minmax(23rem, 1.45fr);
  align-items: center;
  gap: 1rem;
}
.mp-electability-head {
  min-height: 3.25rem;
  border-bottom: 1px solid var(--ink);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.2;
  text-transform: uppercase;
}
.mp-electability-head em {
  color: var(--ink);
  font-style: italic;
}
.mp-electability-head > span:nth-child(n + 2) {
  text-align: center;
}
.mp-column-short {
  display: none;
}
.mp-electability-body-row {
  min-height: 5.4rem;
  padding: 0.82rem 0.2rem;
  border-bottom: 1px solid var(--rule);
  cursor: default;
  text-align: left;
}
.mp-electability-body-row:hover {
  background: rgba(34, 28, 19, 0.04);
}
.mp-electability-body-row.mp-electability-candidate-democratic {
  background: color-mix(in srgb, var(--blue) 5%, var(--paper));
}
.mp-electability-body-row.mp-electability-candidate-republican {
  background: color-mix(in srgb, var(--red) 5%, var(--paper));
}
.mp-electability-body-row.mp-electability-candidate-democratic:hover {
  background: color-mix(in srgb, var(--blue) 9%, var(--paper));
}
.mp-electability-body-row.mp-electability-candidate-republican:hover {
  background: color-mix(in srgb, var(--red) 9%, var(--paper));
}
.mp-electability-body-row:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
.mp-electability-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.mp-electability-cell:last-child {
  justify-content: center;
}
.mp-electability-metric {
  position: relative;
  display: inline-grid;
  align-content: center;
  justify-items: center;
  width: max-content;
  min-width: 5.4rem;
  color: var(--ink);
}
.mp-electability-metric.has-tooltip {
  cursor: help;
}
.mp-electability-metric-election {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 0.28rem;
  width: 100%;
  min-width: 0;
}
.mp-electability-metric.has-tooltip:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}
.mp-exchange-primary {
  display: grid;
  align-items: end;
  justify-items: center;
  gap: 0.2rem;
  min-width: 0;
}
.mp-exchange-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-width: 0;
  max-width: 100%;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}
.mp-exchange-provider-kalshi {
  color: var(--kalshi-green);
}
.mp-exchange-provider-polymarket {
  color: var(--polymarket-blue);
}
.mp-exchange-provider .mp-provider-logo {
  width: 0.95rem;
  height: 0.95rem;
}
.mp-exchange-provider .mp-provider-letter {
  height: 0.95rem;
  font-size: 0.74rem;
}
.mp-electability-value {
  color: var(--ink);
  font-family: var(--font-clean-display);
  font-size: clamp(2.15rem, 4.8vw, 3.45rem);
  font-weight: 620;
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0;
  line-height: 0.9;
}
.mp-electability-metric-election .mp-electability-value {
  color: var(--red);
  justify-self: center;
}
.mp-exchange-secondary {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 0.18rem 0.5rem;
  min-width: 0;
  padding: 0.42rem 0.5rem;
  border: 1px solid color-mix(in srgb, var(--polymarket-blue) 34%, var(--rule));
  background: color-mix(in srgb, var(--polymarket-blue) 5%, transparent);
  color: var(--ink);
}
.mp-exchange-secondary .mp-exchange-provider {
  grid-column: 1 / -1;
}
.mp-exchange-secondary-value {
  color: var(--polymarket-blue);
  font-family: var(--font-clean-display);
  font-size: 1.42rem;
  font-weight: 640;
  line-height: 0.95;
  white-space: nowrap;
}
.mp-exchange-secondary.is-missing {
  border-color: var(--rule);
  background: transparent;
  color: var(--ink-muted);
}
.mp-exchange-secondary.is-missing .mp-exchange-secondary-value {
  color: var(--ink-muted);
}
.mp-exchange-gap {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 820;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.mp-exchange-gap.is-polymarket-higher {
  color: var(--polymarket-blue);
}
.mp-exchange-gap.is-kalshi-higher {
  color: var(--kalshi-green);
}
.mp-exchange-gap.is-even,
.mp-exchange-gap.is-missing {
  color: var(--ink-muted);
}
.mp-electability-spark {
  position: relative;
  display: block;
  width: min(10.8rem, 100%);
  height: 1rem;
  margin-top: 0.42rem;
}
.mp-electability-metric-election .mp-electability-spark {
  grid-row: 2;
  grid-column: 1;
  width: min(14rem, 100%);
  height: 1rem;
  margin-top: 0;
}
.mp-electability-metric-election .mp-electability-value {
  grid-row: 1;
  grid-column: 1;
}
.mp-electability-spark::before,
.mp-electability-spark-range {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
}
.mp-electability-spark::before {
  left: 0;
  right: 0;
  height: 1px;
  background: color-mix(in srgb, var(--ink-muted) 34%, transparent);
}
.mp-electability-spark-range {
  height: 2px;
  background: color-mix(in srgb, var(--red) 86%, var(--ink));
  z-index: 1;
}
.mp-electability-spark-end,
.mp-electability-spark-dot {
  position: absolute;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.mp-electability-spark-end {
  width: 0.42rem;
  height: 0.42rem;
  border: 1px solid var(--red);
  background: var(--paper);
  z-index: 2;
}
.mp-electability-spark-dot {
  width: 0.58rem;
  height: 0.58rem;
  background: var(--red);
  box-shadow: 0 0 0 2px var(--paper);
  z-index: 3;
}
.mp-electability-tooltip {
  position: absolute;
  display: none;
  left: 0;
  top: calc(100% + 0.42rem);
  z-index: 30;
  width: min(21rem, calc(100vw - 48px));
  padding: 0.65rem 0.72rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 14px 40px rgba(34, 28, 19, 0.18);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
  visibility: hidden;
  white-space: normal;
}
.mp-electability-cell:last-child .mp-electability-tooltip {
  right: 0;
  left: auto;
}
.mp-electability-metric:hover .mp-electability-tooltip,
.mp-electability-metric:focus .mp-electability-tooltip,
.mp-electability-metric:focus-within .mp-electability-tooltip {
  display: block;
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}
.mp-edge-layer-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.28rem;
  min-width: 0;
}
.mp-edge-layer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 1px solid var(--rule-strong);
  background: rgba(255, 250, 244, 0.36);
  color: var(--ink);
  cursor: pointer;
  padding: 0.27rem 0.46rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.mp-edge-layer-toggle span {
  flex: 0 0 auto;
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 50%;
  background: currentColor;
}
.mp-edge-layer-toggle-kalshi span {
  color: var(--kalshi-green);
}
.mp-edge-layer-toggle-polymarket span {
  color: var(--polymarket-blue);
}
.mp-edge-layer-toggle-blended span {
  color: var(--gold);
}
.mp-edge-layer-toggle[aria-pressed="false"] {
  background: transparent;
  color: var(--ink-muted);
  opacity: 0.62;
}
.mp-edge-layer-toggle[aria-pressed="false"] span {
  background: transparent;
  box-shadow: inset 0 0 0 1px currentColor;
}
.mp-edge-layer-toggle:hover,
.mp-edge-layer-toggle:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.mp-edge-layer-toggle:hover span,
.mp-edge-layer-toggle:focus-visible span {
  color: inherit;
  background: currentColor;
  box-shadow: none;
}
.mp-baseline-row {
  display: grid;
  grid-template-columns: var(--mp-name-column) minmax(220px, 1fr);
  align-items: center;
  gap: 1rem;
  font: inherit;
  background: transparent;
  border: none;
  border-top: 1px solid var(--rule);
  min-height: 6.25rem;
  padding: 0.86rem 0.2rem;
  cursor: pointer;
  text-align: left;
}
.mp-baseline-row:hover { background: rgba(34, 28, 19, 0.05); }
.mp-baseline-row:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.mp-baseline-body {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}
.mp-baseline-plot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.4rem;
  gap: 0.95rem;
  align-items: center;
  min-width: 0;
}
.mp-baseline-track {
  --mp-edge-kalshi-y: 3.68rem;
  --mp-edge-polymarket-y: 1.02rem;
  --mp-edge-blended-y: 2.35rem;
  position: relative;
  display: block;
  min-width: 0;
  height: 5.15rem;
}
.mp-baseline-center {
  position: absolute;
  top: 0.28rem;
  bottom: 1.05rem;
  left: 50%;
  border-left: 1px dashed color-mix(in srgb, var(--ink-muted) 34%, transparent);
  transform: translateX(-0.5px);
  z-index: 1;
}
.mp-baseline-bar,
.mp-baseline-layer-bar {
  position: absolute;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  z-index: 2;
}
.mp-baseline-layer-bar-kalshi { top: var(--mp-edge-kalshi-y); }
.mp-baseline-layer-bar-polymarket { top: var(--mp-edge-polymarket-y); }
.mp-baseline-layer-bar-blended { top: var(--mp-edge-blended-y); }
.mp-baseline-interval {
  position: absolute;
  top: 50%;
  height: 0.62rem;
  transform: translateY(-50%);
  background: rgba(140, 42, 42, 0.12);
  border-left: 1px solid color-mix(in srgb, var(--red) 70%, var(--paper));
  border-right: 1px solid color-mix(in srgb, var(--red) 70%, var(--paper));
  z-index: 1;
}
.mp-baseline-layer-interval {
  position: absolute;
  height: 0.54rem;
  transform: translateY(-50%);
  z-index: 1;
}
.mp-baseline-layer-interval-kalshi {
  top: var(--mp-edge-kalshi-y);
  background: color-mix(in srgb, var(--kalshi-green) 13%, transparent);
  border-left: 1px solid color-mix(in srgb, var(--kalshi-green) 54%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--kalshi-green) 54%, transparent);
}
.mp-baseline-layer-interval-polymarket {
  top: var(--mp-edge-polymarket-y);
  background: color-mix(in srgb, var(--polymarket-blue) 13%, transparent);
  border-left: 1px solid color-mix(in srgb, var(--polymarket-blue) 54%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--polymarket-blue) 54%, transparent);
}
.mp-baseline-layer-interval-blended {
  top: var(--mp-edge-blended-y);
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  border-left: 1px solid color-mix(in srgb, var(--gold) 62%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--gold) 62%, transparent);
}
.mp-baseline-bar.positive { background: color-mix(in srgb, var(--red) 75%, var(--ink)); }
.mp-baseline-bar.negative { background: color-mix(in srgb, var(--ink) 72%, transparent); }
.mp-baseline-layer-bar.positive { background: color-mix(in srgb, var(--red) 75%, var(--ink)); }
.mp-baseline-layer-bar.negative { background: color-mix(in srgb, var(--ink) 72%, transparent); }
.mp-baseline-layer-bar-kalshi.positive,
.mp-baseline-layer-bar-kalshi.negative {
  background: var(--kalshi-green);
}
.mp-baseline-layer-bar-polymarket.positive,
.mp-baseline-layer-bar-polymarket.negative {
  background: var(--polymarket-blue);
}
.mp-baseline-layer-bar-blended.positive,
.mp-baseline-layer-bar-blended.negative {
  background: var(--gold);
}
.mp-baseline-dot {
  position: absolute;
  width: 0.92rem;
  height: 0.92rem;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}
.mp-baseline-dot.positive { background: var(--red); }
.mp-baseline-dot.negative { background: var(--ink); }
.mp-baseline-dot.mp-baseline-dot-kalshi {
  top: var(--mp-edge-kalshi-y);
  background: var(--kalshi-green);
  border: 2px solid var(--paper);
}
.mp-baseline-dot.mp-baseline-dot-polymarket {
  top: var(--mp-edge-polymarket-y);
  background: var(--polymarket-blue);
  border: 2px solid var(--paper);
}
.mp-baseline-dot.mp-baseline-dot-blended {
  top: var(--mp-edge-blended-y);
  width: 0.78rem;
  height: 0.78rem;
  background: var(--gold);
  border: 2px solid var(--paper);
}
.mp-baseline-dot.at-start { transform: translate(0, -50%); }
.mp-baseline-dot.at-end { transform: translate(-100%, -50%); }
.mp-baseline-edge-label {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 0.04rem 0.36rem;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 720;
  line-height: 1.08;
  pointer-events: none;
  white-space: nowrap;
}
.mp-baseline-edge-label-kalshi {
  top: var(--mp-edge-kalshi-y);
  color: var(--kalshi-green);
}
.mp-baseline-edge-label-polymarket {
  top: var(--mp-edge-polymarket-y);
  color: var(--polymarket-blue);
}
.mp-baseline-edge-label-blended {
  top: var(--mp-edge-blended-y);
  color: var(--gold);
}
.mp-baseline-edge-label.after {
  transform: translate(0.66rem, -50%);
}
.mp-baseline-edge-label.before {
  transform: translate(calc(-100% - 0.66rem), -50%);
}
.mp-baseline-edge-label.at-start {
  transform: translate(0.66rem, -50%);
}
.mp-baseline-edge-label.at-end {
  transform: translate(calc(-100% - 0.66rem), -50%);
}
.mp-baseline-nominees {
  display: grid;
  gap: 0.38rem;
  align-self: center;
  min-width: 0;
  padding-left: 0.82rem;
  border-left: 1px solid var(--rule);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.08;
}
.mp-baseline-nominee {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: baseline;
  min-width: 0;
}
.mp-baseline-nominee b {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}
.mp-provider-logo {
  display: block;
  max-width: 100%;
  object-fit: contain;
}
.mp-provider-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 1.05rem;
  background: transparent;
  color: var(--kalshi-green);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}
.mp-provider-logo-polymarket {
  width: 1.12rem;
  height: 1.12rem;
}
.mp-baseline-nominee em {
  color: var(--ink);
  font-style: normal;
  font-weight: 720;
  white-space: nowrap;
}
.mp-baseline-nominee-kalshi b {
  color: var(--kalshi-green);
}
.mp-baseline-nominee-polymarket b {
  color: var(--polymarket-blue);
}
.mp-baseline-delta {
  position: absolute;
  top: calc(50% + 0.7rem);
  transform: translateX(-50%);
  z-index: 4;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1;
  white-space: nowrap;
}
.mp-baseline-delta.at-start { transform: translateX(0); }
.mp-baseline-delta.at-end { transform: translateX(-100%); }
.mp-baseline-delta b {
  display: inline-block;
  padding: 0.16rem 0;
  background: transparent;
  color: var(--ink);
}
.mp-baseline-delta.positive b { color: var(--red); }
.mp-baseline-meta {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.2;
}
.mp-dumbbell-row {
  display: grid;
  grid-template-columns: var(--mp-name-column) minmax(220px, 1fr);
  align-items: center;
  gap: 1.1rem;
  font: inherit;
  background: transparent;
  border: none;
  border-top: 1px solid var(--rule);
  min-height: 5.9rem;
  padding: 0.95rem 0.2rem;
  cursor: pointer;
  text-align: left;
}
.mp-dumbbell-row:hover { background: rgba(34, 28, 19, 0.05); }
.mp-dumbbell-row:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.mp-dumbbell-name {
  display: grid;
  gap: 0.15rem;
  font-family: var(--font-clean-display);
  font-size: var(--text-lg);
  line-height: 1.05;
  min-width: 0;
}
.mp-dumbbell-name-photo {
  grid-template-columns: 3.6rem minmax(0, 1fr);
  align-items: center;
  gap: 0.72rem;
}
.mp-candidate-photo {
  width: 3.6rem;
  height: 3.6rem;
  display: block;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 8px;
  background: var(--paper-2);
  box-shadow: 0 10px 24px rgba(34, 28, 19, 0.16);
  object-fit: cover;
}
.mp-dumbbell-name-text {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}
.mp-dumbbell-name-text > span {
  overflow-wrap: anywhere;
}
.mp-candidate-name-compact {
  display: none;
}
.mp-dumbbell-name-meta {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.15;
}
.mp-dumbbell-track {
  position: relative;
  display: block;
  height: 4.5rem;
}
.mp-dumbbell-bar {
  position: absolute; top: 50%; transform: translateY(-50%);
  height: 2px; background: var(--rule-strong);
  z-index: 1;
}
.mp-interval {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 0.7rem;
  background: rgba(140, 42, 42, 0.14);
  border-left: 1px solid var(--red);
  border-right: 1px solid var(--red);
  z-index: 1;
}
.mp-interval-left {
  background: rgba(34, 28, 19, 0.1);
  border-left-color: var(--ink);
  border-right-color: var(--ink);
}
.mp-interval-right {
  background: rgba(140, 42, 42, 0.14);
  border-left-color: var(--red);
  border-right-color: var(--red);
}
.mp-dumbbell-track .mp-dot {
  position: absolute; top: 50%;
  transform: translate(-50%, -50%);
  width: 0.84rem; height: 0.84rem;
  z-index: 3;
}
.mp-dumbbell-values {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.35;
  text-align: left;
  color: var(--ink-soft);
  display: grid;
  gap: 0.35rem;
}
.mp-dumbbell-values-pair {
  display: grid;
  gap: 0.35rem;
}

.mp-dumbbell-values span {
  display: grid;
  grid-template-columns: 0.8rem minmax(0, 1fr) auto;
  gap: 0.35rem;
  align-items: center;
}

.mp-dumbbell-values .mp-dot {
  width: 0.55rem;
  height: 0.55rem;
}

.mp-dumbbell-values b {
  color: var(--ink);
  font-size: var(--text-sm);
}

.mp-dumbbell-values-pair b:first-child { color: var(--ink); }
.mp-dumbbell-values-pair b:last-child { color: var(--red); }

.mp-point-label {
  position: absolute;
  z-index: 4;
  max-width: 15rem;
  padding: 0.2rem 0.32rem;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.15;
  pointer-events: none;
  white-space: nowrap;
  transform: translateX(-50%);
}

.mp-point-label.top { top: 0; }
.mp-point-label.bottom { bottom: 0; }
.mp-point-label.at-start { left: 0 !important; transform: none; }
.mp-point-label.at-end { left: auto !important; right: 0; transform: none; }
.mp-point-label b { color: var(--ink); }
.mp-point-label-nominee { border-left: 3px solid var(--ink); }
.mp-point-label-elect { border-left: 3px solid var(--red); }
.mp-point-label-value {
  border-left: 0;
  padding-inline: 0.25rem;
  text-align: center;
}
.mp-point-label-value.mp-point-label-nominee,
.mp-point-label-value.mp-point-label-elect {
  border-left: 0;
}

.mp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem 0.8rem;
  flex: 0 0 auto;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.35;
}

.mp-meta .source-hover-card {
  left: auto;
  right: 0;
}

.mp-method-button,
.mp-source-button {
  flex: 0 0 auto;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-family: var(--font-ui);
  padding: 0.35rem 0.55rem;
}

.mp-method-button {
  position: relative;
}

.mp-method-tooltip {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 5;
  width: min(24rem, calc(100vw - 4rem));
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(34, 28, 19, 0.16);
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-transform: none;
  transition: opacity 120ms ease;
  visibility: hidden;
}

.mp-method-button:hover .mp-method-tooltip,
.mp-method-button:focus .mp-method-tooltip,
.mp-method-button:focus-visible .mp-method-tooltip {
  opacity: 1;
  visibility: visible;
}

.mp-method-button:hover,
.mp-method-button:focus-visible,
.mp-source-button:hover,
.mp-source-button:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.mp-grid {
  display: grid;
  grid-template-columns: 7rem 1fr 1fr;
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
}
.mp-grid > * { background: var(--paper); padding: 0.78rem 0.8rem; }
.mp-grid-colhead, .mp-grid-rowhead {
  font-family: var(--font-mono);
  font-size: var(--text-xs); letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 0.45rem;
}
.mp-grid-colhead { justify-content: center; }
.mp-grid-cell {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 154px;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.mp-grid-cell strong {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 360;
  line-height: 0.95;
}
.mp-grid-cell span {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: var(--text-xs); color: var(--ink-soft);
}

.mp-grid-rr {
  background:
    linear-gradient(135deg, rgba(140, 42, 42, 0.26), rgba(140, 42, 42, 0.08)),
    var(--paper);
  color: var(--red);
}

.mp-grid-dd {
  background:
    linear-gradient(135deg, rgba(29, 60, 94, 0.26), rgba(29, 60, 94, 0.08)),
    var(--paper);
  color: var(--blue);
}

.mp-grid-rd,
.mp-grid-dr {
  background:
    linear-gradient(135deg, rgba(140, 42, 42, 0.18) 0 49%, rgba(255, 250, 244, 0.72) 49% 51%, rgba(29, 60, 94, 0.18) 51%),
    var(--paper);
}

.mp-grid-note {
  margin: 0.75rem 0 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.35;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.party-mini-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* (Legacy comparison grid styles below retained for back-compat only.) */
.comparison-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.55fr) repeat(3, minmax(150px, 0.55fr));
  border-left: 1px solid var(--ink);
  border-top: 1px solid var(--ink);
  background: var(--paper-2);
}

.comparison-grid.custom-enabled {
  grid-template-columns: minmax(360px, 1.55fr) repeat(4, minmax(132px, 0.55fr));
}

.comparison-header {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.comparison-header img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.comparison-header.republican {
  justify-content: flex-end;
  background: rgba(140, 42, 42, 0.18);
  color: var(--red);
}

.comparison-header.current {
  justify-content: center;
  background:
    linear-gradient(90deg, rgba(29, 60, 94, 0.09), rgba(168, 118, 35, 0.12) 50%, rgba(140, 42, 42, 0.08));
  color: var(--ink);
}

.comparison-header.democratic {
  justify-content: flex-start;
  background: rgba(29, 60, 94, 0.2);
  color: var(--blue);
}

.comparison-header.custom {
  display: grid;
  justify-items: center;
  align-content: center;
  background: var(--custom-column-bg, rgba(168, 118, 35, 0.15));
  color: var(--custom-column-text, var(--ink));
  text-align: center;
  box-shadow: inset 0 -4px 0 var(--custom-column-accent, rgba(168, 118, 35, 0.56));
}

.comparison-header.custom strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 420;
  text-transform: none;
}

.comparison-rows {
  grid-column: 1 / -1;
  display: grid;
}

.comparison-row {
  display: grid;
  grid-template-columns: minmax(360px, 1.55fr) repeat(3, minmax(150px, 0.55fr));
  min-height: 108px;
}

.comparison-row.custom-enabled {
  grid-template-columns: minmax(360px, 1.55fr) repeat(4, minmax(132px, 0.55fr));
}

.comparison-row > * {
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.comparison-row button:hover {
  background-color: rgba(255, 250, 244, 0.58);
}

.comparison-question,
.comparison-prob {
  border-top: 0;
  border-left: 0;
  background: transparent;
  color: inherit;
}

.comparison-question {
  padding: 14px 16px;
  text-align: left;
}

.comparison-question span {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-muted);
  text-transform: uppercase;
}

.comparison-question strong {
  display: block;
  font-family: var(--font-clean-display);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.28;
}

.comparison-prob {
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
}

.comparison-prob span {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 420;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.comparison-prob b {
  font-size: var(--text-base);
  color: var(--ink-muted);
  font-weight: 400;
}

.comparison-prob.republican {
  background:
    linear-gradient(90deg, rgba(140, 42, 42, 0.16), rgba(140, 42, 42, 0.05));
  color: var(--red);
}

.comparison-prob.republican b {
  color: rgba(140, 42, 42, 0.7);
}

.comparison-prob.democratic {
  background:
    linear-gradient(90deg, rgba(29, 60, 94, 0.04), rgba(29, 60, 94, 0.17));
  color: var(--blue);
}

.comparison-prob.democratic b {
  color: rgba(29, 60, 94, 0.7);
}

.current-prob {
  gap: 3px;
  background: var(--cell-bg, var(--white));
  color: var(--cell-text, var(--ink));
  box-shadow: inset 0 -4px 0 var(--cell-accent, transparent);
}

.current-prob b {
  color: color-mix(in srgb, var(--cell-text, var(--ink)) 58%, var(--ink-muted));
}

.custom-prob {
  gap: 4px;
  background: var(--cell-bg, rgba(168, 118, 35, 0.13));
  color: var(--cell-text, var(--ink));
  box-shadow: inset 0 -4px 0 var(--cell-accent, rgba(168, 118, 35, 0.56));
}

.custom-prob em {
  color: color-mix(in srgb, var(--cell-text, var(--ink)) 68%, var(--ink-muted));
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-style: normal;
}

.two-worlds {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: rgba(255, 250, 244, 0.48);
}

.world {
  min-height: 410px;
  padding: 24px 28px;
}

.world-red {
  border-left: 4px solid var(--red);
  background:
    linear-gradient(90deg, rgba(140, 42, 42, 0.12), rgba(140, 42, 42, 0.03) 58%, transparent);
}

.world-blue {
  border-right: 4px solid var(--blue);
  background:
    linear-gradient(270deg, rgba(29, 60, 94, 0.13), rgba(29, 60, 94, 0.035) 58%, transparent);
}

.world-head {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.world-head span,
.world-row .label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

.world-head strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 420;
}

.party-mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  flex: 0 0 auto;
}

.party-mark-red {
  color: var(--red);
  box-shadow: inset 0 0 0 5px rgba(140, 42, 42, 0.1);
}

.party-mark-blue {
  color: var(--blue);
  box-shadow: inset 0 0 0 5px rgba(29, 60, 94, 0.1);
}

.world-spine {
  display: grid;
  place-items: center;
  border-left: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: var(--text-lg);
}

.world-body {
  display: grid;
  gap: 0;
  padding-top: 18px;
}

.world-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: inherit;
  text-align: left;
}

.world-row:hover .name,
.target-row:hover h3,
.spark-card:hover .spark-label {
  color: var(--red);
}

.world-row .label {
  display: block;
  margin-bottom: 4px;
}

.world-row .name {
  display: block;
  max-width: 56ch;
  line-height: 1.28;
}

.pct {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 420;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.unit {
  font-size: var(--text-base);
  color: var(--ink-muted);
}

.history-section,
.scenario-lab,
.wiring-section {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--ink);
}

.tab-panel > .wiring-section {
  margin-top: 0;
  border-top: 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 22px;
}

.section-head h1,
.section-head h2 {
  font-size: var(--text-section-title);
  line-height: 1.06;
}

.live-readout .section-head {
  align-items: flex-start;
  padding-top: 24px;
}

.section-note {
  max-width: 460px;
  margin: 0;
  color: var(--ink-soft);
}

.market-section-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.share-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.share-actions-page {
  flex-wrap: nowrap;
}

.share-icon {
  min-width: 36px;
  min-height: 34px;
  border: 1px solid var(--rule-strong);
  background: rgba(255, 250, 244, 0.34);
  color: var(--ink);
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1;
  text-transform: uppercase;
}

.share-icon:hover,
.share-icon:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.share-icon-x {
  min-width: 34px;
  font-weight: 600;
}

.compact-action-button,
.mp-unified-electability-actions .compact-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  background: rgba(255, 250, 244, 0.34);
  color: var(--ink);
  line-height: 1;
}

.compact-action-button:hover,
.compact-action-button:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.compact-action-icon {
  display: block;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 820px), (pointer: coarse) {
  #marketShareActions .compact-action-button,
  .mp-unified-electability-actions .compact-action-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }
}

.share-icon-x .compact-action-icon {
  width: 14px;
  height: 14px;
  stroke: none;
}

.share-actions-selector,
.share-actions-reveal {
  flex: 0 0 auto;
}

.ya-selector-actions,
.reveal-toolbar-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.scenario-surface-toggle {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  background: rgba(255, 250, 244, 0.44);
}

.scenario-surface-button {
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink-soft);
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1;
  letter-spacing: 0;
}

.scenario-surface-button:last-child {
  border-right: 0;
}

.scenario-surface-button:hover,
.scenario-surface-button:focus-visible {
  background: var(--paper-3);
  color: var(--ink);
}

.scenario-surface-button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.scenario-surface-button[data-scenario-surface="kalshi"][aria-pressed="true"] {
  background: var(--kalshi-green);
  color: var(--ink);
}

.scenario-surface-button[data-scenario-surface="polymarket"][aria-pressed="true"] {
  background: var(--polymarket-blue);
  color: white;
}

.scenario-platform-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  background: rgba(255, 250, 244, 0.42);
  color: var(--ink-soft);
}

.scenario-platform-strip-reveal {
  margin: 0 0 12px;
}

.scenario-platform-strip-diptych {
  width: min(720px, calc(100% - 52px));
  margin: 16px auto 0;
  justify-content: center;
}

.scenario-platform-kicker,
.scenario-platform-delta,
.scenario-platform-value {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1;
}

.scenario-platform-kicker {
  color: var(--ink-muted);
  text-transform: uppercase;
}

.scenario-platform-values {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.scenario-platform-value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid transparent;
  background: rgba(34, 28, 19, 0.035);
  color: var(--ink-soft);
  white-space: nowrap;
}

.scenario-platform-value[aria-current="true"] {
  border-color: var(--ink);
  background: var(--white);
  color: var(--ink);
}

.scenario-platform-value b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 720;
}

.scenario-platform-mark {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.scenario-platform-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 0.82rem;
  font-weight: 800;
}

.scenario-platform-letter-kalshi {
  color: var(--kalshi-green);
}

.scenario-platform-letter-blend {
  color: var(--gold);
}

.scenario-platform-logo {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.scenario-platform-value-kalshi[aria-current="true"] {
  border-color: color-mix(in srgb, var(--kalshi-green) 62%, var(--ink));
}

.scenario-platform-value-polymarket[aria-current="true"] {
  border-color: color-mix(in srgb, var(--polymarket-blue) 58%, var(--ink));
}

.scenario-platform-value-blend[aria-current="true"] {
  border-color: color-mix(in srgb, var(--gold) 58%, var(--ink));
}

.scenario-platform-delta {
  margin-left: auto;
  padding: 6px 8px;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.scenario-platform-delta-kalshi-higher {
  border-color: color-mix(in srgb, var(--kalshi-green) 54%, var(--rule-strong));
  color: var(--kalshi-green);
}

.scenario-platform-delta-polymarket-higher {
  border-color: color-mix(in srgb, var(--polymarket-blue) 48%, var(--rule-strong));
  color: var(--polymarket-blue);
}

@media (max-width: 640px) {
  .scenario-platform-strip {
    align-items: flex-start;
  }

  .scenario-platform-kicker {
    width: 100%;
  }

  .scenario-platform-values {
    width: auto;
  }

  .scenario-platform-value {
    min-height: 26px;
    gap: 4px;
    padding: 4px 6px;
  }

  .scenario-platform-name {
    display: none;
  }

  .scenario-platform-delta {
    margin-left: 0;
  }
}

.section-sub {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-base);
  line-height: 1.35;
}

.interaction-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.live-pulse {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex: 0 0 auto;
}

.live-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.5;
  animation: livePulse 2s ease-out infinite;
}

@keyframes livePulse {
  0% { transform: scale(1); opacity: 0.5; }
  90%, 100% { transform: scale(2.4); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .live-pulse::after {
    animation: none;
  }
}

.data-loading-note {
  margin: 0 0 14px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.loading-skeleton {
  display: block;
  background:
    linear-gradient(
      100deg,
      rgba(34, 28, 19, 0.075) 0%,
      rgba(255, 250, 244, 0.8) 44%,
      rgba(34, 28, 19, 0.095) 88%
    );
  background-size: 220% 100%;
  filter: blur(0.2px);
  opacity: 0.86;
  animation: loadingSheen 1.35s ease-in-out infinite;
}

@keyframes loadingSheen {
  from { background-position: 180% 0; }
  to { background-position: -60% 0; }
}

.loading-number-xl {
  width: clamp(88px, 10vw, 132px);
  height: clamp(48px, 6vw, 70px);
}

.loading-number-lg {
  width: clamp(74px, 8vw, 104px);
  height: 48px;
}

.loading-chip {
  width: 70px;
  height: 32px;
  border: 1px solid var(--rule);
}

.loading-name {
  width: min(100%, 8rem);
  height: 1.55rem;
}

.loading-rail {
  width: 100%;
  max-width: 150px;
  height: 2px;
  background: var(--rule-strong);
  opacity: 0.5;
}

.loading-bar {
  height: 100%;
  min-width: 34%;
}

.loading-bar-red {
  width: 72%;
  margin-left: auto;
}

.loading-bar-blue {
  width: 62%;
}

.loading-dumbbell {
  position: absolute;
  top: 50%;
  left: 2%;
  right: 2%;
  width: auto;
  height: 12px;
  transform: translateY(-50%);
}

.is-loading-data .ya-card-loading,
.is-loading-data .diptych-row-loading,
.is-loading-data .mp-dumbbell-loading-row {
  cursor: default;
}

.is-loading-data .ya-card-loading:hover,
.is-loading-data .diptych-row-loading:hover,
.is-loading-data .mp-dumbbell-loading-row:hover {
  background: transparent;
  color: var(--ink);
}

.is-loading-data .ya-card-loading:hover::after {
  width: 5px;
  background: var(--rule-strong);
}

.face-loading {
  background:
    linear-gradient(135deg, rgba(34, 28, 19, 0.08), rgba(34, 28, 19, 0.18)),
    var(--ink);
}

.face-loading .loading-skeleton {
  background:
    linear-gradient(
      100deg,
      rgba(251, 239, 229, 0.16) 0%,
      rgba(251, 239, 229, 0.46) 44%,
      rgba(251, 239, 229, 0.18) 88%
    );
  background-size: 220% 100%;
}

@media (prefers-reduced-motion: reduce) {
  .loading-skeleton {
    animation: none;
  }
}

.scenario-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.overview-controls {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: min(100%, 420px);
}

.replay-actions {
  justify-content: flex-end;
}

.ghost,
.target-chip {
  min-height: 42px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0;
}

.ghost:hover,
.target-chip:hover {
  background: var(--paper-3);
}

.ghost.primary,
.ghost[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.sparkline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-left: 1px solid var(--ink);
  border-top: 1px solid var(--ink);
  background: var(--paper-2);
}

.spark-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto 80px auto;
  gap: 6px 16px;
  min-height: 260px;
  padding: 18px;
  border: 0;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: inherit;
  text-align: left;
}

.spark-label {
  color: var(--ink-muted);
  text-transform: uppercase;
}

.spark-value {
  grid-column: 1;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.spark-delta {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  text-align: right;
}

.spark-question {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: 1.3;
}

.sparkline {
  grid-column: 1 / -1;
  width: 100%;
  height: 80px;
}

.spark-rule,
.chart-grid {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1;
}

.spark-path,
.chart-path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spark-dot,
.chart-dot {
  fill: var(--red);
  stroke: var(--paper);
  stroke-width: 1.5;
}

.spark-end,
.chart-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  fill: var(--ink-muted);
  text-anchor: end;
}

.scenario-controls {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  border: 1px solid var(--ink);
  background: var(--paper-2);
}

.slider-bank {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 22px;
}

.slider-bank.compact {
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
}

.slider-bank label {
  display: grid;
  gap: 12px;
}

.slider-bank span {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-muted);
  text-transform: uppercase;
}

.scenario-control {
  position: relative;
}

.control-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.chamber-id {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chamber-id span {
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
}

.chamber-logo {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
  opacity: 0.94;
}

.chamber-logo-house {
  width: 58px;
  height: 58px;
}

.chamber-logo-senate {
  width: 62px;
  height: 62px;
}

.slider-bank input {
  width: 100%;
  height: 12px;
  margin: 0;
  accent-color: var(--red);
  appearance: none;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--paper) 50%, var(--red) 100%);
}

.slider-bank input::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.slider-bank input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.slider-bank b {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 420;
  line-height: 1;
}

.slider-bank.compact b {
  font-size: var(--text-base);
}

.slider-bank i {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-style: normal;
  text-transform: uppercase;
}

.slider-bank .party-range {
  align-items: center;
}

.slider-bank .scenario-party-range {
  padding-top: 2px;
}

.party-range img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 28px;
  align-items: start;
}

.overview-main {
  min-width: 0;
}

.scenario-bar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--ink);
  background: var(--paper-2);
  order: 2;
}

.scenario-bar .slider-bank {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 0;
}

.scenario-reset {
  justify-self: start;
}

.scenario-readout {
  border-left: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: rgba(255, 250, 244, 0.48);
}

.scenario-title {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule-strong);
  color: var(--ink-soft);
}

.target-table {
  display: grid;
}

.target-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px auto;
  gap: 18px;
  align-items: start;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: inherit;
  text-align: left;
}

.target-row:last-child {
  border-bottom: 0;
}

.target-row h3 {
  margin: 0;
  font-family: var(--font-clean-display);
  font-size: var(--text-lg);
  font-weight: 420;
}

.target-row p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: 1.3;
}

.delta {
  min-width: 82px;
  color: var(--ink-muted);
  text-align: right;
}

.delta.up,
.spark-delta.up {
  color: var(--red);
}

.delta.down,
.spark-delta.down {
  color: var(--blue);
}

.mini-bar {
  width: 130px;
  height: 8px;
  background: rgba(34, 28, 19, 0.10);
  border: 1px solid rgba(34, 28, 19, 0.24);
}

.mini-bar span {
  display: block;
  height: 100%;
  background: var(--gold);
}

.target-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.target-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  justify-content: center;
}

.target-chip-main {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.target-chip b {
  font-weight: 500;
  color: var(--ink-muted);
}

.target-chip-gate {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.1;
  text-transform: uppercase;
}

.target-chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.target-chip[aria-pressed="true"] b {
  color: rgba(251, 239, 229, 0.74);
}

.target-chip[aria-pressed="true"] .target-chip-gate {
  color: rgba(251, 239, 229, 0.68);
}

.wiring-canvas {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--white);
}

#wiringSvg {
  width: 100%;
  min-height: 560px;
}

.column-label {
  fill: var(--ink-muted);
  text-transform: uppercase;
}

.column-label.middle {
  text-anchor: middle;
}

.column-label.right {
  text-anchor: end;
}

.node-box {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.1;
}

.node-box.source {
  fill: var(--white);
}

.node-box.latent.red,
.node-box.target {
  stroke: var(--red);
}

.node-box.latent.blue {
  stroke: var(--blue);
}

.svg-clickable {
  cursor: pointer;
}

.svg-clickable.selected .node-box {
  stroke-width: 2.4;
  stroke: var(--gold);
}

.node-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 420;
  fill: var(--ink);
}

.node-name.red {
  fill: var(--red);
}

.node-name.blue {
  fill: var(--blue);
}

.node-name.right {
  font-size: var(--text-lg);
}

.node-tag {
  fill: var(--ink-muted);
  text-transform: uppercase;
}

.node-pct {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 380;
  fill: var(--ink);
  font-variant-numeric: tabular-nums;
}

.node-pct.small {
  font-size: var(--text-base);
}

.ribbon {
  fill: none;
  stroke-linecap: round;
  opacity: 0.72;
}

.ribbon.r {
  stroke: var(--red-soft);
}

.ribbon.b {
  stroke: var(--blue-soft);
}

.ribbon.n {
  stroke: rgba(34, 28, 19, 0.28);
}

.node-detail {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  min-height: 118px;
  padding: 18px 0;
  border-bottom: 1px solid var(--ink);
}

.node-detail > div:first-child {
  flex: 1 1 360px;
}

.node-detail h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 420;
}

.node-detail p {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

.detail-link {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  text-decoration: none;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 560px;
}

.detail-stats span {
  padding: 5px 8px;
  border: 1px solid var(--rule-strong);
  color: var(--ink-soft);
  white-space: nowrap;
}

.source-gate-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border: 1px solid var(--rule-strong);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.source-gate-source-gated,
.source-gate-research-only {
  border-color: rgba(114, 52, 37, 0.45);
  color: #723425;
}

.source-gate-secondary,
.source-gate-promote-secondary {
  border-color: rgba(29, 60, 94, 0.42);
  color: #1d3c5e;
}

.source-gate-pill-reveal {
  margin: 0;
}

.history-modal,
.edge-compare-modal,
.source-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(34, 28, 19, 0.42);
}

.history-modal[hidden],
.edge-compare-modal[hidden],
.source-modal[hidden] {
  display: none;
}

.history-dialog,
.edge-compare-dialog,
.source-dialog {
  position: relative;
  width: min(100%, 980px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 24px 80px rgba(34, 28, 19, 0.28);
}

.source-dialog {
  width: min(100%, 760px);
}

.edge-compare-dialog {
  width: min(100%, 1120px);
}

.history-dialog h2,
.edge-compare-dialog h2,
.source-dialog h2 {
  max-width: 850px;
  padding-right: 86px;
  font-size: var(--text-xl);
  line-height: 1.08;
}

.detail-modal-title {
  font-family: var(--font-clean-display);
  font-weight: 600;
}

.history-heading.has-portrait {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding-right: 86px;
}

.history-heading.has-portrait .history-heading-copy h2 {
  padding-right: 0;
}

.history-portrait {
  width: 76px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: rgba(255, 250, 244, 0.82);
}

.history-portrait[hidden] {
  display: none;
}

.history-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-subtitle {
  margin: 10px 0 0;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.source-subtitle {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-base);
  line-height: 1.35;
}

.source-market-list {
  display: grid;
  gap: 0;
  margin-top: 20px;
  border-top: 1px solid var(--ink);
}

.source-market-row {
  display: grid;
  gap: 7px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
}

.source-market-row:hover strong,
.source-market-row:focus-visible strong {
  color: var(--red);
}

.source-market-row strong {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 420;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.source-market-title {
  overflow-wrap: anywhere;
}

.source-market-external {
  display: inline-block;
  width: 0.78em;
  height: 0.78em;
  margin-left: 0.28em;
  color: var(--ink-muted);
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.45;
  vertical-align: -0.08em;
}

.source-market-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: uppercase;
}

.source-empty {
  margin: 0;
  padding: 16px 0;
  color: var(--ink-soft);
  font-size: var(--text-base);
}

.history-definition {
  max-width: 820px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-base);
  line-height: 1.32;
}

.history-definition:empty {
  display: none;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

#historyChart,
#edgeCompareChart {
  width: 100%;
  margin-top: 20px;
  border: 1px solid var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.94), rgba(244, 225, 210, 0.58));
}

#historyChart {
  min-height: 360px;
}

#edgeCompareChart {
  min-height: 420px;
}

.history-accessible-summary {
  margin-top: 14px;
}

.history-summary-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.25;
  text-transform: uppercase;
}

.history-summary-table caption {
  padding: 0 0 7px;
  color: var(--ink);
  font-weight: 700;
  text-align: left;
}

.history-summary-table th,
.history-summary-table td {
  padding: 7px 8px;
  border-top: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.history-summary-table th[scope="row"] {
  color: var(--ink);
  font-weight: 700;
  text-transform: none;
}

.history-summary-empty {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.edge-compare-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.edge-compare-chip {
  --candidate-color: var(--gold);
  display: inline-grid;
  grid-template-columns: 0.7rem minmax(0, auto) auto;
  gap: 0.45rem;
  align-items: center;
  min-height: 2.1rem;
  border: 1px solid var(--rule-strong);
  background: rgba(255, 250, 244, 0.44);
  color: var(--ink);
  padding: 0.32rem 0.48rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1;
  text-align: left;
}

.edge-compare-chip[aria-pressed="false"] {
  opacity: 0.44;
}

.edge-compare-chip:hover,
.edge-compare-chip:focus-visible {
  border-color: var(--ink);
}

.edge-compare-chip.is-focused {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.edge-compare-swatch {
  width: 0.58rem;
  height: 0.58rem;
  background: var(--candidate-color);
}

.edge-compare-name,
.edge-compare-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edge-compare-value {
  color: currentColor;
  font-weight: 700;
}

.edge-compare-stats {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.edge-compare-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.edge-compare-stat-row span {
  padding: 5px 8px;
  border: 1px solid var(--rule-strong);
}

.edge-compare-stats b {
  color: var(--ink);
}

.edge-divergence-note {
  margin: 0;
  padding: 0.72rem 0.82rem;
  border: 1px solid var(--rule-strong);
  background: color-mix(in srgb, var(--gold) 7%, transparent);
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  line-height: 1.28;
  text-transform: none;
}

.edge-divergence-note b {
  color: var(--ink);
}

.edge-provider-matrix {
  display: grid;
  grid-template-columns: minmax(7.4rem, 1.15fr) repeat(3, minmax(6.2rem, 1fr));
  border-top: 1px solid var(--rule-strong);
  border-left: 1px solid var(--rule-strong);
  text-transform: none;
}

.edge-provider-cell {
  min-width: 0;
  padding: 0.48rem 0.58rem;
  border-right: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}

.edge-provider-head {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  color: var(--ink);
  font-weight: 740;
  text-transform: uppercase;
}

.edge-provider-head-kalshi,
.edge-provider-value-kalshi b {
  color: var(--kalshi-green);
}

.edge-provider-head-polymarket,
.edge-provider-value-polymarket b {
  color: var(--polymarket-blue);
}

.edge-provider-head-blended,
.edge-provider-value-blended b {
  color: var(--gold);
}

.edge-provider-name {
  color: var(--ink);
  font-weight: 740;
}

.edge-provider-value {
  display: grid;
  gap: 0.22rem;
}

.edge-provider-value b,
.edge-provider-value em,
.edge-provider-value i {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edge-provider-value b {
  font-size: 0.82rem;
  line-height: 1.05;
}

.edge-provider-value em,
.edge-provider-value i {
  color: var(--ink-muted);
  font-style: normal;
  line-height: 1.05;
}

.edge-provider-value.is-missing b {
  color: var(--ink-muted);
}

.chart-panel {
  fill: rgba(255, 250, 244, 0.62);
  stroke: var(--rule);
  stroke-width: 1;
}

.chart-area {
  fill: url(#historyAreaGradient);
}

.chart-axis {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.1;
}

.chart-path {
  filter: url("#historyLineGlow");
  stroke-width: 3;
}

.chart-path.comparison-line-a,
.chart-legend-line.comparison-line-a {
  stroke: var(--red);
}

.chart-path.comparison-line-b,
.chart-legend-line.comparison-line-b {
  stroke: var(--blue);
}

.chart-path.comparison-line-edge,
.chart-legend-line.comparison-line-edge {
  stroke: var(--gold);
}

.chart-interval-band {
  stroke: none;
  opacity: 0.11;
}

.chart-interval-band.comparison-line-a {
  fill: var(--red);
}

.chart-interval-band.comparison-line-b {
  fill: var(--blue);
}

.chart-interval-band.comparison-line-edge {
  fill: var(--gold);
  opacity: 0.18;
}

.chart-path.edge-compare-line {
  fill: none;
  filter: none;
  stroke: var(--series-color);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-path.edge-compare-line.is-muted {
  opacity: 0.44;
  stroke-width: 1.9;
}

.chart-path.edge-compare-line.is-focused {
  opacity: 1;
  stroke-width: 3.1;
}

.chart-interval-band.edge-compare-band {
  fill: var(--series-color);
  opacity: 0.16;
}

.chart-zero-line {
  fill: none;
  stroke: var(--ink);
  stroke-dasharray: 5 6;
  stroke-opacity: 0.42;
  stroke-width: 1.2;
}

.chart-legend-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}

.chart-legend-text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  fill: var(--ink-muted);
  text-transform: uppercase;
}

.chart-grid {
  stroke: rgba(34, 28, 19, 0.13);
}

.chart-y-label,
.chart-value-text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  fill: var(--ink-muted);
  text-anchor: end;
}

.chart-label {
  font-size: var(--text-xs);
  text-anchor: middle;
}

.chart-dot {
  fill: var(--gold);
  stroke: var(--paper);
  stroke-width: 2;
}

.chart-dot.end {
  fill: var(--red);
  stroke: var(--white);
  stroke-width: 2.5;
}

.comparison-dot-0 {
  fill: var(--red);
}

.comparison-dot-1 {
  fill: var(--blue);
}

.edge-compare-dot {
  fill: var(--series-color);
  stroke: var(--paper);
  stroke-width: 1.8;
}

.edge-compare-dot.is-muted {
  opacity: 0.55;
}

.chart-value-pill {
  fill: var(--ink);
}

.chart-value-text {
  fill: var(--paper);
  font-size: var(--text-xs);
  font-weight: 600;
  text-anchor: middle;
}

.history-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.history-stats span {
  padding: 5px 8px;
  border: 1px solid var(--rule-strong);
}

.error {
  margin-top: 48px;
  padding: 24px;
  border: 1px solid var(--red);
  background: rgba(140, 42, 42, 0.08);
  color: var(--red);
}

@media (max-width: 1180px) {
  .overview-layout {
    grid-template-columns: 1fr;
  }

  .scenario-bar {
    position: static;
    order: 0;
  }

  .scenario-controls {
    grid-template-columns: 1fr;
  }

  .comparison-grid,
  .comparison-row {
    grid-template-columns: minmax(300px, 1.35fr) repeat(3, minmax(128px, 0.55fr));
  }

  .comparison-grid.custom-enabled,
  .comparison-row.custom-enabled {
    grid-template-columns: minmax(300px, 1.35fr) repeat(4, minmax(116px, 0.55fr));
  }

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

  .mp-card-focus {
    min-height: 0;
  }

  .overview-controls {
    justify-items: stretch;
    min-width: 0;
  }

}

@media (max-width: 820px) {
  .shell {
    padding: 18px 16px 42px;
  }

  .history-modal,
  .edge-compare-modal,
  .source-modal {
    padding: 12px;
  }

  .history-dialog,
  .edge-compare-dialog,
  .source-dialog {
    padding: 20px;
  }

  .history-heading.has-portrait {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    padding-right: 0;
  }

  .history-portrait {
    width: 58px;
  }

  .masthead,
  .product-tabs,
  .two-worlds,
  .slider-bank,
  .site-footer,
  .footer-copy {
    grid-template-columns: 1fr;
  }

  .method-hero h1,
  .method-hero h2 {
    font-size: var(--text-xl);
    line-height: 1.08;
  }

  .method-lede,
  .method-thesis p:first-child {
    font-size: var(--text-base);
  }

  .method-thesis,
  .method-run-card,
  .method-run-facts,
  .method-principles,
  .method-step,
  .method-ontology-graph,
  .method-reading,
  .method-reading-grid {
    grid-template-columns: 1fr;
  }

  .method-thesis {
    gap: 14px;
  }

  .method-run-card p:last-child {
    grid-column: 1;
    margin-top: 0;
  }

  .method-principles section {
    min-height: auto;
  }

  .method-step {
    gap: 10px;
    padding: 22px 0;
  }

  .method-step-index {
    font-size: var(--text-lg);
  }

  .method-ontology-links {
    min-height: 34px;
    padding: 10px 0;
    justify-items: center;
  }

  .method-ontology-links i {
    width: 2px;
    height: 22px;
  }

  .method-ontology-links i:nth-child(n + 2) {
    display: none;
  }

  .method-ontology-links i::after {
    top: auto;
    right: auto;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%) rotate(135deg);
  }

  .method-step h3,
  .method-reading h3,
  .method-client h3 {
    font-size: var(--text-lg);
  }

  .brand-partisan {
    justify-content: center;
  }

  .brand {
    font-size: 46px;
  }

  .market-section-actions {
    justify-items: start;
  }

  .mp-electability-unified-card {
    padding: 12px;
  }

  #marketShareActions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .site-footer.site-footer-compact {
    align-items: start;
    gap: 14px;
  }

  .footer-brand-links {
    justify-content: start;
    flex-wrap: wrap;
  }

  .mp-dumbbell-scale,
  .mp-dumbbell-key,
  .mp-reference-lines,
  .mp-baseline-scale,
  .mp-baseline-row,
  .mp-dumbbell-row {
    grid-template-columns: 1fr;
  }

  .mp-exchange-table-note {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .mp-electability-row {
    grid-template-columns: minmax(7.45rem, 1fr) minmax(5.2rem, 0.48fr) minmax(5.8rem, 0.56fr);
    gap: 0.48rem;
  }

  .mp-electability-head {
    display: grid;
    min-height: 2.35rem;
    font-size: 0.64rem;
  }

  .mp-electability-head > span {
    min-width: 0;
  }

  .mp-electability-party-label-row {
    min-height: 1.9rem;
  }

  .mp-electability-party-label {
    font-size: 0.7rem;
  }

  .mp-column-long {
    display: none;
  }

  .mp-column-short {
    display: inline;
  }

  .mp-electability-body-row {
    min-height: 0;
    padding: 0.68rem 0.1rem;
  }

  .mp-electability-cell {
    display: flex;
    align-items: center;
  }

  .mp-electability-metric-election {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
    width: 100%;
  }

  .mp-electability-metric-election .mp-electability-value,
  .mp-electability-metric-election .mp-electability-spark {
    grid-column: 1;
  }

  .mp-electability-metric-election .mp-electability-value {
    grid-row: 1;
  }

  .mp-electability-value {
    font-size: clamp(1.55rem, 8vw, 2.15rem);
  }

  .mp-exchange-provider {
    font-size: 0.58rem;
  }

  .mp-exchange-provider b {
    display: none;
  }

  .mp-exchange-secondary {
    grid-template-columns: 1fr;
    gap: 0.16rem;
    padding: 0.34rem 0.36rem;
  }

  .mp-exchange-secondary-value {
    font-size: 1rem;
  }

  .mp-exchange-gap {
    font-size: 0.58rem;
    white-space: normal;
  }

  .mp-electability-spark {
    height: 0.86rem;
    margin-top: 0.24rem;
  }

  .mp-electability-metric-election .mp-electability-spark {
    grid-row: 2;
    width: min(4.9rem, 100%);
    height: 0.86rem;
    margin-top: 0.24rem;
  }

  .mp-electability-spark-end {
    width: 0.34rem;
    height: 0.34rem;
  }

  .mp-electability-spark-dot {
    width: 0.46rem;
    height: 0.46rem;
  }

  .mp-electability-body-row .mp-dumbbell-name {
    font-size: 1rem;
  }

  .mp-electability-body-row .mp-dumbbell-name-photo {
    grid-template-columns: 2.2rem minmax(0, 1fr);
    gap: 0.34rem;
  }

  .mp-electability-body-row .mp-candidate-photo {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 6px;
  }

  .mp-electability-body-row .mp-candidate-name-full {
    display: none;
  }

  .mp-electability-body-row .mp-candidate-name-compact {
    display: inline;
  }

  .mp-electability-body-row .mp-dumbbell-name-meta {
    display: none;
  }

  .mp-dumbbell-scale > span:first-child,
  .mp-dumbbell-key > span:first-child {
    display: none;
  }

  .mp-dumbbell-track {
    height: 3rem;
  }

  .mp-baseline-scale-label {
    justify-self: start;
    margin-bottom: 0.25rem;
  }

  .mp-baseline-scale-main {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .mp-edge-layer-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .mp-baseline-compare-button {
    justify-self: start;
  }

  .mp-explainer-tooltip {
    --mp-explainer-shift-x: -30%;
  }

  .mp-baseline-plot {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .mp-baseline-track {
    height: 5.2rem;
  }

  .mp-baseline-nominees {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.9rem;
    padding-left: 0;
    border-left: none;
  }

  .mp-baseline-nominee {
    grid-template-columns: auto auto;
    gap: 0.32rem;
  }

  .mp-baseline-meta {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .mp-point-label {
    display: block;
    font-size: var(--text-xs);
  }

  .mp-dumbbell-values {
    grid-template-columns: 1fr;
  }

  .brand-party-logo {
    width: 30px;
    height: 30px;
  }

  h1 {
    font-size: var(--text-xl);
  }

  h2 {
    font-size: var(--text-xl);
  }

  .section-head,
  .world-head,
  .node-detail {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-controls,
  .replay-actions {
    width: 100%;
    justify-items: stretch;
    justify-content: stretch;
  }

  .replay-actions .ghost {
    flex: 1 1 100%;
  }

  .product-tabs button {
    border-right: 0;
  }

  .product-tabs button {
    border-bottom: 1px solid var(--ink);
  }

  .product-tabs button:last-child {
    border-bottom: 0;
  }

  .world-spine {
    min-height: 44px;
  }

  .comparison-grid {
    display: block;
    border-right: 1px solid var(--ink);
  }

  .comparison-header {
    display: none;
  }

  .comparison-rows {
    display: block;
  }

  .comparison-row {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
    border-bottom: 1px solid var(--ink);
  }

  .comparison-row.custom-enabled {
    grid-template-columns: 1fr;
  }

  .comparison-row > * {
    border-right: 0;
  }

  .comparison-question {
    border-bottom: 1px solid var(--rule-strong);
  }

  .comparison-prob {
    grid-template-columns: minmax(136px, 0.75fr) minmax(0, 1fr);
    justify-items: start;
    min-height: 72px;
    text-align: left;
  }

  .comparison-prob::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--ink-muted);
    text-transform: uppercase;
  }

  .current-prob {
    grid-template-columns: minmax(136px, 0.75fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
  }

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

  .target-row {
    grid-template-columns: 1fr;
  }

  .mini-bar {
    width: 100%;
  }

  #wiringSvg {
    min-height: 460px;
  }

  /* Market pairs - tighten card chrome and the dumbbell/grid columns on
     narrow screens (cards already stack to one column at 1180px). */
  .mp-card { padding: 1.2rem 1rem 1.1rem; }
  .pm-comparison-panel {
    margin: 0 1rem 1rem;
    padding: 1rem;
  }
  .pm-blend-table tbody th {
    width: 68%;
    padding-right: 0.85rem;
  }
  .pm-blend-table th,
  .pm-blend-table td {
    padding: 0.66rem 0;
  }
  .pm-blend-table tbody th span {
    font-size: var(--text-sm);
    line-height: 1.12;
  }
  .pm-blend-table td strong {
    font-size: var(--text-base);
  }
  .mp-card-head {
    flex-direction: column;
    gap: 0.7rem;
  }
  .mp-headline { font-size: var(--text-base); }
  .mp-dumbbell-key {
    display: block;
  }
  .mp-dumbbell-electability {
    --mp-divider-left: 30%;
  }
  .mp-dumbbell-electability::after {
    top: 4.35rem;
    bottom: 1.45rem;
  }
  .mp-dumbbell-key-track {
    grid-template-columns: 1fr;
    gap: 0.45rem 0.8rem;
    margin-bottom: 0.7rem;
  }
  .mp-dumbbell-key-track span:last-child {
    justify-self: start;
    justify-content: flex-start;
    text-align: left;
  }
  .mp-dumbbell-scale,
  .mp-reference-lines,
  .mp-dumbbell-row {
    display: block;
  }
  .mp-reference-lines {
    margin: 0.15rem 0 0.85rem;
  }
  .mp-reference-label {
    display: block;
    margin-bottom: 0.28rem;
    padding-top: 0;
    text-align: left;
  }
  .mp-reference-track {
    min-height: 2.35rem;
    margin: 0 0 0.45rem;
  }
  .mp-reference-tick {
    font-size: 0.68rem;
    max-width: 9rem;
  }
  .mp-reference-caption {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
  }
  .mp-scale-track {
    margin: 0 0 0.8rem;
  }
  .mp-dumbbell-name {
    margin-bottom: 0.65rem;
  }
  .mp-dumbbell-track {
    height: 4.8rem;
    margin-bottom: 0.55rem;
  }
  .mp-dumbbell-values span {
    grid-template-columns: 0.8rem minmax(0, 1fr) auto;
  }
  /* Row-header words ("Republican"/"Democratic") need ~6.5rem to wrap
     without clipping; trim cell padding so the data columns keep room. */
  .mp-grid { grid-template-columns: 6.5rem 1fr 1fr; }
  .mp-grid > * { padding: 0.6rem 0.55rem; }

  #edgeCompareChart {
    min-height: 360px;
  }

  .history-summary-table {
    font-size: 0.68rem;
  }

  .history-summary-table th,
  .history-summary-table td {
    padding: 6px 5px;
    overflow-wrap: anywhere;
  }

  .edge-compare-chip {
    grid-template-columns: 0.7rem minmax(4.8rem, 1fr) auto;
  }
  .edge-provider-matrix {
    grid-template-columns:
      minmax(4.5rem, 0.9fr)
      minmax(3.8rem, 0.78fr)
      minmax(5.2rem, 1.12fr)
      minmax(3.6rem, 0.74fr);
    font-size: 0.68rem;
  }
  .edge-provider-cell {
    padding: 0.42rem 0.38rem;
  }
  .edge-provider-value b,
  .edge-provider-value em,
  .edge-provider-value i {
    white-space: normal;
  }
  .mp-grid-cell strong { font-size: var(--text-lg); }
}

/* ===== Side by side - diptych ===== */
.diptych-topline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  border-top: 4px double var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-top: 8px;
}
.topline-side {
  display: grid;
  gap: 6px;
  padding: 18px 26px;
}
.topline-side.gop { background: var(--red-wash); justify-items: start; text-align: left; }
.topline-side.dem { background: var(--blue-wash); justify-items: end; text-align: right; }
.topline-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.topline-pct {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.topline-side.gop .topline-pct { color: var(--red); }
.topline-side.dem .topline-pct { color: var(--blue); }
.topline-unit { font-size: 0.4em; color: var(--ink-muted); vertical-align: super; margin-left: 2px; }
.topline-note {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}
.topline-vs {
  display: grid;
  place-items: center;
  padding: 0 20px;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--ink-muted);
  border-left: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
}

.diptych-rows { display: grid; }
.diptych-row {
  padding: 26px 4px 22px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.diptych-row:last-child { border-bottom: 0; }
.diptych-row:hover { background: rgba(34, 28, 19, 0.025); }
.diptych-row:focus-visible { outline: 2px solid var(--rule-strong); outline-offset: -2px; }
.diptych-question {
  display: grid;
  gap: 0;
  justify-items: center;
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 18px;
}
.diptych-question .kicker { margin: 0; }
.diptych-question strong {
  margin: 0;
  font-family: var(--font-clean-display);
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.28;
}
.diptych-body {
  display: grid;
  grid-template-columns: 1fr 184px 1fr;
  align-items: center;
}
.diptych-cell { display: grid; gap: 9px; padding: 12px 26px; }
.diptych-cell.gop { background: linear-gradient(90deg, var(--red-wash), transparent 92%); }
.diptych-cell.dem {
  background: linear-gradient(270deg, var(--blue-wash), transparent 92%);
  justify-items: end;
  text-align: right;
}
.cell-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
}
.diptych-cell.gop .cell-label { color: var(--red); }
.diptych-cell.dem .cell-label { color: var(--blue); }
.cell-pct {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.diptych-cell.gop .cell-pct { color: var(--red); }
.diptych-cell.dem .cell-pct { color: var(--blue); }
.cell-unit { font-size: 0.38em; color: var(--ink-muted); vertical-align: super; margin-left: 2px; }
.cell-bar {
  position: relative;
  height: 8px;
  width: 100%;
  background: rgba(34, 28, 19, 0.08);
}
.cell-fill { position: absolute; top: 0; bottom: 0; }
.diptych-cell.gop .cell-fill { right: 0; background: var(--red); }
.diptych-cell.dem .cell-fill { left: 0; background: var(--blue); }
.diptych-lane {
  display: grid;
  gap: 10px;
  justify-items: center;
  align-content: center;
  padding: 0 6px;
}
.lane-empty { color: var(--ink-muted); font-size: var(--text-lg); }
.delta-pin {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px 9px;
  background: var(--paper);
  border: 1px solid var(--ink);
  white-space: nowrap;
}
.delta-pin.toward-gop { border-color: var(--red); color: var(--red); }
.delta-pin.toward-dem { border-color: var(--blue); color: var(--blue); }
.diptych-rail { position: relative; width: 100%; height: 56px; }
.rail-line {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1.5px;
  background: var(--rule-strong);
  transform: translateY(-50%);
}
.rail-nub {
  position: absolute;
  top: 50%;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  transform: translate(-50%, -50%);
  z-index: 2;
}
.rail-nub.gop { background: var(--red); }
.rail-nub.dem { background: var(--blue); }
.rail-tick {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}
.rail-tick i { display: block; width: 2px; height: 14px; margin: 0 auto; }
.rail-tick.now i { background: var(--ink); }
.rail-tick.custom i { background: var(--gold); }
.tick-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--ink-soft);
}
.rail-tick.now .tick-label {
  top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.rail-tick.custom .tick-label {
  bottom: 12px;
  color: var(--gold);
  font-size: 1.02rem;
  font-weight: 800;
}
/* A tick parked on a rail end: anchor its label inside the rail so it does
   not spill past the lane edge into the neighbouring cell. */
.rail-tick.at-start .tick-label { left: 0; transform: none; }
.rail-tick.at-end .tick-label { left: auto; right: 0; transform: none; }

@media (max-width: 860px) {
  .diptych-topline { grid-template-columns: 1fr; }
  .topline-side.dem { justify-items: start; text-align: left; }
  .topline-vs {
    border-left: 0; border-right: 0;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    padding: 8px;
  }
  .diptych-body { grid-template-columns: 1fr; }
  .diptych-cell.dem { justify-items: start; text-align: left; }
  .diptych-cell.gop .cell-fill,
  .diptych-cell.dem .cell-fill { left: 0; right: auto; }
  .diptych-lane { padding: 14px 6px; }
  .scenario-platform-strip-diptych {
    width: 100%;
    margin: 12px 0 0;
    justify-content: flex-start;
  }
}

button,
input,
.product-tabs button,
.footer-about-button,
.footer-logo-link,
.source-inline-button,
.reveal-back,
.share-icon,
.mp-method-button,
.mp-source-button,
.mp-explainer-button,
.mp-baseline-compare-button,
.mp-edge-layer-toggle,
.edge-compare-chip,
.ghost,
.target-chip,
.target-chip b,
.modal-close {
  font-family: var(--font-ui);
}
