/* =============================================================
   barrio_npm_prototype — article (announcement) detail pages

   Three visual modes served by three templates:
     - node--article--our-stories.html.twig → showcase (hero, rail)
     - node--article--events.html.twig      → event card + body
     - node--article--news-archive.html.twig → compact news, meta strip

   Colour cascade via data-ct on the <article> — reuses the
   --np-ct-article-* tokens from css/colors.css (M6). data-ct also
   picks up the css/search.css --hue axis, so any shared chrome
   (badge, chip highlights) tints per class for free.
   ============================================================= */

/* --- Title band ------------------------------------------------ */

.np-article-detail {
  margin-bottom: 3rem;
  /* --hue axis for the shared .np-rail-inner top-accent bar (rail.css).
     Same per-class cascade the .np-article-band border-color + kicker
     colour already uses — one variant = one hue site-wide. */
  --hue:    var(--np-ct-article-news-dk);
  --hue-dk: var(--np-ct-article-news-dk);
}
.np-article-detail[data-ct="article-events"]      { --hue: var(--np-ct-article-events-dk);      --hue-dk: var(--np-ct-article-events-dk); }
.np-article-detail[data-ct="article-our-stories"] { --hue: var(--np-ct-article-our-stories-dk); --hue-dk: var(--np-ct-article-our-stories-dk); }
.np-article-detail[data-ct="article-archive"]     { --hue: #605c56;                              --hue-dk: #605c56; }

.np-article-band {
  padding-block: 2rem 1.5rem;
  border-bottom: 2px solid var(--np-ct-article-news);
  background: linear-gradient(180deg, #fff, #faf7f0);
  border-radius: 10px;
}
.np-article-detail[data-ct="article-events"]      .np-article-band { border-color: var(--np-ct-article-events); }
.np-article-detail[data-ct="article-our-stories"] .np-article-band { border-color: var(--np-ct-article-our-stories); }
.np-article-detail[data-ct="article-archive"]     .np-article-band { border-color: #8a857c; }

.np-article-band-inner { max-width: 900px; }
.np-article-kicker {
  font-size: .875rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--np-ct-article-news-dk);
}
.np-article-detail[data-ct="article-events"]      .np-article-kicker { color: var(--np-ct-article-events-dk); }
.np-article-detail[data-ct="article-our-stories"] .np-article-kicker { color: var(--np-ct-article-our-stories-dk); }
.np-article-detail[data-ct="article-archive"]     .np-article-kicker { color: #605c56; }

.np-article-title {
  margin: .5rem 0 0;
  font-size: 2.25rem; line-height: 1.2; font-weight: 700;
  color: #2c2c2b;
}
.np-article-posted {
  display: inline-block; margin-top: .5rem;
  font-size: .875rem; color: #6c6a63;
}

/* --- Hero (Our Stories big; Events / News-Archive compact) ---- */

.np-article-hero {
  margin: 1.5rem 0;
  max-width: 900px;
}
.np-article-hero img {
  width: 100%; height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(40,40,40,.08), 0 10px 30px rgba(40,40,40,.09);
}
.np-article-hero--compact { max-width: 700px; }
.np-article-hero--compact img { max-height: 340px; object-fit: cover; }
.np-article-hero-caption {
  margin-top: .5rem;
  font-size: .875rem; color: #6c6a63; font-style: italic;
}

/* --- Body ------------------------------------------------------ */

/* No max-width cap — body fills the content column so prose aligns
   with the article hero image above (2026-10-15). The parent layout
   provides a bounding width. */
.np-article-body {
  margin-block: 1.5rem;
  font-size: 1.0625rem; line-height: 1.65;
  color: #2c2c2b;
  /* Guard against long URLs / unbreakable tokens blowing out the
     column — wrap mid-token when no natural break opportunity fits. */
  overflow-wrap: anywhere;
}
.np-article-body p { margin: 0 0 1rem; }
.np-article-body h2, .np-article-body h3 {
  margin-top: 1.75rem; margin-bottom: .5rem;
  font-weight: 700;
}
.np-article-body a { color: var(--np-ct-article-news-dk); text-decoration: underline; }
/* Embedded images cap at 720px (the former body-prose cap) so wide
   article columns don't render huge editor-pasted images. `min(100%,
   720px)` ensures the image still shrinks on narrow viewports. Centered
   via margin:auto + display:block since the image is often narrower
   than the body column now. */
.np-article-body img {
  max-width: min(100%, 720px);
  height: auto;
  display: block;
  margin: 1rem auto;
  border-radius: 4px;
}

/* --- Related links / attachments common blocks --------------- */

.np-article-related-links,
.np-article-media {
  max-width: 720px;
  margin-block: 2rem;
}
.np-article-related-links h2,
.np-article-media h2 {
  font-size: 1.125rem; font-weight: 600;
  margin: 0 0 .75rem;
  color: #2c2c2b;
}
.np-article-related-links ul {
  list-style: none; padding: 0; margin: 0;
}
.np-article-related-links li { margin: .375rem 0; }
.np-article-related-links a { color: var(--np-ct-article-news-dk); }

/* --- Event card (events template) ----------------------------- */

.np-event-card {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  border: 1px solid var(--np-ct-article-events);
  background: linear-gradient(135deg, #fff, #fbf3ec);
  max-width: 900px;
}
.np-event-card-body {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem;
  font-size: 1.0625rem;
}
.np-event-when, .np-event-where {
  display: inline-flex; gap: .5rem; align-items: center;
  color: #2c2c2b; font-weight: 600;
}
.np-event-icon { font-size: 1.125rem; }
.np-event-cta {
  display: inline-flex; align-items: center;
  padding: .625rem 1.125rem;
  background: var(--np-ct-article-events-dk);
  color: #fff; text-decoration: none;
  border-radius: 6px; font-weight: 600;
  transition: background .15s;
}
.np-event-cta:hover {
  background: var(--np-ct-article-events);
  color: #fff;
}

/* --- Our Stories layout — content column + rail --------------- */

/* Two-column body layout — content + rail. Extended 2026-08-19 from
   `.np-article-detail--our-stories` scope to all three article variants
   per node-header-unification-plan.md §D5+. Events + news-archive
   now share the same rail skeleton via _article-rail.html.twig. */
.np-article-detail .np-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 2rem;
  margin-block: 1.5rem;
}
@media (max-width: 900px) {
  .np-article-detail .np-article-layout {
    grid-template-columns: 1fr;
  }
  /* Mobile-first meta-first: reverse column visual order so phone users
     see the meta rail (posted/event date, related links, chips) + files
     BEFORE the body prose. Standard action-first pattern — screen-reader
     DOM order (body → rail) stays semantically defensible since the body
     is self-contained narrative and the rail is supplementary meta. */
  .np-article-detail .np-article-content { order: 2; }
  .np-article-detail .np-article-rail    { order: 1; }
}

/* .np-article-rail-links retired 2026-08-19 — related-links list now
   uses the shared _link-list.html.twig partial (.np-link-list styling
   in project-detail.css) with its external-link ↗ arrow + link-modal
   behaviour, matching project / person / publication rails. */

/* .np-article-rail — positioning wrapper only. The shared .np-rail-inner
   (rail.css) provides the box chrome (bg, border, top-accent, padding,
   radius). Retired 2026-08-19: the earlier `.np-article-rail` +
   `.np-article-rail-row` + `.np-article-rail-label` + `.np-article-rail-badge`
   local rules — all replaced by the shared `.np-rail-inner` / `.np-rail-row`
   / `.np-rail-key` chrome from rail.css. */
.np-article-rail {
  min-width: 0;
}

/* Files block — sits inside .np-article-rail but outside .np-rail-inner,
   so downloads appear below the compact rail box with a subtle top-border
   separator rather than boxed chrome. Mirrors .np-grant-detail-files
   from grant-detail.css. Kept adjacent to the rail (not in the content
   column) so users don't have to scroll past the body to reach downloads. */
.np-article-detail-files {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e4e0d8;
}
.np-article-detail-files-head {
  margin: 0 0 .75rem;
  font-size: 1.125rem; font-weight: 700;
  color: var(--hue-dk);
}

.np-article-rail-chips {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: .375rem;
}
.np-article-rail-chips li {
  padding: .1875rem .5rem;
  background: #fff;
  border: 1px solid #e4e0d8;
  border-radius: 4px;
  font-size: .8125rem;
  color: #2c2c2b;
}

/* --- Videos grid (Our Stories) -------------------------------- */

.np-article-video-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.np-article-video {
  display: block; text-decoration: none; color: inherit;
  border-radius: 6px; overflow: hidden;
  background: #f3ede0;
}
.np-article-video img { width: 100%; height: auto; display: block; }
.np-article-video-title {
  display: block; padding: .625rem;
  font-size: .9375rem; font-weight: 600;
}

/* --- Compact meta strip (Events, News, Archive) -------------- */

.np-article-meta-strip {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-top: 2.5rem; padding-top: 1rem;
  border-top: 1px solid #e4e0d8;
  align-items: center;
}
.np-article-chip {
  padding: .1875rem .625rem;
  background: #f3ede0;
  border-radius: 4px;
  font-size: .8125rem;
  color: #2c2c2b;
}

/* .np-article-posted-strip retired 2026-08-19 per D7 — posted date
   moved to the hero meta-slot (.np-hero__meta text item). */
