/* The documentation site. The colours and type are the app's (src/web/base.css), so the two read as one product. */
:root {
	--bg: #f6f5f2;
	--panel: #fff;
	--side: #efeeea;
	--line: #e2e0da;
	--line2: #efede8;
	--ink: #1b1b19;
	--dim: #5f5e59;
	--faint: #99978f;
	--acc: #2f55d4;
	--sel: #e9eefc;
	--pass: #177a47;
	--pass-soft: #e4f4ea;
	--warn: #9a5a00;
	--warn-soft: #fcefd2;
	--fail: #c2352b;
	--fail-soft: #fdebe9;
	--sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, "JetBrains Mono", "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
	--top: 52px;
	color-scheme: light;
}
:root[data-theme="dark"] {
	--bg: #0f100f;
	--panel: #151615;
	--side: #0b0c0b;
	--line: #282927;
	--line2: #1e1f1d;
	--ink: #eae9e5;
	--dim: #a5a49d;
	--faint: #6f6e68;
	--acc: #8ea3ff;
	--sel: #1b2140;
	--pass: #4fc48b;
	--pass-soft: #11271c;
	--warn: #e6a63c;
	--warn-soft: #2f2510;
	--fail: #ff7669;
	--fail-soft: #341816;
	color-scheme: dark;
}
* {
	box-sizing: border-box;
}
html {
	scroll-padding-top: calc(var(--top) + 16px);
}
body {
	margin: 0;
	font: 15px / 1.65 var(--sans);
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}
a {
	color: var(--acc);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}
button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}
:focus-visible {
	outline: 2px solid var(--acc);
	outline-offset: 2px;
}
kbd {
	font: 500 12px / 18px var(--mono);
	border: 1px solid var(--line);
	border-bottom-width: 2px;
	border-radius: 4px;
	padding: 0 5px;
	background: var(--panel);
	color: var(--dim);
	white-space: nowrap;
}
.skip {
	position: absolute;
	left: -999px;
	top: 8px;
	z-index: 30;
	padding: 6px 10px;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 6px;
}
.skip:focus {
	left: 8px;
}

/* the bar across the top */
.top {
	position: sticky;
	top: 0;
	z-index: 20;
	height: var(--top);
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0 18px;
	background: var(--side);
	border-bottom: 1px solid var(--line);
}
.brand {
	display: flex;
	align-items: center;
	gap: 9px;
	color: var(--ink);
	text-decoration: none;
	font-size: 14px;
}
.logo {
	width: 24px;
	height: 24px;
	padding: 4px;
	border-radius: 6px;
	background: var(--ink);
	color: var(--panel);
	display: grid;
}
.brand-docs {
	color: var(--dim);
	border-left: 1px solid var(--line);
	padding-left: 9px;
}
.search {
	position: relative;
	margin-left: auto;
	width: min(360px, 40vw);
	display: flex;
	align-items: center;
}
.search input {
	width: 100%;
	height: 32px;
	padding: 0 34px 0 12px;
	border: 1px solid var(--line);
	border-radius: 7px;
	background: var(--panel);
	color: var(--ink);
	font: 13px var(--sans);
}
.search > kbd {
	position: absolute;
	right: 8px;
	pointer-events: none;
}
.search-results {
	position: absolute;
	top: 38px;
	right: 0;
	width: min(560px, 92vw);
	max-height: 70vh;
	overflow: auto;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 10px;
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
	padding: 6px;
}
.search-results a {
	display: block;
	padding: 8px 10px;
	border-radius: 7px;
	color: var(--ink);
	text-decoration: none;
}
.search-results a[aria-selected="true"],
.search-results a:hover {
	background: var(--sel);
}
.search-results .where {
	font-size: 12px;
	color: var(--dim);
}
.search-results .what {
	font-weight: 600;
}
.search-results .words {
	font-size: 13px;
	color: var(--dim);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.search-results mark {
	background: var(--warn-soft);
	color: inherit;
	border-radius: 2px;
}
.search-results .none {
	padding: 10px;
	color: var(--dim);
	font-size: 13px;
}
.to-app {
	font-size: 13px;
	white-space: nowrap;
}
.theme,
.menu {
	width: 30px;
	height: 30px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--panel);
	flex: none;
}
.menu {
	display: none;
}

/* the three columns */
.layout {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr) 230px;
	max-width: 1560px;
	margin: 0 auto;
}
.side,
.toc {
	position: sticky;
	top: var(--top);
	align-self: start;
	max-height: calc(100vh - var(--top));
	overflow: auto;
	padding: 22px 16px 40px;
	font-size: 13.5px;
}
.side {
	border-right: 1px solid var(--line);
	min-height: calc(100vh - var(--top));
}
.nav-title {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--faint);
	padding: 0 8px 6px;
}
.nav-section + .nav-section {
	margin-top: 20px;
}
.nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.side a,
.toc a {
	display: block;
	padding: 4px 8px;
	border-radius: 6px;
	color: var(--dim);
	text-decoration: none;
	line-height: 1.4;
}
.side a:hover,
.toc a:hover {
	color: var(--ink);
	background: var(--line2);
}
.side a[aria-current="page"] {
	color: var(--ink);
	background: var(--sel);
	font-weight: 600;
}
.toc-3 a {
	padding-left: 20px;
}
.toc a.here {
	color: var(--ink);
	box-shadow: inset 2px 0 0 var(--acc);
}
main {
	min-width: 0;
	padding: 34px 44px 60px;
}
/* Text keeps a line a person can read. A diagram takes the width there is. */
article > * {
	max-width: 820px;
}
article > .diagram {
	max-width: 1040px;
}

/* the page itself */
article p,
article ul,
article ol {
	margin: 0 0 14px;
}
article h1 {
	font-size: 30px;
	line-height: 1.2;
	letter-spacing: -0.01em;
	margin: 0 0 12px;
}
article h1 + p {
	font-size: 17px;
	color: var(--dim);
	margin-top: 0;
}
article h2 {
	font-size: 21px;
	line-height: 1.3;
	margin: 40px 0 10px;
	padding-top: 22px;
	border-top: 1px solid var(--line);
}
article h3 {
	font-size: 16.5px;
	margin: 28px 0 8px;
}
.anchor {
	color: var(--faint);
	text-decoration: none;
	opacity: 0;
	padding: 0 4px;
	font-weight: 400;
}
h2:hover .anchor,
h3:hover .anchor,
.anchor:focus-visible {
	opacity: 1;
}
article li {
	margin: 4px 0;
}
article li > p {
	margin-bottom: 6px;
}
article code {
	font: 0.875em var(--mono);
	background: var(--line2);
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: 1px 5px;
}
article pre {
	position: relative;
	margin: 0 0 16px;
	padding: 14px 16px;
	overflow: auto;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 9px;
	font: 13px / 1.55 var(--mono);
}
article pre code {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
}
.copy {
	position: absolute;
	top: 7px;
	right: 7px;
	padding: 2px 8px;
	border: 1px solid var(--line);
	border-radius: 5px;
	background: var(--bg);
	color: var(--dim);
	font: 12px var(--sans);
	opacity: 0;
}
pre:hover .copy,
.copy:focus-visible {
	opacity: 1;
}
.table-wrap {
	overflow-x: auto;
	margin: 0 0 16px;
	border: 1px solid var(--line);
	border-radius: 9px;
	background: var(--panel);
}
table {
	border-collapse: collapse;
	width: 100%;
	font-size: 14px;
}
th,
td {
	text-align: left;
	vertical-align: top;
	padding: 8px 12px;
	border-bottom: 1px solid var(--line2);
}
th {
	font-size: 12px;
	font-weight: 600;
	color: var(--dim);
	background: var(--side);
	border-bottom-color: var(--line);
	white-space: nowrap;
}
tr:last-child td {
	border-bottom: 0;
}
blockquote {
	margin: 0 0 16px;
	padding: 2px 16px;
	border-left: 3px solid var(--line);
	color: var(--dim);
}
.callout {
	padding: 12px 16px;
	border: 1px solid var(--line);
	border-left: 3px solid var(--acc);
	border-radius: 8px;
	background: var(--panel);
	color: var(--ink);
}
.callout p:last-child {
	margin-bottom: 0;
}
.callout-title {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--acc);
	margin-bottom: 4px;
}
.callout-tip {
	border-left-color: var(--pass);
}
.callout-tip .callout-title {
	color: var(--pass);
}
.callout-warning,
.callout-caution {
	border-left-color: var(--warn);
	background: var(--warn-soft);
}
.callout-warning .callout-title,
.callout-caution .callout-title {
	color: var(--warn);
}
figure {
	margin: 0 0 20px;
}
figcaption {
	margin-top: 8px;
	font-size: 13px;
	color: var(--dim);
}
.diagram iframe {
	display: block;
	width: 100%;
	height: min(720px, 84vh);
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--panel);
}
.shot img {
	display: block;
	max-width: 100%;
	height: auto;
	border: 1px solid var(--line);
	border-radius: 10px;
}
.shot .only-dark,
:root[data-theme="dark"] .shot .only-light {
	display: none;
}
:root[data-theme="dark"] .shot .only-dark {
	display: block;
}
hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 28px 0;
}
.pager {
	max-width: 820px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-top: 48px;
}
.pager a {
	display: block;
	padding: 12px 16px;
	border: 1px solid var(--line);
	border-radius: 9px;
	background: var(--panel);
	color: var(--ink);
	text-decoration: none;
}
.pager a:hover {
	border-color: var(--acc);
}
.pager span {
	display: block;
	font-size: 12px;
	color: var(--dim);
}
.pager-next {
	text-align: right;
}
.foot {
	max-width: 820px;
	margin-top: 28px;
	padding-top: 16px;
	border-top: 1px solid var(--line);
	font-size: 12.5px;
	color: var(--faint);
}
.foot code {
	font: 12px var(--mono);
}

@media (max-width: 1120px) {
	.layout {
		grid-template-columns: 250px minmax(0, 1fr);
	}
	.toc {
		display: none;
	}
}
@media (max-width: 800px) {
	.layout {
		grid-template-columns: minmax(0, 1fr);
	}
	.menu {
		display: block;
	}
	.side {
		display: none;
		position: fixed;
		inset: var(--top) 0 0 0;
		z-index: 15;
		max-height: none;
		background: var(--side);
		border-right: 0;
	}
	.pages-open .side {
		display: block;
	}
	main {
		padding: 24px 18px 48px;
	}
	.brand-docs,
	.search > kbd {
		display: none;
	}
	.search {
		width: auto;
		flex: 1;
	}
	.to-app {
		display: none;
	}
}
@media print {
	.top,
	.side,
	.toc,
	.pager,
	.copy {
		display: none;
	}
	.layout {
		display: block;
	}
}
