/* =========================================================
   工程笔记 · blog.css
   只补 style.css 没有的：博客列表卡 + 正文排版。
   全部颜色走主站令牌（Anthropic 暖色体系），不另起色板。
   ========================================================= */

/* ---------- 列表页 ---------- */
.blog-hero {
  max-width: 760px; margin: 0 auto; padding: calc(var(--nav-h, 64px) + 72px) 20px 28px;
}
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 52px);
  letter-spacing: -0.01em; margin: 10px 0 14px; color: var(--text);
}
.blog-hero .lead { color: var(--muted); font-size: 17px; line-height: 1.8; max-width: 62ch; margin: 0; }

.blog-list {
  max-width: 760px; margin: 0 auto; padding: 12px 20px 80px;
  display: flex; flex-direction: column; gap: 18px;
}
.post-card { position: relative; }
.post-card a {
  display: block; padding: 26px 28px; text-decoration: none; color: inherit;
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius); box-shadow: 0 6px 22px rgba(20, 20, 19, .05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.post-card a:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--hairline-strong); }
.post-card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.post-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.post-meta > span:last-child { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted-2); }
.post-card h2 {
  font-family: var(--font-display); font-size: clamp(19px, 3.4vw, 23px);
  line-height: 1.45; margin: 0 0 8px; color: var(--text); text-wrap: balance;
}
.post-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.85; max-width: 64ch; }

/* ---------- 正文页 ---------- */
.post-wrap { max-width: 700px; margin: 0 auto; padding: calc(var(--nav-h, 64px) + 56px) 20px 90px; }
.post-head .back {
  display: inline-block; font-family: var(--font-mono); font-size: 13px;
  color: var(--muted); text-decoration: none; margin-bottom: 18px;
}
.post-head .back:hover { color: var(--accent); }
.post-head h1 {
  font-family: var(--font-display); font-size: clamp(27px, 5vw, 38px);
  line-height: 1.32; letter-spacing: -0.01em; margin: 8px 0 12px; color: var(--text); text-wrap: balance;
}
.post-head .sub { color: var(--muted); font-size: 16px; line-height: 1.8; margin: 0; }

.prose { margin-top: 40px; }
.prose h2 {
  font-family: var(--font-display); font-size: 22px; margin: 44px 0 14px; color: var(--text);
  padding-bottom: 8px; border-bottom: 1px solid var(--hairline); text-wrap: balance;
}
.prose h3 { font-family: var(--font-display); font-size: 17.5px; margin: 30px 0 10px; color: var(--text); }
.prose p { font-size: 16px; line-height: 1.95; color: var(--text); margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 18px; }
.prose li { font-size: 16px; line-height: 1.9; color: var(--text); margin-bottom: 7px; }
.prose strong { color: var(--text); }
.prose em { font-style: normal; border-bottom: 2px solid var(--accent-soft); }
.prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
.prose a:hover { border-bottom-color: var(--accent); }
.prose code {
  font-family: var(--font-mono); font-size: .86em; background: var(--bg-deep);
  border: 1px solid var(--hairline); border-radius: 6px; padding: 1px 6px; color: var(--text);
}
.prose pre {
  background: #141413; color: #f2efe9; border-radius: var(--radius-sm);
  padding: 18px 20px; overflow-x: auto; margin: 0 0 22px; line-height: 1.75;
}
.prose pre code { background: none; border: none; padding: 0; color: inherit; font-size: 13.5px; }
.prose blockquote {
  margin: 0 0 22px; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent);
  color: var(--muted); font-size: 16px;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 6px 0 24px; font-size: 14.5px; }
.prose th, .prose td { border: 1px solid var(--hairline); padding: 9px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--panel-2); font-family: var(--font-display); font-size: 13.5px; color: var(--muted); }
.prose td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.prose .scroll-x { overflow-x: auto; }

.callout {
  background: var(--panel); border: 1px solid var(--hairline); border-left: 4px solid var(--accent2);
  border-radius: var(--radius-sm); padding: 16px 20px; margin: 0 0 24px; font-size: 15px; line-height: 1.85; color: var(--muted);
}
.callout b { color: var(--text); }
.callout.warn { border-left-color: var(--danger); }
.callout.good { border-left-color: var(--accent-green); }

.fig { margin: 0 0 26px; }
.fig img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--hairline); display: block; }
.fig figcaption { font-size: 13.5px; color: var(--muted-2); margin-top: 8px; line-height: 1.7; }

.post-foot {
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 14px;
}
.post-foot a { color: var(--accent); text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .post-card a { transition: none; }
  .post-card a:hover { transform: none; }
}
