aside {
  height: fit-content;
}

/* search input area */
.er-paper-search {
  background: var(--background-color);
  border: 1px solid #e5e7eb;
  padding: 0 17px;
  height: 56px;
  box-shadow: 0 2px 1.25px rgba(0, 0, 0, 0.06);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.er-paper-search:focus-within {
  border-color: var(--section-title-color);
  box-shadow: 0 0 0 3px rgba(0, 121, 193, 0.15);
}

.er-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-weight: 700;
  font-size: 17px;
  line-height: 25.5px;
  color: var(--primary-text-color);
  text-transform: uppercase;
  background: transparent;
  min-width: 0;
}

.er-search-input::placeholder {
  color: var(--tertiary-text-color);
  font-weight: 700;
  text-transform: uppercase;
}

.er-search-btn {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tertiary-text-color);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

/* filter area  */
.er-filter {
  background: var(--background-color);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.er-filter-summary {
  list-style: none;
  padding: 16px 20px;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  transition: background 150ms ease;
}

.er-filter-summary::-webkit-details-marker {
  display: none;
}

.er-filter-label {
  font-weight: 500;
  font-size: 11px;
  color: var(--tertiary-text-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.er-filter-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #e5e7eb;
  margin: 0 -20px;
  padding: 14px 20px;
}

.er-filter-value {
  font-weight: 700;
  font-size: 20px;
  color: var(--section-title-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.er-filter-chevron {
  color: var(--primary-text-color);
  transition: transform 150ms ease;
  flex-shrink: 0;
}

.er-filter[open] .er-filter-chevron {
  transform: rotate(180deg);
}

.er-filter-options {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  border-top: 1px solid #e5e7eb;
  max-height: 240px;
  overflow-y: auto;
}

.er-filter-options li:not(:last-child) {
  border-bottom: 1px solid #e5e7eb;
}

.er-filter-option {
  display: flex;
  text-transform: uppercase;
  align-items: center;
  width: 100%;
  padding: 10px 20px;
  font-weight: 500;
  font-size: 14px;
  color: var(--primary-text-color);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition:
    background 150ms ease,
    color 150ms ease;
}

.er-filter-option:hover {
  background: var(--background-color);
  color: var(--section-title-color);
}

.er-filter-option[aria-selected="true"] {
  background: rgba(0, 121, 193, 0.08);
  color: var(--section-title-color);
  font-weight: 600;
}

.er-list {
  display: flex;
  flex-direction: column;
  background: var(--background-color);
}

.er-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title date" "desc ." "link .";
  column-gap: 16px;
  row-gap: 24px;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 16px 16px 0;
  text-decoration: none;
  color: inherit;
  transition: background 150ms ease;
}

.er-item-title {
  grid-area: title;
  min-width: 0;
  font-weight: 700;
  color: var(--primary-text-color);
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  text-transform: capitalize;
}

.er-item:hover .er-item-title {
  color: var(--section-title-color);
}

.er-item:hover {
  border-bottom: 1px solid #0079c1;
}

.er-item-date {
  grid-area: date;
  align-self: center;
  margin: 0;
  font-weight: 500;
  font-size: 11px;
  line-height: 14px;
  color: #7b7b7b;
  white-space: nowrap;
}

.er-item-description {
  grid-area: desc;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
  margin: 0;
  -webkit-line-clamp: 2;
  color: var(--primary-text-color);
  line-clamp: 2;
  font-weight: 400;
  font-size: 16px;
  line-height: 28px;
  text-transform: capitalize;
}

.er-item-link-container {
  grid-area: link;
}

.er-item-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-self: start;
  padding: 0;
  border: none;
  background: none;
  font-weight: 500;
  font-size: 14px;
  line-height: 14px;
  color: var(--scroll-dot-color);
  cursor: pointer;
  text-decoration: none;
  transition: color 150ms ease;
}

.er-item-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--scroll-dot-color);
}

.er-item-link:hover,
.er-item-link:hover svg {
  color: var(--ndb-brand-color);
  text-decoration: underline;
}

/* ─── Pagination ────────────────────────────────────────────── */
.er-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.er-pg-arrow {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--secondary-text-color);
  cursor: pointer;
  transition:
    background 150ms ease,
    color 150ms ease;
}

.er-pg-arrow:not([disabled]) {
  color: var(--scroll-dot-color);
}

.er-pg-arrow:hover:not([disabled]) {
  background: #f7f1af;
}

.er-pg-arrow[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.er-pg-numbers {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ── Evaluation reports LISTING page — tp-container layout ─────────────────
   Mirrors listing-page-thematic-papers.css scoped to this page class.       */

.page-node-type-listing-page-evaluation-reports .tp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
}

.page-node-type-listing-page-evaluation-reports .tp-toolbar__filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-node-type-listing-page-evaluation-reports .tp-dropdown {
  position: relative;
}

.page-node-type-listing-page-evaluation-reports .tp-dropdown__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-bg-color);
  border: 1.5px solid var(--navbar-border-color);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--secondary-color);
  justify-content: space-between;
  transition: border-color 0.2s;
  white-space: nowrap;
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 28px;
  cursor: pointer;
}

.page-node-type-listing-page-evaluation-reports .breadcrumb-trail a {
  color: var(--contrast-text-color) !important;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s;
  font-size: 12px;
}

.page-node-type-listing-page-evaluation-reports .tp-dropdown__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--primary-bg-color);
  border: 1.5px solid var(--navbar-border-color);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 50;
  width: -webkit-fill-available;
  overflow-y: auto;
  max-height: 255px;
  padding: 4px 0;
  list-style: none;
  margin: 0;
}

.page-node-type-listing-page-evaluation-reports .page-detail-main {
  margin: -130px auto 0;
}

.page-node-type-listing-page-evaluation-reports .tp-dropdown__option {
  padding: 10px 16px;
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--secondary-color);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.page-node-type-listing-page-evaluation-reports
  .tp-dropdown__option:first-child {
  color: var(--primary-color);
}

.page-node-type-listing-page-evaluation-reports
  .page-detail-main-area.page-detail-card {
  background: var(--primary-bg-color);
}

/* Hide native Drupal form wrappers — tp-dropdowns replace them. */
.page-node-type-listing-page-evaluation-reports .views-exposed-form.block > h2,
.page-node-type-listing-page-evaluation-reports
  .tp-exposed-filters
  .form-actions,
.page-node-type-listing-page-evaluation-reports
  .tp-exposed-filters
  input[type="submit"],
.page-node-type-listing-page-evaluation-reports
  .tp-exposed-filters
  .form-item
  label,
.page-node-type-listing-page-evaluation-reports .tp-exposed-filters .form-item {
  display: none;
}

.page-node-type-listing-page-evaluation-reports select.is-visual-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.page-node-type-listing-page-evaluation-reports .views-exposed-form.block,
.page-node-type-listing-page-evaluation-reports .views-exposed-form.block form {
  display: contents;
}

/* Grid/list layout overrides (same !important pattern as thematic papers). */
.page-node-type-listing-page-evaluation-reports .tp-list--grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.page-node-type-listing-page-evaluation-reports .tp-list--list {
  display: flex !important;
  flex-direction: column;
}

.page-node-type-listing-page-evaluation-reports .tp-item {
  border-bottom: none;
  border: 1px solid var(--primary-color);
  border-radius: 20px;
  overflow: hidden;
  padding: 0;
}

.page-node-type-listing-page-evaluation-reports .tp-item:hover {
  border-bottom: 1px solid var(--primary-color);
}

.page-node-type-listing-page-evaluation-reports .tp-item:last-child {
  border-bottom: 1px solid var(--primary-color);
}

.page-node-type-listing-page-evaluation-reports .tp-list--list .tp-item {
  border: none;
  border-bottom: 1px solid var(--navbar-border-color);
  border-radius: 0;
}

.page-node-type-listing-page-evaluation-reports .tp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Noto Sans", var(--font-body), sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--primary-color);
  text-decoration: none;
  transition: opacity 0.2s;
}

.page-node-type-listing-page-evaluation-reports .tp-link:hover {
  opacity: 0.75;
}

.er-pg-num {
  width: 32px;
  height: 32px;
  padding: 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: var(--secondary-text-color);
  cursor: pointer;
  transition:
    background 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}

.er-pg-num:hover:not(.is-active) {
  background: var(--background-color);
  color: var(--scroll-dot-color);
}

.er-pg-num.is-active,
.er-pg-num[aria-current="page"] {
  background: var(--background-color);
  border-color: var(--scroll-dot-color);
  color: var(--primary-text-color);
  font-weight: 600;
}

.er-pg-num a {
  color: inherit;
  text-decoration: none;
}

/* ── Grid card overrides — reset thematic-papers' orange split-panel layout ── */
.page-node-type-listing-page-evaluation-reports .tp-list--grid .tp-article {
  flex-direction: column;
  padding: 40px;
  gap: 12px;
  min-height: unset;
  align-items: flex-start;
}

.page-node-type-listing-page-evaluation-reports
  .tp-list--grid
  .tp-article__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-template-columns: unset;
  grid-template-rows: unset;
  height: auto;
  align-content: unset;
  align-items: unset;
}

.page-node-type-listing-page-evaluation-reports
  .tp-list--grid
  .tp-article__header {
  grid-column: unset;
  grid-row: unset;
  background: transparent;
  padding: 0;
  display: block;
  text-align: left;
  width: auto;
}

.page-node-type-listing-page-evaluation-reports
  .tp-list--grid
  .tp-article__excerpt-inner {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-color);
  margin: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 5;
}
.page-node-type-listing-page-evaluation-reports
  .tp-list--grid
  .tp-article__title {
  color: var(--secondary-color);
  margin: 0;
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: 0%;
  text-transform: none;
}

.page-node-type-listing-page-evaluation-reports
  .tp-list--grid
  .tp-article__excerpt {
  grid-column: unset;
  grid-row: unset;
  padding: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  align-self: unset;
  width: auto;
}

.page-node-type-listing-page-evaluation-reports
  .tp-list--grid
  .tp-article__actions {
  display: none;
}

/* Grid cards are clickable — show pointer on the whole card. */
.page-node-type-listing-page-evaluation-reports .tp-list--grid .tp-item {
  cursor: pointer;
  position: relative;
}

/* Overlay anchor covers the full card so the browser shows URL on hover. */
.page-node-type-listing-page-evaluation-reports .tp-item__grid-link {
  display: none;
}

.page-node-type-listing-page-evaluation-reports .tp-list--grid .tp-item__grid-link {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ── List view card — plain stacked layout ── */
.page-node-type-listing-page-evaluation-reports
  .tp-list--list
  .tp-item:last-child {
  border-bottom: none;
}

.page-node-type-listing-page-evaluation-reports .tp-list--list .tp-article {
  flex-direction: column;
  padding: 20px 0;
  gap: 8px;
  min-height: unset;
  align-items: flex-start;
}

.page-node-type-listing-page-evaluation-reports
  .tp-list--list
  .tp-article__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-node-type-listing-page-evaluation-reports
  .tp-list--list
  .tp-article__header {
  background: transparent;
  padding: 0;
}

.page-node-type-listing-page-evaluation-reports
  .tp-list--list
  .tp-article__title {
  color: var(--secondary-color);
}

.page-node-type-listing-page-evaluation-reports
  .tp-list--list
  .tp-article__actions {
  display: flex;
}

@media (max-width: 767.98px) {
  p.page-description.fst-italic {
    -webkit-line-clamp: 7;
    line-clamp: 7;
    font-size: 12px;
    line-height: 18px;
  }
  .page-node-type-listing-page-evaluation-reports .tp-list--grid {
    grid-template-columns: repeat(1, 1fr);
  }
    .list-search-spacer {
    margin-top: 30px;
  }
}

@media (max-width: 400px) {
  p.page-description.fst-italic {
    -webkit-line-clamp: 7;
    line-clamp: 7;
    font-size: 12px;
    line-height: 18px;
  }
  .list-search-spacer {
    margin-top: 30px;
  }
}

@media (max-width: 600px) {
  .page-node-type-listing-page-evaluation-reports
    .tp-list--grid
    .tp-article__header {
    min-height: auto;
  }
}
