:root {
  --papel: #f4f1ea;
  --tinta: #1c2428;
  --muted: #5d686e;
  --linha: #d8d1c4;
  --superficie: #fffdf8;
  --verde: #1b5c4e;
  --verde-escuro: #123f36;
  --alerta: #8a2f1d;
  --sombra: 0 18px 40px rgba(28, 36, 40, 0.08);
  --fonte: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--fonte);
  color: var(--tinta);
  background:
    radial-gradient(900px 380px at 8% -12%, #dcebe4 0%, transparent 55%),
    var(--papel);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img, svg, video { max-width: 100%; height: auto; }

a { color: var(--verde); }
a:hover { color: var(--verde-escuro); }

.topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--linha);
  background: rgba(255, 253, 248, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--linha);
  border-radius: 999px;
  background: var(--superficie);
  color: var(--tinta);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.marca {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--tinta);
}
.marca strong { display: block; font-size: 1.05rem; }
.marca small { display: block; color: var(--muted); font-size: 0.8rem; }
.selo {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--verde), #c4a574, var(--verde-escuro));
  box-shadow: inset 0 0 0 3px var(--superficie);
}
.nav { display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: center; }
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}
.nav a.ativa, .nav a:hover { color: var(--tinta); font-weight: 600; }
.nav-interno {
  border: 1px solid var(--linha);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

.palco {
  width: min(860px, calc(100% - 2rem));
  margin: 2rem auto 3rem;
  flex: 1;
}

.hero, .cartao {
  background: var(--superficie);
  border: 1px solid var(--linha);
  border-radius: 18px;
  box-shadow: var(--sombra);
  padding: 1.7rem;
  margin-bottom: 1.2rem;
}
.hero h1, .cartao h1, .cartao h2 {
  margin: 0 0 0.6rem;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
}
.lead, .muted { color: var(--muted); line-height: 1.55; }
.acoes { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.2rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 1.2rem;
  min-height: 44px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
}
.btn:disabled, .btn-enviando {
  opacity: 0.7;
  cursor: wait;
}
.btn-principal { background: var(--verde); color: #fff; }
.btn-principal:hover { background: var(--verde-escuro); color: #fff; }
.btn-secundario {
  background: transparent;
  color: var(--tinta);
  border: 1px solid var(--linha);
}

.grade { display: grid; gap: 1rem; }
.grade-2 { grid-template-columns: 1fr 1fr; }

.campo { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.campo label { font-weight: 600; font-size: 0.95rem; }
.campo .ajuda { font-weight: 400; color: var(--muted); font-size: 0.82rem; }
.campo input, .campo select, .campo textarea {
  font: inherit;
  font-size: 16px;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--linha);
  border-radius: 10px;
  background: #fff;
  color: var(--tinta);
}
.campo textarea { min-height: 110px; resize: vertical; }
.campo-check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--linha);
  border-radius: 12px;
  background: #f8f6f0;
}
.campo-check input { margin-top: 0.25rem; }

.alerta {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  background: #f8e8e4;
  color: var(--alerta);
}
.ok {
  background: #e6f3ed;
  color: var(--verde-escuro);
  padding: 0.85rem 1rem;
  border-radius: 12px;
}
.protocolo {
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin: 0.8rem 0;
  color: var(--verde-escuro);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.lista-passos { padding-left: 1.1rem; color: var(--muted); line-height: 1.7; }

.rodape {
  padding: 1.2rem 1.5rem 1.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--linha);
}

.status {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}
.status-aberto { background: #efe3c8; color: #6a4f12; }
.status-analise { background: #dce8f5; color: #1d4a78; }
.status-investigacao { background: #eadcf5; color: #5a2d78; }
.status-encerrado { background: #dcefe6; color: var(--verde-escuro); }
.status-arquivada { background: #ececec; color: #555; }

@media (max-width: 768px) {
  .topo { padding: 0.85rem 1rem; }
  .palco {
    width: calc(100% - 1.2rem);
    margin: 1.1rem auto 2rem;
  }
  .hero, .cartao {
    padding: 1.15rem;
    border-radius: 14px;
  }
  .hero h1, .cartao h1, .cartao h2 { font-size: 1.45rem; }
  .grade-2 { grid-template-columns: 1fr; }
  .acoes { flex-direction: column; }
  .acoes .btn { width: 100%; }
  .rodape { padding: 1rem; }
}

@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }
  .topo.menu-aberto .nav { display: flex; }
  .nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
    background: #f8f6f0;
  }
  .nav a.ativa { background: #e6efe9; }
  .nav-interno { border-color: var(--linha); }
  .marca strong { font-size: 0.98rem; }
  .protocolo { font-size: 1.15rem; letter-spacing: 0.04em; }
}

@media (max-width: 375px) {
  .hero h1, .cartao h1, .cartao h2 { font-size: 1.28rem; }
  .marca small { font-size: 0.74rem; }
}
