/* ===========================================================================
   blog.css - public blog: archive, article, author pages.

   Every rule is scoped under .hl-blog. site.css styles bare h1-h4, p, a, img
   and section globally, so an unscoped blog stylesheet would leak across the
   whole site (and vice versa). Wrap page content in <div class="hl-blog">.

   Palette matches the 2026-08 footer redesign and promo.css so the blog sits
   flush with the rest of the site.
   =========================================================================== */

.hl-blog {
    --green: #39B91C;
    --green-dark: #22790F;
    --green-tint: #E5F6E0;
    --orange: #F9722B;
    --ink: #2A2A2A;
    --body: #626262;
    --muted: #7F7F7F;
    --paper: #F8F8F6;
    --sand: #F1EFE8;
    --hairline: #E5E5E0;
    --muted-border: #D3D1C7;
    --shadow-card: 4px 5px 10px rgba(0, 0, 0, .12);
    --max: 1140px;

    font-family: Montserrat, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--body);
    font-size: 17px;
    line-height: 1.6;
    background: #fff;
}

.hl-blog * { box-sizing: border-box; }
.hl-blog img { max-width: 100%; height: auto; display: block; }
.hl-blog a { color: var(--green-dark); text-decoration: none; }
.hl-blog a:hover { text-decoration: underline; }
.hl-blog .wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.hl-blog .narrow { max-width: 760px; }
.hl-blog .center { text-align: center; }

/* ---------- masthead ---------- */
.hl-blog .blog-head { background: var(--paper); border-bottom: 1px solid var(--hairline); padding: 54px 0 46px; }
.hl-blog .blog-head h1 {
    margin: 0 0 12px; font-size: clamp(34px, 5vw, 54px); font-weight: 800;
    text-transform: uppercase; letter-spacing: -.01em; line-height: 1.04; color: var(--green);
}
.hl-blog .blog-head p { margin: 0; font-size: 17px; color: var(--body); max-width: 60ch; }
.hl-blog .eyebrow {
    font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--green-dark); margin: 0 0 12px;
}

/* ---------- archive grid ---------- */
.hl-blog .post-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
    padding: 52px 0;
}
.hl-blog .post-card {
    background: #fff; border: 1px solid var(--hairline); border-radius: 14px;
    overflow: hidden; display: flex; flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}
.hl-blog .post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.hl-blog .post-card .thumb { aspect-ratio: 16 / 9; background: var(--sand); overflow: hidden; }
.hl-blog .post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.hl-blog .post-card .pad { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.hl-blog .post-card h2 {
    margin: 0 0 9px; font-size: 20px; font-weight: 700; line-height: 1.25; color: var(--ink);
}
.hl-blog .post-card h2 a { color: inherit; }
.hl-blog .post-card h2 a:hover { color: var(--green-dark); text-decoration: none; }
.hl-blog .post-card .excerpt { margin: 0 0 16px; font-size: 14.5px; color: var(--body); flex: 1; }
.hl-blog .post-meta {
    font-size: 12.5px; color: var(--muted); display: flex; align-items: center;
    gap: 9px; flex-wrap: wrap;
}
.hl-blog .post-meta img.avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.hl-blog .post-meta .dot { color: var(--muted-border); }

.hl-blog .featured-flag {
    display: inline-block; background: var(--green-tint); color: var(--green-dark);
    font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    padding: 3px 9px; border-radius: 10px; margin-bottom: 10px;
}

/* ---------- pagination ---------- */
.hl-blog .pager { display: flex; gap: 12px; justify-content: center; align-items: center; padding: 0 0 60px; }
.hl-blog .pager a, .hl-blog .pager span {
    padding: 10px 18px; border: 1px solid var(--muted-border); border-radius: 6px;
    font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.hl-blog .pager a:hover { border-color: var(--green); color: var(--green-dark); text-decoration: none; }
.hl-blog .pager .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- article ---------- */
.hl-blog .article-head { padding: 50px 0 30px; }
.hl-blog .article-head h1 {
    margin: 0 0 14px; font-size: clamp(30px, 4.4vw, 46px); font-weight: 800;
    line-height: 1.1; color: var(--ink); letter-spacing: -.01em;
}
.hl-blog .article-head .standfirst { font-size: 19px; color: var(--body); margin: 0 0 22px; }
.hl-blog .byline { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.hl-blog .byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.hl-blog .byline .who { color: var(--ink); font-weight: 700; }
.hl-blog .byline .who a { color: inherit; }

.hl-blog .hero-figure { margin: 0 0 34px; }
.hl-blog .hero-figure img { width: 100%; border-radius: 14px; }
.hl-blog .hero-figure figcaption { font-size: 13px; color: var(--muted); margin-top: 9px; }

/* body copy produced by the editor */
.hl-blog .article-body { font-size: 17.5px; line-height: 1.75; color: var(--body); }
.hl-blog .article-body h2 {
    margin: 40px 0 14px; font-size: 27px; font-weight: 800; color: var(--ink); line-height: 1.2;
}
.hl-blog .article-body h3 { margin: 32px 0 12px; font-size: 21px; font-weight: 700; color: var(--ink); }
.hl-blog .article-body h4 { margin: 26px 0 10px; font-size: 18px; font-weight: 700; color: var(--ink); }
/* `div` is treated like a paragraph as a safety net: some browsers emit a div
   instead of a p on Enter inside contenteditable, and without this those blocks
   would run together with no spacing. The editor normalises to <p>, so this
   should rarely fire. */
.hl-blog .article-body p,
.hl-blog .article-body > div { margin: 0 0 20px; }
.hl-blog .article-body > *:first-child { margin-top: 0; }
.hl-blog .article-body > *:last-child { margin-bottom: 0; }
.hl-blog .article-body ul, .hl-blog .article-body ol { margin: 0 0 20px; padding-left: 24px; }
.hl-blog .article-body li { margin-bottom: 9px; }
.hl-blog .article-body img { border-radius: 12px; margin: 26px 0; }
.hl-blog .article-body figure { margin: 26px 0; }
.hl-blog .article-body figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: center; }
.hl-blog .article-body blockquote {
    margin: 28px 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--green);
    font-size: 19px; font-style: italic; color: var(--ink);
}
.hl-blog .article-body a { text-decoration: underline; }
.hl-blog .article-body table { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: 15px; }
.hl-blog .article-body th, .hl-blog .article-body td { border: 1px solid var(--hairline); padding: 9px 12px; text-align: left; }
.hl-blog .article-body th { background: var(--paper); font-weight: 700; color: var(--ink); }
.hl-blog .article-body code {
    background: var(--paper); padding: 2px 6px; border-radius: 4px; font-size: 15px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.hl-blog .article-body pre { background: var(--paper); padding: 16px; border-radius: 8px; overflow-x: auto; }

.hl-blog .tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 36px 0 0; }
.hl-blog .tag {
    background: var(--sand); color: var(--body); font-size: 12px; font-weight: 600;
    padding: 5px 12px; border-radius: 12px;
}

/* ---------- CTA strip ---------- */
.hl-blog .cta-strip {
    margin: 48px 0; padding: 38px 34px; border-radius: 16px; color: #fff;
    background: linear-gradient(155deg, #39b91c 0%, #22790f 100%);
    box-shadow: 0 8px 22px rgba(34, 121, 15, .22);
}
.hl-blog .cta-strip.dark { background: linear-gradient(155deg, #2a2a2a 0%, #0e0e0e 100%); box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.hl-blog .cta-strip.sand { background: var(--sand); color: var(--ink); box-shadow: none; border: 1px solid var(--muted-border); }
.hl-blog .cta-strip .cta-eyebrow {
    font-size: 11.5px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .13em; opacity: .9; margin: 0 0 8px;
}
.hl-blog .cta-strip h2 {
    margin: 0 0 12px; font-size: 28px; font-weight: 800; line-height: 1.12;
    text-transform: uppercase; color: inherit;
}
.hl-blog .cta-strip p { margin: 0 0 22px; font-size: 15.5px; line-height: 1.55; opacity: .95; }
.hl-blog .cta-strip .cta-btn {
    display: inline-block; background: var(--orange); color: #fff; font-weight: 800;
    text-transform: uppercase; letter-spacing: .03em; font-size: 14.5px;
    padding: 13px 28px; border-radius: 6px; box-shadow: 0 5px 15px rgba(249, 114, 43, .4);
}
.hl-blog .cta-strip .cta-btn:hover { opacity: .92; text-decoration: none; color: #fff; }
.hl-blog .cta-strip.sand .cta-eyebrow { color: var(--green-dark); opacity: 1; }

/* ---------- author ---------- */
.hl-blog .author-hero {
    background: var(--paper); border-bottom: 1px solid var(--hairline);
    padding: 50px 0; display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
}
.hl-blog .author-hero img { width: 108px; height: 108px; border-radius: 50%; object-fit: cover; }
.hl-blog .author-hero h1 { margin: 0 0 6px; font-size: 34px; font-weight: 800; color: var(--ink); }
.hl-blog .author-hero .role {
    margin: 0 0 12px; font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--green-dark);
}
.hl-blog .author-hero .bio { margin: 0; max-width: 62ch; font-size: 15.5px; }
.hl-blog .author-card {
    display: flex; gap: 18px; align-items: flex-start; background: var(--paper);
    border: 1px solid var(--hairline); border-radius: 14px; padding: 24px; margin: 44px 0;
}
.hl-blog .author-card img { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.hl-blog .author-card h3 { margin: 0 0 4px; font-size: 17px; color: var(--ink); font-weight: 700; }
.hl-blog .author-card p { margin: 0; font-size: 14px; }

/* ---------- related ---------- */
.hl-blog .related { border-top: 1px solid var(--hairline); padding: 44px 0 60px; }
.hl-blog .related h2 {
    margin: 0 0 26px; font-size: 15px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .07em; color: var(--green-dark);
}
.hl-blog .related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

/* ---------- preview banner ---------- */
.hl-blog .preview-banner {
    background: #b87b00; color: #fff; padding: 10px 16px; text-align: center;
    font-size: 13px; font-weight: 700;
}

.hl-blog .empty { text-align: center; color: var(--muted); padding: 70px 20px; font-size: 16px; }

@media only screen and (max-width: 900px) {
    .hl-blog .post-grid, .hl-blog .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media only screen and (max-width: 620px) {
    .hl-blog .post-grid, .hl-blog .related-grid { grid-template-columns: 1fr; }
    .hl-blog .blog-head { padding: 36px 0 30px; }
    .hl-blog .article-body { font-size: 16.5px; }
    .hl-blog .cta-strip { padding: 28px 22px; }
}
