/* The partner API document, rendered. The source is docs/partner-api.md in the
   repo and there is no second copy: www/build_docs.py renders it into the image
   at build time, so the page and the file we hand people cannot drift. */

.doc { display: grid; grid-template-columns: 15rem minmax(0, 1fr); align-items: start; }
.doc-toc {
  position: sticky; top: 2rem; padding: 2.5rem 2.5rem 3rem 0;
  font-size: .875rem; line-height: 1.4;
}
.doc-toc > p { margin: 0 0 .9rem; font-weight: 800; font-size: .8125rem;
               letter-spacing: .04em; color: var(--ink); }
.doc-toc ul { margin: 0; padding: 0; list-style: none; }
.doc-toc li { margin: 0 0 .55rem; }
.doc-toc a { color: var(--soft); text-decoration: none; display: block; }
.doc-toc a:hover { color: var(--ink); }
.doc-toc code { font-size: .95em; }

.doc-body { border-left: 1px solid var(--line); padding: 2.5rem 0 5rem 2.5rem; min-width: 0; }
.doc-body > h1:first-child { margin-bottom: .4rem; }
.doc-body h2 { font-size: 1.375rem; margin: 3.2rem 0 0; scroll-margin-top: 1.5rem; }
.doc-body h3 { font-size: 1.0625rem; margin: 2.1rem 0 0; }
.doc-body h4 { font-size: .9375rem; margin: 1.6rem 0 0; font-weight: 800; }
.doc-body p, .doc-body li { max-width: 74ch; }
.doc-body ul, .doc-body ol { margin: 1rem 0 0; padding-left: 1.25rem; }
.doc-body li { margin: .4rem 0; }
.doc-body hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0 0; }
.doc-body a { color: var(--ink); text-underline-offset: 3px; }
.doc-body strong { font-weight: 800; }

/* Code is the one place a monospace face belongs: it is data, not a label. */
.doc-body code, .doc-body pre {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}
.doc-body code {
  font-size: .875em; background: var(--code-bg); border-radius: 4px;
  padding: .12em .34em; overflow-wrap: break-word;
}
.doc-body pre {
  margin: 1.1rem 0 0; padding: 1rem 1.15rem; border-radius: 9px;
  background: var(--code-bg); border: 1px solid var(--line);
  overflow-x: auto; font-size: .8125rem; line-height: 1.55; max-width: 100%;
}
.doc-body pre code { background: none; padding: 0; font-size: inherit; }

.doc-body table {
  border-collapse: collapse; margin: 1.2rem 0 0; font-size: .9375rem;
  display: block; overflow-x: auto; max-width: 100%;
}
.doc-body th, .doc-body td {
  text-align: left; vertical-align: top; padding: .55rem .9rem .55rem 0;
  border-bottom: 1px solid var(--line);
}
.doc-body th { font-weight: 800; border-bottom-color: var(--faint); white-space: nowrap; }

/* The raw files, offered before the prose: the document is meant to be read by
   machines as much as by people. */
.doc-raw {
  margin: 1.4rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--line);
  font-size: .875rem; color: var(--soft); max-width: 74ch;
}
.doc-raw a { color: var(--ink); }

@media (max-width: 860px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .doc-toc { position: static; padding: 2rem 0 1.5rem; }
  .doc-toc ul { columns: 2; column-gap: 2rem; }
  .doc-body { border-left: 0; border-top: 1px solid var(--line); padding: 2rem 0 4rem; }
}
