html {
	--theme-hue: 0;
	--accent-hue: 315;

	--text-color-richer: hsl(var(--theme-hue), 0%, 5%);
	--text-color-normal: hsl(var(--theme-hue), 0%, 15%);
	--text-color-soft: hsl(var(--theme-hue), 0%, 40%);
	--text-color-softer: hsl(var(--theme-hue), 0%, 70%);
	--text-color-invert: hsl(var(--theme-hue), 0%, 100%);

	--text-color-photo-overlay: #fff;
	--text-color-code-string: #0c87c9;
	--text-color-code-func: #e9950c;
	--text-color-code-var: #df3079;
	--text-shadow-color: rgba(0, 0, 0, 0.4);
	--text-complete-color: #1b9423;
	--text-incomplete-color: #d12d2d;

	--svg-background: hsl(var(--theme-hue), 0%, 100%);
	--flashcard-background: rgba(0, 0, 0, 0.85);
}

@media (prefers-color-scheme: dark) {
	html {
		--theme-hue: 0;
		--accent-hue: 315;

		--text-color-richer: hsl(var(--theme-hue), 0%, 95%);
		--text-color-normal: hsl(var(--theme-hue), 0%, 85%);
		--text-color-soft: hsl(var(--theme-hue), 0%, 60%);
		--text-color-softer: hsl(var(--theme-hue), 0%, 40%);
		--text-color-invert: hsl(var(--theme-hue), 0%, 0%);

		--svg-background: hsl(var(--theme-hue), 0%, 80%);
	}
}

body {
	font-family: 'Lato', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	color: var(--text-color-normal);
	font-size: 2.3rem;
	font-weight: 300;
}
h1 {
	font-family: 'Neuton', serif;
	font-weight: 700;
	font-style: normal;
	font-size: 7.2rem;
	color: var(--text-color-richer);
}
h1.hero {
	width: 100%;
	aspect-ratio: 4 / 3;
	background: url('/images/header@1x.webp') no-repeat top left;
	line-height: 6rem;
	color: var(--text-color-photo-overlay);
	text-shadow: 2px 2px 6px var(--text-shadow-color);
	text-indent: 1.5rem;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
	h1.hero {
		background: url('/images/header@2x.webp') no-repeat top left;
		background-size: 100%;
	}
}
h2,
h3 {
	font-size: 2.3rem;
	font-weight: 400;
	color: var(--text-color-richer);
}
h3 {
	font-size: 2.2rem;
}
h2 span,
h3 span {
	display: inline-block;
	position: relative;
	top: -0.2rem;
	width: 3rem;
	height: 3rem;
	margin: 0 0.3rem 0 0;
	line-height: 2.8rem;
	border-radius: 0.6rem;
	font-size: 2rem;
	color: var(--text-color-invert);
	text-align: center;
	background: var(--text-color-softer);
}
h3 span {
	width: auto;
	height: 2.8rem;
	padding: 0 0.76rem;
	line-height: 2.6rem;
	border-radius: 0.5rem;
	font-size: 1.8rem;
	letter-spacing: 0.001rem;
}
h2 span span,
h3 span span {
	display: none;
}
table {
	width: 100%;
}
table thead th {
	color: var(--text-color-softer);
}
table th.number,
table td.number {
	text-align: right;
}

a {
	text-decoration: none;
}
figure {
	margin: 0 0 2rem;
}
figcaption {
	font-size: 1.4rem;
	color: var(--text-color-softer);
	text-align: center;
}
img.svg {
	background: var(--svg-background);
	border-radius: 0.8rem;
}
ul,
ol {
	padding-left: 3rem;
	list-style-position: outside;
}
ul {
	list-style-type: disc;
}
::marker {
	color: var(--text-color-softer);
}
code {
	font-size: 1.5rem;
	white-space: normal;
	color: var(--text-color-richer);
}
code .string {
	color: var(--text-color-code-string);
}
code .func {
	color: var(--text-color-code-func);
}
code .var {
	color: var(--text-color-code-var);
}

.container {
	position: relative;
	width: 100%;
	max-width: 800px;
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
}
.grid-container {
	padding: 0;
	grid-gap: 0 20px;
	gap: 0 20px;
}
.grid-container p {
	text-align: left;
}

.footer {
	text-align: center;
	color: var(--text-color-softer);
}

@media (max-width: 810px) {
	body {
		font-size: 2rem;
	}
	h1 {
		font-size: 4.3rem;
	}
	h1.hero {
		width: 100%;
	}
	h2 {
		font-size: 2rem;
	}
	h2 span {
		top: -0.2rem;
		width: 2.5rem;
		height: 2.5rem;
		margin: 0 0.3rem 0 0;
		line-height: 2.3rem;
		font-size: 1.5rem;
	}
	table th,
	table td {
		font-size: 1.6rem;
	}
}

#nepali.container {
	position: relative;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
}

#header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}
#header h1 {
	min-width: 604px;
	z-index: 20;
}

#controls {
	display: flex;
	width: 380px;
	align-items: center;
}
#controls.loading {
	display: none;
}
#controls input,
#controls button {
	display: inline-block;
	margin: 0;
	margin-right: 1rem;
}
#controls input {
	width: 250px;
	font-size: 1.3rem;
}

/* Stats and navigation live in a bar fixed to the bottom of the viewport.
   margin: 0 matters — with bottom: 0, a <p>'s default margin-bottom would
   push the bar up off the bottom edge. */
#progress {
	position: fixed;
	bottom: 0;
	left: 0;
	z-index: 40;

	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom));

	display: flex;
	justify-content: center;
	background: var(--background-color);
	border-top: 1px solid var(--border-color);
}

/* The bottom bar yields to the lesson flow, which has its own bottom UI. */
#nepali:has(#screen-lesson:not(.hide)) #progress,
#nepali:has(#screen-complete:not(.hide)) #progress {
	display: none;
}

/* Clearance so scrolled-to-bottom content isn't hidden behind the bar. */
#nepali {
	padding-bottom: 90px;
}
#progress.loading {
	display: none;
}
#progress span,
#progress a {
	padding-left: 5px;
}
#progress span {
	color: var(--text-color-richer);
}
#progress a {
	cursor: pointer;
	user-select: none;
}
#progress .material-icons {
	padding-left: 14px;
	line-height: 1.6;
}
#progress span.material-icons {
	color: var(--text-color-softer);
}
#progress #user-label {
	padding-left: 0;
	margin-left: -3px;
}
#progress #streak-label {
	margin: 0 -7px;
}

table#words thead th {
	text-transform: uppercase;
	font-size: 1.5rem;
}

table#words tbody th:first-child {
	font-weight: 300;
	color: var(--text-color-code-var);
}
table#words tbody td:nth-child(2) {
	font-style: italic;
	color: var(--text-color-soft);
}
table#words thead th:nth-child(4),
table#words tbody td:nth-child(4) {
	font-size: 1.3rem;
}
table#words tbody tr.complete th {
	position: relative;
}
table#words tbody tr.complete th::before {
	content: '✓';
	position: absolute;
	width: 3rem;
	height: 3rem;
	line-height: 3rem;
	text-align: center;
	top: 50%;
	left: -3.5rem;
	transform: translateY(-50%);
	color: var(--text-complete-color);
}
table#words tbody tr.complete th,
table#words tbody tr.complete td {
	color: var(--text-color-softer);
}
table#words tbody tr.topic th {
	color: var(--text-color-richer);
	font-weight: 700;
}
table#words tbody tr.solo th {
	position: relative;
	color: var(--text-color-code-func);
}
table#words tbody tr.solo th::before {
	content: '🔍';
	position: absolute;
	width: 3rem;
	height: 3rem;
	line-height: 3rem;
	text-align: center;
	top: 50%;
	left: -3.5rem;
	transform: translateY(-50%);
}

table#vocab thead {
	display: none;
}
table#vocab th,
table#vocab td {
	border: 0;
}
table#vocab tbody {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 20px;
}
table#vocab tbody tr.topic {
	width: 100%;
}
table#vocab tbody tr:not(.topic) {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;

	width: 272px;
	height: 240px;
	border: 1px solid var(--border-color);
	border-radius: 8px;
}
table#vocab tbody tr:not(.topic) th,
table#vocab tbody tr:not(.topic) td {
	width: 100%;
	padding: 4px 12px;
	text-align: center;
}
table#vocab tbody tr:not(.topic) th:first-child {
	background-color: var(--background-color-softer);
	font-weight: 300;
	color: var(--text-color-code-var);
}
table#vocab tbody td:nth-child(2) {
	font-style: italic;
	font-size: 1.7rem;
	color: var(--text-color-soft);
}
table#vocab tbody td:nth-child(3) {
	font-size: 7.8rem;
	line-height: 1;
}

#flashcard {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: var(--flashcard-background);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 100;
}
#flashcard.hide {
	display: none;
}
#flashcard-content,
#quiz-content {
	width: 100%;
	max-width: 900px;
	height: 500px;
	padding: 10px 40px;
	background-color: var(--background-color);
	border: 1px solid var(--text-color-softer);
}
#flashcard-content.hide,
#quiz-content.hide {
	display: none;
}
#flashcard-word,
#quiz-word {
	font-family: 'Neuton', serif;
	font-weight: 700;
	font-style: normal;
	font-size: 6.2rem;
	color: var(--text-color-code-var);
}
#flashcard-pronounce,
#quiz-pronounce {
	font-size: 3rem;
	font-style: italic;
	color: var(--text-color-soft);
}
#flashcard-meaning {
	font-family: 'Neuton', serif;
	font-weight: 700;
	font-style: normal;
	font-size: 6.2rem;
}
#flashcard-usage {
	margin-top: 28px;
	font-size: 2rem;
}
#flashcard-close {
	position: fixed;
	top: 0;
	right: 0;
	display: block;
	z-index: 110;
	padding: 30px;
	cursor: pointer;
	font-size: 4rem;
	user-select: none;
}
#flashcard-next,
#flashcard-prev {
	width: 120px;
	height: 520px;
	cursor: pointer;
	font-size: 7rem;
	line-height: 7.5;
	text-align: center;
	user-select: none;
}

#quiz-choices {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	list-style: none;
	width: 100%;
	margin-top: 4rem;
	padding: 0;
}
#quiz-choices li {
	margin-bottom: 1.5rem;
}
#quiz-choices li button {
	width: 440px;
	height: 74px;
	font-size: 1.8rem;
	font-weight: 500;
	line-height: 25px;
	color: var(--text-color-normal);
	text-wrap: wrap;
	overflow: visible;
}
#quiz-choices li button:hover {
	color: var(--text-color-richer);
}
#quiz-choices li button.correct {
	color: var(--text-color-richer);
	border-color: var(--text-complete-color);
}
#quiz-choices li button.incorrect {
	color: var(--text-color-richer);
	border-color: var(--text-incomplete-color);
}
#quiz-choices li button.unselected {
	color: var(--text-color-softer);
}

@media (max-width: 1210px) {
	#flashcard-content,
	#quiz-content {
		height: 590px;
	}
	#quiz-choices li button {
		width: 74vw;
		min-width: 320px;
	}
	#flashcard-word,
	#quiz-word,
	#flashcard-meaning {
		font-size: 4.2rem;
	}
	#flashcard-pronounce,
	#quiz-pronounce {
		font-size: 2.7rem;
	}
}

@media (max-width: 810px) {
	#header h1,
	#controls {
		min-width: auto;
		width: 100%;
	}
	#progress .material-icons {
		line-height: 1.4;
	}

	table#words thead th {
		font-size: 1.1rem;
	}
	table#words thead th:nth-child(4),
	table#words tbody td:nth-child(4) {
		display: none;
	}
	table#words tbody tr.complete th::before {
		left: -2.5rem;
	}

	#flashcard-content,
	#quiz-content {
		height: 650px;
		padding: 8px 30px;
	}
	#flashcard-close {
		padding: 15px;
	}
	#flashcard-next,
	#flashcard-prev {
		height: 670px;
		line-height: 9.5;
	}
	#flashcard-word,
	#quiz-word,
	#flashcard-meaning {
		font-size: 3.8rem;
	}
	#flashcard-pronounce,
	#quiz-pronounce {
		font-size: 2.5rem;
	}
	#flashcard-usage {
		margin-top: 20px;
		font-size: 1.6rem;
	}
}

/* Compact bottom bar for narrow phones: fill the full width, smaller icons. */
@media (max-width: 429px) {
	#progress {
		padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
		justify-content: space-between;
	}
	#progress span,
	#progress a {
		padding-left: 0;
	}
	#progress .material-icons {
		padding-left: 4px;
		font-size: 2rem;
		line-height: 1.5;
	}
	#progress #user-label {
		margin-left: 0;
	}
	#progress #streak-label {
		margin: 0 -3px 0 0;
	}
	#progress #name {
		max-width: 56px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	#progress span {
		font-size: 1.6rem;
	}
}

@media (max-width: 500px) {
	#flashcard-next,
	#flashcard-prev {
		position: fixed;
		line-height: 25.8;
		z-index: 10;
		font-size: 5rem;
	}
	#flashcard-prev {
		left: 0;
		text-align: left;
	}
	#flashcard-next {
		right: 0;
		text-align: right;
	}
	#quiz-choices li button {
		width: 84vw;
		position: relative;
		z-index: 20;
	}
}

/* Screens */

.hide {
	display: none !important;
}

#nav-home,
#nav-dictionary {
	cursor: pointer;
}

/* Home screen */

#daily-lesson {
	display: block;
	width: 100%;
	max-width: 560px;
	margin: 0 auto 4rem;
	height: auto;
	padding: 1.6rem;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.4;
	text-transform: none;
	letter-spacing: normal;
	color: var(--text-color-invert);
	background: hsl(var(--accent-hue), 65%, 45%);
	border: 0;
	border-radius: 1rem;
	cursor: pointer;
}
#daily-lesson:hover:not(:disabled) {
	background: hsl(var(--accent-hue), 65%, 38%);
}
#daily-lesson:disabled {
	background: var(--text-color-softer);
	cursor: default;
}

/* The winding lesson path. Geometry (positions, node sizes) is computed in JS;
   this handles colors, type, and decoration. */

html {
	--path-complete-color: #166bf5;
}

#path {
	position: relative;
	max-width: 560px;
	margin: 0 auto 3rem;
}
.path-node {
	position: absolute;
	z-index: 1;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: 0;
	padding: 0;
	background: var(--border-color);
	/* Solid shadow: a translucent one lets path dots show through. */
	box-shadow: 0 5px 0 color-mix(in srgb, rgb(0, 0, 0) 35%, var(--background-color));
}
.path-node .material-icons {
	font-size: 3.4rem;
	color: var(--text-color-softer);
}
.path-node.complete {
	background: var(--path-complete-color);
}
.path-node.current {
	background: hsl(var(--accent-hue), 65%, 45%);
}
.path-node.complete .material-icons,
.path-node.current .material-icons {
	color: #fff;
}
.path-node.complete:hover,
.path-node.current:hover {
	filter: brightness(1.12);
}
/* Solid colors rather than opacity, so path dots can't show through. */
.path-node.locked {
	cursor: default;
	background: color-mix(in srgb, var(--border-color) 55%, var(--background-color));
}
.path-node.locked .material-icons {
	color: color-mix(in srgb, var(--text-color-softer) 60%, var(--background-color));
}
.path-ring {
	position: absolute;
	z-index: 1;
	border-radius: 50%;
}
.path-label {
	position: absolute;
	z-index: 1;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--text-color-richer);
}
.path-label small {
	display: block;
	font-size: 1.25rem;
	font-weight: 400;
	color: var(--text-color-soft);
}
.path-label.locked-label {
	color: var(--text-color-softer);
}
.path-label.left {
	text-align: right;
}
.path-dot {
	position: absolute;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--border-color);
}
.path-dot.done {
	background: var(--path-complete-color);
}
.path-badge {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 26px;
	height: 26px;
	padding: 0 6px;
	border-radius: 13px;
	background: var(--text-color-code-func);
	color: #fff;
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 26px;
	text-align: center;
}
.path-start {
	position: absolute;
	z-index: 2;
	transform: translate(-50%, 0);
	padding: 0.5rem 1.4rem;
	border-radius: 1rem;
	background: var(--background-color);
	border: 2px solid hsl(var(--accent-hue), 65%, 45%);
	color: hsl(var(--accent-hue), 65%, 55%);
	font-size: 1.3rem;
	font-weight: 800;
	letter-spacing: 0.12rem;
	pointer-events: none;
	animation: bob 1.2s ease-in-out infinite alternate;
}
.path-start::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: -7px;
	width: 12px;
	height: 12px;
	transform: translateX(-50%) rotate(45deg);
	background: var(--background-color);
	border-right: 2px solid hsl(var(--accent-hue), 65%, 45%);
	border-bottom: 2px solid hsl(var(--accent-hue), 65%, 45%);
}
@keyframes bob {
	from {
		transform: translate(-50%, 0);
	}
	to {
		transform: translate(-50%, -6px);
	}
}
.path-section {
	position: absolute;
	z-index: 1;
	left: 0;
	width: 100%;
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--text-color-soft);
	font-size: 1.3rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.14rem;
}
.path-section::before,
.path-section::after {
	content: '';
	flex: 1;
	height: 2px;
	background: var(--border-color);
}

@media (max-width: 520px) {
	#daily-lesson {
		font-size: 1.6rem;
		padding: 1.2rem;
		white-space: normal;
		line-height: 1.35;
	}
	.path-node .material-icons {
		font-size: 2.8rem;
	}
	.path-label {
		font-size: 1.3rem;
	}
	.path-label small {
		font-size: 1.1rem;
	}
	.path-section {
		font-size: 1.1rem;
		letter-spacing: 0.1rem;
	}
	.path-badge {
		min-width: 22px;
		height: 22px;
		line-height: 22px;
		font-size: 1.1rem;
	}
}

#dictionary-link-wrap {
	text-align: center;
}
#dictionary-link,
#home-link {
	cursor: pointer;
	color: var(--text-color-soft);
}
#dictionary-link:hover,
#home-link:hover {
	color: var(--text-color-richer);
}

/* Lesson screen */

#screen-lesson {
	max-width: 700px;
	margin: 0 auto;
	padding-bottom: 220px;
}
#lesson-top {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 4rem;
}
#lesson-quit {
	cursor: pointer;
	font-size: 3rem;
	color: var(--text-color-softer);
	user-select: none;
}
#lesson-quit:hover {
	color: var(--text-color-richer);
}
#lesson-progress {
	flex: 1;
	height: 14px;
	border-radius: 7px;
	background: var(--border-color);
	overflow: hidden;
}
#lesson-progress-fill {
	height: 100%;
	width: 0;
	border-radius: 7px;
	background: var(--text-complete-color);
	transition: width 0.3s ease;
}

#exercise-label {
	margin-bottom: 1rem;
	font-size: 1.6rem;
	text-transform: uppercase;
	letter-spacing: 0.1rem;
	color: var(--text-color-soft);
}
#exercise-word {
	font-family: 'Neuton', serif;
	font-weight: 700;
	font-size: 5.2rem;
	line-height: 1.2;
	color: var(--text-color-code-var);
}
#exercise-pronounce {
	min-height: 4rem;
	font-size: 2.6rem;
	font-style: italic;
	color: var(--text-color-soft);
}

#exercise-choices {
	list-style: none;
	margin-top: 3rem;
	padding: 0;
}
#exercise-choices li {
	margin-bottom: 1.5rem;
}
#exercise-choices li button {
	width: 100%;
	height: auto;
	min-height: 64px;
	padding: 1.2rem 1.6rem;
	font-size: 1.8rem;
	font-weight: 500;
	line-height: 1.4;
	text-transform: none;
	letter-spacing: normal;
	text-align: left;
	color: var(--text-color-normal);
	text-wrap: wrap;
	overflow: visible;
	border-radius: 1rem;
}
#exercise-choices li button:hover {
	color: var(--text-color-richer);
}
#exercise-choices li button.correct {
	color: var(--text-color-richer);
	border-color: var(--text-complete-color);
}
#exercise-choices li button.incorrect {
	color: var(--text-color-richer);
	border-color: var(--text-incomplete-color);
}
#exercise-choices li button.unselected {
	color: var(--text-color-softer);
}

/* Word bank exercise */

#wordbank-answer {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-content: flex-start;
	min-height: 70px;
	margin-top: 1rem;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--border-color);
}
#wordbank-answer:empty::before {
	content: 'Tap the tiles below to build the phrase…';
	align-self: center;
	font-size: 1.6rem;
	font-style: italic;
	color: var(--text-color-softer);
}
#wordbank-pool {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-content: flex-start;
	min-height: 70px;
	padding-top: 16px;
}
.wordbank-tile {
	height: auto;
	padding: 0.9rem 1.5rem;
	font-size: 1.8rem;
	font-weight: 500;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: normal;
	color: var(--text-color-normal);
	border-radius: 1rem;
}
.wordbank-tile:hover {
	color: var(--text-color-richer);
}

/* Typing exercise */

#type-answer {
	width: 100%;
	max-width: 560px;
	height: auto;
	margin-top: 3rem;
	padding: 1.2rem 1.4rem;
	font-size: 2rem;
}

/* Matching exercise */

#exercise-match {
	display: flex;
	gap: 16px;
	margin-top: 3rem;
}
#match-left,
#match-right {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.match-tile {
	width: 100%;
	height: auto;
	min-height: 56px;
	padding: 0.9rem 1.2rem;
	font-size: 1.7rem;
	font-weight: 500;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: normal;
	text-align: center;
	color: var(--text-color-normal);
	text-wrap: wrap;
	overflow: visible;
	border-radius: 1rem;
}
.match-tile.selected {
	color: var(--text-color-richer);
	border-color: hsl(var(--accent-hue), 65%, 45%);
}
.match-tile.miss {
	color: var(--text-color-richer);
	border-color: var(--text-incomplete-color);
}
.match-tile.matched {
	color: var(--text-color-softer);
	border-color: var(--text-complete-color);
	cursor: default;
}

#exercise-check {
	margin-top: 2.5rem;
}

/* Primary action buttons in the lesson flow */

#exercise-check,
#lesson-continue,
#complete-continue {
	height: auto;
	padding: 1rem 3.2rem;
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--text-color-invert);
	background: hsl(var(--accent-hue), 65%, 45%);
	border: 0;
	border-radius: 1rem;
}
#exercise-check:hover:not(:disabled),
#lesson-continue:hover,
#complete-continue:hover {
	color: var(--text-color-invert);
	background: hsl(var(--accent-hue), 65%, 38%);
}
#exercise-check:disabled {
	background: var(--text-color-softer);
	cursor: default;
}

/* Hide the site footer while inside a lesson */

#screen-lesson:not(.hide) ~ .footer,
#screen-complete:not(.hide) ~ .footer {
	display: none;
}

#lesson-feedback {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 2rem 0 2.8rem;
	z-index: 50;
}
#lesson-feedback.correct {
	background: hsla(125, 69%, 34%, 0.16);
}
#lesson-feedback.incorrect {
	background: hsla(0, 65%, 50%, 0.16);
}
#lesson-feedback p {
	margin-bottom: 0.5rem;
}
#feedback-title {
	font-size: 2.2rem;
	font-weight: 700;
}
#lesson-feedback.correct #feedback-title {
	color: var(--text-complete-color);
}
#lesson-feedback.incorrect #feedback-title {
	color: var(--text-incomplete-color);
}
#feedback-answer {
	font-size: 1.8rem;
	color: var(--text-color-richer);
}
#lesson-continue {
	margin-top: 1rem;
}

/* Completion screen */

#screen-complete {
	max-width: 560px;
	margin: 0 auto;
	padding-top: 6rem;
	text-align: center;
}
#complete-title {
	font-family: 'Neuton', serif;
	font-weight: 700;
	font-size: 4.6rem;
	color: var(--text-complete-color);
	animation: grow-in 0.4s ease-out;
}
#complete-streak {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-size: 2.4rem;
	font-weight: 700;
	color: var(--text-color-code-func);
	animation: grow-in 0.5s ease-out;
}
#complete-streak .material-icons {
	font-size: 3rem;
}
#complete-stats {
	font-size: 2rem;
	margin-bottom: 0.5rem;
}
#complete-strengthened {
	font-size: 1.7rem;
	color: var(--text-color-soft);
}

/* Animations */

@keyframes slide-in {
	from {
		opacity: 0;
		transform: translateX(40px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
#exercise-body.slide-in {
	animation: slide-in 0.25s ease-out;
}

@keyframes slide-up {
	from {
		transform: translateY(100%);
	}
	to {
		transform: none;
	}
}
#lesson-feedback:not(.hide) {
	animation: slide-up 0.25s ease-out;
}

@keyframes grow-in {
	from {
		opacity: 0;
		transform: scale(0.7);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes tile-pop {
	50% {
		transform: scale(1.08);
	}
}
.match-tile.matched {
	animation: tile-pop 0.3s ease;
}

@keyframes tile-shake {
	20%,
	60% {
		transform: translateX(-4px);
	}
	40%,
	80% {
		transform: translateX(4px);
	}
}
.match-tile.miss {
	animation: tile-shake 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
	#exercise-body.slide-in,
	#lesson-feedback:not(.hide),
	#complete-title,
	#complete-streak,
	.match-tile.matched,
	.match-tile.miss,
	.path-start {
		animation: none;
	}
	#lesson-progress-fill {
		transition: none;
	}
}
