/* ===================================================
   高等数学 · 慢读  —  版式与配色
   纸色底、墨色字、朱砂点题
   =================================================== */

:root {
  --paper: #f5f1e7;
  --paper-2: #fbf8f0;
  --paper-3: #efe9dc;
  --ink: #211e19;
  --ink-2: #4b4439;
  --ink-3: #7e7466;
  --line: #ded3bf;
  --line-2: #eae2d2;
  --accent: #9c2f24;
  --accent-2: #b9543f;
  --accent-soft: #f1dfd8;
  --green: #2f5d50;
  --green-soft: #dfe9e3;
  --amber: #8a6420;
  --amber-soft: #f3e8cf;
  --blue: #33557a;
  --blue-soft: #e0e6ee;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "SF Mono", "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  --shadow-s: 0 1px 2px rgba(70, 52, 30, .05);
  --shadow-m: 0 2px 4px rgba(70, 52, 30, .05), 0 14px 30px -18px rgba(70, 52, 30, .35);
  --radius: 4px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 600px at 18% -10%, #fdfaf2 0%, rgba(253, 250, 242, 0) 60%),
    radial-gradient(900px 500px at 100% 0%, #f7f2e6 0%, rgba(247, 242, 230, 0) 55%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}

::selection { background: #f0d3c8; color: #4b1109; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 布局 ---------- */
.shell { position: relative; z-index: 1; }

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 272px;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 18px;
  background: linear-gradient(180deg, rgba(251, 248, 240, .92), rgba(246, 241, 230, .88));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(8px);
  z-index: 40;
}

.brand { display: flex; gap: 12px; align-items: center; padding: 0 6px 18px; }

.seal {
  width: 42px; height: 42px;
  flex: 0 0 42px;
  border: 1.5px solid var(--accent);
  border-radius: 3px;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
  transform: rotate(-1.5deg);
  box-shadow: inset 0 0 0 2px rgba(156, 47, 36, .08);
}

.brand-text h1 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .02em;
  margin: 0 0 2px;
  line-height: 1.3;
}
.brand-text p { margin: 0; font-size: 11.5px; color: var(--ink-3); letter-spacing: .06em; }

.nav-search { padding: 0 4px 12px; }
.nav-search input {
  width: 100%;
  padding: 8px 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  background: rgba(255, 253, 247, .8);
  border: 1px solid var(--line);
  border-radius: 3px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.nav-search input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(156, 47, 36, .08); }
.nav-search input::placeholder { color: #a89d8c; }

.nav { flex: 1; overflow-y: auto; padding: 2px 2px 12px; scrollbar-width: thin; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: #d6cab5; border-radius: 3px; }

.nav-ch { margin-bottom: 14px; }
.nav-ch-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 8px 5px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .12em;
}
.nav-ch-head b {
  font-family: var(--serif);
  font-size: 12.5px;
  color: var(--ink-2);
  letter-spacing: .04em;
  font-weight: 600;
}
.nav-ch-head .cnt { margin-left: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px 6px 10px;
  border-radius: 3px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.45;
  border-left: 2px solid transparent;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: rgba(222, 211, 191, .32); text-decoration: none; color: var(--ink); }
.nav-item.active {
  background: rgba(241, 223, 216, .55);
  border-left-color: var(--accent);
  color: var(--accent);
  font-weight: 500;
}
.nav-item .ni-no {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  width: 22px;
  flex: 0 0 22px;
  letter-spacing: -.02em;
}
.nav-item.active .ni-no { color: var(--accent-2); }
.nav-item .ni-t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: transparent;
  flex: 0 0 5px;
}
.nav-item .dot.done { background: var(--green); }
.nav-item .dot.fuzzy { background: #c99a3e; }
.nav-item.locked { opacity: .5; cursor: default; }
.nav-item.locked:hover { background: none; }

.nav-empty { padding: 18px 10px; color: var(--ink-3); font-size: 13px; }

.side-foot { border-top: 1px solid var(--line); padding: 14px 6px 0; }
.prog-head { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); letter-spacing: .06em; margin-bottom: 7px; }
.prog-head b { font-family: var(--mono); font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.prog-bar { height: 3px; background: var(--paper-3); border-radius: 2px; overflow: hidden; }
.prog-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .4s ease; }
.side-links { display: flex; gap: 14px; margin-top: 12px; font-size: 12px; }
.side-links a { color: var(--ink-3); }
.side-links a:hover { color: var(--accent); text-decoration: none; }

/* ---------- 顶栏 ---------- */
.main { margin-left: 272px; min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 54px;
  padding: 0 34px;
  background: rgba(245, 241, 231, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(222, 211, 191, .7);
}
.crumb {
  min-width: 0;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-actions { margin-left: auto; display: flex; gap: 18px; }
.ghost-link { font-size: 12.5px; color: var(--ink-2); letter-spacing: .03em; }
.ghost-link:hover { color: var(--accent); text-decoration: none; }
.menu {
  display: none;
  width: 32px; height: 32px;
  align-items: center; justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink-2);
  cursor: pointer;
}

.view { max-width: 820px; margin: 0 auto; padding: 46px 34px 100px; }

/* ---------- 首页 ---------- */
.hero { padding: 8px 0 30px; border-bottom: 1px solid var(--line); }
.overline {
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--accent-2);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.28;
  font-weight: 600;
  letter-spacing: .01em;
  margin: 0 0 16px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: 15.5px; color: var(--ink-2); max-width: 620px; margin: 0 0 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  font-size: 11.5px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .6);
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: .03em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-family: var(--sans);
  border-radius: 3px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fdfaf1;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s;
  letter-spacing: .02em;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-m); color: #fdfaf1; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink-3); color: var(--ink); }
.btn.small { padding: 5px 12px; font-size: 12.5px; }

section.block { padding: 34px 0; border-bottom: 1px solid var(--line-2); }
section.block:last-child { border-bottom: none; }
.block-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}
.block-title h2 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  margin: 0;
  letter-spacing: .02em;
}
.block-title span { font-size: 11.5px; color: var(--ink-3); letter-spacing: .06em; }

.where {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: linear-gradient(120deg, rgba(255, 253, 247, .9), rgba(241, 223, 216, .25));
  padding: 18px 22px;
  border-radius: 3px;
}
.where h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.where h3 b { font-family: var(--mono); color: var(--accent); font-weight: 600; margin-right: 6px; }
.where p { margin: 0; font-size: 14px; color: var(--ink-2); }
.where .path { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-3); }
.where .path a { color: var(--accent); }
.where .path i { font-style: normal; color: #bcae99; }

.ch-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ch-card {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .65);
  border-radius: 3px;
  color: var(--ink);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.ch-card:hover { text-decoration: none; border-color: #c9b99f; transform: translateY(-2px); box-shadow: var(--shadow-m); }
.ch-card .cc-no { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: .1em; }
.ch-card h4 { font-family: var(--serif); font-size: 18px; margin: 4px 0 6px; font-weight: 600; }
.ch-card p { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.cc-bar { height: 2px; background: var(--paper-3); border-radius: 2px; overflow: hidden; }
.cc-bar i { display: block; height: 100%; background: var(--accent-2); }

.plan { list-style: none; padding: 0; margin: 0; }
.plan li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--line-2);
}
.plan li:last-child { border-bottom: none; }
.plan .n {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--accent);
  border: 1px solid var(--line);
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.plan b { font-size: 14.5px; font-weight: 600; }
.plan p { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }

/* ---------- 文章 ---------- */
.sec-head { padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.sec-head h1 {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.35;
  font-weight: 600;
  margin: 8px 0 10px;
  letter-spacing: .01em;
}
.sec-head h1 .no {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--accent);
  font-weight: 400;
  margin-right: 10px;
  letter-spacing: 0;
  vertical-align: 2px;
}
.tagline { margin: 0; color: var(--ink-2); font-size: 15px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; }
.meta-row .state { color: var(--green); }

.goals {
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .6);
  padding: 16px 20px 14px;
  margin-bottom: 30px;
  border-radius: 3px;
}
.goals > b { font-size: 12px; letter-spacing: .1em; color: var(--ink-3); font-weight: 500; }
.goals ul { margin: 8px 0 0; padding-left: 18px; }
.goals li { font-size: 13.5px; color: var(--ink-2); margin: 3px 0; }

.article h2 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  margin: 42px 0 14px;
  letter-spacing: .02em;
  position: relative;
  padding-left: 13px;
}
.article h2::before {
  content: "";
  position: absolute;
  left: 0; top: .32em;
  width: 3px; height: .95em;
  background: var(--accent);
  border-radius: 1px;
}
.article h3 {
  font-family: var(--serif);
  font-size: 17.5px;
  font-weight: 600;
  margin: 30px 0 10px;
  color: var(--ink);
  letter-spacing: .02em;
}
.article p { margin: 0 0 14px; }
.article strong { font-weight: 600; color: #1b1813; }
.article ul, .article ol { padding-left: 22px; margin: 0 0 16px; }
.article li { margin: 5px 0; }
.article hr { border: none; border-top: 1px dashed var(--line); margin: 30px 0; }

.lead {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
  color: #332d25;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  margin: 0 0 26px;
}

/* 提示块 */
.callout {
  position: relative;
  margin: 20px 0;
  padding: 14px 18px 13px;
  border-radius: 3px;
  font-size: 14.5px;
  line-height: 1.8;
}
.callout p:last-child { margin-bottom: 0; }
.callout .tag {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: .12em;
  padding: 1px 7px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: 1px;
  font-weight: 500;
}
.callout-idea { background: rgba(223, 233, 227, .55); border-left: 2px solid var(--green); }
.callout-idea .tag { background: var(--green); color: #f4faf6; }
.callout-def { background: rgba(255, 253, 247, .75); border: 1px solid var(--line); border-left: 2px solid var(--ink); }
.callout-def .tag { background: var(--ink); color: #f7f2e7; }
.callout-warn { background: rgba(241, 223, 216, .5); border-left: 2px solid var(--accent); }
.callout-warn .tag { background: var(--accent); color: #fdf6f2; }
.callout-tip { background: rgba(243, 232, 207, .55); border-left: 2px solid var(--amber); }
.callout-tip .tag { background: var(--amber); color: #fdf8ec; }
.callout-note { background: rgba(224, 230, 238, .45); border-left: 2px solid var(--blue); }
.callout-note .tag { background: var(--blue); color: #f5f8fb; }

/* 公式 */
.katex { font-size: 1.05em; }
.katex-display { margin: 18px 0 !important; overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
.formula-block {
  margin: 18px 0;
  padding: 6px 18px;
  background: rgba(255, 253, 247, .7);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  overflow-x: auto;
}
.formula-block .katex-display { margin: 14px 0 !important; }
.formula-inline { background: rgba(222, 211, 191, .25); padding: 1px 4px; border-radius: 2px; }

/* 例题 */
.example {
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 253, 247, .55);
  padding: 18px 22px 16px;
}
.example .ex-head {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 8px;
}
.example .ex-no {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  background: rgba(241, 223, 216, .4);
  padding: 1px 6px;
  border-radius: 2px;
}
.example .ex-title { font-size: 12px; color: var(--ink-3); letter-spacing: .05em; }
.example .q { font-size: 14.8px; margin-bottom: 10px; }
.example .q p:last-child { margin-bottom: 0; }

details.sol { border-top: 1px dashed var(--line-2); padding-top: 9px; margin-top: 4px; }
details.sol summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: .06em;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 7px;
  user-select: none;
}
details.sol summary::-webkit-details-marker { display: none; }
details.sol summary::before {
  content: "+";
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1;
  color: var(--accent);
  transition: transform .18s;
}
details.sol[open] summary::before { content: "−"; }
details.sol .sol-body { padding-top: 10px; font-size: 14.5px; color: var(--ink-2); }
details.sol .sol-body > :first-child { margin-top: 0; }
details.sol .sol-body > :last-child { margin-bottom: 0; }

/* 习题 */
.quiz-set { margin: 18px 0 6px; }
.quiz-item {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 15px 18px 12px;
  margin-bottom: 12px;
  background: rgba(255, 253, 247, .45);
}
.quiz-item .q { font-size: 14.6px; }
.quiz-item .q p:last-child { margin-bottom: 0; }
.quiz-item .q-no {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-right: 7px;
}
.quiz-item details.sol { border-top: 1px dashed var(--line-2); margin-top: 10px; }

/* 公式卡 */
.sec-formulas { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.sec-formulas h2 { font-family: var(--serif); font-size: 19px; margin: 0 0 14px; font-weight: 600; }
.fgrid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.fcard {
  border: 1px solid var(--line-2);
  background: rgba(255, 253, 247, .7);
  border-radius: 3px;
  padding: 10px 14px;
  overflow-x: auto;
}
.fcard .fname { font-size: 10.5px; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 2px; }
.fcard .katex-display { margin: 8px 0 !important; font-size: .96em; }
.fcard p { font-size: 12.5px; color: var(--ink-3); margin: 4px 0 0; }

/* 本节操作 */
.sec-actions {
  margin-top: 38px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .5);
  border-radius: 3px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.sec-actions .ask { font-size: 13px; color: var(--ink-2); margin-right: auto; }
.st-btn {
  font-family: var(--sans);
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s;
}
.st-btn:hover { border-color: var(--ink-3); }
.st-btn.on[data-state="done"] { background: var(--green); border-color: var(--green); color: #f3faf6; }
.st-btn.on[data-state="fuzzy"] { background: #c99a3e; border-color: #c99a3e; color: #fffaf0; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.pager a {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 12px 16px;
  color: var(--ink);
  background: rgba(255, 253, 247, .4);
  transition: border-color .15s, background .15s;
}
.pager a:hover { border-color: #cbbca4; background: rgba(255, 253, 247, .85); text-decoration: none; }
.pager a.next { text-align: right; }
.pager span { display: block; font-size: 10.5px; color: var(--ink-3); letter-spacing: .12em; margin-bottom: 3px; }
.pager b { font-family: var(--serif); font-size: 14.5px; font-weight: 600; }

/* 图表组件 */
.widget {
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 253, 247, .66);
  padding: 14px 16px 12px;
  box-shadow: var(--shadow-s);
}
.widget .w-head {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 8px;
}
.widget .w-head b { font-size: 12px; letter-spacing: .08em; color: var(--ink-2); font-weight: 600; }
.widget .w-head span { font-size: 11.5px; color: var(--ink-3); }
.canvas-wrap { position: relative; width: 100%; }
.canvas-wrap canvas { display: block; width: 100%; border-radius: 2px; background: #fdfbf5; }
.w-controls { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 10px; align-items: center; }
.w-ctl { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.w-ctl label { white-space: nowrap; letter-spacing: .03em; }
.w-ctl output {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
  min-width: 42px;
  text-align: right;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 116px;
  height: 3px;
  background: #d9cdb8;
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fdfaf2;
  box-shadow: 0 1px 3px rgba(80, 50, 30, .3);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fdfaf2; cursor: pointer;
}
.w-readout { margin-top: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }
.w-readout b { color: var(--accent); font-weight: 500; }
.w-readout .g { color: var(--green); }
.w-sub {
  margin: 16px 0 2px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-2);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: .05em;
}
.w-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 2px; font-size: 11.5px; color: var(--ink-2); }
.w-legend span { display: inline-flex; align-items: center; gap: 6px; }
.w-legend i { display: inline-block; width: 18px; height: 0; border-top: 2px solid #999; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.seg button {
  font-size: 11.5px;
  padding: 4px 9px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--sans);
}
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--ink); color: #f8f3e7; }

/* 公式速查页 */
.f-page-head { margin-bottom: 22px; }
.f-page-head h1 { font-family: var(--serif); font-size: 32px; margin: 0 0 8px; font-weight: 600; }
.f-page-head p { color: var(--ink-2); font-size: 14px; margin: 0; }
.f-search { margin: 20px 0 14px; }
.f-search input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--sans);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 253, 247, .8);
  outline: none;
}
.f-search input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(156, 47, 36, .07); }
.f-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.f-filter {
  font-size: 12px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.f-filter.on { background: var(--accent); border-color: var(--accent); color: #fdf7f2; }
.f-group { margin-bottom: 26px; }
.f-group h3 {
  font-family: var(--serif);
  font-size: 15px;
  margin: 0 0 10px;
  color: var(--ink-2);
  font-weight: 600;
}
.f-group h3 a { color: var(--ink-2); }
.f-group h3 a:hover { color: var(--accent); text-decoration: none; }
.f-group .fgrid { grid-template-columns: 1fr; }
.f-none { color: var(--ink-3); font-size: 13.5px; padding: 20px 0; }

/* 页脚 */
.foot {
  margin-top: 50px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .04em;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

/* 遮罩 */
.scrim { display: none; }

@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; width: 286px; box-shadow: 0 0 40px rgba(50, 35, 20, .18); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .view { padding: 30px 18px 80px; }
  .hero h1 { font-size: 32px; }
  .ch-cards { grid-template-columns: 1fr; }
  .fgrid, .f-group .fgrid { grid-template-columns: 1fr; }
  .scrim.show {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(35, 25, 15, .3);
    z-index: 35;
    backdrop-filter: blur(2px);
  }
  .top-actions { display: none; }
  .pager { grid-template-columns: 1fr; }
  .sec-head h1 { font-size: 27px; }
}

@media print {
  .sidebar, .topbar, .sec-actions, .pager, .foot { display: none; }
  .main { margin: 0; }
  body { background: #fff; }
}
