/*
 * BBVote Core — structural front-end styles.
 * All colours/radii come from --bbv-* tokens declared with zero specificity, so any theme can restyle by setting
 * the same custom properties on :root.
 */
:where(:root) {
	--bbv-primary: #3b1678;
	--bbv-primary-strong: #2a0f57;
	--bbv-accent: #c2187a;
	--bbv-highlight: #ffc53d;
	--bbv-text: #17121f;
	--bbv-muted: #5c5668;
	--bbv-surface: #ffffff;
	--bbv-surface-2: #f6f2fb;
	--bbv-border: #e2d9ef;
	--bbv-success: #146c43;
	--bbv-warning: #8a5300;
	--bbv-error: #b42318;
	--bbv-radius: 16px;
	--bbv-radius-sm: 10px;
	--bbv-focus: 0 0 0 3px #fff, 0 0 0 6px var(--bbv-accent);
	--bbv-map-0: #ede7f8;
	--bbv-map-1: #cbb8ec;
	--bbv-map-2: #9b7ad6;
	--bbv-map-3: #6b3fb8;
	--bbv-map-4: #3b1678;
	--bbv-map-empty: #f1eff4;
	--bbv-map-stroke: #ffffff;
}

.bbv-poll, .bbv-rankings, .bbv-regional, .bbv-hub, .bbv-archive, .bbv-predictions, .bbv-contestant-extra {
	color: var(--bbv-text);
}
.bbv-poll *, .bbv-regional * { box-sizing: border-box; }
.bbv-poll [hidden], .bbv-regional [hidden] { display: none !important; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px;
	overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}

/* ---------- poll card ---------- */
.bbv-poll {
	background: var(--bbv-surface);
	border: 1px solid var(--bbv-border);
	border-radius: var(--bbv-radius);
	padding: clamp(1rem, 3vw, 1.75rem);
	margin: 0 0 1.5rem;
}
.bbv-poll__meta { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; margin: 0 0 .5rem; font-size: .85rem; color: var(--bbv-muted); }
.bbv-poll__title { margin: 0 0 .35rem; line-height: 1.2; }
.bbv-poll__title a { color: inherit; text-decoration: none; }
.bbv-poll__title a:hover { text-decoration: underline; }
.bbv-poll__dates { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0 0 1rem; font-size: .9rem; color: var(--bbv-muted); }
.bbv-badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; background: var(--bbv-surface-2); color: var(--bbv-primary); font-weight: 600; font-size: .78rem; letter-spacing: .02em; }
.bbv-status { display: inline-flex; gap: .3rem; align-items: center; font-weight: 600; font-size: .8rem; padding: .15rem .55rem; border-radius: 999px; border: 1px solid currentColor; }
.bbv-status--open { color: var(--bbv-success); }
.bbv-status--scheduled { color: var(--bbv-warning); }
.bbv-status--closed, .bbv-status--archived { color: var(--bbv-muted); }

.bbv-options { border: 0; margin: 0 0 1rem; padding: 0; min-width: 0; }
.bbv-options__legend { font-weight: 700; margin-bottom: .6rem; padding: 0; }
.bbv-options__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.bbv-poll--compact .bbv-options__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.bbv-poll--compact .bbv-option__label { padding: .6rem .4rem; }
.bbv-poll--compact .bbv-option__img, .bbv-poll--compact .bbv-option__initials { width: 48px; height: 48px; font-size: 1.2rem; }
.bbv-poll--compact .bbv-option__name { font-size: .9rem; }
.bbv-option { position: relative; }
.bbv-option__input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.bbv-option__label {
	display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center;
	padding: .8rem .6rem; border: 2px solid var(--bbv-border); border-radius: var(--bbv-radius-sm);
	background: var(--bbv-surface); cursor: pointer; height: 100%; position: relative;
	transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.bbv-option__img, .bbv-option__initials { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.bbv-option__initials { display: inline-grid; place-items: center; background: var(--bbv-surface-2); color: var(--bbv-primary); font-weight: 800; font-size: 1.6rem; }
.bbv-option__name { font-weight: 650; line-height: 1.2; }
.bbv-option__check { position: absolute; top: .45rem; right: .45rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 2px solid var(--bbv-border); background: var(--bbv-surface); }
.bbv-option__input:hover + .bbv-option__label { border-color: var(--bbv-primary); }
.bbv-option__input:checked + .bbv-option__label { border-color: var(--bbv-primary); background: var(--bbv-surface-2); }
.bbv-option__input:checked + .bbv-option__label .bbv-option__check { background: var(--bbv-primary); border-color: var(--bbv-primary); box-shadow: inset 0 0 0 3px var(--bbv-surface); }
.bbv-option__input:focus-visible + .bbv-option__label { box-shadow: var(--bbv-focus); }
.bbv-option__input:disabled + .bbv-option__label { opacity: .6; cursor: not-allowed; }

.bbv-region { margin: 0 0 1rem; border: 1px dashed var(--bbv-border); border-radius: var(--bbv-radius-sm); padding: .6rem .9rem; }
.bbv-region summary { cursor: pointer; font-weight: 600; }
.bbv-region__why { font-size: .85rem; color: var(--bbv-muted); margin: .5rem 0; }
.bbv-region__fields { display: grid; gap: .35rem; max-width: 420px; }
.bbv-region__fields select { width: 100%; }
.bbv-region select, .bbv-regional select, .bbv-inline-form select { min-height: 44px; padding: .4rem .6rem; border: 1px solid var(--bbv-border); border-radius: 8px; background: var(--bbv-surface); color: var(--bbv-text); font: inherit; max-width: 100%; }

.bbv-poll__actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.bbv-button {
	display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
	min-height: 44px; padding: .65rem 1.4rem; border-radius: 999px; border: 2px solid var(--bbv-primary);
	background: var(--bbv-primary); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
	transition: background-color .15s ease, transform .1s ease;
}
.bbv-button:hover { background: var(--bbv-primary-strong); color: #fff; }
.bbv-button:active { transform: translateY(1px); }
.bbv-button:focus-visible, .bbv-tab:focus-visible, .bbv-regional a:focus-visible { outline: none; box-shadow: var(--bbv-focus); }
.bbv-button[disabled] { opacity: .55; cursor: not-allowed; }
.bbv-button--ghost { background: transparent; color: var(--bbv-primary); }
.bbv-button--ghost:hover { background: var(--bbv-surface-2); color: var(--bbv-primary); }
.bbv-button--small { min-height: 36px; padding: .35rem .9rem; font-size: .9rem; }
.bbv-button--vote { background: var(--bbv-accent); border-color: var(--bbv-accent); }
.bbv-button--vote:hover { background: var(--bbv-primary); border-color: var(--bbv-primary); }
[data-used="1"] .bbv-button--vote::after { content: " ✓"; }

.bbv-notice { margin: 0 0 1rem; padding: .7rem .9rem; border-radius: var(--bbv-radius-sm); border-left: 4px solid var(--bbv-muted); background: var(--bbv-surface-2); font-size: .95rem; }
.bbv-notice--success { border-color: var(--bbv-success); }
.bbv-notice--success::before { content: "✓ "; font-weight: 700; color: var(--bbv-success); }
.bbv-notice--warning { border-color: var(--bbv-warning); }
.bbv-notice--warning::before { content: "! "; font-weight: 700; color: var(--bbv-warning); }
.bbv-notice--error { border-color: var(--bbv-error); }
.bbv-notice--error::before { content: "✕ "; font-weight: 700; color: var(--bbv-error); }
.bbv-notice--prediction, .bbv-notice--demo { border-color: var(--bbv-highlight); }
.bbv-poll__live:focus { outline: none; }

.bbv-disclaimer { font-size: .85rem; color: var(--bbv-muted); margin: .75rem 0; }
.bbv-disclaimer__label { font-weight: 700; color: var(--bbv-text); }

/* ---------- results ---------- */
.bbv-results__title { font-size: 1rem; margin: 1rem 0 .6rem; }
.bbv-results__hidden { color: var(--bbv-muted); font-style: italic; }
.bbv-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.bbv-bar { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr auto; gap: .6rem; align-items: center; }
.bbv-bar__label { font-weight: 600; overflow-wrap: anywhere; }
.bbv-bar__label a { color: inherit; }
.bbv-bar__track { height: .85rem; background: var(--bbv-surface-2); border-radius: 999px; overflow: hidden; }
.bbv-bar__fill { display: block; height: 100%; background: var(--bbv-primary); border-radius: 999px; transition: width .6s ease; }
.bbv-bar--lead .bbv-bar__fill { background: var(--bbv-accent); }
.bbv-bar__value { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.bbv-bar__votes { font-weight: 400; color: var(--bbv-muted); font-size: .85em; }
.bbv-results__meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .9rem; color: var(--bbv-muted); margin: .75rem 0 0; }
.bbv-results__low { color: var(--bbv-warning); font-weight: 600; }
.bbv-outcome { margin-top: 1rem; padding: .8rem 1rem; border-radius: var(--bbv-radius-sm); border: 2px solid var(--bbv-highlight); }
.bbv-outcome p { margin: .2rem 0; }
.bbv-outcome__small { font-size: .82rem; color: var(--bbv-muted); }
.bbv-poll__footer { margin-top: 1.25rem; border-top: 1px solid var(--bbv-border); padding-top: .9rem; font-size: .9rem; }
.bbv-rules { margin: 0 0 .5rem; padding-left: 1.1rem; color: var(--bbv-muted); }

@media (max-width: 520px) {
	.bbv-bar { grid-template-columns: 1fr auto; }
	.bbv-bar__track { grid-column: 1 / -1; grid-row: 2; }
	.bbv-options__grid { grid-template-columns: repeat(2, 1fr); }
	.bbv-option__img, .bbv-option__initials { width: 56px; height: 56px; }
}

/* ---------- tables, tabs ---------- */
.bbv-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0 0 1rem; }
.bbv-table caption { text-align: left; font-weight: 700; padding: 0 0 .5rem; }
.bbv-table th, .bbv-table td { padding: .6rem .5rem; border-bottom: 1px solid var(--bbv-border); text-align: left; vertical-align: middle; }
.bbv-table thead th { font-size: .85rem; font-weight: 600; color: var(--bbv-muted); }
.bbv-table tr.is-active { background: var(--bbv-surface-2); }
.bbv-rank-num { display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; border-radius: 50%; background: var(--bbv-surface-2); font-weight: 800; color: var(--bbv-primary); }
.bbv-rank-table tbody tr:first-child .bbv-rank-num { background: var(--bbv-highlight); color: #1c1300; }
.bbv-rank-table__who a { display: inline-flex; align-items: center; gap: .6rem; color: inherit; font-weight: 650; text-decoration: none; }
.bbv-rank-table__who a:hover span:last-child { text-decoration: underline; }
.bbv-rank-table__who img, .bbv-rank-table__who .bbv-option__initials { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; font-size: 1rem; }
.bbv-rank-table__share { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.bbv-minibar { display: inline-block; vertical-align: middle; width: 70px; height: 6px; border-radius: 99px; background: var(--bbv-surface-2); margin-right: .4rem; overflow: hidden; }
.bbv-minibar span { display: block; height: 100%; background: var(--bbv-primary); }
.bbv-change { font-weight: 700; white-space: nowrap; }
.bbv-change--up { color: var(--bbv-success); }
.bbv-change--down { color: var(--bbv-error); }
.bbv-change--na, .bbv-change--same { color: var(--bbv-muted); }
.bbv-change--new { color: var(--bbv-accent); font-size: .85rem; }
@media (max-width: 520px) { .bbv-minibar { display: none; } .bbv-table th, .bbv-table td { padding: .5rem .3rem; } }

.bbv-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 .8rem; }
.bbv-tab { padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--bbv-border); text-decoration: none; color: var(--bbv-text); font-weight: 600; min-height: 40px; display: inline-flex; align-items: center; }
.bbv-tab[aria-current="page"] { background: var(--bbv-primary); border-color: var(--bbv-primary); color: #fff; }
.bbv-rankings__scope, .bbv-small { font-size: .85rem; color: var(--bbv-muted); }
.bbv-empty { padding: 1.2rem; border-radius: var(--bbv-radius); background: var(--bbv-surface-2); color: var(--bbv-text); }
.bbv-method { margin: 1rem 0; font-size: .92rem; }
.bbv-method summary { cursor: pointer; font-weight: 650; color: var(--bbv-primary); }
.bbv-inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1rem; }
.bbv-list { padding-left: 1.1rem; }
.bbv-list li { margin: .35rem 0; }
.bbv-result-card { border: 1px solid var(--bbv-border); border-radius: var(--bbv-radius); padding: 1rem 1.2rem; margin: 0 0 1rem; background: var(--bbv-surface); }
.bbv-result-card__title { margin: .2rem 0 .4rem; font-size: 1.15rem; }
.bbv-result-card__title a { color: inherit; }
.bbv-pagination ul { display: flex; gap: .3rem; list-style: none; padding: 0; flex-wrap: wrap; }
.bbv-pagination a, .bbv-pagination span { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; border-radius: 8px; border: 1px solid var(--bbv-border); text-decoration: none; }
.bbv-pagination .current { background: var(--bbv-primary); color: #fff; border-color: var(--bbv-primary); }

/* ---------- facts / contestant ---------- */
.bbv-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; margin: 1rem 0 1.5rem; }
.bbv-facts > div { background: var(--bbv-surface-2); border-radius: var(--bbv-radius-sm); padding: .7rem .9rem; }
.bbv-facts dt { font-size: .85rem; color: var(--bbv-muted); }
.bbv-facts dd { margin: .2rem 0 0; font-weight: 700; }
.bbv-spark { color: var(--bbv-accent); height: 60px; margin: .5rem 0 1rem; }
.bbv-spark svg { width: 100%; height: 100%; display: block; }

/* ---------- regional ---------- */
.bbv-regional__filters { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: end; margin: 0 0 1rem; }
.bbv-field { display: grid; gap: .25rem; }
.bbv-field label, .bbv-seg legend { font-size: .88rem; font-weight: 700; color: var(--bbv-muted); }
.bbv-seg { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.bbv-seg legend { width: 100%; margin-bottom: .25rem; }
.bbv-seg label { position: relative; }
.bbv-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.bbv-seg span { display: inline-flex; align-items: center; min-height: 40px; padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--bbv-border); font-weight: 600; }
.bbv-seg input:checked + span { background: var(--bbv-primary); border-color: var(--bbv-primary); color: #fff; }
.bbv-seg input:focus-visible + span { box-shadow: var(--bbv-focus); }
.bbv-regional__layout { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .bbv-regional__layout { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }
.bbv-map { margin: 0; position: relative; }
.bbv-map__toolbar { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: .5rem; }
.bbv-map__live { margin: 0 0 0 auto; font-size: .82rem; color: var(--bbv-muted); display: inline-flex; align-items: center; gap: .4rem; font-variant-numeric: tabular-nums; }
.bbv-live-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--bbv-accent); animation: bbv-pulse 2s ease-in-out infinite; }
@keyframes bbv-pulse { 50% { opacity: .25; } }
.bbv-map__canvas { position: relative; overflow: hidden; border-radius: var(--bbv-radius-sm); aspect-ratio: 1000 / 1130; max-height: 78vh; width: 100%; }
.bbv-map__loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--bbv-muted); }
.bbv-map__svg { width: 100%; height: 100%; display: block; overflow: hidden; }
.bbv-map__svg :focus { outline: none; }
.bbv-map__state, .bbv-map__district { stroke: var(--bbv-map-stroke); stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill .4s ease, opacity .3s ease; }
.bbv-map__state { stroke-width: .8; cursor: pointer; fill: var(--bbv-map-empty); }
.bbv-map__state:hover, .bbv-map__state:focus-visible { stroke: var(--bbv-text); stroke-width: 1.6; outline: none; }
.bbv-map__district { display: none; stroke-width: .5; fill: var(--bbv-map-empty); }
[data-bin="-1"] { fill: var(--bbv-map-empty); }
[data-bin="0"] { fill: var(--bbv-map-0); }
[data-bin="1"] { fill: var(--bbv-map-1); }
[data-bin="2"] { fill: var(--bbv-map-2); }
[data-bin="3"] { fill: var(--bbv-map-3); }
[data-bin="4"] { fill: var(--bbv-map-4); }
[data-bin="h"] { fill: url(#bbv-hatch); }
.bbv-map__hatch-bg { fill: var(--bbv-map-empty); }
.bbv-map__hatch-line { stroke: var(--bbv-map-2); stroke-width: 2; }
.bbv-regional.is-drilled .bbv-map__state { opacity: .25; }
.bbv-regional.is-drilled .bbv-map__state.is-active { opacity: 0; pointer-events: none; }
.bbv-regional.is-drilled .bbv-map__district { display: inline; }
.bbv-regional.is-drilled .bbv-map__district:not([data-label]) { display: none; }
.bbv-map__tip { position: absolute; transform: translate(-50%, -100%); background: var(--bbv-text); color: #fff; padding: .35rem .6rem; border-radius: 8px; font-size: .82rem; pointer-events: none; white-space: nowrap; max-width: 90vw; z-index: 2; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.bbv-map__legend { display: grid; gap: .4rem; font-size: .8rem; color: var(--bbv-muted); margin-top: .5rem; }
.bbv-legend__scale, .bbv-legend__keys { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; }
.bbv-legend__scale { gap: 2px; }
.bbv-legend__label { padding: 0 .3rem; }
.bbv-legend__sw { display: inline-block; width: 26px; height: 12px; border-radius: 3px; }
.bbv-legend__key { display: inline-flex; align-items: center; gap: .35rem; }
.bbv-legend__sw[data-bin="0"] { background: var(--bbv-map-0); }
.bbv-legend__sw[data-bin="1"] { background: var(--bbv-map-1); }
.bbv-legend__sw[data-bin="2"] { background: var(--bbv-map-2); }
.bbv-legend__sw[data-bin="3"] { background: var(--bbv-map-3); }
.bbv-legend__sw[data-bin="4"] { background: var(--bbv-map-4); }
.bbv-legend__sw[data-bin="-1"] { background: var(--bbv-map-empty); border: 1px solid var(--bbv-border); }
.bbv-legend__sw[data-bin="h"] { background: repeating-linear-gradient(45deg, var(--bbv-map-empty) 0 3px, var(--bbv-map-2) 3px 5px); }
.bbv-map__caption { font-size: .82rem; color: var(--bbv-muted); margin-top: .5rem; }
.bbv-suppressed { color: var(--bbv-muted); font-style: italic; }
.bbv-subtitle { font-size: 1.05rem; margin: 1rem 0 .5rem; }
.bbv-regional__table { max-height: 640px; overflow: auto; }

@media (prefers-reduced-motion: reduce) {
	.bbv-live-dot { animation: none; }
	.bbv-bar__fill, .bbv-option__label, .bbv-map__state, .bbv-map__district { transition: none; }
}

/* ---------- live tracking ---------- */
:where(:root) { --bbv-up: #13704A; --bbv-down: #B42318; --bbv-live: #D9145B; }
.bbv-live { display: grid; gap: 1.5rem; }
.bbv-card { background: var(--bbv-surface); border: 1px solid var(--bbv-border); border-radius: var(--bbv-radius); padding: clamp(.9rem, 2.5vw, 1.25rem); color: var(--bbv-text); }
.bbv-card__head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .75rem; flex-wrap: wrap; }
.bbv-card__title { margin: 0; font-size: 1.1rem; }
.bbv-livebadge { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 800; color: var(--bbv-live); background: color-mix(in srgb, var(--bbv-live) 10%, transparent); border-radius: 999px; padding: .15rem .55rem; }
.bbv-livebadge span { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; animation: bbv-pulse 1.6s ease-in-out infinite; }
.bbv-refresh { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: .3rem .8rem; border: 1px solid var(--bbv-border); border-radius: 999px; background: var(--bbv-surface); color: var(--bbv-text); font: inherit; font-size: .88rem; font-weight: 650; cursor: pointer; }
.bbv-refresh:hover { border-color: var(--bbv-primary); }
.bbv-refresh:focus-visible { outline: none; box-shadow: var(--bbv-focus); }
.bbv-refresh--sm { min-height: 28px; width: 28px; justify-content: center; padding: 0; }
.bbv-refresh.is-spinning svg { animation: bbv-spin .8s linear infinite; }
@keyframes bbv-spin { to { transform: rotate(360deg); } }
.bbv-live__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: .5rem 1rem; }
.bbv-live__title { margin: 0; }
.bbv-live__tools { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.bbv-live__time { font-size: .85rem; color: var(--bbv-muted); font-variant-numeric: tabular-nums; }
.bbv-live__subtitle { font-size: 1.1rem; margin: 0 0 .6rem; }
.bbv-live__grid { display: grid; gap: 1rem; }
@media (min-width: 900px) { .bbv-live__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }

.bbv-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 760px) { .bbv-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bbv-stat { background: var(--bbv-surface); border: 1px solid var(--bbv-border); border-radius: var(--bbv-radius); padding: .9rem 1rem; display: grid; gap: .15rem; }
.bbv-stat__n { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; border-radius: 6px; }
.bbv-stat--hot .bbv-stat__n { color: var(--bbv-accent); }
.bbv-stat__l { font-size: .85rem; color: var(--bbv-muted); }
.bbv-stat__n.is-bump { animation: bbv-bump 1.2s ease; }
@keyframes bbv-bump { 0% { background: color-mix(in srgb, var(--bbv-highlight) 55%, transparent); } 100% { background: transparent; } }

.bbv-board__list { list-style: none; margin: 0 0 .5rem; padding: 0; display: grid; gap: .45rem; }
.bbv-board__row { display: grid; grid-template-columns: 2rem minmax(6rem, 10rem) 1fr 3.8rem; gap: .6rem; align-items: center; padding: .25rem .3rem; border-radius: 10px; transition: background-color .6s ease; }
.bbv-board__row.is-up { background: color-mix(in srgb, var(--bbv-up) 10%, transparent); }
.bbv-board__row.is-down { background: color-mix(in srgb, var(--bbv-down) 8%, transparent); }
.bbv-board__rank { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--bbv-surface-2); font-weight: 800; font-size: .9rem; color: var(--bbv-primary); }
.bbv-board__row:first-child .bbv-board__rank { background: var(--bbv-highlight); color: #1c1300; }
.bbv-board__name { font-weight: 650; color: var(--bbv-text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbv-board__name:hover { text-decoration: underline; }
.bbv-board__bar { height: .7rem; border-radius: 99px; background: var(--bbv-surface-2); overflow: hidden; }
.bbv-board__bar span { display: block; height: 100%; background: var(--bbv-primary); border-radius: 99px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.bbv-board__row:first-child .bbv-board__bar span { background: var(--bbv-accent); }
.bbv-board__pct { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.bbv-board__empty { color: var(--bbv-muted); }
@media (max-width: 520px) { .bbv-board__row { grid-template-columns: 1.8rem 1fr 3.4rem; } .bbv-board__bar { grid-column: 2 / -1; grid-row: 2; } }

.bbv-feed__list { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow: auto; }
.bbv-feed__item { display: grid; grid-template-columns: .6rem 1fr auto; gap: .6rem; align-items: start; padding: .6rem 0; border-bottom: 1px solid var(--bbv-border); font-size: .94rem; }
.bbv-feed__item.is-new { animation: bbv-new 1.6s ease; }
@keyframes bbv-new { from { background: color-mix(in srgb, var(--bbv-highlight) 35%, transparent); } to { background: transparent; } }
.bbv-feed__dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--bbv-accent); margin-top: .5rem; }
.bbv-feed__text a { font-weight: 700; }
.bbv-feed__poll { display: block; font-size: .82rem; }
.bbv-feed__poll a { font-weight: 400; color: var(--bbv-muted); }
.bbv-feed__time { font-size: .8rem; color: var(--bbv-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bbv-feed__empty, .bbv-feed__note { color: var(--bbv-muted); font-size: .85rem; }
.bbv-feed__note { margin: .6rem 0 0; }

.bbv-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.bbv-tile { display: grid; gap: .15rem; padding: .8rem .9rem; border-radius: var(--bbv-radius-sm); border: 1px solid var(--bbv-border); border-left: 4px solid var(--bbv-up); background: var(--bbv-surface); text-decoration: none; color: var(--bbv-text); }
.bbv-tile:hover { border-color: var(--bbv-primary); }
.bbv-tile__name { font-weight: 750; }
.bbv-tile__meta { font-size: .85rem; color: var(--bbv-muted); }
.bbv-tile__delta { font-weight: 800; color: var(--bbv-up); font-size: .9rem; }

.bbv-danger { border-left: 4px solid var(--bbv-down); }
.bbv-danger__list { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.bbv-danger__list li { display: inline-flex; align-items: baseline; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; background: var(--bbv-surface-2); }
.bbv-danger__list a { font-weight: 700; color: var(--bbv-text); }
.bbv-danger__pct { font-size: .82rem; color: var(--bbv-down); font-weight: 700; }
.bbv-chip { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 750; }
.bbv-chip--danger { background: color-mix(in srgb, var(--bbv-down) 12%, transparent); color: var(--bbv-down); }

/* contestant tracker */
.bbv-ctrack { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.bbv-status-card { background: var(--bbv-surface); border: 1px solid var(--bbv-border); border-top: 4px solid var(--bbv-primary); border-radius: var(--bbv-radius); padding: clamp(1rem, 3vw, 1.4rem); }
.bbv-status-card.is-nominated { border-top-color: var(--bbv-down); }
.bbv-status-card__top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.bbv-status-card__eyebrow { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .85rem; color: var(--bbv-muted); }
.bbv-status-card__empty { color: var(--bbv-muted); }
.bbv-status-card__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 0 0 1rem; }
@media (min-width: 640px) { .bbv-status-card__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.bbv-metric { background: var(--bbv-surface-2); border-radius: var(--bbv-radius-sm); padding: .65rem .8rem; }
.bbv-metric dt { font-size: .8rem; color: var(--bbv-muted); }
.bbv-metric dd { margin: .15rem 0 0; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.bbv-metric--rank dd { font-size: 1.9rem; line-height: 1.1; color: var(--bbv-primary); }
.bbv-metric--rank small { font-size: .85rem; color: var(--bbv-muted); font-weight: 600; }
.bbv-metric dd.is-up { color: var(--bbv-up); }
.bbv-metric dd.is-down { color: var(--bbv-down); }
.bbv-status-card__actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.bbv-hourly { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: .25rem 0; border-bottom: 1px solid var(--bbv-border); }
.bbv-hourly__bar { flex: 1; background: var(--bbv-primary); border-radius: 3px 3px 0 0; min-height: 2px; transition: height .6s ease; }
.bbv-hourly__bar:last-child { background: var(--bbv-accent); }
.bbv-hourly__bar.is-empty { background: var(--bbv-border); }
.bbv-hourly__axis { display: flex; justify-content: space-between; font-size: .78rem; color: var(--bbv-muted); margin: .3rem 0 .4rem; }
.bbv-ctrack__cols { display: grid; gap: 1rem; }
@media (min-width: 760px) { .bbv-ctrack__cols { grid-template-columns: 1fr 1fr; align-items: start; } }
.bbv-rivals, .bbv-states, .bbv-cpolls { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.bbv-rivals__rank { font-weight: 800; color: var(--bbv-primary); }
.bbv-rivals__gap { font-size: .85rem; font-weight: 700; }
.bbv-rivals__gap.is-ahead { color: var(--bbv-down); }
.bbv-rivals__gap.is-behind { color: var(--bbv-up); }
.bbv-states li { display: grid; grid-template-columns: minmax(6rem, 9rem) 1fr 3.2rem; gap: .5rem; align-items: center; font-size: .92rem; }
.bbv-states__bar { height: .55rem; background: var(--bbv-surface-2); border-radius: 99px; overflow: hidden; }
.bbv-states__bar span { display: block; height: 100%; background: var(--bbv-primary); }
.bbv-states__pct { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bbv-cpolls li { display: grid; gap: .1rem; }

/* contestant search */
.bbv-csearch { position: relative; max-width: 560px; }
.bbv-csearch__row { display: flex; align-items: center; gap: .4rem; background: var(--bbv-surface); border: 1px solid var(--bbv-border); border-radius: 999px; padding: .3rem .35rem .3rem 1rem; box-shadow: 0 10px 30px -18px rgba(0,0,0,.45); }
.bbv-csearch__row:focus-within { box-shadow: var(--bbv-focus); }
.bbv-csearch input[type="search"] { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.02rem; color: var(--bbv-text); padding: .55rem 0; }
.bbv-csearch input[type="search"]:focus { outline: none; }
.bbv-csearch__results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: .35rem; background: var(--bbv-surface); border: 1px solid var(--bbv-border); border-radius: var(--bbv-radius-sm); box-shadow: 0 18px 40px -20px rgba(0,0,0,.5); z-index: 20; }
.bbv-csearch__results a { display: flex; justify-content: space-between; gap: .5rem; padding: .55rem .7rem; border-radius: 8px; color: var(--bbv-text); text-decoration: none; font-weight: 650; }
.bbv-csearch__results li.is-active a, .bbv-csearch__results a:hover { background: var(--bbv-surface-2); }
.bbv-csearch__meta { font-weight: 400; font-size: .82rem; color: var(--bbv-muted); }
.bbv-csearch__none { padding: .55rem .7rem; color: var(--bbv-muted); }

@media (prefers-reduced-motion: reduce) {
	.bbv-livebadge span, .bbv-refresh.is-spinning svg, .bbv-stat__n.is-bump, .bbv-feed__item.is-new { animation: none; }
	.bbv-board__bar span, .bbv-hourly__bar { transition: none; }
}

/* Long option labels (poll titles) must not widen the page on phones. */
:where(.bbv-field) { min-width: 0; max-width: 100%; }
:where(.bbv-field) select, :where(.bbv-field) label { max-width: 100%; min-width: 0; }

/* This week in the house: nominated + safe */
.bbv-week-board { border-left: 4px solid var(--bbv-down); }
.bbv-week-board .bbv-card__title { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.bbv-week-board__week { font-size: .78rem; font-weight: 750; padding: .1rem .55rem; border-radius: 999px; background: var(--bbv-surface-2); color: var(--bbv-muted); }
.bbv-week-board__actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.bbv-week-board__cols { display: grid; gap: 1rem 1.5rem; margin: .5rem 0 .75rem; }
@media (min-width: 760px) { .bbv-week-board__cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.bbv-week-board__col { min-width: 0; border: 0; padding: 0; }
.bbv-week-board__label { display: flex; align-items: center; gap: .4rem; margin: 0 0 .6rem; font-size: .92rem; }
.bbv-dot { width: .6rem; height: .6rem; border-radius: 50%; display: inline-block; }
.bbv-dot--danger { background: var(--bbv-down); }
.bbv-dot--safe { background: var(--bbv-up); }
.bbv-faces { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .75rem .5rem; }
.bbv-faces--small { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
.bbv-faces a { display: grid; justify-items: center; gap: .25rem; text-align: center; text-decoration: none; color: var(--bbv-text); }
.bbv-faces img, .bbv-faces__initial { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid color-mix(in srgb, var(--bbv-down) 70%, transparent); background: var(--bbv-surface-2); }
.bbv-faces--small img, .bbv-faces--small .bbv-faces__initial { width: 44px; height: 44px; border-color: color-mix(in srgb, var(--bbv-up) 70%, transparent); }
.bbv-faces__initial { display: grid; place-items: center; font-weight: 800; color: var(--bbv-muted); }
.bbv-faces__name { font-size: .8rem; font-weight: 700; line-height: 1.2; }
.bbv-faces a:hover .bbv-faces__name { text-decoration: underline; }
.bbv-faces .bbv-danger__pct { font-size: .72rem; }
.bbv-chip--safe { background: color-mix(in srgb, var(--bbv-up) 12%, transparent); color: var(--bbv-up); }

/* Location (PIN / locality) search in the poll form */
.bbv-loc { position: relative; display: grid; gap: .3rem; margin: .5rem 0 .25rem; }
.bbv-loc label { font-weight: 700; font-size: .9rem; }
.bbv-loc input[type="text"] { width: 100%; min-height: 44px; padding: .55rem .75rem; border: 1px solid var(--bbv-border); border-radius: var(--bbv-radius-sm); background: var(--bbv-surface); color: var(--bbv-text); font: inherit; }
.bbv-loc input[type="text"]:focus-visible { outline: 2px solid transparent; box-shadow: var(--bbv-focus); }
.bbv-loc__hint { margin: 0; font-size: .8rem; color: var(--bbv-muted); }
.bbv-loc__list { position: absolute; z-index: 30; top: 4.1rem; left: 0; right: 0; margin: 0; padding: .25rem; list-style: none; background: var(--bbv-surface); border: 1px solid var(--bbv-border); border-radius: var(--bbv-radius-sm); box-shadow: 0 12px 30px -12px rgba(20, 10, 40, .35); max-height: 18rem; overflow: auto; }
.bbv-loc__item { display: grid; gap: .05rem; padding: .5rem .6rem; border-radius: 6px; cursor: pointer; }
.bbv-loc__item[aria-selected="true"], .bbv-loc__item:hover { background: var(--bbv-surface-2); }
.bbv-loc__main { font-weight: 700; }
.bbv-loc__sub { font-size: .8rem; color: var(--bbv-muted); }
.bbv-loc__none { padding: .5rem .6rem; font-size: .88rem; color: var(--bbv-muted); }
.bbv-loc__match { padding: .6rem .75rem; border-radius: var(--bbv-radius-sm); background: var(--bbv-surface-2); border-left: 4px solid var(--bbv-up); }
.bbv-loc__match p { margin: 0 0 .25rem; }
.bbv-loc__change { margin-left: .25rem; padding: 0; border: 0; background: none; color: var(--bbv-primary); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.bbv-loc__ambig { margin: .4rem 0; padding: 0; border: 0; display: grid; gap: .2rem; min-width: 0; }
.bbv-loc__ambig legend { font-weight: 700; font-size: .88rem; margin-bottom: .15rem; }
.bbv-loc__opt { display: flex; gap: .4rem; align-items: center; font-size: .9rem; }
.bbv-loc__offices, .bbv-loc__self { font-size: .78rem; color: var(--bbv-muted); }
.bbv-region__or { margin: .5rem 0 .25rem; font-size: .82rem; color: var(--bbv-muted); text-transform: none; }

/* Regional landing pages (/voting/…, /pincode/…) */
.bbv-regionpage .bbv-wrap { padding-top: 1rem; padding-bottom: 2.5rem; }
:where(.bbv-wrap) { max-width: 1140px; margin-inline: auto; padding-inline: 16px; }
.bbv-region__head { margin: .5rem 0 1rem; }
.bbv-region__head h1 { margin: .15rem 0 .4rem; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.1; }
.bbv-region__eyebrow { margin: 0; font-weight: 700; color: var(--bbv-muted); font-size: .9rem; }
.bbv-region__lede { margin: 0; font-size: 1.08rem; color: var(--bbv-muted); max-width: 62ch; }
.bbv-region__period { margin: .5rem 0 1.25rem; }
.bbv-rstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin: 1rem 0 .25rem; }
.bbv-rstat { display: grid; gap: .1rem; padding: .8rem .95rem; border: 1px solid var(--bbv-border); border-radius: var(--bbv-radius-sm); background: var(--bbv-surface); }
.bbv-rstat__n { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bbv-rstat__l { font-size: .85rem; color: var(--bbv-muted); }
.bbv-rstat__note { font-size: .75rem; color: var(--bbv-muted); }
.bbv-region__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 1rem 0; align-items: start; }
@media (min-width: 900px) { .bbv-region__grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.bbv-region__main, .bbv-region__side { display: grid; gap: 1rem; min-width: 0; }
.bbv-arealist { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.bbv-arealist li { display: flex; justify-content: space-between; gap: .75rem; padding: .4rem 0; border-bottom: 1px solid var(--bbv-border); }
.bbv-arealist__n { font-variant-numeric: tabular-nums; font-weight: 700; }
.bbv-arealist__n.is-hidden { font-weight: 400; font-size: .82rem; color: var(--bbv-muted); }
.bbv-allareas { margin: .75rem 0; }
.bbv-allareas summary { cursor: pointer; font-weight: 700; }
.bbv-allareas ul { columns: 2 12rem; margin: .5rem 0 0; padding-left: 1.1rem; }
.bbv-allareas li { break-inside: avoid; margin: .15rem 0; }
.bbv-rpop { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.bbv-rpop li { display: grid; grid-template-columns: 1.6rem minmax(0, 9rem) minmax(0, 1fr) 3.6rem; gap: .6rem; align-items: center; }
.bbv-rpop__rank { font-weight: 800; color: var(--bbv-muted); text-align: right; }
.bbv-rpop a { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbv-rpop__bar { height: .55rem; border-radius: 99px; background: var(--bbv-surface-2); overflow: hidden; }
.bbv-rpop__bar span { display: block; height: 100%; background: var(--bbv-primary); border-radius: 99px; }
.bbv-rpop__pct { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
@media (max-width: 520px) { .bbv-rpop li { grid-template-columns: 1.4rem minmax(0, 1fr) 3.4rem; } .bbv-rpop__bar { grid-column: 2 / 4; grid-row: 2; } }
.bbv-rcompare td, .bbv-rcompare th { text-align: left; }
.bbv-rcompare td { font-variant-numeric: tabular-nums; }
.bbv-pinform { display: grid; grid-template-columns: minmax(0, 1fr); gap: .3rem; margin: .5rem 0; max-width: 26rem; }
.bbv-pinform label { font-weight: 700; }
.bbv-pinform__row { display: flex; gap: .5rem; }
.bbv-pinform input { flex: 1; width: 100%; min-width: 0; min-height: 44px; padding: .5rem .75rem; border: 1px solid var(--bbv-border); border-radius: var(--bbv-radius-sm); background: var(--bbv-surface); color: var(--bbv-text); font: inherit; letter-spacing: .08em; }
.bbv-pinchips { list-style: none; margin: .5rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.bbv-pinchips a { display: inline-block; padding: .2rem .55rem; border-radius: 99px; background: var(--bbv-surface-2); font-variant-numeric: tabular-nums; font-size: .85rem; text-decoration: none; }
.bbv-offices { columns: 2 12rem; margin: .5rem 0; padding-left: 1.1rem; font-size: .92rem; }
.bbv-postal { border-style: dashed; }
.bbv-empty { color: var(--bbv-muted); }
.bbv-rmethod { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--bbv-border); font-size: .92rem; }
.bbv-rmethod ul { padding-left: 1.2rem; }

/* Single-candidate vote (contestant page) */
.bbv-poll--single .bbv-options__grid { grid-template-columns: minmax(0, 1fr); }
.bbv-poll--single .bbv-option__label { flex-direction: row; justify-content: flex-start; gap: .8rem; padding: .7rem .9rem; text-align: left; }
.bbv-poll--single .bbv-option__img, .bbv-poll--single .bbv-option__initials { width: 56px; height: 56px; }
.bbv-poll--single .bbv-option__name { font-size: 1.05rem; font-weight: 700; }
.bbv-poll--single .bbv-button--vote { width: 100%; }
