:root {
  --blog-breadcrumb-size: 13px;
  --blog-article-title-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  --blog-article-lead-size: clamp(0.9375rem, 0.85rem + 0.45vw, 1.125rem);
  --blog-heading-two-size: 24px;
  --blog-heading-three-size: 20px;
  --blog-mobile-title-size: 30px;
  --blog-mobile-article-title-size: 24px;
  --blog-title-tracking: -0.035em;
  --blog-card-tracking: -0.02em;
  --blog-focus-width: 2px;
}

.blog-list-shell {
  padding-top: 3.5rem;
  padding-bottom: 5rem;
}

.blog-list-hero {
  max-width: var(--reading-width);
  padding-block: 1rem 3rem;
}

.blog-eyebrow {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: var(--text-sm);
}

.blog-list-hero h1 {
  margin: 0;
  max-width: 100%;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--h1-size);
  font-weight: var(--weight-regular);
  line-height: 1.2;
  letter-spacing: var(--blog-title-tracking);
}

.blog-list-lead {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: var(--text-lede);
  line-height: 1.8;
}

.blog-filter-panel {
  padding: 1.75rem 2rem;
  background: var(--panel-lime);
  border-radius: var(--r-xl);
}

.blog-filter-title {
  margin: 0 0 1rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  color: var(--muted);
}

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

.blog-filter {
  min-height: 44px;
  padding: 0.5rem 0;
  border: 0;
  border-bottom: 2px solid var(--clear);
  border-radius: 0;
  color: var(--ink);
  background: var(--clear);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  cursor: pointer;
}

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

.blog-filter:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.35em;
}

.blog-filter:focus-visible,
.blog-post-card a:focus-visible,
.related-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(--blog-focus-width) solid var(--ink);
  outline-offset: 4px;
  border-radius: var(--r-focus);
}

.blog-status {
  margin: 1.5rem 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

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

.blog-post-card,
.related-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--paper);
  color: var(--ink);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: var(--blog-breadcrumb-size);
  line-height: 1.7;
}

.article-meta time {
  font-variant-numeric: tabular-nums;
}

.article-meta .tag {
  max-width: 100%;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0.2rem 0.65rem;
  white-space: normal;
  overflow-wrap: break-word;
  font-size: var(--text-xs);
  line-height: 1.6;
}

.blog-post-card h3,
.related-card h3 {
  margin: 1rem 0 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--h3-size);
  font-weight: var(--weight-regular);
  line-height: 1.55;
  letter-spacing: var(--blog-card-tracking);
  overflow-wrap: break-word;
}

.blog-post-card h3 a,
.related-card h3 a {
  color: inherit;
  text-decoration: none;
}

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

.blog-post-card > p,
.related-card > p {
  margin: 1rem 0 1.5rem;
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.85;
}

.blog-post-card > .text-link,
.related-card > .text-link {
  align-self: flex-start;
  margin-top: auto;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.3em;
}

.blog-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.5rem;
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.8;
}

.blog-reading-note {
  margin-top: 3rem;
  padding: 2rem;
  border-radius: var(--r-xl);
  background: var(--panel-lav);
}

.blog-reading-note h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--blog-heading-two-size);
  font-weight: var(--weight-regular);
  line-height: 1.5;
}

.blog-reading-note p {
  margin: 1rem 0 1.25rem;
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

.blog-breadcrumb [aria-hidden="true"],
nav.breadcrumb [aria-hidden="true"],
nav.breadcrumbs [aria-hidden="true"] {
  flex: 0 0 auto;
  color: var(--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;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.article-hero,
.article-hero.section {
  padding-top: 0.5rem;
  padding-bottom: 1.5rem;
}

.article-hero .article-meta,
.article-hero .post-meta {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: var(--blog-breadcrumb-size);
  line-height: 1.7;
}

main.reading > article > header h1,
.article-hero h1 {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1rem 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--blog-article-title-size);
  font-weight: var(--weight-regular);
  line-height: 1.32;
  letter-spacing: var(--blog-card-tracking);
  overflow-wrap: break-word;
}

.article-hero > p:not(.article-meta):not(.post-meta),
.article-hero .article-lead,
.article-hero .article-summary,
.article-hero .article-description {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: var(--blog-article-lead-size);
  line-height: 1.7;
}

.article-body,
.blog-article .prose,
.article-page .prose {
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.9;
  overflow-wrap: break-word;
}

.article-body.section,
.blog-article .prose.section,
.article-page .prose.section {
  padding-top: 0;
  padding-bottom: 2rem;
}

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

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

.article-body h2,
.blog-article .prose h2,
.article-page .prose h2 {
  display: block;
  margin: 2rem 0 1rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--blog-heading-two-size);
  font-weight: var(--weight-regular);
  line-height: 1.5;
}

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

.article-body h3,
.blog-article .prose h3,
.article-page .prose h3 {
  display: block;
  margin: 1.5rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: var(--blog-heading-three-size);
  font-weight: var(--weight-regular);
  line-height: 1.6;
}

.article-body p,
.article-body ul,
.article-body ol,
.blog-article .prose p,
.blog-article .prose ul,
.blog-article .prose ol,
.article-page .prose p,
.article-page .prose ul,
.article-page .prose ol {
  margin: 0 0 1.25rem;
}

.article-body ul,
.article-body ol,
.blog-article .prose ul,
.blog-article .prose ol,
.article-page .prose ul,
.article-page .prose ol {
  padding-left: 1.5rem;
}

.article-body li + li,
.blog-article .prose li + li,
.article-page .prose li + li {
  margin-top: 0.5rem;
}

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

.article-body code,
.blog-article .prose code,
.article-page .prose code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink);
  background: var(--surface);
  border-radius: var(--r-focus);
  padding: 0.1em 0.3em;
  overflow-wrap: anywhere;
}

.article-body pre,
.blog-article .prose pre,
.article-page .prose pre {
  max-width: 100%;
  margin: 1.25rem 0;
  padding: 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.8;
}

.article-body pre code,
.blog-article .prose pre code,
.article-page .prose pre code {
  padding: 0;
  border-radius: 0;
  background: var(--clear);
  overflow-wrap: normal;
  word-break: normal;
  white-space: pre;
}

.article-body blockquote,
.blog-article .prose blockquote,
.article-page .prose blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 2px solid var(--line-strong);
  color: var(--muted);
}

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

.article-body img,
.blog-article .prose img,
.article-page .prose img {
  max-width: 100%;
  height: auto;
}

.article-body table,
.blog-article .prose table,
.article-page .prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-block: 1.5rem;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

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

.article-download {
  margin-block: 2rem;
}

.article-download .article-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.article-related {
  margin-block: 2.5rem;
}

.article-related > h2 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: var(--blog-heading-two-size);
  font-weight: var(--weight-regular);
  line-height: 1.5;
}

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

#related-posts .related-card h3 {
  font-size: var(--blog-heading-three-size);
}

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

.post-nav-card {
  display: block;
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

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

.post-nav-label {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.post-nav-title {
  display: block;
  color: var(--ink);
  font-size: var(--text-base);
  line-height: 1.75;
  overflow-wrap: break-word;
}

.post-nav-card:hover .post-nav-title {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.25em;
}

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

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

@media (max-width: 700px) {
  .blog-list-shell {
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .blog-list-hero {
    padding-block: 0.5rem 2rem;
  }

  .blog-list-hero h1 {
    font-size: var(--blog-mobile-title-size);
  }

  main.reading > article > header h1,
.article-hero h1 {
    font-size: var(--blog-mobile-article-title-size);
  }

  .blog-filter-panel,
  .blog-reading-note {
    padding: 1.5rem;
  }

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

  .blog-post-card,
  .related-card,
  .post-nav-card {
    padding: 1.25rem;
  }

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

  .blog-filters {
    column-gap: 1.25rem;
  }

  .blog-reading-note {
    margin-top: 2rem;
  }
}