/* Blog pages (/<lang>/blog/...). Builds on /tools/tool.css (palette, nav, buttons, CTA). */
/* Same content width as the landing page (.lp-wrap: 1170px, 20px gutters) so the logo, nav and
   article edges line up with the rest of the site. */
.t-wrap { max-width: 1210px; padding-left: 20px; padding-right: 20px; } /* = 1170px content, border-box */
.b-nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.b-nav a:not(.t-btn) { color: var(--head); text-decoration: none; font-weight: 600; }
@media (max-width: 640px) { .b-nav a:not(.t-btn) { display: none; } }

.b-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.b-list > h2, .b-list > p { grid-column: 1 / -1; margin: 0; }
.b-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.b-card h2 { margin: 4px 0 8px; font-size: 21px; }
.b-card h2 a { color: var(--head); text-decoration: none; }
.b-card h2 a:hover { color: var(--blue); }
.b-card p { margin: 0; }
.b-meta { color: var(--muted); font-size: 14px; margin: 0 0 8px; }

.b-layout { display: grid; grid-template-columns: minmax(0, 760px) 280px; justify-content: space-between; gap: 56px;
  padding-top: 24px; }
.b-article { min-width: 0; }
.b-aside { position: sticky; top: 24px; align-self: start; display: grid; gap: 20px; padding-top: 6px; }
.b-toc { border-inline-start: 2px solid var(--line); padding-inline-start: 16px; font-size: 14px; }
.b-toc p { margin: 0 0 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: 12px; }
.b-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.b-toc a { color: var(--ink); text-decoration: none; line-height: 1.5; }
.b-toc a:hover { color: var(--blue); }
.b-side-cta { background: var(--tint); border-radius: 14px; padding: 16px 18px; }
.b-side-cta p { margin: 0 0 12px; color: var(--head); font-weight: 600; line-height: 1.5; }
.b-side-cta .t-btn { display: block; padding: 10px 16px; font-size: 14px; }
.b-prose h2 { scroll-margin-top: 16px; }
@media (max-width: 960px) {
  .b-layout { grid-template-columns: minmax(0, 1fr); }
  .b-aside { display: none; }
}
.b-crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.b-crumbs a { color: var(--muted); }
.b-article h1 { font-size: clamp(28px, 4.2vw, 40px); margin: 0 0 12px; }
.b-prose { font-size: 17px; line-height: 1.75; margin-top: 28px; overflow-wrap: break-word; }
.b-prose h2 { font-size: 25px; margin: 40px 0 12px; }
.b-prose h3 { font-size: 20px; margin: 28px 0 10px; }
.b-prose p, .b-prose ul, .b-prose ol { margin: 0 0 16px; }
.b-prose li { margin-bottom: 6px; }
.b-prose code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--tint);
  padding: 2px 5px; border-radius: 5px; }
.b-prose pre { background: var(--tint); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; }
.b-prose pre code { background: none; padding: 0; }
.b-prose blockquote { margin: 0 0 16px; padding: 10px 16px; border-inline-start: 4px solid var(--orange);
  background: var(--card); border-radius: 8px; }
.b-prose blockquote p:last-child { margin-bottom: 0; }
.b-prose table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 15px; display: block; overflow-x: auto; }
.b-prose th, .b-prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; vertical-align: top; }
.b-prose th { background: var(--tint); color: var(--head); }
.b-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.b-cta { margin-top: 48px; padding-left: 20px; padding-right: 20px; }
.b-cta-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 0 !important; }

/* Chinese typography, following mainstream zh reading sites (少数派 / 知乎 / 微信读书-style):
   Latin system font first so English terms look native, then PingFang / Hiragino Sans GB /
   Microsoft YaHei / Noto; medium (600) instead of heavy bold; 16–17px body with ~1.8 line height;
   a narrower measure (~38 Chinese characters per line); no fake italics. */
html[lang="zh-CN"] { --ink: #333338; } /* font stack: tools/tool.css */
@media (prefers-color-scheme: dark) { html[lang="zh-CN"] { --ink: #d6d8dc; } }
html[lang="zh-CN"] body { -webkit-font-smoothing: antialiased; text-autospace: normal; }
html[lang="zh-CN"] h1, html[lang="zh-CN"] h2, html[lang="zh-CN"] h3 { font-weight: 600; letter-spacing: .02em; }
html[lang="zh-CN"] strong, html[lang="zh-CN"] b { font-weight: 600; }
html[lang="zh-CN"] em { font-style: normal; font-weight: 600; }
html[lang="zh-CN"] .t-hero h1 { font-size: clamp(26px, 3.6vw, 34px); }
html[lang="zh-CN"] .t-lead { font-size: 16px; line-height: 1.8; }
html[lang="zh-CN"] .b-article h1 { font-size: clamp(24px, 3.4vw, 30px); line-height: 1.4; margin-bottom: 14px; }
html[lang="zh-CN"] .b-prose { font-size: 16px; line-height: 1.85; letter-spacing: .02em; text-align: justify; }
html[lang="zh-CN"] .b-prose p, html[lang="zh-CN"] .b-prose ul, html[lang="zh-CN"] .b-prose ol { margin-bottom: 1.25em; }
html[lang="zh-CN"] .b-prose h2 { font-size: 21px; line-height: 1.5; margin: 2.2em 0 .8em; }
html[lang="zh-CN"] .b-prose h3 { font-size: 18px; line-height: 1.5; margin: 1.8em 0 .6em; }
html[lang="zh-CN"] .b-prose li { margin-bottom: .5em; }
html[lang="zh-CN"] .b-prose table, html[lang="zh-CN"] .b-prose td, html[lang="zh-CN"] .b-prose th { text-align: start; letter-spacing: 0; }
html[lang="zh-CN"] .b-prose table { font-size: 14px; line-height: 1.7; }
html[lang="zh-CN"] .b-prose blockquote { color: var(--muted); }
html[lang="zh-CN"] .b-card h2 { font-size: 19px; line-height: 1.5; }
html[lang="zh-CN"] .b-card p { font-size: 15px; line-height: 1.75; color: var(--muted); }
@media (max-width: 640px) {
  html[lang="zh-CN"] .b-prose { font-size: 16px; line-height: 1.8; }
  html[lang="zh-CN"] .b-prose h2 { font-size: 19px; }
}
html[lang="zh-CN"] .b-prose td:first-child, html[lang="zh-CN"] .b-prose th:first-child { white-space: nowrap; }
@media (min-width: 961px) { html[lang="zh-CN"] .b-layout { grid-template-columns: minmax(0, 720px) 280px; } }
