* { margin: 0; padding: 0; box-sizing: border-box; }
:focus-visible { outline: 2px solid #0d6efd; outline-offset: 2px; }

/* Site navigation */
#site-nav {
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  background: #212529;
}
.nav-link {
  color: #adb5bd;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}
.nav-link:hover { color: #fff; background: #343a40; }
.nav-link.active { color: #fff; background: #0d6efd; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
}

#app {
  display: flex;
  height: calc(100vh - 42px);
}

#search-panel {
  width: 360px;
  min-width: 360px;
  padding: 24px;
  background: #f8f9fa;
  border-right: 1px solid #dee2e6;
  overflow-y: auto;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#map {
  flex: 1;
  min-height: 400px;
}

h1 { font-size: 1.5rem; margin-bottom: 2px; }
.subtitle { color: #666; margin-bottom: 20px; font-size: 0.9rem; }

/* Search form */
#search-form { margin-bottom: 16px; }
#search-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.85rem; }
.input-group { display: flex; gap: 8px; }
#address-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.9rem;
}
#search-btn {
  padding: 8px 16px;
  background: #0d6efd;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
#search-btn:hover { background: #0b5ed7; }

/* Radius slider */
.radius-control { margin-bottom: 20px; }
.radius-control label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.85rem; }
#radius-slider { width: 100%; }

/* Share button */
.share-btn {
  display: block;
  width: 100%;
  padding: 8px 16px;
  margin-bottom: 16px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}
.share-btn:hover { background: #5a6268; }
.share-btn:disabled { opacity: 0.7; cursor: wait; }

/* Legend */
.legend { margin-bottom: 20px; }
.legend h2 { font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; margin-bottom: 4px; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* Summary */
.summary { background: white; border-radius: 8px; padding: 16px; border: 1px solid #dee2e6; }
.summary h2 { font-size: 1rem; margin-bottom: 12px; }

/* Results table */
#results-panel { padding: 16px 24px; border-top: 1px solid #dee2e6; max-height: 300px; overflow-y: auto; }
#results-panel h2 { font-size: 1rem; margin-bottom: 12px; }
.table-wrapper { overflow-x: auto; }
#results-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
#results-table th {
  text-align: left;
  padding: 8px;
  border-bottom: 2px solid #dee2e6;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
#results-table th:hover { background: #e9ecef; }
#results-table td { padding: 8px; border-bottom: 1px solid #f0f0f0; }
#results-table tbody tr { cursor: pointer; }
#results-table tbody tr:hover { background: #f8f9fa; }
#results-table tbody tr.row-selected { background: #fff3cd; }
.recenter-link { color: #0d6efd; text-decoration: none; white-space: nowrap; font-size: 0.8rem; }
.recenter-link:hover { text-decoration: underline; }

.hidden { display: none; }

/* Status badges */
.status-open { color: #dc3545; font-weight: 600; }
.status-resolved { color: #198754; font-weight: 600; }

/* Responsive */
@media (max-width: 768px) {
  #app { flex-direction: column; height: auto; }
  #search-panel { width: 100%; min-width: unset; border-right: none; border-bottom: 1px solid #dee2e6; }
  #map { min-height: 50vh; }
}

.error-message { color: #dc3545; font-style: italic; }

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.stat { text-align: center; }
.stat-value { display: block; font-size: 1.5rem; font-weight: 700; }
.stat-label { display: block; font-size: 0.75rem; color: #666; text-transform: uppercase; }
.date-range { font-size: 0.8rem; color: #555; line-height: 1.5; }

#results-table th.sort-asc::after { content: ' ▲'; font-size: 0.7rem; }
#results-table th.sort-desc::after { content: ' ▼'; font-size: 0.7rem; }

/* Hall of Fame page */
#hof-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px;
}
.hof-header { margin-bottom: 32px; }
.hof-header h1 { font-size: 1.8rem; margin-bottom: 4px; }
.hof-section { margin-bottom: 40px; }
.hof-section h2 { font-size: 1.2rem; margin-bottom: 4px; }
.section-desc { color: #666; font-size: 0.85rem; margin-bottom: 16px; }
.hof-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.hof-table th {
  text-align: left;
  padding: 8px;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
}
.hof-table td { padding: 8px; border-bottom: 1px solid #f0f0f0; }
.hof-table tr:hover { background: #f8f9fa; }
.days-cell { font-weight: 700; }
.loading { color: #666; font-style: italic; padding: 16px 0; }
.address-link { color: #0d6efd; text-decoration: none; }
.address-link:hover { text-decoration: underline; }
