/*--------------------------------------------------------------------------

	Typefolio reset

	Replaces the YUI 3 CSS reset the template used to pull from
	yui.yahooapis.com over plain HTTP. That file is no longer served, and
	an HTTP stylesheet is blocked as mixed content on any HTTPS site, so the
	template shipped with no reset at all on a modern host.

	This is a local, modern equivalent: the same normalisations the design
	was built against, plus the defaults a 2026 template wants.

--------------------------------------------------------------------------*/

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

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

body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
code,
figure,
form,
fieldset,
legend,
input,
textarea,
p,
blockquote,
th,
td {
	margin: 0;
	padding: 0;
}

/* The design supplies its own heading scale. */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-size: 100%;
	font-weight: normal;
	text-wrap: balance;
}

p { text-wrap: pretty; }

ol,
ul {
	list-style: none;
}

address,
caption,
cite,
code,
dfn,
em,
strong,
th,
var {
	font-style: normal;
	font-weight: normal;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

caption,
th { text-align: left; }

fieldset { border: 0; }

/* Replaced elements behave like blocks and never overflow their column. */
img,
video,
canvas,
svg,
iframe {
	display: block;
	max-width: 100%;
}

/*
	<picture> is only a wrapper for format negotiation. display: contents
	takes it out of the box tree so every `img` rule in the stylesheet still
	applies to the image exactly as it did before the AVIF and WebP sources
	were added.
*/
picture { display: contents; }

img,
video { height: auto; }

iframe { border: 0; }

/*
	Form controls inherit type instead of falling back to the UA font. The
	font shorthand does not carry letter-spacing, and Chromium's own sheet
	resets it to normal on controls, so it is inherited explicitly: buttons
	and fields are set in the same tightened Inter as everything else.
*/
input,
button,
textarea,
select {
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
}

textarea { resize: vertical; }

sup { vertical-align: text-top; }
sub { vertical-align: text-bottom; }

:where(a) { color: inherit; }

/* Anchor targets and :target scrolling clear the sticky top bar. */
html { scroll-padding-top: 2rem; }

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

/* Honour the operating system setting for users who get motion sick. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
