/* Estilos principais para a página de busca de Antônio Petraglia */
:root {
  color-scheme: light;
  --primary: #1e90ff;
  --accent: #ff6f00;
  --text: #1d2533;
  --muted: #586174;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --surface-contrast: #0f172a;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  --radius-lg: 22px;
  --radius: 16px;
  --body-background: linear-gradient(160deg, #f4f7fb 0%, #e9f2ff 45%, #fef7f0 100%);
  --photo-stage-bg: #cbd5f5;
  --border-soft: rgba(15, 23, 42, 0.08);
  --top-alert-bg: linear-gradient(135deg, #0f172a, #1e293b);
  --top-alert-border: rgba(15, 23, 42, 0.35);
  --top-alert-highlight: #ffd166;
  --top-alert-link: #f1c40f;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --primary: #60a5fa;
    --accent: #fb923c;
    --text: #e5edff;
    --muted: #94a3b8;
    --surface: #111827;
    --surface-soft: #1f2937;
    --surface-contrast: #0f172a;
    --shadow: 0 18px 38px rgba(3, 7, 18, 0.7);
    --body-background: radial-gradient(120% 120% at 50% 0%, #0b1120 0%, #0f172a 55%, #020617 100%);
    --photo-stage-bg: #1e293b;
    --border-soft: rgba(148, 163, 184, 0.18);
    --top-alert-bg: linear-gradient(145deg, #0b1220, #172554);
    --top-alert-border: rgba(96, 165, 250, 0.25);
    --top-alert-highlight: #facc15;
    --top-alert-link: #fbbf24;
  }
}

[data-theme='light'] {
  color-scheme: light;
  --primary: #1e90ff;
  --accent: #ff6f00;
  --text: #1d2533;
  --muted: #586174;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --surface-contrast: #0f172a;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  --body-background: linear-gradient(160deg, #f4f7fb 0%, #e9f2ff 45%, #fef7f0 100%);
  --photo-stage-bg: #cbd5f5;
  --border-soft: rgba(15, 23, 42, 0.08);
  --top-alert-bg: linear-gradient(135deg, #0f172a, #1e293b);
  --top-alert-border: rgba(15, 23, 42, 0.35);
  --top-alert-highlight: #ffd166;
  --top-alert-link: #f1c40f;
}

[data-theme='dark'] {
  color-scheme: dark;
  --primary: #60a5fa;
  --accent: #fb923c;
  --text: #e5edff;
  --muted: #94a3b8;
  --surface: #111827;
  --surface-soft: #1f2937;
  --surface-contrast: #0f172a;
  --shadow: 0 18px 38px rgba(3, 7, 18, 0.7);
  --body-background: radial-gradient(120% 120% at 50% 0%, #0b1120 0%, #0f172a 55%, #020617 100%);
  --photo-stage-bg: #1e293b;
  --border-soft: rgba(148, 163, 184, 0.18);
  --top-alert-bg: linear-gradient(145deg, #0b1220, #172554);
  --top-alert-border: rgba(96, 165, 250, 0.25);
  --top-alert-highlight: #facc15;
  --top-alert-link: #fbbf24;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: var(--body-background);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.4s ease, color 0.2s ease;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

header.top-alert {
  position: relative;
  background: var(--top-alert-bg);
  color: #ffffff;
  padding: 0.85rem 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--top-alert-border);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.28);
  letter-spacing: 0.01em;
}

header.top-alert::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.55), rgba(251, 191, 36, 0.65));
  opacity: 0.75;
}

header.top-alert strong {
  color: var(--top-alert-highlight);
}

header.top-alert a {
  color: var(--top-alert-link);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.update-banner {
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  padding: 0.65rem 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  max-width: 1200px;
  margin: 1.25rem auto 0;
  width: 100%;
  border-radius: var(--radius-lg);
}

.update-content {
  display: inline-flex;
  justify-self: center;
  align-items: center;
  gap: 0.5rem;
}

.update-banner .update-label {
  font-weight: 700;
  color: #ffd166;
}

.theme-selector {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.theme-selector-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.theme-option {
  border: none;
  background: transparent;
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-option:hover {
  background: rgba(255, 255, 255, 0.18);
}

.theme-option[aria-pressed='true'] {
  background: #ffd166;
  color: #0f172a;
}

.theme-option[data-mode-label]::after {
  content: attr(data-mode-label);
  margin-left: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.theme-option[aria-pressed='true'][data-mode-label]::after {
  color: #0f172a;
  opacity: 0.9;
}

.theme-option:focus-visible {
  outline: 3px solid rgba(255, 209, 102, 0.6);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .update-banner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    margin: 1rem auto 0;
  }

  .theme-selector {
    width: 100%;
    justify-content: center;
  }
}

main {
  padding: 2.5rem 1.5rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

section {
  margin-bottom: 3rem;
}

.hero-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr);
    align-items: stretch;
  }
}

.person-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
  padding: 1.75rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  align-items: stretch;
}

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

  .case-summary {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
    padding: 2rem;
  }

  .case-summary-content {
    display: grid;
    gap: 1rem;
  }

  .case-summary h2 {
    margin: 0;
    font-size: 1.7rem;
    color: var(--primary);
  }

  .case-summary p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
  }

  .case-highlights {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.5rem;
    color: var(--text);
    font-weight: 600;
  }

  .case-highlights a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
  }

  .case-highlights a:hover {
    text-decoration: underline;
  }

.photo-gallery {
  display: grid;
  gap: 1rem;
}

.photo-stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.2);
  background: var(--photo-stage-bg);
  aspect-ratio: 3 / 4;
}

.photo-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.35);
}

.photo-badge.badge-recent {
  background: rgba(76, 201, 240, 0.92);
  color: #0f172a;
}

.photo-badge.badge-official {
  background: rgba(30, 144, 255, 0.92);
  color: #ffffff;
}

.photo-badge.badge-reference {
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
}

.photo-caption {
  background: var(--surface-soft);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  display: grid;
  gap: 0.25rem;
}

.photo-caption h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text);
}

.photo-caption p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.photo-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.photo-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.photo-controls button {
  flex: 1 1 30%;
  min-width: 110px;
  padding: 0.6rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(30, 144, 255, 0.35);
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-controls button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(30, 144, 255, 0.25);
}

.photo-controls button:focus-visible {
  outline: 3px solid rgba(30, 144, 255, 0.35);
  outline-offset: 2px;
}

.photo-thumbs {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
}

.photo-thumb {
  position: relative;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: transparent;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.photo-thumb[aria-current="true"],
.photo-thumb.is-active {
  border-color: var(--primary);
  box-shadow: 0 10px 18px rgba(30, 144, 255, 0.25);
}

.photo-thumb:hover img {
  transform: scale(1.04);
}

.photo-thumb span {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.8));
  color: #ffffff;
  font-size: 0.7rem;
  padding: 0.25rem 0.4rem;
  text-align: left;
}

.person-info h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 2.2vw, 2.6rem);
  color: var(--primary);
  line-height: 1.2;
}

.hero-subtitle {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1rem;
}

.hero-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-note strong {
  color: var(--accent);
}

.person-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.person-detail-item {
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.person-detail-item span {
  display: block;
}

.label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.value {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.contact-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-card h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--accent);
}

.contact-card p {
  margin: 0;
  color: var(--muted);
}

.contact-actions {
  display: grid;
  gap: 0.75rem;
}

.cta-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button.primary {
  background: linear-gradient(135deg, #ff8a00, #ff5e00);
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(255, 111, 0, 0.35);
}

.cta-button.secondary {
  background: var(--surface-soft);
  color: var(--primary);
  border: 1px solid rgba(30, 144, 255, 0.25);
}

.cta-button:hover {
  transform: translateY(-1px);
}

.cta-button:focus-visible {
  outline: 3px solid rgba(30, 144, 255, 0.35);
  outline-offset: 2px;
}

.share-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
}

.share-section h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.7rem;
  color: var(--primary);
  text-align: center;
}

.share-section p {
  margin: 0 0 1.5rem;
  text-align: center;
  color: var(--muted);
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid transparent;
  color: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share-button:hover {
  transform: translateY(-1px);
}

.share-button:focus-visible {
  outline: 3px solid rgba(30, 144, 255, 0.35);
  outline-offset: 2px;
}

.share-instagram { background: linear-gradient(120deg, #f58529, #dd2a7b, #8134af); }
.share-facebook { background: #1877f2; }
.share-x { background: #010101; }
.share-tiktok { background: linear-gradient(135deg, #25f4ee, #fe2c55); }
.share-whatsapp { background: #25d366; }
.share-telegram { background: #229ed9; }

.native-share {
  margin: 1.5rem auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 260px;
  background: var(--surface-contrast);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.native-share:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.28);
}

.native-share:focus-visible {
  outline: 3px solid rgba(30, 144, 255, 0.35);
  outline-offset: 2px;
}

.share-feedback {
  margin-top: 1rem;
  min-height: 1.25rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.share-feedback.visible {
  opacity: 1;
}

.share-feedback[data-status="error"] {
  color: #b42318;
}

.map-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
}

.press-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
}

.heatmap-card {
  margin-top: 2rem;
  background: var(--surface-soft);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
  display: grid;
  gap: 1.25rem;
}

.heatmap-head h3 {
  margin: 0 0 0.4rem;
  font-size: 1.4rem;
  color: var(--primary);
}

.heatmap-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.heatmap-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 360px;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.16);
}

#heatmapMap {
  width: 100%;
  height: 100%;
  min-height: 360px;
}

.heatmap-interpretation {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.heatmap-interpretation strong {
  color: var(--accent);
}

.press-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  color: var(--primary);
  text-align: center;
}

.press-header p {
  margin: 0 0 1.75rem;
  text-align: center;
  color: var(--muted);
}

.press-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .press-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.press-card {
  background: var(--surface-soft);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
  display: grid;
  gap: 0.85rem;
}

.press-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.press-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text);
}

.press-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.press-link {
  justify-self: start;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(30, 144, 255, 0.12);
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.press-link:hover {
  transform: translateY(-1px);
  background: rgba(30, 144, 255, 0.2);
  box-shadow: 0 10px 18px rgba(30, 144, 255, 0.2);
}

.press-link:focus-visible {
  outline: 3px solid rgba(30, 144, 255, 0.35);
  outline-offset: 2px;
}

.map-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  color: var(--accent);
}

.map-header p {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.map-layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 960px) {
  .map-layout {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
  }
}

.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.18);
  min-height: 420px;
  border: 1px solid var(--border-soft);
}

#map {
  width: 100%;
  height: 100%;
  min-height: 420px;
}

.timeline-container {
  background: var(--surface-soft);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  max-height: 520px;
  overflow-y: auto;
  border: 1px solid var(--border-soft);
}

.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 12px;
  width: 2px;
  background: rgba(30, 144, 255, 0.35);
}

.timeline-item {
  margin-left: 36px;
  margin-bottom: 1.35rem;
  position: relative;
  padding-left: 0.5rem;
}

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

.timeline-item::before {
  content: attr(data-index);
  position: absolute;
  top: 0;
  left: -36px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 12px rgba(30, 144, 255, 0.3);
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.timeline-title {
  margin: 0 0 0.25rem;
  font-weight: 600;
  color: var(--text);
}

.timeline-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.sighting-icon {
  background: transparent;
  border: none;
}

.sighting-marker {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid #ffffff;
  box-shadow: 0 8px 18px rgba(255, 111, 0, 0.35);
}

.support-section {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 900px) {
  .support-section {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

.support-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.flyer-card {
  border: 1px solid rgba(30, 144, 255, 0.18);
  background: linear-gradient(160deg, rgba(30, 144, 255, 0.08), rgba(255, 111, 0, 0.08));
  position: relative;
  overflow: hidden;
}

.flyer-card h3 {
  margin-top: 0;
  color: var(--accent);
}

.flyer-badge {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  margin-bottom: 1rem;
}

.flyer-intro {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #1e90ff, #2563eb);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(30, 144, 255, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: min(100%, 320px);
}

.download-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(30, 144, 255, 0.35);
}

.download-button:focus-visible {
  outline: 3px solid rgba(30, 144, 255, 0.35);
  outline-offset: 2px;
}

.download-button-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.download-button-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.25;
}

.download-button-text strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.download-button-text small {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.download-button-pulse {
  animation: ctaPulse 2.8s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% {
    box-shadow: 0 12px 24px rgba(30, 144, 255, 0.25);
    transform: translateY(0) scale(1);
  }
  50% {
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.32);
    transform: translateY(-2px) scale(1.02);
  }
}

.flyer-placements {
  margin: 1.25rem 0 0.75rem;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  display: grid;
  gap: 0.4rem;
}

.download-hint {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.support-card h2 {
  margin: 0 0 1rem;
  color: var(--primary);
}

.support-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.support-list li {
  margin-bottom: 0.75rem;
}

footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--primary);
  font-weight: 600;
}

.footer-analytics {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
}

.analytics-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem;
  border-radius: calc(var(--radius) + 4px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.analytics-badge:hover,
.analytics-badge:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.2);
}

.analytics-badge:focus-visible {
  outline: 3px solid rgba(30, 144, 255, 0.35);
  outline-offset: 4px;
}

.analytics-badge picture,
.analytics-badge img {
  display: block;
  max-height: 44px;
}

@media (prefers-color-scheme: dark) {
  .analytics-badge {
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  }
}

@media (max-width: 540px) {
  main {
    padding: 1.75rem 1rem 2.5rem;
  }
  .share-section,
  .map-section,
  .support-card,
  .person-card,
  .contact-card {
    padding: 1.5rem;
    border: 1px solid var(--border-soft);
  }
  .timeline::before {
    left: 10px;
  }
  .timeline-item {
    margin-left: 32px;
  }
  .timeline-item::before {
    left: -32px;
  }
}

/* Legal page styling */
body.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #f4f7fb 0%, #e9f2ff 45%, #fef7f0 100%);
}

.legal-header {
  background: #0f172a;
  color: #ffffff;
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.legal-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.legal-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 3rem 1.5rem 2.5rem;
}

.legal-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  max-width: 820px;
  width: 100%;
  padding: 2.5rem;
  display: grid;
    .heatmap-card {
      padding: 1.5rem;
    }
    .heatmap-container,
    #heatmapMap {
      min-height: 280px;
    }
  gap: 1.35rem;
}

.legal-card h2 {
  margin: 0;
  color: var(--primary);
  font-size: 1.6rem;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.legal-card strong {
  color: var(--text);
}

.legal-card ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.5rem;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--surface-soft);
  font-size: 0.95rem;
  color: var(--muted);
}

.legal-meta a {
  color: var(--primary);
  font-weight: 600;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-start;
}

.legal-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(30, 144, 255, 0.25);
  color: var(--primary);
  background: rgba(30, 144, 255, 0.08);
}

.legal-actions a:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(30, 144, 255, 0.18);
}

.legal-footer {
  padding: 1.75rem 1.5rem 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-footer a {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 640px) {
  .legal-card {
    padding: 2rem;
  }
  .legal-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
