/* 文章页:灰底正文卡片 + 分享 + Recent Posts。
   日期、标题、封面、分享、Recent Posts 都由 tools/sync.js 按 site.json 生成,这里只管样子。 */

/* 原站文章页正文区固定 1750px 高:文章长短只吃掉底部留白,页脚位置不动。
   比这更长的文章照常把页面撑高(原站那种情况会压到页脚上)。 */
.post-page { box-sizing: border-box; min-height: 1750px; padding-block: 90px 100px; }

.post {
  width: min(940px, 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding: 64px 100px 100px;
  background: var(--mist);
}

.post__date { font-size: 14px; line-height: 21px; }
.post__title { margin-top: 18px; font-size: clamp(26px, calc(2.22 * var(--vw)), 32px); line-height: 1.25; font-weight: 700; }
.post__hero { width: 100%; margin-top: 33px; }

.post-body { margin-top: 2px; }
.post-body p { font-size: 16px; line-height: 24px; }

/* 纯文字页(隐私说明):借文章页的灰底卡片,不要文章页 1750px 的固定高度 */
.post-page--text { min-height: 0; }
.legal .post-body { margin-top: 28px; }
.legal .post-body h2 { margin-top: 36px; font-size: 20px; line-height: 1.3; font-weight: 700; }
.legal .post-body p + p { margin-top: 14px; }
.legal .post-body h2 + p { margin-top: 12px; }
.legal .post-body a { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.legal__button {
  padding: 10px 20px;
  border: 1px solid var(--ink);
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  cursor: pointer;
}
@media (hover: hover) {
  .legal__button:hover { background: var(--ink); color: var(--paper); }
}

.post-share {
  display: flex;
  gap: 30px;
  margin-top: 18px;
  padding-block: 23px;
  border-block: 1px solid var(--line-soft);
}
.post-share__btn {
  display: block;
  width: 19px;
  height: 19px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.post-share__btn svg { display: block; }
.post-share__btn:hover { color: var(--accent); }
.post-share__btn[data-copied] { color: var(--accent); }

/* ---------- Recent Posts ---------- */
.recent { width: min(940px, 100% - 2 * var(--gutter)); margin: 33px auto 0; }

.recent__head { display: flex; justify-content: space-between; align-items: baseline; }
.recent__title { font-size: 18px; line-height: 27px; font-weight: 400; }
.recent__all { font-size: 14px; line-height: 21px; text-decoration: none; }
.recent__all:hover { color: var(--accent); }

.recent__grid {
  list-style: none;
  padding: 0;
  margin-top: 17px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 33px;
}

.recent-card { background: var(--mist); }
.recent-card__link { display: block; text-decoration: none; }
.recent-card__link img { width: 100%; aspect-ratio: 291 / 163; object-fit: cover; }
/* 横线下面那一格原站放的是浏览量和点赞(Wix 那排灰色计数条);格子一直占着位,数字取到才显示,卡片高度不跳 */
.recent-card__body { display: block; padding: 25px 24px 20px; }
.recent-card__stats { display: block; height: 20px; margin-top: 16px; }
.recent-card__title {
  display: block;
  min-height: calc(2 * 1.175em + 22px);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 18px;
  line-height: 1.175;
  font-weight: 700;
}
.recent-card__link:hover .recent-card__title { color: var(--accent); }

@media (max-width: 767px) {
  .post-page { min-height: 0; padding-block: 48px 96px; }
  .post { padding: 40px 32px 48px; }
  .recent__grid { grid-template-columns: 1fr; }
}
