/* ============================================================
   base.css — reset, tipografia e utilitários
   ============================================================ */

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

html, body {
  height: 100%;
  margin: 0;
  /* O documento não rola: quem rola são as áreas de dentro. Sem isto, o
     teclado do celular faz o navegador rolar a página inteira. */
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--font);
  font-weight: var(--w-regular);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

button, input, textarea, select, option, optgroup, output {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

ul { list-style: none; margin: 0; padding: 0; }

svg { display: block; flex: none; }

[hidden] { display: none !important; }

::selection { background: rgba(92, 68, 51, .16); }

/* --- Escala tipográfica --------------------------------- */
.t-title  { font-size: 23px; font-weight: var(--w-medium); letter-spacing: -.02em; line-height: 1.25; }
.t-lead   { font-size: 18px; font-weight: var(--w-medium); letter-spacing: -.01em; }
.t-body   { font-size: 16px; font-weight: var(--w-regular); }
.t-label  { font-size: 14px; font-weight: var(--w-medium); letter-spacing: -.005em; }
.t-meta   { font-size: 13px; font-weight: var(--w-regular); color: var(--ink-mute); }

.muted { color: var(--ink-soft); }
.faint { color: var(--ink-mute); }

/* --- Utilitários ---------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.scroll-y {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-y::-webkit-scrollbar { width: 0; height: 0; }

/* --- Acessibilidade de foco ------------------------------ */
:focus-visible:not(:is(input, textarea, select, [contenteditable="true"])) {
  outline: 2px solid var(--brown);
  outline-offset: 2px;
  border-radius: 8px;
}
input:focus, textarea:focus, select:focus, [contenteditable="true"]:focus,
:focus:not(:focus-visible) { outline: none; }

/* Restaurando a sessão: o painel já estava aberto, então ele não deve
   "chegar" deslizando na frente da pessoa. */
:root[data-sem-animacao] *,
:root[data-sem-animacao] *::before,
:root[data-sem-animacao] *::after {
  transition: none !important;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

h1, h2, h3, h4, h5, h6, b, strong, th { font-weight: var(--w-medium); }
