/* nengwei.net 样式：旧纸底、墨色字、朱红点、苍绿辅色。
   不加载外部字体和图片；纹理和圆环都是内嵌的 SVG。 */
:root {
  --paper: #efe6d3;
  --paper-deep: #e6dbc4;
  --ink: #2b2622;
  --muted: #6e6254;
  --line: #cbbd9e;
  --fire: #a63a28;
  --wood: #4b6650;
  --seal-text: #f3ead8;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "楷体", var(--serif);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1916;
    --paper-deep: #24211c;
    --ink: #e2d8c3;
    --muted: #a39780;
    --line: #3d362b;
    --fire: #d9775e;
    --wood: #93b09a;
    --seal-text: #1b1916;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  /* 纸的颗粒 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.28  0 0 0 0 0.18  0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.95;
}

.wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 22px 80px;
}

/* 页眉上方的双线 */
.wrap::before {
  content: "";
  display: block;
  height: 5px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  opacity: 0.7;
  margin: 0 0 56px;
}

header.site { margin-bottom: 52px; }

/* 名字做成一方朱印 */
.name {
  display: inline-block;
  margin: 0 0 22px;
  padding: 5px 7px 5px 10px;
  background: var(--fire);
  color: var(--seal-text);
  font-family: var(--kai);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.3;
  border-radius: 3px;
}

.name a { color: inherit; text-decoration: none; }

h1 {
  font-family: var(--kai);
  font-size: 29px;
  line-height: 1.6;
  margin: 0 0 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* 首页：居中，上面一个墨笔圆环 */
.home header.site { text-align: center; }

.home header.site::before {
  content: "";
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 auto 26px;
  background-color: var(--ink);
  opacity: 0.82;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='r' x='-10%25' y='-10%25' width='120%25' height='120%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.09' numOctaves='2' seed='4'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='5'/%3E%3C/filter%3E%3Cg filter='url(%23r)' fill='none' stroke='black' stroke-linecap='round'%3E%3Cpath d='M62 12A40 40 0 1 0 86 34' stroke-width='7.5'/%3E%3Cpath d='M30 17A39 39 0 0 0 14 62' stroke-width='10'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='r' x='-10%25' y='-10%25' width='120%25' height='120%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.09' numOctaves='2' seed='4'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='5'/%3E%3C/filter%3E%3Cg filter='url(%23r)' fill='none' stroke='black' stroke-linecap='round'%3E%3Cpath d='M62 12A40 40 0 1 0 86 34' stroke-width='7.5'/%3E%3Cpath d='M30 17A39 39 0 0 0 14 62' stroke-width='10'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.home h1 { font-size: 30px; max-width: 18em; margin-left: auto; margin-right: auto; }
.home .lead { max-width: 30em; margin: 0 auto; }

/* 小标题：前面一个朱点 */
h2 {
  font-family: var(--kai);
  font-size: 21px;
  font-weight: 600;
  margin: 54px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  line-height: 1.4;
  letter-spacing: 0.06em;
}

h2::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--fire);
  margin-right: 12px;
  vertical-align: 0.12em;
}

h3 { font-size: 18px; margin: 0 0 6px; line-height: 1.6; font-weight: 600; }

p { margin: 0 0 14px; }

.lead { color: var(--muted); }

a { color: var(--fire); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }

ul { list-style: none; padding-left: 0; margin: 0 0 14px; }

ul li {
  position: relative;
  padding-left: 1.3em;
  margin-bottom: 6px;
}

ul li::before {
  content: "";
  position: absolute;
  left: 0.3em;
  top: 0.92em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--wood);
}

/* 案例：不用卡片，用栏线隔开，前面是朱色的序数 */
section { counter-reset: case; }

.case {
  counter-increment: case;
  display: block;
  position: relative;
  padding: 18px 0 18px 3.2em;
  border-bottom: 1px dotted var(--line);
  color: inherit;
  text-decoration: none;
}

.case::before {
  content: counter(case, cjk-ideographic);
  position: absolute;
  left: 0.3em;
  top: 14px;
  font-family: var(--kai);
  font-size: 26px;
  color: var(--fire);
  line-height: 1.6;
}

.case h3 { transition: color 0.15s; }
.case:hover h3 { color: var(--fire); }
.case p { margin: 0; color: var(--muted); font-size: 16px; }
.case + p { margin-top: 18px; }

.tag {
  display: inline-block;
  font-size: 14.5px;
  color: var(--wood);
  margin: 0;
}

.tag + .tag::before {
  content: "·";
  margin: 0 0.6em;
  color: var(--line);
}

.note {
  border-left: 2px solid var(--wood);
  background: var(--paper-deep);
  padding: 12px 18px;
  margin: 22px 0 14px;
  font-size: 15.5px;
  color: var(--muted);
}

.note p:last-child { margin-bottom: 0; }

.updated { color: var(--muted); font-size: 14.5px; }

footer.site {
  margin-top: 72px;
  padding-top: 22px;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-size: 14.5px;
  text-align: center;
}

footer.site a { color: var(--muted); }

@media (max-width: 480px) {
  body { font-size: 17px; }
  .wrap { padding: 0 18px 60px; }
  .wrap::before { margin-bottom: 40px; }
  h1, .home h1 { font-size: 24px; }
  .home header.site::before { width: 92px; height: 92px; }
  .case { padding-left: 2.6em; }
}
