/* 吴国盛 · 深读 · 蓝晒图录
   名片是一张晒在蓝底上的白线；深读把它翻过来：白纸蓝字的展览图录，页边贴着晒图。
   目录沿用名片右侧“年轮”的圆点，铁盐黄只标出当前位置。 */

:root {
  --paper: #eef1f4;
  --paper-2: #f7f9fb;
  --ink: #0b2858;
  --ink-2: #1d4f9c;
  --ink-3: #4c6185;
  --rule: rgba(11, 40, 88, .2);
  --iron: #d6cf74;
  --hl: #ebe5a3;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --didot: "GFS Didot", "Didot", "Bodoni 72", "Noto Serif SC", serif;
  --bar: 56px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 24px); background: var(--paper); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.wu-deep { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 18px; line-height: 1.95; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
a { color: var(--ink-2); text-decoration-color: rgba(29, 79, 156, .45); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 3px; }
::selection { background: var(--ink-2); color: var(--paper); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 6px 12px; }
.skip:focus { top: 12px; }

/* ---------- 顶栏 ---------- */
.dbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; height: var(--bar); padding: 0 32px; background: rgba(238, 241, 244, .94); border-bottom: 1px solid var(--ink); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dbar__logo { display: grid; place-items: center; width: 30px; height: 32px; color: var(--ink); }
.dbar__logo svg { width: 18px; height: 20px; }
.dbar__t { margin: 0; font-size: 15px; line-height: 1.3; }
.dbar__t a { color: var(--ink); text-decoration: none; font-weight: 700; }
.dbar__t span { color: var(--ink-3); margin-left: 10px; }
.dbar__nav { margin-left: auto; display: flex; gap: 22px; font-size: 15px; }
.dbar__nav a { text-decoration: none; color: var(--ink-3); }
.dbar__nav a:hover { color: var(--ink); }
.dbar__toc { display: none; margin-left: auto; font: inherit; font-size: 15px; color: var(--ink); background: transparent; border: 1px solid var(--ink); padding: 3px 12px; cursor: pointer; }
.dbar__toc[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
.dbar__prog { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink-2); transform: scaleX(0); transform-origin: 0 50%; }

/* ---------- 版式 ---------- */
.dlay { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 64px; max-width: 1400px; margin: 0 auto; padding: 0 40px; }

/* 目录：名片右侧“年轮”的圆点 */
.dtoc { position: sticky; top: var(--bar); align-self: start; max-height: calc(100vh - var(--bar)); overflow: auto; padding: 40px 4px 40px 0; scrollbar-width: thin; }
.dtoc__h { margin: 0 0 12px 22px; font-size: 14px; letter-spacing: .1em; color: var(--ink-3); }
.dtoc ol { position: relative; list-style: none; margin: 0; padding: 0; }
.dtoc ol::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: 14px; width: 1px; background: var(--rule); }
.dtoc a { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 8px; padding: 6px 0 6px 22px; text-decoration: none; color: var(--ink); font-size: 15px; line-height: 1.5; }
.dtoc a::before { content: ""; position: absolute; left: 0; top: 12px; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--ink-3); background: var(--paper); transition: background .25s, border-color .25s; }
.dtoc a i { font-style: normal; font-family: var(--didot); font-size: 15px; color: var(--ink-3); }
.dtoc a:hover span { text-decoration: underline; text-decoration-color: var(--rule); }
.dtoc a[aria-current="true"] { font-weight: 700; }
.dtoc a[aria-current="true"]::before { background: var(--iron); border-color: var(--ink); box-shadow: 0 0 0 4px rgba(214, 207, 116, .35); }
.dtoc a[aria-current="true"] i { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .dtoc a::before { transition: none; } }

.dmain { min-width: 0; padding: 0 0 120px; }
.dhero { padding: 72px 0 34px; border-bottom: 1px solid var(--ink); max-width: 1000px; }
.dhero h1 { margin: 0; font-weight: 900; font-size: clamp(44px, 6.4vw, 92px); line-height: 1.08; letter-spacing: .02em; text-wrap: balance; }
.dhero__sub { margin: 18px 0 10px; font-size: 24px; line-height: 1.5; font-weight: 600; color: var(--ink-2); }
.dhero__m { margin: 0; font-size: 15px; line-height: 1.8; color: var(--ink-3); }
.lead { max-width: 36em; margin: 40px 0 0; }
.lead p { font-size: 20px; line-height: 1.95; margin: 0 0 1em; text-align: justify; text-justify: inter-character; }

/* 节：左边正文，右边贴一张晒图 */
.dsec { display: grid; grid-template-columns: minmax(0, 36em) minmax(200px, 300px); column-gap: 56px; margin-top: 96px; align-items: start; }
.dsec__h { grid-column: 1; margin: 0 0 22px; padding-top: 20px; border-top: 1px solid var(--ink); }
.dsec__yr { display: flex; align-items: baseline; gap: 14px; margin: 0 0 6px; line-height: 1; }
.dsec__yr b { font-family: var(--didot); font-weight: 400; font-size: 56px; letter-spacing: -.01em; color: var(--ink-2); font-variant-numeric: lining-nums; }
.dsec__n { font-size: 16px; color: var(--ink-3); }
.dsec__yr--n { margin-top: 8px; }
.dsec h2 { margin: 10px 0 10px; font-weight: 900; font-size: clamp(28px, 2.8vw, 38px); line-height: 1.35; letter-spacing: .01em; }
.dsec__card { font-size: 14.5px; }
.dsec__b { grid-column: 1; min-width: 0; }
.dsec__b p { margin: 0 0 1.15em; text-align: justify; text-justify: inter-character; }
.dsec__b .notes .nb { margin: 0; text-align: left; }
/* 师承一节末尾：师门的学术名片 */
.dsec__b .dkin { margin: 1.6em 0 0; padding: .9em 0 0; border-top: 1px solid var(--rule); font-size: 15.5px; line-height: 1.9; color: var(--ink-3); text-align: left; }
.dkin b { display: block; font-size: 13.5px; letter-spacing: .08em; font-weight: 600; }
.dkin a { color: var(--ink-2); font-weight: 600; text-decoration-color: var(--iron); text-decoration-thickness: 2px; }
.dsec h3 { margin: 30px 0 10px; padding-bottom: 6px; font-size: 18px; line-height: 1.5; font-weight: 700; border-bottom: 1px solid var(--rule); }
.dsec--list { grid-template-columns: minmax(0, 46em); }

.dfig { grid-column: 2; grid-row: 1 / span 2; margin: 22px 0 0; position: sticky; top: calc(var(--bar) + 28px); }
.print { position: relative; background: var(--ink-2); padding: 7%; -webkit-mask: url("../img/wu/deckle.png") center / 100% 100% no-repeat; mask: url("../img/wu/deckle.png") center / 100% 100% no-repeat; }
.print img { display: block; width: 100%; height: auto; mix-blend-mode: screen; }
.dfig figcaption { margin: 12px 4% 0; font-size: 13px; line-height: 1.75; color: var(--ink-3); }
.dfig figcaption b { color: var(--ink); font-weight: 600; }

/* 注释引用 */
.fnr { font-size: 14px; line-height: 0; vertical-align: 9px; margin: 0 1px 0 2px; }
a.fn { font-family: var(--didot); color: var(--ink-2); text-decoration: none; padding: 0 2px; border-bottom: 1px solid rgba(29, 79, 156, .35); }
a.fn:hover, a.fn:focus-visible, a.fn.is-on { background: var(--ink-2); color: var(--paper); border-color: var(--ink-2); outline: none; }

/* 清单与参考资料 */
.dlist { list-style: none; margin: 0 0 1.2em; padding: 0; }
.dlist li { position: relative; padding-left: 22px; margin: 0 0 .55em; font-size: 16.5px; line-height: 1.8; }
.dlist li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--ink-2); }
.notes { list-style: none; margin: 0; padding: 0; font-size: 14.5px; line-height: 1.8; }
.notes li { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--rule); }
.notes li:target { background: var(--hl); }
.notes .nn { font-family: var(--didot); font-size: 17px; line-height: 1.5; color: var(--ink-2); text-align: right; }
.notes .nb { margin: 0; text-align: left; overflow-wrap: anywhere; }
.notes .back { margin-left: 10px; font-size: 13px; white-space: nowrap; }

.fine { margin-top: 96px; max-width: 46em; padding-top: 18px; border-top: 1px solid var(--ink); font-size: 14px; line-height: 1.85; color: var(--ink-3); }
.fine p { margin: 0 0 10px; }
.fine__go { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px !important; font-size: 15px; }

/* 弹出注释 */
.fnpop { position: fixed; z-index: 80; left: 0; top: 0; width: min(440px, calc(100vw - 24px)); max-height: 50vh; overflow: auto; background: var(--paper-2); color: var(--ink); border: 1px solid var(--ink); box-shadow: 0 14px 34px rgba(11, 40, 88, .22); padding: 12px 16px 14px; font-size: 14.5px; line-height: 1.8; }
.fnpop__n { display: block; font-family: var(--didot); font-weight: 400; font-size: 15px; color: var(--ink-2); margin-bottom: 4px; }
.fnpop__t { overflow-wrap: anywhere; }
.fnpop__go { display: inline-block; margin-top: 6px; font-size: 13.5px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1240px) {
  .dlay { gap: 44px; padding: 0 28px; }
  .dsec { grid-template-columns: minmax(0, 36em) minmax(180px, 230px); column-gap: 40px; }
}
@media (max-width: 1040px) {
  .dlay { grid-template-columns: minmax(0, 1fr); }
  .dbar__toc { display: inline-block; }
  .dbar__nav { margin-left: 0; }
  .dtoc { display: none; position: fixed; z-index: 45; top: var(--bar); left: 0; right: 0; max-height: min(72vh, calc(100vh - var(--bar))); padding: 18px 24px 22px; background: var(--paper); border-bottom: 1px solid var(--ink); box-shadow: 0 18px 30px rgba(11, 40, 88, .16); }
  body.toc-open .dtoc { display: block; }
  .dsec, .dsec--list { display: block; max-width: 40em; }
  .dfig { position: static; max-width: 360px; margin: 0 0 28px; }
}
@media (max-width: 640px) {
  :root { --bar: 52px; }
  body.wu-deep { font-size: 17px; }
  .dbar { padding: 0 14px; gap: 10px; }
  .dbar__t span { display: none; }
  .dbar__nav { gap: 14px; font-size: 14px; }
  .dbar__nav .hide-s { display: none; }
  .dlay { padding: 0 18px; }
  .dhero { padding: 40px 0 26px; }
  .dhero__sub { font-size: 20px; }
  .lead p { font-size: 18px; text-align: left; }
  .dsec { margin-top: 72px; }
  .dsec__yr b { font-size: 44px; }
  .dsec__b p { text-align: left; }
  .dfig { max-width: 100%; }
}
@media print {
  .dbar, .dtoc, .fnpop, .skip, .dsec__card { display: none !important; }
  body.wu-deep, html { background: #fff; }
  .dlay { display: block; padding: 0; }
  .dsec { display: block; }
  .dfig { position: static; max-width: 240px; }
}
