/* Static blog styles.
 *
 * Light theme only, matching the marketing and documentation pages. The blog
 * loads /marketing.css for the shared header and footer chrome and
 * /documentation.css for the article prose typography (.documentation-content).
 * This file adds only the blog-specific layout: the single centred column, the
 * index post list, and the post header (title, meta, back link).
 *
 * Plain color literals (not the app's semantic tokens), like documentation.css.
 */

.blog-page {
  min-height: 100vh;
  background: #ffffff;
  color: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  display: flex;
  flex-direction: column;
}

/* One readable centred column below the fixed marketing header. */
.blog-main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
}

/* Index header ------------------------------------------------------------- */

.blog-index-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 2rem;
}

.blog-index-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1f2937;
  margin: 0 0 0.75rem;
}

.blog-index-header p {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #6b7280;
  margin: 0;
  max-width: 620px;
}

/* Index post list ---------------------------------------------------------- */

.blog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.blog-list-item {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #f0f0f2;
}

.blog-list-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.blog-list-date {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7c3aed;
  margin: 0 0 0.5rem;
}

.blog-list-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 0.6rem;
}

.blog-list-title a {
  color: #1f2937;
  text-decoration: none;
}

.blog-list-title a:hover {
  color: #7c3aed;
}

.blog-list-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #4b5563;
  margin: 0;
}

/* Post header -------------------------------------------------------------- */

.blog-back {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #7c3aed;
  text-decoration: none;
  margin-bottom: 1.75rem;
}

.blog-back:hover {
  text-decoration: underline;
}

.blog-post-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #1f2937;
  margin: 0 0 0.75rem;
}

.blog-post-meta {
  font-size: 0.9rem;
  font-weight: 500;
  color: #6b7280;
  margin: 0 0 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

/* The post body reuses .documentation-content from documentation.css. Widen it
   to fill the blog's single column (the documentation layout caps it for its
   two-column grid). */
.blog-post .documentation-content {
  max-width: 100%;
}

/* Mermaid diagrams: rendered client-side from ```mermaid code blocks. When JS
   is on (html.mermaid-js) the raw source is hidden before paint so there is no
   flash; if rendering fails the script reveals the <pre> again as a fallback. */
.mermaid-js .blog-post pre:has(> code.language-mermaid) {
  display: none;
}
.blog-post .blog-mermaid {
  margin: 1.75rem 0;
  text-align: center;
  overflow-x: auto;
}
.blog-post .blog-mermaid svg {
  max-width: 100%;
  height: auto;
}

/* Responsive --------------------------------------------------------------- */

@media (max-width: 768px) {
  .blog-main {
    padding: 5.5rem 1.25rem 3rem;
  }
  .blog-index-header h1 {
    font-size: 2rem;
  }
  .blog-post-title {
    font-size: 1.95rem;
  }
  .blog-list-title {
    font-size: 1.35rem;
  }
}
