/* The API docs (`app/docs_pages.py`), on top of landing.css and blog.css: a column of
   links beside the guide, and the reference's route blocks. Every value comes from the
   landing page's palette, so the docs read as part of the same site as the blog. No
   script: the navigation is links and the reference is a page. */

.docs-wrap {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 48px;
	max-width: 1320px;
}

/* The navigation: each section's guides, then the reference. */
.docs-nav {
	align-self: start;
	position: sticky;
	top: 24px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding: 56px 0 24px;
}
.docs-nav h2 {
	margin: 24px 0 8px;
	color: #627069;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.docs-nav h2:first-child {
	margin-top: 0;
}
.docs-nav ul {
	display: grid;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.docs-nav a {
	display: block;
	padding: 6px 10px;
	border-radius: 8px;
	color: var(--text);
	font-size: 15px;
	line-height: 1.4;
}
.docs-nav a:hover {
	color: var(--ink);
	background: var(--soft);
}
.docs-nav a[aria-current="page"] {
	background: var(--mint);
	color: var(--ink);
	font-weight: 700;
}

/* A guide: the text first, its contents beside it. */
.docs-article {
	min-width: 0;
}
.docs-article .post-head h1 {
	font-size: clamp(34px, 4vw, 48px);
}
.docs-layout {
	grid-template-columns: minmax(0, 760px) 200px;
}
.docs-layout.single {
	grid-template-columns: minmax(0, 760px);
}
.site-docs .prose {
	font-size: 17px;
}
.site-docs .prose pre code {
	font-size: 14px;
}

/* The reference: one block per route, the method and path above its tables. */
.ref-tag + .ref-tag {
	margin-top: 64px;
}
.ref-op {
	margin-top: 40px;
	padding-top: 28px;
	border-top: 1px solid var(--line);
	scroll-margin-top: 24px;
}
.ref-op h3 {
	margin-top: 0;
}
.ref-op h4 {
	margin-top: 1.4em;
	font-size: 15px;
	letter-spacing: 0.02em;
}
.ref-route {
	font-size: 15px;
}
.ref-route code {
	word-break: break-all;
}
.ref-method {
	display: inline-block;
	min-width: 62px;
	margin-right: 6px;
	padding: 2px 8px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--soft);
	color: var(--ink);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-align: center;
}
.ref-get {
	border-color: transparent;
	background: var(--mint);
}
.ref-post,
.ref-patch {
	border-color: transparent;
	background: var(--lime);
}
.ref-badge {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 9px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--text);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0;
	vertical-align: middle;
}
.ref-required {
	color: #627069;
	font-size: 12px;
}
.ref .post-table table {
	font-size: 14px;
}
.ref .post-table td:first-child code {
	white-space: nowrap;
}
.ref-errors {
	color: #627069;
	font-size: 15px;
}

@media (max-width: 1200px) {
	.docs-layout {
		grid-template-columns: minmax(0, 1fr);
	}
	.docs-layout .post-toc {
		display: none;
	}
}
@media (max-width: 1000px) {
	.docs-wrap {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}
	/* Below the guide on a narrow screen: the page opens on what was asked for, and the
	   breadcrumb above it leads back to the docs' front page. */
	.docs-nav {
		order: 2;
		position: static;
		max-height: none;
		margin: 8px 0 48px;
		padding: 18px 20px;
		border: 1px solid var(--line);
		border-radius: 16px;
		background: var(--soft);
	}
	.docs-nav ul {
		grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	}
	.docs-article .post-head {
		padding-top: 32px;
	}
}
