/* 张卜天 · 学术名片 · 校样
   一位译者的名片做成摊在看样台上的一叠校样：裁切线、套准标、色标；
   每一页先印着原文，再被红笔校成中文；页边的旁批就是追问。
   色板只用印刷厂的颜色：纸白、油墨黑、校对红，外加色标上的青、品红、黄。 */

:root {
  --table: #cdd0d1;
  --table-2: #bfc3c5;
  --sheet: #fbfaf6;
  --ink: #161616;
  --ink-2: #4f4f4a;
  --ink-3: #85857d;
  --rule: rgba(22, 22, 22, .16);
  --red: #e1231a;
  --red-2: rgba(225, 35, 26, .1);
  --c: #00a0e9;
  --m: #e4007f;
  --y: #ffe100;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --lat: "EB Garamond", "Garamond", "Times New Roman", serif;
  --bar: 54px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 12px); background: var(--table); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.zh { margin: 0; background: var(--table) radial-gradient(ellipse at 50% 0%, #dadcdc, var(--table) 70%) fixed; color: var(--ink); font-family: var(--serif); font-size: 17.5px; line-height: 1.9; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
a { color: var(--ink); text-decoration-color: var(--rule); text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::selection { background: var(--y); color: var(--ink); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--sheet); padding: 6px 12px; }
.skip:focus { top: 12px; }
button { font: inherit; color: inherit; }

/* ---------- 顶栏 ---------- */
.zbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; height: var(--bar); padding: 0 24px 0 0; background: rgba(251, 250, 246, .95); border-bottom: 1px solid var(--ink); font-family: var(--sans); }
.zbar__logo { display: grid; place-items: center; width: var(--bar); height: var(--bar); background: var(--ink); color: var(--sheet); }
.zbar__logo svg { width: 18px; height: 20px; }
.zbar__t { margin: 0; font-size: 14px; letter-spacing: .04em; }
.zbar__t span { margin-left: 10px; color: var(--ink-3); }
.zbar__nav { margin-left: auto; display: flex; gap: 20px; font-size: 14px; }
.zbar__nav a { text-decoration: none; color: var(--ink-2); }
.zbar__nav a:hover { color: var(--red); }

/* 页码：右侧一列小页签 */
.ztabs { position: fixed; z-index: 30; right: 14px; top: 50%; transform: translateY(-50%); display: grid; gap: 6px; }
.ztabs a { display: grid; place-items: center; width: 26px; height: 32px; background: var(--sheet); border: 1px solid var(--ink-3); font-family: var(--sans); font-size: 11px; text-decoration: none; color: var(--ink-2); box-shadow: 1px 1px 0 rgba(0, 0, 0, .12); }
.ztabs a:hover { border-color: var(--ink); color: var(--ink); }
.ztabs a[aria-current="true"] { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- 校样 ---------- */
main { padding: 54px 70px 90px; }
.sheet { position: relative; max-width: 1220px; margin: 0 auto 84px; scroll-margin-top: calc(var(--bar) + 20px); }
.sheet__in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 290px; column-gap: 56px; padding: 30px 64px 26px; background: var(--sheet); box-shadow: 0 1px 1px rgba(0, 0, 0, .08), 0 20px 50px rgba(30, 34, 36, .16); }
.rh { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 18px; margin: 0 0 36px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); font-family: var(--sans); font-size: 12.5px; letter-spacing: .08em; color: var(--ink-2); }
.rh span:last-child { font-family: var(--lat); font-size: 15px; letter-spacing: 0; color: var(--ink); }
/* 裁切线与套准标 */
.crop { position: absolute; width: 22px; height: 22px; pointer-events: none; }
.crop::before, .crop::after { content: ""; position: absolute; background: var(--ink); }
.crop::before { width: 22px; height: 1px; }
.crop::after { width: 1px; height: 22px; }
.crop.tl { left: -30px; top: -30px; } .crop.tl::before { left: 0; bottom: 8px; } .crop.tl::after { right: 8px; top: 0; }
.crop.tr { right: -30px; top: -30px; } .crop.tr::before { right: 0; bottom: 8px; } .crop.tr::after { left: 8px; top: 0; }
.crop.bl { left: -30px; bottom: -30px; } .crop.bl::before { left: 0; top: 8px; } .crop.bl::after { right: 8px; bottom: 0; }
.crop.br { right: -30px; bottom: -30px; } .crop.br::before { right: 0; top: 8px; } .crop.br::after { left: 8px; bottom: 0; }
.reg { position: absolute; top: 50%; width: 20px; height: 20px; margin-top: -10px; border: 1px solid var(--ink); border-radius: 50%; pointer-events: none; }
.reg::before, .reg::after { content: ""; position: absolute; background: var(--ink); }
.reg::before { left: -6px; right: -6px; top: 9px; height: 1px; }
.reg::after { top: -6px; bottom: -6px; left: 9px; width: 1px; }
.reg.l { left: -42px; } .reg.r { right: -42px; }
.cbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 0; margin: 40px 0 0; font-family: var(--sans); font-size: 10.5px; color: var(--ink-3); letter-spacing: .06em; }
.cbar i { width: 16px; height: 10px; }
.cbar .c { background: var(--c); } .cbar .m { background: var(--m); } .cbar .y { background: var(--y); } .cbar .k { background: var(--ink); }
.cbar .k50 { background: #8b8b8b; } .cbar .k25 { background: #c4c4c4; }
.cbar span { margin-left: 12px; }

/* 正文栏 */
.main { min-width: 0; max-width: 38em; }
.src { margin: 0 0 6px; font-family: var(--lat); font-style: italic; font-size: 25px; line-height: 1.35; color: var(--ink-2); }
.src span { position: relative; }
.src span::after { content: ""; position: absolute; left: -2px; right: -2px; top: 54%; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; transition: transform .9s cubic-bezier(.6, 0, .2, 1); }
.sheet.proofed .src span::after { transform: scaleX(1); }
.sheet h2 { position: relative; margin: 6px 0 26px; font-weight: 900; font-size: clamp(30px, 3.1vw, 44px); line-height: 1.3; letter-spacing: .01em; }
.caret { position: absolute; left: -.72em; top: -.42em; font-style: normal; font-family: var(--lat); font-weight: 400; color: var(--red); font-size: 1em; }
html.js .sheet:not(.proofed) h2 { opacity: 0; transform: translateY(6px); }
html.js .sheet h2 { transition: opacity .6s .5s, transform .6s .5s; }
@media (prefers-reduced-motion: reduce) { .src span::after, html.js .sheet h2 { transition: none; } }
.lede { margin: 0 0 18px; }
.say { margin: 26px 0 26px; padding: 0 0 0 20px; border-left: 2px solid var(--red); }
.say p { margin: 0; font-size: 21px; line-height: 1.75; font-weight: 600; }
.say[lang="en"] p { font-family: var(--lat); font-style: italic; font-size: 26px; font-weight: 400; }
.say cite { display: block; margin-top: 8px; font-style: normal; font-family: var(--sans); font-size: 13px; color: var(--ink-3); }

/* 页边旁批 */
.margin { min-width: 0; padding-left: 22px; border-left: 1px dashed rgba(225, 35, 26, .45); font-family: var(--sans); font-size: 14px; line-height: 1.7; }
.mk { margin: 0 0 8px; font-size: 12px; letter-spacing: .14em; color: var(--red); }
.mk:not(:first-child) { margin-top: 24px; }
.ask { display: grid; gap: 10px; }
.ask a { position: relative; display: block; padding: 6px 10px 7px 12px; color: var(--red); text-decoration: none; border: 1px solid rgba(225, 35, 26, .5); background: var(--red-2); }
.ask a::before { content: ""; position: absolute; left: -23px; top: 16px; width: 22px; height: 1px; background: rgba(225, 35, 26, .6); }
.ask a b { display: block; font-weight: 700; font-size: 14.5px; }
.ask a small { display: block; color: rgba(225, 35, 26, .78); font-size: 12.5px; }
.ask a:hover, .ask a:focus-visible { background: var(--red); color: #fff; }
.ask a:hover small, .ask a:focus-visible small { color: #fff; }
.gloss { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gloss li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.gloss span { font-family: var(--lat); font-style: italic; font-size: 15px; color: var(--ink-2); }
.works { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.works a { text-decoration: none; font-weight: 500; }
.works a:hover { color: var(--red); }
.works small { display: block; color: var(--ink-3); font-size: 12.5px; }
.go { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.zb { display: inline-flex; align-items: center; padding: 7px 14px; border: 1px solid var(--ink); background: var(--sheet); color: var(--ink); text-decoration: none; font-family: var(--sans); font-size: 14px; cursor: pointer; }
.zb:hover, .zb:focus-visible { background: var(--ink); color: var(--sheet); }
.zb--red { background: var(--red); border-color: var(--red); color: #fff; }
.zb--red:hover { background: var(--ink); border-color: var(--ink); }

/* 图版 */
.plate { margin: 28px 0 0; }
.plate__im { position: relative; padding: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule); }
.plate__im::after { content: ""; position: absolute; left: 14px; right: 14px; top: 14px; bottom: 14px; box-shadow: 0 0 0 1px rgba(0, 160, 233, .35); pointer-events: none; }
.plate img { display: block; width: 100%; height: auto; }
.plate figcaption, .wg figcaption { margin-top: 10px; font-family: var(--sans); font-size: 12.5px; line-height: 1.7; color: var(--ink-3); }
.plate figcaption b, .wg figcaption b { color: var(--ink); font-weight: 600; }

/* ---------- 首屏：扉页对开 ---------- */
.hero .sheet__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; }
.verso { min-width: 0; border-right: 1px solid var(--rule); padding-right: 64px; margin-right: -32px; }
.plate--hero { margin-top: 0; }
.recto { min-width: 0; }
.tby { margin: 0; font-family: var(--lat); font-style: italic; font-size: 22px; color: var(--ink-2); }
.hero h1 { margin: 0; font-weight: 900; font-size: clamp(70px, 7.6vw, 118px); line-height: 1.05; letter-spacing: .06em; }
.hero .en { margin: 6px 0 22px; font-family: var(--lat); font-size: 24px; letter-spacing: .06em; color: var(--ink-2); }
.who { margin: 0 0 12px; font-size: 19px; font-weight: 600; line-height: 1.75; }
.facts { margin: 0 0 18px; font-size: 15px; line-height: 1.85; color: var(--ink-2); }
.feats { list-style: none; margin: 0 0 18px; padding: 14px 0 0; border-top: 1px solid var(--ink); display: grid; gap: 4px; font-size: 15px; line-height: 1.75; }
.feats li { display: grid; grid-template-columns: 18px 1fr; }
.feats li::before { content: "¶"; font-family: var(--lat); color: var(--red); }
.books { margin-bottom: 16px; }
.links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font-family: var(--sans); font-size: 13.5px; }
.note { margin: 18px 0 0; font-family: var(--sans); font-size: 12.5px; color: var(--ink-3); }
.tshelf-fig { margin: 26px 0 0; }
.tshelf { display: block; width: 100%; height: auto; overflow: visible; }
.tshelf .ax { stroke: var(--ink); stroke-width: 1; }
.tshelf text { font-family: var(--lat); font-size: 13px; fill: var(--ink-2); }
.tshelf .sp { stroke: var(--sheet); stroke-width: 1; cursor: default; transition: transform .2s; transform-box: fill-box; transform-origin: 50% 100%; }
.tshelf .sp:hover, .tshelf .sp:focus { transform: scaleY(1.5); outline: none; }
.sp-k { fill: var(--ink); } .sp-m { fill: var(--m); } .sp-c { fill: var(--c); }
.tshelf-fig figcaption { margin-top: 8px; font-family: var(--sans); font-size: 12.5px; line-height: 1.7; color: var(--ink-3); }
.tshelf-fig figcaption i { display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 10px; vertical-align: -1px; }
.kk { background: var(--ink); } .mm { background: var(--m); } .cc { background: var(--c); }

/* ---------- 小机关 ---------- */
.wg { margin: 26px 0 0; padding: 16px 18px 18px; background: #fff; border: 1px solid var(--rule); }
.wg__h { margin: 0 0 12px; font-family: var(--sans); font-size: 13.5px; font-weight: 700; letter-spacing: .04em; }
.wg__h small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12.5px; letter-spacing: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; font-family: var(--sans); }
.seg button { padding: 4px 12px; border: 1px solid var(--ink); background: var(--sheet); cursor: pointer; font-size: 13.5px; }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--sheet); }
.proof__src { margin: 0 0 12px; font-family: var(--lat); font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.proof__zh { margin: 0; font-size: 18px; line-height: 2.1; }
.proof__zh del { color: var(--red); text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.proof__zh ins { position: relative; color: var(--red); text-decoration: none; border-bottom: 1px solid var(--red); }
.proof__zh ins::before { content: "‸"; position: absolute; left: -.35em; top: -1.1em; font-family: var(--lat); color: var(--red); }
.wg-dark svg { display: block; width: 100%; height: auto; }
.wg-dark .dark-all { transition: opacity 1s; }
.wg-dark .dark-lab { font-family: var(--serif); font-size: 17px; font-weight: 700; fill: #fff; transition: fill 1s; }
.wg-dark .mark-strike { stroke: var(--red); stroke-width: 2.5; stroke-dasharray: 200; stroke-dashoffset: 200; transition: stroke-dashoffset .8s .3s; }
.wg-dark .tl line { stroke: var(--ink); }
.wg-dark .tl text { font-family: var(--lat); font-size: 14px; fill: var(--ink-2); }
.wg-dark .fixes { opacity: 0; transition: opacity .8s .9s; }
.wg-dark .fixes text { font-family: var(--sans); font-size: 12.5px; fill: var(--red); }
.wg-dark .fixes path { stroke: var(--red); stroke-dasharray: 3 3; }
.wg-dark.fixed .dark-all { opacity: 0; }
.wg-dark.fixed .dark-lab { fill: var(--ink); }
.wg-dark.fixed .mark-strike { stroke-dashoffset: 0; }
.wg-dark.fixed .fixes { opacity: 1; }
.wg-ores svg { display: block; width: 100%; height: auto; touch-action: none; }
.wg-ores .grid line { stroke: rgba(22, 22, 22, .08); }
.wg-ores .ores-fig { fill: url(#hatch); fill-opacity: .55; stroke: var(--ink); stroke-width: 2; }
.wg-ores .ores-mean { fill: rgba(225, 35, 26, .08); stroke: var(--red); stroke-width: 1.5; stroke-dasharray: 6 4; }
.wg-ores .ores-mid { stroke: var(--red); stroke-width: 1; stroke-dasharray: 2 3; }
.wg-ores .ores-h { fill: var(--red); stroke: #fff; stroke-width: 2; cursor: grab; }
.wg-ores text { font-family: var(--sans); font-size: 12px; fill: var(--ink-3); }
.ores-ctl { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; font-family: var(--sans); font-size: 13px; }
.ores-ctl input { flex: 1; accent-color: var(--red); }
.ores-out { margin: 8px 0 0; font-family: var(--sans); font-size: 13.5px; color: var(--ink-2); }
.latin { margin: 0 0 10px; font-family: var(--lat); font-style: italic; font-size: 30px; line-height: 1.4; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.lw { padding: 0 2px; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; text-decoration: underline dotted rgba(225, 35, 26, .7); text-underline-offset: 6px; }
.lw[aria-pressed="true"] { background: var(--y); }
.lw-out { margin: 0; font-size: 15.5px; line-height: 1.8; min-height: 3.6em; }
.twob { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 10px; }
.bk { padding: 14px 16px; border: 1px solid var(--ink); background: var(--sheet); min-height: 96px; }
.bk b { display: block; font-size: 17px; }
.bk span { display: block; margin-top: 6px; font-size: 15px; line-height: 1.7; color: var(--ink-2); transition: color .3s; }
.books__note { margin: 0; font-family: var(--sans); font-size: 12.5px; color: var(--ink-3); }
.wg-nov svg { display: block; width: 100%; height: auto; overflow: visible; }
.wg-nov .zero { stroke: var(--ink-3); stroke-dasharray: 3 4; }
.wg-nov .zl { font-family: var(--sans); font-size: 12px; fill: var(--ink-3); }
.wg-nov .nov-line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-dasharray: 800; stroke-dashoffset: 800; transition: stroke-dashoffset 1.6s ease-out; }
.sheet.proofed .wg-nov .nov-line { stroke-dashoffset: 0; }
.wg-nov .nv circle { fill: var(--red); }
.wg-nov .nv text { font-family: var(--sans); font-size: 12.5px; fill: var(--ink); }
.wg-nov .nv text.m { fill: var(--ink-3); font-size: 11.5px; }
@media (prefers-reduced-motion: reduce) { .wg-nov .nov-line, .wg-dark * { transition: none !important; } }

/* ---------- 版权页 ---------- */
.cast { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 26px; }
.cast li { padding-top: 8px; border-top: 1px solid var(--rule); }
.cast b { font-size: 17px; }
.cast span { margin-left: 8px; font-family: var(--sans); font-size: 12px; color: var(--red); }
.cast p { margin: 4px 0 0; font-family: var(--sans); font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.fine { margin-top: 18px; font-size: 12.5px; line-height: 1.75; color: var(--ink-2); }
.fine p { margin: 0 0 8px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  main { padding: 40px 34px 70px; }
  .sheet__in { grid-template-columns: minmax(0, 1fr) 240px; padding: 26px 40px 22px; column-gap: 36px; }
  .hero .sheet__in { grid-template-columns: minmax(0, 1fr); }
  .verso { border-right: 0; padding-right: 0; margin-right: 0; }
  .recto { margin-top: 30px; }
}
@media (max-width: 820px) {
  .ztabs { display: none; }
  .sheet__in { grid-template-columns: minmax(0, 1fr); }
  .margin { margin-top: 28px; padding: 18px 0 0; border-left: 0; border-top: 1px dashed rgba(225, 35, 26, .45); }
  .ask a::before { display: none; }
  .reg { display: none; }
}
@media (max-width: 640px) {
  body.zh { font-size: 16.5px; }
  .zbar { padding: 0 12px 0 0; gap: 10px; }
  .zbar__t span { display: none; }
  .zbar__nav { gap: 12px; font-size: 13px; }
  .zbar__nav .hide-s { display: none; }
  main { padding: 26px 14px 50px; }
  .sheet { margin-bottom: 44px; }
  .sheet__in { padding: 18px 18px 16px; }
  .crop { display: none; }
  .rh { margin-bottom: 22px; font-size: 11.5px; }
  .src { font-size: 20px; }
  .caret { display: none; }
  .hero h1 { font-size: 64px; }
  .cast, .twob { grid-template-columns: minmax(0, 1fr); }
  .latin { font-size: 24px; }
}
/* 追问署名里的关系标签：校样上的红色批注框 */
.ask .rel { display: inline-block; margin-right: 5px; padding: 0 4px; background: var(--red); color: #fff; font-size: 11.5px; line-height: 1.6; letter-spacing: .06em; }

/* ---------- 群聊（对话录）：页边旁批下面，红笔圈出来的批注；点开是多人群聊窗口（窗口在 dlg.css，这里只配色） ---------- */
.zh .av { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--av-bg); color: var(--av-fg);
  font: 700 11px/1 var(--sans); font-style: normal; letter-spacing: 0; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12) inset; }
.zh .talks { display: grid; gap: 10px; }
.zh .talk { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center;
  padding: 8px 12px 8px 9px; border: 1.5px solid var(--red); border-radius: 26px 20px 24px 18px / 20px 26px 18px 24px;
  background: var(--sheet); color: var(--ink); text-decoration: none; }
.zh .talk::before { content: ""; position: absolute; left: -24px; top: 24px; width: 22px; height: 1px; background: rgba(225, 35, 26, .6); }
.zh .talk:hover, .zh .talk:focus-visible { background: #fbe9e6; }
.zh .talk__av { grid-row: 1 / span 2; display: flex; align-items: center; }
.zh .talk__av .av { width: 26px; height: 26px; font-size: 10px; margin-left: -8px; box-shadow: 0 0 0 2px var(--sheet); }
.zh .talk__av .av:first-child { margin-left: 0; }
.zh .talk__av b { margin-left: 4px; font-size: 11.5px; font-weight: 500; color: #c41d15; }
.zh .talk__t { font-family: var(--serif); font-weight: 700; font-size: 14.5px; line-height: 1.5; }
.zh .talk__n { font-size: 12px; line-height: 1.5; color: #c41d15; }
.zh .wm { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 16px 0 0; font-family: var(--sans); font-size: 14px; }
.zh .wm a { color: #c41d15; text-decoration-color: rgba(225, 35, 26, .45); }
@media (max-width: 820px) { .zh .talk::before { display: none; } }
/* 群聊窗口：校样纸，红笔作强调 */
body.zh .dlg { --dlg-bg: #e7e8e6; --dlg-paper: #fbfaf6; --dlg-ink: #161616; --dlg-ink-2: #4f4f4a; --dlg-ink-3: #62625b; --dlg-rule: rgba(22, 22, 22, .16);
  --dlg-me: #161616; --dlg-me-ink: #fbfaf6; --dlg-acc: #c41d15; --dlg-mod: rgba(225, 35, 26, .07); --dlg-font: var(--serif); --dlg-ui: var(--sans); }
