.blog-list-hero {
  padding-block: clamp(4.5rem, 10vw, 7.5rem);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 22%, transparent), transparent 42%),
    linear-gradient(145deg, var(--deep-top), var(--deep-bottom));
  color: var(--hero-text);
}

.blog-list-hero .section-kicker {
  color: var(--accent);
}

.blog-list-hero h1 {
  max-width: 12ch;
  margin-block: 0.8rem 1rem;
  color: var(--hero-text);
  font-family: var(--font-display);
  font-size: clamp(2.125rem, 4.2vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
}

.blog-list-lead {
  max-width: 42rem;
  color: var(--hero-text-soft);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.75;
}

.blog-index-section {
  padding-block: var(--section-space);
  background: var(--bg-panel);
}

.blog-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.25rem;
}

.blog-toolbar h2 {
  margin-top: 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.15;
}

.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.blog-filter-button {
  min-height: 2.75rem;
  padding-inline: 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.blog-filter-button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.blog-filter-button.is-active {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: var(--hero-text);
}

.blog-list-status {
  min-height: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.blog-post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.blog-post-grid.is-empty {
  grid-template-columns: 1fr;
}

.post-card {
  display: flex;
  min-width: 0;
  min-height: 21rem;
  flex-direction: column;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--card-shadow);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.post-card h3 {
  margin-block: 1.2rem 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  line-height: 1.4;
}

.post-card h3 a,
.related-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.post-card h3 a:hover,
.related-card h3 a:hover {
  color: var(--accent-dark);
}

.post-card p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.post-link {
  align-self: flex-start;
  margin-top: auto;
  color: var(--accent-dark);
  font-weight: 750;
  text-decoration: none;
}

.post-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.blog-empty {
  padding: 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text-muted);
  text-align: center;
}

.article-page {
  background: var(--bg);
}

.article-head {
  padding-top: 1.25rem;
}

.article-page .article-head,
.article-page .article-hero,
.article-page .article-body,
.article-page .article-extras {
  width: min(var(--wrap), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

/* Keep legacy article templates on the same bounded reading column. */
.article-shell {
  width: min(var(--wrap), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.article-shell .article-hero,
main > .wrap > article,
main > .article-hero,
/* 病文模板 hero 直挂 .wrap(article 外),上面的选择器都够不着——2026-08-19 手修:
   proxy-on/windows-setup 两篇 hero 横铺 1180px、与 832px 正文列错位 174px,修复轮 27 轮没打中这层 */
main > .wrap > .article-hero,
.article-content {
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
}

.article-content {
  padding-bottom: 2.5rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.9;
}

.blog-breadcrumb,
nav.breadcrumb,
nav.breadcrumbs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
  color: color-mix(in srgb, var(--text-muted) 60%, transparent);
  font-size: 0.8125rem;
  line-height: 1.5;
  white-space: nowrap;
}

.blog-breadcrumb a,
nav.breadcrumb a,
nav.breadcrumbs a {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--text-muted) 60%, transparent);
  text-decoration: none;
}

.blog-breadcrumb a:hover,
nav.breadcrumb a:hover,
nav.breadcrumbs a:hover {
  color: var(--accent-dark);
}

.blog-breadcrumb .breadcrumb-separator,
nav.breadcrumb .breadcrumb-separator,
nav.breadcrumbs .breadcrumb-separator {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--text-muted) 35%, transparent);
}

.blog-breadcrumb [aria-current="page"],
nav.breadcrumb [aria-current="page"],
nav.breadcrumbs [aria-current="page"] {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 30ch;
  overflow: hidden;
  color: var(--text-muted);
  text-overflow: ellipsis;
}

.article-page .article-hero {
  padding-block: 0 2.25rem;
}

.article-hero .post-meta {
  margin-bottom: 0.875rem;
}

.article-hero h1 {
  max-width: 100%;
  margin-block: 0.875rem 0.75rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -0.025em;
}

.article-lead {
  max-width: 52rem;
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: clamp(0.9375rem, 0.85rem + 0.45vw, 1.125rem);
  line-height: 1.7;
}

.article-body {
  max-width: 52rem;
  padding-bottom: 2.5rem;
}

.article-body > section {
  padding: 0;
}

.article-body > section + section {
  margin-top: 3rem;
}

.prose {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.9;
}

.prose > h2:first-child,
.prose > section:first-child > h2:first-child {
  margin-top: 0;
}

.prose h2 {
  margin-block: 2.75rem 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.5rem);
  line-height: 1.4;
}

.prose h3 {
  margin-block: 2rem 0.8rem;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.25rem);
  line-height: 1.45;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre {
  margin-block: 0 1.25rem;
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
}

.prose li + li {
  margin-top: 0.45rem;
}

.prose a:not([class*="btn"]):not([class*="button"]) {
  color: var(--accent-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

.prose blockquote {
  padding: 1rem 1.2rem;
  border-left: 0.25rem solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-panel);
  color: var(--text-muted);
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: var(--code-bg);
  color: var(--code-text);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
}

.prose :not(pre) > code {
  padding: 0.12em 0.4em;
  border-radius: var(--radius-sm);
  background: var(--bg-panel-strong);
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.end-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  box-shadow: var(--soft-shadow);
}

.end-download h2 {
  margin: 0 0 0.55rem;
  color: var(--text);
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
}

.end-download p {
  margin: 0;
  color: var(--text-muted);
}

.end-download-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.article-extras {
  max-width: 52rem;
  padding-block: 2.5rem 4rem;
  border-top: 1px solid var(--border);
}

#related-posts h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(18.75rem, 1fr));
  gap: 1rem;
}

.related-card {
  min-width: 18.75rem;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
}

.related-card h3 {
  margin-block: 0.9rem 0.65rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

.related-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

#post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.post-nav-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  text-decoration: none;
}

.post-nav-card:hover {
  border-color: var(--accent);
  box-shadow: var(--soft-shadow);
}

.post-nav-card span {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.post-nav-card strong {
  font-size: 0.95rem;
  line-height: 1.55;
}

.post-nav-next {
  grid-column: 2;
  text-align: right;
}

@media (max-width: 820px) {
  .blog-toolbar,
  .end-download {
    align-items: flex-start;
    flex-direction: column;
  }

  .blog-post-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .related-card {
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .blog-list-hero {
    padding-block: 4rem;
  }

  .blog-list-hero h1 {
    font-size: clamp(1.5rem, 7.5vw, 1.875rem);
  }

  .blog-filter {
    width: 100%;
  }

  .blog-filter-button {
    flex: 1 1 auto;
  }

  .post-card {
    min-height: 0;
  }

  .article-page .article-head,
  .article-page .article-hero,
  .article-page .article-body,
  .article-page .article-extras {
    width: min(var(--wrap), calc(100% - (var(--gutter) * 2)));
  }

  .end-download-actions {
    width: 100%;
  }

  #post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav-next {
    grid-column: 1;
    text-align: left;
  }
}