/* Blog-specific presentation. Kept separate from marketing.css so the blog
   remains stable even if the larger stylesheet is partially parsed. */

.blog-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 520px;
  margin-top: 28px;
}

.blog-hero-metrics div,
.article-brief,
.blog-featured,
.blog-card,
.blog-empty {
  border-radius: 8px;
}

.blog-hero-metrics div {
  border: 1px solid rgba(14, 165, 233, 0.22);
  background: rgba(255, 255, 255, 0.72);
  padding: 14px 16px;
}

.blog-hero-metrics strong {
  display: block;
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}

.blog-hero-metrics span {
  display: block;
  margin-top: 6px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.blog-filters-section {
  padding-top: 0;
}

.blog-filter-pills {
  align-items: center;
}

.blog-pill {
  border-radius: 999px;
  letter-spacing: 0;
}

.blog-grid {
  align-items: stretch;
}

.blog-featured,
.blog-card {
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}

.blog-featured {
  min-height: 360px;
  border-color: rgba(14, 165, 233, 0.24);
}

.blog-featured::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #10b981, #f97316);
}

.blog-featured-title,
.blog-card-title,
.related-head h2,
.article-header-band h1,
.article-body h1,
.article-body h2,
.article-body h3 {
  letter-spacing: 0 !important;
}

.blog-featured-content {
  min-width: 0;
}

.blog-featured-meta,
.blog-card-meta {
  letter-spacing: 0;
}

.blog-featured-subtitle,
.blog-card-excerpt {
  max-width: 64ch;
}

.blog-featured-bars {
  display: grid;
  gap: 8px;
  margin: 0 0 28px;
  max-width: 320px;
}

.blog-featured-bars span {
  display: block;
  width: var(--bar);
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.88), rgba(16, 185, 129, 0.75));
}

.blog-card {
  border-color: rgba(14, 165, 233, 0.22);
}

.blog-card-image,
.blog-featured-image {
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(16, 185, 129, 0.08)),
    var(--bg-secondary);
}

.blog-card-badge {
  border-radius: 999px;
  letter-spacing: 0;
}

.blog-card-cta,
.blog-featured-cta {
  letter-spacing: 0;
}

.article-header-band {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(240, 249, 255, 0.96)),
    var(--bg);
}

.article-sidebar {
  max-height: calc(100vh - 140px);
  overflow: auto;
  padding-right: 4px;
}

.article-grid,
.article-sidebar,
.article-body {
  min-width: 0;
  max-width: 100%;
}

.outline-list {
  gap: 0.55rem;
}

.outline-list a {
  display: block;
  border-left: 2px solid transparent;
  padding: 3px 0 3px 10px;
}

.outline-list a:hover {
  border-left-color: var(--accent);
}

.article-brief {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 20px;
  align-items: center;
  border: 1px solid rgba(14, 165, 233, 0.24);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(224, 242, 254, 0.66));
  padding: 22px;
  margin-bottom: 34px;
}

.article-brief-stat {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 8px;
  color: var(--fg);
  background:
    radial-gradient(circle at 50% 50%, #fff 0 54%, transparent 55%),
    conic-gradient(var(--accent) 0 78%, rgba(14, 165, 233, 0.16) 78% 100%);
}

.article-brief-stat span {
  display: block;
  font-family: var(--font-ui);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
}

.article-brief-stat small {
  display: block;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
}

.article-brief-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.article-brief-flow span {
  min-width: 0;
  padding: 8px 7px;
  border-radius: 6px;
  background: rgba(14, 165, 233, 0.10);
  color: var(--info);
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-align: center;
}

.article-brief p {
  grid-column: 2;
  margin: 0;
  color: var(--fg-secondary);
  font-size: 15.5px;
  line-height: 1.55;
}

.article-body {
  overflow-wrap: anywhere;
}

.article-body .lede {
  color: var(--fg);
  font-size: 1.04em;
}

.article-body table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 2rem 0;
  border: 1px solid rgba(14, 165, 233, 0.24);
  border-radius: 8px;
}

.article-body th,
.article-body td {
  min-width: 150px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(14, 165, 233, 0.18);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  color: var(--fg);
  background: rgba(14, 165, 233, 0.08);
  font-size: 14px;
}

.article-body blockquote,
.article-body .cta-card {
  border-radius: 8px;
}

.article-body .cta-card {
  border-color: rgba(14, 165, 233, 0.28);
  box-shadow: 0 16px 36px rgba(14, 165, 233, 0.08);
}

.author-bio {
  border-top-color: rgba(14, 165, 233, 0.24);
}

.author-bio-avatar {
  border-radius: 8px;
}

.author-bio-text p {
  margin: 0.4rem 0 0;
  color: var(--fg-secondary);
  font-size: 14.5px;
  line-height: 1.55;
}

.related-section {
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.58), rgba(240, 249, 255, 0.96));
}

.related-head h2 {
  margin: 0.7rem 0 0;
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 32px;
  font-weight: 500;
}

.related-card {
  text-decoration: none;
  color: inherit;
}

@media (max-width: 900px) {
  .article-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .article-sidebar {
    max-height: none;
    overflow: visible;
  }

  .outline-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .blog-hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 22px;
  }

  .blog-hero-metrics div {
    padding: 12px 10px;
  }

  .blog-hero-metrics strong {
    font-size: 20px;
  }

  .blog-featured,
  .blog-card {
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  }

  .blog-filter-pills {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }

  .article-brief {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .article-brief-stat {
    width: 104px;
  }

  .article-brief-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-brief p {
    grid-column: auto;
    font-size: 14.5px;
  }

  .outline-list {
    grid-template-columns: 1fr;
  }

  .related-head h2 {
    font-size: 26px;
  }
}

@media (hover: none) {
  .blog-featured:hover,
  .blog-card:hover {
    transform: none;
  }
}
