html {
    --espresso: #2d1807;
    --espresso-lighter-1: #502c0e;
    --cabernet: #440c1e;
    --mulberry: #811b33;
    --mulberry-brighter-1: #9f2642;
    --chartreuse: #aab23d;
    --juniper: #626420;
    --juniper-saturation-1: #71853c;
    --pistacio: #b2ad85;
    --pistacio-saturation-1: #bcc39b;
    --dusty-rose: #e3baba;
    --champagne-rose: #ae8d74;
    --white: #ffffff;
    --eggplant-darker-2: #2f061b;
    --eggplant-darker-1: #400321;
    --eggplant: #520322;

    --main-bg: var(--pistacio-saturation-1);
    --main-text-color: var(--eggplant);
    --header-bg: var(--eggplant);
    --big-button-color: var(--mulberry);
    --big-button-color-hover: var(--chartreuse);
    --links-color: var(--cabernet);

    --menu-selected-text-shadow: var(--chartreuse);
    --menu-selected: var(--juniper-saturation-1);
    --menu-selected-borders: var(--mulberry);
    --menu-selected-hover: var(--chartreuse);
    --menu-selected-borders-hover: var(--juniper);
    --menu-hover: var(--mulberry);
    --menu-link-active: var(--white);
    --menu-link: var(--pistacio-saturation-1);

    --sidebar-widget-head-text: var(--chartreuse);
    --sidebar-widget-head-bg: var(--mulberry);
    --sidebar-widget-head-text-hover: var(--white);
    --sidebar-widget-bg: var(--juniper);
    --sidebar-trigger: var(--champagne-rose);
    --sidebar-trigger-text: var(--white);
    --sidebar-slide-bg: rgba(0,0,0,0.7);
    --sidebar-widget-li: var(--chartreuse);
    --sidebar-widget-tags: var(--white);
    --sidebar-widget-tags-hover: var(--white);
    --sidebar-widget-tags-bg: var(--cabernet);

    --mp-block-outline: var(--mulberry);
    --mp-block-bg: var(--juniper);
    --mp-block-link: var(--chartreuse);
    --mp-block-link-outline: var(--white);
    --mp-block-desc-bg: var(--cabernet);
    --mp-block-outline-hover: var(--mulberry);
    --table-hover-color: var(--pistacio);

    --text-block-bg: transparent;
    --text-block-outline: transparent;
    --text-block-caption-bg: transparent;
    --text-block-caption-h2-bg: transparent;
    --text-block-caption-h3-bg: transparent;
    --text-block-caption-h4-bg: transparent;
    --text-block-caption-h5-bg: transparent;
    --text-block-caption-code-bg: var(--champagne-rose);
    --text-block-code-bg: var(--pistacio);
    --text-block-caption-color: var(--cabernet);
    --code-text: var(--mulberry);
    
    --footer-color: var(--chartreuse);
    --footer-bg: var(--cabernet);

    interpolate-size: allow-keywords;
}

* { margin: 0; padding: 0; }

body {
    background-color: var(--main-bg);
    /* min-width: 1024px;
    min-height: 768px; */
    color: var(--main-text-color);
    font-family: 'Libertinus Math', 'Sans Serif', serif;
    position: relative;
}

a {
    text-decoration: none;
    color: #3b93d2;
}
.svg-icon {
    height: 1.2em;
}
.svg-icon svg {
    height: 1em;
    width: auto;
    vertical-align: middle;
    margin-top: -0.15em;
}
.svg-icon svg path {
    fill: var(--main-text-color) !important;
}

a .svg-icon svg path {
    fill: var(--links-color) !important;
}

/* ========================================== HEADER */

header {
    background-color: var(--header-bg);
    vertical-align: baseline;
    position: relative;
    font-family:  'Noto Sans', 'Open Sans', Tahoma, Helvetica, sans-serif;
}

.header-shadow {
    position: absolute;
    top: 4rem;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
}
.header-shadow:after {
    content: '';
    display: block;
    height: 1.5rem;
    background-color: var(--main-bg);
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
}

header .gotomain {
    background-color: var(--big-button-color);
    height: 3.5rem;
    width: 3.5rem;
    margin: 0.25rem;
    transition: all 300ms linear;
    display: block;
    border-radius: 50%;
}

header .gotomain:before {
    display: block;
    height: 2rem;
    width: 2rem;
    margin: 0.5rem;
    border-radius: 50%;
    border: .25rem solid var(--menu-link);
    content: '';
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
}

header .gotomain:hover {
    background-color: var(--big-button-color-hover);
}
header .gotomain:hover:before {
    border-color: var(--menu-link-active);
}

header .root-link {
    height: 4rem;
    line-height: 4rem;
    font-size: 2rem;
    color: var(--menu-link);
    position: absolute;
    top: 0;
    left: 0;
    width: 4.5rem;
    text-align: center;
    padding-right: 0.5rem;
    transition: all 200ms linear;
}
header .root-link:after {
    content: "❮";
}
header .root-link:hover {
    color: var(--menu-link-active);
    background-color: var(--menu-hover);
}

ul.menu {
  list-style: none;
  font-size: 0;
  line-height: 4rem;
}

ul.menu li {
  height: 3.5rem;
  margin: .25rem .5rem;
  border-radius: 1.75rem;
  font-size: 1rem;
  line-height: 3.5rem;
  text-align: center;
  text-transform: uppercase;
  text-shadow: -1px 1px .5rem #000;
  transition: all 200ms linear;
  padding: 0 .75rem;
  /* overflow: hidden; */
}
ul.menu li.selected {
  text-transform: uppercase;
  text-shadow: 0 0 .5rem var(--menu-selected-text-shadow);
  background-color: var(--menu-selected-borders);
  position: relative;
  padding: 0 .75rem;
}

ul.menu li.selected:hover {
    background-color: var(--menu-selected-borders-hover);
    padding: 0 1.25rem;
    margin-left: 0;
    margin-right: 0;
}

ul.menu li:hover {
  background-color: var(--menu-hover);
}

ul.menu li a {
  display: block;
  color: var(--menu-link);
  font-weight: normal !important;
  text-decoration: none;
  border-radius: 1.75rem;
}
ul.menu li:hover a {
  color: var(--menu-link-active);
  background-color: var(--menu-hover);
}
ul.menu li.selected a {
  color: var(--menu-link-active);
  background-color: var(--menu-selected);
}
ul.menu li.selected a:hover {
  color: var(--menu-link-active);
  background-color: var(--menu-selected-hover);
}

.locale-selector select {
    height: 3rem;
    margin-top: .5rem;
    margin-right: 3rem;
    font-size: 1rem;
    text-align: center;
    width: 8.5rem;
    background: var(--menu-selected-borders);
    color: var(--menu-link);
    border: none;
    float: right;
}

.menu-toggle {
    display: none;
}
.menu-toggle-button {
    position: absolute;
    font-size: .75rem;
    top: .9rem;
    left: .9rem;
    height: 3em;
    width: 3em;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.menu-toggle-button .burger, .menu-toggle-button:before, .menu-toggle-button:after {
    display: block;
    width: 100%;
    height: .3em;
    margin: .35em 0;
    border-radius: .5em;
    background-color: var(--menu-link);
    transition: 150ms all linear;
}
.menu-toggle-button:before, .menu-toggle-button:after {
    content: '';
}

.menu-toggle:checked ~ .menu-toggle-button:before, 
.menu-toggle:checked ~ .menu-toggle-button:after {
    background-color: var(--menu-link-active);
}
.menu-toggle:checked ~ .menu-toggle-button .burger {
    background-color: transparent;
}
.menu-toggle:checked ~ .menu-toggle-button:before {
    transform: rotate(45deg) translateY(.7em) translateX(.7em);
}
.menu-toggle:checked ~ .menu-toggle-button:after {
    transform: rotate(-45deg) translateY(-.7em) translateX(.7em);
}

.alertbox {
    font-size: .9rem;
    line-height: 2.5em;
    padding-left: 14rem;
    background-color: var(--text-block-bg);
    transition: all 200ms linear;
    filter: brightness(0.8);
}
.alertbox a {
    display: block;
    color: var(--menu-link);
}
.alertbox:hover {
    filter: brightness(1.2);
}

/* ========================================== SIDEBAR */

.sidebar-container h2, .panel h2 {
  font-family: sans-serif;
  margin: 0 0 1rem;
  position: relative;
  text-transform: uppercase;
  font-size: 1rem;
}
#sidebar h2 span, #sidebar h2 span {
}
.sidebar-container h2 span {
  padding: 0 .5rem;
  display: inline-block;
  position: relative;
  z-index: 1;
  font-family: sans-serif;
}
.sidebar-container h2:after, .panel h2:after {
    content: " ";
    width: 4.5rem;
    height: 0px;
    position: absolute;
    left: 0;
    bottom: -.2rem;
}
.sidebar-container .widget-block {
    margin:0 0 .75rem;
    color: #fff;
    overflow: hidden;
}
.sidebar-container ul, .sidebar-container ol {
list-style-type:none;
margin:0;
padding:0;
}
.sidebar-container li {
    margin:.25rem 0;
    padding:0;
}

#bottombar .left .widget, #bottombar .center .widget, #bottombar .right .widget, .sidebar .widget {
    margin:0 0 10px 0;
}

.sidebar-container h2, .panel h2 {
  display: block;
  line-height: 1.75em;
  text-transform: uppercase;
  color: var(--sidebar-widget-head-text);
  padding: .5em .75rem;
  font-size: .85rem;
  font-family: sans-serif;
  font-weight: bold;
  /*background: no-repeat url('xMwQgpA.png') var(--sidebar-widget-head-bg) right 0.4vh;*/
  background-color: var(--sidebar-widget-head-bg);
  background-size: 3em auto;
  margin: -.1rem 0 0 0;
  transition: all 150ms linear;
}
.sidebar-container .widget-block:hover h2, .panel h2:hover {
  color: var(--sidebar-widget-head-text-hover);
  /* background-position: right -3.0vh; */
}

.sidebar-container .widget-block {
  margin: 0;
}
.sidebar-container .widget-content {
  background-color: var(--sidebar-widget-bg);
  padding: 11px;
  margin-bottom: 12px;
  opacity: 0.8;
  transition: opacity 150ms linear;
}
.sidebar-container .widget-block:hover .widget-content {
  opacity: 1;
}

.widget-block.sidebar-widget-toc a.socblock {
    text-align: left;
}
a.socblock.level-h1 { padding-left: 1em; }
a.socblock.level-h2 { padding-left: 2em; }
a.socblock.level-h3 { padding-left: 3em; }
a.socblock.level-h4 { padding-left: 4em; }
a.socblock.level-h5 { padding-left: 5em; }
a.socblock.level-h6 { padding-left: 6em; }

.showSB {
  font-size: 1.5rem;
  background-color: var(--sidebar-trigger);
  border-top-right-radius: .5rem;
  border-bottom-right-radius: .5rem;
  position: fixed;
  left: 0;
  right: 0;
  top: 30rem;
  text-align: center;
  padding: 1.5rem .25rem 1.6rem;
  width: 1rem;
  color: var(--sidebar-trigger-text);
  opacity: .75;
  font-family: sans-serif;
  z-index: 90;
  cursor: pointer;
}

.widget-content img {
    padding: 2px;
    border: 1px solid lightGrey;
    width: 80px;
    height: 80px;
}

#sidebartab .popular-posts li {
    background: none repeat scroll 0 0 transparent;
    border-bottom: 1px solid var(--sidebar-widget-li);
    overflow: hidden;
    padding: 10px 0;
}
.tagcloud a {
    background: #e4e4e4;
    color: var(--sidebar-widget-tags);
    display: block;
    float: left;
    font-size: 14px!important;
    line-height: 12px;
    margin: 0 2px 2px 0;
    padding: 12px 17px;
}
.tagcloud a:link {
    color: var(--sidebar-widget-tags);
}
.tagcloud a:hover {
background: var(--sidebar-widget-tags-bg);
color: var(--sidebar-widget-tags-hover);
}


.sidebar-slide {
    position: fixed;
    left: -42vh;
    top: 8vh;
    z-index: 20;
    padding: 1vh;
    background-color: var(--sidebar-slide-bg);
    width: 40vh;
    transition: all 300ms linear;
    height: 89vh;
    overflow-y: scroll;
    overflow-x: hidden;
}
.sidebar-slide #sidebar {
    width: 92%;
    float: right;
}
.sidebar-slide.active {
  left: 0;
}

a.socblock {
  text-align: center;
  color: #fff;
  display: block;
  background-color: var(--menu-hover);
  transition: all 200ms linear;
  font-weight: normal;
  font-size: 1rem;
  line-height: 1.75em;
  padding: .35em 0;
}
a.socblock.small {
  display: block;
  width: 50%;
  float: left;
  font-size: .8rem;
  line-height: 1.5em;
  padding: .5em 0;
}
a.socblock:hover {
  background-color: var(--menu-selected);
}

a.socblock.active {
  font-weight: bold;
}

a.socblock.discord {
  background-color: #7289da;
}
a.socblock.discord:hover {
  background-color: #2c3861;
}

a.socblock.vk {
  background-color: #265d9d;
}
a.socblock.vk:hover {
  background-color: #193c63;
}

a.socblock.medium {
  background-color: #111;
}
a.socblock.medium:hover {
  background-color: #222;
}

a.socblock.twitter {
  background-color: #1da1f2;
}
a.socblock.twitter:hover {
  background-color: #0069aa;
}

a.socblock.youtube {
  background-color: #b91a1a;
}
a.socblock.youtube:hover {
  background-color: #540000;
}

a.socblock.telegram {
  background-color: #1589f6;
}
a.socblock.telegram:hover {
  background-color: #09639d;
}

a.socblock.twitch {
  background-color: #392e5c;
}
a.socblock.twitch:hover {
  background-color: #130b2b;
}

a.socblock.patreon {
  background-color: #f96753;
}
a.socblock.patreon:hover {
  background-color: #9a3224;
}

a.socblock.boosty {
    background-color: #F15F2C;
}
a.socblock.boosty:hover {
    background-color: #ac421c;
}



/* ========================================== BLOCKS/CONTENT */

.blocks-container, .dashlist {
  overflow: hidden;
  font-size: 0;
}

.block {
    box-shadow: 0 0 0 0.2vh var(--mp-block-outline);
    transition: all 300ms ease-in-out;
    overflow: hidden;
    position: relative;
    background: var(--mp-block-bg) no-repeat center center;
    z-index: 0;
}
.block:hover {
    box-shadow: 0 0 0 0.2vh var(--mp-block-outline-hover);
}
.block.navblock {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    box-shadow: none;
    background: none;
}
.block.navblock .navlink.middle {
    text-align: center;
    grid-column-start: 2;
}
.block.navblock .navlink.right {
    text-align: right;
    grid-column-start: 3;
}
.block.navblock .navlink {

}


.block a {
    display: block;
    height: calc(100% - 2rem);
    padding: 1rem;
    font-size: 1.25rem;
    color: var(--mp-block-link);
    /* Remove heavy glow/shadow around text for cleaner look */
    text-shadow: none;
    position: relative;
    z-index: 11;
}

.block:has(.dashboard-image) a {
    pointer-events: none;
}

.block:has(.dashboard-image) a:hover {
    text-decoration: none;
}
.block.vertical a, .block.horizontal a, .block.cat-head a, .block.wide a {
    font-size: 1.8rem;
}

.block p:before {
        content: '';
        background-color: var(--mp-block-desc-bg);
        position: absolute;
        transition: all 300ms ease;
        opacity: 0.7;
        z-index:-1;
    }
.block p {
    font-size: 1.5rem;
    opacity: 0.3;
    transition: all 300ms ease;
}


.block img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 0.8;
    transition: all 300ms ease;
}

.block img.dashboard-image {
    z-index: 1;
    cursor: pointer;
    pointer-events: auto;
}
.block:hover img {
    opacity: 1;
    transform: scale(1.05);
}

.content-container {
    position: relative;
}

.backlink-container {
    position: absolute;
    top: -2em;
    left: 0;
    z-index: 10;
    pointer-events: none;
    margin-left: max(2rem, calc((100% - 125rem) / 2));
}

.backlink {
    display: inline-block;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--text-block-caption-color);
    opacity: 0.7;
    padding: 0.5rem 0;
    pointer-events: auto;
    transition: opacity 0.2s;
}

.backlink:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Dashboard image modal */
.dashboard-image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 300ms ease;
}

.dashboard-image-modal.active {
    display: flex;
}

.dashboard-image-modal-content {
    position: relative;
    width: 90vw;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-image-full {
    width: 100%;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: pointer;
}

.text-block {
    padding: 1.5rem 3rem;
    background-color: var(--text-block-bg);

    /* border: 0.6vh solid var(--text-block-outline); */
    border: none;
    min-height: 80vh;
    position: relative;

    font-size: 1.45rem;
    line-height: 2em;
    
    overflow: auto;
    word-break: normal;

    max-width: 40rem;
    margin: 0 auto;
}

.text-block.wide {
    max-width: 90rem;
    margin-left: max(1rem, calc(50% - 90rem/2));
    margin-right: max(1rem, calc(50% - 90rem/2));
}

.text-block p:has(img) {
    text-align: center;
}
.text-block p:has(video) {
    text-align: center;
}
.text-block p:has(img.inline-courier), .text-block p:has(img.inline) {
    text-align: left;
}
.text-block img, .text-block p img {
    max-width: min(100%, 90rem);
}
.text-block video, .text-block p video {
    max-width: min(100%, 90rem);
}

.text-block .block img {
    max-width: none;
}

.text-block p:has(img):not(:has(:not(img, br, video))):not(:has(img.inline-courier)) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}
.text-block p:has(img):not(:has(:not(img, br, video))) img:not(.inline-courier),
.text-block p:has(img):not(:has(:not(img, br, video))) video {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc((100% - 0.5rem * (var(--image-count, 1) - 1)) / var(--image-count, 1));
    object-fit: contain;
}
.text-block p:has(img):not(:has(:not(img, br, video))) img:only-child:not(.inline-courier),
.text-block p:has(img):not(:has(:not(img, br, video))) video:only-child {
    max-width: min(100%, 90rem);
}


.text-block span.courier-image-container,
.text-block p.courier-image-container {
    display: inline-block !important;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    max-width: calc((100% - 0.5rem * (var(--image-count, 1) - 1)) / var(--image-count, 1));
    box-sizing: border-box;
    width: auto;
}
.text-block span.courier-image-container:not(:last-of-type),
.text-block p.courier-image-container:not(:last-of-type) {
    margin-right: 0.5rem;
}
.text-block span.courier-image-container[style*="--image-count: 1"],
.text-block p.courier-image-container[style*="--image-count: 1"] {
    max-width: min(100%, 90rem);
}
.text-block span.courier-image-container img,
.text-block p.courier-image-container img {
    max-width: 100%;
    height: auto;
    width: auto;
    display: block;
}
/* When courier-image-container elements are in a paragraph, make the paragraph use flex */
.text-block p:has(> span.courier-image-container),
.text-block p:has(> p.courier-image-container) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}
.text-block p:has(> span.courier-image-container) > span.courier-image-container,
.text-block p:has(> p.courier-image-container) > p.courier-image-container {
    display: inline-block !important;
    max-width: calc((100% - 0.5rem * (var(--image-count, 1) - 1)) / var(--image-count, 1));
    width: auto;
}
.text-block p:has(> span.courier-image-container) > span.courier-image-container[style*="--image-count: 1"],
.text-block p:has(> p.courier-image-container) > p.courier-image-container[style*="--image-count: 1"] {
    max-width: min(100%, 90rem);
}

.text-block h1, .text-block h2, .text-block h3, .text-block h4, .text-block h5, .text-block details summary {
    color: var(--text-block-caption-color);
    line-height: 2.5rem;
    font-size: 1.75rem;
    font-weight: normal;
    font-family: 'Libertinus Math', serif;
    padding: .75rem 3rem;
    position: relative;
    transition: all 100ms ease;
    text-align: center;
}
.text-block h1:target, .text-block h2:target, .text-block h3:target, .text-block h4:target, .text-block h5:target, .text-block details:target {
    text-shadow: var(--sidebar-trigger) 0px 0px .5em, var(--sidebar-trigger) 0px 0px .5em;
}
.text-block h1:target:before, .text-block h2:target:before, .text-block h3:target:before, .text-block h4:target:before, .text-block h5:target:before, .text-block details:target:before {
    content: '▶';
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .85em;
    color: var(--sidebar-trigger);
}

.text-block h1 {
    line-height: 1.5em;
    font-size: 3.5rem;
    text-transform: none;
    background-color: var(--text-block-caption-bg);
    margin: 1.5rem -3rem 1.75rem -3rem;
}
.text-block h1:first-of-type {
    margin-top: -1.5rem;
}

.text-block h2 {
    background-color: var(--text-block-caption-h2-bg);
    font-size: 2.75rem;
    margin: 1.25rem -3rem;
}

.text-block h3 {
    background-color: var(--text-block-caption-h3-bg);
    margin: .5rem -3rem;
    font-size: 2rem;
    line-height: 1.1em;
}

.text-block h4, .text-block h5 {
    margin: .5rem -3rem;
    font-size: 1.5rem;
    line-height: 1.5em;
    padding: 0.5rem 1.5rem;
}
.text-block h4, .text-block details summary.h4 {
    background-color: var(--text-block-caption-h4-bg);
}
.text-block h5, .text-block details summary.h5 {
    background-color: var(--text-block-caption-h5-bg);
}

.text-block .icon:before {
    content: '';
    display: inline-block;
    background-image: var(--icon-src);
    height: 1.5em;
    width: 1.5em;
    background-position: center center;
    background-size: 100% auto;
    margin-bottom: -.5rem;
    margin-right: .25em
}

.text-block details summary {
    background-color: var(--text-block-caption-h3-bg);
    margin: 0 -2rem 0 -2rem;
}
.text-block details {
    background-color: var(--text-block-caption-h4-bg);
    margin: 1rem -3rem;
    padding: 0 2rem;
    transition: all 0.3s ease-out;
    overflow: hidden;
}
.text-block details[open] {
    padding-bottom: 1rem;
}
.text-block details[open] summary {
    margin-bottom: 1rem;
}
.text-block details::details-content {
    transition: block-size 0.3s ease-out, content-visibility 0.3s ease-out;
    transition-behavior: allow-discrete;
    block-size: 0;
}
.text-block details[open]::details-content {
    block-size: auto;
}

.text-block pre {
    color: var(--text-block-caption-color);
    background-color: var(--text-block-code-bg);
    line-height: 1.5em;
    font-size: 0.85em;
    padding: 1em;
    display: block;
    overflow: auto;
}

.text-block code {
    background-color: var(--text-block-caption-h4-bg);
    border-radius: .25em;
    padding: 0 .25em;
    color: var(--code-text);
    filter: brightness(1.25) contrast(1.25);
}
.text-block pre > code {
    background-color: transparent;
}

.text-block blockquote {
    font-style: italic;
    padding-left: .5em;
    margin: .7em 0;
    border-left: .25em var(--text-block-caption-color) solid;
}

.text-block dl > dd {
    padding-left: 1.25em;
    margin: .7em 0;
    border-left: .1em var(--mp-block-outline-hover) solid;
}

.text-block li:has(input[type=checkbox]) {
    display: block;
}

.text-block li > input[type=checkbox] {
    margin-right: .5em;
    appearance: none;
    font: inherit;
    width: 1.15em;
    height: 1.15em;
    transform: translateY(-0.025em);

    background-color: var(--menu-hover);
    border: .1em var(--menu-link) solid;
    color: var(--menu-link);
    border-radius: 15%;

    display: inline-grid;
    place-content: center;
}

.text-block li > input[type="checkbox"]::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--menu-link);
    transform-origin: bottom left;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.text-block li > input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.text-block .text-bg {
    object-fit: cover;
    width: 100%;

    position: absolute;
    top: 4.2rem;
    left: 0;
    z-index: 1;
    opacity: 0.3;
    transition: all 300ms ease;
    /* -webkit-mask-image:-webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0)));*/
    user-select: none;
}

.text-block p {
    z-index: 2;
    position: relative;
    margin-bottom: 1em;
    min-height: 1em;
    display: block;
    max-width: 100%;
    margin: 1em 0;
    text-align: justify;
}

.text-block a {
    line-break: loose;
    text-decoration: underline dotted;
    text-underline-offset: .25em;
}

.text-block u {
    text-underline-offset: .25em;
}

.text-block li > p {
    margin: 0;
}

.text-block ul {
    z-index: 2;
    position: relative;
    list-style: outside;
    margin-left: 2ch;
    /* list-style-type: '- '; */
}
.text-block ul ul {
    margin-left: 1.5em;
}
.text-block ul li p {
    display: inline-block;
    max-width: calc(100% - 2em);
    vertical-align: top;
}
.text-block ul li::marker {
    font-size: .8em;
}
.text-block ul li[data-list-type]::marker {
    content: attr(data-list-type);
    font-size: 1em;
}
.text-block ul li[data-list-type] {
    padding-inline-start: 1ch;
}

.text-block a {
    color: var(--links-color);
}

.text-block hr {
    background-color: var(--header-bg);
    border: none;
    height: 6rem;
    width: min(24rem, 80vw);
    margin: 2em auto;
    border-radius: 1px;
    mask-image: url('/assets/hr2.png');
    mask-size: cover;
    mask-position: center;
}
.text-block form hr {
    margin-top: .5em;
    margin-bottom: .5em;
}

.text-block p:has(img) + blockquote {
    border-left: none;
    padding: 0;
    text-align: center;
    font-size: 0.85em;
    margin-top: -1.2em;
    margin-bottom: .9em;
    opacity: .7;
}

.text-block mark {
    border-radius: .15em;
    padding: 0 .15em;
}

.text-block table {
    border-collapse: collapse;
    border-spacing: 0;
    max-width: 100%;
    margin: .7em 0;
    display: block;
    overflow: auto;
    line-height: 1.5em;
}
.text-block table td, .text-block table th {
    border: .05em solid var(--mp-block-outline-hover);
    padding: .1em .5em;
}
.text-block table th {
    background-color: var(--text-block-caption-h3-bg);
}
.text-block table tr:hover {
    background-color: var(--table-hover-color);
}

.text-block h1 > img, .text-block h2 > img, .text-block h3 > img, .text-block h4 > img, .text-block h5 > img,
.text-block th > img, .text-block td > img {
    height: 1.5em;
    border-radius: .1em;
    width: auto;
    vertical-align: sub;
    margin-bottom: -0.1em;
}

h1.text-header, h2.text-subheader, h2.text-header {
    color: var(--main-text-color);
    background-color: transparent;
    text-transform: none;
    font-weight: normal;
    font-family: sans-serif;
    padding: 0;
    margin: 0;
}
h1.text-header.center, h2.text-subheader.center, h2.text-header.center {
    text-align: center;
}
h1.text-header {
    margin: .5em 0 !important;
    line-height: 1em;
    font-size: 3.5rem;
}
h2.text-subheader {
    margin: .5em 0 !important;
    line-height: 1em;
    font-size: 1.75rem;
}
h2.text-header {
    margin: .5em 0 !important;
    line-height: 1em;
    font-size: 2rem;
    font-weight: bolder;
}

.center-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 75vh;
    text-align: center;
}

.table .caption {
    color: var(--text-block-caption-color);
    line-height: 1.25em;
    font-size: 1.5rem;
    font-weight: normal;
    font-family: sans-serif;
    padding: .7rem 1.5rem;
    background-color: var(--text-block-caption-h2-bg);
    margin: .75rem 0;
}
.table .line {
    background-color: var(--text-block-caption-code-bg);
    /* padding: 0.5em; */
    overflow: hidden;
    clear: both;
}
.table .line:nth-child(even) {
    background-color: var(--text-block-caption-h3-bg);
}
.table .thead .line {
    background-color: var(--text-block-caption-h2-bg);
}
.table .tbody .line:hover {
    background-color: var(--text-block-caption-h2-bg);
}
.table .cell {
    float: left;
    margin: 0.5em;
    width: calc(20% - 1em);
    line-height: 1.25em;
}
.table .line .cell:last-child {
    width: calc(30% - 1em);
}
.table .line .cell:first-child {
    width: calc(50% - 1em);
}

.list-el {
    margin: 1rem;
    background-color: var(--text-block-bg);
    overflow: hidden;
}
.list-el-img {
    float: left;
    margin: 1rem 0 1rem 1rem;
    width: 25rem;
    height: 15rem;
    justify-content: center;
    display: flex;
    overflow: hidden;
}
.list-el-img img {
    height: 100%;
    width: auto;
}
.list-el-info {
    overflow: hidden;
    padding: 1rem 2rem;
}
.list-el-info .nickname {
    display: block;
    font-size: 3rem;
    font-style: italic;
}
.list-el-info .aka {
    display: block;
    font-size: .8rem;
    line-height: .8rem;
    margin: -0.5em 0 .8em 1em;
    opacity: 0.5;
}
.list-el-info .fullname {
    display: block;
    font-size: 1.5rem;
    line-height: 1.7rem;
    margin: -0.5em 0 .4em 1em;
    opacity: 0.5;
}
.list-el-info .games {
    display: block;
    font-size: 1rem;
    margin: 0 0 1.5vh 0;
    opacity: 0.2;
}
.list-el-info .dota-heroes {
    line-height: 4vh;
}
.list-el-info .dota-heroes img {
    height: 4vh;
    width: auto;
    margin: 0 4px;
}
.list-el-info .dota-pos {
    display: block;
    font-size: 1.2rem;
    line-height: 1.2rem;
    margin: 0 0 1vh 0;
    opacity: 0.5;
}
.list-el-info .links {
    margin-top: 1rem;
    font-size: 1rem;
    line-height: 1rem;
}
.list-el-info .links a {
    background-color: var(--footer-bg);
    color: var(--menu-link);
    padding: 0.4em 0.6em;
    margin: 0 0.3em;
    border-radius: 0.3em;
    transition: all 300ms ease;
    display: inline-block;
}
.list-el-info .links a:hover {
    color: var(--menu-link-active);
}
.list-el-info ul.list {
  list-style-type: none;
  /*margin-left: 1.5vh;*/
  font-size: 2vh;
  line-height: 3.5vh;
}

.fl-blocks-list {
    font-size: 0;
    line-height: 2.5em;
}
.fl-blocks-list .cell {
    padding: 0.25rem;
    font-size: 1.2rem;
    line-height: 1.5em;
}
/*.fl-blocks-list .cell:nth-child(even) {
    background-color: var(--text-block-caption-h3-bg);
}*/
.fl-blocks-list .cell:hover {
    background-color: var(--text-block-caption-h2-bg);
}

img.patron {
    vertical-align: baseline;
    height: 1.1rem;
    width: 1.1rem;
    margin-bottom: -0.2rem;
    object-fit: cover;
}
img.inline-courier {
    vertical-align: middle;
    height: 1.1em;
    width: auto;
}

.dashlist .element {
    box-shadow: 0 0 0 0.2rem var(--mp-block-outline);
    transition: all 300ms ease-in-out;
    overflow: hidden;
    position: relative;
    background: var(--mp-block-bg) no-repeat center center;
    z-index: 0;
}
.dashlist .element:hover {
    box-shadow: 0 0 0 0.2rem var(--mp-block-outline-hover);
}

.dashlist .element a.head {
    display: block;
    padding: 2vh 2vw;
    font-size: 2.5vh;
    line-height: 4vh;
    color: var(--mp-block-link);
    text-shadow: var(--mp-block-link-outline) 0px 0px 0.8vh,
                  var(--mp-block-link-outline) 0px 0px 0.8vh,
                  var(--mp-block-link-outline) 0px 0px 0.8vh;
    margin-left: 33vw;
}
.dashlist .element.big a.head {
    font-size: 3.5vh;
    line-height: 5.5vh;
}
.dashlist .element a.link {
    display: inline-block;
    padding: 1vh 2vw;
    font-size: 2vh;
    line-height: 3vh;
    color: var(--mp-block-link);
    text-shadow: var(--mp-block-link-outline) 0px 0px 0.8vh,
                  var(--mp-block-link-outline) 0px 0px 0.8vh,
                  var(--mp-block-link-outline) 0px 0px 0.8vh;
}
.dashlist .element .links {
    margin-left: 33vw;
}

.dashlist .element p {
    padding: 1vh 2vw;
    font-size: 1.9vh;
    line-height: 3vh;
    opacity: 0.9;
    transition: all 300ms ease;
    margin-left: 33vw;
}

.dashlist .element img {
    object-fit: cover;
    width: 33vw;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 0.9;
    transition: all 300ms ease;
}
.dashlist .element:hover img {
    opacity: 1;
}

/* Selectors */

.custom-selector select, .custom-selector-multiple select {
    display: none;
}
.custom-selector, .custom-selector-multiple {
    color: var(--links-color);
    font-family: inherit;
    font-size: 1.1rem;
    width: 25rem;
    display: inline-block;
    position: relative;
}
.custom-selector .custom-selector-selected, .custom-selector .custom-selector-list, 
.custom-selector-multiple .custom-selector-selected, .custom-selector-multiple .custom-selector-list, .custom-selector-option {
    font-size: inherit;
}
.custom-selector .custom-selector-selected, .custom-selector-multiple .custom-selector-selected, .custom-selector-option {
    padding: .1rem 2rem;
    text-align: left;
    transition: all 150ms linear;
    cursor: pointer;
    background-color: var(--sidebar-widget-bg);
    color: var(--links-color);
}
.custom-selector .custom-selector-selected, .custom-selector-multiple .custom-selector-selected {
    background: var(--text-block-caption-h3-bg);
    color: var(--main-text-color);
    text-align: center;
    transition: all 150ms linear;

    max-width: calc(100% - 4rem);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}
.custom-selector .custom-selector-selected:hover, .custom-selector-multiple .custom-selector-selected:hover {
    background: var(--menu-selected-borders);
}
.custom-selector-option.as-selected {
    background: var(--menu-selected-borders);
    color: var(--link);
}
.custom-selector-multiple .custom-selector-option.as-selected {
    position: relative;
}
.custom-selector-multiple .custom-selector-option.as-selected:before {
    content: '✔';
    height: 100%;
    left: .75rem;
    position: absolute;
}
.custom-selector-option:hover, .custom-selector-option.focused {
    background: var(--menu-selected);
    color: var(--link);
}
.custom-selector .custom-selector-selected:hover, .custom-selector .custom-selector-selected.focused,
.custom-selector-multiple .custom-selector-selected:hover, .custom-selector-multiple .custom-selector-selected.focused {
    filter: brightness(1.3);
}
.custom-selector .custom-selector-selected:after, .custom-selector-multiple .custom-selector-selected:after {
    content: '▼';
    font-size: .8em;
    line-height: 2.25em;
    position: absolute;
    right: 1.2rem;
}
.custom-selector .custom-selector-list, .custom-selector-multiple .custom-selector-list {
    background: var(--mp-block-bg);
    position: absolute;
    margin: 0;
    width: calc(100% - 0.5rem);
    height: 20rem;
    overflow-y: scroll;
    z-index: 1000;
    transform: translateY(-50%) scaleY(0);
    opacity: 0;
    transition: 100ms all linear;
    display: block;
    border: 0.25rem var(--text-block-caption-h4-bg) solid;
    border-top: none;
}
.custom-selector.searchable .custom-selector-list, .custom-selector-multiple.searchable .custom-selector-list {
    margin-top: 2rem;
}
.custom-selector .search-filter-selector {
    position: absolute;
    z-index: 1000;
    display: block;
    opacity: 1;
    transform: translateY(0) scaleY(0);
    transition: 20ms all linear;
}
.custom-selector.select-show .custom-selector-list, .custom-selector.select-show .search-filter-selector,
.custom-selector-multiple.select-show .custom-selector-list, .custom-selector-multiple.select-show .search-filter-selector  {
    display: block;
    top: 100%;
    transform: translateY(0) scaleY(1);
}
.custom-selector.select-show .custom-selector-list, .custom-selector-multiple.select-show .custom-selector-list {
    opacity: 1;
}
.custom-selector.select-show .search-filter-selector:focus, .custom-selector-multiple.select-show .search-filter-selector:focus {
    outline: none;
    filter: brightness(1.3);
}
.custom-selector-option-icon {
    vertical-align: middle;
    margin-top: -0.15em;
    font-size: inherit;
    height: 1.4em;
    min-width: 1rem;
    margin-right: .5rem;
    object-fit: contain;
}
.custom-selector-option.no-icon {
    padding-left: 3rem;
}

.custom-button {
    font-family: inherit;
    font-size: 1.1rem;
    display: inline-block;
    padding: .1rem 1rem;
    background: var(--text-block-caption-h3-bg);
    border: none;
    color: var(--main-text-color);
    text-align: center;
    transition: all 150ms linear;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    line-height: 1.6em;
}
.custom-button:hover {
    background: var(--menu-selected);
}

form.filters {
    display: flex;
    justify-content: space-between;
}

/* search filters */

.search-filter {
    display: block;
    font-size: 1rem;
    line-height: 1.5em;
    padding: .25rem .85rem;
    width: calc(82% - 2px);
    /* width: 100%; */
    /* margin: 1rem auto -.9rem; */
    background: var(--menu-hover);
    color: var(--menu-link);
    font-family: inherit;
    border: none;
}
.search-filter:focus {
    outline: none !important;
    box-shadow: 0 0 0.5rem var(--menu-selected-hover);
}
.search-filter.wide {
    width: calc(98% - 2px);
}
.content-section > .search-filter.wide {
    width: calc(98% - 34px);
}
.search-filter.inside {
    width: calc(100% - 2px);
}
.search-filter-selector {
    font-size: 1rem;
    line-height: 1.5em;
    padding: .25rem .85rem;
    width: 100%;
    margin: 0;
    background: var(--menu-hover);
    color: var(--menu-link);
    font-family: inherit;
    border: none;
}
input[type=search]::-webkit-search-cancel-button {
    filter: brightness(5) drop-shadow(0 0 3px black);
} 

select option.with-icon {
    background-image: var(--local-icon);
    background-position: left;
    margin-left: .5em;
    background-repeat: no-repeat;
    background-size: contain;
    padding-left: 1.5em;
}

.sticker-container {
    width: 30rem;
}
.sticker-container.smaller {
    width: min(40%, 17.5rem);
}
img.sticker {
    width: 100%;
    height: auto;
}

.pg404 p {
    font-size: 1.75em;
    line-height: 2em;
}
.center-links {
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 1em;
    font-size: 0.85em;
}
.center-links.social {
    font-size: 0.75em;
    margin: 0 0 1.5em;
    opacity: .9;
}
.center-links a {
    display: block;
    margin: 0 .5em;
    transition: all 200ms linear;
}
.landing-section a {
    transition: all 200ms linear;
}
.center-links a:hover, .landing-section a:hover {
    filter: drop-shadow(0 0 .5em var(--menu-selected-hover));
}
.landing-section {
    display: flex;
    margin: 1.5rem .75rem 2.5em;
    justify-content: space-evenly;
    font-size: 1.1em;
    line-height: 1.75em;
    align-items: center;
}
.landing-section.right {
    flex-direction: row-reverse;
}

.landing-section .content {
    width: 60%;
}
.landing-section .content hr {
    margin: .75em auto;
}
.landing-section .content .line.footer {
    font-size: .9em;
    mix-blend-mode: soft-light;
}
.landing-section .content .line label {
    font-weight: bold;
}
.landing-section .content .line label:after {
    content: ':';
}
.landing-section .content .line .svg-icon {
    margin-right: .5em;
}
.landing-section .content .line .svg-icon svg {
    width: 1em;
    height: auto;
}

.landing-section.left .content {
    margin-left: 1em;
}
.landing-section.right .content {
    margin-right: 1em;
}

.landing-section .filters {
    justify-content: center;
    align-items: flex-end;
    flex-direction: column;
    max-width: 60%;
}

.landing-section .filters .custom-selector, .landing-section .filters .custom-selector-multiple {
    width: 100%;
    margin-bottom: 0.5rem;
    font-size: 0.75em;
    line-height: 1.8em;
}
.landing-section .filters .custom-button {
    font-size: 0.75em;
    line-height: 1.8em;
}

/* ========================================== FOOTER */

footer {
    display: block;
    line-height: 2em;
    background-color: var(--footer-bg);
    color: var(--footer-color);
    font-size: .8rem;
}
.footer-content {
    padding: .5rem 1rem;
    text-align: right;
    z-index: -3;
}

abbr {
    display: inline-block;
    position: relative;
    cursor: pointer;
}
*[data-tooltip]:before, *[data-tooltip-bottom]:after {
    content: attr(data-tooltip);
}
abbr:before {
    content: attr(title);
}
*[data-tooltip]:before, *[data-tooltip-bottom]:after, abbr:before {
    position: absolute;
    background-color: var(--footer-bg);
    color: var(--menu-link-active);
    opacity: .9;
    padding: 0 .35em;
    border-radius: .5em;
    transform: translateX(-50%) scaleY(0);
    line-height: 2em;
    overflow: hidden;
    transition: 150ms all ease;
    /* white-space: nowrap; */
    /* min-width: 120%; */
    padding: 0 1rem;
    text-align: center;
    white-space: pre;
    z-index: 10;
}
*[data-tooltip]:before, abbr:before {
    bottom: 105%;
    left: 50%;
    font-size: .825rem;
    letter-spacing: -.05em;
    max-width: 120%;
    white-space: pre-line;
    word-break: normal;
    min-width: calc(120% - .6rem);
    padding: .25rem .3rem;
    line-height: 1.5em;
}
*[data-tooltip]:hover:before, *[data-tooltip-bottom]:hover:after, abbr:hover:before, abbr:focus:before {
    transform: translateX(-50%) scaleY(1);
}
abbr:before {
    max-width: 10em;
    min-width: 6em;
}

/* Markdown extensions */

.text-block ol {
    list-style: decimal inside;
}

.img-right-float  {
    float: right;
    height: 18em;
}

.text-block p:has(.donations-demo-shot) {
    float:right;
    margin: 0;
    max-width: 40%;
    z-index: 19;
    display: flex;
    flex-wrap: wrap;
    clear: both;
    justify-content: flex-end;
    overflow: hidden;
}

.donations-demo-shot {
    float: right;
    height: 6em;
    display: flex;
    margin: .25em;
    max-width: 8em;
}

.donations-demo-shot img {
    height: 100%;
    max-width: none;
}

/* modals */

dialog {
    display: block;
    width: auto;
    min-width: 70rem;
    max-width: 90vw;
    background-color: #fff;
    color: #000;
    position: fixed;
    left: 50%;
    top: 50%;
    padding: 1rem;
    transform: translateX(-50%) translateY(-50%) scaleY(0);
    z-index: 100;
    transition: all 200ms linear;
    background-color: var(--header-bg);
    color: var(--main-text-color);
    border: none;
}
dialog[open] {
    transform: translateX(-50%) translateY(-50%) scaleY(1);
}
dialog .modal-header-name {
    font-size: 2rem;
    margin: .5rem 1rem;
}
dialog .modal-content {
    display: flex;
    flex-wrap: nowrap;
    margin-top: 1.5rem;
}
dialog .modal-portrait {
    margin: -4.25% -2% 0 -4%;
    width: 17rem;
}
dialog .modal-container.spell .modal-portrait {
    margin: 0;
    width: 10rem;
}
dialog .modal-portrait img {
    width: 100%;
    height: auto;
}
dialog .modal-text {
    padding-left: .5rem;
    font-size: 1.1rem;
    cursor: default;
    color: var(--text-block-caption-color);
    max-width: 70%;
}
dialog .modal-bottom-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: .5rem 0;
    padding-top: .5rem;
    border-top: .15rem var(--menu-hover) solid;
}
dialog .modal-text a {
    color: var(--links-color);
    cursor: pointer;
}
dialog .modal-text label {
    font-weight: bolder;
    color: var(--main-text-color);
}
dialog .modal-close {
    content: 'X';
    color: var(--main-text-color);
    padding: .3rem .7rem;
    font-size: 1.1rem;
    background-color: var(--big-button-color);
    transition: all 250ms ease;
    float: right;
    border: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
}
dialog .modal-close:before {
    content: '✖';
}
dialog .modal-close:hover {
    background-color: var(--menu-selected-hover);
}
dialog .modal-close.cheesy {

}

dialog::backdrop, .modal-container {
    /* display: none; */
    position: fixed;
    width: 100%;
    height: 100%;
    opacity: 0;
    background-color: #00000088;
    z-index: 99;
    top: 0;
    left: 0;
    transition: all 200ms linear;
    transform: scaleY(0);
}
dialog[open]::backdrop, .modal-container.visible {
    display: block;
    opacity: 1;
    transform: scaleY(1);
}

/* tabs */

.tabbed {
    overflow-x: hidden;
    margin: 1.5rem 0;
    flex: 1;
}
.tabbed [type="radio"] {
	display: none;
}

.tabbed .tabs {
	display: flex;
	align-items: stretch;
	list-style: none;
    padding: .5rem;
	margin-bottom: 1rem;
    justify-content: center;
    background-color: var(--menu-hover);
}
.tab > label {
	display: block;
	padding: .5rem 1rem;
	background: var(--header-bg);
	color: var(--menu-link);
	font-size: 1rem; 
    line-height: 1.5;
	font-weight: 600;
	letter-spacing: 1px;
	cursor: pointer;	
	transition: all 0.3s;
}
.tab:hover label {
	background: var(--menu-hover);
	color: var(--menu-link-active);
}

.tab-content {
	display: none;
}

.tabbed [type="radio"]:nth-of-type(1):checked ~ .tabs .tab:nth-of-type(1) label,
.tabbed [type="radio"]:nth-of-type(2):checked ~ .tabs .tab:nth-of-type(2) label,
.tabbed [type="radio"]:nth-of-type(3):checked ~ .tabs .tab:nth-of-type(3) label,
.tabbed [type="radio"]:nth-of-type(4):checked ~ .tabs .tab:nth-of-type(4) label,
.tabbed [type="radio"]:nth-of-type(5):checked ~ .tabs .tab:nth-of-type(5) label {
	background: var(--menu-selected);
	color: var(--menu-link-active);
}

.tabbed [type="radio"]:nth-of-type(1):checked ~ .tab-content:nth-of-type(1),
.tabbed [type="radio"]:nth-of-type(2):checked ~ .tab-content:nth-of-type(2),
.tabbed [type="radio"]:nth-of-type(3):checked ~ .tab-content:nth-of-type(3),
.tabbed [type="radio"]:nth-of-type(4):checked ~ .tab-content:nth-of-type(4) {
	display: block;
    overflow-x: auto;
}

h1 .anchor-link, h2 .anchor-link, h3 .anchor-link, h4 .anchor-link, h5 .anchor-link, h6 .anchor-link {
    text-decoration: none;
    opacity: 0.05;
    transition: 150ms linear all;
    font-size: .75em;
    vertical-align: bottom;
    display: none;
}
h1 .anchor-link:hover, h2 .anchor-link:hover, h3 .anchor-link:hover, 
h4 .anchor-link:hover, h5 .anchor-link:hover, h6 .anchor-link:hover {
    opacity: .7;
}

.collapsible {
}

.text-block * {
    transition: height 0.3s ease-out, opacity 0.3s ease-out, visibility 0.3s ease-out;
}
.collapsed-by-h1, .collapsed-by-h2, .collapsed-by-h3, .collapsed-by-h4 {
    overflow: hidden;
    height: 0;
    opacity: 0;
    margin: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    /* display: none !important; */
    visibility: hidden;
}

@media screen and (max-width: 780px), (orientation: portrait) {
    html {
        font-size: max(2.5vw, 15px);
    }
    body {
        min-width: 25.5rem;
    }
    #content-wrapper {
        min-width: 25.5rem;
    }
    header {
        height: 4rem;
        display: flex;
        /* overflow: hidden; */
    }
    header .gotomain {
        margin: 0.25rem auto;
        position: relative;
    }
    header .root-link {
        height: 5.35rem;
        line-height: 5.35rem;
        font-size: 2.5rem;
        position: absolute;
        top: -0.35rem;
        left: 5.25rem;
        width: 2.5rem;
    }
    header .header-links {

    }
    ul.menu {
        position: absolute;
        top: 4rem;
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        z-index: 900;
        overflow: hidden;
    }
    ul.menu li {
        margin: 0 2rem;
    }
    .locale-selector select {
        height: 2.5rem;
        margin: 0;
        font-size: .8rem;
        text-align: center;
        width: 6rem;
        float: none;
        position: absolute;
        right: 0.5rem;
        top: 1.25rem;
    }
    #sidebar {

    }
    .showSB {
      position: fixed;
      top: 15rem;
      left: 0;
      right: 0;
      font-size: 1.25rem;
      width: .8rem;
    }
    .sidebar-slide {
        left: -100vw;
        top: 10vh;
        position: fixed;
        z-index: 20;
        padding: 1vw;
        background-color: var(--sidebar-slide-bg);
        width: 94vw;
        height: 88vh;
    }
    .sidebar-slide.active {
      left: 0;
    }
    .sidebar-slide #sidebar {
      width: 92%;
      float: right;
    }
    .block {
        height: 20vh;
    }
    .block.cat-head {
        height: 10vh;
    }
    .block.horizontal.vertical {
        height: 40vh;
    }
    .block.horizontal, .block.vertical, .block.wide {
        height: 30vh;
    }
    .block p {
        position: absolute;
        bottom: 0;
        opacity: 0.7;
        overflow: hidden;
        cursor: pointer;
        height: 5vh;
        padding: 1vh 5%;
        width: 90%;
        z-index: 10;
    }
    .block p:before {
        width: 100%;
        height: 7vh;
        bottom: 0;
        left: 0;
    }
    .block.navblock {
        height: 7vh;
    }
    .alertbox.block.cat-head {
        margin-top: 3rem;
        height: auto;
        width: auto;
    }
    ul.menu li.selected:hover {
    }

    .menu-toggle-button {
        display: flex;
    }
    .menu-toggle ~ ul.menu {
        transform: translateY(-50%) scaleY(0);
        transition: 150ms all linear;
    }
    .menu-toggle:checked ~ ul.menu {
        transform: translateY(0) scaleY(1);
    }

    .alertbox {
        line-height: 2em;
        padding: .25rem .75rem;
    }

    p.image.vertical {
      height: 50vh;
      display: block;
      text-align: center;
    }
    p.image.vertical img {
      height: 100%;
      width: auto;
    }
    p.image.vertical.left {
      float:left;
    }
    
    .dashlist .element {
        height: 25vh;
        margin-bottom: 1vh;
    }
    .dashlist .element.big {
        height: 30vh;
        opacity: 1;
    }
    .dashlist .element p {
        opacity: 0.9;
        overflow: hidden;
        cursor: pointer;
    }
    
    .table-split .table {
        float: none !important;
        width: auto;
    }

    .content-container {
        margin-top: 2em;
    }
    
    .blocks-container, .dashlist {
        display: grid;
        grid-template-columns: 1fr;
        grid-auto-rows: 18rem;
        grid-gap: .75rem .5%;
        grid-auto-flow: dense;
        padding: .75rem .25rem;
    }
    
    .text-block {
        padding: 1rem 1.5rem;
        margin-left: max(1rem, calc(50% - 90rem/2));
        margin-right: max(1rem, calc(50% - 90rem/2));
    }
    
    .text-block.wide {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .text-block p:has(img):not(:has(:not(img, br, video))) img:not(.inline-courier),
    .text-block p:has(img):not(:has(:not(img, br, video))) video {
        max-width: 50%;
    }
    .text-block p:has(img):not(:has(:not(img, br, video))) img:only-child:not(.inline-courier),
    .text-block p:has(img):not(:has(:not(img, br, video))) video:only-child {
        max-width: min(100%, 90rem);
    }
    .text-block span.courier-image-container,
    .text-block p.courier-image-container {
        max-width: 50%;
    }
    .text-block span.courier-image-container[style*="--image-count: 1"],
    .text-block p.courier-image-container[style*="--image-count: 1"] {
        max-width: min(100%, 90rem);
    }
    
    .backlink-container {
        margin-left: 1rem;
    }
    .text-block h1 {
        margin: 1rem -1.5rem 1.75rem -1.5rem;
    }
    .text-block h1:first-of-type {
        margin-top: -1rem;
    }
    .text-block h2 {
        margin: 1rem -1.5rem;
    }
    .text-block h3 {
        margin: 1rem -1.5rem;
    }
    .text-block h4, .text-block h5 {
        margin: .25rem -1.5rem;
    }
    .text-block details summary {
        margin: 0 -1rem 0 -1rem;
    }
    .text-block details {
        margin: 1rem -1.5rem 1rem -1.5rem;
        padding: 0 1rem 0 1rem;
    }
    .text-block h1, .text-block h2, .text-block h3, .text-block h4, .text-block h5, .text-block details summary {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .text-block h1:target:before, .text-block h2:target:before, .text-block h3:target:before, .text-block h4:target:before, .text-block h5:target:before, .text-block details:target:before {
        left: .3rem;
        font-size: .5em;
    }
    .text-block {
        font-size: 1.25em;
        line-height: 2em;
    }

    .text-block p, .text-block blockquote, .text-block ul, .text-block ol {
        margin: 1em 0;
    }

    form.filters {
        justify-content: flex-end;
        flex-wrap: wrap;
    }
    .custom-selector, .custom-selector-multiple {
        width: 100%;
        margin-bottom: .5rem
    }

    .center-container {
        min-height: 80vh;
    }
    .sticker-container {
        width: 20rem;
    }
    
    .pg404 p {
        font-size: 1.25em;
    }

    .landing-section {
        font-size: .9em;
    }

    .list-el-img {
        width: calc(100% - 2rem);
    }

    .modal {
        min-width: 90vw;
        max-height: 95vh;
        overflow-y: scroll;
        padding-bottom: 1rem;
      }
      .modal-controls {
        overflow: hidden;
        margin-bottom: 0.25rem;
      }

    .img-right-float  {
        float: none;
        height: 18em;
    }

    .text-block p:has(.donations-demo-shot) {
        float:none;
        max-width: none;
        justify-content: center;
        overflow: hidden;
        flex-wrap: nowrap;
    }
}


@media screen and (orientation: landscape) and (min-width: 781px) {
    html {
        font-size: max(16px, min(.765vmax, 16px));
        overflow-y: auto;
    }
    body {
        position: fixed;
        overflow-y: scroll;
        width: 100%;
        height: 100%;
    }
    #content-wrapper {
        margin: 4rem auto 2.75rem;
        min-height: 82vh;
        /* overflow: hidden; */
        min-width: 60rem;
        max-width: 140rem;
    }
    #content-wrapper.dashboard {
        max-width: 110rem;
    }
    header {
        height: 4rem;
        overflow: hidden;
        min-width: 60rem;
    }
    header .gotomain {
        margin-left: 3rem;
        position: absolute;
        z-index: 98;
    }
    header .header-links {
        margin-left: 12rem;
        display: block;
        float: left;
        position: relative;
        left: -2.2rem;
    }
    ul.menu {
        height: 4rem;
    }
    ul.menu li {
        display: block;
        float: left;
    }
    ul.menu li a {
        min-width: 8.5rem;
        padding: 0 1.2rem;
    }
    .menu-toggle-button {
        display: none;
    }
    #sidebar {
        width: 24%;
        margin: 0.5%;
        float: left;
        min-height: 70rem;
    }
    .blocks-container, .dashlist {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-auto-rows: 8rem;
        grid-gap: .5vh .5%;
        grid-auto-flow: dense;
        padding: .5vh .5%;
    }
    .block {
        grid-row: span 2;
    }
    .block.right {
      float: right;
    }
    .block.cat-head {
        grid-row: span 1;
        grid-column: span 3;
    }
    .block.vertical {
        grid-row: span 4;
    }
    .block.horizontal {
        grid-column: span 2;
    }
    .block.wide {
        grid-column: span 3;
    }
    .block.navblock {
        grid-row: span 1;
        grid-column: span 3;
    }
    .block:hover p:before {
        bottom: -5rem;
        opacity: 0.8;
    }
    .block.vertical p:before {
        bottom: -10rem;
    }
    .block.vertical:hover p:before {
        opacity: 0.8;
    }
    .block.horizontal p:before {
        height: 18rem;
        transform: skew(0deg, -3deg);
    }
    .block.horizotal:hover p:before {
        opacity: 0.8;
    }

    .block p {
        position: absolute;
        top: 0;
        left: 0;
        max-height: 5rem;
        overflow: hidden;
        cursor: pointer;
        height: 4rem;
        padding: 15rem 1.5rem 0;
        width: 94%;
        z-index: 10;
    }
    .block p:before {
        width: 100%;
        height: 16vh;
        transform: skew(0deg, -3deg);
        bottom: -9vh;
        left: 0;
    }
    .block:hover p {
        opacity: 1;
        padding-top: 14rem;
    }
    .block.horizontal p {
        font-size: 1.5rem;
        max-height: 6rem;
        height: 8rem;
        width:94%;
    }
    .block.horizontal:hover p {
        max-height: 8rem;
    }
    .block.horizontal p:before {
        bottom: -9rem;
    }
    .block.horizontal:hover p:before {
        bottom: -8rem;
    }
    .block.vertical p {
        font-size: 1.5rem;
        max-height: 12rem;
        height: 12rem;
        padding-top: 36rem;
        width:94%;
    }
    .block.vertical:hover p {
        bottom: 0px;
        opacity: 1;
        padding-top: 32rem;
        max-height: 8rem;
    }
    .block.vertical:hover p {
        max-height: 12rem;
    }
    .block.vertical p:before {
        bottom: 2rem;
    }
    .block.horizontal.vertical p:before {
        bottom: -4rem;
    }
    .block.horizontal.vertical:hover p:before {
        bottom: -3rem;
    }
    .text-block, .list-container {
        /* margin: 0 6rem; */
        max-width: 40rem;
        margin-left: auto;
        margin-right: auto;
    }
    .backlink-container {
        max-width: 40rem;
        margin-left: auto;
        margin-right: auto;
    }
    
    
    .block.wide p {
      font-size: 1rem;
      max-height: 8rem;
      height: 10rem;
      width:100%;
    }
    .block.wide:hover p {
      max-height: 10vh;
    }
    .block.wide p:before {
      transform: skew(0deg, -2deg);
      bottom: -6vh;
    }
    .block.wide:hover p:before {
      bottom: -2vh;
    }

    footer {

    }

    p.image.vertical {
      height: 60rem;
      display: block;
    }
    p.image.vertical img {
      height: 100%;
      width: auto;
    }
    p.image.vertical.left {
      float: left;
      margin-right: 2vmin;
    }
    
    .dashlist .element {
        grid-column: span 3;
        grid-row: span 2;
        margin: 1vh 1.5vw;
    }
    .dashlist .element.cat-head {
        height: 11vh;
        margin: 1.5vh 1vw;
        height: 10vh;
    }
    .dashlist .element.big {
        margin: 1vh 0vw;
    }

    .dashlist .element p {
        overflow: hidden;
        cursor: pointer;
    }
    .dashlist .element.big p, .dashlist .element.big .links, .dashlist .element.big .head {
        margin-left: 34vw;
    }
    .dashlist .element:hover p {
        opacity: 1;
    }
    .dashlist .element.big img {
        width: 34vw;
    }
    
    .table-split {
        overflow: hidden;
    }
    .table-split .table {
        float: left;
        width: 49%;
    }
    .table-split .table:last-child {
        float: right;
    }
    
    .fl-blocks-list {
        text-align: center;
    }
    .fl-blocks-list .cell {
        display: inline-block;
        width: 19%;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    .custom-selector, .custom-selector-multiple {
        width: 29%;
    }

    
}

@media screen and (max-width: 450px) and (orientation: portrait) {
    .text-block h1 {
        font-size: 2.5rem;
    }

    .text-block h2 {
        font-size: 2rem;
    }
    
    .text-block p:has(img):not(:has(:not(img, br, video))) img:not(.inline-courier),
    .text-block p:has(img):not(:has(:not(img, br, video))) video {
        max-width: 100%;
    }
    .text-block span.courier-image-container,
    .text-block p.courier-image-container {
        max-width: 100%;
    }
}

@media screen and (min-width: 769px) and (max-width: 1880px) {
    .text-block, .list-container {
        margin: 0 auto;
    }
}

/* Form Styles - Added by ParsedownForm */
.md-form {
    max-width: 40rem;
    margin: 2rem auto;
    padding: 0;
}

.form-field {
    margin-bottom: 1.5rem;
    opacity: 1;
    overflow: hidden;
    transform: translateY(0);
    transition: opacity 0.2s ease, max-height 0.25s ease, transform 0.2s ease, margin-bottom 0.2s ease;
}

.form-field-hidden {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    transform: translateY(-4px);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

/* Text inputs and textareas */
.form-input,
.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: var(--menu-hover);
    border: 0.1em var(--menu-link) solid;
    border-radius: 4px;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    max-width: 100%;
    transition: border-color 0.2s, background-color 0.2s;
    color: var(--menu-link);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--menu-link);
    opacity: 0.5;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--menu-link-active);
    background-color: var(--mulberry-brighter-1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Radio buttons */
.form-radio-group .radio-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-radio-group[data-columns="2"] .radio-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(10rem, 1fr));
}

.form-radio-group[data-columns="3"] .radio-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(9rem, 1fr));
}

.form-radio-group[data-columns="4"] .radio-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(8rem, 1fr));
}

/* Stretch items in incomplete last row */
.form-radio-group .radio-options .radio-option.stretch-last-row {
    grid-column: span var(--stretch-span, 1);
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.2;
    padding: 0.25rem 0;
}

/* Hide radio options when conditionally hidden */
.radio-option.form-field-hidden {
    display: none;
}

.radio-option input[type="radio"] {
    appearance: none;
    margin: 0;
    font: inherit;
    width: 1.15em;
    height: 1.15em;
    border: 0.1em var(--menu-link) solid;
    border-radius: 50%;
    background-color: var(--menu-hover);
    display: grid;
    place-content: center;
    cursor: pointer;
    box-sizing: border-box;
    flex-shrink: 0;
    transition: background-color 0.12s ease-in-out;
}

.radio-option input[type="radio"]::before {
    content: "";
    width: 0.48em;
    height: 0.48em;
    border-radius: 50%;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    background-color: var(--menu-link);
}

.radio-option input[type="radio"]:checked {
    background-color: var(--menu-selected);
}

.radio-option input[type="radio"]:checked::before {
    transform: scale(1);
}

.radio-option label {
    cursor: pointer;
    margin: 0;
    color: var(--text);
    line-height: 1.25;
}

/* Checkboxes */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.5;
    padding: 0.25rem 0;
}

.form-checkbox input[type="checkbox"] {
    margin: 0;
    appearance: none;
    font: inherit;
    width: 1.15em;
    height: 1.15em;
    transform: translateY(-0.025em);
    background-color: var(--menu-hover);
    border: 0.1em var(--menu-link) solid;
    color: var(--menu-link);
    border-radius: 15%;
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.form-checkbox input[type="checkbox"]::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--menu-link);
    transform-origin: bottom left;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.form-checkbox input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.form-checkbox label {
    cursor: pointer;
    margin: 0;
    color: var(--text);
}

/* Submit button */
.form-submit,
.md-form button[type="submit"] {
    background-color: var(--menu-selected);
    color: var(--menu-link-active);
    padding: 0.5rem 1.5rem;
    border: 0.1em var(--menu-link) solid;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, opacity 0.2s ease, transform 0.15s ease;
    font-family: inherit;
}

.form-submit:hover:not(:disabled),
.md-form button[type="submit"]:hover:not(:disabled) {
    background-color: var(--menu-hover);
    border-color: var(--menu-link-active);
}

.form-submit:disabled,
.md-form button[type="submit"]:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: translateY(1px);
}

/* Generic hidden container for template-controlled visibility */
.form-hidden {
    display: none !important;
}

@media screen and (max-width: 768px) {
    .md-form {
        padding: 0;
        margin: 1rem 0;
    }
    
    .form-radio-group .radio-options {
        gap: 0.75rem;
    }
    
    /* Force single column on mobile for radio groups with columns */
    .form-radio-group[data-columns] .radio-options {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
    }
}