:root {
  --bg: #fbfbf9;
  --bg-soft: #f3f3ef;
  --fg: #1c1c1a;
  --fg-soft: #5f5f5a;
  --fg-faint: #8d8d86;
  --accent: #2f6b4f;
  --accent-soft: #e6f0ea;
  --rule: #e2e2dc;
  --code-bg: #f0f0eb;
  --max: 680px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141614;
    --bg-soft: #1c1f1c;
    --fg: #e9e9e4;
    --fg-soft: #a3a39c;
    --fg-faint: #7b7b74;
    --accent: #7cc79b;
    --accent-soft: #1f2b24;
    --rule: #2a2d29;
    --code-bg: #1e211e;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* 顶栏 */
.site-head {
  border-bottom: 1px solid var(--rule);
  padding: 22px 0;
  margin-bottom: 56px;
}
.site-head .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg);
  text-decoration: none;
}
.brand span { color: var(--accent); }
.site-nav a {
  color: var(--fg-soft);
  text-decoration: none;
  font-size: 14px;
  margin-left: 18px;
}
.site-nav a:hover { color: var(--accent); }

/* 文章 */
article { padding-bottom: 64px; }

.post-meta {
  font-size: 13px;
  color: var(--fg-faint);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}

h1 {
  font-size: 32px;
  line-height: 1.35;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.standfirst {
  font-size: 17px;
  color: var(--fg-soft);
  margin: 0 0 44px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
  line-height: 1.75;
}

h2 {
  font-size: 21px;
  margin: 52px 0 16px;
  letter-spacing: -0.005em;
  font-weight: 650;
  line-height: 1.5;
}

p { margin: 0 0 20px; }

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
a:hover { border-bottom-color: var(--accent); }

strong { font-weight: 650; }

blockquote {
  margin: 28px 0;
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--accent);
  color: var(--fg-soft);
}
blockquote p:last-child { margin-bottom: 0; }

code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.87em;
}

pre {
  background: var(--code-bg);
  padding: 16px 18px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 13.5px;
  line-height: 1.7;
}
pre code { background: none; padding: 0; }

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 44px 0;
}

ul, ol { padding-left: 22px; margin: 0 0 20px; }
li { margin-bottom: 9px; }

.note {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 28px 0;
  font-size: 15.5px;
  line-height: 1.8;
}
.note p:last-child { margin-bottom: 0; }

/* 首页列表 */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
  border-bottom: 1px solid var(--rule);
  padding: 26px 0;
  margin: 0;
}
.post-list li:first-child { border-top: 1px solid var(--rule); }
.post-list a { border: none; display: block; }
.post-list .t {
  font-size: 19px;
  font-weight: 600;
  color: var(--fg);
  display: block;
  margin-bottom: 6px;
  line-height: 1.5;
}
.post-list a:hover .t { color: var(--accent); }
.post-list .d {
  font-size: 14.5px;
  color: var(--fg-soft);
  line-height: 1.7;
  display: block;
  margin-bottom: 8px;
}
.post-list .m {
  font-size: 12.5px;
  color: var(--fg-faint);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

/* 页脚 */
.site-foot {
  border-top: 1px solid var(--rule);
  padding: 30px 0 46px;
  margin-top: 40px;
  font-size: 13px;
  color: var(--fg-faint);
  line-height: 2;
}
.site-foot a {
  color: var(--fg-faint);
  border: none;
  text-decoration: none;
}
.site-foot a:hover { color: var(--accent); }
.site-foot .sep { margin: 0 8px; color: var(--rule); }

@media (max-width: 600px) {
  body { font-size: 16.5px; line-height: 1.82; }
  .wrap { padding: 0 20px; }
  h1 { font-size: 26px; }
  h2 { font-size: 19px; margin-top: 42px; }
  .site-head { margin-bottom: 40px; padding: 18px 0; }
  .standfirst { margin-bottom: 34px; }
}
