.leaflet-overlay-pane svg path {
  shape-rendering: crispEdges;
}

/* UH Branding */
:root {
  --uh-red: #C8102E;
  --uh-red-dark: #960C22;
  --uh-white: #FFFFFF;
  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --text-light: #888;
  --bg-alt: #f5f5f5;
  --border: #e0e0e0;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans Pro', sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 70px;
  background: var(--uh-red);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-logo {
  height: 44px;
  width: auto;
}

.navbar-title {
  font-family: 'League Gothic', sans-serif;
  font-size: 2.2rem;
  color: var(--uh-white);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--uh-white);
}

.nav-btn {
  background: var(--uh-white);
  color: var(--uh-red);
  border: none;
  padding: 0.55rem 1.5rem;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.nav-btn:hover {
  background: #f0f0f0;
}

.nav-btn:active {
  transform: scale(0.97);
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: url('../assets/hero.jpg') center/cover no-repeat, linear-gradient(135deg, #1a1a1a 0%, #2d1015 50%, #1a1a1a 100%);
  text-align: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}

.hero-title {
  font-family: 'League Gothic', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--uh-white);
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--uh-red);
  color: var(--uh-white);
  border: 2px solid var(--uh-red);
  padding: 0.85rem 2rem;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
  background: var(--uh-red-dark);
  border-color: var(--uh-red-dark);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-primary .arrow {
  font-size: 1.2rem;
  transition: transform 0.2s;
}

.btn-primary:hover .arrow {
  transform: translateX(3px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 2rem;
  background: transparent;
  color: var(--uh-white);
  border: 2px solid rgba(255, 255, 255, 0.5);
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.btn-outline:hover {
  border-color: var(--uh-white);
  background: rgba(255, 255, 255, 0.1);
}

/* Sections */
.section {
  padding: 5rem 2rem;
}

.section-alt {
  background: var(--bg-alt);
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-family: 'League Gothic', sans-serif;
  font-size: 2.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--uh-red);
  margin-bottom: 2rem;
  text-align: center;
}

/* Purpose grid */
.purpose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.purpose-item h3 {
  font-family: 'League Gothic', sans-serif;
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--uh-red);
  margin-bottom: 0.5rem;
}

.purpose-item p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.data-source {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

/* Footer links */
.footer-links {
  margin-top: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--uh-white);
}

.footer-links .divider {
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0.5rem;
}

/* Citation */
.citation-section {
  text-align: center;
}

.citation {
  background: var(--bg-alt);
  border-left: 4px solid var(--uh-red);
  padding: 1.5rem 2rem;
  margin: 0 auto 1.5rem;
  max-width: 750px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: left;
}

.citation em {
  font-style: italic;
}

.citation-note {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* Footer */
.footer {
  background: #1a1a1a;
  padding: 3rem 2rem;
  text-align: center;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-logo {
  height: 36px;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.footer p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer-small {
  font-size: 0.8rem !important;
  color: rgba(255, 255, 255, 0.4) !important;
}

/* Dashboard shell */
.dashboard-main {
  margin-top: 70px;
  min-height: calc(100vh - 70px);
  background: var(--uh-white);
}

.nav-tab {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'League Gothic', sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-tab:hover {
  color: var(--uh-white);
}

.nav-tab.active {
  color: var(--uh-white);
  border-bottom-color: var(--uh-white);
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

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

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--uh-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Map layout */
.map-layout {
  display: flex;
  height: calc(100vh - 70px);
  position: relative;
  z-index: 1;
}

.sidebar {
  width: 300px;
  min-width: 300px;
  padding: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  transition: width 0.3s ease, min-width 0.3s ease, padding 0.3s ease;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

.sidebar.collapsed {
  width: 0;
  min-width: 0;
  overflow: hidden;
  border-right: none;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--uh-red);
}

.sidebar-title {
  font-family: 'League Gothic', sans-serif;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--uh-white);
}

.sidebar-collapse {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s, transform 0.3s;
}

.sidebar-collapse:hover {
  color: var(--uh-white);
}

.sidebar.collapsed .sidebar-collapse {
  transform: rotate(180deg);
}

.sidebar-expand {
  position: absolute;
  top: 200px;
  left: 8px;
  z-index: 800;
  background: var(--uh-red);
  color: var(--uh-white);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.sidebar-expand:hover {
  background: var(--uh-red-dark);
}

.sidebar-expand.visible {
  display: flex;
}

.sidebar-group {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-group:last-child {
  border-bottom: none;
}

.sidebar-group-title {
  font-family: 'League Gothic', sans-serif;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.sidebar-section {
  margin-bottom: 1rem;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-section label {
  display: block;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.sidebar-section select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1.05rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--uh-white);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.sidebar-section select:focus {
  outline: none;
  border-color: var(--uh-red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

/* Search */
.search-wrapper {
  position: relative;
}

#tract-search {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1.05rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--uh-white);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#tract-search:focus {
  outline: none;
  border-color: var(--uh-red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

#tract-search::placeholder {
  color: var(--text-light);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--uh-white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 0.55rem 0.85rem;
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}

.search-result-item:hover {
  background: #f5f5f5;
}

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

.map-area {
  flex: 1;
  position: relative;
}

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

/* Leaflet legend */
.legend {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 14px 18px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 13px;
  max-width: 240px;
}

.legend h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.legend-scale {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 18px;
  height: 14px;
  display: inline-block;
  border-radius: 2px;
}

/* Bivariate legend */
.biv-legend {
  display: flex;
  align-items: stretch;
}

.biv-var1-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  text-align: center;
}

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

.biv-grid {
  display: grid;
  grid-template-columns: 40px 40px 40px;
  grid-template-rows: 40px 40px 40px;
}

.biv-var2-label {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  padding-top: 6px;
}

/* Info panel */
.info-panel {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 14px;
  max-width: 320px;
  border-top: 3px solid var(--uh-red);
}

.info-panel h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.info-panel p {
  margin: 4px 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.info-panel p.info-overlay {
  font-size: 12px;
  color: var(--text-light);
  margin: 2px 0;
}

/* Overlay controls */
#overlay-controls {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.overlay-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: background 0.15s;
}

.overlay-toggle:hover {
  background: #f5f5f5;
}

.overlay-toggle input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.overlay-toggle input[type="checkbox"]:checked {
  background: var(--uh-red);
  border-color: var(--uh-red);
}

.overlay-toggle input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.overlay-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Reset Map Button */
.reset-map-btn {
  width: 34px;
  height: 34px;
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  font-size: 20px;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
  color: #333;
  transition: background 0.2s;
}

.reset-map-btn:hover {
  background: #f4f4f4;
}

/* Charts */
.charts-row {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 1.5rem 1.5rem calc(300px + 1.5rem);
  background: #fafafa;
  border-top: 1px solid var(--border);
}

.chart-wrapper {
  flex: 1;
  height: 320px;
  background: var(--uh-white);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
  position: relative;
}

.chart-title {
  font-family: 'League Gothic', sans-serif;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.chart-missing-msg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1rem;
  color: var(--text-light);
  text-align: center;
  padding: 1rem;
}



/* Responsive — Tablet */
@media (max-width: 1024px) {
  .charts-row {
    padding-left: 1.5rem;
  }

  .methods-layout {
    flex-direction: column;
  }

  .methods-citation {
    flex: none;
  }

  .methods-pdf iframe {
    height: 600px;
  }

  .help-pdf {
    height: 600px;
  }
}

/* Responsive — Mobile */
@media (max-width: 768px) {
  .navbar {
    padding: 0 0.75rem;
    height: 56px;
  }

  .navbar-title {
    font-size: 1.5rem;
  }

  .navbar-logo {
    height: 32px;
  }

  .navbar-right {
    gap: 0.5rem;
  }

  .nav-tab {
    font-size: 1.1rem;
    padding: 0.4rem 0.6rem;
  }

  .nav-link {
    display: none;
  }

  .hero-content {
    padding: 1.5rem;
  }

  .section {
    padding: 3rem 1.5rem;
  }

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

  .dashboard-main {
    margin-top: 56px;
  }

  .map-layout {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    width: 100%;
    min-width: 100%;
    max-height: 40vh;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar.collapsed {
    max-height: 0;
  }

  .map-area {
    height: 50vh;
  }

  .sidebar-expand {
    top: 200px;
  }

  .charts-row {
    flex-direction: column;
    padding: 1rem;
  }

  .chart-wrapper {
    height: 260px;
  }

  .download-bar {
    flex-direction: column;
  }

  .tab-body {
    padding: 1rem;
  }

  .methods-pdf iframe,
  .help-pdf {
    height: 400px;
  }

  .modal-box {
    margin: 1rem;
    padding: 1.5rem;
  }

  .legend {
    max-width: 180px;
    padding: 10px 12px;
    font-size: 11px;
  }

  .info-panel {
    max-width: 220px;
    padding: 10px 14px;
    font-size: 12px;
  }
}

/* Welcome Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background: var(--uh-white);
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-box h2 {
  font-family: 'League Gothic', sans-serif;
  font-size: 1.8rem;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.modal-box p {
  font-family: 'Source Sans Pro', sans-serif;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.modal-box .btn-primary {
  width: 100%;
}

/* Tab Body */
.tab-body {
  padding: 1.5rem 2rem;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

/* Download Bar */
.download-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.btn-download {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.7rem 1.5rem;
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--text-primary);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-download:hover {
  background: var(--text-primary);
  color: var(--uh-white);
}

.download-panel {
  background: #f8f8f8;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.download-panel.hidden { display: none; }

.download-panel h4 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.download-year-label {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: #555;
}

.dl-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.4rem 1rem;
  margin-bottom: 1rem;
}

.dl-categories label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.download-panel-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-secondary {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.95rem;
  padding: 0.5rem 1.2rem;
  background: transparent;
  border: 1px solid #999;
  border-radius: 6px;
  cursor: pointer;
}

/* Data Table */
#data-table-container {
  overflow-x: auto;
}

.table-controls {
  margin-bottom: 1rem;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
}

.table-controls select {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: 0 0.25rem;
}

.data-table td.row-num {
  color: var(--text-light);
  font-weight: 600;
  text-align: center;
  width: 40px;
  padding-right: 0.5rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1rem;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table th {
  background: #333;
  color: var(--uh-white);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th:last-child {
  border-right: none;
}

.data-table th:hover {
  background: #444;
}

.data-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
}

.data-table td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-table tbody tr:hover {
  background: #fef2f2;
}

.data-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.data-table tbody tr:nth-child(even):hover {
  background: #fef2f2;
}

/* Table Pagination */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.page-buttons {
  display: flex;
  gap: 0.35rem;
}

.page-btn {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.95rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--uh-white);
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.15s;
}

.page-btn:hover:not(:disabled) {
  background: #f0f0f0;
}

.page-btn.active {
  background: var(--uh-red);
  color: var(--uh-white);
  border-color: var(--uh-red);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Methods Tab */
.methods-layout {
  display: flex;
  gap: 2rem;
}

.methods-citation {
  flex: 0 0 35%;
}

.methods-citation h3 {
  font-family: 'League Gothic', sans-serif;
  font-size: 1.8rem;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.methods-citation p {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.methods-credit {
  margin-top: 1.25rem;
  color: var(--text-secondary) !important;
}

.methods-credit a {
  color: var(--uh-red);
  text-decoration: none;
}

.methods-credit a:hover {
  text-decoration: underline;
}

.methods-pdf {
  flex: 1;
}

.methods-pdf iframe {
  width: 100%;
  height: calc(100vh - 120px);
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* Help Tab */
.help-pdf {
  width: 100%;
  height: calc(100vh - 120px);
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* Screenshot preview modal */
.screenshot-modal-box {
  max-width: min(1100px, 92vw);
  padding: 1.5rem 1.75rem 1.75rem;
}

.screenshot-modal-box img {
  display: block;
  width: 100%;
  max-height: min(70vh, 720px);
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f2efe9;
}

.screenshot-modal-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.screenshot-modal-box .btn-primary {
  width: auto;
}

/* Camera button while a capture is rendering */
.reset-map-btn.capturing {
  opacity: 0.55;
  cursor: progress;
}

/* SPACE City Panel tab */
#space-map {
  width: 100%;
  height: 100%;
}

.space-note {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0.25rem 0 0;
}

.space-sidebar-download {
  display: block;
  text-align: center;
  text-decoration: none;
}

.space-disclaimer {
  margin: 0 2rem 2rem;
  padding: 1.25rem 1.5rem;
  background: #fff8e6;
  border-left: 4px solid #e0a800;
  border-radius: 6px;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-primary);
}

.space-disclaimer h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.space-disclaimer p {
  margin: 0 0 0.6rem;
}

.space-disclaimer a {
  color: var(--uh-red);
}

.space-codebook-section {
  margin-top: 2rem;
  font-family: 'Source Sans Pro', sans-serif;
}

.space-codebook-section h3 {
  font-family: 'League Gothic', sans-serif;
  font-size: 1.6rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.space-codebook-section p {
  max-width: 900px;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.space-codebook table {
  border-collapse: collapse;
  width: 100%;
  max-width: 900px;
  font-size: 0.9rem;
}

.space-codebook th,
.space-codebook td {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.space-codebook th {
  background: #f4f4f4;
}
