.blog-hero {
  border-bottom: 1px solid var(--rule);
  background: var(--paper-panel);
}

.blog-hero h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2.1rem;
  margin: 0 0 .6rem;
  color: var(--ink);
}

.blog-hero p {
  color: var(--ink-mute);
  max-width: 640px;
  margin: 0;
}

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 2rem;
}

.tag-filter button {
  font-family: var(--font-code);
  font-size: .82rem;
  padding: .5rem 1rem;
  border: 1px solid var(--rule);
  background: var(--paper-panel);
  color: var(--ink-mute);
  cursor: pointer;
  border-radius: var(--corner);
}

.tag-filter button[aria-pressed="true"] {
  border-color: var(--brick);
  color: var(--brick);
  background: var(--paper);
}

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

@media (max-width: 720px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  border: 1px solid var(--rule);
  background: var(--paper-panel);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  min-width: 0;
}

.post-line {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-family: var(--font-code);
  font-size: .78rem;
  color: var(--ink-mute);
}

.post-tag {
  border: 1px solid var(--rule);
  padding: .1rem .55rem;
  color: var(--brick);
}

.post-title {
  font-size: 1.12rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.4;
}

.post-title a {
  color: var(--ink);
  text-decoration: none;
}

.post-title a:hover {
  color: var(--brick);
}

.post-sum {
  color: var(--ink-mute);
  font-size: .92rem;
  line-height: 1.6;
  margin: 0;
  flex-grow: 1;
}

.post-more {
  font-family: var(--font-code);
  font-size: .85rem;
  color: var(--brick);
  text-decoration: none;
  align-self: flex-start;
}

.post-more:hover {
  color: var(--brick-deep);
}

.post-empty {
  color: var(--ink-mute);
  font-family: var(--font-code);
}

/* 面包屑 */
.crumbs {
  list-style: none;
  display: flex;
  gap: .5rem;
  padding: 0;
  margin: 1.4rem 0 1.6rem;
  font-family: var(--font-code);
  font-size: .82rem;
  color: var(--ink-mute);
  flex-wrap: wrap;
}

.crumbs a {
  color: var(--ink-mute);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--brick);
}

.crumb-here {
  color: var(--ink);
}

/* 文章 Hero */
.article-hero {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2rem;
  margin-bottom: 2.4rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: .9rem;
  font-family: var(--font-code);
  font-size: .8rem;
  color: var(--ink-mute);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.article-meta .post-tag {
  color: var(--brick);
}

.article-hero h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.35;
  margin: 0 0 1rem;
  color: var(--ink);
}

.article-lead {
  font-size: 1.05rem;
  color: var(--ink-mute);
  max-width: 720px;
  margin: 0;
}

/* 正文排版 */
.article-body h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  margin: 2.4rem 0 1rem;
  color: var(--ink);
}

.article-body h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.12rem;
  margin: 1.8rem 0 .8rem;
  color: var(--ink);
}

.article-body p {
  line-height: 1.8;
  margin: 0 0 1.1rem;
  color: var(--ink);
}

.article-body ul,
.article-body ol {
  line-height: 1.8;
  margin: 0 0 1.2rem;
  padding-left: 1.4rem;
}

.article-body li {
  margin-bottom: .5rem;
}

.article-body blockquote {
  border-left: 3px solid var(--brick);
  margin: 1.4rem 0;
  padding: .2rem 0 .2rem 1.2rem;
  color: var(--ink-mute);
}

/* 文末下载引导卡 */
.dl-outro {
  border: 1px solid var(--rule);
  background: var(--paper-tint);
  padding: 2.2rem;
  margin: 3rem 0;
  text-align: center;
}

.dl-outro h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  margin: 0 0 .7rem;
  color: var(--ink);
}

.dl-outro p {
  color: var(--ink-mute);
  margin: 0 auto 1.4rem;
  max-width: 560px;
}

.dl-outro-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* 延伸阅读 */
#related-posts {
  margin-top: 3rem;
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}

.related-heading {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
  margin: 0 0 1.4rem;
  color: var(--ink);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

@media (max-width: 860px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

.related-card {
  border: 1px solid var(--rule);
  background: var(--paper-panel);
  padding: 1.1rem;
  min-width: 0;
}

.related-title {
  font-size: 1rem;
  font-weight: 700;
  margin: .5rem 0;
  line-height: 1.4;
}

.related-title a {
  color: var(--ink);
  text-decoration: none;
}

.related-title a:hover {
  color: var(--brick);
}

.related-sum {
  color: var(--ink-mute);
  font-size: .86rem;
  line-height: 1.6;
  margin: 0;
}

/* 上下篇导航 */
#post-nav {
  margin-top: 2.4rem;
}

.post-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

@media (max-width: 640px) {
  .post-nav-grid {
    grid-template-columns: 1fr;
  }
}

.post-nav-link {
  border: 1px solid var(--rule);
  background: var(--paper-panel);
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  min-width: 0;
}

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

.post-nav-dir {
  font-family: var(--font-code);
  font-size: .78rem;
  color: var(--brick);
}

.post-nav-title {
  color: var(--ink);
  font-size: .94rem;
  line-height: 1.5;
}

.post-nav-link:hover .post-nav-title {
  color: var(--brick-deep);
}

.post-nav-spacer {
  display: block;
}

/* 下载弹窗 */
.dl-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(43, 38, 32, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.4rem;
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 999;
}

.dl-modal-mask.is-open {
  opacity: 1;
}

.dl-modal {
  background: var(--paper-panel);
  border: 1px solid var(--rule);
  border-radius: var(--corner);
  max-width: 420px;
  width: 100%;
  padding: 2.2rem;
  position: relative;
  transform: translateY(10px);
  transition: transform .2s ease;
}

.dl-modal-mask.is-open .dl-modal {
  transform: translateY(0);
}

.dl-modal-close {
  position: absolute;
  top: .9rem;
  right: .9rem;
  width: 28px;
  height: 28px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-mute);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--corner);
}

.dl-modal-close:hover {
  color: var(--brick);
  border-color: var(--brick);
}

.dl-modal-kicker {
  font-family: var(--font-code);
  font-size: .8rem;
  color: var(--brick);
  margin: 0 0 .6rem;
}

.dl-modal-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  margin: 0 0 .7rem;
  color: var(--ink);
}

.dl-modal-desc {
  color: var(--ink-mute);
  margin: 0 0 1.4rem;
  line-height: 1.6;
}

.dl-modal-btn {
  display: inline-block;
}