html,
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f8f8f8;
    color: #222;
    margin: 0;
    padding: 0;
}

h1,
h2,
h4,
p {
    margin: 2rem;
}

h4 {
    font-weight: normal;
}

h3 {
    margin: 0.5rem;
}

nav {
    margin: 2em;
}

nav a {
    margin-right: 1em;
}

note {
    color: #888;
}

div {
    border-top: 1px solid #aaa;
    border-bottom: 1px solid #aaa;
    margin: 1em;
}

#examples {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    min-height: fit-content;
}

.example {
    display: block;
    position: relative;
    flex: 0 1 auto;
    width: 30rem;
    max-height: fit-content;
    margin: 1rem;
}

.example:hover canvas {
    box-shadow: 5px 5px 1rem #444;
    transform: scale(1.05);
}

.example h3 {
    position: absolute;
    display: block;
    top: -1px;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.5em;
    background-color: #444;
    color: white;
}

.example canvas {
    background-color: black;
    width: 100%;
}

#reference {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: stretch;
}

.reference-col {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-start;
}

.reference-col a {
    display: block;
    margin: 1em;
}

#header {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
}

#header h1,
#header canvas {
    display: inline-block;
}

.code,
.code th{
    font-family: monospace;
}

.table-scroll{
    overflow-x: auto;
}

.no-break td, .no-break th{
    display: table-cell;
}

.small-table, .small-table th, .small-table td{
    table-layout: auto;
    width: auto;
}

.value-table{
    table-layout: fixed;
}

.value-table th, .value-table td{
    border: 1px solid #aaa;
    padding-bottom: 0.5em;
    width: 20%;
}

.value-table td:nth-child(odd){
    width: 60%;
}

table{
    text-align: left;
    table-layout: fixed;
    width: 100%;
}

th{
    width: 25%;
}

td, th{
    padding: 0.5em;
    padding-bottom: 2em;
    vertical-align: top;
}

@media only screen and (max-width: 768px) {

    h1{
        font-size: 1.5em;
    }

    div>div{
        margin-right: 0;
        margin-left: 0;
    }

    .value-table{
        table-layout: auto;
    }

    .value-table th, .value-table td, .value-table td:nth-child(odd){
        border: 1px solid #aaa;
        padding-bottom: 0.5em;
        width: auto;
        margin-bottom: 0;
    }

    .value-table td:nth-child(3){
        margin-bottom: 2em;
    }

    table {
        table-layout: auto;
    }

    th,td{
        display: block;
        width: auto;
    }

    td{
        margin-bottom: 2em;
    }

}