/* =========================================================
   汗汗漫画 · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================= */

/* ---------------------------------------------------------
   1. base —— 变量、重置、基础排版
   --------------------------------------------------------- */
:root {
  --bg-page: #faf6f0;
  --bg-card: #ffffff;
  --bg-soft: #f4ede3;
  --ink: #2f2621;
  --ink-soft: #7a6a5c;
  --brand: #d97b32;
  --brand-deep: #b8621f;
  --state-open: #4f7a5b;
  --line: #e6ddd2;
  --line-strong: #d8cbba;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 1px 2px rgba(47, 38, 33, 0.05);
  --shadow-hover: 0 6px 16px rgba(47, 38, 33, 0.09);
  --wrap: 1120px;
  --read: 760px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC",
    Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

p {
  margin: 0 0 12px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--brand-deep);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover,
a:focus-visible {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

time {
  font-variant-numeric: tabular-nums;
}

/* 屏幕阅读器专用标题 */
.visually-hidden-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------
   2. layout —— 站点骨架：body / header / main / footer
   --------------------------------------------------------- */
.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-page);
  color: var(--ink);
}

/* ---- 顶部事实条 ---- */
.fact-bar {
  background-color: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.fact-bar p {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 9px 24px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---- 页头 ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover,
.brand:focus-visible {
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: inline-block;
  padding: 3px 9px;
  background-color: var(--brand);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

.brand-sub {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* ---- 主导航 ---- */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background-color: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}

.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background-color: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle::before {
  top: 15px;
  box-shadow: 0 6px 0 var(--ink);
}

.nav-toggle::after {
  bottom: 15px;
}

.nav-toggle[aria-expanded="true"]::before {
  top: 21px;
  box-shadow: none;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"]::after {
  bottom: 21px;
  transform: rotate(-45deg);
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-list li {
  display: block;
}

.nav-link {
  display: inline-block;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
  border-radius: var(--radius-sm);
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--brand-deep);
  background-color: var(--bg-soft);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--brand-deep);
  font-weight: 600;
  border-bottom-color: var(--brand);
}

/* ---- 主内容容器 ---- */
.site-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px 56px;
}

.inner-main {
  padding-top: 20px;
}

/* ---- 面包屑 ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--brand-deep);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink);
}

/* ---- 内页标题区 ---- */
.page-header {
  padding: 4px 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.page-title {
  font-size: 32px;
  line-height: 1.35;
  margin-bottom: 12px;
}

.page-description {
  max-width: var(--read);
  margin: 0;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-soft);
}

/* ---- 页脚 ---- */
.site-footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px 24px 28px;
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) minmax(200px, 1fr) minmax(240px, 1.3fr);
  gap: 32px 40px;
}

.footer-name {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.footer-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 42ch;
}

.footer-nav-title,
.footer-boundary-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.footer-nav-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
}

.footer-nav-list a {
  display: inline-block;
  padding: 3px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.footer-nav-list a:hover,
.footer-nav-list a:focus-visible {
  color: var(--brand-deep);
}

.footer-boundary p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.footer-copy {
  margin: 0;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------
   3. components —— 通用组件
   --------------------------------------------------------- */

/* ---- 区块通用 ---- */
.section {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}

.section:last-of-type {
  border-bottom: 0;
}

.section-head {
  margin-bottom: 22px;
  max-width: var(--read);
}

.section-head h2,
.section-title {
  font-size: 20px;
  line-height: 1.45;
  margin-bottom: 8px;
}

.section-note,
.section-desc,
.section-intro {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.section-intro {
  max-width: var(--read);
  margin-bottom: 18px;
}

.section-desc {
  margin-bottom: 20px;
}

/* ---- 文字链接 ---- */
.text-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-deep);
  border-bottom: 1px solid rgba(217, 123, 50, 0.4);
  padding-bottom: 1px;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--brand);
  border-bottom-color: var(--brand);
  text-decoration: none;
}

/* ---- 状态标记（全站统一） ---- */
.is-ongoing,
.is-finished,
.is-paused,
.is-done {
  display: inline-block;
  font-size: 12px;
  line-height: 1.6;
  padding: 1px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.is-ongoing {
  color: var(--state-open);
  background-color: rgba(79, 122, 91, 0.12);
}

.is-finished {
  color: var(--ink-soft);
  background-color: var(--bg-soft);
}

.is-paused {
  color: var(--brand-deep);
  background-color: rgba(217, 123, 50, 0.14);
}

.is-done {
  color: var(--ink-soft);
  background-color: var(--bg-soft);
}

/* ---- 字段说明表（首页 / 题材分类 / 查阅路径共用） ---- */
.field-table {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.field-table-caption,
.field-table-cap {
  caption-side: top;
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ink-soft);
  background-color: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.field-table th,
.field-table td {
  padding: 11px 16px;
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
  border-bottom: 1px solid var(--line);
}

.field-table thead th {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  background-color: var(--bg-soft);
  white-space: nowrap;
}

.field-table tbody th {
  width: 26%;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.field-table tbody td {
  color: var(--ink-soft);
}

.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ---- 步骤列表（首页 + 查阅路径共用外壳） ---- */
.step-list {
  display: grid;
  gap: 14px;
}

.step-item {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.step-item:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
}

.step-no {
  display: inline-block;
  min-width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background-color: var(--brand);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
}

.step-name {
  display: inline;
  font-size: 16px;
  margin: 0;
  vertical-align: middle;
}

.step-detail {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
}

/* ---- 相关入口条 ---- */
.related-links {
  padding: 28px 0 0;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.related-links-title,
.related-title {
  font-size: 16px;
  margin-bottom: 12px;
}

.related-list,
.related-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.related-list li,
.related-links-list li {
  display: block;
}

.related-list a,
.related-links-list a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--ink);
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.related-list a:hover,
.related-links a:hover,
.related-list a:focus-visible,
.related-links a:focus-visible {
  border-color: var(--brand);
  color: var(--brand-deep);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ---- 折叠块（查阅路径页） ---- */
.note-block {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.note-summary {
  cursor: pointer;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  position: relative;
}

.note-summary::-webkit-details-marker {
  display: none;
}

.note-summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 400;
  color: var(--brand);
}

.note-block[open] .note-summary::after {
  content: "−";
}

.note-summary:hover {
  color: var(--brand-deep);
}

.note-body {
  padding: 0 18px 16px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* ---------------------------------------------------------
   4. pages —— 各页专属模块
   --------------------------------------------------------- */

/* ========== 4.1 首页 ========== */
.home-main {
  padding-top: 0;
}

/* ---- 首屏 ---- */
.hero-section {
  padding: 44px 0 40px;
  border-bottom: 1px solid var(--line);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(300px, 460px);
  gap: 44px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-title {
  font-size: 36px;
  line-height: 1.32;
  margin-bottom: 16px;
}

.hero-lead {
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.hero-entries {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-entries li {
  display: block;
}

.entry-link {
  display: inline-block;
  padding: 10px 18px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background-color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.entry-link:hover,
.entry-link:focus-visible {
  background-color: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.hero-figure {
  margin: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
}

.hero-figure img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.hero-figure figcaption {
  padding: 10px 4px 2px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ---- 题材方向总览 ---- */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.subject-card {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.subject-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.subject-name {
  font-size: 17px;
  margin-bottom: 8px;
}

.subject-trait {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.subject-scope {
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.subject-count {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-deep);
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

/* ---- 并列区（封面条目 + 最近更新 / 位次 + 字段口径） ---- */
.split-section {
  padding: 40px 0;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
  gap: 40px;
  align-items: start;
}

.split-main,
.split-aside {
  min-width: 0;
}

.column-head {
  margin-bottom: 16px;
}

.column-head h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.column-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* ---- 封面条目卡网格 ---- */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.entry-card {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.entry-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.entry-cover {
  margin: 0 0 10px;
  background-color: var(--bg-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.entry-cover img {
  width: 100%;
  height: 148px;
  object-fit: cover;
}

.entry-name {
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.entry-fields {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 8px;
  font-size: 12px;
  line-height: 1.7;
}

.entry-fields dt {
  color: var(--ink-soft);
  white-space: nowrap;
}

.entry-fields dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.column-more {
  margin: 16px 0 0;
}

/* ---- 最近更新清单（首页 aside） ---- */
.update-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.update-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  grid-template-areas:
    "date name"
    "date sub"
    "date change";
  gap: 2px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.65;
}

.update-date {
  grid-area: date;
  color: var(--ink-soft);
  font-size: 12px;
  padding-top: 2px;
}

.update-name {
  grid-area: name;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.update-subject {
  grid-area: sub;
  color: var(--ink-soft);
  font-size: 12px;
}

.update-change {
  grid-area: change;
  color: var(--ink-soft);
  font-size: 12px;
}

.update-status {
  display: none;
}

/* ---- 位次参考（首页 split-main 内） ---- */
.split-main .rank-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.rank-list .rank-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.18s ease;
}

.split-main .rank-row:hover {
  background-color: var(--bg-soft);
}

.rank-no {
  display: inline-block;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  background-color: var(--bg-soft);
  border-radius: var(--radius-sm);
}

.rank-list .rank-row:nth-child(-n + 3) .rank-no {
  color: #fff;
  background-color: var(--brand);
}

.rank-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: block;
}

.rank-name:hover,
.rank-name:focus-visible {
  color: var(--brand-deep);
}

.rank-subject {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.rank-status {
  justify-self: end;
}

/* ---- 查阅路径（首页） ---- */
.guide-section .step-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-section .step-item {
  padding: 20px;
}

.guide-section .step-name {
  display: block;
  margin: 10px 0 0;
}

.guide-section .step-no {
  margin-right: 0;
}

.feedback-entry {
  margin-top: 24px;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
}

.feedback-entry h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.feedback-entry p {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
}

.feedback-link {
  margin-top: 12px;
}

/* ---- 站内栏目索引 ---- */
.sitemap-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.sitemap-item {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.sitemap-item:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.sitemap-item a {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.sitemap-item a:hover,
.sitemap-item a:focus-visible {
  color: var(--brand-deep);
}

.sitemap-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ========== 4.2 题材分类页 ========== */
.category-group {
  padding-bottom: 8px;
}

.category-block {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.category-block:first-of-type {
  border-top: 0;
  padding-top: 6px;
}

.category-block-head {
  max-width: var(--read);
  margin-bottom: 16px;
}

.category-name {
  font-size: 19px;
  margin-bottom: 8px;
  padding-left: 12px;
  border-left: 3px solid var(--brand);
}

.category-feature {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.category-scope {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin: 0;
}

.category-figure {
  margin: 0 0 18px;
  max-width: 520px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}

.category-figure img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.category-figure figcaption {
  padding: 8px 4px 2px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ---- 条目字段表 ---- */
.entry-table {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.entry-table-caption {
  caption-side: top;
  text-align: left;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--ink-soft);
  background-color: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.entry-table th,
.entry-table td {
  padding: 11px 16px;
  text-align: left;
  vertical-align: middle;
  line-height: 1.7;
  border-bottom: 1px solid var(--line);
}

.entry-table thead th {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  background-color: var(--bg-soft);
  white-space: nowrap;
}

.entry-table tbody tr:last-child td {
  border-bottom: 0;
}

.entry-table tbody tr:hover {
  background-color: var(--bg-soft);
}

.entry-table td:first-child {
  font-weight: 600;
  color: var(--ink);
}

.entry-table td:last-child {
  white-space: nowrap;
  color: var(--ink-soft);
}

.entry-status {
  white-space: nowrap;
}

/* ---- 字段口径说明 ---- */
.field-notes {
  padding: 34px 0 8px;
  border-top: 1px solid var(--line);
}

.field-note-tail {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ========== 4.3 最近更新页 ========== */
.update-intro {
  padding-bottom: 30px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.update-intro-body {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.update-intro-figure {
  margin: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}

.update-intro-figure img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.update-intro-figure figcaption {
  padding: 8px 4px 2px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.update-intro-text p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-soft);
}

.update-log {
  padding-bottom: 30px;
}

.update-day {
  margin-bottom: 22px;
}

.update-day:last-child {
  margin-bottom: 0;
}

.update-day .update-date {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding: 2px 12px;
  background-color: var(--bg-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.update-rows {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.update-rows .update-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.18s ease;
}

.update-rows .update-row:hover {
  background-color: var(--bg-soft);
}

.update-thumb {
  margin: 0;
  width: 72px;
  height: 48px;
  background-color: var(--bg-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.update-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.update-row-main {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.update-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.update-title:hover,
.update-title:focus-visible {
  color: var(--brand-deep);
}

.update-tag {
  font-size: 12px;
  color: var(--ink-soft);
  padding: 1px 8px;
  background-color: var(--bg-soft);
  border-radius: 10px;
}

.update-rows .update-change {
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.update-rows .update-status {
  display: inline-block;
  justify-self: end;
}

/* ---- 更新与章节目录对应说明 ---- */
.update-map {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.update-map-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.update-map-item {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.update-map-heading {
  font-size: 16px;
  margin-bottom: 8px;
}

.update-map-item p {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
}

.update-map-note {
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
}

.update-map-note a {
  margin-right: 4px;
}

/* ========== 4.4 位次参考页 ========== */
.page-rank-reference .page-header {
  padding-bottom: 26px;
}

.rank-criteria {
  padding-bottom: 30px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.criteria-item {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.criteria-name {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--brand-deep);
}

.criteria-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
}

.rank-list-section {
  padding-bottom: 30px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.rank-figure {
  margin: 0 0 22px;
  max-width: 560px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}

.rank-figure img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.rank-figure-caption {
  padding: 8px 4px 2px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.rank-list-section .rank-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.rank-list-section .rank-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.18s ease;
}

.rank-list-section .rank-row:hover {
  background-color: var(--bg-soft);
}

.rank-main {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.rank-meta {
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---- 位次与字段关系 ---- */
.rank-relation {
  padding-bottom: 30px;
}

.relation-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--bg-card);
}

.relation-row {
  display: grid;
  grid-template-columns: minmax(140px, 30%) minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.relation-row:last-child {
  border-bottom: 0;
}

.relation-head {
  background-color: var(--bg-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.relation-cell {
  padding: 11px 16px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.relation-head .relation-cell {
  color: var(--ink-soft);
}

.relation-row:not(.relation-head) .relation-cell:first-child {
  font-weight: 600;
  color: var(--ink);
}

.relation-note {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
}

.related-entry {
  padding: 26px 0 8px;
  border-top: 1px solid var(--line);
}

/* ========== 4.5 查阅路径页 ========== */
.guide-figure {
  margin: 0 0 30px;
  max-width: 620px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}

.guide-figure img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.guide-figure-cap {
  padding: 8px 4px 2px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.guide-steps {
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.guide-steps .step-list {
  grid-template-columns: minmax(0, 1fr);
}

.guide-steps .step-item {
  padding: 0;
  border: 1px solid var(--line);
  background-color: var(--bg-card);
}

.guide-steps .step-item:hover {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.step-block {
  overflow: hidden;
}

.step-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
}

.step-summary::-webkit-details-marker {
  display: none;
}

.step-summary::after {
  content: "▾";
  margin-left: auto;
  font-size: 13px;
  color: var(--brand);
  transition: transform 0.2s ease;
}

.step-block[open] .step-summary::after {
  transform: rotate(180deg);
}

.step-summary .step-no {
  margin-right: 0;
  flex-shrink: 0;
}

.step-summary .step-name {
  font-size: 16px;
  font-weight: 600;
}

.step-fields {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 2px 10px;
  background-color: var(--bg-soft);
  border-radius: 10px;
}

.step-body {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
}

.step-body p {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.step-body p:last-child {
  margin-bottom: 0;
}

.field-explain {
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.feedback-notes {
  padding-bottom: 12px;
}

/* ========== 4.6 404 ========== */
.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 60px;
}

.error-block {
  width: 100%;
  max-width: 640px;
  text-align: center;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 44px 32px;
  box-shadow: var(--shadow);
}

.error-code {
  margin: 0 0 8px;
  font-size: 42px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--brand);
}

.error-block h1 {
  font-size: 24px;
  margin-bottom: 12px;
}

.error-text {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.error-actions li {
  display: block;
}

.error-btn {
  display: inline-block;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background-color: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.error-btn:hover,
.error-btn:focus-visible {
  color: #fff;
  background-color: var(--brand);
  border-color: var(--brand);
  text-decoration: none;
}

/* ---- 滚动出现增强（不影响初始可见） ---- */
.reveal {
  animation: reveal-up 0.5s ease both;
}

@keyframes reveal-up {
  from {
    transform: translateY(10px);
  }

  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------
   5. responsive —— 960px / 640px / 390px
   --------------------------------------------------------- */
@media (max-width: 960px) {
  .header-inner {
    padding: 0 18px;
  }

  .site-main {
    padding: 0 18px 44px;
  }

  .fact-bar p {
    padding: 9px 18px;
  }

  /* 移动导航 */
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(47, 38, 33, 0.08);
    padding: 10px 18px 16px;
    display: block;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    display: block;
    min-height: 48px;
    padding: 13px 6px;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .nav-link.is-current {
    border-bottom-color: var(--line);
    box-shadow: inset 3px 0 0 var(--brand);
    padding-left: 12px;
  }

  /* 首屏 */
  .hero-section {
    padding: 30px 0 32px;
  }

  .hero-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-figure img {
    height: 240px;
  }

  /* 题材总览 */
  .subject-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 并列区 */
  .split-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 栏目索引 */
  .sitemap-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* 更新页 */
  .update-intro-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .update-intro-figure img {
    height: 200px;
  }

  .update-rows .update-row {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb main status"
      "thumb change status";
    gap: 4px 12px;
  }

  .update-thumb {
    grid-area: thumb;
    width: 64px;
    height: 44px;
  }

  .update-row-main {
    grid-area: main;
  }

  .update-rows .update-change {
    grid-area: change;
  }

  .update-rows .update-status {
    grid-area: status;
  }

  .update-map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 位次页 */
  .criteria-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 页脚 */
  .footer-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 26px 32px;
  }

  .footer-boundary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .brand-sub {
    display: none;
  }

  .site-main {
    padding: 0 14px 36px;
  }

  .header-inner {
    padding: 0 14px;
  }

  .fact-bar p {
    padding: 8px 14px;
    font-size: 12px;
  }

  .page-header {
    padding-bottom: 20px;
    margin-bottom: 24px;
  }

  .page-title {
    font-size: 24px;
    line-height: 1.4;
  }

  .section {
    padding: 30px 0;
  }

  .section-head h2,
  .section-title {
    font-size: 18px;
  }

  /* 首屏 */
  .hero-title {
    font-size: 26px;
  }

  .hero-entries {
    flex-direction: column;
    align-items: stretch;
  }

  .entry-link {
    display: block;
    text-align: center;
  }

  .hero-figure img {
    height: 200px;
  }

  /* 题材总览 */
  .subject-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 封面条目 */
  .entry-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-cover img {
    height: 170px;
  }

  /* 首页最近更新 */
  .update-list .update-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "date"
      "name"
      "sub"
      "change";
    gap: 2px;
  }

  .update-list .update-date {
    padding-top: 0;
  }

  /* 首页步骤 */
  .guide-section .step-list {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 栏目索引 */
  .sitemap-list {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 题材分类页 */
  .category-block {
    padding: 22px 0;
  }

  .category-figure img {
    height: 170px;
  }

  /* 表格：横向可读，不挤压 */
  .entry-table,
  .field-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
  }

  .entry-table thead,
  .entry-table tbody,
  .field-table thead,
  .field-table tbody {
    display: table;
    width: 100%;
    min-width: 460px;
  }

  .entry-table thead,
  .field-table thead {
    display: table-header-group;
  }

  .entry-table caption,
  .field-table caption {
    display: block;
    min-width: 0;
  }

  .field-table tbody th {
    width: 30%;
  }

  /* 更新页 */
  .update-rows .update-row {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "thumb main"
      "thumb change"
      "status status";
    gap: 4px 10px;
  }

  .update-thumb {
    width: 56px;
    height: 40px;
  }

  .update-rows .update-status {
    justify-self: start;
    margin-top: 4px;
  }

  .update-map-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 位次页 */
  .criteria-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .rank-list-section .rank-row {
    grid-template-columns: 32px minmax(0, 1fr);
    grid-template-areas:
      "no main"
      "no status";
    gap: 4px 10px;
    align-items: start;
  }

  .rank-list-section .rank-no {
    grid-area: no;
  }

  .rank-list-section .rank-main {
    grid-area: main;
    display: block;
  }

  .rank-list-section .rank-status {
    grid-area: status;
    justify-self: start;
  }

  .rank-figure img {
    height: 170px;
  }

  .relation-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .relation-row .relation-cell:first-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .relation-head {
    display: none;
  }

  /* 查阅路径页 */
  .guide-figure img {
    height: 180px;
  }

  .step-summary {
    position: relative;
    padding: 14px 44px 14px 16px;
  }

  .step-fields {
    flex-basis: 100%;
    margin-left: 38px;
    padding: 1px 8px;
    align-self: flex-start;
  }

  .step-summary::after {
    position: absolute;
    right: 16px;
  }

  .step-body {
    padding: 14px 16px 16px;
  }

  /* 相关入口 */
  .related-list,
  .related-links-list {
    flex-direction: column;
    align-items: stretch;
  }

  .related-list a,
  .related-links-list a {
    display: block;
    text-align: center;
  }

  /* 404 */
  .error-block {
    padding: 32px 20px;
  }

  .error-code {
    font-size: 34px;
  }

  .error-block h1 {
    font-size: 20px;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-btn {
    display: block;
    text-align: center;
  }

  /* 页脚 */
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    padding: 30px 14px 22px;
    gap: 22px;
  }

  .footer-nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-desc {
    max-width: none;
  }
}

@media (max-width: 390px) {
  .hero-title {
    font-size: 24px;
  }

  .brand-mark {
    font-size: 16px;
    padding: 3px 7px;
  }

  .footer-nav-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-fields {
    font-size: 11.5px;
  }
}

/* ---------------------------------------------------------
   6. print
   --------------------------------------------------------- */
@media print {
  .fact-bar,
  .site-header,
  .nav-toggle,
  .site-nav,
  .breadcrumb,
  .related-links,
  .related-entry,
  .hero-figure,
  .error-actions {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .site-main,
  .footer-inner {
    max-width: none;
    padding: 0;
  }

  .site-footer {
    border-top: 1px solid #999;
  }

  .footer-brand,
  .footer-copy {
    display: block;
  }

  .footer-nav,
  .footer-boundary {
    display: none;
  }

  a {
    color: #000;
    text-decoration: none;
  }
}
