* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: Verdana, sans-serif;
  font-size: 0.875rem;
}

h1 {
  font-size: 1.125rem;
  font-weight: normal;
  color: dimgray;
}

h2 {
  font-size: 1rem;
  font-weight: bold;
}

h2, p, blockquote, figure {
  margin-bottom: 1rem;
}

h2:not(:first-of-type) {
  margin-top: 1rem;
}

a {
  text-decoration: none;
}

blockquote {
  font-style: italic;
  margin-left: 1.5rem;
}

figcaption {
  font-size: 0.75rem;
}

th, td {
  padding: 0.25rem;
}

.bottom {
  vertical-align: bottom;
}

.nowrap {
  white-space: nowrap;
}

header {
  padding: 1rem;
}

#content {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.5rem 2rem;
}

main {
  flex: 2;
  min-width: 250px;
}

nav {
  flex: 0 0 8rem;
  align-self: flex-start;
  padding: 1rem;
  border: 1px solid dimgray;
}

nav ul {
  list-style: none;
  line-height: 2rem;
}

nav a {
  font-size: 0.75rem;
  font-weight: bold;
  color: dimgray;
}

nav a:hover {
  text-decoration: underline;
}

#nav-toggle {
  display: none;
}

.menu-toggle {
  display: none;
}

.menu-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 3px 0;
  background-color: #333;
}

main p, main ul, main ol, main blockquote {
  line-height: 1.5;
  text-align: justify;
}

main a {
  font-weight: bold;
  color: royalblue;
}

main ul, main ol {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}

main ul {
  list-style: disc;
}

main ul + p {
  margin-top: 1rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 1.5rem;
}

.video-frame {
  position: relative;
  overflow: hidden;
}

.video-frame iframe {
  display: block;
  width: 100%;
  margin-bottom: 0.25rem;
  aspect-ratio: 16 / 9;
  border: none;
}

.disclaimer {
  margin-bottom: 1rem;
}

.disclaimer-link {
  font-weight: bold;
  color: royalblue;
  text-decoration: none;
  cursor: pointer;
}

.disclaimer-content {
  padding: 0.5rem;
  font-size: 0.75rem;
  text-align: justify;
  background: white;
  border: 1px solid dimgray;
}

#audioSample {
  width: 100%;
  margin-bottom: 0.5rem;
}

#audioSampleInfo {
  width: 100%;
  font-size: 0.75rem;
  line-height: 1.5;
}

#audioSampleInfo p {
  text-align: left;
}

#babelScoresViewer {
  width: 100%;
  min-height: 400px;
  margin-bottom: 0.5rem;
  border: none;
}

#frontpagecanvas {
  position: relative;
  display: block;
  width: 383px;
  height: 140px;
  margin: 3rem auto;
}

#scoreThumbnail {
  margin-bottom: 1rem;
  border: 1px solid dimgray;
}

#videoThumbnail {
  margin-top: 1.5rem;
}

@media (max-width: 600px) {
  main p, main ul, main ol {
    text-align: left;
  }

  main ul {
    padding-left: 0.125rem;
    list-style: square inside;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    z-index: 1001;
    cursor: pointer;
    line-height: 0;
  }

  nav {
    display: none;
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    width: 8rem;
    background: white;
    z-index: 1000;
  }

  #nav-toggle:checked ~ #content nav {
    display: block;
  }

  nav ul {
    column-count: 1;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  #content {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 1rem 1rem;
  }

  #frontpagecanvas {
    display: none;
  }
}

