/* Base das páginas da conta: reset, tipografia, links, foco, campos e botões (tokens em tokens.css). */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--fundo-pagina);
  background-image: var(--azulejos);
  background-size: 72px 72px;
  color: var(--texto);
  font-family: var(--fonte-ui);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

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

h1 {
  font-family: var(--fonte-pixel);
  font-variant-ligatures: none; /* o 'fi' da Pixelify Sans lê como 'A' (igual à landing) */
  font-feature-settings: 'liga' 0, 'clig' 0, 'calt' 0;
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.1;
  text-wrap: balance;
}

h2,
h3 {
  font-weight: var(--peso-titulo);
  line-height: 1.3;
}

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

a {
  color: var(--acento-texto);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}

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

code,
pre,
.mono {
  font-family: var(--fonte-mono);
  font-size: 0.875rem;
}

strong {
  font-weight: 600;
}

/* só para leitores de tela */
.sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

/* ===== campos ===== */
label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--texto);
}

input[type='text'],
input[type='email'],
input[type='password'],
select {
  width: 100%;
  min-height: var(--altura-campo);
  padding: 0 var(--e3);
  border: 1px solid var(--linha-forte);
  border-radius: var(--r1);
  background: var(--fundo-painel);
  color: var(--texto);
  font: inherit;
  font-size: 1rem; /* 16 px: o iOS não dá zoom ao focar */
  transition: border-color var(--dur-1) var(--curva);
}
input:hover,
select:hover {
  border-color: var(--texto-3);
}
input:focus-visible,
select:focus-visible {
  border-color: var(--foco);
}
input[aria-invalid='true'] {
  border-color: var(--perigo);
  box-shadow: inset 3px 0 0 var(--perigo);
}
input[readonly] {
  background: var(--fundo-mesa);
  font-family: var(--fonte-mono);
  font-size: 0.9375rem;
}

input[type='checkbox'] {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.125rem 0 0;
  flex: none;
  accent-color: var(--acento);
}

select {
  appearance: none;
  padding-right: var(--e8);
  background-image: linear-gradient(45deg, transparent 50%, var(--texto-2) 50%), linear-gradient(135deg, var(--texto-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

/* ===== botões ===== */
.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e2);
  min-height: var(--altura-campo);
  padding: 0 var(--e5);
  border: 1px solid transparent;
  border-radius: var(--r1);
  background: transparent;
  color: var(--texto);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  /* "degrau" de pixel embaixo, como os botões da landing */
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.22);
  transition: background-color var(--dur-1) var(--curva), border-color var(--dur-1) var(--curva);
}
.botao:active {
  box-shadow: inset 0 2px 0 rgb(0 0 0 / 0.22);
}
.botao-primario {
  background: var(--acento);
  color: var(--sobre-acento);
}
.botao-primario:hover {
  background: var(--acento-texto);
}
.botao-secundario {
  border-color: var(--linha-forte);
  background: var(--fundo-elevado);
}
.botao-secundario:hover {
  background: var(--fundo-hover);
}
.botao-fantasma {
  box-shadow: none;
  color: var(--texto-2);
}
.botao-fantasma:hover {
  background: var(--fundo-hover);
  color: var(--texto);
}
.botao-perigo {
  border-color: var(--perigo);
  background: var(--fundo-elevado);
  color: var(--perigo);
}
.botao-perigo:hover {
  background: var(--fundo-hover);
}
.botao-perigo-cheio {
  border-color: var(--perigo);
  background: var(--perigo);
  color: var(--sobre-acento);
}
.botao-perigo-cheio:hover {
  background: var(--fundo-hover);
  color: var(--perigo);
}
.botao-bloco {
  width: 100%;
}
.botao-pequeno {
  min-height: 2.25rem;
  padding: 0 var(--e3);
  font-size: 0.875rem;
}
.botao[data-estado='copiado'] {
  border-color: var(--sucesso);
}

/* ===== ícones (máscaras SVG mono; cor = currentColor) ===== */
.icone {
  display: inline-block;
  flex: none;
  width: 1rem;
  height: 1rem;
  background-color: currentColor;
  -webkit-mask: var(--mascara) center / contain no-repeat;
  mask: var(--mascara) center / contain no-repeat;
  vertical-align: -0.125em;
}
.icone-github { --mascara: url('/estaticos/icones/github.svg'); }
.icone-google { --mascara: url('/estaticos/icones/google.svg'); }
.icone-alerta { --mascara: url('/estaticos/icones/alerta.svg'); }
.icone-info { --mascara: url('/estaticos/icones/info.svg'); }
.icone-ok { --mascara: url('/estaticos/icones/ok.svg'); }
.icone-copiar { --mascara: url('/estaticos/icones/copiar.svg'); }
.icone-ia { --mascara: url('/estaticos/icones/ia.svg'); }
.icone-fechar { --mascara: url('/estaticos/icones/fechar.svg'); }
.icone-grande {
  width: 3rem;
  height: 3rem;
}
.icone-cor-ia { color: var(--ia-texto); }
.icone-cor-sucesso { color: var(--sucesso); }

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

@media (forced-colors: active) {
  .icone {
    background-color: CanvasText;
  }
  .botao {
    border-color: ButtonText;
  }
}
