/*
 * Reset e comportamento global — portado literalmente de styles.css:9-12,44.
 * A regra de prefers-reduced-motion é a rede de segurança do site inteiro;
 * os tokens de --motion-* em tokens.css já zeram sozinhos, isto é reforço.
 */
* {
  box-sizing: border-box;
}

html {
  font-size: var(--base-font);
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  scroll-padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.6;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

/*
 * Títulos na família de display. `font-optical-sizing: auto` deixa o eixo
 * variável `opsz` da Bricolage responder ao tamanho: títulos grandes ganham
 * o desenho de display (mais contraste), textos pequenos o de leitura.
 */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

/* Números e dados eleitorais alinhados em colunas (tabelas, comparação). */
.qv-tabular {
  font-variant-numeric: tabular-nums;
}

/* Rótulo de seção. Sempre acompanhado de um título de verdade logo abaixo —
   nunca é a única indicação do que vem a seguir. */
.qv-eyebrow {
  margin: 0 0 12px;
  color: var(--blue-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.qv-eyebrow--onDark {
  color: var(--pink);
}

body.page-lock {
  overflow: hidden;
}

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

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

::selection {
  color: var(--blue-dark);
  background: var(--pink-soft);
}

button,
input,
select {
  font: inherit;
  min-width: 0;
}

button {
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--blue-strong);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 10px;
  z-index: 100;
  background: var(--blue-dark);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  transform: translateY(-160%);
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

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