.blog-main {
  padding-top: 0;
  padding-bottom: 4rem;
  min-width: 0;
}

.blog-breadcrumb,
nav.breadcrumb,
nav.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1.25rem;
  padding: 0;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--c-muted);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
}

.blog-breadcrumb a,
nav.breadcrumb a,
nav.breadcrumbs a {
  flex: 0 0 auto;
  color: var(--c-muted);
  text-decoration: none;
}

.blog-breadcrumb a:hover,
nav.breadcrumb a:hover,
nav.breadcrumbs a:hover {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.blog-breadcrumb > span:not([aria-current]),
nav.breadcrumb > span:not([aria-current]),
nav.breadcrumbs > span:not([aria-current]) {
  flex: 0 0 auto;
  color: var(--c-faint);
}

.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;
  text-overflow: ellipsis;
}

.blog-breadcrumb ol,
.blog-breadcrumb ul,
nav.breadcrumb ol,
nav.breadcrumb ul,
nav.breadcrumbs ol,
nav.breadcrumbs ul {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
}

.blog-breadcrumb li,
nav.breadcrumb li,
nav.breadcrumbs li {
  flex: 0 0 auto;
  min-width: 0;
}

.blog-breadcrumb li:last-child,
nav.breadcrumb li:last-child,
nav.breadcrumbs li:last-child {
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-hero {
  padding-block: 1.5rem 2.5rem;
}

.blog-eyebrow {
  margin: 0 0 1rem;
  color: var(--c-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.blog-hero h1 {
  margin: 0;
  max-width: 100%;
  color: var(--c-text);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 2vw, 3rem);
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.blog-lead {
  margin: 1.25rem 0 0;
  max-width: 48rem;
  color: var(--c-muted);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.blog-library {
  padding-block: 0.5rem 1rem;
}

.blog-library__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.25rem;
}

.blog-library__head h2 {
  margin: 0;
  color: var(--c-text);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.4;
}

.blog-count {
  margin: 0;
  color: var(--c-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-bottom: 1.75rem;
}

.blog-filters button {
  min-height: 44px;
  padding: 0.625rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-panel);
  color: var(--c-muted);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}

.blog-filters button:hover {
  border-color: var(--c-accent);
  color: var(--c-accent-dark);
}

.blog-filters button[aria-pressed="true"] {
  border-color: var(--c-accent);
  background: var(--c-accent);
  color: var(--c-on-accent);
}

.blog-filters button:focus-visible,
.post-card a:focus-visible,
.post-nav__card:focus-visible,
.blog-breadcrumb a:focus-visible,
nav.breadcrumb a:focus-visible,
nav.breadcrumbs a:focus-visible {
  outline: var(--ring-focus);
  outline-offset: 4px;
}

.blog-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 1.5rem;
}

.blog-post-grid > *,
#related-posts > * {
  min-width: 0;
}

.blog-post-grid .post-card,
#related-posts .post-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 1.5rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-panel);
  color: var(--c-text);
  box-shadow: var(--shadow-sheet);
}

.post-card__meta,
.article-meta,
.article-hero__meta,
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.875rem;
  color: var(--c-muted);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
}

.post-card__meta time {
  font-family: var(--font-mono);
}

.post-card__meta .tag {
  max-width: 100%;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xs);
  background: var(--c-panel-2);
  color: var(--c-accent-dark);
  white-space: normal;
}

.blog-post-grid .post-card h3,
#related-posts .post-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

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

.post-card h3 a:hover {
  color: var(--c-accent-dark);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.blog-post-grid .post-card p,
#related-posts .post-card p {
  margin: 0;
  color: var(--c-muted);
  font-size: 0.9375rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.blog-post-grid .post-card__link,
#related-posts .post-card__link {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 0.25rem;
  color: var(--c-accent-dark);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.blog-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.5rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-panel);
  color: var(--c-muted);
  line-height: 1.8;
}

.blog-empty a {
  color: var(--c-accent-dark);
  text-underline-offset: 0.2em;
}

.article-page .section,
main.section:has(.article-hero),
main.section:has(.post-hero),
.section:has(> .blog-breadcrumb),
.section:has(> nav.breadcrumb),
.section:has(> nav.breadcrumbs) {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.article-page main,
.article-main {
  min-width: 0;
  padding-top: 0;
  padding-bottom: 3rem;
}

main.wrap.reading:has(> article) {
  padding-top: 2rem;
}

main.wrap.reading:has(> article) > nav > p {
  margin-top: 0;
}

.article-hero,
.post-hero,
.article-page .article-header {
  margin: 0 0 1.75rem;
  padding-block: 0.5rem 0;
}

.article-hero .article-meta,
.article-hero .article-hero__meta,
.article-hero .post-meta,
.post-hero .article-meta,
.post-hero .post-meta,
.article-page .article-header .article-meta {
  margin: 0 0 1rem;
}

.article-hero h1,
.post-hero h1,
.article-page h1,
main.wrap.reading > article > header h1 {
  max-width: 100%;
  margin: 0 0 1rem;
  color: var(--c-text);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  font-weight: 900;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.article-lead,
.article-hero__lead,
.post-lead,
.article-hero > p:last-child,
.post-hero > p:last-child {
  margin: 1rem 0 0;
  color: var(--c-muted);
  font-size: clamp(0.9375rem, 0.85rem + 0.45vw, 1.125rem);
  line-height: 1.7;
}

.article-page .prose,
.article-body,
.document-body {
  min-width: 0;
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.prose section,
.article-body section,
.document-body section,
.article-page .prose .section,
.article-body .section,
.document-body .section {
  margin-block: 1.5rem 0;
  padding-block: 0;
}

.prose section:first-child,
.article-body section:first-child,
.document-body section:first-child {
  margin-top: 0;
}

.prose h2,
.article-body h2,
.document-body h2 {
  margin: 2rem 0 1rem;
  color: var(--c-text);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 800;
  line-height: 1.5;
  scroll-margin-top: calc(var(--head-h) + 1rem);
}

.prose > h2:first-of-type,
.article-body > h2:first-of-type,
.document-body > h2:first-of-type,
.prose > section:first-child > h2:first-child,
.article-body > section:first-child > h2:first-child,
.document-body > section:first-child > h2:first-child {
  margin-top: 0;
}

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

.prose h3,
.article-body h3,
.document-body h3 {
  margin: 1.5rem 0 0.75rem;
  color: var(--c-text);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.6;
}

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

.prose ul,
.prose ol,
.article-body ul,
.article-body ol,
.document-body ul,
.document-body ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.prose li + li,
.article-body li + li,
.document-body li + li {
  margin-top: 0.375rem;
}

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

.prose code,
.article-body code,
.document-body code {
  padding: 0.1em 0.3em;
  border-radius: var(--r-xs);
  background: var(--c-panel-2);
  color: var(--c-text);
  font-family: var(--font-mono);
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

.prose pre,
.article-body pre,
.document-body pre {
  max-width: 100%;
  margin: 1.25rem 0;
  padding: 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-panel);
  color: var(--c-text);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.8;
  white-space: pre;
  overflow-wrap: normal;
}

.prose pre code,
.article-body pre code,
.document-body pre code {
  padding: 0;
  border-radius: 0;
  background: var(--c-clear);
  color: inherit;
  font-size: inherit;
  white-space: inherit;
  overflow-wrap: normal;
}

.prose blockquote,
.article-body blockquote,
.document-body blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 3px solid var(--c-accent);
  color: var(--c-muted);
}

.prose blockquote > :last-child,
.article-body blockquote > :last-child,
.document-body blockquote > :last-child {
  margin-bottom: 0;
}

.prose mark,
.article-body mark,
.document-body mark {
  background: var(--c-warn);
  color: var(--c-text);
}

.prose img,
.article-body img,
.document-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-sm);
}

.prose .table-scroll,
.article-body .table-scroll,
.document-body .table-scroll {
  max-width: 100%;
  margin: 1.25rem 0;
  overflow-x: auto;
}

.prose table,
.article-body table,
.document-body table {
  display: block;
  max-width: 100%;
  margin: 1.25rem 0;
  overflow-x: auto;
  border-collapse: collapse;
  background: var(--c-panel);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.prose th,
.prose td,
.article-body th,
.article-body td,
.document-body th,
.document-body td {
  min-width: 7em;
  padding: 0.75rem 1rem;
  border: 1px solid var(--c-border);
  text-align: left;
  vertical-align: top;
  word-break: normal;
  overflow-wrap: normal;
}

.prose th,
.article-body th,
.document-body th {
  background: var(--c-panel-2);
  color: var(--c-text);
}

.download-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-block: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-panel);
  color: var(--c-text);
  box-shadow: var(--shadow-sheet);
}

.download-note > div:first-child {
  flex: 1 1 18rem;
  min-width: 0;
}

.download-note h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.5;
}

.download-note p {
  margin: 0;
  color: var(--c-muted);
  font-size: 0.9375rem;
  line-height: 1.8;
}

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

#related-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
  margin-block: 2rem;
  min-width: 0;
}

#related-posts > h2 {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--c-text);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.5;
}

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

#post-nav .post-nav__card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-panel);
  color: var(--c-text);
  text-decoration: none;
  box-shadow: var(--shadow-sheet);
}

#post-nav .post-nav__card:hover {
  border-color: var(--c-accent);
}

.post-nav__card--previous {
  grid-column: 1;
}

.post-nav__card--next {
  grid-column: 2;
}

.post-nav__label {
  color: var(--c-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.post-nav__title {
  color: var(--c-accent-dark);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

#related-posts[hidden],
#post-nav[hidden] {
  display: none;
}

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

@media (max-width: 640px) {
  .blog-hero {
    padding-block: 0.75rem 2rem;
  }

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

  .article-hero h1,
  .post-hero h1,
  .article-page h1 {
    font-size: 1.5rem;
    line-height: 1.32;
  }

  .blog-lead {
    font-size: 1rem;
  }

  .blog-post-grid,
  #related-posts,
  #post-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-post-grid .post-card,
  #related-posts .post-card {
    padding: 1.25rem;
  }

  .post-nav__card--previous,
  .post-nav__card--next {
    grid-column: 1;
  }

  .download-note {
    padding: 1.25rem;
  }
}