/* The Commons Gallery — Mobile-first responsive CSS */

/* ── Custom properties ─────────────────────────────────────────────── */
:root {
    --color-bg: #fafaf8;
    --color-surface: #ffffff;
    --color-text: #1a1a2e;
    --color-text-muted: #6b7280;
    --color-border: #e2e0dc;
    --color-link: #2c5282;
    --color-dem: #2563eb;
    --color-dem-bg: #dbeafe;
    --color-rep: #dc2626;
    --color-rep-bg: #fee2e2;
    --color-accent: #1b2d45;
    --color-accent-gold: #b89a3d;
    --color-bar-bg: #e5e7eb;
    --radius: 4px;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.08);
    --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono",
        Menlo, monospace;
}

/* ── Reset & base ──────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-stack);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--color-link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Header / Nav ──────────────────────────────────────────────────── */
.site-header {
    background: var(--color-accent);
    color: #fff;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--color-accent-gold);
}

.site-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.site-header .site-title {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.site-header .site-title a {
    color: #fff;
    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    white-space: nowrap;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.site-nav a:hover,
.site-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

/* ── Main content ──────────────────────────────────────────────────── */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* ── Page header ───────────────────────────────────────────────────── */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-family: var(--font-serif);
    font-size: 1.625rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.page-header .subtitle {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* ── Search & filter bar ───────────────────────────────────────────── */
.filter-bar {
    position: sticky;
    top: 52px;
    background: var(--color-bg);
    padding: 0.75rem 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font-stack);
    background: var(--color-surface);
    min-height: 44px;
}

.search-input:focus {
    outline: 2px solid var(--color-link);
    outline-offset: -1px;
    border-color: var(--color-link);
}

.filter-chips {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.chip {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.8125rem;
    cursor: pointer;
    background: var(--color-surface);
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    user-select: none;
    transition: background 0.15s, border-color 0.15s;
}

.chip:hover {
    background: var(--color-border);
}

.chip.active {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

.sort-select {
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    background: var(--color-surface);
    font-family: var(--font-stack);
    min-height: 36px;
}

/* ── Senator card grid ─────────────────────────────────────────────── */
.senator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.senator-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.125rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.senator-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: #ccc;
}

.senator-card a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.senator-card .card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.senator-card .senator-name {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1rem;
}

.senator-card .card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.senator-card .card-meta span {
    white-space: nowrap;
}

/* ── Party badge ───────────────────────────────────────────────────── */
.party-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.party-badge.dem {
    background: var(--color-dem-bg);
    color: var(--color-dem);
}

.party-badge.rep {
    background: var(--color-rep-bg);
    color: var(--color-rep);
}

/* ── Profile page ──────────────────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    min-height: 44px;
}

.profile-header {
    margin-bottom: 2rem;
}

.profile-header h1 {
    font-family: var(--font-serif);
    font-size: 1.625rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-header .party-badge {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
}

.profile-meta {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.profile-meta span {
    display: block;
}

.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.profile-section h2 {
    font-size: 0.75rem;
    font-weight: 700;
    font-variant: small-caps;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--color-border);
}

/* ── Metric rows ───────────────────────────────────────────────────── */
.metric-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.metric-row .label {
    color: var(--color-text-muted);
}

.metric-row .value {
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--font-mono);
    color: var(--color-text);
}

/* ── Co-sponsor list ──────────────────────────────────────────────── */
.cosponsor-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cosponsor-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.5rem;
    border-radius: var(--radius);
    color: var(--color-text);
    font-size: 0.875rem;
    transition: background 0.15s;
    text-decoration: none;
}

.cosponsor-row:hover {
    background: var(--color-bg);
    text-decoration: none;
}

.cosponsor-row .party-badge {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.625rem;
    margin-right: 0.375rem;
}

.cosponsor-count {
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

/* ── Loyalty / progress bar ────────────────────────────────────────── */
.progress-bar {
    height: 8px;
    background: var(--color-bar-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.progress-bar .fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-bar .fill.dem {
    background: var(--color-dem);
}

.progress-bar .fill.rep {
    background: var(--color-rep);
}

/* ── Registration stacked bar ──────────────────────────────────────── */
.stacked-bar {
    display: flex;
    height: 1.25rem;
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.stacked-bar .segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #fff;
    min-width: 0;
}

.stacked-bar .segment.dem {
    background: var(--color-dem);
}

.stacked-bar .segment.rep {
    background: var(--color-rep);
}

.stacked-bar .segment.ind {
    background: #9ca3af;
}

.stacked-bar-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.stacked-bar-legend span::before {
    content: "";
    display: inline-block;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 2px;
    margin-right: 0.25rem;
    vertical-align: middle;
}

.stacked-bar-legend .leg-dem::before { background: var(--color-dem); }
.stacked-bar-legend .leg-rep::before { background: var(--color-rep); }
.stacked-bar-legend .leg-ind::before { background: #9ca3af; }

/* ── Stats dashboard ───────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.stat-group {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.stat-group h2 {
    font-size: 0.75rem;
    font-weight: 700;
    font-variant: small-caps;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--color-border);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
    font-size: 0.875rem;
}

.stat-item .stat-label {
    color: var(--color-text-muted);
}

.stat-item .stat-value {
    font-weight: 600;
    font-family: var(--font-mono);
}

/* ── Data tables ──────────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.data-table th {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    background: var(--color-bg);
    position: sticky;
    top: 0;
}

.data-table tbody tr:hover {
    background: var(--color-bg);
}

.data-table .nowrap {
    white-space: nowrap;
}

.data-table .mono {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.data-table .brief-cell {
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    max-width: 300px;
}

/* ── Vote result badges ──────────────────────────────────────────── */
.vote-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.vote-badge.passed {
    background: #dcfce7;
    color: #166534;
}

.vote-badge.defeated {
    background: #fee2e2;
    color: #991b1b;
}

/* ── Vote summary ────────────────────────────────────────────────── */
.vote-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--color-bg);
    border-radius: var(--radius);
}

.vote-tally {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

/* ── Wire brief text block ───────────────────────────────────────── */
.wire-brief {
    font-family: var(--font-serif);
    line-height: 1.75;
    font-size: 0.9375rem;
    white-space: pre-wrap;
}

/* ── Debate summary ──────────────────────────────────────────────── */
.debate-summary {
    margin-top: 1rem;
}

.debate-summary h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.debate-summary p {
    font-family: var(--font-serif);
    line-height: 1.75;
    font-size: 0.9375rem;
}

/* ── Bill action block ───────────────────────────────────────────── */
.bill-action-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.action-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 2rem 0;
}

/* ── Data note (limitation disclaimer) ───────────────────────────── */
.data-note {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    line-height: 1.5;
}

/* ── Hearing card grid ───────────────────────────────────────────── */
.hearing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.hearing-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-accent);
    border-radius: var(--radius);
    padding: 1.375rem 1.25rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.hearing-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: #ccc;
    border-top-color: var(--color-accent-gold);
}

.hearing-card a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.hearing-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.hearing-committee {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text);
}

.hearing-date {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.hearing-title {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.hearing-card-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.hearing-excerpt {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* ── Hearing detail sections ─────────────────────────────────────── */
.hearing-detail-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ── Testimony cards ─────────────────────────────────────────────── */
.testimony-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.testimony-card {
    padding: 1rem;
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.testimony-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.testimony-speaker {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 0.9375rem;
}

.testimony-affiliation {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.testimony-summary {
    font-family: var(--font-serif);
    font-size: 0.875rem;
    line-height: 1.7;
}

/* ── Role / position / engagement badges ─────────────────────────── */
.role-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: #e0e7ff;
    color: #3730a3;
}

.position-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: #f3f4f6;
    color: var(--color-text-muted);
}

.position-badge.support,
.position-badge.in-favor,
.position-badge.for {
    background: #dcfce7;
    color: #166534;
}

.position-badge.oppose,
.position-badge.against,
.position-badge.opposed {
    background: #fee2e2;
    color: #991b1b;
}

.position-badge.neutral,
.position-badge.mixed {
    background: #fef3c7;
    color: #92400e;
}

.engagement-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: #f3f4f6;
    color: var(--color-text-muted);
}

.engagement-badge.high {
    background: #dcfce7;
    color: #166534;
}

.engagement-badge.moderate,
.engagement-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.engagement-badge.low {
    background: #fee2e2;
    color: #991b1b;
}

/* ── Focus area tags ─────────────────────────────────────────────── */
.focus-tag {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.6875rem;
    margin: 0.125rem;
}

/* ── Referenced bills ────────────────────────────────────────────── */
.referenced-bills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.bill-link {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-family: var(--font-mono);
}

.bill-link:hover {
    background: var(--color-border);
    text-decoration: none;
}

/* ── Data table wrapper ────────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Footer ────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--color-accent);
    color: rgba(255, 255, 255, 0.6);
    padding: 2.5rem 1rem;
    margin-top: 3rem;
    font-size: 0.8125rem;
    border-top: 2px solid var(--color-accent-gold);
}

.site-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
    text-underline-offset: 2px;
}

.site-footer a:hover {
    color: #fff;
    text-decoration-color: rgba(255, 255, 255, 0.6);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.5rem;
}

.footer-note {
    line-height: 1.6;
}

/* ── Issue list (key issues) ──────────────────────────────────────── */
.issue-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.issue-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.issue-row:hover {
    background: var(--color-bg);
}

.issue-name {
    font-weight: 500;
}

.issue-meta {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.issue-source-link {
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-mono);
}

.issue-source-link:hover {
    text-decoration: none;
    background: var(--color-border);
}

.issue-bill-count {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

.issue-more {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.issue-floor-for {
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    background: #dcfce7;
    color: #166534;
    border-radius: 4px;
    font-weight: 600;
}

.issue-floor-against {
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 4px;
    font-weight: 600;
}

/* ── Issue tags container (legacy) ───────────────────────────────── */
.issue-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.issue-tags .focus-tag {
    font-size: 0.8125rem;
    padding: 0.25rem 0.5rem;
}

.issue-tags .focus-tag small {
    opacity: 0.6;
    margin-left: 0.125rem;
}

/* ── Speech cards ─────────────────────────────────────────────────── */
.speech-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.speech-card {
    padding: 1rem;
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    border-left: 3px solid #22c55e;
}

.speech-card.opposing {
    border-left-color: var(--color-rep);
}

.speech-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.speech-bill-title {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.speech-date {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-left: auto;
}

.speech-summary {
    font-family: var(--font-serif);
    font-size: 0.875rem;
    line-height: 1.7;
}

/* ── Expand button ────────────────────────────────────────────────── */
.expand-btn {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-family: var(--font-stack);
    color: var(--color-link);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.expand-btn:hover {
    background: var(--color-bg);
    border-color: var(--color-link);
}

/* ── Vote record summary ──────────────────────────────────────────── */
.vote-record-summary {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--color-bg);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.vr-stat {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

.vr-stat.aye {
    background: #dcfce7;
    color: #166534;
}

.vr-stat.nay {
    background: #fee2e2;
    color: #991b1b;
}

.vr-stat.exc {
    background: #f3f4f6;
    color: var(--color-text-muted);
}

.vr-subheading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

/* ── Dissent topic groups ─────────────────────────────────────────── */
.dissent-topic {
    margin-bottom: 0.25rem;
}

.dissent-topic-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.5rem;
    cursor: pointer;
    border-radius: var(--radius);
    font-size: 0.875rem;
    user-select: none;
}

.dissent-topic-header:hover {
    background: var(--color-bg);
}

.dissent-topic-header::before {
    content: "\25B6";
    font-size: 0.625rem;
    color: var(--color-text-muted);
    transition: transform 0.15s;
}

.dissent-topic-header.expanded::before {
    transform: rotate(90deg);
}

.dissent-topic-name {
    font-weight: 500;
}

.dissent-topic-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 4px;
    margin-left: auto;
}

.dissent-topic-bills {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.dissent-bill-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.8125rem;
}

.dissent-bill-title {
    color: var(--color-text-muted);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.dissent-bill-date {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
}

.dissent-bill-overflow {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    padding: 0.25rem 0;
}

.dissent-other {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

/* ── Cross-party flag ─────────────────────────────────────────────── */
.cross-party-flag {
    display: inline-block;
    padding: 0.0625rem 0.375rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    white-space: nowrap;
}

/* ── Key issues NAY annotation ────────────────────────────────────── */
.iv-nay {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.0625rem 0.375rem;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 4px;
}

/* ── Testimony claims ─────────────────────────────────────────────── */
.testimony-claims {
    margin-top: 0.75rem;
}

.claims-toggle {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-family: var(--font-stack);
    color: var(--color-link);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.claims-toggle:hover {
    background: var(--color-bg);
    border-color: var(--color-link);
}

.claims-list {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.claim-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    border-left: 3px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.claim-item.claim-verifiable {
    border-left-color: var(--color-link);
}

.claim-verifiable-badge {
    display: inline-block;
    padding: 0.0625rem 0.375rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Hearing position badges on cards ─────────────────────────────── */
.hearing-positions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

.position-badge.informational {
    background: #ede9fe;
    color: #5b21b6;
}

/* ── Source links ──────────────────────────────────────────────────── */
.source-link {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.source-link a {
    color: var(--color-text-muted);
    text-decoration: underline;
    text-decoration-color: var(--color-border);
    text-underline-offset: 2px;
}

.source-link a:hover {
    color: var(--color-link);
    text-decoration-color: var(--color-link);
}

/* ── Transcript viewer ────────────────────────────────────────────── */
.transcript-text {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
}

/* ── Hidden utility ────────────────────────────────────────────────── */
.hidden {
    display: none !important;
}

/* ── Tablet breakpoint (768px) ─────────────────────────────────────── */
@media (min-width: 768px) {
    .senator-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .filter-bar {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }

    .search-input {
        max-width: 300px;
    }

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

    .profile-sections {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .profile-section.full-width {
        grid-column: 1 / -1;
    }
}

/* ── Desktop breakpoint (1024px) ───────────────────────────────────── */
@media (min-width: 1024px) {
    .site-header .site-title {
        font-size: 1.1875rem;
    }

    .senator-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    main {
        padding: 2rem 2.5rem;
    }

    .page-header h1 {
        font-size: 1.875rem;
    }

    .profile-header h1 {
        font-size: 1.875rem;
    }
}
