.blog-hero {
  padding-top: 3.2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
  background: var(--sheet);
  text-align: center;
}

.blog-hero h1 {
  margin: 0.5rem 0 0.8rem;
  font-family: var(--font-ui);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--ink);
}

.blog-hero-desc {
  max-width: 620px;
  margin: 0 auto;
  color: var(--ink-mute);
  line-height: 1.7;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
}

.filter-btn {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--sheet);
  color: var(--ink-mute);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  cursor: pointer;
}

.filter-btn.on {
  border-color: var(--lava);
  color: var(--lava);
  background: var(--sheet);
}

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

@media (max-width: 860px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.post-card {
  min-width: 0;
  padding: 1.2rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--sheet);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-mute);
}

.post-date {
  flex-shrink: 0;
}

.post-tag {
  flex-shrink: 0;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  color: var(--lava);
}

.post-card h3 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.08rem;
  line-height: 1.4;
}

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

.post-card h3 a:hover {
  color: var(--lava);
}

.post-card p {
  margin: 0;
  color: var(--ink-mute);
  font-size: 0.92rem;
  line-height: 1.65;
  flex-grow: 1;
}

.post-more {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--lava);
  text-decoration: none;
}

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

.crumbs {
  margin-top: calc(var(--hd-h) + 1.4rem);
  padding-top: 12px;
  scroll-margin-top: calc(var(--hd-h) + 12px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-mute);
}

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

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

.crumbs-sep {
  color: var(--rule);
}

.crumbs-cur {
  color: var(--ink);
}

.article-hero {
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--rule);
}

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

.article-hero h1 {
  margin: 0 0 0.9rem;
  font-family: var(--font-ui);
  font-size: 1.9rem;
  line-height: 1.35;
  color: var(--ink);
}

.article-hero .post-read-time {
  font-family: var(--font-mono);
  color: var(--ink-mute);
  font-size: 0.8rem;
}

.article-summary {
  color: var(--ink-mute);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 720px;
}

.article-body {
  max-width: 720px;
  margin: 2rem auto 0;
  color: var(--ink);
  line-height: 1.8;
  font-size: 1rem;
}

.article-body h2 {
  margin: 2.2rem 0 1rem;
  font-family: var(--font-ui);
  font-size: 1.32rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.4rem;
}

.article-body h2:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.article-body h3 {
  margin: 1.6rem 0 0.7rem;
  font-family: var(--font-ui);
  font-size: 1.08rem;
}

.article-body p {
  margin: 0 0 1rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

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

.article-body pre {
  margin: 0 0 1.2rem;
  padding: 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--sheet-dim);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}

.article-body code {
  font-family: var(--font-mono);
  background: var(--sheet-dim);
  padding: 0.1rem 0.35rem;
  border-radius: var(--r);
  font-size: 0.9em;
}

.article-body pre code {
  background: none;
  padding: 0;
}

.article-body blockquote {
  margin: 0 0 1.2rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--lava);
  background: var(--sheet);
  color: var(--ink-mute);
}

.article-body mark {
  background: none;
  color: var(--lava);
  font-weight: 600;
}

.post-cta {
  max-width: 720px;
  margin: 2.6rem auto 0;
  padding: 1.6rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--sheet);
  text-align: center;
}

.post-cta h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-ui);
  font-size: 1.25rem;
}

.post-cta p {
  margin: 0 0 1.2rem;
  color: var(--ink-mute);
}

.post-cta-acts {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.related-block {
  max-width: 720px;
  margin: 2.6rem auto 0;
}

.related-block h2 {
  margin: 0 0 1rem;
  font-family: var(--font-ui);
  font-size: 1.15rem;
}

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

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

.related-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--sheet);
}

.related-card h3 {
  margin: 0.5rem 0;
  font-family: var(--font-ui);
  font-size: 0.98rem;
  line-height: 1.4;
}

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

.related-card h3 a:hover {
  color: var(--lava);
}

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

#post-nav {
  max-width: 720px;
  margin: 2rem auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--sheet);
  text-decoration: none;
  min-width: 0;
}

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

@media (max-width: 640px) {
  .post-nav-next {
    text-align: left;
    grid-column: 1;
  }
}

.post-nav-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--lava);
}

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

.dl-fab {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: var(--r);
  background: var(--lava);
  color: var(--paper-bright);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  border: 1px solid var(--lava-deep);
  z-index: 40;
}

.dl-fab:hover {
  background: var(--lava-deep);
}