/* 看懂一张脸 · 站点样式
   版面：左栏目录、正文栏、边注栏三列；图版按标本陈列。
   墨绿只画结构线；龙胆紫取自术前画线笔，只用于观察对象、读数和读者落下的标记。 */
:root {
  --paper: #f2f2ee;
  --paper-2: #e7e8e2;
  --sheet: #fafaf7;
  --ink: #171b19;
  --ink-2: #4a524e;
  --ink-3: #636d67;
  --hair: #d2d5ce;
  --rule: #1f4a38;
  --rule-soft: rgba(31, 74, 56, .12);
  --mark: #5a3e9e;
  --mark-soft: rgba(90, 62, 158, .12);
  --veil: rgba(242, 242, 238, .9);
  --shade: rgba(23, 27, 25, .5);
  --shadow: 0 1px 0 rgba(23, 27, 25, .04), 0 18px 40px -24px rgba(23, 27, 25, .35);

  --f-cn: "Noto Serif SC", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", serif;
  --f-num: "Bodoni Moda", "Bodoni 72", "Didot", "Noto Serif SC", serif;
  --f-mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --f-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;

  --t-xs: .75rem;
  --t-s: .84rem;
  --t-m: 1.0625rem;
  --t-l: 1.3rem;
  --t-xl: 1.75rem;
  --t-2xl: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem);
  --t-num: clamp(6rem, 3rem + 11vw, 11.5rem);

  --gut: max(20px, env(safe-area-inset-left, 0px));
  --gut-r: max(20px, env(safe-area-inset-right, 0px));
  --col: 41rem;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111412; --paper-2: #191d1a; --sheet: #161a17;
    --ink: #e8e9e4; --ink-2: #aab2ad; --ink-3: #9aa49e; --hair: #2b322e;
    --rule: #86b39c; --rule-soft: rgba(134, 179, 156, .14);
    --mark: #b8a3f6; --mark-soft: rgba(184, 163, 246, .16);
    --veil: rgba(17, 20, 18, .9); --shade: rgba(0, 0, 0, .66);
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 18px 40px -24px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111412; --paper-2: #191d1a; --sheet: #161a17;
  --ink: #e8e9e4; --ink-2: #aab2ad; --ink-3: #9aa49e; --hair: #2b322e;
  --rule: #86b39c; --rule-soft: rgba(134, 179, 156, .14);
  --mark: #b8a3f6; --mark-soft: rgba(184, 163, 246, .16);
  --veil: rgba(17, 20, 18, .9); --shade: rgba(0, 0, 0, .66);
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 18px 40px -24px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-cn);
  font-size: var(--t-m);
  line-height: 1.95;
  font-feature-settings: "palt" 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  background: var(--paper); z-index: 60;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--rule); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--mark-soft); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 链接：细线从左向右生长 */
.ln {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .35s var(--ease);
}
.ln:hover, .ln:focus-visible { background-size: 100% 1px; }
.prose a:not(.cite):not(.xref) {
  text-decoration: none;
  background: linear-gradient(var(--rule), var(--rule)) 0 100% / 100% 1px no-repeat;
  transition: background-size .3s var(--ease), color .2s;
}
.prose a:not(.cite):not(.xref):hover { color: var(--rule); background-size: 100% 2px; }

/* 页头 */
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.bar.is-scrolled { border-bottom-color: var(--hair); }
.bar-in {
  max-width: 88rem; margin: 0 auto; height: 60px;
  padding-left: var(--gut); padding-right: var(--gut-r);
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand b { font-weight: 700; font-size: 1.06rem; letter-spacing: .16em; }
.brand i { font-style: normal; font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); letter-spacing: .04em; }
.nav { display: flex; gap: 22px; margin-left: auto; font-family: var(--f-ui); font-size: var(--t-s); }
.nav a { text-decoration: none; color: var(--ink-2); padding: 4px 0; position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }
.theme {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--hair); background: transparent;
  display: grid; place-items: center; cursor: pointer; flex: none; transition: border-color .2s, transform .4s var(--ease);
}
.theme:hover { border-color: var(--ink-3); }
.theme:active { transform: rotate(-30deg) scale(.94); }
.theme svg { width: 16px; height: 16px; }
.progress {
  position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px); height: 2px; z-index: 70;
  background: var(--rule); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}

.wrap { max-width: 88rem; margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut-r); }

/* 通用：小标签、读数 */
.eyebrow {
  font-family: var(--f-ui); font-size: var(--t-xs); letter-spacing: .18em; color: var(--ink-3);
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--rule); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-ui); font-size: var(--t-xs);
  color: var(--ink-3); border: 1px solid var(--hair); border-radius: 999px; padding: 1px 9px; line-height: 1.7;
}

/* —— 首页 —— */
.hero {
  display: grid; grid-template-columns: auto minmax(0, 30rem) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px); align-items: start;
  padding-block: clamp(28px, 5vw, 72px) clamp(40px, 6vw, 96px);
}
.vt { display: flex; gap: 18px; align-items: flex-start; }
.vt h1 {
  margin: 0; writing-mode: vertical-rl; text-orientation: upright;
  font-weight: 900; font-size: clamp(3.4rem, 1.6rem + 5.6vw, 7.6rem); line-height: 1; letter-spacing: .1em;
}
.vt p {
  margin: 0; writing-mode: vertical-rl; font-size: var(--t-m); letter-spacing: .32em; color: var(--ink-2);
  padding-top: .4em; border-right: 1px solid var(--rule); padding-right: 10px; line-height: 1.4;
}
.vt p span { font-family: var(--f-ui); font-size: var(--t-xs); letter-spacing: .3em; color: var(--ink-3); }
.hero-copy { padding-top: clamp(0px, 2vw, 24px); display: grid; gap: 22px; align-content: start; }
.hero-copy .quotes { font-size: var(--t-l); line-height: 1.85; margin: 0; }
.hero-copy .quotes q { quotes: "「" "」"; white-space: nowrap; margin-right: .5em; display: inline-block; }
.hero-copy .lead { margin: 0; color: var(--ink-2); max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 20px 12px; border-radius: 999px;
  font-family: var(--f-ui); font-size: var(--t-s); text-decoration: none; border: 1px solid var(--ink);
  transition: background-color .25s, color .25s, transform .25s var(--ease);
}
.btn svg { width: 14px; height: 14px; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(.97); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--rule); border-color: var(--rule); }
.btn.line:hover { background: var(--sheet); }
.facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 0 clamp(20px, 3vw, 44px); margin: 10px 0 0; padding-top: 22px; border-top: 1px solid var(--hair); }
.facts div { display: flex; flex-direction: column-reverse; gap: 4px; }
.facts dd { margin: 0; font-family: var(--f-num); font-size: clamp(2.2rem, 1.4rem + 2vw, 3.2rem); line-height: 1; font-variant-numeric: lining-nums; }
.facts dt { font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-3); letter-spacing: .12em; }
.hero-note { font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-3); line-height: 1.7; margin: 0; max-width: 34em; }

/* 图版 */
.plate { margin: 0; position: relative; }
.plate .frame { position: relative; background: var(--paper-2); overflow: hidden; }
.plate .frame img { width: 100%; height: auto; transition: transform .8s var(--ease), filter .4s; }
.plate svg.ov { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ov line, .ov path, .ov circle.tick { stroke: var(--mark); stroke-width: 2.2; fill: none; vector-effect: non-scaling-stroke; }
.ov .guide { stroke-dasharray: 4 5; opacity: .75; }
.ov circle.pt { fill: var(--mark); stroke: var(--sheet); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ov text {
  fill: var(--mark); font-family: var(--f-mono); paint-order: stroke; stroke: var(--sheet);
  stroke-width: 7px; stroke-linejoin: round; letter-spacing: .02em;
}
.ov .layer { opacity: 0; transition: opacity .35s; }
.ov .layer.on { opacity: 1; }
.ov .layer.on .draw { animation: draw 1.1s var(--ease) both; }
.ov .layer.on .draw:nth-child(2) { animation-delay: .08s; }
.ov .layer.on .draw:nth-child(3) { animation-delay: .16s; }
.ov .layer.on .draw:nth-child(4) { animation-delay: .24s; }
.ov .layer.on .draw:nth-child(5) { animation-delay: .32s; }
.ov .layer.on .draw:nth-child(6) { animation-delay: .4s; }
.ov .layer.on text { animation: rise .6s .5s var(--ease) both; }
@keyframes draw { from { stroke-dasharray: 1 1600; stroke-dashoffset: 0; } to { stroke-dasharray: 1600 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.plate figcaption {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding-top: 12px;
  font-family: var(--f-ui); font-size: var(--t-s); color: var(--ink-2); line-height: 1.65;
}
.plate figcaption .no { font-family: var(--f-mono); color: var(--ink); letter-spacing: .02em; }
.plate figcaption .cap { flex: 1 1 16em; min-width: 0; }
.seg { display: inline-flex; border: 1px solid var(--hair); border-radius: 999px; padding: 3px; gap: 2px; background: var(--sheet); }
.seg button {
  border: 0; background: transparent; border-radius: 999px; padding: 5px 14px; cursor: pointer;
  font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-2); transition: background-color .25s, color .25s;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg button:not([aria-pressed="true"]):hover { color: var(--ink); background: var(--paper-2); }
.hero .plate .frame { box-shadow: var(--shadow); }
.readout {
  display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px;
  font-family: var(--f-mono); font-size: var(--t-s); color: var(--ink-2);
}
.readout b { display: block; font-weight: 400; color: var(--mark); font-size: 1.3rem; letter-spacing: -.01em; }
.readout[hidden] { display: none; }
.readout span { white-space: nowrap; font-size: var(--t-xs); letter-spacing: .02em; }
.essay .pager { grid-column: 2; }

/* 目录：十个单元 */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 24px 28px; border-top: 1px solid var(--ink); }
.section-head h2 { margin: 0; font-size: var(--t-xl); font-weight: 600; letter-spacing: .06em; line-height: 1.3; }
.section-head .hint { margin: 0; font-family: var(--f-ui); font-size: var(--t-s); color: var(--ink-3); }
.find { position: relative; width: min(100%, 20rem); }
.find input {
  width: 100%; border: 0; border-bottom: 1px solid var(--hair); background: transparent; padding: 8px 64px 8px 26px;
  font-family: var(--f-ui); font-size: var(--t-s); color: var(--ink); border-radius: 0; transition: border-color .25s;
}
.find input:focus { outline: none; border-bottom-color: var(--ink); }
.find svg { position: absolute; left: 0; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--ink-3); }
.find output { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); }
.unit { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: clamp(16px, 4vw, 64px); padding-block: 30px 34px; border-top: 1px solid var(--hair); }
.unit[hidden] { display: none; }
.unit-h { position: sticky; top: 84px; align-self: start; }
.unit-h .n { font-weight: 900; font-size: 3.4rem; line-height: 1; letter-spacing: .02em; }
.unit-h h3 { margin: 14px 0 4px; font-size: var(--t-l); font-weight: 600; line-height: 1.45; text-wrap: balance; }
.unit-h .r { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); }
.lessons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 48px); }
.lessons li { border-bottom: 1px solid var(--hair); }
.lessons li[hidden] { display: none; }
.lessons a {
  display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) auto; gap: 2px 14px; align-items: baseline;
  padding: 16px 0 17px; text-decoration: none; position: relative;
}
.lessons .num {
  grid-row: span 2; font-family: var(--f-num); font-size: 2.1rem; line-height: 1; font-variant-numeric: lining-nums;
  font-optical-sizing: auto; transition: color .3s; font-weight: 400;
}
.lessons .t { font-size: 1.08rem; font-weight: 600; line-height: 1.55; text-wrap: balance; }
.lessons .lq { grid-column: 2 / 4; font-size: var(--t-s); color: var(--ink-3); line-height: 1.65; transition: color .3s; }
.lessons .done { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--hair); align-self: center; transition: background-color .3s, border-color .3s; }
.lessons .done.is-done { background: var(--rule); border-color: var(--rule); }
.lessons a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.lessons a:hover::after, .lessons a:focus-visible::after { transform: scaleX(1); }
.lessons a:hover .num { font-style: italic; color: var(--rule); }
.lessons a:hover .lq { color: var(--ink-2); }
.empty { font-family: var(--f-ui); color: var(--ink-3); padding: 40px 0; }

/* 看图条 */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(11rem, 15rem); gap: 18px; overflow-x: auto; padding-bottom: 18px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.strip a { scroll-snap-align: start; text-decoration: none; }
.tile .ph { aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.tile .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.tile:hover .ph img { transform: scale(1.04); }
.tile .tc { display: flex; justify-content: space-between; gap: 10px; padding-top: 10px; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-2); }
.tile .tc .mono { color: var(--ink); }

/* 页脚 */
.foot { margin-top: 96px; border-top: 1px solid var(--ink); }
.foot-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding-block: 36px 56px; font-family: var(--f-ui); font-size: var(--t-s); color: var(--ink-2); line-height: 1.85; }
.foot-in h2 { margin: 0 0 8px; font-family: var(--f-cn); font-size: var(--t-m); font-weight: 600; color: var(--ink); letter-spacing: .08em; }
.foot-in p { margin: 0; }
.foot .sig { font-family: var(--f-cn); font-size: 1.4rem; color: var(--ink); letter-spacing: .2em; }

/* —— 讲稿页 —— */
.lesson { display: grid; grid-template-columns: 13.5rem minmax(0, var(--col)) minmax(0, 16rem); gap: 0 clamp(28px, 3.4vw, 60px); justify-content: center; }
.lesson-head { grid-column: 2 / 4; padding-block: clamp(24px, 4vw, 56px) 28px; position: relative; }
.crumb { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-3); letter-spacing: .08em; }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.head-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 clamp(18px, 3vw, 40px); align-items: end; margin-top: 10px; }
.bignum {
  font-family: var(--f-num); font-size: var(--t-num); line-height: .82; font-weight: 400; letter-spacing: -.02em;
  font-variant-numeric: lining-nums; font-optical-sizing: auto; margin: 0; color: var(--ink);
}
.bignum em { font-style: italic; color: var(--rule); }
.lesson-head h1 { margin: 0 0 .1em; font-size: var(--t-2xl); line-height: 1.25; font-weight: 700; letter-spacing: .03em; text-wrap: balance; }
.lesson-head .sub { font-size: var(--t-l); font-weight: 400; color: var(--ink-2); display: block; letter-spacing: .02em; margin-top: 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--hair); font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-3); letter-spacing: .06em; }
.meta b { font-weight: 500; color: var(--ink-2); font-family: var(--f-mono); letter-spacing: 0; }
.voice { margin: 30px 0 0; padding: 0; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.05rem); line-height: 1.5; font-weight: 600; letter-spacing: .02em; text-wrap: balance; max-width: 22em; }
.voice::before { content: "就医者原话"; display: block; font-family: var(--f-ui); font-size: var(--t-xs); font-weight: 400; color: var(--ink-3); letter-spacing: .2em; margin-bottom: 8px; }
.voice q { quotes: "「" "」"; }
.voice q::before, .voice q::after { color: var(--rule); font-weight: 400; }

.rail { grid-column: 1; grid-row: 2 / span 2; }
.rail-in { position: sticky; top: 92px; padding-top: 8px; font-family: var(--f-ui); font-size: var(--t-s); }
.toc { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--hair); position: relative; }
.toc a { display: block; padding: 6px 0 6px 16px; text-decoration: none; color: var(--ink-3); line-height: 1.5; transition: color .25s; }
.toc a:hover { color: var(--ink); }
.toc a.is-on { color: var(--ink); }
.toc .ind { position: absolute; left: -1px; width: 2px; background: var(--rule); top: 0; height: 0; transition: transform .45s var(--ease), height .45s var(--ease); }
.tools { margin-top: 26px; display: grid; gap: 10px; color: var(--ink-3); font-size: var(--t-xs); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 30px; height: 17px; border-radius: 999px; background: var(--hair); position: relative; margin: 0; cursor: pointer; transition: background-color .25s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--sheet); transition: transform .3s var(--ease); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked { background: var(--ink-2); }
.switch input:checked::after { transform: translateX(13px); }

.article { grid-column: 2; grid-row: 2; min-width: 0; }
.margin { grid-column: 3; grid-row: 2; position: relative; min-width: 0; }
.prose > section { padding-top: 12px; }
.prose h2 {
  font-size: var(--t-l); font-weight: 700; letter-spacing: .06em; line-height: 1.5; margin: 52px 0 18px;
  padding-bottom: 12px; border-bottom: 1px solid var(--rule); display: flex; align-items: baseline; gap: 14px;
}
.prose section:first-child h2 { margin-top: 18px; }
.prose h2 .k { font-family: var(--f-mono); font-size: var(--t-xs); font-weight: 400; color: var(--ink-3); letter-spacing: .04em; }
.prose p { margin: 0 0 1.05em; text-align: justify; text-justify: inter-ideograph; hanging-punctuation: allow-end; }
.prose p.ed-note { font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-3); text-align: left; border-left: 2px dashed var(--hair); padding-left: 12px; }
.ed {
  font-family: var(--f-ui); font-size: .72em; color: var(--ink-3); border: 1px dashed var(--ink-3); border-radius: 4px;
  padding: 0 5px; margin: 0 2px; white-space: nowrap; vertical-align: .08em; opacity: .8;
}
body.hide-ed .ed, body.hide-ed .ed-note { display: none; }
.cite {
  font-family: var(--f-mono); font-size: .64em; vertical-align: .55em; line-height: 0; text-decoration: none;
  color: var(--rule); padding: 0 1px; margin-left: 1px; border-radius: 3px; transition: background-color .2s, color .2s;
}
.cite:hover, .cite.is-hot { background: var(--rule); color: var(--paper); }
.xref { text-decoration: none; border-bottom: 1px dotted var(--ink-3); font-family: var(--f-mono); font-size: .92em; transition: color .2s, border-color .2s; }
.xref:hover { color: var(--rule); border-color: var(--rule); }
.script q { quotes: "「" "」"; background: linear-gradient(transparent 62%, var(--rule-soft) 62%); }
.keys { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: k; }
.keys li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 10px; padding: 14px 0; border-top: 1px solid var(--hair); text-align: justify; }
.keys li:last-child { border-bottom: 1px solid var(--hair); }
.keys .kn { font-weight: 900; font-size: 1.5rem; line-height: 1.25; color: var(--rule); }
.tbl { overflow-x: auto; margin: 10px 0 26px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: var(--t-s); line-height: 1.75; min-width: 32rem; }
.tbl th { font-family: var(--f-ui); font-weight: 600; text-align: left; font-size: var(--t-xs); letter-spacing: .08em; color: var(--ink-2); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 8px 12px 8px 0; }
.tbl td { border-bottom: 1px solid var(--hair); padding: 10px 12px 10px 0; vertical-align: top; }
.tbl tr:last-child td { border-bottom-color: var(--ink); }

/* 文中图版 */
.fig { margin: 34px 0 38px; }
.fig .frame { cursor: zoom-in; }
.fig .frame:hover img { transform: scale(1.015); }
.fig.portrait .frame { max-width: 31rem; }
.fig .tools-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.fig .swap { display: none; }
.fig.show-plate .swap { display: block; }
.fig.show-plate .base { display: none; }

@media (min-width: 1181px) {
  .fig.portrait { display: grid; grid-template-columns: minmax(0, 29rem) minmax(0, 1fr); gap: 26px; align-items: end; }
  .fig.portrait .frame { max-width: none; }
  .fig.portrait figcaption { flex-direction: column; align-items: flex-start; gap: 10px; padding: 0 0 4px; border-top: 1px solid var(--ink); padding-top: 12px; }
  .fig.portrait figcaption .cap { flex: none; }
  .fig.portrait .seg { margin-top: 4px; }
}

/* 边注 */
.sn {
  position: absolute; left: 0; right: 0; font-family: var(--f-ui); font-size: var(--t-xs); line-height: 1.7; color: var(--ink-3);
  padding-left: 12px; border-left: 1px solid var(--hair); transition: color .25s, border-color .25s; word-break: break-word;
}
.sn .snn { font-family: var(--f-mono); color: var(--rule); margin-right: 6px; }
.sn a { color: inherit; text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 2px; }
.sn.is-hot { color: var(--ink); border-left-color: var(--rule); }
.pop {
  position: fixed; z-index: 80; left: var(--gut); right: var(--gut-r); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--sheet); border: 1px solid var(--hair); box-shadow: var(--shadow); border-radius: 12px; padding: 16px 44px 16px 18px;
  font-family: var(--f-ui); font-size: var(--t-s); line-height: 1.75; color: var(--ink-2);
  transform: translateY(12px); opacity: 0; pointer-events: none; transition: transform .35s var(--ease), opacity .25s; max-width: 40rem; margin: 0 auto;
}
.pop.is-on { transform: none; opacity: 1; pointer-events: auto; }
.pop .x { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border: 0; background: transparent; cursor: pointer; color: var(--ink-3); font-size: 18px; }
.pop a { color: var(--ink); }

/* 注 */
.notes { list-style: none; margin: 0; padding: 0; font-family: var(--f-ui); font-size: var(--t-s); line-height: 1.8; color: var(--ink-2); }
.notes li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); padding: 8px 0; border-top: 1px solid var(--hair); word-break: break-word; scroll-margin-top: 90px; transition: background-color .6s; }
.notes li:target, .notes li.is-hot { background: var(--rule-soft); }
.notes .nn { font-family: var(--f-mono); color: var(--rule); }
.notes a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 3px; }

/* 题目 */
.quiz { display: grid; gap: 14px; margin-top: 6px; }
.q { border-top: 1px solid var(--hair); padding: 18px 0 6px; }
.quiz .q:first-child { border-top: 0; padding-top: 4px; }
.q .qh { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 8px; margin: 0 0 12px; font-weight: 600; line-height: 1.75; }
.q .qh .qn { font-family: var(--f-num); font-style: italic; font-size: 1.5rem; line-height: 1.1; font-weight: 400; color: var(--ink-3); }
.opts { display: grid; gap: 8px; margin-left: 2.7rem; }
.opt {
  display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto; align-items: center; gap: 10px; text-align: left;
  width: 100%; border: 1px solid var(--hair); background: var(--sheet); border-radius: 10px; padding: 10px 14px; cursor: pointer;
  font-family: var(--f-cn); font-size: var(--t-m); line-height: 1.6;
  transition: border-color .2s, background-color .25s, transform .2s var(--ease), color .2s;
}
.opt .l { font-family: var(--f-num); font-style: italic; font-size: 1.2rem; color: var(--ink-3); }
.opt .v { font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-3); opacity: 0; transition: opacity .3s; }
.opt:hover:not([disabled]) { border-color: var(--ink-3); }
.opt:active:not([disabled]) { transform: scale(.99); }
.opt[disabled] { cursor: default; }
.opt.is-right { border-color: var(--rule); background: var(--rule-soft); }
.opt.is-right .l, .opt.is-right .v { color: var(--rule); opacity: 1; }
.opt.is-wrong { color: var(--ink-3); }
.opt.is-wrong .t { text-decoration: line-through; text-decoration-color: var(--ink-3); }
.opt.is-wrong .v { opacity: 1; }
.score { font-family: var(--f-ui); font-size: var(--t-s); color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 14px 0 0; border-top: 1px solid var(--hair); }
.score .mono { color: var(--ink); }
.linkbtn { border: 0; background: none; padding: 0; cursor: pointer; font-family: var(--f-ui); font-size: var(--t-s); color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hair); }
.linkbtn:hover { color: var(--ink); text-decoration-color: currentColor; }

/* 看图定位题 */
.loc { margin-top: 30px; border-top: 1px solid var(--ink); padding-top: 18px; }
.loc .lh { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; margin-bottom: 14px; }
.loc .lh h3 { margin: 0; font-size: var(--t-m); font-weight: 700; letter-spacing: .06em; }
.loc .ask { margin: 0 0 14px; }
.stage { position: relative; max-width: 34rem; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.stage.scene { max-width: none; }
.stage img { width: 100%; height: auto; pointer-events: none; }
.stage svg { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; overflow: visible; }
.stage.is-done svg { cursor: default; }
.stage .mk line { stroke: var(--mark); stroke-width: 2.4; vector-effect: non-scaling-stroke; animation: mk .35s var(--ease) both; }
.stage .mk circle { fill: var(--mark-soft); stroke: none; animation: ping .6s var(--ease) both; transform-box: fill-box; transform-origin: center; }
.stage .tg circle.zone { fill: rgba(31, 74, 56, .1); stroke: var(--rule); stroke-width: 1.6; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; animation: grow .6s var(--ease) both; transform-box: fill-box; transform-origin: center; }
.stage .tg circle.c { fill: var(--rule); }
.stage .tg line { stroke: var(--rule); stroke-width: 1.2; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.stage .tg rect.zone { fill: rgba(31, 74, 56, .08); stroke: var(--rule); stroke-width: 1.6; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.stage .bx rect { fill: var(--mark-soft); stroke: var(--mark); stroke-width: 2; vector-effect: non-scaling-stroke; }
.stage .lbl { font-family: var(--f-mono); font-size: 24px; fill: var(--rule); paint-order: stroke; stroke: var(--sheet); stroke-width: 6px; stroke-linejoin: round; }
@keyframes mk { from { stroke-dasharray: 1 60; } to { stroke-dasharray: 60 0; } }
@keyframes ping { from { transform: scale(.2); opacity: 1; } to { transform: scale(1); opacity: 1; } }
@keyframes grow { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.steps { list-style: none; margin: 16px 0 0; padding: 0; font-family: var(--f-ui); font-size: var(--t-s); display: grid; gap: 0; max-width: 34rem; }
.steps li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border-top: 1px solid var(--hair); color: var(--ink-3); transition: color .25s; }
.steps li .i { font-family: var(--f-mono); }
.steps li.is-now { color: var(--ink); }
.steps li.is-now .i { color: var(--mark); }
.steps li.is-now span:nth-child(2) { font-weight: 600; }
.steps li.is-now { box-shadow: inset 2px 0 0 var(--mark); padding-left: 10px; transition: padding-left .3s var(--ease), color .25s; }
.steps li.is-ok .r { color: var(--rule); }
.steps li .r { font-family: var(--f-mono); font-size: var(--t-xs); }
.loc .row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 14px; font-family: var(--f-ui); font-size: var(--t-s); color: var(--ink-2); }
.loc .fine { font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-3); margin-top: 10px; line-height: 1.7; max-width: 34rem; }

/* 上下讲 */
.pager { grid-column: 2 / 4; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 72px; border-top: 1px solid var(--ink); }
.pager a { display: grid; gap: 6px; padding: 22px 0; text-decoration: none; }
.pager a.next { text-align: right; justify-items: end; }
.pager .d { font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-3); letter-spacing: .14em; }
.pager .pn { font-family: var(--f-num); font-size: 3rem; line-height: 1; transition: color .3s; }
.pager .pt { font-weight: 600; font-size: var(--t-m); line-height: 1.5; }
.pager a:hover .pn { font-style: italic; color: var(--rule); }

/* 移动端目录条 */
.mbar { display: none; }

/* 灯箱 */
.lb { position: fixed; inset: 0; z-index: 90; background: var(--shade); display: grid; place-items: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.lb.is-on { opacity: 1; pointer-events: auto; cursor: zoom-out; }
.lb img { max-height: 92vh; width: auto; max-width: 100%; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); transform: scale(.97); transition: transform .45s var(--ease); }
.lb.is-on img { transform: none; }
.peek { position: fixed; z-index: 85; width: 9rem; pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .3s var(--ease); box-shadow: var(--shadow); background: var(--sheet); padding: 6px; }
.peek.is-on { opacity: 1; transform: none; }
.peek span { display: block; font-family: var(--f-mono); font-size: var(--t-xs); padding-top: 4px; color: var(--ink-2); }

/* —— 自序、导论 —— */
.essay { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, var(--col)) minmax(0, 12rem); gap: 0 clamp(24px, 4vw, 72px); justify-content: center; padding-block: clamp(28px, 5vw, 72px) 0; }
.essay .vt { grid-column: 1; justify-content: flex-end; position: sticky; top: 92px; align-self: start; }
.essay .vt h1 { font-size: clamp(3rem, 1.6rem + 4vw, 5.6rem); }
.essay .article { grid-column: 2; grid-row: 1; }
.essay .sign { text-align: right; margin-top: 2em; letter-spacing: .12em; }
.essay .lede { font-size: var(--t-l); line-height: 1.85; }

/* —— 看图 —— */
.atlas-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; padding-block: clamp(28px, 5vw, 64px) 26px; }
.atlas-head h1 { margin: 0; font-size: var(--t-2xl); font-weight: 900; letter-spacing: .08em; line-height: 1.15; }
.atlas-head p { margin: 10px 0 0; color: var(--ink-2); max-width: 36em; }
.atlas-head .count { font-family: var(--f-num); font-size: clamp(4rem, 2rem + 6vw, 8rem); line-height: .8; }
.chips { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 8px; padding-block: 18px; border-top: 1px solid var(--ink); position: sticky; top: calc(60px + env(safe-area-inset-top, 0px)); background: var(--paper); z-index: 20; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; white-space: nowrap; border: 1px solid var(--hair); background: transparent; border-radius: 999px; padding: 5px 14px; cursor: pointer; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-2); transition: all .25s; }
.chips button:hover { border-color: var(--ink-3); color: var(--ink); }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); gap: 34px 22px; padding-top: 22px; }
.grid a { text-decoration: none; }
.grid a[hidden] { display: none; }
.grid .tc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; font-size: var(--t-xs); }
.grid .tc .lt { font-family: var(--f-cn); font-size: var(--t-s); color: var(--ink); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid .tc .ds { grid-column: 1 / -1; color: var(--ink-3); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .ph { position: relative; }
.tile .ph .ai { position: absolute; left: 8px; bottom: 8px; font-family: var(--f-ui); font-size: 10px; letter-spacing: .1em; color: #fff; background: rgba(0, 0, 0, .38); padding: 1px 7px; border-radius: 999px; }

/* 宽度 */
@media (max-width: 1180px) {
  .lesson { grid-template-columns: minmax(0, var(--col)); }
  .lesson-head, .article, .pager { grid-column: 1; }
  .rail, .margin { display: none; }
  .mbar {
    display: flex; position: sticky; top: calc(60px + env(safe-area-inset-top, 0px)); z-index: 40; background: var(--veil);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--hair);
    padding-left: var(--gut); padding-right: var(--gut-r); height: 44px; align-items: center; gap: 12px;
    font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-2);
  }
  .mbar button { margin-left: auto; border: 1px solid var(--hair); background: var(--sheet); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: var(--t-xs); font-family: var(--f-ui); }
  .mbar .cur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 85; background: var(--sheet); border-top: 1px solid var(--hair);
    border-radius: 16px 16px 0 0; padding: 18px var(--gut-r) calc(22px + env(safe-area-inset-bottom, 0px)) var(--gut);
    transform: translateY(105%); transition: transform .45s var(--ease); box-shadow: var(--shadow); max-height: 78vh; overflow: auto;
    font-family: var(--f-ui);
  }
  .sheet.is-on { transform: none; }
  .sheet .toc { border-left: 0; }
  .sheet .toc a { padding: 11px 0; border-bottom: 1px solid var(--hair); font-size: var(--t-m); color: var(--ink-2); }
  .sheet .tools { margin-top: 16px; }
  .essay { grid-template-columns: minmax(0, var(--col)); }
  .essay .vt { position: static; grid-column: 1; justify-content: flex-start; }
  .essay .vt h1 { writing-mode: horizontal-tb; font-size: var(--t-2xl); letter-spacing: .14em; }
  .essay .vt p { writing-mode: horizontal-tb; border-right: 0; border-left: 1px solid var(--rule); padding: 0 0 0 10px; align-self: center; letter-spacing: .16em; }
  .essay .article { grid-column: 1; grid-row: 2; padding-top: 24px; }
  .essay .pager { grid-column: 1; }
}
@media (min-width: 1181px) { .sheet, .scrim { display: none; } }
@media (max-width: 1100px) {
  .hero { grid-template-columns: auto minmax(0, 1fr); }
  .hero-copy { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 1rem; line-height: 1.9; }
  .hero-copy .quotes { font-size: 1.12rem; }
  .hero-copy .quotes q { white-space: normal; display: inline; margin-right: .2em; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; }
  .grid .tc { grid-template-columns: minmax(0, 1fr); }
  .grid .tc .lt { text-align: left; }
  .grid .tc .ds { display: none; }
  .nav { gap: 16px; }
  .nav .opt-link { display: none; }
  .bar-in { gap: 14px; }
  .hero { gap: 14px; padding-top: 18px; }
  .vt { gap: 10px; }
  .vt p { font-size: var(--t-s); }
  .unit { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-block: 24px; }
  .unit-h { position: static; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 16px; }
  .unit-h .n { font-size: 2.4rem; grid-row: span 2; }
  .unit-h h3 { margin: 0; }
  .lessons { grid-template-columns: minmax(0, 1fr); }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .head-grid { grid-template-columns: minmax(0, 1fr); }
  .bignum { font-size: clamp(5.2rem, 26vw, 7rem); margin-bottom: 8px; }
  .opts { margin-left: 0; }
  .pager { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pager a.next { border-top: 1px solid var(--hair); }
  .atlas-head { grid-template-columns: minmax(0, 1fr); }
  .atlas-head .count { display: none; }
  .readout { gap: 6px 18px; }
  .readout b { font-size: 1.1rem; }
}
@media (max-width: 620px) {
  .tbl table { min-width: 0; }
  .tbl thead { display: none; }
  .tbl table, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 12px 0; border-bottom: 1px solid var(--hair); }
  .tbl tr:first-child { border-top: 1px solid var(--ink); }
  .tbl tr:last-child { border-bottom-color: var(--ink); }
  .tbl td { border: 0; padding: 2px 0; }
  .tbl td:first-child { font-weight: 700; font-size: var(--t-m); }
  .tbl td:not(:first-child)::before { content: attr(data-l); display: inline-block; min-width: 4.2em; margin-right: 10px; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-3); letter-spacing: .06em; }
  .facts { grid-template-columns: repeat(2, auto); gap: 14px 40px; }
}
@media (max-width: 420px) {
  .brand i { display: none; }
  .nav { font-size: var(--t-xs); gap: 12px; }
}
.scrim { position: fixed; inset: 0; z-index: 84; background: var(--shade); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.is-on { opacity: 1; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* -- deploy patch: footer contact & seo bar -- */
.foot-in .qrs { display: flex; gap: 14px; margin-top: 12px; }
.foot-in .qr { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 1.2rem; color: var(--ink-2); }
.foot-in .qr img { width: 96px; height: 96px; border-radius: 8px; border: 1px solid var(--hair); background: var(--sheet); padding: 4px; }
@media (min-width: 761px) { .foot-in { grid-template-columns: minmax(0,1.15fr) minmax(0,1fr) minmax(0,1fr) minmax(0,.95fr); } }
.foot-bar { border-top: 1px solid var(--hair); padding-block: 14px 20px; font-family: var(--f-ui); font-size: var(--t-s); color: var(--ink-2); line-height: 1.8; }
.foot-bar p { margin: 0; }
.foot-bar a { color: inherit; }
.foot-bar .disc { margin-top: 4px; color: var(--ink-3); }

/* -- mobile & wechat share patch -- */
img.share-thumb { position: absolute; left: -2000px; top: 0; width: 300px; height: 300px; pointer-events: none; }
button.share { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--hair); background: transparent;
  display: grid; place-items: center; cursor: pointer; flex: none; color: var(--ink-2); transition: border-color .2s, transform .4s var(--ease); }
button.share:hover { color: var(--ink); border-color: var(--ink-2); }
button.share svg { width: 15px; height: 15px; }
.toast { position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: var(--paper); font-family: var(--f-ui); font-size: 1.3rem; padding: 10px 20px;
  border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 80; }
.toast.show { opacity: .93; }
.wx-mask { position: fixed; inset: 0; background: rgba(23,27,25,.74); z-index: 90; display: none; }
.wx-mask.show { display: block; }
.wx-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: var(--sheet); color: var(--ink);
  border-radius: 14px; padding: 28px 24px 22px; width: min(320px, 86vw); text-align: center; line-height: 1.8;
  font-family: var(--f-ui); box-shadow: var(--shadow); }
.wx-card b { display: block; font-size: 1.7rem; letter-spacing: .06em; margin-bottom: 6px; }
.wx-card .hint { font-size: 1.3rem; color: var(--ink-2); }
.wx-arrow { position: absolute; right: 20px; top: 14px; font-size: 2.2rem; color: var(--paper); }
@media (max-width: 620px) { .brand .b-ext { display: none; } .nav { gap: 16px; } .nav a { padding: 8px 0; } }
@media (max-width: 420px) { .brand i { display: none; } }

/* h1 竖排品牌后缀 */
.vt h1 .h1-ext { font-size: .38em; font-weight: 700; letter-spacing: .18em; color: var(--ink-2); }
