/* Reset leve + tipografia global */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (max-width: 360px) { html { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

html, body { margin: 0; min-height: 100%; }
body {
  background: var(--areia);
  color: var(--texto);
  font-family: var(--f-texto);
  font-size: var(--t-corpo);
  line-height: var(--lh-corpo);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
}
body.modal-ativo { overflow: hidden; }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; color: var(--texto); margin: 0; letter-spacing: -.012em; text-wrap: balance; overflow-wrap: anywhere; }
h1 { font-size: var(--t-h1); line-height: var(--lh-titulo); }
h2 { font-size: var(--t-h2); line-height: var(--lh-titulo); }
h3 { font-size: var(--t-h3); line-height: var(--lh-compacto); font-family: var(--f-texto); font-weight: 700; letter-spacing: 0; }
h4 { font-size: var(--t-h4); line-height: var(--lh-compacto); font-family: var(--f-texto); font-weight: 700; letter-spacing: 0; }
.display { font-family: var(--f-display); font-size: var(--t-display); line-height: var(--lh-display); font-weight: 600; letter-spacing: -.018em; }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }
a { color: var(--oliva); text-decoration-thickness: 1px; text-underline-offset: .15em; }
a:hover { color: var(--oliva-escuro); }
strong, b { font-weight: 700; }
small, .sm { font-size: var(--t-sm); }
.xs { font-size: var(--t-xs); }
.suave { color: var(--texto-suave); }
.fraco { color: var(--texto-fraco); }
.centro { text-align: center; }
.apoio { color: var(--texto-suave); max-width: 62ch; }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.3em; }
li { margin-bottom: var(--s-2); }
hr { border: 0; border-top: var(--borda); margin: var(--s-6) 0; }
img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
dl { margin: 0; }
dd { margin: 0; }
table { border-collapse: collapse; width: 100%; }

:focus-visible { outline: none; box-shadow: var(--foco); border-radius: var(--r-sm); }
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* utilitários de layout */
.contido { width: 100%; max-width: var(--larg-app); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.leitura { max-width: var(--larg-leitura); }
.form-larg { max-width: var(--larg-form); }
.pilha > * + * { margin-top: var(--s-4); }
.pilha-lg > * + * { margin-top: var(--s-6); }
.pilha-sm > * + * { margin-top: var(--s-2); }
.linha { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.linha-entre { display: flex; gap: var(--s-3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grade { display: grid; gap: var(--s-4); }
/* Itens de grid/flex nunca forçam a largura mínima do conteúdo (evita rolagem horizontal em telas estreitas) */
.grade > *, .caso-grade > *, .shell-equipe > *, .status-atual > *, .linha > *, .linha-entre > *, .pagina-cabecalho-linha > *, .lista-corpo, .doc > *, .msg, .metricas > * { min-width: 0; }
.grade-2 { grid-template-columns: 1fr; }
.grade-3 { grid-template-columns: 1fr; }
.grade-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.mb-2 { margin-bottom: var(--s-2); } .mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); }
.oculto { display: none !important; }
.truncar { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pre { white-space: pre-wrap; }
.mono { font-variant-numeric: tabular-nums; }

@media (min-width: 768px) {
  :root { --gutter: 24px; }
  .grade-2 { grid-template-columns: repeat(2, 1fr); }
  .grade-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  :root { --gutter: 32px; }
  .grade-3 { grid-template-columns: repeat(3, 1fr); }
}
