/* Beacon API docs. Tokens copied from the getbeacon.cloud Pro page (styles.css, .pro-page block)
   so the docs look like the same door. Light mode only, one accent (brand orange). */

@font-face {
	font-family: "Lexend Deca Fallback";
	src: local("Arial");
	size-adjust: 96.5%;
	ascent-override: 95%;
	descent-override: 25%;
	line-gap-override: 0%;
}

:root {
	--font: "Lexend Deca", "Lexend Deca Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--accent: #e74310;
	--accent-hover: #d13b0e;
	--accent-on-dark: #ff7a4d;
	--accent-soft: rgba(231, 67, 16, 0.14);
	--accent-tint: #fff5f2;

	--bg: #ffffff;
	--bg-section: #f7f8fb;
	--bg-panel: #e9ebf2;
	--bg-inset: #f4f1ec;
	--bg-canvas: #fbfaf8;
	--ink: #131523;
	--ink-2: #5a607f;
	--ink-3: #6b7089; /* 4.9:1 on white, passes WCAG AA for small text */
	--accent-text: #c2380c; /* orange for small text on white (5.4:1) */
	--border: #e5e5e5;
	--border-light: #f0f0f0;
	--hairline: rgba(46, 32, 20, 0.09);

	--dark: #0f1019;
	--dark-2: #171827;
	--dark-text: #f4f5fa;
	--dark-muted: #a7acc4;
	--dark-body: rgba(255, 255, 255, 0.64);
	--dark-card: rgba(255, 255, 255, 0.03);
	--dark-border: rgba(255, 255, 255, 0.1);

	--radius-sm: 6px;
	--radius-md: 8px;
	--radius-lg: 12px;
	--radius-xl: 16px;
	--radius-2xl: 20px;

	--container: 1200px;
	--gutter: 24px;
	--nav-h: 64px;
	--shadow-hover: 0 6px 20px rgba(15, 16, 25, 0.06);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	scroll-padding-top: calc(var(--nav-h) + 24px);
	-webkit-text-size-adjust: 100%;
}
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--bg);
}
img,
svg {
	max-width: 100%;
}
a {
	color: inherit;
}
:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 4px;
}
.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gutter);
}
.skip-link {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 100;
	background: var(--dark);
	color: #fff;
	padding: 8px 12px;
	border-radius: var(--radius-md);
}
.skip-link:focus {
	left: 8px;
}

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	height: var(--nav-h);
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--hairline);
}
.site-header .container {
	height: 100%;
	display: flex;
	align-items: center;
	gap: 24px;
	max-width: 1360px;
	margin: 0 auto;
	padding: 0 28px;
}
.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	flex: 0 0 auto;
}
.brand img {
	display: block;
	width: 105px;
	height: 28px;
}
.brand-divider {
	width: 1px;
	height: 22px;
	background: var(--border);
}
.brand-label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.3px;
	color: #fff;
	background: var(--dark);
	padding: 6px 12px;
	border-radius: 999px;
	white-space: nowrap;
}
.site-nav {
	display: flex;
	align-items: center;
	gap: 4px;
	flex: 1 1 auto;
}
.site-nav a {
	font-size: 14px;
	font-weight: 500;
	color: var(--ink-2);
	text-decoration: none;
	padding: 7px 12px;
	border-radius: var(--radius-md);
	white-space: nowrap;
}
.site-nav a:hover {
	color: var(--ink);
	background: rgba(19, 21, 35, 0.04);
}
.site-nav a[aria-current="page"],
.site-nav a.is-section {
	color: var(--ink);
	background: rgba(19, 21, 35, 0.06);
}
.header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 0 0 auto;
}
.header-link {
	font-size: 14px;
	font-weight: 500;
	color: var(--ink-2);
	text-decoration: none;
}
.header-link:hover {
	color: var(--ink);
}
.menu-toggle {
	display: none;
	background: none;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--ink);
}
.menu-toggle svg {
	width: 20px;
	height: 20px;
}
/* Phone and tablet menu: one panel with every link, replacing both the top nav and the sidebar */
.mobile-nav {
	display: none;
	position: fixed;
	top: var(--nav-h);
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 45;
	overflow-y: auto;
	background: #fff;
	padding: 16px 16px 48px;
	border-top: 1px solid var(--border-light);
}
.mobile-nav.is-open {
	display: block;
}
.mobile-nav .sidebar-group {
	margin: 0 0 20px;
}
.mobile-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.mobile-nav a {
	display: block;
	font-size: 15px;
	color: var(--ink-2);
	text-decoration: none;
	padding: 11px 12px;
	border-radius: var(--radius-md);
}
.mobile-nav a[aria-current="page"] {
	color: var(--ink);
	font-weight: 600;
	background: var(--bg-section);
	box-shadow: inset 2px 0 0 var(--accent);
}
.mobile-nav .mobile-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 16px 12px 0;
	border-top: 1px solid var(--border-light);
	margin-top: 8px;
}
.mobile-nav .mobile-actions a {
	padding: 10px 0;
}
.mobile-nav .mobile-actions .btn {
	padding: 10px 18px;
	color: #fff;
}
body.menu-open {
	overflow: hidden;
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	padding: 10px 18px;
	border-radius: var(--radius-md);
	border: 2px solid transparent;
	text-decoration: none;
	cursor: pointer;
	transition:
		transform 0.15s ease,
		box-shadow 0.15s ease,
		background 0.15s ease,
		border-color 0.15s ease;
	white-space: nowrap;
}
.btn-lg {
	font-size: 15px;
	padding: 14px 28px;
	border-radius: var(--radius-lg);
}
.btn-dark {
	background: var(--dark);
	color: #fff;
	border-color: var(--dark);
}
.btn-dark:hover {
	background: #262838;
	border-color: #262838;
}
.btn-light {
	background: #fff;
	color: var(--dark);
	border-color: #fff;
}
.btn-light:hover {
	background: #f4f5fa;
	transform: translateY(-1px);
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
}
.btn-outline-dark {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.35);
}
.btn-outline-dark:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.06);
}
.btn-outline {
	background: #fff;
	color: var(--ink);
	border: 1px solid var(--border);
	padding: 11px 19px;
}
.btn-outline:hover {
	border-color: #c9ccd6;
}

/* Flow diagram (concepts page) */
.flow {
	margin: 0;
	padding: 28px;
	border: 1px solid var(--dark-border);
	border-radius: var(--radius-2xl);
	background: var(--dark-card);
}
.flow svg {
	display: block;
	width: 100%;
	height: auto;
}
.flow-card {
	fill: var(--dark-2);
	stroke: var(--dark-border);
	stroke-width: 1.5;
}
.flow-bar {
	fill: #fff;
	opacity: 0.85;
}
.flow-bar-dim {
	opacity: 0.3;
}
.flow-path {
	fill: none;
	stroke: rgba(255, 255, 255, 0.18);
	stroke-width: 2;
	stroke-dasharray: 4 6;
}
.flow-accent {
	fill: var(--accent);
}
.flow-cells rect {
	fill: var(--accent);
	opacity: 0.45;
}
.flow-cells rect:nth-child(4n) {
	opacity: 0.9;
}
.flow-label {
	fill: var(--dark-muted);
	font-family: var(--font);
	font-size: 14px;
	font-weight: 500;
}
.flow-label-strong {
	fill: #fff;
	font-family: var(--font);
	font-size: 15px;
	font-weight: 600;
}
.flow-light {
	border-color: var(--border);
	background: var(--bg-section);
}
.flow-light .flow-card {
	fill: #fff;
	stroke: rgba(15, 16, 25, 0.14);
}
.flow-light .flow-bar {
	fill: var(--dark);
	opacity: 0.42;
}
.flow-light .flow-bar-dim {
	opacity: 0.14;
}
.flow-light .flow-path {
	stroke: rgba(15, 16, 25, 0.22);
}
.flow-light .flow-label {
	fill: var(--ink-2);
}
.flow-light .flow-label-strong {
	fill: var(--ink);
}
.flow-light .flow-cells rect {
	fill: var(--dark);
	opacity: 0.12;
}
.flow-light .flow-cells rect:nth-child(4n) {
	opacity: 0.3;
}
.flow-light .flow-cells rect.on {
	fill: var(--accent);
	opacity: 0.9;
}

/* ---------- Docs layout ---------- */
.docs {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr) 220px;
	gap: 48px;
	max-width: 1360px;
	margin: 0 auto;
	padding: 0 28px;
}
.sidebar {
	position: sticky;
	top: var(--nav-h);
	align-self: start;
	height: calc(100vh - var(--nav-h));
	overflow-y: auto;
	padding: 32px 8px 48px 0;
	border-right: 1px solid var(--border-light);
}
.sidebar-group {
	margin: 0 0 28px;
}
.sidebar-title {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--ink-3);
	margin: 0 0 8px;
	padding: 0 12px;
}
.sidebar ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.sidebar a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--ink-2);
	text-decoration: none;
	padding: 7px 12px;
	border-radius: var(--radius-md);
}
.sidebar a:hover {
	color: var(--ink);
	background: var(--bg-section);
}
.sidebar a[aria-current="page"] {
	color: var(--ink);
	font-weight: 600;
	background: var(--bg-section);
	box-shadow: inset 2px 0 0 var(--accent);
}

.content {
	min-width: 0;
	padding: 48px 0 96px;
}
.prose {
	max-width: 720px;
}
.toc {
	position: sticky;
	top: var(--nav-h);
	align-self: start;
	padding: 48px 0 32px;
}
.toc-title {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--ink-3);
	margin: 0 0 10px;
}
.toc ul {
	list-style: none;
	margin: 0;
	padding: 0;
	border-left: 1px solid var(--border);
}
.toc a {
	display: block;
	font-size: 13px;
	line-height: 1.4;
	color: var(--ink-2);
	text-decoration: none;
	padding: 5px 0 5px 14px;
	margin-left: -1px;
	border-left: 1px solid transparent;
}
.toc a:hover {
	color: var(--ink);
}
.toc a.is-active {
	color: var(--ink);
	border-left-color: var(--accent);
}

/* Group label above the title, with the "Copy page" button */
.page-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 12px;
	min-height: 24px;
}
.page-group {
	font-size: 13px;
	font-weight: 500;
	color: var(--ink-3);
	margin: 0;
}
.copy-page {
	font-family: var(--font);
	font-size: 13px;
	font-weight: 500;
	color: var(--ink-3);
	background: none;
	border: 0;
	padding: 4px 0;
	cursor: pointer;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-underline-offset: 3px;
	margin-left: auto;
}
.copy-page:hover {
	color: var(--ink);
	text-decoration-color: var(--accent);
}
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.prose h1 {
	font-size: clamp(30px, 3.6vw, 40px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	margin: 0 0 16px;
	text-wrap: balance;
}
.prose .lead {
	font-size: 19px;
	font-weight: 300;
	line-height: 1.6;
	color: var(--ink-2);
	margin: 0 0 32px;
}
.prose h2 {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	margin: 56px 0 14px;
	padding-top: 8px;
}
.prose h3 {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
	margin: 32px 0 10px;
}
.prose p {
	margin: 0 0 16px;
}
.prose ul,
.prose ol {
	margin: 0 0 18px;
	padding-left: 22px;
}
.prose li {
	margin: 0 0 8px;
}
.prose li::marker {
	color: var(--ink-3);
}
.prose a {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: rgba(231, 67, 16, 0.55);
	text-underline-offset: 3px;
	text-decoration-thickness: 1.5px;
}
.prose a:hover {
	text-decoration-color: var(--accent);
}
.prose strong {
	font-weight: 600;
}
.prose hr {
	border: 0;
	border-top: 1px solid var(--border);
	margin: 48px 0;
}
.prose :not(pre) > code,
.prose td code,
.prose th code {
	font-family: var(--mono);
	font-size: 0.86em;
	background: var(--bg-inset);
	border: 1px solid var(--hairline);
	border-radius: 5px;
	padding: 1px 5px;
	white-space: nowrap;
}
.prose .anchor {
	margin-left: 8px;
	color: var(--ink-3);
	text-decoration: none;
	opacity: 0;
	font-weight: 400;
}
.prose .anchor:focus-visible {
	opacity: 1;
}
.prose h2:hover .anchor,
.prose h3:hover .anchor {
	opacity: 1;
}

/* Note: grey, never coloured */
.note {
	background: var(--bg-section);
	border: 1px solid var(--border-light);
	border-left: 3px solid var(--dark);
	border-radius: var(--radius-md);
	padding: 16px 20px;
	margin: 0 0 20px;
	font-size: 15px;
	line-height: 1.6;
}
.note p:last-child {
	margin-bottom: 0;
}
.note-title {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

/* Tables */
.table-wrap {
	overflow-x: auto;
	margin: 0 0 24px;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
}
.prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	line-height: 1.5;
}
.prose th {
	text-align: left;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: var(--ink-2);
	background: var(--bg-section);
	padding: 10px 14px;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}
.prose td {
	padding: 11px 14px;
	border-bottom: 1px solid var(--border-light);
	vertical-align: top;
}
.prose tr:last-child td {
	border-bottom: 0;
}

/* Code blocks */
.code {
	margin: 0 0 24px;
	background: var(--dark);
	border-radius: var(--radius-lg);
	overflow: hidden;
	border: 1px solid var(--dark);
}
.code-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 0 8px 0 4px;
	border-bottom: 1px solid var(--dark-border);
	min-height: 42px;
}
.code-tabs {
	display: flex;
	gap: 2px;
	overflow-x: auto;
	scrollbar-width: none;
}
.code-tabs::-webkit-scrollbar {
	display: none;
}
.code-tab {
	font-family: var(--font);
	font-size: 13px;
	font-weight: 500;
	color: var(--dark-muted);
	background: none;
	border: 0;
	padding: 11px 12px 10px;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
}
.code-tab:hover {
	color: #fff;
}
.code-tab[aria-pressed="true"] {
	color: #fff;
	border-bottom-color: var(--accent);
}
.code-title {
	font-size: 13px;
	font-weight: 500;
	color: var(--dark-muted);
	padding: 0 8px;
}
.copy-btn {
	font-family: var(--font);
	font-size: 12px;
	font-weight: 600;
	color: var(--dark-muted);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--dark-border);
	border-radius: 999px;
	padding: 4px 12px;
	cursor: pointer;
	flex: 0 0 auto;
}
.copy-btn:hover {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.3);
}
.copy-btn.is-done {
	color: #fff;
	background: var(--accent);
	border-color: var(--accent);
}
.code pre {
	margin: 0;
	padding: 18px 20px;
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
	font-family: var(--mono);
	font-size: 13.5px;
	line-height: 1.65;
	color: var(--dark-text);
	tab-size: 2;
}
.code pre[hidden] {
	display: none;
}
.code .c {
	color: #7e849c;
}
.code .s {
	color: #f2c9b6;
}
.code .k {
	color: var(--accent-on-dark);
}
.code del,
.code ins {
	text-decoration: none;
}
.code .d-del {
	display: block;
	color: #8e93a8;
	text-decoration: line-through;
	text-decoration-color: rgba(255, 255, 255, 0.25);
}
.code .d-add {
	display: block;
	color: #fff;
	box-shadow: inset 3px 0 0 var(--accent);
	background: rgba(231, 67, 16, 0.12);
	margin: 0 -20px;
	padding: 0 20px 0 17px;
}
.code-plain {
	background: var(--bg-section);
	border-color: var(--border);
}
.code-plain pre {
	color: var(--ink);
}

/* Endpoint rows */
.prose .endpoints,
.endpoints {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
}
.endpoints li {
	display: grid;
	grid-template-columns: 76px minmax(0, 210px) minmax(0, 1fr);
	gap: 16px;
	align-items: baseline;
	padding: 14px 18px;
	border-bottom: 1px solid var(--border-light);
	margin: 0;
}
.endpoints li:last-child {
	border-bottom: 0;
}
.endpoints .path {
	font-family: var(--mono);
	font-size: 13.5px;
	color: var(--ink);
	word-break: break-word;
}
.endpoints .why {
	font-size: 14.5px;
	color: var(--ink-2);
	line-height: 1.55;
}
.endpoints .why strong {
	color: var(--ink);
}
.method {
	display: inline-block;
	font-family: var(--mono);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.4px;
	text-align: center;
	min-width: 58px;
	padding: 3px 6px;
	border-radius: var(--radius-sm);
}
.method-get {
	background: var(--bg-section);
	color: var(--ink);
	border: 1px solid var(--border);
}
.method-post {
	background: var(--dark);
	color: #fff;
	border: 1px solid var(--dark);
}
.method-delete {
	background: var(--accent-tint);
	color: var(--accent-text);
	border: 1px solid rgba(231, 67, 16, 0.3);
}
.endpoints .ref-link {
	display: inline-block;
	margin-left: 6px;
	font-size: 13px;
	white-space: nowrap;
}

/* Numbered walk-through */
.walk {
	list-style: none;
	counter-reset: walk;
	margin: 0 0 24px;
	padding: 0;
}
.walk > li {
	counter-increment: walk;
	position: relative;
	padding-left: 44px;
	margin: 0 0 40px;
}
.walk > li::before {
	content: counter(walk);
	position: absolute;
	left: 0;
	top: 0;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--bg-section);
	border: 1px solid var(--border);
	color: var(--ink);
	font-size: 13px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
}
.walk > li > h3 {
	margin-top: 0;
}

/* Definition list (glossary, concepts) */
.defs {
	margin: 0 0 24px;
}
.defs dt {
	font-weight: 600;
	margin: 20px 0 4px;
}
.defs dt code {
	font-weight: 500;
}
.defs dd {
	margin: 0;
	color: var(--ink-2);
}

/* Cards row inside prose */
.card-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 0 0 28px;
}
.card-link {
	display: block;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 18px 20px;
	text-decoration: none !important;
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}
.card-link:hover {
	border-color: #c9ccd6;
	box-shadow: var(--shadow-hover);
}
.card-link strong {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 15px;
	color: var(--ink);
	margin-bottom: 4px;
}
.card-link strong::after {
	content: "\2192";
	font-weight: 400;
	color: var(--ink-3);
}
.card-link:hover strong::after {
	color: var(--accent);
}
.card-link span {
	display: block;
	font-size: 14px;
	color: var(--ink-2);
	line-height: 1.5;
}

.next-steps {
	margin: 64px 0 0;
	padding-top: 32px;
	border-top: 1px solid var(--border);
}

/* End of page: previous and next, updated date, support */
.page-end {
	margin: 64px 0 0;
	padding-top: 24px;
	border-top: 1px solid var(--border);
	font-size: 14px;
	color: var(--ink-3);
	max-width: 720px;
}
.page-pager {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 20px;
}
.page-pager a {
	display: block;
	max-width: 48%;
	color: var(--ink);
	text-decoration: none;
	padding: 4px 0;
}
.page-pager a span {
	display: block;
	font-size: 12px;
	color: var(--ink-3);
	margin-bottom: 2px;
}
.page-pager a:hover strong {
	text-decoration: underline;
	text-decoration-color: var(--accent);
	text-underline-offset: 3px;
}
.page-pager .next {
	margin-left: auto;
	text-align: right;
}
.page-pager strong {
	font-weight: 500;
}
.page-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	margin: 0;
}
.page-meta a {
	color: var(--ink-2);
}

/* "On this page" at the top of the article, for screens too narrow for the right-hand column */
.toc-inline {
	display: none;
	margin: 0 0 28px;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	font-size: 14px;
}
.toc-inline summary {
	cursor: pointer;
	padding: 10px 14px;
	font-weight: 500;
	color: var(--ink-2);
}
.toc-inline ul {
	list-style: none;
	margin: 0;
	padding: 0 14px 12px;
}
.toc-inline li {
	margin: 0;
}
.toc-inline a {
	display: block;
	padding: 6px 0;
	color: var(--ink-2);
	text-decoration: none;
}
.toc-inline .toc-sub a {
	padding-left: 14px;
}
.toc .toc-sub a {
	padding-left: 26px;
}

/* ---------- Reference pages (Scalar) ---------- */
.reference-intro {
	border-bottom: 1px solid var(--border-light);
	background: var(--bg);
}
.reference-intro .inner {
	max-width: 1360px;
	margin: 0 auto;
	padding: 14px 28px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.reference-intro p {
	margin: 0;
	font-size: 13px;
	font-weight: 500;
	color: var(--ink-3);
}
.reference-intro p strong {
	color: var(--ink);
}
.ref-switch {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	font-size: 14px;
}
.ref-switch a {
	color: var(--ink-2);
	text-decoration: none;
	white-space: nowrap;
	padding: 4px 0;
	border-bottom: 2px solid transparent;
}
.ref-switch a:hover {
	color: var(--ink);
}
.ref-switch a[aria-current="page"] {
	color: var(--ink);
	font-weight: 600;
	border-bottom-color: var(--accent);
}

/* ---------- Footer: one quiet row ---------- */
.site-footer {
	background: var(--bg-canvas);
	border-top: 1px solid var(--hairline);
	padding: 24px 0;
	font-size: 13px;
	color: var(--ink-3);
}
.site-footer .container {
	max-width: 1360px;
	padding: 0 28px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
}
.site-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0 20px;
}
.site-footer a {
	color: var(--ink-2);
	text-decoration: none;
	display: inline-block;
	padding: 8px 0;
}
.site-footer a:hover {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--accent);
	text-underline-offset: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
	.docs {
		grid-template-columns: 240px minmax(0, 1fr);
		gap: 40px;
	}
	.toc {
		display: none;
	}
	.toc-inline {
		display: block;
	}
}
@media (max-width: 960px) {
	.site-nav {
		display: none;
	}
	.menu-toggle {
		display: inline-flex;
		margin-left: auto;
	}
	.header-actions {
		display: none;
	}
	.docs {
		grid-template-columns: minmax(0, 1fr);
		padding: 0 var(--gutter);
		gap: 0;
	}
	.sidebar {
		display: none;
	}
	.content {
		padding-top: 32px;
	}
	.flow {
		padding: 12px;
		overflow-x: auto;
	}
	.flow svg {
		min-width: 560px;
	}
	.card-row {
		grid-template-columns: minmax(0, 1fr);
	}
	.endpoints li {
		grid-template-columns: 72px minmax(0, 1fr);
	}
	.endpoints .why {
		grid-column: 1 / -1;
	}
}
@media (max-width: 600px) {
	.site-header .container {
		padding: 0 16px;
		gap: 12px;
	}
	.brand-divider,
	.brand-label {
		display: none;
	}
	.site-footer .container {
		padding: 0 16px;
	}
	.walk > li {
		padding-left: 0;
	}
	.walk > li::before {
		position: static;
		display: inline-flex;
		margin: 0 0 10px;
	}
	.page-pager {
		flex-direction: column;
	}
	.page-pager a {
		max-width: none;
	}
	.page-pager .next {
		margin-left: 0;
		text-align: left;
	}
}
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
	}
}

/* Inline changes inside one line of a diff */
.code .d-inline {
	display: inline;
	margin: 0;
	padding: 0 3px;
	border-radius: 3px;
}
.code .d-add.d-inline {
	box-shadow: none;
	background: rgba(231, 67, 16, 0.22);
}
.code .d-del.d-inline {
	margin-right: 4px;
}
/* Long inline code in running text may wrap on phones rather than widen the page.
   Code inside tables stays whole: the table scrolls inside .table-wrap instead. */
@media (max-width: 600px) {
	.prose p > code,
	.prose li > code,
	.prose dd > code,
	.prose .note code {
		white-space: normal;
		overflow-wrap: anywhere;
	}
}

/* Changelog entry tags, and a highlight for a linked table row (errors, fields) */
.prose .entry-tags {
	font-size: 13px;
	color: var(--ink-3);
	margin: -6px 0 16px;
}
.prose tr:target td {
	background: var(--accent-tint);
}

/* Printing (the field dictionary especially): content only, full width, rows kept whole */
@media print {
	.site-header,
	.mobile-nav,
	.sidebar,
	.toc,
	.toc-inline,
	.page-end,
	.site-footer,
	.skip-link,
	.copy-page,
	.copy-btn,
	.reference-intro {
		display: none !important;
	}
	.docs {
		display: block;
		max-width: none;
		padding: 0;
	}
	.content {
		padding: 0;
	}
	.prose {
		max-width: none;
	}
	.table-wrap {
		overflow: visible;
		border: 0;
	}
	.prose tr,
	.note,
	.code {
		break-inside: avoid;
	}
	.prose h2,
	.prose h3 {
		break-after: avoid;
	}
	.code {
		background: #fff;
		border-color: var(--border);
	}
	.code pre {
		color: var(--ink);
		white-space: pre-wrap;
	}
	.prose a {
		text-decoration: none;
	}
}

.prose .page-group {
	margin: 0;
}
.next-steps h2 {
	margin-top: 0;
}

/* Code in a table's last (description) column may wrap; codes in the other columns stay whole */
.prose td:last-child code {
	white-space: normal;
	overflow-wrap: anywhere;
}
/* On phones, give the description column room and let the table scroll sideways instead */
@media (max-width: 600px) {
	.prose td:last-child {
		min-width: 220px;
	}
}

/* Wide pages (<body data-layout="wide">, e.g. the field dictionary): tables use the full width,
   text keeps its reading width, and the contents list sits at the top of the article */
.docs.is-wide {
	grid-template-columns: 260px minmax(0, 1fr);
}
.docs.is-wide .toc {
	display: none;
}
.docs.is-wide .toc-inline {
	display: block;
	max-width: 720px;
}
.docs.is-wide .prose {
	max-width: 1080px;
}
.docs.is-wide .prose > :not(.table-wrap):not(.code) {
	max-width: 720px;
}
@media (max-width: 960px) {
	.docs.is-wide {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Pages nested under a sidebar item (e.g. each recipe under Recipes) */
.sidebar-sub {
	margin: 2px 0 6px 12px !important;
	padding-left: 0 !important;
	border-left: 1px solid var(--border);
}
.sidebar .sidebar-sub a {
	font-size: 13.5px;
	padding: 6px 12px;
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	margin-left: -1px;
}
.sidebar .sidebar-sub a[aria-current="page"] {
	box-shadow: inset 2px 0 0 var(--accent);
}
.mobile-nav .sidebar-sub {
	margin-left: 12px !important;
	border-left: 1px solid var(--border);
}
.mobile-nav .sidebar-sub a {
	font-size: 14px;
	padding: 9px 12px;
}
.sidebar {
	scrollbar-width: thin;
	scrollbar-color: var(--border) transparent;
}

/* The references open a different layout, so their sidebar group is set apart at the bottom */
.sidebar-group-ref {
	border-top: 1px solid var(--border);
	padding-top: 20px;
}
.ref-back {
	font-size: 13px;
	font-weight: 500;
	color: var(--ink-3);
	text-decoration: none;
	white-space: nowrap;
	padding: 4px 0;
}
.ref-back:hover {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--accent);
	text-underline-offset: 3px;
}
.reference-intro .inner {
	justify-content: flex-start;
	column-gap: 32px;
}
.reference-intro .inner p {
	margin-left: auto;
}

/* Reference pages on a phone: the strip is one short band, not a tall stack */
@media (max-width: 600px) {
	.reference-intro .inner {
		padding: 8px 16px;
		column-gap: 16px;
		row-gap: 2px;
	}
	.reference-intro .inner p {
		margin-left: 0;
	}
	.ref-switch {
		gap: 0 16px;
		font-size: 13px;
	}
	.ref-switch a,
	.ref-back {
		padding: 2px 0;
	}
}
