/* =============================================================
   barrio_npm_prototype — people listing (by person_type)

   /people/<type-slug> — researchers:page_by_person_type. The view's
   html_list style wraps each row in <li class="col-md-6 col-lg-4 mb-3">
   (Bootstrap columns → responsive 1/2/3-up grid), so this styles only the
   .np-person-card that fills each column. Card data comes from
   Person\PersonCardBuilder → PersonProfileBuilder (shared with the project
   researcher modal); template templates/views/_person-card.html.twig.
   ============================================================= */

/* Listing page heading — rendered as the view header (see the
   page_by_person_type header area); the type name is the page <h1>. */
.np-listing-title {
  margin: 0 0 16px;
  font-weight: 700;
  font-size: clamp(23px, 3.4vw, 32px);
  line-height: 1.15;
  color: #2c2c2b;
}

/* Exposed search form on the per-role listing (people_search view) — sits
   between the <h1> and the card grid; a search input + Apply / Clear. Works
   the same standalone and inside the /our-people modal. */
.view-people-search .views-exposed-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 0 0 24px;
}
.view-people-search .views-exposed-form .js-form-item {
  flex: 1 1 260px;
  margin: 0;
}
.view-people-search .views-exposed-form .form-actions {
  display: flex;
  gap: 8px;
  margin: 0;
}
.view-people-search .form-search,
.view-people-search .views-exposed-form input[type="text"] {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid #d8d2c6;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
}
.view-people-search .form-search:focus,
.view-people-search .views-exposed-form input[type="text"]:focus {
  outline: none;
  border-color: var(--hue, #6c675f);
  box-shadow: 0 0 0 3px rgba(108, 103, 95, .14);
}
.view-people-search .views-exposed-form .button {
  padding: 9px 16px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.view-people-search .views-exposed-form .form-submit {
  background: #2c2c2b;
  color: #fff;
}
.view-people-search .views-exposed-form .form-submit:hover {
  background: #4c4842;
}
.view-people-search .views-exposed-form [id*="reset"] {
  background: #ece7dd;
  color: #2c2c2b;
}
.view-people-search .views-exposed-form [id*="reset"]:hover {
  background: #ddd6c8;
}

/* Pae / Pātai selects (Phase 3, Surface B) — derived research-area filters,
   sit beside the search box in the people_search exposed form. */
.view-people-search .views-exposed-form .form-item-search {
  flex: 1 1 240px;
}
.view-people-search .views-exposed-form .form-item-pae,
.view-people-search .views-exposed-form .form-item-patai {
  flex: 0 1 190px;
}
.view-people-search .views-exposed-form .form-item-pae > label,
.view-people-search .views-exposed-form .form-item-patai > label {
  display: block;
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #6c675f;
}
.view-people-search .views-exposed-form select {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid #d8d2c6;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.3;
  background: #fff;
  color: #2c2c2b;
  cursor: pointer;
}
.view-people-search .views-exposed-form select:focus {
  outline: none;
  border-color: var(--hue, #6c675f);
  box-shadow: 0 0 0 3px rgba(108, 103, 95, .14);
}

/* Project listing exposed form (project_search, Phase 2) — search box + the
   Type / Pae / Pātai / Theme / Priority selects, laid out like the people one. */
.view-project-search .views-exposed-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 0 0 24px;
}
.view-project-search .views-exposed-form .js-form-item {
  flex: 0 1 160px;
  margin: 0;
}
.view-project-search .views-exposed-form .form-item-search {
  flex: 1 1 220px;
}
.view-project-search .views-exposed-form .js-form-item > label {
  display: block;
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #6c675f;
}
.view-project-search .views-exposed-form select,
.view-project-search .views-exposed-form input[type="text"] {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid #d8d2c6;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.3;
  background: #fff;
  color: #2c2c2b;
}
.view-project-search .views-exposed-form select {
  cursor: pointer;
}
.view-project-search .views-exposed-form select:focus,
.view-project-search .views-exposed-form input[type="text"]:focus {
  outline: none;
  border-color: var(--hue, #6c675f);
  box-shadow: 0 0 0 3px rgba(108, 103, 95, .14);
}
.view-project-search .views-exposed-form .form-actions {
  display: flex;
  gap: 8px;
  margin: 0;
}
.view-project-search .views-exposed-form .button {
  padding: 9px 16px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.view-project-search .views-exposed-form .form-submit {
  background: #2c2c2b;
  color: #fff;
}
.view-project-search .views-exposed-form [id*="reset"] {
  background: #ece7dd;
  color: #2c2c2b;
}

/* Cross-bundle global search results (/search-research, global_search view). */
.view-global-search .views-exposed-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 0 0 24px;
}
.view-global-search .views-exposed-form .js-form-item-search {
  flex: 1 1 260px;
}
.view-global-search .views-exposed-form select,
.view-global-search .views-exposed-form input[type="text"] {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid #d8d2c6;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
}
.view-global-search .views-exposed-form .form-actions {
  display: flex;
  gap: 8px;
}
.view-global-search .views-exposed-form .button {
  padding: 9px 16px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.view-global-search .views-exposed-form .form-submit {
  background: #2c2c2b;
  color: #fff;
}
.np-search-results {
  margin: 0;
  padding: 0;
  list-style: none;
}
.np-search-row {
  margin: 0 0 8px;
}
.np-search-result {
  display: block;
  padding: 13px 16px;
  border: 1px solid #e7e2d8;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  transition: border-color .12s, box-shadow .12s;
}
.np-search-result:hover {
  border-color: var(--hue, #6c675f);
  box-shadow: 0 1px 6px rgba(44, 44, 43, .08);
}
.np-sr-type {
  display: inline-block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8a8377;
}
.np-sr-title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: #2c2c2b;
}
.np-sr-summary {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.4;
  color: #575349;
}

/* Publication cards (publication_search /publications/<type> listing). */
.np-pub-card {
  display: flex;
  gap: 14px;
  height: 100%;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e7e2d8;
  border-radius: 10px;
  text-decoration: none;
  transition: border-color .12s, box-shadow .12s;
}
.np-pub-card:hover {
  border-color: var(--hue, #6c675f);
  box-shadow: 0 1px 6px rgba(44, 44, 43, .08);
}
.np-pub-cover {
  flex: 0 0 60px;
}
.np-pub-cover img {
  display: block;
  width: 60px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(44, 44, 43, .18);
}
.np-pub-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.np-pub-type {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8a8377;
}
.np-pub-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #2c2c2b;
}
.np-pub-authors {
  font-size: 13px;
  color: #575349;
}
.np-pub-meta {
  font-size: 12px;
  color: #8a8377;
}

/* E-Pānui card — no cover; stacks the title/date link over a read-online link
   (the .np-pub-card base is a flex row for cover|body, so switch to a column). */
.np-epanui-card {
  flex-direction: column;
  gap: 8px;
}
.np-epanui-card-main {
  display: block;
  text-decoration: none;
}
.np-epanui-read {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 700;
  color: var(--hue, #6c675f);
  text-decoration: none;
}
.np-epanui-read:hover {
  text-decoration: underline;
}

/* E-Pānui detail — the read-online CTA at the top of the content column (the
   primary action; also fills the gap left by the missing cover). */
.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;
}

/* Zotero publication-database button on /publications/home — below the header,
   above the tile groups. Opens in a new tab (Zotero can't be iframed). */
.np-pub-database {
  margin: 0 0 30px;
}
.np-pub-database-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  background: #2c2c2b;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.np-pub-database-btn:hover {
  background: #4c4842;
  color: #fff;
}

/* Project reports listing (/publications/reports) — a project card + its report
   documents as plain tracked download links (no attachment modal in the browse
   modal). */
.np-report-card {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e7e2d8;
  border-radius: 10px;
}
.np-report-card-title {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 16px;
  color: #2c2c2b;
  text-decoration: none;
}
.np-report-card-title:hover {
  color: var(--hue, #6c675f);
}
.np-report-files {
  margin: 0;
  padding: 0;
  list-style: none;
}
.np-report-file {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  color: #2c2c2b;
  text-decoration: none;
}
.np-report-file::before {
  content: "\2193";
  color: #8a8377;
  font-weight: 700;
}
.np-report-file:hover .np-report-file-name {
  text-decoration: underline;
}
.np-report-file-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}
.np-report-file-meta {
  flex: 0 0 auto;
  font-size: 12px;
  color: #8a8377;
}

/* Replay-media video library (/replay-media) — thumbnail cards → play modal. */
.np-video-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
.np-video-card-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: #2c2c2b;
  border-radius: 10px;
  overflow: hidden;
}
.np-video-card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.np-video-card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: #fff;
  background: rgba(0, 0, 0, .25);
  opacity: .9;
  transition: background .15s, opacity .15s;
}
.np-video-card:hover .np-video-card-play {
  background: rgba(0, 0, 0, .4);
  opacity: 1;
}
.np-video-card-title {
  display: block;
  margin-top: 8px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  color: #2c2c2b;
}
.np-video-card:hover .np-video-card-title {
  text-decoration: underline;
}
.np-video-card-cat {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #8a8377;
}

/* Replay-media facet browse — type facets + category pills above the grid. */
.np-video-facets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.np-video-facet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #d9d3c7;
  border-radius: 999px;
  background: #fff;
  color: #2c2c2b;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.np-video-facet:hover {
  border-color: #6c675f;
}
.np-video-facet.is-active {
  background: #2c2c2b;
  border-color: #2c2c2b;
  color: #fff;
}
.np-video-facet-count {
  font-size: 12px;
  font-weight: 700;
  color: #8a8377;
}
.np-video-facet.is-active .np-video-facet-count {
  color: #cfcabf;
}
.np-video-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -6px 0 18px;
  padding-left: 2px;
}
.np-video-cat-pill {
  padding: 3px 11px;
  border-radius: 999px;
  background: #f0ece3;
  color: #4c4842;
  font-size: 13px;
  text-decoration: none;
}
.np-video-cat-pill:hover {
  background: #e2dccf;
}
.np-video-cat-pill.is-active {
  background: #6c675f;
  color: #fff;
}

/* Category collection header (/replay-media/category/<tid>). */
.np-video-collection {
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e7e2d8;
}
.np-video-collection-title {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: #2c2c2b;
}
.np-video-collection-date {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #8a8377;
}
.np-video-collection-files {
  margin: 12px 0 0;
  padding: 0;
  max-width: 640px;
  list-style: none;
}

/* Publication browse tiles (/publications/home) — reuse .np-role-tile chrome
   plus a cover-preview strip. */
.np-pub-tile-covers {
  display: flex;
  gap: 6px;
  margin: 8px 0 4px;
}
.np-pub-tile-cover img {
  display: block;
  width: 38px;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(44, 44, 43, .2);
}
.np-pub-tile-cover--more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  align-self: stretch;
  background: #ece7dd;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  color: #6c675f;
}
/* Filler placeholder thumbnails (e-pānui — no cover art): a branded pattern
   square matching the real cover thumbnails' size + radius/shadow. */
.np-pub-tile-cover--filler {
  width: 38px;
  height: 48px;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(44, 44, 43, .2);
  background:
    url('../images/npm-pattern-white.png') center / 140% no-repeat,
    #6c675f;
}

/* 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 list (shared _attachment-list.html.twig) + viewer modal. */
.np-pub-detail-files {
  margin-top: 24px;
}
.np-pub-detail-files-head {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #6c675f;
}
.np-file-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.np-file-row {
  margin-bottom: 6px;
}
/* Row is a contextual-region so the standard Drupal edit "pencil" (editors
   only) anchors to it; leave headroom on the right so it clears the meta. */
.np-file-row.contextual-region {
  position: relative;
}
.np-file-row .contextual {
  right: 6px;
  top: 6px;
}
.np-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e7e2d8;
  border-radius: 8px;
  background: #fff;
  color: #2c2c2b;
  text-decoration: none;
  transition: border-color .12s, box-shadow .12s;
}
.np-file:hover {
  border-color: var(--hue, #6c675f);
  box-shadow: 0 1px 6px rgba(44, 44, 43, .08);
}
.np-file-icon {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #8a8377;
}
.np-file-icon--image {
  background: #4a90d9;
}
.np-file-icon--pdf {
  background: #d9534f;
}
.np-file-name {
  flex: 1 1 auto;
  font-weight: 700;
}
.np-file-meta {
  flex: 0 0 auto;
  font-size: 12px;
  color: #8a8377;
}
.np-attachment-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}
.np-attachment-modal-slot {
  display: flex;
  min-height: 60vh;
}
.np-attachment-img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  margin: auto;
}
.np-attachment-iframe {
  width: 100%;
  height: 82vh;
  border: 0;
}
.np-attachment-modal-foot {
  padding: 12px 20px;
  border-top: 1px solid #e7e2d8;
  text-align: right;
}
.np-attachment-download {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 8px;
  background: #2c2c2b;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.np-attachment-download:hover {
  background: #4c4842;
  color: #fff;
}

/* Link viewer modal (barrioNpmLinkModal) — head bar (title + open-in-new-tab +
   close), an optional "may not embed" hint, and a full-height iframe. */
.np-link-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e7e2d8;
}
.np-link-modal-title {
  flex: 1 1 auto;
  overflow: hidden;
  font-weight: 700;
  font-size: 15px;
  color: #2c2c2b;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.np-link-modal-newtab {
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 14px;
  color: #2c2c2b;
  text-decoration: none;
}
.np-link-modal-newtab:hover {
  text-decoration: underline;
}
.np-link-modal-note {
  margin: 0;
  padding: 8px 16px;
  background: #fdf6e3;
  border-bottom: 1px solid #e7e2d8;
  font-size: 13px;
  color: #6c675f;
}
.np-link-modal-frame {
  display: block;
  width: 100%;
  height: 78vh;
  border: 0;
}
@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;
  }
}

.np-person-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  height: 100%;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e4e0d8;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s ease, transform .15s ease;
}
.np-person-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}
.np-person-card:focus-visible {
  outline: 3px solid var(--hue, #6c675f);
  outline-offset: 2px;
}

.np-person-card-photo {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: #f1ece1;
  border: 1px solid #e4e0d8;
}
.np-person-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.np-person-card-photo--placeholder {
  background: #ece7dd;
}

.np-person-card-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.np-person-card-name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  color: #2c2c2b;
}
.np-person-card-meta {
  font-size: 12.5px;
  line-height: 1.35;
  color: #6c675f;
}
.np-person-card-body {
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #6c675f;
}

/* =============================================================
   Clustered-tiles people browse (/our-people)

   $people_tiles clusters from PersonType\PersonTypeTilesBuilder, rendered by
   templates/content/people-tiles.html.twig. Each .np-cluster carries
   data-cluster=<key>; the mapping below resolves it to a --tile-hue that the
   strip + count colour + hover cascade from. Tiles link to the Phase 1
   per-type listings (/people/<slug>).
   ============================================================= */

.np-tile-group {
  margin: 44px 0 40px;
  padding-top: 36px;
  border-top: 1px solid #e4e0d8;
}
.np-tile-group-title {
  margin: 0 0 26px;
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
  color: #2c2c2b;
}

/* data-cluster → hue token (kept here so the template stays hue-agnostic). */
.np-cluster[data-cluster="leadership"]  { --tile-hue: var(--np-role-leadership);  --tile-hue-dk: var(--np-role-leadership-dk); }
.np-cluster[data-cluster="researchers"] { --tile-hue: var(--np-role-researchers); --tile-hue-dk: var(--np-role-researchers-dk); }
.np-cluster[data-cluster="kaumatua"]    { --tile-hue: var(--np-role-kaumatua);    --tile-hue-dk: var(--np-role-kaumatua-dk); }
.np-cluster[data-cluster="support"]     { --tile-hue: var(--np-role-support);     --tile-hue-dk: var(--np-role-support-dk); }

.np-cluster {
  margin: 0 0 38px;
}
.np-cluster-head {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--tile-hue, #6c675f);
}
.np-cluster-title {
  margin: 0;
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -.2px;
  color: #2c2c2b;
}

.np-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.np-role-tile {
  display: flex;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e4e0d8;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s ease, transform .15s ease;
}
.np-role-tile:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, .09);
  transform: translateY(-3px);
}
.np-role-tile:focus-visible {
  outline: 3px solid var(--tile-hue, #6c675f);
  outline-offset: 2px;
}
.np-role-tile-strip {
  flex: 0 0 auto;
  width: 6px;
  background: var(--tile-hue, #6c675f);
}
.np-role-tile-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 15px 17px 16px;
}
.np-role-tile-name {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  color: #2c2c2b;
}
/* Avatar preview — an overlapping stack of round portraits of the role's
   people (up to PREVIEW, newest first) + a "+N" overflow chip. Decorative
   (aria-hidden in the template); the tint on placeholders / the chip picks
   up the cluster's --tile-hue. */
.np-role-tile-avatars {
  display: flex;
  align-items: center;
}
.np-role-avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  margin-left: -10px;
  border-radius: 50%;
  overflow: hidden;
  background: #ece7dd;
  border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.np-role-avatar:first-child {
  margin-left: 0;
}
.np-role-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.np-role-avatar--placeholder {
  background: var(--tile-hue, #6c675f);
}
.np-role-avatar-initial {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}
.np-role-avatar--more {
  background: var(--tile-hue, #6c675f);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.np-role-tile-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid #ece7dd;
  font-size: 12.5px;
}
.np-role-tile-count {
  font-weight: 600;
  color: #2c2c2b;
}
.np-role-tile-go {
  font-weight: 700;
  color: var(--tile-hue-dk, #6c675f);
}

/* ---------- Role modal (people browse) ----------
   #np-browse-modal is filled on demand by barrioNpmRoleModal with a role's
   /people/<slug> listing (its .np-listing-title + person cards + pager). The
   injected .np-person-card grid + .np-listing-title styles are shared with the
   standalone page; this only frames the modal, scrolls the body, and shows a
   busy spinner while the fetch is in flight. */
.np-browse-modal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: 86vh;
  padding: 26px 30px 28px;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
}
.np-browse-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
}
.np-browse-modal-slot {
  flex: 1 1 auto;
  min-height: 120px;
  overflow-y: auto;
}
.np-browse-modal-foot {
  flex: 0 0 auto;
  padding: 12px 20px;
  border-top: 1px solid #e7e2d8;
  text-align: center;
}
.np-browse-modal-viewall {
  font-size: 15px;
  font-weight: 700;
  color: #2c2c2b;
}
.np-browse-modal-viewall:hover {
  color: var(--hue, #6c675f);
}
.np-browse-modal-slot .np-listing-title {
  margin-top: 0;
  padding-right: 34px; /* clear the close button */
}
/* Busy spinner while fetching — the slot is emptied + aria-busy set true. */
.np-browse-modal-slot[aria-busy="true"] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.np-browse-modal-slot[aria-busy="true"]::after {
  content: "";
  width: 34px;
  height: 34px;
  border: 3px solid #e4e0d8;
  border-top-color: #6c675f;
  border-radius: 50%;
  animation: np-spin .7s linear infinite;
}
@keyframes np-spin {
  to { transform: rotate(360deg); }
}
