/* MDC Data Encyclopedia - Complete CSS System */

/* ===== CSS Custom Properties ===== */
:root {
    --mdc-blue: #003366;
    --mdc-amber: #d4a017;
    --mdc-white: #ffffff;
    --mdc-light-gray: #e9ecef;
    --mdc-dark-gray: #495057;
    --mdc-text: #212529;
    --mdc-bg: #f8f9fa;
    --mdc-footer-bg: #1a1a2e;
    --mdc-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --mdc-radius: 6px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--mdc-bg);
    color: var(--mdc-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Typography ===== */
h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--mdc-blue);
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--mdc-blue);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    text-decoration: underline;
}

/* ===== Navigation ===== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--mdc-blue);
    color: var(--mdc-white);
    box-shadow: var(--mdc-shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.nav-brand {
    color: var(--mdc-white);
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.nav-brand:hover {
    text-decoration: none;
    color: var(--mdc-amber);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links a {
    color: var(--mdc-white);
    padding: 0.5rem 0.75rem;
    border-radius: var(--mdc-radius);
    transition: background 0.2s;
    font-size: 0.9rem;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

/* Hamburger menu */
.nav-toggle-checkbox {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle-label span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--mdc-white);
    margin: 5px 0;
    transition: transform 0.3s;
}

/* Nav search */
.nav-search input {
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--mdc-radius);
    background: rgba(255, 255, 255, 0.1);
    color: var(--mdc-white);
    font-size: 0.85rem;
    width: 200px;
    outline: none;
}

.nav-search input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.nav-search input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--mdc-amber);
}

/* ===== Content Area ===== */
.content {
    max-width: 1200px;
    margin: 72px auto 2rem;
    padding: 0 1rem;
    flex: 1;
    width: 100%;
}

/* ===== Letter Grade Badges ===== */
.grade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--mdc-white);
}

.grade-a {
    background: #2e7d32;
}

.grade-b {
    background: #558b2f;
}

.grade-c {
    background: #f9a825;
    color: var(--mdc-text);
}

.grade-d {
    background: #e65100;
}

.grade-f {
    background: #c62828;
}

.grade-none {
    background: var(--mdc-light-gray);
    color: var(--mdc-dark-gray);
}

/* ===== Jurisdiction Badges ===== */
.jurisdiction-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    vertical-align: middle;
    letter-spacing: 0.3px;
    margin-right: 0.3rem;
}

.jurisdiction-miami-dade { background: #e3f2fd; color: #003366; }
.jurisdiction-broward { background: #fff3e0; color: #e65100; }
.jurisdiction-miami { background: #e8f5e9; color: #1b5e20; }
.jurisdiction-default { background: #f5f5f5; color: #424242; }

/* ===== AI Badge ===== */
.ai-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    margin-left: 0.4rem;
    background: var(--mdc-blue);
    color: #fff;
    border-radius: 3px;
    vertical-align: middle;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

/* ===== Freshness Dots ===== */
.freshness-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 0.35rem;
}

.freshness-dot.green {
    background: #2e7d32;
}

.freshness-dot.yellow {
    background: #f9a825;
}

.freshness-dot.red {
    background: #c62828;
}

.freshness-dot.gray {
    background: #9e9e9e;
}

/* ===== Department Chips ===== */
.chip {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    background: #e3f2fd;
    color: var(--mdc-blue);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

/* ===== Stat Cards ===== */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: var(--mdc-white);
    border-radius: var(--mdc-radius);
    box-shadow: var(--mdc-shadow);
    padding: 1.25rem;
    text-align: center;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--mdc-blue);
    display: block;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--mdc-dark-gray);
    margin-top: 0.25rem;
    display: block;
}

/* ===== Dataset List Rows ===== */
.dataset-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--mdc-light-gray);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transition: background 0.15s;
}

.dataset-row:hover {
    background: rgba(0, 51, 102, 0.03);
}

.dataset-row .dataset-grade {
    flex-shrink: 0;
}

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

.dataset-row .dataset-title {
    font-weight: 600;
    color: var(--mdc-blue);
    margin-bottom: 0.15rem;
}

.dataset-row .dataset-title a {
    color: inherit;
}

.dataset-row .dataset-meta {
    font-size: 0.85rem;
    color: var(--mdc-dark-gray);
}

/* ===== Filter Bar ===== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--mdc-light-gray);
}

.filter-bar select,
.filter-bar input {
    padding: 0.4rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: var(--mdc-radius);
    font-size: 0.85rem;
    background: var(--mdc-white);
}

/* ===== Footer ===== */
.site-footer {
    background: var(--mdc-footer-bg);
    color: var(--mdc-white);
    padding: 2rem 1rem;
    margin-top: auto;
}

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

.footer-disclaimer {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.footer-source {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.footer-source a {
    color: var(--mdc-amber);
}

.footer-source a:hover {
    text-decoration: underline;
}

.footer-generated {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== Hero / Homepage Search ===== */
.hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.hero .hero-subtitle {
    font-size: 1.1rem;
    color: var(--mdc-dark-gray);
    margin-bottom: 1.5rem;
}

.search-container {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}

.search-container input[type="search"] {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    font-size: 1.1rem;
    border: 2px solid var(--mdc-blue);
    border-radius: var(--mdc-radius);
    outline: none;
    background: var(--mdc-white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-container input[type="search"]:focus {
    border-color: var(--mdc-amber);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.2);
}

.search-container input[type="search"]:disabled {
    background: var(--mdc-light-gray);
    cursor: not-allowed;
}

/* CSS-only magnifying glass icon */
.search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid var(--mdc-dark-gray);
    border-radius: 50%;
    pointer-events: none;
}

.search-icon::after {
    content: '';
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 8px;
    height: 2px;
    background: var(--mdc-dark-gray);
    transform: rotate(45deg);
}

/* ===== Search Dropdown ===== */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--mdc-white);
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 var(--mdc-radius) var(--mdc-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    max-height: 420px;
    overflow-y: auto;
}

.search-dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--mdc-light-gray);
    color: var(--mdc-text);
    text-decoration: none;
    transition: background 0.15s;
}

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

.search-dropdown-item:hover {
    background: #f0f4f8;
    text-decoration: none;
}

.search-dropdown-title {
    font-weight: 600;
    color: var(--mdc-blue);
    margin-bottom: 0.15rem;
}

.search-dropdown-snippet {
    font-size: 0.85rem;
    color: var(--mdc-dark-gray);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.search-dropdown-dept {
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

.search-dropdown-empty {
    padding: 1rem;
    text-align: center;
    color: var(--mdc-dark-gray);
    font-size: 0.9rem;
}

/* ===== Category Browse Grid ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: var(--mdc-white);
    border: 1px solid var(--mdc-light-gray);
    border-radius: var(--mdc-radius);
    color: var(--mdc-blue);
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
}

.category-link:hover {
    background: #e3f2fd;
    border-color: var(--mdc-blue);
    text-decoration: none;
}

.category-count {
    background: var(--mdc-light-gray);
    color: var(--mdc-dark-gray);
    padding: 0.1rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== Recent Datasets Section ===== */
.recent-datasets {
    margin-top: 2rem;
}

.recent-item {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--mdc-light-gray);
}

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

.recent-item a {
    font-weight: 500;
}

.recent-item .recent-time {
    font-size: 0.8rem;
    color: var(--mdc-dark-gray);
    white-space: nowrap;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--mdc-dark-gray);
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.breadcrumbs a {
    color: var(--mdc-blue);
}

.breadcrumbs span {
    color: var(--mdc-text);
    font-weight: 500;
}

/* ===== Dataset Detail Header ===== */
.dataset-header h1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dataset-header h1 .grade {
    flex-shrink: 0;
}

/* ===== Dataset Sections ===== */
.dataset-section {
    background: var(--mdc-white);
    border-radius: var(--mdc-radius);
    box-shadow: var(--mdc-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.dataset-section h2 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--mdc-light-gray);
}

.ai-description {
    font-size: 1.05rem;
    line-height: 1.7;
}

.use-cases-list {
    list-style: disc;
    padding-left: 1.5rem;
}

.use-cases-list li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* ===== Metadata Table ===== */
.metadata-table {
    width: 100%;
    border-collapse: collapse;
}

.metadata-table th,
.metadata-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--mdc-light-gray);
    vertical-align: top;
}

.metadata-table th {
    width: 160px;
    font-weight: 600;
    color: var(--mdc-dark-gray);
    font-size: 0.9rem;
}

.metadata-table td {
    font-size: 0.95rem;
}

.keyword-chip {
    margin: 0.15rem 0.25rem 0.15rem 0;
}

/* ===== Columns Table ===== */
.table-responsive {
    overflow-x: auto;
}

.columns-table {
    width: 100%;
    border-collapse: collapse;
}

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

.columns-table th {
    background: var(--mdc-bg);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--mdc-dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.columns-table code {
    background: var(--mdc-bg);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.85rem;
    color: var(--mdc-blue);
}

/* ===== Related Datasets ===== */
.related-datasets .dataset-row:last-child {
    border-bottom: none;
}

/* ===== Quality Breakdown ===== */
.quality-overall {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quality-score {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--mdc-dark-gray);
}

.quality-dimensions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quality-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quality-bar label {
    width: 120px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--mdc-dark-gray);
    flex-shrink: 0;
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: var(--mdc-light-gray);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--mdc-blue);
    border-radius: 6px;
    transition: width 0.3s;
}

.score-label {
    width: 40px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--mdc-dark-gray);
}

.quality-findings ul {
    list-style: disc;
    padding-left: 1.5rem;
}

.quality-findings li {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

/* ===== Civic Relevance Labels ===== */
.relevance {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.relevance-high {
    background: #e8f5e9;
    color: #2e7d32;
}

.relevance-medium {
    background: #fff3e0;
    color: #e65100;
}

.relevance-low {
    background: var(--mdc-light-gray);
    color: var(--mdc-dark-gray);
}

/* ===== Browse Page ===== */
.browse-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.browse-count {
    font-size: 1rem;
    color: var(--mdc-dark-gray);
    font-weight: 400;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    background: var(--mdc-blue);
    color: var(--mdc-white);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.filter-chip-remove {
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    opacity: 0.8;
}

.filter-chip-remove:hover {
    opacity: 1;
}

.filter-bar .clear-btn {
    padding: 0.4rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: var(--mdc-radius);
    font-size: 0.85rem;
    background: var(--mdc-white);
    cursor: pointer;
    color: var(--mdc-dark-gray);
}

.filter-bar .clear-btn:hover {
    background: var(--mdc-light-gray);
}

.result-count {
    font-size: 0.9rem;
    color: var(--mdc-dark-gray);
    font-weight: 500;
}

.dataset-desc {
    font-size: 0.85rem;
    color: var(--mdc-dark-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.dataset-freshness {
    font-size: 0.8rem;
    color: var(--mdc-dark-gray);
    white-space: nowrap;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--mdc-dark-gray);
}

/* ===== Quality Report: Grade Distribution Bars ===== */
.grade-chart {
    background: var(--mdc-white);
    border-radius: var(--mdc-radius);
    box-shadow: var(--mdc-shadow);
    padding: 1.25rem;
}

.grade-bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.grade-bar-row:last-child {
    margin-bottom: 0;
}

.grade-bar-row .grade {
    flex-shrink: 0;
}

.grade-bar-track {
    flex: 1;
    height: 20px;
    background: var(--mdc-light-gray);
    border-radius: 4px;
    overflow: hidden;
}

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

.grade-bar-a { background: #2e7d32; }
.grade-bar-b { background: #558b2f; }
.grade-bar-c { background: #f9a825; }
.grade-bar-d { background: #e65100; }
.grade-bar-f { background: #c62828; }

.grade-bar-label {
    width: 100px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--mdc-dark-gray);
    flex-shrink: 0;
}

/* ===== Quality Report: Findings List ===== */
.findings-list {
    background: var(--mdc-white);
    border-radius: var(--mdc-radius);
    box-shadow: var(--mdc-shadow);
    padding: 1rem;
}

.finding-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.5rem;
    border-bottom: 1px solid var(--mdc-light-gray);
}

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

.finding-text {
    flex: 1;
    font-size: 0.9rem;
}

/* ===== Quality Report: Dimension Cards ===== */
.dimension-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.dimension-card {
    background: var(--mdc-white);
    border-radius: var(--mdc-radius);
    box-shadow: var(--mdc-shadow);
    padding: 1.25rem;
}

.dimension-card h3 {
    color: var(--mdc-blue);
    margin-bottom: 0.5rem;
}

.dimension-score {
    font-size: 2rem;
    font-weight: 700;
    color: var(--mdc-blue);
    margin-bottom: 0.5rem;
}

/* ===== Quality Report: Methodology Note ===== */
.methodology-note {
    background: var(--mdc-white);
    border-radius: var(--mdc-radius);
    box-shadow: var(--mdc-shadow);
    padding: 1.25rem;
}

/* ===== About Page: Disclaimer Box ===== */
.disclaimer-box {
    border: 2px solid #c62828;
    border-radius: var(--mdc-radius);
    padding: 1.25rem;
    margin: 1.5rem 0;
    background: #fff5f5;
}

.disclaimer-box h2 {
    color: #c62828;
    margin-bottom: 0.75rem;
}

.disclaimer-box p {
    margin-bottom: 0.5rem;
}

.disclaimer-box p:last-child {
    margin-bottom: 0;
}

/* ===== About Page: Section Styles ===== */
.about-section {
    background: var(--mdc-white);
    border-radius: var(--mdc-radius);
    box-shadow: var(--mdc-shadow);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.about-section h2 {
    margin-bottom: 0.75rem;
}

.pipeline-steps {
    list-style: none;
    padding: 0;
}

.pipeline-steps li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--mdc-light-gray);
}

.pipeline-steps li:last-child {
    border-bottom: none;
}

.pipeline-steps strong {
    color: var(--mdc-blue);
}

.credits-list {
    list-style: disc;
    padding-left: 1.5rem;
}

.credits-list li {
    margin-bottom: 0.5rem;
}

/* ===== Changes Page: Section Styles ===== */
.changes-section h2 {
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--mdc-light-gray);
}

/* ===== Utility Classes ===== */
.text-muted {
    color: var(--mdc-dark-gray);
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ===== Responsive: 768px ===== */
@media (max-width: 768px) {
    .nav-toggle-label {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--mdc-blue);
        flex-direction: column;
        padding: 0.5rem 0;
        box-shadow: var(--mdc-shadow);
    }

    .nav-toggle-checkbox:checked ~ .nav-links {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 1.5rem;
        border-radius: 0;
    }

    .nav-search {
        padding: 0.5rem 1.5rem;
    }

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

    .content {
        padding: 0 0.75rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}

/* ===== Responsive: 480px ===== */
@media (max-width: 480px) {
    .stat-cards {
        grid-template-columns: 1fr;
    }

    .dataset-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar select,
    .filter-bar input {
        width: 100%;
    }

    h1 {
        font-size: 1.3rem;
    }
}
