/* ==========================================================================
   基础样式 base
   ========================================================================== */

:root {
  --bg-page: #FBF7F1;
  --bg-soft: #F2EAE0;
  --ink: #23201D;
  --ink-muted: #5C6A66;
  --teal: #1F5C63;
  --teal-deep: #0F3B40;
  --accent: #C4622D;
  --line: #E4DACA;
  --radius: 3px;
  --font: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --shell: 1040px;
  --body-col: 720px;
  --aside-col: 240px;
  --gap-col: 80px;
}

*,
*::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);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.35;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   布局骨架 layout
   ========================================================================== */

.site-header {
  background-color: var(--bg-page);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 18px 24px 0;
}

.brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  padding-bottom: 14px;
}

.brand {
  color: var(--teal-deep);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.brand:hover,
.brand:focus-visible {
  color: var(--accent);
}

.brand-slogan {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.4;
}

.site-nav {
  border-top: 1px solid var(--line);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0 4px;
}

.nav-item {
  display: flex;
}

.nav-item > a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
}

.nav-item > a:hover,
.nav-item > a:focus-visible {
  color: var(--teal);
  border-bottom-color: var(--line);
}

.nav-item.is-current > a {
  color: var(--teal-deep);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 48px;
  height: 48px;
  margin: 4px 0 8px auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-soft);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--teal-deep);
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--body-col)) var(--aside-col);
  gap: 0 var(--gap-col);
  max-width: var(--shell);
  margin: 0 auto;
  padding: 40px 24px 56px;
  align-items: start;
}

.site-main {
  min-width: 0;
}

.inner-main {
  min-width: 0;
  font-size: 17px;
  line-height: 1.85;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  margin-bottom: 18px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.6;
}

.breadcrumb a {
  color: var(--ink-muted);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--teal);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--ink);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0 8px;
  color: var(--ink-muted);
  font-size: 13px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--line);
}

.breadcrumb-item.is-current {
  color: var(--ink);
}

.page-header {
  margin-bottom: 16px;
}

.page-title {
  color: var(--ink);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
}

.page-head,
.page-intro,
.page-title-block {
  margin-bottom: 32px;
}

.page-lead,
.page-definition {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.85;
}

.scope-note,
.scope-hint {
  margin-top: 10px;
  padding: 8px 14px;
  border-left: 3px solid var(--line);
  background-color: var(--bg-soft);
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.7;
}

.site-footer {
  background-color: var(--teal-deep);
  color: #D8E2E0;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 44px 24px 40px;
}

.footer-col {
  min-width: 0;
}

.footer-title {
  margin-bottom: 12px;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: #C3D2D0;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #FFFFFF;
}

.footer-about p {
  color: #B7C6C4;
  font-size: 13px;
  line-height: 1.75;
}

.footer-about p + p {
  margin-top: 8px;
}

.footer-copy {
  color: #8FA5A2;
}

/* ==========================================================================
   通用组件 components
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.btn-primary {
  background-color: var(--accent);
  color: #FFFFFF;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: #A94F22;
  color: #FFFFFF;
}

.btn-ghost {
  border-color: var(--teal);
  background-color: transparent;
  color: var(--teal);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background-color: var(--teal);
  color: #FFFFFF;
}

.btn-accent {
  background-color: var(--accent);
  color: #FFFFFF;
}

.btn-accent:hover,
.btn-accent:focus-visible {
  background-color: #A94F22;
  color: #FFFFFF;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: transparent;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.6;
  white-space: nowrap;
}

a.tag:hover,
a.tag:focus-visible {
  border-color: var(--teal);
  color: var(--teal);
}

.row-link,
.text-link {
  display: inline-block;
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.row-link:hover,
.row-link:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  color: var(--accent);
}

.content-figure,
.verify-figure,
.steps-figure,
.topic-figure,
.ledger-figure,
.hero-figure {
  min-width: 0;
}

.content-figure img,
.verify-figure img,
.steps-figure img,
.topic-figure img,
.ledger-figure img,
.hero-figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-soft);
  object-fit: cover;
}

.content-figure figcaption,
.verify-figure figcaption,
.steps-figure figcaption,
.topic-figure figcaption,
.ledger-figure figcaption,
.hero-figure figcaption,
.figure-caption {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.65;
}

.rule-list,
.rule-block {
  display: block;
}

.rule-item,
.rule-block {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.rule-item:first-child,
.rule-block:first-child {
  padding-top: 0;
}

.rule-item h3,
.rule-name,
.rule-title {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}

.rule-item p,
.rule-text {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
}

.rule-scope,
.scope-note {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-soft);
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.6;
}

.rule-example {
  margin-top: 8px;
  padding: 8px 12px;
  border-left: 3px solid var(--teal);
  background-color: var(--bg-soft);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.75;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.related-links-label {
  color: var(--ink-muted);
  font-size: 13px;
}

.related-links-item {
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-item a {
  display: block;
  padding: 6px 10px;
  border-left: 3px solid transparent;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.6;
}

.toc-item a:hover,
.toc-item a:focus-visible {
  color: var(--teal);
  border-left-color: var(--line);
}

.toc-item a.is-active {
  color: var(--teal-deep);
  font-weight: 600;
  border-left-color: var(--accent);
}

/* ==========================================================================
   首页 index
   ========================================================================== */

.home-main {
  min-width: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 62fr) minmax(0, 38fr);
  gap: 32px;
  align-items: start;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.hero-text {
  min-width: 0;
}

.hero-text h1 {
  margin-bottom: 14px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.3;
}

.hero-lead {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.85;
}

.channel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.hero-note {
  margin-bottom: 20px;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.7;
}

.hero-note a {
  color: var(--teal);
  font-weight: 600;
}

.hero-note a + a {
  margin-left: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-figure {
  min-width: 0;
}

.hero-figure img {
  aspect-ratio: 4 / 3;
}

.section {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}

.section > h2 {
  margin-bottom: 10px;
  color: var(--teal-deep);
  font-size: 22px;
  font-weight: 600;
}

.section-intro {
  margin-bottom: 22px;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.8;
}

/* 内容目录 */
.directory-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.directory-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.directory-main {
  flex: 1 1 320px;
  min-width: 220px;
  padding-left: 12px;
  border-left: 3px solid transparent;
}

.directory-row:hover .directory-main {
  border-left-color: var(--teal);
}

.directory-main h3 {
  margin-bottom: 4px;
  font-size: 17px;
  font-weight: 600;
}

.directory-row:hover .directory-main h3 {
  color: var(--teal);
}

.directory-main p {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.75;
}

.directory-row .row-link {
  flex: 0 0 auto;
  align-self: center;
}

/* 频道速览 */
.channel-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.channel-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.channel-no {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.channel-body {
  flex: 1 1 360px;
  min-width: 220px;
}

.channel-body h3 {
  margin-bottom: 4px;
  font-size: 17px;
  font-weight: 600;
}

.channel-body p {
  margin-bottom: 8px;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.75;
}

.channel-row .row-link {
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
}

/* 专题片单 */
.topic-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.topic-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.topic-item h3 {
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 600;
}

.topic-item h3 a {
  color: var(--ink);
}

.topic-item h3 a:hover,
.topic-item h3 a:focus-visible {
  color: var(--teal);
}

.topic-item > p {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.75;
}

.topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 8px 0 10px;
}

.topic-meta a {
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
}

/* 观看说明三步 */
.steps-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-soft);
}

.step-no {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  color: var(--teal);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.step-item h3 {
  font-size: 16px;
  font-weight: 600;
}

.step-item p {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.7;
}

.steps-figure {
  min-width: 0;
}

.steps-figure img {
  aspect-ratio: 4 / 3;
}

/* 入口核验与内容边界 */
.verify-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.verify-block .rule-list {
  min-width: 0;
}

.verify-figure {
  min-width: 0;
}

.verify-figure img {
  aspect-ratio: 4 / 3;
}

/* 常见问题 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-soft);
}

.faq-item summary {
  padding: 12px 16px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "+";
  display: inline-block;
  width: 18px;
  margin-right: 6px;
  color: var(--teal);
  font-weight: 700;
}

.faq-item[open] summary::before {
  content: "−";
}

.faq-item summary:hover {
  color: var(--teal);
}

.faq-item p {
  padding: 0 16px 14px 40px;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.8;
}

/* 首页右侧辅助栏 */
.content-aside {
  min-width: 0;
  position: sticky;
  top: 24px;
  align-self: start;
  font-size: 14px;
}

.content-aside > nav {
  border-top: 1px solid var(--line);
}

.aside-toc,
.aside-updates,
.aside-feedback,
.aside-more {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.aside-title {
  margin-bottom: 10px;
  color: var(--teal-deep);
  font-size: 15px;
  font-weight: 600;
}

.aside-text {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.75;
}

.aside-link-row {
  display: block;
  padding: 6px 0;
  color: var(--teal);
  font-size: 14px;
  line-height: 1.6;
}

.aside-link-row:hover,
.aside-link-row:focus-visible {
  color: var(--accent);
}

.update-brief-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.update-brief-list li {
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.7;
}

.update-brief-list a {
  color: var(--teal);
}

.aside-feedback .btn {
  margin-top: 10px;
  width: 100%;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-page);
  color: var(--teal);
  font-size: 14px;
  cursor: pointer;
}

.back-to-top.is-visible {
  display: inline-flex;
}

/* ==========================================================================
   内页通用模块 inner pages
   ========================================================================== */

.inner-main .section-title,
.inner-main .content-section > h2,
.inner-main .channel-list > h2,
.inner-main .rule-block > h2,
.inner-main .mapping-block > h2,
.inner-main .next-steps > h2,
.inner-main .topic-list > h2,
.inner-main .topic-rules > h2,
.inner-main .topic-cross > h2,
.inner-main .verify-checklist > h2,
.inner-main .source-rule > h2,
.inner-main .mismatch-paths > h2,
.inner-main .ledger-intro > h2,
.inner-main .ledger-group > h2,
.inner-main .ledger-version-block > h2,
.inner-main .ledger-offline > h2,
.inner-main .content-section > h2 {
  margin-bottom: 10px;
  color: var(--teal-deep);
  font-size: 22px;
  font-weight: 600;
}

.section-intro,
.section-lead,
.section-text {
  margin-bottom: 20px;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.8;
}

.content-section,
.verify-checklist,
.source-rule,
.mismatch-paths,
.ledger-intro,
.ledger-group,
.ledger-version-block,
.ledger-offline,
.rule-block,
.mapping-block,
.next-steps,
.topic-rules,
.topic-cross,
.channel-list {
  margin-bottom: 40px;
}

/* 频道目录页 */
.page-channels .channel-list {
  border-top: 1px solid var(--line);
}

.page-channels .channel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 8px 28px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.channel-main {
  min-width: 0;
}

.channel-index {
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.channel-name {
  margin: 2px 0 6px;
  font-size: 19px;
  font-weight: 600;
}

.channel-def {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.8;
}

.channel-scope,
.channel-audience {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.75;
}

.channel-scope {
  margin-bottom: 4px;
}

.channel-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.mapping-table {
  font-size: 15px;
  line-height: 1.7;
}

.mapping-table thead th {
  padding: 10px 12px;
  border-bottom: 2px solid var(--line);
  background-color: var(--bg-soft);
  color: var(--teal-deep);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.mapping-table tbody th,
.mapping-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.mapping-table tbody th {
  color: var(--ink);
  font-weight: 600;
}

.mapping-table tbody td a {
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
}

.mapping-block .content-figure {
  margin-top: 24px;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 12px;
}

/* 专题片单页 */
.page-topics .topic-list {
  display: block;
}

.topic-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px 28px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.topic-body {
  min-width: 0;
}

.topic-name {
  margin-bottom: 8px;
  font-size: 19px;
  font-weight: 600;
}

.topic-definition {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.85;
}

.topic-organize {
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-soft);
}

.topic-subtitle {
  margin-bottom: 8px;
  color: var(--teal-deep);
  font-size: 15px;
  font-weight: 600;
}

.topic-points {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 0;
}

.topic-points li {
  position: relative;
  padding-left: 16px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.75;
}

.topic-points li::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 6px;
  height: 6px;
  border: 1px solid var(--teal);
  border-radius: 1px;
}

.topic-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.7;
}

.topic-channels a {
  color: var(--teal);
  font-weight: 600;
}

.topic-figure {
  min-width: 0;
}

.topic-figure img {
  aspect-ratio: 4 / 3;
}

.page-topics .topic-rules .rule-block {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.cross-table {
  font-size: 15px;
  line-height: 1.7;
}

.cross-table thead th {
  padding: 10px 12px;
  border-bottom: 2px solid var(--line);
  background-color: var(--bg-soft);
  color: var(--teal-deep);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.cross-table tbody th,
.cross-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.cross-table tbody th {
  color: var(--ink);
  font-weight: 600;
}

.cross-table tbody td a {
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
}

.cross-note {
  margin-top: 14px;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.75;
}

.cross-note a {
  color: var(--teal);
  font-weight: 600;
}

/* 观看说明页 */
.page-guide .step-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.page-guide .step-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 4px 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-soft);
}

.step-index {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  color: var(--teal);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.step-body {
  min-width: 0;
}

.step-name {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 600;
}

.step-desc {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.75;
}

.page-guide .content-figure {
  margin-bottom: 40px;
}

.page-guide .rule-block {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.interrupt-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.interrupt-name {
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 600;
}

.interrupt-desc,
.interrupt-action {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
}

.interrupt-action {
  margin-top: 6px;
  color: var(--ink-muted);
}

/* 入口核验页 */
.checklist-table {
  font-size: 15px;
  line-height: 1.7;
}

.checklist-table caption {
  text-align: left;
  color: var(--ink-muted);
  font-size: 13px;
  padding-bottom: 8px;
}

.checklist-table thead th {
  padding: 10px 12px;
  border-bottom: 2px solid var(--line);
  background-color: var(--bg-soft);
  color: var(--teal-deep);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.checklist-table tbody th,
.checklist-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.checklist-table tbody th {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.source-rule .rule-block {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.page-verify .verify-figure {
  margin-bottom: 40px;
}

.path-block {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.path-block h3 {
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 600;
}

.path-block > p {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
}

.path-action {
  margin-top: 6px;
  color: var(--ink-muted);
}

.path-action a {
  color: var(--teal);
  font-weight: 600;
}

/* 更新记录页 */
.page-updates .page-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--body-col)) var(--aside-col);
  gap: 0 var(--gap-col);
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px 56px;
  align-items: start;
}

.content-column {
  min-width: 0;
}

.ledger-intro p {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.85;
}

.ledger-intro p + p {
  margin-top: 8px;
}

.ledger-group {
  margin-bottom: 36px;
}

.group-note {
  margin-bottom: 14px;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.75;
}

.ledger-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.ledger-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 4px 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.ledger-version {
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.7;
}

.ledger-body {
  min-width: 0;
}

.ledger-title {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 600;
}

.ledger-desc {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
}

.ledger-scope {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.6;
}

.ledger-version-block p {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.85;
}

.ledger-version-block p + p {
  margin-top: 8px;
}

.ledger-figure {
  margin-top: 20px;
}

.offline-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.offline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.offline-title {
  grid-column: 1;
  font-size: 16px;
  font-weight: 600;
}

.offline-reason {
  grid-column: 1;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.75;
}

.offline-link {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
}

.side-column {
  min-width: 0;
  position: sticky;
  top: 24px;
  align-self: start;
}

.side-block {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.side-block:first-child {
  border-top: 1px solid var(--line);
}

.side-title {
  margin-bottom: 10px;
  color: var(--teal-deep);
  font-size: 15px;
  font-weight: 600;
}

.side-link-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-link-list a {
  color: var(--teal);
  font-size: 14px;
  line-height: 1.6;
}

.side-link-list a:hover,
.side-link-list a:focus-visible {
  color: var(--accent);
}

/* 反馈与协作页 */
.feedback-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.feedback-row h3 {
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 600;
}

.feedback-row p {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
}

.feedback-note {
  margin-top: 6px;
  color: var(--ink-muted);
}

.template-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.template-item {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-soft);
}

.template-index {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.template-item h3 {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 600;
}

.template-item p {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.75;
}

.feedback-example {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  background-color: var(--bg-soft);
}

.example-list {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
}

.example-list dt {
  color: var(--teal-deep);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.75;
}

.example-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
  min-width: 0;
}

.process-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.process-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.process-index {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  color: var(--teal);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.process-item h3 {
  font-size: 16px;
  font-weight: 600;
}

.process-item p {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.75;
}

#feedback-collab p {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.85;
}

#feedback-collab p + p {
  margin-top: 10px;
}

/* 内页右侧栏 */
.page-aside {
  min-width: 0;
  position: sticky;
  top: 24px;
  align-self: start;
  font-size: 14px;
}

.page-aside .aside-title,
.page-aside .toc-title {
  margin-bottom: 10px;
  color: var(--teal-deep);
  font-size: 15px;
  font-weight: 600;
}

.page-aside .aside-block {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.page-aside .aside-block:first-child {
  border-top: 1px solid var(--line);
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aside-links a {
  color: var(--teal);
  font-size: 14px;
  line-height: 1.6;
}

.aside-links a:hover,
.aside-links a:focus-visible {
  color: var(--accent);
}

.aside-subtitle {
  margin-bottom: 8px;
  color: var(--teal-deep);
  font-size: 15px;
  font-weight: 600;
}

.aside-cta p {
  margin-bottom: 10px;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.7;
}

.aside-cta .btn {
  width: 100%;
}

/* ==========================================================================
   404 页
   ========================================================================== */

.error-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 56px 24px;
}

.page-shell {
  max-width: 720px;
}

.error-head {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.error-code {
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.error-head h1 {
  margin: 6px 0 10px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
}

.error-lead {
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1.8;
}

.error-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.error-section h2 {
  margin-bottom: 12px;
  color: var(--teal-deep);
  font-size: 20px;
  font-weight: 600;
}

.error-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.error-list li {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
}

.error-path {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-soft);
  color: var(--teal);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 24px;
}

.error-links a {
  color: var(--teal);
  font-size: 15px;
  font-weight: 600;
}

/* ==========================================================================
   响应式 responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .page-layout,
  .page-updates .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    padding-top: 32px;
  }

  .content-aside,
  .page-aside,
  .side-column {
    position: static;
    top: auto;
  }

  .content-aside > nav,
  .page-aside .aside-block:first-child,
  .side-block:first-child {
    border-top: 1px solid var(--line);
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hero-text h1 {
    font-size: 32px;
  }

  .steps-block,
  .verify-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .page-channels .channel-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .channel-side {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
  }

  .topic-block {
    grid-template-columns: minmax(0, 1fr);
  }

  .topic-figure {
    order: 2;
    max-width: 420px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    padding: 14px 16px 0;
  }

  .brand-row {
    padding-bottom: 10px;
  }

  .brand {
    font-size: 19px;
  }

  .brand-slogan {
    font-size: 12px;
  }

  .site-nav {
    position: relative;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    gap: 0;
    padding-bottom: 8px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-item {
    width: 100%;
  }

  .nav-item > a {
    width: 100%;
    min-height: 48px;
    padding: 0 4px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }

  .nav-item.is-current > a {
    border-bottom-color: var(--line);
    border-left: 3px solid var(--accent);
    padding-left: 10px;
  }

  .page-layout,
  .page-updates .page-layout {
    padding: 24px 16px 40px;
    gap: 32px;
  }

  .page-title {
    font-size: 24px;
  }

  .inner-main {
    font-size: 16px;
    line-height: 1.8;
  }

  .hero {
    padding-bottom: 28px;
  }

  .hero-text h1 {
    font-size: 26px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .hero-figure {
    order: 2;
  }

  .hero-actions .btn {
    flex: 1 1 140px;
  }

  .section {
    padding: 28px 0;
  }

  .section > h2 {
    font-size: 20px;
  }

  .directory-row {
    flex-direction: column;
    gap: 8px;
  }

  .directory-main {
    flex-basis: auto;
    min-width: 0;
    padding-left: 10px;
  }

  .directory-row .row-link {
    align-self: flex-start;
  }

  .channel-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px 12px;
  }

  .channel-body {
    flex-basis: auto;
    min-width: 0;
  }

  .channel-row .row-link {
    grid-column: 2;
    justify-self: start;
    margin-left: 0;
  }

  .step-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .step-no {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .page-guide .step-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .step-index,
  .process-index {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .faq-item p {
    padding-left: 16px;
  }

  .template-block {
    grid-template-columns: minmax(0, 1fr);
  }

  .example-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .example-list dd {
    margin-bottom: 10px;
  }

  .ledger-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .offline-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .offline-link {
    grid-column: 1;
    grid-row: auto;
    margin-top: 4px;
  }

  .mapping-table,
  .cross-table,
  .checklist-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .checklist-table tbody th {
    white-space: normal;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 20px;
    padding: 32px 16px 28px;
  }

  .footer-about {
    grid-column: 1 / -1;
  }

  .footer-links a {
    font-size: 13px;
  }

  .error-main {
    padding: 36px 16px;
  }

  .error-head h1 {
    font-size: 24px;
  }

  .back-to-top {
    right: 14px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
