/* ==========================================================
   Blog pessoal — Adriano Lucas
   Layout inspirado no X/Twitter · HTML + CSS; JS só para
   carregar os artigos da API (js/posts.js)
   ========================================================== */

:root {
  --bg: #000;
  --bg-hover: #080808;
  --bg-elev: #0e0f12;
  --text: #e7e9ea;
  --muted: #71767b;
  --border: #2f3336;
  --accent: #2b7bff;
  --accent-hover: #1f66e5;
  --orange: #ff7a1a;
  --orange-hover: #f06a0a;
  --header-h: 64px;
  --like: #f91880;
  --repost: #00ba7c;
  --hover-soft: rgba(231, 233, 234, 0.1);
  --radius: 16px;
  --font: "Plus Jakarta Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;

  /* Foto de perfil e capa (em assets/img) */
  --avatar: url("../assets/img/1788632385404.jpg"), linear-gradient(135deg, #2b7bff, #0b1e4d);
  --banner: url("../assets/img/capa.jpg"), linear-gradient(120deg, #020617 0%, #0b2a6b 50%, #2b7bff 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
}
strong, b { font-weight: 600; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
ul { list-style: none; }
svg { flex-shrink: 0; width: 20px; height: 20px; }
.more svg { width: 18px; height: 18px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.muted { color: var(--muted); }
.link { color: var(--accent); }
.link:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  align-items: start;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1140px;
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 24px;
}
.logo {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -1.5px;
}
.logo span { color: var(--accent); }

.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  transition: background .2s, color .2s;
}
.nav a:hover { color: var(--text); background: var(--hover-soft); }
.nav a[aria-current="page"] { color: var(--text); background: var(--hover-soft); }
.nav svg { width: 18px; height: 18px; }

/* ---------- Coluna principal ---------- */
.main {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: clip;
  position: relative;
}

.topbar {
  position: sticky;
  top: var(--header-h);
  z-index: 10;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-title {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 60px;
  padding: 0 24px;
}
.topbar-title h1 { font-size: 20px; font-weight: 600; line-height: 1.2; }
.topbar-title small { display: block; color: var(--muted); font-size: 13px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background .2s;
}
.icon-btn:hover { background: var(--hover-soft); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Abas (CSS puro, via radio buttons) ---------- */
.tab-input { position: absolute; opacity: 0; pointer-events: none; }
.tabs { display: flex; }
.tab {
  flex: 1;
  display: flex;
  justify-content: center;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
}
.tab:hover { background: var(--hover-soft); }
.tab span { position: relative; padding: 16px 0; }

/* Suporta até 8 abas por página */
.tab-input:nth-of-type(1):checked ~ * .tab:nth-child(1),
.tab-input:nth-of-type(2):checked ~ * .tab:nth-child(2),
.tab-input:nth-of-type(3):checked ~ * .tab:nth-child(3),
.tab-input:nth-of-type(4):checked ~ * .tab:nth-child(4),
.tab-input:nth-of-type(5):checked ~ * .tab:nth-child(5),
.tab-input:nth-of-type(6):checked ~ * .tab:nth-child(6),
.tab-input:nth-of-type(7):checked ~ * .tab:nth-child(7),
.tab-input:nth-of-type(8):checked ~ * .tab:nth-child(8) {
  color: var(--text);
  font-weight: 500;
}
.tab-input:nth-of-type(1):checked ~ * .tab:nth-child(1) span::after,
.tab-input:nth-of-type(2):checked ~ * .tab:nth-child(2) span::after,
.tab-input:nth-of-type(3):checked ~ * .tab:nth-child(3) span::after,
.tab-input:nth-of-type(4):checked ~ * .tab:nth-child(4) span::after,
.tab-input:nth-of-type(5):checked ~ * .tab:nth-child(5) span::after,
.tab-input:nth-of-type(6):checked ~ * .tab:nth-child(6) span::after,
.tab-input:nth-of-type(7):checked ~ * .tab:nth-child(7) span::after,
.tab-input:nth-of-type(8):checked ~ * .tab:nth-child(8) span::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  border-radius: 4px;
  background: var(--accent);
}
.tab-input:nth-of-type(1):focus-visible ~ * .tab:nth-child(1),
.tab-input:nth-of-type(2):focus-visible ~ * .tab:nth-child(2),
.tab-input:nth-of-type(3):focus-visible ~ * .tab:nth-child(3),
.tab-input:nth-of-type(4):focus-visible ~ * .tab:nth-child(4),
.tab-input:nth-of-type(5):focus-visible ~ * .tab:nth-child(5),
.tab-input:nth-of-type(6):focus-visible ~ * .tab:nth-child(6),
.tab-input:nth-of-type(7):focus-visible ~ * .tab:nth-child(7),
.tab-input:nth-of-type(8):focus-visible ~ * .tab:nth-child(8) {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Filtro do feed: post com classe .f2 aparece na aba 2, .f3 na aba 3... */
.tab-input:nth-of-type(2):checked ~ .feed .post:not(.f2),
.tab-input:nth-of-type(3):checked ~ .feed .post:not(.f3),
.tab-input:nth-of-type(4):checked ~ .feed .post:not(.f4),
.tab-input:nth-of-type(5):checked ~ .feed .post:not(.f5),
.tab-input:nth-of-type(6):checked ~ .feed .post:not(.f6),
.tab-input:nth-of-type(7):checked ~ .feed .post:not(.f7),
.tab-input:nth-of-type(8):checked ~ .feed .post:not(.f8) { display: none; }

/* Painéis: um painel por aba */
.panel { display: none; }
.tab-input:nth-of-type(1):checked ~ .panels > .panel:nth-child(1),
.tab-input:nth-of-type(2):checked ~ .panels > .panel:nth-child(2),
.tab-input:nth-of-type(3):checked ~ .panels > .panel:nth-child(3),
.tab-input:nth-of-type(4):checked ~ .panels > .panel:nth-child(4),
.tab-input:nth-of-type(5):checked ~ .panels > .panel:nth-child(5),
.tab-input:nth-of-type(6):checked ~ .panels > .panel:nth-child(6),
.tab-input:nth-of-type(7):checked ~ .panels > .panel:nth-child(7),
.tab-input:nth-of-type(8):checked ~ .panels > .panel:nth-child(8) { display: block; }

/* ---------- Carrossel de abas (setas em CSS puro) ---------- */
.tabs-carousel { position: relative; }
.tabs-scroll {
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* folga no fim: a última aba nunca fica embaixo da seta */
  padding: 0 60px 0 8px;
}
.tabs-scroll::-webkit-scrollbar { display: none; }
.tabs-scroll .tab {
  flex: 0 0 auto;
  padding: 0 18px;
  white-space: nowrap;
}

/* Setas nativas (Chrome/Edge 135+) */
.tabs-scroll::scroll-button(*) {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 18px 14px var(--bg);
  transition: color .2s, border-color .2s, opacity .2s;
}
.tabs-scroll::scroll-button(*):hover { color: var(--accent); border-color: var(--accent); }
.tabs-scroll::scroll-button(left):disabled,
.tabs-scroll::scroll-button(right):disabled { opacity: 0; pointer-events: none; }
.tabs-scroll::scroll-button(left) { content: "‹" / "Categorias anteriores"; left: 8px; }
.tabs-scroll::scroll-button(right) { content: "›" / "Mais categorias"; right: 8px; }

/* Navegadores sem setas nativas: arrastar + esmaecer a borda */
@supports not selector(::scroll-button(*)) {
  .tabs-scroll {
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
}

/* ---------- Avatares ---------- */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--avatar);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.avatar-sm { width: 24px; height: 24px; }
.avatar-xl {
  width: 134px;
  height: 134px;
  border: 4px solid var(--bg);
}

.verified { width: 18px; height: 18px; }
.verified circle { fill: var(--accent); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, opacity .2s;
}
.btn-light { background: var(--text); color: #0f1419; }
.btn-light:hover { background: #d7dbdc; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-hover); }
.btn-outline { background: transparent; border: 1px solid #536471; color: var(--text); }
.btn-outline:hover { background: var(--hover-soft); }
.btn-lg { height: 44px; padding: 0 24px; font-size: 16px; }

/* ---------- Caixa "compose" (inscrição rápida) ---------- */
.compose {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.compose-body { flex: 1; min-width: 0; }
.compose-input {
  width: 100%;
  padding: 10px 0 14px;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 20px;
}
.compose-input::placeholder { color: var(--muted); }
.compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.compose-tools { display: flex; gap: 4px; color: var(--accent); }
.compose-tools span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
}
.compose-tools svg { width: 20px; height: 20px; }

.show-more {
  display: block;
  padding: 16px;
  text-align: center;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  transition: background .2s;
}
.show-more:hover { background: var(--bg-hover); }

/* ---------- Intro (home) ---------- */
.intro { border-bottom: 1px solid var(--border); }
.intro-banner {
  height: 120px;
  background: var(--banner);
  background-size: cover;
  background-position: center;
}
.intro-body { padding: 0 24px 24px; }
.avatar-intro {
  width: 96px;
  height: 96px;
  margin-top: -48px;
  border: 4px solid var(--bg);
}
.intro h1 { margin: 12px 0 6px; font-size: 30px; font-weight: 600; line-height: 1.15; letter-spacing: -.5px; }
.intro p { color: #c4c7c9; font-size: 17px; max-width: 520px; }
.intro-socials { display: flex; gap: 8px; }
.intro-socials .social-icon { width: 36px; height: 36px; transition: transform .2s; }
.intro-socials .social-icon:hover { transform: translateY(-2px); }
.intro-socials svg { width: 18px; height: 18px; }

/* ---------- Posts ---------- */
.post {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  transition: background .2s;
}
.post:hover { background: var(--bg-hover); }
.post-body { flex: 1; min-width: 0; }
.post-context {
  display: flex; align-items: center; gap: 12px;
  margin: -4px 0 4px 28px;
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.post-context svg { width: 16px; height: 16px; }
.post-head {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  white-space: nowrap;
}
.post-head .name { color: var(--text); font-weight: 600; }
.post-head .name:hover { text-decoration: underline; }
.post-head .handle { overflow: hidden; text-overflow: ellipsis; }
.post-head .more { margin-left: auto; color: var(--muted); }
.post-text { margin-top: 2px; overflow-wrap: anywhere; }
.post-text p + p { margin-top: 12px; }
.post-text a, .hashtag { color: var(--accent); }

/* Link "esticado": post inteiro clicável */
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.post .name, .post .more, .post-actions, .share-btn, .post-text a, .post-card { position: relative; z-index: 2; }

/* Card de artigo (estilo link preview) */
.post-card {
  display: block;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: background .2s;
}
.post-card:hover { background: rgba(255, 255, 255, .03); }
.cover-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: var(--bg-elev);
}
.card-info { padding: 14px 16px; border-top: 1px solid var(--border); }
.card-info small { color: var(--muted); display: block; }
.card-info strong { display: block; margin: 2px 0; }
.card-info p { color: var(--muted); }

/* Ações do post */
.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}
.action { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; transition: color .2s; }
.action svg { width: 18px; height: 18px; }
.action.like:hover { color: var(--like); }

/* ---------- Sidebar direita ---------- */
.aside { min-width: 0; }
.aside::-webkit-scrollbar { display: none; }

.search { padding: 0; }
.search label {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}
.search label:focus-within { border-color: var(--accent); color: var(--accent); }
.search svg { width: 18px; height: 18px; }
.search input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--text); }
.search input::placeholder { color: var(--muted); }

.card {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-elev);
  overflow: hidden;
}
.card > h2 { padding: 12px 16px; font-size: 20px; font-weight: 600; }
.card-pad { padding: 12px 16px 16px; }
.card-pad h2 { font-size: 20px; font-weight: 600; }
.card-pad p { margin: 6px 0 12px; }

.trend {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  transition: background .2s;
}
.trend:hover { background: rgba(255, 255, 255, .03); }
.trend-info { flex: 1; min-width: 0; }
.trend small { display: block; color: var(--muted); font-size: 13px; }
.trend strong { display: block; margin: 2px 0; }
.trend-num {
  font-size: 22px;
  font-weight: 600;
  color: var(--border);
  min-width: 28px;
}
.trend:hover .trend-num { color: var(--accent); }

.card-more {
  display: block;
  padding: 16px;
  color: var(--accent);
  transition: background .2s;
}
.card-more:hover { background: rgba(255, 255, 255, .03); }

.follow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  transition: background .2s;
}
.follow:hover { background: rgba(255, 255, 255, .03); }
.follow-info { flex: 1; min-width: 0; line-height: 1.3; }
.follow-info strong { display: flex; align-items: center; gap: 4px; }
.follow-info span { color: var(--muted); }
.follow-info p { margin-top: 4px; }

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  flex-shrink: 0;
}
.social-icon svg { width: 20px; height: 20px; }
.social-icon.lg { width: 48px; height: 48px; }
.social-icon.lg svg { width: 24px; height: 24px; }
/* Todos os ícones de redes com a mesma cor */
.social-icon {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  transition: color .2s, border-color .2s, background .2s;
}
.follow:hover .social-icon,
a.social-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 13px;
}
.footer-links a:hover { text-decoration: underline; }

/* ---------- Perfil (Sobre) ---------- */
.banner {
  aspect-ratio: 3 / 1;
  background: var(--banner);
  background-size: cover;
  background-position: center;
}
.profile { padding: 12px 24px 0; }
.profile-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.profile-top .avatar-xl { margin-top: -80px; }
.profile-name {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 20px;
  font-weight: 600;
}
.profile-name .verified { width: 20px; height: 20px; }
.profile .handle { color: var(--muted); }
.bio { margin-top: 12px; }
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 12px;
  color: var(--muted);
}
.meta span, .meta a { display: inline-flex; align-items: center; gap: 4px; }
.meta a { color: var(--accent); }
.meta svg { width: 18px; height: 18px; }
.stats { display: flex; gap: 20px; margin: 12px 0 4px; color: var(--muted); }
.stats strong { color: var(--text); }
.profile + .tabs,
.profile ~ .tabs { border-bottom: 1px solid var(--border); margin-top: 8px; }

.section { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.section h2 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.section p + p { margin-top: 12px; }

.timeline { position: relative; }
.timeline li {
  position: relative;
  padding: 0 0 20px 28px;
}
.timeline li::before {
  content: "";
  position: absolute; left: 5px; top: 6px; bottom: -6px;
  width: 2px; background: var(--border);
}
.timeline li:last-child::before { display: none; }
.timeline li::after {
  content: "";
  position: absolute; left: 0; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.timeline strong { display: block; }
.timeline small { color: var(--muted); }
.timeline p { margin-top: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Artigo ---------- */
.article { padding: 20px 24px 0; }
.article-author { display: flex; align-items: center; gap: 12px; }
.article-author .follow-info { line-height: 1.3; }
.article h1 {
  margin: 16px 0 8px;
  font-size: 31px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.3px;
}
.article .lead { font-size: 18px; color: var(--muted); }
.article-cover { margin: 16px 0 20px; border-radius: var(--radius); border: 1px solid var(--border); }
.prose { font-size: 18px; line-height: 1.7; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { font-size: 23px; font-weight: 600; margin: 1.6em 0 .5em; line-height: 1.25; }
.prose ul, .prose ol { margin: 0 0 1.1em 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose blockquote {
  margin: 0 0 1.1em;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--accent);
  color: #c4c7c9;
  font-style: italic;
}
.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-elev);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .9em;
}
.prose a { color: var(--accent); }
.prose a:hover { text-decoration: underline; }

.article-meta {
  padding: 16px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.article-meta strong { color: var(--text); }
.article-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.article-actions .action svg { width: 22px; height: 22px; }

/* Compartilhar nas redes */
.share { display: flex; align-items: center; gap: 2px; }
.share-label { margin-right: 8px; font-size: 13px; color: var(--muted); }
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.share-btn svg { width: 17px; height: 17px; }
.share-btn:hover { color: var(--accent); background: rgba(43, 123, 255, .14); }

/* ---------- Formulário de inscrição ---------- */
.subscribe {
  display: flex;
  gap: 8px;
  max-width: 440px;
  margin: 24px auto 12px;
}
.subscribe input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  outline: 0;
}
.subscribe input:focus { border-color: var(--accent); }
.subscribe input::placeholder { color: var(--muted); }

/* ---------- Responsivo ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
  /* a coluna da direita desce para baixo do conteúdo */
  .aside .search { display: none; }
  .aside > .card:first-of-type { margin-top: 0; }
}

@media (max-width: 700px) {
  :root { --header-h: 56px; }
  .layout { padding: 0 0 32px; gap: 24px; }
  .main { border: 0; border-radius: 0; border-bottom: 1px solid var(--border); }
  .aside { padding: 0 16px; }
  .header-inner { padding: 0 16px; }
  /* backdrop-filter no header prenderia o painel fixo dentro dele */
  .site-header { background: #000; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .subscribe input { flex: none; width: 100%; height: 48px; }
  .post, .section, .intro-body { padding-left: 16px; padding-right: 16px; }
  .topbar-title, .profile, .article { padding-left: 16px; padding-right: 16px; }
  .subscribe { flex-direction: column; }
  .avatar-xl { width: 96px; height: 96px; }
  .profile-top .avatar-xl { margin-top: -56px; }
  .share-btn { width: 36px; height: 36px; }
  .post-actions { gap: 8px; }
}

/* ---------- Tipografia de destaque ---------- */
.logo,
.intro h1,
.article h1,
.profile-name,
.topbar-title h1,
.section h2,
.card > h2,
.card-pad h2,
.prose h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
}
.logo { font-size: 32px; }
.intro h1 { font-size: 42px; line-height: 1.05; }
@media (max-width: 700px) { .intro h1, .article h1 { font-size: 34px; } }
.article h1 { font-size: 44px; line-height: 1.05; }
.profile-name { font-size: 30px; }
.topbar-title h1 { font-size: 26px; }
.section h2, .card > h2, .card-pad h2 { font-size: 26px; }
.prose h2 { font-size: 30px; }
.post-head .name, .card-info strong, .trend strong, .follow-info strong { font-weight: 600; }
.btn { font-weight: 600; }


/* ---------- Ajustes pós-remoção de páginas ---------- */
.subscribe.subscribe-card { flex-direction: column; margin: 12px 0 0; }
.subscribe-card input { flex: none; width: 100%; height: 44px; background: var(--bg); }
.section-socials { margin-top: 14px; flex-wrap: wrap; }

/* ---------- SEO: título do topo sem H1 e página 404 ---------- */
.topbar-heading {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.2;
}
.notfound { padding: 64px 24px; text-align: center; border-bottom: 0; }
.notfound-code {
  font-family: var(--font-display);
  font-size: 120px;
  line-height: 1;
  color: var(--accent);
}
.notfound h1 { font-family: var(--font-display); font-weight: 400; font-size: 40px; margin: 8px 0; }
.notfound p + p { margin-top: 24px; }
.notfound .btn { margin: 0 4px; }

/* ---------- Conteúdo via API: carregando, vazio e erro ---------- */
.feed-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--muted);
}
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Bloco de estado (vazio/erro): ícone + título + texto + ação */
.state {
  padding: 64px 24px;
  text-align: center;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--bg-elev);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.state-icon svg { width: 26px; height: 26px; }
.state-title {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
}
.state p { max-width: 380px; margin: 0 auto; }
.state .btn { display: inline-block; margin-top: 20px; }

.feed-search { padding: 16px 24px; color: var(--muted); border-bottom: 1px solid var(--border); }
.trends-empty { padding: 8px 16px 16px; color: var(--muted); font-size: 14px; }
.related-title { padding: 20px 24px 0; font-size: 20px; }
.share-btns { display: inline-flex; gap: 4px; }

/* Confete das páginas de sucesso da newsletter */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 999; }

/* ---------- Menu mobile (details/summary, sem JavaScript) ---------- */
.menu { display: none; margin-left: auto; }
.menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  list-style: none;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover, .menu summary:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.menu summary span { display: flex; }
.menu summary svg { width: 20px; height: 20px; }
.menu .menu-close, .menu[open] .menu-open { display: none; }
.menu[open] .menu-close { display: flex; }
.menu-panel {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--bg);
  border-top: 1px solid var(--border);
  animation: menu-in .2s ease-out;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
.menu-links { display: flex; flex-direction: column; }
.menu-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.1;
  color: var(--text);
  transition: color .2s;
}
.menu-links a svg { width: 22px; height: 22px; color: var(--muted); transition: transform .2s, color .2s; }
.menu-links a:hover svg, .menu-links a[aria-current="page"] svg { color: var(--accent); transform: translateX(4px); }
.menu-links a[aria-current="page"] { color: var(--accent); }
.menu-socials { display: flex; flex-wrap: wrap; gap: 10px; }
/* trava a rolagem da página com o menu aberto */
html:has(.menu[open]) { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .menu-panel { animation: none; } }
@media (max-width: 700px) {
  .nav { display: none; }
  .menu { display: block; }
}

/* ---------- Newsletter: anti-bot e páginas de retorno ---------- */
/* Campo "armadilha" invisível para pessoas; robôs costumam preenchê-lo */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--accent);
  font-size: 40px;
  line-height: 1;
}
