/*╔══════════════════════════════════════════════════╗
  ║                        Typography                         ║
  ╚══════════════════════════════════════════════════╝*/

form legend,
h1,
h2,
h3,
h4 {
  margin-bottom: var(--space-xxs);

  color: var(--color-text-heading);
  line-height: var(--heading-line-height);
}

// ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
// Text size

.text--xxxl {
  font-size: var(--text-xxxl);
}

.text--xxl,
h1 {
  font-size: var(--text-xxl);
}

.text--xl,
h2 {
  font-size: var(--text-xl);
}

.text--lg,
h3 {
  font-size: var(--text-lg);
}

.text--md,
h4 {
  font-size: var(--text-md);
}

.text--sm,
small {
  font-size: var(--text-sm);
}

.text--xs {
  font-size: var(--text-xs);
}

p {
  margin-top: var(--space-xs);
  margin-bottom: var(--space-xs);

  line-height: var(--body-line-height);
}

b,
strong {
  font-weight: bold;
}

.text-container,
article {
  h2,
  h3,
  h4 {
    margin-top: var(--space-sm);
  }

  ol,
  p,
  ul {
    margin-bottom: var(--space-md);
  }

  ol,
  ul {
    padding-left: 24px;
  }

  em {
    font-style: italic;
  }

  u {
    text-decoration: underline;
  }
}

// ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
// Utility classes

.truncate {
  // truncate text if it exceeds parent
  text-overflow: ellipsis;

  white-space: nowrap;
  overflow: hidden;
}
