/*!
 * Cloudhim theme stylesheet (v1.1.0)
 * ──────────────────────────────────
 * The bundled tailwind.min.css has no JIT step, so it is missing many
 * utilities (line-clamp, aspect ratios, arbitrary variants, several grid
 * columns). Layout-critical components are therefore styled here with plain
 * bh-* classes. This used to be ~25 KB inlined into every page; as a file it
 * is downloaded once and cached.
 */

/* ── Basics ─────────────────────────────────────────────────────────────── */
:root {
  --bh-brand: rgb(37 99 235);
  --bh-brand-dark: rgb(29 78 216);
  --bh-ink: #0f172a;
  --bh-text: #334155;
  --bh-muted: #64748b;
  --bh-line: #e2e8f0;
  --bh-soft: #f8fafc;
}
img { max-width: 100%; }
.bh-ico { width: 1rem; height: 1rem; flex-shrink: 0; display: inline-block; vertical-align: middle; }
.bh-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.bh-skip {
  position: absolute; left: -9999px; top: .5rem; z-index: 100;
  background: #fff; color: var(--bh-ink); padding: .6rem 1rem; border-radius: .5rem;
  box-shadow: 0 6px 20px rgb(15 23 42 / .2); font-weight: 600; text-decoration: none;
}
.bh-skip:focus { left: .75rem; }
.bh-container { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 1024px) { .bh-container { padding: 0 1.5rem; } }
.bh-logo { height: 2.25rem; width: auto; display: block; }
[hidden] { display: none !important; }

/* ── Code boxes + Prettify tokens ───────────────────────────────────────── */
.prose pre.prettyprint,
.prose pre {
  background: #1e293b; color: #e2e8f0; border: 1px solid #334155;
  border-radius: .75rem; padding: 1rem 1.15rem; overflow-x: auto;
  font-size: .875rem; line-height: 1.65;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.prose pre code { background: none; color: inherit; padding: 0; font-size: inherit; font-weight: inherit; }
.prose pre code::before, .prose pre code::after { content: none; }
.prose pre.prettyprint .com { color: #94a3b8; font-style: italic; }
.prose pre.prettyprint .kwd { color: #f472b6; }
.prose pre.prettyprint .str { color: #86efac; }
.prose pre.prettyprint .lit { color: #fdba74; }
.prose pre.prettyprint .typ { color: #7dd3fc; }
.prose pre.prettyprint .fun { color: #c4b5fd; }
.prose pre.prettyprint .pun,
.prose pre.prettyprint .opn,
.prose pre.prettyprint .clo { color: #cbd5e1; }
.prose pre.prettyprint .tag { color: #f472b6; }
.prose pre.prettyprint .atn { color: #fdba74; }
.prose pre.prettyprint .atv { color: #86efac; }
.prose pre.prettyprint .dec,
.prose pre.prettyprint .var { color: #7dd3fc; }
.prose pre.prettyprint .pln { color: #e2e8f0; }

/* Line numbers: one per line (prettify's own skin hides most of them). */
.prose pre.prettyprint ol.linenums { margin: 0; padding: 0 0 0 1.25rem; list-style-type: decimal; list-style-position: outside; }
.prose pre.prettyprint ol.linenums li { margin: 0; padding-left: .75rem; color: #64748b; list-style-type: decimal; background: none; }
.prose pre.prettyprint ol.linenums li.L0, .prose pre.prettyprint ol.linenums li.L1,
.prose pre.prettyprint ol.linenums li.L2, .prose pre.prettyprint ol.linenums li.L3,
.prose pre.prettyprint ol.linenums li.L4, .prose pre.prettyprint ol.linenums li.L5,
.prose pre.prettyprint ol.linenums li.L6, .prose pre.prettyprint ol.linenums li.L7,
.prose pre.prettyprint ol.linenums li.L8, .prose pre.prettyprint ol.linenums li.L9 { list-style-type: decimal; background: none; }
.prose pre.prettyprint ol.linenums li::marker { color: #64748b; font-size: .8em; }
.prose pre.prettyprint ol.linenums li > * { color: #e2e8f0; }
.prose pre.prettyprint ol.linenums li > .com { color: #94a3b8; }
.prose pre.prettyprint ol.linenums li > .kwd { color: #f472b6; }
.prose pre.prettyprint ol.linenums li > .str { color: #86efac; }
.prose pre.prettyprint ol.linenums li > .lit { color: #fdba74; }
.prose pre.prettyprint ol.linenums li > .typ { color: #7dd3fc; }
.prose pre.prettyprint ol.linenums li > .fun { color: #c4b5fd; }
.prose pre.prettyprint ol.linenums li > .tag { color: #f472b6; }
.prose pre.prettyprint ol.linenums li > .atn { color: #fdba74; }
.prose pre.prettyprint ol.linenums li > .atv { color: #86efac; }
.prose pre.prettyprint ol.linenums li > .dec,
.prose pre.prettyprint ol.linenums li > .var { color: #7dd3fc; }
.prose pre.prettyprint ol.linenums li > .pun,
.prose pre.prettyprint ol.linenums li > .opn,
.prose pre.prettyprint ol.linenums li > .clo { color: #cbd5e1; }
@media (max-width: 640px) {
  .prose pre.prettyprint ol.linenums { padding-left: .75rem; }
  .prose pre.prettyprint ol.linenums li { padding-left: .5rem; }
}

/* ── Article body hygiene ───────────────────────────────────────────────── */
/* Wide tables and embeds scrolled the whole page sideways on phones. */
.prose img { height: auto; border-radius: .75rem; }
.prose table { display: block; max-width: 100%; overflow-x: auto; }
.prose iframe, .prose video, .prose embed, .prose object { max-width: 100%; }
.prose iframe[src*="youtube"], .prose iframe[src*="vimeo"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.prose :where(h2, h3, h4)[id] { scroll-margin-top: 5.5rem; } /* clears the sticky header */
.prose { overflow-wrap: break-word; }
.prose ins.adsbygoogle { background: transparent; text-decoration: none; }

/* ── Breadcrumbs ────────────────────────────────────────────────────────── */
.bh-breadcrumbs { border-bottom: 1px solid #f1f5f9; background: var(--bh-soft); }
.bh-breadcrumbs__inner { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 1024px) { .bh-breadcrumbs__inner { padding: 0 1.5rem; } }
.bh-crumbs {
  display: flex; align-items: center; flex-wrap: nowrap; overflow: hidden;
  list-style: none; margin: 0; padding: .5rem 0;
  font-size: .75rem; line-height: 1.25rem; color: var(--bh-muted);
}
.bh-crumb { display: flex; align-items: center; flex-shrink: 0; min-width: 0; white-space: nowrap; }
.bh-crumb--current { flex: 1 1 auto; min-width: 0; }
.bh-crumb__sep { padding: 0 .375rem; color: #cbd5e1; user-select: none; }
.bh-crumb__link { color: var(--bh-muted); text-decoration: none; white-space: nowrap; transition: color .15s ease; }
.bh-crumb__link:hover { color: var(--bh-brand); text-decoration: underline; }
.bh-crumb__label { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: var(--bh-text); font-weight: 500; }
.bh-crumb__text { white-space: nowrap; }

/* ── Single-post meta row ───────────────────────────────────────────────── */
.bh-post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; min-width: 0; }
.bh-post-meta__item, .bh-post-meta__sep { display: inline-flex; align-items: center; gap: .25rem; flex-shrink: 0; white-space: nowrap; }
.bh-post-meta__author { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.bh-post-meta__avatar {
  width: 2rem; height: 2rem; flex-shrink: 0; border-radius: 9999px;
  display: grid; place-items: center; font-size: .75rem; font-weight: 600;
}
.bh-post-meta__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-post-meta svg { flex-shrink: 0; vertical-align: middle; }
.bh-post-meta__date-short { display: none; }
@media (max-width: 640px) {
  .bh-post-meta { gap: .375rem .5rem; font-size: .75rem; line-height: 1rem; }
  .bh-post-meta__avatar { width: 1.5rem; height: 1.5rem; font-size: .625rem; }
  .bh-post-meta__name { max-width: 8rem; }
  .bh-post-meta__date-full { display: none; }
  .bh-post-meta__date-short { display: inline; }
  .bh-post-meta__views-label { display: none; }
}
.bh-featured { margin: 0 0 2rem; border-radius: 1rem; overflow: hidden; border: 1px solid var(--bh-line); background: #f1f5f9; }
.bh-featured img { display: block; width: 100%; height: auto; }

/* ── Post cards: one component for home, archives, search ──────────────── */
.bh-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 1.25rem; }
.bh-section-title { font-family: Lora, Georgia, serif; font-size: 1.5rem; font-weight: 700; color: var(--bh-ink); letter-spacing: -.01em; margin: 0; }
.bh-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
.bh-grid__full { grid-column: 1 / -1; }
@media (max-width: 1023px) { .bh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; } }
@media (max-width: 640px)  { .bh-grid { grid-template-columns: 1fr; gap: 1rem; } }

.bh-card {
  position: relative;
  display: flex; flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--bh-line);
  border-radius: 1rem;
  overflow: hidden;
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.bh-card:hover { border-color: #bfdbfe; box-shadow: 0 10px 24px -10px rgb(37 99 235 / .25); transform: translateY(-2px); }
.bh-card:focus-within { border-color: #93c5fd; }
.bh-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #f1f5f9; }
.bh-card__media img, .bh-card__img {
  display: block; width: 100%; height: 100%; max-width: none;
  object-fit: cover; transition: transform .45s ease;
}
.bh-card:hover .bh-card__media img { transform: scale(1.04); }
.bh-card__media--empty {
  display: grid; place-items: center;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  color: #60a5fa;
}
.bh-card__media--empty .bh-ico { width: 2.25rem; height: 2.25rem; }
.bh-card__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 1rem 1.15rem 1.15rem; min-width: 0; }
.bh-card__cat {
  position: relative; z-index: 2; align-self: flex-start;
  font-size: .6875rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--bh-brand); text-decoration: none; margin-bottom: .4rem;
}
.bh-card__cat:hover { text-decoration: underline; }
.bh-card__title {
  margin: 0 0 .5rem;
  font-size: 1.0625rem; line-height: 1.38; font-weight: 600; color: var(--bh-ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bh-card__title a { color: inherit; text-decoration: none; }
/* The whole card is the link target; the category label sits above it. */
.bh-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.bh-card__title a:focus-visible { outline: none; }
.bh-card__title a:focus-visible::after { outline: 2px solid var(--bh-brand); outline-offset: -2px; border-radius: 1rem; }
.bh-card:hover .bh-card__title { color: var(--bh-brand); }
.bh-card__excerpt {
  margin: 0 0 .875rem; font-size: .875rem; line-height: 1.55; color: #475569;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bh-card__meta {
  margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem;
  font-size: .75rem; color: var(--bh-muted);
}
.bh-card__meta span, .bh-card__meta time { display: inline-flex; align-items: center; gap: .25rem; }
.bh-card__meta .bh-ico { width: .875rem; height: .875rem; color: #94a3b8; }

.bh-empty { text-align: center; padding: 4rem 1rem; color: var(--bh-muted); }
.bh-empty .bh-ico { width: 3rem; height: 3rem; color: #cbd5e1; margin: 0 auto 1rem; display: block; }
.bh-empty__title { font-size: 1.125rem; font-weight: 600; color: var(--bh-text); margin: 0 0 .35rem; }
.bh-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.25rem; }
.bh-chip {
  display: inline-flex; padding: .35rem .85rem; border-radius: 9999px;
  border: 1px solid var(--bh-line); background: #fff; color: #475569;
  font-size: .8125rem; font-weight: 500; text-decoration: none;
}
.bh-chip:hover { border-color: #93c5fd; color: var(--bh-brand-dark); background: #eff6ff; }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.bh-pager { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; }
.bh-pager__list { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.bh-pager__num, .bh-pager__step {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  min-width: 2.5rem; height: 2.5rem; padding: 0 .75rem;
  border: 1px solid #cbd5e1; border-radius: .6rem; background: #fff;
  color: var(--bh-text); font-size: .875rem; font-weight: 500; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.bh-pager__num:hover, .bh-pager__step:hover { background: #eff6ff; border-color: #93c5fd; color: var(--bh-brand-dark); }
.bh-pager__num.is-current { background: var(--bh-brand); border-color: var(--bh-brand); color: #fff; }
.bh-pager__gap { color: #94a3b8; padding: 0 .15rem; }
.bh-pager__count { margin: .75rem 0 0; text-align: center; font-size: .75rem; color: #94a3b8; }
@media (max-width: 480px) { .bh-pager__step span { display: none; } }

/* ── Ad slots (AdSense-friendly) ────────────────────────────────────────── */
/* Labelled, clearly separated from content and navigation, and with space
   reserved so a loading ad does not push the page around (CLS). An unfilled
   AdSense unit collapses instead of leaving a labelled hole. */
.bh-ad { margin: 1.5rem auto; text-align: center; clear: both; max-width: 100%; overflow: hidden; }
.bh-ad__label {
  display: block; margin-bottom: .35rem;
  font-size: .625rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8;
}
.bh-ad__body { min-height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.bh-ad__body > * { max-width: 100%; }
.bh-ad__unit { width: 100%; }
.bh-ad__title { display: none; }
.bh-ad--header { margin: 1.25rem auto .25rem; }
.bh-ad--header .bh-ad__body { min-height: 90px; }
.bh-ad--list, .bh-ad--article { padding: 1rem 0; border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; }
.bh-ad--list .bh-ad__body, .bh-ad--article .bh-ad__body { min-height: 250px; }
.bh-grid .bh-ad { margin: .25rem 0; }
@media (max-width: 640px) {
  .bh-ad--header .bh-ad__body { min-height: 100px; }
  .bh-ad--list .bh-ad__body, .bh-ad--article .bh-ad__body { min-height: 280px; }
}
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.bh-ad:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }

/* ── Related posts ──────────────────────────────────────────────────────── */
.bh-related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--bh-line); }
.bh-related__title { font-family: Lora, Georgia, serif; font-size: 1.5rem; font-weight: 700; color: var(--bh-ink); letter-spacing: -.01em; margin: 0 0 1.25rem; }
.bh-related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.bh-related__card { border: 1px solid var(--bh-line); border-radius: .75rem; overflow: hidden; background: #fff; transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease; }
.bh-related__card:hover { border-color: #bfdbfe; box-shadow: 0 8px 20px -6px rgb(37 99 235 / .18); transform: translateY(-2px); }
.bh-related__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.bh-related__thumb { aspect-ratio: 16 / 9; overflow: hidden; background: #f1f5f9; }
.bh-related__thumb img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; transition: transform .3s ease; }
.bh-related__card:hover .bh-related__thumb img { transform: scale(1.04); }
.bh-related__thumb--empty { display: grid; place-items: center; color: #cbd5e1; }
.bh-related__body { padding: .875rem 1rem 1rem; display: flex; flex-direction: column; flex: 1 1 auto; }
.bh-related__heading {
  font-size: .9375rem; font-weight: 600; line-height: 1.4; color: var(--bh-ink); margin: 0 0 .375rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bh-related__card:hover .bh-related__heading { color: var(--bh-brand); }
.bh-related__excerpt {
  font-size: .8125rem; line-height: 1.5; color: var(--bh-muted); margin: 0 0 .625rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bh-related__date { margin-top: auto; font-size: .75rem; color: #94a3b8; }
@media (max-width: 900px) { .bh-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .bh-related { margin-top: 2.5rem; }
  .bh-related__title { font-size: 1.25rem; }
  .bh-related__grid { grid-template-columns: 1fr; gap: 1rem; }
  .bh-related__link { flex-direction: row; align-items: stretch; }
  .bh-related__thumb { flex: 0 0 7.5rem; aspect-ratio: 1 / 1; }
  .bh-related__body { padding: .75rem .875rem; min-width: 0; }
  .bh-related__excerpt { display: none; }
}

/* ── Primary navigation ─────────────────────────────────────────────────── */
.bh-menu > .bh-menu__item > .bh-menu__link {
  position: relative; padding: .5rem .125rem; color: var(--bh-text); font-weight: 500; transition: color .15s ease;
}
.bh-menu > .bh-menu__item > .bh-menu__link:hover,
.bh-menu > .bh-menu__item.is-open > .bh-menu__link { color: var(--bh-brand); }
.bh-menu > .bh-menu__item > .bh-menu__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .15rem; height: 2px; border-radius: 2px;
  background: var(--bh-brand); transform: scaleX(0); transition: transform .18s ease;
}
.bh-menu > .bh-menu__item > .bh-menu__link:hover::after,
.bh-menu > .bh-menu__item.is-open > .bh-menu__link::after { transform: scaleX(1); }
.bh-menu__link:focus-visible { outline: 2px solid var(--bh-brand); outline-offset: 2px; border-radius: .25rem; }
.bh-submenu {
  border-color: var(--bh-line) !important; border-radius: .75rem !important; padding: .375rem !important;
  box-shadow: 0 12px 28px -8px rgb(15 23 42 / .18) !important;
}
.bh-submenu .bh-menu__link { color: #475569; }
.bh-submenu .bh-menu__link:hover,
.bh-submenu .bh-menu__link:focus-visible { background: #eff6ff !important; color: var(--bh-brand); }
.bh-menu--stack > .bh-menu__item > .bh-menu__link::after { content: none; }
.bh-menu--stack .bh-menu__link { padding: .625rem .25rem !important; min-height: 2.75rem; box-sizing: border-box; border-radius: .375rem; }
.bh-menu--stack .bh-menu__item--parent > .bh-menu__link { cursor: pointer; }
.bh-menu--stack .bh-submenu { padding-left: .875rem !important; border-left: 2px solid var(--bh-line) !important; margin: .125rem 0 .375rem .25rem !important; }
.bh-menu--stack .bh-submenu .bh-menu__link { font-size: .875rem; }
.bh-menu__overview > .bh-menu__link { font-style: italic; opacity: .85; }

.bh-header-search { display: flex; align-items: center; gap: .25rem; background: var(--bh-soft); border: 1px solid var(--bh-line); border-radius: .5rem; padding-left: .65rem; }
.bh-header-search:focus-within { border-color: #93c5fd; box-shadow: 0 0 0 3px rgb(191 219 254 / .6); }
.bh-header-search .bh-ico { color: #94a3b8; }
.bh-header-search input {
  background: transparent; border: 0; outline: none; padding: .4rem .6rem .4rem .25rem;
  font-size: .875rem; width: 10rem; transition: width .2s ease;
}
.bh-header-search input:focus { width: 14rem; }
.bh-menu-btn { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 0; background: transparent; border-radius: .5rem; color: #475569; cursor: pointer; }
.bh-menu-btn:hover { background: var(--bh-soft); }
.bh-menu-btn .bh-ico { width: 1.25rem; height: 1.25rem; }

/* ── Content + sidebar layout ───────────────────────────────────────────── */
.bh-layout { display: flex; align-items: flex-start; gap: 2.5rem; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 1024px) { .bh-layout { padding: 0 1.5rem; } }
.bh-layout__main { flex: 1 1 auto; min-width: 0; max-width: 48rem; margin: 0 auto; }
.bh-layout:has(.bh-sidebar) .bh-layout__main { margin: 0; }

.bh-sidebar { flex: 0 0 19rem; width: 19rem; min-width: 0; padding: 3rem 0; }
.bh-sidebar__inner { position: sticky; top: 5rem; }
.bh-sidebar-static .bh-sidebar__inner { position: static; }
.bh-sidebar .widget-area { display: flex; flex-direction: column; gap: 1.25rem; }

/* ── Widgets ────────────────────────────────────────────────────────────── */
.bh-sidebar .widget { background: #fff; border: 1px solid var(--bh-line); border-radius: .75rem; padding: 1.15rem 1.25rem; }
.bh-sidebar .widget-title { margin: 0 0 .75rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--bh-ink); }
.bh-sidebar .widget ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; font-size: .875rem; }
.bh-sidebar .widget li { min-width: 0; }
.bh-sidebar .widget a { color: #475569; text-decoration: none; transition: color .15s ease; }
.bh-sidebar .widget a:hover { color: var(--bh-brand); text-decoration: underline; }
.bh-sidebar .widget p { margin: 0; font-size: .875rem; color: var(--bh-muted); }
.bh-sidebar .widget input[type="text"],
.bh-sidebar .widget input[type="search"] {
  width: 100%; box-sizing: border-box; padding: .5rem .75rem; font-size: .875rem;
  border: 1px solid #cbd5e1; border-radius: .5rem; outline: none;
}
.bh-sidebar .widget input:focus { border-color: var(--bh-brand); box-shadow: 0 0 0 3px rgb(37 99 235 / .12); }
.bh-sidebar .widget-search { display: flex; gap: .375rem; }
.bh-sidebar .widget-search input[type="search"] { flex: 1 1 auto; min-width: 0; }
.bh-sidebar .widget-search button {
  flex-shrink: 0; padding: .5rem .75rem; font-size: .8125rem; font-weight: 500; color: #fff;
  background: var(--bh-brand); border: 0; border-radius: .5rem; cursor: pointer; transition: background .15s ease;
}
.bh-sidebar .widget-search button:hover { background: var(--bh-brand-dark); }
.bh-sidebar .widget-terms--tag { flex-direction: row !important; flex-wrap: wrap; gap: .375rem !important; }
.bh-sidebar .widget-terms--tag a { display: inline-block; padding: .2rem .5rem; font-size: .75rem; background: #f1f5f9; border-radius: .375rem; color: #475569; }
.bh-sidebar .widget-terms--tag a:hover { background: #eff6ff; color: var(--bh-brand); text-decoration: none; }
.bh-sidebar .widget-recent-posts a { display: block; line-height: 1.4; color: var(--bh-text); }
.bh-sidebar .widget-recent-posts li + li { padding-top: .5rem; border-top: 1px solid #f1f5f9; }

@media (max-width: 1023px) {
  .bh-layout { display: block; max-width: 48rem; }
  .bh-layout__main { max-width: none; }
  .bh-sidebar { width: auto; padding: 0 0 3rem; }
  .bh-sidebar__inner { position: static; }
  .bh-sidebar .widget-area { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
}
@media (max-width: 640px) { .bh-sidebar .widget-area { grid-template-columns: 1fr; } }

/* ── Homepage hero ──────────────────────────────────────────────────────── */
.bh-hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #eff6ff 0%, #f6faff 45%, #ffffff 100%); border-bottom: 1px solid #eef2f7; }
.bh-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(37,99,235,.08) 1px, transparent 1px); background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 0%, #000 8%, transparent 72%);
  mask-image: radial-gradient(ellipse 85% 70% at 50% 0%, #000 8%, transparent 72%);
  pointer-events: none;
}
.bh-hero::after {
  content: ""; position: absolute; top: -9rem; right: -7rem; width: 28rem; height: 28rem; border-radius: 9999px;
  background: radial-gradient(circle, rgba(37,99,235,.13), transparent 70%); pointer-events: none;
}
.bh-hero__inner { position: relative; max-width: 46rem; margin: 0 auto; padding: 3.5rem 1.25rem 3rem; text-align: center; }
@media (min-width: 768px)  { .bh-hero__inner { padding: 5rem 1.5rem 4rem; } }
@media (min-width: 1024px) { .bh-hero__inner { padding: 5.5rem 1.5rem 4.5rem; } }
.bh-hero__badge {
  display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .9rem; border-radius: 9999px;
  background: #fff; border: 1px solid #dbeafe; color: #1d4ed8; font-size: .75rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; box-shadow: 0 1px 2px rgba(15,23,42,.05); margin-bottom: 1.25rem;
}
.bh-hero__title {
  font-family: Lora, Georgia, serif; font-size: clamp(1.95rem, 1.1rem + 3.5vw, 3.25rem);
  line-height: 1.12; letter-spacing: -.012em; text-wrap: balance; margin-bottom: 1rem;
}
.bh-hero__inner > p { font-size: clamp(1rem, .95rem + .35vw, 1.15rem); line-height: 1.6; }
.bh-hero__search {
  max-width: 34rem; margin: 1.75rem auto; display: flex; align-items: center; gap: .5rem;
  background: #fff; border: 1px solid var(--bh-line); border-radius: .9rem; padding: .4rem .4rem .4rem 1rem;
  box-shadow: 0 4px 14px -6px rgba(15,23,42,.1), 0 1px 2px rgba(15,23,42,.05);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.bh-hero__search:focus-within { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(191,219,254,.5); }
.bh-hero__search svg { flex-shrink: 0; color: #94a3b8; }
.bh-hero__search input { flex: 1 1 auto; min-width: 0; border: 0; outline: none; background: transparent; font-size: .9375rem; padding: .55rem 0; color: var(--bh-ink); }
.bh-hero__search button {
  flex-shrink: 0; background: var(--bh-brand); color: #fff; border: 0; border-radius: .6rem;
  padding: .6rem 1.15rem; font-size: .875rem; font-weight: 600; cursor: pointer; transition: background .15s ease;
}
.bh-hero__search button:hover { background: var(--bh-brand-dark); }
.bh-hero__pills { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.bh-hero__pill {
  display: inline-flex; align-items: center; padding: .4rem .9rem; border-radius: 9999px; background: #fff;
  border: 1px solid var(--bh-line); color: #475569; font-size: .8125rem; font-weight: 500; text-decoration: none;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.bh-hero__pill:hover { border-color: #93c5fd; color: var(--bh-brand-dark); background: #eff6ff; }
@media (max-width: 600px) {
  .bh-hero__badge { font-size: .6875rem; padding: .3rem .8rem; margin-bottom: 1rem; }
  .bh-hero__search { margin: 1.5rem auto; padding: .45rem .45rem .45rem .85rem; flex-wrap: wrap; row-gap: .5rem; }
  .bh-hero__search button { flex: 0 0 100%; width: 100%; padding: .7rem 1rem; }
  .bh-hero__pills { gap: .45rem; }
  .bh-hero__pill { font-size: .75rem; padding: .35rem .8rem; }
}

/* ── Archive / search heading ───────────────────────────────────────────── */
.bh-pagehead { background: linear-gradient(135deg, #eff6ff, #fff); border-bottom: 1px solid #f1f5f9; }
.bh-pagehead__inner { max-width: 48rem; margin: 0 auto; padding: 2.75rem 1rem 2.5rem; text-align: center; }
.bh-pagehead__kicker { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--bh-brand); margin: 0 0 .5rem; }
.bh-pagehead__title { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); font-weight: 700; color: var(--bh-ink); letter-spacing: -.015em; line-height: 1.15; margin: 0 0 .5rem; }
.bh-pagehead__desc { color: #475569; margin: 0 auto; max-width: 40rem; line-height: 1.6; }
.bh-pagehead__count { margin: .75rem 0 0; font-size: .8125rem; color: var(--bh-muted); }
.bh-searchform { max-width: 36rem; margin: 1.25rem auto 0; display: flex; background: #fff; border: 1px solid #cbd5e1; border-radius: .75rem; overflow: hidden; }
.bh-searchform:focus-within { border-color: #93c5fd; box-shadow: 0 0 0 3px rgb(191 219 254 / .6); }
.bh-searchform input { flex: 1 1 auto; min-width: 0; border: 0; outline: none; padding: .75rem 1rem; font-size: 1rem; background: transparent; }
.bh-searchform button { flex-shrink: 0; border: 0; background: var(--bh-brand); color: #fff; padding: 0 1.25rem; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .875rem; }
.bh-searchform button:hover { background: var(--bh-brand-dark); }
.bh-listwrap { padding-top: 2.5rem; padding-bottom: 1rem; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.bh-footer { margin-top: 4rem; background: var(--bh-soft); border-top: 1px solid var(--bh-line); color: #475569; }
.bh-footer__strip { padding-top: 2.5rem; }
.bh-footer__strip .widget-area { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2rem; }
.bh-footer__strip .widget-title { margin: 0 0 .75rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--bh-ink); }
.bh-footer__strip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .875rem; }
.bh-footer__strip a { color: #475569; text-decoration: none; }
.bh-footer__strip a:hover { color: var(--bh-brand); }
.bh-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  padding: 3.5rem 0 2.75rem;
}
.bh-footer__brand-link { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--bh-ink); }
.bh-footer__logo { height: 2.25rem; width: auto; display: block; }
.bh-footer__mark {
  width: 2.25rem; height: 2.25rem; border-radius: .6rem; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}
.bh-footer__name { font-weight: 700; font-size: 1.0625rem; }
.bh-footer__about { margin: 1rem 0 0; font-size: .875rem; line-height: 1.65; max-width: 22rem; }
.bh-footer__social { display: flex; gap: .5rem; margin-top: 1.25rem; }
.bh-footer__social a {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .6rem;
  background: #fff; border: 1px solid var(--bh-line); color: #475569;
}
.bh-footer__social a:hover { color: var(--bh-brand); border-color: #93c5fd; }
.bh-footer__heading { margin: 0 0 1rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--bh-ink); }
.bh-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; font-size: .875rem; }
.bh-footer__links a { color: #475569; text-decoration: none; transition: color .15s ease; }
.bh-footer__links a:hover { color: var(--bh-brand); text-decoration: underline; text-underline-offset: 3px; }
.bh-footer__count { margin-left: .35rem; font-size: .75rem; color: #94a3b8; }
.bh-footer__base {
  border-top: 1px solid var(--bh-line); padding: 1.25rem 0 1.5rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem;
  font-size: .75rem; color: var(--bh-muted);
}
.bh-footer__base p { margin: 0; }
.bh-footer__base a { color: var(--bh-brand); text-decoration: none; }
.bh-footer__base a:hover { text-decoration: underline; }
@media (max-width: 1023px) {
  .bh-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
  .bh-footer__col--brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .bh-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 2.5rem 0 2rem; }
}

/* ── 404 ────────────────────────────────────────────────────────────────── */
.bh-404 { max-width: 40rem; margin: 0 auto; padding: 4.5rem 1rem 2rem; text-align: center; }
.bh-404__icon { display: inline-grid; place-items: center; width: 5rem; height: 5rem; border-radius: 1.25rem; background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #3b82f6; margin-bottom: 1.5rem; }
.bh-404__icon .bh-ico { width: 2.25rem; height: 2.25rem; }
.bh-btn {
  display: inline-flex; align-items: center; gap: .4rem; padding: .65rem 1.15rem; border-radius: .6rem;
  font-weight: 600; font-size: .9375rem; text-decoration: none; border: 1px solid transparent;
}
.bh-btn--primary { background: var(--bh-brand); color: #fff; }
.bh-btn--primary:hover { background: var(--bh-brand-dark); }
.bh-btn--ghost { border-color: #cbd5e1; color: var(--bh-text); background: #fff; }
.bh-btn--ghost:hover { background: var(--bh-soft); }

@media (prefers-reduced-motion: reduce) {
  .bh-card, .bh-card__media img, .bh-related__card, .bh-related__thumb img { transition: none; }
  .bh-card:hover, .bh-related__card:hover { transform: none; }
  .bh-card:hover .bh-card__media img, .bh-related__card:hover .bh-related__thumb img { transform: none; }
}
