body {
    background: midnightblue;
    font-family: "Atkinson Hyperlegible Next", monospace;
    color: black;
}

/* The header bar that stays at the top of the screen */
.top-bar {
    font-weight: bold;
    top: 0;
    left: 0;
    position: fixed;
    width: 100%;
    background: darkgrey;
    color: black;
    padding: 5px;
    padding-left: 10px;
    line-height: 18px;
    overflow: auto;
    z-index: 999;
}

.brand {
    display: contents;
    float: left;
    padding: 0 10px;
}

/* Common card (main) properties */
.main, .main-first {
    position: inherit;
    margin-left: 36%;
    width: 500px;
    border: 4px solid black;
    background: lightgrey;
    padding: 15px 25px 15px 25px;
    box-shadow: 7px 7px rgb(0, 0, 0, 0.8);
}

/* Make sure the first main box has an extra top margin so it's not hidden by the header. */
.main-first {
    margin-top: 60px;
    margin-bottom: 20px;
}

.main {
    margin-top: 10px;
    margin-bottom: 20px;
}

/* For inline code snippets */
code {
  padding-left: 1px;
  padding-right: 1px;
  color: yellow;
  background: darkblue;
  font-family: "Atkinson Hyperlegible Mono", monospace;
  font-weight: 500;
  white-space: nowrap;
  border: 0;
}

mark {
    color: white;
    background: orangered;
    padding-right: 2px;
}

a {
    text-decoration: none;
    font-style: italic;
    color: mediumblue;
}

a:hover {
    background: black;
    color: white;
}

/* Common dialog properties */
.dialog, .dialog-codeblock, .dialog-note, .dialog-warning, .dialog-quote {
    position: inherit;
    width: auto;
    padding: 10px 15px 0px 15px;
    box-shadow: 7px 7px rgb(0, 0, 0, 0.8);
}

.dialog-codeblock {
    background: darkblue;
    color: yellow;
    border: 6px double white;
    padding: 10px 5px 0px 5px;
}

.dialog-note {
    background: darkgoldenrod;
    color: black;
    border: 6px double white;
}

.dialog-quote {
    background: purple;
    color: white;
    border: 6px double white;
}

.dialog-warning {
    background: darkred;
    color: white;
    border: 6px double white;
}

.dialog-warning center, .dialog-quote center {
    color: yellow;
    font-weight: 900;
}

.dialog-codeblock center, .dialog-note center {
    color: white;
    font-weight: 900;
}

.dialog-warning p, .dialog-note p, .dialog-quote p {
    font-weight: 500;
}

.dialog-codeblock pre {
    overflow: auto;
    font-family: AtkinsonHyperlegibleMono, "Atkinson Hyperlegible Mono", monospace;
    font-weight: 500;
}

/* For embeddded rich content */
.rich {
    background: sienna;
    color: white;
    padding: 15px 25px 15px 25px;
    box-shadow: 7px 7px rgb(0, 0, 0, 0.8);
    border: 6px double white;
    text-align: center;
    font-weight: 500;
}

.sidebar {
    position: fixed;
    width: 340px;
    min-height: 75px;
    border: 6px double white;
    background: teal;
    margin-top:0px;
    margin-left:25px;
    /* The 7px is vertical and horizontal offset for the shadow, if you want to change it. */
    box-shadow: 7px 7px rgb(0, 0, 0, 0.78);
}

/* Prevent image overflow */
.main img, .main-first img, .sidebar img {
    max-width: 100%;
    height: auto;
}


/* Text section in sidebar. */
.sidebar-description {
    padding: 0 15px;
    color: white;
    font-weight: 500;
}

.sidebar-links {
    margin-left: 12px;
    margin-right: 32px;
    width: auto;
}


/* Button styling */
.button {
    display: inline-block;
    padding: 5px;
    margin-bottom: 20px;
    /*margin-left:.3em;*/
    font-weight: bold;
    line-height: 20px;
    color: black;
    text-align: center;
    vertical-align: middle;
    cursor: default;
    background: limegreen;
    border: 0;
    border-width: 0;
    border-radius: 0;
    box-shadow: 10px 10px 0 black;
    font-style: normal;
    /*zoom:1;*/
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    -webkit-box-shadow:10px 10px 0 black;
    -moz-box-shadow:10px 10px 0 black;
}

.button-sidebar {
    display: inline-block;
    padding: 5px;
    width: 100%;
    margin-bottom: 20px;
    margin-left:.3em;
    font-weight: bold;
    line-height: 20px;
    color: black;
    text-align: center;
    font-style: normal;
    vertical-align: middle;
    align-content: center;
    cursor: default;
    background: darkgrey;
    border: 0;
    border-width: 0;
    border-radius: 0;
    box-shadow: 10px 10px 0 black;
    /*zoom:1;*/
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    -webkit-box-shadow: 10px 10px 0 black;
    -moz-box-shadow: 10px 10px 0 black;
}

.button a {
    color: black;
    text-decoration: none;
    font-style: normal;
}

.button:hover, .button a:hover {
    color: yellow;
    background: forestgreen;
}

.button-sidebar:hover {
    color: white;
    background: grey;
}

.button:active, .button a:active {
    color: yellow;
    background: black;
}

.button-sidebar:active {
    color: white;
    background: black;
    margin:10px 0 10px 10px;
    outline:0;
    -webkit-box-shadow:0 0 0;
    -moz-box-shadow:0 0 0;
    box-shadow:0 0 0
}

.button:active {
    margin: 10px 0 10px 10px;
    outline: 0;
    -webkit-box-shadow: 0 0 0;
    -moz-box-shadow: 0 0 0;
    box-shadow: 0 0 0;
    color: yellow;
}

/* The footer bar that stays at the bottom of the screen */
.footer {
    font-weight: bold;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background: darkgrey;
    color: black;
    padding: 2px;
    padding-left: 10px;
    line-height: 18px;
    overflow: auto;
}

.footer a {
    color: navy;
    font-style: normal;
}

.footer a:hover {
    color: lime;
    background: black;
    padding-top: 4px;
}

/* Image carousel styling */
* {
    box-sizing: border-box;
}

.carousel {
    margin: 0;
    padding: 0;
    list-style: none;

    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    aspect-ratio: auto;

    /* Prevents more than one image from being shown */
    overflow-x: auto;
    overflow-y: auto;
    overflow: hidden;
}

.carousel li {
    display: flex;
    width: 100%;
    margin-bottom: 50px;  /* Creates space for other elements */
    position: relative;

    flex: 1 0 auto;
    justify-content: space-around;
    align-items: center;
}

.carousel figure {
    margin: 0;
    padding: 5%;
}

.next {
    position: absolute;
    top: 100%;
    right: 8%;
    background: limegreen;
    padding: 5px;
    margin-bottom: 20px;
    font-style: normal;
}

.previous {
    position: absolute;
    top: 100%;
    left: 6%;
    background: limegreen;
    padding: 5px;
    margin-bottom: 20px;
    font-style: normal;
}

/* For narrow screens */
@media (max-width: 1100px) {
    .sidebar {
        width: 275px;
        margin-left: 10px;
    }
    .main, .main-first {
        width: 420px;
        margin-left: 315px;
    }
}

/* Mobile compatibility. */
@media (orientation: portrait) {
    .sidebar {
        margin: 0 auto;
        position: static;
        margin-top: 60px;
        margin-bottom: 15px;
        width: 90%;
    }

    .main, .main-first {
        margin: 0 auto;
        margin-top: 20px;
        width: 90%;
    }

    .footer {
        width: 100%;
    }
}
