/* 2028 primary pages (primary.js); the rest comes from /assets/styles.css */
.odds-head, .odds-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) 2fr 70px 70px; gap: 10px; align-items: center; }
.odds-row.two { grid-template-columns: minmax(120px, 1.2fr) 3fr; }
.odds-head { font-size: 12px; color: var(--muted); font-weight: 600; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.odds-row { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.odds-row .nm { font-weight: 600; }
.odds-row .nm small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.odds-row .bar { display: flex; align-items: center; gap: 8px; }
.odds-row .bar i { display: block; height: 14px; border-radius: 4px; min-width: 2px; }
.odds-row .bar b { font-family: var(--display); font-size: 15px; white-space: nowrap; }
.odds-head .num, .odds-row .num { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.trend-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.trend-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.trend-key .ln { color: var(--muted); }
.muted { color: var(--muted); }
#latest td { font-size: 13px; }
@media (max-width: 560px) {
  .odds-head, .odds-row { grid-template-columns: minmax(96px, 1fr) 1.5fr 52px 52px; gap: 6px; }
  .odds-row.two { grid-template-columns: minmax(96px, 1fr) 2fr; }
}

/* early-state polls: a rule above each state's first row */
#states tr.group-start td { border-top: 1px solid var(--border, rgba(127,127,127,.35)); }
#states tbody tr:first-child td { border-top: 0; }
#states td:nth-child(3) { white-space: nowrap; }

/* --- Nov 2026 additions: delegates, chart hover, polls, calendar, map and state tabs --- */
:root { --field: #8f8d85; }
.odds-row .bar em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tt-list { display: grid; grid-template-columns: 1fr auto auto; gap: 3px 10px; margin-top: 8px; font-size: 13px; align-items: baseline; }
.tt-list span { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tt-list i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.tt-list b { font-variant-numeric: tabular-nums; text-align: right; }
.tt-list em { font-style: normal; font-size: 11.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.xhair { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.card-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.field-note { margin-top: 16px; padding: 16px 18px; border-radius: 12px; background: var(--surface-2); scroll-margin-top: 80px; }
.field-note h3 { margin: 0 0 6px; font-size: 16px; }
.field-note p { margin: 0 0 14px; font-size: 14.5px; color: var(--ink-2); }
.fn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fn-grid > div { font-size: 13.5px; color: var(--ink-2); }
.fn-grid b { display: block; margin: 8px 0 2px; color: var(--ink); font-size: 14.5px; }
.dots { display: flex; gap: 5px; height: 30px; align-items: center; }
.dots i { width: 16px; height: 16px; border-radius: 50%; background: var(--grid); }
.dots i.on { background: var(--field); }
.fall { display: flex; align-items: center; gap: 8px; height: 30px; font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--ink); }
.fall i { flex: 0 1 60px; height: 0; border-top: 2px dashed var(--field); position: relative; }
.fall i::after { content: ""; position: absolute; right: -1px; top: -6px; border-left: 7px solid var(--field); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.now { height: 30px; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 30px; color: var(--ink); }
.more-btn { display: block; margin: 12px auto 0; padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; background: none; color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer; }
.more-btn:hover { background: var(--surface-2); }
.toggle-btn { padding: 5px 11px; border: 1px solid var(--axis); border-radius: 8px; background: none; color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.toggle-btn[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.tt-sub { color: var(--ink-2); font-size: 12.5px; margin-top: 1px; }
.tooltip.tt-fixed { width: 280px; }
.tt-list.mkt { grid-template-columns: 1fr 54px 54px; }
.tt-list { grid-template-columns: 1fr 58px; }
.tt-list u { text-decoration: none; font-size: 11px; color: var(--muted); text-align: right; }
.tt-list span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-foot { white-space: normal; }
.tooltip.tt-fixed .tt-foot { white-space: nowrap; }
.tt-rows { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-top: 8px; font-size: 13px; }
.tt-rows span { display: flex; align-items: center; gap: 7px; color: var(--ink-2); }
.tt-rows b { text-align: right; font-variant-numeric: tabular-nums; }
.tt-rows .dot { width: 10px; height: 10px; border-radius: 50%; }
.tt-rows .bar { width: 14px; height: 6px; border-radius: 2px; opacity: .45; }
.tt-rows .line { width: 2px; height: 12px; margin: 0 4px; background: var(--ink-2); }
.del-row { cursor: default; }

.del-wrap { position: relative; padding-top: 24px; }
#delegates { position: relative; --lab: minmax(84px, 120px); }
.del-row { display: grid; grid-template-columns: var(--lab) 1fr 58px; gap: 10px; align-items: center; padding: 7px 0; font-size: 14px; }
.del-row .nm { font-weight: 600; }
.del-row .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.del-track { position: relative; height: 14px; border-radius: 7px; background: var(--surface-2); }
.del-track .range { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; opacity: .35; min-width: 3px; }
.del-track .mean { position: absolute; top: 0; width: 14px; height: 14px; border-radius: 50%; margin-left: -7px; border: 2px solid var(--surface); }
.del-track .need { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); }
.contested { margin: 14px 0 0; font-size: 15px; color: var(--ink-2); }
.contested b { font-family: var(--display); font-size: 22px; color: var(--ink); margin-right: 4px; }

.polls, #latest { display: grid; gap: 0; }
.poll { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(0, 2.4fr) 92px; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: start; }
.poll.two { grid-template-columns: minmax(130px, 1fr) minmax(0, 2.8fr); }
.poll:last-child { border-bottom: 0; }
.poll-who b { display: inline; font-size: 14px; }
.poll-who small, .poll-wt small { display: block; color: var(--muted); font-size: 12px; text-wrap: balance; }
.poll-top { font-weight: 700; font-size: 14px; }
.poll-bars { display: flex; gap: 2px; height: 12px; margin: 5px 0 6px; border-radius: 3px; overflow: hidden; }
.poll-bars .und { background: var(--grid); }
.poll-names { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12.5px; color: var(--ink-2); }
.poll-names span, .poll-names a { display: inline-flex; align-items: center; gap: 5px; }
.poll-names i { width: 8px; height: 8px; border-radius: 2px; }
.poll-names b { color: var(--ink); font-variant-numeric: tabular-nums; }
.poll-wt { text-align: right; }
.poll-wt b { font-family: var(--display); font-size: 18px; }
.wt-bar { display: block; height: 4px; margin-top: 5px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.wt-bar i { display: block; height: 100%; background: var(--ink-2); margin-left: auto; }

.days { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; }
.day { display: flex; gap: 12px; flex: 0 0 auto; width: 232px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); scroll-snap-align: start; }
.day-date { flex: none; width: 54px; text-align: center; border-radius: 10px; background: #fff; color: #0b0b0b; border: 1px solid var(--border); padding: 6px 0 7px; align-self: start; }
.day-date span, .day-date small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.day-date b { display: block; font-family: var(--display); font-size: 26px; line-height: 1.05; }
.day-body { min-width: 0; flex: 1; }
.day h4, .month h4 { margin: 0 0 6px; font-size: 15px; }
.day-meta { margin: 7px 0 0; font-size: 12.5px; color: var(--ink-2); }
.day-note { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); text-wrap: balance; }
.pace { height: 5px; border-radius: 3px; background: var(--grid); overflow: hidden; }
.pace i { display: block; height: 100%; background: var(--ink-2); }
.day.big { width: auto; margin: 2px 2px 12px; padding: 18px; background: linear-gradient(120deg, var(--surface-2), var(--surface)); }
.day.big h4 { font-family: var(--display); font-size: 22px; }
.day.big .day-date { width: 66px; }
.st-tiles { display: flex; flex-wrap: wrap; gap: 4px; }
.st-tile { width: 34px; height: 30px; padding: 0; border: 0; border-radius: 7px; font: 700 12px/1 var(--display, inherit); cursor: pointer; }
.st-tile:hover, .st-tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.months { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 6px; }
@media (min-width: 621px) and (max-width: 900px) { .months { grid-template-columns: 1fr 1fr; } }
small { text-wrap: balance; }

.states-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
#map svg { width: 100%; height: auto; display: block; }
#map .st { stroke: var(--surface); stroke-width: 1; cursor: pointer; }
#map .ring { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
#map .ring.hov { stroke-width: 1.5; opacity: .8; }
.map-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); margin: 6px 0 10px; }
.map-key i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
#trend-state { border: 1px solid var(--border); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13.5px; }
.sp-head { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; margin-bottom: 8px; }
.sp-head h3 { margin: 0; font-size: 22px; font-family: var(--display); }
.sp-head span { font-size: 13px; color: var(--muted); }
#state-panel h4 { margin: 16px 0 2px; font-size: 14px; }
.breakdown th { font-size: 11.5px; font-weight: 600; color: var(--muted); vertical-align: bottom; }
.breakdown td { font-size: 13.5px; }
.breakdown .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.up { color: #19a979; font-weight: 600; } .down { color: #d6503b; font-weight: 600; }

@media (max-width: 620px) {
  .poll { grid-template-columns: minmax(0, 1fr) 92px; gap: 6px 10px; }
  .poll .poll-res { grid-column: 1 / -1; grid-row: 2; }
  .poll.two { grid-template-columns: 1fr; }
  .fn-grid { grid-template-columns: 1fr; gap: 12px; }
  .day { width: 208px; }
  #delegates { --lab: 92px; }
  .del-row { gap: 6px; font-size: 13px; }
}
.sp-win .odds-row { grid-template-columns: minmax(84px, 130px) 1fr 170px; }
.win-track { display: block; height: 14px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.win-track i { display: block; height: 100%; border-radius: 4px; }
.win-lab { font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.win-lab b { font-family: var(--display); font-size: 15px; color: var(--ink); }
@media (max-width: 620px) { .sp-win .odds-row { grid-template-columns: 84px 1fr; } .win-lab { grid-column: 1 / -1; text-align: left; } }
.breakdown td:first-child { white-space: nowrap; }
.en-head, .en-row { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr 64px 100px; gap: 10px; align-items: center; }
.en-head { font-size: 12px; color: var(--muted); font-weight: 600; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.en-row { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.en-row .nm { font-weight: 600; }
.en-row .bar { display: flex; align-items: center; gap: 8px; }
.en-row .bar i { display: block; height: 14px; border-radius: 4px; }
.en-row .bar b { font-family: var(--display); white-space: nowrap; }
.en-head .num, .en-row .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.en-head .num:last-child { text-align: left; }
.spark svg { display: block; }
@media (max-width: 620px) { .en-head, .en-row { grid-template-columns: minmax(84px, 1.1fr) 1.3fr 58px; } .en-head span:last-child, .en-row .spark { display: none; } }

/* phones */
@media (max-width: 620px) {
  .hero-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px; }
  .hero-stat { display: block !important; padding: 10px 10px 8px !important; }
  .hero-label { font-size: 12.5px; line-height: 1.25; min-height: 2.5em; }
  .hero-num { font-size: 30px !important; line-height: 1.1; }
  .hero-note { display: none; }
  .top-nav { flex-wrap: nowrap; overflow-x: auto; gap: 16px; margin: 0 -16px; padding: 2px 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .top-nav::-webkit-scrollbar { display: none; }
  .top-nav a { flex: none; }
  .card { padding-left: 14px; padding-right: 14px; }
  .odds-head, .odds-row { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 44px 44px; }
  .odds-row .nm { font-size: 13.5px; line-height: 1.25; }
  .odds-row .nm small { font-size: 11px; }
  .odds-row.two { grid-template-columns: 96px 1fr; }
  .odds-head { font-size: 11px; }
  .card-head { flex-wrap: wrap; row-gap: 6px; }
  .stack, .stack tbody, .stack tr, .stack td { display: block; width: 100%; }
  .stack thead { display: none; }
  .stack tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .stack td { padding: 2px 0; border: 0; display: flex; justify-content: space-between; gap: 12px; }
  .stack td.who { font-weight: 700; font-size: 14.5px; justify-content: flex-start; align-items: center; padding-bottom: 4px; }
  .stack td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 12.5px; }
  .stack td.tot { margin-top: 2px; }
  .stack td.zero { display: none; }
  .days { margin: 0 -14px; padding: 4px 14px 12px; }
  .day.big { flex-direction: column; }
  .day.big .day-date { display: flex; gap: 6px; align-items: baseline; justify-content: center; width: auto; padding: 5px 12px; align-self: flex-start; }
  .day.big .day-date b { font-size: 20px; }
  .st-tile { width: 38px; height: 34px; }
  .months { grid-template-columns: 1fr; }
  #trend { touch-action: pan-y; }
}
#map .lbl { font-weight: 700; }
#map .lead { stroke: var(--ink-2); stroke-width: 1; }
#map .lead-dot { fill: var(--ink); }
#map .box { cursor: pointer; }
.share-btn { padding: 4px 11px; border: 1px solid var(--axis); border-radius: 999px; background: none; color: var(--ink-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.share-btn:hover { color: var(--ink); border-color: var(--ink-2); }

/* candidate quality and profiles */
.q-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 16px; font-size: 14px; }
.q-bar[hidden] { display: none; }
.q-bar b { font-weight: 600; }
.q-bar .muted { font-size: 13px; }
.can-open { cursor: pointer; border-radius: 8px; margin-inline: -10px; padding-inline: 10px; transition: background-color .12s; }
.can-open:hover, .can-open:focus-visible { background: var(--surface-2); outline: none; }
.q-head, .q-row { display: grid; grid-template-columns: 108px minmax(90px, 1fr) repeat(var(--n, 8), minmax(0, 52px)); gap: 4px; align-items: center; }
.q-head { font-size: 11.5px; color: var(--muted); font-weight: 600; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.q-sig { text-align: center; font-size: 10px; white-space: nowrap; }
.q-row { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.q-row .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-score { display: flex; align-items: center; gap: 8px; }
.q-score b { width: 46px; text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
.q-track { position: relative; flex: 1; display: block; height: 16px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.q-track i { position: absolute; top: 0; bottom: 0; }
.q-track::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink-2); }
.q-cell { height: 20px; border-radius: 4px; text-align: center; line-height: 20px; color: var(--ink); font-size: 11.5px; font-variant-numeric: tabular-nums; }
#quality-note p { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-2); }
#profile { width: min(880px, calc(100vw - 48px)); max-width: none; height: auto; max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); overflow-y: auto; overscroll-behavior: contain; }
#profile[open] { animation: pf-in .22s cubic-bezier(.2, .8, .2, 1); }
#profile::backdrop { background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes pf-in { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #profile[open] { animation: none; } }
.pf-hero { position: relative; padding: 26px 24px 22px; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 34%, var(--surface)), var(--surface) 78%); }
.pf-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.pf-id { display: flex; align-items: center; gap: 14px; padding-right: 136px; }
.pf-mono { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--c); color: #fff; font: 800 20px/1 var(--display); letter-spacing: .02em; }
.pf-id h2 { margin: 0; font-family: var(--display); font-size: 25px; line-height: 1.1; }
.pf-id p { margin: 3px 0 0; color: var(--ink-2); font-size: 13.5px; }
.pf-big { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.pf-big b { font-family: var(--display); font-size: 56px; line-height: 1; letter-spacing: -.02em; }
.pf-big span { color: var(--ink-2); font-size: 14px; line-height: 1.35; }
.pf-big i { font-style: normal; color: var(--muted); font-size: 13px; }
.pf-body { padding: 4px 24px 26px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 28px; align-items: start; }
.pf-wide { grid-column: 1 / -1; }
.pf-col { display: grid; gap: 20px; min-width: 0; }
.pf-body section { min-width: 0; }
#profile h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pf-score { font-family: var(--display); font-size: 17px; letter-spacing: 0; }
.pf-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.pf-tile { padding: 12px 13px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.pf-tile b { display: block; font-family: var(--display); font-size: 24px; line-height: 1.1; }
.pf-tile span { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.pf-tile em { display: block; margin-top: 4px; font-style: normal; font-size: 11.5px; }
.pf-area svg { display: block; width: 100%; height: 110px; }
.pf-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.pf-sigs { display: grid; gap: 2px; }
.pf-sig { padding: 0; border-bottom: 1px solid var(--border); }
.pf-sig summary { display: grid; grid-template-columns: 10px minmax(0, 1fr) 26px 96px; gap: 10px; align-items: center; padding: 9px 0; cursor: pointer; list-style: none; font-size: 14px; }
.pf-sig summary::-webkit-details-marker { display: none; }
.pf-sig summary::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 4px 0 4px 6px; border-color: transparent transparent transparent var(--muted); transition: transform .12s; }
.pf-sig[open] summary::before { transform: rotate(90deg); }
.pf-name { font-weight: 600; }
.pf-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.pf-more { padding: 0 0 12px 20px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.pf-more p { margin: 0 0 8px; }
.pf-more ul { margin: 0 0 8px; padding-left: 16px; }
.pf-more li { margin-bottom: 3px; }
.pf-more > :last-child { margin-bottom: 0; }
.pf-expand { display: block; margin: 0 0 4px; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.pf-sig:last-child { border-bottom: 0; }
.pf-meter { position: relative; display: block; height: 12px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.pf-meter i { position: absolute; top: 0; bottom: 0; }
.pf-meter::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink-2); }
.pf-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px solid var(--border); }
.pf-list > div:last-child { border-bottom: 0; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-chips span { padding: 6px 11px; border-radius: 999px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
.pf-chips b { color: var(--ink); }
.pf-note { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.pf-text { margin: 0; font-size: 14px; color: var(--ink-2); }
#pf-share { justify-self: start; }
.q-defs { margin: 10px 0 0; padding: 0; list-style: none; columns: 2; column-gap: 22px; font-size: 13px; color: var(--ink-2); }
.q-defs li { break-inside: avoid; padding-bottom: 5px; }
.q-defs b { color: var(--ink); font-weight: 600; }
#delegates .del-row { transition: opacity .12s; }
#delegates .del-track .range, #delegates .del-track .mean { transition: opacity .12s, transform .12s; }
#delegates.picking .del-row:not(.on) { opacity: .4; }
.del-row.on .del-track .range { opacity: .7; }
.del-row.on .del-track .mean { transform: scale(1.35); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 25%, transparent); }
.del-row.on .nm { color: var(--ink); }
@media (max-width: 620px) {
  #profile { width: 100vw; height: auto; max-height: 94dvh; margin: auto 0 0; border-width: 1px 0 0; border-radius: 20px 20px 0 0; }
  .pf-body { grid-template-columns: minmax(0, 1fr); }
  #profile[open] { animation-name: pf-up; }
  .pf-hero { padding: 22px 18px 18px; }
  .pf-body { padding: 4px 18px 26px; }
  .pf-sig summary { grid-template-columns: 10px minmax(0, 1fr) 26px 88px; }
  .pf-big b { font-size: 48px; }
  .q-defs { columns: 1; }
  .can-open { margin-inline: -8px; padding-inline: 8px; }
  .q-head { grid-template-columns: repeat(var(--n, 8), minmax(0, 1fr)); }
  .q-wide { display: none; }
  .q-head { row-gap: 6px; }
  .q-sig { font-size: 9.5px; letter-spacing: -.1px; }
  .q-sig .q-long { display: none; }
  .q-sig .q-short { display: inline; }
  .q-head > span:first-child { grid-column: 1 / 4; }
  .q-head .q-scale { grid-column: 4 / -1; }
  .q-row { grid-template-columns: repeat(var(--n, 8), minmax(0, 1fr)); row-gap: 6px; }
  .q-row .nm { grid-column: 1 / 4; }
  .q-row .q-score { grid-column: 4 / -1; }
}
@keyframes pf-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
#profile:focus { outline: none; }

/* getting around: candidates open their profile, and notes link to what they raise */
.cand { color: inherit; text-decoration: none; }
.cand:hover, .cand:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
.poll-bars span[data-open] { cursor: pointer; transition: filter .12s; }
.poll-bars span[data-open]:hover { filter: brightness(1.18); }
.hero-stat.can-open { margin-inline: 0; padding-inline: 16px; transition: border-color .12s, background-color .12s; }
.hero-stat.can-open:hover, .hero-stat.can-open:focus-visible { border-color: var(--ink-2); background: var(--surface-2); }
.odds-head a, .breakdown th a { color: inherit; text-decoration: none; }
.odds-head a:hover, .breakdown th a:hover { color: var(--ink); text-decoration: underline; }
.sp-head a { color: inherit; }
.card[id], #latest, #field-note, [id^="m-"] { scroll-margin-top: 104px; }
@keyframes flash { from { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 35%, transparent); } to { box-shadow: 0 0 0 3px transparent; } }
.flash { animation: flash 1.6s ease-out; border-radius: 8px; }
.pf-arrows { position: absolute; top: 16px; right: 60px; display: flex; gap: 6px; }
.pf-arrows button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.pf-arrows button:hover { background: color-mix(in srgb, var(--ink) 22%, transparent); }
.pf-tile.go { display: block; width: 100%; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color .12s; }
.pf-tile.go:hover { background: var(--grid); }
.pf-chips button { padding: 6px 11px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.pf-chips button:hover { background: var(--grid); color: var(--ink); }
.pf-link { padding: 0; margin-top: 8px; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.pf-link:hover { color: var(--ink); }
.pf-big .pf-link { margin-top: 4px; }
.pf-list small { font-weight: 400; color: var(--muted); }

/* pollster grades, and the panel for the quality boxes */
.grade { display: inline-block; padding: 0 5px; border-radius: 4px; border: 1px solid var(--border); font-size: 11px; font-weight: 700; line-height: 16px; color: var(--ink-2); text-decoration: none; white-space: nowrap; vertical-align: 1px; }
.grade:hover { color: var(--ink); border-color: var(--ink-2); }
.grade.none { font-weight: 500; color: var(--muted); }
.q-cell { cursor: pointer; }
.q-cell.on { outline: 2px solid var(--ink); outline-offset: 1px; }
.q-sig { cursor: pointer; }
.q-sig.on { color: var(--ink); }
.tooltip.tt-q { width: 280px; min-height: 148px; }
.tt-q .tt-foot { white-space: normal; }
.tt-val { margin-top: 6px; font-weight: 600; }
.tt-verdict { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; }
.tt-verdict i { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* a calendar card for one state opens that state */
.day.can-pick { cursor: pointer; transition: border-color .12s, background-color .12s; }
.day.can-pick:hover, .day.can-pick:focus-visible { background: var(--surface-2); outline: none; }
#state-detail { width: min(920px, calc(100vw - 24px)); }

/* candidate photos, and the top three as short profiles */
.av { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--surface-2); color: #fff; font-size: 11px; font-weight: 700; }
.av.lg { width: 60px; height: 60px; font-size: 19px; }
.nm.with-av { display: flex; align-items: center; gap: 9px; min-width: 0; }
.pf-photo { width: 64px; height: 64px; flex: none; border-radius: 50%; object-fit: cover; object-position: top; box-shadow: 0 0 0 2px var(--c); }
.hero-stat.top3 { display: flex !important; flex-direction: column; gap: 8px; padding: 14px 16px !important; }
.t3-head { display: flex; align-items: center; gap: 11px; min-width: 0; }
.t3-head .hero-label { display: flex; align-items: baseline; gap: 6px; font-weight: 700; color: var(--ink); font-size: 15px; line-height: 1.2; }
.t3-role { margin-top: 2px; font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.top3 .hero-num { font-size: 38px; line-height: 1; }
.t3-stats { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.t3-stats b { display: block; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.t3-why { margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.t3-head .hero-label { margin: 0; }

/* ranks, and thin strips on phones */
.hero-stat.top3 { position: relative; }
.t3-rank { position: absolute; top: 10px; right: 14px; font: 800 36px/1 var(--display); color: var(--ink); }
.t3-head { padding-right: 34px; }
@media (max-width: 620px) {
  .hero-grid { grid-template-columns: 1fr !important; gap: 6px !important; }
  .hero-stat.top3 { flex-direction: row; align-items: center; gap: 10px; padding: 6px 12px !important; }
  .t3-rank { position: static; flex: none; width: 18px; font-size: 22px; text-align: center; }
  .t3-head { flex: 1; padding-right: 0; gap: 9px; }
  .av.lg { width: 34px; height: 34px; font-size: 12px; }
  .t3-head .hero-label { font-size: 14.5px; }
  .t3-role, .t3-stats, .t3-why { display: none; }
  .top3 .hero-num { font-size: 21px !important; line-height: 1; margin: 0 !important; }
  .t3-head .hero-label { line-height: 1.15; min-height: 0 !important; align-items: center; }
  .t3-head > div { display: flex; align-items: center; min-height: 34px; }
  .nm.with-av small { display: none; }
  .pf-hero { padding-top: 62px; }
  .pf-id { padding-right: 0; }
}
/* the button on a tapped panel, and room for the first calendar card */
.tt-more { display: block; width: 100%; margin-top: 8px; padding: 8px 10px; border: 0; border-radius: 8px; background: var(--ink); color: var(--surface); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.days { scroll-padding-inline: 14px; }
.day:first-child { margin-left: 8px; }

/* toggles don't move anything: the text for both settings keeps its space, whichever is showing */
.map-key { min-height: 22px; align-content: flex-start; }
.en-row { min-height: 45px; }
@media (max-width: 620px) { .map-key { min-height: 44px; } .en-row { min-height: 58px; } }
@media (max-width: 620px) { #odds .odds-row { min-height: 56px; } }

/* quality: a labeled scale; scrubbing shouldn't select text */
.q-scale { display: flex; justify-content: space-between; padding-right: 54px; }
.q-scale i { font-style: normal; }
.pf-scale { display: flex; justify-content: space-between; width: 96px; margin: 0 0 2px auto; font-size: 10.5px; color: var(--muted); }
@media (max-width: 620px) { .pf-scale { width: 88px; } }
[data-touchtip] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#map .lbl, #map .lead, #map .lead-dot { pointer-events: none; }

/* quality: room at the sides; a short panel for a column heading */
#quality { padding-inline: 12px; }
.tooltip.tt-q.tt-small { width: 220px; min-height: 0; }
/* calendar cards: delegates, who leads, and a labeled bar across the bottom */
.day { flex-wrap: wrap; align-content: flex-start; }
.day-body { flex: 1 1 0; }
.day h4 { margin-bottom: 3px; }
.day .day-meta { margin-top: 0; }
.day-lead { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.day-lead i { flex: none; width: 9px; height: 9px; border-radius: 3px; }
.pace-row { flex: 0 0 100%; align-self: flex-end; }
.pace-row span { display: block; margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.day.big .st-tiles { margin-bottom: 7px; }
@media (max-width: 620px) { .day { width: 224px; } }
.day.big .pace-row { flex: none; width: 100%; align-self: stretch; }

/* the Democratic/Republican switch, as on the 2026 pages */
.race-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.race-switch { display: inline-flex; gap: 2px; border: 1px solid var(--border); border-radius: 999px; padding: 2px; }
.race-switch a { padding: 2px 10px; border-radius: 999px; color: var(--ink-2); text-decoration: none; }
.race-switch a:hover { color: var(--ink); }
.race-switch a[aria-current="page"] { background: var(--ink); color: var(--page); }

/* the section menu sits on its own row, so it's in the same place on both primaries */
.header-row { display: block; }
.header-row .top-nav { margin-top: 10px; }


/* where a candidate stands: information only */
.pf-issues { display: grid; gap: 2px; }
.pf-issue { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.pf-issue b { display: block; font-size: 14px; font-weight: 600; }
.pf-issue small { display: block; color: var(--muted); font-size: 12.5px; }
.pf-issue small a { color: inherit; }
.pf-stance em { display: block; font-style: normal; font-size: 13px; font-weight: 600; }
#state-panel .news-list a { color: var(--ink); }

/* the settings row wraps between pairs, never between a label and its switch */
.q-pair { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.q-sig .q-short { display: none; }
/* sideways strips: a faded edge where there's more to see */
.fade-x.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
.fade-x.more-left { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px); mask-image: linear-gradient(to right, transparent, #000 36px); }
.fade-x.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
/* "What each one means" under the quality table */
.q-more { margin-top: 10px; font-size: 13.5px; }
.q-more summary { cursor: pointer; color: var(--ink-2); font-weight: 600; width: fit-content; }
.q-more[open] summary { margin-bottom: 4px; }
.q-more > p { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
@media (max-width: 620px) { .q-sig .q-short { display: inline; } .q-sig .q-long { display: none; } }

/* a top-three card's strongest and weakest factor: hover, focus or tap for what it means */
.t3-term { border-bottom: 1px dotted currentColor; cursor: help; }
.t3-term:focus-visible { outline: 2px solid var(--accent, #2a6fdb); outline-offset: 2px; border-radius: 2px; }
.q-defs .q-src { color: var(--muted); }
