.blog-skip {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  transform: translateY(-200%);
  border: 1px solid var(--text);
  border-radius: var(--r-s);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

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

.blog-intro {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.blog-intro-panel {
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--accent);
  border-radius: var(--r-xl);
  background: var(--accent);
  color: var(--text);
}

.blog-intro-panel .eyebrow {
  margin: 0 0 1rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.blog-intro h1 {
  display: block;
  margin: 0;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.blog-intro-lead {
  max-width: 48rem;
  margin: 1.25rem 0 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
}

.blog-topic-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--text);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

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

.blog-catalog-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.blog-catalog-heading h2 {
  display: block;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.4;
}

.blog-count {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.blog-filter {
  min-height: 2.75rem;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-s);
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

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

.blog-filter[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--bg-panel);
  color: var(--accent-dark);
}

.blog-filter: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: 2px solid var(--accent-dark);
  outline-offset: 4px;
}

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

.post-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  background: var(--bg);
  color: var(--text);
}

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

.post-card .tag-label,
.article-hero .tag-label,
.article-header .tag-label {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--r-s);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.post-card h3 {
  display: block;
  max-width: 100%;
  margin: 1rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

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

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

.post-card .post-summary {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.post-card .post-read {
  align-self: flex-start;
  margin-top: auto;
  color: var(--accent-dark);
  font-size: 0.875rem;
  line-height: 1.6;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

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

.blog-empty p {
  margin: 0;
}

.blog-empty p + p {
  margin-top: 0.75rem;
}

/* Compact article opening, including common breadcrumb aliases. */
main.reading:has(> article) {
  padding-top: 2rem;
}

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

.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-dark);
}

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

.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;
  white-space: nowrap;
}

.section:has(> .blog-breadcrumb),
.section:has(> nav.breadcrumb),
.section:has(> nav.breadcrumbs) {
  padding-top: 0.25rem;
  padding-bottom: 0;
}

.article-page main.section,
main.article-page.section {
  padding-top: 0.25rem;
  padding-bottom: 3rem;
}

.article-hero,
.article-header,
.article-hero.section,
.article-header.section {
  padding-top: 0.5rem;
  padding-bottom: 1.75rem;
  margin-top: 0;
  margin-bottom: 0;
}

.article-hero .post-meta,
.article-header .post-meta,
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.875rem;
  margin-top: 0;
  margin-bottom: 0.875rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
}

.article-hero h1,
.article-header h1,
.article-title {
  display: block;
  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: 700;
  line-height: 1.32;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.article-lead,
.article-summary,
.article-hero > p:last-child,
.article-header > p:last-child {
  margin-top: 1rem;
  margin-bottom: 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;
  overflow-wrap: anywhere;
}

.article-body {
  min-width: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.article-body h2,
.article-body h3 {
  display: block;
  max-width: 100%;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.article-body h2 {
  margin: 2rem 0 1rem;
  font-size: clamp(1.25rem, 1rem + 0.6vw, 1.5rem);
  line-height: 1.5;
}

.article-body h3 {
  margin: 1.5rem 0 0.75rem;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.6;
}

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

.article-body section,
.article-body section.section {
  margin-block: 0;
  padding-block: 0;
}

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

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

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body pre,
.article-body .table-scroll {
  margin-block: 1rem;
}

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

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

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

.article-body blockquote {
  padding: 0.75rem 1.25rem;
  border-inline-start: 2px solid var(--accent);
  background: var(--bg-panel);
  color: var(--text-muted);
}

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

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

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

.article-body :not(pre) > code {
  padding: 0.125em 0.3em;
  border-radius: var(--r-s);
  background: var(--bg-panel);
  color: var(--text);
}

.article-body pre {
  max-width: 100%;
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  background: var(--bg-panel);
  color: var(--text);
  font-family: var(--font-mono);
  line-height: 1.7;
  tab-size: 2;
}

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

.article-body img,
.article-body svg,
.article-body video {
  max-width: 100%;
  height: auto;
}

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

.article-body table,
.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-block: 1rem;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.7;
}

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

.article-body th,
.prose th {
  background: var(--bg-panel);
  font-weight: 600;
}

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

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

.article-body .download-guide h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.5;
}

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

.download-guide .download-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

#related-posts {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

#related-posts .related-heading {
  display: block;
  margin: 0 0 1.25rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.5;
}

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

#related-posts {
  container-type: inline-size;
}

@container (min-width: 616px) {
  #related-posts .related-grid {
    grid-template-columns: repeat(2, minmax(300px, 1fr));
  }
}

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

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

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

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

.post-nav-label,
.post-nav-date {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.post-nav-title {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.post-nav-card:hover .post-nav-title {
  color: var(--accent-dark);
}

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

@media (max-width: 767px) {
  .blog-intro {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
  }

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

  .blog-intro-panel {
    padding: 1.5rem;
  }

  .blog-topic-line {
    gap: 0.75rem 1rem;
    margin-top: 1.5rem;
  }

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

  .post-card {
    padding: 1.25rem;
  }

  .article-hero h1,
  .article-header h1,
  .article-title {
    font-size: 1.5rem;
  }

  .article-body .download-guide {
    padding: 1.25rem;
  }

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

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

@media (prefers-reduced-motion: reduce) {
  .blog-skip {
    transition: none;
  }
}