
:root{
  --bg:#f4efe3; --paper:#fdfbf3; --card:#fffdf7; --ink:#232323; --muted:#6b6558;
  --line:#d9d2bd; --dark:#2e2e2e; --green-band:#dcebc8; --yellow-band:#f6e7a1;
  --green:#8fbf6f; --green-deep:#4a7c2f; --green-box:#edf4de; --green-box-line:#cfdcae;
  --link:#2f6fb2; --code-bg:#f0ead8;
}
*{box-sizing:border-box}
body{
  margin:0; color:var(--ink); background:var(--bg);
  background-image:radial-gradient(#e4ddc7 1px, transparent 1px);
  background-size:18px 18px;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Noto Sans SC",sans-serif;
  line-height:1.75; font-size:16px;
}
a{color:var(--link); text-decoration:none}
a:hover{text-decoration:underline}
.frame{max-width:980px; margin:26px auto; padding:28px 34px 34px; background:var(--paper);
  border:2px solid var(--dark); border-radius:18px; box-shadow:0 10px 28px rgba(0,0,0,.08)}
h1{font-size:27px; line-height:1.35; margin:4px 0 6px; padding-bottom:12px;
  border-bottom:3px solid var(--green); display:flex; gap:10px; align-items:flex-start}
h1 .shield{flex:none; width:30px; height:30px; margin-top:4px}
.lead{color:var(--muted); font-size:15px; margin:10px 0 4px}
h2{font-size:21px; margin:34px 0 10px; padding-bottom:7px; border-bottom:2px solid #a9cf8a}
h3{font-size:18px; margin:26px 0 8px; padding-left:11px; border-left:4px solid var(--green)}
h4{font-size:16px; margin:20px 0 6px}
p{margin:10px 0}
ul,ol{margin:10px 0; padding-left:26px}
li{margin:5px 0}
.hl{background:var(--yellow-band); padding:0 3px; border-radius:3px}
blockquote{background:var(--green-box); border:1px solid var(--green-box-line);
  border-radius:12px; padding:12px 18px; margin:18px 0}
blockquote p{margin:6px 0}
code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.92em;
  background:var(--code-bg); padding:2px 6px; border-radius:5px}
pre{background:#f7f3e6; border:1px solid var(--line); border-radius:10px; padding:14px 16px;
  overflow-x:auto; line-height:1.55}
pre code{background:none; padding:0}
.table-wrap{overflow-x:auto; margin:16px 0}
table{width:100%; border-collapse:collapse; font-size:15px}
th{background:var(--green-band); font-weight:700}
th,td{border:1px solid var(--line); padding:8px 11px; text-align:left; vertical-align:top}
figure.shot{margin:18px 0; text-align:center}
figure.shot img{max-width:100%; border:1px solid var(--line); border-radius:10px;
  box-shadow:0 3px 12px rgba(0,0,0,.08); cursor:zoom-in}
figure.shot figcaption{color:var(--muted); font-size:13px; margin-top:6px}
hr{border:none; border-top:1px solid var(--line); margin:26px 0}
.topnav{margin-bottom:14px}
.pill{display:inline-block; background:var(--yellow-band); border:1px solid #e3d38a;
  border-radius:999px; padding:5px 14px; font-weight:600; color:#4a3f00; font-size:14px}
.pill:hover{text-decoration:none; filter:brightness(.97)}
.pill.green{background:var(--green-band); border-color:#bcd6a0; color:#2e4d1f}
.pagenav{display:flex; justify-content:space-between; gap:12px; margin-top:34px; flex-wrap:wrap}
.pagenav a{max-width:48%}
.toc{background:var(--card); border:1px solid var(--line); border-radius:12px;
  padding:14px 20px; margin:18px 0; box-shadow:0 2px 8px rgba(0,0,0,.04)}
.toc h2{border:none; margin:0 0 6px; padding:0; font-size:17px}
.toc ul{margin:4px 0; padding-left:20px}
.toc a{color:var(--ink)}
.toc a:hover{color:var(--link)}
/* index grid */
.hero{text-align:left}
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:16px; margin-top:22px}
.tcard{background:var(--card); border:1px solid var(--line); border-radius:12px;
  box-shadow:0 2px 8px rgba(0,0,0,.05); overflow:hidden; display:flex; flex-direction:column}
.tcard-head{padding:11px 15px; font-weight:700; font-size:16px; line-height:1.4}
.tcard-head.g{background:var(--green-band)}
.tcard-head.y{background:var(--yellow-band)}
.tcard-body{padding:13px 15px 15px; display:flex; flex-direction:column; flex:1}
.tcard-body p{margin:0 0 12px; color:var(--muted); font-size:14px; flex:1}
.tcard-body .num{font-size:13px; color:var(--muted)}
.contact-card{margin-top:22px; background:var(--green-box); border:1px solid var(--green-box-line);
  border-radius:12px; padding:16px 20px}
.contact-card h2{border:none; margin:0 0 6px; padding:0}
footer{max-width:980px; margin:0 auto 30px; text-align:center; color:var(--muted); font-size:13px}
.lightbox{position:fixed; inset:0; background:rgba(20,20,15,.88); display:none;
  align-items:center; justify-content:center; z-index:100; cursor:zoom-out; padding:20px}
.lightbox.open{display:flex}
.lightbox img{max-width:94vw; max-height:94vh; border-radius:8px; background:#fff}
@media (max-width:640px){
  .frame{margin:12px; padding:20px 18px}
  h1{font-size:22px}
  h2{font-size:19px}
  body{font-size:15px}
}
