/* Mercury developer docs. One stylesheet, no build step. Tokens first; dark mode by preference or toggle. */
:root {
	--bg: #ffffff;
	--bg-soft: #f6f7f9;
	--bg-code: #f3f4f6;
	--fg: #1b1f24;
	--fg-soft: #57606a;
	--line: #e3e6ea;
	--accent: #5b3df5;
	--accent-soft: #efebff;
	--get: #0a7b3e;
	--post: #1d5fd1;
	--put: #9a5b00;
	--patch: #9a5b00;
	--delete: #b42318;
	--warn-bg: #fff6e5;
	--warn-line: #f0c36d;
	--quirk-bg: #fdf0f6;
	--quirk-line: #e7a1c4;
	--internal: #b42318;
	--radius: 8px;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans',
		'DejaVu Sans', sans-serif;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme='light']) {
		--bg: #0f1115;
		--bg-soft: #161a20;
		--bg-code: #1b2028;
		--fg: #e6e8eb;
		--fg-soft: #9aa4af;
		--line: #2a3038;
		--accent: #a594ff;
		--accent-soft: #241f3d;
		--get: #4cc38a;
		--post: #6ea8fe;
		--put: #f0b35a;
		--patch: #f0b35a;
		--delete: #ff7b72;
		--warn-bg: #2a2212;
		--warn-line: #7a5a1c;
		--quirk-bg: #2a1622;
		--quirk-line: #7a3a5a;
		--internal: #ff7b72;
		color-scheme: dark;
	}
}
:root[data-theme='dark'] {
	--bg: #0f1115;
	--bg-soft: #161a20;
	--bg-code: #1b2028;
	--fg: #e6e8eb;
	--fg-soft: #9aa4af;
	--line: #2a3038;
	--accent: #a594ff;
	--accent-soft: #241f3d;
	--get: #4cc38a;
	--post: #6ea8fe;
	--put: #f0b35a;
	--patch: #f0b35a;
	--delete: #ff7b72;
	--warn-bg: #2a2212;
	--warn-line: #7a5a1c;
	--quirk-bg: #2a1622;
	--quirk-line: #7a3a5a;
	--internal: #ff7b72;
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}
html {
	-webkit-text-size-adjust: 100%;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font: 16px/1.6 var(--sans);
	overflow-x: hidden;
}
a {
	color: var(--accent);
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
code,
pre {
	font-family: var(--mono);
	font-size: 0.875em;
}
code {
	background: var(--bg-code);
	padding: 0.1em 0.35em;
	border-radius: 4px;
	overflow-wrap: anywhere;
}
pre {
	background: var(--bg-code);
	padding: 14px 16px;
	border-radius: var(--radius);
	overflow-x: auto;
	line-height: 1.5;
}
pre code {
	background: none;
	padding: 0;
	overflow-wrap: normal;
}
/* In-page links land below the sticky header, not under it. */
[id] {
	scroll-margin-top: 72px;
}
h1,
h2,
h3 {
	line-height: 1.25;
	letter-spacing: -0.01em;
}
h1 {
	font-size: 2rem;
	margin: 0.2em 0 0.5em;
}
h2 {
	font-size: 1.35rem;
	margin-top: 2em;
	padding-top: 0.4em;
	border-top: 1px solid var(--line);
}
h3 {
	font-size: 1.1rem;
	margin-top: 1.6em;
}
.anchor {
	color: var(--fg-soft);
	margin-right: 0.3em;
	opacity: 0;
	font-weight: 400;
}
h1:hover .anchor,
h2:hover .anchor,
h3:hover .anchor {
	opacity: 1;
}
.skip {
	position: absolute;
	left: -999px;
}
.skip:focus {
	left: 16px;
	top: 8px;
	background: var(--bg);
	padding: 8px;
	z-index: 10;
}

.top {
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px 16px;
	background: var(--bg);
	border-bottom: 1px solid var(--line);
}
.brand {
	font-weight: 700;
	color: var(--fg);
	white-space: nowrap;
}
.brand span {
	font-weight: 400;
	color: var(--fg-soft);
}
.search {
	position: relative;
	flex: 1;
	min-width: 0;
	max-width: 520px;
	margin-left: auto;
}
.search input {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg-soft);
	color: var(--fg);
	font: inherit;
	font-size: 0.95rem;
}
#docs-search-results {
	position: absolute;
	top: 44px;
	left: 0;
	right: 0;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
	max-height: 70vh;
	overflow-y: auto;
}
#docs-search-results li a {
	display: block;
	padding: 8px 10px;
	border-radius: 6px;
	color: var(--fg);
}
#docs-search-results li a:hover,
#docs-search-results li a[aria-selected='true'] {
	background: var(--accent-soft);
	text-decoration: none;
}
#docs-search-results small {
	display: block;
	color: var(--fg-soft);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.theme-toggle,
.nav-toggle {
	border: 1px solid var(--line);
	background: var(--bg-soft);
	color: var(--fg);
	border-radius: var(--radius);
	padding: 6px 10px;
	font: inherit;
	cursor: pointer;
}
.nav-toggle {
	display: none;
}

.shell {
	display: grid;
	grid-template-columns: 272px minmax(0, 1fr);
	max-width: 1320px;
	margin: 0 auto;
}
.sidebar {
	position: sticky;
	top: 57px;
	align-self: start;
	height: calc(100vh - 57px);
	overflow-y: auto;
	padding: 20px 16px 40px;
	border-right: 1px solid var(--line);
	font-size: 0.92rem;
}
.nav-section h2 {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--fg-soft);
	border: 0;
	margin: 1.4em 0 0.4em;
	padding: 0;
}
.nav-section ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.nav-section a {
	display: block;
	padding: 4px 8px;
	border-radius: 6px;
	color: var(--fg);
}
.nav-section a[aria-current='page'] {
	background: var(--accent-soft);
	color: var(--accent);
	font-weight: 600;
}
.nav-internal {
	border-top: 1px dashed var(--internal);
	margin-top: 1.2em;
}
main {
	padding: 28px 40px 80px;
	min-width: 0;
}
.foot {
	border-top: 1px solid var(--line);
	padding: 20px 16px;
	color: var(--fg-soft);
	font-size: 0.85rem;
	text-align: center;
}

.hero {
	padding: 12px 0 8px;
}
.hero h1 {
	font-size: 2.4rem;
}
.lede {
	font-size: 1.12rem;
	color: var(--fg-soft);
	max-width: 70ch;
}
.button {
	display: inline-block;
	padding: 9px 16px;
	border-radius: var(--radius);
	background: var(--accent);
	color: #fff;
	font-weight: 600;
}
.button-quiet {
	background: var(--accent-soft);
	color: var(--accent);
}
.button:hover {
	text-decoration: none;
	filter: brightness(1.05);
}
.cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 14px;
	margin: 20px 0;
}
.card {
	display: block;
	padding: 16px 18px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg-soft);
	color: var(--fg);
}
.card:hover {
	border-color: var(--accent);
	text-decoration: none;
}
.card h3 {
	margin: 0 0 6px;
	font-size: 1rem;
	color: var(--accent);
}
.card p {
	margin: 0;
	color: var(--fg-soft);
	font-size: 0.92rem;
}

.table-wrap {
	overflow-x: auto;
	margin: 12px 0;
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.92rem;
}
th,
td {
	text-align: left;
	vertical-align: top;
	padding: 8px 12px;
	border-bottom: 1px solid var(--line);
}
th {
	background: var(--bg-soft);
	font-weight: 600;
	white-space: nowrap;
}
tr:last-child td {
	border-bottom: 0;
}
td p {
	margin: 0 0 0.4em;
}
td p:last-child {
	margin: 0;
}
.props td:first-child {
	white-space: nowrap;
}
.num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.small {
	font-size: 0.8rem;
	color: var(--fg-soft);
}
.muted {
	color: var(--fg-soft);
}
.opt {
	font-size: 0.75rem;
	color: var(--fg-soft);
}
.req {
	font-size: 0.75rem;
	color: var(--delete);
}
.columns {
	columns: 3 220px;
	padding-left: 1.1em;
}
.ops td:nth-child(2) code {
	white-space: nowrap;
	overflow-wrap: normal;
}
.ops td:first-child {
	width: 1%;
}

.method {
	display: inline-block;
	min-width: 3.6em;
	text-align: center;
	font: 700 0.72rem/1.9 var(--mono);
	border-radius: 4px;
	color: #fff;
	padding: 0 6px;
}
.method-get {
	background: var(--get);
}
.method-post {
	background: var(--post);
}
.method-put,
.method-patch {
	background: var(--put);
}
.method-delete {
	background: var(--delete);
}
.op-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.op-line > * {
	min-width: 0;
}
h1 {
	overflow-wrap: anywhere;
}
.op-path {
	font-size: 1rem;
}
.url-line code {
	font-size: 0.95rem;
}
.badge {
	display: inline-block;
	font: 600 0.7rem/1.7 var(--sans);
	padding: 0 7px;
	border-radius: 999px;
	border: 1px solid currentColor;
	vertical-align: middle;
	white-space: nowrap;
}
.badge-legacy {
	color: var(--put);
}
.badge-unrouted {
	color: var(--fg-soft);
}
.badge-deprecated {
	color: var(--delete);
}
.badge-quirk {
	color: #c23c84;
}
.badge-internal {
	color: var(--internal);
}
.status {
	font-family: var(--mono);
	padding: 0 6px;
	border-radius: 4px;
	background: var(--bg-code);
}
.status-2 {
	color: var(--get);
}
.status-4,
.status-5,
.status-d {
	color: var(--delete);
}
.type-line {
	color: var(--fg-soft);
}
.t-ref {
	font-family: var(--mono);
	font-size: 0.9em;
}
.t-any {
	color: var(--fg-soft);
	font-style: italic;
}
.t-format {
	color: var(--fg-soft);
}

.callout {
	border: 1px solid var(--warn-line);
	background: var(--warn-bg);
	border-radius: var(--radius);
	padding: 10px 16px;
	margin: 16px 0;
}
.callout p {
	margin: 0.3em 0;
}
.callout-quirk {
	border-color: var(--quirk-line);
	background: var(--quirk-bg);
}
.callout-quirk h3 {
	margin: 0.2em 0;
	font-size: 1rem;
}
.internal-banner {
	border: 1px solid var(--internal);
	color: var(--internal);
	border-radius: var(--radius);
	padding: 8px 14px;
	font-weight: 600;
	font-size: 0.9rem;
}
details {
	margin: 10px 0;
}
details summary {
	cursor: pointer;
	color: var(--accent);
	font-weight: 600;
	font-size: 0.92rem;
}
details.nested {
	margin: 6px 0 0;
}
details.nested .table-wrap {
	margin: 6px 0;
}
.facts dl {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 4px 16px;
	margin: 10px 0;
}
.facts dt {
	color: var(--fg-soft);
}
.facts dd {
	margin: 0;
}
.crumbs {
	font-size: 0.88rem;
	color: var(--fg-soft);
}
.toc {
	float: right;
	width: 240px;
	margin: 0 0 16px 24px;
	padding: 10px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg-soft);
	font-size: 0.88rem;
}
.toc h2 {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border: 0;
	margin: 0 0 6px;
	padding: 0;
	color: var(--fg-soft);
}
.toc ol {
	margin: 0;
	padding-left: 1.2em;
}
.guide {
	max-width: 860px;
}
.guide blockquote {
	margin: 16px 0;
	padding: 8px 16px;
	border-left: 3px solid var(--accent);
	background: var(--bg-soft);
	border-radius: 0 var(--radius) var(--radius) 0;
}

@media (max-width: 900px) {
	.shell {
		grid-template-columns: minmax(0, 1fr);
	}
	.nav-toggle {
		display: inline-block;
	}
	.sidebar {
		display: none;
		position: fixed;
		inset: 57px 0 0 0;
		height: auto;
		background: var(--bg);
		z-index: 4;
		border: 0;
	}
	body.nav-open .sidebar {
		display: block;
	}
	main {
		padding: 20px 16px 60px;
	}
	.brand span {
		display: none;
	}
	.top {
		gap: 8px;
	}
	.theme-toggle {
		display: none;
	}
	.op-path {
		font-size: 0.9rem;
	}
	.toc {
		float: none;
		width: auto;
		margin: 0 0 16px;
	}
	h1 {
		font-size: 1.6rem;
	}
	.hero h1 {
		font-size: 1.9rem;
	}
}
.route-map code {
	white-space: nowrap;
	overflow-wrap: normal;
}

/* DOCS_THEME=plutocracy: the docs as part of plutocracy.io (served at /docs/mercury). The host serves GeneralSans at
   its root; elsewhere the font is simply not found and the system stack is used. One dark palette, no toggle. */
@font-face {
	font-family: 'GeneralSans';
	src: url('/GeneralSans-Variable.woff2') format('woff2');
	font-weight: 200 700;
	font-style: normal;
	font-display: swap;
}
:root[data-host='plutocracy'] {
	--bg: #0b0c14;
	--bg-soft: #12141f;
	--bg-code: #171a28;
	--fg: #ffffff;
	--fg-soft: #939db8;
	--line: #23273a;
	--accent: #ff8a3d;
	--accent-soft: #2a1b16;
	--get: #4cc38a;
	--post: #6ea8fe;
	--put: #f0b35a;
	--patch: #f0b35a;
	--delete: #ff7b72;
	--warn-bg: #251f12;
	--warn-line: #6e5520;
	--quirk-bg: #26121f;
	--quirk-line: #6e2f55;
	--internal: #ff7b72;
	--sans: 'GeneralSans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	color-scheme: dark;
}
:root[data-host='plutocracy'] .button {
	background: linear-gradient(100deg, #ff7300, #ff00c8);
	color: #fff;
}
:root[data-host='plutocracy'] .button-quiet {
	background: var(--bg-soft);
	color: var(--fg);
	border: 1px solid var(--line);
}
:root[data-host='plutocracy'] .card h3 {
	color: var(--fg);
}
:root[data-host='plutocracy'] .card:hover {
	border-color: var(--fg-soft);
}
.host-link {
	font-weight: 600;
	color: var(--fg);
	white-space: nowrap;
}
.host-sep {
	color: var(--fg-soft);
	margin: 0 -8px;
}
