/* Blog pages. Builds on style.css tokens. */
.blog .footer { padding-bottom: 28px; margin-top: 56px; }
.blog .topnav .btn { margin-left: 6px; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

.blog-hero { padding-top: 40px; padding-bottom: 26px; }
.blog-hero h1 { font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -0.035em; line-height: 1.05; margin: 0 0 12px; font-weight: 800; }
.blog-hero .lead { max-width: 720px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.cat-chips .chip { text-decoration: none; color: var(--ink); background: #fff; }
.cat-chips .chip.active { background: var(--ink); color: var(--mint); }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.post-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.post-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(24, 37, 29, .06), 0 16px 36px rgba(24, 37, 29, .1); }
.post-card .thumb { display: block; aspect-ratio: 1200 / 630; background: var(--ink); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 64px; font-weight: 800; color: var(--mint); background: radial-gradient(circle at 30% 20%, #2B3E31, var(--ink)); text-transform: uppercase; }
.post-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card h2, .post-card h3 { margin: 0; font-size: 19px; line-height: 1.3; letter-spacing: -0.015em; }
.post-card h2 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--mint-d); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.post-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.post-card .post-meta { margin-top: auto; padding-top: 6px; }
.kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #3D7A12; text-decoration: none; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--muted); }
.post-card.featured { grid-column: 1 / -1; flex-direction: row; }
.post-card.featured .thumb { width: 54%; flex: none; aspect-ratio: auto; min-height: 320px; }
.post-card.featured .post-card-body { padding: 32px; justify-content: center; }
.post-card.featured h2 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.025em; }
.post-card.featured p { font-size: 16.5px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 32px 0 0; color: var(--muted); font-weight: 600; }
.empty-blog { background: #fff; border-radius: 16px; padding: 48px 24px; text-align: center; box-shadow: var(--shadow); }
.empty-blog h2 { margin: 0 0 8px; }

.cta-band { margin-top: 48px; background: var(--ink); color: #fff; border-radius: 20px; padding: 32px 36px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -0.02em; }
.cta-band p { margin: 0; color: #C5D1C9; }

/* Article */
.article-wrap { padding-top: 34px; }
.article { max-width: 1120px; margin: 0 auto; }
.article-hero { position: relative; overflow: hidden; background: var(--brand); color: #fff; border-radius: 26px; padding: 44px 48px; margin: 8px 0 40px; display: grid; gap: 40px; align-items: center; }
.article-hero.has-cover { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.article-hero::before { content: ""; position: absolute; width: 620px; height: 620px; right: -160px; top: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(183,255,114,.16), rgba(183,255,114,0) 65%); pointer-events: none; }
.article-hero > * { position: relative; }
.article-head { max-width: 640px; margin: 0; }
.article-hero .crumbs, .article-hero .crumbs a { color: rgba(255,255,255,.6); }
.article-hero .crumbs a:hover { color: #fff; }
.article-hero .crumbs a:last-of-type { color: var(--hi); }
.article-hero .article-lead { color: rgba(255,255,255,.78); }
.article-hero .post-meta { color: rgba(255,255,255,.6); align-items: center; }
.article-hero .post-meta .by { color: #fff; display: inline-flex; align-items: center; gap: 9px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--hi); color: var(--brand); display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; }
.article-head h1 { color: #fff; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -0.035em; margin: 0 0 14px; font-weight: 800; }
.article-lead { font-size: 19px; color: var(--ink-2); margin: 0 0 16px; line-height: 1.55; }
.article-head .by { color: var(--ink); font-weight: 600; }
.article-cover { margin: 0; }
.article-cover img { display: block; width: 100%; height: auto; border-radius: 16px; aspect-ratio: 1200 / 630; object-fit: cover; background: #22362A; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 24px 50px rgba(0,0,0,.35); }
.article-grid { display: grid; grid-template-columns: 240px minmax(0, 780px); gap: 48px; justify-content: center; }
.article-grid > .prose:only-child { grid-column: 1 / -1; max-width: 780px; margin: 0 auto; width: 100%; }
.toc { position: sticky; top: 84px; align-self: start; font-size: 14px; }
.toc details { background: #fff; border: 1px solid var(--line-2); border-radius: 18px; padding: 18px 14px 14px; box-shadow: 0 1px 2px rgba(24,37,29,.04), 0 10px 30px rgba(24,37,29,.07); }
.toc summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 6px; cursor: pointer; list-style: none; text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; font-weight: 800; color: var(--ink); }
.toc summary::-webkit-details-marker { display: none; }
.toc-pct { font-size: 11px; letter-spacing: .02em; background: var(--brand); color: var(--hi); border-radius: 999px; padding: 3px 8px; font-variant-numeric: tabular-nums; }
.toc-bar { height: 4px; background: var(--line-2); border-radius: 999px; margin: 12px 6px 10px; overflow: hidden; }
.toc-bar i { display: block; height: 100%; width: 0; background: var(--hi-d); border-radius: inherit; transition: width .15s linear; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: calc(100vh - 290px); overflow-y: auto; scrollbar-width: thin; }
.toc ol a { display: flex; gap: 10px; align-items: flex-start; padding: 8px 8px; border-radius: 10px; color: var(--ink-2); text-decoration: none; line-height: 1.35; font-size: 13.5px; font-weight: 500; transition: background .15s, color .15s; }
.toc ol a .n { flex: none; width: 24px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; background: var(--soft); color: var(--muted); font-variant-numeric: tabular-nums; transition: background .15s, color .15s; }
.toc ol a:hover { background: var(--soft); color: var(--ink); }
.toc ol a.done .n { background: rgba(155,234,79,.25); color: var(--brand); }
.toc ol a.on { background: var(--brand); color: #fff; font-weight: 600; }
.toc ol a.on .n { background: var(--hi); color: var(--brand); }
.toc-cta { display: block; margin: 12px 0 0; text-align: center; background: var(--hi); color: var(--brand); font-weight: 800; font-size: 13.5px; padding: 11px 12px; border-radius: 12px; text-decoration: none; transition: background .15s; }
.toc-cta:hover { background: var(--hi-d); }

.prose { font-size: 17.5px; line-height: 1.75; color: #1F2B23; overflow-wrap: break-word; }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-size: 29px; line-height: 1.22; letter-spacing: -0.025em; margin: 1.8em 0 .6em; scroll-margin-top: 84px; }
.prose h3 { font-size: 22px; line-height: 1.3; letter-spacing: -0.015em; margin: 1.6em 0 .5em; scroll-margin-top: 84px; }
.prose h4 { font-size: 18px; margin: 1.4em 0 .4em; }
.prose a { color: #1D5C12; text-decoration: underline; text-decoration-color: var(--mint-d); text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 500; }
.prose a:hover { background: #EEFBE0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: #3D7A12; font-weight: 700; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--mint); font-size: 19px; color: var(--ink); font-weight: 500; }
.prose img { border-radius: 12px; height: auto; margin: 0 auto; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose code { background: #EEF1EF; padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose pre { background: var(--ink); color: #E7F2EA; padding: 16px; border-radius: 12px; overflow: auto; font-size: 14.5px; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15.5px; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; min-width: 90px; }
.prose thead th { background: #EEF7E4; font-weight: 700; border-bottom: 2px solid var(--ink); }
.prose .callout { background: #F1FBE7; border: 1px solid #CDEFA8; border-radius: 14px; padding: 16px 18px; margin: 1.6em 0; }
.prose .callout p:last-child { margin-bottom: 0; }

.inline-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--ink); color: #fff; border-radius: 14px; padding: 16px 18px; margin: 2em 0; flex-wrap: wrap; }
.inline-cta strong { display: block; color: var(--mint); font-size: 16px; }
.inline-cta span { color: #C5D1C9; font-size: 15px; line-height: 1.45; display: block; }
.prose .inline-cta a.btn { color: var(--ink); text-decoration: none; background: var(--mint); }

.post-faq { margin-top: 2.4em; }
.post-faq details { background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 0 18px; margin-bottom: 10px; box-shadow: var(--shadow); }
.post-faq summary { cursor: pointer; font-weight: 700; padding: 15px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; font-size: 17px; line-height: 1.4; }
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after { content: "+"; color: var(--muted); font-size: 22px; line-height: 1; }
.post-faq details[open] summary::after { content: "\2212"; }
.post-faq details p { margin: 0 0 16px; font-size: 16.5px; }

.end-cta { margin-top: 2.6em; background: #fff; border: 2px solid var(--ink); border-radius: 18px; padding: 24px; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: center; }
.end-cta img { grid-row: span 2; border-radius: 14px; }
.end-cta h2 { margin: 0; font-size: 22px; }
.end-cta p { margin: 0; font-size: 15.5px; line-height: 1.55; }
.end-cta .btn { grid-column: 2; justify-self: start; margin-top: 10px; text-decoration: none; color: var(--ink); }
.prose .end-cta a.btn:hover { background: var(--mint-d); }

.related { max-width: 1120px; margin: 64px auto 0; }
.related h2 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 18px; }
.post-grid.three .post-card h3 { font-size: 17px; }

.preview-banner { background: #FFF1D6; color: #6B4300; text-align: center; padding: 10px; font-weight: 600; font-size: 14px; }
.preview-banner a { color: inherit; margin-left: 8px; }
.notfound { text-align: center; padding: 80px 20px 40px; }
.notfound h1 { font-size: 40px; margin: 0 0 10px; }
.notfound .btn { margin: 8px 4px; text-decoration: none; }
.narrow { max-width: 760px; }

@media (max-width: 1080px) {
  .article-grid { grid-template-columns: minmax(0, 780px); }
  .toc { position: static; }
  .toc details { padding: 14px; }
  .toc summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .2s; }
  .toc details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
  .toc-pct { display: none; }
  .toc details:not([open]) .toc-bar { display: none; }
  .toc ol { max-height: none; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .post-grid, .post-grid.three { grid-template-columns: 1fr; }
  .post-card.featured { flex-direction: column; }
  .post-card.featured .thumb { width: 100%; min-height: 0; aspect-ratio: 1200 / 630; }
  .post-card.featured .post-card-body { padding: 18px 20px 20px; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 25px; }
  .prose h3 { font-size: 20px; }
  .article-cover img { border-radius: 12px; }
  .cta-band { padding: 24px; }
  .end-cta { grid-template-columns: 1fr; }
  .end-cta img { grid-row: auto; width: 48px; height: 48px; }
  .end-cta .btn { grid-column: auto; }
  .blog .topnav .btn { display: none; }
}
@media (min-width: 1081px) {
}
html { scroll-behavior: smooth; }
.prose h2, .prose h3, .post-faq { scroll-margin-top: 90px; }
@media (max-width: 960px) {
  .article-hero.has-cover { grid-template-columns: 1fr; }
  .article-hero { padding: 32px 28px; gap: 28px; }
}
@media (max-width: 720px) {
  .article-hero { padding: 24px 20px; border-radius: 20px; margin: 0 0 28px; }
  .article-cover img { border-radius: 12px; }
}
@media (max-width: 720px) { .article-hero .article-lead { font-size: 16.5px; } }
