/* 《历史的教训》读书笔记 · 2026-10-16 改版 · 对应 Artifact：Temp/261016-历史的教训-Artifact/lessons-of-history.html
   三部分各有一个主色：摘要青绿、划线笔记琥珀（荧光笔）、作者与背景淡蓝紫。全部限定在 .lessons-of-history-notes 内；
   小程序样式片段在 Temp/261016-读书改版-网站/lessons-of-history-mp.py。 */
.lessons-of-history-notes {
  --loh-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --loh-amber: #f2b33d;
  --loh-mark: rgba(242, 179, 61, .16);
  --loh-violet: #a3b1ff;
  --loh-war: #e0785f;
  --loh-part: var(--green);
  max-width: 44em;
  font-size: 16.5px;
  line-height: 1.95;
}
.lessons-of-history-notes p { margin: 0 0 1.05em; }
.lessons-of-history-notes strong { color: var(--white); font-weight: 700; }
.lessons-of-history-notes em { font-style: italic; }
.lessons-of-history-notes a:focus-visible { outline: 2px solid var(--loh-part); outline-offset: 3px; border-radius: 4px; }
.lessons-of-history-notes [id] { scroll-margin-top: 24px; }

/* ── 正文内目录：三部分各一行，左侧色条区分 ── */
.lessons-of-history-notes .loh-toc { margin: 0 0 8px; padding: 18px 0 6px; border-top: 1px solid var(--lightest-navy); }
.lessons-of-history-notes .loh-toc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.lessons-of-history-notes .loh-toc-title { margin: 0; font-size: 13px; letter-spacing: .14em; color: var(--slate); }
.lessons-of-history-notes .loh-toc-row {
  --loh-part: var(--green);
  display: grid; grid-template-columns: 14em minmax(0, 1fr); gap: 10px 18px; align-items: start;
  margin-bottom: 10px; padding: 14px 16px; border: 1px solid var(--lightest-navy); border-left: 3px solid var(--loh-part);
  border-radius: 4px 8px 8px 4px; background: var(--light-navy);
}
.lessons-of-history-notes .loh-toc-row-2 { --loh-part: var(--loh-amber); }
.lessons-of-history-notes .loh-toc-row-3 { --loh-part: var(--loh-violet); }
.lessons-of-history-notes .loh-toc-part { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; align-items: baseline; color: var(--white); }
.lessons-of-history-notes .loh-toc-num { grid-row: 1 / 3; font-size: 26px; font-weight: 900; line-height: 1; color: var(--loh-part); font-variant-numeric: tabular-nums; }
.lessons-of-history-notes .loh-toc-name { font-size: 16px; font-weight: 700; line-height: 1.45; }
.lessons-of-history-notes .loh-toc-meta { font-size: 12.5px; line-height: 1.5; color: var(--slate); }
.lessons-of-history-notes .loh-toc-part:hover .loh-toc-name { color: var(--loh-part); }
.lessons-of-history-notes .loh-toc-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.lessons-of-history-notes .loh-toc-list a {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 2px 10px; border: 1px solid var(--lightest-navy); border-radius: 6px;
  font-size: 13.5px; line-height: 1.6; color: var(--light-slate); transition: border-color .15s, color .15s;
}
.lessons-of-history-notes .loh-toc-list a span { font-size: 12px; color: var(--loh-part); }
.lessons-of-history-notes .loh-toc-list a em { font-style: normal; font-size: 11.5px; color: var(--loh-amber); font-variant-numeric: tabular-nums; }
.lessons-of-history-notes .loh-toc-list a:hover,
.lessons-of-history-notes .loh-toc-list a:focus-visible { border-color: var(--loh-part); color: var(--white); outline: none; }

/* 题头小视觉：一百个世纪 → 一百页 */
.lessons-of-history-notes .loh-compress { display: flex; align-items: flex-end; gap: 12px; flex: 0 0 auto; }
.lessons-of-history-notes .loh-compress-item { display: grid; justify-items: center; gap: 6px; }
.lessons-of-history-notes .loh-compress-item small { font-size: 11px; letter-spacing: .12em; line-height: 1.3; color: var(--slate); }
.lessons-of-history-notes .loh-centuries {
  display: block; width: 72px; height: 72px;
  background:
    linear-gradient(90deg, var(--navy) 0 3px, transparent 3px) 0 0 / 9px 9px,
    linear-gradient(var(--navy) 0 3px, transparent 3px) 0 0 / 9px 9px,
    linear-gradient(135deg, var(--lightest-navy) 15%, var(--slate) 60%, var(--green) 100%);
  clip-path: inset(3px 0 0 3px);
}
.lessons-of-history-notes .loh-compress-arrow { align-self: center; padding-bottom: 20px; font-size: 15px; color: var(--slate); }
.lessons-of-history-notes .loh-pages {
  display: block; width: 18px; height: 54px; border-radius: 2px 4px 4px 2px; border: 1px solid var(--slate); opacity: .85;
  background: repeating-linear-gradient(to bottom, var(--lightest-slate) 0 1px, transparent 1px 2.6px);
  box-shadow: inset 3px 0 0 var(--green);
}

/* ── 三个部分 ── */
.lessons-of-history-notes .loh-part { --loh-part: var(--green); margin-top: 72px; }
.lessons-of-history-notes .loh-part-2 { --loh-part: var(--loh-amber); }
.lessons-of-history-notes .loh-part-3 { --loh-part: var(--loh-violet); }
.lessons-of-history-notes .loh-toc + .loh-part { margin-top: 48px; }
.lessons-of-history-notes .loh-part-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 0 18px;
  margin-bottom: 28px; padding-bottom: 14px; border-bottom: 2px solid var(--loh-part);
}
.lessons-of-history-notes .loh-part-num { grid-row: 1 / 3; font-size: 64px; font-weight: 900; line-height: .85; letter-spacing: -.02em; color: var(--loh-part); font-variant-numeric: tabular-nums; }
.lessons-of-history-notes .loh-part-label { font-size: 13px; letter-spacing: .22em; color: var(--loh-part); }
.lessons-of-history-notes .loh-part-title { margin: 0; font-size: 28px; font-weight: 900; line-height: 1.3; color: var(--white); }
.lessons-of-history-notes .loh-part-intro { color: var(--slate); }

/* 面板（章、划线组、总结、作者） */
.lessons-of-history-notes .loh-panel-head { margin-bottom: 16px; }
.lessons-of-history-notes .loh-panel-tag { margin: 0 0 4px; font-size: 13.5px; letter-spacing: .14em; color: var(--loh-part); }
.lessons-of-history-notes .loh-kicker { display: block; margin-bottom: 2px; font-family: var(--mono); font-size: 11px; letter-spacing: .26em; color: var(--slate); }
.lessons-of-history-notes .loh-panel-title { font-size: 24px; font-weight: 900; line-height: 1.4; color: var(--white); }
.lessons-of-history-notes .loh-panel-intro { color: var(--lightest-slate); }

/* 全书概览 */
.lessons-of-history-notes .loh-thesis { padding: 22px 26px; border: 1px solid var(--lightest-navy); border-radius: 12px; background: var(--light-navy); }
.lessons-of-history-notes .loh-thesis-head { margin-bottom: 8px; }
.lessons-of-history-notes .loh-thesis-head .loh-kicker { color: var(--green); }
.lessons-of-history-notes .loh-thesis-title { font-size: 19px; color: var(--white); }
.lessons-of-history-notes .loh-thesis p { margin: 0; color: var(--lightest-slate); }

/* 十三章 */
.lessons-of-history-notes .loh-chapter { margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--lightest-navy); }
.lessons-of-history-notes .loh-topic { margin-top: 28px; }
.lessons-of-history-notes .loh-topic-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.lessons-of-history-notes .loh-topic-no { flex: 0 0 auto; font-family: var(--mono); font-size: 12px; color: var(--loh-part); opacity: .8; }
.lessons-of-history-notes .loh-topic-headtext { min-width: 0; }
.lessons-of-history-notes .loh-topic-title { padding-left: 12px; border-left: 3px solid var(--loh-part); font-size: 18px; line-height: 1.5; color: var(--white); }
.lessons-of-history-notes .loh-subhead { margin: 22px 0 8px; font-size: 16.5px; color: var(--white); }

.lessons-of-history-notes .loh-points { display: grid; margin: 6px 0 16px; }
.lessons-of-history-notes .loh-point { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 16px; padding: 11px 0; border-top: 1px dashed var(--lightest-navy); }
.lessons-of-history-notes .loh-point:first-child { border-top: 0; }
.lessons-of-history-notes .loh-point-term { font-weight: 700; line-height: 1.8; color: var(--white); }
.lessons-of-history-notes .loh-point-desc { line-height: 1.85; }
.lessons-of-history-notes .loh-points-stacked .loh-point { grid-template-columns: minmax(0, 1fr); gap: 2px; }

/* 有先后顺序的三段：交通纪元、道德阶段 */
.lessons-of-history-notes .loh-points-stages { position: relative; padding-left: 26px; }
.lessons-of-history-notes .loh-points-stages::before { content: ""; position: absolute; left: 6px; top: 18px; bottom: 18px; width: 2px; background: linear-gradient(var(--lightest-navy), var(--loh-part)); }
.lessons-of-history-notes .loh-stage { position: relative; grid-template-columns: minmax(0, 1fr); gap: 2px; border-top: 0; }
.lessons-of-history-notes .loh-stage::before { content: ""; position: absolute; left: -26px; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: var(--navy); border: 2px solid var(--loh-part); }
.lessons-of-history-notes .loh-stage-last::before { background: var(--loh-part); }
.lessons-of-history-notes .loh-stage .loh-point-term { color: var(--loh-part); }

/* 正反两条路 */
.lessons-of-history-notes .loh-points-versus { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lessons-of-history-notes .loh-vs {
  grid-template-columns: minmax(0, 1fr); gap: 6px; align-content: start; padding: 16px 18px;
  border: 1px solid var(--lightest-navy); border-top: 3px solid var(--green); border-radius: 8px; background: var(--light-navy);
}
.lessons-of-history-notes .loh-vs-b { border-top-color: var(--loh-war); }
.lessons-of-history-notes .loh-vs .loh-point-desc { font-size: .95em; line-height: 1.8; }

.lessons-of-history-notes .loh-list { list-style: none; display: grid; gap: 8px; margin: 6px 0 16px; }
.lessons-of-history-notes .loh-list > li { position: relative; padding-left: 1.3em; }
.lessons-of-history-notes .loh-list > li::before { content: ""; position: absolute; left: .1em; top: .95em; width: .6em; height: 2px; background: var(--loh-part); }
.lessons-of-history-notes .loh-nested { list-style: none; display: grid; gap: 10px; margin-top: 4px; }
.lessons-of-history-notes .loh-nested > li { padding-left: 12px; border-left: 2px solid var(--lightest-navy); }

.lessons-of-history-notes .loh-quote {
  margin: 20px 0; padding: 6px 0 6px 22px; border-left: 3px solid var(--loh-part);
  font-family: var(--loh-serif); font-size: 19px; line-height: 1.95; color: var(--white);
}
.lessons-of-history-notes .loh-quote strong { font-weight: 600; }

/* 3421 年里只有 268 年无战事 */
.lessons-of-history-notes .loh-warbar { margin: -4px 0 22px 25px; }
.lessons-of-history-notes .loh-warbar-track {
  display: flex; height: 14px; border-radius: 3px; overflow: hidden; outline: 1px solid var(--lightest-navy);
  background: repeating-linear-gradient(135deg, var(--loh-war) 0 2px, transparent 2px 6px);
}
.lessons-of-history-notes .loh-warbar-peace { flex: 0 0 7.83%; background: var(--green); }
.lessons-of-history-notes .loh-warbar-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 8px; font-size: 13px; line-height: 1.4; color: var(--slate); }
.lessons-of-history-notes .loh-warbar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lessons-of-history-notes .loh-warbar-legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--green); }
.lessons-of-history-notes .loh-warbar-legend span:last-child i { background: repeating-linear-gradient(135deg, var(--loh-war) 0 2px, transparent 2px 4px); outline: 1px solid var(--loh-war); }
.lessons-of-history-notes .loh-warbar-legend b { color: var(--white); font-variant-numeric: tabular-nums; }

/* 总结表 */
.lessons-of-history-notes .loh-summary { margin-top: 76px; padding-top: 26px; border-top: 2px solid var(--lightest-navy); }
.lessons-of-history-notes .loh-summary .loh-kicker { color: var(--green); }
.lessons-of-history-notes .loh-table-wrap { overflow-x: auto; margin: 6px 0 22px; border: 1px solid var(--lightest-navy); border-radius: 10px; background: var(--light-navy); }
.lessons-of-history-notes .loh-table-wrap:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.lessons-of-history-notes .loh-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; line-height: 1.75; }
.lessons-of-history-notes .loh-table thead th {
  text-align: left; font-size: 12px; font-weight: 500; letter-spacing: .12em; color: var(--slate);
  padding: 12px 14px; border-bottom: 2px solid var(--green);
}
.lessons-of-history-notes .loh-table tbody th,
.lessons-of-history-notes .loh-table td { padding: 14px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--lightest-navy); }
.lessons-of-history-notes .loh-table tbody tr:last-child > * { border-bottom: 0; }
.lessons-of-history-notes .loh-table tbody th { width: 7.4em; font-weight: 700; line-height: 1.5; color: var(--white); }
.lessons-of-history-notes .loh-row-ch { display: block; margin-bottom: 4px; font-size: 11.5px; font-weight: 500; letter-spacing: .14em; color: var(--green); }
.lessons-of-history-notes .loh-table td:nth-child(2) { color: var(--lightest-slate); }
.lessons-of-history-notes .loh-table tbody tr:hover { background: var(--green-tint); }
.lessons-of-history-notes .loh-summary > p { font-family: var(--loh-serif); font-size: 18px; line-height: 2; color: var(--white); }

/* ── 第二部分：划线 ── */
.lessons-of-history-notes .loh-hl-panel { margin-top: 56px; }
.lessons-of-history-notes .loh-hl-panel > .loh-panel-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--lightest-navy);
}
.lessons-of-history-notes .loh-hl-count {
  order: 2; margin: 0; font-size: 13px; letter-spacing: .1em; color: var(--loh-amber);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.lessons-of-history-notes .loh-hl-meta { display: flex; align-items: baseline; gap: 12px; }
.lessons-of-history-notes .loh-hl-page {
  margin: 0; padding: 1px 8px; border-radius: 3px; font-size: 12.5px; line-height: 1.6; white-space: nowrap;
  color: var(--navy); background: var(--loh-amber); font-variant-numeric: tabular-nums;
}
.lessons-of-history-notes .loh-hl-label { font-size: 13px; font-weight: 500; letter-spacing: .12em; color: var(--slate); }
.lessons-of-history-notes .loh-hl-panel .loh-topic-head { align-items: center; margin-bottom: 4px; }
.lessons-of-history-notes .loh-hl-quote { margin: 8px 0 14px; font-family: var(--loh-serif); font-size: 19px; line-height: 2.15; color: var(--white); }
.lessons-of-history-notes .loh-hl-quote p { margin: 0 0 .5em; }
.lessons-of-history-notes .loh-hl-quote strong {
  font-weight: 600; text-decoration: underline; text-decoration-color: var(--loh-amber); text-decoration-thickness: 2px; text-underline-offset: 7px;
  background: linear-gradient(to top, var(--loh-mark) 0 .5em, transparent .5em);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.lessons-of-history-notes .loh-context { margin-left: 2px; padding-left: 18px; border-left: 1px dashed var(--lightest-navy); font-size: 15.5px; line-height: 1.85; }
.lessons-of-history-notes .loh-ctx-head { margin: 0 0 6px; font-size: 12.5px; font-weight: 500; letter-spacing: .16em; color: var(--slate); }
.lessons-of-history-notes .loh-context > p:first-of-type { color: var(--lightest-slate); }

.lessons-of-history-notes .loh-takeaways {
  margin-top: 68px; padding: 24px 26px; border: 1px solid var(--lightest-navy); border-top: 3px solid var(--loh-amber);
  border-radius: 10px; background: var(--light-navy);
}
.lessons-of-history-notes .loh-takeaways .loh-kicker { color: var(--loh-amber); }
.lessons-of-history-notes .loh-lessons { list-style: none; counter-reset: loh-l; display: grid; gap: 12px; margin: 4px 0 18px; }
.lessons-of-history-notes .loh-lessons > li { counter-increment: loh-l; display: grid; grid-template-columns: 2em minmax(0, 1fr); }
.lessons-of-history-notes .loh-lessons > li::before { content: counter(loh-l); font-family: var(--loh-serif); font-size: 21px; font-weight: 900; line-height: 1.5; color: var(--loh-amber); }
.lessons-of-history-notes .loh-lessons p { margin: 0; }
.lessons-of-history-notes .loh-closing { margin: 0; font-family: var(--loh-serif); color: var(--white); }

/* ── 第三部分：作者与背景 ── */
.lessons-of-history-notes .loh-about { margin-top: 36px; }
.lessons-of-history-notes .loh-about + .loh-about { margin-top: 48px; }
.lessons-of-history-notes .loh-about > p { font-family: var(--loh-serif); font-size: 17px; line-height: 2.05; color: var(--lightest-slate); }

@media (prefers-reduced-motion: reduce) {
  .lessons-of-history-notes .loh-toc-list a { transition: none; }
}
@media (max-width: 900px) {
  .lessons-of-history-notes .loh-compress { display: none; }
  .lessons-of-history-notes .loh-toc-row { grid-template-columns: minmax(0, 1fr); }
  .lessons-of-history-notes .loh-toc-part { grid-template-columns: auto auto minmax(0, 1fr); }
  .lessons-of-history-notes .loh-toc-num { grid-row: auto; font-size: 20px; }
  .lessons-of-history-notes .loh-toc-meta { justify-self: end; }
}
@media (max-width: 760px) {
  .lessons-of-history-notes .loh-points-versus { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .lessons-of-history-notes { font-size: 16px; line-height: 1.9; }
  .lessons-of-history-notes .loh-toc-row { padding: 12px 14px; }
  .lessons-of-history-notes .loh-toc-part { grid-template-columns: auto minmax(0, 1fr); }
  .lessons-of-history-notes .loh-toc-meta { grid-column: 2; justify-self: start; }
  .lessons-of-history-notes .loh-toc-list a { font-size: 13px; padding: 2px 8px; }
  .lessons-of-history-notes .loh-part { margin-top: 60px; }
  .lessons-of-history-notes .loh-part-head { gap: 0 14px; margin-bottom: 22px; }
  .lessons-of-history-notes .loh-part-num { font-size: 50px; }
  .lessons-of-history-notes .loh-part-title { font-size: 23px; }
  .lessons-of-history-notes .loh-panel-title { font-size: 21px; }
  .lessons-of-history-notes .loh-thesis { padding: 18px; }
  .lessons-of-history-notes .loh-chapter { margin-top: 48px; }
  .lessons-of-history-notes .loh-topic-title { font-size: 17px; }
  .lessons-of-history-notes .loh-point { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .lessons-of-history-notes .loh-quote { padding-left: 16px; font-size: 17.5px; }
  .lessons-of-history-notes .loh-warbar { margin-left: 19px; }
  /* 总结表：手机上一行一张卡 */
  .lessons-of-history-notes .loh-table-wrap { overflow-x: visible; border: 0; background: none; }
  .lessons-of-history-notes .loh-table { min-width: 0; }
  .lessons-of-history-notes .loh-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lessons-of-history-notes .loh-table,
  .lessons-of-history-notes .loh-table tbody,
  .lessons-of-history-notes .loh-table tr,
  .lessons-of-history-notes .loh-table tbody th,
  .lessons-of-history-notes .loh-table td { display: block; width: auto; }
  .lessons-of-history-notes .loh-table tbody { display: grid; gap: 12px; }
  .lessons-of-history-notes .loh-table tr { border: 1px solid var(--lightest-navy); border-radius: 10px; background: var(--light-navy); }
  .lessons-of-history-notes .loh-table tbody th { padding: 12px 16px 10px; border-bottom: 1px solid var(--lightest-navy); font-size: 16px; }
  .lessons-of-history-notes .loh-row-ch { display: inline; margin: 0 8px 0 0; }
  .lessons-of-history-notes .loh-table td { padding: 10px 16px; border-bottom: 1px dashed var(--lightest-navy); }
  .lessons-of-history-notes .loh-table tbody tr > *:last-child { border-bottom: 0; }
  .lessons-of-history-notes .loh-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 12px; letter-spacing: .12em; color: var(--slate); }
  .lessons-of-history-notes .loh-hl-quote { font-size: 17.5px; }
  .lessons-of-history-notes .loh-context { padding-left: 12px; font-size: 15px; }
  .lessons-of-history-notes .loh-takeaways { padding: 18px; }
  .lessons-of-history-notes .loh-about > p { font-size: 16px; }
}
