/* CSS Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #a855f7;
    --gradient-start: #6366f1;
    --gradient-end: #a855f7;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.06);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.bg-gradient-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.bg-gradient-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-tertiary));
    bottom: -150px;
    left: -150px;
    animation-delay: -7s;
}

.bg-gradient-3 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--accent-tertiary), var(--accent-primary));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(-30px, -20px) scale(1.02); }
}

/* Glass Effect */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.glass:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 40px;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.hero-badge-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.hero-badge-row .hero-badge {
    margin-bottom: 0;
}

.beta-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--warning), #f97316);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 16px rgba(245, 158, 11, 0.6); }
}

/* Compact hero for scenario page */
.hero-compact {
    min-height: auto;
    padding: 100px 40px 60px;
}

.hero-compact .hero-content {
    max-width: 800px;
}

.hero-compact h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.hero-compact .hero-explainer {
    margin-bottom: 0;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 24px;
}

.hero-explainer {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.stat-card {
    padding: 24px 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    min-width: 180px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stat-period {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* Navigation */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 40px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 32px;
    height: 64px;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-accent {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 8px;
    flex: 1;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: var(--glass-border);
}

.occupation-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
}

.toggle-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    color: var(--text-primary);
}

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

/* Sections */
.section {
    padding: 100px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-dark {
    background: var(--bg-secondary);
    max-width: none;
    padding-left: calc((100vw - 1400px) / 2 + 40px);
    padding-right: calc((100vw - 1400px) / 2 + 40px);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 100px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.overview-card {
    padding: 32px;
    border-radius: var(--radius-lg);
}

.overview-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.overview-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.overview-text strong {
    color: var(--accent-primary);
}

.chart-container {
    min-height: 250px;
    position: relative;
}

/* Controls */
.controls {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    justify-content: center;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.scenario-selector,
.metric-selector {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
}

.scenario-btn,
.metric-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.scenario-btn:hover,
.metric-btn:hover {
    color: var(--text-primary);
}

.scenario-btn.active,
.metric-btn.active {
    background: var(--accent-primary);
    color: white;
}

/* Modern Custom Dropdown */
.custom-dropdown {
    position: relative;
    min-width: 200px;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.dropdown-trigger:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.dropdown-trigger.active {
    border-color: var(--accent-primary);
    background: var(--glass-hover);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.dropdown-selected {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    width: 18px;
    height: 18px;
    opacity: 0.6;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.dropdown-trigger.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-primary);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 100;
}

.dropdown-menu.open {
    max-height: 320px;
    opacity: 1;
    overflow-y: auto;
}

.dropdown-search {
    padding: 12px;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    background: var(--bg-tertiary);
    z-index: 1;
}

.dropdown-search input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.dropdown-search input::placeholder {
    color: var(--text-muted);
}

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

.dropdown-options {
    padding: 8px 0;
}

.dropdown-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.dropdown-option:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

.dropdown-option.selected {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

.dropdown-option.hidden {
    display: none;
}

.dropdown-option-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.dropdown-option.selected .dropdown-option-icon {
    opacity: 1;
}

.dropdown-category-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    color: var(--accent-primary);
    margin-left: auto;
}

.dropdown-no-results {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: none;
}

.dropdown-no-results.visible {
    display: block;
}

/* Legacy select hidden but functional */
.filter-select {
    display: none;
}

/* Map Layout */
.map-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.map-container {
    padding: 24px;
    border-radius: var(--radius-lg);
    min-height: 500px;
}

.map-area {
    width: 100%;
    height: 450px;
}

.map-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.metro-details-panel {
    padding: 24px;
    border-radius: var(--radius-lg);
}

.metro-details-panel h4 {
    margin-bottom: 12px;
}

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

/* Occupation Table */
.occupation-table-container {
    padding: 24px;
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

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

.occupation-table th,
.occupation-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.occupation-table th {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.occupation-table td {
    font-size: 0.9rem;
}

.occupation-table tbody tr {
    transition: background 0.2s ease;
}

.occupation-table tbody tr:hover {
    background: var(--glass-hover);
}

.gap-positive {
    color: var(--danger);
}

.gap-negative {
    color: var(--success);
}

.exposure-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bar-track {
    width: 60px;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

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

.bar-fill.high {
    background: var(--danger);
}

.bar-fill.medium {
    background: var(--warning);
}

.bar-fill.low {
    background: var(--success);
}

/* Scenario Builder */
.scenario-builder {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
}

.scenario-builder-full {
    grid-template-columns: 1fr 1fr 1.2fr;
    max-width: 1400px;
    margin: 0 auto;
}

.scenario-presets,
.scenario-results,
.custom-adjustments {
    padding: 24px;
    border-radius: var(--radius-lg);
}

.scenario-presets h4,
.scenario-results h4,
.custom-adjustments h4 {
    margin-bottom: 20px;
}

.preset-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preset-card {
    padding: 16px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-card:hover {
    border-color: var(--glass-border);
}

.preset-card.active {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.preset-card h5 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.preset-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.results-summary {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.result-metric {
    flex: 1;
    text-align: center;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.result-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.result-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.adjustment-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.slider-group {
    margin-bottom: 20px;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.slider-value {
    font-family: var(--font-mono);
    color: var(--accent-primary);
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.about-card {
    padding: 28px;
    border-radius: var(--radius-lg);
}

.about-card h4 {
    margin-bottom: 16px;
    color: var(--accent-primary);
}

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

.about-list li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
}

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

.about-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.citation {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

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

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

/* Footer */
.footer {
    padding: 40px;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-note {
    margin-top: 8px;
    font-size: 0.8rem !important;
}

/* Quotes Ticker */
.quotes-ticker-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 0;
    overflow: hidden;
}

.quotes-ticker-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.quotes-ticker {
    display: flex;
    animation: ticker 180s linear infinite;
    width: max-content;
}

.quotes-ticker:hover {
    animation-play-state: paused;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.quote-card {
    flex-shrink: 0;
    width: 500px;
    padding: 32px;
    margin: 24px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.quote-card:hover {
    background: var(--glass-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.quote-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: italic;
}

.quote-text::before {
    content: '"';
    font-size: 2rem;
    color: var(--accent-primary);
    opacity: 0.5;
    line-height: 0;
    vertical-align: -0.4em;
    margin-right: 4px;
}

.quote-attribution {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quote-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.quote-info {
    flex: 1;
}

.quote-role {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.quote-company {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.quote-meta {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.quote-location {
    color: var(--accent-primary);
}

/* US Map Styles */
.map-container {
    position: relative;
}

.map-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
}

.map-control-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.map-control-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.map-control-btn.view-btn.active {
    background: var(--accent-primary);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.map-controls-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.map-controls-divider {
    width: 100%;
    height: 1px;
    background: var(--glass-border);
    margin: 4px 0;
}

.map-hint {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.view-selector {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
}

.view-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.view-btn:hover {
    color: var(--text-primary);
}

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

/* State and MSA paths */
.state-path {
    cursor: pointer;
    transition: all 0.15s ease;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 0.5;
}

.state-path:hover {
    stroke: var(--text-primary);
    stroke-width: 1.5;
    filter: brightness(1.2);
}

.state-path.selected {
    stroke: var(--accent-primary);
    stroke-width: 2;
}

.county-path {
    transition: all 0.15s ease;
}

.county-path.msa-county:hover {
    stroke: var(--text-primary);
    stroke-width: 1.5;
    filter: brightness(1.3);
}

.msa-bubble {
    cursor: pointer;
    transition: all 0.2s ease;
}

.msa-bubble:hover {
    stroke: var(--text-primary);
    stroke-width: 2;
}

.state-label, .msa-label {
    pointer-events: none;
    font-size: 10px;
    fill: var(--text-secondary);
    text-anchor: middle;
}

.map-tooltip {
    position: absolute;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 100;
    max-width: 300px;
    box-shadow: var(--shadow-soft);
}

.map-tooltip h5 {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.map-tooltip p {
    margin: 4px 0;
    color: var(--text-secondary);
}

.map-tooltip .gap-value {
    font-family: var(--font-mono);
    font-weight: 600;
}

.legend-gradient {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.legend-bar {
    width: 200px;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(to right, #22c55e, #f59e0b, #ef4444);
}

.legend-labels {
    display: flex;
    justify-content: space-between;
    width: 200px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Metro details styling */
.metro-occ-list {
    max-height: 400px;
    overflow-y: auto;
}

.metro-occ-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
}

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

.metro-occ-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex: 1;
}

.metro-occ-gap {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ============================================
   Occupation Explorer with Map
   ============================================ */

.explorer-layout {
    display: flex;
    gap: 0;
    min-height: 650px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.occupation-sidebar {
    width: 380px;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 650px;
}

.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-header h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-search {
    position: relative;
}

.sidebar-search input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.sidebar-search input::placeholder {
    color: var(--text-muted);
}

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

.sidebar-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.category-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    max-height: 400px;
    min-height: 200px;
}

.category-item {
    border-bottom: 1px solid var(--glass-border);
}

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

.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.category-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.category-header.selected {
    background: rgba(99, 102, 241, 0.1);
}

.category-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
}

.category-chevron:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.category-item.expanded .category-chevron {
    transform: rotate(90deg);
}

.category-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.category-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

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

.category-gap {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

.occupation-list {
    display: none;
    background: rgba(0, 0, 0, 0.15);
}

.category-item.expanded .occupation-list {
    display: block;
}

.occupation-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px 10px 46px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.occupation-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.occupation-row.selected {
    background: rgba(99, 102, 241, 0.15);
}

.occupation-color {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
    opacity: 0.7;
}

.occupation-name {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.occupation-row.selected .occupation-name {
    color: var(--text-primary);
}

.occupation-gap {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 500;
}

/* Selected occupation details panel */
.selected-details {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
}

.selected-details-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.selected-details-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.selected-details-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.selected-details-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.selected-details-close:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.selected-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.details-stat {
    background: var(--bg-tertiary);
    padding: 12px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.details-stat-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.details-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Map area in explorer */
.explorer-map-area {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

.explorer-map-container {
    flex: 1;
    position: relative;
}

.explorer-map-container #us-map {
    height: 100%;
}

.explorer-selection-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text-primary);
    z-index: 10;
}

.explorer-selection-badge .badge-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.explorer-selection-badge button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    display: flex;
    align-items: center;
}

.explorer-selection-badge button:hover {
    color: var(--text-primary);
}

/* View all button */
.view-all-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.view-all-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.view-all-btn.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
}

.view-all-btn .view-all-icon {
    width: 16px;
    height: 16px;
}

/* Nav beta badge */
.nav-link-beta {
    position: relative;
}

.nav-link-beta::after {
    content: 'BETA';
    position: absolute;
    top: 0;
    right: -8px;
    transform: translateY(-30%);
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 5px;
    background: linear-gradient(135deg, var(--warning), #f97316);
    color: #000;
    border-radius: 100px;
    letter-spacing: 0.05em;
}

/* Responsive for explorer */
@media (max-width: 1024px) {
    .explorer-layout {
        flex-direction: column;
        min-height: auto;
    }

    .occupation-sidebar {
        width: 100%;
        max-height: 400px;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }

    .explorer-map-area {
        min-height: 450px;
    }
}

/* Partners & Funding Section */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.partners-grid-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.partner-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.partner-card {
    padding: 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.partner-logo {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.partner-logo img {
    max-height: 70px;
    max-width: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.partner-card:hover .partner-logo img {
    opacity: 1;
}

.institute2100-logo img,
.brown-logo img {
    filter: none;
    opacity: 1;
}

.partner-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.partner-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
}

.partner-link {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 100px;
    transition: all 0.2s ease;
}

.partner-link:hover {
    background: var(--accent-primary);
    color: white;
}

.funding-section {
    display: flex;
    justify-content: center;
}

.funding-card {
    padding: 40px 60px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 600px;
}

.funding-header {
    margin-bottom: 24px;
}

.funding-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.funding-logo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.funding-logo img {
    max-height: 50px;
    max-width: 200px;
    object-fit: contain;
}

.funding-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Methods Page Styles */
.methods-hero {
    padding: 120px 40px 60px;
    text-align: center;
}

.methods-hero h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.methods-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.methods-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.methods-nav {
    padding: 24px;
    border-radius: var(--radius-lg);
}

.methods-nav h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.methods-nav ul {
    list-style: none;
}

.methods-nav li {
    margin-bottom: 8px;
}

.methods-nav a {
    display: block;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.methods-nav a:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.methods-main {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.methods-article {
    padding: 32px;
    border-radius: var(--radius-lg);
}

.methods-article h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--accent-primary);
}

.methods-article h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-primary);
}

.methods-article p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.methods-article ul {
    list-style: none;
    padding-left: 0;
}

.methods-article ul li {
    padding: 8px 0 8px 24px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.methods-article ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.methods-article blockquote {
    padding: 20px 24px;
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--accent-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 20px 0;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.7;
}

.formula {
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    text-align: center;
    color: var(--accent-primary);
    margin: 20px 0;
}

.scenario-table {
    overflow-x: auto;
    margin: 20px 0;
}

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

.scenario-table th,
.scenario-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.scenario-table th {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.scenario-table td {
    color: var(--text-secondary);
}

/* Download Cards */
.download-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.download-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.download-card:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.download-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
    flex-shrink: 0;
}

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

.download-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--text-primary);
}

.download-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.download-meta {
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-family: var(--font-mono);
}

.download-btn {
    padding: 10px 20px;
    background: var(--accent-primary);
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.download-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
}

.citation-box {
    padding: 20px 24px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--accent-primary);
    margin-bottom: 20px;
}

.citation-box p {
    margin: 0;
    color: var(--text-primary);
    font-style: italic;
}

.contact-info {
    font-size: 0.9rem;
}

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

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

@media (max-width: 900px) {
    .methods-content {
        grid-template-columns: 1fr;
    }

    .methods-sidebar {
        position: static;
    }

    .download-cards {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .partners-grid {
        grid-template-columns: 1fr;
    }
    .map-layout,
    .scenario-builder {
        grid-template-columns: 1fr;
    }

    .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 12px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 20px;
    }

    .section {
        padding: 60px 20px;
    }

    .section-dark {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-stats {
        flex-direction: column;
        align-items: center;
    }

    .stat-card {
        width: 100%;
        max-width: 300px;
    }

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

    .scenario-selector,
    .metric-selector {
        flex-wrap: wrap;
        justify-content: center;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }
}
