@font-face {
	font-family: "Manrope";
	src: url("fonts/manrope.woff2") format("woff2");
	font-weight: 200 800;
	font-display: swap;
}

@font-face {
	font-family: "Unbounded";
	src: url("fonts/unbounded-500.woff2") format("woff2");
	font-weight: 500;
	font-display: swap;
}

@font-face {
	font-family: "Unbounded";
	src: url("fonts/unbounded-700.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
}

:root {
	--ink: #11100e;
	--surface: #181613;
	--surface-2: #201d19;
	--line: #2a2621;
	--line-2: #3d3730;
	--text: #efe8dc;
	--muted: #aaa194;
	--faint: #7f776b;
	--accent: #d9733b;
	--accent-deep: #8f4219;
	--accent-ink: #1d0f06;
	--param: #82bfa8;
	--opt: #c9a45e;
	--perm: #c9bca6;
	--note: #c9a45e;
	--display: "Unbounded", "Segoe UI", sans-serif;
	--body: "Manrope", "Segoe UI", sans-serif;
	--mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--rail: 280px;
	--toc: 232px;
	--bar: 58px;
	color-scheme: dark;
}

:root[data-theme="light"] {
	--ink: #f3eee4;
	--surface: #ebe4d6;
	--surface-2: #e2d9c7;
	--line: #d8cfbd;
	--line-2: #bdb19b;
	--text: #1f1b16;
	--muted: #5c5448;
	--faint: #837a6b;
	--accent: #b4561f;
	--accent-deep: #7d3a12;
	--accent-ink: #fff4ea;
	--param: #2d6f58;
	--opt: #8a6420;
	--perm: #4b4437;
	--note: #8a6420;
	color-scheme: light;
}

@media (prefers-color-scheme: light) {
	:root:not([data-theme="dark"]) {
		--ink: #f3eee4;
		--surface: #ebe4d6;
		--surface-2: #e2d9c7;
		--line: #d8cfbd;
		--line-2: #bdb19b;
		--text: #1f1b16;
		--muted: #5c5448;
		--faint: #837a6b;
		--accent: #b4561f;
		--accent-deep: #7d3a12;
		--accent-ink: #fff4ea;
		--param: #2d6f58;
		--opt: #8a6420;
		--perm: #4b4437;
		--note: #8a6420;
		color-scheme: light;
	}
}

* {
	box-sizing: border-box;
}

[hidden] {
	display: none !important;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--bar) + 24px);
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--ink);
	color: var(--text);
	font: 500 16px/1.7 var(--body);
	-webkit-font-smoothing: antialiased;
	text-wrap: pretty;
}

a {
	color: inherit;
}

p {
	margin: 0 0 1em;
}

code,
kbd {
	font-family: var(--mono);
	font-size: 0.88em;
}

p code,
li code,
td code {
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 3px;
	padding: 0.05em 0.35em;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 2px;
}

.skip {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 100;
	background: var(--accent);
	color: var(--accent-ink);
	padding: 8px 14px;
	font-weight: 800;
	text-decoration: none;
}

.skip:focus {
	top: 10px;
}

.bar {
	position: sticky;
	top: 0;
	z-index: 50;
	height: var(--bar);
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0 20px;
	background: var(--ink);
	border-bottom: 1px solid var(--line);
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	font: 700 15px var(--display);
	letter-spacing: -0.03em;
	white-space: nowrap;
}

.brand .mark {
	width: 28px;
	height: 28px;
	flex: none;
}

.brand .sep {
	width: 1px;
	height: 20px;
	background: var(--line-2);
}

.brand .sub {
	font: 500 12px var(--display);
	letter-spacing: 0;
	color: var(--muted);
}

.bar .grow {
	flex: 1;
}

.find {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 38px;
	width: min(360px, 38vw);
	padding: 0 12px;
	background: var(--surface);
	border: 1px solid var(--line-2);
	border-radius: 4px;
	color: var(--faint);
	font: 600 14px var(--body);
	cursor: pointer;
	text-align: left;
}

.find:hover {
	border-color: var(--faint);
	color: var(--muted);
}

.find span {
	flex: 1;
}

.find kbd {
	border: 1px solid var(--line-2);
	border-bottom-width: 2px;
	border-radius: 3px;
	padding: 0 6px;
	font-size: 11px;
	color: var(--muted);
}

.tool {
	height: 38px;
	min-width: 38px;
	display: inline-grid;
	place-items: center;
	padding: 0 12px;
	background: transparent;
	border: 1px solid var(--line-2);
	border-radius: 4px;
	color: var(--muted);
	font: 700 13px var(--body);
	text-decoration: none;
	cursor: pointer;
}

.tool:hover {
	color: var(--text);
	border-color: var(--faint);
}

.tool.menu {
	display: none;
}

.shell {
	display: grid;
	grid-template-columns: var(--rail) minmax(0, 1fr) var(--toc);
	max-width: 1560px;
	margin: 0 auto;
}

.rail {
	position: sticky;
	top: var(--bar);
	height: calc(100vh - var(--bar));
	overflow-y: auto;
	border-right: 1px solid var(--line);
	padding: 26px 0 40px;
	scrollbar-width: thin;
	scrollbar-color: var(--line-2) transparent;
}

.rail h2 {
	margin: 26px 0 8px;
	padding: 0 24px;
	font: 700 10px var(--display);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--faint);
}

.rail h2:first-child {
	margin-top: 0;
}

.rail a {
	position: relative;
	display: grid;
	grid-template-columns: 34px 1fr;
	align-items: baseline;
	padding: 6px 24px;
	text-decoration: none;
	color: var(--muted);
	font-weight: 600;
	font-size: 14.5px;
	line-height: 1.35;
}

.rail a i {
	font: 500 11px var(--mono);
	font-style: normal;
	color: var(--faint);
}

.rail a:hover {
	color: var(--text);
}

.rail a[aria-current="true"] {
	color: var(--text);
	background: var(--surface);
}

.rail a[aria-current="true"]::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--accent);
}

.rail a[aria-current="true"] i {
	color: var(--accent);
}

main {
	min-width: 0;
	padding: 0 56px 120px;
}

.hero {
	padding: 72px 0 56px;
	border-bottom: 1px solid var(--line);
}

.hero .kicker {
	font: 500 12px var(--mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--faint);
	margin-bottom: 22px;
}

.hero h1 {
	margin: 0;
	font: 700 clamp(38px, 5.4vw, 68px) / 1.02 var(--display);
	letter-spacing: -0.04em;
	text-wrap: balance;
}

.hero h1 em {
	font-style: normal;
	color: var(--accent);
}

.hero .lead {
	max-width: 62ch;
	margin: 26px 0 0;
	font-size: 19px;
	line-height: 1.6;
	color: var(--muted);
}

.stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-top: 44px;
	border: 1px solid var(--line);
	border-radius: 4px;
	background: var(--surface);
}

.stats div {
	padding: 18px 20px;
	border-right: 1px solid var(--line);
}

.stats div:last-child {
	border-right: 0;
}

.stats b {
	display: block;
	font: 700 30px/1 var(--display);
	letter-spacing: -0.04em;
}

.stats span {
	display: block;
	margin-top: 8px;
	font: 500 12px var(--mono);
	color: var(--faint);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

section {
	padding: 64px 0 8px;
	border-bottom: 1px solid var(--line);
	container-type: inline-size;
}

section:last-of-type {
	border-bottom: 0;
}

.head {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	align-items: end;
	column-gap: 8px;
	margin-bottom: 28px;
}

.head .num {
	font: 700 64px/0.8 var(--display);
	letter-spacing: -0.06em;
	color: transparent;
	-webkit-text-stroke: 1px var(--line-2);
	user-select: none;
}

.head h2 {
	margin: 0;
	font: 700 clamp(26px, 3.2vw, 38px) / 1.08 var(--display);
	letter-spacing: -0.035em;
	text-wrap: balance;
}

.intro {
	max-width: 68ch;
	margin-left: 104px;
	font-size: 17.5px;
	color: var(--muted);
}

.body {
	margin-left: 104px;
}

h3 {
	position: relative;
	margin: 46px 0 14px;
	padding-top: 18px;
	font: 700 17px/1.2 var(--display);
	letter-spacing: -0.02em;
}

h3::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 28px;
	height: 3px;
	background: var(--accent);
}

h3 a.anchor {
	margin-left: 8px;
	color: var(--faint);
	text-decoration: none;
	font: 500 14px var(--mono);
	opacity: 0;
}

h3:hover a.anchor,
h3 a.anchor:focus-visible {
	opacity: 1;
}

.ledger {
	border-top: 1px solid var(--line-2);
}

.cmd {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 24px;
	row-gap: 4px;
	padding: 14px 14px 14px 0;
	border-bottom: 1px solid var(--line);
	transition: background 140ms var(--ease);
}

.cmd:hover,
.cmd.hit {
	background: var(--surface);
}

.cmd::before {
	content: "";
	position: absolute;
	left: -14px;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--accent);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform 160ms var(--ease);
}

.cmd:hover::before,
.cmd.hit::before {
	transform: scaleY(1);
}

.syn {
	grid-column: 1;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	text-align: left;
	color: var(--text);
	font: 500 15px/1.5 var(--mono);
	cursor: copy;
	overflow-wrap: anywhere;
}

.syn .req {
	color: var(--param);
}

.syn .opt {
	color: var(--opt);
}

.syn .slash {
	color: var(--faint);
}

.desc {
	grid-column: 1;
	margin: 0;
	color: var(--muted);
	font-size: 15px;
	line-height: 1.5;
}

.side {
	grid-column: 2;
	grid-row: 1 / span 2;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	justify-content: center;
}

.perm {
	padding: 1px 8px 2px;
	background: transparent;
	border: 1px solid var(--line-2);
	border-bottom-width: 2px;
	border-radius: 3px;
	color: var(--perm);
	font: 500 11.5px/1.5 var(--mono);
	cursor: copy;
	max-width: 100%;
	overflow-wrap: anywhere;
	text-align: right;
}

.perm:hover {
	border-color: var(--faint);
	color: var(--text);
}

.who {
	font: 500 10.5px var(--mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--faint);
}

.copied {
	outline: 1px solid var(--param);
}

.note {
	margin: 22px 0;
	padding: 16px 18px;
	background: var(--surface);
	border-left: 3px solid var(--note);
	border-radius: 0 4px 4px 0;
	color: var(--muted);
}

.note b {
	color: var(--text);
}

.note p:last-child {
	margin-bottom: 0;
}

.steps {
	counter-reset: step;
	list-style: none;
	margin: 22px 0;
	padding: 0;
}

.steps li {
	counter-increment: step;
	position: relative;
	padding: 0 0 22px 56px;
	border-left: 1px solid var(--line-2);
	margin-left: 15px;
}

.steps li:last-child {
	border-left-color: transparent;
	padding-bottom: 0;
}

.steps li::before {
	content: counter(step);
	position: absolute;
	left: -16px;
	top: -2px;
	width: 31px;
	height: 31px;
	display: grid;
	place-items: center;
	background: var(--ink);
	border: 1px solid var(--line-2);
	border-radius: 3px;
	font: 500 13px var(--mono);
	color: var(--muted);
}

.steps b {
	display: block;
	margin-bottom: 4px;
}

.steps .syn {
	display: inline-block;
	margin-top: 4px;
	padding: 4px 10px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 3px;
}

.wrap {
	overflow-x: auto;
	margin: 18px 0;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14.5px;
}

th {
	text-align: left;
	padding: 10px 14px 10px 0;
	border-bottom: 1px solid var(--line-2);
	font: 700 10.5px var(--display);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--faint);
	white-space: nowrap;
}

td {
	padding: 11px 14px 11px 0;
	border-bottom: 1px solid var(--line);
	vertical-align: top;
	color: var(--muted);
}

td:first-child {
	color: var(--text);
}

td code {
	white-space: nowrap;
}

pre {
	margin: 18px 0;
	padding: 16px 18px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 4px;
	overflow-x: auto;
	font-size: 13.5px;
	line-height: 1.6;
}

pre code {
	background: none;
	border: 0;
	padding: 0;
}

ul.plain {
	margin: 14px 0;
	padding-left: 20px;
	color: var(--muted);
}

ul.plain li {
	margin-bottom: 6px;
}

.toc {
	position: sticky;
	top: var(--bar);
	align-self: start;
	height: calc(100vh - var(--bar));
	overflow-y: auto;
	padding: 72px 24px 40px 8px;
	scrollbar-width: none;
}

.toc h2 {
	margin: 0 0 14px;
	font: 700 10px var(--display);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--faint);
}

.toc ol {
	list-style: none;
	margin: 0;
	padding: 0 0 0 14px;
	border-left: 1px solid var(--line-2);
}

.toc li {
	position: relative;
}

.toc a {
	display: block;
	padding: 4px 0;
	color: var(--faint);
	font-weight: 600;
	font-size: 13px;
	line-height: 1.4;
	text-decoration: none;
}

.toc a:hover {
	color: var(--text);
}

.toc a[aria-current="true"] {
	color: var(--text);
}

.toc a[aria-current="true"]::before {
	content: "";
	position: absolute;
	left: -18px;
	top: 10px;
	width: 7px;
	height: 7px;
	background: var(--accent);
}

.palette {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: grid;
	justify-items: center;
	align-items: start;
	padding: 12vh 16px 0;
	background: color-mix(in srgb, var(--ink) 82%, transparent);
}

.palette .box {
	width: min(640px, 100%);
	max-height: 70vh;
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line-2);
	border-radius: 6px;
	box-shadow: 8px 8px 0 var(--line);
	overflow: hidden;
}

.palette input {
	height: 54px;
	padding: 0 18px;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--line-2);
	color: var(--text);
	font: 600 16px var(--body);
}

.palette input:focus {
	outline: none;
}

.palette ul {
	list-style: none;
	margin: 0;
	padding: 6px;
	overflow-y: auto;
}

.palette li a {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 12px;
	padding: 9px 12px;
	border-radius: 3px;
	text-decoration: none;
}

.palette li a[aria-selected="true"] {
	background: var(--surface-2);
	box-shadow: inset 3px 0 0 var(--accent);
}

.palette li .t {
	font: 500 14px var(--mono);
	overflow-wrap: anywhere;
}

.palette li .s {
	font: 500 11px var(--mono);
	color: var(--faint);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	white-space: nowrap;
}

.palette li .d {
	grid-column: 1 / -1;
	color: var(--muted);
	font-size: 13px;
}

.palette .none {
	padding: 22px;
	color: var(--faint);
}

footer {
	margin-top: 40px;
	padding: 28px 0 0;
	border-top: 1px solid var(--line);
	color: var(--faint);
	font-size: 13.5px;
}

footer a {
	color: var(--muted);
}

@media (max-width: 1180px) {
	.shell {
		grid-template-columns: var(--rail) minmax(0, 1fr);
	}

	.toc {
		display: none;
	}
}

@media (max-width: 860px) {
	:root {
		--bar: 54px;
	}

	.shell {
		grid-template-columns: minmax(0, 1fr);
	}

	.rail {
		position: fixed;
		z-index: 60;
		left: 0;
		top: var(--bar);
		width: min(320px, 86vw);
		background: var(--ink);
		transform: translateX(-102%);
		transition: transform 200ms var(--ease);
	}

	.rail.open {
		transform: none;
		box-shadow: 10px 0 0 var(--line);
	}

	.tool.menu {
		display: inline-grid;
	}

	.brand .sub,
	.brand .sep,
	.find span,
	.find kbd,
	.tool.site {
		display: none;
	}

	.find {
		width: 38px;
		justify-content: center;
		padding: 0;
	}

	main {
		padding: 0 16px 80px;
	}

	.hero {
		padding: 44px 0 36px;
	}

	.stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.stats div:nth-child(2) {
		border-right: 0;
	}

	.stats div:nth-child(-n + 2) {
		border-bottom: 1px solid var(--line);
	}

	.head {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 6px;
	}

	.head .num {
		font-size: 44px;
	}

	.intro,
	.body {
		margin-left: 0;
	}

	.cmd {
		grid-template-columns: minmax(0, 1fr);
		padding-right: 0;
	}

	.side {
		grid-column: 1;
		grid-row: auto;
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		flex-wrap: wrap;
	}

	.cmd::before {
		left: -16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	* {
		transition: none !important;
	}
}

@media print {
	.bar,
	.rail,
	.toc,
	.palette {
		display: none !important;
	}

	.shell {
		display: block;
	}

	main {
		padding: 0;
	}
}
