/* Base: reset, tipografia, foco visível, movimento reduzido. Só var(--…) (valores brutos ficam em tokens.css). */
*,
*::before,
*::after {
  box-sizing: border-box;
  min-width: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: var(--app-height);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  padding-left: calc(var(--safe-left) + var(--gutter));
  padding-right: calc(var(--safe-right) + var(--gutter));
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--safe-bottom) + var(--s-5));
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1 {
  font-size: var(--fs-heading);
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--fs-title);
  line-height: var(--lh-tight);
}

h3 {
  font-size: var(--fs-body);
  line-height: var(--lh-tight);
}

small {
  font-size: var(--fs-small);
}

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

a {
  color: var(--accent);
}

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

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

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

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
