/* Reset, tipografia e utilitários. */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: 600; }

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

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }

svg { display: block; flex-shrink: 0; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--brand); color: var(--brand-contrast); }

/* Utilitários */
.num {
  font-family: var(--font-mono);
  font-size: var(--fs-num);
  line-height: var(--lh-num);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.label {
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
}

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.up { color: var(--up); }
.down { color: var(--down); }

.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: 16px; height: 16px; }
.icon-20 { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
  }
}
