/* Blog index — GitHub.blog–style asymmetric featured + compact stack */
.blog-index {
  padding: 28px 0 80px;
}

.blog-index-top {
  margin-bottom: 22px;
}

.blog-index-top .eyebrow {
  margin: 0 0 8px;
}

.blog-index-top h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.blog-index-top p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  max-width: 36rem;
}

/* Asymmetric hero: large left + stacked right */
.blog-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 28px 36px;
  align-items: stretch;
}

.blog-hero-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: inherit;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.blog-hero-main:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.blog-cover {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--surface-soft);
  position: relative;
  overflow: hidden;
}

.blog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-article-cover {
  margin: 0 0 22px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  background: var(--surface-soft);
}

.blog-article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-hero-main .blog-copy {
  padding: 22px 24px 24px;
  display: grid;
  gap: 10px;
}

.blog-cat {
  margin: 0;
  color: #c2410c;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
}

.blog-hero-main h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.1vw, 1.75rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.blog-excerpt {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-byline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}


.blog-hero-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.blog-side-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  align-items: start;
}

.blog-side-item:first-child {
  padding-top: 0;
}

.blog-side-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.blog-side-item:hover h2 {
  color: var(--blue);
}

.blog-side-thumb {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.blog-side-thumb .blog-cover {
  aspect-ratio: 1;
  height: 100%;
}
.blog-side-thumb .blog-cover img { object-fit: cover; }

.blog-side-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.blog-side-copy h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.blog-side-copy .blog-excerpt {
  font-size: 14px;
  -webkit-line-clamp: 2;
}

/* Latest list (GitHub: horizontal rows under hero) */
.blog-latest {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.blog-latest-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.blog-latest-head h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.blog-latest-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-latest-list > li > a {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  align-items: start;
}

.blog-latest-list > li:first-child > a {
  padding-top: 12px;
}

.blog-latest-list > li > a:hover h3 {
  color: var(--blue);
}

.blog-latest-thumb {
  width: 120px;
  height: 90px;
  border-radius: 12px;
  overflow: hidden;
}

.blog-latest-thumb .blog-cover {
  aspect-ratio: 4 / 3;
  height: 100%;
}
.blog-latest-thumb .blog-cover img { object-fit: cover; }

.blog-latest-copy {
  display: grid;
  gap: 6px;
}

.blog-latest-copy h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .blog-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .blog-side-item:first-child {
    padding-top: 0;
  }
}

@media (max-width: 560px) {
  .blog-side-item,
  .blog-latest-list > li > a {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }
  .blog-side-thumb { width: 72px; height: 72px; }
  .blog-latest-thumb { width: 72px; height: 72px; }
  .blog-hero-main .blog-copy { padding: 18px; }
}


/* —— Single post (GitHub.blog–like reading layout) —— */
body.blog-post {
  background: #fff;
}

.blog-post .site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.blog-post-main {
  width: min(calc(100% - 48px), 740px);
  margin: 28px auto 72px;
}

.blog-post-crumb {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.blog-post-crumb a {
  color: var(--blue);
}

.blog-post-cat {
  margin: 0 0 12px;
  color: #c2410c;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
}

.blog-post-title {
  max-width: none;
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(2rem, 4.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.blog-post-deck {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 1.15rem;
  line-height: 1.65;
}

.blog-post-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
}


.blog-post-hero {
  margin: 0 0 36px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-soft);
  aspect-ratio: 16 / 9;
}

.blog-post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-post-body {
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.85;
}

.blog-post-body h2 {
  margin: 2.1em 0 0.7em;
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.blog-post-body h3 {
  margin: 1.6em 0 0.55em;
  color: var(--ink);
  font-size: 1.15rem;
}

.blog-post-body p {
  margin: 0 0 1.05em;
}

.blog-post-body ul,
.blog-post-body ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
}

.blog-post-body li + li {
  margin-top: 0.4em;
}

.blog-post-body a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-post-body .guide-source-list {
  list-style: none;
  padding-left: 0;
}

.blog-post-body .guide-source-list li {
  margin: 0 0 8px;
}

.blog-post-related {
  margin: 48px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.blog-post-related h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
  color: var(--ink);
}

.blog-post-related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.blog-post-related-list a {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  padding: 0;
}

.blog-post-related-list a:hover h3 {
  color: var(--blue);
}

.blog-post-related-thumb {
  width: 112px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-soft);
}

.blog-post-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-post-related-list h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.blog-post-related-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.blog-post-cta {
  margin: 36px 0 0;
  padding: 22px 22px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.blog-post-cta h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 750;
  line-height: 1.3;
}

.blog-post-cta p {
  margin: 0 0 14px;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .blog-post-main { width: min(calc(100% - 28px), 740px); margin: 18px auto 48px; }
  .blog-post-title { font-size: 1.75rem; }
  .blog-post-deck { font-size: 1.05rem; }
  .blog-post-body { font-size: 16px; }
  .blog-post-related-list a { grid-template-columns: 88px minmax(0, 1fr); }
  .blog-post-related-thumb { width: 88px; height: 66px; }
}


.blog-post-body pre {
  margin: 0 0 1.2em;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f6f8fb;
  color: var(--ink);
  font-size: 0.92em;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.blog-post-body pre code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: transparent;
  padding: 0;
}

.blog-post-body blockquote {
  margin: 0 0 1.2em;
  padding: 2px 0 2px 14px;
  border-left: 3px solid #93c5fd;
  color: var(--ink-soft);
}

.blog-post-body blockquote p {
  margin: 0;
}

.blog-inline-figure {
  margin: 0 0 1.4em;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.blog-inline-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-inline-figure figcaption {
  padding: 10px 14px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.blog-tag-human { background: #c06a2f; }
.blog-tag-ai { background: #1f9d8a; }

/* WeChat-style 人工版 / AI版 pills */
.blog-post-body .blog-tag-human,
.blog-post-body .blog-tag-ai {
  display: inline-block;
  padding: 2px 10px;
  margin: 0 0.45em 0 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: #fff !important;
  vertical-align: middle;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-decoration: none;
}
.blog-post-body .blog-tag-human { background: #c06a2f; }
.blog-post-body .blog-tag-ai { background: #1f9d8a; }

/* CTA button inside article body: don't inherit link-blue over white label */
.blog-post-body a.button,
.blog-post-body a.button-primary {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.blog-post-body a.button-primary:hover {
  color: #fff;
}

/* readable mapping table */
.blog-post-body .table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  border: 1px solid var(--line, #e5eaf2);
  border-radius: 12px;
  background: #fff;
}
.blog-post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.45;
}
.blog-post-body th,
.blog-post-body td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line, #e5eaf2);
}
.blog-post-body thead th {
  background: #f5f8fc;
  font-weight: 700;
  color: var(--ink, #0f172a);
  white-space: nowrap;
}
.blog-post-body tbody tr:last-child td {
  border-bottom: none;
}
.blog-post-body td:first-child {
  width: 34%;
  font-weight: 600;
  color: var(--ink, #0f172a);
}

