
/* government.css */

/* ── Missing token definitions ───────────────────────────── */
:root {
    --mtg-soon:           #d97706;
    --mtg-soon-bg:        #fffbeb;
    --mtg-urgent:         #dc2626;
    --mtg-urgent-bg:      #fef2f2;
    --mtg-urgent-border:  #fca5a5;
}

.verified-constituent-badge {
    background: var(--success);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.verified-constituent-badge::before {
    content: '✓';
}

/* Research Cards */
.research-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px var(--shadow);
    border-left: 4px solid var(--success);
    cursor: pointer;
    transition: all 0.2s;
}

.research-card:hover {
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateX(2px);
}

.research-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.research-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.research-content {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.research-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

/* Bills & Legislators */
.bills-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bill-card, .legislator-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px var(--shadow);
    border-left: 4px solid var(--accent);
    transition: all 0.2s;
    cursor: pointer;
}

.bill-card:hover, .legislator-card:hover {
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateX(2px);
}

.bill-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.bill-id {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
}

.bill-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #dcfce7;
    color: #166534;
}

.bill-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.bill-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.legislator-card {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.legislator-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

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

.intel-card {
    background: linear-gradient(135deg, var(--blue-light) 0%, white 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.intel-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--blue);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.intel-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.intel-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.research-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.research-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px var(--shadow);
    border-left: 4px solid var(--success);
    transition: all 0.2s;
}

.research-card:hover {
    box-shadow: 0 4px 12px var(--shadow);
}

.research-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.research-bill-link {
    background: var(--blue-light);
    color: var(--blue);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.research-bill-link:hover {
    background: var(--blue);
    color: white;
}

.research-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.research-author {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.research-expertise {
    background: var(--blue-light);
    color: var(--blue);
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.research-org {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.research-content {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.research-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.research-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.research-votes {
    display: flex;
    gap: 0.5rem;
}

.research-time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.bill-badge {
    background: var(--bg-light);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
}

.bill-section {
    margin-bottom: 2rem;
}

.opinion-breakdown {
    margin-top: 1rem;
}

.opinion-bar {
    display: flex;
    width: 100%;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px var(--shadow);
}

.opinion-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    transition: all 0.2s;
}

.opinion-segment.support {
    background: var(--success);
}

.opinion-segment.neutral {
    background: var(--text-muted);
}

.opinion-segment.oppose {
    background: var(--danger);
}

.related-post-card {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.related-post-card:hover {
    background: var(--blue-light);
}

.related-post-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.bill-detail {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px var(--shadow);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9500;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-muted);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-light);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
}

.close-modal:hover {
    background: var(--border);
    color: var(--text-dark);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.stance-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.stance-option {
    padding: 1.25rem 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.stance-option:hover {
    border-color: var(--primary);
    background: var(--bg-cream);
}

.stance-option.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.bill-display-box {
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

/* Bill Detail Tabs */
.bill-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}

.bill-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.bill-tab:hover {
    color: var(--text-dark);
}

.bill-tab.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.bill-section {
    margin-bottom: 2rem;
}

.bill-section h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

/* Research Contributions */
.research-contribution {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--success);
}

.research-contribution-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.research-contribution-header h4 {
    font-size: 1.05rem;
    margin: 0;
}

.research-contribution p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.research-contribution-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Opinion Breakdown */
.opinion-breakdown {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.opinion-bar {
    display: flex;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.opinion-support {
    background: var(--success);
}

.opinion-neutral {
    background: var(--warning);
}

.opinion-oppose {
    background: var(--danger);
}

.opinion-legend {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
}

/* Actions Timeline */
.actions-timeline {
    border-left: 2px solid var(--border);
    padding-left: 1.5rem;
    margin-left: 0.5rem;
}

.action-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.action-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.action-date {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.action-description {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Opinion Bar Container */
.opinion-bar-container {
    margin-bottom: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}


.bill-action-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.bill-action-bar .btn {
    display: inline-flex;
    align-items: center;
}

.bill-action-bar .btn svg {
    display: inline-block;
}

@media (max-width: 640px) {
    .bill-action-bar {
        flex-direction: column;
    }
    
    .bill-action-bar .btn {
        width: 100%;
        justify-content: center;
    }
}


/* Enhanced Legislator Cards */
.legislator-card-enhanced {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px var(--shadow);
    border-left: 4px solid var(--primary);
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 1rem;
}

.legislator-card-enhanced:hover {
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateX(2px);
}

.legislator-card-header {
    display: flex;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.legislator-info {
    flex: 1;
}

.legislator-info h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.legislator-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.party-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.party-badge.party-democratic {
    background: #dbeafe;
    color: #1e40af;
}

.party-badge.party-republican {
    background: #fee2e2;
    color: #991b1b;
}

.legislator-bio {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.legislator-quick-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.legislator-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.legislator-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
    margin-top: 2rem;
}

.legislator-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.legislator-tab:hover {
    color: var(--text-dark);
}

.legislator-tab.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
}

.legislator-section {
    margin-bottom: 2rem;
}

.legislator-section h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.committee-list, .topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.committee-badge {
    background: var(--blue-light);
    color: var(--blue-dark);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-box {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sponsored-bills-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sponsored-bill-item {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid var(--accent);
}

.sponsored-bill-item:hover {
    background: var(--blue-light);
}

.voting-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.voting-stat {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.voting-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.voting-bar {
    height: 24px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.voting-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.voting-number {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: start;
}

.contact-item strong {
    min-width: 80px;
    color: var(--text-dark);
}

.contact-item a {
    color: var(--primary);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.bill-action-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.bill-action-bar .btn {
    display: inline-flex;
    align-items: center;
}

.bill-action-bar .btn svg {
    display: inline-block;
}

/* Smooth tab switching */
.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .bill-action-bar {
        flex-direction: column;
    }
    
    .bill-action-bar .btn {
        width: 100%;
        justify-content: center;
    }
}


/* Enhanced Bill Detail Modal */
.bill-detail-modal-xl {
    max-width: 1200px;
    width: 95%;
    max-height: 95vh;
}

/* Bill Header with Stats */
.bill-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.bill-stat-box {
    background: var(--bg-light);
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.bill-stat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.bill-stat-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Blurred Content Gate */
.content-gate-wrapper {
    position: relative;
}

.content-gate-blur {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

.content-gate-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    z-index: 10;
    padding: 2rem;
    text-align: center;
}

.gate-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.gate-description {
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.position-selector-inline {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.position-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    border: 3px solid var(--border);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 140px;
}

.position-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.position-btn.support {
    border-color: var(--success);
}

.position-btn.support:hover {
    background: var(--success);
    color: white;
}

.position-btn.support:hover svg {
    stroke: white;
}

.position-btn.neutral {
    border-color: var(--warning);
}

.position-btn.neutral:hover {
    background: var(--warning);
    color: white;
}

.position-btn.neutral:hover svg {
    stroke: white;
}

.position-btn.oppose {
    border-color: var(--danger);
}

.position-btn.oppose:hover {
    background: var(--danger);
    color: white;
}

.position-btn.oppose:hover svg {
    stroke: white;
}

.position-btn svg {
    transition: stroke 0.2s;
}

.position-btn-label {
    font-size: 1.1rem;
    font-weight: 700;
}

.position-btn-sublabel {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Similarity Analysis */
.similarity-box {
    background: #fef3c7;
    border-left: 4px solid var(--warning);
    border-radius: 0 8px 8px 0;
    padding: 16px;
    margin-bottom: 24px;
}

.similarity-score {
    background: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.similarity-score-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.similarity-score-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--warning);
    margin-bottom: 8px;
}

.similarity-bar {
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.similarity-bar-fill {
    height: 100%;
    background: var(--warning);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.similarity-analysis {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Fiscal Note */
.fiscal-note-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.fiscal-note-header {
    background: #d1fae5;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.fiscal-note-content {
    padding: 16px;
}

.fiscal-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.fiscal-row:last-child {
    border-bottom: none;
}

.fiscal-label {
    font-weight: 500;
    color: var(--text-muted);
}

.fiscal-value {
    font-weight: 600;
    color: var(--text-dark);
}

.fiscal-value.fiscal-positive {
    color: var(--success);
}

/* Sponsor Cards */
.sponsor-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 16px;
}

.sponsor-card.primary-sponsor {
    background: #dbeafe;
    border-color: var(--primary);
}

.sponsor-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.sponsor-info {
    flex: 1;
    min-width: 0;
}

.sponsor-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.sponsor-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sponsor-committees,
.sponsor-bio {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.sponsor-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

/* Co-sponsors Grid */
.cosponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.cosponsor-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.cosponsor-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.cosponsor-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.cosponsor-meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* Committee Items */
.committee-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.committee-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.committee-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.committee-details {
    flex: 1;
}

.committee-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.committee-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 12px;
}

.committee-date {
    color: var(--text-muted);
}

.committee-vote {
    font-size: 12px;
    color: var(--text-muted);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 28px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -36px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid var(--border);
    background: white;
    z-index: 1;
}

.timeline-dot-active {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
}

.timeline-action {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.timeline-details {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 10px;
}

.timeline-actions-btn {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Version List */
.version-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.version-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.version-item.version-current {
    background: #dbeafe;
    border-color: var(--primary);
}

.version-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.version-info {
    flex: 1;
}

.version-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.version-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.version-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

/* Related Bills */
.related-bills-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.related-bill-item {
    padding: 16px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.related-bill-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.related-bill-number {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 4px;
}

.related-bill-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.similarity-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.similarity-badge.high {
    background: #fef3c7;
    color: #b45309;
}

.related-bill-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-bill-match {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 10px;
}

.related-bill-actions {
    display: flex;
    gap: 8px;
}

/* Bill Tags */
.bill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.bill-tag {
    background: #dbeafe;
    color: #1e40af;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

/* Model Bill */
.model-bill-box {
    background: #ede9fe;
    border-left: 4px solid var(--info);
    border-radius: 0 12px 12px 0;
    padding: 16px;
    margin-bottom: 24px;
}

.model-bill-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.model-bill-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.model-bill-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.model-bill-content {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.model-bill-actions {
    display: flex;
    gap: 8px;
}

/* Official Votes Section */
.vote-event-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.vote-event-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.vote-event-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.vote-event-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.vote-event-result {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.vote-event-result.passed {
    background: var(--success);
    color: white;
}

.vote-event-result.failed {
    background: var(--danger);
    color: white;
}

.vote-tally {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.vote-count {
    text-align: center;
}

.vote-count-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.vote-count-number.yes {
    color: var(--success);
}

.vote-count-number.no {
    color: var(--danger);
}

.vote-count-number.abstain {
    color: var(--text-muted);
}

.vote-count-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.vote-visualization {
    height: 24px;
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    margin-bottom: 1.5rem;
}

.vote-segment {
    height: 100%;
    transition: width 0.4s ease;
}

.vote-segment.yes {
    background: var(--success);
}

.vote-segment.no {
    background: var(--danger);
}

.vote-segment.abstain {
    background: var(--text-muted);
}

.legislator-votes-toggle {
    text-align: center;
}

.legislator-votes-toggle button {
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.legislator-votes-toggle button:hover {
    background: var(--border);
}

.legislator-votes-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.legislator-votes-toggle button.expanded svg {
    transform: rotate(180deg);
}

.legislator-votes-breakdown {
    display: none;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.legislator-votes-breakdown.show {
    display: block;
}

.vote-group {
    margin-bottom: 1.5rem;
}

.vote-group-header {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.vote-group-header.yes {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success);
}

.vote-group-header.no {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

.vote-group-header.abstain {
    background: var(--bg-light);
    color: var(--text-muted);
}

.legislator-votes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.legislator-vote-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-light);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.legislator-vote-item:hover {
    background: var(--border);
}

.legislator-vote-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.legislator-vote-info {
    flex: 1;
    min-width: 0;
}

.legislator-vote-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.legislator-vote-party {
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .bill-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bill-detail-modal-xl {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .position-selector-inline {
        flex-direction: column;
    }
    
    .vote-tally {
        flex-direction: column;
        gap: 1rem;
    }
    
    .legislator-votes-grid {
        grid-template-columns: 1fr;
    }
    
    .cosponsors-grid {
        grid-template-columns: 1fr;
    }
}

/* Constituent Input Section - FIXED */
.constituent-input-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
}

.input-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.input-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.input-author-info {
    flex: 1;
}

.input-author-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.input-author-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.input-content {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    font-size: 13px;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

/* Research Item Cards - FIXED */
.research-item-card {
    background: white;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.research-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.research-item-type {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.research-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.research-item-content {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 13px;
}

.research-item-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.research-item-link:hover {
    text-decoration: underline;
}

.research-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.research-helpful-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-size: 0.85rem;
    font-weight: 600;
}

.research-helpful-btn:hover {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.research-helpful-btn:hover svg {
    fill: white;
}

.research-helpful-btn.voted {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.research-helpful-btn.voted svg {
    fill: white;
}

/* Contribution Type Selector - FIXED */
.contribution-type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 600;
}

.type-option:hover {
    border-color: var(--primary);
    background: var(--bg-cream);
}

.type-option.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.type-option.active svg {
    stroke: white;
}

.type-option svg {
    transition: stroke 0.2s;
}

/* Amendment List - FIXED */
.amendment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.amendment-item {
    padding: 16px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.amendment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.amendment-number {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

.amendment-sponsor {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.amendment-desc {
    font-size: 13px;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 12px;
}

.amendment-actions {
    display: flex;
    gap: 8px;
}

/* Position Badge Improvements */
.bill-position-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.bill-position-badge.support {
    background: var(--success);
    color: white;
}

.bill-position-badge.neutral {
    background: var(--warning);
    color: white;
}

.bill-position-badge.oppose {
    background: var(--danger);
    color: white;
}

.bill-position-badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.change-position-btn {
    background: none;
    border: none;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    font-weight: 500;
}

.change-position-btn:hover {
    color: var(--accent);
}

/* Section Count Badge */
.section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: var(--bg-light);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 8px;
}

/* Tag Chip */
.tag-chip {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-light);
    color: var(--text-dark);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .contribution-type-selector {
        grid-template-columns: 1fr;
    }
}


/* government.css */

/* ── Page shell ──────────────────────────────────────────────────────── */
.gov-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.gov-page-heading {
    margin-bottom: 0.25rem;
}

.gov-page-heading h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.35rem;
}

.gov-page-heading p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

/* ── Address bar ─────────────────────────────────────────────────────── */
.gov-address-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.25rem 0 0.75rem;
    flex-wrap: wrap;
}

.gov-address-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.gov-address-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.gov-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #065f46;
    background: #d1fae5;
    padding: 0.18rem 0.55rem;
    border-radius: 20px;
}

.gov-example-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #92400e;
    background: #fef3c7;
    padding: 0.18rem 0.55rem;
    border-radius: 20px;
}

.gov-change-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    white-space: nowrap;
    margin-top: 0.1rem;
}

.gov-change-link:hover {
    text-decoration: underline;
}

/* ── Inline ZIP input ────────────────────────────────────────────────── */
.gov-zip-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.gov-zip-inline-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.gov-zip-inline input {
    width: 110px;
    padding: 0.45rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.gov-zip-inline input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.08);
}

.gov-zip-error {
    font-size: 0.8rem;
    color: var(--danger, #dc2626);
    margin-top: 0.15rem;
    min-height: 1rem;
}

/* ── Example view banner ─────────────────────────────────────────────── */
.gov-example-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: #92400e;
    margin-bottom: 1rem;
}

.gov-example-banner::before {
    content: '●';
    font-size: 0.55rem;
    opacity: 0.7;
}

/* ── Rep chip strip ───────────────────────────────────────────────────── */
.gov-rep-strip {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gov-rep-strip::-webkit-scrollbar {
    display: none;
}

.gov-rep-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.85rem 1rem 0.7rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.18s;
    flex-shrink: 0;
    min-width: 96px;
    max-width: 110px;
    box-shadow: 0 1px 3px var(--shadow);
    text-align: center;
}

.gov-rep-chip:hover {
    border-color: var(--primary);
    box-shadow: 0 3px 10px var(--shadow);
    transform: translateY(-2px);
}

.gov-rep-chip.example-chip {
    opacity: 0.55;
    cursor: default;
}

.gov-rep-chip.example-chip:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: 0 1px 3px var(--shadow);
}

.gov-chip-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: white;
    flex-shrink: 0;
}

.gov-chip-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    word-break: break-word;
}

.gov-chip-role {
    font-size: 0.62rem;
    color: var(--text-muted);
    line-height: 1.2;
    word-break: break-word;
}

.gov-chip-icons {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.1rem;
}

.gov-chip-icon {
    font-size: 0.65rem;
    opacity: 0.75;
}

/* ── Carousel ─────────────────────────────────────────────────────────── */
.gov-carousel-outer {
    position: relative;
    margin-bottom: 1.5rem;
}

.gov-carousel-track-wrap {
    overflow: hidden;
    border-radius: 16px;
}

.gov-carousel-track {
    display: flex;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* ── Tier card ───────────────────────────────────────────────────────── */
.gov-tier-card {
    min-width: 100%;
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    box-sizing: border-box;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px var(--shadow);
}

.gov-tier-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.65rem;
}

.gov-tier-card-title-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.gov-tier-icon {
    font-size: 1.05rem;
}

.gov-tier-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.gov-tier-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.22rem 0.6rem;
    border-radius: 20px;
    background: var(--bg-light);
    color: var(--text-muted);
    border: 1px solid var(--border);
    white-space: nowrap;
    flex-shrink: 0;
}

.gov-tier-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1.1rem;
}

/* ── Rep rows inside each card ────────────────────────────────────────── */
.gov-tier-rep-list {
    margin-bottom: 1.1rem;
}

.gov-tier-rep-row {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}

.gov-tier-rep-row:last-child {
    border-bottom: none;
}

.gov-tier-rep-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.15rem;
}

.gov-tier-rep-subrole {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.gov-tier-rep-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.gov-tier-rep-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    line-height: 1;
}

.gov-tier-rep-link:hover {
    text-decoration: underline;
}

.gov-tier-rep-link.disabled {
    color: var(--text-muted);
    cursor: default;
    font-weight: 500;
}

.gov-tier-rep-link.disabled:hover {
    text-decoration: none;
}

/* ── Card footer ─────────────────────────────────────────────────────── */
.gov-tier-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    gap: 1rem;
    flex-wrap: wrap;
}

.gov-tier-footer-note {
    font-size: 0.775rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
}

.gov-tier-explore-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
}

.gov-tier-explore-link:hover {
    text-decoration: underline;
}

/* ── Carousel nav ─────────────────────────────────────────────────────── */
.gov-carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.gov-carousel-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    color: var(--text-dark);
    transition: all 0.18s;
    box-shadow: 0 1px 3px var(--shadow);
    line-height: 1;
    padding: 0;
}

.gov-carousel-arrow:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 3px 8px var(--shadow);
}

.gov-carousel-arrow:disabled {
    opacity: 0.28;
    cursor: default;
    box-shadow: none;
}

.gov-carousel-dots {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.gov-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}

.gov-dot.active {
    background: var(--primary);
    width: 22px;
    border-radius: 4px;
}

/* ── Signup nudge ────────────────────────────────────────────────────── */
.gov-signup-nudge {
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.gov-signup-nudge a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.gov-signup-nudge a:hover {
    text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .gov-page {
        padding: 1rem 0.75rem 3rem;
    }

    .gov-tier-card {
        padding: 1.25rem;
    }

    .gov-tier-card-head {
        flex-direction: column;
        gap: 0.4rem;
    }

    .gov-tier-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .gov-address-bar {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* government.css
 * "Your Government" dashboard — Cascade Township
 *
 * Requires these CSS variables from home.css / your design system:
 *   --primary, --primary-light, --accent, --border, --text, --muted,
 *   --bg, --card, --shadow, --shadow-lg, --radius, --radius-sm
 *   --cat-money, --cat-money-bg, --cat-roads, --cat-roads-bg,
 *   --cat-schools, --cat-schools-bg, --cat-health, --cat-health-bg,
 *   --cat-env, --cat-env-bg, --cat-rules, --cat-rules-bg
 *
 * If those vars aren't already in your design system, add the :root
 * block from the bottom of this file to your global stylesheet.
 *
 * Font Awesome 6.x must be loaded. IBM Plex Sans recommended.
 */

.gov-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1rem 5rem;
}

/* ── Hero bar ─────────────────────────────────────────────────── */
.gov-hero {
    margin-bottom: 1.5rem;
}
.gov-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 0.3rem;
}
.gov-hero-sub {
    font-size: 0.95rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.gov-hero-location {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
    color: var(--primary);
}
.gov-hero-location i { font-size: 0.8rem; }
.gov-change-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}
.gov-change-btn:hover { color: var(--primary); }

/* ── Meeting alert bar ────────────────────────────────────────── */
.gov-mtg-banner {
    background: var(--mtg-soon-bg);
    border: 1px solid #fbbf24;
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.5rem;
}

.gov-mtg-banner--urgent {
    background: var(--mtg-urgent-bg);
    border-color: var(--mtg-urgent-border);
}

.gov-mtg-banner--urgent .gov-mtg-banner-head {
    color: var(--mtg-urgent);
}

.gov-mtg-banner--urgent .gov-mtg-days {
    background: var(--mtg-urgent);
}
.gov-mtg-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.2rem;
}
.gov-mtg-dismiss:hover { opacity: 1; }

.gov-mtg-banner-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--mtg-soon);
    margin-bottom: 0.7rem;
}
.gov-mtg-list { display: flex; flex-direction: column; gap: 0.55rem; }
.gov-mtg-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}
.gov-mtg-days {
    flex-shrink: 0;
    background: var(--mtg-soon);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    white-space: nowrap;
}
.gov-mtg-info { flex: 1; min-width: 0; }
.gov-mtg-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.1rem;
}
.gov-mtg-when {
    font-size: 0.775rem;
    color: var(--muted);
}
.gov-mtg-agenda {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.gov-mtg-agenda:hover { text-decoration: underline; }
.gov-mtg-agenda i { font-size: 0.65rem; margin-left: 0.18rem; }
.gov-mtg-note {
    font-size: 0.75rem;
    color: var(--mtg-urgent);
    font-weight: 500;
    margin-top: 0.2rem;
}
.gov-mtg-banner--urgent .gov-mtg-item--urgent .gov-mtg-name {
    font-weight: 700;
}

/* ── Level tabs ───────────────────────────────────────────────── */
.gov-level-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    box-shadow: var(--shadow);
}
.gov-level-tab {
    flex: 1;
    padding: 0.85rem 0.5rem;
    background: none;
    border: none;
    border-right: 1px solid var(--border);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.15s;
    position: relative;
}
.gov-level-tab:last-child { border-right: none; }
.gov-level-tab i { font-size: 1.1rem; }
.gov-level-tab .tab-sub {
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--muted);
    line-height: 1;
}
.gov-level-tab:hover:not(.active) { background: var(--primary-light); color: var(--primary); }
.gov-level-tab.active {
    background: var(--primary);
    color: white;
}
.gov-level-tab.active .tab-sub { color: rgba(255,255,255,0.7); }

/* ── People scroll ────────────────────────────────────────────── */
.gov-people-section {
    margin-bottom: 0.6rem;
}
.gov-people-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.65rem;
    padding-left: 0.1rem;
}
.gov-people-scroll {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}
.gov-people-scroll::-webkit-scrollbar { display: none; }

.gov-person-card {
    flex-shrink: 0;
    width: 108px;
    background: var(--card, #fff);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem 0.6rem 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    position: relative;
    box-sizing: border-box;
}

.gov-person-card:hover {
    border-color: var(--accent, #2563eb);
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transform: translateY(-2px);
    background: var(--card, #fff);    /* stay white on hover */
}

/* Selected: gentle highlight — NOT solid blue background */
.gov-person-card.active {
    border-color: var(--primary, #1a3a6b);
    border-width: 2px;
    background: #eef2fb;              /* very light tint, readable text */
    box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.12);
}

.gov-person-card.active .gp-name {
    color: var(--primary, #1a3a6b);
}


.gp-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.gp-avatar.is-group { font-size: 1rem; }
.gp-avatar.is-group i { font-size: 1.1rem; }

.gp-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
}
.gp-role {
    font-size: 0.68rem;
    color: var(--muted);
    line-height: 1.3;
}
.gp-scope {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.12rem 0.4rem;
    border-radius: 20px;
    line-height: 1;
}
.scope-township { background: #dbeafe; color: #1e40af; }
.scope-county   { background: #fef3c7; color: #92400e; }
.scope-schools  { background: #d1fae5; color: #065f46; }
.scope-state    { background: #ede9fe; color: #5b21b6; }
.scope-federal  { background: #fee2e2; color: #991b1b; }
.scope-services { background: #f3f4f6; color: #374151; }

.gp-party {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}
.party-r { background: #fee2e2; color: #991b1b; }
.party-d { background: #dbeafe; color: #1e40af; }

/* ZIP-verified badge on person card */
.gp-zip-badge {
    font-size: 0.6rem;
    font-weight: 600;
    color: #059669;
    background: #d1fae5;
    border-radius: 4px;
    padding: 0.1rem 0.3rem;
    margin-top: 0.2rem;
    display: block;
    letter-spacing: 0.01em;
}
.gp-zip-badge i { font-size: 0.55rem; }
.gov-person-card.zip-verified { border-color: #6ee7b7; }
.gov-person-card.zip-verified .gp-name::after {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    background: #059669;
    border-radius: 50%;
    margin-left: 0.35rem;
    vertical-align: middle;
}

/* Live meeting doc feed items */
.feed-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: #d97706;
    background: #fef3c7;
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    margin-left: 0.4rem;
    vertical-align: middle;
}

/* Service/dept cards: show bio on click but no active styling at all */
.gov-person-card.is-service { cursor: default; }
.gov-person-card.is-service:hover { transform: none; box-shadow: var(--shadow); border-color: var(--border); }
.gov-person-card.is-service.active { border-color: var(--border); }

/* ── Bio panel (shown when person is selected) ─────────────────── */
.gov-bio-panel {
    background: #42d3fc17;
    border: 1px solid #c7d7f0;
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    animation: fadeSlideIn 0.18s ease;
}
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.gov-bio-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.gov-bio-body { flex: 1; min-width: 0; }
.gov-bio-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.1rem;
}
.gov-bio-role {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 0.45rem;
}
.gov-bio-desc {
    font-size: 0.835rem;
    color: var(--text);
    line-height: 1.55;
    margin-bottom: 0.55rem;
}
.gov-bio-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.gov-bio-chip {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.18rem 0.55rem;
    border-radius: 20px;
    background: white;
    border: 1px solid #c7d7f0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.gov-bio-chip i { font-size: 0.62rem; }
.gov-bio-contact a {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 0.85rem;
}
.gov-bio-contact a:hover { text-decoration: underline; }
.gov-bio-close {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.1rem;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0.1rem;
    transition: color 0.12s;
}
.gov-bio-close:hover { color: var(--text); }

/* ── Feed header ──────────────────────────────────────────────── */
.gov-feed-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}
.gov-feed-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.gov-feed { display: flex; flex-direction: column; }

/* ── Feed item ────────────────────────────────────────────────── */
.feed-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.65rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.15s;
}
.feed-item:hover { box-shadow: var(--shadow-lg); }
.feed-item.expanded { border-color: var(--accent); }

.feed-item-main {
    padding: 0.85rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.feed-item-text {
    flex: 1;
    min-width: 0;
}

.feed-headline {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.45;
}

.feed-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}

.feed-rep-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 500;
}
.feed-rep-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.52rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.feed-date {
    font-size: 0.72rem;
    color: var(--muted);
}

.feed-status-chip {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 20px;
}
.status-signed    { background: #d1fae5; color: #065f46; }
.status-proposed  { background: #dbeafe; color: #1e40af; }
.status-advancing { background: #fef3c7; color: #92400e; }
.status-vetoed    { background: #fee2e2; color: #991b1b; }
.status-vote      { background: #ede9fe; color: #5b21b6; }
.status-default   { background: #f3f4f6; color: #374151; }

.feed-chevron {
    flex-shrink: 0;
    align-self: center;
    color: var(--muted);
    font-size: 0.72rem;
    transition: transform 0.18s;
    margin-top: 0.1rem;
}
.feed-item.expanded .feed-chevron { transform: rotate(180deg); }

/* Feed item expanded detail */
.feed-detail {
    border-top: 1px solid var(--border);
    padding: 0.9rem 1rem 1rem;
    background: var(--bg);
    animation: feedDetailIn 0.18s ease;
}
@keyframes feedDetailIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.feed-detail-summary {
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 0.85rem;
}

.feed-detail-impact {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.85rem;
}
.feed-detail-impact-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--primary);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.feed-detail-impact-label i { font-size: 0.65rem; }
.feed-detail-impact-text {
    font-size: 0.845rem;
    color: var(--text);
    line-height: 1.55;
}

.feed-detail-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.feed-detail-id {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    color: var(--muted);
    background: white;
    border: 1px solid var(--border);
    padding: 0.15rem 0.5rem;
    border-radius: 5px;
}

/* category color classes removed — cat-dot icon no longer shown in feed */

/* ── gov-filters bar ──────────────────────────────────────── */
.gov-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.5rem 0 0.75rem;
}

.gov-filter-btn {
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--card);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
}

.gov-filter-btn.active,
.gov-filter-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ── Feed Weigh In button ────────────────────────────────── */
.feed-kb-link {
    padding: 0.3rem 0.85rem;
    background: #ffffff;
    color: var(--accent);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    transition: all 0.15s;
}

.feed-kb-link:hover {
    background: #f0f4ff;
    border-color: var(--accent);
}

.feed-detail-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feed-weigh-in-btn {
    margin-left: 0;
    padding: 0.3rem 0.85rem;
    background: #ffffff;
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

.feed-weigh-in-btn i { color: var(--accent); }

.feed-weigh-in-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.feed-weigh-in-btn:hover i { color: #fff; }

/* ── Primary Source Documents ─────────────────────────────── */
.feed-detail-docs {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.feed-detail-docs-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.feed-detail-docs-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.feed-doc-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #2563eb;
    text-decoration: none;
    padding: 0.2rem 0;
    transition: color 0.15s;
}
.feed-doc-link:hover { color: #1d4ed8; text-decoration: underline; }
.feed-doc-link i { font-size: 0.75rem; flex-shrink: 0; }
.feed-doc-minutes { color: #059669; }
.feed-doc-minutes:hover { color: #047857; }
.feed-doc-law { color: #7c3aed; }
.feed-doc-law:hover { color: #6d28d9; }

/* ── Meeting banner: dual links ───────────────────────────── */
.gov-mtg-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    flex-shrink: 0;
}
.gov-mtg-agenda--doc {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
    font-size: 0.72rem;
}
.gov-mtg-agenda--doc:hover { background: #ffedd5; }

/* ── Weigh In modal ───────────────────────────────────────── */
.weigh-in-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.weigh-in-modal.is-open { opacity: 1; }

.weigh-in-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.weigh-in-modal__box {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 8px 40px rgba(0,0,0,0.22);
    text-align: center;
}

.weigh-in-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.5rem;
}

.weigh-in-modal__label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.weigh-in-modal__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.weigh-in-modal__sub {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.weigh-in-modal__opts {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.weigh-in-opt {
    padding: 0.65rem 1rem;
    border-radius: 8px;
    border: 2px solid var(--border);
    background: var(--bg);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text);
}

.weigh-in-opt:hover { border-color: var(--accent); color: var(--accent); }

.weigh-in-opt--support.selected { background: #059669; border-color: #059669; color: #fff; }
.weigh-in-opt--oppose.selected  { background: #DC2626; border-color: #DC2626; color: #fff; }
.weigh-in-opt--neutral.selected { background: var(--accent); border-color: var(--accent); color: #fff; }

.weigh-in-modal__cta {
    font-size: 0.8rem;
    color: var(--muted);
}

.weigh-in-modal__cta a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
}

.weigh-in-modal__cta a:hover { text-decoration: underline; }

/* Results state */
.weigh-in-results__thanks {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.weigh-in-results__sub {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.weigh-in-results {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.1rem;
    text-align: left;
}

.weigh-in-bar {}

.weigh-in-bar--yours .weigh-in-bar__track {
    box-shadow: 0 0 0 2px #e5e7eb;
    border-radius: 6px;
}

.weigh-in-bar__top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.3rem;
}

.weigh-in-bar__label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
}

.weigh-in-bar__you {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 400;
    margin-left: 0.3rem;
}

.weigh-in-bar__pct {
    font-size: 0.85rem;
    font-weight: 700;
}

.weigh-in-bar__track {
    height: 8px;
    background: #f3f4f6;
    border-radius: 6px;
    overflow: hidden;
}

.weigh-in-bar__fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* KB link */
.weigh-in-results__kb-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    background: #f0f4ff;
    border: 1px solid #c7d7fd;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: all 0.15s;
    margin-bottom: 0.25rem;
}

.weigh-in-results__kb-link:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.weigh-in-results__kb-link .fa-arrow-right {
    margin-left: auto;
    font-size: 0.75rem;
}

/* ── Grouped people rows (Local level) ──────────────────────── */
.gov-people-groups {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.gov-people-group {
    display: flex;
    flex-direction: row;      /* label left, scroll right — horizontal */
    align-items: flex-start;
    min-width: 0;
}

.gov-people-group-label {
    flex-shrink: 0;
    width: 78px;
    min-width: 78px;          /* prevents label from collapsing */
    padding-top: 0.8rem;
    padding-right: 0.65rem;
    font-size: 0.63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    line-height: 1.35;
    text-align: right;
    border-right: 2px solid var(--border);
}
.gov-people-group-label i {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    color: var(--primary);
}

/* This wrapper must clip and scroll horizontally */
.gov-people-group-scroll-wrap {
    flex: 1 1 0%;             /* grow, shrink, base 0 — prevents blowout */
    min-width: 0;
    overflow-x: auto;
    overflow-y: visible;
    padding-left: 0.65rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}
.gov-people-group-scroll-wrap::-webkit-scrollbar { display: none; }

/* The cards row itself: nowrap, natural width, scroll provided by parent */
.gov-people-group-scroll-wrap .gov-people-scroll {
    display: flex;
    flex-direction: row;      /* explicitly horizontal */
    flex-wrap: nowrap;
    gap: 0.65rem;
    width: max-content;       /* allows scrolling; parent clips it */
    overflow: visible;
    padding-bottom: 0;
}


@media (max-width: 500px) {
    .gov-people-group-label {
        width: 58px;
        min-width: 58px;
        font-size: 0.58rem;
    }
}

/* ── Empty state ─────────────────────────────────────────────── */
.gov-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}
.gov-empty i { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; opacity: 0.35; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .gov-page { padding: 1rem 0.75rem 4rem; }
    .gov-level-tab .tab-label-text { display: none; }
    .gov-level-tab { padding: 0.75rem 0.5rem; }
    .gov-level-tab i { font-size: 1.3rem; }
    .gov-level-tab .tab-sub { display: none; }
    .gov-person-card { width: 96px; }
    .gov-bio-panel { flex-direction: column; gap: 0.65rem; }
    .feed-item-main { grid-template-columns: auto 1fr auto; }
    .gov-mtg-agenda { display: none; }
    .gov-mtg-note  { display: none; }
}

/* ── CSS variable fallback reference ─────────────────────────────────
 * Add these to your global :root if not already present:
 *
:root {
    --primary:       #1a3a6b;
    --primary-light: #e8eef8;
    --accent:        #2563eb;
    --border:        #e2e6ed;
    --text:          #111827;
    --muted:         #6b7280;
    --bg:            #f5f6f8;
    --card:          #ffffff;
    --shadow:        0 1px 4px rgba(0,0,0,0.08);
    --shadow-lg:     0 4px 20px rgba(0,0,0,0.10);
    --radius:        14px;
    --radius-sm:     9px;
    --cat-money:     #1e40af;   --cat-money-bg:   #eff6ff;
    --cat-roads:     #78350f;   --cat-roads-bg:   #fef3c7;
    --cat-schools:   #065f46;   --cat-schools-bg: #d1fae5;
    --cat-health:    #7c3aed;   --cat-health-bg:  #ede9fe;
    --cat-env:       #166534;   --cat-env-bg:     #dcfce7;
    --cat-rules:     #374151;   --cat-rules-bg:   #f3f4f6;
}
 * ────────────────────────────────────────────────────────────────── */