/* ==========================================================================
   Brasil Finanças Atlas (BFA) — Typography & Mathematical Notation
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

code, pre, kbd, samp {
  font-family: var(--font-mono);
}

.bfa-code-block {
  font-family: var(--font-mono);
  background-color: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  overflow-x: auto;
}

/* KaTeX & MathJax Formatting */
.katex-display {
  background-color: var(--color-azul-light);
  border-left: 4px solid var(--track-math);
  padding: 1.15rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0 !important;
  overflow-x: auto;
}

[data-theme="dark-obsidian"] .katex-display,
.dark .katex-display {
  background-color: rgba(59, 130, 246, 0.15);
  border-left-color: #60A5FA;
}

.katex {
  font-size: 1.05em;
}
