/* ============================================
   pousio — design tokens
   Paleta extraída do logo: cream + warm umber
============================================ */
:root {
  --bg: #efe6d2;          /* fundo do logo */
  --bg-soft: #e6dcc4;
  --bg-card: #f7f0de;
  --ink: #4a2f1f;         /* umber escuro do logo */
  --ink-soft: #6e4a32;
  --ink-mute: #9b7f63;
  --line: #d9cbb0;
  --accent: #8a5a3a;      /* tom intermediário do logo */
  --accent-deep: #4a2f1f;
  --warm: #b9794d;        /* destaque quente sutil */
  --shadow-sm: 0 1px 2px rgba(74, 47, 31, 0.05), 0 2px 8px rgba(74, 47, 31, 0.05);
  --shadow-md: 0 4px 14px rgba(74, 47, 31, 0.07), 0 12px 32px rgba(74, 47, 31, 0.07);
  --radius-sm: 6px;
  --radius: 14px;
  --radius-lg: 22px;
  --serif: "Cormorant Garamond", "Georgia", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 1180px;
  --t: 220ms cubic-bezier(.4,.0,.2,1);
}

/* ============================================
   Reset + base
============================================ */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html {
  scroll-behavior: smooth;
  /* Rede de segurança contra spill horizontal em zoom in/out */
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, iframe, svg, embed {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t);
  overflow-wrap: anywhere;   /* URLs longos não estouram */
}
a:hover { color: var(--accent-deep); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  max-width: 100%;
}
textarea { resize: vertical; }

/* Quebra de palavras longas em qualquer texto editorial */
h1, h2, h3, h4, p, li, blockquote { overflow-wrap: anywhere; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 28px);
}

/* ============================================
   Header
============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(239, 230, 210, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px clamp(4px, 1.5vw, 8px) 12px 0;
  /* respiro extra à direita para o último link da navegação */
}
.site-nav { padding-right: 2px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  /* Logo já vem com o fundo cream — usamos blend mode para fundir com qualquer
     superfície sem mostrar bordas. Se a saída do gerador estiver com fundo,
     mix-blend-mode: multiply faz desaparecer o cream contra cream do site. */
  mix-blend-mode: multiply;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.brand-name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--ink);
  text-transform: lowercase;
}
.site-nav {
  display: flex;
  gap: clamp(14px, 3vw, 28px);
  flex-wrap: wrap;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
.nav-link.active, .nav-link:hover { color: var(--ink); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
}

/* ============================================
   Hero
============================================ */
.hero {
  padding: clamp(48px, 9vw, 96px) 0 clamp(40px, 7vw, 72px);
  background:
    radial-gradient(ellipse at 80% 20%, rgba(185, 121, 77, 0.14), transparent 60%),
    radial-gradient(ellipse at 10% 80%, rgba(138, 90, 58, 0.10), transparent 55%),
    var(--bg);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
}
.hero-logo {
  width: clamp(140px, 22vw, 260px);
  flex: none;
  mix-blend-mode: multiply;
}
.hero-logo img { width: 100%; height: auto; display: block; }
.hero-text { max-width: 640px; }
@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; gap: 16px; }
  .hero-logo { width: clamp(120px, 30vw, 180px); }
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: clamp(11px, 2.5vw, 12px);
  color: var(--accent-deep);
  margin: 0 0 18px;
  font-weight: 500;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 1.05;
  margin: 0 0 24px;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.hero-title em {
  font-style: italic;
  color: var(--accent-deep);
}
.hero-lead {
  font-size: clamp(16px, 2.4vw, 18px);
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0;
}

/* ============================================
   Toolbar (busca + ordenar)
============================================ */
.main-content { padding: clamp(32px, 6vw, 56px) 0 clamp(48px, 8vw, 80px); }
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.search-wrap {
  position: relative;
  flex: 1 1 220px;
  min-width: 0;        /* permite encolher abaixo do conteúdo */
}
.search-icon {
  position: absolute;
  left: 18px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--ink-mute);
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  padding: 14px 18px 14px 48px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: border var(--t), box-shadow var(--t);
}
.search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(138, 90, 58, 0.12);
}
.sort-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sort-label {
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: 0.3px;
}
.sort-wrap select {
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

/* ============================================
   Tags bar
============================================ */
.tags-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.tag-chip {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  transition: all var(--t);
  letter-spacing: 0.2px;
}
.tag-chip:hover { background: var(--bg-soft); color: var(--ink); }
.tag-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ============================================
   Post grid (cards)
============================================ */
.post-grid {
  display: grid;
  /* min(320px, 100%) impede que o card seja maior que o container em telas <320px */
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: clamp(24px, 4vw, 36px) clamp(18px, 3vw, 28px);
}
.post-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform var(--t);
}
.post-card:hover { transform: translateY(-4px); }
.post-card:hover .post-card-cover img { transform: scale(1.04); }
.post-card-cover {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-soft);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.post-card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(.2,.7,.2,1);
}
.post-card-cover.placeholder {
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 56px;
  color: var(--ink-mute);
  background: linear-gradient(135deg, var(--bg-soft), #d9cbb0);
}
.post-card-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 10px;
}
.post-card-meta .dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--ink-mute);
}
.post-card-meta .tag-pill {
  color: var(--accent-deep);
  font-weight: 600;
}
.post-card-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 10px;
  letter-spacing: -0.2px;
}
.post-card-excerpt {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-readmore {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-deep);
  letter-spacing: 0.5px;
}

/* Featured (primeiro post) */
.post-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(20px, 4vw, 40px);
  align-items: center;
  padding: clamp(18px, 3vw, 32px);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.post-card.featured .post-card-cover {
  margin-bottom: 0;
  aspect-ratio: 5/4;
}
.post-card.featured .post-card-title { font-size: clamp(24px, 4vw, 38px); }
.post-card.featured .post-card-excerpt {
  font-size: clamp(15px, 2vw, 16px);
  -webkit-line-clamp: 4;
}
@media (max-width: 760px) {
  .post-card.featured { grid-template-columns: 1fr; }
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-mute);
  font-style: italic;
}

/* ============================================
   Post view (single post)
============================================ */
.post-view { padding: clamp(40px, 7vw, 64px) 0 clamp(48px, 8vw, 80px); }
.post-loading { text-align: center; color: var(--ink-mute); padding: 80px 0; }

.post-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}
.post-header .post-card-meta { justify-content: center; }
.post-header h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  margin: 18px 0 18px;
  letter-spacing: -0.5px;
}
.post-header .post-excerpt {
  font-size: 19px;
  color: var(--ink-soft);
  line-height: 1.6;
  font-style: italic;
}
.post-cover {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto clamp(32px, 6vw, 56px);
  aspect-ratio: 16/9;
  border-radius: clamp(12px, 2vw, var(--radius-lg));
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

.post-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: clamp(16px, 2.2vw, 18px);
  line-height: 1.8;
  color: var(--ink);
}
.post-content > * + * { margin-top: 1.1em; }
.post-content h1, .post-content h2, .post-content h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.2px;
  line-height: 1.25;
  margin-top: 1.8em;
  margin-bottom: 0.5em;
  color: var(--ink);
}
.post-content h1 { font-size: clamp(28px, 5vw, 38px); }
.post-content h2 { font-size: clamp(24px, 4vw, 30px); }
.post-content h3 { font-size: clamp(20px, 3vw, 24px); }
.post-content pre,
.post-content code,
.post-content table { max-width: 100%; overflow-x: auto; }
.post-content pre { white-space: pre-wrap; word-break: break-word; }
.post-content p { margin: 0; }
.post-content a {
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(138, 90, 58, 0.4);
  transition: border-color var(--t);
}
.post-content a:hover { border-color: var(--accent-deep); }
.post-content strong { font-weight: 600; color: var(--ink); }
.post-content em { font-style: italic; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px clamp(14px, 3vw, 24px);
  margin: 1.5em 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 3vw, 22px);
  color: var(--ink-soft);
  line-height: 1.5;
}
.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content li { margin-bottom: 0.4em; }
.post-content img {
  border-radius: var(--radius);
  margin: 1.5em 0;
  width: 100%;
}
.post-content code {
  background: var(--bg-soft);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.post-content hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.4em auto;
  width: 80px;
}

.post-tags {
  max-width: 720px;
  margin: 56px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

/* ============================================
   Like button (visível ao leitor; contagem oculta — vai pro admin)
============================================ */
.post-actions {
  max-width: 720px;
  margin: 56px auto 0;
  display: flex;
  justify-content: center;
}
.post-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 26px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all var(--t);
}
.post-like-btn:hover:not(:disabled) {
  background: var(--bg-soft);
  color: var(--ink);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.post-like-btn svg {
  flex-shrink: 0;
  transition: fill var(--t), color var(--t), transform var(--t);
}
.post-like-btn:hover svg { transform: scale(1.08); }

/* Estado curtido — coração preenchido */
.post-like-btn--liked,
.post-like-btn--liked:hover {
  background: rgba(185, 121, 77, 0.12);
  border-color: var(--warm);
  color: var(--accent-deep);
}
.post-like-btn--liked svg {
  fill: var(--warm);
  color: var(--warm);
  animation: like-pop 280ms cubic-bezier(.4, 0, .2, 1);
}
.post-like-btn:disabled { opacity: 0.6; cursor: wait; }

@keyframes like-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.related {
  background: var(--bg-soft);
  padding: clamp(48px, 8vw, 80px) 0;
  margin-top: clamp(48px, 8vw, 80px);
}
.related-title {
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 500;
  margin: 0 0 32px;
  text-align: center;
}

/* ============================================
   Newsletter
============================================ */
.newsletter {
  background: var(--ink);
  color: #f3ece1;
  padding: clamp(48px, 8vw, 80px) 0;
  text-align: center;
}
.newsletter h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  margin: 0 0 12px;
  color: #f3ead6;
}
.newsletter p {
  color: #d4c2a4;
  margin: 0 auto 28px;
  max-width: 540px;
}
.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 460px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
/* ============================================
   Newsletter form (versão completa com tags + LGPD)
============================================ */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.newsletter-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) {
  .newsletter-fields-row { grid-template-columns: 1fr; }
}

.newsletter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.newsletter-field > span {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #b9a482;
  font-weight: 500;
}
.newsletter-field input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid #5a3c28;
  background: #2e1c10;
  color: #f3ead6;
  border-radius: 10px;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.newsletter-field input:focus {
  border-color: var(--warm);
  background: #3d281a;
  box-shadow: 0 0 0 3px rgba(185, 121, 77, 0.15);
}
.newsletter-field input::placeholder { color: #6e4a32; }

/* Preferências (radios "Tudo" vs "Apenas tags") */
.newsletter-prefs {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.newsletter-prefs legend {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #b9a482;
  font-weight: 500;
  padding: 0;
  margin-bottom: 4px;
}

.newsletter-radio {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #5a3c28;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--t);
  background: rgba(46, 28, 16, 0.5);
}
.newsletter-radio:hover {
  background: #2e1c10;
  border-color: #6e4a32;
}
.newsletter-radio input[type="radio"] {
  flex-shrink: 0;
  margin-top: 3px;
  accent-color: var(--warm);
  width: 16px;
  height: 16px;
}
.newsletter-radio:has(input[type="radio"]:checked) {
  border-color: var(--warm);
  background: rgba(185, 121, 77, 0.10);
}
.newsletter-radio-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.newsletter-radio-content strong {
  font-weight: 500;
  color: #f3ead6;
  font-size: 15px;
}
.newsletter-radio-content small {
  color: #b9a482;
  font-size: 13px;
}

/* Tag picker (checkboxes) — só aparece quando radio "tags" é escolhido */
.newsletter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(46, 28, 16, 0.5);
  border: 1px solid #5a3c28;
  border-radius: 10px;
  margin-top: 4px;
}
.newsletter-tags-loading,
.newsletter-tags-empty {
  width: 100%;
  margin: 0;
  padding: 4px;
  color: #b9a482;
  font-size: 13px;
  font-style: italic;
  text-align: center;
}
.newsletter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #5a3c28;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  font-size: 13px;
  color: #d4c2a4;
  transition: all var(--t);
}
.newsletter-tag:hover { border-color: #6e4a32; color: #f3ead6; }
.newsletter-tag input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--warm);
}
.newsletter-tag:has(input[type="checkbox"]:checked) {
  background: var(--warm);
  border-color: var(--warm);
  color: #fff;
}

/* Privacy checkbox */
.newsletter-privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #d4c2a4;
  line-height: 1.5;
  cursor: pointer;
  padding: 4px 0;
}
.newsletter-privacy input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 3px;
  accent-color: var(--warm);
  width: 16px;
  height: 16px;
}
.newsletter-privacy a {
  color: var(--warm);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.newsletter-privacy a:hover { color: #d49870; }

/* Submit */
.newsletter-submit {
  align-self: stretch;
  padding: 14px 28px;
  background: var(--warm);
  color: #fff;
  font-weight: 500;
  border-radius: 999px;
  letter-spacing: 0.3px;
  font-family: inherit;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: background var(--t), transform var(--t);
}
.newsletter-submit:hover:not(:disabled) {
  background: #a96a3f;
  transform: translateY(-1px);
}
.newsletter-submit:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

/* Mensagem de feedback */
.newsletter-message {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
}
.newsletter-message--success {
  background: rgba(125, 139, 106, 0.20);
  color: #d4dcb8;
  border: 1px solid rgba(125, 139, 106, 0.4);
}
.newsletter-message--error {
  background: rgba(184, 80, 62, 0.20);
  color: #f5c5b5;
  border: 1px solid rgba(184, 80, 62, 0.5);
}

/* ============================================
   Status pages (/confirmar, /descadastrar) — card único centrado
============================================ */
.status-page {
  min-height: calc(100vh - 60px - 100px);
  display: grid;
  place-items: center;
  padding: clamp(40px, 8vw, 80px) clamp(16px, 4vw, 28px);
}
.status-card {
  max-width: 480px;
  width: 100%;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(36px, 6vw, 56px) clamp(28px, 5vw, 44px);
  box-shadow: 0 12px 40px rgba(74, 47, 31, 0.08);
}
.status-card--success {
  border-color: rgba(125, 139, 106, 0.4);
  background: linear-gradient(180deg, var(--bg-card), rgba(125, 139, 106, 0.04));
}
.status-card--error {
  border-color: rgba(184, 80, 62, 0.4);
  background: linear-gradient(180deg, var(--bg-card), rgba(184, 80, 62, 0.04));
}
.status-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-soft);
  font-size: 28px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 auto 20px;
}
.status-card--success .status-icon {
  background: rgba(125, 139, 106, 0.18);
  color: var(--accent-deep);
}
.status-card--error .status-icon {
  background: rgba(184, 80, 62, 0.18);
  color: #b8503e;
}
.status-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 500;
  margin: 0 0 12px;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.status-message {
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 28px;
  font-size: 15px;
}
.status-cta {
  display: inline-block;
  padding: 12px 28px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--t), transform var(--t);
}
.status-cta:hover { background: #2e1c10; transform: translateY(-1px); color: var(--bg); }
.status-cta--button:disabled { opacity: 0.6; cursor: wait; }
.status-back {
  display: block;
  margin-top: 16px;
  color: var(--ink-mute);
  font-size: 13px;
  text-decoration: none;
}
.status-back:hover { color: var(--ink); }
.status-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  margin-top: 8px;
}
.status-form .newsletter-field > span {
  color: var(--ink-mute);
}
.status-form .newsletter-field input {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
.status-form .newsletter-field input:focus {
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(138, 90, 58, 0.10);
}
.status-form .status-cta { margin-top: 4px; }

/* Footer separator (entre copyright e link de privacidade) */
.footer-sep {
  margin: 0 6px;
  color: var(--ink-mute);
}
.footer-bottom a {
  color: var(--ink-mute);
  text-decoration: none;
}
.footer-bottom a:hover { color: var(--ink); }

/* ============================================
   Footer
============================================ */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 60px 0 30px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-col h3, .footer-col h4 {
  font-family: var(--serif);
  font-weight: 500;
  margin: 0 0 12px;
}
.footer-col h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ink-mute);
}
.footer-col p { color: var(--ink-soft); margin: 0; }
.footer-col a {
  display: block;
  color: var(--ink-soft);
  margin-bottom: 6px;
  font-size: 14px;
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  grid-column: 1 / -1;
  text-align: center;
  margin: 40px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 13px;
}

/* ============================================
   Responsive — tablet & mobile
============================================ */

/* Tablet (≤ 1024px) — apenas ajustes de respiro */
@media (max-width: 1024px) {
  .post-grid { gap: 30px 22px; }
}

/* Tablet pequeno / phablet (≤ 768px) */
@media (max-width: 768px) {
  .header-inner { gap: 12px; min-height: 64px; }
  .brand-name { font-size: 19px; }
  .nav-link { font-size: 13px; }
  .post-card-title { font-size: 22px; }
  .post-header h1 { line-height: 1.15; }
}

/* Mobile (≤ 640px) */
@media (max-width: 640px) {
  .site-nav { gap: 14px; }
  .toolbar { gap: 10px; }
  .sort-wrap { width: 100%; justify-content: space-between; }
  .sort-wrap select { flex: 1; max-width: 220px; }
  .tags-bar { gap: 6px; }
  .tag-chip { padding: 7px 12px; font-size: 12px; }
  .post-card.featured { padding: 16px; }
  .post-card-cover { aspect-ratio: 16/10; }
  .post-tags { padding-top: 24px; }
  .footer-inner { gap: 28px; }
}

/* Mobile pequeno (≤ 380px) — segurança extra */
@media (max-width: 380px) {
  .brand-mark { width: 28px; height: 28px; font-size: 12px; }
  .brand-name { font-size: 17px; }
  .nav-link { font-size: 12px; }
  .search-wrap input { padding: 12px 16px 12px 42px; font-size: 14px; }
  .search-icon { left: 14px; }
  .post-card-title { font-size: 20px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input,
  .newsletter-form button { width: 100%; flex: none; }
}

/* Reduz movimento para quem prefere */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   Load more (paginação)
============================================ */
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}
.btn-load-more {
  padding: 14px 36px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--t);
}
.btn-load-more:hover {
  background: var(--bg-soft);
  color: var(--ink);
  border-color: var(--accent);
}

/* ============================================
   Toast (erros, avisos transitórios)
============================================ */
.page-toast {
  position: fixed;
  bottom: clamp(14px, 4vw, 28px);
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 28px);
  padding: 12px 20px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  font-size: 14px;
  z-index: 100;
  animation: toast-slide-up 240ms cubic-bezier(.4,0,.2,1);
}
.page-toast.error { background: #b8503e; color: #fff; }
.page-toast.success { background: var(--accent-deep); color: var(--bg); }
@keyframes toast-slide-up {
  from { transform: translate(-50%, 12px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* aria-busy: leve fade enquanto carrega novo conteúdo */
[aria-busy="true"] {
  opacity: 0.55;
  transition: opacity var(--t);
  pointer-events: none;
}

/* ============================================
   Embed cards (Amazon, Mercado Livre, genérico)

   Renderizados pelo backend ao detectar URL solta em linha própria
   no markdown. O HTML é controlado por nós (app/utils/embeds/render.py)
   e seguir essa estrutura:

     <a class="embed-card embed-card--amazon" href="..." rel="..." target="_blank">
       <div class="embed-card-image">
         <img src="..." alt="...">
       </div>
       <div class="embed-card-body">
         <span class="embed-card-source">AMAZON</span>
         <h3 class="embed-card-title">…</h3>
         <span class="embed-card-price">R$ 89,90</span>
         <span class="embed-card-cta">Ver na loja →</span>
         <small class="embed-card-disclosure">link de afiliado</small>
       </div>
     </a>
============================================ */

.embed-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 0;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  margin: 1.8em 0;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  /* Sobrescreve hover de <a> herdado do reset */
}
.embed-card:hover {
  color: inherit;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(74, 47, 31, 0.08);
}

.embed-card-image {
  background: var(--bg-soft);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.embed-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms cubic-bezier(.2, .7, .2, 1);
}
.embed-card:hover .embed-card-image img {
  transform: scale(1.04);
}

.embed-card-body {
  padding: clamp(18px, 3vw, 26px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.embed-card-source {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}

.embed-card-title {
  font-family: var(--serif);
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.2px;
  color: var(--ink);
  margin: 2px 0 4px;
  /* Limita a 3 linhas */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.embed-card-price {
  font-size: 16px;
  color: var(--accent-deep);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.embed-card-description {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.embed-card-cta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color var(--t);
}
.embed-card:hover .embed-card-cta {
  color: var(--accent-deep);
}

.embed-card-disclosure {
  font-size: 10px;
  color: var(--ink-mute);
  font-style: italic;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

/* Sem imagem (kind=generic, ou Amazon/ML quando o fetch da OG image falhou)
   → coluna única para o corpo não ficar espremido em 200px. */
.embed-card:not(:has(.embed-card-image)) {
  grid-template-columns: 1fr;
}

/* Mobile — empilha imagem em cima, texto embaixo */
@media (max-width: 640px) {
  .embed-card {
    grid-template-columns: 1fr;
  }
  .embed-card-image {
    aspect-ratio: 16 / 9;
  }
  .embed-card-title { font-size: 18px; }
}

/* ============================================
   Video embeds (YouTube lite-load + nativo)

   Estrutura limpa, sem caption visível. O badge no canto identifica
   a fonte e o play button grande convida ao clique. Para vídeos
   nativos, o `<video>` HTML5 é mostrado direto — os controles do
   browser dão duração, fullscreen, volume etc.

     <div class="video-embed video-embed--youtube" data-video-id="...">
       <div class="video-embed-thumb">
         <img src="..." alt="..." loading="lazy">
         <span class="video-embed-badge">YouTube</span>
         <button class="video-embed-play" aria-label="Reproduzir vídeo">
           <svg>...</svg>
         </button>
       </div>
     </div>

     <div class="video-embed video-embed--native">
       <video controls preload="none" poster="..." playsinline>
         <source src="..." type="video/mp4">
       </video>
     </div>
============================================ */

.video-embed {
  display: block;
  margin: 1.8em 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #100b08;
  border: 1px solid var(--line);
  transition: border-color var(--t), box-shadow var(--t);
}
.video-embed:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(74, 47, 31, 0.08);
}

/* --- YouTube / Vimeo (lite-load) --- */
.video-embed-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #100b08;
  overflow: hidden;
  cursor: pointer;
}

.video-embed-thumb > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms ease, filter var(--t);
}

.video-embed-thumb:hover > img {
  transform: scale(1.02);
  filter: brightness(0.88);
}

.video-embed-iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* Botão de play centralizado e VISÍVEL — círculo escuro com borda branca */
.video-embed-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(20, 14, 10, 0.65);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
  transition: background var(--t), transform var(--t), border-color var(--t);
  font-family: inherit;
  padding: 0;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.video-embed-play svg {
  width: 32px;
  height: 32px;
  margin-left: 3px; /* compensa o centro óptico do triângulo */
  display: block;
}
.video-embed-thumb:hover .video-embed-play {
  background: var(--accent);
  border-color: #fff;
  transform: translate(-50%, -50%) scale(1.08);
}

/* Badge da fonte no canto superior esquerdo */
.video-embed-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  background: rgba(20, 14, 10, 0.85);
  color: #fff;
  border-radius: 5px;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
  z-index: 3;
  pointer-events: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* --- Native (mp4 com controles do browser) --- */
.video-embed--native {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.video-embed--native > video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}

@media (max-width: 640px) {
  .video-embed-play { width: 56px; height: 56px; }
  .video-embed-play svg { width: 26px; height: 26px; }
  .video-embed-badge { font-size: 9px; padding: 4px 8px; top: 10px; left: 10px; }
}

/* ============================================
   Affiliate disclosure (final do post)
============================================ */
.post-affiliate-disclosure {
  display: block;
  margin: 3em 0 0;
  padding: 14px 20px;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.5;
}

/* Dentro do .post-content, embeds e disclosure não devem herdar
   o margin-top do `* + *` que estilizamos para parágrafos. */
.post-content > .embed-card,
.post-content > .video-embed,
.post-content > .post-affiliate-disclosure {
  margin-top: 1.8em;
}
