/* =========================================================
   枼星河 · 初中数学可视化
   设计基调：白卡片、细边线、单一强调色、手机优先
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f1f3f8;
  --line: #e8eaf1;
  --line-2: #d9dde8;
  --grid: #eef0f6;

  --ink: #161b24;
  --ink-2: #596175;
  --ink-3: #9098a9;

  --blue: #3960f0;   --blue-soft: #eaefff;
  --teal: #0d9c9c;   --teal-soft: #e0f6f6;
  --amber: #d98015;  --amber-soft: #fdefdb;
  --green: #12a05a;  --green-soft: #e4f7ec;
  --purple: #7150f5; --purple-soft: #eeeaff;
  --red: #e0453f;    --red-soft: #fdeceb;

  --acc: #3960f0;
  --acc-soft: #eaefff;

  --r: 16px;
  --r-sm: 10px;
  --sh: 0 1px 2px rgba(17, 24, 39, .04), 0 12px 28px -20px rgba(17, 24, 39, .28);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

html[data-acc="1"] { --acc: var(--blue); --acc-soft: var(--blue-soft); }
html[data-acc="2"] { --acc: var(--teal); --acc-soft: var(--teal-soft); }
html[data-acc="3"] { --acc: var(--amber); --acc-soft: var(--amber-soft); }
html[data-acc="4"] { --acc: var(--purple); --acc-soft: var(--purple-soft); }
html[data-acc="5"] { --acc: var(--green); --acc-soft: var(--green-soft); }
html[data-acc="6"] { --acc: var(--blue); --acc-soft: var(--blue-soft); }
html[data-acc="7"] { --acc: var(--teal); --acc-soft: var(--teal-soft); }
html[data-acc="8"] { --acc: var(--amber); --acc-soft: var(--amber-soft); }
html[data-acc="9"] { --acc: var(--purple); --acc-soft: var(--purple-soft); }
html[data-acc="10"] { --acc: var(--green); --acc-soft: var(--green-soft); }

html[data-theme="dark"] {
  --bg: #0d1016;
  --surface: #151a22;
  --surface-2: #1b212b;
  --line: #232a36;
  --line-2: #313a49;
  --grid: #1e2531;

  --ink: #eef1f7;
  --ink-2: #a4adbd;
  --ink-3: #737d8d;

  --blue: #6f8fff;   --blue-soft: #1a2542;
  --teal: #35c2c2;   --teal-soft: #10302f;
  --amber: #f0a443;  --amber-soft: #32250f;
  --green: #3fc27d;  --green-soft: #10301f;
  --purple: #9b83ff; --purple-soft: #221c40;
  --red: #f06a63;    --red-soft: #3a1a19;

  --sh: 0 1px 2px rgba(0, 0, 0, .5), 0 16px 32px -24px rgba(0, 0, 0, .8);
}

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
sub, sup { font-size: .72em; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  height: 56px;
  padding: 0 max(14px, calc((100vw - 720px) / 2));
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.icon-btn {
  width: 40px; height: 40px; flex: 0 0 40px;
  display: grid; place-items: center;
  border-radius: 12px; color: var(--ink-2);
  transition: background .16s, color .16s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 20px; height: 20px; }

.tb-mid { flex: 1 1 auto; min-width: 0; text-align: center; }
.tb-sub {
  display: block; font-size: 11px; letter-spacing: .04em;
  color: var(--acc); font-weight: 700;
}
.tb-title {
  display: block; font-size: 14px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------------- 页面骨架 ---------------- */
.page {
  max-width: 720px; margin: 0 auto;
  padding: 14px 14px calc(56px + var(--safe-b));
}

.head { padding: 6px 4px 16px; }
.head-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--ink-3); margin-bottom: 9px;
}
.head-meta .no {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-weight: 700; color: var(--acc);
  background: var(--acc-soft); border-radius: 6px;
  padding: 1px 6px; letter-spacing: .04em;
}
.chip {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  padding: 1px 8px; border-radius: 999px; line-height: 1.6;
  background: var(--surface-2); color: var(--ink-2);
}
.chip.acc { background: var(--acc-soft); color: var(--acc); }

.head h1 {
  font-size: 21px; line-height: 1.38; font-weight: 700;
  letter-spacing: -.01em; text-wrap: balance;
}
.lead {
  margin-top: 8px; font-size: 13.5px; line-height: 1.7;
  color: var(--ink-2);
}

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
  margin-bottom: 12px;
  overflow: hidden;
}
.c-title {
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  color: var(--ink-3); padding: 14px 16px 0;
}

/* ---------------- 画布卡 ---------------- */
.viz-card { padding: 8px 8px 10px; }

.viz-host {
  position: relative;
  max-width: 620px; margin: 0 auto;
  height: clamp(240px, 62vw, 380px);
  border-radius: 12px;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--surface-2) 0%, transparent 62%);
  overflow: hidden;
}
.viz-canvas { display: block; touch-action: none; }

/* 模型、动点专项：图更密（多个动点 + 标注），画布给高一点 */
html[data-series="model"] .viz-host { height: clamp(300px, 80vw, 440px); }

.viz-card .drag-tip {
  position: absolute; left: 8px; top: 8px;
  font-size: 10.5px; color: var(--ink-3);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  padding: 2px 7px; border-radius: 999px;
  pointer-events: none; opacity: .9;
}

/* 控件区 */
.viz-tools {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px; padding: 10px 6px 2px;
}
.viz-tools:empty { display: none; }

.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-2); border-radius: 10px;
}
.seg button {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  padding: 6px 11px; border-radius: 8px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(17,24,39,.1); }

.ctl-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 2px 4px;
}
.ctl-row label { font-size: 12px; color: var(--ink-3); flex: 0 0 auto; min-width: 44px; }
.ctl-row output {
  font-size: 12px; font-variant-numeric: tabular-nums;
  color: var(--ink-2); font-weight: 600; min-width: 42px; text-align: right;
  font-family: ui-monospace, Consolas, monospace;
}
.ctl-row input[type="range"] {
  -webkit-appearance: none; appearance: none;
  flex: 1 1 auto; height: 22px; background: transparent; margin: 0;
}
.ctl-row input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(to right, var(--acc) var(--fill, 50%), var(--line-2) var(--fill, 50%));
}
.ctl-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px;
  border-radius: 50%; background: var(--surface);
  border: 2px solid var(--acc); box-shadow: 0 1px 4px rgba(17,24,39,.2);
}
.ctl-row input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-2); }
.ctl-row input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--acc); }
.ctl-row input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--acc);
}

.acts {
  display: flex; gap: 6px; justify-content: flex-end;
  padding: 8px 6px 0;
}
.acts:empty { display: none; }
.acts button {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  padding: 6px 12px; border-radius: 9px;
  background: var(--surface-2); transition: background .15s, color .15s;
}
.acts button:hover { background: var(--line); color: var(--ink); }
.acts button.primary { background: var(--acc-soft); color: var(--acc); }

/* 读数 chips */
.viz-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 6px 0;
}
.viz-chips:empty { display: none; }
.viz-chips .hud-item {
  font-size: 11.5px; font-family: ui-monospace, Consolas, monospace;
  padding: 3px 9px; border-radius: 7px;
  background: var(--surface-2); color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.viz-chips .hud-item.acc { background: var(--acc-soft); color: var(--acc); font-weight: 600; }
.viz-chips .hud-item.good { background: var(--green-soft); color: var(--green); font-weight: 600; }
.viz-chips .hud-item.bad { background: var(--red-soft); color: var(--red); font-weight: 600; }
.viz-chips .hud-item.warn { background: var(--amber-soft); color: var(--amber); font-weight: 600; }

/* 结论条 */
.viz-verdict {
  margin: 10px 6px 2px;
  font-size: 13px; line-height: 1.6; font-weight: 600;
  color: var(--acc); background: var(--acc-soft);
  border-radius: 10px; padding: 9px 12px;
}
.viz-verdict b { font-weight: 700; }

/* ---------------- 三步卡 ---------------- */
.steps { list-style: none; margin: 0; padding: 12px 16px 16px; }
.steps li {
  display: grid; grid-template-columns: 52px 1fr;
  gap: 10px; align-items: start;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.steps li:first-child { border-top: 0; padding-top: 4px; }
.steps .k {
  font-size: 11.5px; font-weight: 700; line-height: 20px;
  text-align: center; border-radius: 7px;
  background: var(--surface-2); color: var(--ink-2);
}
.steps .k-eye { background: var(--blue-soft); color: var(--blue); }
.steps .k-method { background: var(--acc-soft); color: var(--acc); }
.steps .k-result { background: var(--green-soft); color: var(--green); }
.steps p { font-size: 13.5px; line-height: 1.68; color: var(--ink); }
.steps p b { color: var(--acc); }

/* ---------------- 折叠卡 ---------------- */
.fold-card summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.fold-card summary::-webkit-details-marker { display: none; }
.fold-card summary .chev { width: 16px; height: 16px; transition: transform .2s; color: var(--ink-3); }
.fold-card[open] summary .chev { transform: rotate(180deg); }
.fold-card .proof {
  padding: 0 16px 14px;
  font-size: 13px; line-height: 1.9; color: var(--ink-2);
  border-top: 1px solid var(--line); padding-top: 12px;
}
.fold-card .formula {
  margin: 0 16px 16px; padding: 10px 12px;
  background: var(--surface-2); border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--ink);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  letter-spacing: .01em; overflow-x: auto;
}

.tip-card p { padding: 8px 16px 16px; font-size: 13px; line-height: 1.75; color: var(--ink-2); }

.book {
  font-size: 11.5px; color: var(--ink-3); line-height: 1.8;
  padding: 2px 6px 16px;
}

/* ---------------- 上下条 ---------------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pg {
  display: block; padding: 11px 13px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 13px; box-shadow: var(--sh);
  transition: border-color .16s;
  min-width: 0;
}
.pg:hover { border-color: var(--line-2); }
.pg span { display: block; font-size: 11px; color: var(--ink-3); }
.pg b {
  display: block; font-size: 12.5px; font-weight: 600; line-height: 1.45;
  margin-top: 2px; color: var(--ink);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.pg.next { text-align: right; }
.pg.back { background: transparent; border-style: dashed; }
.pg.back b { color: var(--ink-2); font-weight: 600; }

/* =========================================================
   首页
   ========================================================= */
.home-head { padding: 10px 4px 18px; }
.home-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  color: var(--acc); text-transform: uppercase;
}
.home-head h1 {
  font-size: 26px; font-weight: 750; letter-spacing: -.02em;
  margin-top: 6px;
}
.home-head p { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }

.tabs {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 2px 2px 12px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs.wrap { flex-wrap: wrap; overflow: visible; }
.tab {
  flex: 0 0 auto; font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
  border: 1px solid var(--line);
  transition: all .16s;
}
.tab.on {
  background: var(--ink); color: var(--bg);
  border-color: var(--ink);
}
.tab .n {
  font-size: 11px; opacity: .6; margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.group-title {
  display: flex; align-items: baseline; gap: 8px;
  padding: 14px 6px 8px;
  font-size: 12px; font-weight: 700; color: var(--ink-3);
  letter-spacing: .06em;
}
.group-title .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--g-acc, var(--acc)); flex: 0 0 7px;
}

/* 目录行卡片 */
.list { display: flex; flex-direction: column; gap: 8px; }

.row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(17,24,39,.03);
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.row:active { transform: scale(.988); }
.row:hover { border-color: var(--line-2); box-shadow: var(--sh); }
.row.active { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc-soft); }

.row .ic {
  flex: 0 0 40px; width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--r-soft, var(--surface-2));
  color: var(--r-acc, var(--ink-2));
}
.row .ic svg { width: 26px; height: 26px; }

.row .tx {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.row .tx .tag {
  align-self: flex-start;
  font-size: 10.5px; font-weight: 700; padding: 0 6px;
  border-radius: 5px; line-height: 16px;
  background: var(--r-soft, var(--surface-2)); color: var(--r-acc, var(--ink-3));
}
.row .tt {
  font-size: 14px; font-weight: 650; color: var(--ink);
  line-height: 1.4; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row .br {
  font-size: 11.5px; color: var(--ink-3); line-height: 1.5;
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row .go { flex: 0 0 auto; color: var(--ink-3); width: 16px; height: 16px; }

.home-foot {
  margin-top: 26px; padding: 14px 16px;
  border: 1px dashed var(--line-2); border-radius: 14px;
  font-size: 12px; color: var(--ink-3); line-height: 1.8;
}
.home-foot b { color: var(--ink-2); font-weight: 600; }

/* =========================================================
   首页：品牌 + 专项列表
   ========================================================= */
.tb-brand {
  font-size: 15.5px; font-weight: 800; letter-spacing: .14em; color: var(--acc);
}

.brand-hero { padding: 10px 4px 18px; }
.brand-name {
  font-size: clamp(32px, 9.2vw, 44px);
  font-weight: 800; line-height: 1.12; letter-spacing: .1em;
  width: fit-content;
  background: linear-gradient(104deg, var(--acc) 4%, color-mix(in srgb, var(--acc) 52%, #a855f7) 98%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.brand-tag {
  margin-top: 7px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .26em; color: var(--ink-3);
}
.brand-lead {
  margin-top: 12px; font-size: 13.5px; color: var(--ink-2);
  line-height: 1.78; max-width: 32em;
}
.brand-lead em { font-style: normal; color: var(--acc); font-weight: 700; }

.sec-head {
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 6px 10px;
}
.sec-head b { font-size: 15px; font-weight: 750; letter-spacing: -.01em; }
.sec-head span { font-size: 11.5px; color: var(--ink-3); }

.series-list { display: flex; flex-direction: column; gap: 10px; }

.series {
  display: grid; grid-template-columns: 50px minmax(0, 1fr) 14px;
  align-items: center; gap: 13px;
  padding: 15px 15px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .03);
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.series:hover { border-color: var(--line-2); box-shadow: var(--sh); }
.series:active { transform: scale(.99); }

.series .sic {
  width: 50px; height: 50px; display: grid; place-items: center;
  border-radius: 15px;
  background: var(--s-soft, var(--surface-2)); color: var(--s-acc, var(--ink-2));
}
.series .sic svg { width: 27px; height: 27px; }
.series .stx { min-width: 0; }
.series .sname {
  display: flex; align-items: center; gap: 7px;
  font-size: 16.5px; font-weight: 750; letter-spacing: -.01em; color: var(--ink);
}
.series .sname .badge {
  font-size: 10px; font-weight: 700; line-height: 16px; padding: 0 6px;
  border-radius: 5px; letter-spacing: 0;
  background: var(--s-soft, var(--surface-2)); color: var(--s-acc, var(--ink-3));
}
.series .sdesc {
  margin-top: 4px; font-size: 12.5px; color: var(--ink-3); line-height: 1.55;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.series .smeta { margin-top: 7px; font-size: 11.5px; color: var(--ink-3); }
.series .go { width: 14px; height: 14px; color: var(--ink-3); }

.series.soon {
  border-style: dashed; box-shadow: none;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  cursor: default;
}
.series.soon:hover { border-color: var(--line); box-shadow: none; }
.series.soon:active { transform: none; }
.series.soon .sic { background: var(--surface-2); color: var(--ink-3); }
.series.soon .sname { color: var(--ink-2); font-weight: 650; }
.series.soon .go { display: none; }

/* =========================================================
   目录抽屉
   ========================================================= */
.mask {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10, 14, 22, .42);
  opacity: 0; pointer-events: none;
  transition: opacity .24s;
}
.mask.on { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; z-index: 60;
  top: 0; left: 0; bottom: 0;
  width: min(88vw, 380px);
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  transform: translateX(-102%);
  transition: transform .28s cubic-bezier(.32, .72, 0, 1);
  box-shadow: 24px 0 48px -24px rgba(0, 0, 0, .35);
}
.drawer.on { transform: none; }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 12px 10px 18px;
}
.drawer-head b { font-size: 16px; font-weight: 700; }
.dh-acts { display: flex; align-items: center; gap: 2px; }
.drawer-tabs { padding: 0 14px 10px; }
.tabs.compact { gap: 5px; }
.tabs.compact .tab { padding: 7px 11px; font-size: 12.5px; }
.drawer-list {
  flex: 1 1 auto; overflow-y: auto;
  padding: 4px 12px calc(20px + var(--safe-b));
  -webkit-overflow-scrolling: touch;
}
.drawer-list .group-title:first-child { padding-top: 4px; }

.drawer-switch {
  display: flex; align-items: baseline; gap: 8px;
  margin: 0 12px calc(14px + var(--safe-b));
  padding: 11px 14px;
  border: 1px dashed var(--line-2); border-radius: 12px;
  font-size: 12px; color: var(--ink-3);
}
.drawer-switch b { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--acc); }

/* 页脚信息 */
.site-foot {
  text-align: center; font-size: 11px; color: var(--ink-3);
  padding: 6px 0 10px;
}

/* 轻提示 */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b));
  transform: translate(-50%, 12px);
  background: var(--ink); color: var(--bg);
  font-size: 12.5px; font-weight: 500;
  padding: 9px 16px; border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 80; max-width: 86vw; text-align: center;
}
.toast.on { opacity: .96; transform: translate(-50%, 0); }

@media (max-width: 380px) {
  .head h1 { font-size: 19px; }
  .viz-tools { gap: 6px; }
  .seg button { padding: 6px 9px; font-size: 12px; }
  .acts button { padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* =========================================================
   基础知识（知识点课文页）
   ========================================================= */
.k-head { padding: 8px 4px 14px; }
.k-kicker {
  display: flex; align-items: center; gap: 9px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  color: var(--ink-3);
}
.k-no {
  display: inline-grid; place-items: center;
  min-width: 26px; height: 20px; padding: 0 6px;
  border-radius: 6px;
  background: var(--acc-soft); color: var(--acc);
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.k-head h1 {
  margin-top: 9px;
  font-size: 25px; font-weight: 780; letter-spacing: -.02em; line-height: 1.25;
}

/* 教材对照 */
.k-map {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh);
  padding: 4px 14px; margin-bottom: 12px;
}
.k-map-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0;
  font-size: 12.5px; color: var(--ink);
  line-height: 1.6;
}
.k-map-row + .k-map-row { border-top: 1px dashed var(--line); }
.k-map-row b { font-weight: 600; min-width: 0; }
.k-map-row.muted b { color: var(--ink-3); font-weight: 500; }
.k-tag {
  flex: 0 0 auto; margin-top: 1px;
  font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 6px; line-height: 16px;
}
.k-tag.pe { background: var(--blue-soft); color: var(--blue); }
.k-tag.sk { background: var(--amber-soft); color: var(--amber); }

/* 知识要点卡片 */
.k-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh);
  margin-bottom: 12px; overflow: hidden;
}
.k-h2 {
  padding: 13px 16px 11px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), transparent);
}
.k-list { list-style: none; margin: 0; padding: 4px 16px 8px; }
.k-item { padding: 11px 0; border-bottom: 1px dashed var(--line); }
.k-item:last-child { border-bottom: 0; }
.k-term {
  display: block;
  font-size: 13.5px; font-weight: 700; color: var(--ink);
  line-height: 1.5; margin-bottom: 3px;
  padding-left: 11px; position: relative;
}
.k-term::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--acc);
}
.k-text {
  font-size: 13.5px; line-height: 1.82; color: var(--ink-2);
  padding-left: 11px;
}
.k-sub { list-style: none; margin: 6px 0 0; padding: 0 0 0 11px; }
.k-sub li {
  position: relative;
  font-size: 13px; line-height: 1.78; color: var(--ink-2);
  padding-left: 13px; margin-top: 4px;
}
.k-sub li::before {
  content: ''; position: absolute; left: 2px; top: 10px;
  width: 6px; height: 1.5px; border-radius: 1px;
  background: var(--line-2);
}
.k-sub li b { color: var(--ink); font-weight: 700; }

/* 表格 */
.k-table-card { padding-bottom: 8px; }
.k-table {
  width: 100%; border-collapse: collapse;
  margin: 10px 0 6px;
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.k-table th, .k-table td {
  padding: 9px 8px; text-align: center;
  border-bottom: 1px solid var(--line);
}
.k-table th {
  font-size: 11.5px; font-weight: 700; color: var(--ink-3);
  letter-spacing: .04em; background: var(--surface-2);
}
.k-table td { color: var(--ink); font-family: ui-monospace, Consolas, monospace; }
.k-table tr:last-child td { border-bottom: 0; }

/* 目录行的编号块 */
.row .ic.k-num {
  font-size: 12px; font-weight: 800; letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, Consolas, monospace;
}

.k-text .hl, .k-sub .hl { color: var(--ink); font-weight: 700; }

/* 没有小标题的条目：用同款圆点承接层级 */
.k-item.plain { padding-left: 9px; }
.k-item.plain .k-text { padding-left: 0; position: relative; }
.k-item.plain .k-text::before {
  content: ''; position: absolute; left: -9px; top: 10px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--acc); opacity: .8;
}
