:root {
    --color-mod: rgb(56, 115, 173);
    --color-fn: rgb(173, 124, 55);
    --color-entity: rgb(173, 124, 55);
    --color-pipeline: rgb(173, 124, 55);
    --color-struct: rgb(173, 55, 138);
    --color-enum: rgb(173, 55, 138);
    --color-primitive: rgb(173, 55, 138);
    --color-type-alias: rgb(173, 55, 138);
    --color-trait: rgb(110, 79, 201);

    --code-background: #f5f5f5;

    --heading-like-weight: 600;
    --font-code: "Source Code Pro",monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        background-color: black;
        color: rgb(230, 225, 207);

        --code-background: #0f1419;

        --color-mod: rgb(56, 115, 173);
        --color-fn: rgb(253, 214, 135);
        --color-entity: rgb(253, 214, 135);
        --color-pipeline: rgb(253, 214, 135);
        --color-struct: rgb(255, 160, 165);
        --color-enum: rgb(255, 160, 165);
        --color-primitive: rgb(255, 160, 165);
        --color-type-alias: rgb(255, 160, 165);
        --color-trait: rgb(57, 175, 215);
    }

    h1, h2, h3, h4 {
        color: rgb(255, 255, 255);
    }
}

.lex-comment {
    color: #8e908c;
}
.lex-number {
    color: #718c00;
}
.lex-string {
    color: #718c00;
}
.lex-bool {
    color: #c82829;
}
.lex-kw {
    color: #8959a8;
}

body {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    font-family: "Fira Sans",Arial,NanumBarunGothic,sans-serif;
}

main {
    padding-left: 2em;
    padding-right: 1em;
    padding-top: 1em;

    margin: 0px auto;
    max-width: 960px;
}

.item-heading {
    margin-top: 0;
}

h2 {
    padding-bottom: 0.3em;
    border-bottom: 1px solid #ddd;
}

h3 {
    border-bottom: 1px solid #ddd;
}

section {
    padding-bottom: 10pt;
}

.impl-heading {
    font-weight: "bold";
    font-weight: var(--heading-like-weight);
    font-family: var(--font-code);
    font-size: 1.2em;
}

.impl-unit-head {
    font-size: 1.0em;
    font-weight: var(--heading-like-weight);
    font-family: var(--font-code);
}
.impl-items {
    padding-left: 0.5em
}
.impl-items > details > * {
    margin-top: 0.5em;
    margin-left: 1em;
}
.impl-items > details > :last-child {
    margin-bottom: 0;
}
.impl-items > details > summary {
    margin: 0;
}

.impl-items > * {
    margin-top: 0.5em;
    margin-bottom: 1em;
}

pre > code {
    display: inline-block;
    padding: 8pt 10pt;
    font-size: 12pt;
    box-sizing: border-box;
    width: 100%;
    overflow-x: scroll;
}
code {
    font-family: var(--font-code);
    background-color: var(--code-background);
    border-radius: 5pt;
    padding: 2pt 4pt;
}

a { text-decoration: none; }
a:visited { text-decoration: none; }

p {
    margin-top: 0;
}

details {
    position: relative;
    display: flow-root;
}
summary {
    list-style: none;
}
summary::-webkit-details-marker {
    display: none;
}

details > summary.hideme::before {
  position:relative;
}
details > summary:not(.hideme)::before {
  position:absolute;
  left:-24px;
  top:4px;
}

details > summary {
    cursor: pointer;
}

/* These are taken straight from rustdoc */
details > summary::before {
    content: "";
    width: 16px;
    height: 16px;
    cursor: pointer;
    display: inline-block;
    position: absolute;
    left: -1em;
    background: url('data:image/svg+xml,<svg width="16" height="16" viewBox="0 0 12 12" \ enable-background="new 0 0 12 12" xmlns="http://www.w3.org/2000/svg">\ <path d="M4,2l4,4l-4,4" stroke="black" fill="none" stroke-width="1px"/></svg>');
}
details[open] > summary.hidden-open-summary > span {
    display: none;
}

details[open] > summary::before {
    background: url('data:image/svg+xml,<svg width="16" height="16" viewBox="0 0 12 12" \ enable-background="new 0 0 12 12" xmlns="http://www.w3.org/2000/svg">\ <path d="M2,4l4,4l4,-4" stroke="black" fill="none" stroke-width="1px"/></svg>');
}

.main_desc {
    margin-left: 1.5em;
}

.color-mod {
    color: var(--color-mod);
}
.color-fn {
    color: var(--color-fn);
}
.color-entity {
    color: var(--color-entity);
}
.color-pipeline {
    color: var(--color-pipeline);
}
.color-struct {
    color: var(--color-struct);
}
.color-enum {
    color: var(--color-enum);
}
.color-primitive {
    color: var(--color-primitive);
}
.color-type-alias {
    color: var(--color-type-alias);
}
.color-trait {
    color: var(--color-trait);
}

.item-table {
    padding: 0;
    list-style-type: none;
}
.item-table > dt > a {
    font-family: var(--font-code)
}
.item-table > dd {
    overflow-wrap: anywhere;
}
.item-table > dd > :last-child {
    margin-bottom: 0;
}
@media (min-width: 701px) {
    .item-table {
        display: grid;
        grid-template-columns: 25% 75%;
    }
}
