/* Blog listing and post pages. Uses the premium.css tokens (--ink, --green, --forest, --line, --mist, --muted). */

.blog-hero{padding-top:clamp(40px,6vw,88px);padding-bottom:clamp(32px,4vw,56px)}
.blog-hero h1{margin:clamp(36px,6vw,80px) 0 0;font-size:clamp(56px,7vw,104px)}
.blog-hero h1 span{color:var(--green)}
.blog-hero .lead{max-width:640px;margin:24px 0 0;font-size:clamp(18px,1.5vw,21px);line-height:1.55;color:var(--muted)}

/* Listing */
.blog-list{padding-bottom:clamp(64px,8vw,128px)}
.blog-card{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:clamp(24px,4vw,64px);align-items:center;padding:clamp(28px,3vw,40px) 0;border-top:1px solid var(--line);color:inherit;text-decoration:none}
.blog-card:last-child{border-bottom:1px solid var(--line)}
.blog-card figure{margin:0;overflow:hidden;border-radius:4px;background:var(--mist);aspect-ratio:16/9}
.blog-card img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
.blog-card:hover img{transform:scale(1.03)}
.blog-card h2{margin:14px 0 0;font-size:clamp(28px,3vw,44px);line-height:1.1}
.blog-card p{margin:16px 0 0;max-width:560px;font-size:17px;line-height:1.6;color:var(--muted)}
.blog-card .blog-meta{margin-top:20px}
.blog-card .text-link{display:inline-flex;gap:10px;margin-top:24px;color:var(--green);font-weight:500}

.blog-meta{display:flex;flex-wrap:wrap;gap:6px 18px;font-family:var(--mono);font-size:12px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}

/* Post */
.post-header{padding-top:clamp(40px,6vw,88px)}
.post-header h1{max-width:1100px;margin:clamp(32px,5vw,64px) 0 0;font-size:clamp(40px,5.4vw,80px);line-height:1.04}
.post-header .lead{max-width:720px;margin:24px 0 0;font-size:clamp(18px,1.5vw,21px);line-height:1.55;color:var(--muted)}
.post-header .blog-meta{margin-top:28px}
.post-feature{margin:clamp(32px,4vw,56px) 0 0}
.post-feature img{display:block;width:100%;height:auto;max-height:640px;object-fit:cover;border-radius:4px;background:var(--mist)}

.post-layout{display:grid;grid-template-columns:220px minmax(0,720px);gap:clamp(40px,6vw,120px);justify-content:center;padding-top:clamp(48px,6vw,88px);padding-bottom:clamp(64px,8vw,120px)}
.post-toc{position:sticky;top:120px;align-self:start}
.post-toc ol{list-style:none;margin:16px 0 0;padding:0;border-left:1px solid var(--line)}
.post-toc a{display:block;padding:7px 0 7px 16px;font-size:14px;line-height:1.4;color:var(--muted);text-decoration:none}
.post-toc a:hover{color:var(--green)}

.post-body{font-size:18px;line-height:1.72;color:var(--ink)}
.post-body>*:first-child{margin-top:0}
.post-body p{margin:0 0 1.15em}
.post-body h2{margin:2.2em 0 .6em;font-size:clamp(28px,2.6vw,38px);line-height:1.15;scroll-margin-top:110px}
.post-body h3{margin:1.8em 0 .5em;font-size:22px;line-height:1.3;letter-spacing:-.02em;scroll-margin-top:110px}
.post-body a{color:var(--green);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.post-body a:hover{text-decoration-thickness:2px}
.post-body ol,.post-body ul{margin:0 0 1.3em;padding-left:1.3em}
.post-body li{margin:0 0 .6em;padding-left:.2em}
.post-body li::marker{color:var(--green);font-weight:600}
.post-body strong{font-weight:600}

.post-figure{margin:2em 0 2.2em}
.post-figure img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:4px;background:var(--white)}
.post-figure figcaption{margin-top:12px;font-size:14px;line-height:1.5;color:var(--muted)}

.post-table-wrap{margin:1.4em 0 2em;overflow-x:auto;border:1px solid var(--line);border-radius:4px}
.post-body table{width:100%;min-width:520px;border-collapse:collapse;font-size:15px;line-height:1.45}
.post-body th,.post-body td{padding:12px 16px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}
.post-body thead th{background:var(--forest);color:var(--white);font-weight:500}
.post-body tbody th{font-weight:600;background:var(--mist)}
.post-body tbody tr:last-child>*{border-bottom:0}

.post-cta{margin:2.4em 0;padding:clamp(28px,4vw,44px);border-radius:4px;background:var(--forest);color:var(--white)}
.post-cta h2{margin:0;color:var(--white);font-size:clamp(26px,2.4vw,34px)}
.post-cta p{margin:14px 0 0;color:rgba(255,255,255,.78)}
.post-cta .button{margin-top:24px}

.post-faq details{border-top:1px solid var(--line)}
.post-faq details:last-of-type{border-bottom:1px solid var(--line)}
.post-faq summary{display:flex;justify-content:space-between;gap:20px;padding:18px 0;font-size:19px;font-weight:500;line-height:1.4;cursor:pointer;list-style:none}
.post-faq summary::-webkit-details-marker{display:none}
.post-faq summary::after{content:"+";flex-shrink:0;color:var(--green);font-size:24px;line-height:1}
.post-faq details[open] summary::after{content:"\2212"}
.post-faq details p{margin:0 0 20px;color:var(--muted)}

.post-back{display:flex;justify-content:space-between;gap:20px;padding:28px 0;border-top:1px solid var(--line)}

@media (max-width:900px){
  .blog-card{grid-template-columns:1fr}
  .post-layout{grid-template-columns:minmax(0,1fr)}
  .post-toc{position:static;padding:20px;border-radius:4px;background:var(--mist)}
  .post-toc ol{border-left:0}
  .post-toc a{padding-left:0}
}
@media (max-width:560px){
  .post-body{font-size:17px}
  .post-back{flex-direction:column}
}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Code-generated SVG figures (docs/blog_figures.py): desktop layout above 600px, mobile layout below */
.fig-svg{display:block;width:100%;height:auto}
.post-feature .fig-svg{border-radius:4px}
.blog-card figure .fig-svg{height:100%;transition:transform .5s ease}
.blog-card:hover .fig-svg{transform:scale(1.03)}
.post-figure--svg .fig-svg{border:1px solid var(--line);border-radius:4px}
.post-figure--svg .fig-m{display:none}
@media (max-width:600px){
  .post-figure--svg .fig-d{display:none}
  .post-figure--svg .fig-m{display:block}
}

/* Buttons inside the article keep button styling (the .post-body a rule would turn them green-on-green) */
.post-body a.button{color:var(--white);text-decoration:none}
.post-body .post-cta a.button{background:var(--lime);border-color:var(--lime);color:var(--forest)}
.post-body .post-cta a.button:hover{background:var(--white);border-color:var(--white);color:var(--forest)}
