/* Normalisation, loaded before everything else.
 *
 * The static build this theme is ported from runs Tailwind, whose preflight
 * zeroes the browser's default margins and makes form controls inherit the page
 * font. The design was drawn on top of that, so any element whose margin the
 * design does not set explicitly is expected to have none. Without this, a
 * heading picks up the browser's 1em and the section renders taller than it
 * should -- and a button falls back to the browser's 13px system font.
 *
 * Only the elements the design actually uses are covered.
 */

*,
*::before,
*::after {
	box-sizing: border-box;
	border: 0 solid;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd,
ol,
ul,
pre,
fieldset,
legend {
	margin: 0;
}

ol,
ul {
	padding: 0;
	list-style: none;
}

/* Headings take their size and weight from the design's own rules, not from
   the browser's defaults or the editor's global styles. Without this a heading
   the design does not explicitly weight comes out bolder and wraps onto an
   extra line.

   Qualified with `body` purely to outrank the element-level rules WordPress
   generates from theme.json, which print after this file. It still gives way to
   any rule with a class, which is how every section sets its own headings. */
body :is(h1, h2, h3, h4, h5, h6) {
	font-size: inherit;
	font-weight: inherit;
}

/* Form controls default to the system font at a smaller size, which the design
   never accounts for. */
button,
input,
optgroup,
select,
textarea {
	margin: 0;
	padding: 0;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
}

button {
	background-color: transparent;
	cursor: pointer;
}

img,
svg,
video,
canvas {
	display: block;
	max-width: 100%;
}

sub,
sup {
	position: relative;
	font-size: 75%;
	line-height: 0;
	vertical-align: baseline;
}

sup {
	top: -0.5em;
}

table {
	border-collapse: collapse;
	text-indent: 0;
}
