/* base.css — reset enxuto, tipografia e layout de página. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  /* rede de segurança: nada alarga a página na horizontal (clip não quebra o sticky do navbar) */
  overflow-x: clip;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-text-primary);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p {
  margin: 0;
}

h1 { font-size: var(--text-2xl); line-height: 1.2; font-weight: 700; }
h2 { font-size: var(--text-xl); line-height: 1.3; font-weight: 600; }
h3 { font-size: var(--text-lg); font-weight: 600; }

a {
  color: var(--color-action-text);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

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

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

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

[hidden] { display: none !important; }

/* "Pular para o conteúdo": primeiro item focável da página, visível só ao receber foco */
.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  z-index: 200;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-action);
  color: var(--color-text-on-action);
  font-weight: 600;
}
.skip-link:focus { top: var(--space-2); }

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

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Layout ---------- */
.page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-10);
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.page-header__subtitle {
  margin-top: var(--space-1);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.muted { color: var(--color-text-muted); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
