/* 东大医保知识库 · 设计系统
 * 主题 A（默认）：临床蓝白，偏官方、可信
 * 主题 B：校园纸感，青绿 + 衬线标题，偏亲和
 * 通过 <html data-theme="b"> 切换，CSS 变量驱动
 */

:root {
  --bg: #f3f6fb;
  --bg-soft: #e9eef7;
  --paper: #ffffff;
  --ink: #0e1a2b;
  --ink-soft: #26364d;
  --muted: #5b6b82;
  --line: #e2e8f0;
  --line-strong: #cfd8e5;
  --brand: #0b4f9e;
  --brand-2: #1a6fd4;
  --brand-ink: #ffffff;
  --brand-wash: #eaf1fb;
  --accent: #0f9f8f;
  --warm: #b45309;
  --warm-wash: #fdf4e7;
  --danger: #b91c1c;
  --radius: 18px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 30px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 2px 6px rgba(15, 23, 42, 0.06), 0 24px 60px rgba(15, 23, 42, 0.12);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: var(--font-body);
  --header-h: 66px;
  --maxw: 1180px;
}

html[data-theme="b"] {
  --bg: #f7f2e8;
  --bg-soft: #f0e8d8;
  --paper: #fffdf8;
  --ink: #201a13;
  --ink-soft: #3a3126;
  --muted: #6f6250;
  --line: #e6dbc9;
  --line-strong: #d8c9b0;
  --brand: #0f6b5c;
  --brand-2: #12897a;
  --brand-wash: #e6f1ee;
  --accent: #b45309;
  --warm: #9a4a06;
  --warm-wash: #fbf0dc;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 0 rgba(80, 60, 30, 0.06);
  --shadow: 0 1px 0 rgba(80, 60, 30, 0.06), 0 10px 24px rgba(80, 60, 30, 0.08);
  --shadow-lg: 0 18px 44px rgba(80, 60, 30, 0.14);
  --font-display: "Noto Serif SC", "Songti SC", STSong, "SimSun", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 18px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }

.container { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--brand); color: var(--brand-ink); padding: 10px 16px; border-radius: 8px;
}
.skip:focus { left: 8px; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 26px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 14px rgba(11,79,158,.28);
  flex: none;
}
html[data-theme="b"] .brand-mark { border-radius: 6px; }
.brand-text { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.brand-text strong { font-size: 18px; letter-spacing: .5px; font-family: var(--font-display); }
.brand-text small { font-size: 12px; color: var(--muted); letter-spacing: 2px; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.nav-group { position: relative; }
.nav-group-title {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: none; cursor: pointer;
  padding: 9px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
}
.nav-group-title:hover { background: var(--brand-wash); color: var(--brand); }
.nav-group-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 210px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 8px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: .16s ease;
}
.nav-group:hover .nav-group-menu, .nav-group:focus-within .nav-group-menu {
  opacity: 1; visibility: visible; transform: none;
}
.nav-group-menu a {
  display: block; padding: 9px 12px; border-radius: 9px;
  font-size: 14px; color: var(--ink-soft);
}
.nav-group-menu a:hover, .nav-group-menu a.active { background: var(--brand-wash); color: var(--brand); text-decoration: none; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-mini {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: var(--bg-soft); border: 1px solid transparent;
  padding: 9px 14px; border-radius: var(--radius-pill); width: 270px;
  color: var(--muted); transition: .18s ease;
}
.search-mini:focus-within { background: var(--paper); border-color: var(--brand-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent); }
.search-mini input { border: 0; background: none; outline: none; width: 100%; font-size: 13.5px; color: var(--ink); }
.search-results {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0; z-index: 60;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 6px; max-height: 380px; overflow: auto;
}
.search-results a { display: block; padding: 10px 12px; border-radius: 9px; }
.search-results a:hover { background: var(--brand-wash); text-decoration: none; }
.search-results .sr-title { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.search-results .sr-sum { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.search-results .sr-empty { padding: 14px; font-size: 13px; color: var(--muted); }

.nav-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); cursor: pointer; }
.nav-toggle span { display: block; width: 16px; height: 2px; background: var(--ink); margin: 3px auto; border-radius: 2px; }

/* ---------- 首页 hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 44px; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto; height: 130%;
  background:
    radial-gradient(60% 55% at 78% 18%, color-mix(in srgb, var(--brand-2) 18%, transparent), transparent 70%),
    radial-gradient(45% 40% at 12% 8%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
  pointer-events: none;
}
html[data-theme="b"] .hero::before {
  background:
    radial-gradient(55% 50% at 80% 15%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(40% 35% at 8% 10%, color-mix(in srgb, var(--brand-2) 12%, transparent), transparent 70%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr); gap: 56px; align-items: center; }
.eyebrow { margin: 0 0 14px; font-size: 13px; letter-spacing: 3px; color: var(--brand); font-weight: 600; text-transform: uppercase; }
.hero h1 {
  margin: 0; font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 54px); line-height: 1.22; letter-spacing: .5px;
  font-weight: 750;
}
.hero-sub { margin: 18px 0 26px; font-size: 16.5px; color: var(--muted); max-width: 34em; }
.hero-search { position: relative; max-width: 560px; }
.hero-search-form {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 7px 7px 7px 20px; box-shadow: var(--shadow);
}
.hero-search-form svg { color: var(--muted); flex: none; }
.hero-search-form input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 15px; padding: 10px 0; }
.hero-search-form button {
  flex: none; border: 0; cursor: pointer; font-size: 13.5px; font-weight: 600;
  color: var(--brand-ink); background: var(--brand); border-radius: var(--radius-pill);
  padding: 10px 20px; transition: .16s;
}
.hero-search-form button:hover { background: var(--brand-2); }
.hero-search .search-results { left: 0; right: 0; }

/* 搜索结果页 */
.search-page { padding: 48px 0 90px; max-width: 840px; }
.search-head h1 { margin: 0 0 18px; font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); }
.search-page-form {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 7px 7px 7px 20px; box-shadow: var(--shadow-sm);
}
.search-page-form svg { color: var(--muted); flex: none; }
.search-page-form input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 15px; padding: 10px 0; }
.search-page-form button {
  flex: none; border: 0; cursor: pointer; font-size: 14px; font-weight: 600;
  color: var(--brand-ink); background: var(--brand); border-radius: var(--radius-pill); padding: 10px 22px;
}
.search-page-form button:hover { background: var(--brand-2); }
#search-page-results { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.sr-item {
  display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; color: var(--ink); transition: .16s;
}
.sr-item:hover { border-color: var(--brand-2); text-decoration: none; box-shadow: var(--shadow-sm); }
.sr-item h3 { margin: 0 0 6px; font-size: 16.5px; }
.sr-item p { margin: 0; font-size: 13.5px; color: var(--muted); }
.sr-item .sr-url { margin-top: 8px; font-size: 12px; color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.chip {
  font-size: 13.5px; color: var(--ink-soft); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 7px 14px;
}
.chip:hover { border-color: var(--brand-2); color: var(--brand); text-decoration: none; }

.hero-side {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.stat {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; box-shadow: var(--shadow-sm);
}
.stat strong { display: block; font-family: var(--font-display); font-size: 30px; line-height: 1.1; color: var(--brand); letter-spacing: .5px; }
.stat strong small { font-size: 15px; margin-left: 2px; }
.stat span { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }

.quickbar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-top: 6px;
}
.quick-item { background: var(--paper); padding: 16px 20px; display: flex; flex-direction: column; gap: 3px; }
.quick-k { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.quick-item strong { font-size: 15px; color: var(--ink); }

/* ---------- 分组卡片 ---------- */
.page-groups { padding: 44px 0 8px; }
.group { margin-bottom: 42px; }
.group-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.group-head h2 { margin: 0; font-family: var(--font-display); font-size: 22px; letter-spacing: .5px; }
.group-head span { font-size: 12.5px; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand-2) 45%, var(--line)); text-decoration: none; }
.card h3 { margin: 0; font-size: 17px; font-family: var(--font-display); }
.card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.65; flex: 1; }
.card-more { font-size: 13px; color: var(--brand); font-weight: 600; }

.home-note { padding: 8px 0 64px; }
.note-card {
  background: linear-gradient(180deg, var(--warm-wash), var(--paper));
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 26px 28px;
}
.note-card h2 { margin: 0 0 8px; font-size: 17px; }
.note-card p { margin: 6px 0; font-size: 14px; color: var(--ink-soft); }

/* ---------- 文档页 ---------- */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; padding: 38px 0 72px; align-items: start; }
.doc { min-width: 0; }
.breadcrumb { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span:last-child { color: var(--ink-soft); }
.doc-head h1 { margin: 0 0 12px; font-family: var(--font-display); font-size: clamp(28px, 3.6vw, 40px); line-height: 1.28; letter-spacing: .3px; }
.lede { margin: 0 0 16px; font-size: 16.5px; color: var(--muted); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 12.5px; color: var(--muted); padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.doc-meta a { color: var(--brand); }

.prose { font-size: 16px; line-height: 1.85; color: var(--ink-soft); }
.prose h2 {
  margin: 44px 0 14px; font-family: var(--font-display); font-size: 23px; line-height: 1.35;
  color: var(--ink); padding-left: 14px; border-left: 4px solid var(--brand-2);
}
.prose h3 { margin: 28px 0 10px; font-size: 17.5px; color: var(--ink); }
.prose p { margin: 12px 0; }
.prose ul, .prose ol { margin: 12px 0; padding-left: 1.35em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--brand-2); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { border-bottom: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.prose blockquote {
  margin: 18px 0; padding: 14px 18px; border-radius: var(--radius-sm);
  background: var(--warm-wash); border-left: 3px solid var(--accent);
  color: var(--ink-soft); font-size: 14.5px;
}
.prose blockquote p { margin: 0; }
.prose hr { border: 0; border-top: 1px dashed var(--line-strong); margin: 32px 0; }

.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 420px; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--bg-soft); font-weight: 650; color: var(--ink); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover { background: color-mix(in srgb, var(--brand-wash) 55%, transparent); }
.prose code { background: var(--bg-soft); border-radius: 5px; padding: 1px 6px; font-size: 13.5px; }

.doc-foot { margin-top: 46px; border-top: 1px solid var(--line); padding-top: 18px; }
.doc-source { font-size: 12.5px; color: var(--muted); }
.doc-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 16px; font-size: 14px; }
.doc-nav a {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px;
  background: var(--paper); max-width: 46%;
}
.doc-nav a:hover { border-color: var(--brand-2); text-decoration: none; }

/* 侧栏 */
.doc-aside { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 16px; }
.toc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.toc h2, .aside-card h2 { margin: 0 0 10px; font-size: 13px; letter-spacing: 2px; color: var(--muted); font-weight: 600; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 2px 0; }
.toc a { display: block; padding: 4px 8px; border-radius: 6px; font-size: 13.5px; color: var(--ink-soft); border-left: 2px solid transparent; }
.toc a:hover { background: var(--brand-wash); color: var(--brand); text-decoration: none; }
.toc a.active { color: var(--brand); border-left-color: var(--brand); background: var(--brand-wash); font-weight: 600; }
.toc-l3 a { padding-left: 22px; font-size: 13px; color: var(--muted); }

.aside-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.aside-card p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.aside-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 13px; }
.aside-card dt { color: var(--muted); }
.aside-card dd { margin: 0; color: var(--ink-soft); word-break: break-all; }

/* ---------- 留言 ---------- */
.comments { margin-top: 56px; padding-top: 8px; }
.comments-head { display: flex; align-items: baseline; gap: 12px; }
.comments-head h2 { margin: 0; font-family: var(--font-display); font-size: 22px; }
.comments-count { font-size: 12.5px; color: var(--muted); }
.comments-hint { font-size: 13px; color: var(--muted); margin: 6px 0 20px; }
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.loading, .empty { font-size: 13.5px; color: var(--muted); padding: 18px; background: var(--paper); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); text-align: center; }
.comment-item { display: flex; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--brand-wash), var(--bg-soft)); color: var(--brand);
  font-weight: 700; font-size: 15px; border: 1px solid var(--line);
}
.comment-body { min-width: 0; flex: 1; }
.comment-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.comment-meta strong { font-size: 13.5px; color: var(--ink); }
.comment-text { margin: 6px 0 4px; font-size: 14.5px; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; }
.comment-actions { display: flex; gap: 4px; }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 12.5px; cursor: pointer; padding: 2px 6px; border-radius: 5px; }
.link-btn:hover { background: var(--bg-soft); color: var(--brand); }
.reply-list { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.reply-item { font-size: 13.5px; color: var(--ink-soft); }
.reply-item .comment-meta { margin-bottom: 2px; }
.reply-form { margin-top: 10px; display: flex; gap: 8px; }
.reply-form input { flex: 1; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; background: var(--paper); outline: none; }
.reply-form input:focus { border-color: var(--brand-2); }
.reply-form button { flex: none; }

.comment-form {
  margin-top: 20px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-sm);
}
.form-row { display: flex; align-items: center; gap: 10px; }
.form-row input { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; width: 220px; background: var(--bg); outline: none; font-size: 14px; }
.form-row input:focus, .comment-form textarea:focus { border-color: var(--brand-2); background: var(--paper); }
.form-note { font-size: 12.5px; color: var(--muted); }
.comment-form textarea {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; resize: vertical; background: var(--bg); outline: none; font-size: 14.5px; line-height: 1.7;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-actions { display: flex; align-items: center; gap: 14px; }
.form-status { font-size: 13px; color: var(--muted); }
.form-status.ok { color: var(--accent); }
.form-status.err { color: var(--danger); }

.btn {
  display: inline-block; border: 1px solid transparent; cursor: pointer;
  background: var(--brand); color: var(--brand-ink);
  padding: 10px 22px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 600;
  transition: .16s ease;
}
.btn:hover { background: var(--brand-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--brand-wash); color: var(--brand); }

/* ---------- 留言板 ---------- */
.board-layout { padding: 46px 0 72px; max-width: 860px; }
.board-head h1 { margin: 0 0 8px; font-family: var(--font-display); font-size: 34px; }
.board-head p { margin: 0; color: var(--muted); font-size: 15px; }
.board-actions { display: flex; gap: 10px; margin: 20px 0 24px; }

/* ---------- 页脚 ---------- */
.site-footer { background: #0d1b2e; color: #c7d2e2; margin-top: 30px; }
html[data-theme="b"] .site-footer { background: #2a2118; color: #d8cbb8; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding: 48px 0 32px; }
.footer-logo { font-family: var(--font-display); font-size: 18px; color: #fff; letter-spacing: 1px; margin-bottom: 10px; }
.footer-brand p { margin: 6px 0; font-size: 13px; line-height: 1.7; color: #9fb0c7; }
html[data-theme="b"] .footer-brand p { color: #b5a58e; }
.footer-note { font-size: 12px !important; opacity: .8; }
.footer-col h3 { margin: 4px 0 12px; font-size: 13px; letter-spacing: 2px; color: #fff; font-weight: 600; }
.footer-col a, .footer-col p { display: block; margin: 7px 0; font-size: 13px; color: #9fb0c7; }
html[data-theme="b"] .footer-col a, html[data-theme="b"] .footer-col p { color: #b5a58e; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 0 26px; border-top: 1px solid rgba(255,255,255,.1);
  font-size: 12px; color: #7e90a8;
}
.footer-bottom-right { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-theme {
  background: transparent; border: 1px solid rgba(255,255,255,.22); color: #c7d2e2;
  border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; transition: .16s;
}
.footer-theme:hover { border-color: rgba(255,255,255,.5); color: #fff; }

/* ---------- v2：事实库与原文 ---------- */
.nav-link { padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.nav-link:hover, .nav-link.active { background: var(--brand-wash); color: var(--brand); text-decoration: none; }

.hero-compact { padding: 56px 0 30px; }
.hero-compact .hero-inner { grid-template-columns: 1fr; }
.hero-compact h1 { font-size: clamp(30px, 4vw, 46px); }

.source-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.source-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); color: var(--ink); }
.source-row:last-child { border-bottom: 0; }
.source-row:hover { background: var(--brand-wash); text-decoration: none; }
.source-title { font-size: 15px; font-weight: 600; }
.source-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

.fact-list { display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
.fact { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.fact-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.fact-id { font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-wash); border-radius: 6px; padding: 1px 8px; letter-spacing: .5px; }
.kw { font-size: 11.5px; color: var(--muted); background: var(--bg-soft); border-radius: 99px; padding: 1px 8px; }
.fact-statement { margin: 0 0 10px; font-size: 15.5px; line-height: 1.75; color: var(--ink); }
.fact-src { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.src-chip { font-size: 12px; color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); border-radius: 99px; padding: 2px 10px; background: var(--paper); }
.src-chip:hover { background: var(--brand-wash); text-decoration: none; }
.fact-quote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--line-strong); background: var(--bg-soft); border-radius: 0 8px 8px 0; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.toc .toc-id { display: inline-block; font-size: 11px; color: var(--muted); margin-right: 6px; }

/* 口径标记 */
.badge { font-size: 11px; border-radius: 99px; padding: 1px 8px; font-weight: 600; line-height: 1.7; }
.badge-unofficial { background: #fff4e5; color: var(--warm); border: 1px dashed #e8b56a; }
.badge-warn { background: #fef2f2; color: var(--danger); border: 1px solid #f3c0c0; }
.badge-conflict { background: #fffbeb; color: #92400e; border: 1px solid #f0d18a; }
.src-chip.unofficial { border-style: dashed; color: var(--warm); }
.source-note { margin: 0 0 14px; font-size: 13px; color: var(--warm); background: var(--warm-wash); border-radius: var(--radius-sm); padding: 8px 12px; }

.conflict-box {
  margin: 26px 0 8px; border: 1px solid #f0d18a; background: #fffbeb;
  border-radius: var(--radius); padding: 18px 20px;
}
html[data-theme="b"] .conflict-box { background: #fbf3df; }
.conflict-box h2 { margin: 0 0 10px; font-size: 15px; color: #92400e; }
.conflict-item { padding: 10px 0; border-top: 1px dashed #ecd9a8; }
.conflict-item:first-of-type { border-top: 0; }
.conflict-item strong { font-size: 14px; color: #7c2d12; }
.conflict-item p { margin: 4px 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }
.conflict-facts { font-size: 12.5px !important; color: var(--muted) !important; }

.notfound { padding: 100px 0; text-align: center; }
.notfound h1 { font-size: 72px; margin: 0; color: var(--brand); font-family: var(--font-display); }
.notfound p { color: var(--muted); }
.notfound h1 { font-size: 72px; margin: 0; color: var(--brand); font-family: var(--font-display); }
.notfound p { color: var(--muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; }
  .hero-side { max-width: 520px; }
  .doc-layout { grid-template-columns: 1fr; gap: 28px; }
  .doc-aside { position: static; order: 2; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .search-mini { width: 210px; }
  .site-nav { display: none; }
  .site-nav.open {
    display: flex; flex-direction: column; position: absolute; top: var(--header-h);
    left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 12px 20px 18px; gap: 6px; align-items: stretch; box-shadow: var(--shadow);
  }
  .site-nav.open .nav-group-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; padding: 0 0 0 10px; min-width: 0;
  }
  .nav-toggle { display: inline-block; }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .container { width: min(100% - 28px, var(--maxw)); }
  .brand-text small { display: none; }
  .search-mini { width: 40px; padding: 9px; }
  .search-mini input { display: none; }
  .search-mini:focus-within { position: absolute; left: 14px; right: 14px; width: auto; top: 10px; background: var(--paper); }
  .search-mini:focus-within input { display: block; }
  .hero { padding: 44px 0 28px; }
  .hero h1 { font-size: 32px; }
  .hero-search-form { padding-left: 16px; }
  .hero-search-form button { padding: 10px 16px; }
  .hero-side { grid-template-columns: 1fr 1fr; }
  .stat strong { font-size: 24px; }
  .quickbar { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; }
  .doc-meta { flex-direction: column; gap: 4px; }
  .comment-form .form-row input { width: 100%; }
  .form-row { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
