:root {
	--ink: #172033;
	--muted: #566176;
	--line: #d9dfeb;
	--soft: #f4f7fb;
	--brand: #176b87;
	--brand-deep: #0f5068;
	--accent: #daf0f4;
	--code: #101827;
	--warning: #8a4b00;
	--warning-bg: #fff5dd;
	--note: #155e75;
	--note-bg: #e8f7fb;
	--review: #7a284b;
	--review-bg: #fff0f6;
	--content-width: 78rem;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	color: var(--ink);
	background: #fff;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 1rem;
	line-height: 1.65;
}

a {
	color: var(--brand-deep);
	text-decoration-thickness: .08em;
	text-underline-offset: .16em;
}

a:hover {
	color: var(--brand);
}

a:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
	outline: .2rem solid #f3a712;
	outline-offset: .2rem;
}

.skip-link {
	position: fixed;
	top: .5rem;
	left: .5rem;
	z-index: 20;
	padding: .55rem .8rem;
	color: #fff;
	background: var(--code);
	transform: translateY(-160%);
}

.skip-link:focus {
	transform: none;
}

.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 4.25rem;
	padding: .75rem clamp(1rem, 4vw, 3rem);
	color: #fff;
	background: linear-gradient(115deg, var(--brand-deep), var(--brand));
}

.site-header a {
	color: inherit;
}

.site-brand {
	display: inline-flex;
	align-items: center;
	gap: .75rem;
	font-size: 1.1rem;
	font-weight: 750;
	text-decoration: none;
}

.brand-mark {
	display: inline-grid;
	place-items: center;
	width: 2.35rem;
	height: 2.35rem;
	border: .12rem solid rgb(255 255 255 / .82);
	border-radius: .65rem;
	font-size: .85rem;
	letter-spacing: .04em;
}

.header-link {
	font-weight: 650;
}

.docs-shell {
	display: grid;
	grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
	max-width: var(--content-width);
	min-height: calc(100vh - 8rem);
	margin: 0 auto;
}

.docs-sidebar {
	padding: 2rem 1.25rem 3rem clamp(1rem, 3vw, 2rem);
	border-right: 1px solid var(--line);
	background: var(--soft);
}

.docs-sidebar nav {
	position: sticky;
	top: 1.5rem;
	max-height: calc(100vh - 3rem);
	padding: .2rem;
	overflow-y: auto;
}

.nav-primary-link {
	display: block;
	margin: 0 0 1rem;
	padding: .55rem .6rem;
	border-radius: .4rem;
	color: var(--ink);
	font-size: .93rem;
	font-weight: 750;
	text-decoration: none;
}

.nav-primary-link:hover {
	background: #e6ecf5;
}

.nav-primary-link[aria-current="page"] {
	color: var(--brand-deep);
	background: var(--accent);
}

.nav-section + .nav-section {
	margin-top: .55rem;
}

.nav-section summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	padding: .55rem .6rem;
	border-radius: .4rem;
	color: var(--muted);
	font-size: .75rem;
	font-weight: 800;
	letter-spacing: .1em;
	list-style: none;
	text-transform: uppercase;
	cursor: pointer;
}

.nav-section summary::-webkit-details-marker {
	display: none;
}

.nav-section summary::after {
	content: "+";
	flex: 0 0 auto;
	font-size: 1rem;
	line-height: 1;
}

.nav-section[open] summary::after {
	content: "−";
}

.nav-section summary:hover {
	color: var(--ink);
	background: #e6ecf5;
}

.nav-section ul {
	margin: .35rem 0 0;
	padding: 0;
	list-style: none;
}

.nav-section li + li {
	margin-top: .18rem;
}

.nav-section a {
	display: block;
	padding: .42rem .6rem;
	border-radius: .4rem;
	color: var(--ink);
	font-size: .93rem;
	text-decoration: none;
}

.nav-section a:hover {
	background: #e6ecf5;
}

.nav-section a[aria-current="page"] {
	color: var(--brand-deep);
	background: var(--accent);
	font-weight: 750;
}

.nav-section .endpoint-nav-link {
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
	font-size: .83rem;
}

.docs-page,
.api-endpoint {
	width: min(100%, 57rem);
	padding: clamp(2rem, 5vw, 4.5rem) clamp(1.25rem, 5vw, 4.5rem) 5rem;
}

.page-header {
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--line);
	margin-bottom: 2.5rem;
}

.eyebrow {
	margin: 0 0 .45rem;
	color: var(--brand-deep);
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
}

h1,
h2,
h3 {
	line-height: 1.22;
	text-wrap: balance;
}

h1 {
	margin: 0;
	font-size: clamp(2.15rem, 6vw, 3.5rem);
	letter-spacing: -.035em;
}

h2 {
	margin: 3rem 0 .85rem;
	font-size: clamp(1.45rem, 3vw, 1.85rem);
	letter-spacing: -.015em;
}

h3 {
	margin: 2rem 0 .6rem;
	font-size: 1.16rem;
}

p,
ul,
ol {
	margin-top: .7rem;
	margin-bottom: 1rem;
}

.page-summary,
.endpoint-summary {
	max-width: 46rem;
	margin: 1rem 0 0;
	color: var(--muted);
	font-size: 1.16rem;
}

.endpoint-signature {
	display: flex;
	align-items: center;
	gap: .8rem;
	width: fit-content;
	max-width: 100%;
	margin-top: 1.35rem;
	padding: .72rem .9rem;
	border: 1px solid #2e3b50;
	border-radius: .55rem;
	color: #fff;
	background: var(--code);
	overflow-x: auto;
}

.endpoint-signature code {
	color: inherit;
	background: transparent;
	white-space: nowrap;
}

.http-method {
	padding: .22rem .48rem;
	border-radius: .3rem;
	color: var(--code);
	background: #67e8f9;
	font-size: .72rem;
	font-weight: 850;
	letter-spacing: .06em;
}

code,
kbd {
	padding: .1em .3em;
	border-radius: .25rem;
	color: #18344b;
	background: #edf2f7;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
	font-size: .9em;
}

pre {
	max-width: 100%;
	margin: 1rem 0 1.4rem;
	padding: 1rem 1.1rem;
	border-radius: .6rem;
	color: #e7eef9;
	background: var(--code);
	overflow-x: auto;
	line-height: 1.55;
}

pre code {
	padding: 0;
	color: inherit;
	background: transparent;
	font-size: .86rem;
}

.table-scroll {
	max-width: 100%;
	margin: 1rem 0 1.5rem;
	border: 1px solid var(--line);
	border-radius: .55rem;
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: .93rem;
}

th,
td {
	padding: .7rem .8rem;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

th {
	color: #344057;
	background: var(--soft);
	font-size: .78rem;
	letter-spacing: .035em;
	text-transform: uppercase;
}

tr:last-child td {
	border-bottom: 0;
}

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

.callout {
	margin: 1.5rem 0;
	padding: 1rem 1.1rem;
	border-left: .3rem solid;
	border-radius: .25rem;
}

.callout > :first-child {
	margin-top: 0;
}

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

.callout-warning {
	border-color: var(--warning);
	color: #573000;
	background: var(--warning-bg);
}

.callout-note {
	border-color: var(--note);
	color: #11485a;
	background: var(--note-bg);
}

.callout-review {
	border-color: var(--review);
	color: #5c1d39;
	background: var(--review-bg);
}

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
	gap: 1rem;
	margin: 1.25rem 0;
}

.card {
	padding: 1rem 1.1rem;
	border: 1px solid var(--line);
	border-radius: .55rem;
	background: #fff;
}

.card h2,
.card h3 {
	margin-top: 0;
}

.card p:last-child {
	margin-bottom: 0;
}

.site-footer {
	padding: 1.25rem clamp(1rem, 4vw, 3rem);
	border-top: 1px solid var(--line);
	color: var(--muted);
	background: var(--soft);
	font-size: .85rem;
}

.site-footer p {
	max-width: var(--content-width);
	margin: 0 auto;
}

@media (max-width: 52rem) {
	.header-link {
		display: none;
	}

	.docs-shell {
		display: block;
	}

	.docs-sidebar {
		padding: 1rem;
		border-right: 0;
		border-bottom: 1px solid var(--line);
	}

	.docs-sidebar nav {
		position: static;
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: .6rem;
		max-height: none;
		padding: 0;
		overflow-y: visible;
	}

	.nav-section {
		min-width: 0;
	}

	.nav-section + .nav-section {
		margin-top: 0;
	}

	.docs-page,
	.api-endpoint {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
