.blog-index,
.blog-post {
  max-width: 820px;
  margin: 0 auto 3rem;
  padding: 2.5rem 2rem 3rem;
  background: #ffffff;
  border-radius: 16px;
  /* .main-content centers flex items, which sizes them to min-content; a
     wide table inside would push the article past the viewport on phones.
     Stretch gives a definite width so .meta-table-wrap can scroll instead.
     Desktop is unaffected: the auto margins above take precedence. */
  align-self: stretch;
}

.blog-cta {
  width: 100%;
  max-width: 820px;
  margin: 0 auto 3rem;
  align-self: stretch;
}

@media (max-width: 600px) {
  .blog-index,
  .blog-post {
    margin: 1.25rem 1rem 1rem;
    padding: 1.75rem 1.25rem 2.5rem;
  }

  .blog-cta {
    max-width: none;
    width: auto;
    margin: 0 1rem 1rem;
  }
}

.blog-index h1,
.blog-post h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.blog-tagline {
  color: #71717b;
  font-size: 1.05rem;
  line-height: 1.55;
  margin: -1rem 0 2rem;
}

.blog-card {
  padding: 1.25rem 0;
  border-bottom: 1px solid #e4e4e7;
}

.blog-card h2 {
  font-size: 1.3rem;
  margin: 0 0 0.35rem;
}

.blog-card h2 a {
  text-decoration: none;
  color: inherit;
}

.blog-card h2 a:hover {
  text-decoration: underline;
}

.blog-meta {
  color: #71717b;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.blog-summary {
  margin: 0 0 0.6rem;
}

.blog-readmore {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.blog-hero {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 12px;
  margin: 0.75rem 0 2rem;
  display: block;
}

.blog-body {
  font-size: 1.05rem;
  line-height: 1.7;
}

.blog-body h2 {
  font-size: 1.5rem;
  margin: 2rem 0 0.75rem;
}

.blog-body h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem;
}

.blog-body p,
.blog-body ul,
.blog-body ol {
  margin: 0 0 1.1rem;
}

.blog-body ul,
.blog-body ol {
  padding-left: 1.4rem;
}

.blog-body li {
  margin-bottom: 0.35rem;
}

.blog-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.blog-body figure {
  max-width: 600px;
  margin: 1.75rem auto;
}

.blog-body figure img {
  width: 100%;
  border: 1px solid #e4e4e7;
}

.blog-body a.external-link::after {
  content: "";
  display: inline-block;
  width: 0.68em;
  height: 0.68em;
  margin-left: 0.2em;
  vertical-align: 0.02em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Cpath d='M7 7h10v10'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Cpath d='M7 7h10v10'/%3E%3C/svg%3E") no-repeat center / contain;
}

.blog-body figcaption {
  font-size: 0.85rem;
  color: #71717b;
  margin-top: 0.55rem;
  line-height: 1.55;
  text-align: center;
  padding: 0 1rem;
}

.blog-empty {
  color: #71717b;
}

.blog-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 1.5rem 0;
}

.blog-body th,
.blog-body td {
  border: 1px solid #e4e4e7;
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

.blog-body th {
  background: #f8fafc;
  font-weight: 600;
}

.meta-table-wrap {
  overflow-x: auto;
  margin: 1.75rem 0;
}

.meta-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  overflow: hidden;
}

.meta-table th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #64748b;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid #e4e4e7;
}

.meta-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  vertical-align: middle;
  background: #fff;
}

.meta-table tr:last-child td {
  border-bottom: none;
}

.meta-table caption {
  caption-side: bottom;
  font-size: 0.85rem;
  color: #71717b;
  text-align: center;
  padding: 10px 14px 0;
  line-height: 1.55;
}

.meta-table tbody th {
  font-weight: 500;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  vertical-align: middle;
  background: #fff;
}

.meta-table tr:last-child th {
  border-bottom: none;
}

.mt-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.mt-pill--survives {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
}

.mt-pill--stripped {
  color: #047857;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}

.mt-pill--unclear {
  color: #92400e;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.35);
}

.mt-note {
  display: block;
  font-size: 0.78rem;
  color: #71717b;
  margin-top: 3px;
}

@media (max-width: 768px) {
  .meta-table th,
  .meta-table td {
    padding: 8px 10px;
  }

  .mt-pill {
    white-space: normal;
  }
}
