:root {
    --bloembraaden-default-paper-color: #fff;
    --bloembraaden-default-key-color: #000;
}

/**
 * Reset
 */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
main, section, article, nav, figure, figcaption,
header, footer, aside, mark, details, summary, time,
table, caption, tbody, tfoot, thead, tr, th, td {
    border: 0;
    font-size: inherit;
    font-style: inherit;
    font-weight: inherit;
    margin: 0;
    outline: 0;
    padding: 0;
    vertical-align: baseline;
    color: var(--bloembraaden-default-key-color);
}

html, body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6em;
    background-color: var(--bloembraaden-default-paper-color);
}

fieldset, legend {
    display: inline;
    vertical-align: top;
}

img {
    display: block;
    line-height: 0;
    border: 0;
}

em {
    font-style: italic;
}

strong {
    font-weight: 700;
}

s {
    text-decoration: line-through;
}

/**
 * basic margins
 */
p, h2, h3, h4, h5, h6 {
    margin-top: .8rem;
}

h1 + p, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p {
    margin-top: 0;
}

ol li {
    margin-bottom: .6rem;
}

ol label {
    display: block;
}

/* links and wannabe links */
a, .peatcms-link {
    text-decoration: underline;
    cursor: pointer;
}

/**
 * formatting headers
 */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    text-decoration: none;
}

h1 {
    font-size: 2em;
    font-weight: bold;
}

h2 {
    font-size: 1.8em;
    font-weight: bold;
}

h3 {
    font-size: 1.6em;
    font-weight: bold;
}

h3 {
    font-size: 1.4em;
    font-weight: bold;
}

h4 {
    font-size: 1.2em;
    font-weight: bold;
}

h5 {
    font-weight: bold;
}

h6 {
    font-weight: bold;
}

[data-peatcms-placeholder] {
    display: none !important;
}

html, body {
    height: 100%;
    width: 100%;
    font-size: 16px;
}

/**
 * handy standard css classes
 */
.nodisplay,
.display-none {
    display: none;
}

/* nice embed https://stackoverflow.com/a/20130011 */
.embed-wrapper {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    background: #CCC
}

.embed-iframe {
    position: relative;
    padding-top: 56.25%; /* 16 × 9 */
}

.embed-iframe iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


.attention-grabber,
.peatcms_attention_grabber {
    animation: peatcms_attention_grabber .2s 6 ease-in-out; /* 6 = iteration count, used to be infinite but removing the class does not stop the animation in IE11 then */
}

@keyframes peatcms_attention_grabber {
    0% {
        transform: translateX(0)
    }
    25% {
        transform: translateX(-6px)
    }
    75% {
        transform: translateX(6px)
    }
    100% {
        transform: translateX(0)
    }
}

.peatcms_signal_change {
    animation: peatcms_pulsating .3s 2 ease-in;
}

/**
 * Messages
 */
#message_wrapper {
    position: fixed;
    width: 80vw;
    top: 0;
    left: 10vw;
    display: block;
    z-index: 101;
}

.message {
    position: relative;
    display: block;
    margin: 5px;
    padding: 5px;
    border-radius: 5px;
    background-color: var(--bloembraaden-default-paper-color);
    box-shadow: 0 .3rem 1rem rgba(0, 0, 0, .28);
}

.log {
    color: rgb(48, 63, 123);
}

.warn {
    color: rgb(216, 136, 16);
}

.error {
    color: rgb(200, 0, 0);
    font-weight: bold;
}

.note {
    background-color: #ffc;
}

.message .button.close::before {
    content: '×';
}

.message .button.close {
    position: absolute;
    right: 0;
    top: 0;
    padding: 5px;
    color: var(--bloembraaden-default-paper-color);
    border-radius: 5px; /* same as message */
    background-color: rgb(90, 90, 90);
    font-weight: bold;
    width: auto;
    height: auto;
}

.message .button.close:hover {
    background-color: rgb(0, 180, 20);
}

/**
 * prompts
 */
#bloembraaden-prompt-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, .4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

#bloembraaden-prompt-wrapper .bloembraaden-prompt {
    background-color: rgb(255, 255, 255);
    padding: 1em;
    border-radius: 1em;
    max-width: 400px;
}

/**
 * from parser
 */
.nowrap {
    white-space: nowrap;
}

/**
 * Form elements
 */
textarea,
button,
input[type="submit"],
input[type="text"],
input[type="search"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="tel"],
input[type="password"] {
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
    border: none;
    background: transparent;
    color: #484844;
    padding: .25em;
    margin-bottom: .25em;
    outline: none;
    outline-offset: -1px;
}

textarea,
input[type="text"],
input[type="search"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="tel"],
input[type="password"] {
    outline: solid 1px #484844;
}

button,
input[type="submit"] {
    padding: .25em .5em;
}

@keyframes peatcms_pulsating {
    25% {
        opacity: 1;
    }
    75% {
        opacity: .31;
    }
}

.bloembraaden-fade-out {
    animation: bloembraaden_fade_out .5s forwards ease-in-out;
}

@keyframes bloembraaden_fade_out {
    10% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.bloembraaden-fade-in {
    animation: bloembraaden_fade_in .4s forwards ease-in-out;
}

@keyframes bloembraaden_fade_in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/**
 * Pretty select lists
 */
body select {
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
    border: none;
    padding: .25em 1.6rem .25em .25em;
    margin-bottom: .25em;
    /* border for select can only be done with outline */
    outline: none;
    outline-offset: -1px;
    /* the arrow image (https://www.filamentgroup.com/lab/select-css.html): */
    /* the color is the 484844 slightly after 'fill' */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23484844%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    /*linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);*/
    background-repeat: no-repeat, repeat;
    background-position: right .7em top 50%, 0 0;
    background-size: .65em auto, 100%;
}

body select::-ms-expand {
    display: none;
}

/**
 * slider https://cheewebdevelopment.com/boilerplate-vanilla-javascript-content-slider/
 */

.peatcms-slideshow-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    transition: 300ms;
}

/* ensure that we can adjust z-index or position elements absolutely within the slideshow itself (e.g., navigation) */
.peatcms-slideshow {
    position: relative;
}

/* set all slides as absolute positioning so they will stack on top of each other, and hidden from one another */
.peatcms-slide-entry {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    transition: opacity .6s;
}

.peatcms-slide-entry.active { /* this is how we transition the slides in/out */
    opacity: 1;
    visibility: visible;
}

/* set up our basic left/right navigation, would should ideally be vertically centered */

.peatcms-slide-nav {
    list-style: none;
}

.peatcms-slide-nav li {
    position: absolute;
    z-index: 2;
    cursor: pointer;
    color: #333;
    background-color: var(--bloembraaden-default-paper-color);
    font-size: 25px;
}

/* pull our navigation out of the slider container to avoid z-index issues */

#peatcms-prev-slide {
    left: 0;
}

#peatcms-next-slide {
    right: 0;
}

/* src sets */
[data-srcset] {
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0; /* will be set to 1 by javascript */
    transition: opacity .4s ease;
}

/* carousel */
.carousel {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.carousel .slide {
    flex: 0 0 auto;
    cursor: grab;
    height: 100%;
}

.carousel[data-mouse-is-down] .slide {
    cursor: grabbing;
}

/* just common sense */
[hidden] {
    display: none;
}

/* prevent CLS */
.cf-turnstile {
    height: 72.5px;
}

.cf-turnstile.invisible {
    max-height: 0;
    max-width: 0;
}
:root {
    --color-key: rgb(4, 20, 60);
    --color-accent: rgb(190, 30, 45);
    --color-paper: rgb(245, 245, 247);
    --color-paper-see-through: rgba(245, 245, 247, .9);
    --color-accent-background: rgb(252, 252, 255);
    --color-accent-light: rgb(164, 164, 164);
    --color-accent-fierce: rgb(255, 166, 0);
    --padding: 12px;
    --index-width: 240px;
}

.dark-mode {
    --color-key: rgb(250, 250, 254);
    --color-accent: rgb(150, 199, 255);
    --color-paper: rgb(30, 30, 39);
    --color-paper-see-through: rgba(30, 30, 39, .9);
    --color-accent-background: rgb(2, 2, 4);
    --color-accent-light: rgb(164, 164, 164);
}

html {
    height: auto;
}

html, body {
    background-color: var(--color-paper);
}

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote,
pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s,
samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form,
label, legend, main, section, article, nav, figure, figcaption, header, footer, aside,
mark, details, summary, time, table, caption, tbody, tfoot, thead, tr, th, td {
    color: var(--color-key);
    line-height: 1.8em;
}

/* page blocks layout */
#menu {
    position: fixed;
    right: 0;
}

#index {
    will-change: transform;
    position: sticky;
    float: left;
    top: 0;
    width: var(--index-width);
    max-height: 100vh;
    overflow-x: hidden;
    overflow-y: scroll;
    padding-left: var(--padding);
}

#main {
    float: right;
    padding: 0 var(--padding);
    width: calc(100% - var(--index-width) - (3 * var(--padding)) - 1px);
    overflow-x: hidden;
}

#header,
#footer {
    display: block;
    clear: both;
    float: none;
    width: calc(100% - (2 * var(--padding)) - 1px);
    padding: var(--padding);
}

.wrapper-end {
    max-height: 0;
    visibility: hidden;
}

/* indexer behaviour */
#index .peatcms-current-slug {
    color: var(--color-accent);
}

#index li {
    list-style-type: none;
}

#index li li {
    cursor: pointer;
}

#index .active {
    color: var(--color-accent);
}

#index .h1 {
    margin-left: 1em;
}

#index .h2 {
    margin-left: 2em;
}

#index .h3 {
    margin-left: 3em;
}

#index .h4 {
    margin-left: 4em;
}

#index .h5 {
    margin-left: 5em;
}

#index .h6 {
    margin-left: 6em;
}

/* close indexed list when not on that page */
#index a:not(.peatcms-current-slug) + ul {
    display: none;
}

/* content layout */
code {
    padding: 1px 2px;
}

pre {
    padding: 1em;
    overflow-y: scroll;
}

code, pre {
    background-color: var(--color-accent-background);
    border-radius: 3px;
}

#main ul {
    margin-left: 1.2em;
}

.bloembraaden-circ {
    color: var(--color-accent);
}

.bloembraaden-curr {
    font-size: 75%;
}

img {
    width: 100%;
}

.skip-first-image figure:first-of-type {
    display: none;
}

.skip-all-images figure {
    display: none;
}

#footer header {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: -.5rem;
}

/* main menu */
#menu {
    display: none;
    z-index: 2;
    padding: 1em;
    position: fixed;
    right: 3px;
    border-radius: 2px;
    background-color: var(--color-paper-see-through);
    border: solid 1px var(--color-accent-fierce);
}

#menu li {
    list-style-type: none;
    background-color: var(--color-paper);
    padding: 1px 2px;
}

.display-menu #menu {
    display: block;
}

.toggle-indexer,
.toggle-menu {
    position: fixed;
    top: 0;
    margin: .5em;
    padding: 2px .5em;
    border-radius: 2px;
    cursor: pointer;
}

.toggle-menu {
    right: 0;
    background-color: var(--color-accent-fierce);
}

.toggle-indexer {
    display: none;
    left: 0;
    color: var(--color-paper);
    background-color: var(--color-accent);
}

.dark-mode .toggle-menu {
    color: var(--color-paper);
}

#dark-mode {
    cursor: pointer;
}

#dark-mode:after {
    content: '☉';
}

.dark-mode #dark-mode:after {
    content: '☽';
}

@media (max-width: 809px) {
    #main {
        width: calc(100% - (2 * var(--padding)) - 1px);
        clear: both;
        float: none;
    }

    #header {
        text-align: center;
    }

    .toggle-indexer {
        display: block;
    }

    .toggle-indexer:after {
        content: 'INDEX';
    }

    #index {
        position: fixed;
        left: calc(-241px - var(--padding));
        min-height: 100vh;
        width: 240px;
        border-right: solid 1px var(--color-key);
        background-color: var(--color-paper);
        transition: left ease-out .402s;
    }

    .display-index #index {
        left: 0;
    }
}
