:root {
	--background: #f8f7ed;
	--accent: #81693b;
	--accent-translucent: #81693b88;
	--accent-seethrough: #81693b22;
	--text: #1a1713;
}

body {
	display: flex;
	align-items: flex-start;
	justify-content: center;

	max-inline-size: 100%;
	margin: 0;
}

#contents {
	position: sticky;
	inset-block-start: 0;

	block-size: 100vb;
	margin: 0 1rem;

	color: var(--accent);
	font-family: var(--sans-serif);
	font-size: 0.85em;
}

#contents > header {
	margin-block-start: 1em;

	font-size: 1.125em;
	font-weight: bold;
}

#contents a {
	text-decoration: none;
}

#contents li::marker {
	font-variant-numeric: oldstyle-nums;
}

#contents .smallcapped-list {
	list-style-type: upper-alpha;
}

#contents .smallcapped-list li::marker {
	font-variant-caps: all-small-caps;
}

#contents nav > ol {
	padding-inline-start: 1em;
}

#contents nav > ol > li {
	margin-block-end: 0.5em;
}

#contents nav > ol ol {
	padding-inline-start: 2em;
}

main {
	max-inline-size: min(65ch, 100%);
	margin: 1rem;
	padding: 0;
}

main > header {
	padding-block-end: 0.2em;

	border-block-end: 1px dotted var(--accent);
}

main > header > h1 span {
	display: block;

	font-size: 1.5rem;
	font-weight: normal;
	text-align: start;
}

main > header > h1 {
	margin: 0;

	font-size: 3rem;
	font-weight: bold;
	line-height: 1;
	text-align: center;
}

main > header > small {
	display: block;

	margin-block-start: 0.5em;

	color: var(--accent);
	font-size: 1rem;
	text-align: end;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--sans-serif);
	font-weight: normal;
	text-align: start;
}

main > header > small {
	font-family: var(--sans-serif);
}

h2,
h3,
h4,
h5,
h6 {
	font-weight: normal;
	text-align: start;

	border-block-end: 1px dotted var(--accent);
}

h4 {
	font-variant-numeric: oldstyle-nums proportional-nums;
}

dl dt {
	margin-block-start: 1em;
	font-family: var(--sans-serif);
}

dl dd p:first-child {
	margin-block-start: 0;
}

code {
	display: inline;
	margin: 0;
	padding: 0;

	font-style: normal;

	background-color: transparent;
	border-radius: 0;
}

span.star {
	color: var(--accent);
}

#sidenotes {
	max-inline-size: 30ch;
}

summary {
	font-family: var(--sans-serif);
}

.examples,
blockquote {
	font-size: 0.9em;
	list-style-type: none;
	border-left: 1px solid var(--accent);
	background-color: var(--accent-seethrough);
	padding: 0.25em;
	padding-inline: 1em;
	hyphens: initial;
}

aside.note blockquote {
	font-size: 0.85em;
}

ul.examples.twofold {
	column-count: 2;
}

ul#changelog-list {
	list-style-type: none;
}

ul#changelog-list b {
	color: var(--accent);
	margin-right: 1ch;
}

.table-container,
pre {
	max-width: 100%;
	overflow-x: auto;
}

.table-container {
	margin-block: 1em;
}

details > .table-container {
	padding-inline: 0;
	margin-inline: 0;
}

table {
	border-collapse: collapse;
	font-size: 0.85rem;
	width: 100%;

	margin: auto;
}

pre code {
	width: 100%;
	max-width: none;
	display: block;
}

td,
th {
	border: 1px solid var(--accent-translucent);
	padding: 0.5ch 1ch;
}

.table-note {
	font-style: italic;
}

.table-note :lang(grc) {
	font-style: normal;
}

table tr:nth-child(odd) {
	background-color: var(--accent-seethrough);
}

table.sortable
	th:not(.sorttable_sorted):not(.sorttable_sorted_reverse):not(
		.sorttable_nosort
	)::after {
	content: " ⇅";
}

#countries-and-territories td:first-child {
	font-size: 1rem;
	text-align: center;
	line-height: 1;
}

@media only screen and (max-width: 55em) {
	#contents {
		display: none;
	}

	#container {
		padding: 0.5em;
		box-sizing: border-box;
	}
}

@media only screen and (max-width: 450px) {
	ul.examples.twofold {
		column-count: 1;
	}
}

@font-face {
	font-family: "Amiri";
	font-style: normal;
	font-weight: 400;
	src:
		local(""),
		url("/fonts/amiri-v16-latin_arabic-regular.woff2") format("woff2"),
		/* Chrome 26+, Opera 23+, Firefox 39+ */
			url("/fonts/amiri-v16-latin_arabic-regular.woff") format("woff");
	/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

@font-face {
	font-family: "Sahitya";
	font-style: normal;
	font-weight: 400;
	src:
		local(""),
		url("/fonts/sahitya-v5-devanagari-regular.woff2") format("woff2"),
		/* Chrome 26+, Opera 23+, Firefox 39+ */
			url("/fonts/sahitya-v5-devanagari-regular.woff") format("woff");
	/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

:lang(ar-Arab),
:lang(fa-Arab) {
	font-family: "Amiri", serif;
}

:lang(hi-Deva),
:lang(sa-Deva) {
	font-family: "Sahitya", serif;
}
