/* ============================================================================
   绿植生活家（站点 ID 3）· 全站唯一样式文件
   文件：assets/site.css
   依据：《绿植生活家 · 冻结设计契约 v1》（本次任务唯一视觉事实）
   约束：纯原生 CSS；无 @import、无外部资源、无框架语法、无 HTML 内联样式；
        组件类名与契约完全一致；空集合（栏目/列表/评论/标签/友链）自然降级。
   ========================================================================== */

/* ----------------------------------------------------------------------------
   1. Tokens —— 设计令牌（契约第 3 节逐字冻结，名称与值不得改动）
   ---------------------------------------------------------------------------- */
:root {
  --color-primary: #2E6B4F;        /* 植物绿 */
  --color-primary-strong: #23533D; /* 悬停深绿 */
  --color-tint: #EAF2EB;           /* 浅绿底 */
  --color-background: #F7F5EE;     /* 暖米白页面底 */
  --color-surface: #FFFFFF;
  --color-text: #233029;
  --color-muted: #5C6B62;
  --color-border: #DFDCD0;
  --color-focus: #1E8A5E;
  --radius-lg: 12px;
  --radius-md: 8px;
  --shadow-soft: 0 1px 2px rgba(35,48,41,.06), 0 2px 8px rgba(35,48,41,.05);
  --container: 1160px;
  --reading: 760px;
  --nav-h: 60px;
}

/* ----------------------------------------------------------------------------
   2. Reset & Base —— 基础重置、全局排版与空集合防御
   ---------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-top: var(--nav-h); /* 为 fixed 顶部导航预留 60px 等高空间 */
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-background);
  overflow-wrap: break-word; /* 长标题、长 URL 不溢出 */
}

h1, h2, h3, h4, h5, h6,
p, ul, ol, figure, blockquote, pre {
  margin: 0;
  padding: 0;
}

/* 列表默认去标记，仅 .article-body 内按内容语义恢复 */
ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-main {
  display: block;
  padding-top: 8px;
  scroll-margin-top: calc(var(--nav-h) + 12px); /* skip-link 定位时不被导航遮挡 */
}

/* 空集合防御：无条目时列表不渲染占位、不残留边距 */
.post-list:empty,
.post-row:empty,
.tag-list:empty,
.tag-cloud:empty,
.comments__list:empty,
.pagination__list:empty,
.page-links__list:empty {
  display: none;
}

/* ----------------------------------------------------------------------------
   3. Skip link —— 默认整体移出视口，键盘聚焦时完整可见
   ---------------------------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 16px;
  /* 整体（含文字/背景/边框/阴影）移出视口上方；fixed 定位不占布局 */
  transform: translateY(calc(-100% - 12px));
  z-index: 100; /* 高于顶部导航 z-index:50 */
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary-strong);
  background-color: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.skip-link:focus {
  transform: none; /* 聚焦时完整滑入视口 */
}

/* ----------------------------------------------------------------------------
   4. Header & Nav —— fixed 顶部导航（60px、不透明、可换行不溢出）
   ---------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background-color: var(--color-surface); /* 不透明背景 */
  border-bottom: 1px solid var(--color-border);
  z-index: 50;
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap; /* 长站名/多栏目/窄屏自然换行不溢出 */
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  min-height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary-strong);
}

/* 纯 CSS 叶形装饰：水滴形（不用 SVG/图片/字体图标） */
.brand__leaf {
  flex: none;
  width: 12px;
  height: 12px;
  background-color: var(--color-primary);
  border-radius: 0 70% 0 70%;
  transform: rotate(45deg);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.site-nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* 触摸面积 ≥44px */
  padding: 0 14px;
  font-size: 15px;
  color: var(--color-text);
  border-radius: var(--radius-md);
  transition: color 180ms ease, background-color 180ms ease;
}

.site-nav__list a:hover {
  color: var(--color-primary);
  background-color: var(--color-tint);
}

/* ----------------------------------------------------------------------------
   5. Container —— 页面容器（宽度不超视口）
   ---------------------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ----------------------------------------------------------------------------
   6. Breadcrumb —— 面包屑（13px muted、CSS 分隔符、窄屏换行）
   ---------------------------------------------------------------------------- */
.breadcrumb {
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--color-muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin: 0 8px;
  color: var(--color-muted);
  opacity: 0.55;
}

.breadcrumb a {
  color: var(--color-muted);
  transition: color 180ms ease;
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

/* ----------------------------------------------------------------------------
   7. Page head —— 栏目/标签页头（h1 28px + 48×3px primary 圆角短线）
   ---------------------------------------------------------------------------- */
.page-head {
  margin-top: 16px;
}

.page-head__title {
  font-size: 28px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--color-text);
}

.page-head__title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 12px;
  background-color: var(--color-primary);
  border-radius: 999px;
}

.page-head__desc {
  margin-top: 14px;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-muted);
}

/* ----------------------------------------------------------------------------
   8. Hero —— 首页头部（浅绿底圆角区 + 低调纯 CSS 叶形点缀）
   ---------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  padding: 40px 32px;
  background-color: var(--color-tint);
  border-radius: var(--radius-lg);
}

.hero__kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--color-primary);
}

.hero__title {
  margin-top: 10px;
  font-size: 32px;
  line-height: 1.35;
  color: var(--color-text);
}

.hero__sub {
  margin-top: 10px;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-muted);
}

/* 叶形装饰一：大叶 */
.hero::after {
  content: "";
  position: absolute;
  top: 28px;
  right: 44px;
  width: 72px;
  height: 72px;
  background-color: var(--color-primary);
  opacity: 0.12;
  border-radius: 0 70% 0 70%;
  transform: rotate(45deg);
}

/* 叶形装饰二：小叶 */
.hero::before {
  content: "";
  position: absolute;
  top: 84px;
  right: 120px;
  width: 36px;
  height: 36px;
  background-color: var(--color-primary);
  opacity: 0.1;
  border-radius: 0 70% 0 70%;
  transform: rotate(45deg);
}

/* ----------------------------------------------------------------------------
   9. Home layout —— 首页布局（默认单列；有侧栏时 minmax(0,1fr)+300px 双栏）
   ---------------------------------------------------------------------------- */
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin-top: 28px;
}

.home-layout--aside {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.home-main,
.home-aside {
  min-width: 0; /* 防止长内容撑破栅格 */
}

.home-aside {
  display: grid;
  gap: 24px;
  align-content: start;
}

/* ----------------------------------------------------------------------------
   10. Post list —— 编辑风文章列表（文字左、封面右；hover 轻反馈）
   ---------------------------------------------------------------------------- */
.post-list {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.post-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.post-card:hover,
.post-card:focus-within {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(35,48,41,.06), 0 6px 16px rgba(35,48,41,.08);
}

.post-card__link {
  display: flex;
  gap: 20px;
  height: 100%;
  padding: 20px;
}

.post-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.post-card__title {
  font-size: 19px;
  line-height: 1.55;
  font-weight: 700;
  color: var(--color-text);
}

.post-card__summary {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-muted);
}

.post-card__meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}

.post-card__thumb {
  flex: none;
  align-self: center;
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* ----------------------------------------------------------------------------
   11. Post row & Aside —— 侧栏盒子与紧凑列表（热门阅读/相关阅读共用）
   ---------------------------------------------------------------------------- */
.side-box {
  padding: 20px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.side-box__title {
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
}

.side-box__title::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  margin-top: 8px;
  background-color: var(--color-primary);
  border-radius: 999px;
}

.post-row li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--color-border);
}

.post-row li:last-child {
  border-bottom: 0;
}

.post-row a {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  transition: color 180ms ease;
}

.post-row a:hover {
  color: var(--color-primary);
}

.post-row__date {
  flex: none;
  font-size: 13px;
  color: var(--color-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------------------
   12. Pagination —— 分页（.is-current 高亮；44px 触摸面积；自然换行）
   ---------------------------------------------------------------------------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.pagination__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 16px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.pagination a:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.pagination .is-current,
.pagination .is-current:hover {
  font-weight: 700;
  color: var(--color-primary);
  background-color: var(--color-tint);
  border-color: var(--color-tint);
}

/* ----------------------------------------------------------------------------
   13. Article —— 文章详情框架（阅读栏 760px 居中，与外框分离）
   ---------------------------------------------------------------------------- */
.article {
  max-width: var(--reading);
  margin-top: 24px;
  margin-inline: auto;
}

.article__head {
  margin-bottom: 24px;
}

.article__title {
  font-size: 30px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--color-text);
}

.article__title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 12px;
  background-color: var(--color-primary);
  border-radius: 999px;
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--color-muted);
}

.article__meta a {
  color: var(--color-muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 180ms ease;
}

.article__meta a:hover {
  color: var(--color-primary);
}

.article__head .tag-list {
  margin-top: 16px;
}

.article__cover {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  margin-bottom: 28px;
  border-radius: var(--radius-lg);
}

/* ----------------------------------------------------------------------------
   14. Article body —— 正文后代元素全量覆盖（17px / 行高 1.85）
   ---------------------------------------------------------------------------- */
.article-body {
  font-size: 17px;
  line-height: 1.85;
  color: var(--color-text);
}

.article-body p {
  margin-bottom: 1.1em;
}

.article-body h2 {
  margin: 1.8em 0 0.7em;
  font-size: 24px;
  line-height: 1.5;
}

.article-body h3 {
  margin: 1.6em 0 0.6em;
  font-size: 20px;
  line-height: 1.5;
}

.article-body h4 {
  margin: 1.4em 0 0.5em;
  font-size: 18px;
  line-height: 1.5;
}

.article-body h2:first-child,
.article-body h3:first-child,
.article-body h4:first-child {
  margin-top: 0;
}

.article-body ul {
  margin-bottom: 1.1em;
  padding-left: 1.6em;
  list-style: disc;
}

.article-body ol {
  margin-bottom: 1.1em;
  padding-left: 1.6em;
  list-style: decimal;
}

.article-body li {
  margin: 0.3em 0;
}

.article-body li::marker {
  color: var(--color-primary); /* 列表标记的有机点缀 */
}

.article-body li ul,
.article-body li ol {
  margin: 0.3em 0;
}

.article-body blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background-color: var(--color-tint);
}

.article-body blockquote p {
  margin-bottom: 0.6em;
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

/* 表格：块级化 + 仅局部横向滚动，不撑破页面 */
.article-body table {
  display: block;
  max-width: 100%;
  margin: 1.4em 0;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  border-collapse: collapse;
  border-spacing: 0;
}

.article-body thead th {
  background-color: var(--color-tint);
}

.article-body th,
.article-body td {
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
  font-size: 15px;
  line-height: 1.6;
}

.article-body th {
  font-weight: 700;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

/* 代码块：仅局部横向滚动 */
.article-body pre {
  margin: 1.4em 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-tint);
  background-color: var(--color-text);
  border-radius: var(--radius-md);
}

.article-body code {
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  color: var(--color-primary-strong);
  background-color: var(--color-tint);
  border-radius: 4px;
}

.article-body pre code {
  padding: 0;
  font-size: inherit;
  color: inherit;
  background-color: transparent;
  border-radius: 0;
}

.article-body a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 180ms ease;
}

.article-body a:hover {
  color: var(--color-primary-strong);
}

.article-body strong {
  font-weight: 700;
}

.article-body em {
  font-style: italic;
}

.article-body hr {
  height: 1px;
  margin: 2em 0;
  border: 0;
  background-color: var(--color-border);
}

.article-body figure {
  margin: 1.6em 0;
}

.article-body figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-muted);
  text-align: center;
}

.article-body > :last-child {
  margin-bottom: 0;
}

/* ----------------------------------------------------------------------------
   15. Article nav —— 上下篇（只渲染存在的一侧，不留空位）
   ---------------------------------------------------------------------------- */
.article-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.article-nav__item {
  display: flex;
  flex: 1 1 260px;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color 180ms ease, transform 180ms ease;
}

.article-nav__item:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.article-nav__label {
  font-size: 12px;
  color: var(--color-muted);
}

.article-nav__title {
  font-size: 15px;
  line-height: 1.6;
  font-weight: 600;
  color: var(--color-text);
}

.article-nav__item--next {
  align-items: flex-end;
  text-align: right;
}

/* ----------------------------------------------------------------------------
   16. Related —— 相关阅读
   ---------------------------------------------------------------------------- */
.related {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.related__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
}

.related__title::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  margin-top: 8px;
  background-color: var(--color-primary);
  border-radius: 999px;
}

.related .post-row {
  margin-top: 8px;
}

/* ----------------------------------------------------------------------------
   17. Comments —— 评论（头像降级：圆形 tint 底 + primary 首字）
   ---------------------------------------------------------------------------- */
.comments {
  margin-top: 48px;
}

.comments__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
}

.comments__title::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  margin-top: 8px;
  background-color: var(--color-primary);
  border-radius: 999px;
}

.comments__list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.comment {
  display: flex;
  gap: 14px;
  padding: 16px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.comment__avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* 降级头像：首字占位（aria-hidden 由模板保证） */
.comment__avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary-strong);
  background-color: var(--color-tint);
}

.comment__main {
  flex: 1 1 auto;
  min-width: 0;
}

.comment__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.comment__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.comment__time {
  font-size: 13px;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}

.comment__body {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

.comments__more {
  margin-top: 16px;
  font-size: 14px;
}

.comments__more a {
  font-weight: 600;
  color: var(--color-primary);
  transition: color 180ms ease;
}

.comments__more a:hover {
  color: var(--color-primary-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ----------------------------------------------------------------------------
   18. Tag —— 标签（tint 圆角胶囊；纯文本用 --plain 虚线弱化样式）
   ---------------------------------------------------------------------------- */
.tag-list,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip,
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-primary-strong);
  background-color: var(--color-tint);
  border-radius: 999px;
  transition: color 180ms ease, background-color 180ms ease;
}

.tag-chip:hover,
.tag-cloud a:hover {
  color: #FFFFFF;
  background-color: var(--color-primary);
}

.tag-chip--plain {
  font-weight: 500;
  color: var(--color-muted);
  background-color: transparent;
  border: 1px dashed var(--color-border);
}

.tag-chip--plain:hover {
  color: var(--color-primary);
  background-color: var(--color-tint);
  border-color: var(--color-primary);
}

/* ----------------------------------------------------------------------------
   19. Author —— 作者页作者卡片（头像降级样式同评论）
   ---------------------------------------------------------------------------- */
.author-card {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
  padding: 24px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.author-card__avatar {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.author-card__avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: var(--color-primary-strong);
  background-color: var(--color-tint);
}

.author-card__info {
  flex: 1 1 auto;
  min-width: 0;
}

.author-card__trait {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-muted);
}

/* ----------------------------------------------------------------------------
   20. Page links —— 友情链接（低调 muted 小字、横排 wrap、内部顶部细分隔）
   ---------------------------------------------------------------------------- */
.page-links {
  margin-top: 56px;
}

.page-links__inner {
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
}

.page-links__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}

.page-links__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 12px;
}

.page-links__list a {
  font-size: 13px;
  color: var(--color-muted);
  transition: color 180ms ease;
}

.page-links__list a:hover {
  color: var(--color-primary);
}

/* ----------------------------------------------------------------------------
   21. Footer —— 页脚（浅绿底、真实定位文案，无编造信息样式）
   ---------------------------------------------------------------------------- */
.site-footer {
  margin-top: 40px;
  background-color: var(--color-tint);
  border-top: 1px solid var(--color-border);
}

.site-footer__inner {
  padding: 32px 0 36px;
}

.site-footer__brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary-strong);
}

.site-footer__note {
  margin-top: 8px;
  max-width: 560px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--color-muted);
}

/* ----------------------------------------------------------------------------
   22. Empty —— 空状态（muted 居中、tint 底圆角、padding 32px）
   ---------------------------------------------------------------------------- */
.empty {
  margin-top: 16px;
  padding: 32px;
  font-size: 15px;
  text-align: center;
  color: var(--color-muted);
  background-color: var(--color-tint);
  border-radius: var(--radius-lg);
}

/* ----------------------------------------------------------------------------
   23. 404 & Button —— 404 页与按钮（primary 底白字圆角、44px 高）
   ---------------------------------------------------------------------------- */
.not-found {
  max-width: var(--reading);
  margin-top: 40px;
  margin-inline: auto;
  padding: 40px 20px;
  text-align: center;
}

.not-found__code {
  font-size: 72px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.not-found__title {
  margin-top: 16px;
  font-size: 28px;
  color: var(--color-text);
}

.not-found__text {
  margin-top: 10px;
  font-size: 15px;
  color: var(--color-muted);
}

.not-found .btn {
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  background-color: var(--color-primary);
  border: 0;
  border-radius: 999px;
  transition: background-color 180ms ease, transform 180ms ease;
}

.btn:hover {
  background-color: var(--color-primary-strong);
}

.btn:active {
  transform: translateY(1px);
}

/* ----------------------------------------------------------------------------
   24. Focus & Motion —— 全局可见焦点与动效降级
   ---------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important; /* 动效降级为即时响应（此处 !important 为标准可访问性用法） */
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ----------------------------------------------------------------------------
   25. Responsive —— ≤900px 双栏堆叠；≤600px 小屏适配与封面堆叠
   ---------------------------------------------------------------------------- */

/* ≤900px：首页双栏堆叠为单列（aside 按语义顺序排在主列表后，不留空列）；
   导航允许换行，头部高度随内容自适应（不低于 60px） */
@media (max-width: 900px) {
  .site-header {
    height: auto;
    min-height: var(--nav-h);
  }

  .home-layout--aside {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ≤600px：小屏字号微调、内边距收紧、封面堆叠 */
@media (max-width: 600px) {
  .container {
    padding-inline: 16px;
  }

  .brand {
    font-size: 16px;
  }

  .site-nav__list a {
    padding: 0 10px;
    font-size: 14px;
  }

  .site-main {
    padding-top: 4px;
  }

  .hero {
    margin-top: 8px;
    padding: 28px 22px;
  }

  .hero__title {
    font-size: 26px;
  }

  .hero::before {
    display: none;
  }

  .hero::after {
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    opacity: 0.1;
  }

  .page-head {
    margin-top: 12px;
  }

  .page-head__title {
    font-size: 26px;
  }

  .post-list {
    gap: 12px;
    margin-top: 20px;
  }

  .post-card__link {
    flex-direction: column; /* 封面堆叠到文字下方 */
    gap: 14px;
    padding: 16px;
  }

  .post-card__thumb {
    align-self: stretch;
    width: 100%;
    height: 170px;
  }

  .home-layout {
    gap: 24px;
  }

  .article {
    margin-top: 16px;
  }

  .article__title {
    font-size: 26px;
  }

  .article__cover {
    margin-bottom: 20px;
  }

  .article-nav {
    margin-top: 32px;
  }

  .article-nav__item {
    flex-basis: 100%;
  }

  .related,
  .comments {
    margin-top: 36px;
  }

  .comment {
    padding: 14px;
  }

  .author-card {
    gap: 14px;
    padding: 18px;
  }

  .not-found {
    margin-top: 24px;
    padding: 24px 16px;
  }

  .not-found__code {
    font-size: 56px;
  }

  .site-footer {
    margin-top: 36px;
  }

  .page-links {
    margin-top: 40px;
  }
}
