.main {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin: 4rem 4rem;
}

.content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    max-width: max(30vw, 50%);
    margin: 0 8rem;
    min-width: 40%;
}

.content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-bottom: 4rem;
    margin-top: 4rem;
}

.content .example {
    margin: 0;
    margin-bottom: 2rem;
}

.content .example img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidenav-container, .table-of-contents {
    top: 2rem;
    position: sticky;
    overflow-x: hidden; /* Disable horizontal scroll */
    width: min(18vw, 20%);
}

.table-of-contents {
    width: min(16vw, 25%);
    min-width: fit-content;
}

.table-of-contents a {
    min-width: fit-content;
}

.sidenav, .table-of-contents {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

}

.sidenav a, .table-of-contents a {
    font-size: 16px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.current {
    pointer-events: none;
    font-weight: bolder;
    color: var(--link-hover-colour);
}

.sidenav-title {
    font-weight: bolder;
}

.title {
    width: 100%;
    text-align: left;
    margin: 0;
    font-family: var(--title-font);
    font-weight: var(--title-weight);
    font-size: 42px;
    font-size: 2.6rem;
}

.description {
    font-size: 20px;
    font-size: 1.25rem;
    line-height: 1.6;
}

.content .store-button {
    align-self: center;
    margin-top: 2rem;
}



/*
    Text formatting
*/

h4 {
    margin: 0;
    margin-top: 4rem;
}

h5 {
    font-weight: normal;
    margin: 0;
}

.h4-note {
    margin-top: 0;
}

/* Notes that follow a paragraph or another note, rather than a property heading */
.description + .h4-note,
.h4-note + .h4-note {
    margin-top: 1rem;
}

.description ~ div {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.description ~ div[class="inline"] {
    display: inline-block;
}

.description ~ ul li {
    color: var(--text-colour-dark);
    text-align: left;
    list-style-type: disc;
    margin: 1rem;;
    padding: 0 1rem;
}

.description ~ ul li:hover {
    cursor: inherit;
}

p {
    margin: 0;
    margin-top: 2rem;
}

.latest-tag {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    border-radius: 20px;
    margin: 0;
    background-color: var(--latest-label-colour);
    color: white;
    font-weight: bold;
}

pre {
    width: 100%;
    margin-top: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

code {
    font-size: 16px;
    font-size: 1rem;
    margin: 0.25rem;
}

/* Keeps every line of a multi-line snippet aligned (inline code only indents the first line) */
pre code.multiline {
    display: block;
}

/*
    Media Queries
*/

@media (max-width: 1300px) {

    .content {
        max-width: 60%;
        margin: 0;
        margin-left: 4rem;
        margin-right: 4rem;
        min-width: 0;
    }

}

@media (max-width: 1150px) {

    /* Hide the sidenav when the screen is too small. */

    .sidenav, .table-of-contents, .sidenav-container {
        display: none;
        width: 0;
    }

    .main {
        margin: 4rem;
    }

    .content {
        max-width: 100%;
        margin: 0;
    }

    .content img {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }

}