@charset "utf-8";
/* XMCMS 官网前台样式：无框架、无图标字体，全部走系统字体与内联 SVG。 */

:root {
  --ink: #16181d;
  --ink-soft: #3d434e;
  --muted: #6b7280;
  --line: #e5e7ee;
  --line-strong: #cfd4e0;
  --bg: #ffffff;
  --alt: #f6f7fb;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-soft: #eef0ff;
  --navy: #171b2b;
  --ok: #15803d;
  --warn: #b45309;
  --err: #b91c1c;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(22, 24, 29, .05), 0 12px 28px -18px rgba(22, 24, 29, .28);
  --wrap: 1140px;
  --header-h: 64px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font: 16px/1.7 "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: break-word;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.35em; }
li { margin: .25em 0; }
img { max-width: 100%; height: auto; }
code, kbd, pre { font-family: "JetBrains Mono", Consolas, "SF Mono", Menlo, monospace; font-size: .9em; }
code { background: var(--alt); border: 1px solid var(--line); border-radius: 4px; padding: .1em .35em; }
pre { background: #14161f; color: #e8ecf5; border-radius: var(--radius-sm); padding: 16px; overflow: auto; }
pre code { background: none; border: 0; color: inherit; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
table { border-collapse: collapse; width: 100%; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 60; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 6px; transition: top .15s ease; }
.skip-link:focus { top: 12px; }

.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.14em; margin-right: .4em; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-soft);
  font-size: .95rem; font-weight: 600; line-height: 1.2; cursor: pointer;
  text-decoration: none; transition: background .15s ease, color .15s ease, border-color .15s ease, transform .08s ease;
}
.btn:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.btn-outline { border-color: rgba(255, 255, 255, .55); background: transparent; color: #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, .14); border-color: #fff; color: #fff; }
.btn-invert { background: #fff; border-color: #fff; color: var(--navy); }
.btn-invert:hover { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand-dark); }
.btn-lg { min-height: 48px; padding: 0 24px; font-size: 1.02rem; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: .85rem; }
.btn-block { display: flex; width: 100%; }
.btn-link { border: 0; background: none; color: var(--brand); padding: 0; min-height: 0; font-weight: 600; }
.btn-link:hover { background: none; text-decoration: underline; }
.btn-disabled, .btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- 页头 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.12rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 1rem; }
.brand-logo { height: 28px; width: auto; }
.brand-version { align-self: flex-start; margin-top: 2px; font-size: .72rem; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 2px 8px; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link { padding: 8px 12px; border-radius: 6px; color: var(--ink-soft); font-weight: 500; font-size: .96rem; }
.nav-link:hover { color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.nav-link.is-active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

.nav-search { display: flex; align-items: center; margin-left: 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; overflow: hidden; }
.nav-search input { width: 150px; border: 0; padding: 6px 4px 6px 14px; font: inherit; font-size: .9rem; background: none; }
.nav-search input:focus { outline: none; }
.search-btn { display: grid; place-items: center; width: 32px; height: 32px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.search-btn:hover { color: var(--brand); }
.search-btn .icon { margin: 0; }

.nav-toggle { display: none; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; cursor: pointer; }
.nav-toggle .bar { display: block; width: 16px; height: 2px; margin: 3px auto; background: var(--ink); border-radius: 2px; transition: transform .18s ease, opacity .18s ease; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(4) { transform: translateY(-5px) rotate(-45deg); }

.site-main { min-height: 60vh; }

/* ---------- 分区 ---------- */
.band { padding: 68px 0; }
.band--alt { background: var(--alt); }
.band--tight { padding: 40px 0; }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.band-title { margin: 0; font-size: 1.6rem; }
.band-head .band-title { text-align: left; }
.band-more { display: inline-flex; align-items: center; font-size: .92rem; font-weight: 600; white-space: nowrap; }
.band-more .icon { margin: 0 0 0 .25em; }
.band-stats { padding: 44px 0; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.three-col { display: grid; grid-template-columns: 220px minmax(0, 1fr) 220px; gap: 28px; align-items: start; }

/* ---------- Hero ---------- */
.hero { padding: 76px 0 64px; background: radial-gradient(1100px 460px at 78% -10%, var(--brand-soft) 0%, rgba(238, 240, 255, 0) 62%), #fff; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 16px; padding: 5px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line-strong); color: var(--brand); font-size: .84rem; font-weight: 600; box-shadow: var(--shadow); }
.hero-title { font-size: clamp(2rem, 4.4vw, 2.9rem); line-height: 1.18; margin-bottom: .4em; }
.hero-sub { font-size: 1.08rem; color: var(--muted); max-width: 34em; margin-bottom: 1.6em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: .92rem; }
.hero-meta li { display: inline-flex; align-items: center; margin: 0; }
.hero-meta .icon { color: var(--ok); margin-right: 6px; }
.hero-media img { border-radius: var(--radius); box-shadow: var(--shadow); display: block; }

.mock-window { border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--navy); }
.mock-bar span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.mock-bar span:nth-child(1) { background: #ff5f57; }
.mock-bar span:nth-child(2) { background: #febc2e; }
.mock-bar span:nth-child(3) { background: #28c840; }
.mock-bar em { margin-left: 10px; font-style: normal; font-size: .76rem; color: rgba(255, 255, 255, .65); font-family: Consolas, monospace; }
.mock-body { display: grid; grid-template-columns: 88px 1fr; min-height: 220px; }
.mock-side { background: var(--alt); border-right: 1px solid var(--line); padding: 14px 10px; }
.mock-side i { display: block; height: 8px; border-radius: 4px; background: var(--line-strong); margin-bottom: 12px; }
.mock-side i.is-on { background: var(--brand); }
.mock-main { padding: 16px 18px; }
.mock-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.mock-row b { font-weight: 600; color: var(--ink); }
.mock-row span { color: var(--muted); font-family: Consolas, monospace; font-size: .78rem; }
.mock-lines { margin-top: 16px; }
.mock-lines i { display: block; height: 8px; border-radius: 4px; background: var(--line); margin-bottom: 9px; }
.mock-lines i:nth-child(2) { width: 76%; }
.mock-lines i:nth-child(3) { width: 52%; }

/* ---------- 统计 ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 0; }
.stat { text-align: center; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat dt { order: 2; font-size: .9rem; color: var(--muted); }
.stat dd { order: 1; margin: 0 0 4px; font-size: 1.9rem; font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
.stat { display: flex; flex-direction: column-reverse; }

/* ---------- 卡片 ---------- */
.card-grid { display: grid; gap: 22px; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.feature-card, .doc-card, .theme-card {
  display: block; padding: 24px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.feature-card:hover, .doc-card:hover, .theme-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 18px 38px -22px rgba(22, 24, 29, .35); text-decoration: none; }
.feature-card h3, .doc-card h3, .theme-card h3 { margin-bottom: .35em; font-size: 1.06rem; color: var(--ink); }
.feature-card p, .doc-card p, .theme-card p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.65; }
.feature-icon, .doc-card-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); }
.feature-icon .icon, .doc-card-icon .icon { margin: 0; width: 22px; height: 22px; }
.doc-card { color: var(--ink); }

.feature-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: start; }
.feature-row:last-child { border-bottom: 0; }
.feature-row .feature-icon { margin: 0; width: 52px; height: 52px; }
.feature-summary { margin: 0; color: var(--muted); }

.theme-shot { position: relative; margin: -24px -24px 16px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--alt); aspect-ratio: 16 / 10; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.theme-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.theme-shot-empty { color: var(--line-strong); }
.theme-shot-empty .icon { margin: 0; width: 28px; height: 28px; }
.theme-card { padding: 0 0 20px; }
.theme-card .theme-shot + h3 { margin: 16px 20px 6px; }
.theme-card .theme-shot + h3 + p { margin: 0 20px; }
.theme-info { margin: 12px 20px 0; }
.theme-author { font-size: .84rem; color: var(--muted); margin: 0; }
.theme-actions { display: flex; gap: 8px; margin: 14px 20px 0; }

/* ---------- 页头条 ---------- */
.page-head { padding: 52px 0 30px; background: linear-gradient(180deg, var(--brand-soft) 0%, rgba(238, 240, 255, 0) 100%); border-bottom: 1px solid var(--line); }
.page-title { margin-bottom: .35em; font-size: 2rem; }
.page-lead { margin: 0; color: var(--muted); max-width: 60em; font-size: 1.02rem; }
.page-head--sub { padding: 34px 0 22px; }
.page-meta { margin: 14px 0 0; font-size: .88rem; color: var(--muted); }

/* ---------- 标签 / chip ---------- */
.tag, .chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--alt); color: var(--ink-soft); border: 1px solid var(--line); }
.tag-current { background: var(--brand); border-color: var(--brand); color: #fff; }
.tag-stable { background: #e9f8ef; border-color: #b9e4c9; color: #14663a; }
.tag-beta { background: #fff4e5; border-color: #f3d3a6; color: #8a4c07; }
.tag-legacy { background: #f1f2f6; border-color: #dde0e8; color: #5b6272; }
.chip-plain { background: #fff; }
a.chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

/* ---------- 版本 / 下载 ---------- */
.release-panel { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.release-panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.release-version { margin: 0; font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; }
.release-name { color: var(--muted); margin: 0 0 14px; }
.release-panel-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.release-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px dashed var(--line-strong); }
.release-facts div { min-width: 0; }
.release-facts dt { font-size: .8rem; color: var(--muted); }
.release-facts dd { margin: 2px 0 0; font-weight: 600; }
.release-hash, .upload-current, .doc-item-meta { font-family: Consolas, "SF Mono", monospace; font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }

.release-teaser { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
.teaser-version { margin: .2em 0 .1em; font-size: 1.5rem; font-weight: 800; color: var(--brand); font-family: Consolas, monospace; }
.teaser-title { color: var(--ink-soft); margin-bottom: 1em; }
.teaser-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0 0 18px; padding: 0; font-size: .88rem; color: var(--muted); }
.teaser-meta li { display: inline-flex; align-items: center; margin: 0; }
.teaser-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.teaser-changelog { padding: 22px 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); max-height: 340px; overflow: auto; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; margin: 0; padding: 4px 0 0 26px; border-left: 2px solid var(--line); }
.timeline-year { margin: 26px 0 18px; }
.timeline-year:first-child { margin-top: 0; }
.timeline-year h2 { position: relative; margin: 0 0 14px; font-size: 1.15rem; color: var(--brand); }
.timeline-item { position: relative; margin: 0 0 24px; }
.timeline-dot { position: absolute; left: -33px; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); border: 2px solid #fff; }
.timeline-item:hover .timeline-dot { background: var(--brand); }
.timeline-body { color: var(--ink-soft); font-size: .95rem; }
.timeline-body p:last-child { margin-bottom: 0; }
.timeline-body h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 4px; font-size: 1.06rem; }
.timeline-body h3 a { color: var(--ink); font-family: Consolas, monospace; }
.timeline-body h3 a:hover { color: var(--brand); text-decoration: none; }
.timeline-name { font-weight: 500; color: var(--muted); font-size: .92rem; }
.timeline-date { margin: 0; font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 文章 / 富文本 ---------- */
.article { min-width: 0; }
.article-head { margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.article-head h1 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
.article-lead { font-size: 1.06rem; color: var(--ink-soft); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; font-size: .86rem; color: var(--muted); }
.crumb { margin: 0 0 10px; font-size: .85rem; color: var(--muted); }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand); }
.crumb span { margin: 0 6px; color: var(--line-strong); }

.rich { font-size: 1rem; line-height: 1.85; color: var(--ink-soft); }
.rich > :last-child { margin-bottom: 0; }
.rich h2 { margin-top: 2em; padding-bottom: .3em; border-bottom: 1px solid var(--line); font-size: 1.4rem; color: var(--ink); scroll-margin-top: 84px; }
.rich h3 { margin-top: 1.7em; font-size: 1.14rem; color: var(--ink); scroll-margin-top: 84px; }
.rich h4 { margin-top: 1.5em; font-size: 1rem; color: var(--ink); }
.rich ul, .rich ol { padding-left: 1.5em; }
.rich li { line-height: 1.75; }
.rich img { border-radius: var(--radius-sm); border: 1px solid var(--line); }
.rich table { margin: 1.4em 0; font-size: .94rem; }
.rich th, .rich td { padding: 9px 12px; border: 1px solid var(--line); text-align: left; }
.rich th { background: var(--alt); font-weight: 600; }
.rich blockquote { margin: 1.4em 0; padding: 4px 18px; border-left: 3px solid var(--brand); background: var(--alt); color: var(--ink-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.rich blockquote p:last-child { margin-bottom: 0; }
.rich kbd { border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: #fff; }
.rich a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 文档 ---------- */
.doc-page { padding-top: 34px; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-group { margin-bottom: 34px; }
.doc-group-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.doc-group-head h2 { margin: 0; font-size: 1.2rem; }
.doc-group-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; list-style: none; margin: 0; padding: 0; }
.doc-group-list li { margin: 0; }
.doc-item { display: block; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid transparent; }
.doc-item:hover { background: var(--brand-soft); text-decoration: none; }
.doc-item strong { display: block; color: var(--ink); font-weight: 600; }
.doc-item-meta { display: block; margin-top: 2px; }

.side { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; }
.side-card { padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.side-card + .side-card { margin-top: 18px; }
.side-title { margin: 0 0 12px; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side-title a { color: var(--ink); }
.side-list { margin: 0; font-size: .9rem; }
.side-list div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.side-list div:last-child { border-bottom: 0; }
.side-list dt { color: var(--muted); }
.side-list dd { margin: 0; font-weight: 500; }
.side-list-link { list-style: none; margin: 0; padding: 0; font-size: .9rem; color: var(--muted); }
.side-list-link li { margin: 0 0 8px; }

.side-search { display: flex; gap: 8px; }
.side-search input { flex: 1; min-width: 0; }
.side-tree { max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; }
.side-tree-group { margin: 14px 0 4px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.side-tree-group:first-of-type { margin-top: 0; }
.side-tree ul { list-style: none; margin: 0; padding: 0; }
.side-tree li a { display: block; padding: 5px 8px; border-radius: 6px; font-size: .89rem; color: var(--ink-soft); }
.side-tree li a:hover { background: var(--alt); text-decoration: none; color: var(--brand); }
.side-tree li a.is-current { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.doc-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .92rem; }
.doc-nav span { max-width: 48%; }
.doc-nav-next { display: inline-flex; }
.doc-nav-next .icon { margin: 0 0 0 .3em; transform: rotate(180deg); }
.doc-nav a:first-child .icon { margin-right: .3em; }
.doc-foot { margin: 24px 0 0; padding: 14px 16px; background: var(--alt); border-radius: var(--radius-sm); font-size: .9rem; color: var(--muted); }

/* ---------- 本页目录 ---------- */
#doc-toc ul { list-style: none; margin: 0; padding: 0; max-height: calc(100vh - var(--header-h) - 140px); overflow: auto; }
#doc-toc li { margin: 0; }
#doc-toc a { display: block; padding: 4px 10px; border-left: 2px solid var(--line); font-size: .85rem; color: var(--muted); line-height: 1.5; }
#doc-toc a:hover { color: var(--brand); border-left-color: var(--brand); text-decoration: none; }
#doc-toc .toc-sub a { padding-left: 22px; font-size: .82rem; }

/* ---------- FAQ ---------- */
.faq-jump { padding: 14px 0; background: #fff; border-bottom: 1px solid var(--line); }
.faq-jump .wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.faq-group { margin-bottom: 38px; scroll-margin-top: calc(var(--header-h) + 16px); }
.faq-group-title { margin: 0 0 14px; font-size: 1.1rem; padding-left: 12px; border-left: 3px solid var(--brand); }
.faq-list { display: grid; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 18px; }
.faq-item summary { display: flex; align-items: center; gap: 8px; padding: 15px 0; cursor: pointer; font-weight: 600; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { border-bottom: 1px dashed var(--line); }
.faq-answer { padding: 14px 0 18px; color: var(--ink-soft); font-size: .95rem; }
.faq-answer > :last-child { margin-bottom: 0; }
.faq-foot { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }

/* ---------- 表格 ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.data-table { margin: 0; font-size: .93rem; }
.data-table th, .data-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table thead th { background: var(--alt); font-weight: 600; font-size: .86rem; color: var(--muted); white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfbfe; }

/* ---------- 表单 ---------- */
.form { max-width: 720px; }
.field { display: block; margin-bottom: 18px; }
.field-label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 600; }
.field-label em { color: var(--err); font-style: normal; font-size: .82rem; margin-left: 4px; }
.field-hint { display: block; margin-top: 6px; font-size: .82rem; color: var(--muted); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], input[type="number"], input[type="datetime-local"], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; font: inherit; font-size: .95rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 6 8.5 10 4.5' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; padding-right: 32px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .14); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 24px; }
.form-note { font-size: .85rem; color: var(--muted); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.search-form { display: flex; gap: 10px; margin-bottom: 26px; }
.search-form input { flex: 1; }
.search-form--inline { margin: 0 0 22px; }
.result-title { margin: 0 0 18px; font-size: 1rem; color: var(--muted); font-weight: 500; }

.notice { padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--alt); font-size: .93rem; }
.notice-warn { background: #fff8ed; border-color: #f2d3a5; color: #7a4b06; }

.flash { margin: 0 0 14px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: .93rem; border: 1px solid transparent; }
.flash-success { background: #ecfdf3; border-color: #b7e6c9; color: #14663a; }
.flash-error { background: #fef2f2; border-color: #f5c2c2; color: #981b1b; }
.flash-warn { background: #fff8ed; border-color: #f2d3a5; color: #7a4b06; }
.flash-info { background: var(--brand-soft); border-color: #cfd3ff; color: var(--brand-dark); }

.empty { padding: 46px 20px; text-align: center; color: var(--muted); background: var(--alt); border-radius: var(--radius); font-size: .95rem; }
.no-result { margin: 0 0 24px; padding: 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); font-size: .93rem; }

/* ---------- 分页 ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 34px 0 0; padding: 0; }
.pager a, .pager span { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: .9rem; color: var(--ink-soft); background: #fff; font-style: normal; }
.pager a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pager .is-current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager .page-gap { border: 0; background: none; color: var(--muted); min-width: 20px; }

/* ---------- CTA ---------- */
.cta-band { padding: 60px 0; background: linear-gradient(120deg, #1b1f33 0%, var(--brand-dark) 100%); color: #fff; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-inner h2 { margin: 0 0 6px; color: #fff; font-size: 1.55rem; }
.cta-inner p { margin: 0; color: rgba(255, 255, 255, .74); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 页脚 ---------- */
.site-footer { padding: 56px 0 26px; background: #12151f; color: rgba(255, 255, 255, .62); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 34px; padding-bottom: 34px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer-brand { margin-bottom: 10px; font-size: 1.12rem; font-weight: 700; color: #fff; }
.footer-about p { margin: 0 0 10px; max-width: 34em; }
.footer-note { color: rgba(255, 255, 255, .45); font-size: .86rem; }
.footer-title { margin: 0 0 12px; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.footer-links ul, .footer-contact p { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin: 0 0 9px; }
.footer-links a, .footer-contact a, .footer-mail { color: rgba(255, 255, 255, .68); }
.footer-links a:hover, .footer-contact a:hover { color: #fff; text-decoration: none; }
.footer-contact p { margin: 0 0 9px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; padding-top: 22px; font-size: .84rem; color: rgba(255, 255, 255, .45); }
.footer-bottom a { color: rgba(255, 255, 255, .55); }
.footer-bottom a:hover { color: #fff; }

/* ---------- 错误页 ---------- */
.error-band { padding: 96px 0; text-align: center; }
.error-code { margin: 0; font-size: 5rem; font-weight: 800; line-height: 1; color: var(--brand); letter-spacing: -.04em; }
.error-title { margin: 18px 0 10px; font-size: 1.5rem; }
.error-hint { margin: 0 0 26px; color: var(--muted); }
.error-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .three-col { grid-template-columns: 200px minmax(0, 1fr); }
  .three-col .side:last-child { display: none; }
  .hero-inner, .release-teaser { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; display: none; flex-direction: column; align-items: stretch;
    gap: 2px; margin: 0; padding: 12px 24px 18px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .nav-link { padding: 11px 10px; border-radius: 8px; }
  .nav-search { margin: 10px 0 0; }
  .nav-search input { width: 100%; }
  .band { padding: 46px 0; }
  .hero { padding: 48px 0 42px; }
  .doc-group-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .wrap { padding: 0 18px; }
  h1 { font-size: 1.72rem; }
  .page-title { font-size: 1.6rem; }
  .cols-3, .cols-4, .field-row, .stats-grid { grid-template-columns: minmax(0, 1fr); }
  .three-col { grid-template-columns: minmax(0, 1fr); }
  .three-col .side-left { position: static; max-height: none; }
  .side { position: static; }
  .band-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .mock-body { grid-template-columns: 62px 1fr; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .error-code { font-size: 3.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .site-header, .site-footer, .cta-band, .side, .doc-foot, .nav-search, .pager { display: none !important; }
  .band { padding: 12px 0; }
  .three-col { grid-template-columns: minmax(0, 1fr); }
}
