/* Locally installed builds of the same typeface before the Google Fonts name,
   so readers who have it skip the download */
:root {
	--serif-tc: "Noto Serif CJK TC", "Source Han Serif TC", "Noto Serif TC";
	--serif-sc: "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC";
	--sans-tc: "Noto Sans CJK TC", "Source Han Sans TC", "Noto Sans TC";
	--sans-sc: "Noto Sans CJK SC", "Source Han Sans SC", "Noto Sans SC";
}

:root,
:lang(zh-Hant) {
	--cjk-serif: var(--serif-tc), var(--serif-sc);
	--cjk-sans: var(--sans-tc), var(--sans-sc);
}

:lang(zh-Hans) {
	--cjk-serif: var(--serif-sc), var(--serif-tc);
	--cjk-sans: var(--sans-sc), var(--sans-tc);
}

/* font-family inherits as a computed value, so [lang] must redeclare it to
   pick up its own --cjk-*.  Serif is the root face, so every [lang] starts
   serif; :where() zeroes specificity, so the later sans wins under sans. */
.serif,
html,
input,
select,
textarea,
[lang] {
	font-family: Merriweather, Georgia, "Times New Roman", Times, var(--cjk-serif), serif;
}

.sans,
::placeholder,
button,
.toggle,
.menu,
main > nav,
aside > section > h2,
.tagcloud > a,
header :is(h1, h2, h3, h4, h5, h6),
main > h1,
article > footer,
:where(.sans, button, .toggle, .menu, main > nav, aside > section > h2, .tagcloud > a, header :is(h1, h2, h3, h4, h5, h6), main > h1, article > footer) [lang] {
	font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, var(--cjk-sans), sans-serif;
}

html,
input,
select,
textarea {
	color: #1a1a1a;
	line-height: 1.75;
}

html {
	font-synthesis: weight;
	-webkit-hyphens: auto;
	-ms-hyphens: auto;
	hyphens: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
}

p {
	margin: 0 0 1.75em;
}

blockquote {
	border: 0 solid #1a1a1a;
	border-left-width: 4px;
	color: #686868;
	font-size: 1.1875rem;
	font-style: italic;
	line-height: 1.5rem;
	margin: 0 0 1.5rem;
	padding: 0 0 0 1.75rem;
}

blockquote p {
	margin-bottom: 1.5rem;
}

blockquote cite,
blockquote small {
	color: #1a1a1a;
	display: block;
	font-size: 1rem;
	line-height: 1.75;
}

blockquote cite::before,
blockquote small::before {
	content: "\2014\00a0";
}

blockquote em,
blockquote i,
blockquote cite {
	font-style: normal;
}

blockquote > :last-child {
	margin-bottom: 0;
}

code,
kbd,
samp,
pre {
	font-family: Inconsolata, monospace;
}

pre {
	border: 1px solid #d1d1d1;
	font-size: 1rem;
	line-height: 1.3125;
	margin: 0 0 1.75rem;
	max-width: 100%;
	overflow: auto;
	padding: 1.75rem;
	white-space: pre;
	white-space: pre-wrap;
	word-wrap: break-word;
}

code {
	background-color: #d1d1d1;
	padding: 0.125em 0.25em;
}

pre > code {
	background-color: transparent;
	padding-left: 0;
	padding-right: 0;
}

abbr {
	border-bottom: 1px dotted #d1d1d1;
	cursor: help;
}

mark,
ins {
	background: #007acc;
	color: #fff;
	padding: 0.125em 0.25em;
	text-decoration: none;
}

q:lang(zh-Hant),
q:lang(ja) {
	quotes: "「" "」" "『" "』";
}

em:lang(zh):not(:lang(zh-Latn)),
em:lang(ja):not(:lang(ja-Latn)),
em:lang(ko):not(:lang(ko-Latn)) {
	-webkit-text-emphasis-style: filled;
	text-emphasis-style: filled;
}

@supports not (font-synthesis: weight) {
	:lang(zh) {
		-webkit-text-emphasis-position: under;
		-webkit-text-emphasis-position: under right;
		text-emphasis-position: under right;
	}

	blockquote:lang(zh):not(:lang(zh-Latn)),
	blockquote:lang(ja):not(:lang(ja-Latn)),
	blockquote:lang(ko):not(:lang(ko-Latn)),
	em:lang(zh):not(:lang(zh-Latn)),
	em:lang(ja):not(:lang(ja-Latn)),
	em:lang(ko):not(:lang(ko-Latn)) {
		font-style: normal;
	}
}

.unicode-name {
	font-variant: small-caps;
	text-transform: lowercase;
}
