/* =====================================================================
   RiskHorizon — Design System
   Dark mode default · Light mode via [data-theme="light"]
   Font: Inter (Google Fonts CDN)
   ===================================================================== */

/* ── Google Fonts ──────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design tokens (dark mode default) ─────────────────────────────── */
:root {
  --bg:           #0d1117;
  --bg-card:      rgba(33, 38, 45, 0.45);
  --border-card:  rgba(255, 255, 255, 0.1);
  --surface:      var(--bg-card);
  --surface-2:    rgba(45, 51, 59, 0.6);
  --surface-3:    rgba(45, 51, 59, 0.9);
  --border:       var(--border-card);
  --text:         #e6edf3;
  --text-muted:   #8b949e;
  --primary:      #4fc3f7;
  --primary-glow: rgba(79, 195, 247, 0.15);
  --heat:         #ff7043;
  --flood:        #29b6f6;
  --drought:      #ffa726;
  --wildfire:     #ef5350;
  --safe:         #22c55e;
  --warning-bg:   rgba(245, 158, 11, 0.08);
  --warning-text: #f59e0b;
  --error-bg:     rgba(239, 68, 68, 0.08);
  --error-text:   #ef4444;
  --radius-card:  12px;
  --radius-pill:  999px;
  --transition:   180ms cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card:  0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow:  0 0 32px rgba(79, 195, 247, 0.08);
}

/* ── Light mode overrides ──────────────────────────────────────────── */
[data-theme="light"] {
  --bg:           #f0f4f8;
  --bg-card:      rgba(255, 255, 255, 0.85);
  --border-card:  rgba(0, 0, 0, 0.08);
  --surface:      var(--bg-card);
  --surface-2:    rgba(246, 248, 250, 0.8);
  --surface-3:    #eaeef2;
  --border:       var(--border-card);
  --text:         #1c2128;
  --text-muted:   #57606a;
  --primary:      #0969da;
  --primary-glow: rgba(9, 105, 218, 0.10);
  --warning-bg:   rgba(154, 103, 0, 0.08);
  --warning-text: #9a6700;
  --error-bg:     rgba(207, 34, 46, 0.08);
  --error-text:   #cf222e;
  --shadow-card:  0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-glow:  0 0 24px rgba(9, 105, 218, 0.05);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(circle at top left, rgba(79, 195, 247, 0.05), transparent 60%),
                    radial-gradient(circle at bottom right, rgba(239, 68, 68, 0.05), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 3px; }

button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ── Site header ──────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition);
}

[data-theme="light"] .site-header {
  background: rgba(240, 244, 248, 0.85);
}

.wordmark {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

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

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language toggle */
.lang-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.5px;
}
.lang-btn:hover { background: var(--surface-3); color: var(--text); }

/* Theme toggle */
.theme-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1rem;
  width: 34px; height: 34px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.theme-btn:hover { background: var(--surface-2); color: var(--text); }

/* ── Main layout ───────────────────────────────────────────────────── */
.main-wrap { padding-top: 56px; min-height: 100vh; }

/* ── LANDING PAGE ──────────────────────────────────────────────────── */
#landing {
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

/* Topographic SVG background */
#landing::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cdefs%3E%3Cstyle%3Epath%7Bfill:none;stroke:%234fc3f7;stroke-width:1%7D%3C/style%3E%3C/defs%3E%3Cellipse cx='300' cy='300' rx='280' ry='240'/%3E%3Cellipse cx='300' cy='300' rx='230' ry='190'/%3E%3Cellipse cx='300' cy='300' rx='180' ry='140'/%3E%3Cellipse cx='300' cy='300' rx='130' ry='95'/%3E%3Cellipse cx='300' cy='300' rx='85' ry='55'/%3E%3Cellipse cx='300' cy='300' rx='45' ry='25'/%3E%3Cellipse cx='180' cy='200' rx='120' ry='90'/%3E%3Cellipse cx='180' cy='200' rx='80' ry='55'/%3E%3Cellipse cx='180' cy='200' rx='45' ry='28'/%3E%3Cellipse cx='450' cy='400' rx='110' ry='70'/%3E%3Cellipse cx='450' cy='400' rx='70' ry='42'/%3E%3Cellipse cx='450' cy='400' rx='35' ry='20'/%3E%3C/svg%3E");
  background-size: 800px 800px;
  background-repeat: repeat;
  pointer-events: none;
}

.landing-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  text-align: center;
}

.landing-title {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 1rem;
}

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

.landing-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-weight: 400;
}

/* Search box */
.search-box {
  position: relative;
  width: 100%;
  margin-bottom: 1rem;
}

.search-input-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.address-input {
  flex: 1;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-card);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.address-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.search-btn {
  background: var(--primary);
  color: #0d1117;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.search-btn:hover {
  background: #81d4fa;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79, 195, 247, 0.35);
}

.search-btn:active { transform: translateY(0); }

/* Autocomplete dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  z-index: 200;
  display: none;
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}

.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.active {
  background: var(--surface-2);
  color: var(--primary);
}

/* Input error */
.input-error {
  display: none;
  color: var(--error-text);
  background: var(--error-bg);
  border: 1px solid var(--error-text);
  border-radius: var(--radius-card);
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  text-align: left;
}

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

.eu-hint a { color: var(--primary); }

/* ── LOADING STATE ─────────────────────────────────────────────────── */
#loading {
  display: none;
  min-height: calc(100vh - 56px);
  padding: 3rem 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.loading-header {
  text-align: center;
  margin-bottom: 2rem;
}

.loading-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.loading-time { font-size: 0.85rem; color: var(--text-muted); }

/* Step list */
.loading-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  font-size: 0.92rem;
  transition: all var(--transition);
}

.loading-step--done     { border-color: var(--safe);         background: rgba(34,197,94,0.05); }
.loading-step--warn     { border-color: var(--warning-text); background: var(--warning-bg); }
.loading-step--pending  { opacity: 0.8; }
.loading-step--pending .step-icon {
  animation: pulseGlow 1.5s infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px var(--primary)); opacity: 0.6; }
  100% { transform: scale(1.1); filter: drop-shadow(0 0 8px var(--primary)); opacity: 1; text-shadow: 0 0 10px var(--primary); }
}

.step-icon { font-size: 1.1rem; flex-shrink: 0; }
.step-text { color: var(--text); }

/* Skeleton shimmer cards */
.skeleton-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.2rem;
  height: 120px;
  overflow: hidden;
  position: relative;
}

.skeleton-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.04) 40%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 60%,
    transparent 100%
  );
  background-size: 300% 100%;
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── RESULTS PAGE ──────────────────────────────────────────────────── */
#results {
  display: none;
  padding: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.results-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}
.new-search-btn, .share-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}
.new-search-btn:hover, .share-btn:hover { background: var(--border); border-color: var(--text-muted); }

.benchmark-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.2rem;
  font-style: italic;
}

/* Two-column layout */
.results-layout {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2rem;
}

/* ── Address header ─────────────────────────────────────────────────── */
.address-header { margin-bottom: 1.25rem; }

.address-header h1 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  line-height: 1.4;
  color: var(--text);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Integrity banner ───────────────────────────────────────────────── */
#integrity-banner {
  display: none;
  background: var(--warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-card);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

#integrity-banner p { margin-bottom: 0.3rem; line-height: 1.5; }
#integrity-banner p:last-child { margin-bottom: 0; }
#integrity-banner strong { color: var(--warning-text); }
#integrity-banner a { color: var(--warning-text); }

/* ── Composite gauge card ───────────────────────────────────────────── */
.gauge-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
}

.gauge-wrap {
  position: relative;
  height: 200px;
  max-width: 320px;
  margin: 0 auto 0.75rem;
}

.gauge-score-overlay {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.gauge-score-num {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
}

.gauge-score-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.gauge-title {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-weight: 500;
}

.no-flood-note {
  display: none;
  font-size: 0.78rem;
  color: var(--warning-text);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ── Hazard cards grid ──────────────────────────────────────────────── */
.hazard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.hazard-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}

.animate-up {
  animation: slideFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes slideFadeUp {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

#card-heat      { animation-delay: 50ms; }
#card-flood     { animation-delay: 150ms; }
#card-drought   { animation-delay: 250ms; }
#card-wildfire  { animation-delay: 350ms; }
.gauge-card     { animation-delay: 50ms; }
.map-card       { animation-delay: 300ms; }
.chart-card     { animation-delay: 400ms; }

.hazard-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.4); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.card-title {
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card-res-badge {
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Score bar */
.score-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.score-bar-bg {
  flex: 1;
  height: 8px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  width: 0%;
  transition: width 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.card-score {
  font-size: 1.1rem;
  font-weight: 700;
  min-width: 2.5ch;
  text-align: right;
  flex-shrink: 0;
}

.card-sentence {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Fallback / error states */
.card-warn {
  display: none;
  background: var(--warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: var(--warning-text);
  margin-top: 0.5rem;
}

.card-error {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(0,0,0,0.1);
  padding: 0.5rem;
  border-radius: 4px;
  border-left: 3px solid var(--border);
}
.card-error a { color: var(--text); }

.card-tips {
  margin-top: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem;
  font-size: 0.85rem;
}
.card-tips summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  user-select: none;
}
.card-tips .tips-body {
  margin-top: 0.5rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.card--fallback { border-color: rgba(245, 158, 11, 0.3); }
.card--error    { border-color: rgba(239, 68, 68, 0.3); }

/* ── Right column ──────────────────────────────────────────────────── */
.right-col { display: flex; flex-direction: column; gap: 1.25rem; }

/* Map */
.map-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
#map {
  width: 100%;
  height: 350px;
  border-radius: 8px;
  background: var(--bg);
  z-index: 1; 
}
.map-locate-btn {
  position: absolute;
  top: 90px;
  left: 26px; /* Below Leaflet zoom controls which are top-left by default */
  z-index: 400;
  background: var(--bg-card);
  border: 2px solid rgba(0,0,0,0.2);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  padding: 0;
  box-shadow: 0 1px 5px rgba(0,0,0,0.65);
}
.map-locate-btn:hover { background: var(--border); }
[data-theme="light"] .map-locate-btn {
  background: #fff;
  border: 2px solid rgba(0,0,0,0.2);
}
[data-theme="light"] .map-locate-btn:hover { background: #f4f4f4; }

.layer-controls {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
}

.layer-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
}

.layer-toggle input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

.layer-unavailable {
  display: none;
  font-size: 0.82rem;
  color: var(--warning-text);
  padding: 0.5rem 0;
}

/* Trend chart */
.chart-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.chart-card h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.chart-wrap { height: 200px; position: relative; }

.chart-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-style: italic;
}

/* ── Full-width sections ────────────────────────────────────────────── */
.full-width { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }

/* Sources table */
.sources-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.5rem;
}
.missing-hazards-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(0,0,0,0.1);
  border-radius: 8px;
  border: 1px dashed var(--border);
}

.sources-card h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.sources-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.sources-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sources-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}

.sources-table tr:last-child td { border-bottom: none; }
.sources-table tr:hover td { background: var(--surface-2); }

.res-pill {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Germany callout */
#de-callout {
  display: none;
  background: rgba(79, 195, 247, 0.05);
  border: 1px solid rgba(79, 195, 247, 0.25);
  border-radius: var(--radius-card);
  padding: 1.2rem 1.5rem;
}

#de-callout h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

#de-callout p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.5rem; }

/* ── Legal pages ────────────────────────────────────────────────────── */
.legal-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.legal-wrap h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.legal-wrap h2 { font-size: 1.1rem; font-weight: 600; margin: 1.75rem 0 0.5rem; color: var(--text-muted); }
.legal-wrap p  { margin-bottom: 0.75rem; font-size: 0.92rem; line-height: 1.7; }
.legal-wrap ul { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.legal-wrap li { font-size: 0.92rem; line-height: 1.7; margin-bottom: 0.3rem; }
.legal-back    { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; color: var(--text-muted); margin-bottom: 2rem; }
.legal-back:hover { color: var(--primary); }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--primary); }
.footer-attribs { display: flex; gap: 1rem; flex-wrap: wrap; opacity: 0.7; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .results-layout { grid-template-columns: 1fr; }
  .right-col { order: -1; }
  #map { height: 260px; }
}

@media (max-width: 640px) {
  .hazard-grid      { grid-template-columns: 1fr; }
  .skeleton-grid    { grid-template-columns: 1fr; }
  .landing-title    { letter-spacing: -0.5px; }
  .search-input-wrap { flex-direction: column; }
  .search-btn       { width: 100%; }
  .sources-table th, .sources-table td { padding: 0.5rem; font-size: 0.78rem; }
}

/* ── Leaflet overrides ──────────────────────────────────────────────── */
.leaflet-control-attribution {
  font-size: 0.65rem !important;
  background: rgba(13,17,23,0.75) !important;
  color: #8b949e !important;
}

.leaflet-control-attribution a { color: #4fc3f7 !important; }
