* {padding: 0; margin: 0; box-sizing: border-box;}
html {font-size: 15px; line-height: 2.2; height: 100%;}
* {font-family: 'dejavu_sans_monobook', monospace; font-weight: normal;}
h1,h2,h3,strong,b,.cm-header,.cm-strong {font-family: 'dejavu_sans_monobold', monospace; font-weight: normal!important;}
h1, .header > div:first-child {display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 2rem;}
.header > div:last-child {white-space: nowrap;}
a {cursor: pointer;}
h1 {padding-right: 3rem;}
body {overflow-y: scroll; font-size: 1rem; background: white; color: #101010;}
#body::after {content: ""; position: fixed; left: 0; top: 0; background: #101010; height: 100vh; width: 0.75rem;}
body.admin #body::before {content: ""; position: fixed; left: 0; top: 0; background: white; height: 100vh; width: 100%; pointer-events: none; mix-blend-mode: exclusion; z-index: 11;}
body.dialog-iframe-open #body {max-height: 100vh; overflow: hidden;}

/* id=body only exists if instant editing is enabled */
body.dialog > .main {display: block; background: white;}
body.dialog > .main::before,
body.dialog #body::before {
    content: '';
    background: rgba(0, 0, 0, 0.75);
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100vh;
    z-index: 4;
}
body.dialog > .main::before {
    position: fixed;
    z-index: -1;
}
.main .dialog {background: white;}
.main .dialog .header {padding: 0;}
.main .dialog .content {width: 100%;}

a {color: #101010; text-decoration: none;}
.messagebar, .messagebar a {background: #253474; text-align: center; color: white; font-weight: bold; display: block; padding: 0.5rem 1rem; line-height: 1.5; position: relative; z-index: 99;}
.messagebar {padding: 0; position: sticky; top: 0; z-index: 2;}
.header, .main {margin: 0 auto; width: 100%; max-width: 70rem; position: relative; padding: 0 1rem 0 1.5rem;}
.header {display: flex; justify-content: space-between; margin-bottom: 2.5rem; margin-top: 0.65rem;}
.header a {text-transform: lowercase;}
img.icon.inline {display: inline-block; position: relative; top: 0.25rem;}
.backlink {text-transform: lowercase;}
.main {display: flex; flex-wrap: wrap; padding-bottom: 5rem;}
.main h1 {width: 100%; text-transform: lowercase;}
.frontmatter, .menu {min-width: 22rem; max-width: 22rem; padding-right: 3rem;}
.menu {min-width: 0%; max-width: 100%; padding-right: 6rem; min-width: 15rem; width: 15rem;}
.no_menu .menu {display: none;}
.menu ul ul li {padding-left: 0;}
.menu ul ul li::before {content: ""; display: inline-block; margin-right: 1rem; font-weight: normal;}
ul li {list-style: none;}
.menu ul li {text-transform: lowercase; color: rgba(0,0,0,0.4); border-top: 1px solid rgba(0,0,0,0);}
.menu ul li a {display: block; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;}
.menu ul li.selected > a {font-family: 'dejavu_sans_monobold', monospace; font-weight: normal;}
.menu ul li.flex a + a {margin-left: 2rem;}
.flex {display: flex; justify-content: space-between;}
ul.list li span.hasicon {padding-left: 1.75rem;}
ul li.flex a:nth-child(1) {flex-grow: 1;}
ul li.flex a + a {padding-left: 0.75rem; position: relative; width: auto!important; padding-right: 0.75rem;}
ul li.flex a + a img {height: 1.2rem; display: inline-block; vertical-align: middle;}
ul li.unread, ul li.unread * {font-family: 'dejavu_sans_monobold', monospace;}
img.icon, .icon img {height: 1.25rem!important;}

ul li > a {display: block; color: #101010; text-decoration: none;}
.content {flex-grow: 1; width: calc(100% - 22rem); position: relative;} 
.no_menu .content {max-width: 37.5rem; margin: 0 auto;}
.content ul.list + .list > li:first-child,
.content ol.list > li,
.content ul.list > li {margin-bottom: 0; border-top: 1px solid rgba(0,0,0,0.2); position: relative;}
.content ul.list > li.first-child,
.content ol.list > li.first-child,
.content ol.list > li:first-child,
.content ul.list > li:first-child {border: 0;}
.content .list > li {line-height: 1.5; padding: 0.35rem 0;}
.content .list > li a:first-child {overflow-wrap: break-word;}
.content .list > li > a.nobreak {white-space: nowrap; text-overflow: ellipsis; overflow: hidden;}
.content .list > li.image {border: 0; line-height: 2.2;}
.content .list > li a .preview img {display: none;}
.content .list > li.hidden {display: none;}

.content ul.grid {padding: 0.7rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); grid-gap: 0.7rem;}
.content ul.grid > li a .preview {border: 1px solid rgba(0,0,0,0.2); width: 100%; aspect-ratio: 1; background: url() center center / cover no-repeat;}
.content ul.grid > li a .preview img {display: block; width: 100%;}
.content ul.grid > li a .preview + span {display: none;}
.content ul.grid > li a {display: flex; flex-direction: column;}

.displaytoggle {position: absolute; width: 100%; display: flex; justify-content: flex-end; top: 0.25rem;}
.displaytoggle a {display: block; cursor: pointer;}
.displaytoggle img {display: block; height: 1.65rem;}

.togglenext {cursor: pointer; user-select: none;}
.togglenext + * {display: none;}
.expanded > .togglenext + * {display: initial;}
.expanded > .togglenext {display: none;}

.spacebetween {display: flex; justify-content: space-between;}
input, textarea, .statuswindow, select {
    border: 1px solid rgba(0,0,0,0.2); 
    background: #fafafa; 
    display: block; 
    resize: none; 
    width: 100%; 
    padding: 0.25rem 0.5rem; 
    margin-bottom: 1rem; 
    line-height: 1.5; 
    font-size: 1rem;
    border-radius: 0;
    -webkit-appearance: none;
}
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
    background: #fafafa url(/img/unfoldmore.svg) calc(100% - 0.35rem) center / 1.25rem auto no-repeat;
}
select:not([multiple]) {
    background: #fafafa url(/img/chevrondown.svg) calc(100% - 0.35rem) center / 1.25rem auto no-repeat;
}
input[type="search"] {background: #fafafa url(/img/icons/magnify.svg) calc(100% - 0.2rem) 50% / auto 1.55rem no-repeat;}


.EasyMDEContainer {margin-bottom: 1rem;}
.EasyMDEContainer .CodeMirror, .EasyMDEContainer .editor-toolbar {border-color: rgba(0,0,0,0.2)!important; border-radius: 0!important;}
.EasyMDEContainer .CodeMirror {background: #fafafa; line-height: 1.75!important;}
.EasyMDEContainer .CodeMirror .cm-link {text-decoration: none;}
.EasyMDEContainer .CodeMirror.cm-s-easymde .cm-url,
.EasyMDEContainer .CodeMirror.cm-s-easymde .cm-string,
.EasyMDEContainer .CodeMirror.cm-s-easymde .cm-attribute, 
.EasyMDEContainer .CodeMirror.cm-s-easymde .cm-link, 
.EasyMDEContainer .CodeMirror.cm-s-easymde .cm-tag {color: rgba(0, 0, 0, 1)!important;}
.EasyMDEContainer .CodeMirror.cm-s-easymde .cm-link:not(.cm-formatting-link,.cm-url) {color: #101010;}
.EasyMDEContainer .editor-preview-full a, .EasyMDEContainer .editor-preview-side a {color: #101010;}
.editor-preview-side ul, .editor-preview-full ul {margin-left: 1rem;}
.editor-preview-side ol, .editor-preview-full ol {margin-left: 2rem;}
.editor-preview-side ol li, .editor-preview-full ol li {list-style-type: decimal;}

textarea, .statuswindow {padding: 0.5rem 0.5rem;}
.statuswindow {min-height: 5rem; background: #fafafa; color: rgba(0,0,0,0.4);}
.statuswindow a {color: rgba(0,0,0,0.4);}
input::placeholder {color: #101010; opacity: 0.25;}
input[type="submit"], .button {display: inline-block; width: auto; padding: 0rem 1.5rem; height: 2.5rem; line-height: 2.5rem; color: white; background: #101010; border: 0; font-family: 'dejavu_sans_monobold', monospace; font-weight: normal; cursor: pointer; font-size: 1rem;}
input[type="submit"].margintop, .button.margintop {margin-top: 1.15rem;}
#debugger-bar {z-index: 2;}
h1 {font-size: 1.75rem; line-height: 1.2; margin-bottom: 1rem; margin-top: 0.15rem;}

.hugocmslogo img {height: 1.2rem; display: inline-block; vertical-align: middle; position: relative; bottom: 0.15rem; margin-right: 0.20rem;}
.backarrow img {height: 1.25rem; display: inline-block; vertical-align: middle; position: relative; bottom: 0.175rem;}

.login .main {max-width: 25rem;}
.login input {margin-bottom: 0.5rem;}
.login input[type="submit"] {margin-top: 1.15rem;}
.error, .error * {color: red!important;}
div.error {padding-bottom: 1.25rem; line-height: 1.75;}
.login h1 {line-height: 1.7; text-align: center; margin: 2.5rem 0 1rem; font-size: 2.3rem; display: flex; align-items: center; padding-right: 0;}
.login h1 .hugocmslogo {display: block; text-align: center; padding: 1rem 1.15rem 1rem 0;}
.login h1 .hugocmslogo img {height: 3.5rem;}

a.array, div.array, a.object {
    border: 1px solid rgba(0,0,0,0.2);
    display: block;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    position: relative;
}
a.array,
a.object {
    background: #fff url(/img/chevronright.svg) calc(100% - 0.25rem) center / 1.25rem auto no-repeat;
}


.imageholder {width: 100%; position: relative;}
img.boxed {border: 1px solid #101010; height: auto; max-height: 20rem; max-width: 100%; display: block; background-image: url('/img/checker_image_background.png');}
.imagepreview { margin-bottom: 0.75rem;}


/* ImageSELECTOR */

.imageSelectorWithPreviewParent {flex-direction: column;}
.imageSelectorWithPreview {background-image: none;}
.searchState {flex-direction: column;}
.searchState select {min-height: calc(13rem - 1px);}
.previewState {position: relative;}
.previewState > img {border: 1px solid rgba(0,0,0,0.2); background: #fafafa; margin-bottom: 1rem; display: block; width: 100%; height: 15rem; object-fit: contain;}
.previewState a {cursor: pointer; position: absolute; right: 0.5rem; top: 0.5rem; background: transparent!important;}
.previewState a::before {content: ""; position: absolute; width: calc(100% + 2rem); height: calc(100% + 2rem); left: 0; top: 0; margin: -1rem;}

.selectState.hidden, .previewState.hidden {display: none;}

.buttons {overflow: auto;}
.buttons input, .buttons .button {margin: 0 0.5rem 0.5rem 0; float: left}
.buttons .secondary .button {margin-left: 0;}
.buttons .secondary .togglenext {position: relative; top: 0.15rem;}

.secondary {display: inline; margin-left: 0.2rem;}
.secondary .togglenext {margin-left: 0.5rem;}
.secondary .button {margin-left: 0.25rem;}
.secondary .button:first-child {margin-left: 0;}
.secondary .button,
.button.ghost {
    background: white;
    color: #101010;
    box-shadow: inset 0 0 0 1px #101010;
}
.button.ghost.icon {
    padding: 0;
    text-align: center;
    width: 1.3rem;
    height: 1.3rem;
    line-height: 1.2rem;
    box-shadow: none;
    font-size: 1.5rem;
    vertical-align: middle;
}
.button.ghost.icon span {
    display: block;
    width: 1.3rem;
    height: 1.3rem;
    line-height: 1.2rem;
}
.button.disabled {pointer-events: none; opacity: 0.2;}

.bargraph {display: flex; flex-direction: row-reverse; height: 10rem; border-bottom: 1px solid #101010; border-left: 1px solid #101010;}
.bargraph > div {flex-grow: 1; border-left: 1px solid white;}

.bullet {
    height: .75em; 
    width: .75em; 
    background-color: rgba(255, 255, 255, 0.15); 
    border-radius: 50%; 
    display: inline-block; 
    margin-right: 0.5em;
    filter: invert(1);
}
.bullet.green {background-color: rgb(19, 97, 0);}
.bullet.red {background-color: rgb(180, 0, 0);}
.bullet.orange {background-color: rgb(180, 108, 0);}

table th {text-align: left;}
td, th {padding-right: 2rem;}
tbody tr > * {border-top: 1px solid rgba(0,0,0,0.2);}
tbody:first-child tr:first-child > * {border: 0;}
td:last-child, th:last-child {padding-right: 0;}

dl.inline {display: flex;}
dt {text-transform: lowercase;}
dl.inline dt::after {content: ":"; padding-right: 0.5rem;}
.progressbar {border: 1px solid silver; width: 100%;}
.progressbar td {background-color: rgba(0, 0, 0, 0.15); border: 0;}
dl + dl {border-top: 1px solid rgba(0,0,0,0.2);}

.languageselector {display: inline-block;}
.languageselector > * {display: inline-block;}
.languageselector > *::after {content: "/";}
.languageselector > *:last-child::after {content: none;}

.dialog-iframe {position: fixed; top: 0; left: 0; border: 0; width: 100%; height: 100vh; z-index: 6;}

#preview, #splitscreenhandle, #preview iframe {display: none;}
body.with_splitscreen #body {width: 50vw; position: relative;}
body.with_splitscreen #preview {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: calc(50vw - 0.5rem);
    z-index: 3;
    display: block!important;
}
body.with_splitscreen #preview iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
body.with_splitscreen #splitscreenhandle {
    display: block;
    position: fixed;
    left: 50vw;
    top: 0;
    width: 0.5rem;
    height: 100vh;
    border: 1px solid rgba(0,0,0,0.2);
    border-top: 0;
    border-bottom: 0;
    background: #fafafa;
    cursor: ew-resize;
    z-index: 3;
}
body.with_splitscreen #splitscreenhandle span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: block;
    width: 1.2rem;
    height: 9rem;
    background: #fafafa;
    border: 1px solid rgba(0,0,0,0.2);
}
body.with_splitscreen #splitscreenhandle span::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: block;
    width: 1.05rem;
    aspect-ratio: 1;
    background: url(/img/leftright.svg) center center / contain no-repeat;
    opacity: 0.45;
}

body.isDragging, body.isDragging * {
    user-select: none;
}
body.isDragging iframe {
    pointer-events: none;
}

body, #body {container-name: bodydiv; container-type: inline-size;}
.main, .dialog, .menu, .header div:nth-child(2),.header .username, body #body::after,
.header, .main, .menu ul li, .menu > ul > li:first-child, .content {container: bodydiv;}

#debugger-bar {z-index: 99;}

@container (max-width: 70rem) {
    .main {display: block;}
    .frontmatter, .menu {min-width: 0; max-width: 100%; padding: 0;}
    .header div:nth-child(2) {text-align: right; padding-bottom: 0.25rem;}
    .header .username {display: none;}
    body .menu {display: none; width: 100%;}
    body.dashboard .menu {display: inline-block; padding-top: 2.5rem;}
    body.dashboard .main {display: flex; flex-direction: column-reverse;}
    body #body::after {width: 0.25rem;}
    .header, .main {padding-inline: 1.75rem 1.5rem;}
    .menu ul li {border-top: 1px solid rgba(0,0,0,0.2);}
    .menu > ul > li:first-child {border-top: 1px solid rgba(0,0,0,0);}
    .content {width: 100%;}
    .main {padding-bottom: 3.5rem;} 
    body.dialog #body > .header,
    body.dialog #body > .messagebar {display: none;}
    body.dialog #body::before {content: none;}
}
@container (min-width: 70rem) {
    body.dialog .main .dialog {
        margin: -1.5rem 0 3rem; 
        padding:  0.5rem 2rem 3rem;
        width: calc(100% + 3rem); 
        overflow: auto;
        position: relative;
        z-index: 4;
    }
}