:root {
  --bg: #f5f3ee;
  --papel: #ffffff;
  --tinta: #1d2420;
  --suave: #5d6761;
  --linha: #e2ddd2;
  --marca: #1f5f4a;
  --marca-2: #e8f1ec;
  --alerta: #b4532a;
  --alerta-2: #fbefe6;
  --erro: #d62828;
  --raio: 12px;
  --fonte: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--tinta); font: 17px/1.55 var(--fonte); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; }
a { color: var(--marca); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.cartao { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 28px; }
.btn { appearance: none; border: 1px solid var(--marca); background: var(--marca); color: #fff; font: 600 16px var(--fonte); padding: 11px 20px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sec { background: var(--papel); color: var(--marca); }
.btn.peq { padding: 6px 12px; font-size: 14px; }
.btn.perigo { border-color: var(--erro); color: var(--erro); background: var(--papel); }
.rot { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--suave); font-weight: 600; }
.muted { color: var(--suave); }
input[type=text], input[type=date], input[type=password], select {
  font: 16px var(--fonte); padding: 10px 12px; border: 1px solid var(--linha); border-radius: 8px; background: #fff; color: var(--tinta); width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--marca); outline-offset: 1px; }

.campo-caixa { position: relative; }
.campo-caixa textarea, .campo-espelho {
  font: 17px/1.6 var(--fonte); padding: 12px 14px; border: 1px solid var(--linha); border-radius: 9px;
  white-space: pre-wrap; overflow-wrap: break-word; word-wrap: break-word; letter-spacing: normal; width: 100%; margin: 0;
}
.campo-caixa textarea { position: relative; z-index: 1; background: transparent; color: var(--tinta); resize: none; display: block; min-height: 150px; overflow: hidden; }
.campo-caixa textarea.curto { min-height: 60px; }
.campo-espelho { position: absolute; inset: 0; z-index: 0; color: transparent; background: #fff; overflow: hidden; border-color: transparent; }
.campo-espelho mark { background: transparent; color: transparent; text-decoration: underline wavy var(--erro); text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-skip-ink: none; }
.campo-dicas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-size: 14px; }
.dicas-rot { color: var(--erro); font-weight: 600; margin-right: 2px; }
.dica { font: 14px var(--fonte); border: 1px solid #f0c9c9; background: #fdf3f3; color: var(--tinta); border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.dica s { color: var(--erro); }
.dica:hover { background: #fbe4e4; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--tinta); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 15px; z-index: 50; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.modal-fundo { position: fixed; inset: 0; background: rgba(20,25,22,.5); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 40; }
.modal { background: var(--papel); border-radius: var(--raio); padding: 26px; max-width: 520px; width: 100%; max-height: 90vh; overflow: auto; }
.modal.largo { max-width: 860px; }
.acoes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 18px; }
@media (max-width: 600px) {
  .cartao { padding: 20px 16px; }
  h1 { font-size: 1.5rem; }
}
