/* ─────────────────────────────────────────────────────────────────
   Public blog skin v2 — sticky nav + cinematic hero + 3-col grid
   + list w/ sidebar + newsletter CTA + 4-col footer.
   All Montserrat, Zen Aesthetics tokens from design.css.
   ───────────────────────────────────────────────────────────────── */

body.blog-site,
body.blog-site input,
body.blog-site button,
body.blog-site textarea,
body.blog-site select {
  font-family: var(--font-sans);
}
body.blog-site {
  margin: 0;
  background: var(--blog-bg, white);
  color: var(--gray-9);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
}

/* The shared site nav-outer paints rgba(255,255,255,0.6) over a small
   strip at the top. On marketing pages the body is white, so the strip
   is invisible; on the blog the body is --blog-bg (e.g. #f9fafb), so
   that strip reads as a different tone. Match the strip to the blog bg
   so the transition is seamless. */
body.blog-site .nav-outer { background: var(--blog-bg, white); }

/* ─── Per-blog theme ────────────────────────────────────────────────
   The three vars (--blog-primary, --blog-secondary, --blog-bg) are
   painted onto <html style="…"> by blog-public.js#themeStyle. Rules
   below opt-in selectors into them, falling back to the original
   value when a blog row has no theme set. Keep this list small —
   only chrome that should clearly track the brand colour. */
.blog-nav-link.is-active,
.blog-nav-link:hover { color: var(--blog-primary, var(--gray-9)); }
.blog-section-link:hover { color: var(--blog-primary, var(--gray-9)); }
.blog-article-body a {
  text-decoration-color: var(--blog-secondary, var(--gray-3));
}
.blog-article-body a:hover {
  color: var(--blog-primary, var(--gray-9));
  text-decoration-color: var(--blog-primary, var(--gray-9));
}
.blog-article-body blockquote {
  border-left-color: var(--blog-primary, var(--gray-9));
}
.bc-card:hover { border-color: var(--blog-primary, var(--border-default)); }
.bl-row:hover .bl-title { color: var(--blog-primary, var(--gray-9)); }
.bc-card:hover .bc-title { color: var(--blog-primary, var(--gray-9)); }

.blog-shell { max-width: 1100px; margin: 0 auto; padding: 32px 24px 64px; }

/* ═══════════════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════════════ */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-default);
}
.blog-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.blog-nav-brand {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--gray-9);
  text-decoration: none;
  flex-shrink: 0;
}
.blog-nav-brand:hover { opacity: 0.75; }
.blog-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.blog-nav-link {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gray-7);
  text-decoration: none;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease;
}
.blog-nav-link:hover,
.blog-nav-link.is-active { color: var(--gray-9); }
.blog-nav-drop { position: relative; }
.blog-nav-drop-trigger { display: inline-flex; align-items: center; gap: 6px; }
.blog-nav-drop-trigger .chev { font-size: 9px; color: var(--gray-4); }
.blog-nav-drop-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 12px;
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 8px;
  min-width: 220px;
  box-shadow: var(--shadow-modern);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 60;
}
/* Invisible bridge so the cursor can travel from trigger to menu
   without leaving the :hover area and closing the dropdown. */
.blog-nav-drop-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}
.blog-nav-drop:hover .blog-nav-drop-menu,
.blog-nav-drop:focus-within .blog-nav-drop-menu { display: flex; }
.blog-nav-drop-menu a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-7);
  text-decoration: none;
  letter-spacing: normal;
  text-transform: none;
}
.blog-nav-drop-menu a:hover { background: var(--gray-0); color: var(--gray-9); }
.blog-nav-drop-menu .count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gray-4);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   HERO  (full-image with dark gradient + white text overlay)
   ═══════════════════════════════════════════════════════════════ */
.blog-hero {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--gray-9);
  text-decoration: none;
  color: inherit;
  margin-bottom: 56px;
  transition: transform 0.3s var(--ease-out, cubic-bezier(0.165, 0.84, 0.44, 1)), box-shadow 0.3s ease;
}
.blog-hero:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-bento-hover);
}
.blog-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out, cubic-bezier(0.165, 0.84, 0.44, 1));
}
.blog-hero:hover .blog-hero-img { transform: scale(1.04); }
.blog-hero-img-empty {
  background: linear-gradient(135deg, var(--gray-9) 0%, var(--brand-9) 100%);
}
.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.10) 0%,
    rgba(0,0,0,0.30) 50%,
    rgba(0,0,0,0.85) 100%);
}
.blog-hero-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px;
  color: white;
  max-width: 720px;
}
.blog-hero-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: white;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  padding: 5px 12px;
  border-radius: 9999px;
  margin-bottom: 18px;
}
.blog-hero-title {
  font-size: 48px;
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: white;
  margin: 0 0 14px;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0,0,0,0.3);
}
.blog-hero-excerpt {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.55;
  margin: 0 0 20px;
  max-width: 580px;
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}
.blog-hero-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.blog-hero-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 900;
  color: white;
  letter-spacing: 0.02em;
}
.blog-hero-time { opacity: 0.85; }

/* ═══════════════════════════════════════════════════════════════
   SECTION HEAD (Destaques, Últimas Publicações, etc)
   ═══════════════════════════════════════════════════════════════ */
.blog-section { margin-bottom: 72px; }
.blog-section:last-child { margin-bottom: 0; }
.blog-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.blog-section-title {
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.025em;
  color: var(--gray-9);
  margin: 0;
  line-height: 1.15;
}
.blog-section-sub {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-5);
}
.blog-section-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-7);
  text-decoration: none;
  white-space: nowrap;
}
.blog-section-link:hover { color: var(--gray-9); }

.blog-empty {
  text-align: center;
  padding: 80px 24px;
  font-size: 14px; font-weight: 500; color: var(--gray-5);
  border: 1px dashed var(--border-default);
  border-radius: 8px;
  background: var(--gray-0);
}

/* ═══════════════════════════════════════════════════════════════
   "DESTAQUES" GRID — 3 columns, compact cards
   ═══════════════════════════════════════════════════════════════ */
.bc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.bc-card {
  display: flex;
  flex-direction: column;
  background: white;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-default);
  transition: transform 0.25s var(--ease-out, cubic-bezier(0.165, 0.84, 0.44, 1)), box-shadow 0.25s ease;
}
.bc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-bento-hover);
}
.bc-cover {
  aspect-ratio: 16 / 9;
  background: var(--gray-1);
  overflow: hidden;
}
.bc-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s var(--ease-out, cubic-bezier(0.165, 0.84, 0.44, 1));
}
.bc-card:hover .bc-cover img { transform: scale(1.05); }
.bc-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.bc-chip {
  display: inline-block;
  align-self: flex-start;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-7);
  background: var(--gray-0);
  border: 1px solid var(--border-default);
  padding: 3px 8px;
  border-radius: 4px;
}
.bc-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--gray-9);
  line-height: 1.3;
  margin: 0;
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bc-excerpt {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-6);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bc-date {
  margin-top: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-5);
}

/* ═══════════════════════════════════════════════════════════════
   "ÚLTIMAS" LIST  +  SIDEBAR CATEGORIAS
   ═══════════════════════════════════════════════════════════════ */
.bl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 56px;
  align-items: start;
}
.bl-list { display: flex; flex-direction: column; gap: 0; }
.bl-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--border-default);
  text-decoration: none;
  color: inherit;
  transition: padding 0.15s ease;
}
.bl-row:first-child { padding-top: 0; }
.bl-row:hover { padding-left: 8px; }
.bl-cover {
  width: 160px; aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: var(--gray-1);
  border: 1px solid var(--border-default);
  flex-shrink: 0;
}
.bl-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bl-cover-empty {
  background: linear-gradient(135deg, var(--gray-1) 0%, var(--gray-0) 100%);
}
.bl-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bl-chip {
  display: inline-block;
  align-self: flex-start;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-7);
  background: var(--gray-0);
  border: 1px solid var(--border-default);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 2px;
}
.bl-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--gray-9);
  line-height: 1.25;
  margin: 0;
  text-wrap: balance;
}
.bl-row:hover .bl-title { color: var(--gray-7); }
.bl-excerpt {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-6);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bl-meta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-5);
}
.bl-author { display: inline-flex; align-items: center; gap: 6px; }
.bl-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gray-9);
  color: white;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 9px;
  font-weight: 900;
}
.bl-sep { color: var(--gray-3); }

/* Pagination (below the Latest posts list) */
.bl-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  flex-wrap: wrap;
}
.bl-page-nums {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bl-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: white;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-7);
  text-decoration: none;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.bl-page:hover { border-color: var(--gray-9); color: var(--gray-9); }
.bl-page.is-current {
  background: var(--gray-9);
  border-color: var(--gray-9);
  color: white;
}
.bl-page.is-disabled {
  color: var(--gray-3);
  border-color: var(--border-default);
  background: var(--gray-0);
  cursor: default;
}
.bl-page-nav { font-weight: 800; }
.bl-page-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 36px;
  color: var(--gray-4);
  font-weight: 800;
}

@media (max-width: 560px) {
  .bl-pagination { justify-content: center; }
  .bl-page-nums { order: -1; width: 100%; justify-content: center; }
}

/* Sidebar */
.bl-sidebar {
  position: sticky;
  top: 96px;
  padding-left: 0;
}
.bl-side-eyebrow {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-4);
  margin-bottom: 14px;
}
.bl-side-cats {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.bl-side-cats a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-7);
  text-decoration: none;
  transition: background 0.1s ease, color 0.1s ease;
}
.bl-side-cats a:hover { background: var(--gray-0); color: var(--gray-9); }
.bl-side-cats a.is-active { background: var(--gray-9); color: white; }
.bl-side-cats a.is-active .bl-side-count { color: var(--gray-3); }
.bl-side-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gray-4);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   PAGE HEAD (tag page / search page hero)
   ═══════════════════════════════════════════════════════════════ */
.blog-page-head {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 48px;
}
.blog-page-eyebrow {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-4);
  margin-bottom: 12px;
}
.blog-page-title {
  font-size: 56px;
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1.0;
  margin: 0 0 16px;
  color: var(--gray-9);
}
.blog-page-sub {
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-6);
  margin: 0;
}
/* legacy — kept for tag/page head; search page uses .bps-* below */
.blog-page-search { display: none; }
.bps-icon { font-size: 16px; color: var(--gray-4); }

/* ═══════════════════════════════════════════════════════════════
   SEARCH PAGE (refined)
   ═══════════════════════════════════════════════════════════════ */
.bps-head {
  padding: 48px 0 40px;
  margin-bottom: 32px;
  text-align: center;
}
.bps-eyebrow {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-4);
  margin-bottom: 10px;
}
.bps-title {
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--gray-9);
  margin: 0 0 20px;
}
.bps-form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 6px 6px 6px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bps-form:focus-within {
  border-color: var(--gray-9);
  box-shadow: 0 0 0 4px var(--gray-1);
}
.bps-form-icon {
  font-size: 18px;
  color: var(--gray-4);
  font-weight: 700;
  flex-shrink: 0;
  pointer-events: none;
}
.bps-form input[type="search"] {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-9);
  min-width: 0;
  font-family: inherit;
}
.bps-form input[type="search"]::placeholder { color: var(--gray-5); }
.bps-form input[type="search"]::-webkit-search-cancel-button,
.bps-form input[type="search"]::-webkit-search-decoration { display: none; -webkit-appearance: none; }
.bps-form-clear {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: var(--gray-1);
  color: var(--gray-7);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  margin-right: 4px;
  transition: background 0.1s ease, color 0.1s ease;
  line-height: 1;
}
.bps-form-clear:hover { background: var(--gray-2); color: var(--gray-9); }
.bps-form-submit {
  flex-shrink: 0;
  background: var(--gray-9);
  color: white;
  border: 0;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-transform: uppercase;
  font-family: inherit;
  transition: background 0.15s ease, transform 0.1s ease;
}
.bps-form-submit:hover { background: #000; }
.bps-form-submit:active { transform: scale(0.97); }

.bps-status {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-6);
}
.bps-status strong { color: var(--gray-9); font-weight: 800; }
.bps-status-q {
  font-family: var(--font-mono);
  color: var(--gray-9);
  font-weight: 700;
  background: var(--gray-1);
  padding: 1px 8px;
  border-radius: 4px;
}

/* Highlighted matches inside cards */
.bl-title mark,
.bl-excerpt mark,
.bc-title mark,
.bc-excerpt mark {
  background: var(--gray-9);
  color: white;
  padding: 0 4px;
  border-radius: 3px;
  font-weight: inherit;
}

/* Suggestions (empty query) */
.bps-suggest { margin-top: 24px; }
.bps-suggest-eyebrow {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-4);
  margin-bottom: 18px;
}
.bps-tag-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.bps-tag-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: white;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s ease, border-color 0.1s ease, transform 0.15s ease;
}
.bps-tag-card:hover {
  background: var(--gray-0);
  border-color: var(--gray-3);
  transform: translateY(-2px);
}
.bps-tag-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--gray-9);
}
.bps-tag-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-5);
}

/* No results state */
.bps-noresults {
  text-align: center;
  padding: 64px 24px;
  border: 1px dashed var(--border-default);
  border-radius: 8px;
  background: var(--gray-0);
}
.bps-noresults-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 50%;
  display: flex;
  align-items: center; justify-content: center;
  font-size: 24px;
  color: var(--gray-4);
  font-weight: 700;
}
.bps-noresults-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--gray-9);
  margin: 0 0 8px;
}
.bps-noresults-body {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-6);
  margin: 0 0 24px;
  line-height: 1.55;
}
.bps-tag-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.bps-tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 9999px;
  background: white;
  border: 1px solid var(--border-default);
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-7);
  text-decoration: none;
  transition: background 0.1s ease, color 0.1s ease, border-color 0.1s ease;
}
.bps-tag-chip:hover { background: var(--gray-9); color: white; border-color: var(--gray-9); }

/* ═══════════════════════════════════════════════════════════════
   ARTICLE  (single post)
   ═══════════════════════════════════════════════════════════════ */
.blog-article {
  max-width: 760px;
  margin: 48px auto 0;
  padding: 0 24px;
}
.blog-article-cover-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--gray-1);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 40px;
}
.blog-article-cover-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.blog-article-head { margin-bottom: 40px; }
.blog-article-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-9);
  background: var(--gray-1);
  border: 1px solid var(--border-default);
  padding: 4px 10px;
  border-radius: 9999px;
  text-decoration: none;
  margin-bottom: 18px;
}
.blog-article-tag:hover { background: var(--gray-9); color: white; border-color: var(--gray-9); }
.blog-article-title {
  font-size: 52px;
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1.04;
  color: var(--gray-9);
  margin: 0 0 20px;
  text-wrap: balance;
}
.blog-article-lede {
  font-size: 19px;
  font-weight: 500;
  color: var(--gray-6);
  line-height: 1.55;
  margin: 0 0 24px;
  text-wrap: pretty;
}
.blog-article-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-5);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-default);
}
.blog-article-meta .sep { color: var(--gray-3); }
.blog-article-author { display: inline-flex; align-items: center; gap: 8px; }
.blog-article-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gray-9);
  color: white;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 900;
}
.blog-article-body {
  font-size: 18px;
  line-height: 1.78;
  color: var(--gray-7);
  font-weight: 500;
  margin-top: 40px;
}
.blog-article-body > * + * { margin-top: 22px; }
.blog-article-body > * + h1,
.blog-article-body > * + h2,
.blog-article-body > * + h3 { margin-top: 44px; }
.blog-article-body h1,
.blog-article-body h2,
.blog-article-body h3 {
  color: var(--gray-9);
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  text-wrap: balance;
}
.blog-article-body h1 { font-size: 34px; font-weight: 900; line-height: 1.15; }
.blog-article-body h2 { font-size: 28px; font-weight: 900; line-height: 1.2; }
.blog-article-body h3 { font-size: 20px; font-weight: 800; line-height: 1.3; }
.blog-article-body p { margin: 0; }
.blog-article-body a {
  color: var(--gray-9);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--gray-3);
}
.blog-article-body a:hover { text-decoration-color: var(--gray-9); }
.blog-article-body strong { color: var(--gray-9); font-weight: 800; }
.blog-article-body img {
  width: 100%; height: auto;
  border-radius: 8px;
  margin: 32px 0;
  background: var(--gray-0);
  max-height: 540px;
  object-fit: contain;
}
.blog-article-body blockquote {
  border-left: 3px solid var(--gray-9);
  padding: 6px 0 6px 24px;
  margin: 32px 0;
  color: var(--gray-7);
  font-style: italic;
  font-size: 19px;
  line-height: 1.6;
}
.blog-article-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--gray-1);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--gray-9);
  font-weight: 600;
  border: 1px solid var(--border-default);
}
.blog-article-body pre {
  background: var(--gray-9);
  color: var(--gray-1);
  border-radius: 8px;
  padding: 20px 22px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
  margin: 32px 0;
}
.blog-article-body pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
  color: inherit;
  border: 0;
  font-weight: 500;
}
.blog-article-body hr {
  border: 0;
  height: 1px;
  background: var(--border-default);
  margin: 48px 0;
}
.blog-article-body ul,
.blog-article-body ol { padding-left: 26px; margin: 0; }
.blog-article-body ul li,
.blog-article-body ol li { margin: 8px 0; }
.blog-article-body ul li::marker { color: var(--gray-4); }
.blog-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
.blog-article-body th,
.blog-article-body td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-default);
}
.blog-article-body th {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--gray-7);
  background: var(--gray-0);
}

.blog-article-tags {
  margin-top: 56px;
  padding: 20px 0;
  border-top: 1px solid var(--border-default);
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px;
}
.blog-article-tags-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-4);
  margin-right: 6px;
}
.blog-article-tag-chip {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-7);
  background: var(--gray-0);
  border: 1px solid var(--border-default);
  padding: 4px 12px;
  border-radius: 9999px;
  text-decoration: none;
}
.blog-article-tag-chip:hover { background: var(--gray-9); color: white; border-color: var(--gray-9); }

.blog-article-back {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-default);
}
.blog-article-back a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--gray-5);
  text-decoration: none;
}
.blog-article-back a:hover { color: var(--gray-9); }
.blog-article-back a:hover .arrow { transform: translateX(-4px); }
.blog-article-back .arrow { transition: transform 0.2s ease; display: inline-block; }

/* Related (under article) */
.blog-related {
  background: var(--gray-0);
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
  padding: 64px 24px;
}
.blog-related-inner { max-width: 1100px; margin: 0 auto; }
.blog-related .blog-section-title { margin-bottom: 24px; }

/* ═══════════════════════════════════════════════════════════════
   ARTICLE LAYOUT (article + right sidebar)
   ═══════════════════════════════════════════════════════════════ */
.blog-article-shell { padding-top: 48px; }
.blog-main-article {
  display: grid;
  grid-template-columns: minmax(0, 720px) 280px;
  gap: 48px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}
.blog-main-article .blog-article {
  /* Reset the centered standalone-article layout when inside the 2-col shell. */
  max-width: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.blog-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}
.blog-side-block {
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 18px 18px 16px;
  background: white;
}
.blog-side-eyebrow {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-4);
  margin-bottom: 12px;
}
.blog-side-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.blog-side-list li { border-top: 1px solid var(--border-default); }
.blog-side-list li:first-child { border-top: 0; }
.blog-side-list a {
  display: block;
  padding: 10px 0;
  text-decoration: none;
  color: inherit;
}
.blog-side-list a:hover .blog-side-title { color: var(--gray-9); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--gray-3); }
.blog-side-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gray-5);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.blog-side-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-9);
  letter-spacing: -0.005em;
  line-height: 1.35;
  margin-top: 3px;
  transition: color 0.1s ease;
}
.blog-side-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.blog-side-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: var(--gray-0);
  border: 1px solid var(--border-default);
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-7);
  text-decoration: none;
}
.blog-side-tag:hover { background: white; border-color: var(--gray-3); color: var(--gray-9); }
.blog-side-tag span {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--gray-4);
}

/* ═══════════════════════════════════════════════════════════════
   NEWSLETTER CTA
   ═══════════════════════════════════════════════════════════════ */
.blog-newsletter-cta {
  padding: 64px 24px;
}
.blog-newsletter-inner {
  max-width: 720px;
  margin: 0 auto;
  background: var(--gray-0);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 48px 40px;
  text-align: center;
}
.blog-newsletter-icon {
  width: 40px; height: 40px;
  margin: 0 auto 16px;
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 50%;
  display: flex;
  align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--gray-9);
}
.blog-newsletter-eyebrow {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-4);
  margin-bottom: 10px;
}
.blog-newsletter-title {
  font-size: 32px;
  font-weight: 950;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--gray-9);
  margin: 0 0 10px;
  text-wrap: balance;
}
.blog-newsletter-sub {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-6);
  line-height: 1.55;
  margin: 0 0 24px;
}
.blog-newsletter-widget { max-width: 460px; margin: 0 auto; }

/* ═══════════════════════════════════════════════════════════════
   FOOTER (4 cols)
   ═══════════════════════════════════════════════════════════════ */
.blog-footer {
  border-top: 1px solid var(--border-default);
  background: white;
  padding: 56px 24px 32px;
}
.blog-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.blog-footer-col h5 {
  margin: 0 0 14px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-9);
}
.blog-footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-6);
  text-decoration: none;
}
.blog-footer-col a:hover { color: var(--gray-9); }
.blog-footer-brand .blog-footer-name {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--gray-9);
  margin-bottom: 12px;
}
.blog-footer-brand p {
  font-size: 13px;
  color: var(--gray-6);
  line-height: 1.6;
  font-weight: 500;
  max-width: 280px;
  margin: 0;
}
.blog-footer-bottom {
  max-width: 1100px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-default);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-5);
  display: flex;
  justify-content: center;
}
.blog-footer-bottom a {
  color: var(--gray-7);
  text-decoration: none;
  font-weight: 700;
  margin-left: 4px;
}
.blog-footer-bottom a:hover { color: var(--gray-9); }
.blog-footer-bottom .mark {
  font-weight: 900;
  letter-spacing: -0.04em;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .bc-grid { grid-template-columns: 1fr 1fr; }
  .bl-layout { grid-template-columns: 1fr; gap: 40px; }
  .bl-sidebar { position: static; }
  .blog-hero { aspect-ratio: 4 / 3; }
  .blog-hero-title { font-size: 36px; }
  .blog-hero-body { padding: 28px; max-width: 100%; }
  .blog-article-title { font-size: 40px; }
  .blog-footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .bps-tag-grid { grid-template-columns: 1fr 1fr; }

  /* Article: sidebar dives below content on smaller screens. */
  .blog-main-article { grid-template-columns: minmax(0, 720px); max-width: 720px; gap: 32px; }
  .blog-sidebar { position: static; }
}

@media (max-width: 640px) {
  .blog-shell { padding: 24px 20px 48px; }
  .blog-nav-inner { padding: 14px 20px; gap: 16px; }
  .blog-nav-links { gap: 14px; }
  .blog-nav-link { font-size: 10px; letter-spacing: 0.10em; }
  .blog-nav-drop-menu { left: 0; transform: none; }

  .blog-hero { aspect-ratio: 3 / 4; border-radius: 8px; margin-bottom: 40px; }
  .blog-hero-body { padding: 20px; }
  .blog-hero-title { font-size: 26px; letter-spacing: -0.03em; }
  .blog-hero-excerpt { font-size: 14px; -webkit-line-clamp: 3; }
  .blog-hero-meta { gap: 10px; font-size: 11px; }

  .bc-grid { grid-template-columns: 1fr; gap: 16px; }

  .bl-row { grid-template-columns: 116px 1fr; gap: 14px; padding: 18px 0; }
  .bl-row:hover { padding-left: 0; }
  .bl-cover { width: 116px; aspect-ratio: 16 / 9; }
  .bl-title { font-size: 16px; }
  .bl-excerpt { -webkit-line-clamp: 1; }

  .blog-section-title { font-size: 22px; }
  .blog-page-title { font-size: 36px; }
  .blog-article-title { font-size: 32px; letter-spacing: -0.03em; }
  .blog-article-body { font-size: 17px; }
  .blog-article-body h1 { font-size: 26px; }
  .blog-article-body h2 { font-size: 22px; }
  .blog-article-body h3 { font-size: 18px; }
  .blog-article-cover-wrap { margin-left: -20px; margin-right: -20px; width: calc(100% + 40px); border-radius: 0; }

  .blog-newsletter-inner { padding: 32px 24px; }
  .blog-newsletter-title { font-size: 24px; }
  .blog-related { padding: 40px 20px; }

  .blog-footer { padding: 40px 20px 24px; }
  .blog-footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .blog-footer-bottom { flex-direction: column; text-align: center; gap: 4px; }

  /* Search refinements for mobile */
  .bps-head { padding: 32px 0 24px; }
  .bps-title { font-size: 22px; }
  .bps-form { padding: 4px 4px 4px 12px; border-radius: 8px; }
  .bps-form input[type="search"] { font-size: 14px; padding: 10px 10px; }
  .bps-form-submit { padding: 8px 14px; font-size: 11px; }
  .bps-tag-grid { grid-template-columns: 1fr; }
  .bps-tag-card { padding: 14px 16px; flex-direction: row; align-items: center; justify-content: space-between; }
  .bps-noresults { padding: 48px 20px; }
  .bps-noresults-title { font-size: 18px; }
}

/* ─── Language switcher (only renders when blog has >1 active locale) ──
   Native <details> popover. Floating top-right under the site nav so it
   doesn't compete with the page hero/header. Closes on outside click via
   small inline JS attached at body level (see blog-public.js). */
.blog-lang-switch {
  position: fixed;
  top: 78px;
  right: 24px;
  z-index: 20;
}
.blog-lang-switch > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 12px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  font-size: 12.5px;
  font-weight: 700;
  color: #34322D;
  cursor: pointer;
  user-select: none;
  transition: box-shadow 0.15s ease;
}
.blog-lang-switch > summary::-webkit-details-marker { display: none; }
.blog-lang-switch > summary:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.blog-lang-switch > summary svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}
.blog-lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.blog-lang-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #34322D;
  text-decoration: none;
  transition: background 0.1s ease;
}
.blog-lang-menu a:hover {
  background: rgba(0, 0, 0, 0.04);
}
.blog-lang-menu-code {
  display: inline-block;
  min-width: 22px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
}
@media (max-width: 720px) {
  .blog-lang-switch { top: 64px; right: 12px; }
  .blog-lang-switch > summary { padding: 5px 8px 5px 10px; font-size: 11.5px; }
}
