/* Extracted from index.html <style> block 1. Keep page-specific rules here until componentized. */
/* ---------- THEME ---------- */
:root {
  --flip-gold:#F6CE46;
  --bg-card-subtle:#f5f5f7;
  --radius-pill:999px;
  --shadow-subtle:0 1px 3px rgba(15,23,42,0.15);
  --transition-fast:150ms ease-out;
  --transition-med:220ms cubic-bezier(0.22,0.61,0.36,1);

  --solid-d:#0076BA; --likely-d:#00A2FF; --lean-d:#56C1FF;
  --toss-up:#929292; --lean-r:#FF968D; --likely-r:#FF644E; --solid-r:#EE220C;

  --bg-page:#f3f4f6; 
  --bg-card:#ffffff; 
  --border-subtle:#d4d4d8;

  --text-main:#111827; 
  --text-muted:#6b7280; 
  --text-strong:#000;

  --radius-card:24px;
  --shadow-soft:0 18px 40px rgba(15,23,42,0.1);
}

@media (prefers-color-scheme: dark){
  :root{
    --bg-page:#020617; 
    --bg-card:#020617; 
    --border-subtle:#1f2937;

    --text-main:#e5e7eb; 
    --text-muted:#9ca3af; 
    --text-strong:#f9fafb;

    --shadow-soft:0 18px 40px rgba(0,0,0,0.9);
  }
}

/* ---------- LAYOUT ---------- */

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Required to prevent the sticky header from covering content */
  padding-top: var(--header-offset, 0px);
}

.container {
  max-width: 1150px;
  margin: auto;
  padding: 1.2rem;
}

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

/* ---------- CARDS ---------- */

.cm-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.5rem;
}

/* ---------- IFRAME ---------- */

iframe {
  width: 100%;
  border: 0;
  height: 0; /* dynamically resized */
  display: block;
}

/* ---------- FOOTER ---------- */

footer {
  text-align: center;
  padding: 1.2rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

section h2 {
  text-align: center;
  color: var(--text-strong);
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}

/* ---------- CHANGELOG ---------- */

#changelog-section {
  margin-top: 2rem;
}

#changelog-section h2 {
  margin-bottom: 1rem;
}

.changelog-controls {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.changelog-seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: rgba(148,163,184,.12);
}
.changelog-seg button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: .32rem .72rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .75rem;
  white-space: nowrap;
  cursor: pointer;
}
.changelog-seg button.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-subtle);
}
@media (prefers-color-scheme: dark) {
  .changelog-seg button.active { background: rgba(255,255,255,.08); }
}

.changelog-view-all {
  font-size: .78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.changelog-view-all:hover { color: var(--text-main); }

.cl-day-group { margin-bottom: 18px; }
.cl-day-label {
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 7px;
  padding: 0 2px;
}

.cl-card {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.cl-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-subtle);
}

.cl-dir-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  font-size: .58rem;
  font-weight: 900;
  flex-shrink: 0;
}
.cl-dir-d { background: rgba(0,118,186,.12); color: var(--solid-d); }
.cl-dir-r { background: rgba(238,34,12,.12); color: var(--solid-r); }

.cl-race-info { flex: 1; min-width: 0; }
.cl-race-name {
  font-weight: 900;
  font-size: .86rem;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cl-race-sub {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.cl-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.cl-arrow { color: var(--text-muted); font-size: .8rem; }

.cl-pill {
  border-radius: 999px;
  padding: .22rem .55rem;
  font-size: .67rem;
  font-weight: 900;
  color: #fff;
  white-space: nowrap;
}
.cl-pill-solid-d   { background: var(--solid-d); }
.cl-pill-likely-d  { background: var(--likely-d); }
.cl-pill-lean-d    { background: var(--lean-d); color: #082840; }
.cl-pill-toss-up   { background: var(--toss-up); }
.cl-pill-lean-r    { background: var(--lean-r); color: #3d0800; }
.cl-pill-likely-r  { background: var(--likely-r); }
.cl-pill-solid-r   { background: var(--solid-r); }

.cl-state-msg {
  text-align: center;
  color: var(--text-muted);
  padding: 24px 0;
  font-size: .88rem;
}
.changelog-seg-sm button {
  padding: .26rem .62rem;
  font-size: .72rem;
}

.cl-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 1rem;
  padding: .7rem 1rem;
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}
.cl-stat { text-align: center; }
.cl-stat-val {
  font-size: 1.25rem;
  font-weight: 950;
  color: var(--text-strong);
  letter-spacing: -.03em;
  line-height: 1;
}
.cl-stat-val.cl-stat-d { color: var(--solid-d); }
.cl-stat-val.cl-stat-r { color: var(--solid-r); }
.cl-stat-label {
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-top: 2px;
}
.cl-stat-div {
  width: 1px;
  background: var(--border-subtle);
  align-self: stretch;
}

.cl-load-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
.cl-load-btn {
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: 999px;
  padding: .5rem 1.2rem;
  font-weight: 800;
  font-size: .78rem;
  box-shadow: var(--shadow-subtle);
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.cl-load-btn:hover:not(:disabled) { transform: translateY(-1px); }
.cl-load-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- CTA BUTTON ---------- */
.cta-row{
  display:flex;
  justify-content:center;
  margin-top: 0.9rem;
}
.cm-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:0.55rem;
  padding: 0.78rem 1.15rem;
  border-radius: 18px;
  font-weight: 800;
  text-decoration:none;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  line-height: 1;
}
.cm-btn:hover{ transform: translateY(-1px); }



/* GLOBAL TOOLTIP OVERLAY (for embedded seat-table iframes) */
#cmep-global-tooltip{
  position: fixed;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 999999;
  min-width: 200px;
  max-width: min(280px, calc(100% - 16px));
  padding: 0.55rem 0.65rem;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.92);
  color: #111827;
  box-shadow: var(--shadow-soft);
  transform: translate(-50%, -115%);
  transition: opacity 120ms ease;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))){
  #cmep-global-tooltip{
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
@media (prefers-color-scheme: dark){
  #cmep-global-tooltip{
    background: rgba(2,6,23,0.86);
    color: #e5e7eb;
    border-color: rgba(255,255,255,0.14);
  }
}
#cmep-global-tooltip.mobile{
  left: 50% !important;
  right: auto;
  top: auto !important;
  bottom: 20px;
  width: min(320px, calc(100% - 16px));
  max-width: calc(100% - 16px);
  min-width: 0;
  transform: translateX(-50%);
  border-radius: 16px;
}
@supports (padding-bottom: env(safe-area-inset-bottom)){
  #cmep-global-tooltip.mobile{ bottom: calc(env(safe-area-inset-bottom) + 20px); }
}
/* match tooltip inner typography used in seat pages */
#cmep-global-tooltip .tip-date{ font-weight: 850; margin: 0 0 0.25rem; font-size: 0.86rem; letter-spacing:-0.01em; }
#cmep-global-tooltip .tip-row{ display:flex; justify-content:space-between; gap:0.75rem; margin: 0.12rem 0; font-size: 0.84rem; font-weight: 700; }
#cmep-global-tooltip .tip-d{ color: var(--solid-d); }
#cmep-global-tooltip .tip-r{ color: var(--solid-r); }


/* =========================
   SENATE ARC (namespaced)
   ========================= */
#cmep-senate-arc-native .arc-wrap{
  max-width:1100px;
  margin:0 auto 24px;
  padding:0 12px 24px;
  box-sizing:border-box;
  position:relative;
  /* Enable container-query based scaling so Path buttons respond to card width (not viewport). */
  container-type:inline-size;
}#cmep-senate-arc-native svg{ width:100%; height:auto; display:block; }#cmep-senate-arc-native .legend{
  max-width:1100px;
  margin:10px auto 8px;
  padding:0 12px;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
}#cmep-senate-arc-native .legend-item{
  display:inline-flex;
  align-items:center;
  padding:6px 12px;
  border-radius:var(--radius-pill);
  font-size:0.8rem;
  font-weight:800;
  letter-spacing:0.03em;
  color:#fff;
  box-shadow:var(--shadow-subtle);
}#cmep-senate-arc-native .leg-no-election-d{ background:var(--solid-d); border:2px solid var(--toss-up); }#cmep-senate-arc-native .leg-no-election-r{ background:var(--solid-r); border:2px solid var(--toss-up); }#cmep-senate-arc-native .leg-solid-D{background:var(--solid-d)}#cmep-senate-arc-native .leg-likely-D{background:var(--likely-d)}#cmep-senate-arc-native .leg-lean-D{background:var(--lean-d)}#cmep-senate-arc-native .leg-toss-up{background:var(--toss-up)}#cmep-senate-arc-native .leg-lean-R{background:var(--lean-r)}#cmep-senate-arc-native .leg-likely-R{background:var(--likely-r)}#cmep-senate-arc-native .leg-solid-R{background:var(--solid-r)}#cmep-senate-arc-native .legend-item.majority-pill{
  background:#fff;
  color:#6b7280;
  border:2px solid var(--flip-gold);
  font-weight:800;
  gap:6px;
}#cmep-senate-arc-native .legend-item.majority-pill .ring{
  width:12px;height:12px;border-radius:50%;
  border:3px solid var(--flip-gold);
  display:inline-block;
}#cmep-senate-arc-native .legend-item.majority-pill .ring-dem{ border-color:var(--solid-d); }#cmep-senate-arc-native .legend-item.majority-pill .ring-gop{ border-color:var(--solid-r); }#cmep-senate-arc-native .vp-label{
  max-width:1100px;
  margin:0 auto 6px;
  padding:0 12px;
  text-align:center;
  font-size:0.8rem;
  color:var(--text-muted);
}#cmep-senate-arc-native .path-separator-line{
  width:100%;
  max-width:1100px;
  margin:8px auto 12px;
  border-bottom:2px solid var(--border-subtle);
  display:none;
}#cmep-senate-arc-native .path-banner{
  max-width:1100px;
  margin:0 auto 4px;
  padding:0 12px;
  display:flex;
  justify-content:center;
  align-items:center;
  font-weight:900;
  font-size:1.05rem;
  min-height:1.4em;

  opacity:0;
  transform:translateY(4px);
  transition:opacity 220ms ease, transform 260ms cubic-bezier(0.22,0.61,0.36,1);
}#cmep-senate-arc-native .path-banner.show{
  opacity:1;
  transform:translateY(0);
}#cmep-senate-arc-native .path-banner .path-pill{
  display:inline-block;
  padding:6px 14px;
  border-radius:var(--radius-pill);
  color:#fff;
  font-weight:900;
  letter-spacing:0.01em;
}#cmep-senate-arc-native .path-banner .path-pill.dem{ background:var(--solid-d); }#cmep-senate-arc-native .path-banner .path-pill.gop{ background:var(--solid-r); }#cmep-senate-arc-native .path-explainer{
  max-width:1100px;
  margin:0 auto 16px;
  padding:0 12px;
  text-align:center;
  font-size:0.85rem;
  color:var(--text-muted);
  min-height:1.4em;
}#cmep-senate-arc-native .solid-D{fill:#0076BA}#cmep-senate-arc-native .likely-D{fill:#00A2FF}#cmep-senate-arc-native .lean-D{fill:#56C1FF}#cmep-senate-arc-native .toss-up{fill:#929292}#cmep-senate-arc-native .lean-R{fill:#FF968D}#cmep-senate-arc-native .likely-R{fill:#FF644E}#cmep-senate-arc-native .solid-R{fill:#EE220C}#cmep-senate-arc-native .seat{
  cursor:pointer;
  transition:
    cx 420ms cubic-bezier(0.22,0.61,0.36,1),
    cy 620ms cubic-bezier(0.18,0.89,0.32,1.18),
    r  320ms cubic-bezier(0.22,0.61,0.36,1),
    opacity var(--transition-fast);
  will-change: cx, cy, r, opacity;
}#cmep-senate-arc-native .seat, #cmep-senate-arc-native #mm-halo{
  transform-box:fill-box;
  transform-origin:center;
}#cmep-senate-arc-native .seat.active-stack-focus .seat-dot{ transform:scale(1.42); stroke:rgba(246,206,70,0.98)!important; stroke-width:4px!important; filter:drop-shadow(0 0 12px rgba(246,206,70,0.45)); }
#cmep-senate-arc-native .seat.active-stack-focus{ z-index:28; }
#cmep-senate-arc-native .seat.cmep-stackflight{
  transition:
    cx 560ms cubic-bezier(0.22,0.61,0.36,1),
    cy 920ms cubic-bezier(0.18,0.89,0.32,1.10),
    r  360ms cubic-bezier(0.22,0.61,0.36,1),
    opacity var(--transition-fast);
}#cmep-senate-arc-native .seat.not-up{ stroke:var(--toss-up) !important; stroke-width:1.5 !important; }#cmep-senate-arc-native .hold-check{
  font-size:5.2px;
  font-weight:900;
  fill:var(--toss-up);
  pointer-events:none;
}#cmep-senate-arc-native .seat.majority-dem{ stroke:var(--solid-d); stroke-width:2.0; }#cmep-senate-arc-native .seat.majority-gop{ stroke:var(--solid-r); stroke-width:2.0; }#cmep-senate-arc-native .seat.majority-seat{ stroke:var(--flip-gold); stroke-width:1.8; }#cmep-senate-arc-native .seat.dem-path{ filter:drop-shadow(0 0 5px rgba(0,118,186,0.9)); }#cmep-senate-arc-native .seat.gop-path{ filter:drop-shadow(0 0 5px rgba(238,34,12,0.9)); }#cmep-senate-arc-native .seat.dem-path:not(.not-up):not(.majority-seat), #cmep-senate-arc-native .seat.gop-path:not(.not-up):not(.majority-seat){
  stroke: rgba(255,255,255,0.28);
  stroke-width: 0.6;
}#cmep-senate-arc-native .seat.majority-seat.dem-path, #cmep-senate-arc-native .seat.majority-seat.gop-path{
  stroke: var(--flip-gold) !important;
  stroke-width: 2.0 !important;
}#cmep-senate-arc-native .seat.path-muted{ opacity:0.20; pointer-events:none; }#cmep-senate-arc-native #tooltip{
  position:absolute;
  min-width:220px;
  max-width:min(320px, calc(100% - 16px));
  padding:0.7rem 0.8rem;
  border-radius:18px;
  border:1px solid var(--border-subtle);
  background:rgba(255,255,255,0.94);
  color:var(--text-main);
  box-shadow:var(--shadow-soft);
  pointer-events:none;
  font-size:0.9rem;
  display:none;
  z-index:9999;
  transform:translate(-50%, -115%);
}#cmep-senate-arc-native #tooltip strong, #cmep-senate-arc-native .mobile-path-card strong{ font-weight:800; color:var(--text-strong); }#cmep-senate-arc-native #tooltip .ct-head, #cmep-senate-arc-native .mobile-path-card .ct-head{ font-weight:900; font-size:0.95rem; letter-spacing:-0.01em; color:var(--text-strong); margin:0 0 0.35rem; }#cmep-senate-arc-native #tooltip .ct-summary, #cmep-senate-arc-native .mobile-path-card .ct-summary{ display:flex; flex-wrap:wrap; gap:0.35rem; margin:0 0 0.45rem; }#cmep-senate-arc-native #tooltip .ct-chip, #cmep-senate-arc-native .mobile-path-card .ct-chip{
  display:inline-flex; align-items:center; justify-content:center; padding:0.18rem 0.5rem; border-radius:999px; border:1px solid var(--border-subtle); background:var(--bg-card-subtle); color:var(--text-muted); font-size:0.72rem; font-weight:800; line-height:1.1;
}#cmep-senate-arc-native #tooltip .ct-chip.solid-D, #cmep-senate-arc-native .mobile-path-card .ct-chip.solid-D{ background:var(--solid-d); border-color:transparent; color:#fff; }
#cmep-senate-arc-native #tooltip .ct-chip.likely-D, #cmep-senate-arc-native .mobile-path-card .ct-chip.likely-D{ background:var(--likely-d); border-color:transparent; color:#fff; }
#cmep-senate-arc-native #tooltip .ct-chip.lean-D, #cmep-senate-arc-native .mobile-path-card .ct-chip.lean-D{ background:var(--lean-d); border-color:transparent; color:#fff; }
#cmep-senate-arc-native #tooltip .ct-chip.toss-up, #cmep-senate-arc-native .mobile-path-card .ct-chip.toss-up{ background:var(--toss-up); border-color:transparent; color:#fff; }
#cmep-senate-arc-native #tooltip .ct-chip.lean-R, #cmep-senate-arc-native .mobile-path-card .ct-chip.lean-R{ background:var(--lean-r); border-color:transparent; color:#fff; }
#cmep-senate-arc-native #tooltip .ct-chip.likely-R, #cmep-senate-arc-native .mobile-path-card .ct-chip.likely-R{ background:var(--likely-r); border-color:transparent; color:#fff; }
#cmep-senate-arc-native #tooltip .ct-chip.solid-R, #cmep-senate-arc-native .mobile-path-card .ct-chip.solid-R{ background:var(--solid-r); border-color:transparent; color:#fff; }
#cmep-senate-arc-native #tooltip .ct-rows, #cmep-senate-arc-native .mobile-path-card .ct-rows{ display:grid; gap:0.36rem; }#cmep-senate-arc-native #tooltip .ct-row, #cmep-senate-arc-native .mobile-path-card .ct-row{ display:flex; align-items:center; justify-content:space-between; gap:0.8rem; }#cmep-senate-arc-native #tooltip .ct-left, #cmep-senate-arc-native .mobile-path-card .ct-left{ min-width:0; display:flex; flex-direction:column; gap:0.06rem; }#cmep-senate-arc-native #tooltip .ct-name, #cmep-senate-arc-native .mobile-path-card .ct-name{ font-weight:850; color:var(--text-strong); line-height:1.15; }#cmep-senate-arc-native #tooltip .ct-sub, #cmep-senate-arc-native .mobile-path-card .ct-sub{ color:var(--text-muted); font-size:0.76rem; font-weight:700; line-height:1.15; }#cmep-senate-arc-native #tooltip .ct-right, #cmep-senate-arc-native .mobile-path-card .ct-right{ text-align:right; white-space:nowrap; }#cmep-senate-arc-native #tooltip .ct-pct, #cmep-senate-arc-native .mobile-path-card .ct-pct{ font-weight:900; font-variant-numeric:tabular-nums; }#cmep-senate-arc-native #tooltip .ct-pct.d, #cmep-senate-arc-native .mobile-path-card .ct-pct.d{ color:var(--solid-d); }#cmep-senate-arc-native #tooltip .ct-pct.r, #cmep-senate-arc-native .mobile-path-card .ct-pct.r{ color:var(--solid-r); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))){
  #cmep-senate-arc-native #tooltip{
    -webkit-backdrop-filter:blur(10px);
    backdrop-filter:blur(10px);
  }
}
@media (prefers-color-scheme: dark){
  #cmep-senate-arc-native #tooltip{
    background:rgba(2,6,23,0.9);
    border-color:rgba(255,255,255,0.14);
  }
}#cmep-senate-arc-native #tooltip.mobile{
  position:fixed;
  left:50%;
  right:auto;
  top:auto;
  bottom:24px;
  width:min(320px, calc(100% - 16px));
  max-width:calc(100% - 16px);
  min-width:0;
  transform:translateX(-50%);
  pointer-events:auto;
  border-radius:20px;
}@supports (padding-bottom: env(safe-area-inset-bottom)){#cmep-senate-arc-native #tooltip.mobile{ bottom:calc(env(safe-area-inset-bottom) + 20px); }}#cmep-senate-arc-native #path-controls{
  position:absolute;
  left:50%;
  bottom:8%;
  transform:translateX(-50%);
  display:flex;
  gap:24px;
  pointer-events:none;
}#cmep-senate-arc-native .path-button{
  width:120px;height:120px;
  border-radius:50%;
  border:4px solid rgba(255,255,255,0.9);
  background:#000;
  color:#fff;
  box-shadow:var(--shadow-soft);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:0.9rem;
  font-weight:900;
  cursor:pointer;
  pointer-events:auto;
  transition:
    transform var(--transition-med),
    box-shadow var(--transition-med),
    background-color var(--transition-med),
    border-color var(--transition-med),
    color var(--transition-med);
}

/* Responsive Path buttons (card-width aware):
   - In the homepage grid, the arc can shrink while viewport stays wide.
   - Use container query units so buttons shrink with the arc, and drop below the arc when the widget is narrow. */
@supports (width: 1cqi){
  #cmep-senate-arc-native #path-controls{ gap:clamp(12px, 6cqi, 24px); }
  #cmep-senate-arc-native .path-button{
    width:clamp(84px, 20cqi, 120px);
    height:clamp(84px, 20cqi, 120px);
    font-size:clamp(0.76rem, 2.4cqi, 0.9rem);
    border-width:clamp(3px, 0.7cqi, 4px);
  }
  #cmep-senate-arc-native .path-button span.close-icon{ font-size:clamp(1.55rem, 4.6cqi, 1.9rem); }
}

@container (max-width: 540px){
  #cmep-senate-arc-native #path-controls{
    position:static;
    transform:none;
    margin-top:20px;
    margin-bottom:10px;
    justify-content:center;
    gap:16px;
  }
  #cmep-senate-arc-native .path-button{ width:96px; height:96px; font-size:0.8rem; }
  #cmep-senate-arc-native .path-button span.close-icon{ font-size:1.6rem; }
}

#cmep-senate-arc-native .path-button.path-dem{ background:var(--solid-d); }#cmep-senate-arc-native .path-button.path-gop{ background:var(--solid-r); }#cmep-senate-arc-native .path-button span.label{ pointer-events:none; letter-spacing:0.03em; }#cmep-senate-arc-native .path-button span.close-icon{ display:none; font-size:1.9rem; line-height:1; pointer-events:none; }#cmep-senate-arc-native .path-button:hover{ transform:translateY(-1px) scale(1.02); box-shadow:0 22px 45px rgba(15,23,42,0.18); }#cmep-senate-arc-native .path-button.active{ background:transparent; box-shadow:0 0 0 2px rgba(15,23,42,0.15); }#cmep-senate-arc-native .path-button.active span.label{ display:none; }#cmep-senate-arc-native .path-button.active span.close-icon{ display:block; }#cmep-senate-arc-native .path-button.path-dem.active{ border-color:var(--solid-d); color:var(--solid-d); }#cmep-senate-arc-native .path-button.path-gop.active{ border-color:var(--solid-r); color:var(--solid-r); }@media (max-width:820px), (hover: none), (pointer: coarse){#cmep-senate-arc-native #path-controls{
    position:static;
    transform:none;
    margin-top:20px;
    margin-bottom:10px;
    justify-content:center;
    gap:16px;
  }#cmep-senate-arc-native .path-button{ width:96px;height:96px;font-size:0.8rem; }#cmep-senate-arc-native .path-button span.close-icon{ font-size:1.6rem; }}
#cmep-senate-arc-native .mobile-path-majority{ display:none; }
@media (max-width:820px), (hover: none), (pointer: coarse){
  #cmep-senate-arc-native .mobile-path-majority{ display:none; margin-top:14px; }
  #cmep-senate-arc-native .mobile-path-majority.show{ display:block; width:100%; }
  #cmep-senate-arc-native .mobile-path-dots{ display:flex; align-items:flex-end; justify-content:center; gap:10px; margin:0 0 14px; padding:0 8px; }
  #cmep-senate-arc-native .mobile-path-dot{ width:16px; height:16px; border-radius:999px; border:2px solid color-mix(in srgb, var(--dot-color, rgba(148,163,184,0.45)) 80%, rgba(255,255,255,0.18)); background:color-mix(in srgb, var(--dot-color, rgba(148,163,184,0.28)) 34%, transparent); box-shadow:0 6px 16px rgba(15,23,42,0.12); transition:transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med), background-color var(--transition-med); padding:0; cursor:pointer; }
  #cmep-senate-arc-native .mobile-path-dot.active{ transform:translateY(-2px) scale(1.12); box-shadow:0 10px 22px rgba(15,23,42,0.18); background:var(--dot-color, rgba(148,163,184,0.45)); border-color:var(--dot-color, rgba(148,163,184,0.45)); }
  #cmep-senate-arc-native .mobile-path-dot.majority-maker{ border-color:var(--flip-gold); }
  #cmep-senate-arc-native .mobile-path-dot.majority-maker.active{ box-shadow:0 0 0 3px rgba(246,206,70,0.22), 0 10px 22px rgba(15,23,42,0.18); }
  #cmep-senate-arc-native .mobile-path-cards{ display:flex; gap:12px; overflow-x:auto; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch; padding:2px 8px 6px; scrollbar-width:none; }
  #cmep-senate-arc-native .mobile-path-cards::-webkit-scrollbar{ display:none; }
  #cmep-senate-arc-native .mobile-path-card{ flex:0 0 min(320px, calc(100% - 16px)); width:min(320px, calc(100% - 16px)); max-width:calc(100% - 16px); min-width:0; box-sizing:border-box; scroll-snap-align:center; padding:0.7rem 0.8rem; border-radius:20px; border:1px solid var(--border-subtle); background:rgba(255,255,255,0.94); color:var(--text-main); box-shadow:var(--shadow-soft); font-size:0.9rem; }
  #cmep-senate-arc-native .mobile-path-card{ cursor:pointer; -webkit-tap-highlight-color:transparent; }
  #cmep-senate-arc-native .mobile-path-card:active{ transform:scale(0.995); }
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))){
    #cmep-senate-arc-native .mobile-path-card{ -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); }
  }
  #cmep-senate-arc-native .mobile-path-card.majority-maker{ border:2px solid var(--flip-gold); box-shadow:0 0 0 3px rgba(246,206,70,0.12), var(--shadow-soft); }
  @media (prefers-color-scheme: dark){
    #cmep-senate-arc-native .mobile-path-card{ background:rgba(2,6,23,0.9); border-color:rgba(255,255,255,0.14); }
  }
}
@keyframes cmep-path-bloom{
  0%{transform:scale(0.98);opacity:0.92}
  55%{transform:scale(1.03);opacity:1}
  100%{transform:scale(1);opacity:1}
}#cmep-senate-arc-native .seat.cmep-bloom{ animation:cmep-path-bloom 420ms cubic-bezier(0.22,0.61,0.36,1); }@keyframes cmep-path-pulse{ 0%{filter:brightness(1)} 40%{filter:brightness(1.55)} 100%{filter:brightness(1)} }#cmep-senate-arc-native .seat.cmep-pulsing{ animation:cmep-path-pulse 420ms ease-out; }@keyframes cmep-settle{ 0%{transform:scale(0.94)} 55%{transform:scale(1.08)} 100%{transform:scale(1)} }#cmep-senate-arc-native .seat.cmep-settle{ animation:cmep-settle 360ms cubic-bezier(0.18,0.89,0.32,1.28); }@keyframes cmep-majority-pulse{
  0%{filter:drop-shadow(0 0 0 rgba(246,206,70,0))}
  35%{filter:drop-shadow(0 0 11px rgba(246,206,70,0.85))}
  100%{filter:drop-shadow(0 0 0 rgba(246,206,70,0))}
}#cmep-senate-arc-native .seat.majority-seat.cmep-majority-pulse{ animation:cmep-majority-pulse 760ms ease-out; }#cmep-senate-arc-native #mm-halo{
  fill:none;
  stroke:var(--flip-gold);
  stroke-width:2.0;
  opacity:0;
  pointer-events:none;
  filter:drop-shadow(0 0 8px rgba(246,206,70,0.45));
}@keyframes cmep-halo-pop{
  0%{transform:scale(0.85);opacity:0}
  35%{transform:scale(1.22);opacity:0.95}
  70%{transform:scale(1.00);opacity:0.55}
  100%{transform:scale(0.85);opacity:0}
}#cmep-senate-arc-native #mm-halo.pop{ animation:cmep-halo-pop 520ms ease-out; }@media (prefers-reduced-motion: reduce){#cmep-senate-arc-native .seat{ transition:none !important; }#cmep-senate-arc-native .seat.cmep-bloom, #cmep-senate-arc-native .seat.cmep-pulsing, #cmep-senate-arc-native .seat.cmep-settle, #cmep-senate-arc-native .seat.majority-seat.cmep-majority-pulse, #cmep-senate-arc-native #mm-halo.pop{ animation:none !important; }#cmep-senate-arc-native .path-banner{ transition:none !important; }}#cmep-senate-arc-native .cmep-share-row{
  max-width:1100px;
  margin:6px auto 10px;
  padding:0 12px;
  display:flex;
  justify-content:center;
}#cmep-senate-arc-native #cmep-share-image{
  border:0;
  border-radius:999px;
  padding:10px 14px;
  font-size:0.9rem;
  font-weight:900;
  letter-spacing:0.02em;
  color:#fff;
  background:var(--toss-up);
  box-shadow:var(--shadow-soft);
  cursor:pointer;
  transition:transform var(--transition-med), box-shadow var(--transition-med), opacity var(--transition-fast);
}#cmep-senate-arc-native #cmep-share-image:hover{ transform:translateY(-1px); }#cmep-senate-arc-native #cmep-share-image:active{ transform:translateY(0px) scale(0.98); opacity:0.95; }#cmep-senate-arc-native .cmep-share-stack{
  max-width:1100px;
  margin:12px auto 10px;
  padding:0 12px;
  display:none;
  box-sizing:border-box;
}#cmep-senate-arc-native .cmep-share-stack-inner{
  background:var(--bg-card);
  border:1px solid var(--border-subtle);
  border-radius:18px;
  box-shadow:var(--shadow-subtle);
  overflow:hidden;
}#cmep-senate-arc-native .cmep-share-top{
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}#cmep-senate-arc-native .cmep-share-left{ display:flex; align-items:center; gap:10px; }#cmep-senate-arc-native .cmep-share-logo{
  width:34px;
  height:34px;
  border-radius:999px;
  flex:0 0 auto;
}#cmep-senate-arc-native #cmep-share-updated{
  font-size:0.78rem;
  font-weight:900;
  color:var(--text-muted);
  white-space:nowrap;
  margin-left:auto;
}#cmep-senate-arc-native .cmep-share-bottom{
  padding:8px 12px;
  border-top:1px solid var(--border-subtle);
  font-size:0.82rem;
  font-weight:900;
  letter-spacing:0.02em;
  color:var(--text-muted);
  text-align:center;
}#cmep-senate-arc-native .cmep-sharing .cmep-share-stack{ display:block; }#cmep-senate-arc-native .cmep-sharing #cmep-share-image{ display:none !important; }#cmep-senate-arc-native .cmep-sharing #tooltip{ display:none !important; }#cmep-senate-arc-native .cmep-sharing #path-controls, #cmep-senate-arc-native .cmep-sharing #path-separator, #cmep-senate-arc-native .cmep-sharing #path-banner, #cmep-senate-arc-native .cmep-sharing #path-explainer{ display:none !important; }@media (max-width:520px){#cmep-senate-arc-native #cmep-share-updated{
    width:100%;
    margin-left:0;
    white-space:normal;
  }#cmep-senate-arc-native .cmep-share-bottom{
    text-align:left;
  }}



  /* Native widget hosts */
  .cmep-native-widget{display:block;width:100%;}
  #cmep-house-seats-native{margin-top: 1.25rem;}
  #cmep-senate-seats-native{margin-top: 1.25rem;}


/* =========================
   NATIVE HOUSE ARC (homepage inline)
   (copied from house.html, scoped to #cmep-house-arc-native)
   ========================= */
@keyframes cmepDrop{
  from{ opacity: 0; transform: translateY(-6px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* =========================
   NATIVE HOUSE ARC (inline)
   ========================= */
#cmep-house-arc-native{
  --solid-d:#0076BA; --likely-d:#00A2FF; --lean-d:#56C1FF; --toss-up:#929292;
  --lean-r:#FF968D;  --likely-r:#FF644E; --solid-r:#EE220C;
  --flip-gold:#F6CE46;

  --bg-page:#f3f4f6; --bg-card:#ffffff; --border-subtle:#d4d4d8;
  --text-main:#111827; --text-muted:#6b7280; --text-strong:#000000;

  --radius-card:24px; --radius-pill:999px;
  --shadow-soft:0 18px 40px rgba(15,23,42,0.10);
  --shadow-subtle:0 1px 3px rgba(15,23,42,0.15);

  --transition-fast:150ms ease-out;
  --transition-med:220ms cubic-bezier(0.22,0.61,0.36,1);
}

@media (prefers-color-scheme: dark){
#cmep-house-arc-native{
    --bg-page:#020617; --bg-card:#020617; --border-subtle:#1f2937;
    --text-main:#e5e7eb; --text-muted:#9ca3af; --text-strong:#f9fafb;
    --shadow-soft:0 18px 40px rgba(0,0,0,0.85);
    --shadow-subtle:0 1px 3px rgba(0,0,0,0.6);
  }
}

/* Layout */
#cmep-house-arc-native{
  margin:0;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Arial,sans-serif;
  background:var(--bg-page);
  color:var(--text-main);
}

#cmep-house-arc-native .arc-wrap{
  max-width:1100px;
  margin:0 auto 24px;
  padding:0 12px 24px;
  box-sizing:border-box;
  position:relative;
  /* Enable container-query based scaling so Path buttons respond to card width (not viewport). */
  container-type:inline-size;
}

/* Legend */
#cmep-house-arc-native .legend{
  max-width:1100px;
  margin:10px auto 8px;
  padding:0 12px;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
}

#cmep-house-arc-native .legend-item{
  display:inline-flex;
  align-items:center;
  padding:6px 12px;
  border-radius:var(--radius-pill);
  font-size:0.8rem;
  font-weight:800;
  letter-spacing:0.03em;
  color:#fff;
  box-shadow:var(--shadow-subtle);
}

/* Path label */
#cmep-house-arc-native .path-separator-line{
  width:100%;
  max-width:1100px;
  margin:8px auto 12px;
  border-bottom:2px solid var(--border-subtle);
  display:none;
}

#cmep-house-arc-native .path-banner{
  max-width:1100px;
  margin:0 auto 4px;
  padding:0 12px;
  display:flex;
  justify-content:center;
  align-items:center;
  font-weight:900;
  font-size:1.05rem;
  min-height:1.4em;

  opacity:0;
  transform:translateY(4px);
  transition:opacity 220ms ease, transform 260ms cubic-bezier(0.22,0.61,0.36,1);
}

#cmep-house-arc-native .path-banner.show{
  opacity:1;
  transform:translateY(0);
}

#cmep-house-arc-native .path-banner .path-pill{
  display:inline-block;
  padding:6px 14px;
  border-radius:var(--radius-pill);
  color:#fff;
  font-weight:900;
  letter-spacing:0.01em;
}

#cmep-house-arc-native .path-banner .path-pill.dem{ background:var(--solid-d); }

#cmep-house-arc-native .path-banner .path-pill.gop{ background:var(--solid-r); }

#cmep-house-arc-native .path-explainer{
  max-width:1100px;
  margin:0 auto 16px;
  padding:0 12px;
  text-align:center;
  font-size:0.85rem;
  color:var(--text-muted);
  min-height:1.4em;
}

/* Base seat motion */
#cmep-house-arc-native .seat{
  cursor:pointer;
  transition:
    cx 420ms cubic-bezier(0.22,0.61,0.36,1),
    cy 620ms cubic-bezier(0.18,0.89,0.32,1.18),
    r  320ms cubic-bezier(0.22,0.61,0.36,1),
    opacity var(--transition-fast);
  will-change: cx, cy, r, opacity;
}

.seat, #cmep-house-arc-mm-halo{
  transform-box:fill-box;
  transform-origin:center;
}

/* smoother “flight” for the currently moving dot */
#cmep-house-arc-native .seat.cmep-stackflight{
  transition:
    cx 560ms cubic-bezier(0.22,0.61,0.36,1),
    cy 920ms cubic-bezier(0.18,0.89,0.32,1.10),
    r  360ms cubic-bezier(0.22,0.61,0.36,1),
    opacity var(--transition-fast);
}

/* Path highlighting (no DOM reordering needed) */
#cmep-house-arc-native .seat.dem-path{ filter:drop-shadow(0 0 5px rgba(0,118,186,0.9)); }

#cmep-house-arc-native .seat.gop-path{ filter:drop-shadow(0 0 5px rgba(238,34,12,0.9)); }

#cmep-house-arc-native .seat.dem-path, #cmep-house-arc-native .seat.gop-path{
  stroke: rgba(255,255,255,0.28);
  stroke-width: 0.6;
}

/* Ensure path highlight stroke never overrides the Majority Maker outline */
#cmep-house-arc-native .seat.majority-seat.dem-path,
#cmep-house-arc-native .seat.majority-seat.gop-path{
  stroke: var(--flip-gold) !important;
  stroke-width: 1.8 !important;
}

#cmep-house-arc-native .seat.path-muted{ opacity:0.20; pointer-events:none; }


/* Tooltip */
#cmep-house-arc-tooltip{
  position:absolute;
  min-width: 220px;
  max-width: min(320px, calc(100% - 16px));
  padding: 0.7rem 0.8rem;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.94);
  color: var(--text-main);
  box-shadow: var(--shadow-soft);
  pointer-events:none;
  font-size:0.9rem;
  display:none;
  z-index:9999;
  transform: translate(-50%, -115%);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))){
  #cmep-house-arc-tooltip{
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}
@media (prefers-color-scheme: dark){
  #cmep-house-arc-tooltip{
    background: rgba(2,6,23,0.9);
    border-color: rgba(255,255,255,0.14);
  }
}
#cmep-house-arc-tooltip strong, #cmep-house-arc-native .mobile-path-card strong{ font-weight:800; color:var(--text-strong); }
#cmep-house-arc-tooltip .ct-head, #cmep-house-arc-native .mobile-path-card .ct-head{ font-weight:900; font-size:0.95rem; letter-spacing:-0.01em; color:var(--text-strong); margin:0 0 0.35rem; }
#cmep-house-arc-tooltip .ct-summary, #cmep-house-arc-native .mobile-path-card .ct-summary{ display:flex; flex-wrap:wrap; gap:0.35rem; margin:0 0 0.45rem; }
#cmep-house-arc-tooltip .ct-chip, #cmep-house-arc-native .mobile-path-card .ct-chip{
  display:inline-flex; align-items:center; justify-content:center;
  padding:0.18rem 0.5rem; border-radius:999px;
  border:1px solid var(--border-subtle); background:var(--bg-card-subtle);
  color:var(--text-muted); font-size:0.72rem; font-weight:800; line-height:1.1;
}
#cmep-house-arc-tooltip .ct-chip.solid-D, #cmep-house-arc-native .mobile-path-card .ct-chip.solid-D{ background:var(--solid-d); border-color:transparent; color:#fff; }
#cmep-house-arc-tooltip .ct-chip.likely-D, #cmep-house-arc-native .mobile-path-card .ct-chip.likely-D{ background:var(--likely-d); border-color:transparent; color:#fff; }
#cmep-house-arc-tooltip .ct-chip.lean-D, #cmep-house-arc-native .mobile-path-card .ct-chip.lean-D{ background:var(--lean-d); border-color:transparent; color:#fff; }
#cmep-house-arc-tooltip .ct-chip.toss-up, #cmep-house-arc-native .mobile-path-card .ct-chip.toss-up{ background:var(--toss-up); border-color:transparent; color:#fff; }
#cmep-house-arc-tooltip .ct-chip.lean-R, #cmep-house-arc-native .mobile-path-card .ct-chip.lean-R{ background:var(--lean-r); border-color:transparent; color:#fff; }
#cmep-house-arc-tooltip .ct-chip.likely-R, #cmep-house-arc-native .mobile-path-card .ct-chip.likely-R{ background:var(--likely-r); border-color:transparent; color:#fff; }
#cmep-house-arc-tooltip .ct-chip.solid-R, #cmep-house-arc-native .mobile-path-card .ct-chip.solid-R{ background:var(--solid-r); border-color:transparent; color:#fff; }
#cmep-house-arc-tooltip .ct-rows, #cmep-house-arc-native .mobile-path-card .ct-rows{ display:grid; gap:0.36rem; }
#cmep-house-arc-tooltip .ct-row, #cmep-house-arc-native .mobile-path-card .ct-row{ display:flex; align-items:center; justify-content:space-between; gap:0.8rem; }
#cmep-house-arc-tooltip .ct-left, #cmep-house-arc-native .mobile-path-card .ct-left{ min-width:0; display:flex; flex-direction:column; gap:0.06rem; }
#cmep-house-arc-tooltip .ct-name, #cmep-house-arc-native .mobile-path-card .ct-name{ font-weight:850; color:var(--text-strong); line-height:1.15; }
#cmep-house-arc-tooltip .ct-sub, #cmep-house-arc-native .mobile-path-card .ct-sub{ color:var(--text-muted); font-size:0.76rem; font-weight:700; line-height:1.15; }
#cmep-house-arc-tooltip .ct-right, #cmep-house-arc-native .mobile-path-card .ct-right{ text-align:right; white-space:nowrap; }
#cmep-house-arc-tooltip .ct-pct, #cmep-house-arc-native .mobile-path-card .ct-pct{ font-weight:900; font-variant-numeric:tabular-nums; }
#cmep-house-arc-tooltip .ct-pct.d, #cmep-house-arc-native .mobile-path-card .ct-pct.d{ color:var(--solid-d); }
#cmep-house-arc-tooltip .ct-pct.r, #cmep-house-arc-native .mobile-path-card .ct-pct.r{ color:var(--solid-r); }
#cmep-house-arc-tooltip.mobile{
  position:fixed;
  left:50%;
  right:auto;
  top:auto;
  bottom:24px;
  width:min(320px, calc(100% - 16px));
  max-width:calc(100% - 16px);
  min-width:0;
  transform:translateX(-50%);
  pointer-events:auto;
  border-radius:20px;
}
@supports (padding-bottom: env(safe-area-inset-bottom)){
  #cmep-house-arc-tooltip.mobile{ bottom:calc(env(safe-area-inset-bottom) + 20px); }
}

/* Path controls */
#cmep-house-arc-path-controls{
  position:absolute;
  left:50%;
  bottom:8%;
  transform:translateX(-50%);
  display:flex;
  gap:24px;
  pointer-events:none;
}

#cmep-house-arc-native .path-button{
  width:120px;height:120px;
  border-radius:50%;
  border:4px solid rgba(255,255,255,0.9);
  background:#000;
  color:#fff;
  box-shadow:var(--shadow-soft);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:0.9rem;
  font-weight:900;
  cursor:pointer;
  pointer-events:auto;
  transition:
    transform var(--transition-med),
    box-shadow var(--transition-med),
    background-color var(--transition-med),
    border-color var(--transition-med),
    color var(--transition-med);
}

/* Responsive Path buttons (card-width aware):
   The homepage grid can shrink the widget while the viewport stays wide.
   Use container query units so buttons shrink with the arc, and drop below the arc when the widget is narrow. */
@supports (width: 1cqi){
  #cmep-house-arc-path-controls{ gap:clamp(12px, 6cqi, 24px); }
  #cmep-house-arc-native .path-button{
    width:clamp(84px, 20cqi, 120px);
    height:clamp(84px, 20cqi, 120px);
    font-size:clamp(0.76rem, 2.4cqi, 0.9rem);
    border-width:clamp(3px, 0.7cqi, 4px);
  }
  #cmep-house-arc-native .path-button span.close-icon{ font-size:clamp(1.55rem, 4.6cqi, 1.9rem); }
}

@container (max-width: 540px){
  #cmep-house-arc-path-controls{
    position:static;
    transform:none;
    margin-top:20px;
    margin-bottom:10px;
    justify-content:center;
    gap:16px;
  }
  #cmep-house-arc-native .path-button{ width:96px; height:96px; font-size:0.8rem; }
  #cmep-house-arc-native .path-button span.close-icon{ font-size:1.6rem; }
}

#cmep-house-arc-native .path-button.path-dem{ background:var(--solid-d); }

#cmep-house-arc-native .path-button.path-gop{ background:var(--solid-r); }

#cmep-house-arc-native .path-button span.label{ pointer-events:none; letter-spacing:0.03em; }

#cmep-house-arc-native .path-button span.close-icon{ display:none; font-size:1.9rem; line-height:1; pointer-events:none; }

#cmep-house-arc-native .path-button:hover{ transform:translateY(-1px) scale(1.02); box-shadow:0 22px 45px rgba(15,23,42,0.18); }

#cmep-house-arc-native .path-button.active{ background:transparent; box-shadow:0 0 0 2px rgba(15,23,42,0.15); }

#cmep-house-arc-native .path-button.active span.label{ display:none; }

#cmep-house-arc-native .path-button.active span.close-icon{ display:block; }

#cmep-house-arc-native .path-button.path-dem.active{ border-color:var(--solid-d); color:var(--solid-d); }

#cmep-house-arc-native .path-button.path-gop.active{ border-color:var(--solid-r); color:var(--solid-r); }

@media (max-width:820px), (hover: none), (pointer: coarse){
  #cmep-house-arc-path-controls{ bottom:10%; gap:16px; }
  #cmep-house-arc-native .path-button{ width:96px; height:96px; font-size:0.8rem; }
  #cmep-house-arc-native .path-button span.close-icon{ font-size:1.6rem; }
}

#cmep-house-arc-native .mobile-path-majority{ display:none; }
@media (max-width:820px), (hover: none), (pointer: coarse){
  #cmep-house-arc-native .mobile-path-majority{ display:none; margin-top:14px; }
  #cmep-house-arc-native .mobile-path-majority.show{ display:block; width:100%; }
  #cmep-house-arc-native .mobile-path-dots{ display:flex; align-items:flex-end; justify-content:center; gap:9px; margin:0 0 14px; padding:0 8px; }
  #cmep-house-arc-native .mobile-path-dot{ width:14px; height:14px; border-radius:999px; border:2px solid color-mix(in srgb, var(--dot-color, rgba(148,163,184,0.45)) 80%, rgba(255,255,255,0.18)); background:color-mix(in srgb, var(--dot-color, rgba(148,163,184,0.28)) 34%, transparent); box-shadow:0 6px 16px rgba(15,23,42,0.12); transition:transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med), background-color var(--transition-med); padding:0; cursor:pointer; }
  #cmep-house-arc-native .mobile-path-dot.active{ transform:translateY(-2px) scale(1.12); box-shadow:0 10px 22px rgba(15,23,42,0.18); background:var(--dot-color, rgba(148,163,184,0.45)); border-color:var(--dot-color, rgba(148,163,184,0.45)); }
  #cmep-house-arc-native .mobile-path-dot.majority-maker{ border-color:var(--flip-gold); }
  #cmep-house-arc-native .mobile-path-dot.majority-maker.active{ box-shadow:0 0 0 3px rgba(246,206,70,0.22), 0 10px 22px rgba(15,23,42,0.18); }
  #cmep-house-arc-native .mobile-path-cards{ display:flex; gap:12px; overflow-x:auto; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch; padding:2px 8px 6px; scrollbar-width:none; }
  #cmep-house-arc-native .mobile-path-cards::-webkit-scrollbar{ display:none; }
  #cmep-house-arc-native .mobile-path-card{ flex:0 0 min(320px, calc(100% - 16px)); width:min(320px, calc(100% - 16px)); max-width:calc(100% - 16px); min-width:0; box-sizing:border-box; scroll-snap-align:center; padding:0.7rem 0.8rem; border-radius:20px; border:1px solid var(--border-subtle); background:rgba(255,255,255,0.94); color:var(--text-main); box-shadow:var(--shadow-soft); font-size:0.9rem; }
  #cmep-house-arc-native .mobile-path-card{ cursor:pointer; -webkit-tap-highlight-color:transparent; }
  #cmep-house-arc-native .mobile-path-card:active{ transform:scale(0.995); }
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))){
    #cmep-house-arc-native .mobile-path-card{ -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); }
  }
  #cmep-house-arc-native .mobile-path-card.majority-maker{ border:2px solid var(--flip-gold); box-shadow:0 0 0 3px rgba(246,206,70,0.12), var(--shadow-soft); }
  @media (prefers-color-scheme: dark){
    #cmep-house-arc-native .mobile-path-card{ background:rgba(2,6,23,0.9); border-color:rgba(255,255,255,0.14); }
  }
}

@media (max-width:820px), (hover: none), (pointer: coarse){
  #cmep-house-arc-path-controls{
    position:static;
    transform:none;
    margin-top:20px;
    margin-bottom:10px;
    justify-content:center;
  }
}

#cmep-house-arc-native .seat.cmep-bloom{ animation:cmep-path-bloom 420ms cubic-bezier(0.22,0.61,0.36,1); }
/* Container-query responsive Path buttons (fix overlap when cards shrink on desktop) */
@supports (container-type: inline-size){

  /* Enable container queries on each arc wrapper */
  #cmep-house-arc-native .arc-wrap{
    container-type: inline-size;
    container-name: cmep-house-arc;
  }
  #cmep-senate-arc-native .arc-wrap{
    container-type: inline-size;
    container-name: cmep-senate-arc;
  }

  /* HOUSE: scale buttons down when the arc container gets narrow (even if viewport is wide) */
  @container cmep-house-arc (max-width: 720px){
    #cmep-house-arc-path-controls{ bottom:10%; gap:16px; }
    #cmep-house-arc-native .path-button{ width:96px; height:96px; font-size:0.8rem; }
    #cmep-house-arc-native .path-button span.close-icon{ font-size:1.6rem; }
  }
  @container cmep-house-arc (max-width: 600px){
    #cmep-house-arc-path-controls{
      position:static;
      transform:none;
      margin-top:20px;
      margin-bottom:10px;
      justify-content:center;
      gap:16px;
    }
  }
  @container cmep-house-arc (max-width: 420px){
    #cmep-house-arc-native .path-button{ width:84px; height:84px; font-size:0.75rem; border-width:3px; }
  }

  /* SENATE: same behavior as House, but scoped to the senate widget IDs */
  @container cmep-senate-arc (max-width: 720px){
    #cmep-senate-arc-native #path-controls{ bottom:10%; gap:16px; }
    #cmep-senate-arc-native .path-button{ width:96px; height:96px; font-size:0.8rem; }
    #cmep-senate-arc-native .path-button span.close-icon{ font-size:1.6rem; }
  }
  @container cmep-senate-arc (max-width: 600px){
    #cmep-senate-arc-native #path-controls{
      position:static;
      transform:none;
      margin-top:20px;
      margin-bottom:10px;
      justify-content:center;
      gap:16px;
    }
  }
  @container cmep-senate-arc (max-width: 420px){
    #cmep-senate-arc-native .path-button{ width:84px; height:84px; font-size:0.75rem; border-width:3px; }
  }
}

@keyframes cmep-path-pulse{ 0%{filter:brightness(1)} 40%{filter:brightness(1.55)} 100%{filter:brightness(1)} }

#cmep-house-arc-native .seat.cmep-pulsing{ animation:cmep-path-pulse 420ms ease-out; }

@keyframes cmep-settle{ 0%{transform:scale(0.94)} 55%{transform:scale(1.08)} 100%{transform:scale(1)} }

#cmep-house-arc-native .seat.cmep-settle{ animation:cmep-settle 360ms cubic-bezier(0.18,0.89,0.32,1.28); }

@keyframes cmep-majority-pulse{
  0%{filter:drop-shadow(0 0 0 rgba(246,206,70,0))}
  35%{filter:drop-shadow(0 0 11px rgba(246,206,70,0.85))}
  100%{filter:drop-shadow(0 0 0 rgba(246,206,70,0))}
}

#cmep-house-arc-native .seat.majority-seat.cmep-majority-pulse{ animation:cmep-majority-pulse 760ms ease-out; }

@keyframes cmep-halo-pop{
  0%{transform:scale(0.85);opacity:0}
  35%{transform:scale(1.22);opacity:0.95}
  70%{transform:scale(1.00);opacity:0.55}
  100%{transform:scale(0.85);opacity:0}
}

/* Share (exports legend + path pill + arc; excludes buttons) */
#cmep-house-arc-native .cmep-share-row{
  max-width:1100px;
  margin:8px auto 0;
  padding:0 12px;
  display:flex;
  justify-content:center;
  align-items:center;
}

#cmep-house-arc-native .cmep-share-btn{
  appearance:none;
  border:1px solid var(--border-subtle);
  background:var(--bg-card);
  color:var(--text-main);
  padding:8px 12px;
  border-radius:999px;
  font-weight:900;
  font-size:0.85rem;
  letter-spacing:0.02em;
  box-shadow:var(--shadow-subtle);
  cursor:pointer;
  transition:transform var(--transition-med), box-shadow var(--transition-med), background-color var(--transition-med);
}

#cmep-house-arc-native .cmep-share-btn:hover{ transform:translateY(-1px); box-shadow:var(--shadow-soft); }

#cmep-house-arc-native .cmep-share-btn:active{ transform:translateY(0px) scale(0.99); }

#cmep-house-arc-native .cmep-share-btn[disabled]{ opacity:0.65; cursor:not-allowed; }

@media (max-width:820px), (hover: none), (pointer: coarse){
  .cmep-share-row{ justify-content:center; }
}

/* Card-share mode: hide any in-widget share UI */
#cmep-share-btn, #cmep-share-button, .cmep-share-btn{ display:none !important; }

/* ===== Share (Image) — CM unified (House/Senate) ===== */
#cmep-house-arc-native .cmep-share-row{
  max-width:1100px;
  margin:6px auto 10px;
  padding:0 12px;
  display:flex;
  justify-content:center;
}

#cmep-house-arc-share-image{
  border:0;
  border-radius:999px;
  padding:10px 14px;
  font-size:0.9rem;
  font-weight:900;
  letter-spacing:0.02em;
  color:#fff;
  background:var(--toss-up);
  box-shadow:var(--shadow-soft);
  cursor:pointer;
  transition:transform var(--transition-med), box-shadow var(--transition-med), opacity var(--transition-fast);
}

#cmep-house-arc-share-image:hover{ transform:translateY(-1px); }

#cmep-house-arc-share-image:active{ transform:translateY(0px) scale(0.98); opacity:0.95; }

/* Share header stack only during capture */
#cmep-house-arc-native .cmep-share-stack{
  max-width:1100px;
  margin:12px auto 10px;
  padding:0 12px;
  display:none;
  box-sizing:border-box;
}

#cmep-house-arc-native .cmep-share-stack-inner{
  background:var(--bg-card);
  border:1px solid var(--border-subtle);
  border-radius:18px;
  box-shadow:var(--shadow-subtle);
  overflow:hidden;
}

#cmep-house-arc-native .cmep-share-top{
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

#cmep-house-arc-native .cmep-share-left{ display:flex; align-items:center; gap:10px; }

#cmep-house-arc-native .cmep-share-logo{
  width:34px;
  height:34px;
  border-radius:999px;
  flex:0 0 auto;
}

#cmep-house-arc-native .cmep-share-bottom{
  padding:8px 12px;
  border-top:1px solid var(--border-subtle);
  font-size:0.82rem;
  font-weight:900;
  letter-spacing:0.02em;
  color:var(--text-muted);
  text-align:center;
}

/* Share-mode toggles */
#cmep-house-arc-native .cmep-sharing .cmep-share-stack{ display:block; }

#cmep-house-arc-native .cmep-sharing #cmep-house-arc-share-image{ display:none !important; }

#cmep-house-arc-native .cmep-sharing #cmep-house-arc-tooltip{ display:none !important; }

/* Hide Path UI in snapshot only (keep visible normally) */
#cmep-house-arc-native .cmep-sharing #cmep-house-arc-path-controls,
#cmep-house-arc-native .cmep-sharing #cmep-house-arc-path-separator,
#cmep-house-arc-native .cmep-sharing #cmep-house-arc-path-banner,
#cmep-house-arc-native .cmep-sharing #cmep-house-arc-path-explainer{ display:none !important; }

@media (max-width:520px){
  #cmep-house-arc-share-updated{
    width:100%;
    margin-left:0;
    white-space:normal;
  }
  .cmep-share-bottom{
    text-align:left;
  }
}

#cmep-house-arc-native{ background: transparent !important; }

/* --- House arc: missing essentials (scoped) --- */
#cmep-house-arc-native svg{ width:100%; height:auto; display:block; }
#cmep-house-arc-native .leg-solid-D{background:var(--solid-d)}
#cmep-house-arc-native .leg-likely-D{background:var(--likely-d)}
#cmep-house-arc-native .leg-lean-D{background:var(--lean-d)}
#cmep-house-arc-native .leg-toss-up{background:var(--toss-up)}
#cmep-house-arc-native .leg-lean-R{background:var(--lean-r)}
#cmep-house-arc-native .leg-likely-R{background:var(--likely-r)}
#cmep-house-arc-native .leg-solid-R{background:var(--solid-r)}
#cmep-house-arc-native .leg-majority{background:#fff;color:#929292;border:2px solid var(--flip-gold);box-shadow:var(--shadow-subtle);}
#cmep-house-arc-native .leg-majority .ring{width:12px;height:12px;border-radius:50%;border:3px solid var(--flip-gold);display:inline-block;margin-right:6px;}

/* Seat colors (scoped) */
#cmep-house-arc-native .solid-D{fill:#0076BA}
#cmep-house-arc-native .likely-D{fill:#00A2FF}
#cmep-house-arc-native .lean-D{fill:#56C1FF}
#cmep-house-arc-native .toss-up{fill:#929292}
#cmep-house-arc-native .lean-R{fill:#FF968D}
#cmep-house-arc-native .likely-R{fill:#FF644E}
#cmep-house-arc-native .solid-R{fill:#EE220C}

#cmep-house-arc-native .majority-seat{stroke:var(--flip-gold);stroke-width:1.5;}

/* Gentle hover (desktop only) */
@media (hover:hover) and (pointer:fine){
  #cmep-house-arc-native .seat:hover{
    transform:scale(1.06);
    filter:drop-shadow(0 0 7px rgba(15,23,42,0.18));
  }
}

/* Halo: pop out then back in quickly (no lingering) */
#cmep-house-arc-mm-halo{
  fill:none;
  stroke:var(--flip-gold);
  stroke-width:2.0;
  opacity:0;
  pointer-events:none;
  filter:drop-shadow(0 0 8px rgba(246,206,70,0.45));
}
#cmep-house-arc-mm-halo.pop{ animation:cmep-halo-pop 520ms ease-out; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  #cmep-house-arc-native .seat{ transition:none !important; }
  #cmep-house-arc-native .seat.cmep-bloom,
  #cmep-house-arc-native .seat.cmep-pulsing,
  #cmep-house-arc-native .seat.cmep-settle,
  #cmep-house-arc-native .seat.majority-seat.cmep-majority-pulse,
  #cmep-house-arc-mm-halo.pop{ animation:none !important; }
  #cmep-house-arc-native .path-banner{ transition:none !important; }
}

/* ---------- ACCESSIBILITY / SEO ---------- */
.cmep-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
