body {
    font-family: "Lexend", sans-serif;
    margin: 0;
    padding: 0;
    color: #151515;
}

html {
    scroll-behavior: smooth;
}

iframe {
    overflow: hidden;
    border: none;
    max-width: 100%;
}

h1,
h2,
h3 {
    font-weight: bold;
    font-style: normal;
    line-height: normal;
}

hr {
    position: relative;
    margin-bottom: 1.5rem;
    color: rgba(0, 0, 0, 0.05);
}

p {
    max-width: 40rem;
}

a {
    color: inherit;
}

h3 {
    font-weight: normal;
    margin: 0;
    margin-bottom: 0.5rem;
}

code {
    font-family: "JetBrains Mono", monospace;
    font-optical-sizing: auto;
    font-weight: normal;
    font-style: normal;
    box-sizing: border-box;
    margin: 0;
}

.example-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.example-list-compact {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 1rem;
}

.example {
    width: 100%;
    position: relative;
    display: grid;
    grid-template-columns: 125px 3fr;
    column-gap: 1rem;
    justify-items: start;
}

.example-compact {
    width: auto;
    display: flex;
    flex-direction: column;
}

.example .code-snippet {
    overflow-x: auto;
    max-width: 100%;
}

.example p {
    max-width: 500px;
}

.example > h3 {
    grid-row: 1;
    grid-column: 1 / -1;
}

.example > .text {
    width: 100%;
    grid: row 2;
    grid-column: 2 / 3;
    min-width: 0;
}

.example .canvas {
    grid-row: 2 / 3;
    grid-column: 1 / 2;
}

main {
    position: relative;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding: 0.5rem;
    margin-bottom: 30vh;
}

button {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 4px;
    border: solid 1px rgb(216, 230, 239);
    font-weight: bold;
    font-family: inherit;
    padding: 0.5rem;
    box-sizing: border-box;
    background: #ebf6fe;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #ddf1ff;
}

button:active {
    background: #ddf1ff;
}

.logo-background {
    position: relative;
    box-sizing: border-box;
    padding: 1.5rem;
    padding-bottom: 3rem;
    margin-bottom: -1.5rem;
    background-color: #abdafc;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 0.2rem;
}

.logo {
    max-width: 330px;
}

.menu-container {
    top: 0;
    position: sticky;
    padding: 0.8rem;
    display: flex;
    justify-content: center;
    background-color: #ebf6fe;
    box-sizing: border-box;
    margin-bottom: 1.5rem;
    z-index: 10;
}

menu {
    list-style: none;
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 0rem;
    padding: 0;
}

a.anchor {
    display: block;
    position: relative;
    top: -100px;
    visibility: hidden;
}

menu > a {
    text-decoration: none;
    font-weight: bold;
    padding: 0.3rem;
    box-sizing: border-box;
    border-radius: 5px;
    transition: background 0.2s;
}

menu > a:hover {
    background: rgba(0, 0, 0, 0.05);
}

menu > a:active {
    background: rgba(0, 0, 0, 0.05);
}

menu span {
    display: flex;
    align-items: center;
    gap: 6px;
}

summary {
    font-weight: bold;
    cursor: pointer;
    padding: 0.5rem;
    box-sizing: border-box;
    border-bottom: solid 1px rgba(0, 0, 0, 0.05);
    margin-bottom: 0.5rem;
    user-select: none;
}

.interactive-demo {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.interactive-demo > h3 {
    margin: 0;
}

@media (max-width: 800px) {
    .menu-container {
        position: relative;
        justify-content: flex-start;
    }

    menu {
        flex-direction: column;
    }

    a.anchor {
        top: -10px;
    }

    .example .canvas {
        grid-row: 2;
        grid-column: 1 / -1;
    }

    .example > .text {
        grid-row: 3;
        grid-column: 1 / -1;
    }
}
