/* =============================================================
   barrio_npm_prototype — Story modal (#np-story-modal)
   Shared chrome — rail related-stories cards (project + person pages).
   JS: js/detail-modals.js (barrioNpmStoryModal).
   (Extracted from project-detail.css.)
   ============================================================= */

/* ---------- Story modal ----------
   Click-to-expand modal for the rail's related-stories card. Same
   template-clone mechanism as the researcher modal (js/detail-modals.js
   barrioNpmStoryModal behaviour). The hero image floats left so the
   body text wraps around it — short stories sit alongside the image,
   longer stories continue underneath once they pass its bottom edge.
   `clear: both` on the view-full-article link forces it below the
   image regardless of body length. At <576px the float collapses
   and the hero stacks above the body. */
.np-story-modal .modal-content {
  background: #fff;
  border: 0;
  border-top: 4px solid var(--hue);
  border-radius: 8px;
  padding: 28px 32px 24px;
  position: relative;
}
.np-story-modal .np-story-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  opacity: .7;
}
.np-story-modal .np-story-close:hover {
  opacity: 1;
}
/* Clearfix the slot so the floated hero doesn't escape it. */
.np-story-modal-slot::after {
  content: '';
  display: block;
  clear: both;
}
.np-story-modal-kicker {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--hue-dk);
  margin-bottom: 6px;
}
.np-story-modal-title {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.2px;
  margin: 0 0 16px;
  color: #2c2c2b;
}
/* Floated hero — body text wraps around its right edge. 400px matches
   the 400_x_300_px image style so the rendered image stays at native
   width (no upscaling). */
.np-story-modal-hero {
  float: left;
  width: 400px;
  margin: 4px 24px 12px 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f1ece1;
}
.np-story-modal-hero img {
  display: block;
  width: 100%;
  height: auto;
}
.np-story-modal-body {
  font-size: 14.5px;
  line-height: 1.6;
  color: #2c2c2b;
}
.np-story-modal-body p {
  margin: 0 0 12px;
}
.np-story-modal-body p:last-child {
  margin-bottom: 0;
}
.np-story-modal-body a {
  color: var(--hue-dk);
}
.np-story-modal-body a:hover {
  text-decoration: underline;
}
.np-story-modal-body ul,
.np-story-modal-body ol {
  margin: 0 0 12px;
  padding-left: 22px;
}
/* clear: both forces this link below the floated hero so it always
   sits at the bottom of the modal, regardless of body length. */
.np-story-modal-link {
  clear: both;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid #e4e0d8;
}
.np-story-modal-link a {
  font-weight: 700;
  color: var(--hue-dk);
  text-decoration: none;
}
.np-story-modal-link a:hover {
  text-decoration: underline;
}

@media (max-width: 575.98px) {
  /* Drop the float and stack hero above body at phone width — the
     wrap-zone would be too narrow to read. */
  .np-story-modal .modal-content {
    padding: 22px 22px 18px;
  }
  .np-story-modal-hero {
    float: none;
    width: 100%;
    margin: 0 0 16px 0;
  }
  .np-story-modal-title {
    font-size: 18px;
  }
}
