/* crawlerx.ai: one stylesheet for every page. Light and dark follow the visitor's system setting. */

/* Inter Tight, Latin subset, variable weight, served from this site (licence in /fonts/OFL.txt). */
@font-face {
	font-family: "Inter Tight";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("/fonts/inter-tight-latin.woff2") format("woff2");
	unicode-range:
		U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
		U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--bg: #ffffff;
	--text: #0a0a0a;
	--body: #27272a;
	--muted: #6b6b70;
	--border: #e9e9eb;
	--surface: #f4f4f5;
	--code-inline: #f1f1f3;
	--btn-primary-bg: #171717;
	--btn-primary-text: #ffffff;
	--btn-primary-hover: #000000;
	--btn-secondary-bg: #ededee;
	--btn-secondary-text: #0a0a0a;
	--btn-secondary-hover: #e2e2e4;
	--link: #0a0a0a;
	--link-line: #c4c4c9;
	--focus: #2563eb;

	--font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

	--gutter: 16px;
	--header-h: 104px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0a0a0a;
		--text: #f4f4f5;
		--body: #d4d4d8;
		--muted: #a1a1aa;
		--border: #232326;
		--surface: #161618;
		--code-inline: #1c1c1f;
		--btn-primary-bg: #fafafa;
		--btn-primary-text: #0a0a0a;
		--btn-primary-hover: #ffffff;
		--btn-secondary-bg: #222225;
		--btn-secondary-text: #fafafa;
		--btn-secondary-hover: #2c2c30;
		--link: #fafafa;
		--link-line: #52525b;
		--focus: #60a5fa;
		color-scheme: dark;
	}
}

@media (min-width: 640px) {
	:root {
		--gutter: 32px;
		--header-h: 64px;
	}
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 24px);
}

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--body);
	font-family: var(--font);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.65;
	letter-spacing: 0;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	/* The footer sits at the bottom of the window on a short page. */
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

main {
	flex: 1 0 auto;
}

a {
	color: var(--link);
	text-decoration: underline;
	text-decoration-color: var(--link-line);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

a:hover {
	text-decoration-color: currentColor;
}

:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
	border-radius: 4px;
}

strong {
	font-weight: 600;
	color: var(--text);
}

.skip {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 20;
	padding: 8px 12px;
	background: var(--btn-primary-bg);
	color: var(--btn-primary-text);
	border-radius: 8px;
	text-decoration: none;
}

.skip:focus {
	left: 8px;
}

/* Header: wordmark left, page links centered, one button right. Below 640px the page
   links move to a second row under the wordmark. */

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: color-mix(in srgb, var(--bg) 92%, transparent);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--border);
}

.nav {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas:
		"mark action"
		"links links";
	align-items: center;
	column-gap: 16px;
	min-height: var(--header-h);
	max-width: 1400px;
	margin: 0 auto;
	padding: 10px var(--gutter) 6px;
}

.wordmark {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	text-decoration: none;
	font-size: 21px;
	font-weight: 600;
	letter-spacing: -0.03em;
}

.nav > .wordmark {
	grid-area: mark;
	justify-self: start;
}

.wordmark svg {
	width: 26px;
	height: 26px;
	flex: none;
}

.wordmark .mark-bg {
	fill: var(--text);
}

.wordmark .mark-x {
	stroke: var(--bg);
}

.nav-links {
	grid-area: links;
	display: flex;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav-links li {
	margin: 0;
	padding: 0;
}

.nav-links a {
	display: inline-block;
	padding: 10px 0;
	color: var(--text);
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
}

.nav-links a[aria-current="page"] {
	text-decoration: underline;
	text-decoration-color: currentColor;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.nav-links a:hover {
	color: var(--muted);
}

.nav-actions {
	grid-area: action;
	display: flex;
	align-items: center;
	justify-self: end;
}

.nav-actions .btn {
	height: 40px;
	padding: 0 16px;
	font-size: 15px;
}

@media (min-width: 640px) {
	.nav {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "mark links action";
		padding-top: 0;
		padding-bottom: 0;
	}

	.nav-links {
		justify-content: center;
		gap: 32px;
	}

	.nav-links a {
		font-size: 16px;
	}
}

@media (min-width: 960px) {
	.nav {
		grid-template-columns: 1fr auto 1fr;
	}
}

/* Buttons */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding: 0 22px;
	border-radius: 8px;
	font-family: var(--font);
	font-size: 17px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.btn-primary {
	background: var(--btn-primary-bg);
	color: var(--btn-primary-text);
}

.btn-primary:hover {
	background: var(--btn-primary-hover);
}

.btn-secondary {
	background: var(--btn-secondary-bg);
	color: var(--btn-secondary-text);
}

.btn-secondary:hover {
	background: var(--btn-secondary-hover);
}

/* Hero */

.hero {
	max-width: 1400px;
	margin: 0 auto;
	padding: 72px var(--gutter) 0;
	text-align: center;
}

@media (min-width: 640px) {
	.hero {
		padding-top: 112px;
	}
}

/* A page with only a hero, such as the 404 page, keeps some room above the footer. */
.hero-only {
	padding-bottom: 72px;
}

h1 {
	margin: 0 auto;
	max-width: 1120px;
	color: var(--text);
	font-size: clamp(2.5rem, 4.6vw + 0.6rem, 4.375rem);
	font-weight: 500;
	line-height: 1.06;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

/* The one paragraph under a page's heading, in the body text style. */
.intro {
	margin: 24px auto 0;
	max-width: 720px;
	text-wrap: balance;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 36px;
}

/* At phone width the two buttons stack as one even column. */
@media (max-width: 400px) {
	.actions .btn {
		flex: 1 1 100%;
	}
}

/* Document body: one reading column, centered at the same place on every page. On a wide
   screen, a page with a section list shows it in the left margin, where it stays on screen
   and marks the section being read. Below 1280px the list is hidden. */

.doc {
	max-width: 1400px;
	margin: 0 auto;
	padding: 8px var(--gutter) 72px;
}

.doc-grid {
	display: block;
}

.toc {
	display: none;
}

.toc ul {
	margin: 0;
	padding: 0 0 0 14px;
	list-style: none;
	border-left: 1px solid var(--border);
}

.toc li {
	margin: 0;
	padding: 0;
}

.toc li + li {
	margin-top: 10px;
}

.toc a {
	position: relative;
	display: block;
	color: var(--muted);
	text-decoration: none;
	font-size: 15px;
	line-height: 1.4;
}

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

.toc a[aria-current="true"] {
	color: var(--text);
	font-weight: 500;
}

.toc a[aria-current="true"]::before {
	content: "";
	position: absolute;
	left: -15px;
	top: 0;
	bottom: 0;
	border-left: 2px solid var(--text);
}

@media (min-width: 1280px) {
	.doc-grid {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 720px) minmax(0, 1fr);
	}

	.doc-grid > .prose {
		grid-column: 2;
		grid-row: 1;
	}

	.toc {
		display: block;
		grid-column: 1;
		grid-row: 1;
		justify-self: end;
		width: 220px;
		margin: 56px 64px 0 0;
		position: sticky;
		top: calc(var(--header-h) + 32px);
		align-self: start;
		max-height: calc(100vh - var(--header-h) - 64px);
		overflow-y: auto;
	}
}

.prose {
	min-width: 0;
	max-width: 720px;
	margin: 0 auto;
}

.prose > section {
	padding-top: 40px;
}

@media (min-width: 640px) {
	.prose > section {
		padding-top: 48px;
	}
}

h2 {
	margin: 0 0 20px;
	color: var(--text);
	font-size: clamp(1.75rem, 1.2vw + 1.3rem, 2.125rem);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

h3 {
	margin: 48px 0 12px;
	color: var(--text);
	font-size: 22px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

p {
	margin: 0 0 18px;
	text-wrap: pretty;
}

ul {
	margin: 0 0 22px;
	padding-left: 22px;
}

li {
	margin: 0 0 8px;
	padding-left: 2px;
}

li::marker {
	color: var(--muted);
}

code {
	font-family: var(--mono);
	font-size: 0.86em;
	background: var(--code-inline);
	border-radius: 5px;
	padding: 0.12em 0.38em;
	overflow-wrap: anywhere;
}

pre {
	margin: 0 0 22px;
	padding: 18px 20px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	overflow-x: auto;
	font-family: var(--mono);
	font-size: 14px;
	line-height: 1.7;
	color: var(--text);
	tab-size: 4;
}

/* A file name or quoted pattern that must not break at its hyphen or bar. */
.nowrap {
	white-space: nowrap;
}

/* At phone width, long code lines wrap softly at spaces instead of scrolling sideways. */
@media (max-width: 639px) {
	pre {
		white-space: pre-wrap;
		overflow-wrap: break-word;
	}

	/* A quoted pattern in a code sample wraps as one piece. */
	pre .nowrap {
		white-space: nowrap;
	}

	/* A long token with no spaces, such as the Accept header, breaks anywhere. */
	.prose pre.break-anywhere code {
		overflow-wrap: anywhere;
	}
}

/* Form-test details: a two-column table of field and value. At phone width the value
   column wraps, and the wrapper scrolls sideways rather than widening the page. */
.table-wrap {
	margin: 0 0 22px;
	overflow-x: auto;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
}

.fields {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.6;
	color: var(--text);
}

.fields th,
.fields td {
	padding: 10px 20px;
	text-align: left;
	vertical-align: baseline;
	border-top: 1px solid var(--border);
}

.fields thead th {
	border-top: 0;
	color: var(--muted);
	font-weight: 500;
}

.fields tbody th {
	width: 9em;
	color: var(--muted);
	font-weight: 400;
	white-space: nowrap;
}

.fields td {
	font-family: var(--mono);
	font-size: 14px;
	overflow-wrap: anywhere;
}

@media (max-width: 639px) {
	.fields th,
	.fields td {
		padding: 10px 14px;
	}

	.fields tbody th {
		width: 7.5em;
	}
}

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

/* Footer: links only */

.site-footer {
	border-top: 1px solid var(--border);
}

.footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	max-width: 1400px;
	margin: 0 auto;
	padding: 32px var(--gutter);
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-links li {
	margin: 0;
	padding: 0;
}

.footer-links a {
	color: var(--muted);
	text-decoration: none;
	font-size: 15px;
}

.footer-links a:hover {
	color: var(--text);
}
