/* ==========================================================================
   17吃瓜 · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. base
   -------------------------------------------------------------------------- */

:root {
  --bg-page: #f2f4f3;
  --ink: #17201d;
  --ink-soft: #3d4a45;
  --ink-mute: #61706a;
  --panel: #ffffff;
  --read: #1f6f5c;
  --boundary: #b5462f;
  --update: #d9a441;
  --line: #d8dfdc;
  --line-strong: #c2ccc8;
  --radius: 6px;
  --radius-sm: 4px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, "Courier New", monospace;
  --shell: 1180px;
  --pad: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--read);
  text-decoration: none;
}

a:hover {
  color: #16523f;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

p {
  margin: 0;
}

ul,
ol,
dl {
  margin: 0;
  padding: 0;
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
}

figure {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--read);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   2. layout —— 全站骨架
   -------------------------------------------------------------------------- */

.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad);
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
  padding: 12px 0;
  min-height: 44px;
}

.brand:hover {
  color: var(--read);
}

.site-nav.primary-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.nav-item a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  border-bottom: 2px solid transparent;
}

.nav-item a:hover {
  color: var(--ink);
  background: #eef2f0;
}

.nav-item.is-current a,
.nav-item a.is-current {
  color: var(--read);
  font-weight: 600;
  border-bottom-color: var(--read);
  background: #eaf1ee;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

.subnav-bar {
  background: #e9eeec;
  border-bottom: 1px solid var(--line);
}

.subnav-list {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.subnav-list li a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 14px;
  color: var(--ink-mute);
  border-bottom: 2px solid transparent;
}

.subnav-list li a:hover {
  color: var(--read);
  border-bottom-color: var(--read);
}

.site-main {
  display: block;
}

.inner-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad) 56px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 0 6px;
  font-size: 13px;
  color: var(--ink-mute);
}

.breadcrumb a {
  color: var(--ink-mute);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb a:hover {
  color: var(--read);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink);
}

.page-header {
  padding: 6px 0 18px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
  margin-top: 28px;
}

.layout-shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad) 56px;
}

.sidebar,
.content-aside,
.layout-side,
.page-side {
  min-width: 0;
}

.site-main.home-main {
  min-width: 0;
}

.site-footer {
  background: #1b2521;
  color: #cdd6d2;
  margin-top: 24px;
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 40px var(--pad) 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}

.footer-col {
  min-width: 0;
}

.footer-brand {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.8;
  color: #a8b4af;
}

.footer-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.footer-nav ul li,
.footer-help ul li {
  margin-bottom: 2px;
}

.footer-nav ul li a,
.footer-help ul li a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 14px;
  color: #a8b4af;
}

.footer-nav ul li a:hover,
.footer-help ul li a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 16px var(--pad) 28px;
  border-top: 1px solid #2c3833;
  font-size: 13px;
  color: #8a968f;
}

/* --------------------------------------------------------------------------
   3. components —— 通用组件
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--read);
  color: #fff;
  border-color: var(--read);
}

.btn-primary:hover {
  background: #17594a;
  color: #fff;
}

.btn-ghost {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: #eef2f0;
  color: var(--ink);
  border-color: var(--ink-mute);
}

.inline-link {
  color: var(--read);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.inline-link:hover {
  color: #16523f;
}

.section-head {
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.section-note {
  font-size: 14px;
  color: var(--ink-mute);
}

.section-note a {
  color: var(--read);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-head {
  margin-top: 18px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.page-lead {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.page-status {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-mute);
  font-family: var(--font-mono);
}

/* 表格 */
.data-table {
  font-size: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table caption {
  text-align: left;
  padding: 0;
}

.data-table thead th {
  background: #e9eeec;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 13px;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: top;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #f5f8f6;
}

.cell-code,
.cell-num,
.cell-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
}

.cell-name {
  font-weight: 600;
  color: var(--ink);
}

.table-wrap,
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-caption {
  font-size: 13px;
  color: var(--ink-mute);
  text-align: left;
  padding: 0 0 6px;
}

.table-footnote {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-mute);
}

/* 状态标签 */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  font-size: 12px;
  font-family: var(--font-mono);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.6;
}

.tag-read {
  color: var(--read);
  background: #e5f0eb;
  border-color: #bcd8cd;
}

.tag-review,
.tag-revise {
  color: var(--boundary);
  background: #f7e9e5;
  border-color: #e6c4ba;
}

.tag-boundary {
  color: var(--boundary);
  background: #fff;
  border-color: #d9a99c;
}

.tag-update,
.tag-new {
  color: #8a6414;
  background: #fbf1da;
  border-color: #ecd7a5;
}

.tag-pending {
  color: var(--ink-mute);
  background: #eef1f0;
  border-color: var(--line-strong);
}

.tag-status {
  color: var(--ink-soft);
  background: #eef1f0;
  border-color: var(--line-strong);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 8px;
}

.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
}

.faq-item summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 26px 10px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--ink-mute);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item summary:hover {
  color: var(--read);
}

.faq-item p {
  padding: 0 0 14px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* 图片容器 */
.hero-figure,
.topic-figure,
.catalog-figure,
.topic-media,
.notes-media,
.entry-media,
.media-figure {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-figure img,
.topic-figure img,
.catalog-figure img,
.topic-media img,
.notes-media img,
.entry-media img,
.media-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-figure figcaption,
.topic-figure figcaption,
.catalog-figure figcaption,
.topic-media figcaption,
.notes-media figcaption,
.entry-media figcaption,
.media-figure figcaption {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--ink-mute);
  border-top: 1px solid var(--line);
  background: #f7f9f8;
  line-height: 1.6;
}

/* 侧栏卡片 */
.sidebar-card,
.aside-card,
.side-card,
.side-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.sidebar-title,
.aside-title,
.side-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.toc-list li,
.aside-list li,
.side-list li,
.rule-list li,
.side-entry-list li {
  border-bottom: 1px dashed var(--line);
}

.toc-list li:last-child,
.aside-list li:last-child,
.side-list li:last-child,
.rule-list li:last-child,
.side-entry-list li:last-child {
  border-bottom: 0;
}

.toc-list li a,
.aside-list li a,
.side-list li a,
.rule-list li a,
.side-entry-list li a {
  display: flex;
  align-items: center;
  min-height: 38px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.toc-list li a:hover,
.aside-list li a:hover,
.side-list li a:hover,
.rule-list li a:hover,
.side-entry-list li a:hover {
  color: var(--read);
}

/* 定义列表图例 */
.legend-list {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
}

.legend-list dt {
  margin: 0;
}

.legend-list dd {
  margin: 0;
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   4. pages
   -------------------------------------------------------------------------- */

/* ---------- 首页 ---------- */

.scope-bar {
  max-width: var(--shell);
  margin: 14px auto 0;
  padding: 10px 16px;
  background: #fbf1da;
  border: 1px solid #ecd7a5;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #6b4f11;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  width: calc(100% - var(--pad) * 2);
}

.scope-bar-label {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #8a6414;
  flex: 0 0 auto;
}

.scope-bar-link {
  color: #8a6414;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: auto;
}

.scope-bar-link:hover {
  color: #5c430e;
}

.home-main {
  min-width: 0;
}

.hero-console {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 26px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-text {
  min-width: 0;
}

.hero-text h1 {
  font-size: 30px;
  line-height: 1.32;
  margin-bottom: 14px;
}

.hero-lead {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-figure {
  min-width: 0;
}

.hero-figure img {
  aspect-ratio: 4 / 3;
}

.status-summary,
.topic-preview,
.note-preview,
.path-steps,
.update-preview,
.rules-preview,
.faq-block {
  margin-top: 34px;
}

.status-summary .data-table {
  font-size: 14px;
}

.topic-figure {
  margin-bottom: 16px;
}

.topic-figure img {
  aspect-ratio: 16 / 7;
}

.numbered-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.numbered-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 96px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.numbered-row:last-child {
  border-bottom: 0;
}

.numbered-row:hover {
  background: #f5f8f6;
}

.row-no {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--read);
  font-weight: 600;
}

.row-body {
  min-width: 0;
}

.row-body h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.row-body p {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.7;
}

.row-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--read);
  border: 1px solid #bcd8cd;
  border-radius: var(--radius-sm);
  background: #eef6f2;
  white-space: nowrap;
}

.row-link:hover {
  background: var(--read);
  color: #fff;
  border-color: var(--read);
}

.note-entries {
  display: grid;
  gap: 14px;
}

.note-preview .note-entry {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--read);
  border-radius: var(--radius);
}

.note-no {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--read);
  font-weight: 600;
  padding-top: 2px;
}

.note-body {
  min-width: 0;
}

.note-body h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.note-body p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  margin-bottom: 8px;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.step-block {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}

.step-block .step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--read);
  background: #e5f0eb;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.step-block h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.step-block p {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.75;
}

.path-more,
.update-more,
.rules-more {
  margin-top: 14px;
  font-size: 14px;
}

.update-rows {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.update-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.update-row:last-child {
  border-bottom: 0;
}

.update-row:hover {
  background: #f5f8f6;
}

.update-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #8a6414;
  background: #fbf1da;
  border: 1px solid #ecd7a5;
  border-radius: var(--radius-sm);
  padding: 1px 8px;
  justify-self: start;
  white-space: nowrap;
}

.update-target {
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

.update-change {
  font-size: 13px;
  color: var(--ink-mute);
  min-width: 0;
  overflow-wrap: anywhere;
}

.rules-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rules-col {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}

.rules-col h3 {
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--ink);
}

.rules-col p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.boundary-list li {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  padding-left: 16px;
  position: relative;
  margin-bottom: 6px;
}

.boundary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--boundary);
  border-radius: 1px;
}

.boundary-list li:last-child {
  margin-bottom: 0;
}

.feedback-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
  font-size: 14px;
}

.feedback-card p {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.8;
}

/* ---------- 内页通用：双栏 ---------- */

.content-main,
.layout-main,
.page-main {
  min-width: 0;
}

.content-main > section,
.layout-main > section,
.page-main > section {
  margin-bottom: 34px;
}

.content-main > section:last-child,
.layout-main > section:last-child,
.page-main > section:last-child {
  margin-bottom: 0;
}

.content-main h2,
.layout-main h2,
.page-main h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.section-intro,
.module-desc {
  font-size: 14px;
  color: var(--ink-mute);
  line-height: 1.8;
  margin-bottom: 14px;
}

/* 条目总表 */
.catalog-figure {
  margin-bottom: 16px;
}

.catalog-figure img {
  aspect-ratio: 16 / 6;
}

.catalog-table {
  font-size: 14px;
  min-width: 720px;
}

.genre-list {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.genre-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.genre-row:last-child {
  border-bottom: 0;
}

.genre-row dt {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

.genre-row dd {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.legend-table {
  font-size: 14px;
}

.entry-list {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.entry-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.entry-row:last-child {
  border-bottom: 0;
}

.entry-row:hover {
  background: #f5f8f6;
}

.entry-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--read);
  font-weight: 600;
}

.entry-text {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.75;
  min-width: 0;
}

.entry-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--read);
  border: 1px solid #bcd8cd;
  border-radius: var(--radius-sm);
  background: #eef6f2;
  white-space: nowrap;
}

.entry-link:hover {
  background: var(--read);
  color: #fff;
  border-color: var(--read);
}

.aside-text {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.aside-update-list li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.aside-update-list li:last-child {
  border-bottom: 0;
}

.aside-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8a6414;
}

.aside-more {
  margin-top: 10px;
  font-size: 13px;
}

/* 专题拆读 */
.page-hero {
  margin-top: 18px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.page-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

.page-hero-main {
  min-width: 0;
}

.page-hero-status {
  min-width: 0;
  border-left: 2px solid var(--update);
  padding-left: 14px;
}

.status-note {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.75;
}

.container {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.page-topics .page-layout {
  margin-top: 28px;
}

.module {
  margin-bottom: 34px;
}

.module:last-child {
  margin-bottom: 0;
}

.module h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.topic-index .data-table {
  font-size: 14px;
}

.topic-items {
  display: grid;
  gap: 16px;
}

.topic-entry {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  align-items: start;
}

.topic-entry:not(:has(.topic-media)) {
  grid-template-columns: minmax(0, 1fr);
}

.topic-media {
  min-width: 0;
}

.topic-media img {
  aspect-ratio: 4 / 3;
}

.topic-body {
  min-width: 0;
}

.topic-code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--read);
  font-weight: 600;
  margin-bottom: 4px;
}

.topic-body h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.topic-body > p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  margin-bottom: 10px;
}

.topic-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  margin-bottom: 10px;
  font-size: 13px;
}

.topic-meta dt {
  font-weight: 600;
  color: var(--ink);
}

.topic-meta dd {
  margin: 0;
  color: var(--ink-mute);
}

.topic-links,
.note-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
}

.topic-links a,
.note-links a {
  color: var(--read);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.method-steps {
  display: grid;
  gap: 12px;
}

.method-step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  align-items: start;
}

.method-step .step-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--read);
  padding-top: 2px;
}

.method-step > p:last-child {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  min-width: 0;
}

.note-links {
  display: grid;
  gap: 10px;
}

.note-links li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
}

.note-links li a {
  font-weight: 600;
}

.note-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--read);
  background: #e5f0eb;
  border: 1px solid #bcd8cd;
  border-radius: var(--radius-sm);
  padding: 1px 8px;
}

.note-desc {
  color: var(--ink-mute);
  font-size: 13px;
  flex: 1 1 200px;
  min-width: 0;
}

.side-links {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
}

.side-updates li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.side-updates li:last-child {
  border-bottom: 0;
}

.side-updates .update-date {
  display: inline-block;
  margin-right: 6px;
}

.side-more {
  margin-top: 10px;
  font-size: 13px;
}

/* 章回笔记 */
.notes-list h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.notes-media {
  margin-bottom: 16px;
}

.notes-media img {
  aspect-ratio: 16 / 6;
}

.notes-list .note-entry {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--read);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.notes-list .note-entry:last-child {
  margin-bottom: 0;
}

.note-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.note-code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--read);
  font-weight: 600;
}

.note-title {
  font-size: 17px;
}

.note-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  margin-bottom: 12px;
}

.note-field {
  min-width: 0;
}

.note-field dt {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--ink-mute);
  margin-bottom: 2px;
}

.note-field dd {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.note-schema .data-table {
  font-size: 14px;
}

.revision-list {
  display: grid;
  gap: 10px;
}

.revision-item {
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--boundary);
  border-radius: var(--radius);
}

.revision-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--boundary);
  margin-bottom: 4px;
}

.revision-text {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.revision-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  margin-left: 6px;
}

.section-foot {
  margin-top: 14px;
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.related-list {
  display: grid;
  gap: 10px;
}

.related-item {
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--read);
  margin-bottom: 2px;
}

.related-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.related-desc {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.75;
}

.anchor-list li {
  border-bottom: 1px dashed var(--line);
}

.anchor-list li:last-child {
  border-bottom: 0;
}

.anchor-list li a {
  display: flex;
  align-items: center;
  min-height: 38px;
  font-size: 14px;
  color: var(--ink-soft);
}

.anchor-list li a:hover {
  color: var(--read);
}

.side-note p {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.8;
}

/* 选读路径 */
.page-head-main {
  min-width: 0;
}

.page-head-note {
  min-width: 0;
}

.page-paths .page-layout {
  margin-top: 28px;
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

.page-head .page-head-main {
  grid-column: 1;
}

.page-head .page-head-note {
  grid-column: 2;
  border-left: 2px solid var(--update);
  padding-left: 14px;
}

.page-head .page-status {
  grid-column: 1 / -1;
}

.note-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8a6414;
  margin-bottom: 4px;
}

.note-text {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.75;
}

.stage-list {
  display: grid;
  gap: 12px;
}

.stage-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  align-items: start;
}

.stage-num {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--read);
  background: #e5f0eb;
  border-radius: var(--radius-sm);
  text-align: center;
  padding: 4px 0;
}

.stage-body {
  min-width: 0;
}

.stage-name {
  font-size: 16px;
  margin-bottom: 6px;
}

.stage-goal,
.stage-output {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  margin-bottom: 4px;
}

.stage-output {
  color: var(--ink-mute);
  font-size: 13px;
}

.path-detail .data-table {
  font-size: 14px;
  min-width: 620px;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.check-item {
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}

.check-name {
  font-size: 15px;
  margin-bottom: 4px;
}

.check-pass {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.75;
}

.limit-list {
  display: grid;
  gap: 10px;
}

.limit-item {
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--boundary);
  border-radius: var(--radius);
}

.limit-name {
  font-size: 15px;
  margin-bottom: 4px;
}

.limit-item p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.mini-table {
  font-size: 13px;
}

.mini-table thead th {
  background: #e9eeec;
  color: var(--ink-soft);
  font-weight: 600;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  white-space: nowrap;
}

.mini-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: top;
}

.mini-table tbody tr:last-child td {
  border-bottom: 0;
}

.side-block {
  margin-bottom: 16px;
}

.side-block:last-child {
  margin-bottom: 0;
}

.side-block .table-wrap {
  margin: 0 -18px -18px;
  border-top: 1px solid var(--line);
}

.side-block .mini-table thead th:first-child,
.side-block .mini-table tbody td:first-child {
  padding-left: 18px;
}

.side-block .mini-table thead th:last-child,
.side-block .mini-table tbody td:last-child {
  padding-right: 18px;
}

.side-figure .media-figure {
  margin: 0 -18px -18px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.side-figure .media-figure img {
  aspect-ratio: 4 / 3;
}

.side-link-list {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.side-link-list li a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--read);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 32px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
}

.related-links-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
}

.related-links-item {
  color: var(--read);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 更新记录 */
.page-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-mute);
  font-family: var(--font-mono);
}

.update-batch {
  margin-bottom: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.update-batch:last-child {
  margin-bottom: 0;
}

.batch-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  padding: 12px 16px;
  background: #f7f9f8;
  border-bottom: 1px solid var(--line);
}

.batch-head h3 {
  font-size: 16px;
  font-family: var(--font-mono);
  color: var(--ink);
}

.batch-meta {
  font-size: 13px;
  color: var(--ink-mute);
}

.batch-table {
  font-size: 14px;
}

.batch-table thead th {
  background: #eef2f0;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 12px;
  text-align: left;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.batch-table tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: top;
}

.batch-table tbody tr:last-child td {
  border-bottom: 0;
}

.batch-table tbody tr:hover {
  background: #f5f8f6;
}

.update-fields .fields-table {
  font-size: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.fields-table thead th {
  background: #e9eeec;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 13px;
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.fields-table tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: top;
}

.fields-table tbody tr:last-child td {
  border-bottom: 0;
}

.correction-list {
  display: grid;
  gap: 10px;
}

.correction-item {
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--boundary);
  border-radius: var(--radius);
}

.correction-target {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.correction-reason {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.75;
}

.update-entry .entry-media {
  margin-bottom: 14px;
}

.update-entry .entry-media img {
  aspect-ratio: 16 / 6;
}

.entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 14px;
}

.entry-links li a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--read);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.side-updates .rule-list li,
.rule-list li {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.75;
  padding: 8px 0;
}

/* 编目规则 */
.section-block {
  margin-bottom: 34px;
}

.section-block:last-child {
  margin-bottom: 0;
}

.section-block > p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  margin-bottom: 12px;
}

.section-block .data-table {
  font-size: 14px;
}

.section-block .section-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-mute);
}

.section-figure {
  margin: 0 0 16px;
}

.section-figure img {
  aspect-ratio: 16 / 6;
}

.step-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.step-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 6px 14px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  align-items: start;
}

.step-index {
  grid-row: span 2;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--boundary);
  background: #f7e9e5;
  border-radius: var(--radius-sm);
  text-align: center;
  padding: 2px 0;
}

.step-item h3 {
  font-size: 15px;
  margin-bottom: 2px;
}

.step-item p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  min-width: 0;
}

#correction {
  scroll-margin-top: 80px;
}

.side-card .mini-table {
  margin: 0 -18px -18px;
  width: calc(100% + 36px);
  border-top: 1px solid var(--line);
}

.side-card .mini-table thead th:first-child,
.side-card .mini-table tbody td:first-child {
  padding-left: 18px;
}

.side-card .mini-table thead th:last-child,
.side-card .mini-table tbody td:last-child {
  padding-right: 18px;
}

/* ---------- 404 ---------- */
.error-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 48px var(--pad) 64px;
}

.error-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  max-width: 720px;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 600;
  color: var(--boundary);
  line-height: 1.1;
  margin-bottom: 8px;
}

.error-title {
  font-size: 26px;
  margin-bottom: 10px;
}

.error-lead {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.error-next {
  margin-top: 32px;
  max-width: 720px;
}

.error-next-title {
  font-size: 18px;
  margin-bottom: 12px;
}

.error-next-list {
  display: grid;
  gap: 8px;
}

.error-next-list li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--ink-soft);
}

.error-next-list li a:hover {
  color: var(--read);
  border-color: #bcd8cd;
  background: #eef6f2;
}

/* --------------------------------------------------------------------------
   5. responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .page-layout {
    grid-template-columns: minmax(0, 1fr) 288px;
    gap: 26px;
  }

  .hero-console {
    gap: 22px;
  }

  .hero-text h1 {
    font-size: 27px;
  }

  .step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0;
    padding-top: 8px;
    padding-bottom: 8px;
    position: relative;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav.primary-nav {
    flex: 1 1 100%;
    order: 3;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 6px 0 8px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-item a {
    min-height: 44px;
    padding: 0 8px;
    border-bottom: 0;
    border-radius: var(--radius-sm);
  }

  .nav-item.is-current a,
  .nav-item a.is-current {
    border-bottom: 0;
  }

  .subnav-list {
    gap: 16px;
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .sidebar,
  .content-aside,
  .layout-side,
  .page-side {
    order: 2;
  }

  .hero-console {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-figure img {
    aspect-ratio: 16 / 9;
  }

  .page-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .page-hero-status {
    border-left: 0;
    border-top: 2px solid var(--update);
    padding-left: 0;
    padding-top: 10px;
  }

  .page-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .page-head .page-head-note {
    grid-column: 1;
    border-left: 0;
    border-top: 2px solid var(--update);
    padding-left: 0;
    padding-top: 10px;
  }

  .page-head .page-status {
    grid-column: 1;
  }

  .topic-entry {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --pad: 16px;
  }

  body {
    font-size: 15px;
  }

  .brand {
    font-size: 18px;
  }

  .subnav-list {
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .subnav-list li {
    flex: 0 0 auto;
  }

  .subnav-list li a {
    min-height: 44px;
    font-size: 13px;
    white-space: nowrap;
  }

  .scope-bar {
    width: calc(100% - var(--pad) * 2);
    font-size: 12px;
  }

  .scope-bar-link {
    margin-left: 0;
  }

  .page-title {
    font-size: 28px;
  }

  .content-main h2,
  .layout-main h2,
  .page-main h2,
  .module h2,
  .section-head h2,
  .notes-list h2 {
    font-size: 20px;
  }

  .hero-console {
    padding: 20px 16px;
  }

  .hero-text h1 {
    font-size: 24px;
  }

  .hero-lead {
    font-size: 14px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .numbered-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px 12px;
    padding: 12px;
  }

  .numbered-row .row-link {
    grid-column: 2;
    justify-self: start;
  }

  .note-preview .note-entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 14px;
  }

  .step-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .update-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 12px;
  }

  .update-date {
    justify-self: start;
  }

  .rules-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .genre-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 12px;
  }

  .entry-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 12px;
  }

  .entry-link {
    justify-self: start;
  }

  .note-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .topic-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .check-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .stage-item {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }

  .method-step {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 12px;
  }

  .step-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 12px;
  }

  .step-index {
    grid-row: auto;
    justify-self: start;
    padding: 1px 10px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 32px var(--pad) 20px;
  }

  .footer-about {
    grid-column: 1;
  }

  .error-main {
    padding: 32px var(--pad) 48px;
  }

  .error-panel {
    padding: 24px 18px;
  }

  .error-code {
    font-size: 36px;
  }

  .error-title {
    font-size: 22px;
  }

  .error-actions .btn {
    flex: 1 1 auto;
  }

  .section-block {
    margin-bottom: 28px;
  }

  .content-main > section,
  .layout-main > section,
  .page-main > section {
    margin-bottom: 28px;
  }

  .status-summary,
  .topic-preview,
  .note-preview,
  .path-steps,
  .update-preview,
  .rules-preview,
  .faq-block {
    margin-top: 28px;
  }

  .related-links {
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .skip-link,
  .btn,
  .row-link,
  .entry-link {
    transition: none;
  }
}

/* 程序验收反馈：修复网格孤项 */
@media (min-width: 769px) {
  .step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
