.blog-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.blog-skip {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--bg);
  color: var(--accent-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  transform: translateY(-180%);
}

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

.blog-list-main {
  padding-bottom: 4rem;
}

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

.blog-eyebrow {
  margin: 0 0 1rem;
  color: var(--accent-dark);
  font-size: 0.8125rem;
  font-weight: 700;
}

.blog-list-hero h1 {
  display: block;
  max-width: 100%;
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 2vw, 3rem);
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: break-word;
}

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

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

.blog-filter {
  min-height: 44px;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}

.blog-filter:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

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

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

.blog-result-count {
  min-height: 1.5rem;
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.7;
}

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

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

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

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

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

.post-card h3 {
  display: block;
  margin: 1rem 0 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.65;
  overflow-wrap: break-word;
}

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

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

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

.post-read {
  align-self: flex-start;
  margin-top: auto;
  padding-block: 0.375rem;
  color: var(--accent-dark);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.post-read: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(--radius);
  background: var(--bg-panel);
  color: var(--text-muted);
  line-height: 1.8;
}

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

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

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

.blog-breadcrumb a:hover,
nav.breadcrumb a:hover,
nav.breadcrumbs a:hover {
  color: var(--accent-dark);
  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-breadcrumb ol,
nav.breadcrumb ol,
nav.breadcrumbs ol {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
}

.blog-breadcrumb li,
nav.breadcrumb li,
nav.breadcrumbs li {
  flex: 0 0 auto;
}

.blog-breadcrumb li:last-child,
nav.breadcrumb li:last-child,
nav.breadcrumbs li:last-child {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-breadcrumb li [aria-current="page"],
nav.breadcrumb li [aria-current="page"],
nav.breadcrumbs li [aria-current="page"] {
  display: block;
}

.article-page main.section,
.blog-article main.section,
.article-page main > .section:first-child,
.blog-article 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 > header) {
  padding-top: 2rem;
}

main.reading:has(> article > header) > nav {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

main.reading > article > header {
  padding-bottom: 1.5rem;
}

main.reading > article > header .post-meta {
  margin-bottom: 14px;
}

main.reading > article > header h1 {
  display: block;
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  line-height: 1.32;
  overflow-wrap: break-word;
}

main.reading > article > header .lede {
  margin: 12px 0 0;
}

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

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

.article-hero h1,
.article-header h1 {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0.875rem 0 1rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  font-weight: 800;
  line-height: 1.32;
  overflow-wrap: break-word;
}

.article-lead,
.article-hero .lede,
.article-header .lede,
.article-hero .article-summary,
.article-header .article-summary {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: clamp(0.9375rem, 0.85rem + 0.45vw, 1.125rem);
  line-height: 1.7;
}

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

.prose {
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.9;
  overflow-wrap: break-word;
}

.prose h1,
.prose h2,
.prose h3 {
  display: block;
  max-width: 100%;
  color: var(--text);
  font-family: var(--font-display);
  overflow-wrap: break-word;
}

.prose h2 {
  margin: 2rem 0 1rem;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 800;
  line-height: 1.5;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.prose h3 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.6;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

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

.prose section,
.prose section.section {
  margin-block: 0 1.5rem;
  padding-block: 0;
}

.prose section + section {
  margin-top: 1.5rem;
}

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

.prose p,
.prose ul,
.prose ol {
  margin-block: 0 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
}

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

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

.prose code {
  padding: 0.125rem 0.3rem;
  border-radius: var(--radius-xs);
  background: var(--bg-panel-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

.prose pre {
  max-width: 100%;
  margin: 1.25rem 0;
  padding: 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.8;
  tab-size: 2;
}

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

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

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

.prose .table-wrap {
  max-width: 100%;
  margin-block: 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.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;
  line-height: 1.7;
}

.prose .table-wrap table {
  display: table;
  min-width: 36rem;
  margin: 0;
}

.prose th,
.prose td {
  min-width: 8rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}

.prose th {
  background: var(--bg-panel);
  font-weight: 700;
}

.prose th code,
.prose td code {
  overflow-wrap: normal;
  word-break: normal;
}

.prose img,
.prose video {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.prose hr {
  margin-block: 1.5rem;
  border: 0;
  border-top: 1px solid var(--border);
}

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

.dl-card h2,
.prose .dl-card h2 {
  display: block;
  margin: 0 0 0.75rem;
  font-size: 1.375rem;
  line-height: 1.5;
}

.dl-card p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  line-height: 1.8;
}

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

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

#related-posts > h2 {
  display: block;
  margin: 0 0 1.25rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.5;
}

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

#post-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
  margin-block: 2rem 3rem;
}

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

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

.post-nav-caption {
  color: var(--accent-dark);
  font-size: 0.8125rem;
  font-weight: 700;
}

.post-nav-card strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.post-nav-card time {
  margin-top: auto;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

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

.blog-download-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  box-sizing: border-box;
  margin: 0;
  padding: 1rem;
  overflow-y: auto;
  border: 0;
  border-radius: var(--radius-xs);
  background: var(--clear);
  color: var(--text);
  font-family: var(--font-body);
  opacity: 0;
  transition: opacity var(--fast) var(--ease);
}

.blog-download-dialog[open] {
  display: grid;
  place-items: center;
}

.blog-download-dialog::backdrop {
  background: var(--veil);
}

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

.blog-download-panel {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 30rem);
  margin-block: auto;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-float);
  transform: translateY(0.5rem);
  transition: transform var(--fast) var(--ease);
}

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

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

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

.blog-download-label {
  margin: 0 2rem 0.875rem 0;
  color: var(--accent-dark);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.7;
}

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

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

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

@media (max-width: 1000px) {
  .blog-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

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

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

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

  .post-card {
    padding: 1.25rem;
  }

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

  .article-hero,
  .article-header {
    padding-block: 0.25rem 1.25rem;
  }

  .dl-card {
    padding: 1.25rem;
  }

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

  .blog-download-label {
    margin-right: 2.5rem;
  }

  .blog-download-panel h2 {
    font-size: 1.375rem;
  }
}

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

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