/* Blog, páginas legais e 404 — SeparaFaturas. Folha leve e partilhada (as páginas
   são renderizadas no servidor por app/seo.py). Mesma identidade da landing:
   Space Grotesk / IBM Plex Sans / IBM Plex Mono, teal #1C6B58, menta #8BE6C0. */
:root {
  --bg: #FBFAF6; --paper: #F3F1EA; --white: #FFFFFF; --ink: #191A17; --muted: #55574F;
  --faint: #8B8D83; --line: #E7E4DA; --line-2: #EEEBE2; --teal: #1C6B58; --teal-dark: #144E40;
  --teal-soft: #E6F0EC; --teal-border: #D2E6DE; --mint: #8BE6C0; --amber-bg: #FDF3DC;
  --amber: #8A5A00; --dark: #16201C; --dark-border: #2C3D36; --nav-h: 60px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.bp {
  margin: 0; background: var(--bg); color: var(--ink); overflow-x: clip;
  font: 400 17px/1.7 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.bp a { color: var(--teal); }
.bp a:hover { color: var(--teal-dark); }
.bp :focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.bp code, .bp kbd { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.bp-wrap { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.bp-narrow { max-width: 776px; }
.bp-skip {
  position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--white);
  color: var(--ink); padding: 10px 14px; border-radius: 10px; font-weight: 600;
}
.bp-skip:focus { top: 12px; }

/* --- nav --- */
.bp-nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(251,250,246,.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid #EAE7DD;
}
.bp-nav-in { height: 100%; display: flex; align-items: center; gap: 22px; }
.bp-brand, .bp-footer-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.bp .brand-mark { width: 32px; height: 32px; flex: none; display: block; }
.bp-wordmark {
  font: 700 17px/1 'Space Grotesk', sans-serif; letter-spacing: -.02em; white-space: nowrap; color: var(--ink);
}
.bp-wordmark span { color: var(--teal); }
.bp-wordmark.on-dark { color: #FFFFFF; }
.bp-wordmark.on-dark span { color: var(--mint); }
.bp-nav-links { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.bp-nav-links a { font-size: 14px; font-weight: 500; color: #5C5E56; text-decoration: none; }
.bp-nav-links a:hover { color: var(--teal); }
.bp .bp-nav-cta {
  font-size: 14px; font-weight: 600; color: #fff; background: var(--teal); text-decoration: none;
  padding: 9px 17px; border-radius: 9px;
}
.bp .bp-nav-cta:hover { background: var(--teal-dark); color: #fff; }
/* Com sessão iniciada (account-nav.js): a conta em vez de "Entrar". */
.bp .bp-nav-cta.is-account {
  display: inline-flex; align-items: center; gap: 8px; max-width: 240px;
  color: var(--ink); background: var(--white); border: 1px solid var(--line);
  padding: 5px 12px 5px 5px; font-weight: 500;
}
.bp .bp-nav-cta.is-account:hover { background: var(--paper); color: var(--teal); }
.bp-nav-cta .acct-av {
  flex: none; width: 26px; height: 26px; border-radius: 7px; display: inline-flex;
  align-items: center; justify-content: center; background: var(--teal); color: #fff;
  font-size: 13px; font-weight: 600;
}
.bp-nav-cta .acct-email { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) {
  .bp .bp-nav-cta.is-account { padding: 5px; }
  .bp-nav-cta .acct-email { display: none; }
}

/* --- conteúdo --- */
.bp-main { padding: 28px 0 80px; }
.bp-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 28px; font-size: 13.5px; color: var(--faint); }
.bp-crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--faint); }
.bp-crumbs a { color: var(--muted); text-decoration: none; }
.bp-crumbs a:hover { color: var(--teal); text-decoration: underline; }
.bp-crumbs [aria-current] { color: var(--ink); overflow-wrap: anywhere; }
.bp-eyebrow { font: 500 12px/1 'IBM Plex Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin: 0 0 14px; }
.bp-head h1 {
  font: 700 42px/1.12 'Space Grotesk', sans-serif; letter-spacing: -.025em; margin: 0; text-wrap: balance;
}
.bp-lead { font-size: 19px; line-height: 1.6; color: var(--muted); margin: 18px 0 0; }
.bp-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 18px 0 0; font-size: 14px; color: var(--faint); }
.bp-author { color: var(--ink); font-weight: 600; }
.bp-banner {
  margin: 0 0 22px; padding: 12px 16px; border-radius: 12px; font-size: 15px;
  background: var(--amber-bg); color: var(--amber); border: 1px solid #F1D9A6;
}
.bp-fig { margin: 32px 0; }
.bp-fig img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); }
.bp-fig figcaption { margin-top: 10px; font-size: 14px; color: var(--faint); text-align: center; }
.bp-cover { margin: 30px 0 8px; }
/* A caixa "Imagem por gerar" (admin/preview) traz o seu próprio <style> (seo.SLOT_TODO_CSS). */

.bp-prose { margin-top: 34px; }
.bp-prose > :first-child { margin-top: 0; }
.bp-prose h2 { font: 700 28px/1.2 'Space Grotesk', sans-serif; letter-spacing: -.018em; margin: 44px 0 0; scroll-margin-top: calc(var(--nav-h) + 16px); text-wrap: balance; }
.bp-prose h3 { font: 600 21px/1.3 'Space Grotesk', sans-serif; letter-spacing: -.01em; margin: 30px 0 0; }
.bp-prose p, .bp-prose ul, .bp-prose ol, .bp-prose blockquote, .bp-prose .bp-table { margin: 16px 0 0; }
.bp-prose ul, .bp-prose ol { padding-left: 1.4em; }
.bp-prose li + li { margin-top: 6px; }
.bp-prose strong { font-weight: 600; }
.bp-prose code { font-size: .86em; color: var(--teal-dark); background: var(--teal-soft); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.bp-prose blockquote { border-left: 3px solid var(--teal); padding: 4px 0 4px 18px; color: var(--muted); }
.bp-prose blockquote p:first-child { margin-top: 0; }
.bp-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bp-prose table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
.bp-prose th, .bp-prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.bp-prose th { font-weight: 600; background: var(--paper); }
.bp-prose td code, .bp-prose th code { white-space: nowrap; overflow-wrap: normal; }

.bp-faq { margin-top: 48px; padding-top: 8px; border-top: 1px solid var(--line); }
.bp-faq h2 { font: 700 26px/1.2 'Space Grotesk', sans-serif; margin: 30px 0 0; }
.bp-faq-i h3 { font: 600 18px/1.35 'Space Grotesk', sans-serif; margin: 24px 0 0; }
.bp-faq-i p { margin: 8px 0 0; color: var(--muted); }

.bp-cta {
  margin: 56px 0 0; padding: 28px; border-radius: 18px; background: var(--teal-soft);
  border: 1px solid var(--teal-border);
}
.bp-cta .bp-cta-t { font: 700 23px/1.25 'Space Grotesk', sans-serif; margin: 0; color: var(--ink); }
.bp-cta p { margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.bp .bp-btn {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 18px; text-decoration: none;
  font: 600 15px/1.2 'IBM Plex Sans', sans-serif; color: #fff; background: var(--teal);
  padding: 13px 20px; border-radius: 12px; border: 1px solid transparent;
}
.bp .bp-btn:hover { background: var(--teal-dark); color: #fff; }
.bp .bp-btn-ghost { background: var(--white); color: var(--ink); border-color: #E4E1D6; }
.bp .bp-btn-ghost:hover { background: var(--white); color: var(--teal); border-color: var(--teal); }

.bp-related { margin-top: 56px; }
.bp-related h2, .bp-404-h2 { font: 700 24px/1.2 'Space Grotesk', sans-serif; margin: 0; }
/* --- índice do blog: destaque + grelha de cartões com capa --- */
.bp-index .bp-head { max-width: 720px; }
.bp-posts { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bp-posts-featured { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
/* Cartão inteiro clicável com UM só link (o do título, esticado por ::after). */
.bp-post, .bp-mini {
  position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.bp-post { display: flex; flex-direction: column; overflow: hidden; }
.bp-post:hover, .bp-mini:hover { border-color: var(--teal-border); box-shadow: 0 14px 34px -22px rgba(22, 32, 28, .45); }
.bp-post-img, .bp-mini-img { aspect-ratio: 1200 / 630; overflow: hidden; background: var(--paper); }
.bp-post-img { border-bottom: 1px solid var(--line-2); }
.bp-post-img img, .bp-mini-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.bp-post:hover .bp-post-img img, .bp-mini:hover .bp-mini-img img { transform: scale(1.03); }
.bp-post-body { flex: 1; display: flex; flex-direction: column; padding: 20px 22px 22px; }
.bp-post-m { order: -1; margin: 0 0 10px; font: 500 12.5px/1.7 'IBM Plex Mono', monospace; color: var(--faint); }
.bp-post-m time, .bp-mini-m time, .bp-rt { white-space: nowrap; }
.bp-post-tag {
  display: inline-block; vertical-align: 1px; margin-right: 10px; padding: 4px 8px; border-radius: 6px; background: var(--teal-soft); color: var(--teal-dark);
  font: 500 11px/1 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase;
}
.bp-post-t { font: 600 19px/1.3 'Space Grotesk', sans-serif; letter-spacing: -.012em; margin: 0; text-wrap: balance; }
.bp-post-t a, .bp-mini-t a { color: var(--ink); text-decoration: none; }
.bp-post-t a::after, .bp-mini-t a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 16px; }
.bp-post:hover .bp-post-t a, .bp-mini:hover .bp-mini-t a { color: var(--teal); }
.bp .bp-post-t a:focus-visible, .bp .bp-mini-t a:focus-visible { outline: none; }
.bp-post-t a:focus-visible::after, .bp-mini-t a:focus-visible::after { outline: 2px solid var(--teal); outline-offset: -2px; }
.bp-post-d { margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.bp-post-more { margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; color: var(--teal); }
.bp-post-more svg { transition: transform .18s ease; }
.bp-post:hover .bp-post-more svg { transform: translateX(3px); }
@media (min-width: 901px) {
  .bp-post.is-featured { flex-direction: row; }
  .bp-post.is-featured .bp-post-img { flex: 0 0 57%; border-bottom: 0; border-right: 1px solid var(--line-2); }
  .bp-post.is-featured .bp-post-body { justify-content: center; padding: 36px 40px; }
  .bp-post.is-featured .bp-post-t { font-size: 31px; line-height: 1.14; letter-spacing: -.022em; }
  .bp-post.is-featured .bp-post-d { font-size: 16.5px; margin-top: 14px; }
  .bp-post.is-featured .bp-post-more { margin-top: 0; padding-top: 22px; }
}
.bp-post.is-featured.no-img .bp-post-body { padding: 32px 36px; }
.bp-index-cta .bp-cta { margin-top: 64px; }
@media (min-width: 901px) {
  .bp-index-cta .bp-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 40px; align-items: center; padding: 30px 36px; }
  .bp-index-cta .bp-cta > :not(.bp-btn) { grid-column: 1; max-width: 66ch; }
  .bp-index-cta .bp-btn { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; white-space: nowrap; }
}

/* --- cartões compactos (relacionados, 404) --- */
.bp-minis { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.bp-mini { display: flex; align-items: center; gap: 18px; padding: 12px; }
.bp-mini-img { flex: 0 0 176px; border-radius: 10px; border: 1px solid var(--line-2); }
.bp-mini-body { min-width: 0; padding: 2px 8px 2px 0; }
.bp-mini.no-img { padding: 18px 20px; }
.bp-mini-t { font: 600 17.5px/1.3 'Space Grotesk', sans-serif; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.bp-mini-d {
  margin: 5px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bp-mini-m { margin: 7px 0 0; font: 500 12px/1.4 'IBM Plex Mono', monospace; color: var(--faint); }
.bp-empty { margin-top: 32px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .bp-post-img img, .bp-mini-img img, .bp-post-more svg { transition: none; }
  .bp-post:hover .bp-post-img img, .bp-mini:hover .bp-mini-img img, .bp-post:hover .bp-post-more svg { transform: none; }
}
.bp-back { margin-top: 40px; font-size: 15px; }
.bp-404-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 44px; }

/* --- footer --- */
.bp-footer { background: var(--dark); color: #9DB6AD; }
.bp-footer :focus-visible { outline-color: var(--mint); }
.bp-footer-in { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; padding-top: 34px; padding-bottom: 34px; }
.bp-footer-brand .brand-mark { width: 28px; height: 28px; }
.bp-footer-brand .bp-wordmark { font-size: 16px; }
.bp-footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
.bp .bp-footer-links a, .bp .bp-footer-legal a { font-size: 13.5px; color: #B4C4BD; text-decoration: none; }
.bp .bp-footer-links a:hover, .bp .bp-footer-legal a:hover { color: var(--mint); }
.bp .bp-footer-links a.go { color: var(--mint); font-weight: 600; }
.bp-footer-legal { flex-basis: 100%; margin: 0; font-size: 13px; color: #6E8981; }
.bp-footer-note { flex-basis: 100%; margin: 0; font: 400 12px/1.6 'IBM Plex Mono', monospace; color: #6E8981; padding-top: 18px; border-top: 1px solid var(--dark-border); }
.bp .bp-footer-note a { color: #B4C4BD; text-decoration: none; }
.bp .bp-footer-note a:hover { color: var(--mint); }

@media (max-width: 900px) {
  .bp-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .bp-posts-featured { grid-template-columns: minmax(0, 1fr); }
  .bp-post.is-featured .bp-post-t { font-size: 24px; line-height: 1.2; }
}
@media (max-width: 720px) {
  body.bp { font-size: 16.5px; }
  .bp-head h1 { font-size: 32px; }
  .bp-lead { font-size: 17px; }
  .bp-prose h2 { font-size: 24px; }
  .bp-prose h3 { font-size: 19px; }
  .bp-cta { padding: 22px 18px; }
  .bp-footer-links { margin-left: 0; }
}
@media (max-width: 640px) {
  .bp-wrap { padding-left: 16px; padding-right: 16px; }
  .bp-nav-in { gap: 14px; }
  .bp-hide-sm { display: none; }
  .bp-main { padding-top: 20px; }
  .bp-posts { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .bp-posts-featured { margin-top: 28px; }
  .bp-post-body, .bp-post.is-featured.no-img .bp-post-body { padding: 16px 18px 18px; }
  .bp-post.is-featured .bp-post-t { font-size: 22px; }
  .bp-index-cta .bp-cta { margin-top: 48px; }
  .bp-mini { gap: 14px; padding: 10px; align-items: flex-start; }
  .bp-mini-img { flex-basis: 112px; border-radius: 8px; }
  .bp-mini-body { padding: 0; }
  .bp-mini-t { font-size: 16px; }
  .bp-mini-d { display: none; }
  .bp-mini-m { margin-top: 5px; }
}
@media (max-width: 380px) {
  .bp-wordmark { font-size: 16px; }
  .bp .bp-brand .brand-mark { width: 30px; height: 30px; }
  .bp .bp-nav-cta { padding: 9px 13px; }
}
