#let issuer = sys.inputs.issuer
#let target = sys.inputs.target

#set page(
	width: 11cm,
	height: 7cm,
	fill: red.lighten(90%),
	footer: text(size: 0.5em)[Issued by #issuer, #datetime.today().display()]
)
#set text(size: 1.1em)
#set text(font: "Comic Neue", weight: "bold", fill: gray.darken(80%))
#set align(center)
#set par(leading: 0.5em)

#let target = text(target.replace(".", "\u{200A}.\u{200A}"))

#text(size: 1.5em)[
	Congratulations, \
	#target user!
]
#parbreak()
#text(size: 0.9em)[
	Your homeserver supports authenticated media!
]

#block(
	above: 34pt,
	radius: 4pt,
	inset: 7pt,
	fill: green.lighten(85%),
	stroke: 2pt + green.lighten(10%),
	grid(
		columns: (2.3em, auto),
		grid.cell(text(size: 1.7em, top-edge: 0.85em, emoji.checkmark.box)),
		grid.cell(align(left)[
			#target \
			MSC3916 certified
		]),
	)
)

#let emojiscale = 45%
#place(horizon + right, dx: 41pt, dy: 35pt, scale(x: emojiscale, y: emojiscale, image("party.svg")))
#place(horizon + left, dx: -46pt, dy: 40pt, scale(x: emojiscale, y: emojiscale, image("confetti.svg")))
