* {
  box-sizing: border-box;
}

.ad-slot {
  margin: 1.5rem 0;
  text-align: center;
}

.ad-slot__label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999;
  margin-bottom: 0.35rem;
}

.ad-slot--header {
  margin: 0 0 1rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #eee;
}

body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  color: #1a1a1a;
  background: #fff;
}

/* ── Header ─────────────────────────────── */

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background-color: #2D6A4F;
}

.site-logo-link {
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.site-logo-img {
  height: 44px;
  width: auto;
  display: block;
}

.site-logo-text {
  font-size: 1.6rem;
  font-weight: 300;
  color: #fff;
  letter-spacing: -0.5px;
  font-family: Georgia, 'Times New Roman', serif;
}

.site-logo-text strong {
  font-weight: 900;
  color: #fff;
}

.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.site-header__nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-header__nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
}

.site-header__nav a:hover {
  color: rgba(255,255,255,0.75);
}

.site-header__search input {
  padding: 0.65rem 0.9rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.site-header__menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  order: 2;
}

.site-header__menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

/* ── Footer ─────────────────────────────── */

.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 3px solid #2D6A4F;
  color: #666;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

/* ── Shared article card ─────────────────── */

.article-card__image {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.article-card__title {
  font-size: 1.05rem;
  margin: 0.5rem 0 0.25rem;
  line-height: 1.35;
}

.article-card a {
  color: inherit;
  text-decoration: none;
}

.article-card a:hover .article-card__title {
  color: #2D6A4F;
}

.article-meta {
  font-size: 0.8rem;
  color: #666;
}

.article-meta a {
  color: #666;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.article-byline .article-meta {
  margin: 0;
}

.article-meta__photo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ── Portal homepage ─────────────────────── */

.portal-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #2D6A4F;
  border-bottom: 2px solid #2D6A4F;
  padding-bottom: 0.4rem;
  margin: 0 0 1.25rem;
  font-family: Georgia, serif;
}

/* Hero */

.portal-hero {
  position: relative;
  margin-bottom: 2.5rem;
}

.portal-hero__link {
  display: block;
  position: relative;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.portal-hero__image {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.portal-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.25) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.portal-hero__cat {
  display: inline-block;
  background: #2D6A4F;
  color: #fff;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.6rem;
  border-radius: 2px;
}

.portal-hero__title {
  color: #fff;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  margin: 0 0 0.5rem;
  line-height: 1.2;
  max-width: 75%;
}

.portal-hero__excerpt {
  color: rgba(255,255,255,0.88);
  font-size: clamp(0.85rem, 2vw, 1rem);
  margin: 0 0 0.4rem;
  max-width: 65%;
}

.portal-hero__meta {
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
  margin: 0;
}

/* Two-column layout */

.portal-columns {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Sidebar blocks */

.sidebar-block {
  margin-bottom: 2rem;
}

.sidebar-block__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #2D6A4F;
  border-bottom: 2px solid #2D6A4F;
  padding-bottom: 0.4rem;
  margin: 0 0 1rem;
}

.sidebar-block__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-block__list--numbered {
  padding-left: 1.25rem;
  list-style: decimal;
}

.sidebar-block__list li {
  margin-bottom: 0.65rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.sidebar-block__list a {
  color: #1a1a1a;
  text-decoration: none;
}

.sidebar-block__list a:hover {
  color: #2D6A4F;
}

.sidebar-block__year {
  color: #999;
  font-size: 0.78rem;
}

/* Category pills */

.portal-categories {
  margin-bottom: 3rem;
  padding: 1.5rem;
  background: #f5f9f7;
  border-radius: 4px;
}

.portal-categories__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.portal-cat-pill {
  display: inline-block;
  padding: 0.38rem 0.9rem;
  background: #fff;
  border: 1px solid #2D6A4F;
  color: #2D6A4F;
  text-decoration: none;
  font-size: 0.83rem;
  border-radius: 20px;
  font-family: Georgia, serif;
}

.portal-cat-pill:hover {
  background: #2D6A4F;
  color: #fff;
}

/* In Depth */

.portal-indepth {
  margin-bottom: 3rem;
}

.portal-indepth__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.indepth-card {
  border: 1px solid #e0e0e0;
  border-top: 3px solid #2D6A4F;
  padding: 1.25rem;
  border-radius: 0 0 4px 4px;
}

.indepth-card__title {
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
  line-height: 1.35;
}

.indepth-card__title a {
  color: #1a1a1a;
  text-decoration: none;
}

.indepth-card__title a:hover {
  color: #2D6A4F;
}

.indepth-card__excerpt {
  font-size: 0.88rem;
  color: #555;
  margin: 0 0 0.75rem;
  line-height: 1.55;
}

.indepth-card__link {
  font-size: 0.85rem;
  color: #2D6A4F;
  text-decoration: none;
  font-weight: 600;
}

/* ── Legacy home layout (news page reuses) ── */

.home-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
}

.lead-story {
  grid-column: 1 / -1;
  margin-bottom: 2rem;
}

.lead-story__link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.lead-story__image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.lead-story__overlay {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 80%;
  padding: clamp(0.5rem, 2vw, 1rem) clamp(0.75rem, 3vw, 1.5rem);
  background: rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.lead-story__title {
  margin: 0 0 0.4rem;
  font-size: clamp(1rem, 4.5vw, 2rem);
  color: #fff;
  line-height: 1.25;
}

.lead-story__date {
  margin: 0;
  font-size: clamp(0.65rem, 2vw, 0.85rem);
  color: #eee;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.view-all-news {
  text-align: center;
  margin: 2rem 0;
}

.view-all-news__btn {
  display: inline-block;
  padding: 0.65rem 1.75rem;
  background-color: #2D6A4F;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 3px;
}

.view-all-news__btn:hover {
  background-color: #1d5238;
}

.home-sidebar {
  border-left: 1px solid #ddd;
  padding-left: 1.5rem;
}

.home-sidebar__heading {
  margin-top: 0;
  text-transform: uppercase;
  font-size: 1rem;
  border-bottom: 2px solid #1a1a1a;
  padding-bottom: 0.5rem;
}

.most-read-list {
  padding-left: 1.25rem;
}

.most-read-list li {
  margin-bottom: 0.75rem;
}

.featured-articles-list {
  padding-left: 1.25rem;
  margin: 0 0 1.5rem;
}

.featured-articles-list li {
  margin-bottom: 0.75rem;
}

/* ── Article detail ──────────────────────── */

.article-category {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #b00;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.admin-edit-link {
  display: inline-block;
  float: right;
  background: #1a1a1a;
  color: #fff;
  text-decoration: none;
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 3px;
}

.admin-edit-link:hover {
  background: #444;
}

.article-detail__title {
  font-size: 2.25rem;
  margin: 0.25rem 0 0.5rem;
}

.article-detail__image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  margin: 1rem 0 0;
}

.article-detail__image-caption {
  margin: 0 0 1rem;
  padding: 0.5rem 0.9rem;
  background: #f7f7f7;
  border-left: 3px solid #2D6A4F;
  font-size: 0.85rem;
  color: #555;
}

.article-detail__excerpt {
  font-size: 1.15rem;
  font-style: italic;
  color: #333;
}

.article-detail__body {
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-detail__body p {
  margin: 0 0 1.25rem;
}

.static-page {
  max-width: 800px;
  margin: 0 auto;
}

.static-page__body {
  font-size: 1.05rem;
  line-height: 1.7;
}

.static-page__body p {
  margin: 0 0 1.25rem;
}

.article-detail__audio {
  width: 100%;
  margin: 1rem 0;
}

/* ── Gallery ─────────────────────────────── */

.article-gallery--single {
  margin: 1.5rem 0;
  text-align: center;
}

.article-gallery--single img {
  width: 100%;
  max-width: 100%;
  max-height: 600px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
}

.article-gallery--masonry {
  column-count: 2;
  column-gap: 0.75rem;
  margin: 1.5rem 0;
}

.article-gallery--masonry img {
  width: 100%;
  display: block;
  margin-bottom: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  break-inside: avoid;
}

@media (min-width: 600px) {
  .article-gallery--masonry {
    column-count: 3;
  }
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox__figure {
  margin: 0;
  max-width: 90vw;
  text-align: center;
}

.gallery-lightbox__image {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.gallery-lightbox__caption {
  color: #fff;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.gallery-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.25rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 1.75rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
}

.gallery-lightbox__nav--prev {
  left: 1rem;
}

.gallery-lightbox__nav--next {
  right: 1rem;
}

.gallery-lightbox__nav:hover,
.gallery-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ── Author box ──────────────────────────── */

.author-box {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin: 2.5rem 0 0;
  padding: 1.5rem;
  background: #f7f7f7;
  border-top: 3px solid #1a1a1a;
}

.author-box__photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-box__info {
  min-width: 0;
}

.author-box__name {
  margin: 0 0 0.4rem;
}

.author-box__bio {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
}

/* ── Like / Share ────────────────────────── */

.article-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 1rem 0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: 20px;
  background: #fff;
  color: #555;
  cursor: pointer;
  font-size: 0.9rem;
}

.like-btn:hover {
  border-color: #2D6A4F;
  color: #2D6A4F;
}

.like-btn.is-liked {
  border-color: #e0245e;
  color: #e0245e;
  background: #fdecf0;
}

.like-btn:disabled {
  cursor: default;
}

.share-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.share-links__label {
  font-size: 0.85rem;
  color: #666;
  margin-right: 0.25rem;
}

.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}

.share-icon--facebook { background: #1877f2; }
.share-icon--x { background: #000; }
.share-icon--linkedin { background: #0a66c2; }
.share-icon--instagram { background: #c8336e; }
.share-icon--copy { background: #555; }

.share-icon:hover {
  opacity: 0.85;
}

.share-icon.is-copied {
  outline: 2px solid #1a1a1a;
}

/* ── Misc ────────────────────────────────── */

.not-found {
  text-align: center;
  padding: 3rem 0;
}

.page-title {
  text-transform: uppercase;
  border-bottom: 3px solid #1a1a1a;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin: 2rem 0;
}

.pagination a {
  color: #1a1a1a;
  text-decoration: none;
  font-weight: bold;
}

.pagination span {
  color: #666;
  font-size: 0.9rem;
}

.author-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid #1a1a1a;
}

.author-header__photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-header__name {
  margin: 0 0 0.5rem;
}

.author-header__bio {
  color: #555;
  margin: 0;
}

/* ── Responsive ──────────────────────────── */

@media (max-width: 768px) {
  .home-layout,
  .portal-columns {
    grid-template-columns: 1fr;
  }

  .portal-hero__title { max-width: 95%; }
  .portal-hero__excerpt { max-width: 90%; }

  .portal-indepth__grid {
    grid-template-columns: 1fr;
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .author-box {
    padding: 1rem;
    gap: 0.9rem;
  }

  .author-box__photo {
    width: 56px;
    height: 56px;
  }

  .home-sidebar {
    border-left: none;
    border-top: 1px solid #ddd;
    padding-left: 0;
    padding-top: 1.5rem;
  }

  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-header__inner {
    flex-wrap: wrap;
  }

  .site-logo-link {
    order: 1;
    flex: 1 1 0;
  }

  .site-header__menu-toggle {
    display: flex;
    order: 2;
    flex-shrink: 0;
  }

  .site-header__search {
    order: 3;
    flex-basis: 100%;
    margin-top: 0.75rem;
  }

  .site-header__search input {
    width: 100%;
    box-sizing: border-box;
  }

  .lead-story__overlay {
    max-width: 92%;
  }

  .site-header__nav {
    display: none;
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: 1rem;
  }

  .site-header__nav.is-open {
    display: flex;
  }

  .site-header__nav a {
    padding: 0.65rem 0;
    border-top: 1px solid rgba(255,255,255,0.2);
  }
}

@media (max-width: 480px) {
  .article-grid {
    grid-template-columns: 1fr;
  }

  .portal-indepth__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Books Module ────────────────────────────────────────────────────────────── */

.books-main {
  max-width: 1084px;
  margin: 0 auto;
  padding: 24px 16px;
}

.books-header { margin-bottom: 28px; }
.books-header h1 { font-size: 1.8rem; margin: 0 0 4px; }
.books-breadcrumb { font-size: 0.82rem; color: #888; margin: 0 0 8px; }
.books-breadcrumb a { color: #2D6A4F; text-decoration: none; }
.books-count { color: #666; font-size: 0.88rem; margin: 0 0 12px; }
.books-section-heading { font-size: 1.1rem; color: #333; border-bottom: 2px solid #2D6A4F; padding-bottom: 6px; margin: 24px 0 16px; }
.books-empty { color: #888; font-style: italic; }

.books-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.books-cat-pill {
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid #2D6A4F;
  color: #2D6A4F;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.books-cat-pill:hover, .books-cat-pill.active { background: #2D6A4F; color: #fff; }
.books-cat-count { font-weight: 400; }

.books-featured { margin-bottom: 32px; }
.books-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 24px;
  margin-top: 16px;
}
.books-grid--small {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}

.book-card { display: flex; flex-direction: column; }
.book-card__cover {
  display: block;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.15);
  background: #f0f0f0;
  margin-bottom: 10px;
  text-decoration: none;
}
.book-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card__no-cover {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2D6A4F, #1d5238);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
}
.book-card__title { font-size: 0.85rem; margin: 0 0 4px; line-height: 1.35; }
.book-card__title a { color: #1a1a1a; text-decoration: none; }
.book-card__title a:hover { color: #2D6A4F; }
.book-card__authors { font-size: 0.76rem; color: #666; margin: 0 0 4px; }
.book-card__authors a { color: #2D6A4F; text-decoration: none; }
.book-card__rating { font-size: 0.74rem; color: #888; }
.book-card__rating { color: #f59e0b; }
.book-card__price { font-size: 0.82rem; font-weight: 700; color: #2D6A4F; margin: 2px 0 0; }

/* Book detail page */
.book-detail { max-width: 900px; margin: 32px auto; padding: 0 16px; }
.book-detail__top { display: flex; gap: 32px; margin-bottom: 32px; }
.book-detail__cover img {
  width: 200px;
  height: auto;
  border-radius: 4px;
  box-shadow: 4px 8px 20px rgba(0,0,0,0.2);
  flex-shrink: 0;
}
.book-detail__no-cover {
  width: 200px;
  height: 280px;
  background: linear-gradient(135deg, #2D6A4F, #1d5238);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
  font-weight: 900;
  border-radius: 4px;
  flex-shrink: 0;
}
.book-detail__info h1 { font-size: 1.7rem; margin: 0 0 8px; }
.book-detail__subtitle { font-size: 1rem; color: #555; font-style: italic; margin: 0 0 12px; }
.book-detail__authors { font-size: 1rem; color: #444; margin: 0 0 12px; }
.book-detail__authors a { color: #2D6A4F; font-weight: 600; text-decoration: none; }
.book-detail__rating { margin-bottom: 16px; }
.star-filled { color: #f59e0b; }
.star-empty { color: #ddd; }
.book-detail__meta { border-collapse: collapse; margin-bottom: 20px; font-size: 0.88rem; }
.book-detail__meta th { text-align: left; color: #888; padding: 4px 16px 4px 0; font-weight: 600; width: 100px; }
.book-detail__meta td { color: #333; padding: 4px 0; }
.book-detail__meta a { color: #2D6A4F; text-decoration: none; }
.book-detail__price { font-size: 1.15rem; font-weight: 700; color: #2D6A4F; margin: 0 0 12px; }
.btn-buy {
  display: inline-block;
  background: #2D6A4F;
  color: #fff;
  padding: 10px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.btn-buy:hover { background: #1d5238; }
.book-detail__description { border-top: 1px solid #eee; padding-top: 24px; margin-bottom: 24px; }
.book-detail__categories, .book-detail__tags { margin-bottom: 16px; }
.book-cat-tag {
  display: inline-block;
  background: #f0f7f4;
  color: #2D6A4F;
  border: 1px solid #2D6A4F;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  text-decoration: none;
  margin: 2px;
}
.book-cat-tag:hover { background: #2D6A4F; color: #fff; }
.book-tag {
  display: inline-block;
  background: #f5f5f5;
  color: #555;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.76rem;
  margin: 2px;
}
.book-related { border-top: 1px solid #eee; padding-top: 24px; }
.book-rate { margin: 16px 0; }
.book-rate p { margin: 0 0 6px; font-size: 0.88rem; color: #666; }
.rate-stars { font-size: 1.6rem; cursor: pointer; display: inline-flex; gap: 4px; }
.rate-star { color: #ddd; transition: color 0.1s; }
.rate-star:hover { color: #f59e0b; }

/* Books author/publisher profile */
.books-author-profile { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.books-author-photo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.books-author-meta { font-size: 0.85rem; color: #888; margin: 4px 0; }
.books-author-bio { font-size: 0.9rem; color: #444; margin: 8px 0; line-height: 1.6; }
.books-author-links { display: flex; gap: 12px; margin-top: 8px; }
.books-author-links a { color: #2D6A4F; font-size: 0.85rem; text-decoration: none; }

@media (max-width: 600px) {
  .book-detail__top { flex-direction: column; }
  .book-detail__cover img, .book-detail__no-cover { width: 150px; height: 210px; }
  .books-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .books-featured-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ── Homepage Books Spotlight ────────────────────────────────────────────────── */

.portal-books { margin: 32px 0; }
.portal-books__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.portal-books__all {
  font-size: 0.85rem;
  color: #2D6A4F;
  text-decoration: none;
  font-weight: 600;
}
.portal-books__all:hover { text-decoration: underline; }

.home-books-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.home-book-thumb {
  display: block;
  text-decoration: none;
}
.home-book-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 2px 4px 10px rgba(0,0,0,0.15);
  transition: transform 0.18s, box-shadow 0.18s;
  display: block;
}
.home-book-thumb:hover img {
  transform: translateY(-3px);
  box-shadow: 2px 8px 18px rgba(0,0,0,0.22);
}
.home-book-no-cover {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, #2D6A4F, #1d5238);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 900;
  border-radius: 4px;
}
.home-book-thumb p {
  font-size: 0.72rem;
  color: #333;
  margin: 5px 0 0;
  line-height: 1.3;
  text-align: center;
}

@media (max-width: 768px) {
  .home-books-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .home-books-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .portal-books__all { font-size: 0.78rem; }
}

/* ── Book form: author tag chips ───────────────────────────────────────────── */

.author-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  margin-bottom: 8px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #2D6A4F;
  color: #fff;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.82rem;
  line-height: 1;
}
.tag-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
}
.tag-remove:hover { color: #fff; }

.author-search-wrap { position: relative; }
.author-search-wrap input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.88rem;
  box-sizing: border-box;
}
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 200;
  max-height: 200px;
  overflow-y: auto;
}
.autocomplete-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.autocomplete-item:hover { background: #f0f7f4; }
.autocomplete-item small { color: #888; font-size: 0.75rem; }

/* ── Book form: category pill toggles ─────────────────────────────────────── */

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.cat-pill-label {
  padding: 4px 12px;
  border-radius: 16px;
  border: 1px solid #2D6A4F;
  color: #2D6A4F;
  cursor: pointer;
  font-size: 0.82rem;
  user-select: none;
  transition: background 0.13s, color 0.13s;
}
.cat-pill-label:hover { background: #f0f7f4; }
.cat-pill-label.selected { background: #2D6A4F; color: #fff; }

/* ── Book extra links (interview / blog / video) ───────────────────────────── */

.book-extra-links {
  margin: 20px 0;
  padding: 16px;
  background: #f9fbf9;
  border-radius: 8px;
  border: 1px solid #d4e8dd;
}
.book-extra-links h4 {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.book-extra-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 4px 6px 4px 0;
  border: 1px solid;
  transition: background 0.15s, color 0.15s;
}
.book-extra-link--interview { background: #fff; color: #2D6A4F; border-color: #2D6A4F; }
.book-extra-link--interview:hover { background: #2D6A4F; color: #fff; }
.book-extra-link--blog { background: #fff; color: #1a6ea8; border-color: #1a6ea8; }
.book-extra-link--blog:hover { background: #1a6ea8; color: #fff; }
.book-extra-link--video { background: #fff; color: #cc0000; border-color: #cc0000; }
.book-extra-link--video:hover { background: #cc0000; color: #fff; }

/* ── Related books section ─────────────────────────────────────────────────── */

.book-related-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid #eee;
}
.book-related-heading {
  font-size: 1.3rem;
  margin: 0 0 20px;
  color: #1a1a1a;
}
.book-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.book-related-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.book-related-card__cover {
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.15);
  background: #f0f0f0;
  margin-bottom: 10px;
  transition: transform 0.18s, box-shadow 0.18s;
}
.book-related-card:hover .book-related-card__cover {
  transform: translateY(-4px);
  box-shadow: 4px 8px 20px rgba(0,0,0,0.2);
}
.book-related-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.book-related-card__no-cover {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2D6A4F, #1d5238);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 900;
}
.book-related-card__info h3 {
  font-size: 0.85rem;
  margin: 0 0 4px;
  line-height: 1.3;
  color: #1a1a1a;
}
.book-related-card:hover .book-related-card__info h3 { color: #2D6A4F; }
.book-related-card__author { font-size: 0.75rem; color: #888; margin: 0 0 4px; }
.book-related-card__price { font-size: 0.82rem; font-weight: 700; color: #2D6A4F; margin: 0; }

@media (max-width: 600px) {
  .book-related-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* ── Books catalogue page ──────────────────────────────────────────────────── */

.books-main {
  max-width: 1084px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.books-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.books-page-header h1 { font-size: 1.6rem; margin: 0 0 2px; }
.books-total-count { color: #888; font-size: 0.82rem; margin: 0; }

.books-search-form { margin: 0; }
.books-search-input-wrap {
  display: flex;
  border: 1.5px solid #2D6A4F;
  border-radius: 6px;
  overflow: hidden;
}
.books-search-input-wrap input {
  padding: 8px 12px;
  border: none;
  outline: none;
  font-size: 0.88rem;
  width: 220px;
  background: #fff;
}
.books-search-input-wrap button {
  background: #2D6A4F;
  color: #fff;
  border: none;
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.books-search-input-wrap button:hover { background: #1d5238; }

.books-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}
.books-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #ddd;
  color: #555;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.13s;
}
.books-filter-pill:hover,
.books-filter-pill.active {
  background: #2D6A4F;
  color: #fff;
  border-color: #2D6A4F;
}
.pill-count {
  background: rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 0 5px;
  font-size: 0.7rem;
  font-weight: 700;
}
.books-filter-pill.active .pill-count,
.books-filter-pill:hover .pill-count { background: rgba(255,255,255,0.25); }

.books-catalogue-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px 16px;
  margin-bottom: 32px;
}
.books-catalogue-item { display: flex; flex-direction: column; }
.books-catalogue-cover {
  display: block;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.12);
  background: #f0f0f0;
  margin-bottom: 8px;
  transition: transform 0.18s, box-shadow 0.18s;
}
.books-catalogue-cover:hover {
  transform: translateY(-3px);
  box-shadow: 4px 8px 20px rgba(0,0,0,0.18);
}
.books-catalogue-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.books-catalogue-cover__placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #2D6A4F, #1d5238);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 2rem; font-weight: 900;
}
.books-catalogue-info h3 {
  font-size: 0.8rem; font-weight: 600; margin: 0 0 3px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.books-catalogue-info h3 a { color: #1a1a1a; text-decoration: none; }
.books-catalogue-info h3 a:hover { color: #2D6A4F; }
.books-catalogue-author {
  font-size: 0.72rem; color: #888; margin: 0 0 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.books-catalogue-author a { color: #2D6A4F; text-decoration: none; }
.books-catalogue-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.books-catalogue-rating { font-size: 0.72rem; color: #f59e0b; font-weight: 600; }
.books-catalogue-price { font-size: 0.78rem; font-weight: 700; color: #2D6A4F; }

.books-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 24px 0;
}
.books-page-btn {
  padding: 7px 16px; border: 1px solid #ddd; border-radius: 6px;
  color: #2D6A4F; text-decoration: none; font-size: 0.85rem; font-weight: 600;
  transition: all 0.13s;
}
.books-page-btn:hover { background: #2D6A4F; color: #fff; border-color: #2D6A4F; }
.books-page-btn--disabled { color: #bbb; border-color: #eee; cursor: default; pointer-events: none; }
.books-page-numbers { display: flex; align-items: center; gap: 4px; }
.books-page-num {
  width: 34px; height: 34px; display: flex; align-items: center;
  justify-content: center; border: 1px solid #ddd; border-radius: 6px;
  color: #444; text-decoration: none; font-size: 0.85rem; transition: all 0.13s;
}
.books-page-num:hover { border-color: #2D6A4F; color: #2D6A4F; }
.books-page-num.active { background: #2D6A4F; border-color: #2D6A4F; color: #fff; font-weight: 700; }
.books-page-ellipsis { color: #aaa; padding: 0 4px; font-size: 0.85rem; }

.books-empty { text-align: center; padding: 48px 16px; color: #888; }
.books-empty a { color: #2D6A4F; font-weight: 600; }

/* Book detail top bar */
.book-detail-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.book-detail-back {
  color: #2D6A4F; text-decoration: none;
  font-size: 0.85rem; font-weight: 600;
}
.book-detail-back:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .books-catalogue-grid { grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
  .books-page-header { flex-direction: column; }
  .books-search-input-wrap input { width: 160px; }
}
@media (max-width: 480px) {
  .books-catalogue-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Books author page ─────────────────────────────────────────────────────── */

.books-author-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding: 20px;
  background: #f9fbf9;
  border-radius: 8px;
  border: 1px solid #d4e8dd;
}
.books-author-photo {
  width: 100px; height: 100px;
  border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.books-author-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, #2D6A4F, #1d5238);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.8rem; font-weight: 900; flex-shrink: 0;
}
.books-author-meta h1 { font-size: 1.5rem; margin: 0 0 4px; }
.books-author-nationality { color: #888; font-size: 0.85rem; margin: 0 0 4px; }
.books-author-website {
  display: inline-block; color: #2D6A4F; font-size: 0.82rem;
  text-decoration: none; margin-right: 12px;
}
.books-author-website:hover { text-decoration: underline; }
.books-author-bio { margin-bottom: 24px; color: #444; line-height: 1.7; font-size: 0.92rem; }
.books-author-books-heading {
  font-size: 1.2rem; margin: 0 0 16px;
  display: flex; align-items: center; gap: 10px;
}
.books-count-badge {
  background: #2D6A4F; color: #fff;
  border-radius: 12px; padding: 2px 10px;
  font-size: 0.8rem; font-weight: 700;
}

/* ── Admin: book cover upload ──────────────────────────────────────────────── */

.cover-image-group { margin-bottom: 1.25rem; }
.cover-preview {
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 10px;
}
.cover-preview-actions { display: flex; flex-direction: column; gap: 6px; }
.cover-filename { font-size: 0.75rem; color: #666; word-break: break-all; }
.btn-remove-cover {
  background: none; border: 1px solid #e53e3e; color: #e53e3e;
  padding: 3px 10px; border-radius: 4px; cursor: pointer;
  font-size: 0.78rem; width: fit-content;
}
.btn-remove-cover:hover { background: #e53e3e; color: #fff; }
.cover-upload-area { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cover-upload-area input[type=file] { display: none; }
.cover-upload-label {
  display: inline-block; padding: 7px 14px;
  background: #2D6A4F; color: #fff; border-radius: 6px;
  cursor: pointer; font-size: 0.85rem; font-weight: 600;
}
.cover-upload-label:hover { background: #1d5238; }

/* ── Contextual edit bar (public pages for admins) ─────────────────────────── */

.contextual-edit-bar {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  padding: 8px 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}
.contextual-edit-btn {
  color: #b45309;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}
.contextual-edit-btn:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════
   WIKI / PAGE template
   ══════════════════════════════════════════════════════ */
.wiki-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}
.wiki-breadcrumb {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 16px;
  line-height: 1.5;
}
.wiki-breadcrumb a { color: #2D6A4F; text-decoration: none; }
.wiki-breadcrumb a:hover { text-decoration: underline; }

.wiki-page__title {
  font-size: 2rem;
  font-weight: 700;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 12px;
  margin: 0 0 20px;
  line-height: 1.25;
}

/* Featured image (floats right like Wikipedia) */
.wiki-page__featured-image {
  float: right;
  clear: right;
  margin: 0 0 16px 24px;
  max-width: 300px;
  border: 1px solid #ddd;
  padding: 4px;
  border-radius: 4px;
  background: #fff;
  font-size: 0.75rem;
  color: #666;
}
.wiki-page__featured-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}
.wiki-page__featured-image figcaption {
  padding: 5px 2px 2px;
  text-align: center;
  line-height: 1.4;
}

/* TOC */
.page-toc {
  float: right;
  clear: right;
  background: #f9fbf9;
  border: 1px solid #d0e8d8;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 0 0 20px 24px;
  min-width: 180px;
  max-width: 260px;
  font-size: 0.82rem;
}
.page-toc h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin: 0 0 8px;
}
.page-toc ol { margin: 0; padding-left: 18px; }
.page-toc li { margin: 3px 0; }
.page-toc li a { color: #2D6A4F; text-decoration: none; line-height: 1.4; }
.page-toc li a:hover { text-decoration: underline; }
.page-toc .toc-sub { margin-left: 14px; list-style-type: circle; font-size: 0.77rem; }

/* Body content */
.wiki-page__body { line-height: 1.8; color: #333; font-size: 0.97rem; }
.wiki-page__body h2 {
  font-size: 1.3rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
  margin: 32px 0 12px;
  clear: both;
}
.wiki-page__body h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.wiki-page__body p  { margin: 0 0 14px; }
.wiki-page__body img { max-width: 100%; height: auto; border-radius: 4px; }
.wiki-page__body blockquote {
  border-left: 3px solid #2D6A4F;
  margin: 16px 0;
  padding: 8px 16px;
  background: #f9fbf9;
  color: #555;
  font-style: italic;
}
.wiki-page__body table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 0.88rem; }
.wiki-page__body td,
.wiki-page__body th { border: 1px solid #ddd; padding: 8px 12px; text-align: left; }
.wiki-page__body th { background: #f0f7f4; font-weight: 700; }
.wiki-page__body ul,
.wiki-page__body ol { padding-left: 1.5rem; margin: 0 0 14px; }
.wiki-page__body li  { margin-bottom: 4px; }

/* References */
.wiki-page__references { margin-top: 40px; padding-top: 20px; border-top: 2px solid #eee; }
.wiki-page__references h2 { font-size: 1.1rem; margin: 0 0 12px; border: none; padding: 0; }
.references-list { font-size: 0.82rem; color: #555; line-height: 1.7; padding-left: 20px; }

/* Category + footer */
.wiki-page__categories {
  margin-top: 24px;
  padding: 10px 14px;
  background: #f9fbf9;
  border: 1px solid #d4e8dd;
  border-radius: 6px;
  font-size: 0.82rem;
}
.wiki-cat-link { color: #2D6A4F; text-decoration: none; font-weight: 600; }
.wiki-page__footer { margin-top: 14px; font-size: 0.75rem; color: #aaa; }

/* ══════════════════════════════════════════════════════
   RESEARCH INDEX
   ══════════════════════════════════════════════════════ */
.research-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}
.research-hero {
  text-align: center;
  padding: 32px 0 24px;
  border-bottom: 1px solid #eee;
  margin-bottom: 32px;
}
.research-hero h1 { font-size: 1.8rem; margin: 0 0 8px; }
.research-hero__sub { color: #666; font-size: 1rem; margin: 0; }
.research-section-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin: 0 0 16px;
  font-weight: 600;
}

/* Topic cards grid */
.research-topics { margin-bottom: 40px; }
.research-topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.research-topic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px;
  background: #fff;
  border: 1px solid #e0e8e4;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.research-topic-card:hover { border-color: #2D6A4F; box-shadow: 0 2px 10px rgba(45,106,79,.1); }
.rtc-icon { font-size: 1.8rem; line-height: 1; }
.rtc-name { font-weight: 600; font-size: 0.88rem; color: #222; }
.rtc-count { font-size: 0.75rem; color: #888; }

/* Featured/recently updated */
.research-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.research-featured-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.research-featured-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.rfc-img { height: 140px; overflow: hidden; background: #f0f0f0; }
.rfc-img img { width: 100%; height: 100%; object-fit: cover; }
.rfc-body { padding: 14px; display: flex; flex-direction: column; gap: 5px; }
.rfc-topic { font-size: 0.72rem; color: #2D6A4F; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.rfc-title { font-size: 0.92rem; font-weight: 700; color: #222; margin: 0; line-height: 1.4; }
.rfc-excerpt { font-size: 0.8rem; color: #666; margin: 0; line-height: 1.5;
               display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ══════════════════════════════════════════════════════
   RESEARCH TOPIC PAGE
   ══════════════════════════════════════════════════════ */
.research-topic-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0 24px;
  border-bottom: 1px solid #eee;
  margin-bottom: 28px;
}
.rth-icon { font-size: 2.5rem; line-height: 1; flex-shrink: 0; }
.rth-title { font-size: 1.8rem; font-weight: 700; margin: 0 0 4px; }
.rth-desc  { color: #666; font-size: 0.9rem; margin: 0 0 6px; }
.rth-count { font-size: 0.78rem; color: #888; background: #f0f0f0; padding: 2px 8px; border-radius: 20px; }

/* Article list on topic page */
.research-page-list { display: flex; flex-direction: column; gap: 0; }
.rpl-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  align-items: flex-start;
  transition: background 0.12s;
}
.rpl-item:hover { background: #fafdf9; padding-left: 8px; }
.rpl-img { width: 100px; height: 70px; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.rpl-img img { width: 100%; height: 100%; object-fit: cover; }
.rpl-img--placeholder { background: #e8e8e8; }
.rpl-body { flex: 1; }
.rpl-title { font-size: 0.95rem; font-weight: 700; color: #1a1a1a; margin: 0 0 5px; line-height: 1.4; }
.rpl-excerpt { font-size: 0.82rem; color: #666; margin: 0 0 5px; line-height: 1.5; }
.rpl-date { font-size: 0.72rem; color: #aaa; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .wiki-page__featured-image,
  .page-toc { float: none; margin: 0 0 16px 0; max-width: 100%; }
  .wiki-page__title { font-size: 1.5rem; }
  .research-topics-grid { grid-template-columns: repeat(3, 1fr); }
  .research-featured-grid { grid-template-columns: 1fr; }
}

.wiki-page__byline {
  font-size: 0.82rem;
  color: #888;
  margin-bottom: 20px;
}
.wiki-page__byline a {
  color: #2D6A4F;
  text-decoration: none;
  font-weight: 600;
}
.wiki-page__byline a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════
   HOMEPAGE
   ══════════════════════════════════════════════════════ */
.homepage { width: 100%; }
.home-section { padding: 48px 0; }
.home-section__inner { max-width: 1084px; margin: 0 auto; padding: 0 16px; }
.home-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}
.home-section__title { font-size: 1.4rem; font-weight: 700; color: #1a1a1a; margin: 0; }
.home-section__viewall { font-size: 0.82rem; color: #2D6A4F; text-decoration: none; }
.home-section__viewall:hover { text-decoration: underline; }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero__overlay { position: absolute; inset: 0; z-index: 0; }
.hero__content {
  position: relative; z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 64px 24px 32px;
  text-align: center;
  color: #fff;
}
.hero__headline {
  font-size: 2.5rem; font-weight: 800; line-height: 1.2;
  margin: 0 0 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.hero__subtext { font-size: 1.1rem; margin: 0 0 28px; opacity: 0.9; line-height: 1.6; }

.hero-search-form {
  display: flex;
  max-width: 520px;
  margin: 0 auto 24px;
  background: #fff;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.hero-search-form input {
  flex: 1; border: none; outline: none;
  padding: 14px 20px; font-size: 0.95rem;
  background: transparent; color: #1a1a1a;
}
.hero-search-form button {
  background: #2D6A4F; color: #fff; border: none;
  padding: 14px 24px; cursor: pointer;
  font-size: 0.9rem; font-weight: 600; transition: background 0.2s;
}
.hero-search-form button:hover { background: #1d5238; }

.hero__ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero__cta {
  display: inline-block; padding: 10px 24px; border-radius: 6px;
  font-size: 0.9rem; font-weight: 600;
  text-decoration: none; transition: all 0.2s;
}
.hero__cta--primary { background: #2D6A4F; color: #fff; }
.hero__cta--primary:hover { background: #1d5238; }
.hero__cta--secondary {
  background: rgba(255,255,255,0.15); color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
}
.hero__cta--secondary:hover { background: rgba(255,255,255,0.25); }

.hero__stats {
  position: relative; z-index: 1;
  display: flex;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
}
.hero__stat {
  flex: 1; text-align: center; padding: 14px 8px; color: #fff;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.hero__stat:last-child { border-right: none; }
.hero__stat strong { display: block; font-size: 1.4rem; font-weight: 800; }
.hero__stat span { font-size: 0.72rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Books section ── */
.home-books { background: #fafafa; }
.home-books-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.home-book-card { display: flex; flex-direction: column; }
.home-book-card__cover {
  display: block; aspect-ratio: 2/3;
  background: #e8e8e8; border-radius: 4px;
  overflow: hidden; margin-bottom: 8px;
  transition: transform 0.18s, box-shadow 0.18s;
}
.home-book-card__cover:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.home-book-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.home-book-card__placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2D6A4F, #1d5238);
  color: #fff; font-size: 1.8rem; font-weight: 800;
}
.home-book-card__info h3 { font-size: 0.82rem; margin: 0 0 3px; line-height: 1.3; }
.home-book-card__info h3 a { color: #1a1a1a; text-decoration: none; }
.home-book-card__info h3 a:hover { color: #2D6A4F; }
.home-book-card__author { font-size: 0.73rem; color: #888; margin: 0 0 2px; }
.home-book-card__price { font-size: 0.73rem; color: #2D6A4F; font-weight: 600; margin: 0; }
.home-books-footer { text-align: center; padding-top: 8px; }
.btn-viewall {
  display: inline-block; padding: 10px 28px;
  background: #2D6A4F; color: #fff; border-radius: 6px;
  text-decoration: none; font-size: 0.9rem; font-weight: 600;
  transition: background 0.2s;
}
.btn-viewall:hover { background: #1d5238; }

/* ── Topics grid ── */
.home-topics-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.home-topic-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 18px 10px 14px;
  background: #fff; border: 1px solid #e8e8e8; border-radius: 8px;
  text-decoration: none;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.home-topic-card:hover { border-color: #2D6A4F; box-shadow: 0 4px 12px rgba(45,106,79,0.1); }
.home-topic-card__icon { font-size: 1.6rem; margin-bottom: 6px; }
.home-topic-card__name { font-size: 0.8rem; font-weight: 700; color: #1a1a1a; margin-bottom: 3px; }
.home-topic-card__count { font-size: 0.68rem; color: #888; }

/* ── Research cards ── */
.home-research-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.home-research-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 8px; overflow: hidden; }
.home-research-card__image {
  display: block; aspect-ratio: 16/9;
  overflow: hidden; background: #e8e8e8;
}
.home-research-card__image img { width: 100%; height: 100%; object-fit: cover; }
.home-research-card__image--placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, #f0f7f4, #dff0e8);
}
.home-research-card__body { padding: 16px; }
.home-research-card__topic { font-size: 0.72rem; color: #2D6A4F; font-weight: 600; display: block; margin-bottom: 6px; }
.home-research-card__body h3 { font-size: 0.95rem; margin: 0 0 8px; line-height: 1.4; }
.home-research-card__body h3 a { color: #1a1a1a; text-decoration: none; }
.home-research-card__body h3 a:hover { color: #2D6A4F; }
.home-research-card__body p { font-size: 0.82rem; color: #666; margin: 0 0 10px; line-height: 1.5; }
.home-research-card__link { font-size: 0.78rem; color: #2D6A4F; text-decoration: none; font-weight: 600; }
.home-research-card__link:hover { text-decoration: underline; }

/* ── Custom HTML blocks ── */
.home-custom-block { background: #f5f5f5; padding: 32px 0; }

/* ── Footer ── */
.site-footer { background: #1a3d2b; color: rgba(255,255,255,0.75); padding: 0; }
.footer-inner {
  max-width: 1084px; margin: 0 auto; padding: 48px 16px 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
}
.footer-brand .footer-logo {
  display: inline-block; color: #fff; text-decoration: none;
  font-size: 1.3rem; font-weight: 300; margin-bottom: 12px;
}
.footer-brand .footer-logo strong { font-weight: 800; color: #52b788; }
.footer-brand p { font-size: 0.82rem; line-height: 1.6; color: rgba(255,255,255,0.6); margin: 0; }
.footer-links h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.4); margin: 0 0 12px; }
.footer-links a { display: block; color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.85rem; margin-bottom: 8px; transition: color 0.15s; }
.footer-links a:hover { color: #52b788; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); text-align: center; padding: 16px; font-size: 0.75rem; color: rgba(255,255,255,0.35); }

/* ── Homepage responsive ── */
@media (max-width: 900px) {
  .home-books-row { grid-template-columns: repeat(3, 1fr); }
  .home-topics-grid { grid-template-columns: repeat(4, 1fr); }
  .home-research-cards { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero__headline { font-size: 1.8rem; }
  .hero__stat strong { font-size: 1.1rem; }
  .home-books-row { grid-template-columns: repeat(2, 1fr); }
  .home-topics-grid { grid-template-columns: repeat(3, 1fr); }
  .home-research-cards { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 380px) {
  .hero { min-height: 360px; }
  .hero__headline { font-size: 1.4rem; }
  .home-topics-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ══ Search page ══ */
.search-page__hero {
  background: linear-gradient(135deg, #1a3d2b 0%, #2D6A4F 100%);
  padding: 40px 16px 36px;
  text-align: center;
}
.search-page__title {
  color: #fff;
  font-size: 1.5rem;
  margin: 0 0 20px;
  font-weight: 700;
}
.search-page__form { max-width: 600px; margin: 0 auto; }
.search-page__input-wrap {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.search-page__input-wrap input {
  flex: 1;
  padding: 14px 18px;
  font-size: 1rem;
  border: none;
  outline: none;
  color: #1a1a1a;
}
.search-page__input-wrap button {
  background: #52b788;
  color: #fff;
  border: none;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.search-page__input-wrap button:hover { background: #40916c; }
.search-page__hint { color: #888; padding: 24px 0; font-size: 0.95rem; }
.search-page__count { font-size: 0.82rem; color: #888; margin-bottom: 20px; }
.article-card__excerpt { font-size: 0.82rem; color: #666; margin: 4px 0 0; line-height: 1.5; }

.site-header__nav a.nav-active {
  color: #fff;
  border-bottom: 2px solid rgba(255,255,255,0.7);
  padding-bottom: 2px;
}
