/* 公考得分最大化 · 本地网页样式
   配色：图表分类色、顺序色、状态色取自已校验的参考调色板（浅色 / 深色各一套）；
   界面色与图表色分开定义，图表代码只引用角色变量。 */

:root {
  color-scheme: light;
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Microsoft YaHei", monospace;

  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f2f1ed;
  --surface-3: #e9e8e3;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #7b7973;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --border-strong: rgba(11, 11, 11, 0.18);
  --accent: #1c5cab;
  --accent-ink: #ffffff;
  --accent-soft: #e6f0fc;
  --accent-line: #86b6ef;
  --deemph: #c9c7bf;
  --on-strong: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .06);

  /* 状态色（固定，不随主题；总是配图标与文字） */
  --good: #0ca30c; --good-text: #006300; --good-soft: #e9f6e9;
  --warn: #fab219; --warn-text: #7a5200; --warn-soft: #fff6e0;
  --serious: #ec835a;
  --bad: #d03b3b; --bad-text: #a32525; --bad-soft: #fcecec;

  /* 分类色（固定顺序）与填充上的文字墨色 */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --s1-ink: #fff; --s2-ink: #fff; --s3-ink: #0b0b0b; --s4-ink: #0b0b0b; --s5-ink: #0b0b0b; --s6-ink: #fff; --s7-ink: #fff; --s8-ink: #fff;
  /* 顺序色（蓝，浅→深） */
  --q1: #cde2fb; --q2: #b7d3f6; --q3: #9ec5f4; --q4: #86b6ef; --q5: #6da7ec; --q6: #3987e5; --q7: #2a78d6; --q8: #1c5cab; --q9: #104281;
  /* 序数色（5 级，浅端仍 ≥2:1） */
  --o1: #86b6ef; --o2: #5598e7; --o3: #2a78d6; --o4: #1c5cab; --o5: #104281;
  --o1-ink: #0b0b0b; --o2-ink: #0b0b0b; --o3-ink: #fff; --o4-ink: #fff; --o5-ink: #fff;
  /* 笔记：钢笔与荧光笔颜色（荧光笔以半透明叠在文字上） */
  --ink-ink: #1d1d1b; --ink-red: #d4251c; --ink-blue: #1d5fd1; --ink-green: #12813b;
  --hl-yellow: #ffd200; --hl-green: #5fd068; --hl-pink: #ff7fb6; --hl-blue: #6fb3ff; --hl-alpha: .4;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321; --surface-3: #2c2c2a;
    --ink: #f0efec; --ink-2: #c3c2b7; --muted: #8f8d86; --grid: #2c2c2a; --axis: #383835;
    --border: rgba(255, 255, 255, 0.10); --border-strong: rgba(255, 255, 255, 0.18);
    --accent: #6da7ec; --accent-ink: #0b0b0b; --accent-soft: #16263d; --accent-line: #256abf;
    --deemph: #4a4946; --on-strong: #0b0b0b; --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 4px 16px rgba(0, 0, 0, .4);
    --good-text: #3fc23f; --good-soft: #142614; --warn-text: #f5c454; --warn-soft: #2a2212; --bad-text: #ef7a7a; --bad-soft: #2d1616;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    --s1-ink: #fff; --s2-ink: #fff; --s3-ink: #0b0b0b; --s4-ink: #0b0b0b; --s5-ink: #0b0b0b; --s6-ink: #fff; --s7-ink: #0b0b0b; --s8-ink: #0b0b0b;
    --q1: #0d366b; --q2: #104281; --q3: #184f95; --q4: #1c5cab; --q5: #256abf; --q6: #2a78d6; --q7: #3987e5; --q8: #6da7ec; --q9: #9ec5f4;
    --o1: #184f95; --o2: #256abf; --o3: #3987e5; --o4: #6da7ec; --o5: #9ec5f4;
    --o1-ink: #fff; --o2-ink: #fff; --o3-ink: #0b0b0b; --o4-ink: #0b0b0b; --o5-ink: #0b0b0b;
    --ink-ink: #f2f1ee; --ink-red: #ff6b61; --ink-blue: #74b0ff; --ink-green: #5dd37a;
    --hl-yellow: #f5cc00; --hl-green: #3fb950; --hl-pink: #e86aa3; --hl-blue: #4b9cf0; --hl-alpha: .42;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321; --surface-3: #2c2c2a;
  --ink: #f0efec; --ink-2: #c3c2b7; --muted: #8f8d86; --grid: #2c2c2a; --axis: #383835;
  --border: rgba(255, 255, 255, 0.10); --border-strong: rgba(255, 255, 255, 0.18);
  --accent: #6da7ec; --accent-ink: #0b0b0b; --accent-soft: #16263d; --accent-line: #256abf;
  --deemph: #4a4946; --on-strong: #0b0b0b; --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 4px 16px rgba(0, 0, 0, .4);
  --good-text: #3fc23f; --good-soft: #142614; --warn-text: #f5c454; --warn-soft: #2a2212; --bad-text: #ef7a7a; --bad-soft: #2d1616;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --s1-ink: #fff; --s2-ink: #fff; --s3-ink: #0b0b0b; --s4-ink: #0b0b0b; --s5-ink: #0b0b0b; --s6-ink: #fff; --s7-ink: #0b0b0b; --s8-ink: #0b0b0b;
  --q1: #0d366b; --q2: #104281; --q3: #184f95; --q4: #1c5cab; --q5: #256abf; --q6: #2a78d6; --q7: #3987e5; --q8: #6da7ec; --q9: #9ec5f4;
  --o1: #184f95; --o2: #256abf; --o3: #3987e5; --o4: #6da7ec; --o5: #9ec5f4;
  --o1-ink: #fff; --o2-ink: #fff; --o3-ink: #0b0b0b; --o4-ink: #0b0b0b; --o5-ink: #0b0b0b;
  --ink-ink: #f2f1ee; --ink-red: #ff6b61; --ink-blue: #74b0ff; --ink-green: #5dd37a;
  --hl-yellow: #f5cc00; --hl-green: #3fb950; --hl-pink: #e86aa3; --hl-blue: #4b9cf0; --hl-alpha: .42;
}

/* ============ 基础 ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; --top-off: calc(56px + env(safe-area-inset-top, 0px)); scroll-padding-top: calc(var(--top-off) + 16px); }
body { margin: 0; background: var(--page); color: var(--ink); font: calc(16px * var(--fs, 1))/1.75 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
mark { background: color-mix(in srgb, var(--s4) 35%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.muted { color: var(--muted); }
.tnum, .tnum td { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.loading { color: var(--muted); }
noscript { display: block; padding: 24px; }

/* ============ 顶栏 ============ */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-off);
  display: flex; align-items: center; gap: 12px;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: 0;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); font-size: 15px; }
.tabs { display: flex; gap: 2px; margin-left: 8px; }
.tabs a { padding: 6px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.tabs a:hover { background: var(--surface-2); text-decoration: none; }
.tabs a.on { background: var(--accent-soft); color: var(--accent); }
.top-search { flex: 1; display: flex; justify-content: flex-end; min-width: 0; }
.search-input { width: min(360px, 100%); height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); cursor: pointer; font-size: 17px; flex: none; }
.icon-btn:hover { background: var(--surface-2); }
.menu-btn { display: none; }
.search-link { display: none; font-size: 20px; color: var(--ink); }
.search-link:hover { text-decoration: none; }
.search-page-input { width: 100%; height: 42px; margin: 10px 0 6px; font-size: 16px; }

/* ============ 布局 ============ */
.layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: calc(100vh - var(--top-off)); }
.sidebar {
  position: sticky; top: var(--top-off); height: calc(100vh - var(--top-off)); overflow-y: auto;
  border-right: 1px solid var(--border); background: var(--surface); padding: 14px 10px 32px; font-size: 14px;
}
.scrim { display: none; }
.main { min-width: 0; padding-block: 28px 64px; padding-left: max(36px, env(safe-area-inset-left, 0px)); padding-right: max(36px, env(safe-area-inset-right, 0px)); outline: none; }
.nav-home { display: block; padding: 8px 10px; border-radius: 8px; font-weight: 700; color: var(--ink); }
.nav-sec { margin-top: 14px; }
.nav-title { padding: 4px 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.nav-sec ul { list-style: none; margin: 0; padding: 0; }
.nav-sec a { display: flex; align-items: baseline; gap: 6px; padding: 5px 10px; border-radius: 7px; color: var(--ink-2); line-height: 1.45; }
.nav-sec a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav-sec a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-no { font: 600 11px/1 var(--mono); color: var(--muted); min-width: 1.7em; }
.nav-read { margin-left: auto; color: var(--good-text); font-size: 12px; }
.nav-foot { margin: 18px 10px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

/* ============ 通用页面 ============ */
.page { max-width: 920px; margin: 0 auto; }
.page-head { margin-bottom: 20px; }
.page-head h1, .doc-title { font-size: 1.85rem; line-height: 1.3; margin: 6px 0 8px; letter-spacing: .01em; }
.lede { color: var(--ink-2); margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--ink-2); }
.block { margin: 34px 0; }
.block h2 { font-size: 1.25rem; margin: 0 0 12px; }
.block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.block-head h2 { margin: 0; }
.note { margin: 10px 0; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); font-size: .9rem; }
.hint { color: var(--ink-2); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.warn-text { color: var(--warn-text); font-weight: 600; }
.foot-note { margin-top: 40px; color: var(--muted); font-size: 13px; }

/* 按钮、标签 */
.btn, .btn-ghost, .btn-primary { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; }
.btn:hover, .btn-ghost:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); background: var(--accent); }
.btn-ghost { background: transparent; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-ghost.is-on { color: var(--good-text); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-2); font-size: 13px; cursor: pointer; line-height: 1.6; }
.chip:hover { text-decoration: none; background: var(--surface-2); }
.chip.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); font-weight: 600; }
.tag { display: inline-block; padding: 0 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; line-height: 1.8; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border-radius: 6px; font-size: 12px; line-height: 1.9; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; border-left: 3px solid var(--deemph); }
.mod-0 { border-left-color: var(--s1); } .mod-1 { border-left-color: var(--s2); } .mod-2 { border-left-color: var(--s3); } .mod-3 { border-left-color: var(--s4); } .mod-4 { border-left-color: var(--s5); } .mod-5 { border-left-color: var(--s6); }
.type-0 { border-left-color: var(--s1); } .type-1 { border-left-color: var(--s2); } .type-2 { border-left-color: var(--s3); } .type-3 { border-left-color: var(--s4); } .type-4 { border-left-color: var(--s5); }
.subj-badge-xc { border-left-color: var(--s1); } .subj-badge-sl { border-left-color: var(--s2); }
.pill { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.pill.ans { background: var(--accent-soft); color: var(--accent); }
.pill.is-hidden { color: var(--muted); }
.conf-3, .conf-4 { background: var(--warn-soft); color: var(--warn-text); }
.rec-right { background: var(--good-soft); color: var(--good-text); }
.rec-wrong { background: var(--bad-soft); color: var(--bad-text); }
.seg-ctl { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.seg-btn { border: 0; background: transparent; padding: 4px 12px; border-radius: 7px; cursor: pointer; color: var(--ink-2); font-size: 14px; }
.seg-btn.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); cursor: pointer; }

/* ============ 文档页 ============ */
.doc-layout { display: grid; grid-template-columns: minmax(0, 820px) 236px; gap: 40px; justify-content: center; }
.doc-main { min-width: 0; }
.doc-head { margin-bottom: 18px; }
.doc-no { display: inline-grid; place-items: center; min-width: 2.2em; height: 1.6em; margin-right: 10px; padding: 0 .3em; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font: 700 .7em/1 var(--mono); vertical-align: .18em; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--muted); font-size: 13.5px; }
.doc-file { font-family: var(--mono); font-size: 12px; }
.summary { margin: 18px 0 26px; padding: 16px 18px; border-radius: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent-line) 50%, transparent); }
.summary-kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--accent); }
.summary-purpose { margin: 4px 0 6px; font-weight: 600; }
.summary ul { margin: 0; padding-left: 1.2em; }
.summary li { margin: 3px 0; }
.summary-first { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.toc-rail { position: sticky; top: calc(var(--top-off) + 20px); align-self: start; max-height: calc(100vh - var(--top-off) - 40px); overflow-y: auto; font-size: 13px; padding-left: 12px; border-left: 1px solid var(--border); }
.toc-title { font-weight: 700; color: var(--muted); font-size: 12px; letter-spacing: .08em; margin-bottom: 6px; }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { margin: 2px 0; }
.toc-list a { display: block; color: var(--ink-2); line-height: 1.45; padding: 2px 0; }
.toc-list a.on { color: var(--accent); font-weight: 600; }
.toc-l3 { padding-left: 12px; font-size: 12.5px; }
.toc-mobile { display: none; margin: 0 0 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.toc-mobile summary { padding: 10px 14px; cursor: pointer; font-weight: 600; }
.toc-mobile .toc-list { padding: 0 14px 12px; max-height: 50vh; overflow-y: auto; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 44px; }
.pager a { display: flex; flex-direction: column; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); }
.pager a:hover { border-color: var(--accent-line); text-decoration: none; }
.pager small { color: var(--muted); font-size: 12px; }
.pager-next { text-align: right; }

/* 正文排版 */
.prose { font-size: calc(16.5px * var(--fs, 1)); }
.prose h2 { font-size: 1.42rem; line-height: 1.4; margin: 2.2em 0 .7em; padding-top: .6em; border-top: 1px solid var(--border); }
.prose h3 { font-size: 1.16rem; line-height: 1.45; margin: 1.8em 0 .6em; }
.prose h4 { font-size: 1.02rem; margin: 1.5em 0 .5em; color: var(--ink-2); }
/* 正文列表与段落的间距不作用于图表内部（图表组件自带排版） */
.prose p:not(.chart *, .docmap *) { margin: .7em 0; }
.prose :is(ul, ol):not(.chart *, .docmap *) { padding-left: 1.4em; margin: .6em 0; }
.prose li:not(.chart *, .docmap *) { margin: .25em 0; }
.prose li > :is(ul, ol):not(.chart *) { margin: .2em 0; }
.prose strong { font-weight: 700; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.prose blockquote { margin: 1em 0; padding: 10px 14px; border-left: 4px solid var(--accent-line); background: var(--surface-2); border-radius: 0 8px 8px 0; color: var(--ink-2); font-size: .95rem; }
.prose blockquote p { margin: .3em 0; }
.prose code { font-family: var(--mono); font-size: .86em; padding: .1em .35em; border-radius: 5px; background: var(--surface-2); }
.code-wrap pre { margin: 1em 0; padding: 12px 14px; overflow-x: auto; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font: 13.5px/1.65 var(--mono); }
.code-wrap pre code { background: none; padding: 0; font-size: inherit; }
.prose a.xref { border-bottom: 1px dotted var(--accent-line); }
.prose a.xref:hover { text-decoration: none; border-bottom-style: solid; }
.table-wrap { position: relative; overflow-x: auto; margin: 1em 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: .9em; line-height: 1.55; }
.table-wrap th { background: var(--surface-2); text-align: left; font-weight: 700; white-space: nowrap; }
.table-wrap th, .table-wrap td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td:first-child { font-weight: 500; }
.math-block { position: relative; overflow-x: auto; overflow-y: hidden; margin: .8em 0; padding: 4px 0; }
/* KaTeX 的无障碍 MathML 层是绝对定位的：让所有滚动容器成为它的定位祖先，避免撑宽页面 */
.katex-display, .formula, .heat-wrap, .tbar-wrap, .btgrid, .code-wrap pre, .chart-plot { position: relative; }
.katex { position: relative; }
.prose p, .prose li { overflow-wrap: anywhere; }
.katex { font-size: 1.06em; }
.katex .cjk_fallback { font-family: var(--font); }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: 6px 0; margin: .6em 0; }
.math-error { color: var(--bad-text); }
.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { background: var(--accent-soft); } 100% { background: transparent; } }

/* ============ 图表 ============ */
.viz { margin: 1.4em 0; min-height: 40px; }
.viz-missing { color: var(--bad-text); font-size: 13px; }
.chart { margin: 1.4em 0; padding: 16px 18px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.chart figcaption { margin-bottom: 10px; }
.chart-title { font-weight: 700; font-size: 1rem; line-height: 1.45; }
.chart-sub { color: var(--ink-2); font-size: .86rem; line-height: 1.55; margin-top: 2px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 10px; font-size: 13px; color: var(--ink-2); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg-key { display: inline-block; flex: none; background: var(--c); }
.lg-rect { width: 12px; height: 12px; border-radius: 3px; }
.lg-line { width: 16px; height: 2px; border-radius: 2px; }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; }
.chart-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; margin-top: 10px; }
.chart-foot > button { flex: none; white-space: nowrap; margin-left: auto; }
.chart-note { flex: 1 1 220px; }
.chart-note { color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.chart-table { margin-top: 8px; }
.chart-table .table-wrap { font-size: 12.5px; }

.bars { --label-w: 12em; font-size: 13px; }
.brow { display: grid; grid-template-columns: var(--label-w) minmax(0, 1fr); align-items: center; column-gap: 10px; min-height: 30px; }
.blabel { color: var(--ink-2); text-align: right; line-height: 1.3; font-size: 12.5px; overflow-wrap: anywhere; }
a.blabel:hover { color: var(--accent); }
.brow.is-muted .blabel { color: var(--muted); }
.track { position: relative; height: 28px; margin-right: 5.5em; }
.grid { position: absolute; inset: 0; pointer-events: none; }
.gl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }
.bar { position: absolute; left: 0; top: 50%; height: 14px; transform: translateY(-50%); background: var(--c); border-radius: 0 4px 4px 0; min-width: 2px; }
.bar-em { height: 18px; }
.whisker { position: absolute; top: 50%; height: 0; border-top: 2px solid var(--ink-2); }
.whisker::before, .whisker::after { content: ""; position: absolute; top: -6px; width: 0; height: 10px; border-left: 2px solid var(--ink-2); }
.whisker::before { left: 0; } .whisker::after { right: 0; }
.ref { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px solid var(--ink-2); opacity: .55; pointer-events: none; }
.val { position: absolute; top: 50%; transform: translateY(-50%); white-space: nowrap; color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; }
.brow-axis { min-height: 20px; }
.axis, .reflabels { position: relative; height: 20px; margin-right: 5.5em; }
.axis span, .reflabels span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.reflabels span { color: var(--ink-2); font-weight: 600; }
.track:hover .bar, .track:focus .bar { filter: brightness(1.08); }
.bars-stack .track { margin-right: 3.5em; }
.bars-stack .axis { margin-right: 3.5em; }
.stack { position: absolute; left: 0; top: 50%; height: 18px; transform: translateY(-50%); display: flex; }
.seg { position: relative; height: 100%; background: var(--c); box-shadow: inset -2px 0 0 var(--surface); min-width: 2px; display: grid; place-items: center; cursor: default; }
.seg:last-child { border-radius: 0 4px 4px 0; box-shadow: none; }
.seg:hover, .seg:focus { filter: brightness(1.1); outline: none; }
.seg-label { font-size: 11px; font-weight: 600; color: var(--ci, var(--ink)); pointer-events: none; }
.track-group { height: auto; display: flex; flex-direction: column; gap: 3px; padding: 5px 0; }
.gline { position: relative; height: 12px; }
.gline .bar { height: 10px; }
.dots .track-dots { height: 36px; }
.brow-dots { min-height: 38px; }
.dotg { position: absolute; left: 0; right: 0; height: 0; }
.ci { position: absolute; top: -1px; height: 2px; background: var(--c); border-radius: 2px; }
.dot { position: absolute; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--surface); transform: translate(-50%, -50%); cursor: default; }
.dot::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
.dot:hover, .dot:focus { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); outline: none; }
.dots .track { margin-right: 1em; }
.dots .axis, .dots .reflabels { margin-right: 1em; }

.heat-wrap { overflow-x: auto; }
.heat { display: grid; gap: 2px; font-size: 12px; min-width: 300px; }
.hh { text-align: center; color: var(--muted); font-size: 11.5px; padding: 2px 0; }
.hr { text-align: right; padding-right: 8px; color: var(--ink-2); font-size: 12px; line-height: 1.3; align-self: center; }
.hc { display: grid; place-items: center; min-height: 26px; border-radius: 4px; font-variant-numeric: tabular-nums; font-size: 11.5px; cursor: default; }
.hc:hover, .hc:focus { outline: 2px solid var(--ink); outline-offset: -2px; }
.hc-empty { color: var(--muted); }
.hc-zero { color: var(--muted); background: var(--surface-2); }
.heat-scale { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.heat-ramp { display: inline-flex; }
.heat-ramp i { width: 18px; height: 10px; }

.multiples { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.multiples.is-single { grid-template-columns: minmax(0, 420px); }
.panel-title { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 2px; }
svg.lines { width: 100%; height: auto; overflow: visible; }
.lines .gridline { stroke: var(--grid); stroke-width: 1; }
.lines .tick { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.lines .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.lines .ln-dot { stroke: var(--surface); stroke-width: 2; }
.lines .crosshair { stroke: var(--ink-2); stroke-width: 1; opacity: 0; }
.lines .crosshair.on { opacity: .6; }
.lines .hit { fill: transparent; cursor: crosshair; }

.tbar-wrap { overflow-x: auto; }
.tbar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; min-width: 420px; }
.tseg { background: var(--c); box-shadow: inset -2px 0 0 var(--surface); min-width: 4px; cursor: default; }
.tseg:last-child { box-shadow: none; }
.tseg:hover, .tseg:focus { filter: brightness(1.1); outline: none; }
.tbar-labels { display: flex; min-width: 420px; }
.tlab { display: flex; flex-direction: column; padding: 6px 4px 0 0; font-size: 12px; line-height: 1.4; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.tlab strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.viz-switch .seg-ctl { margin-bottom: 4px; }
.viz-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 16px; }
.viz-pair .chart { margin: .8em 0; }

/* 示意图 */
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.flow-step { position: relative; flex: 1 1 150px; min-width: 150px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); }
.flow-step:not(:last-child)::after { content: "→"; position: absolute; right: -18px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.flow-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.flow-no { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; flex: none; }
.flow-title { font-weight: 700; font-size: 14px; }
.flow-time { margin-left: auto; font-size: 12px; color: var(--accent); font-weight: 600; }
.flow-body { margin-top: 4px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.flow-tag { margin-top: 6px; font-size: 12px; color: var(--muted); }
.tone-warn { border-color: color-mix(in srgb, var(--warn) 70%, transparent); background: color-mix(in srgb, var(--warn-soft) 60%, var(--surface)); }
.tone-accent { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); }
.tone-good { border-color: color-mix(in srgb, var(--good) 55%, transparent); }
.tone-bad { border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.tone-muted { opacity: .92; }

.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 18px; padding-left: 16px; border-left: 2px solid var(--grid); }
.tree li { position: relative; margin: 8px 0; }
.tree ul > li::before { content: ""; position: absolute; left: -16px; top: 16px; width: 14px; border-top: 2px solid var(--grid); }
.tnode { display: inline-flex; flex-direction: column; gap: 2px; max-width: 100%; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); }
.tnode-label { font-weight: 600; font-size: 13.5px; line-height: 1.45; }
.tnode-note { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

.yearline { list-style: none; margin: 0; padding: 0; position: relative; }
.yearline::before { content: ""; position: absolute; left: 2.6em; top: 6px; bottom: 6px; width: 2px; background: var(--grid); }
.yearline li { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); gap: 12px; margin: 10px 0; position: relative; }
.yl-year { font: 700 13px/1.8 var(--mono); color: var(--ink-2); text-align: right; padding-right: 14px; position: relative; }
.yl-year::after { content: ""; position: absolute; right: -9px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface); }
.yl-card { padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.yl-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 14px; }
.yl-level { display: inline-flex; gap: 3px; flex: none; }
.yl-level i { width: 8px; height: 8px; border-radius: 50%; background: var(--grid); }
.yl-level i.on { background: var(--accent); }
.yl-body { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.yl-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

.cardgrid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 10px; }
.dcard { padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); }
.dcard-kicker { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.dcard-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; color: var(--accent); }
.dcard-title { font-weight: 700; font-size: 14px; line-height: 1.45; margin-top: 2px; }
.dcard-body { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.55; }

.matmap { display: flex; flex-direction: column; gap: 8px; }
.mm-row { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) 5.4em; align-items: center; gap: 10px; }
.mm-year { font: 600 13px var(--mono); color: var(--ink-2); }
.mm-bar { display: flex; height: 30px; border-radius: 6px; }
.mm-blk { display: grid; place-items: center; background: var(--c); color: var(--ci); font-size: 11px; font-weight: 700; box-shadow: inset -2px 0 0 var(--surface); min-width: 6px; }
.mm-blk:first-child { border-radius: 6px 0 0 6px; }
.mm-blk:last-child { border-radius: 0 6px 6px 0; box-shadow: none; }
.mm-blk:hover, .mm-blk:focus { filter: brightness(1.1); text-decoration: none; }
.mm-total { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.btgrid { display: flex; flex-direction: column; gap: 2px; overflow-x: auto; }
.btgrid-row { display: grid; grid-template-columns: minmax(12em, 1fr) repeat(6, 3em); gap: 2px; align-items: center; min-width: 460px; }
.btgrid-head span { font: 600 12px var(--mono); color: var(--muted); text-align: center; }
.btgrid-head span:first-child { text-align: left; font-family: var(--font); }
.bt-rule { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; padding: 4px 6px 4px 0; }
.bt-cell { display: grid; place-items: center; height: 28px; border-radius: 5px; font-weight: 700; font-size: 13px; }
.bt-cell.ok { background: var(--good-soft); color: var(--good-text); }
.bt-cell.no { background: var(--bad-soft); color: var(--bad-text); }
.bt-cell.is-test { box-shadow: inset 0 0 0 2px var(--accent-line); }
.btgrid-head .is-test { color: var(--accent); }

/* 提示框 */
.tip { position: absolute; z-index: 60; min-width: 120px; max-width: 300px; padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 12.5px; line-height: 1.5; pointer-events: none; opacity: 0; transition: opacity .08s; }
.tip.on { opacity: 1; }
.tip-title { color: var(--muted); font-size: 11.5px; margin-bottom: 2px; }
.tip-row { display: flex; align-items: baseline; gap: 6px; }
.tip-row strong { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tip-label { color: var(--ink-2); }
.tip-key { display: inline-block; width: 12px; height: 3px; border-radius: 2px; flex: none; align-self: center; }

/* ============ 首页与概览 ============ */
.hero { padding: 12px 0 8px; }
.hero-kicker { margin: 0; color: var(--accent); font-weight: 700; font-size: 14px; letter-spacing: .06em; }
.hero h1 { font-size: 2.2rem; line-height: 1.25; margin: 6px 0 10px; }
.hero-lede { color: var(--ink-2); max-width: 46em; margin: 0; }
.subjects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 26px 0; }
.subj { position: relative; display: block; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.subj:hover { text-decoration: none; border-color: var(--accent-line); }
.subj::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: var(--s1); }
.subj-sl::before { background: var(--s2); }
.subj-k { font-weight: 700; color: var(--ink-2); }
.subj-big { font-size: 2.4rem; font-weight: 700; line-height: 1.2; }
.subj-sub { color: var(--ink-2); font-size: 14px; }
.subj ul { margin: 10px 0 0; padding-left: 1.2em; font-size: 14px; color: var(--ink-2); }
.subj-go { position: absolute; right: 18px; bottom: 14px; color: var(--accent); font-weight: 700; }
.plan { padding: 14px 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.plan h3 { margin: 0 0 8px; font-size: 1.05rem; }
.plan-steps { margin: 0; padding-left: 1.4em; }
.plan-steps li { margin: 6px 0; }
.plan-steps a { font-weight: 600; margin-right: 8px; }
.plan-steps span { color: var(--ink-2); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.stat { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.stat-v { font-size: 1.55rem; font-weight: 700; line-height: 1.25; }
.stat-l { color: var(--ink-2); font-size: 13px; }
.triple { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tcard { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); }
.tcard:hover { text-decoration: none; border-color: var(--accent-line); }
.tcard span { font-size: 13.5px; color: var(--ink-2); }
.doclist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.dcard-link { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); }
.dcard-link:hover { text-decoration: none; border-color: var(--accent-line); box-shadow: var(--shadow); }
.dcard-link.is-read { opacity: .86; }
.dcard-q { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.dl-no { font: 700 12px var(--mono); color: var(--accent); display: flex; justify-content: space-between; }
.dl-read { color: var(--good-text); font-family: var(--font); }
.dl-title { font-weight: 700; }
.dl-purpose { font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.dl-meta { margin-top: auto; font-size: 12px; color: var(--muted); }
.hub-charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }

/* ============ 题库 ============ */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); position: sticky; top: calc(var(--top-off) + 8px); z-index: 5; }
.filters select, .filters input[type="search"] { height: 34px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); max-width: 100%; }
.filters input[type="search"] { flex: 1 1 200px; }
.qstat { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 2px; font-size: 13.5px; color: var(--ink-2); }
.qlist { list-style: none; margin: 0; padding: 0; }
.qrow { border-bottom: 1px solid var(--border); padding: 10px 2px; }
.qrow-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--ink); }
.qrow-main:hover { text-decoration: none; }
.qrow-main:hover .qsub { color: var(--accent); }
.qid { font: 700 13px var(--mono); }
.qsub { font-weight: 600; font-size: 14.5px; }
.qmeta { margin-left: auto; display: inline-flex; gap: 4px; }
.qslogan { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.qpager { display: flex; justify-content: space-between; align-items: center; margin: 18px 0; font-size: 14px; }
.qdetail .qhead h1 { font-size: 1.6rem; margin: 6px 0 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.qhead-sub { font-size: 1rem; font-weight: 600; color: var(--ink-2); }
.qhead-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13.5px; }
.stem { margin: 18px 0; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); }
.stem-k { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .08em; }
.stem-text { margin: 4px 0 8px; font-size: 1.02em; line-height: 1.8; white-space: pre-wrap; }
.stem-req { margin: 0; color: var(--ink-2); font-size: .95rem; }
.opts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.opt { width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); text-align: left; cursor: pointer; line-height: 1.6; flex-wrap: wrap; }
.opt:hover { border-color: var(--accent-line); }
.opt-k { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--surface-2); font-weight: 700; font-size: 13px; flex: none; }
.opt.is-right { border-color: var(--good); background: var(--good-soft); }
.opt.is-right::after { content: "✓ 正确"; margin-left: auto; color: var(--good-text); font-weight: 700; font-size: 13px; }
.opt.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.is-wrong::after { content: "✗ 你的选择"; margin-left: auto; color: var(--bad-text); font-weight: 700; font-size: 13px; }
.opt-why { flex-basis: 100%; font-size: 12.5px; color: var(--ink-2); padding-left: 34px; }
.opt-mono { font-family: var(--mono); font-size: 15px; }
.answer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.answer-k { font-weight: 700; color: var(--accent); }
.answer-v { font-size: 1.5rem; color: var(--accent); }
.answer-src { font-size: 13px; color: var(--ink-2); }
.answer.is-hidden, .analysis.is-hidden { display: none; }
.analysis { margin-top: 10px; }
.qsec { margin: 18px 0; }
.qsec h3 { font-size: 1.02rem; margin: 0 0 4px; color: var(--accent); }
.qsec p { margin: 4px 0; }
.chain { color: var(--ink-2); }
.slogan { margin: 10px 0; padding: 10px 14px; border-left: 4px solid var(--s4); background: color-mix(in srgb, var(--warn-soft) 70%, var(--surface)); border-radius: 0 10px 10px 0; font-weight: 500; }

/* 申论题库 */
.sl-year h2 { display: flex; align-items: baseline; justify-content: space-between; font-size: 1.2rem; margin: 26px 0 10px; }
.sl-year-link { font-size: 13px; font-weight: 500; }
.slcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.slcard { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); }
.slcard:hover { text-decoration: none; border-color: var(--accent-line); box-shadow: var(--shadow); }
.slcard-top { display: flex; align-items: center; gap: 8px; }
.slcard-score { font-weight: 700; }
.slcard-words { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.slcard-id { font-weight: 700; font-size: 14px; display: flex; gap: 8px; align-items: baseline; }
.slcard-id span { font-weight: 500; color: var(--ink-2); font-size: 12.5px; }
.slcard-stem { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.slcard-done { font-size: 12px; color: var(--good-text); }
.tabs-local { display: flex; gap: 4px; margin: 18px 0 10px; border-bottom: 1px solid var(--border); }
.tabs-local a { padding: 8px 14px; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs-local a.on { color: var(--accent); border-bottom-color: var(--accent); }
.tabs-local a:hover { text-decoration: none; color: var(--ink); }
.mats { display: flex; flex-direction: column; gap: 8px; }
.mat { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.mat.is-rel { border-color: var(--accent-line); }
.mat summary { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; }
.mat-no { font-weight: 700; }
.mat-chars { font-size: 12.5px; color: var(--muted); }
.para { margin: 0; padding: 6px 12px 6px 14px; line-height: 1.85; border-left: 3px solid transparent; }
.para.is-key { border-left-color: var(--s4); background: color-mix(in srgb, var(--warn-soft) 70%, transparent); }
.para-id { display: inline-block; margin-right: 8px; padding: 0 5px; border-radius: 4px; background: var(--surface-2); font: 600 11px/1.8 var(--mono); color: var(--muted); vertical-align: .1em; }
.para.is-key .para-id { background: var(--s4); color: var(--s4-ink); }
.practice-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; font-size: 14px; color: var(--ink-2); }
.clock { font: 700 1.4rem/1 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.clock.over { color: var(--bad-text); }
.answer-input { width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); line-height: 1.85; resize: vertical; font-size: max(16px, calc(16px * var(--fs, 1))); }
.counter { display: flex; align-items: center; gap: 12px; margin: 6px 2px; font-size: 14px; }
.lim { font-size: 13px; }
.lim-good { color: var(--good-text); } .lim-good::before { content: "✓ "; }
.lim-mid { color: var(--ink-2); }
.lim-bad { color: var(--bad-text); font-weight: 600; } .lim-bad::before { content: "✗ "; }
.practice-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0; }
.reveal { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--border); }
.reveal h3 { font-size: 1.05rem; }
.ptlist { padding-left: 1.4em; }
.ptlist li { margin: 6px 0; }
.ptlist label { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; cursor: pointer; }
.ptlist input { transform: translateY(2px); }
.pt-text { font-weight: 600; }
.pt-basis { font-size: 12.5px; color: var(--muted); }
.selfscore { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.selfscore strong { font-size: 1.2rem; }
.refans { padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); line-height: 1.9; }
.refans p { margin: 4px 0; }

/* ============ 搜索 ============ */
.srlist { list-style: none; padding: 0; margin: 0; }
.sr { padding: 10px 2px; border-bottom: 1px solid var(--border); }
.sr a { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--ink); }
.sr a:hover { text-decoration: none; }
.sr a:hover .sr-h { color: var(--accent); }
.sr-t { font: 600 12.5px var(--mono); color: var(--muted); }
.sr-h { font-weight: 600; }
.sr-x { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.65; }

/* ============ 工具 ============ */
.toolgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.toolcard { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); }
.toolcard:hover { text-decoration: none; border-color: var(--accent-line); box-shadow: var(--shadow); }
.toolcard span { color: var(--ink-2); font-size: 13.5px; }
.formulas { display: grid; gap: 4px; }
.formula { padding: 6px 12px; margin: 8px 0; border-radius: 10px; background: var(--surface-2); overflow-x: auto; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 14px 0; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.field-label { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-2); font-weight: 600; }
.field input[type="number"], .field input[type="text"], .field select { height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); }
.field input[type="range"] { width: 100%; accent-color: var(--accent); }
.field-hint { font-size: 12px; color: var(--muted); }
.result { margin: 14px 0; padding: 12px 16px 12px 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); position: relative; }
.result::before { position: absolute; left: 14px; top: 12px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; }
.result.good { border-color: color-mix(in srgb, var(--good) 50%, transparent); background: var(--good-soft); }
.result.good::before { content: "✓"; background: var(--good); }
.result.warn { border-color: color-mix(in srgb, var(--warn) 70%, transparent); background: var(--warn-soft); }
.result.warn::before { content: "!"; background: var(--warn); color: #0b0b0b; }
.result.bad { border-color: color-mix(in srgb, var(--bad) 50%, transparent); background: var(--bad-soft); }
.result.bad::before { content: "✗"; background: var(--bad); }
.result.mid::before { content: "i"; background: var(--accent); color: var(--accent-ink); }
.result p { margin: 4px 0; }
.result-big { font-size: 1.6rem; font-weight: 700; line-height: 1.3; }
.tool-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.quiz { margin: 16px 0; padding: 16px 18px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); }
.quiz-type { display: inline-block; padding: 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 700; }
.quiz-q { font-size: 1.08rem; line-height: 1.8; margin: 8px 0; font-weight: 600; }
.quiz-opts { display: grid; gap: 8px; margin: 10px 0; }
.quiz-fb .btn-primary { margin-top: 8px; }
.recip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin: 10px 0 16px; }
.recip { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-variant-numeric: tabular-nums; font-size: 14px; }
.passage { padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); line-height: 1.9; }
.passage p { margin: 4px 0; }
.gen { margin-top: 16px; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); }
.gen-type { font-size: 13px; color: var(--ink-2); }
.gen h3 { font-size: 1rem; margin: 14px 0 6px; color: var(--accent); }
.gen-thesis { font-weight: 700; font-size: 1.05rem; }
.gen-points li { font-weight: 600; margin: 4px 0; }

/* ============ 第二批示意图 ============ */
.chart-extra { margin-top: 12px; }
.chart-extra > p { margin: 0; font-size: 13px; line-height: 1.6; }
.chart .chart { margin: .6em 0 0; padding: 12px 0 0; border: 0; border-top: 1px dashed var(--border); border-radius: 0; background: transparent; }
.fx .katex { font-size: 1em; }

/* 思维导图 */
.mm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 10px; }
.mm-count { margin-left: auto; font-size: 12px; color: var(--muted); }
.mm-scroll { overflow-x: auto; padding-bottom: 4px; }
.mmap { display: inline-flex; align-items: center; padding: 4px 2px; }
.mm-node { position: relative; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; flex: none; padding: 5px 9px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 13px; line-height: 1.45; max-width: 18em; }
.mm-node.lv0 { max-width: 9em; flex-direction: column; align-items: flex-start; gap: 4px; padding: 9px 12px; font-weight: 700; font-size: 14.5px; background: var(--accent-soft); border-color: var(--accent-line); color: var(--ink); }
.mm-node.lv0 .mm-badge { white-space: normal; background: var(--surface); }
.mm-node.lv1 { max-width: 12.5em; font-weight: 700; border: 2px solid var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 12%, var(--surface)); }
.mm-node.lv2 { max-width: 15em; border-left: 3px solid var(--c, var(--accent)); }
.mm-node.lv3 { max-width: 19em; font-size: 12.5px; border-color: var(--border); color: var(--ink-2); }
.mm-text { display: flex; flex-direction: column; color: inherit; min-width: 0; }
a.mm-text:hover { text-decoration: none; color: var(--accent); }
.mm-label { overflow-wrap: anywhere; }
.mm-note { font-size: 11.5px; font-weight: 400; color: var(--ink-2); line-height: 1.4; }
.mm-badge { flex: none; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font: 600 11px/1.7 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mm-tog { flex: none; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-2); font: 700 12px/1 var(--mono); cursor: pointer; }
.mm-tog:hover { border-color: var(--accent-line); color: var(--accent); }
.mm-kids { list-style: none; margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; justify-content: center; position: relative; }
.mm-kids::before { content: ""; position: absolute; left: 0; top: 50%; width: 18px; border-top: 2px solid var(--c, var(--axis)); }
.mm-li { position: relative; display: flex; align-items: center; padding: 3px 0 3px 16px; }
.mm-li::before { content: ""; position: absolute; left: 0; top: 50%; width: 16px; border-top: 2px solid var(--c, var(--axis)); }
.mm-li::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px solid var(--c, var(--axis)); }
.mm-li:first-child::after { top: 50%; }
.mm-li:last-child::after { bottom: 50%; }
.mm-li:only-child::after { display: none; }
.mm-kids-root::before { border-top-color: var(--axis); }
.mo { font-size: 14px; }
.mo-root { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-weight: 700; }
.mo-ul { list-style: none; margin: 0; padding: 0 0 0 14px; }
.mo-top { padding-left: 4px; margin-top: 6px; }
.mo-li { margin: 2px 0; }
.mo-lv1 { margin: 8px 0; padding: 4px 0 4px 10px; border-left: 3px solid var(--c, var(--accent)); }
.mo-lv1 > .mo-row { font-weight: 700; }
.mo-row { display: flex; align-items: flex-start; gap: 8px; padding: 3px 0; line-height: 1.5; }
.mo-row .mm-tog { margin-top: 1px; }
.mo-dot { flex: none; width: 22px; text-align: center; color: var(--muted); }
.mo-dot::before { content: "·"; font-weight: 700; }
.mo-text { display: flex; flex-direction: column; min-width: 0; color: var(--ink); }
a.mo-text { color: var(--ink); }
a.mo-text:hover { color: var(--accent); text-decoration: none; }
.mo-text .mm-note { font-weight: 400; }
.mo-lv3 .mo-text, .mo-lv2 .mo-text { font-size: 13.5px; }
.docmap { margin: 0 0 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.docmap > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 14px; cursor: pointer; font-size: 14px; }
.docmap-k { font-weight: 700; }
.docmap .chart { margin: 0; border: 0; border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; }
.rpaths { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--border); }
.rpaths-title { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.rpath { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rpath-name { min-width: 5.5em; font-size: 13px; font-weight: 700; }
.rpath-steps { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.rpath-arrow { color: var(--muted); font-weight: 700; }

/* 阶梯 */
.ladder { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lad { display: grid; grid-template-columns: 2.6em minmax(0, 1fr); gap: 10px; align-items: start; margin-left: calc(var(--i, 0) * 7px); padding: 8px 12px 8px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.lad-rank { display: grid; place-items: center; min-height: 2.2em; border-radius: 8px; font: 700 14px/1 var(--font); background: var(--o3); color: var(--o3-ink); }
.lad-t3 .lad-rank { background: var(--o5); color: var(--o5-ink); }
.lad-t1 .lad-rank { background: var(--o1); color: var(--o1-ink); }
.lad-title { font-weight: 700; font-size: 14.5px; line-height: 1.5; }
.lad-why { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin-top: 2px; }
.lad-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lad-chip { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 2px 8px; border-radius: 7px; background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.lad-chip b { color: var(--ink); font-weight: 600; }
.lad-tail { margin: 0; font-size: 13px; color: var(--ink-2); }

/* 自查清单 */
.ck-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; font-size: 13px; color: var(--ink-2); }
.ck-per { padding: 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; line-height: 1.8; }
.ck-done { margin-left: auto; font-variant-numeric: tabular-nums; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ck { padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.ck label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; line-height: 1.6; font-size: 14.5px; }
.ck input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
.ck-no { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.ck:has(input:checked) { border-color: color-mix(in srgb, var(--good) 50%, transparent); background: color-mix(in srgb, var(--good-soft) 70%, var(--surface)); }
.ck:has(input:checked) .ck-q { color: var(--ink-2); }
.ck-guards { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 4px 0 0 56px; font-size: 12px; }
.ck-k { color: var(--muted); }

/* 判定卡 */
.vd-sum { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.vd-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.vd-pill i, .vd-verdict i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--muted); flex: none; }
.vd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.vd { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; background: var(--surface); }
.vd-phrase { font-weight: 700; font-size: 14.5px; line-height: 1.5; }
.vd-verdict { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; font-weight: 600; line-height: 1.55; }
.vd-verdict i { margin-top: 1px; }
.vd-ev { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.vd-bad { border-left-color: var(--bad); } .vd-bad .vd-verdict { color: var(--bad-text); } .vd-pill.vd-bad i, .vd-bad .vd-verdict i { background: var(--bad); }
.vd-warn { border-left-color: var(--warn); } .vd-warn .vd-verdict { color: var(--warn-text); } .vd-pill.vd-warn i, .vd-warn .vd-verdict i { background: var(--warn); color: #0b0b0b; }
.vd-part { border-left-color: var(--serious); } .vd-part .vd-verdict { color: var(--ink); } .vd-pill.vd-part i, .vd-part .vd-verdict i { background: var(--serious); color: #0b0b0b; }
.vd-none { border-left-color: var(--deemph); } .vd-none .vd-verdict { color: var(--ink-2); } .vd-pill.vd-none i, .vd-none .vd-verdict i { background: var(--muted); }

/* 7 天计划 */
.wk { display: grid; grid-template-columns: 4.4em repeat(var(--slots, 3), minmax(0, 1fr)); gap: 4px; font-size: 12.5px; line-height: 1.55; }
.wk-corner { min-height: 1px; }
.wk-slot { padding: 2px 8px; font-weight: 700; color: var(--ink-2); font-size: 12px; }
.wk-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px; border-radius: 8px; background: var(--surface-2); font-family: var(--mono); }
.wk-day.is-key { background: var(--accent); color: var(--accent-ink); }
.wk-flag { font: 600 11px var(--font); padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--accent-ink) 22%, transparent); }
.wk-cell { padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); overflow-wrap: anywhere; }
.wk-cell.is-key { border-color: var(--accent-line); background: var(--accent-soft); }
.wk-cell p { margin: 0; }

/* 证据可靠性 */
.ev-strip { display: flex; height: 26px; margin-bottom: 10px; border-radius: 6px; overflow: hidden; font-size: 12px; font-weight: 700; }
.ev-seg { display: grid; place-items: center; background: var(--c); color: var(--ci); box-shadow: inset -2px 0 0 var(--surface); white-space: nowrap; min-width: 2.6em; }
.ev-seg:last-child { box-shadow: none; }
.ev-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ev { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.ev-chip { display: grid; place-items: center; align-self: start; min-height: 2em; border-radius: 7px; background: var(--c, var(--surface-2)); color: var(--ci, var(--ink-2)); font-weight: 700; font-size: 12.5px; }
.ev-concl { font-weight: 700; font-size: 14px; line-height: 1.5; }
.ev-grade { margin-left: 6px; color: var(--accent); font-weight: 600; }
.ev-rel, .ev-meta, .ev-limit { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; margin-top: 2px; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.ev-limit { color: var(--muted); }
.ev b { color: var(--ink); font-weight: 600; }

/* 时间轴（甘特） */
.gt-scroll { overflow-x: auto; }
.gt { min-width: 520px; font-size: 12.5px; }
.gt-row { display: grid; grid-template-columns: 8.6em minmax(0, 1fr); align-items: center; column-gap: 10px; min-height: 36px; }
.gt-label { color: var(--ink-2); line-height: 1.3; text-align: right; display: flex; flex-direction: column; }
.gt-label small { color: var(--muted); font-size: 11px; }
.gt-track { position: relative; height: 30px; margin-right: 12px; }
.gt-seg { position: absolute; top: 3px; bottom: 3px; background: var(--c); box-shadow: inset -2px 0 0 var(--surface); display: grid; place-items: center; overflow: hidden; cursor: default; }
.gt-seg:first-of-type { border-radius: 5px 0 0 5px; }
.gt-seg.is-ghost { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 55%, transparent) 0 6px, color-mix(in srgb, var(--c) 25%, transparent) 6px 12px); }
.gt-seg:hover, .gt-seg:focus { filter: brightness(1.08); outline: none; }
.gt-lab { font-size: 11px; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--surface) 78%, transparent); padding: 0 4px; border-radius: 4px; white-space: nowrap; }
.gt-mark { position: absolute; top: -8px; bottom: -8px; width: 0; border-left: 2px dashed var(--bad); pointer-events: none; }
.gt-row-marks { min-height: 22px; }
.gt-marklabels { position: relative; height: 20px; margin-right: 12px; }
.gt-marklabels span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; font-size: 11.5px; font-weight: 700; color: var(--bad-text); }
.gt-row-axis { min-height: 22px; }
.gt .axis { margin-right: 12px; }

/* 对应矩阵 */
.rmx-scroll { overflow-x: auto; }
.rmx { display: grid; gap: 3px; min-width: 420px; font-size: 12.5px; }
.rmx-h { text-align: center; font: 600 11.5px var(--mono); color: var(--muted); padding: 2px 0; }
.rmx-r { color: var(--ink-2); text-align: right; padding-right: 8px; align-self: center; }
.rmx-c { min-height: 28px; border-radius: 5px; background: var(--surface-2); }
.rmx-c.is-on { display: grid; place-items: center; background: var(--c); color: var(--ci); font-weight: 700; cursor: default; }
.rmx-key { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 14px; font-size: 12.5px; color: var(--ink-2); }
.rmx-key b { font-family: var(--mono); margin-right: 6px; color: var(--ink); }

/* 公文样张 */
.sheets { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.sheet-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 6px; font-size: 13.5px; }
.sheet-id { font: 700 12px var(--mono); color: var(--accent); }
.paper { padding: 14px 16px 16px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; line-height: 1.7; }
.pl { display: flex; align-items: baseline; gap: 8px; }
.pl-text { flex: 1; min-width: 0; }
.pl-tag { order: 2; flex: none; display: inline-flex; align-items: center; gap: 4px; max-width: 46%; font-size: 11px; color: var(--accent); line-height: 1.35; text-align: right; }
.pl-tag i { flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-style: normal; font-size: 10px; font-weight: 700; }
.pl-title .pl-text { text-align: center; font-weight: 700; font-size: 15px; letter-spacing: .08em; }
.pl-sub .pl-text { text-align: center; color: var(--ink-2); }
.pl-para .pl-text { text-indent: 2em; color: var(--ink-2); }
.pl-item .pl-text { padding-left: 2em; }
.pl-close .pl-text { text-indent: 2em; color: var(--ink-2); }
.pl-sign .pl-text, .pl-date .pl-text { text-align: right; }
.pl-title, .pl-salute { margin-top: 4px; }
.pl-sign { margin-top: 8px; }
.sheet-notes { margin: 8px 0 0; padding-left: 1.2em; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.gw3 { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; line-height: 1.6; }

/* 比例结构条 */
.pb-total { font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.pb-bar { display: flex; height: 34px; border-radius: 6px; overflow: hidden; }
.pb-seg { display: grid; place-items: center; background: var(--c); box-shadow: inset -2px 0 0 var(--surface); min-width: 0; overflow: hidden; cursor: default; }
.pb-seg:last-child { box-shadow: none; }
.pb-seg span { font-size: 12px; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--surface) 75%, transparent); padding: 0 5px; border-radius: 4px; white-space: nowrap; }
.pb-ranges { display: flex; margin-top: 4px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pb-ranges span { min-width: 0; text-align: center; }
.pb-detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-top: 12px; }
.pb-card { padding: 8px 12px; border: 1px solid var(--border); border-top: 3px solid var(--c); border-radius: 8px; background: var(--surface); }
.pb-card-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; font-weight: 700; font-size: 13.5px; }
.pb-card-h span { font-weight: 500; color: var(--muted); font-size: 12px; }
.pb-card ol { margin: 4px 0 0; padding-left: 1.3em; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.ess-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.chip-static { cursor: default; }
.chip-static:hover { background: var(--surface); }

/* 骨架卡 */
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.cc { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); }
.cc-head { display: flex; align-items: baseline; gap: 8px; font-size: 14.5px; }
.cc-head a { font-weight: 700; }
.cc-id { font: 700 12px var(--mono); color: var(--accent); }
.cc-when { font-size: 12.5px; color: var(--ink-2); }
.cc-when b { color: var(--ink); font-weight: 600; }
.cc-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; counter-reset: cc; }
.cc-steps li { position: relative; padding: 4px 8px 4px 30px; border-radius: 7px; background: var(--surface-2); font-size: 13px; line-height: 1.5; counter-increment: cc; }
.cc-steps li::before { content: counter(cc); position: absolute; left: 7px; top: 5px; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 10.5px; font-weight: 700; }
.cc-note { font-size: 12px; color: var(--ink-2); line-height: 1.55; padding-top: 2px; }
.cc-cover { margin-top: auto; padding-top: 4px; font-size: 12px; color: var(--muted); }

/* 并行泳道 */
.lanes { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 10px; }
.lane { padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); }
.lane-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 15px; }
.lane-kicker { font-size: 12px; color: var(--muted); font-weight: 600; }
.lane-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.lane-steps li { position: relative; display: grid; grid-template-columns: 3em minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); }
.lane-steps li:not(:last-child)::after { content: "↓"; position: absolute; left: 18px; bottom: -15px; color: var(--muted); font-weight: 700; font-size: 12px; line-height: 1; }
.lane-k { font-weight: 700; font-size: 12.5px; color: var(--accent); }
.lane-v { font-size: 13px; line-height: 1.55; }

/* 信号行 */
.sig { display: flex; flex-direction: column; gap: 4px; }
.sig-row { display: grid; grid-template-columns: minmax(6em, 10em) minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; align-items: center; padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); font-size: 13px; }
.sig-head { border: 0; background: transparent; padding-block: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.sig-row.tone-accent { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); }
.sig-row.tone-warn { border-color: color-mix(in srgb, var(--warn) 70%, transparent); background: color-mix(in srgb, var(--warn-soft) 60%, var(--surface)); }
.sig-tag { font-weight: 700; line-height: 1.45; }
.sig-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sig-res { display: flex; align-items: baseline; gap: 6px; line-height: 1.55; }
.sig-res > i { flex: none; font-style: normal; color: var(--accent); font-weight: 700; }
.sig-res small { display: block; color: var(--ink-2); font-size: 12px; margin-top: 2px; }
.four-checks { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.fc-title { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.fc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fc { display: flex; flex-direction: column; padding: 6px 10px; border-radius: 8px; background: var(--surface); font-size: 12.5px; }
.fc strong { font-size: 14px; }
.fc-note { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-2); }

/* 漏斗 */
.fnl-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.fnl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fnl-l { width: var(--w); display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 10px; border-radius: 8px; background: color-mix(in srgb, var(--c) 22%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); font-size: 13px; text-align: center; flex-wrap: wrap; }
.fnl-no { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.fnl-side { display: flex; flex-direction: column; gap: 6px; }
.fnl-card { padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); font-size: 13px; }
.fnl-card p { margin: 2px 0 0; color: var(--ink-2); line-height: 1.6; }

/* 类比、逻辑、论证、资料关系 */
.mini-flow { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.mini-flow li { position: relative; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.mini-flow li:not(:last-child)::after { content: "→"; position: absolute; right: -14px; color: var(--muted); }
.mini-flow span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11px; }
.an-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.an { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.an-rel { font-weight: 700; font-size: 13.5px; }
.an-tpl { font-size: 13px; color: var(--accent); font-weight: 600; }
.an-ex { font-size: 12px; color: var(--muted); }
.lg-scroll { overflow-x: auto; }
.lgc { display: flex; flex-direction: column; gap: 3px; min-width: 560px; }
.lg-row { display: grid; grid-template-columns: minmax(8em, 1fr) minmax(7em, 1fr) minmax(10em, 1.4fr) minmax(9em, 1.2fr); gap: 8px; align-items: center; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.lg-head { background: transparent; font-size: 12px; font-weight: 700; color: var(--muted); padding-block: 0; }
.lg-name { font-weight: 600; }
.lg-f { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.lg-f small { color: var(--ink-2); font-size: 11.5px; }
.lg-ok .katex { color: var(--good-text); }
.lg-bad .katex { color: var(--bad-text); }
.lg4 { margin-top: 12px; }
.lg4-title { font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.lg4-grid { display: grid; grid-template-columns: 5em repeat(2, minmax(0, 12em)); gap: 4px; align-items: stretch; }
.lg4-h { display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.lg4-c { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px; border-radius: 8px; font-size: 13px; }
.lg4-c.ok { background: var(--good-soft); color: var(--good-text); }
.lg4-c.no { background: var(--bad-soft); color: var(--bad-text); }
.lg4-c .katex { color: var(--ink); }
.lg4 p { margin: 8px 0 0; font-size: 12.5px; line-height: 1.6; }
.arg { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr) auto minmax(0, 1fr); gap: 8px; align-items: start; }
.arg-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.arg-box { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 3.6em; padding: 8px 10px; border: 2px solid var(--accent-line); border-radius: 10px; background: var(--accent-soft); text-align: center; }
.arg-box strong { font-size: 15px; }
.arg-box span { font-size: 12px; color: var(--ink-2); }
.arg-arrow { align-self: start; padding-top: 1.1em; color: var(--accent); font-size: 20px; font-weight: 700; }
.arg-ops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.arg-op { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; padding: 6px 8px; border-radius: 8px; border-left: 4px solid var(--c); background: var(--surface-2); font-size: 12.5px; line-height: 1.5; }
.arg-kind { font-weight: 700; }
.arg-op small { margin-left: auto; color: var(--muted); font-family: var(--mono); }
.zr-scroll { overflow-x: auto; }
.zr { display: grid; grid-template-columns: minmax(7em, 1fr) minmax(12em, 1.6fr) minmax(7em, 1fr); gap: 8px; align-items: center; min-width: 480px; }
.zr-node { display: flex; flex-direction: column; align-items: center; padding: 10px; border-radius: 12px; border: 2px solid var(--accent-line); background: var(--accent-soft); font-size: 13px; }
.zr-sym { font: 700 22px/1.2 var(--mono); color: var(--accent); }
.zr-edge { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; font-size: 13px; }
.zr-h { background: linear-gradient(var(--axis), var(--axis)) center / 100% 2px no-repeat; }
.zr-v { background: linear-gradient(var(--axis), var(--axis)) center / 2px 100% no-repeat; min-height: 4.4em; justify-content: center; }
.zr-lab { display: inline-flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 2px 8px; padding: 2px 8px; border-radius: 6px; background: var(--surface); }
.zr-lab b { font-size: 11.5px; color: var(--accent); white-space: nowrap; }
.zr-center { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 10px; border: 1px dashed var(--accent-line); font-size: 12.5px; }
.rules { margin: 0; padding-left: 1.3em; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.rules b { color: var(--ink); }
.baodi-x { display: flex; flex-direction: column; gap: 4px; }
.baodi-x .formula { margin: 0; }

/* 申论题目总览 */
.qov { display: flex; flex-direction: column; gap: 6px; }
.qov-row { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); align-items: center; gap: 10px; }
.qov-year { font: 600 13px var(--mono); color: var(--ink-2); }
.qov-bar { display: flex; height: 46px; border-radius: 7px; overflow: hidden; }
.qov-q { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 0 8px; min-width: 0; background: var(--c); color: var(--ci); box-shadow: inset -2px 0 0 var(--surface); line-height: 1.25; overflow: hidden; }
.qov-q:last-child { box-shadow: none; }
.qov-q:hover, .qov-q:focus { filter: brightness(1.08); text-decoration: none; }
.qov-n { font: 700 12px var(--mono); }
.qov-s { font-size: 12px; font-weight: 700; }
.qov-s::after { content: " 分"; font-weight: 400; }
.qov-t { font-size: 11px; opacity: .9; }

/* 题目页：推理链、思路图、热区、原卷链接、优先级分布 */
.chainflow { margin: 10px 0 4px; }
.chainflow figcaption { font-weight: 700; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.chainflow ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.chainflow li { position: relative; display: flex; align-items: baseline; gap: 6px; flex: 1 1 160px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); font-size: .95em; line-height: 1.55; }
.chainflow li:not(.is-last)::after { content: "→"; position: absolute; right: -17px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.chainflow li.is-last { border-color: var(--accent-line); background: var(--accent-soft); }
.cf-no { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.pdf-link { font-weight: 600; white-space: nowrap; }
.prbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 12px 2px 0; font-size: 12.5px; color: var(--ink-2); }
.prbar-k { font-weight: 700; }
.prbar-track { flex: 1 1 260px; display: flex; height: 22px; border-radius: 6px; overflow: hidden; min-width: 0; }
.prbar-seg { display: grid; place-items: center; background: var(--c); color: var(--ci); font-size: 11.5px; font-weight: 700; box-shadow: inset -2px 0 0 var(--surface); min-width: 1.6em; }
.prbar-seg:last-child { box-shadow: none; }
.prbar-seg:hover { text-decoration: none; filter: brightness(1.08); }
.prbar-legend { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; }
.prbar-legend span { display: inline-flex; align-items: center; gap: 4px; }
.prbar-legend i { width: 10px; height: 10px; border-radius: 3px; }
.think { margin: 4px 0 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.think-title { font-weight: 700; margin-bottom: 8px; }
.tm { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: 8px 16px; }
.tm-step { position: relative; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); font-size: 12.5px; line-height: 1.55; min-width: 0; }
.tm-step:not(:last-child)::after { content: "→"; position: absolute; right: -13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.tm-head { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; font-size: 13.5px; }
.tm-k { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.tm-body p { margin: 0; }
.tm-body ul { margin: 0; padding-left: 1.1em; }
.tm-body li { margin: 1px 0; overflow-wrap: anywhere; }
.tm-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px !important; }
.ph { margin-top: 12px; }
.ph-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.ph-title .muted { font-weight: 400; font-size: 12px; }
.ph-row { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); align-items: center; gap: 8px; margin: 3px 0; }
.ph-label { font-size: 12px; color: var(--ink-2); }
.ph-track { display: flex; gap: 2px; height: 24px; }
.ph-cell { min-width: 6px; padding: 0; border: 0; border-radius: 3px; background: var(--surface-3); color: var(--ink-2); font: 600 10.5px var(--mono); cursor: pointer; overflow: hidden; }
.ph-cell:hover, .ph-cell:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.ph-scale { display: flex; align-items: center; gap: 2px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.ph-scale i { width: 18px; height: 10px; }
.ph-scale span { margin: 0 4px; }
.para.flash { animation: flash 1.6s ease-out; }

/* 手机外壳：底部导航、回到顶部、字号、滑动提示 */
.bottomnav { display: none; }
.fs-wrap { position: relative; flex: none; }
.fs-btn { font-size: 14px; font-weight: 700; }
.fs-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); white-space: nowrap; }
.fs-k { font-size: 12.5px; color: var(--ink-2); margin-right: 2px; }
.fs-val { min-width: 3.2em; text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; }
.to-top { position: fixed; z-index: 25; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-size: 20px; cursor: pointer; }
.to-top:hover { border-color: var(--accent-line); color: var(--accent); }
.scroll-hint { margin: 1em 0 -0.7em; text-align: right; font-size: 11.5px; color: var(--muted); }
.chart .scroll-hint, .think .scroll-hint, .mm-wrap .scroll-hint { margin: 0 0 4px; }
.can-scroll:not(.at-end) { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), rgba(0, 0, 0, .25)); mask-image: linear-gradient(to right, #000 calc(100% - 28px), rgba(0, 0, 0, .25)); }
.nav-app { margin: 6px 0 0; }
.nav-app > summary { padding: 5px 10px; border-radius: 7px; cursor: pointer; color: var(--muted); font-size: 12.5px; }
.nav-app > summary:hover { background: var(--surface-2); color: var(--ink); }
.nav-app ul { list-style: none; margin: 2px 0 0; padding: 0 0 0 8px; }

/* ============ 笔记（手写笔 / 手指涂画） ============ */
.main { position: relative; }
.ink-layer { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 6; overflow: visible; pointer-events: none; }
.ink-layer.is-on { pointer-events: auto; touch-action: none; cursor: crosshair; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; box-shadow: inset 0 0 0 2px var(--accent-line); border-radius: 6px; }
.ink-layer.is-on.is-erase { cursor: cell; }
.ink-layer.is-hidden .ink-hl, .ink-layer.is-hidden .ink-pen { display: none; }
.ink-hl { opacity: var(--hl-alpha, .4); }
.ink-hl path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ink-pen path { stroke: none; }
.ink-ring { fill: color-mix(in srgb, var(--surface) 40%, transparent); stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 3 3; }
body.inking .main { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
body.inking .to-top { display: none; }

.ink-fab { position: fixed; z-index: 44; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(76px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px 0 13px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); font: 700 14px var(--font); cursor: pointer; }
.ink-fab:hover { filter: brightness(1.07); }
.ink-fab .ink-ico { width: 18px; height: 18px; }
.ink-fab-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-ink); color: var(--accent); font-size: 12px; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.ink-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ink-bar { position: fixed; z-index: 46; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: max-content; max-width: min(820px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--border-strong); background: color-mix(in srgb, var(--surface) 97%, transparent); backdrop-filter: saturate(1.4) blur(10px); box-shadow: 0 6px 28px rgba(0, 0, 0, .18); }
.ink-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ink-grow { flex: 1 1 0; min-width: 4px; }
.ink-sep { width: 1px; height: 22px; background: var(--border-strong); flex: none; }
.ink-segs, .ink-tools { display: inline-flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--surface-2); }
.ink-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 34px; min-width: 34px; padding: 0 9px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink-2); font: 600 13px var(--font); cursor: pointer; white-space: nowrap; }
.ink-btn:hover:not(:disabled) { color: var(--ink); background: var(--surface-3); }
.ink-btn.on { background: var(--surface); border-color: var(--accent-line); color: var(--accent); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.ink-btn:disabled { opacity: .35; cursor: default; }
.ink-btn.is-armed { background: var(--bad-soft); color: var(--bad-text); border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.ink-done { background: var(--accent); color: var(--accent-ink); }
.ink-done:hover:not(:disabled) { background: var(--accent); color: var(--accent-ink); filter: brightness(1.07); }
.ink-colors { display: inline-flex; align-items: center; gap: 6px; padding: 0 2px; }
.ink-colors.is-dim { opacity: .45; }
.ink-sw { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; }
.ink-sw.on { box-shadow: 0 0 0 2px var(--accent); }
.ink-size { min-width: 52px; }
.ink-dot { display: inline-block; border-radius: 50%; background: currentColor; }
.ink-hint { font-size: 12px; color: var(--muted); padding: 0 2px; }
.ink-toast { position: fixed; z-index: 47; left: 50%; transform: translateX(-50%); bottom: calc(150px + env(safe-area-inset-bottom, 0px)); max-width: min(560px, calc(100vw - 32px)); padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--page); font-size: 13.5px; line-height: 1.6; box-shadow: var(--shadow); }
.ink-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.ink-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); }
.ink-list a:hover { text-decoration: none; border-color: var(--accent-line); }
.ink-list small { color: var(--muted); font-size: 12px; }

/* ============ 响应式 ============ */
@media (max-width: 1279px) {
  .doc-layout { grid-template-columns: minmax(0, 820px); }
  .toc-rail { display: none; }
  .toc-mobile { display: block; }
}
@media (max-width: 1023px) {
  .menu-btn { display: inline-grid; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 40; top: var(--top-off); left: 0; width: min(300px, 86vw); height: calc(100vh - var(--top-off)); padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); transform: translateX(-102%); transition: transform .18s ease; box-shadow: var(--shadow); }
  body.drawer-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: var(--top-off) 0 0 0; z-index: 35; background: rgba(0, 0, 0, .35); }
  .main { padding-block: 20px 56px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .brand-text { display: none; }
}
@media (max-width: 720px) {
  body { font-size: calc(15.5px * var(--fs, 1)); }
  .prose { font-size: calc(15.5px * var(--fs, 1)); }
  .topbar { gap: 8px; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .tabs { margin-left: 0; }
  .tabs a { padding: 6px 8px; font-size: 14px; }
  .search-input { width: 100%; }
  .page-head h1, .doc-title { font-size: 1.45rem; }
  .hero h1 { font-size: 1.7rem; }
  .subjects, .triple { grid-template-columns: minmax(0, 1fr); }
  .bars { --label-w: 7.2em; }
  .track, .axis, .reflabels { margin-right: 4em; }
  .cardgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { flex-direction: column; gap: 14px; }
  .flow-step { flex-basis: auto; }
  .flow-step:not(:last-child)::after { content: "↓"; right: auto; left: 18px; top: auto; bottom: -19px; transform: none; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager-next { text-align: left; }
  .qmeta { margin-left: 0; }
  .filters { position: static; }
  .chart { padding: 12px 12px 10px; }
  .main { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .mm-row { grid-template-columns: 2.8em minmax(0, 1fr); }
  .mm-total { display: none; }
  .yearline li { grid-template-columns: 3.6em minmax(0, 1fr); }
  .yearline::before { left: 2.4em; }
}
@media (max-width: 1023px) {
  .tm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-step:first-child { grid-column: 1 / -1; }
  .tm-step::after { display: none; }
}
@media (max-width: 720px) {
  /* 底部导航代替顶栏的科目标签和菜单按钮 */
  .tabs, .menu-btn { display: none; }
  .top-search { display: none; }
  .search-link { display: inline-grid; margin-left: auto; }
  .brand-text { display: inline; font-size: 15px; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; z-index: 45; left: 0; right: 0; bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: max(6px, env(safe-area-inset-left, 0px)); padding-right: max(6px, env(safe-area-inset-right, 0px));
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-top: 1px solid var(--border);
  }
  .bn-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 56px; border: 0; background: transparent; color: var(--ink-2); font: 600 11.5px/1.2 var(--font); cursor: pointer; }
  .bn-item:hover { text-decoration: none; }
  .bn-ico { font-size: 17px; line-height: 1.2; }
  .bn-item.on { color: var(--accent); }
  .bn-item.on .bn-ico { transform: translateY(-1px); }
  .sidebar { bottom: 0; height: auto; }
  .to-top { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); }
  .lad { margin-left: 0; }
  .sig-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .sig-head { display: none; }
  .fc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fnl-wrap { grid-template-columns: minmax(0, 1fr); }
  .lanes { grid-template-columns: minmax(0, 1fr); }
  .arg { grid-template-columns: minmax(0, 1fr); }
  .arg-arrow { padding: 0; text-align: center; transform: rotate(90deg); }
  .ev { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ev-chip { justify-self: start; min-height: 1.7em; padding: 0 10px; }
  .wk { display: flex; flex-direction: column; gap: 4px; }
  .wk-corner, .wk-slot { display: none; }
  .wk-day { flex-direction: row; justify-content: space-between; margin-top: 8px; padding: 6px 10px; }
  .wk-cell::before { content: attr(data-slot); display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
  .chainflow ol { flex-direction: column; gap: 14px; }
  .chainflow li { flex-basis: auto; }
  .chainflow li:not(.is-last)::after { content: "↓"; right: auto; left: 16px; top: auto; bottom: -17px; transform: none; }
  .tm { grid-template-columns: minmax(0, 1fr); }
  .qov-t { display: none; }
  .qov-q { padding: 0 4px; }
  .pl-tag { max-width: 40%; }
  .mm-count { margin-left: 0; width: 100%; }
  /* 笔记：手机上工具条贴底（替代底部导航），按钮只留图标 */
  body.inking .bottomnav { display: none; }
  .ink-fab { bottom: calc(124px + env(safe-area-inset-bottom, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); }
  .ink-bar { left: 0; right: 0; bottom: 0; transform: none; width: auto; max-width: none; border-radius: 14px 14px 0 0; padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); }
  .ink-row { flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .ink-row-b .ink-lbl, .ink-hide .ink-lbl, .ink-clear .ink-lbl { display: none; }
  .ink-row-b .ink-size .ink-lbl { display: inline; }
  .ink-row-b .ink-sep { display: none; }
  .ink-hint { display: none; }
  .ink-btn { padding: 0 6px; flex: none; }
  .ink-colors { gap: 5px; flex: none; }
  .ink-sw { width: 24px; height: 24px; }
  .ink-size { min-width: 42px; }
  .ink-toast { bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
  .gt { min-width: 440px; }
  .gt-row { grid-template-columns: 6.6em minmax(0, 1fr); column-gap: 6px; }
}
@media (max-width: 420px) {
  .cardgrid { grid-template-columns: minmax(0, 1fr); }
  .brand-text { display: none; }
  .qov-s::after { content: ""; }
}
/* 在线页面：外框已经按安全区留出顶部空白，粘性顶栏贴在安全区下沿 */
html.mode-artifact .topbar { top: env(safe-area-inset-top, 0px); padding-top: 0; height: 56px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .sidebar, .toc-rail, .toc-mobile, .pager, .chart-foot button, .filters, .tabs-local, .practice-bar, .btn, .btn-ghost, .bottomnav, .to-top, .scroll-hint, .mm-tools, .ink-fab, .ink-bar, .ink-toast { display: none !important; }
  .ink-layer { box-shadow: none !important; }
  .layout { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
  .chart, .table-wrap { break-inside: avoid; }
}
@media (forced-colors: active) {
  .bar, .seg, .tseg, .mm-blk, .dot { forced-color-adjust: none; }
}
