/* The API docs (docs.mjs), on top of landing.css: its fonts, colours, header, logo and footer. A sidebar of pages, the
   text, and on wide screens the page's own sections. Code is navy like the landing's API block. No motion besides
   hover colours. */
.docs { background: var(--white); }
.dwrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .dwrap { padding: 0 32px; } }
.dlabel { margin-left: 4px; padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--navy); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.docs .lang { margin-left: auto; }
@media (max-width: 340px) { .dlabel { display: none; } }

.dgrid { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .dgrid { grid-template-columns: 232px minmax(0, 1fr); column-gap: 56px; } }
@media (min-width: 1320px) { .dgrid { grid-template-columns: 232px minmax(0, 780px) 208px; justify-content: space-between; } }

/* The pages: the sidebar on wide screens, a disclosure above the text on narrow ones. */
.side { display: none; }
@media (min-width: 1000px) {
  .side { display: block; position: sticky; top: 64px; align-self: start; max-height: calc(100dvh - 64px); overflow-y: auto; padding: 36px 4px 48px 0; overscroll-behavior: contain; }
  .side-m { display: none; }
}
.side-g { margin: 24px 0 6px; padding-left: 12px; font-size: 13px; font-weight: 700; color: var(--muted); }
.side-g:first-child { margin-top: 0; }
.side a, .side-in a { display: block; padding: 7px 12px; border-radius: 12px; font-size: 15.5px; font-weight: 600; line-height: 1.3; color: var(--ink-2); text-decoration: none; transition: background-color 150ms ease, color 150ms ease; }
.side a[aria-current="page"], .side-in a[aria-current="page"] { background: var(--soft); color: var(--navy); }
@media (hover: hover) and (pointer: fine) { .side a:hover, .side-in a:hover { background: var(--tint); color: var(--navy); } }
.side-m { margin: 0 -16px; border-bottom: 1px solid var(--line); }
.side-m summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; font-size: 16px; font-weight: 700; cursor: pointer; list-style: none; }
.side-m summary::-webkit-details-marker { display: none; }
.side-m summary::after { content: ""; width: 9px; height: 9px; border: solid currentColor; border-width: 0 2.4px 2.4px 0; transform: translateY(-3px) rotate(45deg); transition: transform 160ms var(--ease-out); }
.side-m[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.side-in { padding: 0 4px 20px; }

/* The page's sections, wide screens only. */
.toc { display: none; }
@media (min-width: 1320px) {
  .toc { display: block; position: sticky; top: 64px; align-self: start; max-height: calc(100dvh - 64px); overflow-y: auto; padding: 44px 0 48px; }
  .toc p { font-size: 13px; font-weight: 700; color: var(--muted); }
  .toc ul { margin-top: 10px; border-left: 2px solid var(--line); }
  .toc a { display: block; margin-left: -2px; padding: 5px 0 5px 14px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.35; color: var(--ink-2); text-decoration: none; }
  .toc a:hover { color: var(--navy); border-left-color: var(--blue); }
}

/* The text. */
.doc { min-width: 0; padding: 0 0 80px; }
.doc > h1 { margin-top: 32px; font-size: clamp(36px, 5vw, 56px); line-height: 1.02; letter-spacing: -.03em; font-weight: 800; text-wrap: balance; }
.doc > .lead { margin-top: 16px; max-width: 36em; font-size: clamp(18px, 1.7vw, 20px); line-height: 1.5; color: var(--ink-2); }
@media (min-width: 1000px) { .doc { padding-top: 12px; } .doc > h1 { margin-top: 40px; } }

.prose { margin-top: 8px; font-size: 17px; line-height: 1.65; }
.prose h2 { margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--line); font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.prose h3 { margin-top: 36px; font-size: 20px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; }
.prose h4 { margin-top: 28px; font-size: 17px; font-weight: 800; }
.prose h2:first-child { margin-top: 32px; }
.prose p, .prose ul, .prose ol { margin-top: 14px; max-width: 42em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--blue); font-weight: 700; }
.prose strong { font-weight: 700; }
.prose a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .prose a:hover { text-decoration-thickness: 2px; } }
.prose :not(pre) > code, .ep code { font: 500 .87em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.prose :not(pre) > code { padding: .12em .38em; border-radius: 6px; background: var(--soft); color: var(--navy); }
.prose a code { color: inherit; }
.hash { margin-left: 8px; color: var(--field); font-weight: 600; text-decoration: none !important; opacity: 0; transition: opacity 150ms ease; }
.prose h2:hover .hash, .prose h3:hover .hash { opacity: 1; }

/* An endpoint: the method as a pill, then the path. Path parameters stand out. */
.ep { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.prose .ep { margin-top: 12px; }
.prose .ep code { padding: 0; background: none; font-size: 16px; font-weight: 600; color: var(--navy); }
.ep i { font-style: normal; color: var(--blue); }
.verb { display: inline-grid; place-items: center; min-width: 64px; padding: 3px 10px; border-radius: 999px; font: 800 13px/1.4 Onest, system-ui, sans-serif; letter-spacing: .03em; }
.v-get { background: var(--soft); color: var(--blue); }
.v-post { background: var(--lime); color: var(--navy); }
.v-put, .v-patch { background: #FFE9A8; color: var(--navy); }
.v-delete { background: #FDE3E1; color: #B42318; }

/* Tables: parameters, fields, errors. Wide ones scroll inside themselves. */
.tbl { margin-top: 16px; overflow-x: auto; border-radius: 4px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th { padding: 0 16px 8px 0; border-bottom: 1px solid var(--field); text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.prose td { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose td:first-child { min-width: 9em; }
.prose td code { white-space: nowrap; }
.prose td:first-child code { font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }
@media (max-width: 639px) {
  .prose table, .prose tbody, .prose tr, .prose td { display: block; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .prose tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .prose tr:last-child { border-bottom: 0; }
  .prose td { padding: 2px 0; border: 0; }
  .prose td:first-child { min-width: 0; padding-bottom: 4px; }
  .prose td::before { content: attr(data-label); display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); }
  .prose td:first-child::before { content: none; }
  .prose td.short { display: inline-block; margin-right: 20px; }
  .prose td.short::before { display: inline; margin-right: 6px; }
}

/* Notes. */
.callout { margin-top: 18px; max-width: 42em; padding: 16px 20px; border-radius: 16px; background: var(--tint); }
.callout p { margin-top: 0; font-size: 16px; }
.callout p + p { margin-top: 8px; }

/* Code. The label row holds what the block is (request, response and its status) and the copy button (docs.js). */
.cb { margin-top: 16px; border-radius: 20px; background: var(--navy); color: var(--white); overflow: hidden; }
.cb-head { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0 !important; padding: 8px 8px 0 20px; font-size: 12.5px !important; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #B8C6EE; max-width: none !important; }
.cb-head b { padding: 1px 9px; border-radius: 999px; background: var(--lime); color: var(--navy); letter-spacing: 0; }
.cb pre { margin: 0; padding: 10px 20px 20px; overflow-x: auto; scrollbar-color: rgba(255,255,255,.28) transparent; font: 500 14px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; }
.cb code { font: inherit; }
.cb pre:focus-visible { outline-offset: -3px; --focus: var(--lime); }
.cb .m, .cb .k { color: var(--lime); }
.cb .h { color: #B8C6EE; }
.cb .s { color: #A9C1FF; }
.cb .n { color: var(--white); }
.copy { margin-left: auto; min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255,255,255,.1); color: var(--white); font: 700 13px/1 Onest, system-ui, sans-serif; letter-spacing: 0; text-transform: none; cursor: pointer; transition: background-color 150ms ease, transform 160ms var(--ease-out); --focus: var(--lime); }
.copy:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .copy:hover { background: rgba(255,255,255,.18); } }

/* Previous and next page. */
.pager { display: grid; gap: 12px; margin-top: 72px; }
@media (min-width: 640px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a { display: block; padding: 18px 22px; border: 1px solid var(--line); border-radius: 20px; font-size: 18px; font-weight: 700; text-decoration: none; transition: border-color 150ms ease, background-color 150ms ease; }
.pager span { display: block; margin-bottom: 2px; font-size: 14px; font-weight: 600; color: var(--muted); }
.pg-next { grid-column: -2; text-align: right; }
@media (hover: hover) and (pointer: fine) { .pager a:hover { border-color: var(--blue); background: var(--tint); } }

@media (prefers-reduced-motion: reduce) { .docs *, .docs *::before, .docs *::after { transition: none !important; } }
