/* LASTRO — reset e estilos globais. Ver docs/03_DESIGN_SYSTEM.md */

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

* { margin: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  /* O mobilizador usa com uma mão só, muitas vezes com o aparelho em pé no bolso.
     viewport-fit=cover + estes insets evitam que o botão principal fique embaixo
     da barra de gestos do iPhone. */
  padding-bottom: env(safe-area-inset-bottom);
}

h1, h2, h3, h4 {
  font-weight: var(--fw-title);
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
  text-wrap: balance;
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

strong, b { font-weight: var(--fw-strong); }

a { color: var(--primary); text-underline-offset: 2px; }

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

button { cursor: pointer; }

img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

[hidden] { display: none !important; }

/* Números que se comparam em coluna precisam alinhar. Vale para toda
   tela do painel: declarado, lastreado e meta ficam um debaixo do outro. */
.u-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

.u-mono { font-family: var(--font-mono); }
.u-muted { color: var(--text-muted); }
.u-sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

#app-root { min-height: 100dvh; }

/* Faixa de estado de rede. O mobilizador não pode ficar na dúvida se salvou. */
.rede {
  position: sticky;
  top: 0;
  z-index: var(--z-dropdown);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  font-weight: var(--fw-strong);
  text-align: center;
  background: var(--offline-bg);
  color: var(--offline);
}
.rede--sincronizando {
  background: var(--info-bg);
  color: var(--sincronizando);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
