/* =============================================================
   barrio_npm_prototype — publication detail page

   node--featured-publication--canonical (+ arotahi / newsletter /
   e-pānui detail sharing the layout): header band, two-column
   content|rail grid, cover-as-modal-trigger, body/keywords, the
   files-section wrapper, and the e-pānui read-online CTA. The
   shared file list + viewer modal live in attachment-modal.css.
   (Extracted from detail.css.)
   ============================================================= */

/* E-Pānui .np-epanui-cta moved to css/e-panui-detail.css 2026-07-14
   per per-content-type file convention (css-organisation.md §2).
   The shared .np-epanui-rail selector inclusions (grouped with the
   featured_publication / arotahi / newsletter rails) stay here — all
   four rails share identical treatment per D-1 in the refactor plan. */

/* Publication detail page (node--featured-publication--canonical). */
.np-publication-detail {
  padding: 24px 0 48px;
}
.np-pub-back {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 700;
  color: #6c675f;
  text-decoration: none;
}
.np-pub-back:hover {
  color: #2c2c2b;
}
/* .np-pub-detail-head + .np-pub-type + .np-pub-detail-subtitle retired
   2026-08-19 per Day 5 of node-header-unification-plan.md (see
   node-header-publication-family-plan.md §5A) — kicker + h1 + arotahi
   subtitle now render via the shared .np-hero from page.html.twig
   (subtitle hoisted to np_hero_meta). .np-pub-detail-title rule
   further down in this file (line ~119) retired in the same pass. */

/* Two-column layout — content (cover + body + files + links) beside the facts
   rail. Same shape as np-person-layout / np-project-layout. */
.np-publication-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 50px;
}
.np-publication-content,
.np-featured-publication-rail,
.np-arotahi-rail,
.np-newsletter-rail,
.np-epanui-rail {
  min-width: 0;
}

/* Cover floats left of the body inside the content column. */
.np-publication-content .np-pub-detail-cover {
  float: left;
  width: 170px;
  margin: 4px 24px 12px 0;
}
.np-pub-detail-cover img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(44, 44, 43, .22);
}
/* Cover as a trigger — opens the first attached file in the viewer modal. */
.np-pub-cover-view {
  position: relative;
  display: block;
  cursor: pointer;
}
.np-pub-cover-cue {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(44, 44, 43, .72);
  color: #fff;
  font-size: 15px;
  opacity: 0;
  transition: opacity .12s;
}
.np-pub-cover-view:hover .np-pub-cover-cue,
.np-pub-cover-view:focus-visible .np-pub-cover-cue {
  opacity: 1;
}
.np-pub-cover-view:hover img {
  box-shadow: 0 4px 18px rgba(44, 44, 43, .3);
}
.np-pub-cover-view:focus-visible {
  outline: 2px solid var(--hue, #6c675f);
  outline-offset: 2px;
}
/* Files / links clear the floated cover so they start on a fresh line. */
.np-pub-detail-files,
.np-pub-detail-links {
  clear: left;
}
/* .np-pub-detail-title retired 2026-08-19 per Day 5 — title now
   renders as .np-hero__title chip. */
.np-pub-detail-link {
  display: inline-block;
  margin-bottom: 18px;
  padding: 9px 18px;
  border-radius: 8px;
  background: #2c2c2b;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.np-pub-detail-link:hover {
  background: #4c4842;
  color: #fff;
}
.np-pub-detail-body {
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}
.np-pub-detail-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.np-pub-kw {
  padding: 3px 10px;
  border-radius: 12px;
  background: #ece7dd;
  font-size: 12px;
  color: #6c675f;
}

/* Attached-files section wrapper on the publication detail page (the shared
   .np-file-* list itself lives in attachment-modal.css). */
.np-pub-detail-files {
  margin-top: 24px;
}
.np-pub-detail-files-head {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #6c675f;
}

@media (max-width: 880px) {
  /* Rail stacks above the content, matching the project page's mobile order. */
  .np-publication-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .np-featured-publication-rail,
  .np-arotahi-rail,
  .np-newsletter-rail,
  .np-epanui-rail {
    order: -1;
  }
}
@media (max-width: 640px) {
  .np-publication-content .np-pub-detail-cover {
    float: none;
    width: 160px;
    margin: 0 0 16px;
  }
}
