/* ============================================================================
   base.css — reset e tipografia de base. Só var(--...), nenhuma cor literal.
   ============================================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--ts-fs-md);
  line-height: var(--ts-lh-body);
  font-weight: var(--w-regular);
  color: var(--ts-text);
  background: var(--ts-paper);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ts-ink);
  line-height: var(--ts-lh-tight);
  font-weight: var(--w-bold);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

/* foco visível sempre, nunca removido */
:focus-visible {
  outline: 3px solid var(--ts-focus);
  outline-offset: 3px;
  border-radius: var(--ts-r-sm);
}
.ts-on-ink :focus-visible { outline-color: var(--ts-brand); }

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

.ts-skip {
  position: absolute; left: var(--ts-s-4); top: var(--ts-s-2); z-index: 100;
  padding: var(--ts-s-2) var(--ts-s-4);
  background: var(--ts-brand); color: var(--ts-on-brand);
  font-weight: var(--w-bold); text-decoration: none;
  transform: translateY(-200%);
}
.ts-skip:focus { transform: none; }

.ts-container {
  width: 100%;
  max-width: calc(var(--ts-container) + 2 * var(--ts-gutter));
  margin-inline: auto;
  padding-inline: var(--ts-gutter);
}

.ts-num { font-variant-numeric: tabular-nums; }
