/* Blog styles — extends the site tokens in styles.css */

/* ============ Listing ============ */
.blog-hero {
  padding-bottom: 1rem;
}

.blog-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); max-width: 20ch; }

.blog-hero .lede { color: var(--muted); max-width: 52ch; margin-top: 1rem; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 2.6rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s;
}

.post-card:hover { transform: translateY(-3px); border-color: var(--ember); }

.post-card-art {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.post-card-art svg { width: 100%; height: 100%; }

.post-card-body { padding: 1.3rem 1.4rem 1.5rem; }

.post-card .post-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ember);
}

.post-card h2 {
  font-size: 1.08rem;
  line-height: 1.35;
  margin: 0.6rem 0 0.5rem;
}

.post-card p { color: var(--muted); font-size: 0.9rem; }

.post-card .post-meta {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* ============ Article ============ */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 3.5rem) 24px 0;
}

.article-head .post-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ember);
}

.article-head h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  margin: 0.9rem 0 1rem;
}

.article-head .post-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.article h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  margin: 2.8rem 0 1rem;
}

.article h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.8rem 0 0.6rem;
}

.article p { margin: 0 0 1.1rem; color: #ddd5c9; }

.article p strong, .article li strong { color: var(--text); }

.article ul, .article ol { margin: 0 0 1.2rem 1.3rem; color: #ddd5c9; }

.article li { margin-bottom: 0.55rem; }

.article a { color: var(--ember); text-underline-offset: 3px; }

.article figure { margin: 1.8rem 0; }

.article figure img {
  border-radius: 16px;
  border: 1px solid var(--line);
  width: 100%;
}

.article figcaption,
.chart-source {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 0.7rem;
}

/* TL;DR box */
.tldr {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 14px;
  padding: 1.3rem 1.5rem;
  margin: 1.8rem 0 2.2rem;
}

.tldr .tldr-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ember);
  margin-bottom: 0.6rem;
}

.tldr ul { margin: 0 0 0 1.2rem; }
.tldr li { margin-bottom: 0.45rem; font-size: 0.95rem; }

/* Charts */
.chart-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.4rem 1.5rem 1.2rem;
  margin: 1.8rem 0;
  overflow-x: auto;
}

.chart-block svg { width: 100%; height: auto; display: block; }

.chart-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: var(--text);
}

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.8rem 0; }

.article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 480px;
}

.article th {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: left;
  color: var(--ember);
  border-bottom: 1px solid var(--brand);
  padding: 0.6rem 0.9rem;
}

.article td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
  color: #ddd5c9;
}

.article tr:nth-child(even) td { background: rgba(245, 239, 230, 0.025); }

/* CTA box */
.cta-box {
  background: linear-gradient(135deg, rgba(244, 86, 42, 0.14), rgba(244, 86, 42, 0.04));
  border: 1px solid rgba(244, 86, 42, 0.4);
  border-radius: 18px;
  padding: 1.8rem 1.7rem;
  margin: 2.4rem 0;
  text-align: center;
}

.cta-box h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }

.cta-box p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.2rem; }

.cta-box .store-row { margin-top: 0; justify-content: center; }

/* FAQ */
.faq-item { border-top: 1px solid var(--line); padding: 1.1rem 0; }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item h3 { margin: 0 0 0.5rem; }
.faq-item p { margin: 0; font-size: 0.95rem; }

/* Sources */
.sources {
  margin-top: 2.5rem;
  font-size: 0.85rem;
}
.sources ol { color: var(--muted); }
.sources li { margin-bottom: 0.4rem; overflow-wrap: break-word; }

/* Related posts */
.related {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 24px 0;
}
.related h2 { font-size: 1.2rem; margin-bottom: 1.2rem; }
.related-links { display: grid; gap: 12px; }
.related-links a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.related-links a:hover { border-color: var(--ember); }

@media (max-width: 880px) {
  .post-grid { grid-template-columns: 1fr; }
}
