/* =============================================================
   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 detail — the read-online CTA at the top of the content column. */
.np-epanui-cta {
  display: inline-block;
  margin: 0 0 22px;
  padding: 11px 22px;
  border-radius: 8px;
  background: #2c2c2b;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.np-epanui-cta:hover {
  background: #4c4842;
  color: #fff;
}

/* 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;
}
/* Header band — type kicker + title (+ arotahi subtitle), full width above
   the content/rail layout (mirrors the person/project title header). */
.np-pub-detail-head {
  margin-bottom: 22px;
}
.np-pub-detail-head .np-pub-type {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8a8377;
}
.np-pub-detail-subtitle {
  margin: 6px 0 0;
  font-size: 17px;
  color: #575349;
}

/* 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 {
  margin: 0 0 10px;
  font-size: clamp(23px, 3.2vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  color: #2c2c2b;
}
.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;
  }
}
