/* --------------------------------------------------------------------------
   Reset & Base Global
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100vw;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.5;
  color: var(--color-text-main);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100vw;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Escala Tipográfica Padronizada */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text-heading);
}

h1 {
  font-size: var(--text-page-title);
  font-weight: 700;
}

h2 {
  font-size: var(--text-page-title);
  font-weight: 700;
}

.card h2,
.card h3,
.section-title,
h3 {
  font-size: var(--text-section-title);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--color-text-main);
}

h4 {
  font-size: var(--text-subtitle);
  font-weight: 600;
  color: var(--color-text-main);
}

p {
  margin: 0 0 var(--space-3);
  font-size: var(--text-body);
  color: var(--color-text-muted);
  line-height: 1.55;
}

a {
  color: var(--color-brand-secondary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

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

code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 0.82em;
  font-variant-numeric: tabular-nums;
  color: var(--color-brand-primary);
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border-card);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border-card);
  margin: var(--space-4) 0;
}

/* Rótulos Técnicos e Auxiliares */
.section-label,
.kpi-label {
  display: block;
  font-size: var(--text-aux);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.text-muted { color: var(--color-text-muted); }
.text-soft, .help-text, .form-help { font-size: var(--text-aux); color: var(--color-text-soft); }
.tabular-nums { font-variant-numeric: tabular-nums; }

.content-wrap, .card, label, strong, span, div, a {
  overflow-wrap: break-word;
}

table, td, th {
  overflow-wrap: normal;
  word-break: normal;
}
