/* =========================================================
   海角社区app · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================= */

/* ---------- base ---------- */
:root {
  --bg: #F6F4EF;
  --surface: #FFFFFF;
  --ink: #1C2321;
  --muted: #5C6460;
  --line: #D8D3C9;
  --accent: #2F5D56;
  --accent-soft: #DDE7E3;
  --warm: #A66E4E;
  --warm-soft: #F3E9E2;
  --focus-overlay: rgba(17, 22, 21, 0.62);
  --radius: 6px;
  --shell: 1180px;
  --main-w: 760px;
  --side-w: 340px;
  --gap: 60px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.site-body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  font-variant-numeric: tabular-nums;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl,
dd,
dt,
figure,
figcaption {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- layout ---------- */

/* 页头骨架 */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.2;
}

.brand:hover {
  color: var(--accent);
}

.brand-mark {
  display: inline-block;
  padding: 2px 6px 3px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  letter-spacing: 0;
}

.brand-slogan {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 树状导航 */
.site-nav.tree {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.tree-list {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.tree-item {
  position: relative;
}

.tree-link {
  display: inline-block;
  padding: 11px 13px;
  font-size: 14.5px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  line-height: 1.5;
}

.tree-link:hover {
  color: var(--accent);
}

.tree-item.is-current > .tree-link,
.tree-link.is-current {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* 主容器 */
.site-main {
  display: block;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 34px 24px 64px;
}

.inner-main {
  padding-top: 26px;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--ink);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb-list li + li::before {
  content: "/";
  color: var(--line);
  margin-right: 8px;
}

/* 页面标题区 */
.page-header {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 40px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--ink);
}

/* 两栏布局 */
.page-layout,
.two-col {
  display: grid;
  grid-template-columns: minmax(0, var(--main-w)) minmax(0, var(--side-w));
  gap: var(--gap);
  align-items: start;
}

.page-layout.sidebar-left {
  grid-template-columns: minmax(0, var(--side-w)) minmax(0, var(--main-w));
}

.page-layout.sidebar-left .page-head,
.page-layout.sidebar-left .page-image {
  grid-column: 1 / -1;
}

.page-layout.sidebar-left .page-body {
  grid-column: 2;
  grid-row: 3;
}

.page-layout.sidebar-left .side-col {
  grid-column: 1;
  grid-row: 3;
}

.main-col,
.page-body {
  min-width: 0;
}

.side-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 内页标题区与头图 */
.page-head {
  margin-bottom: 22px;
}

.page-lead {
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 68ch;
}

.page-image {
  margin-bottom: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.page-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.page-image figcaption {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  line-height: 1.6;
}

/* 页脚 */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

.footer-top {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 36px 24px 22px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  display: inline-block;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

.footer-slogan {
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--accent);
}

.footer-intro {
  margin-top: 10px;
  max-width: 62ch;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.footer-cols {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 26px 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 32px;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.footer-col a {
  font-size: 14px;
  color: var(--muted);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-note,
.footer-copyright {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

.footer-note {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.footer-copyright {
  padding-top: 6px;
  padding-bottom: 28px;
}

/* ---------- components ---------- */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: #244A44;
  color: #FFFFFF;
}

.btn-ghost {
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

/* 通用区块标题 */
.section-title {
  font-size: 28px;
  line-height: 1.3;
  margin-bottom: 10px;
}

.section-intro,
.section-text {
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 18px;
  max-width: 66ch;
}

.side-title {
  font-size: 17px;
  line-height: 1.4;
  margin-bottom: 10px;
}

/* 锚点条 */
.anchor-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.anchor-bar a,
.anchor-list a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13.5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  min-height: 32px;
  line-height: 20px;
}

.anchor-bar a:hover,
.anchor-list a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.anchor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 侧栏通用块 */
.side-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.side-text {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
}

.side-action,
.side-link,
.side-link-strong,
.entry-link,
.correction-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 2px;
  min-height: 24px;
}

.side-action:hover,
.side-link:hover,
.side-link-strong:hover,
.entry-link:hover,
.correction-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* 纠错入口卡 */
.correction-entry {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
}

.correction-entry .side-title,
.correction-entry h2 {
  color: var(--accent);
}

.correction-entry p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink);
}

/* 首页步骤线 */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--accent-soft);
  margin-bottom: 14px;
}

.step-list .step-item {
  position: relative;
  padding: 0 0 20px 22px;
}

.step-list .step-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.step-list .step-item:last-child {
  padding-bottom: 4px;
}

.step-list .step-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.step-list .step-desc {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
}

.step-more,
.field-more,
.boundary-more {
  font-size: 14.5px;
}

/* 判断句列表 */
.boundary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.boundary-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.boundary-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--warm);
  background: var(--warm-soft);
  border-radius: 4px;
  text-align: center;
  line-height: 1.6;
}

.boundary-item p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink);
}

/* 表格 */
.field-table,
.data-table {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14.5px;
}

.field-table th,
.field-table td,
.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  line-height: 1.7;
}

.field-table thead th,
.data-table thead th {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

.field-table tbody tr:last-child td,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.field-table tbody th,
.data-table tbody th {
  width: 120px;
  color: var(--ink);
  font-weight: 600;
  background: #FBFAF7;
}

.data-table caption {
  padding: 12px 14px;
  text-align: left;
  font-size: 13.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: #FBFAF7;
}

/* 定义列表通用 */
.rule-list,
.limit-list,
.channel-list {
  border-top: 1px solid var(--line);
}

.rule-term,
.limit-list dt,
.channel-list dt {
  padding-top: 14px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
}

.rule-desc,
.limit-list dd,
.channel-list dd {
  padding: 4px 0 14px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.channel-list dt a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
}

.channel-list dt a:hover {
  color: var(--ink);
}

/* 文末返回路径（卡片说明页） */
.return-path {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.return-path h2 {
  font-size: 17px;
  margin-bottom: 10px;
}

.return-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.return-list a {
  font-size: 14.5px;
}

/* 相关内容条 */
.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.related-links-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.related-links-item {
  font-size: 14.5px;
}

/* 折叠记录 */
.record-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.record-summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  background: #FBFAF7;
  min-height: 48px;
}

.record-summary::-webkit-details-marker {
  display: none;
}

.record-summary::after {
  content: "展开";
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  border-radius: 4px;
  padding: 1px 8px;
}

.record-item[open] .record-summary::after {
  content: "收起";
}

.record-summary:hover {
  color: var(--accent);
}

.record-no {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--warm);
  background: var(--warm-soft);
  border-radius: 4px;
  padding: 1px 7px;
  line-height: 1.7;
}

.record-title {
  flex: 1;
  min-width: 0;
}

.record-meta {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 6px 14px;
  padding: 14px 16px 0;
  font-size: 14px;
}

.record-meta dt {
  color: var(--muted);
}

.record-meta dd {
  color: var(--ink);
}

.record-body {
  padding: 12px 16px 16px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}

/* 404 */
.error-main {
  padding-top: 40px;
}

.error-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 32px;
  max-width: 720px;
}

.error-code {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--warm);
  margin-bottom: 8px;
}

.error-title {
  font-size: 34px;
  line-height: 1.25;
  margin-bottom: 12px;
}

.error-text {
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 20px;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 22px;
}

.error-links a {
  font-size: 14.5px;
}

.error-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  background: var(--accent);
  color: #FFFFFF;
  border-radius: var(--radius);
  font-size: 15px;
}

.error-home:hover {
  background: #244A44;
  color: #FFFFFF;
}

/* ---------- pages ---------- */

/* 首页 */
.home-main {
  padding-top: 26px;
}

.hero-focus {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #1C2321;
  margin-bottom: 28px;
}

.hero-image {
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  min-height: 300px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--focus-overlay);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  color: #FFFFFF;
}

.hero-title {
  font-size: 48px;
  line-height: 1.15;
  color: #FFFFFF;
  max-width: 20ch;
  margin-bottom: 14px;
}

.hero-lead {
  font-size: 16.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.88);
  max-width: 52ch;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-caption {
  margin-top: 18px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.7);
}

.quick-entry {
  margin-bottom: 40px;
}

.quick-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.quick-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  border-top: 3px solid var(--accent);
}

.quick-link {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  min-height: 24px;
}

.quick-link:hover {
  color: var(--accent);
}

.quick-desc {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* 首页主栏区块间距 */
.main-col > section {
  margin-bottom: 44px;
}

.main-col > section:last-child {
  margin-bottom: 0;
}

/* 本期话题线索 */
.topic-threads .thread-featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.thread-featured .thread-media {
  overflow: hidden;
}

.thread-featured .thread-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.thread-featured .thread-media:hover img {
  transform: scale(1.02);
}

.thread-featured .thread-media figcaption {
  padding: 8px 16px;
  font-size: 12.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: #FBFAF7;
}

.thread-body {
  padding: 18px 20px 20px;
}

.thread-name {
  font-size: 20px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.thread-direction {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 8px;
}

.thread-reason {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 10px;
}

.thread-channels {
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
}

.thread-channels a {
  display: inline-block;
  padding: 2px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  line-height: 1.6;
  min-height: 26px;
}

.thread-channels a:hover {
  background: var(--accent);
  color: #FFFFFF;
}

.thread-compact {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.thread-compact:last-child {
  margin-bottom: 0;
}

.thread-compact .thread-name {
  font-size: 17px;
  margin-bottom: 6px;
}

/* 频道分轴 */
.axis-group {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.axis-group:last-child {
  margin-bottom: 0;
}

.axis-title {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--accent);
}

.axis-list {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 8px 16px;
  align-items: baseline;
}

.axis-list dt {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.axis-list dd {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.axis-list dd:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

/* 卡片字段预览表 */
.card-fields-preview .field-table {
  margin-bottom: 12px;
}

/* 首页侧栏 */
.picked-items,
.relation-notes,
.correction-entry {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.picked-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.picked-list li {
  border-bottom: 1px dashed var(--line);
  padding-bottom: 10px;
}

.picked-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.picked-list a {
  display: block;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--accent);
  min-height: 24px;
}

.picked-list a:hover {
  color: var(--ink);
}

.relation-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.relation-list li {
  padding-left: 12px;
  border-left: 2px solid var(--accent-soft);
}

.relation-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--warm);
  margin-bottom: 3px;
}

.relation-list p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

/* 频道索引页 */
.content-section {
  margin-bottom: 36px;
}

.content-section:last-child {
  margin-bottom: 0;
}

.content-section h2 {
  font-size: 24px;
  line-height: 1.35;
  margin-bottom: 10px;
}

.content-section > p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 16px;
  max-width: 66ch;
}

.side-ordered {
  counter-reset: side-order;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-ordered li {
  counter-increment: side-order;
  position: relative;
  padding-left: 30px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.side-ordered li::before {
  content: counter(side-order);
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 20px;
}

.side-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-links a {
  font-size: 14.5px;
}

.side-note {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 8px;
}

/* 话题线索页 */
.topic-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
}

.topic-item:last-child {
  margin-bottom: 0;
}

.topic-index {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--warm);
  margin-bottom: 6px;
}

.topic-name {
  font-size: 20px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.topic-direction {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 8px;
}

.topic-reason {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 12px;
}

.topic-meta {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 6px 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
}

.topic-meta dt {
  color: var(--muted);
}

.topic-meta dd {
  color: var(--ink);
  line-height: 1.7;
}

.side-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-list li {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  padding-left: 12px;
  border-left: 2px solid var(--accent-soft);
}

/* 卡片说明页 */
.content-wrap {
  display: block;
}

.field-table.data-table {
  margin-bottom: 12px;
}

.reason-writing,
.usage-limits {
  margin-top: 36px;
}

.reason-item {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.reason-item:last-child {
  margin-bottom: 0;
}

.reason-item h3 {
  font-size: 16.5px;
  margin-bottom: 6px;
}

.reason-item p {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}

.usage-limits .limit-list {
  margin-bottom: 12px;
}

.example-fields {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px 12px;
  margin-top: 12px;
  font-size: 14px;
}

.example-fields dt {
  color: var(--muted);
}

.example-fields dd {
  color: var(--ink);
  line-height: 1.7;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.example-fields dd:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.misread-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.misread-list li {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  padding-left: 12px;
  border-left: 2px solid var(--warm);
}

/* 浏览路径页 */
.step-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
}

.step-track .step-item {
  position: relative;
  padding: 0 0 26px 44px;
  border-left: 2px solid var(--accent-soft);
  margin-left: 14px;
}

.step-track .step-item:last-child {
  padding-bottom: 6px;
}

.step-track .step-index {
  position: absolute;
  left: -15px;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  line-height: 28px;
}

.step-track .step-title {
  font-size: 17px;
  line-height: 1.4;
  margin-bottom: 6px;
}

.step-track .step-desc {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 8px;
}

.step-track .step-link {
  font-size: 14px;
  font-weight: 500;
}

.mobile-controls {
  margin-top: 36px;
}

.mobile-controls > p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 16px;
}

.control-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
}

.control-item:last-child {
  margin-bottom: 0;
}

.control-title {
  font-size: 16px;
  margin-bottom: 6px;
}

.control-desc {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}

.back-path {
  margin-top: 36px;
}

.back-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.back-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.back-item a {
  font-size: 14.5px;
  font-weight: 500;
}

.back-note {
  font-size: 13.5px;
  color: var(--muted);
}

.checklist-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.checklist-item {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.checklist-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 3px;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.related-item a {
  font-size: 14.5px;
  font-weight: 500;
}

.related-note {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 2px;
}

/* 收录边界页 */
.scope-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: scope-order;
}

.scope-item {
  counter-increment: scope-order;
  position: relative;
  padding: 14px 16px 14px 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scope-item::before {
  content: counter(scope-order);
  position: absolute;
  left: 14px;
  top: 15px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  line-height: 22px;
}

.scope-name {
  font-size: 16px;
  margin-bottom: 5px;
}

.scope-text {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}

.exclude-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exclude-item {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warm);
  border-radius: var(--radius);
}

.exclude-name {
  font-size: 15.5px;
  margin-bottom: 4px;
}

.exclude-text {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}

.order-list {
  counter-reset: order-step;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.order-item {
  counter-increment: order-step;
  position: relative;
  padding-left: 30px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.order-item::before {
  content: counter(order-step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 20px;
}

.order-name {
  font-weight: 500;
  color: var(--ink);
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.link-item a {
  font-size: 14.5px;
  font-weight: 500;
}

.link-note {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
}

/* 更新与纠错页 */
.record-list {
  margin-bottom: 34px;
}

.correction-method {
  margin-bottom: 34px;
}

.section-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 12px;
  max-width: 66ch;
}

.correction-method .boundary-list {
  margin-top: 14px;
}

.same-records {
  margin-bottom: 28px;
}

.same-records-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.same-records-item a {
  font-size: 14.5px;
}

.return-path-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.return-path-item a {
  font-size: 14.5px;
  font-weight: 500;
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  :root {
    --gap: 36px;
    --main-w: 1fr;
    --side-w: 300px;
  }

  .hero-overlay {
    padding: 32px;
  }

  .hero-title {
    font-size: 40px;
  }
}

@media (max-width: 960px) {
  .header-inner {
    padding: 12px 20px;
    gap: 12px;
  }

  .brand-slogan {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav.tree {
    border-bottom: 1px solid var(--line);
  }

  .tree-list {
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 14px;
  }

  .tree-list.is-open {
    display: flex;
  }

  .tree-link {
    display: block;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
    min-height: 44px;
    font-size: 15px;
  }

  .tree-item.is-current > .tree-link,
  .tree-link.is-current {
    border-bottom-color: var(--line);
    padding-left: 12px;
    border-left: 3px solid var(--accent);
  }

  .site-main {
    padding: 24px 20px 52px;
  }

  .page-layout,
  .two-col,
  .page-layout.sidebar-left {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .page-layout.sidebar-left .page-head,
  .page-layout.sidebar-left .page-image,
  .page-layout.sidebar-left .page-body,
  .page-layout.sidebar-left .side-col {
    grid-column: 1;
    grid-row: auto;
  }

  .page-title {
    font-size: 34px;
  }

  .hero-title {
    font-size: 34px;
    max-width: 100%;
  }

  .hero-image {
    aspect-ratio: 16 / 10;
    min-height: 260px;
  }

  .hero-overlay {
    padding: 26px;
  }

  .quick-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 22px 20px;
  }

  .footer-top {
    padding: 28px 20px 18px;
  }

  .footer-note,
  .footer-copyright {
    padding-left: 20px;
    padding-right: 20px;
  }

  .section-title {
    font-size: 24px;
  }

  .content-section h2 {
    font-size: 21px;
  }
}

@media (max-width: 720px) {
  body.site-body {
    font-size: 15.5px;
  }

  .site-main {
    padding: 20px 16px 44px;
  }

  .header-inner {
    padding: 10px 16px;
  }

  .tree-list {
    padding: 8px 16px 12px;
  }

  .page-title {
    font-size: 30px;
  }

  .page-header {
    margin-bottom: 18px;
    padding-bottom: 16px;
  }

  .hero-focus {
    margin-bottom: 22px;
  }

  .hero-image {
    aspect-ratio: 4 / 3;
    min-height: 240px;
  }

  .hero-overlay {
    padding: 20px;
  }

  .hero-title {
    font-size: 30px;
    margin-bottom: 10px;
  }

  .hero-lead {
    font-size: 15px;
    margin-bottom: 16px;
  }

  .hero-caption {
    margin-top: 12px;
  }

  .quick-list {
    gap: 12px;
  }

  .quick-item {
    padding: 14px 15px;
  }

  .section-title {
    font-size: 22px;
  }

  .axis-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .axis-list dt {
    margin-top: 8px;
  }

  .axis-list dd {
    padding-bottom: 10px;
  }

  .boundary-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .boundary-tag {
    justify-self: start;
  }

  .field-table,
  .data-table {
    font-size: 13.5px;
  }

  .field-table th,
  .field-table td,
  .data-table th,
  .data-table td {
    padding: 10px 11px;
  }

  .field-table tbody th,
  .data-table tbody th {
    width: 88px;
  }

  .topic-item,
  .thread-body,
  .axis-group {
    padding: 16px;
  }

  .topic-meta,
  .record-meta,
  .example-fields {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .step-track .step-item {
    padding-left: 36px;
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding: 20px 16px;
  }

  .footer-top {
    padding: 24px 16px 16px;
  }

  .footer-note,
  .footer-copyright {
    padding-left: 16px;
    padding-right: 16px;
  }

  .error-panel {
    padding: 28px 20px;
  }

  .error-title {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .quick-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-title {
    font-size: 26px;
  }

  .page-title {
    font-size: 26px;
  }

  .section-title {
    font-size: 20px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .footer-cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .topic-meta,
  .record-meta,
  .example-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .topic-meta dt,
  .record-meta dt,
  .example-fields dt {
    margin-top: 6px;
    font-size: 13px;
  }

  .field-table tbody th,
  .data-table tbody th {
    width: 72px;
  }

  .thread-name,
  .topic-name {
    font-size: 18px;
  }
}
