/* Garcon documentation. Same tokens as the dashboard (web/src/lib/theme.css), no build step. */
:root {
	color-scheme: light;
	--page: #f4f6f8;
	--surface: #ffffff;
	--sidebar: #fbfcfd;
	--accent: #246456;
	--accent-soft: #e7f1ed;
	--accent-border: #c9dfd5;
	--text: #202a35;
	--text-secondary: #586575;
	--text-muted: #677586;
	--border: rgba(11, 11, 11, 0.1);
	--code-bg: #eef1f4;
	--warn-bg: #fff6e0;
	--warn-border: #f0d48a;
}
@media (prefers-color-scheme: dark) {
	:root {
		color-scheme: dark;
		--page: #11171e;
		--surface: #19232e;
		--sidebar: #151d26;
		--accent: #83cfb6;
		--accent-soft: #203a35;
		--accent-border: #31584b;
		--text: #edf2f7;
		--text-secondary: #b3c0cd;
		--text-muted: #93a3b5;
		--border: rgba(255, 255, 255, 0.1);
		--code-bg: #0f151c;
		--warn-bg: #33290f;
		--warn-border: #6b5520;
	}
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
	margin: 0;
	background: var(--page);
	color: var(--text);
	font: 15px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
code, pre, kbd {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
}
code { background: var(--code-bg); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
pre {
	margin: 0;
	padding: 12px 14px;
	background: var(--code-bg);
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow-x: auto;
	line-height: 1.5;
}
pre code { background: none; padding: 0; font-size: 13px; }

.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side {
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	padding: 28px 20px;
	background: var(--sidebar);
	border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; margin-bottom: 24px; }
.brand-mark {
	display: grid; place-items: center;
	width: 34px; height: 34px; border-radius: 8px;
	background: var(--accent); color: #fff;
	font: 700 17px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.brand strong { display: block; font-size: 15px; }
.brand small { display: block; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.side h2 { font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-muted); margin: 20px 0 6px; }
.side a.nav { display: block; padding: 6px 10px; border-radius: 6px; color: var(--text-secondary); text-decoration: none; font-size: 13px; }
.side a.nav:hover { background: var(--accent-soft); color: var(--text); }
.side a.nav[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.side a.nav.sub.active { color: var(--accent); font-weight: 600; }
.side a.nav.sub { padding-left: 22px; font-size: 12px; }
.side .repo { margin-top: 24px; font-size: 12px; }

main { padding: 40px 48px 96px; max-width: 880px; min-width: 0; }
h1 { font-size: 32px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.01em; }
.lede { font-size: 17px; color: var(--text-secondary); margin: 0 0 32px; max-width: 64ch; }
section { margin-bottom: 56px; }
section h2 { font-size: 24px; margin: 0 0 12px; padding-top: 24px; border-top: 1px solid var(--border); }
section:first-of-type h3:first-child { margin-top: 0; }
section h3 { font-size: 17px; margin: 28px 0 8px; }
p, li { max-width: 72ch; }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 12px 0; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; color: var(--text-secondary); font-size: 12px; }
.scroll { overflow-x: auto; }

.block { position: relative; margin: 12px 0 18px; }
.block .label {
	display: flex; justify-content: space-between; align-items: center;
	font-size: 12px; color: var(--text-secondary);
	padding: 6px 12px; background: var(--surface);
	border: 1px solid var(--border); border-bottom: none; border-radius: 8px 8px 0 0;
}
.block .label + pre { border-radius: 0 0 8px 8px; }
.copy {
	font: inherit; font-size: 12px;
	padding: 2px 10px; border-radius: 6px; cursor: pointer;
	border: 1px solid var(--border); background: none; color: inherit;
}
.copy:hover { background: var(--accent-soft); }

.callout {
	padding: 12px 16px; border-radius: 8px; margin: 14px 0;
	background: var(--accent-soft); border: 1px solid var(--accent-border);
}
.callout.warn { background: var(--warn-bg); border-color: var(--warn-border); }
.callout p { margin: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li {
	position: relative; padding-left: 40px; margin: 14px 0; max-width: none;
}
.steps > li::before {
	counter-increment: step; content: counter(step);
	position: absolute; left: 0; top: 2px;
	width: 26px; height: 26px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--accent); color: #fff; font-size: 13px; font-weight: 600;
}
.steps > li strong { display: block; margin-bottom: 2px; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 14px; }
dt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--text-secondary); }
dd { margin: 0; }
.muted { color: var(--text-muted); font-size: 13px; }
.shot { margin: 20px 0 28px; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); }
.shot figcaption { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.diagram { margin: 16px 0 20px; }
.diagram svg { display: block; width: 100%; height: auto; max-width: 760px; }
.diagram figcaption { font-size: 13px; color: var(--text-muted); max-width: 72ch; margin-top: 8px; }
table.compare th { vertical-align: top; }
table.compare tbody th { font-weight: 500; color: var(--text); font-size: 14px; width: 30%; }
table.compare td:nth-child(2) { width: 36%; }
.steps > li a { color: inherit; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); }
.pager a { text-decoration: none; font-weight: 600; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); min-width: 160px; }
.pager a.next { text-align: right; }
.pager a:hover { border-color: var(--accent-border); background: var(--accent-soft); }
.pager small { display: block; font-weight: 400; font-size: 11px; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; }

@media (max-width: 800px) {
	.shell { grid-template-columns: minmax(0, 1fr); }
	.side { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 20px 16px; }
	.side h2 { margin-top: 12px; }
	.side a.nav { display: inline-block; }
	.side a.nav.sub { padding-left: 10px; }
	.side a.nav[aria-current="page"] { box-shadow: none; }
	main { padding: 24px 16px 64px; }
	h1 { font-size: 26px; }
	dl { grid-template-columns: 1fr; gap: 2px; }
	dd { margin-bottom: 8px; }
}
