/* Compact post feed and article layout. */
body.posts-page-body #title-block-header,
body.post-article-body #title-block-header {
  margin-bottom: 0;
}

body.posts-page-body #title-block-header h1.title,
body.post-article-body #title-block-header h1.title {
  font-size: clamp(2.2rem, 3.6vw, 3.1rem);
  margin-bottom: 0;
}

.posts-page,
.post-article {
  padding-top: 1.1rem;
  padding-bottom: 4rem;
}

.posts-intro {
  color: var(--pace-ink-soft);
  max-width: 52rem;
  margin-bottom: 0.7rem;
}

.posts-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  scroll-margin-top: 9rem;
}

.posts-feed-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.3rem 1.5rem;
  padding: 1.1rem 0 1.2rem;
  border-bottom: 1px solid var(--pace-line);
}

.posts-feed-item[hidden] {
  display: none;
}

.posts-feed-item > a {
  color: var(--pace-ink);
  font-size: 1.18rem;
  font-weight: 600;
  text-decoration: none;
}

.posts-feed-item > a:hover,
.posts-feed-item > a:focus-visible {
  text-decoration: underline;
}

.posts-feed-meta {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.65rem;
}

.posts-pinned-badge {
  color: var(--pace-ink-soft);
  border: 1px solid var(--pace-line);
  border-radius: 999px;
  padding: 0.08rem 0.48rem;
  font-size: 0.76rem;
  white-space: nowrap;
}

.posts-feed-item:not([data-pinned="true"]) .posts-pinned-badge {
  display: none;
}

.posts-feed-excerpt {
  grid-column: 1 / -1;
  max-width: 55rem;
  margin: 0.1rem 0 0;
  color: var(--pace-ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}

.posts-feed-more {
  color: var(--pace-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  white-space: nowrap;
}

.posts-feed-meta time,
.post-date {
  color: var(--pace-ink-soft);
  font-size: 0.88rem;
  white-space: nowrap;
}

.posts-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.4rem;
}

.posts-pagination button {
  border: 1px solid var(--pace-line);
  border-radius: 999px;
  background: transparent;
  color: var(--pace-ink);
  padding: 0.36rem 0.9rem;
}

.posts-pagination button:not(:disabled):hover,
.posts-pagination button:not(:disabled):focus-visible {
  background: var(--pace-line);
}

.posts-pagination button:disabled {
  opacity: 0.45;
  cursor: default;
}

.posts-pagination-status {
  color: var(--pace-ink-soft);
  font-size: 0.88rem;
  white-space: nowrap;
}

.post-article > p {
  max-width: 46rem;
}

.post-date {
  margin-bottom: 1.5rem;
}

.post-back {
  margin-top: 2rem;
}

/* English-only drafts stay out of the Chinese feed until copy is supplied. */
html[lang="zh-CN"] .posts-english-only {
  display: none;
}

body.post-article-body #title-block-header,
.post-article {
  width: 100%;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.post-article {
  padding-left: 0;
  padding-right: 0;
}

.post-article > p {
  max-width: none;
}

.post-article h2 {
  border: 0;
  padding-bottom: 0;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.post-article .post-references {
  overflow-wrap: anywhere;
}

.post-article .post-references > p:not(.post-back) {
  margin-bottom: 0.5rem;
}

.post-climate-figure {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(72rem, calc(100vw - 2rem));
  margin: 1.25rem 0 1.75rem;
}

.post-climate-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.post-climate-figure a {
  display: block;
  cursor: zoom-in;
}

.post-status {
  font-weight: 600;
}

.post-flyer {
  max-width: 34rem;
  margin: 1.5rem auto;
}

.post-flyer a,
.post-flyer img {
  display: block;
  width: 100%;
}

.post-flyer img {
  height: auto;
  border: 1px solid var(--pace-line);
}

.post-flyer figcaption {
  margin-top: 0.45rem;
  color: var(--pace-ink-soft);
  font-size: 0.86rem;
  text-align: center;
}

@media (max-width: 620px) {
  .posts-feed-item {
    grid-template-columns: 1fr;
    gap: 0.28rem;
  }

  .posts-feed-meta {
    grid-row: 2;
    justify-content: flex-start;
  }

  .posts-feed-excerpt {
    grid-row: 3;
  }

  .posts-pagination {
    gap: 0.55rem;
  }
}
