/* IBM Plex, Copyright 2017 IBM Corp., SIL Open Font License 1.1 */
@font-face {
	font-family: "IBM Plex Sans";
	src: url("/fonts/IBMPlexSans.woff2") format("woff2");
	font-weight: 100 700;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Sans";
	src: url("/fonts/IBMPlexSans-Italic.woff2") format("woff2");
	font-weight: 100 700;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Serif";
	src: url("/fonts/IBMPlexSerif-SemiBold.woff2") format("woff2");
	font-weight: 600;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Mono";
	src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2");
	font-display: swap;
}

/*
 * Metric-matched fallbacks so text doesn't reflow when the real fonts swap in.
 * size-adjust is IBM Plex's average letter width over Arial / Times New Roman
 * Bold, weighted by English letter frequency.
 */
@font-face {
	font-family: "IBM Plex Sans Fallback";
	src: local("Arial"), local("Liberation Sans"), local("Arimo");
	size-adjust: 101.2%;
}

@font-face {
	font-family: "IBM Plex Sans Fallback";
	src: local("Arial Italic"), local("Liberation Sans Italic"), local("Arimo Italic");
	font-style: italic;
	size-adjust: 101.2%;
}

@font-face {
	font-family: "IBM Plex Serif Fallback";
	src: local("Times New Roman Bold"), local("Liberation Serif Bold"), local("Tinos Bold");
	font-weight: 600;
	size-adjust: 113.6%;
}

:root {
	/*
	 * Colours from Flexoki
	 * https://github.com/kepano/flexoki
	 * Copyright (c) 2023 Steph Ango, MIT License
	 * Accent shades chosen from the Flexoki scale for WCAG AAA (7:1) contrast
	 */
	color-scheme: light dark;
	--bg: light-dark(#fffcf0, #100f0f);       /* paper, black */
	--fg: light-dark(#100f0f, #cecdc3);       /* black, base-200 */
	--link: light-dark(#1a4f8c, #92bfdb);     /* blue-700, blue-200 */
	--code: light-dark(#942822, #f89a8a);     /* red-700, red-200 */
	--code-bg: light-dark(#f2f0e5, #1c1b1a);  /* base-50, base-950 */
}

body {
	max-width: 40rem;
	margin: auto;
	padding: 1.5rem 1rem;
	font: 1.0625rem/1.65 "IBM Plex Sans", "IBM Plex Sans Fallback", sans-serif;
	background: var(--bg);
	color: var(--fg);
	overflow-wrap: break-word;
}

h1, h2, h3, h4 {
	margin: 2.5rem 0 1rem;
	font-family: "IBM Plex Serif", "IBM Plex Serif Fallback", serif;
	font-weight: 600;
	line-height: 1.25;
}

h1 { font-size: 1.75rem; margin-top: 0; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

p, ul, ol, dl, pre { margin: 0 0 1.25rem; }
dd + dt { margin-top: 0.75rem; }

a {
	color: var(--link);
	text-decoration: underline 1px color-mix(in srgb, currentColor 65%, transparent); /* >= 3:1 on --bg, see just a11y */
	text-underline-offset: 0.2em;
}
a:hover { text-decoration: underline 2px; }
header a { color: inherit; }
.site-title { margin: 0 0 2rem; font: 600 1.125rem/1.25 "IBM Plex Serif", "IBM Plex Serif Fallback", serif; }
pre, code { font-family: "IBM Plex Mono", monospace; color: var(--code); background: var(--code-bg); border-radius: 3px; }
pre { overflow-x: auto; padding: 1rem; font-size: 0.8em; line-height: 1.6; }
code { padding: 0.1em 0.3em; font-size: 0.875em; }
pre code { padding: 0; font-size: 1em; }
img { max-width: 100%; }
.important-gif { display: block; width: 100%; max-width: 40ch; height: auto; }
.still-image { display: block; height: auto; }
.downloads { display: flex; flex-wrap: wrap; gap: 0 1rem; margin-top: 0.75rem; font-size: 0.875rem; }
hr { margin: 2.5rem 0 1.25rem; border: 0; border-top: 1px solid color-mix(in srgb, currentColor 50%, transparent); }
