/* ==========================================================================
   午夜免费电影 · 全站样式
   数字出版风：纸底墨字，期刊式编号与期次，封面索引视觉语言
   ========================================================================== */

/* ==========================================================================
   base · 变量与基础
   ========================================================================== */

:root {
  --paper: #f7f5f0;
  --paper-deep: #efece4;
  --ink: #1c1b19;
  --ink-soft: #45423d;
  --ink-mute: #6b665e;
  --accent: #8a2f2b;
  --accent-soft: #a8544f;
  --sage: #5c6b5a;
  --rule: #d8d2c6;
  --rule-strong: #c3bbab;
  --card-bg: #fffdf9;
  --radius: 6px;
  --radius-sm: 4px;
  --shell: 1120px;
  --gap: 28px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --shadow-card: 0 1px 2px rgba(28, 27, 25, 0.05);
  --shadow-lift: 0 4px 14px rgba(28, 27, 25, 0.09);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  padding: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 12px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 17px;
}

p {
  margin: 0 0 14px;
  color: var(--ink-soft);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

ul,
ol {
  margin: 0 0 14px;
  padding-left: 1.25em;
  color: var(--ink-soft);
}

ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

li {
  margin-bottom: 6px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 8px;
  color: var(--ink-mute);
  font-size: 13px;
  line-height: 1.6;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
  vertical-align: top;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

code,
.mono {
  font-family: var(--font-mono);
}

strong {
  color: var(--ink);
  font-weight: 700;
}

/* ==========================================================================
   layout · 站点骨架
   ========================================================================== */

.site-header {
  background-color: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover,
.brand:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.brand::before {
  content: "";
  width: 10px;
  height: 10px;
  background-color: var(--accent);
  border-radius: 2px;
  flex: none;
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list li {
  margin: 0;
}

.nav-list a {
  display: inline-block;
  padding: 9px 13px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.4;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background-color: var(--paper-deep);
  color: var(--ink);
  text-decoration: none;
}

.nav-list a.is-current {
  color: var(--accent);
  font-weight: 700;
  background-color: transparent;
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background-color: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--ink);
  border-radius: 2px;
}

.site-main {
  display: block;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px 56px;
}

.inner-main {
  padding-top: 20px;
}

.site-footer {
  background-color: var(--paper-deep);
  border-top: 1px solid var(--rule);
  padding: 40px 0 24px;
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(130px, 1fr));
  gap: 28px 24px;
}

.footer-brand {
  padding-right: 12px;
}

.footer-name {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.footer-desc {
  margin: 0;
  color: var(--ink-mute);
  font-size: 13.5px;
  line-height: 1.7;
}

.footer-group {
  min-width: 0;
}

.footer-title {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.footer-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-group li {
  margin-bottom: 7px;
}

.footer-group a {
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
}

.footer-group a:hover,
.footer-group a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-copy {
  max-width: var(--shell);
  margin: 28px auto 0;
  padding: 16px 24px 0;
  border-top: 1px solid var(--rule);
  color: var(--ink-mute);
  font-size: 13px;
}

/* ==========================================================================
   components · 通用组件
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background-color: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
  border-color: var(--ink);
  background-color: var(--card-bg);
}

.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fdf8f6;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: #75251f;
  border-color: #75251f;
  color: #fdf8f6;
}

.btn-ghost {
  border-color: var(--rule-strong);
  color: var(--ink);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background-color: var(--paper-deep);
}

/* 章节通用 */

.section {
  padding: 44px 0;
  border-top: 1px solid var(--rule);
}

.section:first-child {
  border-top: 0;
}

.section-title {
  position: relative;
  margin: 0 0 10px;
  padding-left: 16px;
  font-size: 22px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 4px;
  height: 1.05em;
  background-color: var(--accent);
  border-radius: 2px;
}

.section-lead,
.section-intro,
.section-desc {
  max-width: 72ch;
  margin: 0 0 22px;
  color: var(--ink-mute);
  font-size: 15px;
  line-height: 1.75;
}

.section-intro a {
  color: var(--accent);
}

.section-foot {
  margin: 22px 0 0;
  font-size: 15px;
}

.section-foot a {
  font-weight: 600;
}

.section-note {
  margin: 18px 0 0;
  color: var(--ink-mute);
  font-size: 14px;
}

.section-body p {
  max-width: 72ch;
}

/* 面包屑 */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  color: var(--ink-mute);
  font-size: 13.5px;
}

.breadcrumb a {
  color: var(--ink-mute);
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb-sep {
  color: var(--rule-strong);
}

.breadcrumb-current {
  color: var(--ink);
}

/* 内页标题区 */

.page-header {
  padding: 4px 0 26px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

.page-title {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
}

.page-description {
  max-width: 72ch;
  margin: 0;
  color: var(--ink-mute);
  font-size: 15.5px;
  line-height: 1.75;
}

.page-lead {
  max-width: 72ch;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

/* 页尾下一步 */

.next-step {
  margin: 40px 0 0;
  padding: 24px 26px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}

.next-step-label {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.next-step-lead {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.next-step h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.next-step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
}

.next-step-list li {
  margin: 0;
  font-size: 15px;
}

.next-step-list a {
  font-weight: 600;
}

.next-desc {
  display: block;
  margin-top: 2px;
  color: var(--ink-mute);
  font-size: 13.5px;
  font-weight: 400;
}

/* 表格通用 */

.table-caption {
  caption-side: top;
  margin-bottom: 12px;
  color: var(--ink-mute);
  font-size: 13.5px;
  text-align: left;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background-color: var(--card-bg);
}

.data-table {
  min-width: 620px;
  font-size: 14.5px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
}

.data-table thead th {
  background-color: var(--paper-deep);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background-color: var(--paper);
}

/* ==========================================================================
   pages · 首页
   ========================================================================== */

.site-notice {
  margin: 0;
  padding: 9px 24px;
  background-color: var(--ink);
  color: #e9e5dd;
  font-size: 13.5px;
  line-height: 1.6;
  text-align: center;
}

.home-main {
  padding-top: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 44px;
  align-items: center;
  padding: 46px 0 50px;
}

.hero-text {
  min-width: 0;
}

.hero-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.hero-title {
  margin: 0 0 16px;
  font-size: 38px;
  line-height: 1.28;
}

.hero-lead {
  max-width: 60ch;
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.8;
}

.hero-points {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
}

.hero-points li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 15px;
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 8px;
  height: 1px;
  background-color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-figure {
  min-width: 0;
}

.hero-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background-color: var(--paper-deep);
}

/* 首页 · 结构说明 */

.structure-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.structure-item {
  margin: 0;
  padding: 18px 20px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.structure-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.structure-item p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
}

/* 首页 · 频道总览表 */

.channel-table {
  width: 100%;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 15px;
}

.channel-table th,
.channel-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--rule);
}

.channel-table thead th {
  background-color: var(--paper-deep);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.channel-table tbody tr:last-child td {
  border-bottom: 0;
}

.channel-table tbody tr:hover {
  background-color: var(--paper);
}

.cell-num {
  width: 88px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  white-space: nowrap;
}

/* 首页 · 片单卡片 */

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.collection-card {
  display: flex;
  flex-direction: column;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.collection-card:hover,
.collection-card:focus-within {
  border-color: var(--rule-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.card-media {
  margin: 0;
}

.card-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background-color: var(--paper-deep);
}

.collection-card .card-title {
  margin: 16px 18px 6px;
  font-size: 17px;
}

.card-meta {
  margin: 0 18px 8px;
  color: var(--sage);
  font-size: 13.5px;
}

.card-reason {
  margin: 0 18px 18px;
  color: var(--ink-mute);
  font-size: 14px;
  line-height: 1.7;
}

/* 首页 · 字段与边界摘要 */

.fields-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.fields-column {
  min-width: 0;
  padding: 20px 22px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.fields-column h3 {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  font-size: 16px;
}

.field-list {
  margin: 0;
}

.field-list dt {
  margin-top: 12px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 700;
}

.field-list dt:first-child {
  margin-top: 0;
}

.field-list dd {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

/* 首页 · 整理记录速览 */

.log-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}

.log-month {
  min-width: 0;
  padding: 18px 20px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.log-month-title {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.log-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.log-list li {
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.log-list li:last-child {
  margin-bottom: 0;
}

.log-tag {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  background-color: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--sage);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}

/* 首页 · 站内栏目索引 */

.column-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.column-item {
  margin: 0;
}

.column-item a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 16px 18px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.column-item a:hover,
.column-item a:focus-visible {
  border-color: var(--accent);
  background-color: var(--paper);
  text-decoration: none;
}

.column-name {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 700;
}

.column-desc {
  color: var(--ink-mute);
  font-size: 13.5px;
  line-height: 1.65;
}

/* ==========================================================================
   pages · 题材频道
   ========================================================================== */

.section-basis .section-body {
  margin-bottom: 26px;
}

.section-figure {
  margin: 0;
}

.section-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background-color: var(--paper-deep);
}

ul.channel-table {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--card-bg);
}

.channel-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(180px, 0.55fr);
  gap: 18px;
  align-items: start;
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
  transition: background-color 0.18s ease;
}

.channel-row:last-child {
  border-bottom: 0;
}

.channel-row:hover {
  background-color: var(--paper);
}

.channel-no {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
}

.channel-main {
  min-width: 0;
}

.channel-name {
  margin: 0 0 6px;
  font-size: 16.5px;
}

.channel-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.7;
}

.channel-adjacent {
  margin: 0;
  color: var(--ink-mute);
  font-size: 13.5px;
  line-height: 1.7;
}

/* 相邻频道 */

.adjacent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.adjacent-item {
  min-width: 0;
  padding: 20px 22px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.adjacent-title {
  margin: 0 0 10px;
  font-size: 16px;
}

.adjacent-desc {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.7;
}

.adjacent-tip {
  margin: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--rule);
  color: var(--sage);
  font-size: 13.5px;
  line-height: 1.7;
}

/* 频道与片单对应 */

.mapping-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.mapping-item {
  min-width: 0;
  margin: 0;
  padding: 18px 20px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--sage);
  border-radius: var(--radius);
}

.mapping-title {
  margin: 0 0 8px;
  font-size: 15.5px;
}

.mapping-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}

/* ==========================================================================
   pages · 专题片单
   ========================================================================== */

.intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.intro-col {
  min-width: 0;
  padding: 18px 20px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.subsection-title {
  margin: 0 0 8px;
  font-size: 16px;
}

.intro-col p,
.relate-col p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.72;
}

.collection-cover {
  margin: 0;
}

.collection-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background-color: var(--paper-deep);
}

.collection-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 16px 18px 18px;
}

.collection-no {
  margin: 0 0 6px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
}

.collection-name {
  margin: 0 0 8px;
  font-size: 17px;
}

.collection-meta {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.7;
}

.collection-reason {
  margin: 0;
  color: var(--ink-mute);
  font-size: 14px;
  line-height: 1.7;
}

.meta-label {
  display: inline-block;
  margin-right: 6px;
  color: var(--sage);
  font-size: 12.5px;
  font-weight: 700;
}

/* 条目标注规则 */

.rule-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.rule-item {
  min-width: 0;
  padding: 18px 20px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.rule-title {
  margin: 0 0 8px;
  font-size: 15.5px;
}

.rule-item p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.7;
}

.rule-example {
  padding-top: 8px;
  border-top: 1px dashed var(--rule);
  color: var(--sage);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* 片单关联 */

.relate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.relate-col {
  min-width: 0;
  padding: 18px 20px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.collection-relate .section-foot a {
  margin-right: 20px;
}

/* ==========================================================================
   pages · 浏览指引
   ========================================================================== */

.guide-steps,
.step-detail,
.guide-pitfalls,
.guide-coordination {
  padding: 44px 0;
  border-top: 1px solid var(--rule);
}

.guide-steps h2,
.step-detail h2,
.guide-pitfalls h2,
.guide-coordination h2 {
  position: relative;
  margin: 0 0 10px;
  padding-left: 16px;
  font-size: 22px;
}

.guide-steps h2::before,
.step-detail h2::before,
.guide-pitfalls h2::before,
.guide-coordination h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 4px;
  height: 1.05em;
  background-color: var(--accent);
  border-radius: 2px;
}

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.step-item {
  min-width: 0;
  margin: 0;
  padding: 20px 20px 18px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
}

.step-no {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.step-name {
  margin: 0 0 8px;
  font-size: 16.5px;
}

.step-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.72;
}

.guide-figure {
  margin: 0 0 26px;
}

.guide-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background-color: var(--paper-deep);
}

.step-table {
  width: 100%;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14.5px;
}

.step-table caption {
  caption-side: top;
  margin-bottom: 12px;
  color: var(--ink-mute);
  font-size: 13.5px;
  text-align: left;
}

.step-table th,
.step-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
}

.step-table thead th {
  background-color: var(--paper-deep);
  font-size: 14px;
  white-space: nowrap;
}

.step-table tbody th {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.step-table tbody tr:last-child th,
.step-table tbody tr:last-child td {
  border-bottom: 0;
}

.step-table tbody tr:hover {
  background-color: var(--paper);
}

/* 误区折叠 */

.pitfall-item {
  margin-bottom: 12px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.pitfall-item:last-child {
  margin-bottom: 0;
}

.pitfall-item summary {
  padding: 14px 18px;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.pitfall-item summary::-webkit-details-marker {
  display: none;
}

.pitfall-item summary::before {
  content: "＋";
  display: inline-block;
  width: 20px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 400;
}

.pitfall-item[open] summary::before {
  content: "－";
}

.pitfall-item summary:hover {
  color: var(--accent);
}

.pitfall-item p {
  margin: 0;
  padding: 0 18px 16px 38px;
  font-size: 14.5px;
  line-height: 1.75;
}

/* 指引与频道片单配合 */

.coord-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.coord-col {
  min-width: 0;
  padding: 20px 22px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.coord-col h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.coord-col p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.72;
}

.coord-col p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   pages · 字段说明
   ========================================================================== */

.section-media {
  margin: 0 0 26px;
}

.section-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background-color: var(--paper-deep);
}

.section-fields .field-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.field-item {
  min-width: 0;
  padding: 20px 22px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.field-name {
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  font-size: 16.5px;
}

.field-definition {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
}

.field-detail {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.75;
}

.field-example {
  margin: 0 0 10px;
  padding: 10px 12px;
  background-color: var(--paper);
  border-left: 3px solid var(--sage);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
}

.field-related {
  margin: 0;
  color: var(--ink-mute);
  font-size: 13.5px;
  line-height: 1.7;
}

/* 收录边界 */

.boundary-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.boundary-col {
  min-width: 0;
  padding: 20px 22px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.boundary-title {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  font-size: 16px;
}

.boundary-in .boundary-title {
  color: var(--sage);
}

.boundary-out .boundary-title {
  color: var(--accent);
}

.boundary-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.boundary-list li {
  position: relative;
  margin-bottom: 9px;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.72;
}

.boundary-list li:last-child {
  margin-bottom: 0;
}

.boundary-in .boundary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 2px;
  background-color: var(--sage);
}

.boundary-out .boundary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 2px;
  background-color: var(--accent);
}

/* 字段与频道片单对应 */

.relation-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.relation-item {
  min-width: 0;
  padding: 18px 20px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.relation-name {
  margin: 0 0 8px;
  font-size: 15.5px;
}

.relation-desc {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.72;
}

.relation-link {
  margin: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--rule);
  font-size: 13.5px;
}

/* ==========================================================================
   pages · 整理记录
   ========================================================================== */

.log-method,
.log-timeline,
.log-impact,
.log-link {
  padding: 44px 0;
  border-top: 1px solid var(--rule);
}

.log-method h2,
.log-timeline h2,
.log-impact h2,
.log-link h2 {
  position: relative;
  margin: 0 0 10px;
  padding-left: 16px;
  font-size: 22px;
}

.log-method h2::before,
.log-timeline h2::before,
.log-impact h2::before,
.log-link h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 4px;
  height: 1.05em;
  background-color: var(--accent);
  border-radius: 2px;
}

.log-method p {
  max-width: 72ch;
}

.log-figure {
  margin: 22px 0 0;
}

.log-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background-color: var(--paper-deep);
}

.log-timeline > p {
  max-width: 72ch;
  margin-bottom: 22px;
  color: var(--ink-mute);
  font-size: 15px;
}

.log-timeline .log-month {
  margin-bottom: 20px;
}

.log-timeline .log-month:last-child {
  margin-bottom: 0;
}

.log-timeline .log-month-title {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.05em;
}

.log-entries {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: log-entry;
}

.log-entry {
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.72;
}

.log-entry:last-child {
  margin-bottom: 0;
}

.log-entry p {
  display: inline;
  margin: 0;
  font-size: 14.5px;
}

/* 调整影响 */

.impact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.impact-item {
  margin-bottom: 14px;
  padding: 16px 20px;
  background-color: var(--card-bg);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--sage);
  border-radius: var(--radius);
}

.impact-item:last-child {
  margin-bottom: 0;
}

.impact-item h3 {
  margin: 0 0 8px;
  font-size: 15.5px;
}

.impact-item p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.72;
}

.log-link p {
  max-width: 72ch;
}

/* ==========================================================================
   pages · 404
   ========================================================================== */

.error-main {
  padding-top: 40px;
}

.error-block {
  max-width: 640px;
  padding: 40px 0 56px;
}

.error-code {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.1em;
}

.error-block h1 {
  margin: 0 0 14px;
  font-size: 30px;
}

.error-text {
  max-width: 60ch;
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.75;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ==========================================================================
   responsive · 响应式
   ========================================================================== */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    padding: 38px 0 42px;
  }

  .hero-title {
    font-size: 34px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
    padding-right: 0;
  }

  .channel-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .channel-adjacent {
    grid-column: 2 / -1;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 18px;
    gap: 12px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 2px;
    padding: 8px 0 4px;
    border-top: 1px solid var(--rule);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    display: block;
    padding: 12px 10px;
    font-size: 16px;
  }

  .nav-list a.is-current {
    box-shadow: inset 3px 0 0 var(--accent);
    border-radius: 0;
  }

  .site-main,
  .footer-inner,
  .footer-copy {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-main {
    padding-bottom: 44px;
  }

  .site-notice {
    padding: 9px 18px;
    font-size: 13px;
  }

  .hero-title,
  .page-title {
    font-size: 26px;
  }

  .hero-lead {
    font-size: 15.5px;
  }

  .section,
  .guide-steps,
  .step-detail,
  .guide-pitfalls,
  .guide-coordination,
  .log-method,
  .log-timeline,
  .log-impact,
  .log-link {
    padding: 32px 0;
  }

  .section-title,
  .guide-steps h2,
  .step-detail h2,
  .guide-pitfalls h2,
  .guide-coordination h2,
  .log-method h2,
  .log-timeline h2,
  .log-impact h2,
  .log-link h2 {
    font-size: 20px;
  }

  .fields-layout,
  .adjacent-grid,
  .relate-grid,
  .coord-grid,
  .boundary-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .collection-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .structure-list,
  .log-groups,
  .mapping-list,
  .intro-grid,
  .rule-list,
  .step-list,
  .section-fields .field-list,
  .relation-list,
  .column-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .channel-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .channel-adjacent {
    grid-column: auto;
  }

  .next-step {
    padding: 20px 18px;
  }

  .next-step-list {
    flex-direction: column;
    gap: 10px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .error-block {
    padding: 28px 0 44px;
  }

  .error-block h1 {
    font-size: 24px;
  }
}

@media (max-width: 420px) {
  .header-inner,
  .site-main,
  .footer-inner,
  .footer-copy {
    padding-left: 14px;
    padding-right: 14px;
  }

  .site-notice {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-title,
  .page-title {
    font-size: 23px;
  }

  .hero-actions .btn,
  .error-actions .btn {
    flex: 1 1 100%;
  }

  .brand {
    font-size: 17px;
  }
}

/* ==========================================================================
   motion · 动效增强（不依赖 JS 显示正文）
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
