:root {
    --universal-margin: 0.5em;
    --universal-padding: 0.5em;
    --universal-border-radius: 0.2em;
    --a-link-color: blue;
    --a-visited-color: #551A8B;
}

a:link { color: #0000EE; }
a:visited { color: #551A8B; }
a:visited:hover { color: blue; }

html {
    font-family: Lato, sans-serif;
}

body {
    background: #f2f2f2;
}

#company-name h1 {
    font-family: 'Norwester', sans-serif;
    font-weight: 400;
    letter-spacing: 1px;
}

article,
#footnotes,
#content > :not(article):not(#table-of-contents) {
    max-width: 40em;
    margin: var(--universal-padding) auto;
    margin-top: calc(2 * var(--universal-margin));
    padding: calc(var(--universal-padding) * 2);
    background: #fefefe;
    box-shadow: 0 1px 0px rgba(0,0,0,.1);
    position: relative;
    border-radius: var(--universal-border-radius);
    border: 1px solid #cfcfcf;
}

article p {
  word-break: break-word;
  hyphens: auto;
}

.footdef {
    margin-bottom: 0;
}

article h2 {
    margin-top: -0.9em;
    margin-left: -0.9em;
    margin-right: -0.9em;
    text-transform: uppercase;
    font-family: "Oswald", sans-serif;
    font-weight: 500;
    font-size: 1.2em;
    text-align: center;
    border-radius: var(--universal-border-radius) var(--universal-border-radius) 0 0;
    padding: 6px;
    border-top: 1px solid rgba(0,0,0,.05);
    border-bottom: 1px solid rgba(0,0,0,.2);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
    background: rgba(0,0,0,0.1);
    color: rgba(0,0,0,.8);
}

.navbar {
    display: flex;
    flex-direction: row;
    border: 0;
    position: relative;
    z-index: 999;
    font-size: 0.9em;
}

.navbar a {
    text-transform: none;
    background: #fefefe;
    border: 1px solid rgba(0,0,0,.25);
    box-shadow: 0 2px 0px rgba(0,0,0,.1);
    border-radius: var(--universal-border-radius);
    text-decoration: underline;
    padding: 4px 2.5em;
    margin-right: 6px;
    flex-shrink: 0;
    font-weight: 600;
    text-transform: uppercase;
}

#preamble {
    max-width: 42em;
    margin: var(--universal-margin) auto;
}

#postamble {
    color: rgba(0,0,0,.2);
    margin: var(--universal-margin) auto;
    max-width: 50.5em;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-size: 10pt;
}

#postamble p {
    margin-top: 0;
}

#postamble ul {
    display: flex;
    list-style: inside;
    margin: 0;
    padding-left: 0;
}

@media only screen and (max-width: 500px) {
    #postamble ul {
	flex-direction: column;
    }

    #postamble ul li:first-child {
	list-style: inside !important;
    }
}

#postamble ul li {
    margin: 0 0.5em;
}

#postamble ul li:first-child {
    list-style: none;
}

#meta p {
    text-align: right;
}

@media screen and (max-width: 120ch) {
    #table-of-contents {
        display: none !important;
    }
}

#table-of-contents {
    display: block;
    z-index: 1050;
    position: fixed;
    left: 45em;
    background: #fefefe;
    box-shadow: 0 1px 0px rgba(0,0,0,.1);
    border-radius: var(--universal-border-radius);
    border: 1px solid #cfcfcf;
    max-height: calc(100% - 3 * (var(--universal-margin) + 0.5em) - 5em);
    max-width: 45m;
    padding-right: 1em;
}

#table-of-contents * {
    padding: none;
}

#table-of-contents a:visited {
    color: blue;
}

#table-of-contents h2 {
    font-size: 12pt;
    margin: var(--universal-margin);
    margin-top: calc(2 * var(--universal-margin));
    font-weight: 400;
    padding: .05em .5em;
}

#text-table-of-contents ul li {
    font-size: 11pt;
    width: 100%;
}

.licenses {
    text-align: center;
    margin-top: 0.3em !important;
}

.licenses a:not(:first-child) {
    margin-left: 0.5em;
}

nav * {
    padding: 0.1em 0;
}

.abstract {
    background: var(--nav-hover-back-color);
    border-radius: 0.05em;
    margin: 0 -1em;
    padding: 0.25em 1em;
}

pre {
    border: 1px solid #ccc;
    box-shadow: none;
    padding: 8pt;
    overflow: auto;
    margin: var(--universal-margin);
    border-radius: var(--universal-border-radius);
}

.figure {
    text-align: center;
}

.org-svg {
    width: auto;
    max-width: 100%;
}

.asciicast {
    text-align: center;
}

img {
    max-width: 100%;
    border-radius: var(--universal-border-radius);
    box-shadow: 0 2px 1px rgba (0, 0, 0, 0.2), inset 0 2px 1px rgba(255,255,255,.5);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

video {
    max-width: 100%;
    max-height: 40em;
    display: block;
    margin: 0 auto;
}

#content {
    margin: 0 !important;
}

audio {
    display: block;
    width: calc(100% - var(--universal-padding) * 2);
    margin: 0 var(--universal-padding);
}

table tr td:nth-child(1) {
    width: 20%;
}

a {
    text-decoration: underline;
}

a:hover {
    background: #ddd;
    box-shadow: 2px 2px 0px;
}

a:active {
    color: purple;
    background: #ccc;
}

.abstract {
    background: rgba(0,0,0,.1);
}

/* Org-mode */
.done {color: green;}
.todo {color: red;}

dt {
    font-weight: bold;
}

dt::before {
    content: "• ";
}

.org-dl dd, article p {
    margin-top: var(--universal-margin);
    margin-bottom: var(--universal-margin);
}

sup::before { content: "[" }
sup::after  { content: "]" }
.footpara   { display: inline }

#company-name {
    height: 4.5em;
    margin-bottom: calc(var(--universal-margin) * 2);
}

#company-name > img {
    background: rgba(255,255,255,.8);
}

#team {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

#team > div, .team-member {
    width: 19em;
    margin-top: calc(2 * var(--universal-margin));
    border-radius: var(--universal-border-radius);
    border: 1px solid #cfcfcf;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
    background: rgba(0,0,0,0.05);
}

.team-member hr {
    border: none;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.75);
    border-top: 1px solid rgba(0,0,0,.1);
}

.team-name {
    text-align: center;
    padding-top: 0.9em;
    font-weight: 500;
    height: 2em;
    background: rgba(0,0,0,0.025);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
    color: rgba(0,0,0,.75);
}

.team-role {
    text-align: center;
    font-size: 0.8em;
    padding: 0.3em 0;
    color: rgba(0,0,0,.5);
    background: rgba(0,0,0,.075);
    box-shadow: 0 2px 0 rgba(0,0,0,.025), inset 0 1px 0 rgba(255,255,255,0.85);
}

#team img {
    height: 4.5em;
    max-width: 4.5em;
    border: none;
    border-right: 1px solid rgba(0,0,0,.15);
    border-radius: var(--universal-border-radius) 0 0 var(--universal-border-radius);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

#company-name h1 {
    margin-bottom: 0;
    padding-top: 0.2em;
    
}

#games iframe {
    width: 100%;
    border-radius: var(--universal-border-radius);
    box-shadow: 0px 2px 1px rgba(0,0,0,.15);
    margin: var(--universal-margin) 0;
}

#games button {
    cursor: pointer;
    display: block;
    margin: 0 auto;
    text-decoration: underline;
    color: blue;

    border: 1px solid rgba(0,0,0,.2);
    border-radius: var(--universal-border-radius);
    padding: 4px 12px;
    box-shadow: 0px 1px 0 rgba(0,0,0,.1), inset 0 1px 0px rgba(255,255,255,.5);
    background: rgba(0,0,0,0.05);
}
