:root {
  --blog-font-caption: 0.8125rem;
  --blog-font-small: 0.9375rem;
  --blog-font-body: 1rem;
  --blog-font-card-title: 1.1875rem;
  --blog-font-h3: 1.25rem;
  --blog-font-h2: 1.5rem;
  --blog-font-list-title: clamp(1.75rem, 1.2rem + 2vw, 3rem);
  --blog-font-article-title: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  --blog-font-lead: clamp(0.9375rem, 0.85rem + 0.45vw, 1.125rem);
  --blog-weight-normal: 400;
  --blog-weight-medium: 600;
  --blog-weight-bold: 700;
  --blog-weight-display: 900;
  --blog-line-title: 1.32;
  --blog-line-body: 1.8;
  --blog-line-lead: 1.7;
  --blog-reading-width: 800px;
  --blog-related-width: 820px;
  --blog-focus-width: 2px;
  --blog-focus-offset: 4px;
}

.blog-list-page main,
.blog-article-page main,
.article-page main {
  min-width: 0;
}

main.reading {
  padding-top: 28px;
}

main.reading > header,
main.reading > article > header {
  padding-bottom: 12px;
}

main.reading > header > p:last-child,
main.reading > article > header > p:last-child {
  margin-bottom: 0;
}

main.reading .prose {
  padding-top: 20px;
}

main.reading .prose > section:first-child > h2:first-child {
  margin-top: 0;
}

.blog-skip {
  position: absolute;
  top: 0.75rem;
  left: var(--gutter);
  z-index: 100;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  padding: 0;
  color: var(--bg);
  background: var(--white);
  border-radius: var(--r-small);
  font-family: var(--font-body);
}

.blog-skip:focus {
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  padding: 0.75rem 1rem;
}

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

.blog-list-hero .peek__eyebrow {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--blog-font-caption);
}

.blog-list-hero h1 {
  display: block;
  max-width: 100%;
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--blog-font-list-title);
  font-weight: var(--blog-weight-display);
  line-height: var(--blog-line-title);
  overflow-wrap: anywhere;
}

.blog-list-lead {
  max-width: 48rem;
  margin: 1.25rem 0 0;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--blog-font-lead);
  line-height: var(--blog-line-lead);
}

.blog-ledger {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--blog-font-caption);
}

.blog-ledger span {
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
}

.blog-catalog {
  padding-block: 1.5rem 4rem;
}

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

.blog-catalog__head h2 {
  display: block;
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--blog-font-h2);
  font-weight: var(--blog-weight-bold);
  line-height: var(--blog-line-title);
}

.blog-results-status {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--blog-font-caption);
  line-height: var(--blog-line-lead);
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-block: 1.25rem 1.5rem;
}

.blog-filter {
  min-height: 44px;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--blog-font-small);
  font-weight: var(--blog-weight-medium);
  line-height: 1.5;
  cursor: pointer;
  transition: border-color var(--duration), color var(--duration);
}

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

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

.blog-filter[aria-pressed="true"]::before {
  display: inline-block;
  width: 0.375rem;
  height: 0.375rem;
  margin-right: 0.5rem;
  border-radius: var(--r-circle);
  background: var(--success);
  content: "";
  vertical-align: middle;
}

.blog-filter:focus-visible,
.post-card a:focus-visible,
#post-nav a:focus-visible,
.blog-breadcrumb a:focus-visible,
nav.breadcrumb a:focus-visible,
nav.breadcrumbs a:focus-visible {
  outline: var(--blog-focus-width) solid var(--accent);
  outline-offset: var(--blog-focus-offset);
}

.blog-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1.5rem;
}

.post-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem;
  border: 1px solid var(--clear);
  border-radius: var(--r-card);
  background: linear-gradient(var(--bg-panel), var(--bg-panel)) padding-box,
    var(--edge-gradient) border-box;
  box-shadow: var(--shadow-card);
  color: var(--text);
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem 0.875rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--blog-font-caption);
  line-height: var(--blog-line-lead);
}

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

.post-card__meta .chip {
  color: var(--text-muted);
}

.post-card h3 {
  display: block;
  max-width: 100%;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--blog-font-card-title);
  font-weight: var(--blog-weight-bold);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

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

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

.post-card .post-card__summary {
  margin: 1rem 0 1.25rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--blog-font-small);
  line-height: var(--blog-line-body);
}

.post-card__link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: auto;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: var(--blog-font-small);
  font-weight: var(--blog-weight-medium);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

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

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

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

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

.blog-breadcrumb [aria-hidden="true"],
nav.breadcrumb [aria-hidden="true"],
nav.breadcrumbs [aria-hidden="true"] {
  flex: 0 0 auto;
  color: var(--text-muted);
  opacity: 0.35;
}

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

.blog-article-page main > .section,
.article-page main > .section,
.blog-article-page main.section,
.article-page main.section {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.blog-breadcrumb.section,
nav.breadcrumb.section,
nav.breadcrumbs.section {
  padding-top: 0;
  padding-bottom: 0;
}

.article-hero,
.post-hero {
  padding-block: 0.5rem 1.75rem;
}

.article-meta,
.post-meta,
.article-hero__meta,
.post-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--blog-font-caption);
  line-height: var(--blog-line-lead);
}

.article-meta time,
.post-meta time,
.article-hero__meta time,
.post-hero__meta time {
  font-family: var(--font-mono);
}

.article-hero h1,
.post-hero h1,
.blog-article-page h1,
.article-page h1 {
  display: block;
  width: auto;
  max-width: 100%;
  margin-block: 0.875rem 0.75rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--blog-font-article-title);
  font-weight: var(--blog-weight-display);
  line-height: var(--blog-line-title);
  overflow-wrap: anywhere;
}

.article-lead,
.post-lead,
.article-hero__lead,
.post-hero__lead,
.article-hero > p:last-child,
.post-hero > p:last-child {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--blog-font-lead);
  font-weight: var(--blog-weight-normal);
  line-height: var(--blog-line-lead);
}

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

.article-body h2,
.post-body h2,
.blog-article-page .prose h2,
.article-page .prose h2 {
  display: block;
  max-width: 100%;
  margin: 2rem 0 1rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--blog-font-h2);
  font-weight: var(--blog-weight-bold);
  line-height: 1.5;
}

.article-body h3,
.post-body h3,
.blog-article-page .prose h3,
.article-page .prose h3 {
  display: block;
  max-width: 100%;
  margin: 1.5rem 0 0.75rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--blog-font-h3);
  font-weight: var(--blog-weight-bold);
  line-height: 1.6;
}

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

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

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

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

.article-body section > :last-child,
.post-body section > :last-child,
.blog-article-page .prose section > :last-child,
.article-page .prose section > :last-child {
  margin-bottom: 0;
}

.article-body p,
.post-body p,
.blog-article-page .prose p,
.article-page .prose p {
  margin-block: 0 1rem;
  line-height: var(--blog-line-body);
}

.article-body ul,
.article-body ol,
.post-body ul,
.post-body ol {
  margin-block: 1rem;
  padding-left: 1.5rem;
}

.article-body li + li,
.post-body li + li {
  margin-top: 0.5rem;
}

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

.article-body code,
.post-body code {
  color: var(--text);
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}

.article-body :not(pre) > code,
.post-body :not(pre) > code {
  padding: 0.125em 0.35em;
  border-radius: var(--r-tiny);
  background: var(--bg-panel-2);
}

.article-body pre,
.post-body pre {
  max-width: 100%;
  margin-block: 1.25rem;
  padding: 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--blog-font-small);
  line-height: 1.7;
  tab-size: 2;
}

.article-body pre code,
.post-body pre code {
  white-space: pre;
  overflow-wrap: normal;
}

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

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

.article-body table,
.post-body table {
  border-collapse: collapse;
  font-size: var(--blog-font-small);
}

.article-body th,
.article-body td,
.post-body th,
.post-body td {
  min-width: 9rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.download-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-block: 2rem;
  padding: 1.5rem;
}

.download-guide__copy {
  flex: 1 1 100%;
  min-width: 0;
}

.download-guide .download-guide__copy h2 {
  margin: 0 0 0.75rem;
  font-size: var(--blog-font-h2);
}

.download-guide .download-guide__copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--blog-font-body);
  line-height: var(--blog-line-lead);
}

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

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

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

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

#related-posts .post-card {
  min-width: 0;
}

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

#post-nav .post-nav__card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  color: var(--text);
  font-family: var(--font-body);
  text-decoration: none;
  overflow-wrap: anywhere;
}

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

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

.post-nav__label {
  color: var(--accent);
  font-size: var(--blog-font-small);
  font-weight: var(--blog-weight-medium);
}

.post-nav__title {
  color: var(--text);
  font-size: var(--blog-font-body);
  font-weight: var(--blog-weight-bold);
  line-height: var(--blog-line-lead);
}

.post-nav__meta {
  margin-top: auto;
  color: var(--text-muted);
  font-size: var(--blog-font-caption);
  line-height: var(--blog-line-lead);
}

#post-nav a:hover .post-nav__title {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

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

@media (max-width: 640px) {
  .blog-list-hero {
    padding-block: 2.5rem 1.75rem;
  }

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

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

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

  .blog-catalog__head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .post-card,
  .download-guide {
    padding: 1.25rem;
  }

  .blog-breadcrumb,
  nav.breadcrumb,
  nav.breadcrumbs {
    margin-top: 1.25rem;
  }

  .article-hero,
  .post-hero {
    padding-block: 0.5rem 1.5rem;
  }

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

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

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