/* Cores tiradas dos dois brasões: a coroa de louros, o esquadro dourado e o
   azul do letreiro da Loja. Nada de paleta genérica. */
:root {
  --folha: #1b7a3d;
  --folha-escura: #0e4f27;
  --folha-clara: #e6f1e9;
  --ouro: #c8920f;
  /* O dourado do brasão funciona como filete e como fundo, mas reprova no
     contraste mínimo quando vira texto. Para ler, usa-se a versão terrosa. */
  --ouro-texto: #7a5900;
  --ouro-claro: #fbf1d8;
  --indigo: #16386b;
  --papel: #f7f8f4;
  --superficie: #ffffff;
  --tinta: #1e211d;
  --tinta-suave: #5c645a;
  --linha: #dde2d9;
  --alerta: #a3341f;
  --alerta-fundo: #fbeae6;

  /* Escala de 1,25 entre degraus. Antes havia dezesseis tamanhos a poucos por
     cento um do outro, o que não é hierarquia, é borrão. */
  --t-micro: 0.8rem;
  --t-legenda: 0.9rem;
  --t-corpo: 1rem;
  --t-h3: 1.25rem;
  --t-h2: 1.55rem;
  --t-h1: 1.95rem;
  --t-heroi: 2.6rem;

  --serifada: ui-serif, Georgia, "Noto Serif", "Times New Roman", serif;
  --sistema: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --raio: 10px;
  --toque: 48px;
  --colo: 1.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --folha: #4caf6d;
    --folha-escura: #7fd39a;
    --folha-clara: #16291d;
    --ouro: #e0b544;
    --ouro-texto: #eac778;
    --ouro-claro: #2c2312;
    --indigo: #8fb4e8;
    --papel: #14171a;
    --superficie: #1c2024;
    --tinta: #eef1ec;
    --tinta-suave: #a5aea3;
    --linha: #2e3439;
    --alerta: #ff9d85;
    --alerta-fundo: #331914;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /* 18px de base: o público aqui tem muita gente de idade lendo no celular. */
  font: 400 18px/1.55 var(--sistema);
  color: var(--tinta);
  background: var(--papel);
  overflow-wrap: break-word;
}

h1, h2, h3 { font-family: var(--serifada); font-weight: 700; line-height: 1.2; margin: 0; }
h1 { font-size: var(--t-h1); letter-spacing: -0.015em; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
p { margin: 0 0 0.8em; }
a { color: var(--indigo); }

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  min-height: var(--toque);
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: var(--raio);
  background: var(--folha);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button:disabled { opacity: 0.45; cursor: not-allowed; }

button.discreto {
  background: transparent;
  border-color: var(--linha);
  color: var(--tinta);
}

button.perigo { background: var(--alerta); }

input, select, textarea {
  width: 100%;
  min-height: var(--toque);
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--linha);
  border-radius: var(--raio);
  background: var(--superficie);
}

textarea { min-height: 5rem; }

label { display: block; margin-bottom: 0.9rem; font-weight: 600; font-size: var(--t-legenda); }
label span.campo { display: block; margin-bottom: 0.25rem; }
label input, label select, label textarea { font-weight: 400; }

:focus-visible {
  outline: 3px solid var(--ouro);
  outline-offset: 2px;
}

.envelope {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.oculto { display: none !important; }

.aviso-erro {
  background: var(--alerta-fundo);
  color: var(--alerta);
  border: 1px solid var(--alerta);
  padding: 0.75rem 0.9rem;
  border-radius: var(--raio);
  margin-bottom: 1rem;
}

.tarja-receita {
  display: inline-block;
  background: var(--ouro-claro);
  color: var(--ouro-texto);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: var(--t-micro);
  font-weight: 700;
}

.discreta { color: var(--tinta-suave); font-size: var(--t-legenda); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
