body {
    background-color: #222;
    color: #fff;
}

#main-page header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    font-family: sans-serif;
    margin-top: 5rem;
}

#main-page header img {
    width: 5rem;
}

#main-page header h1 {
    font-size: 2.4rem;
}

a, a:visited, a:visited {
    color: #99f;
    text-decoration: none;
}

a:hover {
    color: #99f;
    text-decoration: underline;
}

#search-container {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

#search-container input {
    appearance: none;
    background-color: #444;
    color: #fff;
    font-size: 1.3rem;
    padding: .8rem;
    border-radius: 1rem;
    border: 2px solid #999;
}

#search-page nav {
    display: flex;
    align-items: center;
    margin: 1rem;
    gap: 1.5rem;
}
#search-page nav img {
    width: 45px;
}
#search-page nav input {
    appearance: none;
    background-color: #444;
    color: #fff;
    font-size: 1.4rem;
    padding: .4rem;
    border-radius: .8rem;
    border: 2px solid #999;
    width: 100%;
}

#search-results {
    margin: .9rem;
}

#search-results h1 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
}

#search-results ul {
    list-style-type: none;
    padding-inline-start: 0;
    padding-inline-end: 0;
    margin-block-start: 0;
    margin-block-end: 0;
    max-width: 60rem;
}

#search-results li {
    margin-top: 2rem;
}

#video-transcript {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#video-transcript nav {
    margin-top: .8rem;
}

#video-transcript nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    gap: 1.2rem;
}

#video-transcript nav img {
    height: 3rem;
}

#video-transcript nav a,
#video-transcript nav a:visited,
#video-transcript nav a:hover,
#video-transcript nav a:active,
#error-page nav a,
#error-page nav a:visited,
#error-page nav a:hover,
#error-page nav a:active {
    color: #fff;
}

#video-transcript header {
    display: flex;
    justify-content: center;
    margin: 1.2rem .8rem 0;
    gap: .8rem;
}

#video-transcript header img {
    height: 7rem;
}

#video-transcript header h1 {
    font-size: 1.4rem;
}

#video-transcript article {
    line-height: 1.9;
    margin: .8rem 1.4rem 2rem;
    text-align: justify;
}

#video-transcript article span {
    position: relative;
}

#video-transcript article a {
    position: absolute;
    top: -1.1rem;
    right: 0;
    font-size: 0.7rem;
    margin-left: .3rem;
    -webkit-user-select: none;
    user-select: none;
}

.video-info {
    display: flex;
    gap: .5rem;
}

.video-info a {
    font-size: 1.4rem;
}

.metadata {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.metadata-item {
    font-size: 0.9rem;
    font-style: italic;
}

#search-results li img {
    height: 90px;
}

.highlight {
    margin: 0.6rem 0 0;
}

.highlight em {
    font-style: normal;
    font-weight: 700;
}

.page-indicator {
    font-size: 1.25rem;
    margin: 1.8rem 0 2rem;
    text-align: center;
}

#search-info .page-indicator {
    margin: 1.4rem 0 0;
}

#search-page form {
    width: 100%;
}

.page-indicator a {
    font-weight: 800;
    font-size: 1.7rem;
}

#error-page {
    text-align: center;
    margin: 1rem;
}

#error-page nav img {
    height: 2rem;
}

#error-page nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    font-size: 1.8rem;
}

@media screen and (min-width: 50em) {
    #main-page header {
	gap: 3rem;
    }

    #main-page header img {
	width: 15rem;
    }

    #main-page header h1 {
	font-size: 5rem;
    }

    #search-container input {
	font-size: 2rem;
	padding: 1.2rem;
	width: 44rem;
    }

    #search-container nav {
	margin: 1.4rem 2.5rem;
    }

    #search-page {
	display: flex;
	flex-direction: column;
	align-items: center;
    }

    #search-page nav {
	margin: 2rem 0 1.4rem;
	gap: 2rem;
    }

    #search-page nav input {
	width: 40rem;
    }

    #search-results {
	margin: 0 .7rem;
    }

    #search-results li a {
	font-size: 1.3rem;
    }

    #search-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 46rem;
    }

    #search-info h1 {
	max-width: 62%;
    }

    #search-info .page-indicator {
	margin: 0;
    }

    #search-info.no-page-indicator h1 {
	max-width: 100%;
    }

    #video-transcript header {
	max-width: 60rem;
	font-size: 1.2rem;
	margin: 1.2rem .8rem;
    }

    #video-transcript header img {
	height: 10rem;
    }

    #video-transcript article {
	max-width: 60rem;
	font-size: 1.2rem;
	margin: 0 2rem;
    }

    #video-transcript .video-info {
	align-items: center;
	gap: 1.2rem;
    }
}
