/* html-ized markdown */
/* designed by uxamanda (https://discourse.joplinapp.org/u/uxamanda). latest version https://github.com/amandamcg/joplin-theme */
:root {
    --white: #e3e3e3;
    --dark-white: #EEF0EA;
    --light-grey: #A3A79F;
    --grey: #575856;
    --dark-grey: #272728;
    --darker-grey: #1D2024;
    --black: #131517;
    --base-size-1: 1px;
    --base-size-4: 4px;
    --base-size-8: 8px;
    --base-size-10: 10px;
    --base-size-13: 13px;
    --base-size-18: 18px;
    --base-size-24: 24px;
    --base-size-32: 32px;
    --base-size-40: 40px;
    --base-size-272: 272px;
    --z-toc: 99;
    --font-weight-light: 200;
    --font-weight-base: 400;
    --font-weight-bold: 500;
    --font-sans: "IBM Plex Sans";
    --font-mono: "IBM Plex Mono";
    --primary: #0097DB;
    --secondary: #00dbcc;
    --font-line-height: 1.4em;
    --font-size: var(--base-size-13);
    --icon-size: var(--font-size);
}

.hljs {
    background-color: black;
    padding: var(--base-size-18);
    border-radius: var(--base-size-4) !important;
}

#rendered-md {
    padding: 6%;
}

body {
    font-family: var(--font-sans) !important;
    font-weight: var(--font-weight-base) !important;
    color: var(--dark-white);
    background-color: var(--black);
    font-size: var(--font-size) !important;
}

p, h1, h2, h3, h4, h5, h6, ul, table {
    margin-top: 0;
    margin-bottom: var(--base-size-8);
}

h1, h2, h3, h4 {
    font-weight: var(--font-weight-light) !important;
    letter-spacing: 0.01em;
    margin-top: var(--base-size-24);
}

h1 {
    font-size: calc(var(--font-size)*2) !important;
    line-height: var(--font-line-height) !important;
    margin-top: var(--base-size-24) !important;
    border-bottom: none !important;
}

h1:first-child {
    margin-top: 0px !important;
}

h2 {
    font-size: calc(var(--font-size)*1.6) !important;
}

h3 {
    font-size: calc(var(--font-size)*1.4) !important;
}

h4 {
    font-size: calc(var(--font-size)*1.3) !important;
}

p, li {
    /* font-weight: var(--font-weight-base) !important; */
    letter-spacing: .03em;
    color: var(--light-grey);
    margin-bottom: var(--base-size-24);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

ol li, ul li {
    margin-bottom: var(--base-size-4);
}

ul ul {
    /* list-style-type: cjk-heavenly-stem; */
    list-style-type: disc;
}

hr {
    padding: var(--base-size-24) !important;
}

.md-checkbox {
    margin-left: 0 !important;
}

.md-checkbox .checkbox-wrapper {
    align-items: flex-start;
}

.md-checkbox input[type="checkbox"i] {
    margin-left: -24px !important;
    opacity: 0.8 !important;
    margin-top: 7px;
    border: var(--base-size-1) solid var(--secondary);
}

.md-checkbox input[type=checkbox]:checked {
    opacity: 0.3 !important;
    text-decoration: line-through;
    ;
}

a, summary {
    text-decoration: none !important;
    padding: 0 0 var(--base-size-4) 0 !important;
    color: var(--secondary) !important;
    font-weight: var(--font-weight-bold) !important;
}

a:hover {
    border-bottom: var(--base-size-1) dashed var(--secondary) !important;
}

a[data-resource-id] {
    color: var(--primary) !important;
    /* change the colour of INTERNAL links */
    /* https://discourse.joplinapp.org/t/share-your-css/1730/65 */
}

a[data-resource-id] :hover {
    border-bottom: var(--base-size-1) dashed var(--primary) !important;
}

/* joplin icon in joplin link */
.resource-icon {
    background-color: var(--primary) !important;
    width: 0.75em;
    height: 0.9em;
    top: 0.1em;
}

/*
```
code blocks
```
*/
pre {
    font-family: var(--font-mono) !important;
}

/* ```inline code``` */
.inline-code {
    padding: .3em .6em !important;
    border-radius: var(--base-size-4) !important;
    background-color: #040404 !important;
    border: none !important;
    color: #abb2bf !important;
}

/* ==emphasis== */
mark {
    padding: 0 var(--base-size-4) !important;
}

@media screen {


nav.table-of-contents>ul {
    top: 0;
    right: 0;
    position: fixed;
    z-index: var(--z-toc);
    background: var(--dark-grey);
    padding: var(--base-size-8);
    border-radius: var(--base-size-4);
    max-width: 15%;
    font-size: calc(var(--font-size)/1.3) !important;
    max-height: var(--base-size-272);
    overflow: scroll;
    opacity: 0.8;
}

nav.table-of-contents ul {
    list-style-type: none;
    margin-left: var(--base-size-4);
}

nav.table-of-contents li {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
}

nav.table-of-contents li a {
    padding: 0;
    color: var(--light-grey) !important;
}

@media all and (min-width: 920px) {
    nav.table-of-contents>ul {
        height: 100%;
        max-height: 100%;
    }

    #rendered-md {
        width: 75%;
    }
}
}
