/* Blog styles. Everything is scoped to .hb so it can't clash with the main site's CSS.
   Colors, fonts and corners come from config.php (style) as CSS variables. */
.hb { color: var(--hb-ink); font-family: var(--hb-font-body); }
.hb *, .hb *::before, .hb *::after { box-sizing: border-box; }
.hb img { max-width: 100%; height: auto; }
.hb-wrap { width: 100%; max-width: calc(var(--hb-max) + 48px); margin: 0 auto; padding-inline: 24px; }
.hb-narrow { max-width: calc(780px + 48px); }
.hb-section { padding-block: clamp(48px, 7vw, 88px); }
.hb-section--soft { background: var(--hb-soft); }
.hb-section--post { padding-top: 32px; }
.hb-hero { padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 48px); background: var(--hb-soft); }
.hb-hero--post { background: transparent; padding-bottom: 0; }
.hb-h1, .hb-h2, .hb-card__title, .hb-prose h2, .hb-prose h3, .hb-prose h4, .hb-faq h3 { font-family: var(--hb-font-heading); text-transform: var(--hb-heading-case); color: var(--hb-ink); line-height: 1.15; text-wrap: balance; }
.hb-h1 { font-size: clamp(34px, 5vw, 56px); margin: 10px 0 0; letter-spacing: -0.01em; }
.hb-h1--post { font-size: clamp(32px, 4.4vw, 50px); }
.hb-h2 { font-size: clamp(26px, 3vw, 36px); margin: 0 0 24px; }
.hb-lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--hb-muted); max-width: 720px; margin: 16px 0 0; line-height: 1.55; text-wrap: pretty; }
.hb-eyebrow { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hb-muted); margin: 0 0 6px; }
.hb-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--hb-muted); }
.hb-crumbs a { color: inherit; text-decoration: none; }
.hb-crumbs a:hover { color: var(--hb-accent); text-decoration: underline; }
.hb-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; color: var(--hb-muted); margin-top: 16px; }
.hb-meta a { color: inherit; font-weight: 600; }
.hb-icon { width: 18px; height: 18px; flex: none; }

/* Buttons */
.hb-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; background: var(--hb-accent); color: var(--hb-accent-text); border: 2px solid var(--hb-accent); border-radius: var(--hb-radius); font-weight: 700; text-decoration: none; }
.hb-btn:hover { filter: brightness(0.92); }
.hb-btn--outline { background: transparent; color: var(--hb-ink); border-color: var(--hb-ink); }
.hb-btn:focus-visible, .hb a:focus-visible { outline: 3px solid var(--hb-accent); outline-offset: 3px; }

/* Category chips */
.hb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.hb-chips a { padding: 9px 16px; border: 1px solid #D4D6DA; border-radius: var(--hb-radius); color: var(--hb-ink); text-decoration: none; font-size: 15px; font-weight: 600; }
.hb-chips a:hover { border-color: var(--hb-ink); }
.hb-chips a[aria-current="page"] { background: var(--hb-ink); border-color: var(--hb-ink); color: #fff; }

/* Post cards */
.hb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.hb-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #E3E4E7; border-radius: var(--hb-radius); overflow: hidden; }
.hb-card__img { display: block; aspect-ratio: 16 / 10; background: var(--hb-ink); overflow: hidden; }
.hb-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.hb-card:hover .hb-card__img img { transform: scale(1.03); }
.hb-card__placeholder { height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--hb-font-heading); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 16px; text-align: center; }
.hb-card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.hb-card__body .hb-meta { margin: 0; font-size: 14px; }
.hb-card__title { font-size: 21px; margin: 0; }
.hb-card__title a { color: inherit; text-decoration: none; }
.hb-card__title a:hover { color: var(--hb-accent); }
.hb-card p { margin: 0; color: var(--hb-muted); line-height: 1.55; }
.hb-more { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; color: var(--hb-accent); font-weight: 700; text-decoration: none; }
.hb-pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; }
.hb-empty { color: var(--hb-muted); }

/* Single post */
.hb-preview { background: #FFF3C4; padding: 12px 24px; text-align: center; font-weight: 600; }
.hb-feature { display: block; width: 100%; border-radius: var(--hb-radius); margin-bottom: 32px; }
.hb-toc { background: var(--hb-soft); border-left: 4px solid var(--hb-accent); padding: 20px 24px; margin: 0 0 36px; border-radius: var(--hb-radius); }
.hb-toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.hb-toc a { color: var(--hb-ink); }
.hb-prose { font-size: clamp(18px, 1.35vw, 20px); line-height: 1.75; }
.hb-prose > * + * { margin-top: 1.1em; }
.hb-prose h2 { font-size: clamp(25px, 2.6vw, 32px); margin-top: 1.8em; scroll-margin-top: 100px; }
.hb-prose h3 { font-size: clamp(20px, 2vw, 24px); margin-top: 1.5em; }
.hb-prose h4 { font-size: 19px; margin-top: 1.3em; }
.hb-prose a { color: var(--hb-accent); text-decoration: underline; text-underline-offset: 3px; }
.hb-prose ul, .hb-prose ol { padding-left: 1.3em; }
.hb-prose li + li { margin-top: 0.4em; }
.hb-prose blockquote { margin-left: 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--hb-accent); font-size: 1.1em; }
.hb-prose img { border-radius: var(--hb-radius); }
.hb-prose .ql-align-center { text-align: center; }
.hb-prose .ql-align-right { text-align: right; }
.hb-faq { margin-top: 56px; padding-top: 32px; border-top: 3px solid var(--hb-ink); }
.hb-faq__item { padding: 20px 0; border-bottom: 1px solid #E3E4E7; }
.hb-faq__item h3 { font-size: 20px; margin: 0 0 8px; }
.hb-faq__item p { margin: 0; line-height: 1.65; }
.hb-faq__item p + p { margin-top: 10px; }
.hb-tags { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 40px; padding-top: 24px; border-top: 1px solid #E3E4E7; }
.hb-tags .hb-eyebrow { margin: 0; }
.hb-tags a { color: var(--hb-ink); font-weight: 600; }
.hb-author { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 48px; padding: 28px; background: var(--hb-soft); border-radius: var(--hb-radius); }
.hb-author img { width: 112px; height: 112px; object-fit: cover; border-radius: var(--hb-radius); }
.hb-author p { margin: 6px 0 0; line-height: 1.6; }
.hb-author__name { font-family: var(--hb-font-heading); font-weight: 800; font-size: 22px; }
.hb-author__name a { color: var(--hb-ink); text-decoration: none; }
.hb-author__name span { display: block; font-family: var(--hb-font-body); font-weight: 400; font-size: 15px; color: var(--hb-muted); }
.hb-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.hb-postnav a { display: grid; gap: 4px; padding: 18px; border: 1px solid #E3E4E7; border-radius: var(--hb-radius); color: var(--hb-ink); text-decoration: none; font-weight: 700; }
.hb-postnav a:hover { border-color: var(--hb-ink); }
.hb-postnav__next { text-align: right; }
.hb-links { display: flex; flex-wrap: wrap; gap: 12px; }
.hb-links a { display: inline-flex; align-items: center; gap: 8px; padding: 14px 18px; border: 2px solid var(--hb-ink); border-radius: var(--hb-radius); color: var(--hb-ink); text-decoration: none; font-weight: 700; }
.hb-links a:hover { background: var(--hb-ink); color: #fff; }

/* Call to action */
.hb-cta { background: var(--hb-ink); color: #fff; padding-block: clamp(44px, 6vw, 72px); }
.hb-cta__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px 48px; flex-wrap: wrap; }
.hb-cta .hb-h2 { color: #fff; margin: 0 0 8px; }
.hb-cta p { margin: 0; color: rgba(255,255,255,.8); max-width: 620px; }

/* Placeholder header/footer (replaced by the main site's own in theme/) */
.hb-default-header, .hb-default-footer { background: #111; color: #fff; padding: 18px 0; font-family: system-ui, sans-serif; }
.hb-default-header .hb-wrap { display: flex; justify-content: space-between; gap: 16px; }
.hb-default-header a { color: #fff; margin-left: 16px; text-decoration: none; font-weight: 600; }
.hb-default-header a:first-child { margin-left: 0; }

@media (max-width: 960px) { .hb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .hb-grid { grid-template-columns: 1fr; }
  .hb-author { grid-template-columns: 1fr; }
  .hb-postnav { grid-template-columns: 1fr; }
  .hb-postnav__next { text-align: left; }
  .hb-pager { flex-wrap: wrap; justify-content: center; }
}
