:root {
  --paper: #f7f4ee;
  --paper-deep: #efe9df;
  --ink: #23201b;
  --ink-soft: #4b463d;
  --moss: #4a6b4f;
  --moss-deep: #3a5740;
  --ochre: #a4653a;
  --line: #e3ddd2;
  --line-strong: #cfc6b6;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 1px 2px rgba(35, 32, 27, 0.06), 0 6px 18px rgba(35, 32, 27, 0.05);
  --container: 1180px;
  --serif: "Songti SC", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
}

/* ============================================================
   base
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

.site-body {
  margin: 0;
  padding: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.site-body h1,
.site-body h2,
.site-body h3,
.site-body h4 {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  margin: 0;
}

.site-body p {
  margin: 0;
}

.site-body ul,
.site-body ol,
.site-body dl,
.site-body dd {
  margin: 0;
  padding: 0;
}

.site-body ul,
.site-body ol {
  list-style: none;
}

.site-body a {
  color: var(--moss);
  text-decoration: none;
  transition: color 0.18s ease;
}

.site-body a:hover,
.site-body a:focus-visible {
  color: var(--ochre);
}

.site-body img {
  max-width: 100%;
  height: auto;
  display: block;
}

.site-body strong {
  font-weight: 700;
  color: var(--ink);
}

.site-body :focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 2px;
}

/* ============================================================
   layout — 全站骨架
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--ink);
  font-family: var(--serif);
}

.brand:hover,
.brand:focus-visible {
  color: var(--ink);
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background-color: var(--moss);
  border: 1px solid var(--moss-deep);
  position: relative;
  flex: 0 0 auto;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(247, 244, 238, 0.85);
  border-radius: 1px;
}

.brand-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list li {
  flex: 0 0 auto;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--moss-deep);
  background-color: var(--paper-deep);
}

.nav-list a.is-current {
  color: var(--moss-deep);
  font-weight: 700;
  border-bottom-color: var(--ochre);
  background-color: transparent;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  background-color: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--ink);
  border-radius: 1px;
}

.site-main {
  display: block;
}

.inner-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.home-main {
  padding: 0 0 64px;
}

/* 面包屑 —— 全站内页统一 */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.breadcrumb a {
  color: var(--moss);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink-soft);
}

/* 页面标题区 —— 全站内页统一 */

.page-header {
  margin-bottom: 32px;
  max-width: 820px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}

.page-description {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* 页脚 —— 全站统一 */

.site-footer {
  background-color: var(--paper-deep);
  border-top: 1px solid var(--line);
  margin-top: 0;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 44px 24px 28px;
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(140px, 1fr));
  gap: 32px 28px;
}

.footer-brand {
  grid-column: 1;
}

.footer-brand-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.footer-brand-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 320px;
}

.footer-group {
  min-width: 0;
}

.footer-group-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-strong);
}

.footer-list li {
  margin-bottom: 8px;
}

.footer-list a {
  display: inline-block;
  padding: 3px 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--ochre);
}

.footer-bottom {
  border-top: 1px solid var(--line-strong);
  background-color: var(--paper-deep);
}

.footer-copy {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px 22px;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ============================================================
   components —— 通用组件
   ============================================================ */

.section {
  margin-bottom: 56px;
}

.section-head {
  margin-bottom: 22px;
  max-width: 760px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.section-desc,
.section-intro,
.section-lead {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 780px;
}

.section-more {
  margin-top: 18px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  color: var(--moss);
  border-bottom: 1px solid var(--line-strong);
}

.text-link::after {
  content: "→";
  font-size: 14px;
  transition: transform 0.18s ease;
}

.text-link:hover::after,
.text-link:focus-visible::after {
  transform: translateX(3px);
}

/* 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background-color: var(--moss);
  border-color: var(--moss-deep);
  color: #f7f4ee;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--moss-deep);
  color: #f7f4ee;
}

.btn-secondary {
  background-color: var(--ochre);
  border-color: #8a5030;
  color: #f7f4ee;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background-color: #8a5030;
  color: #f7f4ee;
}

.btn-ghost {
  background-color: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--moss);
  color: var(--moss-deep);
  background-color: var(--paper-deep);
}

/* 编号徽标 */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background-color: var(--ochre);
  color: #f7f4ee;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge-channel {
  background-color: var(--ochre);
}

.badge-collection {
  background-color: var(--moss);
}

.badge-number {
  background-color: var(--ochre);
}

/* 表格 */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: #fffdf9;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 720px;
}

.table-caption {
  caption-side: top;
  text-align: left;
  padding: 14px 18px 10px;
  font-size: 13px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.data-table thead th {
  text-align: left;
  padding: 12px 18px;
  background-color: var(--paper-deep);
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.data-table tbody th,
.data-table tbody td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: top;
  line-height: 1.7;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background-color: var(--paper-deep);
}

.data-table tbody th {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.cell-name {
  font-weight: 700;
  color: var(--ink);
}

/* 字段定义列表 */

.field-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.field-item {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.field-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.field-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
  min-width: 0;
}

/* 边界列表 */

.boundary-list {
  display: grid;
  gap: 12px;
}

.boundary-item {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.boundary-item::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background-color: var(--ochre);
}

.bounds-list {
  display: grid;
  gap: 12px;
}

.bounds-list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.bounds-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background-color: var(--moss);
}

/* 相关入口列表 */

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.related-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: #fffdf9;
  min-width: 0;
}

.related-item a {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--moss-deep);
}

.related-item a:hover,
.related-item a:focus-visible {
  color: var(--ochre);
}

.related-note {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ============================================================
   pages — 首页
   ============================================================ */

.clue-bar {
  background-color: var(--moss-deep);
  color: #f2efe7;
}

.clue-bar-text {
  max-width: var(--container);
  margin: 0 auto;
  padding: 9px 24px;
  font-size: 13.5px;
  line-height: 1.6;
}

.clue-bar-text strong {
  color: #fffdf9;
  font-weight: 700;
}

.hero {
  background-color: var(--paper-deep);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 24px 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 44px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: #fffdf9;
  font-size: 13px;
  font-weight: 600;
  color: var(--ochre);
}

.hero-title {
  font-size: 34px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}

.hero-lead {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 26px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-media {
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #fffdf9;
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* 首页频道总表 */

.section-channels,
.section-collections,
.section-records,
.section-notes,
.section-index {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
}

.section-channels {
  padding-top: 56px;
}

.channel-table tbody tr td:first-child {
  font-weight: 700;
  color: var(--ochre);
  white-space: nowrap;
}

/* 首页专题卡 */

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.collection-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: #fffdf9;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.collection-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.collection-media,
.collection-cover {
  margin: 0;
  background-color: var(--paper-deep);
  border-bottom: 1px solid var(--line);
}

.collection-media img,
.collection-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.collection-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 20px;
  min-width: 0;
}

.collection-body .badge {
  align-self: flex-start;
}

.collection-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}

.collection-note,
.collection-desc {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.collection-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-soft);
}

.collection-meta dt {
  font-weight: 700;
  color: var(--ink);
}

.collection-meta dd {
  margin: 0;
}

/* 首页整理记录速览 */

.record-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.record-group {
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ochre);
  border-radius: var(--radius);
  background-color: #fffdf9;
  min-width: 0;
}

.record-month {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.record-list {
  display: grid;
  gap: 14px;
}

.record-item {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  gap: 4px 10px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  min-width: 0;
}

.record-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.record-date {
  font-size: 13px;
  font-weight: 700;
  color: var(--ochre);
  white-space: nowrap;
}

.record-type {
  font-size: 13px;
  font-weight: 600;
  color: var(--moss-deep);
  white-space: nowrap;
}

.record-scope {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--ink-soft);
}

.record-summary {
  grid-column: 1 / -1;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* 首页字段说明与收录边界摘要 */

.notes-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 32px;
  align-items: start;
}

.notes-col {
  min-width: 0;
}

.notes-subtitle {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
}

/* 首页站内页面索引 */

.index-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.index-col {
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--moss);
  border-radius: var(--radius);
  background-color: #fffdf9;
  min-width: 0;
}

.index-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}

.index-name a {
  color: var(--moss-deep);
}

.index-name a:hover,
.index-name a:focus-visible {
  color: var(--ochre);
}

.index-note {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ============================================================
   pages — 内页：题材频道
   ============================================================ */

.section-channel-table {
  margin-bottom: 52px;
}

.channel-figure {
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #fffdf9;
}

.channel-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.channel-figure figcaption {
  padding: 12px 18px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

.section-field-notes {
  margin-bottom: 52px;
}

.section-field-notes .section-title,
.section-boundary .section-title,
.section-related .section-title {
  margin-bottom: 10px;
}

.section-field-notes .section-desc,
.section-boundary .section-desc,
.section-related .section-desc {
  margin-bottom: 22px;
}

.section-boundary {
  margin-bottom: 52px;
}

.section-related {
  margin-bottom: 8px;
}

/* ============================================================
   pages — 内页：专题片单
   ============================================================ */

.section-collections {
  margin-bottom: 52px;
}

.section-collections .section-intro {
  margin-bottom: 22px;
}

.section-collections .collection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-fields {
  margin-bottom: 52px;
}

.section-fields .section-intro {
  margin-bottom: 22px;
}

.section-bounds {
  margin-bottom: 52px;
}

.section-bounds .section-intro {
  margin-bottom: 22px;
}

.section-related .section-intro {
  margin-bottom: 22px;
}

/* ============================================================
   pages — 内页：浏览指引
   ============================================================ */

.page-layout.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.guide-visual {
  margin-bottom: 44px;
}

.guide-visual .section-title {
  margin-bottom: 14px;
}

.guide-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #fffdf9;
}

.guide-figure img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.guide-figure figcaption {
  padding: 12px 18px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

.guide-fields {
  margin-bottom: 44px;
}

.guide-fields .section-title {
  margin-bottom: 10px;
}

.guide-fields .section-intro {
  margin-bottom: 20px;
}

.field-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: #fffdf9;
}

.field-table-caption {
  caption-side: top;
  text-align: left;
  padding: 14px 18px 10px;
  font-size: 13px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.field-table thead th {
  text-align: left;
  padding: 12px 18px;
  background-color: var(--paper-deep);
  border-bottom: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.field-table tbody th,
.field-table tbody td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: top;
  line-height: 1.7;
}

.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td {
  border-bottom: none;
}

.field-table tbody th {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.field-table tbody tr:hover {
  background-color: var(--paper-deep);
}

.guide-paths {
  margin-bottom: 44px;
}

.guide-paths .section-title {
  margin-bottom: 10px;
}

.guide-paths .section-intro {
  margin-bottom: 20px;
}

.path-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  counter-reset: path;
}

.path-item {
  position: relative;
  padding: 18px 18px 20px 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: #fffdf9;
  min-width: 0;
}

.path-item::before {
  counter-increment: path;
  content: counter(path, decimal-leading-zero);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background-color: var(--ochre);
  color: #f7f4ee;
  font-size: 12px;
  font-weight: 700;
}

.path-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.path-desc {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.path-desc a {
  font-weight: 600;
}

.guide-boundary {
  margin-bottom: 44px;
}

.guide-boundary .section-title {
  margin-bottom: 10px;
}

.guide-boundary .section-intro {
  margin-bottom: 20px;
}

.related-entry {
  padding-top: 4px;
}

.related-entry .section-title {
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.related-card {
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--moss);
  border-radius: var(--radius);
  background-color: #fffdf9;
  min-width: 0;
}

.related-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.related-name a {
  color: var(--moss-deep);
}

.related-name a:hover,
.related-name a:focus-visible {
  color: var(--ochre);
}

.related-desc {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* ============================================================
   pages — 内页：整理记录
   ============================================================ */

.page-layout.records-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.records-section {
  margin-bottom: 44px;
}

.records-section > h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}

.content-media {
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #fffdf9;
}

.content-media-inline img {
  width: 100%;
  aspect-ratio: 16 / 6;
  object-fit: cover;
}

.content-media figcaption {
  padding: 12px 18px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

.records-section .section-lead {
  margin-bottom: 24px;
}

.records-timeline {
  display: grid;
  gap: 18px;
  counter-reset: none;
}

.records-month {
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ochre);
  border-radius: var(--radius);
  background-color: #fffdf9;
  min-width: 0;
}

.records-month-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.records-list {
  display: grid;
  gap: 14px;
}

.records-month .record-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 4px 12px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
  min-width: 0;
}

.records-month .record-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.records-month .record-date {
  font-size: 13px;
  font-weight: 700;
  color: var(--ochre);
  white-space: nowrap;
}

.records-month .record-type {
  font-size: 13px;
  font-weight: 600;
  color: var(--moss-deep);
  white-space: nowrap;
}

.records-month .record-scope {
  font-size: 13px;
  color: var(--ink-soft);
  justify-self: end;
}

.records-month .record-summary {
  grid-column: 1 / -1;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.record-fields-section {
  margin-bottom: 44px;
}

.record-fields-section > h2,
.record-boundary-section > h2,
.records-related > h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.record-fields-section .section-lead,
.record-boundary-section .section-lead,
.records-related .section-lead {
  margin-bottom: 20px;
}

.record-fields-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.record-field-item {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.record-field-item dt {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.record-field-item dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
  min-width: 0;
}

.record-boundary-section {
  margin-bottom: 44px;
}

.record-boundary-list {
  display: grid;
  gap: 12px;
}

.record-boundary-list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.record-boundary-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background-color: var(--ochre);
}

.records-related {
  padding: 20px 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--paper-deep);
}

/* ============================================================
   pages — 404
   ============================================================ */

.error-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.error-hero {
  max-width: 720px;
  margin-bottom: 52px;
}

.error-code {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
  color: var(--ochre);
  margin-bottom: 12px;
}

.error-hero h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}

.error-desc {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 26px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.error-hints h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 20px;
}

.error-hint-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.error-hint-item {
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--moss);
  border-radius: var(--radius);
  background-color: #fffdf9;
  min-width: 0;
}

.error-hint-item h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.error-hint-item h3 a {
  color: var(--moss-deep);
}

.error-hint-item h3 a:hover,
.error-hint-item h3 a:focus-visible {
  color: var(--ochre);
}

.error-hint-item p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* ============================================================
   responsive
   ============================================================ */

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-top: 40px;
    padding-bottom: 44px;
  }

  .hero-lead {
    max-width: none;
  }

  .notes-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex: 1 1 100%;
    order: 3;
    justify-content: stretch;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 8px 0 12px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    justify-content: flex-start;
    min-height: 48px;
    padding: 0 6px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 16px;
  }

  .nav-list a.is-current {
    border-bottom-color: var(--ochre);
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .site-body {
    font-size: 15px;
  }

  .header-inner,
  .inner-main,
  .clue-bar-text,
  .hero-inner,
  .section-channels,
  .section-collections,
  .section-records,
  .section-notes,
  .section-index,
  .footer-inner,
  .footer-copy,
  .error-main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .page-title {
    font-size: 26px;
  }

  .hero-title {
    font-size: 26px;
  }

  .section-title {
    font-size: 21px;
  }

  .records-section > h2,
  .record-fields-section > h2,
  .record-boundary-section > h2,
  .records-related > h2,
  .error-hints h2 {
    font-size: 21px;
  }

  .guide-visual .section-title,
  .guide-fields .section-title,
  .guide-paths .section-title,
  .guide-boundary .section-title,
  .related-entry .section-title {
    font-size: 21px;
  }

  .hero-inner {
    padding-top: 32px;
    padding-bottom: 36px;
  }

  .section-channels {
    padding-top: 40px;
  }

  .section {
    margin-bottom: 42px;
  }

  .collection-grid,
  .section-collections .collection-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .record-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .related-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-item,
  .record-field-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .notes-columns {
    gap: 24px;
  }

  /* 频道总表在窄屏转为字段卡片视图 */
  .section-channel-table .table-wrap {
    border: none;
    background-color: transparent;
    overflow: visible;
  }

  .section-channel-table .channel-table {
    min-width: 0;
    display: block;
  }

  .section-channel-table .channel-table .table-caption {
    display: block;
    padding: 0 0 12px;
    border-bottom: none;
  }

  .section-channel-table .channel-table thead {
    display: none;
  }

  .section-channel-table .channel-table tbody {
    display: grid;
    gap: 14px;
  }

  .section-channel-table .channel-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 16px 16px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--ochre);
    border-radius: var(--radius);
    background-color: #fffdf9;
  }

  .section-channel-table .channel-table tbody tr:hover {
    background-color: #fffdf9;
  }

  .section-channel-table .channel-table tbody th,
  .section-channel-table .channel-table tbody td {
    padding: 6px 0;
    border-bottom: none;
  }

  .section-channel-table .channel-table tbody th {
    font-size: 16px;
    padding-top: 0;
  }

  .section-channel-table .channel-table tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--ochre);
    margin-bottom: 2px;
  }

  .field-table {
    display: block;
    border: none;
    background-color: transparent;
  }

  .field-table .field-table-caption {
    display: block;
    padding: 0 0 12px;
    border-bottom: none;
  }

  .field-table thead {
    display: none;
  }

  .field-table tbody {
    display: grid;
    gap: 14px;
  }

  .field-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 16px 16px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--moss);
    border-radius: var(--radius);
    background-color: #fffdf9;
  }

  .field-table tbody tr:hover {
    background-color: #fffdf9;
  }

  .field-table tbody th,
  .field-table tbody td {
    padding: 6px 0;
    border-bottom: none;
  }

  .field-table tbody th {
    font-size: 16px;
    padding-top: 0;
  }

  .field-table tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--moss-deep);
    margin-bottom: 2px;
  }

  .records-month .record-item {
    grid-template-columns: auto auto;
    justify-content: start;
  }

  .records-month .record-scope {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .records-related {
    padding: 18px 18px 20px;
  }

  .error-main {
    padding-top: 40px;
    padding-bottom: 56px;
  }

  .error-code {
    font-size: 28px;
  }

  .error-hero h1 {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .header-inner,
  .inner-main,
  .clue-bar-text,
  .hero-inner,
  .section-channels,
  .section-collections,
  .section-records,
  .section-notes,
  .section-index,
  .footer-inner,
  .footer-copy,
  .error-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-name {
    font-size: 17px;
  }

  .hero-title,
  .page-title {
    font-size: 23px;
  }

  .section-title,
  .records-section > h2,
  .record-fields-section > h2,
  .record-boundary-section > h2,
  .records-related > h2,
  .error-hints h2 {
    font-size: 19px;
  }

  .guide-visual .section-title,
  .guide-fields .section-title,
  .guide-paths .section-title,
  .guide-boundary .section-title,
  .related-entry .section-title {
    font-size: 19px;
  }

  .hero-actions,
  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .error-actions .btn {
    width: 100%;
  }

  .path-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .path-item {
    padding: 16px 16px 18px 52px;
  }

  .path-item::before {
    left: 16px;
    top: 16px;
  }

  .error-hint-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-body a,
  .btn,
  .collection-card,
  .text-link::after {
    transition: none;
  }

  .text-link:hover::after,
  .text-link:focus-visible::after {
    transform: none;
  }
}
