:root {
  --blog-size-xs: 0.8125rem;
  --blog-size-sm: 0.9375rem;
  --blog-size-body: 1rem;
  --blog-size-lead: clamp(0.9375rem, 0.85rem + 0.45vw, 1.125rem);
  --blog-size-card: 1.125rem;
  --blog-size-h3: 1.25rem;
  --blog-size-h2: 1.5rem;
  --blog-size-article-title: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  --blog-size-list-title: clamp(1.75rem, 2rem + 1vw, 3rem);
  --blog-size-close: 1.75rem;
  --blog-weight-regular: 400;
  --blog-weight-medium: 500;
  --blog-weight-semibold: 600;
  --blog-weight-bold: 700;
  --blog-weight-heavy: 800;
  --blog-line-title: 1.32;
  --blog-line-body: 1.8;
  --blog-line-lead: 1.7;
  --blog-modal-motion: 180ms;
  --blog-breadcrumb-opacity: 0.68;
  --blog-separator-opacity: 0.35;
  --blog-modal-layer: 1000;
}

.blog-index,
.article-body,
.article-hero,
.blog-article,
.article-page {
  color: var(--text);
  font-family: var(--font-body);
}

.blog-skip-link {
  position: fixed;
  top: 0.75rem;
  left: 1rem;
  z-index: var(--blog-modal-layer);
  padding: 0.75rem 1rem;
  transform: translateY(-180%);
  background: var(--bg);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  font-size: var(--blog-size-sm);
  box-shadow: var(--shadow-card);
}

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

.blog-list-main {
  padding-block: 2.5rem 5rem;
}

.blog-list-hero {
  padding: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg-panel);
}

.blog-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
  color: var(--accent);
  font-size: var(--blog-size-xs);
  font-weight: var(--blog-weight-semibold);
  line-height: 1.6;
}

.blog-update-icon {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

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

.blog-catalog {
  margin-top: 2.5rem;
}

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

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

.blog-result-count {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--blog-size-xs);
  line-height: 1.6;
}

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

.blog-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  max-width: 100%;
  padding: 0.625rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--blog-size-sm);
  font-weight: var(--blog-weight-medium);
  line-height: 1.5;
  cursor: pointer;
  transition: color var(--motion-fast), background var(--motion-fast), border-color var(--motion-fast);
}

.blog-filter:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-panel);
}

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

.blog-filter:focus-visible,
.blog-download-close:focus-visible,
.blog-download-panel a:focus-visible,
.blog-post-nav-link:focus-visible,
.blog-post-card a:focus-visible,
.blog-related-card a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

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

.blog-post-grid > *,
#related-posts > * {
  min-width: 0;
}

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

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

.blog-post-card .post-meta,
.blog-related-card .post-meta {
  margin: 0 0 1rem;
}

.blog-post-card .tag,
.blog-related-card .tag {
  display: inline-block;
  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: var(--blog-size-xs);
  font-weight: var(--blog-weight-medium);
  white-space: normal;
  overflow-wrap: anywhere;
}

.blog-post-card h3,
.blog-related-card h3 {
  display: block;
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--blog-size-card);
  font-weight: var(--blog-weight-bold);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

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

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

.blog-post-card > p,
.blog-related-card > p {
  margin: 0.875rem 0 1.25rem;
  color: var(--text-muted);
  font-size: var(--blog-size-sm);
  line-height: var(--blog-line-body);
  overflow-wrap: anywhere;
}

.blog-post-card .post-link,
.blog-related-card .post-link {
  align-self: flex-start;
  margin-top: auto;
  padding-block: 0.25rem;
  color: var(--accent);
  font-size: var(--blog-size-sm);
  font-weight: var(--blog-weight-semibold);
  line-height: 1.6;
  text-decoration: none;
}

.blog-post-card .post-link:hover,
.blog-related-card .post-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(--border);
  border-radius: var(--r-lg);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: var(--blog-size-body);
  line-height: var(--blog-line-body);
}

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

.has-dl-fab nav > p:has(> [aria-current="page"]),
.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.25rem;
  margin-bottom: 1.25rem;
  padding: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--blog-size-xs);
  font-weight: var(--blog-weight-regular);
  line-height: 1.6;
  white-space: nowrap;
}

.has-dl-fab nav > p:has(> [aria-current="page"]) a,
.blog-breadcrumb a,
nav.breadcrumb a,
nav.breadcrumbs a {
  flex: 0 0 auto;
  color: var(--text-muted);
  opacity: var(--blog-breadcrumb-opacity);
  text-decoration: none;
}

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

.has-dl-fab nav > p:has(> [aria-current="page"]) > [aria-hidden="true"],
.blog-breadcrumb > span:not([aria-current]),
nav.breadcrumb > span:not([aria-current]),
nav.breadcrumbs > span:not([aria-current]),
.blog-breadcrumb [aria-hidden="true"],
nav.breadcrumb [aria-hidden="true"],
nav.breadcrumbs [aria-hidden="true"] {
  flex: 0 0 auto;
  color: var(--text-muted);
  opacity: var(--blog-separator-opacity);
}

.has-dl-fab nav > p > [aria-current="page"],
.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);
  opacity: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.has-dl-fab main.wrap:has(nav [aria-current="page"]) {
  padding-top: 2rem;
}

.article-page main.section,
.blog-article main.section,
.has-dl-fab main.section,
.article-page .section:has(.blog-breadcrumb, nav.breadcrumb, nav.breadcrumbs),
.blog-article .section:has(.blog-breadcrumb, nav.breadcrumb, nav.breadcrumbs),
.has-dl-fab .section:has(.blog-breadcrumb, nav.breadcrumb, nav.breadcrumbs) {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.article-shell,
.blog-article-main {
  padding-block: 1.5rem 3rem;
}

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

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

.article-hero h1,
.article-header h1,
.article-page h1,
.blog-article h1,
.has-dl-fab main h1 {
  display: block;
  width: auto;
  max-width: 100%;
  margin-block: 1rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--blog-size-article-title);
  font-weight: var(--blog-weight-bold);
  line-height: var(--blog-line-title);
  overflow-wrap: anywhere;
}

.article-lead,
.article-summary,
.article-hero > p,
.article-header > p {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--blog-size-lead);
  font-weight: var(--blog-weight-regular);
  line-height: var(--blog-line-lead);
  overflow-wrap: anywhere;
}

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

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

.article-body h2 {
  margin: 2rem 0 1rem;
  font-size: var(--blog-size-h2);
  line-height: 1.5;
}

.article-body h3 {
  margin: 1.5rem 0 0.75rem;
  font-size: var(--blog-size-h3);
  line-height: 1.5;
}

.article-body > h2:first-of-type,
.article-body > section:first-of-type > h2:first-of-type {
  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 dl {
  margin-block: 0 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"]),
.has-dl-fab .prose a:not([class*="btn"]):not([class*="button"]) {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

.article-body code {
  padding: 0.125rem 0.375rem;
  border-radius: var(--r-xs);
  background: var(--bg-panel);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--blog-size-sm);
  overflow-wrap: anywhere;
}

.article-body pre {
  max-width: 100%;
  margin-block: 1.25rem;
  padding: 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-panel);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--blog-size-sm);
  line-height: 1.75;
  white-space: pre;
  overflow-wrap: normal;
}

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

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

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

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

.article-body .table-scroll {
  max-width: 100%;
  margin-block: 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.article-body table,
.has-dl-fab .prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-block: 1.25rem;
  overflow-x: auto;
  border-collapse: collapse;
  color: var(--text);
  font-size: var(--blog-size-sm);
  line-height: 1.7;
}

.article-body .table-scroll table {
  margin: 0;
}

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

.article-body th,
.has-dl-fab .prose th {
  background: var(--bg-panel);
  font-weight: var(--blog-weight-semibold);
}

.dl-card {
  margin-block: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-card);
}

.dl-card h2 {
  display: block;
  margin: 0 0 0.75rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--blog-size-h2);
  font-weight: var(--blog-weight-bold);
  line-height: 1.5;
}

.dl-card p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: var(--blog-size-body);
  line-height: var(--blog-line-lead);
}

.dl-card .download-actions,
.dl-card .dl-card-actions,
.dl-card .cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.dl-card .btn {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

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

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

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

#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-lg);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}

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

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

.blog-post-nav-label {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: var(--blog-size-xs);
  font-weight: var(--blog-weight-semibold);
  line-height: 1.6;
}

.blog-post-nav-link strong {
  display: block;
  color: var(--text);
  font-size: var(--blog-size-sm);
  font-weight: var(--blog-weight-semibold);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

body.blog-download-locked {
  overflow: hidden;
}

.blog-download-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--blog-modal-layer);
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--veil);
  opacity: 0;
  transition: opacity var(--blog-modal-motion) ease;
}

.blog-download-overlay.is-open {
  opacity: 1;
}

.blog-download-panel {
  position: relative;
  width: min(100%, 30rem);
  max-height: calc(100dvh - 2rem);
  padding: 2rem;
  overflow-y: auto;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  box-shadow: var(--shadow-float);
  transform: translateY(0.75rem) scale(0.98);
  transition: transform var(--blog-modal-motion) ease;
}

.is-open > .blog-download-panel {
  transform: translateY(0) scale(1);
}

.blog-download-brand {
  margin: 0 2.5rem 1rem 0;
  color: var(--accent);
  font-size: var(--blog-size-sm);
  font-weight: var(--blog-weight-semibold);
  line-height: 1.6;
}

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

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

.blog-download-panel > .btn {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.blog-download-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-circle);
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--blog-size-close);
  font-weight: var(--blog-weight-regular);
  line-height: 1;
  cursor: pointer;
}

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

@media (min-width: 1200px) {
  .blog-post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  :root {
    --blog-size-list-title: clamp(1.5rem, 5vw, 1.875rem);
    --blog-size-article-title: 1.5rem;
  }

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

  .blog-list-hero {
    padding: 1.5rem;
  }

  .blog-catalog {
    margin-top: 2rem;
  }

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

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

  .article-hero,
  .article-hero.section,
  .article-header {
    margin-bottom: 1.5rem;
    padding-block: 0.25rem 0.75rem;
  }

  .article-page main.section,
  .blog-article main.section,
  .has-dl-fab main.section {
    padding-top: 1.25rem;
  }

  .dl-card {
    padding: 1.25rem;
  }
}

@media (max-width: 639px) {
  #related-posts,
  #post-nav {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

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

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