/* The API guide at /developers (templates/developers.html): docs/API.md
   rendered to plain HTML, set in the marketing pages' palette
   (static/css/marketing.css). */

.api-doc {
    color: var(--navy-800);
    line-height: 1.65;
}

.api-doc h1,
.api-doc h2,
.api-doc h3 {
    color: var(--navy-950);
    font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
    line-height: 1.25;
    scroll-margin-top: 5rem;  /* clear of the fixed nav when a contents link jumps here */
}

.api-doc h1 { font-size: 2.25rem; margin-bottom: 1rem; }
.api-doc h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid #E5E1D8; }
.api-doc h3 { font-size: 1.2rem; margin: 2rem 0 0.75rem; }
.api-doc h3 code { font-size: 1.05rem; }

.api-doc p,
.api-doc ul,
.api-doc .table-scroll,
.api-doc pre { margin-bottom: 1rem; }

.api-doc ul { list-style: disc; padding-left: 1.5rem; }
.api-doc li { margin-bottom: 0.35rem; }

.api-doc a { color: var(--amber-600); text-decoration: underline; }

.api-doc code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875em;
    background: var(--paper);
    border-radius: 0.25rem;
    padding: 0.1em 0.35em;
    overflow-wrap: anywhere;
}

.api-doc pre {
    background: var(--navy-950);
    color: #E6EDF2;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    line-height: 1.5;
}

.api-doc pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: 0.85rem;
    overflow-wrap: normal;
}

.api-doc .table-scroll { overflow-x: auto; }

.api-doc table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9rem;
}

.api-doc th,
.api-doc td {
    border: 1px solid #E5E1D8;
    padding: 0.45rem 0.65rem;
    text-align: left;
    vertical-align: top;
}

.api-doc th { background: var(--paper); font-weight: 600; }

.api-docs-contents a { color: var(--slate-600); }
.api-docs-contents a:hover { color: var(--amber-600); }
.api-docs-contents > li { margin-top: 0.5rem; font-weight: 600; }
.api-docs-contents ul { font-weight: 400; margin: 0.25rem 0 0 0.75rem; }
.api-docs-contents ul li { margin-top: 0.15rem; }

/* The page's layout: the guide, with its links and contents beside it
   from laptop width up, above it on a phone. */
.api-docs-layout { padding-top: 2.5rem; }  /* below the sticky header, which takes its own room */
.api-docs-side { margin-bottom: 2rem; }
.api-docs-toc-wide { display: none; }

@media (min-width: 1024px) {
    .api-docs-layout { display: flex; gap: 2.5rem; }
    .api-docs-side { width: 16rem; flex-shrink: 0; margin-bottom: 0; }
    .api-docs-toc-narrow { display: none; }
    .api-docs-toc-wide { display: block; }
    .api-docs-aside {
        position: sticky;
        top: 5rem;
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
    }
}
