.blog-hero {
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
  color: var(--text-on-dark);
  padding: 68px 0 52px;
}
.blog-hero .section-eyebrow { color: var(--accent-2); }
.blog-hero h1 { max-width: 760px; color: var(--on-dark-strong); font-size: 2.4rem; margin-bottom: 12px; }
.blog-hero p { color: var(--text-on-dark-muted); max-width: 680px; font-size: 1.08rem; }

.blog-list { padding: 72px 0 88px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.blog-card {
  display: flex; flex-direction: column; overflow: hidden;
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow);
}
.blog-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.blog-card-image { aspect-ratio: 10 / 7; overflow: hidden; background: var(--bg-alt); }
.blog-card-image img { width: 100%; height: 100%; display: block; object-fit: contain; }
.blog-card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.blog-card time, .blog-meta { color: var(--text-muted); font-size: 0.9rem; }
.blog-card h2 { margin: 8px 0 10px; font-size: 1.35rem; }
.blog-card p { color: var(--text-muted); flex: 1; }
.blog-card .read-more { color: var(--accent); font-weight: 600; }

.blog-pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-top: 42px;
}
.pagination-pages { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.pagination-link {
  display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px;
  padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
  color: var(--text); font-weight: 600; line-height: 1; text-decoration: none;
}
a.pagination-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pagination-current { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.pagination-direction { min-width: 116px; }
.pagination-disabled { opacity: 0.42; cursor: default; }
.pagination-ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; color: var(--text-muted); }

.blog-article-hero { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 60px 0 48px; }
.blog-article-hero .container { max-width: 900px; }
.blog-back { display: inline-block; margin-bottom: 22px; font-weight: 600; }
.blog-article-hero h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); max-width: 900px; }
.blog-meta { margin-top: 18px; }

.blog-article { max-width: 890px; padding: 54px 0 88px; font-size: 1.05rem; overflow-x: clip; overflow-wrap: anywhere; }
.blog-article::after { content: ''; display: block; clear: both; }
.blog-article > p, .blog-article > ul, .blog-article > ol,
.blog-article > blockquote, .blog-article > pre, .blog-article > table { max-width: 760px; margin-left: auto; margin-right: auto; }
.blog-article h2, .blog-article h3, .blog-article h4 { max-width: 760px; margin: 2em auto 0.65em; }
.blog-article h4 { font-size: 1.4rem; }
/* A heading that would otherwise start level with the bottom edge of a floated image
   above it: start it below the image and the image's own bottom margin instead. */
.blog-article h4.after-media { clear: both; }
.blog-article ul, .blog-article ol { padding-left: 1.4em; }
.blog-article li { margin-bottom: 0.5em; }
.blog-article li p { margin: 0; }
.blog-article figure { margin: 38px auto; }
.blog-article figure img { display: block; width: 100%; height: auto; max-height: 620px; object-fit: contain; border-radius: 10px; }
.blog-article figcaption { color: var(--text-muted); text-align: center; font-size: 0.88rem; margin-top: 10px; }
.blog-article .article-media { width: 100%; }
.blog-article .media-right { float: right; clear: right; margin: 0 0 34px 34px; }
.blog-article .media-left { float: left; clear: left; margin: 0 34px 34px 0; }
.blog-article .media-center { clear: both; margin: 38px auto; }
.blog-article .media-1 { max-width: 43px; }
.blog-article .media-2 { max-width: 120px; }
.blog-article .media-3 { max-width: 197px; }
.blog-article .media-4 { max-width: 274px; }
.blog-article .media-5 { max-width: 351px; }
.blog-article .media-6 { max-width: 428px; }
.blog-article .media-7 { max-width: 506px; }
.blog-article .media-8 { max-width: 583px; }
.blog-article .media-9 { max-width: 660px; }
.blog-article .media-10 { max-width: 737px; }
.blog-article .media-11 { max-width: 814px; }
.blog-article .media-12 { max-width: 890px; }
.blog-article .media-9-left { max-width: 660px; clear: both; margin: 38px auto 38px 77px; }
.blog-article blockquote { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 18px 22px; border-radius: 0 10px 10px 0; }
.blog-article blockquote p:last-child { margin-bottom: 0; }
.blog-article pre { max-width: min(760px, 100%); box-sizing: border-box; overflow-x: auto; padding: 20px; border-radius: 10px; background: var(--code-bg); color: var(--text-on-dark); white-space: pre; }
.blog-article pre code { white-space: inherit; }
.blog-article code { font-size: 0.9em; }
.blog-article a { overflow-wrap: anywhere; }
.blog-article :not(pre) > code { background: var(--accent-soft); color: var(--text); padding: 0.15em 0.35em; border-radius: 4px; }
.blog-article table { width: 100%; border-collapse: collapse; }
.blog-article th, .blog-article td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.blog-article iframe, .blog-article video { display: block; width: 100%; max-width: 760px; min-height: 360px; margin: 32px auto; border: 0; border-radius: 10px; }
.blog-article audio { display: block; width: 100%; max-width: 760px; margin: 28px auto; }
/* A portrait phone recording in a figure keeps its own shape: no fixed height, no block
   margins, and corners rounded like the phone it was recorded on. */
.blog-article .phone-clip video { height: auto; min-height: 0; margin: 0; border-radius: 22px; background: #000; }
/* Beside a left-floated recording a list's bullets would otherwise be drawn on top of it:
   a list's box runs under a float and only its lines move over.  Making each later list
   its own block puts the whole list, bullets included, beside the phone. */
.blog-article .phone-clip.media-left ~ ul { overflow: hidden; }

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

@media (max-width: 760px) {
  .blog-hero { padding: 44px 0 36px; }
  .blog-hero h1 { font-size: 1.8rem; }
  .blog-list { padding: 48px 0 64px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-pagination { flex-wrap: wrap; justify-content: center; }
  .pagination-pages { order: 3; flex-basis: 100%; }
  .blog-article-hero { padding: 42px 0 36px; }
  .blog-article { padding: 38px 24px 64px; }
  .blog-article .media-right, .blog-article .media-left, .blog-article .media-center, .blog-article .media-9-left {
    float: none; clear: both; max-width: 100%; margin: 28px auto;
  }
  .blog-article iframe, .blog-article video { min-height: 220px; }
}

/* After the narrow-screen rule above, which lets floated figures fill the column: a phone
   recording at full column width would be taller than the screen it is watched on. */
@media (max-width: 760px) {
  .blog-article .phone-clip { max-width: 280px; }
}
