:root {
  --link-color: #747474;
  --link-hover-color: #BBB;
  --background: #FFF;
  --background-accent: #CCC;
  --text-color: #000;
  --input-background: #FFF;
  --input-text-color: #000;
}

@media (prefers-color-scheme: dark) {
  :root {
    --link-color: #aaa;
    --link-hover-color: #CDCDCD;
    --background: #1B1B1B;
    --background-accent: #4fc3f7;
    --text-color: #e0e0e0;
    --input-background: #343434;
    --input-text-color: #e0e0e0;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  box-sizing: border-box;
  background: var(--background);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

a,
.link {
  color: var(--link-color);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

a:hover,
.link:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

#container {
  position: relative;
  font: normal 1em arial, helvetica;
  min-height: 100%;
  padding-bottom: 1.4em;
  border-top: solid 1px var(--background-accent);
  box-sizing: border-box;
}

.wawjr3d {
  font-weight: bold;
}

.small.wawjr3d {
  background: url(/images/wawjr3d.small.2fcc1e8b83.png) no-repeat center left;
  text-shadow: none;
  padding-left: 20px;
}

header {
  height: 60px;
}

header nav {
  position: fixed;
  top: 0;
  left: 0;
  background: var(--background);
  text-align: center;
  width: 100%;
  border-bottom: solid 1px var(--background-accent);
  z-index: 100;
}

header nav > ul {
  background: var(--background);
  text-align: left;
}

header nav > ul > li {
  display: inline-block;
  position: relative;
  background: var(--background);
  height: 30px;
  padding: 5px 10px;
  cursor: pointer;
}

header nav > ul > li:hover {
  box-shadow: 1px 0 0 var(--background-accent);
}

header nav li a {
  position: relative;
  z-index: 0;
}

header nav li a:hover {
  text-decoration: none;
}

header nav li ul {
  position: absolute;
  top: 30px;
  left: 0;
  background: var(--background);
  white-space: nowrap;
  height: auto;
  padding: 10px;
  border: solid 1px var(--background-accent);
  z-index: -1;
  opacity: 0;
  box-shadow: .1em .1em 0 var(--background-accent);
  transform: translateY(-100%);
  transition: transform .2s ease, opacity .2s ease;
}

header nav li li {
  line-height: 25px;
  height: 25px;
}

header nav li li a {
  display: block;
}

header nav li:hover ul {
  opacity: 1;
  transform: translateY(0);
}

header nav li li:hover a {
  color: var(--link-hover-color);
}

.view_all {
  font-weight: bold;
}

#content {
  max-width: 61em;
  padding: 1em;
  margin: 0 auto;
}

#content:after {
  content: "fixin clear one rule at a time";
  display: block;
  clear: both;
  font-size: 0;
  line-height: 0;
  text-align: -999px;
  height: 0;
  visibility: hidden;
}

sup {
  font-size: 40%;
  vertical-align: top;
}

h1 {
  font-size: 1.5em;
  font-family: 'Fredericka the Great';
  line-height: 1em;
  margin: 1em 0;
}

h2 {
  font-weight: bold;
  font-size: 1.2em;
  margin: 1em 0;
}

#content .list li {
  font-size: 1.2em;
  margin-bottom: .5em;
}

footer {
  position: fixed;
  bottom: 0;
  background: var(--background);
  font-size: .8em;
  line-height: 1em;
  padding: .4em;
  border-top: double 2px var(--background-accent);
  border-right: double 2px var(--background-accent);
}

.download-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #006ee5;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

.download-button:hover {
  background-color: #0056b3;
}

@media (max-width: 29em) {

  #container {
    padding-bottom: 3em;
  }

  header {
    position: static;
    text-align: center;
    height: auto;
  }

  header nav {
    position: static;
    margin-top: 0;
  }

  header nav .small.wawjr3d {
    display: inline-block;
    background-position: center center;
    text-indent: -9999em;
  }

  header nav:after {
    content: none;
  }

  header nav:hover {
    box-shadow: none;
  }

  header nav > ul {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
  }

  header nav li ul {
    display: none;
  }

  header nav > ul > li {
    padding-left: 5px;
    padding-right: 5px;
  }

  header nav > ul > li:hover {
    box-shadow: none;
  }

  .listing-page #content {
    width: auto;
    padding: 0;
  }

  .listing-page h1 {
    padding: 0 .3em;
  }

  .content-page h1 {
    padding: 0;
  }
  
  ul.todo {
    width: auto;
  }

  body:not(.smiley-page) footer {
    position: absolute;
    text-align: center;
    width: 100%;
    border-right: 0 none;
    box-sizing: border-box;
  }

  #content .list li {
    font-size: 1em;
    margin-bottom: 0;
  }

  #content .list a {
    display: block;
    padding: .5em;
    border-bottom: dotted 1px var(--background-accent);
  }

  #content .list li:first-child a {
    border-top: dotted 1px var(--background-accent);
  }
}
