/* Horsewood — blog.css — loads after style.css */

/* Reading progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; background: transparent; z-index: 110; }
.progress span { display: block; height: 100%; width: 0; background: var(--grad-cta); transition: width .1s linear; }

/* Blog header */
.post-head { border-bottom: 1px solid var(--border); padding: 32px 0 40px; }
.crumb { font-size: 16px; margin: 0 0 24px; }
.crumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.crumb li { margin: 0; display: flex; gap: 8px; }
.crumb li + li::before { content: "/"; color: var(--ink); }
.crumb a { color: var(--accent-deep); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.crumb [aria-current] { color: var(--ink); }
.post-head .kicker { font-size: 16px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep); margin: 0 0 12px; }
.post-head h1 { font-size: clamp(2.1rem, 4.5vw, 3rem); max-width: 24ch; margin-bottom: 16px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 16px; color: var(--ink); margin: 0; font-weight: 500; }

/* Layout: article + sticky TOC */
.post-wrap { display: grid; grid-template-columns: 1fr 280px; gap: 52px; padding: 48px 0 20px; align-items: start; }
@media (max-width: 960px) { .post-wrap { grid-template-columns: 1fr; gap: 24px; } }

.post-fig { margin: 0 0 36px; }
.post-fig img { border-radius: var(--r); border: 1px solid var(--border); width: 100%; }
.post-fig figcaption { font-size: 16px; color: var(--ink); margin-top: 12px; }

article.post { font-size: 18px; line-height: 1.8; max-width: 68ch; }
article.post h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 44px 0 .5em; scroll-margin-top: 96px; }
article.post h2:first-child { margin-top: 0; }
article.post h3 { font-size: 1.3rem; margin: 30px 0 .5em; scroll-margin-top: 96px; }
article.post ul, article.post ol { margin-bottom: 1.3em; }
article.post li { margin-bottom: .6em; }
article.post strong { font-weight: 600; }
article.post .callout { margin: 32px 0; }

/* TOC */
.toc { position: sticky; top: 96px; border: 1px solid var(--border); border-radius: var(--r); padding: 24px 22px; background: var(--soft); }
.toc h2 { font-size: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); margin: 0 0 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.toc li { margin: 0 0 4px; }
.toc a { display: block; padding: 7px 10px; font-size: 16px; font-weight: 500; color: var(--ink); text-decoration: none; border-radius: 8px; line-height: 1.4; border-left: 3px solid transparent; }
.toc a:hover { background: #fff; color: var(--accent-deep); }
.toc a.is-current { background: #fff; color: var(--accent-deep); border-left-color: var(--accent); }
@media (max-width: 960px) { .toc { position: static; margin-bottom: 8px; } }

/* CTA block in post */
.post-cta { margin: 44px 0; padding: 36px 30px; text-align: center; background: var(--grad-dark); color: #fff; border-radius: var(--r); position: relative; overflow: hidden; }
.post-cta img { margin: 0 auto 20px; max-height: 220px; width: auto; position: relative; z-index: 1; filter: drop-shadow(0 14px 28px rgba(0,0,0,.5)); }
.post-cta h2 { color: #fff; margin: 0 0 .4em; font-size: 1.7rem; position: relative; z-index: 1; }
.post-cta p { color: #fff; max-width: 46ch; margin: 0 auto 22px; position: relative; z-index: 1; }
.post-cta .btn { position: relative; z-index: 1; }
.post-cta .fine { margin-top: 18px; }

/* FAQ reuse .faq */
.post-faq { max-width: 68ch; margin: 8px 0; }
.post-faq h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin-bottom: 8px; }

/* Prev/next */
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-top: 1px solid var(--border); padding: 36px 0; margin-top: 20px; }
@media (max-width: 620px) { .pn { grid-template-columns: 1fr; } }
.pn a { display: block; padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--r); text-decoration: none; color: var(--ink); background: var(--paper); }
.pn a:hover { border-color: var(--accent); }
.pn .lbl { font-size: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); }
.pn .ttl { display: block; margin-top: 6px; font-weight: 600; font-size: 17px; color: var(--ink-black); }
.pn .next { text-align: right; }

/* Related */
.related { border-top: 1px solid var(--border); padding: 44px 0 90px; }
.related h2 { font-size: 1.5rem; margin-bottom: 24px; }

/* Blog index */
.blog-hero { border-bottom: 1px solid var(--border); padding: 52px 0 56px; }
.blog-hero h1 { max-width: 18ch; }
.blog-hero .lead { max-width: 56ch; color: var(--ink); }
.blog-list { padding: 48px 0 90px; }
.feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--paper); box-shadow: var(--shadow); margin-bottom: 40px; }
@media (max-width: 820px) { .feature { grid-template-columns: 1fr; } }
.feature img { width: 100%; height: 100%; object-fit: cover; min-height: 240px; }
.feature-body { padding: 36px 34px; }
.feature .kicker { font-size: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); margin: 0 0 12px; }
.feature h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin: 0 0 12px; }
.feature h2 a { color: var(--ink-black); text-decoration: none; }
.feature h2 a:hover { color: var(--accent-deep); }
