:root {
    --example-pic-horizontal-drift: 40px;
    --example-pic-vertical-drift: -2.5rem;
    --border-color: #4f5d80;
    --background: linear-gradient(to bottom, #f5f8eb, #fefff8);
    --border: 3px solid var(--border-color);

    --space-sm: 0.75rem; /* 12px */
    --space-md: 2.25rem; /* 36px */
    --space-lg: 3.75rem; /* 60px */
    --space-xl: 6.75rem; /* 108px */
}

html {
    background: url("/docs/_static/bgtile.webp");
    background-size: 400px;
    font-family: Monda;
    cursor: url("/docs/_static/cursor/3dwarro.webp"), default;
    height: 100%;
}

a:hover {
    cursor: url("/docs/_static/cursor/pointer.webp"), pointer;
}

@media (min-width: 768px) {
    html {
        background-size: 500px;
    }
}

body {
    background-color: transparent;
    border-radius: 0;
    margin-top: 0;
}

a {
    color: #a8769c;
}

.landing--sectionTitle {
    font-family: RetroGaming;
    text-align: center;
    padding: 0.25rem;
    padding-top: 1rem;
    color: rgb(var(--color-secondary));
    font-size: 1.4rem;
}

@media (min-width: 768px) {
    .landing--sectionTitle {
        font-size: 2.4rem;
    }
}

@font-face {
    font-family: "Monda";
    src: url("/docs/_static/Monda.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "RetroGaming";
    src: url("/docs/_static/RetroGaming.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}

h1,
h2,
h3,
h4,
p.caption[role="heading"] {
    font-family: RetroGaming;
    margin-top: var(--space-md);
    color: #465779;
    margin-bottom: 0;
}

.document > .documentwrapper > .bodywrapper > .body > section > h1,
.sphinxsidebar .sphinxsidebarwrapper #searchbox h3#searchlabel {
    margin-top: 0;
}

p {
    margin-top: 0;
}

h1 {
    font-size: 2.40rem;
}

.documentwrapper {
    flex: 1;
    background: var(--background);
    color: #233e4b;
    padding: 0.25rem;
    border: var(--border);
}

.landing--footer {
    margin: 0.25rem;
    margin-top: 2rem;
    padding: 0.5rem;
    border: var(--border);
    background: var(--background);
    font-family: VHSGothic;
}

.landing_generalSectionCard {
    border: var(--border);
    background: var(--background);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    margin: 0.25rem;
    font-family: VHSGothic;
    line-height: 1.5rem;
}

.landing--speechBubble {
    position: relative;
    background: #ffffff;
    border: var(--border);
    padding: 0.8rem;
    padding-inline-start: 1rem;
    max-width: 450px;
    image-rendering: pixelated;
    box-shadow: -3px 3px 0 #9b8294;

    &.-answer {
        margin-inline-start: 0.5rem;
    }

    &.-question {
        margin-inline-end: 0.5rem;
    }
}

.landing--speechBubble:after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
}

.landing--speechBubble.-answer:after {
    left: -10px;
    bottom: 5px;
    border-right: 12px solid #fff;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: none;
}

.landing--speechBubble.-question:after {
    right: -10px;
    bottom: 5px;
    border-left: 12px solid #fff;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: none;
}

.landing--speechBubble:before {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    z-index: 0;
}

.landing--speechBubble.-answer:before {
    left: -14px;
    bottom: 4px;
    border-right: 12px solid var(--border-color);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: none;
}

.landing--speechBubble.-question:before {
    right: -14px;
    bottom: 4px;
    border-left: 12px solid var(--border-color);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: none;
}

div[role="navigation"].related {
    background: var(--background);
    border: var(--border);
    padding-inline-start: var(--space-sm);
    margin-top: var(--space-sm);
    margin-bottom: var(--space-sm);

    ul {
        display: flex;
        flex-direction: column;
        list-style: none;
        padding-inline-start: 0;
        gap: 0.2rem;

        .right {
            display: none;
        }
    }

    h3 {
        display: none;
    }
}

@media (min-width: 768px) {
    div[role="navigation"].related ul {
        flex-direction: row;
    }
}

.sphinxsidebar {
    background: var(--background);
    padding: var(--space-sm);
    border: var(--border);
    height: fit-content;
}

.document {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--space-sm);
}

@media (min-width: 768px) {
    .document {
        flex-direction: row-reverse;
        justify-content: start;
    }
}

.logo {
    height: 3rem;
}

.clearer {
    display: none;
}

/* "Quick search" on sidebar */
form.search {
    display: flex;
    flex-direction: row;
    gap: 0.2rem;
}

.toctree-wrapper {
    p.caption[role="heading"] {
        margin: 0;
    }
    ul {
        margin: 0;
        list-style: none;
        padding-inline-start: var(--space-sm);
    }
}

a.headerlink {
    font-size: 0.9rem;
    color: gray;
    padding-inline-start: 0.5rem;
}

@media (min-width: 768px) {
    section {
        max-width: 40rem;
    }
}

.body img {
    width: 100%;
}
@media (min-width: 768px) {
    .body img {
        width: 60%;
    }
}

/* "Table of contents" */
.sphinxsidebarwrapper > h3:nth-child(4) {
    display: none;
}

/* Links for global ToC */
.sphinxsidebarwrapper > ul:nth-child(5) {
    list-style: none;
    padding-inline-start: 0;
}
