@charset "UTF-8";

main {
	counter-reset: refs;
}

h1, :is(main, section) > :is(p, noscript, hr), nav, section > h2, #notes {
	/* beautiful selector */
	max-width: var(--max-w);
	margin-inline: auto;
}	

#toc {
	margin-block-end: var(--s-gap);
}

noscript {
	font-weight: bold;
	color: var(--active);
}

noscript p {
	margin-bottom: 1em;
}

.shortname {
	font-style: italic;
}

.emoji {
	font-family: emoji !important;
}

.date, .doc {
	hyphens: manual;
	white-space: nowrap;
}

.doc:empty {
	text-align: center;
	color: var(--subtle);
}

.doc:empty::before {
	content: "—";
}

.date {
	font-family: var(--code-font);
}

.doc ul {
	list-style-type: none;
}

.sample {
	text-align: center;
	
	--sample-size: 4em;
	
	&:has(img) {
		background-color: white;
	
		&.new-bg {
			background-color: #feff94;
		}
		
		&.changed-bg {
			background-color: #dcdbfe;
		}
	}
}

.sample:empty::before {
	content: "〓";
	color: var(--subtle);
}

.sample img {
	max-width: var(--sample-size);
	max-height: var(--sample-size);
	vertical-align: middle;
}

.sample .char {
	font-size: var(--sample-size);
}

.tag-sequence {
	direction: ltr;
}

.tag-sequence u {
	font-size: 0.9em;
	font-family: "Noto Serif", serif;
}

.tag-sequence u::after {
	content: "✦";
}

.ref {
	hyphens: manual;
	vertical-align: super;
	font-size: smaller;
	counter-increment: refs;
}

.ref::before {
	content: "[" counter(refs) "]";
}

ol.notes {
	padding-left: 3em;
}

ol.notes li {
	margin-bottom: 0.5em;
}

ol.notes li:target, .ref:target {
	outline: 1px dashed var(--active);
}

table ul {
	padding: 0;
	
	& li {
		--p-gap: 0.1em;
	}
}

hr {
	width: 100%;
	margin: 1em auto;
	height: 0.2em;
	background-color: var(--text);
}

@media (max-width: 750px) {
	.sample {
		--sample-size: 3.5em;
	}
}

@media (max-width: 500px) {
	.sample {
		--sample-size: 3em;
	}
	
	ol.notes {
		padding-left: 2em;
	}
}

@media (max-width: 400px) {
	.sample {
		--sample-size: 2.5em;
	}
	
	ol.notes {
		font-size: 0.9em;
		padding-left: 1.5em;
	}
}