:root {
  --blog-text-small: 0.8125rem;
  --blog-text-body: 1rem;
  --blog-title-list: clamp(1.875rem, 1.2rem + 2vw, 3rem);
  --blog-title-article: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  --blog-text-lead: clamp(0.9375rem, 0.85rem + 0.45vw, 1.125rem);
  --blog-title-section: clamp(1.25rem, 1rem + 0.7vw, 1.5rem);
  --blog-title-card: 1.25rem;
  --blog-focus-width: 2px;
}

.blog-list-page {
  background: var(--bg-panel-2);
  color: var(--ink);
  font-family: var(--font-body);
}

.blog-list-page .dl-fab {
  background: var(--accent-dark);
  color: var(--surface-light);
  border: 1px solid var(--accent-dark);
}

main.light-section > .reading {
  padding-top: 32px;
}

main.light-section > .reading > nav:first-child {
  margin-bottom: 20px;
}

main.light-section > .reading > nav:first-child p {
  margin: 0;
}

.reading header .post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 14px;
  color: var(--ink-muted);
  font-size: var(--blog-text-small);
}

.reading header h1 {
  margin: 0 0 12px;
  font-size: var(--blog-title-article);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.reading header > p {
  margin: 0;
  font-size: var(--blog-text-lead);
  line-height: 1.8;
}

.reading header {
  margin-bottom: 32px;
}

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

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

.blog-index-hero {
  padding-block: 3rem;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 12px 16px, var(--star) 0.6px, var(--clear) 1px);
  background-size: 109px 83px;
  color: var(--text);
}

.blog-eyebrow {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: var(--blog-text-small);
  font-weight: var(--weight-medium);
}

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

.blog-hero-accent {
  color: var(--accent-soft);
}

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

.blog-catalog {
  padding-block: 2rem 4rem;
  background: var(--bg-panel-2);
  color: var(--ink);
}

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

.blog-filter {
  min-height: 44px;
  padding: 0.625rem 1rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: var(--surface-light);
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: var(--blog-text-body);
  font-weight: var(--weight-medium);
  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(--accent-tint);
  color: var(--accent-dark);
}

.blog-filter:focus-visible,
.blog-post-card a:focus-visible,
.blog-related-card a:focus-visible,
.blog-nav-card:focus-visible,
.blog-skip:focus-visible {
  outline: var(--blog-focus-width) solid var(--accent);
  outline-offset: 4px;
}

.blog-result-count {
  margin: 1.25rem 0;
  color: var(--ink-muted);
  font-size: var(--blog-text-small);
  line-height: 1.7;
}

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

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

.blog-post-card .post-meta,
.blog-related-card .post-meta,
.article-meta,
.article-hero .post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem 1rem;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: var(--blog-text-small);
  line-height: 1.7;
}

.blog-tag {
  max-width: 100%;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: var(--blog-text-small);
  font-weight: var(--weight-medium);
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

.blog-post-card h2,
.blog-related-card h3 {
  display: block;
  margin: 1rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: var(--blog-title-card);
  font-weight: var(--weight-title);
  line-height: 1.55;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}

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

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

.blog-card-summary {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  font-size: var(--blog-text-body);
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.blog-read-link {
  align-self: flex-start;
  margin-top: auto;
  color: var(--accent-dark);
  font-size: var(--blog-text-body);
  line-height: 1.7;
  text-decoration: none;
}

.blog-read-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

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

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

.article-page,
.blog-article {
  background: var(--bg-panel-2);
  color: var(--ink);
}

.article-page .section,
.blog-article .section {
  padding-block: 1.5rem;
}

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

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

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

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

:is(.blog-breadcrumb, nav.breadcrumb, nav.breadcrumbs) > :is(.separator, .breadcrumb-separator, [aria-hidden="true"]) {
  flex: 0 0 auto;
  color: var(--ink-muted);
  opacity: 0.55;
}

:is(.blog-breadcrumb, nav.breadcrumb, nav.breadcrumbs) [aria-current="page"] {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 30ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-hero,
.article-hero.section {
  padding-block: 0.5rem 1.5rem;
  background: var(--bg-panel-2);
  color: var(--ink);
}

.article-hero .article-meta,
.article-hero .post-meta {
  margin-top: 0;
  margin-bottom: 0.9375rem;
}

.article-hero h1 {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0.9375rem 0 0.75rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--blog-title-article);
  font-weight: var(--weight-title);
  line-height: 1.32;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}

.article-hero .article-lead,
.article-hero .lead,
.article-hero .article-summary,
.article-hero > p:last-child {
  margin-top: 0.9375rem;
  margin-bottom: 0;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: var(--blog-text-lead);
  line-height: 1.7;
}

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

:is(.article-content, .article-body, .prose) > :first-child {
  margin-top: 0;
}

:is(.article-content, .article-body, .prose) :is(h1, h2, h3) {
  display: block;
  max-width: 100%;
  font-family: var(--font-display);
  font-weight: var(--weight-title);
  letter-spacing: normal;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

:is(.article-content, .article-body, .prose) h2 {
  margin: 2rem 0 1rem;
  font-size: var(--blog-title-section);
  line-height: 1.45;
}

:is(.article-content, .article-body, .prose) > h2:first-child,
:is(.article-content, .article-body, .prose) > section:first-child > h2:first-child {
  margin-top: 0;
}

:is(.article-content, .article-body, .prose) h3 {
  margin: 1.5rem 0 0.75rem;
  font-size: var(--blog-title-card);
  line-height: 1.5;
}

:is(.article-content, .article-body, .prose) :is(p, ul, ol, pre, blockquote, .table-scroll, .callout) {
  margin-block: 0 1.25rem;
}

:is(.article-content, .article-body, .prose) :is(ul, ol) {
  padding-inline-start: 1.5rem;
}

:is(.article-content, .article-body, .prose) li + li {
  margin-top: 0.5rem;
}

:is(.article-content, .article-body, .prose) section,
:is(.article-content, .article-body, .prose) section.section {
  margin-block: 0 1.5rem;
  padding-block: 0;
}

:is(.article-content, .article-body, .prose) section + section > h2:first-child {
  margin-top: 0;
}

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

:is(.article-content, .article-body, .prose) code {
  padding: 0.125rem 0.3rem;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.875em;
  white-space: normal;
  overflow-wrap: anywhere;
}

:is(.article-content, .article-body, .prose) pre {
  max-width: 100%;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  color: var(--text);
  line-height: 1.75;
}

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

:is(.article-content, .article-body, .prose) blockquote {
  padding: 1rem 1.25rem;
  border-inline-start: 3px solid var(--accent);
  background: var(--surface-sunken);
  color: var(--ink-muted);
}

:is(.article-content, .article-body, .prose) blockquote > :last-child {
  margin-bottom: 0;
}

:is(.article-content, .article-body, .prose) .table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

:is(.article-content, .article-body, .prose) table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  color: var(--ink);
  background: var(--surface-light);
  font-size: var(--blog-text-body);
}

:is(.article-content, .article-body, .prose) :is(th, td) {
  min-width: 7em;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line-light);
  text-align: start;
  vertical-align: top;
}

:is(.article-content, .article-body, .prose) th {
  background: var(--surface-sunken);
  font-weight: var(--weight-bold);
}

:is(.article-content, .article-body, .prose) img {
  max-width: 100%;
  height: auto;
}

.article-download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-block: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: var(--surface-light);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

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

.article-download h2,
.prose .article-download h2 {
  display: block;
  margin: 0 0 0.75rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--blog-title-section);
  font-weight: var(--weight-title);
  line-height: 1.45;
}

.article-download p,
.prose .article-download p {
  margin: 0;
  color: var(--ink-muted);
  line-height: 1.8;
}

.article-download .article-download-actions,
.article-download .sample-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

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

#related-posts:empty,
#post-nav:empty {
  display: none;
}

#related-posts > .blog-related-heading {
  display: block;
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--blog-title-section);
  font-weight: var(--weight-title);
  line-height: 1.45;
}

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

.blog-nav-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: var(--surface-light);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-card);
}

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

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

.blog-nav-label,
.blog-nav-card time {
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: var(--blog-text-small);
  line-height: 1.7;
}

.blog-nav-title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--blog-text-body);
  font-weight: var(--weight-medium);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

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

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

  .blog-index-hero h1 {
    font-size: 1.875rem;
  }

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

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

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

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

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

  .article-page .section,
  .blog-article .section {
    padding-block: 1.25rem;
  }

  .article-hero,
  .article-hero.section {
    padding-block: 0.5rem 1.25rem;
  }

  .article-download {
    align-items: flex-start;
  }
}