/* Article layout; loaded only by pages that opt in to this stylesheet. */
:root {
  --bg-primary: #fff;
  --bg-secondary: #f6f8fa;
  --text-primary: #24292e;
  --text-secondary: #57606a;
  --accent: #237638;
  --border: #d0d7de;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text-primary);
  background: var(--bg-primary);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  padding: .75rem 1rem;
  background: #fff;
  z-index: 10000;
}
.skip-link:focus { top: 1rem; }
.blog-article {
  width: min(100% - 3rem, 800px);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
  overflow-wrap: break-word;
}
.back-link { display: inline-block; margin-bottom: 2rem; font-size: .9rem; }
.article-header { margin-bottom: 1.75rem; }
.article-eyebrow {
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.blog-article h1 {
  margin: .6rem 0 1rem;
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1.14;
  letter-spacing: -.035em;
  font-weight: 600;
  text-wrap: balance;
}
.article-deck { font-size: 1.2rem; color: var(--text-secondary); }
.article-meta { display: flex; flex-wrap: wrap; gap: .35rem 1.3rem; font-size: .8rem; color: var(--text-secondary); }
.article-summary { padding: 1.25rem 1.5rem; border-left: 4px solid var(--accent); background: #f1f7f2; border-radius: 0 .5rem .5rem 0; }
.article-summary p { margin: 0; }
.article-toc { margin: 1.75rem 0; padding: 1.25rem 1.5rem; border: 1px solid var(--border); border-radius: .5rem; }
.toc-title { margin: 0 0 .5rem; font-weight: 600; }
.article-toc ol { padding-left: 1.3rem; margin: 0; }
.article-toc li { padding: .2rem 0; }
.article-figure { margin: 2rem 0; }
.article-image { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: .5rem; }
article > .article-image { margin-bottom: 2rem; }
figcaption { margin-top: .75rem; color: var(--text-secondary); font-size: .85rem; }
.article-content { font-size: 1.05rem; }
.blog-article h2 { margin: 2.5rem 0 1rem; font-size: 1.65rem; line-height: 1.3; letter-spacing: -.02em; font-weight: 600; }
.blog-article h3 { margin: 1.75rem 0 .6rem; font-size: 1.2rem; line-height: 1.4; font-weight: 600; }
.blog-article [id] { scroll-margin-top: 1.5rem; }
.article-content p { margin: 0 0 1.2rem; }
.article-content ul, .article-content ol { padding-left: 1.4rem; }
.article-content li { margin-bottom: .9rem; }
.table-wrapper { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--border); border-radius: .5rem; }
.table-wrapper table { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.6; }
.table-wrapper caption { padding: 1rem; text-align: left; font-weight: 600; background: var(--bg-secondary); }
.table-wrapper th, .table-wrapper td { padding: 1rem; text-align: left; vertical-align: top; border-top: 1px solid var(--border); }
.table-wrapper thead th { background: var(--bg-secondary); }
.table-wrapper tbody th { width: 22%; font-weight: 600; }
/* Older posts put tables straight into .article-content with no .table-wrapper. */
.article-content > table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; font-size: .9rem; line-height: 1.6; }
.article-content > table th, .article-content > table td { padding: .75rem 1rem; text-align: left; vertical-align: top; border: 1px solid var(--border); }
.article-content > table th { background: var(--bg-secondary); font-weight: 600; }
.article-sources { border-top: 1px solid var(--border); margin-top: 2.5rem; font-size: .9rem; }
.article-sources li { margin-bottom: .4rem; }
.product-cta { margin: 2.5rem 0; padding: 1.75rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: .5rem; }
.product-cta h2 { margin: 0; }
.product-cta-link { display: inline-block; padding: .75rem 1rem; color: #fff; background: var(--accent); border-radius: .3rem; font-weight: 600; text-decoration: none; }
.related-posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.related-post-card { display: flex; justify-content: space-between; gap: .5rem; padding: 1rem; border: 1px solid var(--border); border-radius: .5rem; font-size: .9rem; }
/* Older post template: icon meta line, labelled CTA with several links, titled related cards. */
.article-meta i { display: none; } /* fa-subset.css gives .far no font-family, so these render as empty boxes */
.product-cta-heading { margin: 0 0 1rem; font-size: 1.2rem; font-weight: 600; }
.product-cta-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.product-cta-links .product-cta-link:not(.primary) { color: var(--accent); background: transparent; box-shadow: inset 0 0 0 1px var(--accent); }
.related-post-card:has(.rp-cta) { flex-direction: column; text-decoration: none; }
.blog-article .related-post-card h3 { margin: 0 0 .6rem; font-size: .95rem; line-height: 1.45; color: var(--text-primary); }
.rp-cta { margin-top: auto; font-size: .85rem; }
@media (max-width: 600px) {
  .blog-article { width: calc(100% - 2rem); padding-top: 1.5rem; }
  .back-link { margin-bottom: 1rem; }
  .article-deck { font-size: 1.05rem; }
  .article-summary, .article-toc, .product-cta { padding: 1rem; }
  .article-content { font-size: 1rem; }
  .blog-article h2 { font-size: 1.4rem; }
  .table-wrapper table { min-width: 580px; }
  .article-content > table { display: block; overflow-x: auto; }
  .related-posts-grid { grid-template-columns: 1fr; }
}
