/*
 * The public documentation.
 *
 * Read by somebody with no account, often at 11pm against a deadline, usually
 * while copying a code block into a terminal. So: a wide reading column, code
 * that is unmistakably code, and a table of contents that stays put. Nothing
 * here collapses, folds or animates — a reference that hides things is a
 * reference somebody greps instead of reads.
 */

.docs__bar {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid #d9dee5;
    background: #fff;
}

.docs__brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: #12212e;
    text-decoration: none;
}

.docs__nav {
    display: flex;
    gap: 1.25rem;
}

.docs__nav a {
    color: #47576a;
    text-decoration: none;
}

.docs__nav a:hover,
.docs__nav a[aria-current='page'] {
    color: #12212e;
    text-decoration: underline;
}

.docs__page {
    display: grid;
    grid-template-columns: minmax(0, 15rem) minmax(0, 52rem);
    gap: 3rem;
    align-items: start;
    padding: 2rem 1.5rem 6rem;
}

/* One column below the width where a sidebar stops being navigation and starts
   being a wall between the reader and the text. */
@media (max-width: 60rem) {
    .docs__page {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    .docs__toc {
        position: static;
    }
}

.docs__toc {
    position: sticky;
    top: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.docs__toc-title {
    margin: 1.25rem 0 0.35rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.72rem;
    color: #7c8a99;
}

.docs__toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.docs__toc li {
    padding: 0.15rem 0;
}

.docs__toc a {
    color: #47576a;
    text-decoration: none;
}

.docs__toc a:hover {
    color: #12212e;
    text-decoration: underline;
}

.docs__main {
    min-width: 0;
    line-height: 1.65;
    color: #22313f;
}

.docs__main h1 {
    margin-top: 0;
}

.docs__main h2 {
    margin-top: 2.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e9ee;
}

.docs__main h3 {
    margin-top: 1.75rem;
}

.docs__version {
    font-size: 0.9rem;
    font-weight: 400;
    color: #7c8a99;
}

.docs__lead {
    font-size: 1.1rem;
    color: #47576a;
}

.docs__note {
    color: #47576a;
}

.docs__servers {
    list-style: none;
    padding: 0;
}

/* --------------------------------------------------------------- endpoints */

.endpoint {
    margin: 2rem 0 3rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e5e9ee;
    border-radius: 6px;
    background: #fff;
}

.endpoint h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.endpoint__summary {
    font-size: 1.02rem;
    color: #47576a;
    margin-top: -0.25rem;
}

.endpoint h4 {
    margin: 1.5rem 0 0.5rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7c8a99;
}

/* The verb carries the weight, so it is the thing the eye lands on when
   scanning the page for the one call being looked for. */
.verb {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    font: 700 0.75rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.03em;
    color: #fff;
    background: #47576a;
}

.verb--get { background: #1f6f4a; }
.verb--post { background: #1b4f8a; }
.verb--patch { background: #8a5a12; }
.verb--put { background: #8a5a12; }
.verb--delete { background: #8a2323; }

.pill {
    display: inline-block;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.pill--planned {
    background: #f3e6c8;
    color: #6b4e10;
}

.planned-note {
    padding: 0.6rem 0.85rem;
    border-left: 3px solid #d8b95e;
    background: #fdf8ec;
    color: #47576a;
}

.status {
    font-weight: 700;
}

.status--2 { color: #1f6f4a; }
.status--4 { color: #8a5a12; }
.status--5 { color: #8a2323; }

/* ------------------------------------------------------------------ blocks */

.callout {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    border-left: 4px solid;
}

.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* The verification gate. Loud, because the alternative is a support ticket. */
.callout--gate {
    border-color: #b03a3a;
    background: #fdf0f0;
}

/* Why published:false exists. Loud, because it is the sales argument. */
.callout--why {
    border-color: #1b4f8a;
    background: #eef4fb;
}

.code {
    margin: 0.75rem 0;
    padding: 0.9rem 1rem;
    overflow-x: auto;
    border-radius: 5px;
    background: #14202b;
    color: #e6edf3;
    font-size: 0.85rem;
    line-height: 1.55;
}

.code code {
    background: none;
    color: inherit;
    padding: 0;
    white-space: pre;
}

.detail {
    margin: 0.75rem 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e9ee;
    border-radius: 5px;
}

.detail summary {
    cursor: pointer;
    color: #47576a;
}

/* ------------------------------------------------------------------ tables */

.table {
    width: 100%;
    margin: 0.75rem 0;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th,
.table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #e5e9ee;
    text-align: left;
    vertical-align: top;
}

.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7c8a99;
}

.table--schema td:first-child {
    white-space: nowrap;
}

/* A schema nested inside a cell is a detail of that row, not a peer of the
   table it sits in. */
.table--schema .table {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
}

.schema-entry {
    margin: 1.5rem 0;
}

/* ------------------------------------------- markdown coming from the spec */

.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

.prose table {
    border-collapse: collapse;
    font-size: 0.9rem;
}

.prose th,
.prose td {
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid #e5e9ee;
    text-align: left;
}

.prose pre {
    padding: 0.75rem 0.9rem;
    overflow-x: auto;
    border-radius: 5px;
    background: #14202b;
    color: #e6edf3;
    font-size: 0.85rem;
}

.prose pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Inside a table cell the prose is one or two sentences and must not open up
   the row height with paragraph margins. */
.prose--tight p {
    margin: 0 0 0.35rem;
}

.prose--tight > :last-child {
    margin-bottom: 0;
}

.muted {
    color: #7c8a99;
}
