/* 资料学习 · 共用样式（暖纸旧版） */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: #faf8f5; color: #2c2a26; line-height: 1.85; font-size: 15px;
  padding: 26px 16px 90px; -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 900px; margin: 0 auto; }

h1 { font-size: 21px; margin-bottom: 4px; }
.sub { color: #8a8378; font-size: 13px; margin-bottom: 20px; }
a { color: #8a6d3b; }

/* 顶部返回 / 本地文件条 */
.topbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.topbar a.back, .topbar a.file, .topbar button.copy {
  font-family: inherit; font-size: 12.5px; padding: 6px 13px; border-radius: 999px;
  border: 1px solid #e2dacc; background: #fff; color: #6b6355; cursor: pointer;
  text-decoration: none; display: inline-block;
}
.topbar a.file { border-color: #d8c9ac; background: #f6f1e7; color: #8a6d3b; font-weight: 700; }
.topbar a.back:hover, .topbar a.file:hover, .topbar button.copy:hover { border-color: #b8996a; }
.topbar a:focus-visible, .topbar button:focus-visible { outline: 2px solid #b8996a; outline-offset: 2px; }
.pathnote { font-size: 11.5px; color: #b0a898; margin: -8px 0 18px; word-break: break-all; }

.card { background: #fff; border: 1px solid #eae4da; border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
h2 { font-size: 16px; margin-bottom: 12px; padding-left: 10px; border-left: 3px solid #b8996a; }
h3 { font-size: 14px; color: #8a6d3b; margin: 18px 0 6px; }
h3:first-of-type { margin-top: 0; }
p { margin-bottom: 10px; }
.meta { font-size: 12.5px; color: #8a8378; margin-bottom: 14px; }
.meta span { margin-right: 14px; }

.oneline { background: #f6f1e7; border: 1px dashed #d8c9ac; border-radius: 12px; padding: 15px 18px; margin-bottom: 16px; }
.oneline .t { font-size: 12px; color: #b8996a; font-weight: 700; letter-spacing: .5px; }
.oneline .b { font-size: 17px; font-weight: 800; line-height: 1.6; margin-top: 4px; }
.oneline .n { font-size: 13px; color: #6b6355; margin-top: 8px; }

/* ── 首页目录 ── */
.stat { display: flex; gap: 26px; font-size: 13px; color: #8a8378; margin-bottom: 20px; }
.stat b { font-size: 20px; color: #8a6d3b; display: block; line-height: 1.3; }
.board h2 { display: flex; align-items: baseline; gap: 10px; }
.board h2 small { font-weight: 400; font-size: 12px; color: #b0a898; }
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid #f0ebe2; }
.row:first-child { border-top: none; }
.row .no { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: #b8996a; flex: 0 0 30px; }
.row .nm { flex: 1; font-size: 14.5px; }
.row .nm em { font-style: normal; display: block; font-size: 11.5px; color: #b0a898; }
.row a.nm { color: #2c2a26; text-decoration: none; font-weight: 700; }
.row a.nm:hover { color: #8a6d3b; text-decoration: underline; }
.row .st { flex: 0 0 auto; font-size: 11.5px; border-radius: 5px; padding: 1px 8px; }
.st.done { background: #eaf0ea; color: #4a7051; font-weight: 700; }
.st.todo { background: #f4f1ec; color: #a89f8f; }
.st.work { background: #f3ede2; color: #8a6d3b; font-weight: 700; }

/* ── 思维导图（5 层） ── */
.mapbox { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
/* 宽屏时让导图这一张卡片超出正文宽度，整图免滚动 */
@media (min-width: 1240px) {
  .card.wide { margin-left: -160px; margin-right: -160px; }
}
.mind { display: inline-block; min-width: 1100px; font-size: 13px; padding: 4px 0; }
.hub { width: 132px; background: #8a6d3b; color: #fff; border-radius: 12px;
  padding: 14px 12px !important; text-align: center; font-weight: 800; line-height: 1.5; }
.hub small { display: block; font-weight: 400; font-size: 11px; opacity: .85; margin-top: 4px; }

/* 横向分层：每一层一列，父节点在子节点的垂直中点 */
.node { display: flex; align-items: center; }
.node > .label { flex: 0 0 auto; padding: 5px 0; line-height: 1.55; }
.kids { display: flex; flex-direction: column; position: relative; margin-left: 18px; }
/* 父节点 → 本层竖脊的横向短线 */
.kids::before { content: ""; position: absolute; left: -18px; top: 50%; width: 18px; height: 1px; background: #e6ddcc; }
/* 竖脊：只覆盖首尾子节点的中点之间 */
.kids > .node { position: relative; padding-left: 26px; }
.kids > .node::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: #e6ddcc; }
.kids > .node:first-child::after { top: 50%; }
.kids > .node:last-child::after { bottom: 50%; }
.kids > .node:only-child::after { display: none; }
/* 竖脊 → 子节点的横向连线 */
.kids > .node::before { content: ""; position: absolute; left: 0; top: 50%; width: 26px; height: 1px; background: #e6ddcc; }
/* 第一层分支的线更深一点 */
.mind > .node > .kids::before,
.mind > .node > .kids > .node::before,
.mind > .node > .kids > .node::after { background: #d8c9ac; }

.mind .l2 { width: 118px; background: #f3ede2; border: 1px solid #e0d4bd; border-radius: 9px;
  padding: 8px 10px; font-weight: 700; color: #6b5433; font-size: 13.5px; }
.mind .l2 em { display: block; font-style: normal; font-size: 10.5px; color: #a89f8f; font-weight: 400; }
.mind .l3 { width: 182px; font-weight: 700; color: #4a453c; font-size: 12.5px; }
.mind .l4 { width: 216px; color: #4a453c; font-size: 12.5px; }
.mind .l5 { width: 248px; color: #8a8378; font-size: 12px; }
.mind .l3 b, .mind .l4 b, .mind .l5 b { color: #2c2a26; }
.scrollhint { font-size: 11.5px; color: #b0a898; margin-top: 8px; }

/* ── 表格与组件 ── */
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { border: 1px solid #eee7db; padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: #f6f1e7; color: #6b5433; font-size: 12.5px; white-space: nowrap; }
td b { color: #8a6d3b; }
td.k { white-space: nowrap; font-weight: 700; color: #6b5433; }
ul.body, ol.body { margin-left: 20px; }
ul.body li, ol.body li { margin-bottom: 7px; }
.tag { display: inline-block; font-size: 11.5px; background: #f3ede2; color: #8a6d3b;
  border-radius: 5px; padding: 1px 7px; margin-right: 6px; font-weight: 700; }
.tag.w { background: #f6e9e5; color: #a8503c; }
.bad { color: #a8503c; }
.good { color: #4a7051; }
.q { background: #fffdfa; border-left: 3px solid #d8c9ac; padding: 8px 12px; margin: 10px 0; font-size: 13.5px; }
.note { font-size: 12.5px; color: #8a8378; margin-top: 10px; }
code { background: #f3ede2; border-radius: 4px; padding: 1px 5px; font-size: 12.5px;
  font-family: ui-monospace, Menlo, monospace; }
footer { margin-top: 40px; font-size: 11.5px; color: #b0a898; text-align: center; }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: #2c2a26;
  color: #fff; font-size: 13.5px; padding: 8px 18px; border-radius: 999px; opacity: 0;
  transition: opacity .25s; pointer-events: none; }
.toast.on { opacity: .95; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
