body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  letter-spacing: -0.011em;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  color: var(--text);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-2xl); font-weight: var(--font-bold); }
h2 { font-size: var(--text-xl); font-weight: var(--font-bold); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-base); font-weight: var(--font-semibold); }

/* Display: hero-sized text for dashboards */
.text-display {
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
}

/* Overline: uppercase label pattern */
.overline {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-md);
}

small {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Tabular nums for all data values */
.text-data {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
}

/* Data display: prominent numbers */
.text-data-lg {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  font-variant-numeric: tabular-nums;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}

/* Semantic text */
.text--success { color: var(--success); }
.text--warning { color: var(--warning); }
.text--danger { color: var(--danger); }
.text--muted { color: var(--text-muted); }
.text--secondary { color: var(--text-secondary); }
.text--faint { color: var(--text-faint); }
.text--accent { color: var(--accent); }

/* Selection */
::selection {
  background: var(--accent-muted);
  color: var(--text);
}

/* Global focus styles */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

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

  html { scroll-behavior: auto; }
}
