
#layout
{
  position: relative;
  right: 0;
  padding-right: 0;
}

#main
{
  margin-right: 16em;
}

img.img-float-right
{
  float: right;
  margin: 0 0 1rem 1rem;
}

/** TOC **********************************************************************/

#toc
{
  border-left: solid 2px #bbb;
  padding-left: 1.5em;
  color: #444;
  position: fixed;
  right: 0;
  top: 1.5em;
  width: 15em;
}

#toc span.title
{
  font-size: 110%;
  font-weight: bold;
  display: inline-block;
}

#toc ul
{
  margin: 1em 0;
  padding: 0;
  list-style-type: none;
  font-size: 90%;
}

#toc ul:last-child
{
  margin-bottom: 0;
}

#toc ul ul
{
  margin: 0;
  padding-left: 1em;
  font-size: 90%;
}

#toc a
{
  color: #888;
  text-decoration: none;
}

#toc a:hover
{
  text-decoration: underline;
}

#toc a:hover,
#toc a.selected
{
  color: #000;
}

/** CONTENT ******************************************************************/

.content
{
  margin: 0 auto;
  padding: 0 2em;
  max-width: 1000px;
  margin-bottom: 50px;
  line-height: 1.6em;
}

.content .center
{
  text-align: center;
}

.content .dim
{
  color: #888;
}

.content p.large
{
  font-size: 120%;
}

.content p.small
{
  font-size: 80%;
}

.content h1:not(:first-child)
{
  margin-top : 5em;
}

.content h1.title
{
  font-size: 400%;
  text-align: center;
  margin-bottom: 0.5em;
  line-height: 0.9;
}

.content h2.title
{
  font-size: 250%;
  text-align: center;
  color: #444;
  margin-top: 0.5em;
}

.content h2,
.content h3,
.content h4,
.content h5,
.content h6
{
  margin: 1.5em 0 0.5em 0;
}

.content p
{
  margin-top: 0.5em;
}

.content table
{
  border-collapse: collapse;
}

.content table thead tr
{
  background: #f4f4f4;
}

.content table thead th
{
  border-bottom : solid 1px #888;
}

.content table tbody tr:nth-child(even)
{
  background: #f4f4f4;
}

.content table th,
.content table td
{
  padding: 0 0.75em;
}

.content img
{
  max-width: 100%;
  height: auto;
}

.content figure
{
  margin-left: 0;
}

.content figcaption
{
  line-height: 80%;
  font-size: 80%;
}

/** Badge ********************************************************************/
span.badge
{
  border-radius: .6rem;
  display: inline-block;
  font-size: small;
  font-weight: 700;
  line-height: 1;
  margin-left: 1rem;
  padding: .25em .4em;
  text-align: center;
  vertical-align: baseline;
  white-space: nowrap;
}

span.badge:first-child,
span.badge ~ span.badge
{
  margin-left: 0;
}

span.badge.badge-lua
{
  background-color: #030380;
  color: #fff;
}

span.badge.badge-since
{
  background-color: #28a745;
  color: #fff;
}

/** Note **/

p.note
{
  border-left: solid 0.4em darkblue;
  font-size: 85%;
  line-height: normal;
  padding: 0 0 0 0.4em;
}

p.note span.label
{
  display: block;
  font-weight: bold;
  text-transform: uppercase;
}

/** Lua **********************************************************************/

pre[lang="lua"]
{
  border: solid 1px darkgray;
  background-color: #f8f8f8;
  font-size: 80%;
  line-height: normal;
  padding: 0.2em 0.3em 0.2em 0.3em;
}

pre[lang="lua"] code span.const
{
  color: darkviolet;
}

pre[lang="lua"] code span.keyword
{
  color: blue;
}

pre[lang="lua"] code span.global
{
  color: chocolate;
}

pre[lang="lua"] code span.text
{
  color: darkgreen;
}

pre[lang="lua"] code span.comment
{
  color: darkslategray;
}

code.lua span.keyword
{
  color: #000080;
}

/** MEDIA BREAKPOINTS ********************************************************/

@media screen and (max-width: 991px)
{
  #main
  {
    margin-right: 0;
  }

  #toc
  {
    display: none;
  }
}
