/* The two pages of the site (the front page, the documentation). The scanner has its own styles in scanner/index.html. */
:root {
	--ink: #14171c;
	--muted: #5d6673;
	--line: #e3e7ee;
	--surface: #f6f8fb;
	--accent: #1f5fd6;
	--accent-dark: #174aa8;
	--code-bg: #0f1722;
	--code-ink: #dbe5f4;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: #fff;
	color: var(--ink);
	font: 1rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); }

.wrap { max-width: 68rem; margin: 0 auto; padding-right: 1.25rem; padding-left: 1.25rem; }
.wrap.narrow { max-width: 44rem; }

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 3.75rem; }
.logo { color: var(--ink); font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; text-decoration: none; }
.logo b { color: var(--accent); font-weight: 800; }
.site-header nav a { color: var(--ink); font-weight: 500; text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }

main > section { padding-top: 3.25rem; padding-bottom: 3.25rem; }
main > section + section { border-top: 1px solid var(--line); }

h1 { margin: 0 0 1rem; font-size: 2.5rem; line-height: 1.15; letter-spacing: -0.02em; }
h2 { margin: 0 0 1.25rem; font-size: 1.625rem; line-height: 1.25; letter-spacing: -0.01em; }
h3 { margin: 0 0 0.375rem; font-size: 1.125rem; line-height: 1.35; }
p { margin: 0 0 1rem; }

.hero { padding-top: 4.5rem; padding-bottom: 4rem; background: linear-gradient(180deg, #f3f7ff 0%, #fff 100%); }
.hero h1 { max-width: 20ch; }
.lead { max-width: 60ch; color: var(--muted); font-size: 1.1875rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 0; }

.button {
	display: inline-flex;
	align-items: center;
	padding: 0.6875rem 1.25rem;
	border: 1px solid #c9d6ee;
	border-radius: 0.625rem;
	background: #fff;
	color: var(--accent);
	font-weight: 600;
	text-decoration: none;
}
.button:hover { border-color: var(--accent); }
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button.primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }

.steps { display: grid; gap: 2rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps > li { position: relative; padding-left: 3.25rem; counter-increment: step; min-width: 0; }
.steps > li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	font-weight: 700;
	line-height: 2.25rem;
	text-align: center;
}
.steps p { max-width: 70ch; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: 1.5rem 2rem; }
.grid p { margin: 0; color: var(--muted); }

.cta { text-align: center; }
.cta p { color: var(--muted); }

pre {
	margin: 0 0 1rem;
	padding: 1rem 1.125rem;
	overflow-x: auto;
	border-radius: 0.75rem;
	background: var(--code-bg);
	color: var(--code-ink);
	font: 0.875rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
:not(pre) > code { padding: 0.1em 0.35em; border-radius: 0.3rem; background: var(--surface); }
pre code { font-size: 1em; }

/* the documentation: the list of its sections stands beside the text on a wide screen */
.docs { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 3rem; }
.docs article { min-width: 0; max-width: 50rem; }
.docs h1 { font-size: 2.125rem; }
.docs h2 { margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.docs ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.docs li { margin-bottom: 0.375rem; }
.toc { position: sticky; top: 1.5rem; align-self: start; display: grid; gap: 0.375rem; font-size: 0.9375rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); }

table { width: 100%; margin: 0 0 1.25rem; border-collapse: collapse; font-size: 0.9375rem; }
th, td { padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
td:first-child { white-space: nowrap; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9375rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding-top: 1.5rem; padding-bottom: 2rem; }
.site-footer a { color: var(--muted); }

@media (max-width: 52rem) {
	h1 { font-size: 2rem; }
	.hero { padding-top: 3rem; padding-bottom: 2.5rem; }
	main > section { padding-top: 2.25rem; padding-bottom: 2.25rem; }
	.docs { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
	.toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
	td:first-child { white-space: normal; }
	.steps > li { padding-left: 0; padding-top: 3rem; }
}
