/* Fonts, served from /vendor/ (SIL Open Font License, see OFL.txt beside
   each). npm run build puts these rules at the top of every stylesheet.
   Manrope is one variable file per alphabet for weights 500 to 700, so text
   set at 400 shows at 500. The letters in the cases need only Latin and
   Latin Extended (ć, š, ş, ł). Cormorant Garamond is only the title of the
   welcome screen. */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/vendor/manrope-v20/manrope-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/vendor/manrope-v20/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/vendor/cormorant-garamond-v21/cormorant-garamond-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The map page (/) and the year pages (/2026/ and so on). npm run build
   writes it to /static/ under a hashed name. */

/* Year rail */
.seo-static-content {
  position: fixed;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  z-index: 1450;
  background: rgba(26, 26, 26, 0.94);
  border: 1px solid #333;
  border-radius: 14px;
  color: #ddd;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  font-family: 'Manrope', sans-serif;
  padding: 10px 8px;
  box-sizing: border-box;
  backdrop-filter: blur(4px);
}

.seo-static-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.seo-year-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.seo-year-nav a {
  color: #fff;
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  min-width: 48px;
  text-align: center;
  border-radius: 999px;
  border: 1px solid #555;
  background: #242424;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-sizing: border-box;
}

/* The case list is a different kind of link than the years above it. */
.seo-archive-nav {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #3a3a3a;
}

.seo-year-nav a[aria-current="page"],
.seo-year-nav a.is-selected {
  background: #c0392b;
  border-color: #c0392b;
}

.seo-year-nav a:hover:not([aria-current="page"]) {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}

.seo-year-nav a {
  transition: background 0.15s ease, border-color 0.15s ease;
}

@media (max-width: 680px) {
  .seo-static-content {
    top: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 20px);
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .seo-static-content > .seo-year-nav {
    flex: 1 1 auto;
    min-width: 0;
  }

  /* On phones the case list sits at the end of the scrolling year row. */
  .seo-static-content > .seo-archive-nav {
    flex: none;
    margin-top: 0;
    padding: 0 0 2px 8px;
    border-top: 0;
    border-left: 1px solid #3a3a3a;
  }

  .seo-year-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .seo-year-nav a {
    flex: 0 0 auto;
  }

  /* Each chip looks 31 px tall but takes taps across 44 px. The rows borrow
     the room for that from the bar's padding, so nothing moves. */
  .seo-static-content > .seo-year-nav,
  .seo-static-content > .seo-archive-nav {
    padding-top: 7px;
    padding-bottom: 8px;
    margin-top: -7px;
    margin-bottom: -6px;
  }

  .seo-year-nav a {
    position: relative;
  }

  .seo-year-nav a::after {
    content: '';
    position: absolute;
    inset: -7px -3px;
  }

  /* Push legend above the year nav bar on year pages */
  .seo-static-content ~ .map-legend {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 70px);
  }
}

/* Map, sidebar, dialogs */
html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
}
#map { height: 100vh; }
/* Hamburger button */
.hamburger-btn {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1700;
  width: 38px;
  height: 38px;
  background: #1f1f1f;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
}
.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.28s ease;
  transform-origin: center;
}
.hamburger-btn.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger-btn.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Sidebar overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1590;
  background: rgba(0, 0, 0, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.sidebar-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Sidebar panel */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 240px;
  background: #1a1a1a;
  z-index: 1600;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  padding: 68px 0 24px;
  box-sizing: border-box;
  overflow-y: auto;
}
.sidebar.is-open {
  transform: translateX(0);
}
/* The title bar of the filter sheet on phones */
.sidebar-sheet-head {
  display: none;
}
/* Accordion sections */
.sidebar-section {
  border-bottom: 1px solid #2a2a2a;
}
.sidebar > .sidebar-section:last-child {
  border-bottom: none;
}
.sidebar-section-header {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  color: #999;
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  transition: color 0.18s ease;
}
.sidebar-section-header:hover {
  color: #c0392b;
}
.sidebar-section-header.is-open {
  color: #fff;
}
.sidebar-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.28s ease;
}
.filter-badge {
  margin-left: auto;
  margin-right: 8px;
  padding: 2px 7px;
  background: #c0392b;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 20px;
  white-space: nowrap;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: none;
}
.filter-badge.is-active {
  display: inline-block;
}
.sidebar-section-header.is-open .sidebar-chevron {
  transform: rotate(180deg);
}
.sidebar-section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}
#yearContent.is-open,
#methodContent.is-open,
#genderContent.is-open,
#statusContent.is-open,
#neighborhoodContent.is-open {
  max-height: 80px;
}
#searchContent.is-open {
  max-height: 450px;
}
.sidebar-select {
  width: 100%;
  appearance: auto;
  border: 1px solid #333;
  border-radius: 8px;
  background: #2a2a2a;
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  cursor: pointer;
  box-sizing: border-box;
  display: block;
  margin-bottom: 12px;
}

/* Search panel inside sidebar */
.sidebar .map-search {
  width: 100%;
  margin-bottom: 12px;
  background: #242424;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 10px;
  box-sizing: border-box;
}
.sidebar .map-search-title {
  color: #ccc;
  font-family: 'Manrope', sans-serif;
}
.sidebar .map-search-close {
  background: #333;
  border-color: #444;
  color: #ccc;
}
.sidebar .map-search input {
  background: #2a2a2a;
  border-color: #444;
  color: #fff;
}
.sidebar .map-search input::placeholder {
  color: #777;
}
/* Light, or it disappears into the dark panel. */
.sidebar .map-search-row button {
  background: #fff;
  border-color: #fff;
  color: #111;
}
.sidebar .map-search-results {
  color: #ccc;
}
.language-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1600;
  appearance: none;
  border: 1px solid #242424;
  border-radius: 10px;
  background: #242424;
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 700;
  height: 34px;
  min-width: 108px;
  padding: 0 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
}
.instagram-link {
  position: fixed;
  top: 10px;
  right: 128px;
  z-index: 1600;
  width: 34px;
  height: 34px;
  appearance: none;
  border: 1px solid #242424;
  border-radius: 10px;
  background: #242424;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
  transition: transform 0.2s ease;
}
.instagram-link svg {
  width: 17px;
  height: 17px;
}
.map-search {
  width: min(340px, calc(100vw - 20px));
}
.map-search.is-hidden {
  display: none;
}
.map-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.map-search-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #2a2a2a;
  margin-bottom: 0;
}
.map-search-close {
  border: 1px solid #d5d5d5;
  border-radius: 999px;
  background: #fff;
  color: #444;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}
.map-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.map-search input {
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
}
.map-search button {
  border: 1px solid #242424;
  border-radius: 8px;
  background: #242424;
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
  cursor: pointer;
}
.map-search button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.map-search-results {
  margin-top: 8px;
  max-height: 200px;
  overflow: auto;
  font-size: 12px;
  color: #333;
  line-height: 1.4;
}
.search-result-address {
  font-size: 11px;
  color: #777;
  margin-bottom: 6px;
}
.search-result-closest {
  font-size: 13px;
  font-weight: 600;
  color: #111;
  line-height: 1.4;
}
.search-result-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 2px;
}
.sidebar .search-result-closest {
  color: #fff;
}
.sidebar .search-result-address {
  color: #888;
}
.map-search-results ul {
  margin: 6px 0 0;
  padding-left: 16px;
}
.map-search-results li {
  margin-bottom: 4px;
}
.map-search-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}
.map-search-back {
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  cursor: pointer;
}
.map-search-open {
  display: none;
}
/* Case dossier. Desktop: photo and story side by side, the story scrolls
   inside its column and the source stays pinned below it. Phones: a
   full-height sheet with the photo on top and the source pinned to the
   bottom of the screen. Cases without a photo get a single column. */
.story-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(12, 10, 9, 0.62);
}
.story-modal.is-open {
  display: flex;
}
.story-modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: min(88vh, 800px);
  max-height: min(88dvh, 800px);
  overflow: hidden;
  border-radius: 16px;
  background: #fbf8f4;
  color: #1f1f1f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  animation: story-in 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.story-modal-card.has-media {
  width: min(1100px, 100%);
  min-height: min(540px, 88vh);
  min-height: min(540px, 88dvh);
}
@keyframes story-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.story-modal-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: flex;
  gap: 8px;
}
.story-modal-close,
.story-modal-share {
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.story-modal-close {
  background: #1f1f1f;
  color: #fff;
}
.story-modal-share {
  /* Opaque, so story text scrolling underneath never shows through. */
  background: #ece8e2;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.story-modal-share:hover {
  background: #c0392b;
  color: #fff;
}
/* Copy toast */
.copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a1a;
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.copy-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.story-modal-content {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.has-media .story-modal-content {
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
}

/* Photo column: the photo is shown whole, over a blurred copy of itself. */
.story-modal-media {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #141210;
  color: #fff;
}
.story-media-frame {
  position: absolute;
  inset: 0;
  margin: 0;
}
.story-media-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(28px) brightness(0.5) saturate(1.1);
  transform: scale(1.2);
}
.story-media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.story-media-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 44px 22px 18px;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.72));
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}
.story-modal-slideshow,
.story-modal-slides,
.story-modal-slides-track {
  position: absolute;
  inset: 0;
}
.story-modal-slides {
  overflow: hidden;
}
.story-modal-slides-track {
  display: flex;
  transition: transform 0.35s ease;
  will-change: transform;
}
.story-modal-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
.story-modal-slide-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease;
}
.story-modal-slide-btn[data-dir="-1"] { left: 14px; }
.story-modal-slide-btn[data-dir="1"] { right: 14px; }
.story-modal-slide-btn:hover {
  background: #c0392b;
}
.story-modal-slide-dots {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: flex;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
}
.story-modal-slide-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.18s ease;
}
.story-modal-slide-dot.is-active {
  background: #fff;
}

/* Story column */
.story-modal-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
/* A band at the top of the story column for the share and close buttons,
   so the story scrolls under the band instead of under the buttons. */
.story-modal-body::before {
  content: '';
  flex: 0 0 52px;
}
.story-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 36px 6px;
}
.story-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 96px 16px 0;
}
.story-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #efe8de;
  color: #3a3631;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.story-tag i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}
.story-tag.is-unsolved {
  background: rgba(192, 57, 43, 0.12);
  color: #a93226;
}
.story-tag.is-cold {
  background: #2980b9;
  color: #fff;
}
.story-modal-title {
  margin: 0 0 18px;
  font-family: Georgia, serif;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 400;
  line-height: 1.18;
  color: #111;
}
.story-modal-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 0 0 22px;
  padding: 14px 0;
  border-top: 1px solid #e4dbcf;
  border-bottom: 1px solid #e4dbcf;
}
.story-modal-facts div {
  min-width: 0;
}
.story-modal-facts dt {
  margin-bottom: 3px;
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a938c;
}
.story-modal-facts dd {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #2b2724;
  overflow-wrap: anywhere;
}
.story-modal-story {
  margin: 0 0 22px;
  font-family: Georgia, serif;
  font-size: 17px;
  line-height: 1.75;
  color: #2b2724;
  white-space: pre-line;
}
.story-modal-story::first-letter {
  font-size: 1.2em;
  font-weight: 700;
  line-height: 1;
  color: #7b211a;
}
.story-modal-story.is-empty::first-letter {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.story-modal-title:first-child {
  margin-right: 96px;
}
.story-modal-foot {
  position: relative;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 14px 36px 16px;
  border-top: 1px solid #e4dbcf;
  background: #fbf8f4;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #8a837c;
}
/* Fades the last lines of a story that continues below the fold. */
.story-modal-foot::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 56px;
  background: linear-gradient(rgba(251, 248, 244, 0), #fbf8f4);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.story-modal-body.has-more .story-modal-foot::before {
  opacity: 1;
}
.story-modal-foot-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a938c;
}
.story-modal-foot a {
  color: #7b211a;
  font-weight: 700;
  text-decoration: none;
}
.story-modal-foot a:hover {
  text-decoration: underline;
}
@media (prefers-reduced-motion: reduce) {
  .story-modal-card,
  .story-modal-slides-track,
  .sidebar,
  .sidebar-overlay {
    animation: none;
    transition: none;
  }
}
@keyframes story-up {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 768px) {
  /* The dossier becomes a full-height sheet: photo on top, then the
     story, with the source pinned to the bottom of the screen. */
  .story-modal {
    padding: 0;
    align-items: stretch;
  }

  .story-modal-card,
  .story-modal-card.has-media {
    width: 100%;
    height: 100%;
    max-height: none;
    min-height: 0;
    border-radius: 0;
    animation-name: story-up;
  }

  .story-modal-content,
  .has-media .story-modal-content {
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .story-modal-media {
    height: min(40svh, 380px);
    min-height: 230px;
  }

  .story-modal-body {
    display: block;
  }

  /* On phones the whole sheet scrolls; the buttons stay opaque on top. */
  .story-modal-body::before {
    display: none;
  }

  .story-modal-scroll {
    overflow: visible;
    padding: 22px 20px 4px;
  }

  /* Without a photo the sheet is only as tall as the story needs, so a
     short case leaves the map in view above it. */
  .story-modal-card:not(.has-media) {
    align-self: flex-end;
    height: auto;
    max-height: calc(100% - 48px - env(safe-area-inset-top, 0px));
    border-radius: 18px 18px 0 0;
  }

  .story-modal-foot {
    position: sticky;
    bottom: 0;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .story-modal-actions {
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: 10px;
  }

  .story-modal-card:not(.has-media) .story-modal-actions {
    top: 12px;
  }

  .has-media .story-modal-share {
    background: rgba(20, 20, 20, 0.8);
    color: #fff;
  }

  .story-modal-close,
  .story-modal-share {
    width: 44px;
    height: 44px;
  }

  .story-modal-slide-btn {
    width: 44px;
    height: 44px;
    margin-top: -22px;
  }

  .story-modal-slide-dots {
    top: auto;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
  }

  .story-modal-slide .story-media-caption {
    padding-bottom: 40px;
  }

  .story-modal-tags,
  .story-modal-title:first-child {
    margin-right: 104px;
  }

  .has-media .story-modal-tags {
    margin-right: 0;
  }

  .story-modal-scroll {
    padding-top: 18px;
  }

  .story-modal-tags {
    margin-bottom: 12px;
  }

  .story-modal-title {
    margin-bottom: 14px;
    font-size: 22px;
    line-height: 1.2;
  }

  .story-modal-facts {
    gap: 8px 16px;
    margin-bottom: 16px;
    padding: 10px 0;
  }

  .story-modal-facts dd {
    font-size: 13px;
  }

  .story-modal-story {
    font-size: 17px;
    line-height: 1.68;
  }

  /* Bigger touch targets */
  .hamburger-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .language-toggle {
    height: 44px;
    font-size: 13px;
    min-width: 116px;
  }
  /* 42 px plus its border, as tall as the language button. */
  .instagram-link {
    width: 42px;
    height: 42px;
    right: 134px;
  }

  .leaflet-control-zoom a {
    width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
    font-size: 20px !important;
  }

  /* The menu slides up from the bottom as a sheet, within reach of the
     thumb, with every filter in view as a row: label left, choice right. */
  .sidebar {
    top: auto;
    bottom: 0;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: calc(100% - 56px);
    padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0px));
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
    transform: translateY(100%);
    overscroll-behavior: contain;
  }

  .sidebar-sheet-head {
    position: sticky;
    top: 0;
    z-index: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 8px 4px 18px;
    background: #1a1a1a;
    /* The bar can be dragged down to close the sheet. */
    touch-action: none;
  }

  .sidebar-sheet-head::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    width: 36px;
    height: 4px;
    margin-left: -18px;
    border-radius: 2px;
    background: #444;
  }

  .sidebar-sheet-title {
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 700;
  }

  .sidebar-sheet-close {
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: none;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .sidebar-sheet-close:hover {
    color: #fff;
  }

  .sidebar-filters {
    padding: 4px 18px 14px;
    border-bottom: 1px solid #2a2a2a;
  }

  .sidebar-filters .sidebar-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    border-bottom: none;
  }

  /* On the sheet the section headers are only labels. */
  .sidebar-filters .sidebar-section-header {
    flex: 0 0 104px;
    width: auto;
    padding: 0;
    color: #999;
    font-size: 10px;
    pointer-events: none;
  }

  .sidebar-filters .sidebar-chevron,
  .sidebar-filters .filter-badge {
    display: none;
  }

  .sidebar-filters .sidebar-section-content {
    flex: 1;
    min-width: 0;
    max-height: none;
    overflow: visible;
    transition: none;
  }

  /* 16 px, or iOS zooms the page in when a list is opened. */
  .sidebar-select,
  .sidebar .map-search input {
    font-size: 16px;
  }

  .sidebar-filters .sidebar-select {
    height: 44px;
    margin-bottom: 0;
    padding: 0 10px;
  }

  .sidebar-section-header {
    padding: 16px 18px;
    font-size: 11px;
  }

  .sidebar .map-search {
    width: auto;
    margin: 0 18px 14px;
  }

  .sidebar .map-search input,
  .sidebar .map-search button {
    min-height: 44px;
  }

  /* Not stretched by the full-width rule for the search button below
     420 px; taps land across 44 px. */
  .sidebar .map-search .map-search-close {
    position: relative;
    flex: none;
    width: 32px;
    height: 32px;
    min-height: 0;
  }

  .map-search-close::after {
    content: '';
    position: absolute;
    inset: -6px;
  }

  /* The popup on the address search result: taps land across 44 px. */
  .leaflet-popup-close-button::after {
    content: '';
    position: absolute;
    inset: -10px;
  }

  /* Chips bar: slightly lower to avoid overlap with taller button */
  .active-filters-bar {
    top: 64px;
  }

  .filter-chip {
    position: relative;
    font-size: 12px;
    padding: 5px 10px 5px 12px;
  }

  /* Taps land across 44 px, though the chip looks 25 px tall. */
  .filter-chip::after {
    content: '';
    position: absolute;
    inset: -10px -3px;
  }
}

@media (max-width: 420px) {
  .language-toggle {
    top: 10px;
    right: 10px;
  }
  .instagram-link {
    top: 60px;
    right: 10px;
  }

  .map-search {
    width: calc(100vw - 20px);
  }

  .map-search-row {
    grid-template-columns: 1fr;
  }

  .map-search button {
    width: 100%;
  }

  /* Push zoom above the full-width year nav bar at the bottom */
  .leaflet-bottom.leaflet-left {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 130px);
  }

  /* Chips bar */
  .active-filters-bar {
    top: 64px;
    max-width: calc(100vw - 20px);
  }
}

/* Tip button in sidebar */
.sidebar-tip-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 32px);
  margin: 12px 16px;
  padding: 12px 14px;
  background: #1f1f1f;
  border: 1px solid #333;
  border-radius: 10px;
  color: #ccc;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.sidebar-tip-btn:hover {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}
.sidebar-tip-btn svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* Tip modal */
.tip-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2100;
  padding: clamp(10px, 2vw, 20px);
  box-sizing: border-box;
}
.tip-modal.is-open {
  display: flex;
}
.tip-modal-card {
  width: min(480px, 100%);
  background: #1a1a1a;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  padding: clamp(20px, 3vw, 32px);
  position: relative;
  color: #ccc;
  font-family: 'Manrope', sans-serif;
}
.tip-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: #2a2a2a;
  color: #aaa;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tip-modal-close:hover {
  background: #c0392b;
  color: #fff;
}
.tip-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 40px 12px 0;
  line-height: 1.25;
}
.tip-modal-body {
  font-size: 13px;
  line-height: 1.6;
  color: #aaa;
  margin-bottom: 20px;
}
.tip-modal-link {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  background: #fff;
  color: #111;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.18s ease;
}
.tip-modal-link:hover {
  background: #e8e8e8;
}

/* Clear filters button */
.sidebar-clear-filters {
  padding: 12px 16px;
  border-bottom: 1px solid #2a2a2a;
}
.clear-filters-btn {
  width: 100%;
  background: none;
  border: 1px solid #555;
  border-radius: 8px;
  color: #aaa;
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.clear-filters-btn:hover {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}
@media (max-width: 768px) {
  /* The rest of the filter sheet and the tip dialog: 44 px to tap. */
  .sidebar-clear-filters {
    padding: 12px 18px;
  }
  .clear-filters-btn {
    min-height: 44px;
    font-size: 11px;
  }
  .sidebar-tip-btn {
    width: calc(100% - 36px);
    min-height: 44px;
    margin: 12px 18px 4px;
  }
  .tip-modal-close {
    top: 6px;
    right: 6px;
    width: 44px;
    height: 44px;
  }
  .tip-modal-link {
    padding: 14px 12px;
  }
}

/* Map marker hover animation */
.leaflet-marker-icon {
  transition: transform 0.18s ease, filter 0.18s ease;
  transform-origin: bottom center;
}
.leaflet-marker-icon:hover {
  transform: scale(1.3) translateY(-4px);
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.45));
}
.female-marker-active {
  filter: hue-rotate(120deg) saturate(2) brightness(1.1);
}
/* Colored cause-of-death pins */
.method-pin {
  background: none;
  border: none;
}
.method-pin svg {
  display: block;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
}
/* Taps land across 44 px around the 26 px pin. */
.method-pin::before {
  content: '';
  position: absolute;
  inset: -3px -9px;
}

/* A case the visitor has already opened lies flat on the map. */
.method-pin-opened svg {
  filter: none;
}


/* Active filter chips bar */
.active-filters-bar {
  position: fixed;
  top: 58px;
  left: 10px;
  z-index: 1500;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100vw - 130px);
  pointer-events: none;
}
.filter-chip {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #1f1f1f;
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 8px 4px 10px;
  border-radius: 20px;
  border: 1px solid #3a3a3a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.28);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.filter-chip:hover {
  background: #c0392b;
  border-color: #c0392b;
}
.filter-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  font-size: 10px;
  line-height: 1;
  flex-shrink: 0;
}
/* Hover states */
.hamburger-btn:hover {
  background: #c0392b;
}
.language-toggle:hover {
  background: #c0392b;
  border-color: #c0392b;
}
.instagram-link:hover {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
  transform: translateY(-1px);
}
.instagram-link:hover i {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #fff;
  background-clip: unset;
  color: #fff;
}
.sidebar-select:hover {
  border-color: #c0392b;
  background: #2a2a2a;
}
.map-search button:hover:not(:disabled) {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}
.map-search-close:hover {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}
.map-search-back:hover {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}
.story-modal-close:hover {
  background: #c0392b;
}

/* Leaflet popup close button */
.leaflet-popup-close-button {
  width: 24px !important;
  height: 24px !important;
  border-radius: 999px !important;
  background: #1f1f1f !important;
  color: #fff !important;
  font-size: 16px !important;
  line-height: 24px !important;
  text-align: center;
  top: 8px !important;
  right: 8px !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.leaflet-popup-close-button:hover {
  background: #c0392b !important;
  color: #fff !important;
}

/* Welcome modal */
.welcome-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: clamp(16px, 4vw, 32px);
  box-sizing: border-box;
}
.welcome-modal.is-hidden {
  display: none;
}
.welcome-modal-card {
  width: min(480px, 100%);
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  background: #1a1a1a;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  padding: clamp(28px, 5vw, 44px) clamp(24px, 5vw, 40px) 0;
  text-align: center;
  color: #ccc;
  font-family: 'Manrope', sans-serif;
}
.welcome-modal-icon {
  margin-bottom: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.welcome-modal-logo {
  width: 58px;
  height: 58px;
  display: block;
}
.welcome-modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
  line-height: 1.2;
}
.welcome-modal-body {
  font-size: clamp(13px, 2vw, 15px);
  line-height: 1.7;
  color: #aaa;
  margin: 0;
}
/* The text in the site's language; the other one opens below it. */
.welcome-modal-other {
  margin-top: 8px;
}
.welcome-modal-other summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 8px;
  color: #ddd;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.welcome-modal-other summary::-webkit-details-marker {
  display: none;
}
.welcome-modal-other summary::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.welcome-modal-other[open] summary::after {
  transform: translateY(1px) rotate(-135deg);
}
.welcome-modal-other summary:hover {
  color: #fff;
}
.welcome-modal-other .welcome-modal-body {
  margin-top: 4px;
}
/* The button stays in view when the text is longer than the screen. */
.welcome-modal-foot {
  position: sticky;
  bottom: 0;
  padding: 20px 0 clamp(28px, 5vw, 44px);
  background: #1a1a1a;
}
.welcome-modal-btn {
  display: inline-block;
  background: #fff;
  color: #111;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 13px 32px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.welcome-modal-btn:hover {
  background: #c0392b;
  color: #fff;
}
@media (max-width: 768px) {
  /* On phones the welcome rises from the bottom like the story sheet and
     leaves the map in view above it. */
  .welcome-modal {
    align-items: flex-end;
    padding: 0;
    background: rgba(0, 0, 0, 0.5);
  }
  .welcome-modal-card {
    width: 100%;
    max-height: calc(100% - 48px - env(safe-area-inset-top, 0px));
    border-radius: 18px 18px 0 0;
    padding: 22px 22px 0;
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 14px;
    align-items: center;
    text-align: left;
  }
  .welcome-modal-card > * {
    grid-column: 1 / -1;
  }
  .welcome-modal-card > .welcome-modal-icon {
    grid-column: 1;
    margin: 0;
  }
  .welcome-modal-card > .welcome-modal-title {
    grid-column: 2;
    margin: 0;
    font-size: 26px;
  }
  .welcome-modal-logo {
    width: 44px;
    height: 44px;
  }
  .welcome-modal-text {
    margin-top: 16px;
  }
  .welcome-modal-body {
    font-size: 15px;
    line-height: 1.65;
  }
  .welcome-modal-other summary {
    margin-left: -8px;
  }
  .welcome-modal-foot {
    padding: 12px 0 calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .welcome-modal-btn {
    width: 100%;
    min-height: 48px;
    font-size: 14px;
  }
}
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
  .welcome-modal-card {
    animation: story-up 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
}

/* Cause-of-death legend */
.map-legend {
  position: fixed;
  right: 10px;
  /* Clear of the map's attribution line ("Leaflet | © OpenStreetMap"). */
  bottom: 30px;
  z-index: 1400;
  background: rgba(31, 31, 31, 0.92);
  color: #eee;
  font-family: 'Manrope', sans-serif;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  max-width: 46vw;
}
.map-legend-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 7px;
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}
.map-legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  flex-shrink: 0;
}
.map-legend-opened {
  display: flex;
  justify-content: center;
  width: 11px;
  flex-shrink: 0;
}
.map-legend-opened svg {
  display: block;
}
.map-legend-forget {
  min-height: 24px;
  margin: -4px 0 -4px auto;
  padding: 0 0 0 8px;
  background: none;
  border: none;
  color: #ccc;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.map-legend-forget:hover {
  color: #fff;
}
@media (max-width: 420px) {
  .map-legend {
    padding: 8px 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 30px);
  }
  .map-legend-item { font-size: 10px; }
}

/* Case count badge */
.case-count {
  position: fixed;
  top: 94px;
  left: 10px;
  bottom: auto;
  right: auto;
  z-index: 1400;
  background: #1f1f1f;
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  pointer-events: none;
}

/* No results overlay */
.no-results-msg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1300;
  background: #1f1f1f;
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 14px 24px;
  border-radius: 12px;
  pointer-events: none;
}
/* The welcome dialog only greets visitors on the homepage. */
.year-page .welcome-modal {
  display: none !important;
}

/* Search bar on the map: a dark pill at the top, like the buttons around
   it, with the results dropping down under it as you type. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}
.home-search {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1550;
  width: min(480px, calc(100vw - 420px));
  font-family: 'Manrope', sans-serif;
}
.home-search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 17px;
  height: 17px;
  margin-top: -8.5px;
  color: #9a938c;
  pointer-events: none;
  z-index: 1;
  transition: color 0.15s ease;
}
.home-search > .home-search-icon { top: 19px; margin-top: -8.5px; }
.home-search-input {
  display: block;
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  padding: 0 70px 0 40px;
  border: 1px solid #242424;
  border-radius: 12px;
  background: rgba(31, 31, 31, 0.96);
  color: #fff;
  font: 600 13px/1 'Manrope', sans-serif;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(4px);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, border-radius 0.15s ease;
}
.home-search-input::placeholder { color: #9a938c; opacity: 1; }
.home-search-input::-webkit-search-cancel-button,
.home-search-input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.home-search-input:focus {
  outline: none;
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.28), 0 10px 20px rgba(0, 0, 0, 0.2);
}
.home-search:focus-within .home-search-icon { color: #fff; }
.home-search.is-open .home-search-input {
  border-radius: 12px 12px 0 0;
  border-bottom-color: #333;
}
.home-search-kbd {
  position: absolute;
  top: 9px;
  right: 10px;
  min-width: 20px;
  height: 20px;
  box-sizing: border-box;
  padding: 0 6px;
  border: 1px solid #444;
  border-radius: 6px;
  color: #9a938c;
  font: 700 11px/18px 'Manrope', sans-serif;
  text-align: center;
  pointer-events: none;
  z-index: 1;
}
.home-search:focus-within .home-search-kbd,
.home-search.has-query .home-search-kbd { display: none; }
.home-search-clear {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: #333;
  color: #ddd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.home-search-clear { z-index: 1; }
.home-search-clear[hidden] { display: none; }
.home-search-clear:hover { background: #c0392b; color: #fff; }
.home-search-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  overflow: hidden;
  border: 1px solid #c0392b;
  border-top: none;
  border-radius: 0 0 14px 14px;
  background: rgba(26, 26, 26, 0.97);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
  animation: home-search-in 0.14s ease-out;
}
.home-search-panel[hidden] { display: none; }
@keyframes home-search-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.home-search-status {
  padding: 9px 14px 8px;
  border-bottom: 1px solid #2c2c2c;
  color: #8a837c;
  font: 700 10px/1.3 'Manrope', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.home-search-results {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: min(60vh, 480px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #444 transparent;
}
.home-search-results:empty { display: none; }
.home-search-result {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 14px;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: background 0.1s ease;
}
.home-search-result[aria-selected="true"] {
  background: #262626;
  border-left-color: #c0392b;
}
.home-search-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}
.home-search-body { display: grid; gap: 4px; min-width: 0; }
.home-search-title {
  color: #fff;
  font: 400 16px/1.3 Georgia, 'Times New Roman', serif;
}
.home-search-meta {
  color: #8a837c;
  font: 700 10px/1.3 'Manrope', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.home-search-meta .is-unsolved { color: #e0675a; }
.home-search-sep { margin: 0 6px; color: #555; }
.home-search-snippet {
  color: #b9b2ab;
  font: 500 12px/1.5 'Manrope', sans-serif;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-search-result mark {
  background: rgba(192, 57, 43, 0.42);
  color: #fff;
  border-radius: 3px;
  padding: 0 1px;
}

/* The search bar takes the room between the corner buttons when it can,
   and its own row under them on smaller screens. */
@media (max-width: 1000px) {
  .home-search {
    left: 64px;
    right: 180px;
    transform: none;
    width: auto;
  }
}
@media (max-width: 768px) {
  .home-search {
    top: 64px;
    left: 10px;
    right: 10px;
  }
  .home-search-input { height: 44px; font-size: 16px; }
  .home-search > .home-search-icon { top: 22px; }
  .home-search-kbd { display: none; }
  .home-search-clear { top: 9px; width: 26px; height: 26px; }
  .home-search-results { max-height: min(55vh, 420px); }
  .active-filters-bar { top: 118px; }
  .case-count { top: 148px; }
}
@media (max-width: 420px) {
  .home-search { right: 62px; }
  .active-filters-bar { top: 118px; }
}
/* The year pages and the homepage share the bar; nothing else changes. */
@media (prefers-reduced-motion: reduce) {
  .home-search-panel { animation: none; }
}

/* View count, bottom left under the zoom buttons (see src/app.js). */
.map-views {
  font: 600 11px/1.3 'Manrope', sans-serif;
  color: #eee;
  background: rgba(31, 31, 31, 0.88);
  border-radius: 8px;
  padding: 5px 9px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}
.map-views[hidden] { display: none; }

/* Candle and view count under the story in the map's story sheet. */
.story-modal-meta { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.story-modal-views[hidden] { display: none; }
.story-modal-views { margin: 0; font: 600 12px/1.4 'Manrope', sans-serif; color: #9a938c; }
.story-modal-candle.candle { margin: 0; }
.story-modal-updated { margin: 0; font: 500 12px/1.4 'Manrope', sans-serif; color: #9a938c; }

/* Light/dark switch, top right next to the Instagram button (src/app.js). */
.map-theme-btn {
  position: fixed;
  top: 10px;
  right: 172px;
  z-index: 1600;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #242424;
  border-radius: 10px;
  background: #242424;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
  transition: transform 0.2s ease, background 0.15s ease;
}
.map-theme-btn:hover { background: #c0392b; border-color: #c0392b; transform: translateY(-1px); }
.map-theme-btn .sun { display: none; }
.map-dark .map-theme-btn .sun { display: inline; }
.map-dark .map-theme-btn .moon { display: none; }
@media (max-width: 768px) {
  .map-theme-btn { width: 42px; height: 42px; right: 186px; }
}
@media (max-width: 420px) {
  .map-theme-btn { top: 60px; right: 62px; }
}

/* Dark map: the map's own controls follow. Panels, legend and the story
   sheet already have their own colours and stay as they are. */
.map-dark #map { background: #1b1b1b; }
/* The dark map: the OpenStreetMap tiles inverted, with the hues turned back
   so water stays blue-ish and parks green-ish. Only the tiles; pins sit in
   their own pane and keep their colours. */
.map-dark .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.88) saturate(0.6);
}
.map-dark .leaflet-bar a {
  background: #262626;
  color: #eee;
  border-color: #3a3a3a;
}
.map-dark .leaflet-bar a:hover { background: #333; }
.map-dark .leaflet-bar { border-color: rgba(255, 255, 255, 0.15); }
.map-dark .leaflet-control-attribution {
  background: rgba(20, 20, 20, 0.75);
  color: #aaa;
}
.map-dark .leaflet-control-attribution a { color: #ccc; }
.map-dark .map-views { border: 1px solid rgba(255, 255, 255, 0.12); }

/* ------------------------------------------------------------------------
   Phones (src/app.js, end of file): one bar at the top, a sheet at the
   bottom, dots in place of pins until you zoom in. Desktop is untouched:
   everything here sits under the phone width or uses classes only made
   there.
   ------------------------------------------------------------------------ */

/* Zoomed out on phones, a case is a dot in its cause's colour. The marker
   is a 26 px tap target with the dot in its middle. */
.method-dot {
  background: none;
  border: none;
}
.method-dot span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.method-dot.is-opened span { opacity: 0.45; box-shadow: none; }
.map-zoom-far .method-dot span {
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-width: 1.5px;
}

/* A tap on dots that lie together: the cases there, as a short list. */
.dot-group-popup .leaflet-popup-content-wrapper {
  background: #1a1a1a;
  color: #eee;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.dot-group-popup .leaflet-popup-tip { background: #1a1a1a; }
.dot-group-popup .leaflet-popup-content { margin: 12px 0 10px; width: auto !important; }
.dot-group { font-family: 'Manrope', sans-serif; }
.dot-group-head {
  margin: 0 40px 6px 14px !important;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999;
}
.dot-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(240px, 40svh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dot-group-case {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 14px;
  color: #f1f1f1 !important;
  text-decoration: none;
  border-top: 1px solid #2a2a2a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.dot-group-case:active { background: #262626; }
.dot-group-case.is-opened { color: #a8a8a8 !important; }
.dot-group-case i {
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 50%;
  border: 1.5px solid #fff;
}
.dot-group-case b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
}
.dot-group-case small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #8f8f8f;
}
.dot-group-zoom {
  display: block;
  width: calc(100% - 28px);
  margin: 8px 14px 0;
  min-height: 38px;
  border: 1px solid #3a3a3a;
  border-radius: 999px;
  background: #242424;
  color: #fff;
  font: 700 12px/1 'Manrope', sans-serif;
  cursor: pointer;
}

/* Only made on phones; hidden if the window later grows. */
.map-sheet,
.map-locate-btn {
  display: none;
}

.sidebar-quick {
  display: none;
}

@media (max-width: 768px) {
  /* The top bar: menu left, search filling the rest. */
  .hamburger-btn {
    top: calc(10px + env(safe-area-inset-top, 0px));
    left: 10px;
  }
  .home-search { top: calc(10px + env(safe-area-inset-top, 0px)); left: 62px; right: 10px; }
  .active-filters-bar {
    top: calc(62px + env(safe-area-inset-top, 0px));
    max-width: calc(100vw - 20px);
  }

  /* These live in the menu or the sheet on phones. */
  .is-phone .case-count,
  .is-phone .map-legend,
  .is-phone .leaflet-control-zoom {
    display: none;
  }

  /* Map attribution and controls stay above the sheet. */
  .is-phone .leaflet-bottom {
    bottom: var(--sheet-peek, 150px);
  }

  .no-results-msg {
    top: 40%;
  }

  .copy-toast {
    bottom: calc(var(--sheet-peek, 150px) + 16px);
  }

  /* The menu: language, dark map, Instagram and the view count in one row. */
  .sidebar-quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 18px 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid #2c2c2c;
  }
  .sidebar-quick .language-toggle,
  .sidebar-quick .instagram-link,
  .sidebar-quick .map-theme-btn {
    position: static;
    box-shadow: none;
    border: 1px solid #3a3a3a;
    background: #262626;
    height: 44px;
    border-radius: 12px;
  }
  .sidebar-quick .language-toggle { min-width: 0; padding: 0 16px; }
  .sidebar-quick .instagram-link,
  .sidebar-quick .map-theme-btn { width: 44px; }
  .sidebar-quick .map-views {
    margin-left: auto;
    background: none;
    box-shadow: none;
    border: 0;
    padding: 0;
    color: #9a938c;
  }

  /* The sheet: always as tall as when it is open, and slid down to show
     only its top (the count, the years, the quick filters). */
  .map-sheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: min(78svh, calc(100svh - 70px));
    z-index: 1450;
    background: #1a1a1a;
    color: #eee;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.3);
    font-family: 'Manrope', sans-serif;
    transform: translateY(calc(100% - 150px));
    will-change: transform;
  }
  .map-sheet-handle,
  .map-sheet-chips {
    flex: none;
  }
  .map-sheet.is-animating {
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .map-sheet-handle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 14px 18px 4px;
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    touch-action: none;
  }
  .map-sheet-grip {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 38px;
    height: 4px;
    margin-left: -19px;
    border-radius: 2px;
    background: #4a4a4a;
  }
  .map-sheet-count {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #fff;
  }
  .map-sheet-hint {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #bbb;
    padding: 6px 12px;
    border-radius: 999px;
    background: #262626;
  }
  .map-sheet-hint::after {
    content: '';
    width: 7px;
    height: 7px;
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: translateY(2px) rotate(45deg);
  }
  .map-sheet[data-hint="down"] .map-sheet-hint::after {
    transform: translateY(-2px) rotate(225deg);
  }

  /* The years: the page's own year links, moved into the pulled-up sheet
     and shown there by the year button, as a grid of year buttons. */
  .map-sheet-years { display: none; }
  .map-sheet[data-view="years"] .map-sheet-years { display: block; }
  .map-sheet[data-view="years"] .map-sheet-legend,
  .map-sheet[data-view="years"] .map-sheet-listhead,
  .map-sheet[data-view="years"] .map-sheet-list { display: none; }
  .map-sheet .seo-static-content {
    position: static;
    transform: none;
    width: auto;
    max-height: none;
    background: none;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0 18px 8px;
    display: block;
  }
  .map-sheet .seo-static-content > .seo-year-nav,
  .map-sheet .seo-static-content > .seo-archive-nav {
    padding: 0;
    margin: 0;
  }
  .map-sheet .seo-year-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    overflow: visible;
  }
  .map-sheet .seo-year-nav a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    font-size: 12px;
  }
  .map-sheet .seo-year-nav a::after { display: none; }
  .map-sheet .year-more { grid-column: 1 / -1; min-height: 44px; font-size: 12px; }
  .map-sheet .year-hint { grid-column: 1 / -1; font-size: 12px; text-align: left; padding: 0 0 2px; }
  .map-sheet .seo-static-content > .seo-archive-nav {
    margin-top: 6px;
    padding: 10px 0 0;
    border-top: 1px solid #2a2a2a;
    border-left: 0;
  }
  .map-sheet .seo-archive-nav a { width: 100%; }

  /* Quick filters: the year, the dossier, unsolved and the rest. */
  .map-sheet-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 18px calc(12px + env(safe-area-inset-bottom, 0px));
    scrollbar-width: none;
  }
  .map-sheet-chips::-webkit-scrollbar { display: none; }
  .map-chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid #3a3a3a;
    background: #222;
    color: #eee;
    font: 700 12px/1 'Manrope', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }
  .map-chip i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    flex: none;
  }
  .map-chip.is-on {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
  }
  /* A dossier chip in its dossier's colour (--dossier, set by src/app.js). */
  .map-chip-theme { border-color: var(--dossier, #3a3a3a); }
  .map-chip-theme.is-on { background: var(--dossier, #c0392b); border-color: var(--dossier, #c0392b); }
  .map-chip-year {
    gap: 6px;
    background: #2a2a2a;
    border-color: #4a4a4a;
  }
  .map-chip-year.has-value { border-color: #c0392b; }
  .map-chip-year svg { transition: transform 0.2s ease; }
  .map-chip-year[aria-expanded="true"] svg { transform: rotate(180deg); }
  .map-chip-more b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #c0392b;
    color: #fff;
    font-size: 10px;
  }

  /* Pulled up: the cases in the part of the map still in view. */
  .map-sheet-panel {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid #2a2a2a;
    padding: 10px 0 calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .map-sheet-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding: 2px 18px 10px;
    font-size: 11px;
    color: #aaa;
  }
  .map-sheet-legend span { display: inline-flex; align-items: center; gap: 6px; }
  .map-sheet-legend i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #fff; }
  .map-sheet-listhead {
    margin: 0;
    padding: 4px 18px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888;
  }
  .map-sheet-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .map-sheet-case {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 10px 18px;
    color: #f1f1f1;
    text-decoration: none;
    border-bottom: 1px solid #262626;
    -webkit-tap-highlight-color: transparent;
  }
  .map-sheet-case:active { background: #242424; }
  .map-sheet-case.is-opened .map-sheet-case-title { color: #a8a8a8; }
  .map-sheet-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: none;
    border: 1.5px solid #fff;
  }
  .map-sheet-case-body {
    display: grid;
    gap: 3px;
    min-width: 0;
    flex: 1;
  }
  .map-sheet-case-date {
    font-size: 11px;
    font-weight: 600;
    color: #8f8f8f;
  }
  .map-sheet-case-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .map-sheet-status {
    flex: none;
    font-size: 10px;
    font-weight: 700;
    color: #aaa;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #333;
  }
  .map-sheet-status.is-unsolved {
    color: #ff8a7d;
    border-color: #6b2a23;
  }
  .map-sheet-empty {
    padding: 18px;
    font-size: 13px;
    color: #999;
    line-height: 1.5;
  }

  /* Near me: one round button above the sheet, in reach of the thumb. */
  .map-locate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 12px;
    bottom: calc(var(--sheet-peek, 150px) + 12px);
    z-index: 1440;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: #1f1f1f;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    cursor: pointer;
  }
  .map-locate-btn.is-busy svg { animation: locate-pulse 1s ease-in-out infinite; }

  /* The story: previous and next case at the end, swiping does the same. */
  .story-modal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 26px 0 8px;
    padding: 10px 0;
    border-top: 1px solid rgba(127, 127, 127, 0.25);
    font-family: 'Manrope', sans-serif;
  }
  .story-modal-nav span {
    display: grid;
    gap: 2px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.85;
  }
  .story-modal-nav small {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.6;
  }
  .story-modal-nav button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(127, 127, 127, 0.35);
    background: transparent;
    color: inherit;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
  }
  .story-modal-nav button:disabled { opacity: 0.25; cursor: default; }
}

@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
  .story-modal-card.slide-next { animation: story-from-right 0.26s ease-out; }
  .story-modal-card.slide-prev { animation: story-from-left 0.26s ease-out; }
}
@keyframes story-from-right {
  from { transform: translateX(24px); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}
@keyframes story-from-left {
  from { transform: translateX(-24px); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}
@keyframes locate-pulse {
  50% { opacity: 0.35; }
}

/* Dossier (?thema=): a card with the period and a link to the dossier page,
   at the head of the active filters. */
.theme-card {
  pointer-events: auto;
  position: relative;
  display: grid;
  gap: 4px;
  flex: 0 1 340px;
  max-width: 340px;
  padding: 12px 40px 12px 14px;
  border-radius: 14px;
  background: rgba(24, 21, 19, 0.94);
  border: 1px solid #3a3a3a;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  color: #f4efe8;
  font-family: 'Manrope', sans-serif;
}
.theme-card-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--dossier, #c0392b) 45%, #fff);
}
.theme-card-title {
  font: 400 19px/1.2 Georgia, serif;
}
.theme-card-title span {
  font: 700 12px/1 'Manrope', sans-serif;
  letter-spacing: 0.04em;
  opacity: 0.75;
  white-space: nowrap;
}
.theme-card-summary {
  font-size: 12.5px;
  line-height: 1.45;
  color: #cfc8c0;
}
.theme-card-link {
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--dossier, #c0392b);
  text-underline-offset: 3px;
}
.theme-card-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.theme-card-close:hover { background: var(--dossier, #c0392b); }
.active-filters-bar .theme-card + .filter-chip { align-self: flex-start; }
.map-chip-theme small {
  font-size: 10.5px;
  font-weight: 700;
  opacity: 0.75;
}
@media (max-width: 768px) {
  .theme-card { flex-basis: 100%; max-width: min(340px, calc(100vw - 20px)); padding: 10px 40px 10px 12px; }
  .theme-card-title { font-size: 17px; }
  .theme-card-summary { display: none; }
}

/* From 769 px up (wider than the phone sheet) the left edge holds, top
   down: the dossier button, the filter chips (the year first), the case
   count and the year rail, which scrolls when there are more years than
   fit. An active dossier's card sits under the search bar instead, and
   then the rest moves up into the button's place. */
@media (min-width: 769px) {
  .dossier-suggest {
    position: fixed;
    top: 58px;
    left: 10px;
    z-index: 1490;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  /* stackLeftEdge in src/app.js measures each block and sets these, so a
     second row of dossiers or of filter chips pushes the rest down rather
     than lying over it. The numbers are the fallback before it runs. */
  .active-filters-bar { top: var(--stack-filters-top, 58px); }
  .case-count { top: var(--stack-count-top, 94px); }
  .seo-static-content {
    top: var(--stack-rail-top, 132px);
    transform: none;
    /* Down to 10 px above the view count and zoom buttons; their height
       is set by src/app.js, 98 px is the fallback. */
    max-height: calc(100vh - var(--stack-rail-top, 132px) - var(--map-bottom-left, 98px) - 10px);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .seo-static-content::-webkit-scrollbar { display: none; }
  .theme-card { position: fixed; top: 58px; left: 50%; transform: translateX(-50%); }
}
.dossier-suggest[hidden] { display: none; }

/* The years as decades (groupYearNavs in src/app.js): every decade folds to
   one row and one is open, so the rail stays short with forty years in it. */
/* The years fold to the newest few (groupYearNavs in src/app.js); the
   "Meer jaren" button under them unfolds the rest. */
.seo-year-nav.is-collapsible:not(.show-all) a.is-older { display: none; }
@media (min-width: 769px) {
  .seo-static-content:has(.is-collapsible) { width: 132px; }
}
.year-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 8px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #9a9a9a;
  font: 700 10px/1.2 'Manrope', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
.year-more:hover, .year-more:focus-visible { color: #fff; background: #2a2a2a; }
.year-more svg { transition: transform 0.2s ease; }
.year-more[aria-expanded="true"] svg { transform: rotate(180deg); }
/* Years can be combined: the line above them says so. */
.year-hint {
  display: block;
  padding: 4px 2px 0;
  font: 600 9.5px/1.3 'Manrope', sans-serif;
  color: #8a8a8a;
  text-align: center;
}

/* A dossier as a button among the active filters, while none is on. */
.theme-suggest {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--dossier, #c0392b);
  background: rgba(24, 21, 19, 0.94);
  color: #fff;
  font: 700 12px/1.2 'Manrope', sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  white-space: nowrap;
}
.theme-suggest small {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--dossier, #c0392b) 45%, #fff);
}
.theme-suggest span { font-weight: 600; opacity: 0.7; }
.theme-suggest:hover, .theme-suggest:focus-visible { background: var(--dossier, #c0392b); }
@media (max-width: 768px) {
  .theme-suggest { display: none; }
}

/* Guided tour of a dossier (dossierTour in src/app.js): a card at the
   bottom that walks through the cases while the map flies along. */
.dossier-tour {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 1800;
  width: min(440px, calc(100vw - 24px));
  max-height: min(70vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: rgba(24, 21, 19, 0.97);
  border: 1px solid #3a3a3a;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  color: #f4efe8;
  font-family: 'Manrope', sans-serif;
  overflow: hidden;
  animation: dossier-tour-in 0.25s ease-out;
}
.dossier-tour[hidden] { display: none; }
/* On a wider screen the card stands on the right, so the map keeps its
   middle for the pins (freeArea in src/app.js reads where it is). */
@media (min-width: 769px) {
  .dossier-tour {
    left: auto;
    right: 16px;
    top: 64px;
    bottom: auto;
    transform: none;
    width: 420px;
    max-height: calc(100vh - 88px);
    animation-name: dossier-tour-side;
  }
}
@keyframes dossier-tour-side {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes dossier-tour-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.dossier-tour-body {
  overflow-y: auto;
  padding: 16px 18px 6px;
}
.dossier-tour-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.dossier-tour-close:hover { background: var(--dossier, #c0392b); }
.dossier-tour-photo {
  margin: -16px -18px 12px;
  height: 170px;
  background: #111;
}
.dossier-tour-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dossier-tour-kicker {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--dossier, #c0392b) 45%, #fff);
  padding-right: 34px;
}
.dossier-tour h2 {
  margin: 6px 0 8px;
  font: 400 21px/1.25 Georgia, serif;
  color: #fff;
  padding-right: 24px;
}
.dossier-tour-text p {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #d8d1c9;
}
.dossier-tour-hint {
  font-size: 12px;
  color: #a9a29a;
  margin: 0 0 8px;
}
.dossier-tour-loading { opacity: 0.6; }
.dossier-tour-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 2px 0 8px;
}
.dossier-tour-link {
  padding: 0;
  border: 0;
  background: none;
  font: 700 13px 'Manrope', sans-serif;
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--dossier, #c0392b);
  text-underline-offset: 3px;
  cursor: pointer;
}
.dossier-tour-ghost {
  border: 1px solid #555;
  border-radius: 999px;
  background: none;
  color: #ddd;
  font: 700 12px 'Manrope', sans-serif;
  padding: 5px 12px;
  cursor: pointer;
}
.dossier-tour-bar {
  height: 3px;
  background: #3a3433;
}
.dossier-tour-bar i {
  display: block;
  height: 100%;
  background: var(--dossier, #c0392b);
  transition: width 0.3s ease;
}
.dossier-tour-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
.dossier-tour-count {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  color: #b9b1a9;
  text-align: center;
}
.dossier-tour-prev,
.dossier-tour-next {
  border: 0;
  border-radius: 999px;
  font: 800 13px 'Manrope', sans-serif;
  cursor: pointer;
  min-height: 38px;
}
.dossier-tour-prev {
  width: 38px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 16px;
}
.dossier-tour-prev:disabled { opacity: 0.3; cursor: default; }
.dossier-tour-next {
  padding: 0 18px;
  background: var(--dossier, #c0392b);
  color: #fff;
}
.dossier-tour-next:hover { background: color-mix(in srgb, var(--dossier, #c0392b) 82%, #000); }
.theme-card-tour {
  justify-self: start;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--dossier, #c0392b);
  color: #fff;
  font: 800 12.5px 'Manrope', sans-serif;
  cursor: pointer;
}
.theme-card-tour:hover { background: color-mix(in srgb, var(--dossier, #c0392b) 82%, #000); }
/* The case the tour is at: a pulsing ring around its pin. */
.leaflet-marker-icon.tour-current {
  z-index: 100000 !important;
  filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 12px var(--dossier, #c0392b));
  animation: tour-pulse 1.4s ease-in-out infinite;
}
@keyframes tour-pulse {
  0%, 100% { filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 8px var(--dossier, #c0392b)); }
  50% { filter: drop-shadow(0 0 10px #fff) drop-shadow(0 0 20px var(--dossier, #c0392b)); }
}
@media (max-width: 768px) {
  .dossier-tour {
    bottom: 0;
    width: 100vw;
    max-height: 52vh;
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .dossier-tour-photo { height: 130px; }
  .dossier-tour h2 { font-size: 18px; }
  .dossier-tour-text p { font-size: 13px; }
  body.tour-on .map-sheet { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .dossier-tour { animation: none; }
  .leaflet-marker-icon.tour-current { animation: none; }
}
/* While the tour runs, its card says what the dossier card says. */
body.tour-on .theme-card { display: none; }
body.tour-on .map-legend { display: none; }

/* The richer tour (data/conflicts.json "figures", "relations", "places",
   chapter "images"): photo strips, people, the network and the timeline. */
.dossier-tour.has-media .dossier-tour-body { padding-top: 0; }
.dossier-tour.has-media .dossier-tour-close { background: rgba(0, 0, 0, 0.6); }
.tour-gallery { margin: 0 -18px 12px; background: #111; }
.dossier-tour-body > .tour-gallery:first-child { margin-top: 0; }
.tour-shot { margin: 0; position: relative; }
.tour-shot img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #111;
}
.tour-shot figcaption {
  padding: 6px 18px 8px;
  font-size: 11px;
  line-height: 1.4;
  color: #a9a29a;
  background: #111;
}
.tour-strip {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  outline: none;
}
.tour-strip::-webkit-scrollbar { display: none; }
.tour-strip .tour-shot { flex: 0 0 100%; scroll-snap-align: start; }
.tour-strip-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 0 0 8px;
  background: #111;
}
.tour-strip-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #555;
  transition: background 0.2s;
}
.tour-strip-dots i.is-on { background: var(--dossier, #c0392b); }

/* Faces: a photo in a ring of the group's colour, or initials. */
.tour-avatar,
.tour-portrait {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: #3a3430;
  box-shadow: 0 0 0 2px var(--g, #8a8178);
  color: #e9e1d8;
  font-weight: 800;
}
.tour-avatar { width: 26px; height: 26px; font-size: 10px; }
.tour-avatar.is-small { width: 22px; height: 22px; font-size: 9px; }
.tour-portrait { width: 64px; height: 64px; font-size: 20px; box-shadow: 0 0 0 3px var(--g, #8a8178); }
.tour-avatar img,
.tour-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }

.tour-people {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
}
.tour-people-label {
  flex-basis: 100%;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8f877f;
}
.tour-person {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 11px 3px 3px;
  border: 1px solid #4a4440;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #f4efe8;
  font: 700 12.5px 'Manrope', sans-serif;
  cursor: pointer;
}
.tour-person:hover,
.tour-person:focus-visible { border-color: var(--dossier, #c0392b); background: rgba(255, 255, 255, 0.1); }

/* "Who is who" */
.tour-cast {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}
.tour-cast-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px 9px;
  border: 1px solid #3c3633;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #f4efe8;
  font-family: 'Manrope', sans-serif;
  text-align: center;
  cursor: pointer;
}
.tour-cast-card:hover,
.tour-cast-card:focus-visible { border-color: var(--dossier, #c0392b); background: rgba(255, 255, 255, 0.08); }
.tour-cast-card .tour-portrait { width: 56px; height: 56px; margin-bottom: 4px; }
.tour-cast-card b { font-size: 12.5px; line-height: 1.25; }
.tour-cast-card span:not(.tour-portrait) {
  font-size: 10.5px;
  line-height: 1.3;
  color: #a9a29a;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* One person's card. */
.tour-back {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: none;
  color: #c9c1b8;
  font: 700 12.5px 'Manrope', sans-serif;
  cursor: pointer;
}
.tour-back:hover { color: #fff; }
.tour-figure-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0 0 10px;
  padding-right: 30px;
}
.tour-figure-head h2 { margin: 4px 0 2px; }
.tour-figure-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9c1b8;
}
.tour-figure-group::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--g);
}
.tour-figure-role { margin: 0; font-size: 12.5px; line-height: 1.4; color: #a9a29a; }
.tour-links {
  list-style: none;
  margin: 4px 0 12px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.tour-links li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
  border-left: 3px solid #9a9087;
  font-size: 12px;
  color: #c9c1b8;
}
.tour-links li.net-feud { border-left-color: #d68a2e; }
.tour-links li.net-kill { border-left-color: #c0392b; }
.tour-links li.net-witness { border-left-color: #4f8fc4; }
.tour-links button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px 2px 2px;
  border: 1px solid #4a4440;
  border-radius: 999px;
  background: none;
  color: #fff;
  font: 700 12px 'Manrope', sans-serif;
  cursor: pointer;
}
.tour-links button:hover { border-color: var(--dossier, #c0392b); }
.tour-figure-cases { display: grid; gap: 4px; margin: 0 0 10px; }
.tour-figure-cases .tour-people-label { margin-bottom: 2px; }
.tour-figure-cases button {
  text-align: left;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #e9e1d8;
  font: 600 12.5px/1.35 'Manrope', sans-serif;
  cursor: pointer;
}
.tour-figure-cases button b { color: color-mix(in srgb, var(--dossier, #c0392b) 45%, #fff); margin-right: 4px; }
.tour-figure-cases button:hover { background: rgba(255, 255, 255, 0.12); }
.tour-credit { margin: 0 0 10px; font-size: 10.5px; color: #8f877f; }

/* The strip under the card: a dot per case at its date, years under it,
   and the button for the big timeline. */
.tour-timeline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 4px;
  border-top: 1px solid #332e2b;
}
.tour-timeline-open {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #4a4440;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f4efe8;
  font: 800 12px 'Manrope', sans-serif;
  cursor: pointer;
}
.tour-timeline-open:hover,
.tour-timeline-open:focus-visible { border-color: var(--dossier, #c0392b); background: rgba(255, 255, 255, 0.12); }
.tour-track {
  position: relative;
  flex: 1;
  height: 34px;
}
.tour-track::before,
.tour-track-done {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 11px;
  height: 3px;
  border-radius: 2px;
  background: #3a3433;
}
.tour-track-done {
  right: auto;
  background: color-mix(in srgb, var(--dossier, #c0392b) 70%, #3a3433);
  transition: width 0.35s ease;
}
.tour-track-year {
  position: absolute;
  top: 20px;
  transform: translateX(-50%);
  font-size: 10.5px;
  font-weight: 700;
  color: #8f877f;
  pointer-events: none;
}
.tour-tick {
  position: absolute;
  top: 12.5px;
  width: 11px;
  height: 11px;
  margin: -5.5px 0 0 -5.5px;
  padding: 0;
  border: 2px solid #181513;
  border-radius: 50%;
  background: #6b635e;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
/* A bigger target for fingers. */
.tour-tick::after { content: ''; position: absolute; inset: -10px -4px; }
.tour-tick.is-seen { background: color-mix(in srgb, var(--dossier, #c0392b) 65%, #6b635e); }
.tour-tick.is-current {
  z-index: 2;
  background: var(--dossier, #c0392b);
  transform: scale(1.7);
  box-shadow: 0 0 0 1.5px #fff;
}
.tour-tick:hover { transform: scale(1.5); z-index: 3; }

/* The big timeline, in the middle of the screen. */
.tour-tl {
  position: fixed;
  inset: 0;
  z-index: 1950;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(10, 9, 8, 0.62);
  backdrop-filter: blur(3px);
}
.tour-tl[hidden] { display: none; }
.tour-tl-box {
  width: min(720px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: #181513;
  color: #f4efe8;
  font-family: 'Manrope', sans-serif;
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: tour-tl-in 0.22s ease-out;
}
@keyframes tour-tl-in {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: none; }
}
.tour-tl-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 14px;
  border-bottom: 1px solid #332e2b;
}
.tour-tl-head h2 { margin: 4px 0 6px; font: 400 28px/1.15 Georgia, serif; color: #fff; }
.tour-tl-head h2 span { font-size: 18px; color: #a9a29a; }
.tour-tl-head p { margin: 0; font-size: 13px; line-height: 1.45; color: #a9a29a; }
.tour-tl-head .dossier-tour-close { position: static; flex: none; }
.tour-tl-list {
  list-style: none;
  margin: 0;
  padding: 8px 24px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.tour-tl-year {
  position: sticky;
  top: -8px;
  z-index: 1;
  padding: 14px 0 6px;
  background: linear-gradient(#181513 75%, rgba(24, 21, 19, 0));
}
.tour-tl-year span { font: 400 30px/1 Georgia, serif; color: color-mix(in srgb, var(--dossier, #c0392b) 55%, #fff); }
.tour-tl-chapter button {
  display: block;
  width: 100%;
  margin: 14px 0 6px;
  padding: 12px 14px;
  border: 0;
  border-left: 4px solid var(--dossier, #c0392b);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: 400 19px/1.3 Georgia, serif;
  text-align: left;
  cursor: pointer;
}
.tour-tl-chapter small {
  display: block;
  margin-bottom: 2px;
  font: 800 10.5px 'Manrope', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a9a29a;
}
.tour-tl-chapter button:hover,
.tour-tl-chapter.is-current button { background: color-mix(in srgb, var(--dossier, #c0392b) 30%, #181513); }
.tour-tl-case button {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 9px 10px;
  margin: 0 0 2px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #e9e1d8;
  text-align: left;
  cursor: pointer;
}
.tour-tl-case button:hover,
.tour-tl-case button:focus-visible { background: rgba(255, 255, 255, 0.07); }
.tour-tl-case.is-current button { background: color-mix(in srgb, var(--dossier, #c0392b) 34%, #181513); box-shadow: inset 0 0 0 1px var(--dossier, #c0392b); }
.tour-tl-date { font-size: 13px; font-weight: 700; color: #b9b1a9; }
.tour-tl-what { font-size: 15px; line-height: 1.4; }
.tour-tl-case img,
.tour-tl-case i {
  width: 64px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
  background: #2a2522;
}
.tour-tl-case i { display: block; background: none; }
.tour-tl-case.is-seen .tour-tl-date::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--dossier, #c0392b);
  vertical-align: 1px;
}
.tour-tl-event {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  padding: 8px 10px;
  color: #8f877f;
}
.tour-tl-event .tour-tl-what { font-size: 14px; font-style: italic; }
body.tour-tl-on { overflow: hidden; }

/* The main characters: one story per card. */
.tour-stories { display: grid; gap: 10px; margin: 4px 0 12px; }
.tour-story {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 0;
  border: 1px solid #3c3633;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #f4efe8;
  text-align: left;
  font-family: 'Manrope', sans-serif;
  overflow: hidden;
  cursor: pointer;
}
.tour-story:hover,
.tour-story:focus-visible { border-color: var(--dossier, #c0392b); background: rgba(255, 255, 255, 0.08); }
.tour-story-media {
  position: relative;
  min-height: 104px;
  background: #2a2522;
}
.tour-story-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tour-story-media.is-faces { display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, #3a3430, #201c1a); }
.tour-story-faces { position: absolute; left: 8px; bottom: 8px; display: flex; }
.tour-story-media.is-faces .tour-story-faces { position: static; }
.tour-story-faces .tour-portrait { width: 38px; height: 38px; font-size: 13px; margin-right: -8px; box-shadow: 0 0 0 2px #181513, 0 0 0 4px var(--g, #8a8178); }
.tour-story-body { display: flex; flex-direction: column; gap: 3px; padding: 11px 12px 11px 0; min-width: 0; }
.tour-story-body small { font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; color: color-mix(in srgb, var(--dossier, #c0392b) 45%, #fff); }
.tour-story-body b { font: 400 18px/1.2 Georgia, serif; color: #fff; }
.tour-story-body > span { font-size: 12.5px; line-height: 1.4; color: #c9c1b8; }
.tour-story-body em { font-style: normal; font-size: 11.5px; font-weight: 700; color: #8f877f; }
/* The first story is the big one, with its photo on top. */
.tour-story.is-featured { grid-template-columns: 1fr; gap: 0; }
.tour-story.is-featured .tour-story-media { height: 200px; }
.tour-story.is-featured .tour-story-media img { object-position: 50% 30%; }
.tour-story.is-featured .tour-story-faces { left: 14px; bottom: -22px; }
.tour-story.is-featured .tour-story-faces .tour-portrait { width: 58px; height: 58px; font-size: 18px; margin-right: -10px; }
.tour-story.is-featured .tour-story-body { padding: 30px 14px 14px; }
.tour-story.is-featured .tour-story-body b { font-size: 23px; }

/* The faces in a story, large. */
.tour-faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; margin: 4px 0 14px; }
.tour-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: 1px solid #3c3633;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #f4efe8;
  font-family: 'Manrope', sans-serif;
  text-align: center;
  cursor: pointer;
}
.tour-face:hover,
.tour-face:focus-visible { border-color: var(--dossier, #c0392b); }
.tour-face .tour-portrait { width: 76px; height: 76px; margin-bottom: 4px; font-size: 22px; }
.tour-face b { font-size: 13px; }
.tour-face span:not(.tour-portrait) { font-size: 11px; line-height: 1.3; color: #a9a29a; }
.tour-portrait.is-large { width: 92px; height: 92px; font-size: 26px; }
.tour-story-chip { padding: 6px 12px; }
.tour-address { margin: -4px 0 10px; font-size: 12.5px; font-weight: 700; color: #a9a29a; }
.tour-kicker-glyph { display: inline-flex; vertical-align: -2px; margin-right: 6px; }

/* Photos: bigger, a tap shows them large, arrows on a carousel. */
.tour-shot-open { display: block; width: 100%; padding: 0; border: 0; background: #111; cursor: zoom-in; }
.tour-gallery { position: relative; }
.tour-gallery.is-tall .tour-shot img { height: 250px; }
.tour-strip-arrow {
  position: absolute;
  top: 105px;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.tour-gallery.is-tall .tour-strip-arrow { top: 125px; }
.tour-strip-arrow.is-prev { left: 10px; }
.tour-strip-arrow.is-next { right: 10px; }
.tour-strip-arrow:disabled { opacity: 0; pointer-events: none; }
.tour-strip-arrow:hover { background: var(--dossier, #c0392b); }
.tour-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 64px;
  background: rgba(8, 7, 6, 0.92);
  cursor: zoom-out;
}
.tour-lightbox[hidden] { display: none; }
.tour-lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.tour-lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 6px; }
.tour-lightbox figcaption { margin-top: 10px; max-width: 760px; font: 13px/1.45 'Manrope', sans-serif; color: #d8d1c9; text-align: center; }
.tour-lightbox figcaption span { color: #8f877f; margin-left: 6px; }
.tour-lightbox .dossier-tour-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; font-size: 15px; }
.tour-lightbox-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}
.tour-lightbox-arrow.is-prev { left: 12px; }
.tour-lightbox-arrow.is-next { right: 12px; }

/* Places of the time: a round pin with what it was, and its name. */
.tour-place {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  background: none;
  border: 0;
  cursor: pointer;
}
.tour-place-pin {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2b2724;
  color: #f4d58d;
  border: 2px solid #f4d58d;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s;
}
.tour-place.is-police .tour-place-pin { color: #9cc7f0; border-color: #9cc7f0; }
.tour-place.is-court .tour-place-pin { color: #e9e1d8; border-color: #e9e1d8; }
.tour-place.is-prison .tour-place-pin { color: #c3b6aa; border-color: #c3b6aa; }
.tour-place:hover .tour-place-pin,
.tour-place:focus-visible .tour-place-pin { transform: scale(1.12); }
.tour-place-name {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(24, 21, 19, 0.85);
  color: #fff;
  font: 700 11px 'Manrope', sans-serif;
}
.tour-place.is-current .tour-place-pin { background: var(--dossier, #c0392b); color: #fff; border-color: #fff; transform: scale(1.15); }
.tour-place.is-current .tour-place-name { background: var(--dossier, #c0392b); }
.tour-place-glyph { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #2b2724; color: #f4d58d; }
.tour-place-chip.is-police .tour-place-glyph { color: #9cc7f0; }
.tour-place-chip.is-court .tour-place-glyph { color: #e9e1d8; }

/* A case the tour reaches drops onto the map. */
.leaflet-marker-icon.tour-drop > * {
  animation: tour-drop 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) both;
  transform-origin: 50% 100%;
}
@keyframes tour-drop {
  from { opacity: 0; transform: translateY(-26px) scale(0.6); }
  to { opacity: 1; transform: none; }
}

/* The year the tour is at, large, in the corner of the map. */
.tour-yearmark {
  position: fixed;
  left: 64px;
  bottom: 22px;
  z-index: 900;
  display: none;
  flex-direction: column;
  pointer-events: none;
  color: #2b2724;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
body.tour-on .tour-yearmark:not([hidden]) { display: flex; }
.tour-yearmark b { font: 400 78px/0.95 Georgia, serif; letter-spacing: -0.02em; opacity: 0.85; }
.tour-yearmark.is-long b { font-size: 44px; }
.tour-places-far .tour-place-name { display: none; }
.tour-places-far .tour-place:hover .tour-place-name,
.tour-places-far .tour-place:focus-visible .tour-place-name,
.tour-places-far .tour-place.is-current .tour-place-name { display: inline; }
.tour-yearmark span { font: 800 12px 'Manrope', sans-serif; letter-spacing: 0.04em; opacity: 0.75; }
body.map-dark .tour-yearmark { color: #f4efe8; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }
/* The light map gets the tint of an old photograph during the tour. */
body.tour-on:not(.map-dark) .leaflet-tile-pane { filter: sepia(0.38) saturate(0.85) brightness(0.98); transition: filter 0.6s; }
@media (max-width: 768px) {
  .tour-yearmark { left: 14px; top: 76px; bottom: auto; }
  .tour-yearmark b, .tour-yearmark.is-long b { font-size: 40px; }
  .tour-yearmark span { font-size: 11px; }
  .tour-place-name { display: none; }
  .tour-place.is-current .tour-place-name { display: inline; }
  .tour-gallery.is-tall .tour-shot img { height: 190px; }
  .tour-gallery.is-tall .tour-strip-arrow { top: 95px; }
  .tour-strip-arrow { display: none; }
  .tour-story { grid-template-columns: 92px minmax(0, 1fr); }
  .tour-story-media { min-height: 92px; }
  .tour-story.is-featured .tour-story-media { height: 170px; }
  .tour-story-body b { font-size: 16.5px; }
  .tour-faces { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .tour-face .tour-portrait { width: 60px; height: 60px; }
  .tour-face span:not(.tour-portrait) { display: none; }
  .tour-timeline { padding: 10px 12px 2px; gap: 10px; }
  .tour-timeline-open span { display: none; }
  .tour-timeline-open { width: 34px; padding: 0; justify-content: center; }
  .tour-tl { padding: 0; align-items: stretch; }
  .tour-tl-box { border-radius: 0; height: 100%; width: 100%; }
  .tour-tl-head { padding: calc(14px + env(safe-area-inset-top)) 16px 12px; }
  .tour-tl-head h2 { font-size: 24px; }
  .tour-tl-list { padding: 4px 12px calc(24px + env(safe-area-inset-bottom)); }
  .tour-tl-case button { grid-template-columns: minmax(0, 1fr) 56px; gap: 4px 12px; }
  .tour-tl-case .tour-tl-date { grid-column: 1; font-size: 12px; }
  .tour-tl-case .tour-tl-what { grid-column: 1; font-size: 14.5px; }
  .tour-tl-case img, .tour-tl-case i { grid-column: 2; grid-row: 1 / span 2; width: 56px; height: 42px; }
  .tour-tl-event { grid-template-columns: 1fr; gap: 2px; }
  .tour-lightbox { padding: 16px 8px; }
  .tour-lightbox-arrow { top: auto; bottom: 18px; }
}
@media (min-width: 769px) {
  .dossier-tour { width: 440px; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-tl-box, .leaflet-marker-icon.tour-drop > * { animation: none; }
  .tour-track-done { transition: none; }
}


/* The network over the map. */
.tour-network {
  position: fixed;
  inset: 0;
  z-index: 1900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 9, 8, 0.6);
  backdrop-filter: blur(2px);
}
.tour-network[hidden] { display: none; }
.tour-network-box {
  position: relative;
  width: min(1060px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #fbf8f4;
  color: #2b2724;
  font-family: 'Manrope', sans-serif;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  --net-bg: #fbf8f4;
}
.tour-network-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 8px;
}
.tour-network-head h2 { margin: 4px 0 0; font: 400 22px Georgia, serif; }
.tour-network-head .dossier-tour-kicker { color: var(--dossier, #c0392b); }
.tour-network-head .dossier-tour-close { position: static; flex: none; }
.tour-network-body {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 16px;
  padding: 0 20px 20px;
  overflow-y: auto;
}
.tour-network-map { min-width: 0; }
.tour-network-map .net-svg { max-height: calc(100vh - 220px); }
.tour-network .net-node { cursor: pointer; outline: none; transition: opacity 0.2s; }
.tour-network .net-node:hover .net-ring,
.tour-network .net-node:focus-visible .net-ring { stroke-width: 6; }
.tour-network .net-node.is-on .net-ring { stroke-width: 6; filter: drop-shadow(0 0 4px var(--g)); }
.tour-network .net-node.is-dim,
.tour-network .net-edge.is-dim { opacity: 0.18; }
.tour-network .net-edge { transition: opacity 0.2s; }
.tour-network .net-edge.is-on line { stroke-width: 3.2; }
/* The card beside the drawing: the tour's dark card. */
.tour-network-card {
  align-self: start;
  border-radius: 14px;
  background: #181513;
  color: #f4efe8;
  padding: 16px 16px 6px;
  scroll-margin-top: 8px;
}
.tour-network-card h2 { margin: 4px 0 2px; font: 400 19px/1.25 Georgia, serif; color: #fff; }
.tour-network-card .dossier-tour-text p { font-size: 13px; }
body.tour-network-on { overflow: hidden; }

@media (max-width: 768px) {
  .tour-shot img { height: 150px; }
  .tour-cast { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .tour-cast-card { padding: 8px 4px 7px; }
  .tour-cast-card .tour-portrait { width: 46px; height: 46px; }
  .tour-cast-card span:not(.tour-portrait) { display: none; }
  .tour-portrait { width: 54px; height: 54px; }
  .tour-network { padding: 0; align-items: stretch; }
  .tour-network-box { border-radius: 0; max-height: none; height: 100%; }
  .tour-network-head { padding: 12px 14px 4px; }
  .tour-network-body { grid-template-columns: 1fr; padding: 0 12px calc(16px + env(safe-area-inset-bottom)); }
  .tour-network-map .net-svg { max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-tick, .tour-strip-dots i, .tour-network .net-node, .tour-network .net-edge { transition: none; }
}

/* The candle under a story: on case pages and in the map's story sheet
   (src/views.js draws it). Appended to case.css and map.css by the build. */
.candle[hidden] { display: none; }
.candle {
  margin: 26px 0 0;
}
.candle-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px 12px 14px;
  font-family: 'Manrope', sans-serif;
  text-align: left;
  color: #2b2724;
  background: transparent;
  border: 1px solid #d8cfc4;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.candle-btn:hover:not(:disabled) { border-color: #a99d8f; background: rgba(0, 0, 0, 0.025); }
.candle-btn:focus-visible { outline: 2px solid #7b211a; outline-offset: 2px; }
.candle-btn.is-lit, .candle-btn:disabled { cursor: default; color: #2b2724; opacity: 1; }
.candle-text { display: flex; flex-direction: column; gap: 3px; }
.candle-action { font-size: 15px; font-weight: 700; }
.candle-count { font-size: 12px; font-weight: 600; color: #8a8178; }

/* The drawing: a wax candle with a wick, and a flame that only burns once lit. */
.candle-svg { width: 40px; height: 70px; flex: none; overflow: visible; }
.candle-svg .wax { fill: #f1e9dc; stroke: #bfae98; stroke-width: 1; }
.candle-svg .wick { stroke: #4a4038; stroke-width: 1.6; stroke-linecap: round; }
.candle-svg .flame { transform-origin: 15px 20px; transform: scale(0); opacity: 0; transition: transform 0.5s ease-out, opacity 0.3s ease-out; }
.candle-svg .flame-outer { fill: #f39c34; }
.candle-svg .flame-inner { fill: #ffe7a3; }
.candle-svg .halo { transform-origin: 15px 13px; fill: #ffcf73; opacity: 0; transition: opacity 0.6s ease-out; }
.candle-btn:hover:not(:disabled) .flame { transform: scale(0.35); opacity: 0.35; }
.is-lit .candle-svg .flame { transform: scale(1); opacity: 1; animation: candle-flicker 1.8s ease-in-out infinite; }
.is-lit .candle-svg .halo { opacity: 0.28; animation: candle-halo 3.2s ease-in-out infinite; }
.is-lit .candle-svg .wax { fill: #fbf6ee; }

@keyframes candle-flicker {
  0%, 100% { transform: scale(1, 1) rotate(-2deg); }
  20% { transform: scale(1.04, 0.95) rotate(2deg); }
  45% { transform: scale(0.96, 1.07) rotate(-1deg); }
  70% { transform: scale(1.03, 0.98) rotate(1.5deg); }
}
@keyframes candle-halo {
  0%, 100% { opacity: 0.22; transform: scale(1); }
  50% { opacity: 0.36; transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .is-lit .candle-svg .flame,
  .is-lit .candle-svg .halo { animation: none; }
}


    .net-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: Manrope, sans-serif; }
    .net-edge line { stroke: #9a9087; stroke-width: 2; }
    .net-edge.net-feud line { stroke: #d68a2e; stroke-dasharray: 7 5; }
    .net-edge.net-kill line { stroke: #c0392b; stroke-width: 2.4; }
    .net-edge.net-witness line { stroke: #4f8fc4; stroke-dasharray: 2 4; stroke-linecap: round; }
    .net-arrow-kill { fill: #c0392b; }
    .net-arrow-witness { fill: #4f8fc4; }
    .net-label { font-size: 10px; font-weight: 700; fill: #6b645e; paint-order: stroke; stroke: var(--net-bg, #fbf8f4); stroke-width: 4px; stroke-linejoin: round; }
    .net-disc { fill: #e7dfd5; }
    .net-ring { fill: none; stroke: var(--g); stroke-width: 4; }
    .net-initials { font-size: 19px; font-weight: 800; fill: #5f5a55; }
    .net-name { font-size: 12px; font-weight: 800; fill: #2b2724; paint-order: stroke; stroke: var(--net-bg, #fbf8f4); stroke-width: 4px; stroke-linejoin: round; }
    .net-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0 0; font: 600 12.5px/1.4 Manrope, sans-serif; color: #5f5a55; }
    .net-key { display: inline-flex; align-items: center; gap: 6px; }
    .net-dot { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--g); box-sizing: border-box; }
    .net-line { width: 22px; height: 0; border-top: 2px solid #9a9087; }
    .net-line.net-feud { border-top: 2px dashed #d68a2e; }
    .net-line.net-kill { border-top: 2.4px solid #c0392b; }
    .net-line.net-witness { border-top: 2px dotted #4f8fc4; }
    @media (max-width: 560px) { .net-label { display: none; } }