:root {
    --bg-very-light: #D5D5F7;
    --bg-light: #BABAF2;
    --bg-medium: #9F9FED;
    --bg-dark: #8A8AE2;

    --accent-light: #B481FF;
    --accent-medium: #8D40FF;
    --accent-dark: #7B21FF;

    --neutral-dark: #222222;
    --shadow: rgba(34, 34, 34, 0.5);
    --edge-highlight: rgba(34, 34, 34, .15);

    --paper: url("../images/paper-grain.svg");
}

/* Entire docs backdrop */
body {
    font-family: Tahoma, sans-serif;
    color: var(--neutral-dark);

    background-color: var(--bg-light);
    background-image: var(--paper);
    background-size: 160px 160px;
    background-repeat: repeat;
    background-blend-mode: soft-light;
}

body.wy-body-for-nav {
    background: var(--bg-light) var(--paper) repeat;
    background-size: 160px 160px;
    background-blend-mode: soft-light;
}

/* Left navigation */
.wy-nav-side {
    background-color: var(--bg-dark);
    background-image: var(--paper);
    background-size: 160px 160px;
    background-repeat: repeat;
    background-blend-mode: soft-light;

    border-right: 1px solid var(--edge-highlight);
    box-shadow: 6px 0 14px var(--shadow);
}

.wy-nav-top {
    background-color: var(--bg-dark);
    background-image: var(--paper);
    background-size: 160px 160px;
    background-repeat: repeat;
    background-blend-mode: soft-light;

    color: var(--neutral-dark);
    border-bottom: 1px solid var(--edge-highlight);
    box-shadow: 0 4px 10px rgba(34, 34, 34, .25);
}

.wy-nav-top a {
    color: var(--accent-dark);
    text-shadow: 2px 2px 2px var(--shadow);
}

/* Site title */
.wy-side-nav-search {
    background: transparent;
}

.wy-side-nav-search > a {
    color: var(--accent-medium);
    font-weight: bold;
    text-shadow: 2px 2px 2px var(--shadow);
}

/* Search */
.wy-side-nav-search input[type="text"] {
    color: var(--neutral-dark);
    background: var(--bg-light);

    border: 1px solid var(--edge-highlight);
    border-radius: 20px;
    box-shadow: 2px 2px 4px var(--shadow);
}

/* Navigation links */
.wy-menu-vertical a {
    color: var(--neutral-dark);
}

.wy-menu-vertical a:hover {
    color: var(--accent-dark);
    background: var(--bg-light);
}

.wy-menu-vertical li.current > a {
    color: var(--accent-dark);
    font-weight: bold;

    background-color: var(--bg-light);
    background-image: var(--paper);
    background-size: 160px 160px;
    background-repeat: repeat;
    background-blend-mode: soft-light;
}

.wy-menu-vertical header,
.wy-menu-vertical p.caption {
    color: var(--accent-dark);
    text-shadow: 2px 2px 2px var(--shadow);
    text-transform: none;
}

/* Main page */
.wy-nav-content-wrap {
    background: transparent;
}

.wy-nav-content {
    margin: 3rem auto;
    padding: 2rem 3rem;
    max-width: 1000px;

    background-color: var(--bg-dark);
    background-image: var(--paper);
    background-size: 160px 160px;
    background-repeat: repeat;
    background-blend-mode: soft-light;

    border: 1px solid var(--edge-highlight);
    border-radius: 20px;
    box-shadow: 8px 8px 16px var(--shadow);
}

/* Typography */
.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4 {
    color: var(--accent-dark);
    text-shadow: 2px 2px 2px var(--shadow);
}

/*.rst-content h1 {
    color: var(--accent-medium);
}*/

.rst-content h2::before {
    content: "✦";
    display: inline-block;
    width: 1.5em;
    color: var(--accent-dark);
}

.rst-content a {
    color: var(--accent-dark);
    font-weight: bold;
    text-shadow: 2px 2px 2px var(--shadow);
    transition: color .15s ease, text-shadow .15s ease;
}

.rst-content a:hover {
    color: var(--accent-light);
    text-shadow: 0 0 8px var(--accent-dark);
}

/* Normal document lists only — don't touch breadcrumbs/navigation */
.rst-content .section ul:not(.wy-breadcrumbs),
.rst-content .toctree-wrapper ul {
    list-style: none;
}

.rst-content .section ul:not(.wy-breadcrumbs) > li,
.rst-content .toctree-wrapper ul > li {
    position: relative;
}

.rst-content .section ul:not(.wy-breadcrumbs) > li::before,
.rst-content .toctree-wrapper ul > li::before {
    content: "✦";
    position: absolute;
    left: -1.5em;

    color: var(--accent-dark);
    font-weight: bold;
}

.rst-content .section ul > li::marker,
.rst-content .toctree-wrapper ul > li::marker {
    content: "";
}

/* Rule */
.rst-content hr {
    border: 0;
    border-top: 2px dotted var(--shadow);
}

/* Images */
.rst-content img {
    max-width: 100%;
    height: auto;

    background: var(--bg-light);
    border: 1px solid var(--edge-highlight);
    border-radius: 20px;
    box-shadow: 4px 4px 8px var(--shadow);
}

/* Inline code */
.rst-content code {
    border-radius: .35em;
    border: 1px solid var(--edge-highlight);
    box-shadow: 3px 3px 7px rgba(34, 34, 34, .35);
    background-color: var(--bg-very-light);
}

/* Code block container */
.rst-content pre {
    background-color: var(--bg-very-light);
    background-image: var(--paper);
    background-size: 160px 160px;
    background-repeat: repeat;
    background-blend-mode: soft-light;

    border: 1px solid var(--edge-highlight);
    border-radius: 12px;
    box-shadow: 3px 3px 7px rgba(34, 34, 34, .35);

    overflow: hidden;
}

/* RTD / Highlight.js put their own background on the code element */
.rst-content pre code,
.rst-content pre code.hljs {
    background: transparent !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Quotes / notes */
.rst-content blockquote {
    padding: .8em 1.2em;

    background-color: var(--bg-light);
    background-image: var(--paper);
    background-size: 160px 160px;
    background-repeat: repeat;
    background-blend-mode: soft-light;

    border: 1px solid var(--edge-highlight);
    border-left: 4px solid var(--accent-medium);
    border-radius: 12px;
}

.rst-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Tables */
.wy-table-responsive {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    padding-right: 8px;
}

.rst-content .section table.docutils {
    width: auto;
    max-width: none;
    display: table;
}

.rst-content table.docutils {
    border-collapse: separate;
    border-spacing: 0;

    border: 1px solid var(--edge-highlight);
    border-radius: 12px;
    box-shadow: 3px 3px 7px rgba(34, 34, 34, .35);
}

.rst-content table.docutils tr:first-child th:first-child {
    border-top-left-radius: 12px;
}

.rst-content table.docutils tr:first-child th:last-child {
    border-top-right-radius: 12px;
}

.rst-content table.docutils tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.rst-content table.docutils tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* Softer alternating rows */
.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td {
    background-color: rgba(255, 255, 255, .18);
}

.rst-content table.docutils:not(.field-list) tr:nth-child(2n) td {
    background-color: rgba(255, 255, 255, .08);
}

.rst-content table.docutils td,
.rst-content table.docutils th {
    border-color: rgba(255, 255, 255, .22) !important;
}


.wy-table-responsive span.colour-pill {
    display: block;
    width: 100%;
    border-radius: 5px;
    border: solid 1px var(--edge-highlight);
    padding: 8px 0;
}

.wy-table-responsive span.colour-pill.black      { background-color: rgb(0, 0, 0); }
.wy-table-responsive span.colour-pill.red        { background-color: rgb(235, 0, 25); }
.wy-table-responsive span.colour-pill.blue       { background-color: rgb(16, 0, 148); }
.wy-table-responsive span.colour-pill.purple     { background-color: rgb(221, 34, 221); }
.wy-table-responsive span.colour-pill.green      { background-color: rgb(0, 119, 34); }
.wy-table-responsive span.colour-pill.gray       { background-color: rgb(85, 85, 85); }
.wy-table-responsive span.colour-pill.medblue    { background-color: rgb(40, 40, 255); }
.wy-table-responsive span.colour-pill.lightblue  { background-color: rgb(102, 170, 255); }
.wy-table-responsive span.colour-pill.brown      { background-color: rgb(65, 35, 5); }
.wy-table-responsive span.colour-pill.orange     { background-color: rgb(235, 102, 0); }
.wy-table-responsive span.colour-pill.lightgray  { background-color: rgb(170, 170, 170); }
.wy-table-responsive span.colour-pill.pink       { background-color: rgb(255, 153, 136); }
.wy-table-responsive span.colour-pill.lightgreen { background-color: rgb(17, 221, 0); }
.wy-table-responsive span.colour-pill.yellow     { background-color: rgb(235, 235, 0); }
.wy-table-responsive span.colour-pill.aqua       { background-color: rgb(40, 235, 190); }
.wy-table-responsive span.colour-pill.white      { background-color: rgb(255, 255, 255); }

/* Footer navigation */
.rst-footer-buttons a {
    color: var(--accent-dark) !important;
    background: var(--bg-light) !important;

    border: 1px solid var(--edge-highlight) !important;
    border-radius: 20px !important;
    box-shadow: 4px 4px 8px var(--shadow);
}

.rst-versions {
    background-color: var(--bg-medium) !important;
    background-image: var(--paper);
    background-size: 160px 160px;
    background-repeat: repeat;
    background-blend-mode: soft-light;

    border-top: 1px solid var(--edge-highlight);
}

.rst-versions .rst-current-version {
    background: transparent !important;
    color: var(--neutral-dark) !important;
}

.rst-versions .rst-current-version span {
    background: transparent !important;
}

.rst-versions a {
    color: var(--accent-dark) !important;
    font-weight: bold;
    text-shadow: 2px 2px 2px var(--shadow);
}

.rst-versions a:hover {
    color: var(--accent-light) !important;
    text-shadow: 0 0 8px var(--accent-dark);
}

@media screen and (max-width: 768px) {
    .wy-nav-side {
        padding-bottom: 0;
    }
}

footer {
    color: rgba(34, 34, 34, .45);
    font-size: .75em;
    text-shadow: none;
}

.rst-content footer > a {
    color: inherit;
    font-weight: normal;
    text-shadow: none;
}

.rst-content footer > a:hover {
    color: var(--accent-dark);
    text-shadow: none;
}

/*.rst-content footer .rst-footer-buttons {
    font-size: initial;
    opacity: 1;
}*/

/* Previous / Next buttons */
.rst-content footer .rst-footer-buttons a {
    color: var(--accent-dark) !important;
    font-weight: bold;
    text-shadow: 2px 2px 2px var(--shadow);

    background-color: var(--bg-light) !important;
    background-image: var(--paper) !important;
    background-size: 160px 160px !important;
    background-repeat: repeat !important;
    background-blend-mode: soft-light !important;

    border: 1px solid var(--edge-highlight) !important;
    border-radius: 20px !important;
    box-shadow: 4px 4px 8px var(--shadow) !important;

    padding: .55em .9em;
    transition:
        color .15s ease,
        text-shadow .15s ease,
        box-shadow .15s ease,
        transform .05s ease;
}

.rst-content footer .rst-footer-buttons a:hover {
    color: var(--accent-light) !important;
    text-shadow: 0 0 8px var(--accent-dark);
    box-shadow: 2px 2px 6px var(--shadow) !important;
}

.rst-content footer .rst-footer-buttons a:active {
    transform: translateY(1px);
    box-shadow: 1px 1px 3px var(--shadow) !important;
}


.rst-content .admonition {
    overflow: hidden;
    border: 1px solid var(--edge-highlight);
    border-radius: 20px;
    box-shadow: 4px 4px 8px var(--shadow);
}

.rst-content .danger,
.rst-content .danger p {
    background-color: #f2b8b8;
}

.rst-content .danger .admonition-title {
    background-color: #d94a4a;
}

