:root {
    --bg: #262626;
    --fg: #e8e8e8;
    --link-hover: #30d8f8;
    --muted: #a3a3a3;
    --line: #4a4a4a;
    --bar-height: 1.5rem;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: white;
        --fg: black;
        --muted: #555;
        --line: #c8c8c8;
    }
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--fg);
    font-family: system-ui, sans-serif;
    line-height: 1.5;
}

main {
    max-width: 60rem;
    margin: 0 auto;
    padding: 1rem;
}

h1 {
    text-align: center;
}

a:link, a:visited {
  color: var(--fg);
  font-weight: bold;
}

a:hover, .tabs a:hover {
  color: var(--link-hover);
}

img {
    width: 100%;
    /*image-rendering: optimizeSpeed;
    image-rendering: -moz-crisp-edges;
    image-rendering: -o-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    image-rendering: optimize-contrast;
    -ms-interpolation-mode: nearest-neighbor;*/
}

ul {
    list-style-position: inside;
    list-style-type: none;
    padding: 0;
    line-height: 1.25em;
}

li {
    margin-top: 0.3em;
    margin-bottom: 0.3em;
}

.half {
    width: 50%;
}

.tabs {
    position: relative;
    display: flex;
    justify-content: center;
    overflow-x: auto;
    flex-wrap: wrap;
    scrollbar-width: none;
    background-color: var(--tabs);
    background-color: color-mix(in srgb, var(--bg) 95%, transparent);
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tabs a,
.menu-panel a {
    color: var(--muted);
    text-decoration: none;
}

.tabs a {
    font-size: 1.15em;
    flex: none;
    display: flex;
    align-items: center;
    height: var(--bar-height);
    border-bottom: 2px solid transparent;
    margin: 0.5em 1em;
}

.tabs a[aria-current="page"] {
    color: var(--fg);
    border-bottom-color: var(--fg);
}

.tabs a:hover,
.menu-panel a:hover {
    color: var(--link-hover);
}

.tabs a[aria-current="page"]:hover {
    border-bottom-color: var(--link-hover);
}

a:focus-visible,
.menu-button:focus-visible {
    outline: 2px solid var(--fg);
    outline-offset: -2px;
}

.embed {
    display: flex;
    justify-content: center;
    margin-top: 1em;
    margin-bottom: 1em;
}

.center {
    text-align: center;
}

.subtitle {
    margin-top: -0.5em;
    font-size: 0.8em;
}

.push-down {
    margin-top: 1.5em;
}
.push-up {
    margin-top: -1.5em;
}
.push-up-less {
    margin-top: -0.75em;
}
.push-up-lesser {
    margin-top: -0.5em;
}


.flex-center {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-left: auto;
    margin-right: auto;
}
.flex-center * {
    margin: 0em 0.75em;
}

.midwidth {
    max-width: 50em;
}

.darkener {
    position: fixed;
    inset: 0;
    background-color: rgb(0 0 0 / 75%);
    z-index: 9;
}

.menu-button,
.menu-panel {
    display: none;
}

.menu-button {
    display: none;
    position: fixed;
    top: 0rem;
    right: 0rem;
    z-index: 10;
    width: 3.25rem;
    height: 3.00rem;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: var(--fg);
    background-color: color-mix(in srgb, var(--bg) 60%, transparent);
    border: 0px solid var(--line);
    cursor: pointer;
}

.menu-panel {
    inset: 3.00rem 0rem auto auto;
    margin: 0;
    padding: 0;
    min-width: 14rem;
    max-width: calc(100vw - 1rem);
    flex-direction: column;
    color: var(--fg);
    background-color: color-mix(in srgb, var(--bg) 60%, transparent);
    border: 0px solid var(--line);
    overflow: hidden;
}

.menu-panel a {
    color: var(--fg);
    padding: 0.85rem 1rem;
}

.menu-panel a + a {
    border-top: 0px solid var(--line);
}

.menu-panel a[aria-current="page"] {
    text-decoration: underline;
}

.menu-panel a[aria-current="page"]:hover {
    color: var(--link-hover);
}

.menu-panel:popover-open {
    display: flex;
}

@media (max-width: 700px) {
    .tabs {
        justify-content: safe center;
    }

    body.tabs-hidden .menu-button {
        display: flex;
    }
}

@media (min-width: 701px) {
    .tabs {
        position: sticky;
        top: 0;
        z-index: 10;
        padding: 0.2rem 1rem 0.4rem;
    }
}
