/* reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
img { border: none; }
table { border-collapse: collapse; }
a { text-decoration: none; }
a:hover, a:active, a:focus { text-decoration: underline; }

ol, ul { margin-left: 2em; }

body {
  padding: 16px;
  padding-bottom: 64px;
  min-height: 100vh;
  text-align: center;
  background-color: #fff;
  color: #494949;
}
main {
  padding-top: 64px;
  text-align: start;
  display: inline-block;
  max-width: 720px;
}

/* typography */
h1, h2, h3, h4, h5, h6, main, .subtitle1, .subtitle2, .body2, caption, button, .button, .overline, aside {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  font-family: Roboto, sans-serif;
  text-decoration: inherit;
  text-transform: inherit;
  hyphens: auto;
  word-break: break-all;
}
h1 {
  font-size: 2.75rem;
  line-height: 3.125rem;
  padding: 1rem 0;
  font-weight: 200;
  letter-spacing: normal;
}
h2 {
  font-size: 2.125rem;
  line-height: 2.5rem;
  padding: 0.75rem 0;
  margin-top: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.0073529412em;
}
h3 {
  font-size: 1.5rem;
  line-height: 2rem;
  padding: 0.5rem 0;
  margin-top: 0.75rem;
  font-weight: 400;
  letter-spacing: normal;
}
h4 {
  font-size: 1.25rem;
  line-height: 2rem;
  font-weight: 500;
  letter-spacing: 0.0125em;
}
.subtitle1 {
  font-size: 1rem;
  line-height: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.009375em;
}
.subtitle2 {
  font-size: 0.875rem;
  line-height: 1.375rem;
  font-weight: 500;
  letter-spacing: 0.0071428571em;
}
main {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.03125em;
}
p, li { padding: 0.2rem 0; }
.body2 {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.0178571429em;
}
caption {
  font-size: 0.75rem;
  line-height: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.0333333333em;
}
button, .button {
  user-select: none;
  background-color: initial;
  border: none;
  outline: none;
  font-size: initial;
  cursor: pointer;
  padding: 0.25em;
  margin: -0.25em;
  transition: 0.5s ease background-color;
  border-radius: 4px;
  color: inherit;
  opacity: 0.6;
}
button:hover, .button:hover, button:focus, .button:focus {
  background-color: rgba(255, 218, 185, 0.568);
}
.overline {
  font-size: 0.75rem;
  line-height: 2rem;
  font-weight: 500;
  letter-spacing: 0.1666666667em;
  text-transform: uppercase;
}

input, textarea {
  background-color: #ffffff;
  border: 0;
  outline: none;
  border-bottom: 1px solid #ccc;
  transition: 0.5s ease border-bottom-color;
  color: inherit;
  font-size: inherit;
  max-width: calc(100% - 6em);
}
textarea {
  height: 1.5rem;
  font-family: inherit;
}
input:hover, textarea:hover {
  border-bottom-color: #999;
}
input:focus, textarea:focus {
  border-bottom-color: #444;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: rgba(255, 255, 255, .8);
  }
  blockquote::before { color: rgba(127, 127, 255, .6); }
  a { color: #3391ff; }
  a:visited { color: #cc91ff; }
  input, textarea {
    background-color: #121212;
    border-bottom: 1px solid #666;
  }
  input:hover, textarea:hover {
    border-bottom-color: #999;
  }
  input:focus, textarea:focus {
    border-bottom-color: #ccc;
  }
  button:hover, .button:hover, button:focus, .button:focus {
    background-color: rgba(255, 218, 185, 0.3);
  }
}

aside ol {
  text-align: left;
  list-style: none;
  padding: 0;
}
aside ol a {
  color: #bbb !important;
  transition: color .2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}
aside ol a.hl {
  color: #444 !important;
}

@media (max-width: 1079px) {
  aside {
    overflow-y: scroll;
    position: fixed;
    display: none;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 16px;
    z-index: 2;
    background-color: white;
  }
  aside.open {
    display: block;
  }
  #menu-icon {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 3;
    margin: 16px;
    cursor: pointer;
  }
  aside ol a {
    color: #888 !important;
    max-width: calc(100vw - 80px);
  }
}

@media (min-width: 1080px) {
  main {
    display: block;
    margin-left: 64px;
    max-width: 640px;
  }
  .container {
    display: flex;
  }
  aside {
    padding-top: 300px;
    padding-left: 32px;
  }
  aside ol {
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: scroll;
    width: 360px;
    scrollbar-width: none;
  }
  aside ol::-webkit-scrollbar {
    display: none;
  }
  aside ol a {
    max-width: 360px;
  }
  #menu-icon {
    display: none;
  }
}

@media (min-width: 1500px) {
  main {
    display: block;
    margin-left: 194px;
    max-width: 720px;
  }
  aside ol {
    width: 480px;
  }
  aside ol a {
    max-width: 480px;
  }
}
