/* 投资研究站样式。阅读优先：左侧窄导航，正文宽而留白；数字等宽右对齐；红涨绿跌（A 股习惯）。 */

:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --ink: #1b2130;
  --ink-2: #455064;
  --ink-3: #8892a2;
  --line: #e4e7ec;
  --line-soft: #eef0f4;
  --brand: #1f5f8b;
  --brand-ink: #ffffff;
  --brand-soft: #e8f0f7;
  --up: #c0392b;   /* 正 / 涨 */
  --down: #1e8449; /* 负 / 跌 */
  --warn: #b9770e;
  --ok: #1e8449;
  --bad: #b03a2e;
  --side-w: 212px;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .08);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; line-height: 1.35; letter-spacing: .01em; }
h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: .6em 0; }
small { font-size: 12px; color: var(--ink-3); font-weight: 400; }

.muted { color: var(--ink-3); }
.caption { color: var(--ink-3); font-size: 12.5px; margin: 6px 2px 0; }
.nowrap { white-space: nowrap; }
.empty { color: var(--ink-3); text-align: center; padding: 28px 12px !important; }

/* 正负着色：A 股习惯 */
.up { color: var(--up); }
.down { color: var(--down); }
.na { color: #b4bcc8; }
.review-over { color: var(--bad); font-weight: 650; }
.review-soon { color: var(--warn); font-weight: 650; }

/* ---------- 布局 ---------- */
.shell { min-height: 100vh; }
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 30;
  display: flex; flex-direction: column;
  background: #15202e; color: #c7cfdb;
}
.brand { display: block; padding: 18px 18px 14px; font-size: 16px; font-weight: 700; color: #fff; letter-spacing: .08em; }
.brand:hover { text-decoration: none; }
.side-nav { display: flex; flex-direction: column; padding: 4px 10px; gap: 2px; }
.side-nav a {
  display: block; padding: 8px 10px; border-radius: 6px; color: #c7cfdb; font-size: 14px;
}
.side-nav a:hover { background: rgba(255, 255, 255, .07); text-decoration: none; color: #fff; }
.side-nav a.on { background: rgba(255, 255, 255, .12); color: #fff; }
.side-foot { margin-top: auto; padding: 12px 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; border-top: 1px solid rgba(255, 255, 255, .08); }
.side-user { color: #fff; font-weight: 600; width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.side .link-btn { color: #9aa6b6; }
.link-btn.danger { color: #d98880; }
.inline-form { display: inline; }
.main { margin-left: var(--side-w); min-height: 100vh; }
.menu-btn { display: none; }
.backdrop { display: none; }

.page { max-width: 1320px; margin: 0 auto; padding: 26px 28px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head h1 { font-size: 26px; }
.page-head .muted { margin: 4px 0 0; }
.sub { font-size: 15px; margin: 30px 0 10px; padding-left: 10px; border-left: 3px solid var(--brand); }
.empty-page { text-align: center; padding: 80px 20px; color: var(--ink-2); }

/* ---------- 卡片、按钮、表单 ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin: 12px 0; }
.btn {
  display: inline-block; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.5; cursor: pointer;
}
.btn:hover { border-color: #c9cfda; text-decoration: none; background: #fafbfc; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: #1a5278; border-color: #1a5278; }
.btn-block { display: block; width: 100%; }
.form label { display: block; font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }
.form input, .form select, .form textarea, .dlg input {
  display: block; width: 100%; margin-top: 4px; padding: 7px 10px; font: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink);
}
.form textarea { resize: vertical; line-height: 1.6; }
.form input:focus, .form select:focus, .form textarea:focus, .dlg input:focus, .kb-search input:focus { outline: 2px solid rgba(31, 95, 139, .28); outline-offset: 0; border-color: var(--brand); }
.form-row { display: flex; flex-wrap: wrap; gap: 0 16px; }
.form-row label { flex: 0 0 180px; }
.form-row label.grow { flex: 1 1 260px; }
.form-actions { margin-top: 14px; }
.flash { padding: 9px 14px; border-radius: 6px; font-size: 14px; margin: 0 0 12px; border: 1px solid transparent; }
.flash-ok { background: #eaf7ef; border-color: #bfe5cd; color: #145a32; }
.flash-err { background: #fdeeea; border-color: #f2c4bc; color: #8c2b1e; }
.details { padding: 0; }
.details > summary { cursor: pointer; padding: 12px 18px; font-weight: 600; font-size: 14px; list-style: none; }
.details > summary::-webkit-details-marker { display: none; }
.details > summary::before { content: "▸"; display: inline-block; margin-right: 8px; color: var(--ink-3); transition: transform .15s; }
.details[open] > summary::before { transform: rotate(90deg); }
.details > *:not(summary) { margin-left: 18px; margin-right: 18px; }
.details > .table-wrap { margin: 0; }

/* ---------- 徽章 ---------- */
.badge, .vd, .vf {
  display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  line-height: 1.7; white-space: nowrap; vertical-align: middle;
}
.st-done, .vd-yes { background: #e4f3ea; color: #17603a; }
.st-tracking { background: #e6eef8; color: #1f4e79; }
.st-pool, .vd-doubt { background: #fdf3df; color: #8a5a08; }
.st-excluded, .vd-no { background: #fbe9e6; color: #96281b; }
.st-all, .st-none, .vd-none { background: #eceff3; color: #4a5568; }
.vd-na { background: #eceff3; color: #6b7280; }
.vd-todo { background: #f1f1f1; color: #555; border: 1px dashed #b8bfc9; }
.vf { font-weight: 500; }
.vf-src { background: #e4f3ea; color: #17603a; }
.vf-sum { background: #fdf3df; color: #8a5a08; }
.vf-un { background: #f1f1f1; color: #666; border: 1px dashed #b8bfc9; }
.side-buy { color: var(--up); font-weight: 600; }
.side-sell { color: var(--down); font-weight: 600; }

/* ---------- 状态筛选条 ---------- */
.status-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid transparent; font-size: 13.5px; color: var(--ink); background: #fff;
}
.chip:hover { text-decoration: none; border-color: #c9cfda; }
.chip b { font-weight: 700; }
.chip-on { box-shadow: 0 0 0 2px rgba(31, 95, 139, .35); }
.chip-warn { color: var(--bad); font-size: 12px; }
.chip-soon { color: var(--warn); font-size: 12px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--panel); }
.tbl th, .tbl td { padding: 7px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.tbl thead th { position: sticky; top: 0; background: #f7f8fa; color: var(--ink-2); font-weight: 600; font-size: 12.5px; white-space: nowrap; z-index: 2; border-bottom: 1px solid var(--line); }
.tbl tbody tr:hover { background: #fafbfd; }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl tfoot th, .tbl tfoot td { font-weight: 650; border-top: 1px solid var(--line); background: #fafbfc; }
.th-label { text-align: left !important; font-weight: 500; white-space: nowrap; color: var(--ink); position: sticky; left: 0; background: inherit; z-index: 1; }
.tbl thead .th-label { background: #f7f8fa; z-index: 3; }
.th-label small { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 400; line-height: 1.4; }
.th-latest { background: #fff8e6 !important; }
.td-latest { background: #fffaf0; }
.tr-group th { background: #f1f4f8; color: var(--brand); font-size: 12.5px; font-weight: 650; padding: 10px 12px 5px; border-bottom: 1px solid var(--line); text-align: left; }
.tr-strong th, .tr-strong td { font-weight: 650; }
.tr-self td, .tr-self th { background: #eef5fb; }
.tbl-num { font-size: 13px; }
.tbl-compact th, .tbl-compact td { padding: 5px 10px; }
.th-sort a { color: inherit; }
.th-sort a:hover { text-decoration: none; color: var(--brand); }
.th-sort i { font-style: normal; color: var(--brand); font-size: 10px; }
.co-link { font-weight: 650; }
.co-sub { display: block; color: var(--ink-3); font-size: 12px; }
.cell-text { min-width: 180px; color: var(--ink-2); }
.dash-one { min-width: 260px; max-width: 420px; font-size: 13px; }
.dash-change { display: block; margin-top: 4px; color: var(--ink-3); font-size: 12.5px; }
.tbl-dash .co-sub { display: inline; margin-left: 6px; }
.tbl-seg .th-label { font-weight: 600; }
.tbl-src td { font-size: 13px; }
.holders-panel { margin: 0; }

/* ---------- 公司页 ---------- */
.co-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 28px; padding: 24px 28px 14px; }
.co-name-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.co-name-line h1 { font-size: 28px; }
.co-code { color: var(--ink-3); font-family: var(--mono); font-size: 14px; }
.co-one { font-size: 15.5px; color: var(--ink-2); margin: 8px 0 4px; max-width: 860px; }
.co-meta { color: var(--ink-3); font-size: 13px; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.co-meta b { font-weight: 650; }
.quote { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0; align-self: flex-start; }
.quote > div { min-width: 84px; }
.quote dt { font-size: 12px; color: var(--ink-3); }
.quote dd { margin: 0; font-size: 20px; font-weight: 650; }
.quote dd small { margin-left: 2px; font-size: 12px; font-weight: 400; }
.anchor-nav {
  position: sticky; top: 0; z-index: 20; display: flex; gap: 2px; overflow-x: auto;
  padding: 0 20px; background: rgba(245, 246, 248, .92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.anchor-nav a { padding: 10px 12px; color: var(--ink-2); font-size: 13.5px; white-space: nowrap; border-bottom: 2px solid transparent; }
.anchor-nav a:hover { color: var(--brand); text-decoration: none; }
.anchor-nav a.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.co-main { max-width: 1320px; margin: 0 auto; padding: 10px 28px 80px; }
.sec { margin-top: 34px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; margin: 0 2px 8px; }
.sec-head h2 { font-size: 21px; }
.sec-head .muted { margin: 0; font-size: 13px; }
.sec-toc { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.summary-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 12px; }
.summary-grid .panel { margin: 0; }
.summary-main .prose, .summary-main > p:first-child { font-size: 15.5px; }
.side-card h3 { margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.side-card h3:first-child { margin-top: 0; }
.panel-change h3 { font-size: 15px; }
.pos-card { display: flex; flex-wrap: wrap; gap: 12px 34px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 18px; margin-top: 12px; }
.pos-card > div { display: flex; align-items: baseline; gap: 5px; }
.pos-card small { font-size: 12px; }
.pos-card b { font-size: 18px; }
.pos-card span { font-size: 12px; color: var(--ink-3); }

/* 图表 */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 12px; }
.chart { margin: 0 0 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px 6px; }
.chart-canvas { width: 100%; }
.chart-cap { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink-2); padding: 2px 4px 4px; }
.chart-hint { color: var(--ink-3); font-size: 11.5px; }
.chart-empty { padding: 28px 12px; text-align: center; color: var(--ink-3); font-size: 13px; }
.block-missing, .block-error { padding: 12px 14px; margin: 10px 0; border: 1px dashed #c9cfda; border-radius: 6px; color: var(--ink-3); font-size: 13px; background: #fafbfc; }
.block-error { border-color: #f2c4bc; color: #8c2b1e; }
.stat-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 8px 14px; min-width: 110px; }
.stat small { display: block; font-size: 12px; }
.stat b { font-size: 18px; }
.stat span { font-size: 12px; color: var(--ink-3); }

/* 逐项核对 */
.chk-panel h3 { font-size: 17px; }
.tbl-checks th, .tbl-checks td { vertical-align: top; }
.chk-code { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.core { color: var(--warn); margin-left: 2px; }
.chk-label { font-weight: 500; white-space: nowrap; }
.reason { margin-top: 6px; }
.reason summary { cursor: pointer; color: var(--brand); font-size: 13px; }
.reason > div { margin-top: 6px; padding: 8px 12px; background: #fafbfc; border: 1px solid var(--line-soft); border-radius: 6px; }
.tbl-checks .prose p { margin: .35em 0; }

/* 时间线 */
.tl-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); margin-bottom: 14px; }
.tl-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px 1px 6px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-size: 12.5px; }
.tl-chip input { accent-color: var(--brand); margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 128px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { display: grid; grid-template-columns: 112px 36px minmax(0, 1fr); gap: 0; padding: 8px 0; }
.tl-item[hidden] { display: none; }
.tl-date { text-align: right; padding-right: 12px; color: var(--ink-3); font-size: 13px; padding-top: 3px; font-variant-numeric: tabular-nums; }
.tl-dot { position: relative; }
.tl-dot::after { content: ""; position: absolute; left: 10px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: #8892a2; border: 2px solid #fff; box-shadow: 0 0 0 1px #8892a2; }
.ek-origin::after { background: #1f5f8b; box-shadow: 0 0 0 1px #1f5f8b; }
.ek-price::after { background: #b9770e; box-shadow: 0 0 0 1px #b9770e; }
.ek-ma::after { background: #6c3483; box-shadow: 0 0 0 1px #6c3483; }
.ek-mgmt::after { background: #1e8449; box-shadow: 0 0 0 1px #1e8449; }
.ek-crisis::after, .ek-reg::after { background: #c0392b; box-shadow: 0 0 0 1px #c0392b; }
.ek-div::after { background: #148f77; box-shadow: 0 0 0 1px #148f77; }
.ek-earn::after { background: #2e86c1; box-shadow: 0 0 0 1px #2e86c1; }
.ek-other::after { background: #8892a2; box-shadow: 0 0 0 1px #8892a2; }
.tl-kind { color: var(--ink-3); font-size: 12px; margin-right: 8px; }
.tl-body { padding: 2px 0 10px 6px; border-bottom: 1px solid var(--line-soft); }
.tl-body p { margin: 3px 0; color: var(--ink-2); font-size: 14px; }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.tl-head b { font-size: 14.5px; }
.tl-impact { color: var(--ink); }
.tl-src { font-size: 12.5px !important; color: var(--ink-3) !important; }

/* 跟踪记录、我的记录 */
.reviews { display: flex; flex-direction: column; gap: 10px; }
.review { border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; background: #fcfcfd; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }
.review-head time { font-weight: 650; }
.arrow { color: var(--ink-3); }
.trips { display: flex; flex-direction: column; gap: 10px; }
.trip { background: #fcfcfd; border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; }
.trip-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13.5px; }
.trip-head time { font-weight: 650; }
.trip-place { color: var(--ink-2); }
.trip-head form { margin-left: auto; }
.trip.panel { background: #fff; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.photos img { width: 150px; height: 112px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

/* ---------- Markdown 正文 ---------- */
.prose { font-size: 15.5px; line-height: 1.85; color: var(--ink); }
.prose > *:first-child, .prose > .prose-h:first-child { margin-top: 0; }
.prose h1 { font-size: 26px; margin: 10px 0 12px; }
.prose h2 { font-size: 20px; margin: 1.8em 0 .6em; padding-top: .2em; border-top: 1px solid var(--line-soft); }
.prose .prose-h { font-size: 21px; margin: 0 0 .8em; padding: 0; border: 0; }
.prose h3 { font-size: 16.5px; margin: 1.6em 0 .5em; }
.prose h4 { font-size: 15px; margin: 1.3em 0 .4em; color: var(--ink-2); }
.prose p { margin: .7em 0; }
.prose ul, .prose ol { padding-left: 1.5em; margin: .4em 0; }
.prose li { margin: .15em 0; }
.prose li > ul, .prose li > ol { margin: .1em 0; }
.prose blockquote { margin: .9em 0; padding: 4px 16px; border-left: 3px solid #b9cde0; color: var(--ink-2); background: #f7fafc; border-radius: 0 6px 6px 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: #f1f3f6; padding: 1px 5px; border-radius: 4px; }
.prose pre { background: #1f2733; color: #e6edf5; padding: 12px 14px; border-radius: 6px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.prose img { max-width: 100%; border-radius: 6px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: .9em 0; display: block; overflow-x: auto; }
.prose table th, .prose table td { border: 1px solid var(--line); padding: 5px 10px; text-align: left; vertical-align: top; }
.prose table thead th { background: #f7f8fa; font-weight: 650; white-space: nowrap; }
.prose table td:has(.up), .prose table td:has(.down) { white-space: nowrap; }
.prose .table-wrap table { display: table; width: 100%; margin: 0; font-size: 13px; }
.prose .chart { margin: 1em 0 1.2em; }
.prose-compact { font-size: 13.5px; line-height: 1.7; }
.prose-compact p:first-child { margin-top: 0; }
.prose-compact p:last-child { margin-bottom: 0; }
.prose-compact ul, .prose-compact ol { padding-left: 1.3em; }
.prose-compact h3 { font-size: 15px; margin-top: 1em; }
/* 课堂笔记是深层嵌套的大纲：收紧缩进，层级用字号和颜色区分 */
.prose ul { list-style: none; }
.prose ul li { position: relative; padding-left: 2px; }
.prose ul li::before { content: "·"; position: absolute; left: -1em; color: #a4adba; }
.prose ul ul { font-size: .97em; }
.prose ul ul ul { font-size: .95em; }
.prose ul ul ul ul { font-size: .93em; }
.prose ul ul ul ul ul { font-size: .92em; color: var(--ink-2); }
.prose ul ul ul ul ul ul { font-size: .9em; color: var(--ink-2); }
.prose ul ul ul ul ul ul ul { font-size: .88em; color: var(--ink-3); }
/* 滚动到锚点时高亮一下 */
.prose :target, h2:target, h3:target { background: #fff5d6; border-radius: 4px; }

/* ---------- 知识库 ---------- */
.kb-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr) 200px; gap: 0; min-height: 100vh; }
.kb-side { border-right: 1px solid var(--line); background: #fff; padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.kb-search input { width: 100%; padding: 7px 10px; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 6px; }
.kb-group { margin-top: 18px; }
.kb-group-label { font-size: 12px; color: var(--ink-3); font-weight: 650; letter-spacing: .08em; padding: 0 8px 4px; }
.kb-link { display: block; padding: 5px 8px; border-radius: 5px; color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.kb-link:hover { background: #f3f5f8; text-decoration: none; }
.kb-link.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.kb-link small { display: block; font-size: 11.5px; }
.kb-main { padding: 24px 40px 80px; min-width: 0; }
.kb-main .prose { max-width: 820px; }
.kb-main .page-head { max-width: 820px; }
.kb-results { list-style: none; margin: 0; padding: 0; }
.kb-results li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.kb-results li:last-child { border-bottom: 0; }
.kb-results small { margin-left: 8px; }
.kb-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; max-width: 820px; }
.kb-toc { border-left: 1px solid var(--line); padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; font-size: 12.5px; }
.kb-toc-label { font-size: 12px; color: var(--ink-3); font-weight: 650; letter-spacing: .08em; margin-bottom: 6px; }
.kb-toc a { display: block; color: var(--ink-2); padding: 2px 0; line-height: 1.45; }
.kb-toc a:hover { color: var(--brand); text-decoration: none; }
.toc-l2 { padding-left: 12px !important; }
.toc-l3 { padding-left: 26px !important; font-size: 12px; }
.kb-main .prose.panel { background: #fff; }

/* ---------- 登录 ---------- */
.login-body { background: #15202e; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: #fff; padding: 30px 32px 26px; border-radius: 10px; width: 360px; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); }
.login-card h1 { font-size: 22px; letter-spacing: .1em; }
.login-sub { color: var(--ink-3); font-size: 13px; margin: 4px 0 14px; }
.login-card .btn { margin-top: 14px; }

/* ---------- 弹窗 ---------- */
.dlg { border: 0; border-radius: 10px; padding: 26px 28px; width: 360px; box-shadow: 0 20px 60px rgba(16, 24, 40, .28); }
.dlg::backdrop { background: rgba(15, 23, 42, .45); }
.dlg-form h3 { margin-bottom: 8px; }
.dlg-form label { display: block; font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .kb-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .kb-toc { display: none; }
  .summary-grid { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .side { transform: translateX(-100%); transition: transform .2s; }
  .shell.side-open .side { transform: none; }
  .shell.side-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 25; }
  .main { margin-left: 0; padding-top: 44px; }
  .menu-btn { display: block; position: fixed; top: 8px; left: 10px; z-index: 26; background: #fff; border: 1px solid var(--line); border-radius: 6px; width: 36px; height: 34px; font-size: 16px; cursor: pointer; }
  .page, .co-main { padding-left: 14px; padding-right: 14px; }
  .co-head { padding: 14px 14px 8px; }
  .kb-shell { grid-template-columns: 1fr; }
  .kb-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .kb-main { padding: 18px 14px 60px; }
  .timeline::before { left: 96px; }
  .tl-item { grid-template-columns: 82px 30px minmax(0, 1fr); }
  .tl-dot::after { left: 7px; }
  .form-row label { flex: 1 1 100%; }
}
@media print {
  .side, .anchor-nav, .menu-btn, .side-foot, .tl-filter, .reason summary, form, .dlg { display: none !important; }
  .main { margin: 0; }
  .panel, .chart { box-shadow: none; border-color: #ccc; }
}
