/* Archivo and IBM Plex Mono, the app's own faces (src/app.css), Latin subset, under the
   SIL Open Font License (assets/fonts/*-OFL.txt). Served from here: no font service. */
@font-face {
	font-family: 'Archivo';
	font-style: normal;
	font-display: swap;
	font-weight: 400;
	src: url('fonts/archivo-latin-400-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Archivo';
	font-style: normal;
	font-display: swap;
	font-weight: 600;
	src: url('fonts/archivo-latin-600-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Archivo';
	font-style: normal;
	font-display: swap;
	font-weight: 700;
	src: url('fonts/archivo-latin-700-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'IBM Plex Mono';
	font-style: normal;
	font-display: swap;
	font-weight: 400;
	src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}

/* The palette of src/app.css: its light theme here, its dark theme (the app's default)
   when the system asks for dark. The brand band at the top stays dark in both, as the
   app icon does, so the hero art sits on its own ground. */
:root {
	color-scheme: light;
	--surface-0: #f3f4f6;
	--surface-1: #ffffff;
	--surface-2: #e8ebef;
	--line: #e1e4e9;
	--line-strong: #cdd2da;
	--accent: #0b7550;
	--accent-soft: #0a6646;
	--accent-wash: rgba(16, 158, 104, 0.08);
	--accent-chip: rgba(16, 158, 104, 0.14);
	--accent-border: rgba(11, 117, 80, 0.75);
	--room: #2f6fe0;
	--warn: #995200;
	--warn-wash: rgba(224, 138, 0, 0.08);
	--warn-border: rgba(224, 138, 0, 0.4);
	--text-bright: #0d1015;
	--text-body: #1a1e25;
	--text-secondary: #394150;
	--text-muted: #555e6c;
	--shadow: 0 24px 64px -16px rgba(16, 22, 32, 0.28);
	--focus: #0a6646;

	/* The brand band: the app icon's colours, the same in both themes. */
	--brand-tile: #191d23;
	--brand-ground: #0e1013;
	--brand-wave: #5ad1a0;
	--brand-wave-soft: #7fdcb6;
	--brand-line: #e9ebef;
	--brand-text: #c3c9d2;

	--font-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
	--radius-control: 4px;
	--radius-card: 8px;
	--tracking-caps: 0.12em;
	--gutter: 16px;
	--max: 1160px;
}
@media (prefers-color-scheme: dark) {
	:root {
		color-scheme: dark;
		--surface-0: #0e1013;
		--surface-1: #111419;
		--surface-2: #191d23;
		--line: #1f242b;
		--line-strong: #262b33;
		--accent: #5ad1a0;
		--accent-soft: #7fdcb6;
		--accent-wash: rgba(90, 209, 160, 0.08);
		--accent-chip: rgba(90, 209, 160, 0.14);
		--accent-border: rgba(90, 209, 160, 0.4);
		--room: #4f8cff;
		--warn: #ffb454;
		--warn-wash: rgba(255, 180, 84, 0.08);
		--warn-border: rgba(255, 180, 84, 0.4);
		--text-bright: #f2f4f7;
		--text-body: #e9ebef;
		--text-secondary: #c3c9d2;
		--text-muted: #8b93a1;
		--shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.7);
		--focus: #7fdcb6;
	}
}
@media (min-width: 720px) {
	:root {
		--gutter: 32px;
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
body {
	margin: 0;
	background: var(--surface-0);
	color: var(--text-body);
	font-family: var(--font-sans);
	font-size: 1.0625rem;
	line-height: 1.55;
}
img {
	max-width: 100%;
	height: auto;
	display: block;
}
a {
	color: var(--accent);
	text-underline-offset: 0.18em;
}
a:hover {
	color: var(--accent-soft);
}
:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}
code,
.mono {
	font-family: var(--font-mono);
	font-size: 0.86em;
}
h1,
h2,
h3 {
	color: var(--text-bright);
	line-height: 1.2;
	margin: 0;
}
h2 {
	font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
	font-weight: 700;
	letter-spacing: -0.01em;
}
h3 {
	font-size: 1.125rem;
	font-weight: 600;
}
p {
	margin: 0;
}
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
.skip {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	z-index: 10;
	padding: 8px 12px;
	background: var(--brand-wave);
	color: #05271b;
	border-radius: var(--radius-control);
	font-weight: 600;
}
.skip:focus {
	top: 12px;
}
.skip:hover {
	color: #05271b;
}
.wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 var(--gutter);
}
.kicker {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 12px;
}

.lede {
	color: var(--text-secondary);
	max-width: 46rem;
	margin-top: 14px;
}

/* Brand band: the masthead on every page, and the hero on the home page. The masthead stays at
   the top of the window as the page scrolls; the brand colours are the same in both themes. */
.brand,
.masthead {
	color: var(--brand-text);
	color-scheme: dark;
	--focus: var(--brand-wave-soft);
}
.brand {
	background:
		radial-gradient(60% 70% at 70% 30%, rgba(90, 209, 160, 0.12), rgba(90, 209, 160, 0) 70%),
		linear-gradient(var(--brand-tile), var(--brand-ground));
}
.brand a {
	color: var(--brand-wave);
}
.sticky-top {
	position: sticky;
	top: 0;
	z-index: 20;
}
.masthead {
	background: rgba(25, 29, 35, 0.94);
	border-bottom: 1px solid rgba(233, 235, 239, 0.08);
}
@supports (backdrop-filter: blur(8px)) {
	.masthead {
		background: rgba(25, 29, 35, 0.82);
		backdrop-filter: blur(12px) saturate(1.2);
	}
}
.top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 60px;
	padding-top: 10px;
	padding-bottom: 10px;
}
.logo {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: none;
	color: var(--brand-line);
	font-weight: 600;
	text-decoration: none;
}
.masthead .logo,
.masthead .logo:hover {
	color: var(--brand-line);
}
.logo svg {
	width: 32px;
	height: 32px;
	flex: none;
}
.top nav {
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}
.top nav ul {
	display: flex;
	gap: 4px 20px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.9375rem;
	white-space: nowrap;
}
.masthead .top nav a {
	color: var(--brand-text);
	text-decoration: none;
}
.masthead .top nav a:hover,
.masthead .top nav a[aria-current] {
	color: var(--brand-line);
	text-decoration: underline;
	text-decoration-color: var(--brand-wave);
}
@media (max-width: 719px) {
	.logo span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}
	.top nav ul {
		gap: 16px;
		font-size: 0.875rem;
	}
}
/* On a phone the masthead keeps the links a reader of a guide needs most. */
@media (max-width: 599px) {
	.top nav .wide {
		display: none;
	}
}

.cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 18px;
}
.button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 18px;
	border-radius: var(--radius-control);
	border: 1px solid var(--line-strong);
	background: var(--surface-1);
	color: var(--text-bright);
	font-weight: 600;
	text-decoration: none;
}
.button:hover {
	border-color: var(--accent-border);
	color: var(--text-bright);
	background: var(--accent-wash);
}

footer {
	border-top: 1px solid var(--line);
	padding: 40px 0 56px;
	font-size: 0.875rem;
	color: var(--text-muted);
}
footer ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}
footer p + p {
	margin-top: 6px;
}

/* Guide cards: the home page's Guides section and the foot of every guide. */
.guides {
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
.guides a {
	display: block;
	height: 100%;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius-card);
	background: var(--surface-1);
	text-decoration: none;
}
.guides a:hover {
	border-color: var(--accent-border);
	background: var(--accent-wash);
}
.guides strong {
	display: block;
	color: var(--text-bright);
	font-weight: 600;
}
.guides span {
	display: block;
	margin-top: 2px;
	font-size: 0.875rem;
	color: var(--text-secondary);
}

/* Who makes the app: the hero's byline and the footer's first line. */
.byline {
	margin-top: 20px;
	font-size: 0.9375rem;
}
.byline a {
	font-weight: 600;
}
.credit a {
	color: var(--text-secondary);
	font-weight: 600;
}

/* Links to a heading. site.js adds a # after each section heading: following it puts the
   section's address in the address bar and copies it, ready to cite. The sticky masthead is
   --sticky tall (site.js measures it), so a heading reached by its link is not hidden under it. */
:is(h2, h3, h4)[id],
section[id] {
	scroll-margin-top: calc(var(--sticky, 72px) + 16px);
}
.anchor {
	margin-left: 0.35em;
	padding: 0 0.15em;
	color: var(--text-muted);
	font-family: var(--font-mono);
	font-weight: 400;
	font-size: 0.8em;
	text-decoration: none;
	opacity: 0;
	transition: opacity 120ms ease;
}
:is(h2, h3, h4):hover > .anchor,
.anchor:focus-visible {
	opacity: 1;
}
.anchor:hover {
	color: var(--accent);
}
@media (hover: none) {
	.anchor {
		opacity: 0.55;
	}
}
.toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 30;
	transform: translate(-50%, 8px);
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--brand-tile);
	color: var(--brand-line);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
	font-size: 0.875rem;
	opacity: 0;
	pointer-events: none;
	transition:
		opacity 160ms ease,
		transform 160ms ease;
}
.toast.is-shown {
	opacity: 1;
	transform: translate(-50%, 0);
}
@media (prefers-reduced-motion: reduce) {
	.anchor,
	.toast {
		transition: none;
	}
}

/* Guides, the privacy policy and every other page written in Markdown (docs/_layouts). */
.pagebar {
	background: var(--surface-1);
	border-bottom: 1px solid var(--line);
	color: var(--text-secondary);
	color-scheme: light dark;
	--focus: var(--accent-soft);
}
.pagebar .wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	font-size: 0.9375rem;
}
.pagebar a {
	color: inherit;
	text-decoration: none;
}
.pagebar a:hover {
	color: var(--accent);
	text-decoration: underline;
}
.pagebar a.pagebar-title {
	flex: none;
	max-width: 45%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--text-bright);
	font-weight: 600;
}
.pagebar-sep {
	color: var(--text-muted);
}
.pagebar-section {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.pagebar-section[hidden],
.pagebar-sep[hidden] {
	display: none;
}
.pagebar .copy {
	flex: none;
	margin-left: auto;
	padding: 4px 10px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-control);
	background: none;
	color: var(--text-secondary);
	font: inherit;
	font-size: 0.8125rem;
	cursor: pointer;
}
.pagebar .copy:hover {
	border-color: var(--accent-border);
	background: var(--accent-wash);
	color: var(--text-bright);
}

.doc {
	display: grid;
	gap: 32px;
	padding-top: 40px;
	padding-bottom: 72px;
}
@media (min-width: 1040px) {
	.doc {
		grid-template-columns: 232px minmax(0, 1fr);
		gap: 56px;
		padding-top: 56px;
	}
}
.toc {
	align-self: start;
	border: 1px solid var(--line);
	border-radius: var(--radius-card);
	background: var(--surface-1);
	font-size: 0.875rem;
}
.toc summary {
	padding: 12px 16px;
	cursor: pointer;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: var(--text-muted);
}
.toc ol {
	list-style: none;
	margin: 0;
	padding: 0 8px 12px;
}
.toc ol ol {
	padding: 0 0 0 12px;
}
.toc a {
	display: block;
	padding: 4px 8px;
	border-left: 2px solid transparent;
	color: var(--text-secondary);
	text-decoration: none;
	line-height: 1.35;
}
.toc a:hover {
	color: var(--text-bright);
}
.toc a[aria-current] {
	border-left-color: var(--accent);
	color: var(--text-bright);
	font-weight: 600;
}
@media (min-width: 1040px) {
	.toc {
		position: sticky;
		top: calc(var(--sticky, 108px) + 24px);
		max-height: calc(100vh - var(--sticky, 108px) - 48px);
		overflow-y: auto;
		border: 0;
		background: none;
	}
	.toc summary {
		padding: 0 8px 10px;
		cursor: default;
		list-style: none;
	}
	.toc summary::-webkit-details-marker {
		display: none;
	}
	.toc ol {
		padding: 0;
	}
}

.prose {
	min-width: 0;
	max-width: 46rem;
}
.prose h1 {
	font-size: clamp(2rem, 1.4rem + 2.4vw, 2.9rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
}
.prose h2 {
	margin-top: 2.2em;
	padding-top: 1.1em;
	border-top: 1px solid var(--line);
	font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.75rem);
}
.prose h3 {
	margin-top: 1.9em;
	font-size: 1.2rem;
}
.prose h4 {
	margin-top: 1.6em;
	color: var(--text-bright);
	font-size: 1rem;
}
.prose :is(h1, h2, h3, h4):target {
	animation: target 1.6s ease-out;
}
@keyframes target {
	from {
		background: var(--accent-chip);
	}
	to {
		background: transparent;
	}
}
@media (prefers-reduced-motion: reduce) {
	.prose :is(h1, h2, h3, h4):target {
		animation: none;
	}
}
.prose :where(p, ul, ol, dl, table, pre, blockquote, .highlighter-rouge, figure) {
	margin: 1em 0 0;
}
.prose h1 + p {
	margin-top: 1.2em;
}
.prose :is(ul, ol) {
	padding-left: 1.4em;
}
.prose li + li,
.prose li > :is(ul, ol) {
	margin-top: 0.35em;
}
.prose li > p {
	margin-top: 0.5em;
}
.prose li::marker {
	color: var(--text-muted);
}
.prose strong {
	color: var(--text-bright);
	font-weight: 600;
}
.prose :not(pre) > code {
	padding: 0.12em 0.36em;
	border-radius: var(--radius-control);
	background: var(--surface-2);
	color: var(--text-bright);
	overflow-wrap: anywhere;
}
.prose pre {
	padding: 16px 18px;
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: var(--radius-card);
	background: var(--surface-1);
	font-size: 0.875rem;
	line-height: 1.5;
}
.prose .highlighter-rouge pre,
.prose div.highlight {
	margin: 0;
}
.prose pre code {
	font-size: inherit;
}
.prose table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
	font-size: 0.9375rem;
}
.prose th,
.prose td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}
.prose thead th {
	background: var(--surface-2);
	color: var(--text-muted);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}
.prose blockquote {
	padding: 12px 18px;
	border-left: 3px solid var(--accent);
	border-radius: 0 var(--radius-card) var(--radius-card) 0;
	background: var(--accent-wash);
	color: var(--text-secondary);
}
.prose blockquote > :first-child {
	margin-top: 0;
}
.prose img {
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-card);
}
.prose hr {
	margin: 2.5em 0;
	border: 0;
	border-top: 1px solid var(--line);
}
.more {
	margin-top: 64px;
	padding-top: 32px;
	border-top: 1px solid var(--line);
}
.prose .more h2 {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
	font-size: 1.25rem;
}
