
/* =========================================================
   RESEARCH MAP LOGIC + MARKER VISIBILITY v98
   Active card = active GOLD study-area marker.
   ========================================================= */

body[data-story-page="research"] .story-leaflet-icon{
  background:transparent!important;
  border:0!important;
  overflow:visible!important;
}

body[data-story-page="research"] .story-leaflet-icon span{
  display:grid!important;
  place-items:center!important;
  width:34px!important;
  height:34px!important;
  box-sizing:border-box!important;
  border-radius:50%!important;

  /* Inactive research markers remain visible but quiet. */
  background:#18354b!important;
  color:#fff!important;
  border:3px solid rgba(255,255,255,.98)!important;
  box-shadow:
    0 0 0 1px rgba(24,53,75,.18),
    0 4px 12px rgba(7,24,35,.22)!important;

  font-family:Arial,Helvetica,sans-serif!important;
  font-size:.76rem!important;
  line-height:1!important;
  font-weight:900!important;
  text-align:center!important;
  opacity:.94!important;
  transform:none!important;
  transition:
    transform .18s ease,
    background .18s ease,
    box-shadow .18s ease,
    opacity .18s ease!important;
}

/* Current research card/study area is always the GOLD marker. */
body[data-story-page="research"] .story-leaflet-icon.active span{
  background:#d99a28!important;
  color:#112b3c!important;
  border-color:#fff!important;
  opacity:1!important;
  transform:scale(1.16)!important;
  box-shadow:
    0 0 0 3px rgba(217,154,40,.22),
    0 6px 18px rgba(7,24,35,.30)!important;
}

/* Keep map UI and numbers above basemap labels/lines. */
body[data-story-page="research"] .leaflet-marker-pane{
  z-index:650!important;
}

body[data-story-page="research"] .leaflet-tooltip{
  max-width:300px;
  padding:6px 8px!important;
  border:1px solid rgba(24,53,75,.16)!important;
  border-radius:4px!important;
  background:rgba(255,255,255,.97)!important;
  color:#18354b!important;
  box-shadow:0 4px 14px rgba(7,24,35,.14)!important;
}

body[data-story-page="research"] .leaflet-tooltip strong{
  display:block;
  margin-bottom:2px;
  font-size:.72rem!important;
  line-height:1.3!important;
}

body[data-story-page="research"] .leaflet-tooltip span{
  display:block;
  max-width:270px;
  font-size:.66rem!important;
  line-height:1.35!important;
  color:#63717c!important;
}

/* Active chapter gets a subtle matching cue without adding another heading. */
body[data-story-page="research"] .story-chapter.is-active{
  border-color:color-mix(in srgb,#d99a28 42%,var(--line))!important;
}

@media(max-width:700px){
  body[data-story-page="research"] .story-leaflet-icon span{
    width:32px!important;
    height:32px!important;
    font-size:.72rem!important;
  }

  body[data-story-page="research"] .story-leaflet-icon.active span{
    transform:scale(1.12)!important;
  }
}
