/* Purple Voice — Widget Styles */

/* Typography control — override in theme Customizer → Additional CSS to scale globally */
:root {
  --pvw-text-base:    1rem;       /* body, list rows */
  --pvw-text-lead:    1.05rem;    /* primary item titles */
  --pvw-text-meta:    0.95rem;    /* date / status / muted */
  --pvw-text-small:   0.85rem;    /* chips / labels / badges */
  --pvw-text-tiny:    0.72rem;    /* category pills */
  --pvw-color-strong: #1A202C;
  --pvw-color-muted:  #475569;    /* darker than tailwind slate-500 — better contrast */
  --pvw-color-soft:   #64748b;
}

/* ─── HEADER / LOGO FIX ───────────────────────────────────── */

header.sticky .q_logo img,
.header_top_bottom_holder .q_logo img,
.sticky_header .q_logo img,
header .q_logo a img {
  max-height: 45px !important;
  width: auto !important;
  padding: 8px 0 !important;
  object-fit: contain !important;
}

/* ─── COMMON ──────────────────────────────────────────────── */

[data-pv-widget] {
  font-family: system-ui, -apple-system, sans-serif;
  color: #1a1a2e;
  margin: 1.5em 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
[data-pv-widget] > div { padding: 1em; }
[data-pv-widget] * { box-sizing: border-box; }
[data-pv-widget] h3 { font-size: 1.4rem; font-weight: 800; margin: 0 0 0.5em; color: #1a1a2e; letter-spacing: -0.01em; }
[data-pv-widget] h4 { font-size: 1.15rem; font-weight: 700; margin: 1em 0 0.5em; color: #333; }
.pv-w-subtitle { color: var(--pvw-color-muted); margin: -0.2em 0 1em; font-size: var(--pvw-text-meta); }
.pv-w-loading { text-align: center; padding: 2em; color: #999; }
.pv-w-error { text-align: center; padding: 1.5em; color: #b91c1c; background: #fef2f2; border-radius: 8px; }
.pv-w-empty { text-align: center; padding: 1.5em; color: #666; }

/* ─── SCROLL CONTAINER ────────────────────────────────────── */

.pv-w-scroll {
  max-height: 480px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin;
  scrollbar-color: #c4b5d4 transparent;
}
.pv-w-scroll::-webkit-scrollbar { width: 5px; }
.pv-w-scroll::-webkit-scrollbar-track { background: transparent; }
.pv-w-scroll::-webkit-scrollbar-thumb { background: #c4b5d4; border-radius: 3px; }
.pv-w-scroll::-webkit-scrollbar-thumb:hover { background: #4A1A6B; }

/* Ensure widget content areas are always contained */
.pv-w-votes-list,
.pv-w-bills-list,
.pv-w-absent-list,
.pv-w-pulse-list,
.pv-w-delegation-content,
.pv-w-compare-result {
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #c4b5d4 transparent;
}
.pv-w-bill-detail { max-height: 300px; overflow-y: auto; }

/* ─── TABS ────────────────────────────────────────────────── */

.pv-w-tabs { display: flex; gap: 4px; margin-bottom: 1em; border-bottom: 2px solid #e5e7eb; padding-bottom: 0; }
.pv-w-tab { padding: 5px 12px; border: none; background: none; cursor: pointer; font-size: 0.8em; font-weight: 500; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s; }
.pv-w-tab:hover { color: #4A1A6B; }
.pv-w-tab--active { color: #4A1A6B; border-bottom-color: #4A1A6B; font-weight: 600; }

/* ─── BADGES ──────────────────────────────────────────────── */

.pv-w-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.8em; font-weight: 600; }
.pv-w-badge--yea { background: #dcfce7; color: #166534; }
.pv-w-badge--nay { background: #fee2e2; color: #991b1b; }
.pv-w-badge--not-voting { background: #f3f4f6; color: #6b7280; }
.pv-w-badge--present { background: #fef3c7; color: #92400e; }

/* ─── SEARCH ──────────────────────────────────────────────── */

.pv-w-search-input, .pv-w-state-search, .pv-w-picker-input {
  width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 0.9em; outline: none; transition: border-color 0.15s;
}
.pv-w-search-input:focus, .pv-w-state-search:focus, .pv-w-picker-input:focus { border-color: #4A1A6B; }

/* ─── [rep-votes] ─────────────────────────────────────────── */

.pv-w-header { display: flex; justify-content: space-between; align-items: center; gap: 1em; flex-wrap: wrap; }
.pv-w-header h3 { margin: 0; }
.pv-w-search { flex: 0 1 250px; }

.pv-w-vote-header { display: grid; grid-template-columns: 90px 80px 1fr 75px 150px; gap: 8px; padding: 10px 12px; background: #f9fafb; border-radius: 6px 6px 0 0; font-weight: 700; font-size: var(--pvw-text-tiny); color: var(--pvw-color-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.pv-w-vote-row { display: grid; grid-template-columns: 90px 80px 1fr 75px 150px; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #f3f4f6; align-items: center; font-size: var(--pvw-text-base); transition: background 0.1s; }
.pv-w-vote-row--wide { grid-template-columns: 170px 90px 80px 1fr 75px 150px; }
.pv-w-vote-row--wide ~ .pv-w-vote-header { grid-template-columns: 200px 110px 90px 1fr 90px 170px; }
.pv-w-vote-member { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.pv-w-mini-photo { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.pv-w-vote-party { color: var(--pvw-color-muted); font-size: var(--pvw-text-meta); font-weight: 500; }
.pv-w-vote-row:hover { background: #f9fafb; }
.pv-w-vote-date { color: var(--pvw-color-muted); font-size: var(--pvw-text-meta); font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.pv-w-vote-bill { font-weight: 700; font-family: ui-monospace, monospace; }
.pv-w-bill-link { color: #4A1A6B; text-decoration: none; }
.pv-w-bill-link:hover { text-decoration: underline; color: #7B3FA0; }
.pv-w-vote-question { color: var(--pvw-color-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-w-vote-result { color: var(--pvw-color-muted); font-size: var(--pvw-text-meta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pv-w-pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 1em; padding-top: 1em; border-top: 1px solid #e5e7eb; }
.pv-w-page-info { color: #6b7280; font-size: 0.85em; }
.pv-w-page-buttons { display: flex; gap: 8px; }
.pv-w-page-btn { padding: 6px 16px; border: 1px solid #d1d5db; background: white; border-radius: 6px; cursor: pointer; font-size: 0.85em; transition: all 0.15s; }
.pv-w-page-btn:hover { background: #4A1A6B; color: white; border-color: #4A1A6B; }

/* ─── [rep-bills] ─── Most Contested Bills ─────────────────── */

.pv-w-bill-row { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-bottom: 1px solid #f3f4f6; font-size: var(--pvw-text-base); line-height: 1.45; }
.pv-w-bill-row:hover { background: #f9fafb; }
.pv-w-bill-id { font-weight: 700; color: #4A1A6B; min-width: 90px; font-size: var(--pvw-text-lead); font-family: ui-monospace, monospace; }
.pv-w-bill-meta { flex: 1; display: flex; gap: 12px; color: var(--pvw-color-muted); font-size: var(--pvw-text-meta); flex-wrap: wrap; }
.pv-w-bill-expand { padding: 7px 14px; border: 1px solid #4A1A6B; color: #4A1A6B; background: white; border-radius: 16px; cursor: pointer; font-size: var(--pvw-text-small); font-weight: 700; transition: all 0.15s; white-space: nowrap; }
.pv-w-bill-expand:hover { background: #4A1A6B; color: white; }

/* ─── SPLIT BARS ──────────────────────────────────────────── */

.pv-w-split { padding: 1.5em; background: #f9fafb; border-radius: 8px; margin-top: 1em; }
.pv-w-split h4 { margin-top: 0; }
.pv-w-split-bars { display: flex; flex-direction: column; gap: 12px; margin: 1em 0; }
.pv-w-split-bar { display: flex; align-items: center; gap: 12px; }
.pv-w-split-label { min-width: 80px; font-weight: 600; font-size: 0.9em; }
.pv-w-split-count { font-size: 0.8em; color: #6b7280; min-width: 80px; }
.pv-w-bar { flex: 1; height: 24px; background: #e5e7eb; border-radius: 4px; display: flex; overflow: hidden; }
.pv-w-bar-d { background: #2563eb; transition: width 0.3s; }
.pv-w-bar-r { background: #dc2626; transition: width 0.3s; }

.pv-w-voter-list { margin-top: 1em; }
.pv-w-voter-list summary { cursor: pointer; color: #4A1A6B; font-weight: 500; }
.pv-w-voter-grid { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.pv-w-voter { padding: 2px 8px; border-radius: 4px; font-size: 0.75em; }
.pv-w-voter--yea { background: #dcfce7; color: #166534; }
.pv-w-voter--nay { background: #fee2e2; color: #991b1b; }
.pv-w-voter--not-voting { background: #f3f4f6; color: #6b7280; }

/* ─── [rep-absent] ─── Most Missed Votes ───────────────────── */

.pv-w-absent-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid #f3f4f6; font-size: var(--pvw-text-base); line-height: 1.4; }
.pv-w-rank { font-weight: 800; color: var(--pvw-color-muted); min-width: 30px; text-align: center; font-size: var(--pvw-text-base); }
.pv-w-thumb { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.pv-w-thumb-placeholder { width: 42px; height: 42px; border-radius: 50%; background: #e5e7eb; }
.pv-w-absent-info { flex: 1; min-width: 0; }
.pv-w-absent-info strong { display: block; font-size: var(--pvw-text-lead); font-weight: 700; color: var(--pvw-color-strong); margin-bottom: 2px; }
.pv-w-absent-info span { font-size: var(--pvw-text-meta); color: var(--pvw-color-muted); }
.pv-w-absent-stats { text-align: right; min-width: 130px; }
.pv-w-missed { font-weight: 800; color: #b91c1c; display: block; font-size: var(--pvw-text-lead); }
.pv-w-attendance { font-size: var(--pvw-text-small); color: var(--pvw-color-muted); }
.pv-w-attendance-bar { height: 5px; background: #e5e7eb; border-radius: 3px; margin-top: 5px; }
.pv-w-attendance-bar div { height: 100%; background: #4A1A6B; border-radius: 2px; transition: width 0.3s; }

/* ─── [rep-pulse] ─── Close Votes ───────────────────────────── */

.pv-w-pulse-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 4px; border-bottom: 1px solid #f3f4f6;
  font-size: 1rem; line-height: 1.45;
}
.pv-w-pulse-margin { text-align: center; min-width: 56px; }
.pv-w-margin-num {
  display: block; font-size: 1.6rem; font-weight: 800; color: #4A1A6B;
  line-height: 1;
}
.pv-w-margin-label {
  font-size: 0.7rem; color: #475569; text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 700; margin-top: 4px;
}
.pv-w-pulse-info { flex: 1; min-width: 0; }
.pv-w-pulse-info strong {
  display: block; font-size: 1.05rem; font-weight: 700; color: #1A202C;
  margin-bottom: 3px;
}
.pv-w-pulse-info span {
  display: block; font-size: 0.95rem; color: #475569; line-height: 1.4;
  margin-bottom: 3px;
}
.pv-w-pulse-info time {
  font-size: 0.85rem; color: #64748b;
  font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums;
}
.pv-w-pulse-tally {
  display: flex; gap: 14px; min-width: 130px;
  font-size: 1.05rem; font-weight: 700;
}
.pv-w-tally-yea { color: #15803d; }
.pv-w-tally-nay { color: #b91c1c; }

/* ─── [rep-compare] ───────────────────────────────────────── */

.pv-w-compare-pickers { display: flex; align-items: center; gap: 16px; margin-bottom: 1.5em; }
.pv-w-picker { flex: 1; position: relative; }
.pv-w-vs { font-weight: 700; color: #4A1A6B; font-size: 1.2em; }
.pv-w-picker-results { position: absolute; top: 100%; left: 0; right: 0; background: white; border: 1px solid #d1d5db; border-radius: 0 0 6px 6px; z-index: 10; max-height: 200px; overflow-y: auto; }
.pv-w-picker-option { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 0.9em; }
.pv-w-picker-option:hover { background: #f3f4f6; }
.pv-w-picker-option img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.pv-w-compare-cards { display: flex; align-items: center; gap: 1em; justify-content: center; }
.pv-w-compare-card { flex: 1; max-width: 250px; }
.pv-w-compare-score { text-align: center; }
.pv-w-score-circle { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg, #4A1A6B, #7B3FA0); color: white; display: flex; align-items: center; justify-content: center; font-size: 1.4em; font-weight: 800; margin: 0 auto 8px; }
.pv-w-compare-score span { display: block; font-size: 0.8em; color: #6b7280; }
.pv-w-compare-detail { display: flex; justify-content: center; gap: 2em; margin-top: 1em; color: #6b7280; }

/* ─── MEMBER CARD ─────────────────────────────────────────── */

.pv-w-member-card { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #e5e7eb; border-radius: 6px; background: white; text-decoration: none; color: inherit; transition: all 0.15s; }
.pv-w-member-card:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.08); border-color: #4A1A6B; }
.pv-w-vote-member { text-decoration: none; color: inherit; }
.pv-w-vote-member:hover strong, .pv-w-vote-member:hover span { color: #4A1A6B; }
.pv-w-absent-link { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; flex: 1; }
.pv-w-absent-link:hover strong { color: #4A1A6B; }
.pv-w-member-photo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.pv-w-member-info { flex: 1; }
.pv-w-member-info strong { display: block; font-size: 0.82em; }
.pv-w-member-meta { display: block; font-size: 0.72em; color: #6b7280; }
.pv-w-member-role { display: block; font-size: 0.68em; color: #4A1A6B; }
.pv-w-member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }

/* ─── [rep-delegation] ────────────────────────────────────── */

.pv-w-delegation-summary { display: flex; gap: 12px; align-items: center; margin-bottom: 1em; flex-wrap: wrap; }
.pv-w-delegation-summary span { font-size: 0.9em; color: #6b7280; }
.pv-w-party-chip { padding: 2px 10px; border-radius: 12px; font-weight: 600; font-size: 0.8em; }
.pv-w-party-d { background: #dbeafe; color: #1e40af; }
.pv-w-party-r { background: #fee2e2; color: #991b1b; }
.pv-w-party-i { background: #f3f4f6; color: #374151; }

/* ─── [rep-directory] ─────────────────────────────────────── */

.pv-w-dir-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pv-w-dir-search { flex: 1; min-width: 180px; padding: 7px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.85em; outline: none; }
.pv-w-dir-search:focus { border-color: #4A1A6B; }
.pv-w-dir-filters { display: flex; gap: 3px; align-items: center; }
.pv-w-dir-sep { color: #d1d5db; margin: 0 4px; }
.pv-w-dir-btn { padding: 4px 10px; border: 1px solid #d1d5db; background: #fff; border-radius: 4px; cursor: pointer; font-size: 0.75em; font-weight: 500; transition: all 0.15s; color: #555; }
.pv-w-dir-btn:hover { border-color: #4A1A6B; color: #4A1A6B; }
.pv-w-dir-btn--active { background: #4A1A6B; color: #fff !important; border-color: #4A1A6B; }
.pv-w-dir-btn--d.pv-w-dir-btn--active { background: #2563eb; border-color: #2563eb; }
.pv-w-dir-btn--r.pv-w-dir-btn--active { background: #dc2626; border-color: #dc2626; }
.pv-w-dir-btn--i.pv-w-dir-btn--active { background: #6b7280; border-color: #6b7280; }
.pv-w-dir-count { font-size: 0.8em; color: #6b7280; white-space: nowrap; }

.pv-w-dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }

.pv-w-dir-card { display: flex; flex-direction: column; align-items: center; padding: 12px 8px; border-radius: 8px; background: #fff; border: 1px solid #e5e7eb; text-decoration: none; color: inherit; text-align: center; transition: all 0.15s; }
.pv-w-dir-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); transform: translateY(-2px); border-color: #c4b5d4; }
.pv-w-dir-card--d { border-left: 3px solid #2563eb; }
.pv-w-dir-card--r { border-left: 3px solid #dc2626; }
.pv-w-dir-card--i { border-left: 3px solid #6b7280; }

.pv-w-dir-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin-bottom: 6px; }
.pv-w-dir-photo--empty { width: 56px; height: 56px; border-radius: 50%; background: #e5e7eb; margin-bottom: 6px; }

.pv-w-dir-info { display: flex; flex-direction: column; gap: 1px; }
.pv-w-dir-info strong { font-size: 0.78em; line-height: 1.2; }
.pv-w-dir-party { font-size: 0.7em; font-weight: 700; }
.pv-w-dir-card--d .pv-w-dir-party { color: #2563eb; }
.pv-w-dir-card--r .pv-w-dir-party { color: #dc2626; }
.pv-w-dir-card--i .pv-w-dir-party { color: #6b7280; }
.pv-w-dir-state { font-size: 0.68em; color: #6b7280; }
.pv-w-dir-role { font-size: 0.65em; color: #4A1A6B; }

.pv-w-dir-paging { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e5e7eb; font-size: 0.82em; color: #6b7280; }

/* ─── RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 768px) {
  .pv-w-vote-header, .pv-w-vote-row { grid-template-columns: 80px 60px 1fr 70px; }
  .pv-w-vote-result { display: none; }
  .pv-w-header { flex-direction: column; }
  .pv-w-search { flex: 1 1 100%; }
  .pv-w-compare-pickers { flex-direction: column; }
  .pv-w-compare-cards { flex-direction: column; }
  .pv-w-vs { display: none; }
  .pv-w-bill-row { flex-direction: column; align-items: flex-start; }
  .pv-w-pulse-row { flex-wrap: wrap; }
  .pv-w-member-grid { grid-template-columns: 1fr; }
}

/* ─── PV BRIDGE THEME — STRUCTURAL FIXES ONLY ─────────────────
 * Sizing, padding, and title-bar hiding live in Settings -> PV Display
 * (rendered as inline <style> in <head>). This block keeps only the
 * structural fixes that should never change:
 *   - Force .q_logo wrapper + .normal img visible (Bridge hides them
 *     by default and only un-hides via inline style emitted from its
 *     Logo Height field — which may be blank).
 *   - Override Bridge's hard 45px max-height clamp on sticky/scrolled
 *     header contexts so the configured logo height actually takes effect.
 * Bridge's sticky/light/dark/mobile variants are NOT touched here so
 * the sticky-header logo swap continues to work. */
.q_logo a {
  visibility: visible !important;
  display: inline-block !important;
}
.q_logo img.normal {
  visibility: visible !important;
  opacity: 1 !important;
  height: 100% !important;
  width: auto !important;
  max-height: none !important;
  vertical-align: middle !important;
}
header .q_logo a img,
header.sticky .q_logo img,
.header_top_bottom_holder .q_logo img,
.sticky_header .q_logo img {
  max-height: 100% !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PURPLE VOICE DESIGN SYSTEM
   One type family, one palette, one spacing scale for the site content AND
   every data tool. Loaded on every page from api.purplevoice.com, so changes
   ship without a plugin upload. Scoped to .content (header/footer untouched
   except the back-to-top control). Many legacy blocks carry inline styles,
   hence the !important on type and color.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --pv-font: 'Raleway', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pv-ink: #1A2B4A;          /* headings, primary text on light */
  --pv-text: #2B2F36;         /* body copy */
  --pv-muted: #5B6472;        /* meta, captions (AA on white) */
  --pv-line: #DDE1E7;         /* borders, dividers */
  --pv-surface: #F5F6F8;      /* page bands, table stripes */
  --pv-card: #FFFFFF;
  --pv-primary: #A01B2E;      /* actions, links */
  --pv-primary-ink: #7E1524;  /* hover/pressed */
  --pv-accent: #4A1A6B;       /* selected state (logo purple) */
  --pv-accent-tint: #F1ECF6;
  --pv-dem: #1D4ED8; --pv-dem-tint: #E8EEFC;
  --pv-rep: #B91C1C; --pv-rep-tint: #FCEBEB;
  --pv-ind: #4B5563; --pv-ind-tint: #EEF0F3;
  --pv-yea: #15803D; --pv-yea-tint: #E7F5EC;
  --pv-nay: #B91C1C; --pv-nay-tint: #FCEBEB;
  --pv-radius: 12px; --pv-radius-sm: 8px; --pv-radius-pill: 999px;
  --pv-shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --pv-s1: 4px; --pv-s2: 8px; --pv-s3: 12px; --pv-s4: 16px; --pv-s5: 24px; --pv-s6: 32px; --pv-s7: 48px; --pv-s8: 64px;
  --pv-fs-body: 17px; --pv-fs-small: 15px; --pv-fs-label: 13px;
  --pv-fs-h1: clamp(30px, 2.2vw + 22px, 46px);
  --pv-fs-h2: clamp(24px, 1.2vw + 19px, 32px);
  --pv-fs-h3: 21px; --pv-fs-h4: 18px;
  --pv-tap: 44px;
  /* legacy widget tokens, mapped onto the system */
  --pvw-color-strong: var(--pv-ink); --pvw-color-muted: var(--pv-muted); --pvw-color-soft: var(--pv-muted);
}
@media (max-width: 640px) { :root { --pv-fs-body: 16px; --pv-fs-h3: 19px; } }

/* ─── Base type: site content + tools ─────────────────────────────────────── */
html body .content,
html body .content p, html body .content li, html body .content td, html body .content th,
html body .content input, html body .content select, html body .content textarea, html body .content button,
html body .content span, html body .content a, html body .content strong, html body .content label,
html body .content div, html body .content time, html body .content summary, html body .content figcaption,
html body .content h1, html body .content h2, html body .content h3, html body .content h4, html body .content h5, html body .content h6,
html body [data-pv-widget], html body [data-pv-widget] * {
  font-family: var(--pv-font) !important;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
html body .content i[class*="fa"], html body .content span.fa, html body .content .fa-stack { font-family: FontAwesome !important; }

html body .content p, html body .content li {
  font-size: var(--pv-fs-body) !important; line-height: 1.65 !important; color: var(--pv-text);
}
html body .content p { margin: 0 0 var(--pv-s4) !important; }
html body .content ul, html body .content ol { margin: 0 0 var(--pv-s4) !important; padding-left: 1.3em !important; }
html body .content li { margin: 0 0 var(--pv-s2) !important; }
html body .content a { color: var(--pv-primary); text-underline-offset: 3px; }
html body .content a:hover { color: var(--pv-primary-ink); }
html body .content strong, html body .content b { font-weight: 700; }

html body .content h1, html body .content h2, html body .content h3, html body .content h4 {
  color: var(--pv-ink) !important; letter-spacing: -0.01em !important; text-transform: none !important;
  font-style: normal !important; text-shadow: none !important; word-break: normal; overflow-wrap: break-word;
}
html body .content h1 { font-size: var(--pv-fs-h1) !important; line-height: 1.15 !important; font-weight: 800 !important; margin: 0 0 var(--pv-s4) !important; }
html body .content h2 { font-size: var(--pv-fs-h2) !important; line-height: 1.2 !important; font-weight: 750 !important; margin: var(--pv-s6) 0 var(--pv-s3) !important; }
html body .content h3 { font-size: var(--pv-fs-h3) !important; line-height: 1.3 !important; font-weight: 700 !important; margin: var(--pv-s5) 0 var(--pv-s2) !important; }
html body .content h4 { font-size: var(--pv-fs-h4) !important; line-height: 1.35 !important; font-weight: 700 !important; margin: var(--pv-s4) 0 var(--pv-s2) !important; }
html body .content h1:first-child, html body .content h2:first-child, html body .content h3:first-child { margin-top: 0 !important; }
html body .content h2 + p, html body .content h3 + p, html body .content h4 + p { margin-top: 0 !important; }
/* WPBakery blocks: consistent gap between stacked elements */
html body .content .wpb_text_column, html body .content .wpb_content_element { margin-bottom: var(--pv-s4) !important; }
html body .content .wpb_text_column .wpb_wrapper > *:last-child { margin-bottom: 0 !important; }

/* Post titles + meta (news posts use Arvo in the theme) */
html body .content h2.entry_title, html body .content .entry_title a { font-size: var(--pv-fs-h2) !important; line-height: 1.2 !important; color: var(--pv-ink) !important; }
html body .content .post_info, html body .content .post_info a, html body .content span.date, html body .content span.time {
  font-size: var(--pv-fs-label) !important; color: var(--pv-muted) !important; letter-spacing: .02em !important;
}

/* ─── Text on dark bands (JS tags rows whose real background is dark) ─────── */
html body .content .pv-on-dark, html body .content .pv-on-dark h1, html body .content .pv-on-dark h2,
html body .content .pv-on-dark h3, html body .content .pv-on-dark h4, html body .content .pv-on-dark p,
html body .content .pv-on-dark li, html body .content .pv-on-dark span, html body .content .pv-on-dark strong,
html body .content .pv-on-dark td, html body .content .pv-on-dark th, html body .content .pv-on-dark div { color: #FFFFFF !important; }
html body .content .pv-on-dark p, html body .content .pv-on-dark li { color: rgba(255,255,255,.88) !important; }
html body .content .pv-on-dark a { color: #FFFFFF !important; text-decoration: underline; }
/* light cards inside dark bands go back to dark text */
html body .content .pv-on-dark .pv-on-light, html body .content .pv-on-dark .pv-on-light * { color: var(--pv-text) !important; }
html body .content .pv-on-dark .pv-on-light h2, html body .content .pv-on-dark .pv-on-light h3,
html body .content .pv-on-dark .pv-on-light h4, html body .content .pv-on-dark .pv-on-light strong { color: var(--pv-ink) !important; }

/* ─── Buttons (theme buttons + tool buttons share one look) ───────────────── */
html body .content .qbutton, html body .content a.qbutton {
  font-family: var(--pv-font) !important; font-size: 15px !important; font-weight: 700 !important;
  letter-spacing: .02em !important; text-transform: none !important;
  min-height: var(--pv-tap) !important; height: auto !important; line-height: 1.2 !important;
  padding: 12px 22px !important; display: inline-flex !important; align-items: center; justify-content: center;
  border-radius: var(--pv-radius-pill) !important; background: var(--pv-primary) !important; color: #fff !important;
  border: 0 !important; box-shadow: none !important; text-decoration: none !important;
}
html body .content .qbutton:hover { background: var(--pv-primary-ink) !important; }

/* ─── Tables: one style everywhere; stacked cards on phones (JS adds data-label) */
html body .content table {
  width: 100% !important; border-collapse: separate !important; border-spacing: 0 !important;
  background: var(--pv-card); border: 1px solid var(--pv-line) !important; border-radius: var(--pv-radius) !important;
  overflow: hidden; margin: 0 0 var(--pv-s5) !important; table-layout: auto !important;
}
html body .content table th {
  background: var(--pv-surface) !important; color: var(--pv-muted) !important;
  font-size: var(--pv-fs-label) !important; font-weight: 700 !important; letter-spacing: .04em !important;
  text-transform: uppercase !important; text-align: left !important; padding: 12px 14px !important;
  border: 0 !important; border-bottom: 1px solid var(--pv-line) !important; white-space: nowrap; line-height: 1.3 !important;
}
html body .content table td {
  font-size: var(--pv-fs-small) !important; line-height: 1.45 !important; color: var(--pv-text) !important;
  padding: 12px 14px !important; border: 0 !important; border-bottom: 1px solid var(--pv-line) !important;
  vertical-align: top !important; text-align: left; word-break: normal !important; overflow-wrap: anywhere;
  background: transparent !important;
}
html body .content table tr:last-child td { border-bottom: 0 !important; }
html body .content table td a { font-weight: 600; }
html body .content .pv-num { text-align: right !important; white-space: nowrap; }

@media (max-width: 640px) {
  html body .content table.pv-stack, html body .content table.pv-stack tbody,
  html body .content table.pv-stack tr, html body .content table.pv-stack td { display: block !important; width: auto !important; }
  html body .content table.pv-stack { border: 0 !important; background: transparent; overflow: visible; }
  html body .content table.pv-stack thead { display: none !important; }
  html body .content table.pv-stack tr {
    background: var(--pv-card); border: 1px solid var(--pv-line); border-radius: var(--pv-radius);
    padding: var(--pv-s3) var(--pv-s4); margin: 0 0 var(--pv-s3);
  }
  html body .content table.pv-stack td {
    display: flex !important; gap: var(--pv-s3); justify-content: space-between; align-items: baseline;
    padding: 6px 0 !important; border: 0 !important; text-align: right;
  }
  html body .content table.pv-stack td::before {
    content: attr(data-label); flex: 0 0 auto; max-width: 45%; text-align: left;
    font-size: var(--pv-fs-label); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pv-muted);
  }
  html body .content table.pv-stack td.pv-td-lead { display: block !important; text-align: left; font-size: 16px !important; font-weight: 700; color: var(--pv-ink) !important; padding-bottom: 8px !important; }
  html body .content table.pv-stack td.pv-td-lead::before { display: none; }
  html body .content table.pv-stack td:empty, html body .content table.pv-stack td[data-label=""]::before { display: none; }
  /* scroll wrappers no longer needed once stacked */
  html body .content .pv-vote-scroll, html body .content .pv-aggregate-table { overflow: visible !important; max-height: none !important; }
}

/* ─── Nested scroll boxes: let the page scroll on phones ──────────────────── */
@media (max-width: 768px) {
  html body .content .pv-w-scroll, html body .content .pv-vote-scroll, html body .content [class*="-scroll"] {
    max-height: none !important; overflow-y: visible !important;
  }
}

/* ─── House ad card: no empty slab ────────────────────────────────────────── */
html body .content aside.pv-ad { min-height: 0 !important; height: auto !important; border-radius: var(--pv-radius) !important; margin: var(--pv-s5) auto !important; }
html body .content aside.pv-ad * { min-height: 0 !important; }
html body .content aside.pv-ad a { padding: var(--pv-s5) !important; display: block !important; text-decoration: none !important; }

/* ─── Back to top: small, out of the way ──────────────────────────────────── */
html body #back_to_top {
  width: 40px !important; height: 40px !important; right: 16px !important; bottom: 16px !important;
  border-radius: 50% !important; background: rgba(26,43,74,.88) !important; border: 0 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.18) !important; overflow: hidden;
}
html body #back_to_top span, html body #back_to_top .fa-stack { width: 40px !important; height: 40px !important; line-height: 40px !important; border: 0 !important; background: transparent !important; }
html body #back_to_top i { color: #fff !important; font-size: 16px !important; line-height: 40px !important; }
@media (max-width: 640px) { html body #back_to_top { right: 12px !important; bottom: 12px !important; opacity: .9; } }

/* ═══ DATA TOOLS ════════════════════════════════════════════════════════════ */
html body [data-pv-widget] {
  color: var(--pv-text); background: var(--pv-card); border: 1px solid var(--pv-line);
  border-radius: var(--pv-radius); box-shadow: var(--pv-shadow); margin: 0 0 var(--pv-s5); overflow: visible;
}
html body [data-pv-widget] > div { padding: var(--pv-s5); }
@media (max-width: 640px) { html body [data-pv-widget] > div { padding: var(--pv-s4); } }
html body [data-pv-widget] h3 { font-size: var(--pv-fs-h3) !important; line-height: 1.3 !important; font-weight: 750 !important; color: var(--pv-ink) !important; margin: 0 0 var(--pv-s4) !important; }
html body [data-pv-widget] h4 { font-size: var(--pv-fs-label) !important; font-weight: 700 !important; letter-spacing: .06em !important; text-transform: uppercase !important; color: var(--pv-muted) !important; margin: var(--pv-s5) 0 var(--pv-s3) !important; }
html body .pv-w-loading, html body .pv-w-empty { color: var(--pv-muted); font-size: var(--pv-fs-small); padding: var(--pv-s5); text-align: center; }
html body .pv-w-error { color: var(--pv-rep); background: var(--pv-rep-tint); border-radius: var(--pv-radius-sm); padding: var(--pv-s4); font-size: var(--pv-fs-small); }

/* Inputs: one search field style */
html body .pv-w-search-input, html body .pv-w-state-search, html body .pv-w-picker-input, html body .pv-w-dir-search,
html body .content input[type="search"], html body .content .pv-bd-search {
  width: 100% !important; min-height: 48px !important; height: auto !important; padding: 12px 16px !important;
  font-size: 16px !important; color: var(--pv-text) !important; background: var(--pv-card) !important;
  border: 1.5px solid var(--pv-line) !important; border-radius: var(--pv-radius-sm) !important;
  box-shadow: none !important; outline: none !important; -webkit-appearance: none; appearance: none; box-sizing: border-box !important;
}
html body .pv-w-search-input:focus, html body .pv-w-state-search:focus, html body .pv-w-picker-input:focus,
html body .pv-w-dir-search:focus, html body .content input[type="search"]:focus, html body .content .pv-bd-search:focus {
  border-color: var(--pv-accent) !important; box-shadow: 0 0 0 3px var(--pv-accent-tint) !important;
}

/* Chips / filter buttons / pagination: real tap targets */
html body .pv-w-dir-btn, html body .pv-w-tab, html body .pv-w-page-btn, html body .pv-w-bill-expand,
html body .content .pv-bd-chip, html body .content .pv-bd-more-btn, html body .pv-chip {
  min-height: var(--pv-tap) !important; min-width: var(--pv-tap); padding: 10px 16px !important;
  font-size: 15px !important; font-weight: 600 !important; line-height: 1.2 !important;
  color: var(--pv-ink) !important; background: var(--pv-card) !important;
  border: 1.5px solid var(--pv-line) !important; border-radius: var(--pv-radius-pill) !important;
  cursor: pointer; display: inline-flex !important; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, border-color .15s, color .15s; -webkit-tap-highlight-color: transparent;
}
html body .pv-w-dir-btn:hover, html body .pv-w-tab:hover, html body .pv-w-page-btn:hover, html body .pv-w-bill-expand:hover,
html body .content .pv-bd-chip:hover { border-color: var(--pv-accent) !important; }
html body .pv-w-dir-btn--active, html body .pv-w-tab--active, html body .content .pv-bd-chip.pv-bd-active {
  background: var(--pv-accent) !important; border-color: var(--pv-accent) !important; color: #fff !important;
}
html body .content .pv-bd-chip.pv-bd-active *, html body .pv-w-dir-btn--active * { color: #fff !important; }
html body .pv-w-dir-btn--d.pv-w-dir-btn--active { background: var(--pv-dem) !important; border-color: var(--pv-dem) !important; }
html body .pv-w-dir-btn--r.pv-w-dir-btn--active { background: var(--pv-rep) !important; border-color: var(--pv-rep) !important; }
html body .pv-w-dir-btn--i.pv-w-dir-btn--active { background: var(--pv-ind) !important; border-color: var(--pv-ind) !important; }

/* ─── Member directory: app-style list on phones, grid on wider screens ───── */
html body .pv-w-dir-controls { display: flex; flex-direction: column; gap: var(--pv-s3); margin: 0 0 var(--pv-s4); }
html body .pv-w-dir-filters { display: flex; flex-wrap: wrap; gap: var(--pv-s2); align-items: center; }
html body .pv-w-dir-group { display: flex; gap: var(--pv-s2); flex-wrap: wrap; }
html body .pv-w-dir-sep { display: none !important; }
html body .pv-w-dir-count { font-size: var(--pv-fs-small) !important; color: var(--pv-muted) !important; font-weight: 600; }
html body .pv-w-dir-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important; gap: var(--pv-s3) !important; }
html body .pv-w-dir-card, html body .pv-w-member-card {
  display: flex !important; flex-direction: row !important; align-items: center !important; gap: var(--pv-s3) !important;
  padding: var(--pv-s3) var(--pv-s4) !important; min-height: 72px; height: auto !important;
  background: var(--pv-card) !important; border: 1px solid var(--pv-line) !important; border-left-width: 4px !important;
  border-radius: var(--pv-radius) !important; text-decoration: none !important; text-align: left !important;
  box-shadow: none !important; transition: border-color .15s, box-shadow .15s;
}
html body .pv-w-dir-card:hover, html body .pv-w-member-card:hover { box-shadow: var(--pv-shadow) !important; }
html body .pv-w-dir-card--d { border-left-color: var(--pv-dem) !important; }
html body .pv-w-dir-card--r { border-left-color: var(--pv-rep) !important; }
html body .pv-w-dir-card--i { border-left-color: var(--pv-ind) !important; }
html body .pv-w-dir-photo, html body .pv-w-member-photo {
  width: 52px !important; height: 52px !important; min-width: 52px; border-radius: 50% !important; object-fit: cover !important;
  margin: 0 !important; background: var(--pv-surface); border: 0 !important;
}
html body .pv-w-dir-info, html body .pv-w-member-info { display: flex !important; flex-direction: column !important; gap: 2px !important; min-width: 0; text-align: left !important; align-items: flex-start !important; }
html body .pv-w-dir-info strong, html body .pv-w-member-info strong { font-size: 16px !important; line-height: 1.3 !important; font-weight: 700 !important; color: var(--pv-ink) !important; }
html body .pv-w-dir-info span, html body .pv-w-member-meta, html body .pv-w-member-role { font-size: 14px !important; line-height: 1.35 !important; color: var(--pv-muted) !important; margin: 0 !important; }
html body .pv-w-dir-party { display: none !important; }
html body .pv-w-dir-meta { font-size: 14px !important; color: var(--pv-muted) !important; }
html body .pv-w-party-tag { font-weight: 700; }
html body .pv-w-party-tag--d { color: var(--pv-dem) !important; } html body .pv-w-party-tag--r { color: var(--pv-rep) !important; } html body .pv-w-party-tag--i { color: var(--pv-ind) !important; }
html body .pv-w-dir-paging, html body .pv-w-pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--pv-s3); margin-top: var(--pv-s4); font-size: var(--pv-fs-small); color: var(--pv-muted); }

/* ─── Compare ─────────────────────────────────────────────────────────────── */
html body .pv-w-compare-pickers { display: grid !important; grid-template-columns: 1fr auto 1fr; gap: var(--pv-s3); align-items: start; }
@media (max-width: 640px) { html body .pv-w-compare-pickers { grid-template-columns: 1fr; } html body .pv-w-vs { justify-self: center; } }
html body .pv-w-picker { position: relative !important; width: 100% !important; }
html body .pv-w-vs { font-size: var(--pv-fs-label) !important; font-weight: 800 !important; letter-spacing: .08em; text-transform: uppercase; color: var(--pv-muted) !important; padding-top: 14px; }
html body .pv-w-picker-results {
  position: absolute !important; left: 0; right: 0; top: calc(100% + 4px); z-index: 50;
  background: var(--pv-card); border: 1px solid var(--pv-line); border-radius: var(--pv-radius-sm);
  box-shadow: 0 8px 24px rgba(16,24,40,.14); max-height: 320px; overflow-y: auto;
}
html body .pv-w-picker-results:empty { display: none; }
html body .pv-w-picker-option {
  display: flex !important; align-items: center; gap: var(--pv-s3); width: 100%; min-height: 52px;
  padding: 8px 12px !important; background: transparent; border: 0; border-bottom: 1px solid var(--pv-line);
  text-align: left; cursor: pointer; font-size: 15px !important; color: var(--pv-text) !important;
}
html body .pv-w-picker-option:last-child { border-bottom: 0; }
html body .pv-w-picker-option:hover, html body .pv-w-picker-option:focus { background: var(--pv-accent-tint); outline: none; }
html body .pv-w-picker-option img { width: 36px !important; height: 36px !important; border-radius: 50%; object-fit: cover; }
html body .pv-w-picked {
  display: flex; align-items: center; gap: var(--pv-s3); min-height: 48px; padding: 8px 8px 8px 12px;
  border: 1.5px solid var(--pv-accent); background: var(--pv-accent-tint); border-radius: var(--pv-radius-sm);
}
html body .pv-w-picked img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
html body .pv-w-picked strong { flex: 1; font-size: 15px !important; color: var(--pv-ink) !important; }
html body .pv-w-picked button { min-width: var(--pv-tap); min-height: var(--pv-tap); border: 0; background: transparent; font-size: 22px !important; color: var(--pv-muted) !important; cursor: pointer; }
html body .pv-w-compare-hint { margin: var(--pv-s4) 0 0 !important; font-size: var(--pv-fs-small) !important; color: var(--pv-muted) !important; }
html body .pv-w-compare-result:empty { display: none; }
html body .pv-w-compare-result { margin-top: var(--pv-s5); }
html body .pv-w-compare-cards { display: grid !important; grid-template-columns: 1fr auto 1fr; gap: var(--pv-s3); align-items: center; }
@media (max-width: 640px) { html body .pv-w-compare-cards { grid-template-columns: 1fr; } }
html body .pv-w-compare-score { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--pv-s3); }
html body .pv-w-score-circle {
  width: 96px !important; height: 96px !important; border-radius: 50% !important; display: flex !important; align-items: center; justify-content: center;
  font-size: 28px !important; font-weight: 800 !important; color: var(--pv-accent) !important; background: var(--pv-accent-tint) !important; border: 0 !important;
}
html body .pv-w-compare-score span { font-size: var(--pv-fs-small) !important; color: var(--pv-muted) !important; }
html body .pv-w-compare-detail { display: flex; gap: var(--pv-s3); justify-content: center; flex-wrap: wrap; margin-top: var(--pv-s4); }
html body .pv-w-compare-detail span { padding: 8px 14px; border-radius: var(--pv-radius-pill); font-weight: 700; font-size: var(--pv-fs-small) !important; }
html body .pv-w-compare-detail .pv-w-agreed { background: var(--pv-yea-tint); color: var(--pv-yea) !important; }
html body .pv-w-compare-detail .pv-w-diverged { background: var(--pv-nay-tint); color: var(--pv-nay) !important; }

/* ─── State delegation ────────────────────────────────────────────────────── */
html body .pv-w-state-results { margin-top: var(--pv-s2); border: 1px solid var(--pv-line); border-radius: var(--pv-radius-sm); overflow: hidden; }
html body .pv-w-state-results:empty { display: none; }
html body .pv-w-state-option { display: block; width: 100%; min-height: var(--pv-tap); padding: 10px 14px; text-align: left; border: 0; border-bottom: 1px solid var(--pv-line); background: var(--pv-card); font-size: 16px !important; color: var(--pv-ink) !important; cursor: pointer; }
html body .pv-w-state-option:last-child { border-bottom: 0; }
html body .pv-w-state-option:hover, html body .pv-w-state-option:focus { background: var(--pv-accent-tint); outline: none; }
html body .pv-w-delegation-result { margin-top: var(--pv-s5); }
html body .pv-w-delegation-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--pv-s2) var(--pv-s4); margin: 0 0 var(--pv-s3); }
html body .pv-w-delegation-head h3 { margin: 0 !important; }
html body .pv-w-delegation-head a { font-size: 15px !important; font-weight: 700 !important; color: var(--pv-primary) !important; text-decoration: none; }
html body .pv-w-delegation-summary { display: flex; flex-wrap: wrap; gap: var(--pv-s2); align-items: center; margin: 0 0 var(--pv-s2); font-size: var(--pv-fs-small); color: var(--pv-muted); }
html body .pv-w-party-chip { padding: 6px 12px !important; border-radius: var(--pv-radius-pill) !important; font-size: 14px !important; font-weight: 700 !important; }
html body .pv-w-party-d { background: var(--pv-dem-tint) !important; color: var(--pv-dem) !important; }
html body .pv-w-party-r { background: var(--pv-rep-tint) !important; color: var(--pv-rep) !important; }
html body .pv-w-party-i { background: var(--pv-ind-tint) !important; color: var(--pv-ind) !important; }
html body .pv-w-member-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important; gap: var(--pv-s3) !important; }

/* ─── Vote rows, bill rows, badges ────────────────────────────────────────── */
html body .pv-w-badge { display: inline-flex; align-items: center; padding: 4px 10px !important; border-radius: var(--pv-radius-pill) !important; font-size: 13px !important; font-weight: 700 !important; letter-spacing: .02em; }
html body .pv-w-badge--yea { background: var(--pv-yea-tint) !important; color: var(--pv-yea) !important; }
html body .pv-w-badge--nay { background: var(--pv-nay-tint) !important; color: var(--pv-nay) !important; }
html body .pv-w-badge--not-voting, html body .pv-w-badge--present { background: var(--pv-ind-tint) !important; color: var(--pv-ind) !important; }
html body .pv-w-vote-row, html body .pv-w-bill-row, html body .pv-w-absent-row, html body .pv-w-pulse-row {
  padding: var(--pv-s3) 0 !important; border-bottom: 1px solid var(--pv-line) !important; gap: var(--pv-s3) !important; font-size: var(--pv-fs-small) !important; line-height: 1.45 !important;
}
html body .pv-w-vote-date, html body .pv-w-bill-meta, html body .pv-w-vote-result { color: var(--pv-muted) !important; font-size: 14px !important; }
html body .pv-w-vote-question { color: var(--pv-text) !important; }
html body .pv-w-bill-link, html body .pv-w-bill-id { color: var(--pv-primary) !important; font-weight: 700 !important; }

/* Server-rendered vote lists (pv_recent_votes etc.) */
html body .content .pv-votes-list > * { border-color: var(--pv-line) !important; border-radius: var(--pv-radius) !important; padding: var(--pv-s3) var(--pv-s4) !important; margin: 0 0 var(--pv-s2) !important; background: var(--pv-card) !important; }
html body .content .pv-votes-list a { font-weight: 700 !important; font-size: 16px !important; line-height: 1.35 !important; color: var(--pv-ink) !important; text-decoration: none !important; }
html body .content .pv-votes-list span, html body .content .pv-votes-list time, html body .content .pv-votes-list div { font-size: 14px !important; line-height: 1.45 !important; }

/* ─── Bill directory (pv-bd) ──────────────────────────────────────────────── */
html body .content .pv-bd-chip { flex-direction: column; gap: 0 !important; }
html body .content .pv-bd-more-btn { background: var(--pv-ink) !important; color: #fff !important; border-color: var(--pv-ink) !important; }

/* ─── Member profile ──────────────────────────────────────────────────────── */
html body .content .pv-profile h1 { margin-bottom: var(--pv-s2) !important; }
html body .content .pv-role { font-size: 17px !important; color: var(--pv-muted) !important; margin: 0 0 var(--pv-s2) !important; }
html body .content .pv-party, html body .content .pv-bio-line { font-size: var(--pv-fs-small) !important; margin: 0 0 var(--pv-s2) !important; }
html body .content .pv-stat-value { font-size: 28px !important; font-weight: 800 !important; color: var(--pv-ink) !important; line-height: 1.1 !important; }
html body .content .pv-stat-label { font-size: var(--pv-fs-label) !important; letter-spacing: .05em !important; text-transform: uppercase !important; color: var(--pv-muted) !important; }
html body .content .pv-status-badge { font-size: 13px !important; padding: 4px 12px !important; border-radius: var(--pv-radius-pill) !important; }

/* ─── Fixes from the phone pass ───────────────────────────────────────────── */
/* Theme "custom font" headings carry inline white text; on light pages that is invisible */
html body .content .custom_font_holder {
  color: var(--pv-ink) !important; font-family: var(--pv-font) !important; line-height: 1.15 !important;
  font-size: var(--pv-fs-h1) !important; font-weight: 800 !important; letter-spacing: -0.01em !important;
  text-transform: none !important; margin: 0 0 var(--pv-s3) !important; padding: 0 !important;
}
html body .content .pv-on-dark .custom_font_holder { color: #FFFFFF !important; }
/* Stacked tables must never keep a desktop min-width */
@media (max-width: 640px) {
  html body .content table.pv-stack { min-width: 0 !important; max-width: 100% !important; }
  html body .content .pv-vote-scrollbox, html body .content .pv-vote-table { width: auto !important; overflow: visible !important; max-height: none !important; }
}
/* Party pills inside tables: fit the label */
html body .content td span[style*="width:24px"] {
  width: auto !important; min-width: 28px !important; height: auto !important; padding: 3px 8px !important;
  line-height: 1.3 !important; font-size: 12px !important; border-radius: var(--pv-radius-pill) !important;
}
/* Long tables on phones: first rows + a "Show all" control (added by script) */
@media (max-width: 640px) { html body .content table.pv-collapsed tr.pv-more-row { display: none !important; } }
html body .content .pv-show-all {
  display: none; width: 100%; min-height: var(--pv-tap); margin: 0 0 var(--pv-s5);
  border: 1.5px solid var(--pv-line); border-radius: var(--pv-radius-pill); background: var(--pv-card);
  font-size: 15px !important; font-weight: 700 !important; color: var(--pv-ink) !important; cursor: pointer;
}
@media (max-width: 640px) { html body .content table.pv-collapsed + .pv-show-all { display: block; } }
/* No nested scroll boxes inside tools; the page scrolls. Dropdowns keep their own scroll. */
html body [data-pv-widget] .pv-w-delegation-content, html body [data-pv-widget] .pv-w-compare-result,
html body [data-pv-widget] .pv-w-scroll, html body [data-pv-widget] .pv-w-member-grid {
  max-height: none !important; overflow: visible !important;
}
/* House ad: drop the empty paragraph/link that auto-paragraphing leaves behind */
html body .content aside.pv-ad p:empty, html body .content aside.pv-ad a:empty,
html body .content aside.pv-ad p:has(> a:empty:only-child) { display: none !important; }
html body .content aside.pv-ad a { min-height: 0 !important; }
/* stacked cells: label column + wrapping value column (long results wrap instead of overflowing) */
@media (max-width: 640px) {
  html body .content table.pv-stack td { display: grid !important; grid-template-columns: minmax(84px, 38%) 1fr; column-gap: var(--pv-s3); align-items: baseline; text-align: right; }
  html body .content table.pv-stack td::before { max-width: none; }
  html body .content table.pv-stack td.pv-td-lead { display: block !important; }
}
@media (max-width: 640px) {
  html body .content table.pv-stack td, html body .content table.pv-stack td * { white-space: normal !important; }
  html body .content table.pv-stack td > * { justify-self: end; max-width: 100%; }
}

/* ─── Accordions (FAQ, glossary): one readable style, open state in brand tint ─ */
html body .content .qode-accordion-holder .qode-title-holder {
  background: var(--pv-card) !important; border: 1px solid var(--pv-line) !important; border-radius: var(--pv-radius-sm) !important;
  padding: 14px 48px 14px 16px !important; margin: 0 0 var(--pv-s2) !important; min-height: var(--pv-tap); position: relative; cursor: pointer;
}
html body .content .qode-accordion-holder .qode-title-holder h3, html body .content .qode-accordion-holder .qode-title-holder h4,
html body .content .qode-accordion-holder .qode-title-holder .qode-tab-title, html body .content .qode-accordion-holder .qode-title-holder span {
  font-size: 18px !important; line-height: 1.35 !important; font-weight: 700 !important; color: var(--pv-ink) !important; margin: 0 !important;
}
html body .content .qode-accordion-holder .qode-title-holder.ui-state-active, html body .content .qode-accordion-holder .qode-title-holder.ui-accordion-header-active {
  background: var(--pv-accent-tint) !important; border-color: var(--pv-accent) !important;
}
html body .content .qode-accordion-holder .qode-title-holder.ui-state-active * { color: var(--pv-accent) !important; }
html body .content .qode-accordion-holder .qode-accordion-mark { right: 14px !important; color: var(--pv-muted) !important; }
html body .content .qode-accordion-holder .qode-accordion-content { padding: 4px 16px 16px !important; border: 0 !important; background: transparent !important; }
html body .content .qode-accordion-holder .qode-title-holder > *, html body .content .qode-accordion-holder .qode-title-holder .qode-tab-title { padding-left: 0 !important; padding-right: 0 !important; margin-left: 0 !important; width: auto !important; }
html body .content .qode-accordion-holder .qode-title-holder *:not(.qode-accordion-mark):not(.qode-accordion-mark-icon):not(i) { padding-left: 0 !important; padding-right: 0 !important; margin-left: 0 !important; margin-right: 0 !important; max-width: none !important; }

/* ─── Member status badges ────────────────────────────────────────────────── */
html body .content .pv-status-badge { display: inline-block; padding: 5px 12px !important; border-radius: var(--pv-radius-pill) !important; font-size: 13px !important; font-weight: 700 !important; letter-spacing: .02em; text-transform: none !important; }
html body .content .pv-status-incumbent { background: var(--pv-yea-tint) !important; color: var(--pv-yea) !important; }
html body .content .pv-status-retiring { background: #FFF4E5 !important; color: #8A4B00 !important; }
html body .content .pv-status-former, html body .content .pv-status-historical { background: var(--pv-ind-tint) !important; color: var(--pv-ind) !important; }
html body .content .pv-status-deceased { background: #EDEDED !important; color: #333 !important; }

/* ─── Header: seven sections on one row; solid sticky bar that clears the logo ─ */
@media (min-width: 1001px) {
  html body nav.main_menu > ul > li > a {
    padding: 0 20px !important; font-family: var(--pv-font) !important; font-size: 14px !important;
    font-weight: 700 !important; letter-spacing: .06em !important;
  }
  html body nav.main_menu > ul > li > a span { padding: 0 !important; }
  html body nav.main_menu > ul { white-space: nowrap; }
  html body header.sticky .header_bottom, html body header.sticky .header_inner {
    background: #FFFFFF !important; box-shadow: 0 2px 10px rgba(16,24,40,.08) !important;
  }
  html body header.sticky nav.main_menu { padding-left: 190px !important; }
}
@media (min-width: 1001px) and (max-width: 1280px) {
  html body nav.main_menu > ul > li > a { padding: 0 12px !important; font-size: 13px !important; letter-spacing: .03em !important; }
}
/* compare result cards fill their columns */
html body .pv-w-compare-card, html body .pv-w-compare-card > a { width: 100% !important; }
html body .pv-w-compare-note {
  grid-column: 1 / -1; margin: 0 !important; padding: var(--pv-s4) var(--pv-s5); border-radius: var(--pv-radius);
  background: var(--pv-surface); color: var(--pv-text) !important; font-size: 16px !important; line-height: 1.55 !important; text-align: center;
}
html body .pv-w-compare-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--pv-s3); margin-top: var(--pv-s4); }
@media (max-width: 640px) { html body .pv-w-compare-pair { grid-template-columns: 1fr; } }

/* ─── Video grid ──────────────────────────────────────────────────────────── */
html body .pv-w-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--pv-s4); }
html body .pv-w-video { display: flex; flex-direction: column; gap: 6px; text-decoration: none !important; color: var(--pv-ink) !important; }
html body .pv-w-video img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--pv-radius-sm); background: var(--pv-surface); }
html body .pv-w-video-title { font-size: 16px !important; font-weight: 700 !important; line-height: 1.35 !important; color: var(--pv-ink) !important; }
html body .pv-w-video time { font-size: 14px !important; color: var(--pv-muted) !important; }
html body .pv-w-video:hover .pv-w-video-title { color: var(--pv-primary) !important; }

/* ─── Candidates page (filter chips + summary cards are inline-styled by the plugin) ─ */
html body .content .pv-candidates-filters > div:first-child { font-size: var(--pv-fs-label) !important; font-weight: 700 !important; color: var(--pv-muted) !important; letter-spacing: .06em; margin-bottom: var(--pv-s2) !important; }
html body .content .pv-candidates-filters a {
  display: inline-flex !important; align-items: center; min-height: var(--pv-tap) !important; padding: 10px 16px !important;
  margin: 0 var(--pv-s2) var(--pv-s2) 0 !important; border: 1.5px solid var(--pv-line) !important; border-radius: var(--pv-radius-pill) !important;
  background: var(--pv-card) !important; color: var(--pv-ink) !important; font: 600 15px var(--pv-font) !important; text-decoration: none !important;
}
html body .content .pv-candidates-filters a[style*="#1e3a8a"] { background: var(--pv-accent) !important; border-color: var(--pv-accent) !important; color: #fff !important; }
html body .content .pv-candidates-summary { gap: var(--pv-s3) !important; }
html body .content .pv-candidates-summary > div { border: 1px solid var(--pv-line) !important; border-radius: var(--pv-radius) !important; padding: var(--pv-s4) !important; }
html body .content .pv-candidates-summary > div > div:first-child { font: 800 28px var(--pv-font) !important; color: var(--pv-ink) !important; }
html body .content .pv-candidates-summary > div > div:last-child { font: 700 13px var(--pv-font) !important; letter-spacing: .05em !important; color: var(--pv-muted) !important; }

/* ─── Tone nesting: dark band > light card > dark element ─────────────────── */
html body .content .pv-on-dark .pv-on-light .pv-on-dark-inner, html body .content .pv-on-dark .pv-on-light .pv-on-dark-inner * { color: #FFFFFF !important; }
html body .content .pv-on-dark .pv-on-light a { color: var(--pv-primary) !important; }

/* ─── Contrast fixes found by the site audit ──────────────────────────────── */
/* dark-filled buttons and button-style links: white text wherever they sit */
html body .content .pv-on-dark-inner, html body .content .pv-on-dark-inner *,
html body .content .pv-on-dark .pv-on-light .pv-on-dark-inner, html body .content .pv-on-dark .pv-on-light .pv-on-dark-inner * { color: #FFFFFF !important; }
/* the footer news list reused on light pages */
html body .content .pv-footer-news, html body .content .pv-footer-news * { color: var(--pv-text) !important; }
html body .content .pv-footer-news a { color: var(--pv-ink) !important; font-weight: 700 !important; }
html body .content .pv-footer-news time, html body .content .pv-footer-news [class*="date"], html body .content .pv-footer-news span { color: var(--pv-muted) !important; }
/* hardcoded pale greys (2.5:1 on white) raised to the muted grey (5.9:1) */
html body .content small,
html body .content [style*="color:#94a3b8"], html body .content [style*="color: #94a3b8"],
html body .content [style*="color:#9ca3af"], html body .content [style*="color: #9ca3af"],
html body .content [style*="color:#999"], html body .content [style*="color: #999"],
html body .content [style*="color:#aaa"], html body .content [style*="color: #aaa"],
html body .content [style*="color:#888"], html body .content [style*="color: #888"],
html body .content [style*="color:#bbb"], html body .content [style*="color: #bbb"] { color: var(--pv-muted) !important; }
/* ...but inside dark bands they stay light (exact greys only, never brand colours) */
html body .content .pv-on-dark small,
html body .content .pv-on-dark [style*="color:#94a3b8"], html body .content .pv-on-dark [style*="color: #94a3b8"],
html body .content .pv-on-dark [style*="color:#9ca3af"], html body .content .pv-on-dark [style*="color: #9ca3af"],
html body .content .pv-on-dark [style*="color:#999"], html body .content .pv-on-dark [style*="color: #999"],
html body .content .pv-on-dark [style*="color:#aaa"], html body .content .pv-on-dark [style*="color: #aaa"],
html body .content .pv-on-dark [style*="color:#888"], html body .content .pv-on-dark [style*="color: #888"],
html body .content .pv-on-dark [style*="color:#bbb"], html body .content .pv-on-dark [style*="color: #bbb"] { color: rgba(255,255,255,.8) !important; }
/* a light card inside a dark band wins for its own text */
html body .content .pv-on-dark .pv-on-light small, html body .content .pv-on-dark .pv-on-light [style*="color:#9"],
html body .content .pv-on-dark .pv-on-light [style*="color: #9"], html body .content .pv-on-dark .pv-on-light [style*="color:#8"] { color: var(--pv-muted) !important; }
/* dark element (button, badge) inside that light card: white again */
html body .content .pv-on-dark .pv-on-light .pv-on-dark, html body .content .pv-on-dark .pv-on-light .pv-on-dark * { color: #FFFFFF !important; }
/* the light element itself, not just its children */
html body .content .pv-on-dark .pv-on-light { color: var(--pv-text) !important; }
html body .content .pv-on-dark th.pv-on-light, html body .content .pv-on-dark .pv-on-light th { color: var(--pv-muted) !important; }
/* tables inside dark bands keep their own light surface: dark text, muted headers */
html body .content .pv-on-dark table th, html body .content .pv-on-dark table th * { color: var(--pv-muted) !important; }
html body .content .pv-on-dark table td, html body .content .pv-on-dark table td * { color: var(--pv-text) !important; }
html body .content .pv-on-dark table td a { color: var(--pv-primary) !important; }
/* footer news list on regular pages: a card grid, not a stack of full-width images */
html body .content .pv-footer-news ul { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--pv-s4); }
html body .content .pv-footer-news li { margin: 0 !important; padding: 0 !important; border: 0 !important; }
html body .content .pv-footer-news li a:first-child img { border-radius: var(--pv-radius-sm) !important; margin-bottom: 4px; }
html body .content .pv-footer-news li a { font-size: 16px !important; line-height: 1.35 !important; }
html body .content .pv-footer-news li span { font-size: 14px !important; line-height: 1.45 !important; }

/* ─── Governor + mayoral race pages (agents/ingest-races.js) ─────────────── */
html body .content .pv-race-updated { color: var(--pv-muted); font-size: var(--pv-fs-small) !important; }
html body .content .pv-race-jump { line-height: 2.1 !important; font-size: var(--pv-fs-small) !important; color: var(--pv-muted); }
html body .content .pv-race-jump a { font-weight: 600; white-space: nowrap; }
html body .content .pv-race { padding: var(--pv-s6) 0 var(--pv-s5); border-top: 1px solid var(--pv-line); scroll-margin-top: 200px; }
html body .content .pv-race:first-child { border-top: 0; padding-top: var(--pv-s3); }
html body .content .pv-race h2 { margin: 0 0 var(--pv-s2) !important; }
html body .content .pv-race h3 { margin: var(--pv-s5) 0 var(--pv-s2) !important; font-size: var(--pv-fs-h4) !important; }
html body .content .pv-race-meta { color: var(--pv-muted); font-weight: 600; margin: 0 0 var(--pv-s4) !important; }
html body .content .pv-race-table { margin-bottom: var(--pv-s3) !important; }
html body .content .pv-race-table td, html body .content .pv-race-table th { overflow-wrap: normal !important; }
html body .content .pv-race-table .pv-badge { display: inline-block; margin-left: var(--pv-s2); padding: 2px 10px; border-radius: var(--pv-radius-pill); background: var(--pv-accent-tint); color: var(--pv-accent); font-size: var(--pv-fs-label); font-weight: 700; vertical-align: middle; }
html body .content .pv-race-rounds { list-style: none; padding-left: 0 !important; }
html body .content .pv-race-rounds li { padding: var(--pv-s2) 0; border-bottom: 1px solid var(--pv-line); margin: 0 !important; }
html body .content .pv-race-rounds li:last-child { border-bottom: 0; }
html body .content .pv-race-source { font-size: var(--pv-fs-small) !important; color: var(--pv-muted); margin: var(--pv-s3) 0 0 !important; }
@media (max-width: 1000px) { html body .content .pv-race { scroll-margin-top: 90px; } }
