/* /docs/ supplement — only what /styles.css does not already cover for long-form answers.
   Tokens, masthead, footer, buttons and the main column come from /styles.css, so these
   pages carry the same style as the rest of the site. */

main h1 {
  max-width: 28ch;
  margin-bottom: var(--space-5);
}

main h2 {
  margin-top: var(--space-7);
  margin-bottom: var(--space-3);
}

main h3 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

main p,
main ul,
main ol,
main pre {
  max-width: 74ch;
}

main p {
  line-height: 1.7;
}

main ul,
main ol {
  margin-block: 0 var(--space-4);
  padding-left: var(--space-5);
}

main li {
  margin-bottom: var(--space-2);
  line-height: 1.7;
}

main pre {
  margin: 0 0 var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-medium);
  background: var(--terminal);
  color: var(--terminal-ink);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  line-height: 1.65;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

main pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

main :not(pre) > code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper-raised);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* wide tables (status-code matrix in the blog): scroll instead of breaking the measure */
main table {
  display: block;
  width: 100%;
  max-width: 74ch;
  margin: 0 0 var(--space-5);
  border-collapse: collapse;
  overflow-x: auto;
  font-size: var(--step--1);
}

main th,
main td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

main th {
  border-bottom-color: var(--line-strong);
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
}

/* the eyebrow line doubles as the breadcrumb on answer pages */
main .eyebrow a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

main .eyebrow a:hover {
  border-color: var(--line-strong);
}
