:root{--paper:#fff;--ink:#221e28;--text:#383b41;--muted:#625f6b;--rule:#e7e4eb;--mist:#f4f5f7;--wash:#f7f2fa;--purple:#5d1980;--violet:#8324b3;--note:#9a5300;--note-wash:#fcf3e6;--head:60px;--sans:"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC",system-ui,-apple-system,"Segoe UI",sans-serif;--mono:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:calc(var(--head) + 16px);-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--text);font:16px/1.85 var(--sans)}
a{color:var(--purple);text-underline-offset:3px}
a:hover{color:var(--violet)}
.site-header{position:sticky;top:0;z-index:20;height:var(--head);display:flex;align-items:center;gap:20px;padding:0 24px;background:#fff;border-bottom:1px solid var(--rule)}
.brand{display:flex;align-items:center;flex:none}
.brand img{display:block;width:132px;height:auto}
.book-title{color:var(--ink);font-weight:600;font-size:15px;padding-left:20px;border-left:1px solid var(--rule);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.book-title small{margin-left:10px;font-weight:400;font-size:12px;color:var(--purple);border:1px solid #dccbe7;border-radius:4px;padding:1px 6px;vertical-align:2px}
.toc-toggle{display:none;font:inherit;font-size:14px;border:1px solid var(--rule);background:#fff;color:var(--ink);border-radius:6px;padding:5px 12px;cursor:pointer}
.shell{display:grid;grid-template-columns:300px minmax(0,1fr);max-width:1480px;margin:0 auto}
.toc{position:sticky;top:var(--head);height:calc(100vh - var(--head));overflow:auto;border-right:1px solid var(--rule);padding:20px 16px 40px;background:#fcfbfd;font-size:14px;line-height:1.5}
.search{position:relative;margin-bottom:14px}
.search input{width:100%;font:inherit;font-size:14px;padding:9px 12px;border:1px solid #cfc9d6;border-radius:6px;background:#fff;color:var(--ink)}
.search input:focus{outline:2px solid var(--violet);outline-offset:1px;border-color:transparent}
#hits{list-style:none;margin:8px 0 0;padding:0;border:1px solid var(--rule);border-radius:6px;background:#fff;max-height:60vh;overflow:auto}
#hits li a{display:block;padding:8px 10px;text-decoration:none;color:var(--text);border-bottom:1px solid var(--rule)}
#hits li:last-child a{border-bottom:0}
#hits li a:hover,#hits li a:focus{background:var(--wash)}
#hits b{color:var(--ink);font-weight:600;display:block}
#hits small{color:var(--muted);display:block;font-size:12px;margin-top:2px}
#hits mark{background:#f3e1ff;color:inherit;padding:0 1px}
#hits .empty{padding:10px;color:var(--muted)}
.toc-list,.toc-list ul{list-style:none;margin:0;padding:0}
.toc-ch{margin:2px 0}
.toc-ch>a{display:flex;gap:8px;padding:7px 8px;border-radius:6px;color:var(--ink);font-weight:600;text-decoration:none}
.toc-ch ul{margin:0 0 6px 18px;display:none}
.toc-ch.open ul{display:block}
.toc-ch ul a{display:flex;gap:8px;padding:4px 8px;border-radius:6px;color:var(--muted);text-decoration:none}
.toc a:hover{background:var(--wash);color:var(--purple)}
.toc a.active{color:var(--purple);background:var(--wash)}
.toc .num{color:#9b8fa8;font-variant-numeric:tabular-nums;flex:none;min-width:1.4em}
.book{min-width:0;padding:36px 56px 80px;max-width:1040px}
.cover{padding:8px 0 28px;border-bottom:1px solid var(--rule);margin-bottom:12px}
.eyebrow{margin:0;color:var(--purple);font-size:13px;letter-spacing:.08em}
.cover-title{margin:6px 0 12px;color:var(--ink);font-size:34px;line-height:1.3}
.lead{margin:0 0 18px;font-size:17px;color:var(--text);max-width:46em}
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px 24px;margin:0;font-size:14px}
.facts div{border-left:3px solid #e2d3ec;padding:2px 0 2px 12px}
.facts dt{color:var(--muted);font-size:12px}
.facts dd{margin:0;color:var(--ink)}
.chapter{padding-top:12px}
.chapter h2.chapter-title{margin:44px 0 18px;padding-bottom:12px;border-bottom:2px solid var(--purple);color:var(--ink);font-size:28px;line-height:1.35}
.chapter h2.chapter-title .num{display:block;font-size:14px;color:var(--purple);font-weight:600;letter-spacing:.06em;margin-bottom:4px}
.chapter h3{margin:40px 0 12px;color:var(--ink);font-size:22px;line-height:1.4}
.chapter h4{margin:28px 0 8px;color:var(--ink);font-size:18px;line-height:1.45}
.chapter h3 .num,.chapter h4 .num{color:var(--purple);margin-right:10px;font-variant-numeric:tabular-nums}
.chapter h5{margin:22px 0 6px;color:var(--ink);font-size:16px}
.chapter p{margin:10px 0}
.chapter ol,.chapter ul{padding-left:1.6em;margin:10px 0}
.chapter li{margin:4px 0}
.chapter strong{color:var(--ink)}
.chapter code{font-family:var(--mono);font-size:.88em;background:var(--mist);border:1px solid var(--rule);border-radius:4px;padding:1px 5px}
.chapter table{border-collapse:collapse;width:100%;margin:14px 0;font-size:14.5px;line-height:1.6;display:block;overflow-x:auto}
.chapter th,.chapter td{border:1px solid var(--rule);padding:8px 12px;text-align:left;vertical-align:top}
.chapter th{background:var(--wash);color:var(--ink);font-weight:600;white-space:nowrap}
.chapter blockquote{margin:14px 0;padding:10px 16px;background:var(--note-wash);border-left:4px solid #e2a54d;border-radius:0 6px 6px 0;color:#4a3a22}
.chapter blockquote p{margin:4px 0}
.chapter blockquote strong{color:var(--note)}
figure{margin:18px 0 26px;text-align:center}
figure a.zoom{display:block;margin:0 auto;width:100%;cursor:zoom-in;border:1px solid var(--rule);border-radius:6px;overflow:hidden;box-shadow:0 2px 8px -4px rgba(34,30,40,.18)}
figure img{display:block;width:100%;height:auto}
figcaption{margin-top:8px;color:var(--muted);font-size:13.5px}
a.figref{white-space:nowrap}
.book-foot{margin-top:64px;padding-top:18px;border-top:1px solid var(--rule);color:var(--muted);font-size:13px}
.lightbox{position:fixed;inset:0;z-index:50;background:rgba(20,16,26,.86);display:flex;align-items:center;justify-content:center;padding:24px;cursor:zoom-out}
.lightbox[hidden]{display:none}
.lightbox img{max-width:100%;max-height:100%;border-radius:4px;background:#fff}
.lightbox button{position:absolute;top:12px;right:16px;font-size:30px;line-height:1;color:#fff;background:none;border:0;cursor:pointer}
@media (max-width:960px){
  .shell{grid-template-columns:1fr}
  .toc{position:fixed;top:var(--head);left:0;width:min(86vw,320px);z-index:15;transform:translateX(-102%);transition:transform .2s ease;box-shadow:8px 0 24px -12px rgba(0,0,0,.3)}
  body.toc-open .toc{transform:none}
  .toc-toggle{display:block}
  .book{padding:20px 16px 60px}
  .site-header{gap:12px;padding:0 16px}
  .brand img{width:108px}
  .book-title{padding-left:12px;font-size:14px}
  .book-title small{display:none}
  .cover-title{font-size:26px}
  .chapter h2.chapter-title{font-size:23px}
  .chapter h3{font-size:19px}
}
@media print{.site-header,.toc,.lightbox{display:none}.shell{display:block}.book{padding:0;max-width:none}figure{break-inside:avoid}}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.toc{transition:none}}
