*:not(code,pre){box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:#fbfaf8;color:#20201e;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Noto Sans SC",system-ui,sans-serif;
  font-size:17px;line-height:1.85;-webkit-font-smoothing:antialiased}
a{color:#b5482e;text-decoration:none}
a:hover{text-decoration:underline}

.progress{position:fixed;top:0;left:0;height:3px;width:0;background:#b5482e;z-index:50;transition:width .08s linear}

.topbar{position:fixed;top:0;left:0;right:0;height:56px;display:flex;align-items:center;
  justify-content:space-between;padding:0 22px;background:rgba(255,255,255,.92);
  backdrop-filter:saturate(160%) blur(8px);border-bottom:1px solid #e7e3dc;z-index:40}
.brand{font-weight:700;color:#20201e;letter-spacing:.2px}
.brand:hover{text-decoration:none;color:#b5482e}
.navlink{color:#6b6b66;font-size:15px}
.navlink:hover{color:#b5482e}

.container{max-width:780px;margin:0 auto;padding:84px 22px 60px}

/* 索引页 */
.hero{text-align:center;padding:34px 0 26px;border-bottom:1px solid #e7e3dc;margin-bottom:34px}
.hero h1{font-size:40px;line-height:1.2;margin:0 0 6px;font-weight:800;letter-spacing:.5px}
.hero-sub{color:#b5482e}
.tagline{color:#4a4a45;margin:14px auto 22px;max-width:560px;font-size:16px}
.cta{display:inline-block;background:#b5482e;color:#fff;padding:11px 26px;border-radius:8px;
  font-weight:600;font-size:16px;transition:.15s}
.cta:hover{background:#9c3b24;text-decoration:none;transform:translateY(-1px)}
.meta{color:#9a968f;font-size:13px;margin-top:16px}

.intro{background:#fff;border:1px solid #ece8e0;border-radius:12px;padding:26px 30px;margin-bottom:38px}
.intro h2{margin-top:0;font-size:20px}

.toc-h{font-size:22px;margin:0 0 18px}
.part{margin-bottom:26px}
.part h2{font-size:17px;color:#b5482e;margin:0 0 10px;font-weight:700}
.ch-list{list-style:none;margin:0;padding:0}
.ch-list li{margin:0}
.ch-list a{display:flex;align-items:baseline;gap:12px;padding:10px 14px;border:1px solid #ece8e0;
  border-radius:9px;margin-bottom:8px;background:#fff;color:#20201e;transition:.12s}
.ch-list a:hover{border-color:#b5482e;text-decoration:none;transform:translateX(3px);background:#fdf6f3}
.ch-no{font-variant-numeric:tabular-nums;font-weight:700;color:#b5482e;min-width:42px}
.ch-title{flex:1}

/* 章节页 */
.chapter h2{font-size:28px;line-height:1.3;margin:0 0 22px;font-weight:800;
  padding-bottom:14px;border-bottom:2px solid #b5482e}
.chapter h3{font-size:20px;margin:30px 0 12px;font-weight:700}
.chapter h4{font-size:17px;margin:22px 0 8px;font-weight:700;color:#33332f}
.chapter p{margin:14px 0}
.chapter ul,.chapter ol{padding-left:24px;margin:14px 0}
.chapter li{margin:6px 0}

.chapter blockquote{margin:18px 0;padding:12px 18px;border-left:4px solid #b5482e;
  background:#f3e9e4;color:#4a4a45;border-radius:0 8px 8px 0}
.chapter blockquote p{margin:6px 0}

.chapter code{font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
  background:#f0ede8;padding:2px 6px;border-radius:4px;font-size:90%;color:#9c3b24}
.chapter pre{background:#f6f4f1;border:1px solid #e7e3dc;border-radius:8px;
  padding:16px 18px;overflow-x:auto;margin:18px 0;line-height:1.6}
.chapter pre code{background:none;padding:0;color:#2b2b28;font-size:14.5px}

.chapter table{border-collapse:collapse;width:100%;margin:20px 0;font-size:15px;
  background:#fff;border:1px solid #e7e3dc;border-radius:8px;overflow:hidden}
.chapter th,.chapter td{border:1px solid #e7e3dc;padding:10px 13px;text-align:left;vertical-align:top}
.chapter th{background:#f3efe9;font-weight:700}
.chapter tr:nth-child(even) td{background:#faf8f5}

.chapter hr{border:none;border-top:1px solid #e7e3dc;margin:30px 0}

.pager{display:flex;justify-content:space-between;gap:14px;margin-top:46px;
  padding-top:22px;border-top:1px solid #e7e3dc}
.pager-btn{flex:1;text-align:center;padding:13px 10px;border:1px solid #e7e3dc;border-radius:9px;
  background:#fff;color:#20201e;font-size:15px;transition:.12s;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pager-btn:hover{border-color:#b5482e;color:#b5482e;text-decoration:none;background:#fdf6f3}

.footer{max-width:780px;margin:0 auto;padding:26px 22px 50px;color:#9a968f;font-size:13px;
  display:flex;flex-direction:column;gap:4px;border-top:1px solid #ece8e0}
.footer .muted{color:#bdb9b1}

@media (max-width:560px){
  body{font-size:16px}
  .container{padding:74px 16px 50px}
  .hero h1{font-size:32px}
  .chapter h2{font-size:23px}
  .pager-btn{font-size:13px;padding:11px 6px}
}