:root {
    --sidebar-width: 320px;

    --bg: #ffffff;
    --sidebar-bg: #0b1730;

    --text: #222;
    --link: #1565c0;

    --active-bg: #1f4e8c;
    --border: #e5e7eb;
}

/* ================================================= */
/* BASE */
/* ================================================= */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    font-family:
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;

    font-size: 17px;
    line-height: 1.7;

    color: var(--text);
    background: var(--bg);
}

/* ================================================= */
/* LAYOUT */
/* ================================================= */

.homepagegrid {
    display: flex;
}

#TOC {
    position: fixed;

    top: 0;
    left: 0;

    width: var(--sidebar-width);
    height: 100vh;

    overflow-y: auto;

    background: var(--sidebar-bg);

    border-right: 1px solid #1c2942;

    padding: 20px;
    box-sizing: border-box;
}

.bodycontainer {
    margin-left: var(--sidebar-width);

    width: 100%;
    max-width: 1300px;

    padding: 40px 60px;

    box-sizing: border-box;
}

.textbody {
    max-width: 1000px;
}

/* ================================================= */
/* TOC */
/* ================================================= */

#TOC h4 {
    color: white;
    margin-top: 0;
}

#TOC a {
    display: block;

    padding: 6px 10px;

    text-decoration: none;

    color: #d9e2f2;

    border-radius: 6px;

    transition: 0.2s;
}

#TOC a:hover {
    background: rgba(255,255,255,0.08);
}

#TOC a.active {
    background: var(--active-bg);
    color: white;
    font-weight: 600;
}

.tocsubsection {
    padding-left: 18px !important;
    font-size: 0.95em;
}

.tocsubsubsection {
    padding-left: 34px !important;
    font-size: 0.90em;
}

/* ================================================= */
/* HEADINGS */
/* ================================================= */

h1 {
    font-size: 2.2rem;
    margin-top: 0;
}

h2 {
    font-size: 1.9rem;
    margin-top: 60px;
}

h3 {
    font-size: 1.5rem;
    margin-top: 40px;
}

h4 {
    font-size: 1.2rem;
}

/* ================================================= */
/* LINKS */
/* ================================================= */

a {
    color: var(--link);
}

/* ================================================= */
/* IMAGES */
/* ================================================= */

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

/* ================================================= */
/* TABLES */
/* ================================================= */

table {
    border-collapse: collapse;
    width: 100%;
}

td,
th {
    border: 1px solid var(--border);
    padding: 8px;
}

/* ================================================= */
/* CODE */
/* ================================================= */

pre {
    overflow-x: auto;

    background: #f5f5f5;

    padding: 12px;

    border-radius: 6px;
}

/* ================================================= */
/* NEXT / PREVIOUS */
/* ================================================= */

.doc-nav {
    margin-top: 60px;
    padding-top: 20px;

    border-top: 1px solid var(--border);

    display: flex;
    justify-content: space-between;
}

.doc-nav a {
    text-decoration: none;
    font-weight: 600;
}

/* ================================================= */
/* MOBILE */
/* ================================================= */

@media (max-width: 1000px) {

    #TOC {
        position: relative;

        width: 100%;
        height: auto;
    }

    .homepagegrid {
        display: block;
    }

    .bodycontainer {
        margin-left: 0;
        padding: 20px;
    }
}