.blog-index,
.blog-article,
.article-page {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

.blog-index *,
.blog-article *,
.article-page * {
  box-sizing: border-box;
}

.blog-index main,
.blog-article main,
.article-page main,
.article-body,
.article-hero,
#related-posts,
#post-nav {
  min-width: 0;
}

.blog-skip {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--ink);
  transform: translateY(-200%);
}

.blog-skip:focus {
  transform: translateY(0);
}

.blog-breadcrumb,
nav.breadcrumb,
nav.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  margin-top: 1.5rem;
  margin-bottom: 1.25rem;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--text-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(--text-muted);
  text-decoration: none;
}

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

.blog-breadcrumb .breadcrumb-separator,
nav.breadcrumb .breadcrumb-separator,
nav.breadcrumbs .breadcrumb-separator,
.blog-breadcrumb > span:not([aria-current]),
nav.breadcrumb > span:not([aria-current]),
nav.breadcrumbs > span:not([aria-current]) {
  flex: 0 0 auto;
  opacity: 0.58;
}

.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-hero {
  padding-block: 1.25rem 2rem;
}

.blog-hero h1 {
  display: block;
  max-width: 100%;
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1rem + 2vw, 3rem);
  font-weight: 400;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.blog-hero > p {
  max-width: 52rem;
  margin: 1.125rem 0 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.blog-catalog {
  padding-bottom: 4rem;
}

.blog-catalog-title {
  display: block;
  margin: 0 0 1rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.5;
}

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

.blog-filter {
  min-height: 44px;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.4;
  cursor: pointer;
}

.blog-filter:hover {
  border-color: var(--accent);
  color: var(--text);
}

.blog-filter[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--sel-fill);
  color: var(--text);
}

.blog-result-status {
  min-height: 1.5em;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

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

.blog-post-grid .post-card,
#related-posts .post-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg);
  box-shadow: none;
}

.blog-post-grid .post-card:hover,
#related-posts .post-card:hover {
  border-color: var(--accent);
}

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

.post-meta time,
.article-meta time {
  white-space: nowrap;
}

.post-meta .tag,
.article-meta .tag {
  display: inline-block;
  padding: 0.2rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.blog-post-grid .post-card h3,
#related-posts .post-card h3 {
  display: block;
  margin: 1rem 0 0.875rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

.blog-post-grid .post-card h3 a:hover,
#related-posts .post-card h3 a:hover {
  color: var(--accent-soft);
}

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

.blog-post-grid .post-read,
#related-posts .post-read {
  align-self: flex-start;
  margin-top: auto;
  padding-block: 0.25rem;
  color: var(--accent-soft);
  font-size: 0.9375rem;
  line-height: 1.6;
  text-decoration: none;
  text-underline-offset: 0.25em;
}

.blog-post-grid .post-read:hover,
#related-posts .post-read:hover {
  text-decoration: underline;
}

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

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

.article-wrap,
.article-layout,
.article-shell,
.article-page > main,
.blog-article > main,
.has-dl-fab > main {
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
}

.article-page main.section,
.blog-article main.section,
.has-dl-fab main.section {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.article-page .section:has(> .blog-breadcrumb),
.article-page .section:has(> nav.breadcrumb),
.article-page .section:has(> nav.breadcrumbs),
.blog-article .section:has(> .blog-breadcrumb),
.blog-article .section:has(> nav.breadcrumb),
.blog-article .section:has(> nav.breadcrumbs),
.has-dl-fab .section:has(> .blog-breadcrumb),
.has-dl-fab .section:has(> nav.breadcrumb),
.has-dl-fab .section:has(> nav.breadcrumbs) {
  padding-top: 1.5rem;
  padding-bottom: 0;
}

.article-hero,
.article-hero.section,
.article-header,
.article-header.section {
  margin-block: 0;
  padding-block: 0.5rem 1.5rem;
}

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

.article-hero h1,
.article-header h1,
.article-page main h1,
.blog-article main h1,
.has-dl-fab main h1 {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-block: 1rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  font-weight: 400;
  line-height: 1.32;
  overflow-wrap: break-word;
}

.article-lead,
.article-summary,
.article-hero > p,
.article-header > p {
  max-width: 100%;
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 0.85rem + 0.45vw, 1.125rem);
  line-height: 1.7;
}

.article-body,
.article-page .prose,
.blog-article .prose,
.has-dl-fab .prose {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.9;
  overflow-wrap: break-word;
}

.article-body > :first-child,
.article-body > section:first-child > :first-child,
.article-page .prose > :first-child,
.blog-article .prose > :first-child,
.has-dl-fab .prose > :first-child {
  margin-top: 0;
}

.article-body section,
.article-body section.section,
.article-page .prose section,
.blog-article .prose section,
.has-dl-fab .prose section {
  margin-block: 0;
  padding-block: 0;
}

.article-body section + section,
.article-page .prose section + section,
.blog-article .prose section + section,
.has-dl-fab .prose section + section {
  margin-top: 2rem;
}

.article-body h2,
.article-page .prose h2,
.blog-article .prose h2,
.has-dl-fab .prose h2 {
  display: block;
  margin: 2rem 0 1rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem);
  font-weight: 400;
  line-height: 1.5;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.article-body > h2:first-of-type,
.article-body > section > h2:first-child,
.article-page .prose > h2:first-of-type,
.blog-article .prose > h2:first-of-type,
.has-dl-fab .prose > h2:first-of-type {
  margin-top: 0;
}

.article-body h3,
.article-page .prose h3,
.blog-article .prose h3,
.has-dl-fab .prose h3 {
  display: block;
  margin: 1.5rem 0 0.75rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-page .prose p,
.blog-article .prose p,
.has-dl-fab .prose p {
  margin-block: 0.875rem;
}

.article-body ul,
.article-body ol {
  padding-inline-start: 1.5rem;
}

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

.article-body strong {
  color: var(--text);
}

.article-body a:not([class*="btn"]):not([class*="button"]),
.article-page .prose a:not([class*="btn"]):not([class*="button"]),
.blog-article .prose a:not([class*="btn"]):not([class*="button"]),
.has-dl-fab .prose a:not([class*="btn"]):not([class*="button"]) {
  color: var(--accent-soft);
  text-underline-offset: 0.25em;
}

.article-body :not(pre) > code {
  padding: 0.125rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

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

.article-body pre code {
  padding: 0;
  border: 0;
  background: var(--clear);
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  white-space: inherit;
  overflow-wrap: normal;
  word-break: normal;
}

.article-body blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 2px solid var(--accent);
  color: var(--text-muted);
}

.article-body blockquote > :first-child {
  margin-top: 0;
}

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

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

.article-body table,
.article-page .prose table,
.blog-article .prose table,
.has-dl-fab .prose table {
  display: block;
  max-width: 100%;
  margin: 1.25rem 0;
  overflow-x: auto;
  border-collapse: collapse;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.article-body .table-scroll table {
  display: table;
  width: 100%;
  margin: 0;
}

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

.article-body th {
  color: var(--text);
  font-weight: 400;
}

.article-body td code {
  overflow-wrap: anywhere;
}

.article-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 2rem 0 0;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg);
}

.article-download > div {
  min-width: 0;
}

.article-download h2,
.article-body .article-download h2 {
  display: block;
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.5;
}

.article-download p,
.article-body .article-download p {
  margin: 0.625rem 0 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.article-download .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

.article-related,
.related-section {
  margin-block: 2rem;
  padding-block: 0;
}

.article-related > h2,
.related-section > h2 {
  display: block;
  margin: 0 0 1rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.5;
}

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

#related-posts .post-card {
  padding: 1.5rem;
}

#related-posts .post-card h3 {
  font-size: 1.125rem;
}

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

#post-nav .post-nav-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}

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

#post-nav .post-nav-link--next {
  grid-column: 2;
}

#post-nav .post-nav-label {
  color: var(--accent-soft);
  font-size: 0.875rem;
  line-height: 1.6;
}

#post-nav .post-nav-title {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

#post-nav time {
  margin-top: auto;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.blog-filter:focus-visible,
.blog-skip:focus-visible,
.blog-breadcrumb a:focus-visible,
nav.breadcrumb a:focus-visible,
nav.breadcrumbs a:focus-visible,
.post-card a:focus-visible,
#post-nav a:focus-visible,
.article-body a:focus-visible,
.article-body pre:focus-visible,
.article-body .table-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

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

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

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

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

  .article-hero h1,
  .article-header h1,
  .article-page main h1,
  .blog-article main h1,
  .has-dl-fab main h1 {
    font-size: 1.5rem;
  }

  .article-download {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.25rem;
  }

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

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

  #post-nav .post-nav-link--next {
    grid-column: 1;
  }

  .article-body pre {
    padding: 1rem;
  }
}