/* Salt-Tab Directory - restyled to match the main site (violet/gold, Fraunces + Inter) */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..800&family=Inter:wght@400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #ffffff;
    --text-color: #1c1830;
    --link-color: #5b3fb8;
    --link-hover: #b8862b;
    --border-color: #e4e0ef;
    --section-bg: #f6f4fb;
    --accent-color: #2a2440;
    --gold-accent: #b8862b;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-head: 'Fraunces', Georgia, 'Times New Roman', serif;
}
h1, h2, h3, .topnav-brand { font-family: var(--font-head); letter-spacing: -0.01em; }

body {
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.4;
    background-color: var(--bg-color);
    color: var(--text-color);
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
}

/* Compact Header with Nav */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    border-bottom: 2px solid var(--accent-color);
    margin-bottom: 15px;
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: var(--bg-color);
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-color);
    text-decoration: none;
    display: inline-block;
}

.site-title:hover {
    color: var(--gold-accent);
}

.tagline {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.header-left {
    display: flex;
    flex-direction: column;
}

/* Header Clock - Newspaper Style */
.header-clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-main);
    background-color: var(--accent-color);
    color: white;
    padding: 8px 20px;
    border-radius: 0;
}

.clock-time {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}

.clock-zone {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-top: 2px;
    opacity: 0.8;
}

/* Navigation - inline with header */
nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

nav a:hover {
    color: var(--link-hover);
    border-bottom: 2px solid var(--link-hover);
}

nav a.active {
    color: var(--link-hover);
    border-bottom: 2px solid var(--link-hover);
}

/* Breadcrumb Navigation */
.breadcrumb {
    padding: 8px 15px;
    font-size: 11px;
    color: #888;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.breadcrumb a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-sep {
    margin: 0 6px;
    color: #ccc;
}

.breadcrumb-current {
    color: var(--accent-color);
    font-weight: 600;
}

/* Headline Section */
.headline-section {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--section-bg);
    border: 2px solid var(--accent-color);
    margin-bottom: 25px;
}

.headline-image {
    max-width: 100%;
    max-height: 400px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.headline-title {
    font-size: 42px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 1px;
}

.headline-title a {
    color: var(--accent-color);
    text-decoration: none;
}

.headline-title a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.headline-date {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* What's New Section */
.whats-new {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    background: white;
}

.whats-new-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 15px;
    background: var(--section-bg);
    border-bottom: 2px solid var(--accent-color);
    color: var(--accent-color);
    margin: 0;
}

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

.whats-new-item {
    padding: 10px 15px;
    border-bottom: 1px dotted var(--border-color);
    border-right: 1px dotted var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.whats-new-item:nth-child(3n) {
    border-right: none;
}

.whats-new-item:nth-last-child(-n+3) {
    border-bottom: none;
}

.whats-new-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 1px 6px;
    display: inline-block;
    width: fit-content;
}

.new-badge {
    background: #15803d;
    color: white;
}

.update-badge {
    background: var(--gold-accent);
    color: white;
}

.whats-new-text {
    font-size: 12px;
    line-height: 1.4;
    color: #333;
}

.whats-new-text a {
    color: var(--link-color);
    font-weight: 600;
    text-decoration: none;
}

.whats-new-text a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.whats-new-date {
    font-size: 10px;
    color: #999;
}

@media (max-width: 768px) {
    .whats-new-grid {
        grid-template-columns: 1fr;
    }

    .whats-new-item {
        border-right: none;
    }

    .whats-new-item:nth-last-child(-n+3) {
        border-bottom: 1px dotted var(--border-color);
    }

    .whats-new-item:last-child {
        border-bottom: none;
    }
}

/* Main Content Grid */
.main-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Link Section Boxes */
.link-section {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 15px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.link-list {
    list-style: none;
}

.link-list li {
    padding: 4px 0;
    border-bottom: 1px dotted var(--border-color);
}

.link-list li:last-child {
    border-bottom: none;
}

.link-list a {
    color: var(--link-color);
    text-decoration: none;
    font-size: 13px;
}

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

.link-list .org-name {
    font-weight: bold;
}

.link-list .org-desc {
    font-size: 11px;
    color: #666;
    display: block;
    margin-top: 2px;
}

/* Events Page Styles */
.events-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.month-section {
    background-color: var(--section-bg);
    border: 1px solid var(--border-color);
    padding: 15px;
}

.month-title {
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    background-color: var(--accent-color);
    color: white;
    padding: 8px 12px;
    margin: -15px -15px 15px -15px;
    text-align: center;
}

.event-item {
    padding: 8px 0;
    border-bottom: 1px dotted var(--border-color);
}

.event-item:last-child {
    border-bottom: none;
}

.event-name {
    font-weight: bold;
    color: var(--link-color);
    text-decoration: none;
    display: block;
}

.event-name:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.event-date {
    font-size: 12px;
    color: #333;
    font-weight: bold;
}

.event-location {
    font-size: 11px;
    color: #666;
}

.event-category {
    font-size: 10px;
    background-color: var(--gold-accent);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-top: 4px;
}

/* Scholarships Page Styles */
.scholarships-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.scholarship-section {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 15px;
}

.scholarship-item {
    padding: 10px 0;
    border-bottom: 1px dotted var(--border-color);
}

.scholarship-item:last-child {
    border-bottom: none;
}

.scholarship-name {
    font-weight: bold;
    color: var(--link-color);
    text-decoration: none;
}

.scholarship-name:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.scholarship-amount {
    font-size: 12px;
    color: #006600;
    font-weight: bold;
}

.scholarship-deadline {
    font-size: 11px;
    color: #cc0000;
}

.scholarship-desc {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

/* Footer */
footer {
    text-align: center;
    padding: 25px 20px;
    margin-top: 30px;
    border-top: 2px solid var(--accent-color);
    font-size: 12px;
    color: #666;
}

footer a {
    color: var(--link-color);
}

/* Footer Button */
.footer-btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 10px 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 15px 0;
    border: 2px solid var(--accent-color);
    transition: all 0.2s ease;
}

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

/* Data Dashboard Sections */
.data-dashboard {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    background: white;
}

.data-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--accent-color);
    color: white;
}

.data-dashboard-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.data-dashboard-link {
    color: white;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.data-dashboard-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.data-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--border-color);
}

.data-stat-card {
    padding: 15px;
    text-align: center;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.data-stat-card:last-child {
    border-right: none;
}

.data-stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1.1;
}

.data-stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #333;
}

.data-stat-detail {
    font-size: 10px;
    color: #888;
    line-height: 1.3;
}

.data-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.data-detail-section {
    padding: 12px 15px;
    border-right: 1px solid var(--border-color);
}

.data-detail-section:last-child {
    border-right: none;
}

.data-detail-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    margin: 0 0 8px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.data-detail-list {
    display: flex;
    flex-direction: column;
}

.data-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
    border-bottom: 1px dotted var(--border-color);
    font-size: 12px;
}

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

.data-detail-label {
    color: #333;
    font-weight: 500;
}

.data-detail-value {
    color: var(--accent-color);
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
    margin-left: 10px;
    font-size: 11px;
}

.data-dashboard-source {
    font-size: 10px;
    color: #888;
    padding: 8px 15px;
    border-top: 1px solid var(--border-color);
    margin: 0;
}

@media (max-width: 768px) {
    .data-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-stat-card:nth-child(2) {
        border-right: none;
    }

    .data-stat-card:nth-child(-n+2) {
        border-bottom: 1px solid var(--border-color);
    }

    .data-detail-grid {
        grid-template-columns: 1fr;
    }

    .data-detail-section {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .data-detail-section:last-child {
        border-bottom: none;
    }

    .data-stat-number {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .data-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .data-stat-card {
        padding: 10px 8px;
    }

    .data-stat-number {
        font-size: 20px;
    }

    .data-stat-label {
        font-size: 10px;
    }
}

/* Search & Filter Bar */
.search-filter-bar {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    position: sticky;
    top: 52px; /* below header */
    z-index: 998;
    background: var(--bg-color);
}

.inline-search {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    gap: 10px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    cursor: text;
}

.inline-search svg {
    flex-shrink: 0;
}

.inline-search input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--font-main);
    font-size: 14px;
    background: transparent;
    color: var(--text-color);
}

.inline-search input::placeholder {
    color: #999;
}

.inline-search-shortcut {
    font-size: 10px;
    color: #999;
    border: 1px solid #ddd;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--font-main);
    white-space: nowrap;
}

/* Quick Links Bar - Below Search */
.quick-links {
    background-color: var(--accent-color);
    padding: 10px 15px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 20px;
}

.quick-links a {
    color: white;
    text-decoration: none;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    padding: 3px 0;
}

.quick-links a:hover,
.quick-links a.quick-link-active {
    text-decoration: underline;
    color: var(--gold-accent);
}

/* Page Intro */
.page-intro {
    text-align: center;
    padding: 15px;
    background-color: var(--section-bg);
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.page-intro h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.page-intro p {
    font-size: 14px;
    color: #444;
    max-width: 800px;
    margin: 0 auto;
}

/* Page Header - for secondary pages */
.page-header {
    text-align: center;
    padding: 20px 15px;
    background-color: var(--section-bg);
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.page-header p {
    font-size: 14px;
    color: #666;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .main-content,
    .events-container,
    .scholarships-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hamburger Menu Button (hidden on desktop) */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--accent-color);
}

.hamburger-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Mobile nav drawer */
.mobile-nav-drawer {
    display: none;
}

@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    header {
        flex-wrap: wrap;
        gap: 0;
        padding: 8px 12px;
    }

    .header-left {
        flex: 1;
    }

    .header-clock {
        padding: 4px 12px;
        order: 0;
    }

    .clock-time {
        font-size: 14px;
    }

    .clock-zone {
        font-size: 8px;
    }

    .site-title {
        font-size: 20px;
        letter-spacing: 2px;
    }

    .tagline {
        font-size: 9px;
    }

    /* Hide desktop nav, show hamburger */
    nav {
        display: none;
    }

    .hamburger-btn {
        display: flex;
        align-items: center;
        margin-left: 8px;
    }

    /* Mobile nav drawer */
    .mobile-nav-drawer {
        display: none;
        width: 100%;
        order: 10;
        flex-basis: 100%;
        background: var(--section-bg);
        border-top: 1px solid var(--border-color);
        margin-top: 8px;
        padding: 10px 0;
    }

    .mobile-nav-drawer.open {
        display: flex;
        flex-direction: column;
    }

    .mobile-nav-drawer a {
        text-decoration: none;
        color: var(--accent-color);
        font-weight: 600;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 1px;
        padding: 10px 15px;
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-nav-drawer a:last-child {
        border-bottom: none;
    }

    .mobile-nav-drawer a:hover,
    .mobile-nav-drawer a.active {
        color: var(--link-hover);
        background: white;
    }

    /* Sticky search on mobile - adjust top for shorter header */
    .search-filter-bar {
        top: 42px;
    }

    .main-content,
    .events-container,
    .scholarships-container {
        grid-template-columns: 1fr;
    }

    .headline-title {
        font-size: 28px;
    }

    .quick-links {
        gap: 5px 15px;
    }

    .quick-links a {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 14px;
    }

    .column:first-child .section-title {
        font-size: 16px;
    }

    .column:first-child .link-list a,
    .column:first-child .link-list .org-name {
        font-size: 14px;
    }

    .column:first-child .link-list .org-desc {
        font-size: 12px;
    }

    .headline-title {
        font-size: 24px;
    }
}

/* Re-election Status Styles */
.reelection-callout {
    background-color: #cc0000;
    color: white;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
    text-align: center;
}

.reelection-callout a {
    color: white;
    text-decoration: underline;
}

.sub-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    padding: 8px 0 4px 0;
    margin-top: 6px;
    border-top: 1px solid var(--border-color);
}

.sub-header:first-of-type {
    border-top: none;
    margin-top: 0;
}

.sub-header-note {
    font-weight: 500;
    font-size: 10px;
    color: #cc0000;
    text-transform: none;
    letter-spacing: 0;
}

.reelection-badge {
    display: inline-block;
    background-color: #cc0000;
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

/* Left Column (Column 1) - Larger Font for Readability */
.column:first-child .section-title {
    font-size: 18px;
}

.column:first-child .link-list a {
    font-size: 15px;
}

.column:first-child .link-list .org-name {
    font-size: 15px;
}

.column:first-child .link-list .org-desc {
    font-size: 13px;
}

.column:first-child .sub-header {
    font-size: 13px;
}

.column:first-child .sub-header-note {
    font-size: 11px;
}

.column:first-child .reelection-callout {
    font-size: 14px;
}

.column:first-child .reelection-badge {
    font-size: 10px;
}

.column:first-child .link-list li {
    padding: 6px 0;
}

/* Featured Section - Economic Research & Policy */
.featured-section {
    border: 2px solid var(--accent-color);
    background-color: var(--section-bg);
}

.featured-section .section-title {
    font-size: 18px;
    letter-spacing: 1.5px;
}

.section-callout {
    background-color: var(--accent-color);
    color: white;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.4;
    text-align: center;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ==========================================
   SEARCH OVERLAY
   ========================================== */
.search-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    background: none;
    border: 1px solid var(--border-color);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    padding: 5px 10px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.search-toggle:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.search-toggle svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.search-toggle .search-shortcut {
    font-size: 10px;
    opacity: 0.5;
    font-weight: 400;
    margin-left: 4px;
}

#search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
}

#search-overlay.active {
    display: flex;
}

.search-container {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border: 3px solid var(--accent-color);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.search-header {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 2px solid var(--accent-color);
    gap: 12px;
}

.search-header svg {
    width: 24px;
    height: 24px;
    fill: #999;
    flex-shrink: 0;
}

#search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--font-main);
    font-size: 20px;
    font-weight: 500;
    padding: 8px 0;
    color: var(--accent-color);
}

#search-input::placeholder {
    color: #aaa;
    font-weight: 400;
}

#search-count {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    font-weight: 500;
}

#search-close {
    background: none;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 600;
    color: #999;
    padding: 3px 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#search-close:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

#search-results {
    overflow-y: auto;
    padding: 10px 15px;
    flex: 1;
}

.search-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.search-suggestion-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--section-bg);
    border: 1px solid var(--border-color);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-color);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.15s ease;
}

.search-suggestion-tag:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.search-hint, .search-no-results {
    text-align: center;
    padding: 30px 15px;
    color: #999;
    font-size: 13px;
}

.search-no-results {
    color: #cc0000;
}

.search-group {
    margin-bottom: 15px;
}

.search-group-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
}

.search-group-title a {
    color: inherit;
    text-decoration: none;
}

.search-group-title a:hover {
    color: var(--link-color);
}

.search-group-title span {
    font-weight: 400;
}

.search-result-item {
    display: block;
    padding: 8px 10px;
    text-decoration: none;
    border-bottom: 1px dotted var(--border-color);
    transition: background 0.15s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--section-bg);
}

.search-result-name {
    font-weight: 600;
    color: var(--link-color);
    font-size: 13px;
    display: block;
}

.search-result-item:hover .search-result-name {
    color: var(--link-hover);
}

.search-result-category {
    font-size: 10px;
    background-color: var(--gold-accent);
    color: white;
    padding: 1px 6px;
    border-radius: 2px;
    display: inline-block;
    margin-top: 3px;
    font-weight: 500;
}

.search-result-detail {
    font-size: 11px;
    color: #666;
    display: block;
    margin-top: 3px;
}

#search-results mark {
    background: #fff3cd;
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

/* ==========================================
   EVENT FILTERS
   ========================================== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 15px;
    background: var(--section-bg);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    align-items: center;
}

.filter-bar-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-right: 6px;
}

.filter-btn {
    background: white;
    border: 1px solid var(--border-color);
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--accent-color);
    transition: all 0.15s;
}

.filter-btn:hover {
    border-color: var(--accent-color);
}

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

.filter-count {
    font-size: 11px;
    color: #999;
    margin-left: auto;
    font-weight: 500;
}

/* Hidden items during filter */
.event-item.hidden,
.scholarship-item.hidden,
.scholarship-section.hidden,
.month-section.hidden {
    display: none;
}

/* ==========================================
   SCHOLARSHIP FILTER BAR
   ========================================== */
.scholarship-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 15px;
    background: var(--section-bg);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    align-items: center;
}

.scholarship-search-input {
    flex: 1;
    min-width: 200px;
    border: 1px solid var(--border-color);
    font-family: var(--font-main);
    font-size: 13px;
    padding: 6px 10px;
    outline: none;
    color: var(--accent-color);
}

.scholarship-search-input:focus {
    border-color: var(--accent-color);
}

.scholarship-search-input::placeholder {
    color: #aaa;
}

/* ==========================================
   RESPONSIVE - SEARCH & FILTER
   ========================================== */
@media (max-width: 768px) {
    #search-overlay {
        padding-top: 20px;
    }

    .search-container {
        width: 95%;
        max-height: 85vh;
    }

    .search-toggle .search-shortcut {
        display: none;
    }

    .filter-bar {
        padding: 8px 10px;
        gap: 4px;
    }

    .filter-btn {
        font-size: 10px;
        padding: 3px 7px;
    }

    .scholarship-filter-bar {
        flex-direction: column;
    }

    .scholarship-search-input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .search-toggle {
        font-size: 0;
        padding: 6px;
        border: none;
    }

    .search-toggle svg {
        width: 18px;
        height: 18px;
    }
}

/* Print Styles */
@media print {
    body {
        font-size: 12px;
    }

    nav, .quick-links, .hamburger-btn, .mobile-nav-drawer, .search-filter-bar {
        display: none;
    }

    .main-content {
        display: block;
    }

    .link-section {
        page-break-inside: avoid;
    }
}

/* States Page Styles */
.state-selector-container {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
}

/* Near Me Button */
.near-me-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    background: var(--accent-color);
    color: white;
    border: 2px solid var(--accent-color);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.near-me-btn:hover {
    background: var(--gold-accent);
    border-color: var(--gold-accent);
}

.near-me-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.near-me-status {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    min-height: 16px;
}

.state-dropdown {
    font-family: var(--font-main);
    font-size: 16px;
    padding: 12px 20px;
    border: 2px solid var(--accent-color);
    border-radius: 4px;
    background: white;
    min-width: 250px;
    cursor: pointer;
}

.state-dropdown:focus {
    outline: none;
    border-color: var(--gold-accent);
}

.states-content {
    padding: 20px;
}

.national-orgs h2 {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
}

.org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.org-card {
    display: block;
    padding: 15px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.org-card:hover {
    border-color: var(--accent-color);
    background-color: var(--section-bg);
}

.org-card strong {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    color: var(--link-color);
}

.org-card span {
    font-size: 12px;
    color: #666;
}

.state-results {
    margin-top: 30px;
    padding: 20px;
    background: var(--section-bg);
    border: 1px solid var(--border-color);
}

.state-results h2 {
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
}

.state-category {
    margin-bottom: 25px;
}

.state-category h3 {
    font-size: 16px;
    color: var(--accent-color);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.state-category ul {
    list-style: none;
    padding-left: 0;
}

.state-category li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.state-category li:last-child {
    border-bottom: none;
}

.state-category a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.state-category a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

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

    .state-dropdown {
        width: 100%;
        max-width: 300px;
    }
}

/* Free Data Resources Section */
.data-resources-section {
    margin: 30px 0;
    padding: 20px;
    border: 2px solid var(--accent-color);
    background: var(--section-bg);
}

.data-resources-intro {
    font-size: 13px;
    color: #444;
    margin-bottom: 20px;
    text-align: center;
}

.data-resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.data-resources-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.data-resources-category {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .data-resources-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .data-resources-grid {
        grid-template-columns: 1fr;
    }

    .data-resources-section {
        padding: 15px;
        margin: 20px 0;
    }
}

/* Census Page Styles */
.census-headline {
    text-align: center;
    padding: 30px 20px 15px;
    background-color: var(--section-bg);
    border: 2px solid var(--accent-color);
    border-bottom: none;
}

.census-total {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 6px;
}

.census-subtitle {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.census-summary {
    background-color: var(--accent-color);
    padding: 12px 15px;
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 8px;
    color: white;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.summary-item {
    white-space: nowrap;
}

.summary-divider {
    opacity: 0.4;
}

.summary-loading {
    font-style: italic;
    opacity: 0.7;
}

/* ===== SPLIT BANNER (Homepage) ===== */
.banner-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 20px;
    border: 2px solid var(--accent-color);
}

.banner-left {
    border-right: 2px solid var(--accent-color);
}

.banner-left .census-headline {
    border: none;
    border-bottom: none;
}

.banner-left .census-summary {
    margin-bottom: 0;
}

.banner-right {
    display: flex;
    flex-direction: column;
}

/* Congress headline mirrors census-headline */
.congress-headline {
    text-align: center;
    padding: 30px 20px 15px;
    background-color: var(--section-bg);
}

.congress-total {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 6px;
}

.congress-subtitle {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Congress summary mirrors census-summary */
.congress-summary {
    background-color: var(--accent-color);
    padding: 12px 15px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 8px;
    color: white;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Congress context toggle mirrors race-context */
.congress-context {
    background: white;
    border-top: 1px solid var(--border-color);
}

.congress-context-toggle {
    display: block;
    width: 100%;
    padding: 8px 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--link-color);
    text-align: center;
}

.congress-context-toggle:hover {
    color: var(--link-hover);
    background: var(--section-bg);
}

.congress-context-panel {
    border-top: 1px solid var(--border-color);
}

/* Bills Ticker */
.bills-ticker {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    background: white;
}

.ticker-item {
    flex: 1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ticker-divider {
    width: 1px;
    background: var(--border-color);
}

.ticker-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
}

.ticker-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.5px;
}

.ticker-trend {
    font-size: 11px;
    font-weight: 600;
}

.ticker-trend.trend-up {
    color: #15803d;
}

.ticker-trend.trend-down {
    color: #c81e1e;
}

.ticker-trend.trend-flat {
    color: #888;
}

.ticker-loading,
.ticker-error {
    padding: 15px;
    font-size: 12px;
    color: #666;
    font-style: italic;
    width: 100%;
    text-align: center;
}

.ticker-error {
    color: #c81e1e;
}

/* Congress Preview (homepage) */
.congress-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.congress-preview-list {
    flex: 1;
    overflow-y: auto;
    max-height: 320px;
}

.preview-bill {
    padding: 8px 12px;
    border-bottom: 1px dotted var(--border-color);
}

.preview-bill:last-child {
    border-bottom: none;
}

.preview-bill-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.preview-bill-id {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.5px;
}

.preview-bill-chamber {
    font-size: 9px;
    font-weight: 600;
    padding: 1px 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-bill-chamber.house {
    background: #e8f0fe;
    color: #1a56db;
}

.preview-bill-chamber.senate {
    background: #fde8e8;
    color: #c81e1e;
}

.preview-bill-title {
    font-size: 12px;
    line-height: 1.3;
    color: #333;
}

.preview-bill-date {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

.congress-preview-link {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.congress-preview-link:hover {
    background: var(--gold-accent);
    color: white;
}

/* Congress Tabs */
.congress-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: white;
}

.congress-tab {
    flex: 1;
    padding: 8px 10px;
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: #666;
    transition: all 0.15s;
}

.congress-tab:hover {
    color: var(--accent-color);
    background: var(--section-bg);
}

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

.congress-tab-panel {
    display: none;
}

.congress-tab-panel.active {
    display: block;
}

/* Vote Preview Cards */
.preview-vote {
    padding: 8px 12px;
    border-bottom: 1px dotted var(--border-color);
}

.preview-vote:last-child {
    border-bottom: none;
}

.preview-vote-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.preview-vote-roll {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.5px;
}

.preview-vote-date {
    font-size: 10px;
    color: #888;
}

.preview-vote-question {
    font-size: 12px;
    line-height: 1.3;
    color: #333;
    margin-bottom: 4px;
}

.preview-vote-result {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 11px;
}

.vote-result-badge {
    font-weight: 700;
    padding: 1px 6px;
    background: var(--section-bg);
    border: 1px solid var(--border-color);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.vote-tally-yea {
    color: #15803d;
    font-weight: 600;
}

.vote-tally-nay {
    color: #c81e1e;
    font-weight: 600;
}

/* Attendance / Least Voting */
.attendance-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    padding: 10px 12px 6px;
    border-bottom: 1px solid var(--border-color);
}

.attendance-row {
    display: grid;
    grid-template-columns: 20px 1fr 80px 50px 40px;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 11px;
    border-bottom: 1px dotted var(--border-color);
}

.attendance-row:last-of-type {
    border-bottom: none;
}

.attendance-rank {
    font-weight: 700;
    color: #999;
    text-align: right;
    font-size: 10px;
}

.attendance-info {
    overflow: hidden;
}

.attendance-name {
    font-weight: 600;
    color: var(--accent-color);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
}

.attendance-party {
    font-size: 10px;
    color: #888;
}

.attendance-bar-track {
    height: 6px;
    background: #e0e0e0;
}

.attendance-bar-fill {
    height: 100%;
    background: #c81e1e;
}

.attendance-missed {
    text-align: right;
    font-weight: 600;
    color: #c81e1e;
    font-size: 11px;
}

.attendance-pct {
    text-align: right;
    font-weight: 700;
    color: var(--accent-color);
    font-size: 11px;
}

.attendance-note {
    font-size: 9px;
    color: #888;
    padding: 6px 12px;
    line-height: 1.4;
    border-top: 1px solid var(--border-color);
}

/* Race Context Toggle */
.race-context {
    background: white;
    border-top: 1px solid var(--border-color);
}

.race-context-toggle {
    display: block;
    width: 100%;
    padding: 8px 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--link-color);
    text-align: center;
}

.race-context-toggle:hover {
    color: var(--link-hover);
    background: var(--section-bg);
}

.toggle-arrow {
    font-size: 10px;
    margin-left: 4px;
}

.full-picture-icon {
    vertical-align: middle;
    margin-right: 4px;
    margin-top: -1px;
}

.race-context-panel {
    padding: 12px 15px;
    border-top: 1px solid var(--border-color);
}

.race-context-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.race-context-grid {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.race-bar-row {
    display: grid;
    grid-template-columns: 200px 1fr 45px 90px;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 3px 0;
}

.race-bar-row.race-highlight {
    background: #fffde7;
    padding: 5px 6px;
    margin: 0 -6px;
    font-weight: 600;
    border-left: 3px solid #a63603;
}

.race-label {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.race-bar-track {
    height: 10px;
    background: #e0e0e0;
}

.race-bar-fill {
    height: 100%;
    transition: width 0.4s ease;
}

.race-pct {
    text-align: right;
    font-weight: 700;
    color: var(--accent-color);
}

.race-pop {
    text-align: right;
    color: #666;
    font-size: 11px;
}

.race-context-note {
    font-size: 10px;
    color: #888;
    margin-top: 8px;
    line-height: 1.4;
}

/* Banner Split Responsive */
@media (max-width: 1024px) {
    .banner-split {
        grid-template-columns: 1fr;
    }

    .banner-left {
        border-right: none;
        border-bottom: 2px solid var(--accent-color);
    }

    .race-bar-row {
        grid-template-columns: 140px 1fr 40px 80px;
    }
}

@media (max-width: 768px) {
    .race-bar-row {
        grid-template-columns: 120px 1fr 40px;
        font-size: 11px;
    }

    .race-pop {
        display: none;
    }

    .ticker-value {
        font-size: 16px;
    }

    .congress-preview-list {
        max-height: 200px;
    }
}

@media (max-width: 480px) {
    .race-bar-row {
        grid-template-columns: 100px 1fr 35px;
        font-size: 10px;
    }

    .race-label {
        font-size: 10px;
    }

    .bills-ticker {
        flex-direction: column;
    }

    .ticker-divider {
        width: 100%;
        height: 1px;
    }

    .attendance-row {
        grid-template-columns: 16px 1fr 45px 35px;
        font-size: 10px;
    }

    .attendance-bar-track {
        display: none;
    }

    .congress-tab {
        font-size: 10px;
        padding: 6px 4px;
    }
}

/* Regional Breakdown (homepage) */
.region-breakdown {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    padding: 15px 15px 20px;
    background: var(--bg-color);
}

.region-breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
}

.region-breakdown-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    margin: 0;
}

.region-map-link {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--link-color);
    text-decoration: none;
}

.region-map-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.region-card {
    border: 1px solid var(--border-color);
    padding: 12px;
    background: var(--section-bg);
}

.region-card-header {
    margin-bottom: 6px;
}

.region-name {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    margin: 0 0 2px;
}

.region-share {
    font-size: 11px;
    color: #666;
}

.region-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.region-bar-track {
    height: 8px;
    background: #e0e0e0;
    margin-bottom: 6px;
}

.region-bar-fill {
    height: 100%;
    transition: width 0.3s;
}

.region-number-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    margin-top: -4px;
}

.region-bar-label {
    font-size: 10px;
    color: #888;
    margin-bottom: 6px;
}

.region-pct {
    font-size: 11px;
    color: #444;
    margin-bottom: 8px;
}

.region-top-list-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.region-top-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.region-top-state {
    font-size: 11px;
    color: #555;
}

.region-top-state strong {
    color: var(--accent-color);
}

/* Top 10 States List */
.top-states-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    margin: 0 0 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.top-states-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.top-state-row {
    display: grid;
    grid-template-columns: 24px 120px 1fr 100px 50px;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px dotted var(--border-color);
    font-size: 12px;
}

.top-state-rank {
    font-weight: 700;
    color: #999;
    text-align: right;
}

.top-state-name {
    font-weight: 600;
    color: var(--accent-color);
}

.top-state-bar-track {
    height: 6px;
    background: #e0e0e0;
}

.top-state-bar-fill {
    height: 100%;
    background: #a63603;
}

.top-state-num {
    text-align: right;
    font-weight: 600;
    color: var(--accent-color);
}

.top-state-pct {
    text-align: right;
    color: #666;
}

.top-state-header {
    border-bottom: 1px solid var(--border-color);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
}

.top-state-header .top-state-rank,
.top-state-header .top-state-name,
.top-state-header .top-state-num,
.top-state-header .top-state-pct {
    font-weight: 600;
    color: #888;
}

@media (max-width: 1024px) {
    .region-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .region-breakdown-header {
        flex-direction: column;
        gap: 4px;
    }

    .region-number {
        font-size: 20px;
    }

    .top-state-row {
        grid-template-columns: 20px 90px 1fr 80px 44px;
        font-size: 11px;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .region-breakdown {
        padding: 8px;
    }

    .top-state-row {
        grid-template-columns: 18px 80px 1fr 48px;
        font-size: 10px;
    }

    .top-state-pct {
        display: none;
    }
}

.census-map-section {
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    padding: 15px;
    background: var(--bg-color);
}

.census-map-hint {
    font-size: 11px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#census-map,
#county-map {
    min-height: 150px;
    position: relative;
}

.census-svg {
    width: 100%;
    max-width: 975px;
    height: auto;
    aspect-ratio: 975 / 610;
    display: block;
    margin: 0 auto;
}

.census-svg .state-path {
    cursor: pointer;
    transition: opacity 0.15s;
}

.census-svg .state-path:hover {
    opacity: 0.85;
}

.census-legend {
    text-align: center;
    padding: 10px 0 0;
}

.legend-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    color: var(--accent-color);
}

.legend-items {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #444;
}

.legend-color {
    display: inline-block;
    width: 18px;
    height: 12px;
    border: 1px solid #ccc;
}

.census-table-section {
    margin: 25px 0;
    padding: 15px;
    border: 1px solid var(--border-color);
}

.census-table-section h2 {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.census-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.census-table th {
    background-color: var(--accent-color);
    color: white;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    text-align: left;
}

.census-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.census-table th.sortable:hover {
    background-color: #333;
}

.census-table td {
    padding: 6px 12px;
    border-bottom: 1px dotted var(--border-color);
}

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

.census-table .state-link {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.census-table .state-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.census-county-section {
    margin: 25px 0;
    padding: 20px;
    background: var(--section-bg);
    border: 2px solid var(--accent-color);
}

.census-county-section h2 {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.census-tooltip {
    position: absolute;
    background: var(--accent-color);
    color: white;
    padding: 10px 14px;
    font-family: var(--font-main);
    font-size: 12px;
    line-height: 1.6;
    pointer-events: none;
    z-index: 1000;
    max-width: 260px;
    opacity: 0;
    transition: opacity 0.2s;
}

.census-source {
    text-align: center;
    padding: 15px;
    font-size: 11px;
    color: #666;
    border-top: 1px solid var(--border-color);
    margin-top: 25px;
}

.census-source a {
    color: var(--link-color);
}

.loading-text {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

.error-text {
    text-align: center;
    padding: 30px;
    color: #cc0000;
}

.census-map-section.minimized {
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.census-map-section.minimized #census-map,
.census-map-section.minimized .census-legend,
.census-map-section.minimized .census-map-hint {
    display: none;
}

.census-map-section.minimized .map-minimized-notice {
    display: block;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.map-minimized-notice {
    display: none;
}

.census-map-section.minimized:hover {
    background: var(--section-bg);
}

/* Data Feeds Section */
.data-feeds-section {
    margin: 25px 0;
    padding: 15px;
    border: 1px solid var(--border-color);
}

.data-feeds-section h2 {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.data-feeds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.data-feed-card {
    border: 1px solid var(--border-color);
    padding: 15px;
    background: var(--bg-color);
}

.data-feed-card h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.data-feed-item {
    padding: 6px 0;
    border-bottom: 1px dotted var(--border-color);
    font-size: 12px;
}

.data-feed-item:last-child {
    border-bottom: none;
}

.data-feed-item a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.data-feed-item a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.data-feed-item .feed-value {
    font-weight: 700;
    color: var(--accent-color);
}

.data-feed-item .feed-label {
    color: #666;
    font-size: 11px;
}

.data-feed-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    font-size: 12px;
}

.feed-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 8px;
}

.feed-table thead th {
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    border-bottom: 2px solid var(--border-color);
    padding: 4px 6px;
}

.feed-table tbody td {
    padding: 5px 6px;
    border-bottom: 1px dotted var(--border-color);
    vertical-align: top;
}

.feed-table tbody tr:last-child td {
    border-bottom: none;
}

.feed-table .feed-value {
    font-weight: 700;
    color: var(--accent-color);
    white-space: nowrap;
}

.feed-table tbody td:first-child {
    font-weight: 500;
}

.feed-table tbody td:last-child {
    color: #888;
    font-size: 11px;
    white-space: nowrap;
}

.feed-source {
    font-size: 10px;
    color: #888;
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
    line-height: 1.5;
}

.feed-source a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

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

.api-note {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

.api-note a {
    color: var(--link-color);
}

@media (max-width: 1024px) {
    .data-feeds-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .data-feeds-grid {
        grid-template-columns: 1fr;
    }
    .feed-table {
        font-size: 13px;
    }
    .feed-table thead th {
        font-size: 11px;
    }
}

.back-link {
    display: inline-block;
    font-size: 12px;
    color: var(--link-color);
    text-decoration: none;
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.back-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .census-total,
    .congress-total {
        font-size: 36px;
    }

    .census-subtitle,
    .congress-subtitle {
        font-size: 11px;
    }

    .census-headline,
    .congress-headline {
        padding: 20px 15px 10px;
    }

    .census-summary,
    .congress-summary {
        font-size: 10px;
        gap: 4px 6px;
        padding: 10px;
    }

    .summary-divider {
        display: none;
    }

    .summary-item {
        white-space: normal;
    }

    .census-table th,
    .census-table td {
        padding: 4px 6px;
        font-size: 11px;
    }

    .legend-items {
        gap: 2px 8px;
    }

    .legend-item {
        font-size: 10px;
    }

    .census-county-section {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .census-table th,
    .census-table td {
        padding: 3px 4px;
        font-size: 10px;
    }

    .census-map-section {
        padding: 8px;
    }
}

/* ===== CONGRESS BILL TRACKER ===== */

/* API Key Setup */
.congress-api-setup {
    background-color: var(--section-bg);
    border: 2px solid var(--border-color);
    padding: 30px 20px;
    margin: 15px 0;
    text-align: center;
}

.api-setup-inner h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.api-setup-inner p {
    font-size: 13px;
    margin-bottom: 12px;
    color: #444;
}

.api-key-form {
    display: flex;
    gap: 8px;
    max-width: 500px;
    margin: 0 auto 10px;
}

.api-key-form input {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    font-family: var(--font-main);
    border: 1px solid var(--border-color);
    outline: none;
}

.api-key-form input:focus {
    border-color: var(--accent-color);
}

.api-key-form button,
#search-bills-btn {
    padding: 8px 18px;
    font-size: 13px;
    font-family: var(--font-main);
    font-weight: 600;
    background-color: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.api-key-form button:hover,
#search-bills-btn:hover {
    background-color: var(--gold-accent);
}

.api-note {
    font-size: 11px !important;
    color: #888 !important;
}

/* Topic Filters */
.congress-topics {
    margin: 15px 0 10px;
}

.topics-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.topic-btn {
    padding: 5px 14px;
    font-size: 12px;
    font-family: var(--font-main);
    font-weight: 500;
    background: white;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.3px;
}

.topic-btn:hover {
    border-color: var(--accent-color);
    background-color: var(--section-bg);
}

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

.congress-search-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
}

.congress-search-row input {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    font-family: var(--font-main);
    border: 1px solid var(--border-color);
    outline: none;
}

.congress-search-row input:focus {
    border-color: var(--accent-color);
}

.congress-search-row select {
    padding: 8px 10px;
    font-size: 13px;
    font-family: var(--font-main);
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
}

.congress-stats {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

/* Bills Results */
.congress-results {
    margin: 15px 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 6px;
    margin-bottom: 12px;
}

.results-header h2 {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.results-count {
    font-size: 12px;
    color: #666;
}

.bills-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bill-card {
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    background: white;
    transition: border-color 0.15s;
}

.bill-card:hover {
    border-color: var(--accent-color);
}

.bill-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.bill-id {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.5px;
}

.bill-chamber {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.bill-chamber.house {
    background-color: #e8f0fe;
    color: #1a56db;
}

.bill-chamber.senate {
    background-color: #fde8e8;
    color: #c81e1e;
}

.bill-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 6px;
}

.bill-meta {
    display: flex;
    gap: 15px;
    font-size: 11px;
    color: #666;
    margin-bottom: 5px;
}

.bill-action {
    font-size: 12px;
    color: #444;
    line-height: 1.3;
    margin-bottom: 8px;
}

.bill-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.bill-detail-btn {
    padding: 4px 12px;
    font-size: 12px;
    font-family: var(--font-main);
    font-weight: 600;
    background: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
}

.bill-detail-btn:hover {
    background: var(--gold-accent);
}

.bill-congress-link {
    font-size: 12px;
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.bill-congress-link:hover {
    color: var(--link-hover);
}

.bill-congress-link.full-width {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--section-bg);
    font-size: 14px;
}

.load-more-container {
    text-align: center;
    margin: 15px 0;
}

#load-more-btn {
    padding: 8px 30px;
    font-size: 13px;
    font-family: var(--font-main);
    font-weight: 600;
    background: white;
    border: 2px solid var(--accent-color);
    cursor: pointer;
    letter-spacing: 0.5px;
}

#load-more-btn:hover {
    background: var(--accent-color);
    color: white;
}

.no-results,
.error-text {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 14px;
}

.error-text {
    color: #c81e1e;
}

/* Bill Detail Modal */
.bill-detail-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-y: auto;
}

.bill-detail-modal {
    background: white;
    max-width: 800px;
    width: 100%;
    padding: 25px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.bill-detail-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.bill-detail-close:hover {
    color: var(--accent-color);
}

.detail-header h2 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.detail-header h3 {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
}

.detail-section {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.detail-section h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--accent-color);
}

.sponsor-card {
    margin-bottom: 4px;
}

.sponsor-name {
    font-weight: 600;
    font-size: 14px;
}

.sponsor-party {
    font-size: 12px;
    color: #666;
}

.member-link {
    font-size: 11px;
    color: var(--link-color);
    cursor: pointer;
}

.cosponsor-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cosponsor-chip {
    font-size: 12px;
    padding: 3px 8px;
    background: var(--section-bg);
    border: 1px solid var(--border-color);
    display: inline-block;
}

.subject-tag {
    display: inline-block;
    font-size: 11px;
    padding: 3px 10px;
    margin: 2px 4px 2px 0;
    background: var(--section-bg);
    border: 1px solid var(--border-color);
}

.subject-tag.policy-area {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    font-weight: 600;
}

/* Actions Timeline */
.actions-timeline {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.action-item {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 12px;
}

.action-item.has-vote {
    background: #fffde7;
    padding: 8px;
    border: 1px solid var(--gold-accent);
}

.action-date {
    font-weight: 600;
    min-width: 90px;
    color: #444;
}

.action-text {
    flex: 1;
    line-height: 1.3;
}

.vote-link {
    font-size: 11px;
    color: var(--link-color);
    font-weight: 600;
}

.load-vote-btn {
    font-size: 11px;
    font-family: var(--font-main);
    font-weight: 600;
    padding: 3px 10px;
    background: var(--gold-accent);
    color: white;
    border: none;
    cursor: pointer;
}

.load-vote-btn:hover {
    background: var(--accent-color);
}

/* Vote Breakdown */
.vote-summary {
    margin-bottom: 12px;
}

.vote-result {
    font-size: 14px;
    margin-bottom: 8px;
}

.vote-totals {
    display: flex;
    gap: 15px;
    font-size: 14px;
    font-weight: 600;
}

.vote-yea { color: #15803d; }
.vote-nay { color: #c81e1e; }
.vote-present { color: #92400e; }
.vote-notvoting { color: #666; }

.vote-filter-row {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.vote-filter {
    padding: 4px 12px;
    font-size: 12px;
    font-family: var(--font-main);
    font-weight: 500;
    background: white;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.vote-filter.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.members-vote-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.member-vote-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    font-size: 12px;
    border-bottom: 1px solid #eee;
}

.member-vote-row:nth-child(even) {
    background: var(--section-bg);
}

.mv-name {
    flex: 1;
    font-weight: 500;
}

.mv-party {
    color: #666;
    min-width: 60px;
}

.mv-vote {
    font-weight: 700;
    min-width: 80px;
    text-align: right;
}

.mv-vote.vote-yea,
.mv-vote.vote-aye {
    color: #15803d;
}

.mv-vote.vote-nay,
.mv-vote.vote-no {
    color: #c81e1e;
}

.mv-vote.vote-notvoting {
    color: #666;
}

/* Member Record */
.back-to-bill {
    font-size: 13px;
    font-family: var(--font-main);
    background: none;
    border: none;
    color: var(--link-color);
    cursor: pointer;
    padding: 0;
    margin-bottom: 10px;
    display: inline-block;
}

.back-to-bill:hover {
    color: var(--link-hover);
}

.member-info {
    font-size: 14px;
    color: #444;
    margin-bottom: 4px;
}

.member-status {
    font-size: 12px;
    font-weight: 600;
    color: #15803d;
}

.terms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.term-chip {
    font-size: 12px;
    padding: 3px 10px;
    background: var(--section-bg);
    border: 1px solid var(--border-color);
}

.member-bills-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.member-bill-item {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 12px;
}

.member-bill-item .bill-id {
    font-size: 12px;
    margin-right: 8px;
}

.member-bill-title {
    line-height: 1.3;
}

.member-bill-action {
    display: block;
    margin-top: 3px;
    color: #666;
    font-size: 11px;
}

/* Congress page responsive */
@media (max-width: 768px) {
    .congress-search-row {
        flex-direction: column;
    }

    .congress-search-row input,
    .congress-search-row select,
    #search-bills-btn {
        width: 100%;
    }

    .api-key-form {
        flex-direction: column;
    }

    .bill-detail-overlay {
        padding: 10px;
    }

    .bill-detail-modal {
        padding: 15px;
        max-height: 90vh;
    }

    .vote-totals {
        flex-wrap: wrap;
        gap: 8px;
    }

    .topics-bar {
        gap: 4px;
    }

    .topic-btn {
        padding: 4px 10px;
        font-size: 11px;
    }

    .bill-meta {
        flex-direction: column;
        gap: 2px;
    }
}

/* ============================================================
   DARK THEME
   ============================================================ */
html[data-theme="dark"] {
    --bg-color: #171426;
    --text-color: #ece9f7;
    --link-color: #a58bef;
    --link-hover: #e0b455;
    --border-color: #2e2a44;
    --section-bg: #1e1a30;
    --accent-color: #ece9f7;
    --gold-accent: #e0b455;
    color-scheme: dark;
}

html[data-theme="dark"] body {
    background-color: var(--bg-color);
}

/* Dark mode: fix hardcoded white backgrounds */
html[data-theme="dark"] .whats-new,
html[data-theme="dark"] .data-dashboard,
html[data-theme="dark"] .inline-search,
html[data-theme="dark"] .bills-ticker,
html[data-theme="dark"] .congress-tabs,
html[data-theme="dark"] .congress-context,
html[data-theme="dark"] .state-dropdown,
html[data-theme="dark"] .search-container,
html[data-theme="dark"] .filter-btn,
html[data-theme="dark"] .bill-detail-modal {
    background: var(--section-bg);
    color: var(--text-color);
}

/* Dark mode: fix hardcoded text colors */
html[data-theme="dark"] .whats-new-text,
html[data-theme="dark"] .data-detail-label,
html[data-theme="dark"] .data-stat-label,
html[data-theme="dark"] .event-date,
html[data-theme="dark"] .preview-bill-title,
html[data-theme="dark"] .preview-vote-question,
html[data-theme="dark"] .page-intro p,
html[data-theme="dark"] .data-resources-intro {
    color: var(--text-color);
}

html[data-theme="dark"] .tagline,
html[data-theme="dark"] .event-location,
html[data-theme="dark"] .org-desc,
html[data-theme="dark"] .page-header p,
html[data-theme="dark"] .sub-header,
html[data-theme="dark"] .scholarship-desc,
html[data-theme="dark"] .congress-tab,
html[data-theme="dark"] .org-card span,
html[data-theme="dark"] .near-me-status {
    color: #a1a1aa;
}

html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .data-stat-detail,
html[data-theme="dark"] .data-dashboard-source,
html[data-theme="dark"] .whats-new-date,
html[data-theme="dark"] .filter-bar-label,
html[data-theme="dark"] .attendance-rank,
html[data-theme="dark"] .preview-bill-date,
html[data-theme="dark"] .preview-vote-date,
html[data-theme="dark"] .ticker-label,
html[data-theme="dark"] .search-group-title,
html[data-theme="dark"] #search-count,
html[data-theme="dark"] #search-close,
html[data-theme="dark"] .search-hint,
html[data-theme="dark"] .census-subtitle,
html[data-theme="dark"] .congress-subtitle {
    color: #71717a;
}

/* Dark mode: borders */
html[data-theme="dark"] .breadcrumb-sep {
    color: #3f3f46;
}

/* Dark mode: search overlay */
html[data-theme="dark"] #search-input {
    color: var(--text-color);
    background: transparent;
}

html[data-theme="dark"] .search-result-detail {
    color: #a1a1aa;
}

html[data-theme="dark"] #search-results mark {
    background: #422006;
    color: #fbbf24;
}

/* Dark mode: mobile nav */
html[data-theme="dark"] .mobile-nav-drawer {
    background: var(--section-bg);
}

html[data-theme="dark"] .mobile-nav-drawer a:hover,
html[data-theme="dark"] .mobile-nav-drawer a.active {
    background: var(--bg-color);
    color: var(--link-color);
}

/* Dark mode: form elements */
html[data-theme="dark"] .state-dropdown,
html[data-theme="dark"] .scholarship-search-input,
html[data-theme="dark"] .inline-search input,
html[data-theme="dark"] .congress-search-row input,
html[data-theme="dark"] .congress-search-row select,
html[data-theme="dark"] .api-key-input {
    background: #27272a;
    color: var(--text-color);
    border-color: #3f3f46;
}

/* Dark mode: scholarship colors */
html[data-theme="dark"] .scholarship-amount {
    color: #4ade80;
}

html[data-theme="dark"] .scholarship-deadline {
    color: #f87171;
}

/* Dark mode: bill chamber badges */
html[data-theme="dark"] .preview-bill-chamber.house {
    background: #1e3a5f;
    color: #60a5fa;
}

html[data-theme="dark"] .preview-bill-chamber.senate {
    background: #5f1e1e;
    color: #f87171;
}

/* Dark mode: header adjustments */
html[data-theme="dark"] .header-clock {
    background-color: #27272a;
}

/* Dark mode: reelection elements keep their red */
html[data-theme="dark"] .reelection-callout {
    background-color: #991b1b;
}

/* Dark mode: census/congress summary bar */
html[data-theme="dark"] .census-summary,
html[data-theme="dark"] .congress-summary {
    background-color: #27272a;
}

/* Dark mode: vote result badge */
html[data-theme="dark"] .vote-result-badge {
    background: #27272a;
    border-color: #3f3f46;
}
