:root {
	--green: #716888;
	--purple: #413a54;
}

body {
	margin: 8px;
	background: white;
	color: black;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 18px;
	line-height: 1.35;
}

a,
a:visited {
	color: var(--purple);
}

a:hover,
a:focus-visible {
	color: var(--green);
}

main {
	width: 680px;
	max-width: 100%;
	margin: 30px auto;
}

.photo {
	display: block;
	height: auto;
	max-width: 100%;
	margin: 0 auto;
}

.photo-top {
	width: 360px;
	margin-bottom: 18px;
}

.photo-footer {
	width: 320px;
	margin-bottom: 18px;
}

h1 {
	margin-bottom: 0;
	color: var(--purple);
	font-size: 2.5em;
}

h2 {
	margin-bottom: 0.4em;
	font-size: 1.3em;
}

hr {
	height: 1px;
	margin: 24px 0;
	border: 0;
	border-top: 2px solid var(--green);
}

table {
	width: 100%;
	border-collapse: collapse;
}

th {
	background: #eeeeee;
}

.counter {
	font-family: "Courier New", Courier, monospace;
	font-size: 0.9em;
}

.rsvp {
	padding: 4px 12px 12px;
	background: #f4f2f8;
	border: 1px solid var(--purple);
}

.big-link {
	font-size: 1.35em;
	font-weight: bold;
}

.small {
	font-size: 0.8em;
}

@media (max-width: 520px) {
	body {
		font-size: 17px;
	}

	main {
		margin-top: 12px;
	}

	h1 {
		font-size: 2em;
	}

	table,
	tbody,
	tr,
	th,
	td {
		display: block;
		width: 100%;
	}

	tr {
		border-bottom: 1px solid #777;
	}

	th {
		display: none;
	}

	td {
		border: 0;
		padding: 2px 7px;
	}

	td:first-child {
		padding-top: 8px;
		font-weight: bold;
	}

	td:last-child {
		padding-bottom: 8px;
		font-style: italic;
	}
}

@media print {
	@page {
		margin: 0.55in;
	}

	body {
		margin: 0;
		font-size: 12pt;
		line-height: 1.25;
	}

	main {
		width: auto;
		margin: 0;
	}

	h1 {
		color: black;
		font-size: 26pt;
	}

	h2 {
		margin-top: 14pt;
	}

	hr {
		margin: 12pt 0;
	}

	a,
	a:visited {
		color: black;
	}

	table,
	.rsvp {
		break-inside: avoid;
	}

	.rsvp {
		background: white;
	}

	.screen-only {
		display: none;
	}
}
