/* Wiki 看板 — 浅色简约主题。分类配色沿用框架 graph-colorize 约定。 */
:root {
  --bg: #f6f8fa;
  --card: #ffffff;
  --border: #e4e7eb;
  --text: #24292f;
  --text-2: #57606a;
  --text-3: #8b949e;
  --accent: #4e79a7;
  --accent-soft: rgba(78, 121, 167, 0.12);
  --concepts: #4e79a7;
  --entities: #f28e2b;
  --skills: #e15759;
  --references: #76b7b2;
  --synthesis: #59a14f;
  --projects: #edc948;
  --journal: #b07aa1;
  --shadow: 0 1px 3px rgba(27, 31, 35, 0.06), 0 4px 14px rgba(27, 31, 35, 0.05);
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-dot {
  width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0;
  background: conic-gradient(var(--concepts) 0 25%, var(--synthesis) 0 50%, var(--entities) 0 75%, var(--journal) 0);
}
.brand-text h1 { font-size: 16px; margin: 0; line-height: 1.25; }
.brand-sub { font-size: 11.5px; color: var(--text-3); }

.searchbox { position: relative; flex: 1 1 260px; max-width: 460px; }
.searchbox .icon-search { position: absolute; left: 10px; top: 9px; color: var(--text-3); }
#search-input {
  width: 100%; padding: 7px 12px 7px 32px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); font-size: 13px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
#search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: #fff; }
.search-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); overflow: hidden; display: none; z-index: 60;
}
.search-dropdown.open { display: block; }
.search-item { display: block; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f0f2f4; color: inherit; text-decoration: none; }
.search-item:last-child { border-bottom: none; }
.search-item:hover, .search-item.hover { background: var(--accent-soft); }
.search-item .si-title { font-weight: 600; }
.search-item .si-sub { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { padding: 10px 12px; color: var(--text-3); font-size: 12.5px; }

.tabs { display: flex; gap: 4px; flex-shrink: 0; }
.tabs button {
  border: none; background: none; cursor: pointer;
  padding: 7px 14px; border-radius: 8px;
  font-size: 13.5px; color: var(--text-2); font-family: inherit;
  transition: background .12s, color .12s;
}
.tabs button:hover { background: var(--accent-soft); color: var(--accent); }
.tabs button.active { background: var(--accent); color: #fff; font-weight: 600; }

/* ---------- 布局 ---------- */
main { padding: 18px 22px 30px; max-width: 1280px; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; animation: fadein .18s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px;
}
.card h2 { font-size: 14.5px; margin: 0 0 12px; }
.card h2 .hint { font-size: 12px; font-weight: 400; color: var(--text-3); }
.card.slim { padding: 13px 14px; }
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 900px) { .grid-2col { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 总览 ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 18px;
}
.stat-card .num { font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat-card .lbl { font-size: 12.5px; color: var(--text-2); }
.stat-card .sub { font-size: 11.5px; color: var(--text-3); }

.cat-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin-bottom: 12px; }
.cat-bar span { transition: width .3s; }
.cat-legend { list-style: none; margin: 0; padding: 0; }
.cat-legend li {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; margin: 0 -8px; border-radius: 6px; cursor: pointer; font-size: 13px;
}
.cat-legend li:hover { background: var(--accent-soft); }
.cat-legend .dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.cat-legend .cnt { margin-left: auto; color: var(--text-3); font-size: 12px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-2); transition: all .12s;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tag-chip .tc { font-size: 11px; color: var(--text-3); }

.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; margin: 0 -8px; border-radius: 6px; cursor: pointer;
}
.recent-list li:hover { background: var(--accent-soft); }
.recent-list .date { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.recent-list .rtitle { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 11.5px; font-weight: 500; line-height: 1.5; white-space: nowrap;
}
.badge.cat { color: #fff; }
.badge.lifecycle-draft { background: #f0f2f4; color: var(--text-2); }
.badge.lifecycle-reviewed { background: rgba(78,121,167,.14); color: #33567a; }
.badge.lifecycle-verified { background: rgba(89,161,79,.14); color: #3c6e33; }
.badge.lifecycle-disputed { background: rgba(225,87,89,.14); color: #a33a3c; }
.badge.lifecycle-archived { background: rgba(156,117,95,.14); color: #7a5744; }
.badge.tier { background: var(--bg); border: 1px solid var(--border); color: var(--text-2); }

/* ---------- 图谱（左筛选面板 + 右画布 双栏布局） ---------- */
.graph-cols {
  position: relative;
  display: grid; grid-template-columns: 272px 1fr; gap: 14px;
  height: calc(100vh - 150px); min-height: 480px;
}
.graph-cols.panel-closed { grid-template-columns: 1fr; }
@media (max-width: 900px) {
  .graph-cols { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; }
  .gpanel { max-height: 320px; }
  .graph-main { height: 60vh; }
}
.graph-main { height: 100%; padding: 6px; }
.gpanel {
  display: flex; flex-direction: column; overflow: hidden;
  padding: 0; font-size: 12.5px;
}
.gpanel-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.gp-collapse { border: none; background: none; cursor: pointer; color: var(--text-3); width: 18px; font-family: inherit; transition: transform .15s; }
.gp-collapse.closed { transform: rotate(-90deg); }
.gp-title { font-weight: 600; flex: 1; }
.gp-icon { border: none; background: none; cursor: pointer; color: var(--text-2); width: 22px; height: 22px; border-radius: 6px; }
.gp-icon:hover { background: var(--accent-soft); color: var(--accent); }
.gpanel-body { flex: 1; min-height: 0; padding: 10px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.gp-search .input { background: var(--bg); }
.gp-row { display: flex; align-items: center; gap: 8px; }
.gp-row label { font-size: 12px; color: var(--text-2); flex-shrink: 0; width: 52px; }
.gp-row input[type=range] { flex: 1; accent-color: var(--accent); min-width: 0; }
.gp-val { width: 30px; text-align: right; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.gp-hint { font-size: 11px; color: var(--text-3); margin-top: 6px; }
.gp-toggles { display: flex; flex-direction: column; gap: 7px; }
.gp-toggle { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.gp-toggle > span:first-child { font-size: 12.5px; color: var(--text-2); }
.switch { position: relative; width: 30px; height: 17px; flex-shrink: 0; }
.switch input { display: none; }
.switch i { position: absolute; inset: 0; background: #ccd3d9; border-radius: 10px; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; background: #fff; border-radius: 50%; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { left: 15px; }
.gp-sec summary { cursor: pointer; list-style: none; user-select: none; font-size: 12px; color: var(--text-2); font-weight: 600; padding: 2px 0; }
.gp-sec summary::-webkit-details-marker { display: none; }
.gp-sec summary::before { content: "▸"; display: inline-block; width: 12px; color: var(--text-3); transition: transform .15s; }
.gp-sec[open] summary::before { transform: rotate(90deg); }
.gp-sec .chip-list { margin-top: 8px; }
.gp-stats { font-size: 11.5px; color: var(--text-3); border-top: 1px dashed var(--border); padding-top: 8px; }
.gpanel-reopen {
  position: absolute; top: 12px; right: 12px; z-index: 20;
  border: 1px solid var(--border); background: var(--card); color: var(--text-2);
  border-radius: 8px; padding: 6px 12px; cursor: pointer;
  font-size: 12.5px; font-family: inherit; box-shadow: var(--shadow);
}
.gpanel-reopen:hover { color: var(--accent); border-color: var(--accent); }
.filter-block { margin-bottom: 12px; }
.filter-title { font-size: 12px; color: var(--text-2); font-weight: 600; margin-bottom: 6px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg); font-size: 12px; color: var(--text-2);
}
.cat-chip .dot { width: 8px; height: 8px; border-radius: 2px; }
.cat-chip.off { opacity: .38; text-decoration: line-through; }
.select, .input {
  width: 100%; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--bg); font-size: 12.5px; font-family: inherit; outline: none;
}
.select:focus, .input:focus { border-color: var(--accent); background: #fff; }
.btn {
  width: 100%; padding: 7px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--bg); cursor: pointer; font-size: 12.5px; font-family: inherit; color: var(--text-2);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.graph-stats { font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.legend-title { font-size: 11.5px; font-weight: 600; color: var(--text-3); margin: 10px 0 5px; }
.edge-legend { display: flex; flex-wrap: wrap; gap: 5px 12px; }
.lg-item { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-2); }
.lg-line { display: inline-block; width: 18px; height: 0; border-top: 2.5px solid #999; }
.lg-line.solid { border-top-style: solid; }
.lg-line.dashed { border-top-style: dashed; }
.lg-line.dotted { border-top-style: dotted; }

/* ---------- 结构树 ---------- */
.tree-cat { margin-bottom: 6px; }
.tree-cat > summary, .tree-tag > summary {
  cursor: pointer; list-style: none; user-select: none;
  border-radius: 7px; padding: 6px 10px; transition: background .12s;
}
.tree-cat > summary:hover, .tree-tag > summary:hover { background: var(--accent-soft); }
.tree-cat > summary::-webkit-details-marker, .tree-tag > summary::-webkit-details-marker { display: none; }
.tree-cat > summary::before, .tree-tag > summary::before {
  content: "▸"; display: inline-block; width: 14px; color: var(--text-3); transition: transform .15s;
}
.tree-cat[open] > summary::before, .tree-tag[open] > summary::before { transform: rotate(90deg); }
.tree-cat > summary { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tree-cat .cnt { font-size: 12px; color: var(--text-3); font-weight: 400; }
.tree-children { margin-left: 20px; border-left: 1.5px solid var(--border); padding-left: 6px; }
.tree-tag > summary { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.tree-pages { margin-left: 26px; }
.tree-page {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px; margin: 1px 0 1px -8px; border-radius: 6px; cursor: pointer; font-size: 13.5px;
}
.tree-page:hover { background: var(--accent-soft); }
.tree-page .deg { margin-left: auto; font-size: 11px; color: var(--text-3); flex-shrink: 0; }

/* ---------- 条目总表 ---------- */
.table-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.table-toolbar h2 { margin: 0; flex: 1; }
.table-toolbar .select { width: auto; }
.table-toolbar .input { width: 240px; }
.tag-filter-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding-bottom: 12px; margin-bottom: 4px;
  border-bottom: 1px dashed var(--border);
}
.tag-filter-row .tf-label { font-size: 12px; font-weight: 600; color: var(--text-3); margin-right: 2px; }
.tag-filter-row .tag-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tag-filter-row .tag-chip.on .tc { color: rgba(255, 255, 255, 0.8); }
.table-wrap { overflow-x: auto; }
.entry-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.entry-table th {
  text-align: left; font-size: 12px; color: var(--text-2); font-weight: 600;
  border-bottom: 2px solid var(--border); padding: 7px 10px; white-space: nowrap;
}
.entry-table th.sortable { cursor: pointer; user-select: none; }
.entry-table th.sortable:hover { color: var(--accent); }
.entry-table th .arrow { font-size: 10px; margin-left: 3px; }
.entry-table td { padding: 7px 10px; border-bottom: 1px solid #f0f2f4; vertical-align: middle; }
.entry-table tbody tr { cursor: pointer; transition: background .1s; }
.entry-table tbody tr:hover { background: var(--accent-soft); }
.entry-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.entry-table .etitle { font-weight: 600; color: var(--text); }
.entry-table .etag { font-size: 11.5px; }
.entry-table .etag .sep { color: var(--border); margin: 0 3px; }
.table-footer { padding-top: 9px; font-size: 12px; color: var(--text-3); }

/* ---------- 详情面板 ---------- */
.detail-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(27, 31, 35, 0.32);
  opacity: 0; transition: opacity .2s;
}
.detail-backdrop.show { opacity: 1; }
.detail-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(620px, 94vw);
  background: var(--card); border-left: 1px solid var(--border);
  box-shadow: -8px 0 30px rgba(27, 31, 35, 0.12);
  transform: translateX(103%); transition: transform .22s ease;
  display: flex; flex-direction: column;
}
.detail-panel.open { transform: translateX(0); }
.detail-header { padding: 18px 22px 12px; border-bottom: 1px solid var(--border); position: relative; }
.detail-close {
  position: absolute; top: 12px; right: 14px;
  border: none; background: var(--bg); color: var(--text-2);
  width: 28px; height: 28px; border-radius: 7px; cursor: pointer; font-size: 14px;
}
.detail-close:hover { background: #ffe3e3; color: #c0392b; }
.detail-body { overflow-y: auto; padding: 16px 22px 40px; flex: 1; }
.detail-body h1.page-title { font-size: 20px; margin: 0 0 10px; line-height: 1.35; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; align-items: center; }
.meta-kv { font-size: 12px; color: var(--text-3); }
.detail-summary {
  background: var(--bg); border-left: 3px solid var(--accent);
  padding: 9px 13px; border-radius: 0 8px 8px 0; font-size: 13px; color: var(--text-2);
  margin: 12px 0;
}
.prov-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; max-width: 340px; margin: 4px 0 2px; }
.prov-bar .p-ext { background: #59a14f; }
.prov-bar .p-inf { background: #f28e2b; }
.prov-bar .p-amb { background: #e15759; }
.prov-legend { font-size: 11.5px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.prov-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }

.link-block { margin-top: 14px; }
.link-block h3 { font-size: 13px; margin: 0 0 6px; color: var(--text-2); }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li {
  padding: 4px 8px; margin: 0 -8px; border-radius: 6px; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}
.link-list li:hover { background: var(--accent-soft); }
.link-list .rel-badge { font-size: 11px; padding: 0 7px; border-radius: 9px; background: var(--bg); border: 1px solid var(--border); color: var(--text-2); flex-shrink: 0; }
.link-list .conf-i { font-size: 10.5px; color: #b0600a; }
.broken-list { font-size: 12.5px; color: #a33a3c; }

/* ---------- 正文渲染 ---------- */
.page-content { font-size: 14px; line-height: 1.75; overflow-wrap: break-word; }
.page-content h1 { font-size: 19px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.page-content h2 { font-size: 16.5px; margin-top: 26px; }
.page-content h3 { font-size: 14.5px; }
.page-content img { max-width: 100%; border-radius: 6px; border: 1px solid var(--border); }
.page-content table { border-collapse: collapse; width: 100%; font-size: 12.5px; display: block; overflow-x: auto; }
.page-content th, .page-content td { border: 1px solid var(--border); padding: 5px 9px; text-align: left; }
.page-content th { background: var(--bg); }
.page-content code {
  background: rgba(175, 184, 193, 0.22); border-radius: 4px;
  padding: 1.5px 5px; font-size: 12.5px;
  font-family: Consolas, "Courier New", monospace;
}
.page-content pre { background: #f6f8fa; border: 1px solid var(--border); border-radius: 8px; padding: 12px; overflow-x: auto; }
.page-content pre code { background: none; padding: 0; }
.page-content blockquote {
  margin: 10px 0; padding: 6px 14px; border-left: 3px solid var(--references);
  background: var(--bg); border-radius: 0 6px 6px 0; color: var(--text-2);
}
.page-content a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(78,121,167,.35); cursor: pointer; }
.page-content a:hover { border-bottom-color: var(--accent); }
.page-content .broken-link { color: #c0392b; border-bottom: 1.5px dotted #c0392b; cursor: help; }
.page-content .mermaid-box { text-align: center; margin: 12px 0; overflow-x: auto; }

/* ---------- 独立知识页 ---------- */
.page-topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.back-link { color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 600; }
.back-link:hover { text-decoration: underline; }
.pt-title { font-size: 14px; font-weight: 700; }
.pt-meta { margin-left: auto; font-size: 11.5px; color: var(--text-3); }
.page-wrap { max-width: 920px; margin: 0 auto; padding: 32px 24px 56px; }
.page-wrap h1.page-title { font-size: 26px; margin: 0 0 12px; line-height: 1.3; }
.page-wrap .page-content { font-size: 15.5px; line-height: 1.85; }
.page-wrap .page-content h1 { font-size: 22px; }
.page-wrap .page-content h2 { font-size: 18px; margin-top: 30px; }
.page-wrap .page-content h3 { font-size: 16px; }
.page-wrap .detail-summary { font-size: 14px; }
a.tag-chip { text-decoration: none; }
.link-list a {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px; margin: 0 -8px; border-radius: 6px;
  color: var(--text); text-decoration: none; font-size: 13.5px;
}
.link-list a:hover { background: var(--accent-soft); }
.row-link { color: inherit; text-decoration: none; }
.entry-table tbody tr:hover .row-link { color: var(--accent); }

/* ---------- 全部条目：同面板内阅读 ---------- */
#view-table .card { max-width: 1000px; margin-left: auto; margin-right: auto; }
#table-reader { border-top: 1px dashed var(--border); margin-top: 4px; padding-top: 14px; }
.table-reader-body { max-width: 960px; margin: 0 auto; }
.table-reader-body h1.page-title { font-size: 24px; margin: 0 0 10px; line-height: 1.3; }
.table-reader-body .page-content { font-size: 15.5px; line-height: 1.85; }
.table-reader-body .page-content h1 { font-size: 22px; }
.table-reader-body .page-content h2 { font-size: 18px; margin-top: 30px; }
.table-reader-body .page-content h3 { font-size: 16px; }
.table-reader-body .detail-summary { font-size: 14px; }

/* ---------- 阅读视图（看板内打开条目，顶栏保留） ---------- */
body.reading .view { display: none !important; }
body.reading #view-reader { display: block !important; }
.reader-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.reader-back {
  border: 1px solid var(--border); background: var(--card); color: var(--accent);
  border-radius: 8px; padding: 6px 14px; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  box-shadow: var(--shadow);
}
.reader-back:hover { border-color: var(--accent); background: var(--accent-soft); }
.reader-hint { font-size: 12px; color: var(--text-3); }
.reader-card { padding: 28px max(26px, calc((100% - 920px) / 2)); }
.reader-card h1.page-title { font-size: 26px; margin: 0 0 12px; line-height: 1.3; }
.reader-card .page-content { font-size: 15.5px; line-height: 1.85; }
.reader-card .page-content h1 { font-size: 22px; }
.reader-card .page-content h2 { font-size: 18px; margin-top: 30px; }
.reader-card .page-content h3 { font-size: 16px; }
.reader-card .detail-summary { font-size: 14px; }

/* ---------- 独立页顶栏（复用看板样式） ---------- */
.brand-home { color: inherit; text-decoration: none; }
.tab-link {
  display: inline-block; padding: 7px 14px; border-radius: 8px;
  font-size: 13.5px; color: var(--text-2); text-decoration: none;
}
.tab-link:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- 页脚 ---------- */
.footer {
  text-align: center; padding: 14px; font-size: 12px; color: var(--text-3);
}
.footer code {
  background: var(--card); border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 6px; font-size: 11px;
}
.footer-sep { margin: 0 8px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #d0d7de; border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 手机端适配（≤640px；桌面端布局不受影响） ---------- */
@media (max-width: 640px) {
  body { font-size: 13.5px; }
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; }
  .searchbox { order: 3; flex: 1 1 100%; max-width: none; }
  .tabs { order: 2; flex-wrap: wrap; }
  .tabs button { padding: 6px 10px; font-size: 13px; }
  main { padding: 12px 12px 24px; }
  .card { padding: 13px 14px; }
  .stat-card { padding: 12px 14px; }
  .stat-card .num { font-size: 22px; }

  .table-toolbar { flex-wrap: wrap; }
  .table-toolbar .input { flex: 1 1 100%; width: auto; }
  .entry-table { min-width: 620px; }
  .entry-table th, .entry-table td { padding: 6px 8px; }

  .reader-card { padding: 20px 16px; }
  .table-reader-body .page-content,
  .page-wrap .page-content { font-size: 15px; }
  .page-wrap { padding: 22px 16px 40px; }

  .graph-main { height: 420px; }
  .footer { padding: 12px 14px 20px; }
}
