/* ── Blog — extends Polar Steel design system (v2: tables, figures) ── */

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1.25rem;
}
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--accent-ice); }

.article-head { max-width: 46rem; }
.article-head h1 { margin-bottom: 1rem; max-width: 24ch; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 2rem;
}
.article-meta .cat { color: var(--accent-ice); }

.article-body { max-width: 46rem; }
.article-body h2 {
  font-size: 1.35rem;
  margin: 2.2rem 0 0.9rem;
  scroll-margin-top: 5rem;
}
.article-body h3 { font-size: 1.05rem; margin: 1.6rem 0 0.6rem; scroll-margin-top: 5rem; }
.article-body p { margin: 0 0 1.05rem; line-height: 1.75; }
.article-body ul, .article-body ol { margin: 0 0 1.05rem; padding-left: 1.35rem; color: var(--text-2); }
.article-body li { margin-bottom: 0.45rem; line-height: 1.7; }
.article-body strong { color: var(--text-1); font-weight: 600; }
.article-body code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--bg-well);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  color: var(--accent-ice);
}
.article-body pre {
  background: var(--bg-well);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0 0 1.05rem;
}
.article-body pre code { background: none; border: none; padding: 0; color: var(--text-2); }

/* Tables — grounded engineering comparison */
.article-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1.4rem;
  font-size: 0.9rem;
  line-height: 1.6;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
}
.article-body thead th {
  background: var(--bg-well);
  color: var(--text-1);
  font-weight: 600;
  font-size: 0.85rem;
  text-align: left;
  letter-spacing: 0.01em;
}
.article-body th, .article-body td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.article-body tbody tr:nth-child(even) { background: rgba(233, 239, 246, 0.02); }
.article-body tbody tr:last-child td { border-bottom: none; }
.article-body td { color: var(--text-2); }
.article-body td:first-child { color: var(--text-1); font-weight: 500; white-space: nowrap; }
@media (max-width: 640px) {
  .article-body table { display: block; overflow-x: auto; }
}

/* Figures inside articles */
.article-body figure {
  margin: 1.6rem 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--bg-raised);
  overflow: hidden;
}
.article-body figure img { display: block; width: 100%; height: auto; }
.article-body figcaption {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--text-3);
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--line-soft);
}

.article-callout {
  border-left: 3px solid var(--accent);
  background: rgba(112, 150, 195, 0.07);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 0.9rem 1.1rem;
  margin: 1.4rem 0;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.7;
}
.article-callout strong { color: var(--accent-ice); }

.article-toc {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--bg-raised);
  padding: 1.1rem 1.25rem;
  margin: 0 0 1.75rem;
  font-size: 0.9rem;
}
.article-toc strong { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); display: block; margin-bottom: 0.6rem; }
.article-toc ol { margin: 0; padding-left: 1.2rem; }
.article-toc a { color: var(--text-2); }
.article-toc a:hover { color: var(--accent-ice); }

.article-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.article-footer .btn { min-height: 44px; }

/* Related posts */
.related { margin-top: 3rem; }
.related h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}
@media (max-width: 860px) { .related-grid { grid-template-columns: 1fr; } }
.related-card { background: var(--bg); padding: 1.25rem; display: block; transition: background 160ms ease; }
.related-card:hover { background: var(--bg-raised); }
.related-card .cat { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ice); display: block; margin-bottom: 0.5rem; }
.related-card h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.related-card p { font-size: 0.85rem; line-height: 1.6; }

/* Blog index */
.blog-list { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; }
.blog-item { background: var(--bg); padding: 1.4rem 1.5rem; display: grid; grid-template-columns: minmax(150px, 0.35fr) 1fr; gap: 0.5rem 2rem; transition: background 160ms ease; }
.blog-item:hover { background: var(--bg-raised); }
@media (max-width: 640px) { .blog-item { grid-template-columns: 1fr; gap: 0.35rem; } }
.blog-item .meta { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.blog-item .meta .cat { color: var(--accent-ice); }
.blog-item h2 { font-size: 1.12rem; margin-bottom: 0.4rem; }
.blog-item p { font-size: 0.9rem; line-height: 1.65; }

/* Blog index hero diagram bed */
.blog-hero {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--bg-raised);
  overflow: hidden;
  margin: 1.75rem 0 0;
}
.blog-hero svg { display: block; width: 100%; height: auto; }
