/* Vendora documentation. System fonts only: the page loads nothing from other servers. */
:root {
	--bg: #f6f5f0;
	--surface: #ffffff;
	--surface-2: #ecebe4;
	--text: #0e0e0c;
	--muted: #5f5e57;
	--border: rgba(14, 14, 12, 0.12);
	--accent: #d4ff3f;
	--accent-ink: #0e0e0c;
	--link: #2f4a00;
	--code-bg: #efeee7;
	--note: #eef6d8;
	--warn: #fdf1dc;
	--warn-border: #e7b552;
	--shadow: 0 10px 30px -14px rgba(14, 14, 12, 0.25);
	--radius: 14px;
	--side: 290px;
	--font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	color-scheme: light;
}

[data-theme="dark"] {
	--bg: #0e0e0c;
	--surface: #171715;
	--surface-2: #22221f;
	--text: #f3f2ec;
	--muted: #a9a8a0;
	--border: rgba(255, 255, 255, 0.12);
	--link: #d4ff3f;
	--code-bg: #22221f;
	--note: #1f2612;
	--warn: #2a2214;
	--warn-border: #9a7428;
	--shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.7);
	color-scheme: dark;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 84px;
}

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.65 var(--font);
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--link);
	text-underline-offset: 2px;
}

a:hover {
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 2px solid var(--text);
	outline-offset: 2px;
}

img {
	max-width: 100%;
	height: auto;
}

.skip {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 100;
	padding: 0.6rem 1rem;
	border-radius: 8px;
	background: var(--accent);
	color: var(--accent-ink);
	font-weight: 600;
}

.skip:focus {
	left: 8px;
}

/* Top bar */
.top {
	position: sticky;
	top: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	gap: 1rem;
	height: 64px;
	padding: 0 1.25rem;
	border-bottom: 1px solid var(--border);
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: inherit;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.brand__mark {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 9px;
	background: #0e0e0c;
	box-shadow: inset 0 0 0 1px var(--border);
	color: #f4f1ea;
}

.brand__mark svg {
	display: block;
}

.brand__version {
	padding: 0.15rem 0.5rem;
	border-radius: 99px;
	background: var(--accent);
	color: var(--accent-ink);
	font-size: 0.72rem;
	font-weight: 700;
}

.search {
	flex: 1;
	max-width: 420px;
	margin-left: auto;
}

.search input {
	width: 100%;
	padding: 0.55rem 0.9rem;
	border: 1px solid var(--border);
	border-radius: 99px;
	background: var(--surface);
	color: var(--text);
	font: inherit;
	font-size: 0.92rem;
}

.icon-btn {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: 50%;
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
}

.nav-toggle {
	display: none;
}

/* Layout */
.layout {
	display: grid;
	grid-template-columns: var(--side) minmax(0, 1fr);
	max-width: 1360px;
	margin: 0 auto;
}

.side {
	position: sticky;
	top: 64px;
	height: calc(100vh - 64px);
	overflow-y: auto;
	padding: 1.5rem 1rem 3rem 1.25rem;
	border-right: 1px solid var(--border);
	overscroll-behavior: contain;
}

.side__group {
	margin: 1.25rem 0 0.35rem;
	color: var(--muted);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.side__group:first-child {
	margin-top: 0;
}

.side ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.side a {
	display: block;
	padding: 0.3rem 0.65rem;
	border-radius: 8px;
	color: inherit;
	font-size: 0.92rem;
	text-decoration: none;
}

.side a:hover {
	background: var(--surface-2);
}

.side a.is-current {
	background: var(--text);
	color: var(--bg);
}

.side .is-hidden {
	display: none;
}

.side__empty {
	padding: 0.5rem 0.65rem;
	color: var(--muted);
	font-size: 0.9rem;
}

main {
	min-width: 0;
	padding: 2.5rem clamp(1.25rem, 4vw, 3.5rem) 5rem;
}

.doc {
	max-width: 860px;
}

/* Hero */
.hero {
	padding: clamp(1.75rem, 4vw, 2.75rem);
	border-radius: 22px;
	background:
		radial-gradient(60% 90% at 0% 0%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%),
		radial-gradient(50% 80% at 100% 100%, color-mix(in srgb, #c9b8ff 60%, transparent), transparent 70%),
		var(--surface);
	border: 1px solid var(--border);
}

.hero h1 {
	margin: 0 0 0.75rem;
	font-size: clamp(2rem, 5vw, 3rem);
	line-height: 1.05;
	letter-spacing: -0.03em;
}

.hero p {
	max-width: 40rem;
	margin: 0;
	color: var(--muted);
	font-size: 1.08rem;
}

.cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
}

/* The four cards in one row where there is room, two by two below, one under the other on phones. */
@media (min-width: 1200px) {
	.cards {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.cards {
		grid-template-columns: minmax(0, 1fr);
	}
}

.cards a {
	display: block;
	height: 100%;
	padding: 1rem 1.1rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: inherit;
	text-decoration: none;
}

.cards a:hover {
	border-color: var(--text);
}

.cards strong {
	display: block;
}

.cards span {
	color: var(--muted);
	font-size: 0.9rem;
}

/* Sections */
section {
	padding-top: 2.5rem;
}

section + section {
	margin-top: 1rem;
	border-top: 1px solid var(--border);
}

h2 {
	margin: 0 0 0.75rem;
	font-size: 1.75rem;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

h3 {
	margin: 1.75rem 0 0.5rem;
	font-size: 1.15rem;
}

h2 .anchor,
h3 .anchor {
	margin-left: 0.4rem;
	color: var(--muted);
	font-weight: 400;
	text-decoration: none;
	opacity: 0;
}

h2:hover .anchor,
h3:hover .anchor,
.anchor:focus-visible {
	opacity: 1;
}

p,
ul,
ol {
	margin: 0 0 1rem;
}

li + li {
	margin-top: 0.3rem;
}

.lead {
	color: var(--muted);
	font-size: 1.05rem;
}

.path {
	padding: 0.05rem 0.4rem;
	border-radius: 6px;
	background: var(--surface-2);
	font-size: 0.92em;
	font-weight: 600;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

code,
kbd {
	padding: 0.1rem 0.35rem;
	border-radius: 6px;
	background: var(--code-bg);
	font-family: var(--mono);
	font-size: 0.86em;
	overflow-wrap: anywhere;
}

pre {
	position: relative;
	margin: 0 0 1.25rem;
	padding: 1rem 1.1rem;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--code-bg);
	overflow-x: auto;
	font-size: 0.88rem;
	line-height: 1.55;
}

pre code {
	padding: 0;
	background: none;
	font-size: inherit;
	overflow-wrap: normal;
}

.copy {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	padding: 0.25rem 0.6rem;
	border: 1px solid var(--border);
	border-radius: 99px;
	background: var(--surface);
	color: var(--text);
	font: 600 0.75rem var(--font);
	cursor: pointer;
}

.steps {
	counter-reset: step;
	padding: 0;
	list-style: none;
}

.steps > li {
	position: relative;
	counter-increment: step;
	padding-left: 2.6rem;
}

.steps > li + li {
	margin-top: 0.75rem;
}

.steps > li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0;
	display: grid;
	place-items: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	background: var(--accent);
	color: var(--accent-ink);
	font-size: 0.85rem;
	font-weight: 700;
}

.note,
.warn {
	margin: 0 0 1.25rem;
	padding: 0.9rem 1.1rem;
	border-radius: 12px;
	background: var(--note);
	border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}

.warn {
	background: var(--warn);
	border-color: var(--warn-border);
}

.note > :last-child,
.warn > :last-child {
	margin-bottom: 0;
}

.note strong:first-child,
.warn strong:first-child {
	display: block;
	margin-bottom: 0.2rem;
}

figure {
	margin: 0.5rem 0 1.5rem;
}

figure img {
	display: block;
	border: 1px solid var(--border);
	border-radius: 12px;
	box-shadow: var(--shadow);
}

figcaption {
	margin-top: 0.6rem;
	color: var(--muted);
	font-size: 0.88rem;
}

.shots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: 1.25rem 1rem;
	margin: 0.5rem 0 1.5rem;
}

.shots figure {
	margin: 0;
}

.figure-narrow img {
	max-width: 300px;
}

.table-wrap {
	margin: 0 0 1.5rem;
	overflow-x: auto;
	border: 1px solid var(--border);
	border-radius: 12px;
}

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

th,
td {
	padding: 0.6rem 0.8rem;
	border-bottom: 1px solid var(--border);
	text-align: left;
	vertical-align: top;
}

thead th {
	background: var(--surface-2);
	font-size: 0.82rem;
	letter-spacing: 0.02em;
}

tbody tr:last-child > * {
	border-bottom: 0;
}

dl.terms {
	display: grid;
	grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
	gap: 0.5rem 1.25rem;
	margin: 0 0 1.25rem;
}

dl.terms dt {
	font-weight: 600;
}

dl.terms dd {
	margin: 0;
	color: var(--muted);
}

.doc-foot {
	margin-top: 4rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 0.9rem;
}

mark {
	padding: 0 0.1em;
	border-radius: 3px;
	background: var(--accent);
	color: var(--accent-ink);
}

/* Phones and tablets: the menu opens from the top bar. */
@media (max-width: 960px) {
	.layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.nav-toggle {
		display: grid;
	}

	.side {
		position: fixed;
		top: 64px;
		left: 0;
		z-index: 40;
		width: min(320px, 88vw);
		border-right: 1px solid var(--border);
		background: var(--bg);
		box-shadow: var(--shadow);
		transform: translateX(-105%);
		transition: transform 0.25s ease;
	}

	.side.is-open {
		transform: none;
	}

	.brand__name {
		display: none;
	}

	dl.terms {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.15rem;
	}

	dl.terms dd {
		margin-bottom: 0.6rem;
	}
}

@media (max-width: 560px) {
	.top {
		gap: 0.6rem;
		padding: 0 0.75rem;
	}

	.brand__version {
		display: none;
	}
}

@media print {
	.top,
	.side {
		display: none;
	}

	.layout {
		display: block;
	}
}
