/* ══════════════════════════════════════════════════════════════
   blog.css — sysc.org blog pages
   Reuses the warm-paper + forest-green tokens from common.css
   (loaded first). Only blog-specific layout lives here.
   ══════════════════════════════════════════════════════════════ */

/* Blog content sits inside the site's standard .layout > main wrapper.
   The page sets .layout to single-column (no sidebar). Breadcrumb uses
   the site's own .breadcrumb style from common.css. */

/* ── Post header ── */
.post-head { margin-bottom: 26px; }
.post-head h1 {
  font-family: var(--font-serif);
  font-size: 34px;
  line-height: 1.22;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13.5px;
  color: var(--text-muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-meta i { font-size: 15px; color: var(--accent); }

/* ── E-E-A-T byline: single-line meta bar (author · reviewer · date · reading time) ── */
.post-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
  padding: 16px 0;
  margin: 8px 0 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.byline-col {
  display: flex;
  align-items: center;
  gap: 10px;
}
.byline-avatar {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
}
.byline-ic {
  font-size: 24px;
  color: var(--accent);
  flex-shrink: 0;
}
.byline-col-text { display: flex; flex-direction: column; line-height: 1.35; }
.byline-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.byline-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .post-byline { gap: 16px 22px; }
}

/* ── Author bio box (end of article) ── */
.author-box {
  display: flex;
  gap: 16px;
  margin: 44px 0 0;
  padding: 22px 24px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.author-box-avatar {
  width: 58px; height: 58px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px;
}
.author-box-name {
  font-size: 16px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.author-box-role {
  font-weight: 400; font-size: 13.5px;
  color: var(--text-muted);
  margin-left: 4px;
}
.author-box-bio {
  font-size: 14.5px; line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 10px;
}
.author-box-review {
  font-size: 13px;
  color: var(--text-secondary);
  display: inline-flex; align-items: center; gap: 6px;
}
.author-box-review i { color: var(--accent); font-size: 15px; }
.author-box-review strong { color: var(--text-primary); }

@media (max-width: 640px) {
  .author-box { flex-direction: column; gap: 12px; }
}

/* ── Table of contents box ── */
.toc {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 32px;
}
.toc-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc li + li { border-top: 1px dashed var(--border); }
.toc a {
  display: block;
  padding: 7px 0;
  font-size: 15px;
  color: var(--accent-text);
  text-decoration: none;
}
.toc a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ── Post body typography ── */
.post-body {
  font-size: var(--body-font-size);
  line-height: 1.72;
  color: var(--text-secondary);
}

/* ── Quick answer box (AEO / featured-snippet target) ── */
.quick-answer {
  background: var(--accent-bg);
  border: 1px solid #bfe6d5;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 0 0 26px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.quick-answer strong { color: var(--accent-text); }

/* ── FAQ ── */
.faq { margin: 6px 0 0; }
.faq-item {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item h3 {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;   /* override the larger post-body h3 margin inside FAQ */
}
}
.faq-item p { margin: 0; }
.post-body h2,
.post-body h3 {
  font-family: var(--font-serif);
  color: var(--text-primary);
  line-height: 1.3;
  scroll-margin-top: 84px;   /* offset for sticky header on anchor jump */
}
.post-body h2 {
  font-size: 25px;
  margin: 34px 0 12px;
}
.post-body h3 { font-size: 20px; margin: 24px 0 10px; }
.post-body p { margin: 0 0 18px; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover { color: var(--accent-hover); }

.post-body ul,
.post-body ol { margin: 0 0 20px; padding-left: 24px; }
.post-body li { margin: 0 0 9px; }
.post-body strong { color: var(--text-primary); font-weight: 700; }

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 10px 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 15px;
}
.post-body th,
.post-body td {
  border: 1px solid var(--border);
  padding: 10px 13px;
  text-align: left;
  vertical-align: top;
}
.post-body th { background: var(--surface-alt); color: var(--text-primary); font-weight: 700; }

.post-body blockquote {
  margin: 0 0 22px;
  padding: 16px 20px;
  background: var(--accent-bg);
  border: 1px solid #bfe6d5;
  border-radius: var(--radius);
  color: var(--text-secondary);
}
.post-body blockquote p:last-child { margin-bottom: 0; }

.post-body .text-center { text-align: center; }

/* ── Download / Buy buttons ── */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin: 28px 0;
}
.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none !important;
  transition: transform .08s ease, box-shadow .12s ease, background .12s ease;
  border: none;
  cursor: pointer;
  line-height: 1;
}
.dl-btn i { font-size: 18px; }
.dl-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.14); }
.dl-btn:active { transform: translateY(0); }

.dl-btn--download {
  background: var(--accent);
  color: #fff !important;
}
.dl-btn--download:hover { background: var(--accent-hover); }

.dl-btn--buy {
  background: #ea6a1e;
  color: #fff !important;
}
.dl-btn--buy:hover { background: #d15c14; }

/* ── Responsive video embed (16:9) ── */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 10px 0 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .post-head h1 { font-size: 27px; }
  .post-body { font-size: 16px; }
  .post-body h2 { font-size: 22px; }
}
