/* ==========================================================================
   午夜影院 nsxgn.com — 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base：变量、重置、字体、全局元素
   -------------------------------------------------------------------------- */
:root {
  --bg-page: #F7F9F9;
  --bg-card: #FFFFFF;
  --ink-title: #1F2A2E;
  --ink-body: #4A5A5F;
  --ink-muted: #6B7A7F;
  --brand: #12A594;
  --brand-dark: #0E8A7C;
  --line: #E3ECEB;
  --line-strong: #CFDEDC;
  --accent-change: #C2410C;
  --radius: 6px;
  --radius-sm: 4px;
  --container: 1120px;
  --content-side: 760px;
  --aside-width: 200px;
  --shadow-soft: 0 1px 2px rgba(31, 42, 46, 0.05);
  --font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--ink-body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink-title);
  font-weight: 700;
  line-height: 1.35;
}

p {
  margin: 0;
}

ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--brand);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

time {
  font-family: var(--font-mono);
}

section[id],
article[id] {
  scroll-margin-top: 88px;
}

::selection {
  background: rgba(18, 165, 148, 0.18);
}

/* --------------------------------------------------------------------------
   layout：页面骨架、容器、栅格、内页双栏
   -------------------------------------------------------------------------- */
.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg-page);
  font-family: var(--font-sans);
  color: var(--ink-body);
}

.site-main {
  flex: 1 1 auto;
  width: 100%;
}

/* 首页与列表型内页的单列容器 */
.home-main,
.inner-main {
  display: block;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px 64px;
}

.inner-main {
  padding-top: 20px;
}

/* 内页双栏：默认主内容在前，aside 在后 */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--aside-width);
  gap: 40px;
  align-items: start;
  width: 100%;
}

.page-content {
  min-width: 0;
  max-width: var(--content-side);
}

.page-aside {
  min-width: 0;
  width: var(--aside-width);
}

/* 侧栏在左：aside 在 DOM 中先出现 */
.sidebar-left {
  grid-template-columns: var(--aside-width) minmax(0, 1fr);
}

.sidebar-left .page-content {
  max-width: none;
}

/* --------------------------------------------------------------------------
   components：站内线索说明条
   -------------------------------------------------------------------------- */
.site-notice {
  background-color: #EDF5F3;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.site-notice-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px 20px;
  font-size: 14px;
}

.site-notice-text {
  margin: 0;
  color: var(--ink-body);
}

.site-notice-link,
.notice-link {
  color: var(--brand-dark);
  font-weight: 600;
  white-space: nowrap;
}

.notice-text {
  margin: 0;
  color: var(--ink-body);
}

/* --------------------------------------------------------------------------
   components：页头与主导航
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 20px;
}

.site-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink-title);
  text-decoration: none;
}

.site-brand:hover,
.site-brand:focus-visible {
  color: var(--ink-title);
  text-decoration: none;
}

.site-brand-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.site-brand-slogan {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.4;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  color: var(--ink-body);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  background-color: #EDF5F3;
  color: var(--brand-dark);
  text-decoration: none;
}

.nav-link.is-current {
  background-color: rgba(18, 165, 148, 0.12);
  color: var(--brand-dark);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--ink-title);
  border-radius: 1px;
}

/* --------------------------------------------------------------------------
   components：按钮与文本链接
   -------------------------------------------------------------------------- */
.btn,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn-primary,
.button-primary {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #FFFFFF;
}

.btn-primary:hover,
.btn-primary:focus-visible,
.button-primary:hover,
.button-primary:focus-visible {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #FFFFFF;
  text-decoration: none;
}

.btn-ghost,
.button-ghost {
  background-color: var(--bg-card);
  border-color: var(--line-strong);
  color: var(--ink-title);
}

.btn-ghost:hover,
.btn-ghost:focus-visible,
.button-ghost:hover,
.button-ghost:focus-visible {
  border-color: var(--brand);
  color: var(--brand-dark);
  text-decoration: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--brand-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--brand);
  border-bottom-color: var(--brand);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   components：区块标题组
   -------------------------------------------------------------------------- */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 24px;
  line-height: 1.35;
}

.section-desc,
.section-intro,
.section-lead,
.section-text {
  color: var(--ink-body);
  font-size: 15px;
  line-height: 1.8;
}

.section-foot {
  margin-top: 16px;
  font-size: 15px;
}

.section {
  margin-bottom: 48px;
}

.section-title + .section-intro,
.section-title + .section-lead,
.section-title + .section-text {
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   components：数据表格
   -------------------------------------------------------------------------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  min-width: 640px;
  font-size: 15px;
}

.table-caption {
  padding: 12px 16px;
  color: var(--ink-muted);
  font-size: 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table thead th {
  padding: 12px 16px;
  background-color: #F1F6F5;
  color: var(--ink-title);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.data-table tbody th,
.data-table tbody td {
  padding: 12px 16px;
  color: var(--ink-body);
  font-size: 15px;
  font-weight: 400;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.data-table tbody th {
  color: var(--ink-title);
  font-weight: 600;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover th,
.data-table tbody tr:hover td {
  background-color: #F6FAF9;
}

.cell-code {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--brand-dark);
  white-space: nowrap;
}

.cell-name {
  color: var(--ink-title);
  font-weight: 600;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   components：面包屑与内页标题区
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--ink-muted);
}

.breadcrumb a {
  color: var(--ink-muted);
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--brand-dark);
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink-title);
  font-weight: 600;
}

.page-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 34px;
  line-height: 1.3;
  color: var(--ink-title);
}

.page-description {
  margin-top: 10px;
  max-width: 760px;
  color: var(--ink-body);
  font-size: 16px;
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   components：左侧粘性目录
   -------------------------------------------------------------------------- */
.toc {
  position: sticky;
  top: 88px;
  padding: 16px 14px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.toc-title {
  margin-bottom: 10px;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-item {
  margin: 0;
}

.toc-link {
  display: block;
  min-height: 36px;
  padding: 6px 10px;
  border-left: 2px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--ink-body);
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.toc-link:hover,
.toc-link:focus-visible {
  background-color: #EDF5F3;
  color: var(--brand-dark);
  text-decoration: none;
}

.toc-link.is-active {
  background-color: #EDF5F3;
  border-left-color: var(--brand);
  color: var(--brand-dark);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   components：定义列表、要点列表、FAQ、相关链接
   -------------------------------------------------------------------------- */
.def-list,
.field-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.def-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.def-item:last-child {
  border-bottom: 0;
}

.def-term {
  color: var(--ink-title);
  font-size: 15px;
  font-weight: 600;
}

.def-desc {
  margin-top: 4px;
  color: var(--ink-body);
  font-size: 15px;
  line-height: 1.75;
}

.field-list dt {
  padding: 12px 16px 0;
  color: var(--ink-title);
  font-size: 15px;
  font-weight: 600;
}

.field-list dd {
  padding: 4px 16px 12px;
  color: var(--ink-body);
  font-size: 15px;
  line-height: 1.75;
  border-bottom: 1px solid var(--line);
}

.field-list dd:last-child {
  border-bottom: 0;
}

.note-list,
.scope-list,
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-item,
.notes-item {
  padding: 14px 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
}

.note-title {
  color: var(--ink-title);
  font-size: 16px;
  font-weight: 600;
}

.note-text {
  margin-top: 6px;
  color: var(--ink-body);
  font-size: 15px;
  line-height: 1.75;
}

.notes-item {
  color: var(--ink-body);
  font-size: 15px;
  line-height: 1.75;
  border-left-color: var(--line-strong);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  color: var(--ink-title);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--brand-dark);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-item[open] .faq-question {
  border-bottom: 1px solid var(--line);
}

.faq-answer {
  padding: 12px 16px 16px;
  color: var(--ink-body);
  font-size: 15px;
  line-height: 1.8;
}

.related-block {
  margin-top: 32px;
  padding: 18px;
  background-color: #F1F6F5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-title {
  margin-bottom: 10px;
  color: var(--ink-title);
  font-size: 18px;
  font-weight: 700;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0;
}

.related-link {
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.related-link:hover,
.related-link:focus-visible {
  color: var(--brand);
  border-bottom-color: var(--brand);
  text-decoration: none;
}

.related-note {
  color: var(--ink-muted);
  font-size: 13px;
}

.related-section {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   components：页脚
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-card);
  border-top: 1px solid var(--line);
}

.site-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.2fr);
  gap: 32px;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 20px 28px;
}

.footer-brand {
  min-width: 0;
}

.footer-brand-name {
  color: var(--ink-title);
  font-size: 18px;
  font-weight: 700;
}

.footer-brand-text {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.75;
}

.footer-group {
  min-width: 0;
}

.footer-group-title {
  margin-bottom: 10px;
  color: var(--ink-title);
  font-size: 15px;
  font-weight: 700;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  display: inline-block;
  min-height: 24px;
  color: var(--ink-body);
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--brand-dark);
  text-decoration: underline;
}

.footer-note {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.75;
}

.site-footer-bottom {
  border-top: 1px solid var(--line);
}

.footer-copyright {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 20px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   pages：首页
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 40px 0 8px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  background-color: #EDF5F3;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 600;
}

.hero-title {
  font-size: 34px;
  line-height: 1.3;
}

.hero-text {
  margin-top: 14px;
  max-width: 560px;
  color: var(--ink-body);
  font-size: 16px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-media {
  margin: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.hero-media figcaption {
  padding: 10px 14px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.7;
  border-top: 1px solid var(--line);
}

.channels-overview,
.collections-entry,
.field-boundary,
.records-preview,
.page-index {
  margin-top: 56px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.collection-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.collection-card:hover,
.collection-card:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 2px 8px rgba(31, 42, 46, 0.06);
}

.collection-media,
.collection-cover {
  margin: 0;
  background-color: #EDF5F3;
  border-bottom: 1px solid var(--line);
}

.collection-media img,
.collection-cover img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.collection-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  padding: 16px;
}

.collection-name {
  font-size: 18px;
  line-height: 1.4;
}

.collection-name a,
.collection-link {
  color: var(--ink-title);
  text-decoration: none;
}

.collection-name a:hover,
.collection-name a:focus-visible,
.collection-link:hover,
.collection-link:focus-visible {
  color: var(--brand-dark);
  text-decoration: underline;
}

.collection-text,
.collection-angle {
  color: var(--ink-body);
  font-size: 15px;
  line-height: 1.75;
}

.collection-meta {
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.7;
}

.collection-body .text-link {
  align-self: flex-start;
  margin-top: auto;
}

.field-boundary-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.field-column,
.boundary-column {
  min-width: 0;
  padding: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.column-title {
  margin-bottom: 12px;
  font-size: 18px;
  line-height: 1.4;
}

.boundary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.boundary-list li {
  position: relative;
  padding-left: 16px;
  color: var(--ink-body);
  font-size: 15px;
  line-height: 1.75;
}

.boundary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  background-color: var(--brand);
  border-radius: 50%;
}

.boundary-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.75;
}

.records-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.record-group {
  min-width: 0;
  padding: 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.record-month {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-family: var(--font-mono);
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.record-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  margin: 0;
}

.record-date {
  color: var(--ink-muted);
  font-size: 13px;
}

.record-tag,
.record-type {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.record-tag,
.record-type-new {
  background-color: rgba(18, 165, 148, 0.12);
  color: var(--brand-dark);
}

.record-type-adjust {
  background-color: rgba(194, 65, 12, 0.1);
  color: var(--accent-change);
}

.record-type-merge {
  background-color: #EDF5F3;
  color: var(--ink-body);
}

.record-text {
  flex: 1 1 100%;
  color: var(--ink-body);
  font-size: 14px;
  line-height: 1.7;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.index-card {
  min-width: 0;
  padding: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.index-name {
  font-size: 17px;
  line-height: 1.4;
}

.index-link {
  color: var(--ink-title);
  text-decoration: none;
}

.index-link:hover,
.index-link:focus-visible {
  color: var(--brand-dark);
  text-decoration: underline;
}

.index-text {
  margin-top: 8px;
  color: var(--ink-body);
  font-size: 14px;
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   pages：题材频道
   -------------------------------------------------------------------------- */
.channel-table-section .section-figure,
.section-figure {
  margin: 16px 0;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.section-figure img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.figure-caption {
  padding: 10px 14px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.7;
  border-top: 1px solid var(--line);
}

.channel-table .cell-code {
  white-space: nowrap;
}

.field-notes-section .field-list {
  margin-top: 12px;
}

.scope-list {
  margin-top: 12px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.related-card {
  display: block;
  min-width: 0;
  padding: 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.related-card:hover,
.related-card:focus-visible {
  background-color: #F6FAF9;
  border-color: var(--brand);
  text-decoration: none;
}

.related-card-title {
  color: var(--ink-title);
  font-size: 16px;
  font-weight: 700;
}

.related-card-text {
  margin-top: 6px;
  color: var(--ink-body);
  font-size: 14px;
  line-height: 1.75;
}

.related-tail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   pages：专题片单
   -------------------------------------------------------------------------- */
.collections-list,
.collection-notes,
.collection-map,
.collection-guide-entry {
  margin-bottom: 48px;
}

.collections-list .collection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.collection-notes .notes-list {
  margin-top: 12px;
}

.collection-map .table-wrap,
.records-section .table-wrap {
  margin-top: 12px;
}

.entry-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 12px;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   pages：观看指引
   -------------------------------------------------------------------------- */
.guide-section {
  margin-bottom: 48px;
}

.guide-figure {
  margin: 16px 0;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.guide-figure img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.guide-figure-caption {
  padding: 10px 14px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.7;
  border-top: 1px solid var(--line);
}

.step-list,
.order-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
  counter-reset: guide-step;
}

.step-item,
.order-item {
  position: relative;
  min-width: 0;
  padding: 16px 16px 16px 60px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: guide-step;
}

.step-item::before,
.order-item::before {
  content: counter(guide-step);
  position: absolute;
  left: 16px;
  top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: #EDF5F3;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--brand-dark);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.step-title,
.order-title {
  font-size: 17px;
  line-height: 1.4;
}

.step-text,
.order-text {
  margin-top: 6px;
  color: var(--ink-body);
  font-size: 15px;
  line-height: 1.8;
}

.order-check {
  margin-top: 8px;
  padding: 8px 12px;
  background-color: #F6FAF9;
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.75;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 16px 0;
}

.compare-col {
  min-width: 0;
  padding: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.compare-title {
  font-size: 17px;
  line-height: 1.4;
}

.compare-text {
  margin-top: 8px;
  color: var(--ink-body);
  font-size: 15px;
  line-height: 1.8;
}

.compare-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.compare-list li {
  position: relative;
  padding-left: 16px;
  color: var(--ink-body);
  font-size: 14px;
  line-height: 1.75;
}

.compare-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background-color: var(--brand);
  border-radius: 50%;
}

.guide-section .faq-list {
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   pages：整理记录
   -------------------------------------------------------------------------- */
.records-section {
  margin-bottom: 48px;
}

.record-month-title {
  margin: 24px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--brand);
  font-size: 18px;
  font-family: var(--font-mono);
}

.records-section .record-list {
  gap: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.records-section .record-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.records-section .record-item:last-child {
  border-bottom: 0;
}

.records-section .record-text {
  flex: 1 1 100%;
  margin: 0;
}

.term-list {
  margin-top: 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.term-name {
  padding: 12px 16px 0;
  color: var(--ink-title);
  font-size: 15px;
  font-weight: 600;
}

.term-desc {
  padding: 4px 16px 12px;
  color: var(--ink-body);
  font-size: 15px;
  line-height: 1.75;
  border-bottom: 1px solid var(--line);
}

.term-desc:last-child {
  border-bottom: 0;
}

.records-figure {
  margin: 0 0 48px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.records-figure img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.records-entry .entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 12px;
}

.entry-link-item {
  margin: 0;
}

.entry-link {
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.entry-link:hover,
.entry-link:focus-visible {
  color: var(--brand);
  border-bottom-color: var(--brand);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   pages：404
   -------------------------------------------------------------------------- */
.error-main {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px 20px 80px;
}

.error-panel {
  width: 100%;
  max-width: 640px;
  padding: 32px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-code {
  color: var(--brand-dark);
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
}

.error-panel h1 {
  margin-top: 8px;
  font-size: 34px;
  line-height: 1.3;
}

.error-text {
  margin-top: 12px;
  color: var(--ink-body);
  font-size: 16px;
  line-height: 1.8;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.error-links li {
  margin: 0;
}

/* --------------------------------------------------------------------------
   responsive：1024px
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .site-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }

  .hero-inner {
    gap: 28px;
  }

  .hero-media img {
    height: 280px;
  }

  .records-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .records-groups .record-group:last-child {
    grid-column: 1 / -1;
  }

  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 28px;
  }

  .sidebar-left {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .page-aside {
    width: 180px;
  }

  .page-content {
    max-width: none;
  }
}

/* --------------------------------------------------------------------------
   responsive：768px
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .site-header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex-basis: 100%;
    width: 100%;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    font-size: 16px;
  }

  .home-main,
  .inner-main {
    padding: 0 16px 48px;
  }

  .site-notice-inner {
    padding: 8px 16px;
  }

  .hero-section {
    padding: 28px 0 4px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hero-title,
  .page-title,
  .error-panel h1 {
    font-size: 26px;
  }

  .hero-media img {
    height: 220px;
  }

  .channels-overview,
  .collections-entry,
  .field-boundary,
  .records-preview,
  .page-index {
    margin-top: 40px;
  }

  .section-title {
    font-size: 20px;
  }

  .collection-grid,
  .collections-list .collection-grid,
  .related-grid,
  .compare-grid,
  .field-boundary-columns,
  .records-groups,
  .index-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .records-groups .record-group:last-child {
    grid-column: auto;
  }

  .collection-media img,
  .collection-cover img {
    height: 190px;
  }

  .section-figure img,
  .guide-figure img {
    height: 190px;
  }

  .records-figure img {
    height: 190px;
  }

  /* 内页双栏折叠：目录在前，正文在后；H1 仍在目录之前 */
  .page-layout,
  .sidebar-left {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .page-aside {
    width: 100%;
  }

  .toc {
    position: static;
    top: auto;
  }

  .toc-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .toc-item {
    flex: 1 1 auto;
  }

  .toc-link {
    min-height: 40px;
    padding: 8px 12px;
    border-left: 0;
    border: 1px solid var(--line);
  }

  .toc-link.is-active {
    border-color: var(--brand);
  }

  .page-header {
    margin-bottom: 24px;
  }

  .site-footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 32px 16px 24px;
  }

  .footer-copyright {
    padding: 14px 16px;
  }

  .error-main {
    padding: 40px 16px 56px;
  }

  .error-panel {
    padding: 24px 20px;
  }

  .error-code {
    font-size: 32px;
  }
}

/* --------------------------------------------------------------------------
   responsive：480px
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .site-brand-name {
    font-size: 18px;
  }

  .site-brand-slogan {
    font-size: 11px;
  }

  .hero-title,
  .page-title,
  .error-panel h1 {
    font-size: 23px;
  }

  .hero-actions,
  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .button {
    width: 100%;
  }

  .hero-media img {
    height: 180px;
  }

  .section-figure img,
  .guide-figure img,
  .records-figure img,
  .collection-media img,
  .collection-cover img {
    height: 170px;
  }

  .data-table {
    min-width: 520px;
    font-size: 14px;
  }

  .data-table thead th,
  .data-table tbody th,
  .data-table tbody td {
    padding: 10px 12px;
  }

  .step-item,
  .order-item {
    padding: 14px 14px 14px 52px;
  }

  .step-item::before,
  .order-item::before {
    left: 14px;
    top: 14px;
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .related-tail,
  .entry-line,
  .entry-links,
  .error-links {
    flex-direction: column;
    gap: 8px;
  }
}

/* --------------------------------------------------------------------------
   motion：尊重减少动效偏好
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
