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

.blog-skip {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-small);
  background: var(--accent);
  color: var(--white);
  transform: translateY(-180%);
}

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

.blog-list-hero {
  padding-block: 3rem 3.5rem;
  background: var(--grad-hero);
  color: var(--ink-deep);
}

.blog-eyebrow {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
}

.blog-list-hero h1,
.blog-index h1 {
  display: block;
  max-width: 100%;
  margin: 0;
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.1rem + 2.5vw, 3rem);
  font-weight: var(--weight-heavy);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.blog-list-lead {
  max-width: 48rem;
  margin: 1.25rem 0 0;
  font-size: 1rem;
  line-height: 1.8;
}

.blog-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.blog-topic-chips li {
  padding: 0.45rem 0.875rem;
  border: 1px solid var(--white-55);
  border-radius: var(--r-pill);
  background: var(--white-40);
  font-size: 0.8125rem;
  font-weight: var(--weight-medium);
}

.blog-list-section {
  position: relative;
  padding-block: 2.5rem 3rem;
}

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

.blog-list-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: var(--weight-heavy);
}

#blog-result-count {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-block: 1.5rem 2rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  background: var(--bg-panel);
}

.blog-filters button {
  min-height: 2.75rem;
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--clear);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: var(--weight-bold);
  line-height: 1.4;
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast);
}

.blog-filters button:hover {
  color: var(--accent);
  border-color: var(--accent-40);
}

.blog-filters button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--white);
}

.blog-filters button:focus-visible,
.blog-post-card a:focus-visible,
.blog-post-nav-link:focus-visible,
.blog-download-dialog :focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

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

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

.blog-post-card .post-meta,
.article-hero .post-meta,
.article-hero .article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem 0.875rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.blog-post-card .tag,
.article-hero .tag {
  max-width: 100%;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--accent-dark);
  font-size: 0.8125rem;
  font-weight: var(--weight-bold);
  white-space: normal;
  overflow-wrap: anywhere;
}

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

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

.blog-post-card .blog-post-title a:hover {
  color: var(--accent);
}

.blog-post-summary {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.blog-post-card .post-link {
  margin-top: auto;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: var(--weight-bold);
  text-decoration: none;
}

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

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

.blog-empty a {
  color: var(--accent);
}

.blog-guide-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding: 2rem;
  border-radius: var(--r-panel);
  background: var(--bg-panel);
}

.blog-guide-band h2 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: var(--weight-heavy);
}

.blog-guide-band p {
  max-width: 42rem;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.8;
}

.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: 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;
  opacity: 0.65;
}

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

.blog-breadcrumb > span:not([aria-current]),
nav.breadcrumb > span:not([aria-current]),
nav.breadcrumbs > span:not([aria-current]) {
  flex: 0 0 auto;
  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;
}

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

.has-article-fab main.reading {
  padding-top: 32px;
}

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

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

.article-hero h1,
.article-body h1,
.has-article-fab 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: var(--weight-heavy);
  line-height: 1.32;
  overflow-wrap: anywhere;
}

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

.article-body,
.has-article-fab main.prose {
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.article-body.section {
  padding-block: 0 2rem;
}

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

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

.article-body h2,
.has-article-fab .prose h2 {
  display: block;
  margin-block: 2rem 0.875rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: var(--weight-heavy);
  line-height: 1.5;
}

.article-body h3,
.has-article-fab .prose h3 {
  display: block;
  margin-block: 1.5rem 0.75rem;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: var(--weight-bold);
  line-height: 1.55;
}

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

.article-body p,
.has-article-fab .prose p {
  margin-block: 0 1rem;
}

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

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

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

.article-body code,
.has-article-fab .prose code {
  padding: 0.1em 0.3em;
  border-radius: var(--r-small);
  background: var(--bg-panel);
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

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

.article-body pre code,
.has-article-fab .prose pre code {
  padding: 0;
  border-radius: var(--r-small);
  background: var(--clear);
  color: var(--text);
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

.article-body blockquote {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  border-radius: var(--r-small);
  background: var(--bg-panel);
  color: var(--text-muted);
}

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

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

.article-body .table-wrap,
.has-article-fab .prose .table-wrap {
  max-width: 100%;
  margin-block: 1.25rem;
  overflow-x: auto;
}

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

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

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

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

.dl-card h2,
.article-download h2,
.article-body .dl-card h2,
.article-body .article-download h2 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  line-height: 1.5;
}

.dl-card p,
.article-download p,
.article-body .dl-card p,
.article-body .article-download p {
  max-width: 42rem;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.75;
}

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

#related-posts {
  min-width: 0;
  margin-block: 2rem;
  padding-block: 0;
}

#related-posts .blog-related-title {
  display: block;
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: var(--weight-heavy);
  line-height: 1.5;
}

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

#related-posts .blog-post-title {
  margin: 0;
  font-size: 1.125rem;
}

#related-posts .blog-post-summary {
  margin: 0;
}

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

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

#post-nav .blog-post-nav-link {
  display: block;
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}

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

.blog-post-nav-label {
  display: block;
  margin-bottom: 0.625rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

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

#post-nav a:hover {
  border-color: var(--accent-40);
}

#post-nav a:hover .blog-post-nav-title {
  color: var(--accent);
}

body.blog-dialog-open {
  overflow: hidden;
}

.blog-download-dialog {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(32rem, calc(100% - 2rem));
  max-width: calc(100% - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(0.625rem) scale(0.98);
  transition: opacity 160ms var(--ease-enter), transform 160ms var(--ease-enter);
}

.blog-download-dialog::backdrop {
  background: var(--ink-40);
  opacity: 0;
  transition: opacity 160ms var(--ease-enter);
}

.blog-download-dialog.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.blog-download-dialog.is-visible::backdrop {
  opacity: 1;
}

.blog-download-panel {
  position: relative;
  padding: 2.5rem 2rem 2rem;
  font-family: var(--font-body);
}

.blog-download-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-circle);
  background: var(--bg-panel);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.blog-download-close:hover {
  background: var(--bg-panel-2);
  color: var(--accent-dark);
}

.blog-download-brand {
  margin: 0 2.5rem 1rem 0;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: var(--weight-bold);
}

.blog-download-panel h2 {
  display: block;
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: var(--weight-heavy);
  line-height: 1.5;
}

#blog-download-description {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

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

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

  .article-hero h1,
  .article-body h1,
  .has-article-fab h1 {
    font-size: 1.5rem;
  }

  .blog-list-section {
    padding-block: 1.75rem 2rem;
  }

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

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

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

  .blog-filters {
    gap: 0.5rem;
    padding: 0.625rem;
  }

  .blog-filters button {
    flex: 1 1 calc(50% - 0.5rem);
    padding-inline: 0.75rem;
  }

  .blog-guide-band,
  .dl-card,
  .article-download {
    padding: 1.5rem;
  }

  .blog-download-panel {
    padding: 2.5rem 1.5rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-skip,
  .blog-filters button,
  .blog-download-dialog,
  .blog-download-dialog::backdrop {
    transition: none;
  }

  .blog-download-dialog {
    transform: none;
  }
}