/* 《显微镜下的大明》（马伯庸，湖南文艺 2019）2026-10-27 新增，历史类别 04：对应兄弟目录 阅读-阅读与发芽/网站读书笔记/试排/261027-显微镜下的大明-Artifact/xianweijing-daming.html
   （概览卡＋“县衙里的官、吏、役”题图、正文内目录两组；一页两部分：先团副划线笔记五篇 24 条，后读书笔记十二部分）。基础样式由 css/ai-xiaobaishu.css 换前缀而来。
   页面由根目录 reading_xianweijing_daming_build.py 从试排页生成，不要手改正文；全部限定在 .xianweijing-daming-notes 内，类前缀 xwj-；
   小程序样式在 miniprogram/build_reading_notes.py 的 CLASS_STYLES（xwj-*）。荧光笔琥珀色（--xwj-hl）只用于团副划线的原句；金色（--xwj-gold）只用于读书笔记里的书中原句。
   防孤字：段落、条目、划线原句末尾 4 个字在试排页生成时已包进 .xwj-nb，不拆行。 */
.xianweijing-daming-notes {
  --xwj-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --xwj-gold: #f2c14e;
  --xwj-gold-soft: rgba(242, 193, 78, .13);
  --xwj-hl: #ffb454;
  --xwj-hl-soft: rgba(255, 180, 84, .42);
  max-width: 44em;
  font-size: 16.5px;
  line-height: 1.9;
}
.xianweijing-daming-notes p { margin-bottom: 1.1em; }
.xianweijing-daming-notes p,
.xianweijing-daming-notes li,
.xianweijing-daming-notes dd { text-wrap: pretty; }
.xianweijing-daming-notes .xwj-part-title,
.xianweijing-daming-notes .xwj-quote p { text-wrap: balance; }
.xianweijing-daming-page .xwj-nb { white-space: nowrap; }
.xianweijing-daming-notes .xwj-overview-title,
.xianweijing-daming-page .chapter-prevnext a { word-break: keep-all; overflow-wrap: anywhere; }
@media (min-width: 641px) {
  .xianweijing-daming-page .chapter-title { word-break: keep-all; overflow-wrap: anywhere; }
}
.xianweijing-daming-notes strong { color: var(--white); font-weight: 700; }
.xianweijing-daming-notes .xwj-pg { font-size: .8em; color: var(--slate); white-space: nowrap; }

/* ---------- 全书概览（右侧：县衙里的官、吏、役） ---------- */
.xianweijing-daming-notes .xwj-overview {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: center;
  padding: 26px 28px; background: var(--light-navy); border: 1px solid var(--lightest-navy); border-radius: 12px;
}
.xianweijing-daming-notes .xwj-kicker { margin: 0 0 6px; font-size: 13px; font-weight: 500; letter-spacing: .18em; color: var(--green); }
.xianweijing-daming-notes .xwj-overview-title { margin: 0 0 14px; font-family: var(--xwj-serif); font-size: 21px; font-weight: 900; line-height: 1.45; color: var(--white); }
.xianweijing-daming-notes .xwj-overview-lead { margin: 0; color: var(--lightest-slate); }
.xianweijing-daming-notes .xwj-overview-lead + .xwj-overview-lead { margin-top: 12px; }

.xianweijing-daming-notes .xwj-intro { color: var(--light-slate); }

/* ---------- 正文内目录 ---------- */
.xianweijing-daming-notes .xwj-toc {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
  margin: 22px 0 0; padding: 18px 0 2px; border-top: 1px solid var(--lightest-navy);
}
.xianweijing-daming-notes .xwj-toc-item {
  display: flex; gap: 8px; align-items: baseline; padding: 7px 10px; border: 1px solid var(--lightest-navy);
  border-radius: 6px; font-size: 14px; line-height: 1.4; color: var(--light-slate); transition: border-color .15s, color .15s;
}
.xianweijing-daming-notes .xwj-toc-no { font-size: 12px; color: var(--green); white-space: nowrap; }
.xianweijing-daming-notes .xwj-toc-item:hover,
.xianweijing-daming-notes .xwj-toc-item:focus-visible { border-color: var(--green); color: var(--white); outline: none; }

/* ---------- 部分与模块 ---------- */
.xianweijing-daming-notes .xwj-part { margin-top: 64px; scroll-margin-top: 24px; }
.xianweijing-daming-notes .xwj-part-head { padding-bottom: 12px; margin: 0 0 18px; border-bottom: 1px solid var(--lightest-navy); }
.xianweijing-daming-notes .xwj-part-no { margin: 0 0 2px; font-size: 13px; letter-spacing: .18em; color: var(--green); }
.xianweijing-daming-notes .xwj-part-title { margin: 0; font-family: var(--xwj-serif); font-size: 25px; font-weight: 900; line-height: 1.4; color: var(--white); }

.xianweijing-daming-notes .xwj-items { list-style: none; display: grid; gap: 12px; margin: 0 0 1.1em; padding: 0; }
.xianweijing-daming-notes .xwj-items li { padding-left: 16px; border-left: 2px solid var(--lightest-navy); }

.xianweijing-daming-notes .xwj-quote {
  margin: 0 0 1.3em; padding: 4px 0 4px 18px; border-left: 3px solid var(--xwj-gold);
  font-family: var(--xwj-serif); color: var(--white); line-height: 1.85;
}
.xianweijing-daming-notes .xwj-quote p { margin: 0 0 .4em; }
.xianweijing-daming-notes .xwj-cite { display: block; margin-top: 6px; font-style: normal; font-size: 13px; color: var(--slate); }

@media (max-width: 900px) {
  .xianweijing-daming-notes .xwj-overview { grid-template-columns: 1fr; }
  .xianweijing-daming-notes .xwj-pyramid { max-width: 440px; }
}
@media (max-width: 640px) {
  .xianweijing-daming-notes { font-size: 16px; }
  .xianweijing-daming-notes .xwj-overview { padding: 20px 18px; gap: 18px; }
  .xianweijing-daming-notes .xwj-toc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xianweijing-daming-notes .xwj-part-title { font-size: 22px; }
}

/* ---------- 题图：县衙里的官、吏、役（《胥吏的盛宴》） ---------- */
.xianweijing-daming-notes .xwj-pyramid { margin: 0; padding: 16px 16px 12px; border: 1px solid var(--lightest-navy); border-radius: 10px; background: var(--navy); }
.xianweijing-daming-notes .xwj-pyr-title { margin: 0 0 12px; font-size: 13px; line-height: 1.5; font-weight: 500; color: var(--white); }
.xianweijing-daming-notes .xwj-pyramid ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; justify-items: center; }
.xianweijing-daming-notes .xwj-pyramid li {
  width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; padding: 7px 10px;
  border: 1px solid var(--lightest-navy); border-radius: 6px; background: var(--light-navy); line-height: 1.5;
}
.xianweijing-daming-notes .xwj-pyramid li.xwj-t1 { width: 62%; }
.xianweijing-daming-notes .xwj-pyramid li.xwj-t2 { width: 82%; }
.xianweijing-daming-notes .xwj-pyramid li b { grid-row: span 2; align-self: center; font-family: var(--xwj-serif); font-size: 18px; font-weight: 900; color: var(--white); }
.xianweijing-daming-notes .xwj-pyramid li span { font-size: 12.5px; color: var(--lightest-slate); }
.xianweijing-daming-notes .xwj-pyramid li em { font-style: normal; font-size: 11.5px; color: var(--slate); }
.xianweijing-daming-notes .xwj-pyramid li.xwj-hi { border-color: var(--green); }
.xianweijing-daming-notes .xwj-pyramid li.xwj-hi b { color: var(--green); }
.xianweijing-daming-notes .xwj-pyr-src { margin: 8px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--slate); }

/* ---------- 正文内目录：两组 ---------- */
.xianweijing-daming-notes .xwj-toc-label { grid-column: 1 / -1; margin: 6px 0 0; font-size: 13px; letter-spacing: .12em; color: var(--slate); }
.xianweijing-daming-notes .xwj-toc-label:first-child { margin-top: 0; }
.xianweijing-daming-notes .xwj-toc-item[href^="#xwj-u"] .xwj-toc-no { color: var(--xwj-hl); }
.xianweijing-daming-notes .xwj-toc-item[href^="#xwj-u"]:hover,
.xianweijing-daming-notes .xwj-toc-item[href^="#xwj-u"]:focus-visible { border-color: var(--xwj-hl); }

/* ---------- 两部分的分隔卡：划线琥珀色，读书笔记绿色 ---------- */
.xianweijing-daming-notes .xwj-divider {
  margin-top: 64px; padding: 22px 24px 6px; border: 1px solid var(--lightest-navy); border-top: 3px solid var(--xwj-hl);
  border-radius: 12px; background: var(--light-navy); scroll-margin-top: 24px;
}
.xianweijing-daming-notes .xwj-divider-tag { margin: 0 0 2px; font-size: 13px; letter-spacing: .18em; color: var(--xwj-hl); }
.xianweijing-daming-notes .xwj-divider-title { margin: 0 0 12px; font-family: var(--xwj-serif); font-size: 25px; font-weight: 900; line-height: 1.4; color: var(--white); }
.xianweijing-daming-notes .xwj-divider p:not(.xwj-divider-tag) { color: var(--lightest-slate); }
.xianweijing-daming-notes .xwj-notes-div { border-top-color: var(--green); }
.xianweijing-daming-notes .xwj-notes-div .xwj-divider-tag { color: var(--green); }
.xianweijing-daming-notes .xwj-notes-div + .xwj-intro { margin-top: 28px; }
.xianweijing-daming-notes .xwj-upart .xwj-part-no { color: var(--xwj-hl); }

/* ---------- 团副划线：荧光笔琥珀色 ---------- */
.xianweijing-daming-notes .xwj-mark-h { margin: 34px 0 10px; font-size: 14px; font-weight: 700; letter-spacing: .08em; line-height: 1.5; color: var(--xwj-hl); }
.xianweijing-daming-notes .xwj-part-head + .xwj-mark-h { margin-top: 6px; }
.xianweijing-daming-notes .xwj-mark-src { margin-left: 10px; font-size: 13px; font-weight: 400; letter-spacing: .02em; color: var(--slate); }
.xianweijing-daming-notes .xwj-marked {
  margin: 0 0 1em; padding: 2px 0 2px 18px; border-left: 3px solid var(--xwj-hl);
  font-family: var(--xwj-serif); font-size: 18.5px; line-height: 1.95; color: var(--white);
}
.xianweijing-daming-notes .xwj-marked p { margin: 0 0 .5em; }
.xianweijing-daming-notes .xwj-hl {
  color: inherit; padding: 0 1px .06em;
  /* 色带压在字的下沿（像荧光笔划线），不从字中间穿过，免得看着像删除线 */
  background: linear-gradient(to top, var(--xwj-hl-soft) 0 .36em, transparent .36em);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.xianweijing-daming-notes .xwj-ctx-p { margin: 0 0 1.2em; color: var(--light-slate); }
.xianweijing-daming-notes .xwj-ctx {
  display: inline-block; margin-right: 8px; padding: 0 7px; border: 1px solid var(--lightest-navy); border-radius: 4px;
  font-size: 12px; line-height: 1.7; letter-spacing: .08em; color: var(--slate); vertical-align: .12em;
}

/* ---------- 编号列表 ---------- */
.xianweijing-daming-notes .xwj-items.xwj-ol { list-style: decimal; padding-left: 1.4em; }
.xianweijing-daming-notes .xwj-items.xwj-ol li { padding-left: 6px; border-left: 0; }
.xianweijing-daming-notes .xwj-items.xwj-ol li::marker { color: var(--slate); font-size: .9em; }

@media (max-width: 640px) {
  .xianweijing-daming-notes .xwj-pyramid li.xwj-t1 { width: 76%; }
  .xianweijing-daming-notes .xwj-pyramid li.xwj-t2 { width: 88%; }
  .xianweijing-daming-notes .xwj-divider { padding: 20px 16px 4px; }
  .xianweijing-daming-notes .xwj-divider-title { font-size: 22px; }
  .xianweijing-daming-notes .xwj-marked { font-size: 17px; }
}
