/* ==========================================================================
   九九影院大全 · 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */

:root {
  --ink: #1f3a5f;
  --ink-soft: #38536f;
  --muted: #5b7a99;
  --page-bg: #f4f6f8;
  --card-bg: #ffffff;
  --line: #dde3e9;
  --line-strong: #c3cfda;
  --tag-new: #2f7d5c;
  --tag-move: #b07a20;
  --tag-edit: #7a5ca8;
  --radius: 6px;
  --radius-sm: 4px;
  --shell: 1120px;
  --prose: 760px;
  --shadow-card: 0 1px 2px rgba(31, 58, 95, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: #22303d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.4;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: #14293f;
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   layout · 全站骨架
   -------------------------------------------------------------------------- */

.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--card-bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-nav {
  margin-left: auto;
}

.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.inner-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px 56px;
}

.topbar {
  background: #eaeff4;
  border-bottom: 1px solid var(--line);
}

.topbar-text {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 8px 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   components · 页头与导航
   -------------------------------------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 6px 0;
}

.brand:hover,
.brand:focus-visible {
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  position: relative;
  flex: 0 0 auto;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px 6px;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
}

.brand-name {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 14px;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: #eef2f6;
  color: var(--ink);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--ink);
  font-weight: 600;
  background: #e6edf4;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

/* --------------------------------------------------------------------------
   components · 面包屑与页面标题区
   -------------------------------------------------------------------------- */

.breadcrumb {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--ink);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink-soft);
}

.page-header {
  max-width: var(--prose);
  padding: 18px 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.page-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
}

.page-description {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 15px;
}

.page-description a {
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

/* --------------------------------------------------------------------------
   components · 通用区块与标题
   -------------------------------------------------------------------------- */

.section {
  margin-bottom: 44px;
}

.section-head {
  margin-bottom: 20px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.section-desc,
.section-intro,
.section-note,
.section-lead {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: var(--prose);
}

.section-foot {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.section-footnote {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.inline-link {
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.inline-link:hover,
.inline-link:focus-visible {
  text-decoration: none;
  border-bottom-color: var(--ink);
}

.col-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.col-foot {
  margin-top: 14px;
  font-size: 14px;
}

.subsection-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   components · 表格
   -------------------------------------------------------------------------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.7;
}

.table-caption {
  caption-side: top;
  padding: 12px 16px;
  text-align: left;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.data-table thead th {
  background: #eef2f6;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.data-table tbody th {
  color: var(--ink);
  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 {
  background: #f7f9fb;
}

.table-link {
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

.table-link:hover,
.table-link:focus-visible {
  text-decoration: none;
  border-bottom-color: var(--ink);
}

/* --------------------------------------------------------------------------
   components · 标签与状态
   -------------------------------------------------------------------------- */

.update-tag,
.record-type {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.7;
  white-space: nowrap;
}

.tag-add,
.record-type.is-new {
  color: var(--tag-new);
  background: #e6f2ec;
  border: 1px solid #c4e0d2;
}

.tag-move,
.record-type.is-move {
  color: var(--tag-move);
  background: #faf1de;
  border: 1px solid #ecd9b0;
}

.tag-edit,
.record-type.is-edit {
  color: var(--tag-edit);
  background: #f0eaf8;
  border: 1px solid #d9cbec;
}

/* --------------------------------------------------------------------------
   components · 页脚
   -------------------------------------------------------------------------- */

.site-footer {
  flex: 0 0 auto;
  background: var(--card-bg);
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 34px 20px 26px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 2.2fr);
  gap: 32px;
}

.footer-brand-name {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.footer-desc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  max-width: 320px;
}

.footer-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.footer-list li + li {
  margin-top: 6px;
}

.footer-list a {
  color: var(--muted);
  font-size: 13px;
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--ink);
}

.footer-bottom {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 14px 20px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.footer-copy {
  color: var(--muted);
  font-size: 13px;
}

.footer-back a {
  color: var(--ink);
  font-size: 13px;
  border-bottom: 1px solid var(--line-strong);
}

.footer-back a:hover,
.footer-back a:focus-visible {
  text-decoration: none;
  border-bottom-color: var(--ink);
}

/* --------------------------------------------------------------------------
   pages · 首页
   -------------------------------------------------------------------------- */

.home-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.hero {
  margin-bottom: 44px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  gap: 32px;
  align-items: start;
}

.hero-lead {
  min-width: 0;
}

.hero-eyebrow {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--muted);
  font-size: 12px;
}

.hero-title {
  margin-top: 14px;
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
}

.hero-desc {
  margin-top: 14px;
  max-width: var(--prose);
  color: var(--ink-soft);
  font-size: 15px;
}

.hero-media {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-media figcaption {
  padding: 10px 14px 12px;
  margin-top: 0;
  border-top: 1px solid var(--line);
}

.hero-entries {
  min-width: 0;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.entries-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.entry-list {
  margin-top: 12px;
}

.entry-item + .entry-item {
  margin-top: 10px;
}

.entry-link {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fafc;
}

.entry-link:hover,
.entry-link:focus-visible {
  border-color: var(--line-strong);
  background: #eef2f6;
  text-decoration: none;
}

.entry-name {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.entry-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.entry-status {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.entry-status strong {
  color: var(--ink);
  font-weight: 600;
}

/* 首页 · 频道速览表 */

.channel-table .cell-enter,
.channel-table td:last-child {
  white-space: nowrap;
}

/* 首页 · 专题卡 */

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.topic-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.topic-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 3px 10px rgba(31, 58, 95, 0.08);
}

.topic-media,
.topic-figure {
  border-bottom: 1px solid var(--line);
  background: #eef2f6;
}

.topic-media img,
.topic-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.topic-name {
  padding: 14px 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.topic-scope {
  padding: 8px 16px 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.topic-channel {
  padding: 8px 16px 0;
  color: var(--muted);
  font-size: 13px;
}

.topic-link {
  margin: 14px 16px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
}

.topic-link::after {
  content: " →";
  color: var(--muted);
}

.topic-link:hover,
.topic-link:focus-visible {
  text-decoration: none;
  color: #14293f;
}

/* 首页 · 整理记录摘要 */

.update-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.update-group {
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.update-month {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.update-list {
  margin-top: 10px;
}

.update-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

.update-item:last-child {
  border-bottom: 0;
}

.update-date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.update-channel {
  color: var(--ink-soft);
}

.update-note {
  flex: 1 1 100%;
  color: var(--muted);
  font-size: 13px;
}

/* 首页 · 字段速查与收录边界 */

.fields-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.fields-col,
.boundary-col {
  min-width: 0;
}

.field-mini-table th,
.field-mini-table td {
  padding: 10px 14px;
}

.boundary-block {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.boundary-block + .boundary-block {
  margin-top: 16px;
}

.boundary-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.boundary-list li {
  position: relative;
  padding-left: 16px;
  color: var(--ink-soft);
  font-size: 14px;
}

.boundary-list li + li {
  margin-top: 6px;
}

.boundary-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
}

.boundary-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

/* 首页 · 站内页面索引 */

.index-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.index-col {
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.index-col-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.index-list {
  margin-top: 10px;
}

.index-list li + li {
  margin-top: 8px;
}

.index-list a {
  color: var(--ink-soft);
  font-size: 14px;
}

.index-list a:hover,
.index-list a:focus-visible {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   pages · 频道分类
   -------------------------------------------------------------------------- */

.channel-overview-figure {
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
}

.channel-overview-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.channel-overview-figure figcaption {
  padding: 10px 16px 12px;
  margin-top: 0;
  border-top: 1px solid var(--line);
}

.channel-table-section,
.channel-distinction-section,
.sample-entry-section,
.scope-rhythm-section,
.related-links-section {
  margin-bottom: 44px;
}

.channel-name {
  color: var(--ink);
  font-weight: 600;
}

.cell-direction {
  min-width: 180px;
}

.cell-org {
  min-width: 200px;
}

.cell-sample {
  min-width: 180px;
}

.distinction-block {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.distinction-block + .distinction-block {
  margin-top: 16px;
}

.distinction-block p {
  color: var(--ink-soft);
  max-width: var(--prose);
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.sample-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color 0.18s ease;
}

.sample-card:hover {
  border-color: var(--line-strong);
}

.sample-media {
  border-bottom: 1px solid var(--line);
  background: #eef2f6;
}

.sample-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.sample-name {
  padding: 14px 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.sample-channel {
  padding: 8px 16px 0;
  color: var(--muted);
  font-size: 13px;
}

.sample-fields {
  padding: 12px 16px 16px;
}

.sample-fields li {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

.sample-fields li:last-child {
  border-bottom: 0;
}

.field-key {
  flex: 0 0 88px;
  color: var(--muted);
}

.scope-rhythm-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.scope-column,
.rhythm-column {
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.scope-list li {
  position: relative;
  padding-left: 16px;
  color: var(--ink-soft);
  font-size: 14px;
}

.scope-list li + li {
  margin-top: 8px;
}

.scope-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
}

.scope-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.rhythm-column p {
  color: var(--ink-soft);
  font-size: 14px;
}

.rhythm-column p + p {
  margin-top: 10px;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.related-list a {
  display: block;
  padding: 12px 14px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 14px;
}

.related-list a:hover,
.related-list a:focus-visible {
  border-color: var(--line-strong);
  background: #eef2f6;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   pages · 专题片单
   -------------------------------------------------------------------------- */

.topics-section,
.topic-logic,
.topic-channel-map,
.topic-fields {
  margin-bottom: 44px;
}

.topic-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.topic-body .topic-name {
  padding: 14px 16px 0;
}

.topic-body .topic-scope {
  padding: 8px 16px 0;
}

.topic-meta {
  margin: 12px 16px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  font-size: 13px;
}

.topic-meta dt {
  color: var(--muted);
  white-space: nowrap;
}

.topic-meta dd {
  margin: 0;
  color: var(--ink-soft);
  min-width: 0;
}

.logic-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.logic-item {
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.logic-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.logic-text {
  color: var(--ink-soft);
  font-size: 14px;
}

.topic-channel-table td,
.topic-channel-table th {
  min-width: 120px;
}

.field-example-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.field-example {
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.field-example-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.field-example-value {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 14px;
}

.field-example-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   pages · 整理记录
   -------------------------------------------------------------------------- */

.record-visual,
.record-months,
.record-types,
.record-map,
.record-policy {
  margin-bottom: 44px;
}

.record-figure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
}

.record-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.record-figure figcaption {
  padding: 10px 16px 12px;
  margin-top: 0;
  border-top: 1px solid var(--line);
}

.month-group {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.month-group + .month-group {
  margin-top: 16px;
}

.month-heading {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.month-toggle {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  background: #eef2f6;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.month-toggle::after {
  content: "收起";
  float: right;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.month-toggle[aria-expanded="false"]::after {
  content: "展开";
}

.month-toggle:hover,
.month-toggle:focus-visible {
  background: #e6edf4;
}

.record-list {
  padding: 6px 18px 14px;
}

.month-toggle[aria-expanded="false"] + .record-list {
  display: none;
}

.record-item {
  display: grid;
  grid-template-columns: 96px 72px minmax(120px, 160px) minmax(0, 1fr);
  align-items: start;
  gap: 8px 14px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

.record-item:last-child {
  border-bottom: 0;
}

.record-date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.record-channel {
  color: var(--ink-soft);
}

.record-desc {
  color: var(--ink-soft);
  font-size: 14px;
  min-width: 0;
}

.type-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.type-card {
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.type-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.type-text {
  color: var(--ink-soft);
  font-size: 14px;
}

.policy-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.policy-col {
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.policy-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.policy-list li {
  position: relative;
  padding-left: 16px;
  color: var(--ink-soft);
  font-size: 14px;
}

.policy-list li + li {
  margin-top: 8px;
}

.policy-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
}

/* --------------------------------------------------------------------------
   pages · 浏览指引
   -------------------------------------------------------------------------- */

.guide-visual,
.guide-block,
.guide-faq,
.guide-next {
  margin-bottom: 44px;
}

.guide-figure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
}

.guide-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.guide-figure figcaption {
  padding: 10px 16px 12px;
  margin-top: 0;
  border-top: 1px solid var(--line);
}

.guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.guide-item {
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.guide-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.guide-item p {
  color: var(--ink-soft);
  font-size: 14px;
}

.guide-steps-order {
  margin-top: 18px;
  counter-reset: guide-step;
}

.guide-step {
  position: relative;
  counter-increment: guide-step;
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 16px 56px;
}

.guide-step + .guide-step {
  margin-top: 14px;
}

.guide-step::before {
  content: counter(guide-step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e6edf4;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 26px;
  text-align: center;
}

.guide-step-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.guide-step-action,
.guide-step-expect,
.guide-step-warn {
  color: var(--ink-soft);
  font-size: 14px;
}

.guide-step-expect {
  margin-top: 6px;
}

.guide-step-warn {
  margin-top: 6px;
  color: var(--tag-move);
}

.faq-list {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-bg);
  overflow: hidden;
}

.faq-item + .faq-item {
  border-top: 1px solid var(--line);
}

.faq-question {
  padding: 14px 18px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "＋";
  float: right;
  color: var(--muted);
  font-weight: 400;
}

.faq-item[open] .faq-question::after {
  content: "－";
}

.faq-question:hover,
.faq-question:focus-visible {
  background: #f7f9fb;
}

.faq-answer {
  padding: 0 18px 16px;
  color: var(--ink-soft);
  font-size: 14px;
}

.faq-answer a {
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.guide-next-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.guide-next-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.guide-next-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.guide-next-card p {
  flex: 1 1 auto;
  color: var(--ink-soft);
  font-size: 14px;
}

.guide-next-link {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
}

.guide-next-link:hover,
.guide-next-link:focus-visible {
  text-decoration: none;
  color: #14293f;
}

/* --------------------------------------------------------------------------
   pages · 字段说明
   -------------------------------------------------------------------------- */

.field-map,
.field-table-section,
.field-usage,
.boundary-section,
.field-diff,
.next-step {
  margin-bottom: 44px;
}

.field-map-figure {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
}

.field-map-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.field-map-figure figcaption {
  padding: 10px 16px 12px;
  margin-top: 0;
  border-top: 1px solid var(--line);
}

.field-table th,
.field-table td {
  min-width: 110px;
}

.usage-group {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.usage-group + .usage-group {
  margin-top: 14px;
}

.usage-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.usage-group p {
  color: var(--ink-soft);
  font-size: 14px;
  max-width: var(--prose);
}

.usage-group p a {
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.boundary-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.boundary-col {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.boundary-in {
  border-top: 3px solid var(--tag-new);
}

.boundary-out {
  border-top: 3px solid var(--tag-move);
}

.boundary-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.diff-table th,
.diff-table td {
  min-width: 120px;
}

.next-step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.next-step-list a {
  display: block;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 14px;
}

.next-step-list a:hover,
.next-step-list a:focus-visible {
  border-color: var(--line-strong);
  background: #eef2f6;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   pages · 404
   -------------------------------------------------------------------------- */

.error-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.error-panel {
  max-width: var(--prose);
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
}

.error-code {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.error-title {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
}

.error-desc {
  margin-top: 12px;
  color: var(--ink-soft);
}

.error-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.4;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #14293f;
  color: #ffffff;
  text-decoration: none;
}

.btn-ghost {
  background: var(--card-bg);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: #eef2f6;
  text-decoration: none;
}

.error-hints {
  margin-top: 40px;
}

.error-hint-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.error-hint-list a {
  display: block;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 14px;
}

.error-hint-list a:hover,
.error-hint-list a:focus-visible {
  border-color: var(--line-strong);
  background: #eef2f6;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 0 16px;
    min-height: 58px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    order: 3;
    flex: 1 1 100%;
    margin-left: 0;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0 14px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 8px;
    font-size: 15px;
  }

  .topbar-text,
  .inner-main,
  .home-main,
  .error-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hero-title {
    font-size: 24px;
  }

  .topic-grid,
  .sample-grid,
  .scope-rhythm-columns,
  .policy-columns,
  .boundary-columns,
  .fields-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .update-groups,
  .logic-list,
  .type-columns,
  .index-grid,
  .guide-next-grid,
  .next-step-list,
  .error-hint-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .footer-groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .record-item {
    grid-template-columns: 90px 72px minmax(0, 1fr);
  }

  .record-desc {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .topbar-text {
    font-size: 12px;
  }

  .brand-name {
    font-size: 16px;
  }

  .page-title,
  .hero-title,
  .error-title {
    font-size: 22px;
  }

  .section-title {
    font-size: 18px;
  }

  .page-header {
    padding: 14px 0 20px;
    margin-bottom: 26px;
  }

  .section {
    margin-bottom: 34px;
  }

  .channel-table-section,
  .channel-distinction-section,
  .sample-entry-section,
  .scope-rhythm-section,
  .related-links-section,
  .topics-section,
  .topic-logic,
  .topic-channel-map,
  .topic-fields,
  .record-visual,
  .record-months,
  .record-types,
  .record-map,
  .record-policy,
  .guide-visual,
  .guide-block,
  .guide-faq,
  .guide-next,
  .field-map,
  .field-table-section,
  .field-usage,
  .boundary-section,
  .field-diff,
  .next-step {
    margin-bottom: 34px;
  }

  .update-groups,
  .logic-list,
  .type-columns,
  .index-grid,
  .guide-next-grid,
  .next-step-list,
  .error-hint-list,
  .related-list,
  .footer-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 表格转逐行卡片 */
  .table-wrap {
    overflow-x: visible;
    border: 0;
    background: transparent;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table {
    border-collapse: separate;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .data-table tbody tr {
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 6px 14px;
  }

  .data-table tbody tr + tr {
    margin-top: 14px;
  }

  .data-table tbody tr:hover {
    background: var(--card-bg);
  }

  .data-table th,
  .data-table td {
    padding: 8px 0;
    border-bottom: 1px dashed var(--line);
  }

  .data-table tbody tr > *:last-child {
    border-bottom: 0;
  }

  .data-table caption {
    padding: 0 0 10px;
    border-bottom: 0;
  }

  .data-table tbody th {
    padding-top: 12px;
    font-size: 15px;
  }

  .cell-direction,
  .cell-org,
  .cell-sample {
    min-width: 0;
  }

  .field-table th,
  .field-table td,
  .diff-table th,
  .diff-table td,
  .topic-channel-table td,
  .topic-channel-table th {
    min-width: 0;
  }

  .record-list {
    padding: 4px 14px 12px;
  }

  .record-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 12px 0;
  }

  .record-desc {
    grid-column: auto;
  }

  .guide-step {
    padding: 14px 16px 14px 52px;
  }

  .guide-step::before {
    left: 14px;
    top: 14px;
  }

  .error-panel {
    padding: 22px 20px;
  }

  .footer-inner {
    padding: 26px 16px 20px;
  }

  .footer-bottom {
    padding: 14px 16px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
