:root {
  --fundo: #f4efe6;
  --papel: #fffdf9;
  --tinta: #1c2118;
  --suave: #4e564c;
  --linha: #e3d8c8;
  --verde: #0e5a38;
  --verde-escuro: #0a3f28;
  --ouro: #b0893e;
  --sombra: 0 12px 40px rgba(28, 33, 24, 0.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--fundo);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

body.pagina {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
}

main {
  flex: 1;
  width: 100%;
}

h1,
h2,
.marca {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
}

h2 {
  margin: 0 0 0.8rem;
  font-size: 1.45rem;
  line-height: 1.25;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--verde);
}

button,
input,
textarea {
  font: inherit;
}

.envoltorio {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

.bloco-pagina {
  padding: 1.5rem 0 3rem;
}

.editor-pagina {
  width: min(1180px, calc(100% - 1.5rem));
}

.sr,
.menu-controle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.pular {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  background: var(--verde);
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
}

.pular:focus {
  top: 1rem;
}

.topo {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 253, 249, 0.94);
  border-bottom: 1px solid var(--linha);
}

.topo-interno {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  min-height: 4.5rem;
}

.marca {
  max-width: calc(100% - 4rem);
  color: var(--tinta);
  text-decoration: none;
  font-size: 1.45rem;
  line-height: 1.15;
}

.marca::after {
  content: "";
  display: block;
  width: 2.2rem;
  height: 2px;
  margin-top: 0.25rem;
  background: var(--ouro);
}

.menu-botao {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--linha);
  border-radius: 10px;
  background: var(--papel);
  cursor: pointer;
}

.barra {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--tinta);
}

.menu-controle:focus-visible + .menu-botao,
:focus-visible {
  outline: 2px solid var(--ouro);
  outline-offset: 3px;
}

.menu-lista {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.1rem;
}

.menu-lista a {
  color: var(--tinta);
  text-decoration: none;
  padding: 0.45rem 0.1rem;
}

.menu-lista a[aria-current="page"] {
  color: var(--verde);
  box-shadow: inset 0 -2px 0 var(--ouro);
}

.selo {
  margin: 0;
  color: var(--suave);
  font-size: 0.92rem;
}

.apresentacao {
  padding: 1.5rem 0 0.5rem;
}

.apresentacao p,
.resumo {
  max-width: 40rem;
  color: var(--suave);
  font-size: 1.08rem;
}

.secao-artigos {
  margin-top: 2rem;
}

.grade-artigos {
  display: grid;
  gap: 1rem;
}

.cartao-artigo {
  display: block;
  background: var(--papel);
  border: 1px solid var(--linha);
  border-radius: 16px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--sombra);
}

.cartao-artigo h3 {
  margin: 0.35rem 0 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.cartao-artigo p,
.cartao-artigo time {
  color: var(--suave);
}

.cartao-artigo time {
  font-size: 0.85rem;
}

.cartao-artigo:hover {
  border-color: var(--ouro);
}

.cartao-artigo img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

.vazio {
  border: 1px dashed var(--linha);
  border-radius: 16px;
  padding: 1.5rem 1.15rem;
  color: var(--suave);
}

.prosa {
  max-width: 42rem;
}

.prosa h2 {
  margin-top: 2rem;
}

.prosa p,
.prosa li {
  line-height: 1.75;
}

.prosa ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.nota {
  color: var(--suave);
  font-size: 0.92rem;
}

.rodape {
  border-top: 1px solid var(--linha);
  padding: 1.5rem 0 2rem;
  color: var(--suave);
}

.rodape nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.75rem;
}

.rodape a {
  color: var(--tinta);
  text-decoration: none;
}

.rodape a:hover,
.menu-lista a:hover {
  text-decoration: underline;
}

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat,
.bloco,
.cartao-login {
  background: var(--papel);
  border: 1px solid var(--linha);
  border-radius: 18px;
  box-shadow: var(--sombra);
}

.stat {
  padding: 1.2rem 1.25rem 1.1rem;
  border-top: 3px solid var(--ouro);
}

.stat p {
  margin: 0;
  color: var(--suave);
}

.stat strong {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.7rem);
  line-height: 1;
}

.bloco {
  padding: 1.25rem;
  margin-top: 1.25rem;
}

.subtitulo {
  margin-top: 2rem;
}

.cartao-login {
  width: min(440px, 100%);
  margin: 2rem auto;
  padding: 1.4rem 1.25rem 1.5rem;
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.campo label {
  font-weight: 650;
}

.ajuda {
  margin: 0;
  color: var(--suave);
  font-size: 0.92rem;
}

.campo input,
.campo textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--linha);
  border-radius: 12px;
  background: #fff;
  color: var(--tinta);
}

.campo textarea,
.campo select {
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--linha);
  border-radius: 12px;
  background: #fff;
  color: var(--tinta);
}

.campo textarea {
  resize: vertical;
  min-height: 8rem;
}

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background: var(--verde);
  color: #fff;
  font-weight: 650;
  cursor: pointer;
}

.botao:hover {
  background: var(--verde-escuro);
}

.botao-perigo {
  background: transparent;
  color: #8c2f2f;
  border: 1px solid #e4c1c1;
}

.botao-perigo:hover {
  background: #fdecec;
}

.aviso {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin: 0 0 1rem;
}

.aviso-ok {
  background: #e7f4ec;
  color: #145c38;
}

.aviso-erro {
  background: #fdecec;
  color: #8c2f2f;
}

.aviso-neutro {
  background: #f3ecdf;
  color: var(--tinta);
}

.lista-checagem {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.lista-checagem li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--linha);
}

.lista-checagem a {
  color: var(--tinta);
  overflow-wrap: anywhere;
}

.selo-bloqueado {
  color: var(--verde);
  font-weight: 650;
}

.selo-exposto {
  color: #8c2f2f;
  font-weight: 700;
}

.lista-admins {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--linha);
}

.admin-dados {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.admin-email {
  color: var(--suave);
  overflow-wrap: anywhere;
}

.acoes-linha {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.form-editar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  width: 100%;
}

.form-editar .campo {
  flex: 1 1 14rem;
  margin-bottom: 0;
}

.botao-contorno {
  background: transparent;
  color: var(--verde);
  border: 1px solid var(--linha);
  text-decoration: none;
}

.botao-contorno:hover {
  background: #f3ecdf;
}

.contador {
  margin: 0.35rem 0 0;
  color: var(--suave);
  font-size: 0.92rem;
  text-align: right;
}

.contador-limite {
  color: #8c2f2f;
  font-weight: 650;
}

.editor-pagina > h1 {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.editor-voltar {
  margin: 0 0 0.65rem;
}

.editor-voltar a {
  color: var(--suave);
  text-decoration: none;
  font-size: 0.92rem;
}

.editor-voltar a:hover {
  color: var(--verde);
}

.editor-form {
  margin-top: 1rem;
}

.editor-grade {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.editor-titulo {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid transparent;
}

.editor-titulo:focus-within {
  border-bottom-color: var(--linha);
}

.titulo-artigo {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--tinta);
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  padding: 0.15rem 0 0.45rem;
}

.titulo-artigo:focus {
  outline: none;
}

.titulo-artigo::placeholder {
  color: #b3aa9d;
}

.editor-titulo .contador {
  margin: 0 0 0.55rem;
  white-space: nowrap;
}

.editor-caixa {
  background: #fff;
  border: 1px solid var(--linha);
  border-radius: 16px;
  box-shadow: var(--sombra);
}

.editor-caixa:focus-within {
  border-color: #c9b48a;
  box-shadow: 0 0 0 3px rgba(176, 137, 62, 0.16);
}

.editor-barra {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  align-items: center;
  padding: 0.4rem 0.5rem;
  background: #faf7f2;
  border-bottom: 1px solid var(--linha);
  border-radius: 15px 15px 0 0;
  position: sticky;
  top: 4.75rem;
  z-index: 3;
}

.editor-barra select {
  height: 34px;
  max-width: 9.2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--tinta);
  font-size: 0.92rem;
  padding: 0 0.35rem;
}

.editor-barra select:hover,
.editor-barra select:focus {
  background: #efe7da;
  outline: none;
}

.editor-divisoria {
  width: 1px;
  height: 22px;
  margin: 0 0.25rem;
  background: var(--linha);
}

.editor-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--tinta);
  cursor: pointer;
}

.editor-icone svg {
  width: 18px;
  height: 18px;
  display: block;
}

.editor-icone:hover,
.editor-icone[aria-pressed="true"] {
  background: #e7f2ec;
  color: var(--verde-escuro);
}

.editor-popover {
  display: grid;
  gap: 0.5rem;
  padding: 0.85rem 1rem 1rem;
  background: #fbf8f3;
  border-bottom: 1px solid var(--linha);
}

.editor-popover[hidden],
.previa-miniatura[hidden] {
  display: none !important;
}

.editor-popover label {
  font-size: 0.92rem;
  font-weight: 650;
}

.editor-popover input {
  width: 100%;
  min-height: 44px;
  margin-top: 0.3rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--linha);
  border-radius: 10px;
  background: #fff;
  color: var(--tinta);
}

.editor-popover-acoes {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}

.editor-popover-erro {
  margin: 0;
  color: #8c2f2f;
  font-size: 0.9rem;
}

.editor-area {
  position: relative;
}

.editor-dica {
  position: absolute;
  top: 1.15rem;
  left: 1.25rem;
  right: 1.25rem;
  margin: 0;
  color: #8d867c;
  pointer-events: none;
}

.editor-area.com-texto .editor-dica {
  display: none;
}

.editor-folha {
  min-height: 460px;
  padding: 1.05rem 1.25rem 2.5rem;
  border: 0;
  border-radius: 0;
  background: #fff;
  font-size: 14px;
  line-height: 1.75;
}

.editor-folha:focus {
  outline: none;
}

.editor-folha p,
.artigo-corpo p {
  margin: 0 0 0.85rem;
}

.editor-folha h1,
.artigo-corpo h1 {
  font-size: 2rem;
  margin: 1.15rem 0 0.55rem;
}

.editor-folha h2,
.artigo-corpo h2 {
  font-size: 1.55rem;
  margin: 1.1rem 0 0.5rem;
}

.editor-folha h3,
.artigo-corpo h3 {
  font-size: 1.28rem;
  margin: 1rem 0 0.45rem;
}

.editor-folha h4,
.artigo-corpo h4 {
  font-size: 1.08rem;
  margin: 0.9rem 0 0.4rem;
}

.editor-folha ul,
.editor-folha ol,
.artigo-corpo ul,
.artigo-corpo ol {
  margin: 0 0 0.9rem;
  padding-left: 1.35rem;
}

.editor-folha blockquote,
.artigo-corpo blockquote {
  margin: 1rem 0;
  padding: 0.15rem 0 0.15rem 0.95rem;
  border-left: 3px solid var(--ouro);
  color: var(--suave);
}

.editor-lateral {
  display: grid;
  gap: 0.85rem;
}

.painel-meta {
  background: var(--papel);
  border: 1px solid var(--linha);
  border-radius: 16px;
  box-shadow: var(--sombra);
  padding: 0.95rem 1rem 1rem;
  margin: 0;
}

.painel-meta h2 {
  margin: 0 0 0.75rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.painel-publicar .botao,
.editor-acao-movel .botao {
  width: 100%;
}

.painel-publicar .resumo {
  margin-bottom: 0.8rem;
}

.lista-categorias {
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--linha);
  border-radius: 12px;
  background: #fff;
}

.lista-categorias label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.72rem 0.8rem;
  border-bottom: 1px solid var(--linha);
  font-weight: 550;
  cursor: pointer;
}

.lista-categorias label:last-child {
  border-bottom: 0;
}

.lista-categorias label:hover,
.lista-categorias label:focus-within {
  background: #faf7f2;
}

.lista-categorias input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--verde);
  flex: 0 0 auto;
}

.zona-miniatura {
  display: grid;
  gap: 0.55rem;
  justify-items: start;
  cursor: pointer;
}

.zona-miniatura-texto {
  color: var(--verde);
  font-weight: 650;
  font-size: 0.95rem;
}

.etiquetas-caixa {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  min-height: 52px;
  padding: 0.45rem;
  border: 1px solid var(--linha);
  border-radius: 12px;
  background: #fff;
}

.etiquetas-caixa:focus-within {
  border-color: #c9b48a;
  box-shadow: 0 0 0 3px rgba(176, 137, 62, 0.16);
}

.lista-etiquetas {
  display: contents;
}

.etiqueta {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  max-width: 100%;
  padding: 0.18rem 0.2rem 0.18rem 0.7rem;
  border-radius: 999px;
  background: #e7f2ec;
  color: var(--verde-escuro);
  font-size: 0.88rem;
  font-weight: 650;
}

.etiqueta span {
  overflow-wrap: anywhere;
}

.etiqueta button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.etiqueta button:hover {
  background: rgba(14, 90, 56, 0.12);
}

.etiquetas-caixa input {
  flex: 1 1 8rem;
  min-width: 7.5rem;
  width: auto;
  border: 0;
  background: transparent;
  padding: 0.35rem 0.3rem;
  color: var(--tinta);
}

.etiquetas-caixa input:focus {
  outline: none;
}

.editor-acao-movel {
  display: none;
}

@media (min-width: 960px) {
  .editor-grade {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .editor-lateral {
    position: sticky;
    top: 5rem;
    max-height: calc(100vh - 6rem);
    overflow: auto;
  }
}

@media (max-width: 959px) {
  .editor-folha {
    min-height: 360px;
  }

  .editor-acao-movel {
    display: block;
    position: sticky;
    bottom: 0;
    z-index: 4;
    padding: 0.75rem 0 0.2rem;
    background: linear-gradient(transparent, var(--fundo) 28%);
  }
}

.editor-folha img,
.artigo-corpo img,
.miniatura-destaque {
  max-width: 100%;
  height: auto;
}

.video-youtube {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  margin: 1rem 0;
}

.video-youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.previa-miniatura,
.miniatura-admin {
  display: block;
  width: 100%;
  max-width: 280px;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--linha);
  margin-bottom: 0.8rem;
}

.miniatura-admin {
  width: 88px;
  height: 64px;
  margin: 0;
}

.artigo-admin {
  align-items: flex-start;
}

.artigo-admin form .campo {
  margin-bottom: 0.45rem;
}

.artigo-admin select {
  min-width: 11rem;
}

.artigo-corpo {
  max-width: 42rem;
  font-size: 14px;
  line-height: 1.75;
}

.artigo-corpo h1,
.artigo-corpo h2,
.artigo-corpo h3,
.artigo-corpo h4 {
  font-family: var(--serif);
  line-height: 1.25;
  margin: 1.4rem 0 0.6rem;
}

.miniatura-destaque {
  width: 100%;
  max-width: 42rem;
  max-height: 420px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 1rem;
}

@media (max-width: 980px) {
  .menu-botao {
    display: inline-flex;
  }

  .menu-lista {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 0.85rem;
  }

  .menu-controle:checked ~ .menu-lista {
    display: flex;
  }

  .menu-lista a {
    width: 100%;
    padding: 0.75rem 0;
  }

  .acao-larga {
    width: 100%;
  }
}

@media (min-width: 760px) {
  .stats,
  .grade-artigos {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
