* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Regrid Brand Colors */
    --regrid-teal: #00665E;
    --regrid-teal-light: #9FCFCA;
    --regrid-teal-dark: #004d47;
    --regrid-lime: #D9FF0A;
    --regrid-blue: #3D7CCA;
    --regrid-yellow: #EAEA6C;

    /* UI Colors */
    --bg-dark: #0d1117;
    --bg-sidebar: #161b22;
    --bg-card: #1c2128;
    --bg-hover: #262c36;
    --border-color: #2d333b;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;

    /* Coverage Colors - teal ramp from dark to light */
    --coverage-excellent: #00665E;
    --coverage-good: #2D8A82;
    --coverage-fair: #5AADA6;
    --coverage-low: #8CCFC9;
}

body {
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

.mono, code {
    font-family: 'Roboto Mono', monospace;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 360px;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    z-index: 1000;
}

/* Header */
.header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.header-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo-img {
    height: 28px;
    width: auto;
}

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

.header-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Stats Row */
.stats-row {
    display: flex;
    gap: 0.75rem;
}

.stat {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0.5rem;
    background: var(--bg-dark);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--regrid-teal-light);
}

.stat-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* View Toggle */
.view-toggle {
    display: flex;
    margin: 1rem 1.25rem 0.75rem;
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 4px;
    border: 1px solid var(--border-color);
}

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

.toggle-btn.active {
    background: var(--regrid-teal);
    color: white;
}

.toggle-btn:hover:not(.active) {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* Sidebar Content */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
}

.sidebar-view {
    display: none;
}

.sidebar-view.active {
    display: block;
}

.section-label {
    padding: 0.875rem 1.25rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.75px;
}

/* Vertical List */
.vertical-list {
    padding: 0 0.75rem 1rem;
}

.vertical-item {
    padding: 1rem;
    margin-bottom: 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    background: var(--bg-card);
}

.vertical-item:hover {
    border-color: var(--border-color);
    background: var(--bg-hover);
}

.vertical-item.active {
    border-color: var(--regrid-teal);
    background: rgba(0, 102, 94, 0.15);
}

.vertical-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.vertical-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-dark);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.vertical-item.active .vertical-icon {
    background: var(--regrid-teal);
}

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

.vertical-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.vertical-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vertical-coverage {
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    background: var(--bg-dark);
    flex-shrink: 0;
}

/* Field Categories */
.field-category {
    border-bottom: 1px solid var(--border-color);
}

.category-header {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: background 0.2s;
}

.category-header:hover {
    background: var(--bg-hover);
}

.category-icon {
    width: 28px;
    font-size: 1rem;
}

.category-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
}

.category-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-dark);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

.category-chevron {
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.field-category.expanded .category-chevron {
    transform: rotate(180deg);
}

.category-fields {
    display: none;
    padding: 0 1.25rem 1rem 2.75rem;
}

.field-category.expanded .category-fields {
    display: block;
}

.field-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.65rem 0;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

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

.field-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-top: 1px;
    flex-shrink: 0;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.field-item:hover .field-checkbox {
    border-color: var(--regrid-teal);
}

.field-item.selected .field-checkbox {
    background: var(--regrid-teal);
    border-color: var(--regrid-teal);
}

.field-item.selected .field-checkbox::after {
    content: '✓';
    font-size: 0.7rem;
    color: white;
}

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

.field-name {
    font-size: 0.8rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.field-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.35;
}

.premium-badge {
    color: #d4a853;
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 0.5rem;
    cursor: help;
}

.premium-footnote {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.premium-footnote .premium-badge {
    margin-left: 0;
    cursor: default;
}

.geometry-highlight {
    background: rgba(0, 102, 94, 0.15);
    border: 1px solid var(--regrid-teal);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 0 0.75rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.geometry-badge {
    background: var(--regrid-teal);
    color: white;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.field-coverage {
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Selected Bar */
.selected-bar {
    padding: 0.75rem 1.25rem;
    background: rgba(0, 102, 94, 0.15);
    border-top: 1px solid var(--regrid-teal);
    display: none;
    align-items: center;
    justify-content: space-between;
}

.selected-bar.visible {
    display: flex;
}

.selected-info {
    font-size: 0.85rem;
    color: var(--regrid-teal-light);
    font-weight: 500;
}

.clear-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.clear-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* CTA Section */
.cta-section {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-sidebar);
}

.cta-btn {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--regrid-teal);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
}

.cta-btn:hover {
    background: var(--regrid-teal-dark);
}

.cta-btn.secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
}

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

.cta-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.6rem;
}

.cta-hint a {
    color: var(--regrid-teal-light);
    text-decoration: none;
}

.cta-hint a:hover {
    text-decoration: underline;
}

/* Spatial Add-Ons Section (Collapsible) */
.addons-section {
    border-top: 1px solid var(--border-color);
}

.addons-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: background 0.2s;
}

.addons-header:hover {
    background: var(--bg-hover);
}

.addons-chevron {
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.addons-section.expanded .addons-chevron {
    transform: rotate(180deg);
}

.addons-content {
    display: none;
    padding: 0 1.25rem 1rem;
}

.addons-section.expanded .addons-content {
    display: block;
}

.addons-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.addons-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.addon-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    background: var(--bg-card);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    transition: all 0.2s;
}

.addon-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.addon-icon {
    font-size: 0.9rem;
}

.addon-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Map Container */
.map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

/* Welcome Modal Overlay */
.welcome-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s;
}

.welcome-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 17, 23, 0.9);
    z-index: 150;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    transition: opacity 0.4s;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--regrid-teal-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.loading-error {
    color: #f85149;
    font-size: 0.85rem;
    text-align: center;
    max-width: 320px;
    line-height: 1.5;
}

.welcome-modal {
    background: var(--bg-sidebar);
    border: 1px solid var(--regrid-teal);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 520px;
    text-align: center;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.welcome-headline {
    font-size: 2rem;
    font-weight: 700;
    color: var(--regrid-lime);
    margin-bottom: 0.75rem;
}

.welcome-subhead {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.welcome-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.welcome-cta {
    background: var(--regrid-teal);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.welcome-cta:hover {
    background: var(--regrid-teal-dark);
    transform: translateY(-1px);
}

.welcome-cta:active {
    transform: translateY(0);
}

/* Legend */
.map-legend {
    position: absolute;
    bottom: 2rem;
    left: 1rem;
    background: rgba(22, 27, 34, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    z-index: 100;
}

.legend-title {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

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

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

.legend-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.75rem 0;
}

.view-level-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-dark);
    padding: 3px;
    border-radius: 6px;
}

.level-btn {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.level-btn.active {
    background: var(--regrid-teal);
    color: white;
}

.level-btn:hover:not(.active) {
    background: var(--bg-hover);
}

/* County Panel */
.county-panel {
    position: absolute;
    bottom: 2rem;
    right: 1rem;
    width: 340px;
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    z-index: 100;
    transform: translateY(calc(100% + 2rem));
    opacity: 0;
    transition: all 0.3s ease;
}

.county-panel.visible {
    transform: translateY(0);
    opacity: 1;
}

.county-panel-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.county-name {
    font-size: 1.15rem;
    font-weight: 600;
}

.county-location {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

.county-close {
    background: var(--bg-hover);
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.county-close:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.county-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

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

.county-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
}

.county-stat-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.county-fields {
    padding: 1rem 1.25rem;
    max-height: 180px;
    overflow-y: auto;
}

.county-field-row {
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 0;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

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

.county-field-name {
    color: var(--text-secondary);
}

.county-field-value {
    font-weight: 600;
}

.county-cta {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.county-cta-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: var(--regrid-teal);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.county-cta-btn:hover {
    background: var(--regrid-teal-dark);
}

.county-cta-btn.secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    margin-bottom: 0;
}

.county-cta-btn.secondary:hover {
    background: var(--bg-hover);
}

/* Vertical Panel */
.vertical-panel {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 380px;
    max-height: calc(100vh - 2rem);
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    z-index: 100;
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.vertical-panel.visible {
    transform: translateX(0);
    opacity: 1;
}

.vertical-panel-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.vertical-panel-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-right: 2.5rem;
}

.vertical-panel-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Schema Toggle in Vertical Panel */
.schema-toggle-container {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.schema-toggle {
    display: flex;
    background: var(--bg-dark);
    border-radius: 6px;
    padding: 3px;
    border: 1px solid var(--border-color);
    margin-bottom: 0.75rem;
}

.schema-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.schema-btn.active {
    background: var(--regrid-teal);
    color: white;
}

.schema-btn:hover:not(.active) {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.schema-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Dimmed state for Premium attributes when Standard is selected */
.vertical-field-item.premium-disabled {
    opacity: 0.4;
}

.vertical-field-item.premium-disabled .premium-badge {
    opacity: 0.6;
}

.vertical-panel-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg-hover);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
}

.vertical-panel-close:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.vertical-panel-stats {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-dark);
}

.vertical-panel-stat {
    flex: 1;
    text-align: center;
}

.vertical-panel-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--regrid-teal-light);
}

.vertical-panel-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.vertical-panel-fields {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.vertical-field-item {
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.vertical-field-item.limited {
    opacity: 0.6;
}

.vertical-field-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.vertical-field-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.vertical-field-why {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.limited-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
}

.vertical-panel-cta {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.vertical-cta-btn {
    display: block;
    width: 100%;
    padding: 0.875rem;
    background: var(--regrid-teal);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.vertical-cta-btn:hover {
    background: var(--regrid-teal-dark);
}

.vertical-cta-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.6rem;
}

/* Tooltip */
.map-tooltip {
    position: fixed;
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.875rem 1.1rem;
    z-index: 200;
    pointer-events: none;
    display: none;
    max-width: 260px;
}

.tooltip-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.tooltip-location {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.tooltip-stat {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.tooltip-value {
    font-size: 1.6rem;
    font-weight: 700;
}

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

/* Loading pulse for stats */
.loading-pulse {
    animation: pulse-fade 1.2s ease-in-out infinite;
    color: var(--text-muted) !important;
}

@keyframes pulse-fade {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.loading-stats-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.5rem 0 0.75rem;
    text-align: center;
    animation: pulse-fade 1.2s ease-in-out infinite;
}

/* Coverage colors */
.coverage-excellent { color: var(--coverage-excellent); }
.coverage-good { color: var(--coverage-good); }
.coverage-fair { color: var(--coverage-fair); }
.coverage-low { color: var(--coverage-low); }

/* MapLibre overrides */
.maplibregl-ctrl-attrib {
    background: rgba(22, 27, 34, 0.8) !important;
    color: var(--text-muted) !important;
    font-size: 10px !important;
}
.maplibregl-ctrl-attrib a {
    color: var(--text-secondary) !important;
}
.maplibregl-ctrl-group {
    background: var(--bg-sidebar) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    overflow: hidden;
}
.maplibregl-ctrl-group button {
    background: var(--bg-sidebar) !important;
    border-color: var(--border-color) !important;
}
.maplibregl-ctrl-group button:hover {
    background: var(--bg-hover) !important;
}
.maplibregl-ctrl-group button span {
    filter: invert(1);
}

/* Back button — hidden on desktop */
.vertical-panel-back {
    display: none;
}

/* =====================================================
   MOBILE
   ===================================================== */
@media (max-width: 768px) {
    /* Sidebar becomes full-screen */
    .sidebar {
        width: 100%;
    }

    /* Hide map and all map overlays */
    .map-container {
        position: fixed;
        width: 0;
        height: 0;
        overflow: hidden;
    }

    #map,
    .loading-overlay,
    .welcome-overlay,
    .map-legend,
    .map-tooltip,
    .county-panel {
        display: none !important;
    }

    /* Hide add-ons section */
    .addons-section {
        display: none;
    }

    /* Compact header & stats */
    .header {
        padding: 0.75rem 1rem;
        border-bottom: none;
    }

    .header-top {
        margin-bottom: 0.5rem;
    }

    .stats-row {
        gap: 0.5rem;
    }

    .stat {
        padding: 0.4rem 0.3rem;
    }

    .stat-value {
        font-size: 0.95rem;
    }

    /* Compact view toggle */
    .view-toggle {
        margin: 0.5rem 1rem;
    }

    /* Compact CTAs */
    .cta-section {
        padding: 0.75rem 1rem;
    }

    .cta-btn {
        padding: 0.65rem 0.75rem;
        font-size: 0.85rem;
    }

    .cta-btn.secondary {
        background: none;
        border: none;
        color: var(--text-secondary);
        font-size: 0.75rem;
        padding: 0.25rem;
        margin-top: 0.25rem;
        text-decoration: underline;
    }

    .cta-btn.secondary:hover {
        background: none;
        color: var(--text-primary);
    }

    /* Vertical panel: full-screen slide-in */
    .vertical-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        border: none;
        background: var(--bg-sidebar);
        z-index: 2000;
        transform: translateX(100%);
        opacity: 1;
    }

    .vertical-panel.visible {
        transform: translateX(0);
    }

    /* Show back button, hide × button */
    .vertical-panel-back {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        background: none;
        border: none;
        color: var(--text-secondary);
        font-size: 0.85rem;
        font-weight: 500;
        cursor: pointer;
        padding: 1rem 1.25rem 0;
    }

    .vertical-panel-back:hover {
        color: var(--text-primary);
    }

    .vertical-panel-close {
        display: none;
    }
}
