/* Shared dark palette. Loaded last to replace the old per-page dark rules. */
body.dark-mode {
  --page: #171c1a;
  --surface: #222b26;
  --raised: #2a352e;
  --line: #435147;
  --text: #eef2ed;
  --muted: #bac5bd;
  --accent: #b1d8a3;
  background: var(--page);
  color: var(--text);
  color-scheme: dark;
}
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6,
body.dark-mode .card-title, body.dark-mode .event-details h2 { color: var(--text); }
body.dark-mode a, body.dark-mode .card-title a,
body.dark-mode .event-details ul li strong { color: var(--accent); }
body.dark-mode a:hover { color: #d5ebcd; }
body.dark-mode .navbar, body.dark-mode .site-footer { background: #111713 !important; }
body.dark-mode .navbar a, body.dark-mode .navbar summary { color: var(--text); }
body.dark-mode .nav-details ul { background: var(--surface); border: 1px solid var(--line); border-radius: .4rem; }
body.dark-mode .nav-details a:hover, body.dark-mode .nav-details a:focus-visible { background: var(--raised); color: var(--text) !important; }
body.dark-mode .card, body.dark-mode .event-details,
body.dark-mode .list-group-item, body.dark-mode .external-link-panel,
body.dark-mode .breadcrumb, body.dark-mode .gallery-dialog {
  background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: none;
}
body.dark-mode .card-header, body.dark-mode .card-footer { background: var(--raised); border-color: var(--line); }
body.dark-mode .card-img-top { border-color: var(--line); }
body.dark-mode .text-muted, body.dark-mode .breadcrumb-item.active,
body.dark-mode font[color="grey"] { color: var(--muted) !important; }
body.dark-mode hr { border-color: var(--line); }
body.dark-mode .btn, body.dark-mode .button1 {
  background: #365c3c; color: #fff; border: 2px solid #769c73;
  transition: background-color .15s ease, border-color .15s ease;
}
body.dark-mode .btn:hover, body.dark-mode .button1:hover {
  background: #426e49; color: #fff; border-color: #b1d8a3; font-size: inherit; transform: none;
}
body.dark-mode #darkModeToggle { background: #2a382e; color: #e1efda; border: 0; box-shadow: inset 0 -2px #b1d8a3; }
body.dark-mode #darkModeToggle:hover { background: #354739; font-size: inherit; transform: none; }
body.dark-mode .card:hover { transform: none; box-shadow: 0 6px 20px #0002; }
body.dark-mode .consent-panel { background: var(--surface); color: var(--text); border-color: #91bc80; box-shadow: 0 -4px 24px #0005; }
body.dark-mode .consent-panel h2 { color: var(--text); }
body.dark-mode .consent-panel a { color: var(--accent); }
body.dark-mode .consent-actions button, body.dark-mode .external-settings {
  background: var(--raised); color: var(--text); border-color: #91bc80;
}
body.dark-mode .consent-actions button:hover, body.dark-mode .external-settings:hover { background: #354739; }
body.dark-mode .external-embed [data-external-notice] { background: var(--surface); color: var(--text); }
/* Provider frames are separate documents. Keep their complete cards light,
   including headings and links, rather than inverting photos or videos. */
body.dark-mode .social-feeds .card,
body.dark-mode .timeline-row .external-embed {
  background: #f5f6f3; color: #26382c; border: 1px solid #d9dfd5;
  border-radius: .65rem; overflow: hidden; color-scheme: light;
}
body.dark-mode .social-feeds .card-title { color: #26382c; }
body.dark-mode .social-feeds .external-embed > a,
body.dark-mode .timeline-row .external-embed > a { background: #f5f6f3; color: #285d38; }
body.dark-mode .external-embed iframe { color-scheme: light; }
body.dark-mode .social-feeds [data-external-notice],
body.dark-mode .timeline-row [data-external-notice] { background: #e8ede4; color: #26382c; border-radius: 0; }
body.dark-mode .social-feeds .external-settings,
body.dark-mode .timeline-row .external-settings { background: #fff; color: #285d38; border-color: #477950; }
body.dark-mode .social-feeds .external-settings:hover,
body.dark-mode .timeline-row .external-settings:hover { background: #dce8d7; }
body.dark-mode .skip-link { background: #fff; color: #173b22; }
