.legacy-main {
  padding-block: var(--page-start-space);
}

.legacy-document {
  width: min(100%, 860px);
}

.legacy-document > * + * {
  margin-block-start: var(--space-16);
}

.legacy-document :where(section, article, header, div) > * + * {
  margin-block-start: var(--space-5);
}

.legacy-document :where(h1, h2, h3, h4) {
  max-width: 28ch;
  margin-block-end: 0;
  color: var(--color-ink);
  font-weight: 900;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.legacy-document h1 {
  font-size: var(--text-display);
  line-height: 1.25;
}

.legacy-document h2 {
  margin-block-start: var(--space-16);
  font-size: var(--text-3xl);
  line-height: 1.45;
}

.legacy-document h3 {
  margin-block-start: var(--space-8);
  font-size: var(--text-xl);
  line-height: 1.55;
}

.legacy-document :where(p, li, dd) {
  max-width: 72ch;
  color: var(--color-text);
  font-size: var(--text-md);
  line-height: 2;
  text-wrap: pretty;
}

.legacy-document small {
  color: var(--color-subtle);
  font-size: var(--text-sm);
  font-weight: 850;
  line-height: 1.5;
}

.legacy-document :where(ul, ol) {
  display: grid;
  max-width: 72ch;
  gap: var(--space-3);
  padding-inline-start: var(--space-6);
}

.legacy-document a {
  color: var(--color-primary-700);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.legacy-document :where(table) {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.legacy-document :where(th, td) {
  min-width: 140px;
  padding: var(--space-4);
  border-block-end: 1px solid var(--color-border);
  text-align: start;
}

.legacy-document img {
  max-width: 100%;
  height: auto;
}
