/* Theme tweaks*/
@media screen {
  body.tag-hash-dark-essay,
  body.tag-hash-dark-essay #ndc-logo,
  body.tag-hash-dark-essay #spine,
  body.tag-hash-dark-essay #spine .series li .label,
  body.tag-hash-dark-essay #spine .item, 
  body.tag-hash-dark-essay #spine .item.predrop, 
  body.tag-hash-dark-essay #related .signpost-label {
    background: var(--co-text);
  }

  body.tag-hash-dark-essay #document header .signpost-label {
    color: var(--co-high);
    border: 1px solid var(--co-high);
    background: transparent;
  }

  body.tag-hash-dark-essay #document-content,
  body.tag-hash-dark-essay #document-content a,
  body.tag-hash-dark-essay #ndc-logo a,
  body.tag-hash-dark-essay #related,
  body.tag-hash-dark-essay #related .nav-slice-item:hover > a,
  body.tag-hash-dark-essay #related .meta .title,
  body.tag-hash-dark-essay #related .meta .intro,
  body.tag-hash-dark-essay #related .signpost-small,
  body.tag-hash-dark-essay #spine,
  body.tag-hash-dark-essay #spine .series li .label,
  body.tag-hash-dark-essay #spine .item,
  body.tag-hash-dark-essay #spine .tools,
  body.tag-hash-dark-essay #spine .index,
  body.tag-hash-dark-essay #spine .tools .membership,
  body.tag-hash-dark-essay #toc, 
  body.tag-hash-dark-essay #toc-button,
  body.tag-hash-dark-essay #document #toc .contents-header .top,
  body.tag-hash-dark-essay #sidenotes .ndc,
  body.tag-hash-dark-essay #spine .last .item {  
    color: var(--co-high);
    border-color: var(--co-high);
  }
  body.tag-hash-dark-essay #related a {
    color: var(--co-high);

  }
  body.tag-hash-dark-essay #related a:hover,
  body.tag-hash-dark-essay #document-content a:hover {
    color: white;
  }
  
  body.tag-hash-dark-essay #document-content a,
  body.tag-hash-dark-essay #related #follow-us a,
  body.tag-hash-dark-essay #related footer a {
    text-decoration: underline;
  }

  body.tag-hash-dark-essay #document-content hr:after {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjYgMTUiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMyAxSDRWMkg1VjNINlY1SDVWNEg0VjVINVY2SDRWN0g1VjhINFY5SDVWMTBINFYxMUg1VjEySDRWMTNINVYxNEg0SDNIMlYxM0gzVjEySDJWMTFIM1YxMEgyVjlIM1Y4SDJWN0gzVjZIMlY1SDNWNEgyVjVIMVYzSDJWMkgzVjFaTTEgMTBWMTFIMlYxMEgxWk0xIDEwSDBWNUgxVjZIMlY3SDFWOEgyVjlIMVYxMFpNNiAxMEg3VjVINlY2SDVWN0g2VjhINVY5SDZWMTBaTTYgMTBWMTFINVYxMEg2WiIgZmlsbD0iI0YwRjJGNSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE5IDBIMThWMkgxOVYwWk0xNSA1VjZIMTRWOUgxNVYxMFYxMUgxN1YxMkgyMFYxMUgyMlYxMFY5SDIzVjZIMjJWNVY0SDIwVjNIMTdWNEgxNVY1Wk0xNyA0SDIwVjVIMjFWNkgyMlY5SDIxVjEwSDIwVjExSDE3VjEwSDE2VjlIMTVWNkgxNlY1SDE3VjRaTTE4IDEzSDE5VjE1SDE4VjEzWk0yNCA3VjhIMjZWN0gyNFpNMTEgN0gxM1Y4SDExVjdaTTI0IDJIMjNWM0gyNFYyWk0yNCAySDI1VjFIMjRWMlpNMTMgMTNIMTJWMTRIMTNWMTNaTTEzIDEzSDE0VjEySDEzVjEzWk0xMyAxSDEyVjJIMTNWM0gxNFYySDEzVjFaTTI0IDEySDIzVjEzSDI0VjE0SDI1VjEzSDI0VjEyWiIgZmlsbD0iI0YwRjJGNSIvPgo8L3N2Zz4=')
  }

  body.tag-hash-dark-essay #spine .item:hover,
  body.tag-hash-dark-essay #spine .item.membership,
  body.tag-hash-dark-essay #spine .item.predrop .signpost-icon,
  body.tag-hash-dark-essay #spine .item.predrop,
  body.tag-hash-dark-essay #spine ul li .item .actions span, 
  body.tag-hash-dark-essay #spine ul li .item .actions span a {
    color: var(--co-pri) !important;
    background-color: var(--co-high);
  }

  body.tag-hash-dark-essay #sidenotes,
  body.tag-hash-dark-essay #sidenotes a {
    color: var(--co-high);
  }
  body.tag-hash-dark-essay #sidenotes .sidenote {
    filter: grayscale(1)
  }

  body.tag-hash-dark-essay #document article content .footnote-ref, 
  body.tag-hash-dark-essay #document article content .footnote-ref a, 
  body.tag-hash-dark-essay #document article content a[href^="#fn"], 
  body.tag-hash-dark-essay #document article content span.fn {
    color: var(--co-high);
  }

  body.tag-hash-dark-essay #document article content .footnote-ref:hover, 
  body.tag-hash-dark-essay #document article content .footnote-ref a:hover, 
  body.tag-hash-dark-essay #document article content a[href^="#fn"]:hover, 
  body.tag-hash-dark-essay #document article content span.fn:hover {
    color: var(--co-pri);
  }
  body.tag-hash-dark-essay #sidenotes a {
    text-decoration: underline;
  }

  body.tag-hash-dark-essay #sidenotes a:hover {
    color: white
  }
  
  body.tag-hash-effect-glitch #ndc-logo {
    background: transparent
  }
  
  body.tag-hash-effect-glitch #document article header #title {
    mix-blend-mode: normal;
  }
  body.tag-hash-effect-glitch #title h1 {
    text-shadow: 0.06rem 0 0.06rem #ea36af, -0.125rem 0 0.06rem #75fa69;
    animation-duration: 0.02s;
    animation-name: textflicker;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    position: relative;
  }

  body.tag-hash-effect-glitch #title .signpost-label,
  body.tag-hash-effect-glitch > #ndc-logo svg {
    animation-duration: 0.02s;
    animation-name: boxflicker;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    position: relative;
  }

  body.tag-hash-effect-glitch #title h1::after {
    content: attr(data-text);
    position: absolute;
    text-shadow: 0px 0px 20px rgba(255, 255, 255, 0.6) !important;
    overflow: visible;
    top: 0;
    left: 0;
    animation: fudge 1s timing-function delay iteration-count direction fill-mode;
  }

  body.tag-hash-effect-glitch #title .signpost-label,
  body.tag-hash-effect-glitch #title #metadata {
    text-shadow: 0.06rem 0 0.06rem #ea36af, -0.125rem 0 0.06rem #75fa69;
    animation-duration: 0.02s;
    animation-name: textflicker-small;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    position: relative;
  }

  body.tag-hash-effect-glitch #document .signpost-small,
  body.tag-hash-effect-glitch > #ndc-logo svg {
    filter: drop-shadow(0.06rem 0 0.06rem #ea36af) drop-shadow(-0.125rem 0 0.06rem #75fa69);
  }
  body.tag-hash-effect-glitch #document article header #backdrop { 
    top: calc(0px - var(--ma-reg));
    left: calc(0px - var(--ma-reg));
    right: calc(0px - var(--ma-reg));
  }

  body.tag-hash-effect-glitch #backdrop .dither {
    overflow: hidden;
  }
  
  body.tag-hash-effect-glitch #backdrop .dither::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(to bottom, #0266e64f 0%, rgba(1, 2, 2, 0.2) 0.5%, #371b1b00 1%);
    animation: fudge 7s ease-in-out alternate infinite;
    overflow: hidden;
    mix-blend-mode: color-dodge;
  }

  @keyframes boxflicker {
    from {
      filter: drop-shadow(0.2px 0 0 #ea36af) drop-shadow(-0.2px 0 0 #75fa69) drop-shadow(0px 0px 1px rgba(255, 255, 255, 0.25));
    }
    to {
      filter: drop-shadow(0.5px 0.5px 1px #ea36af) drop-shadow(-0.25px -0.25px 0.02px #75fa69) drop-shadow(0px 0px 15px rgba(255, 255, 255, 0.05));
    }
  }

  @keyframes textflicker {
    from {
      text-shadow: 1px 0 0 #ea36af, -2px 0 0 #75fa69;
    }
    to {
      text-shadow: 2px 0.5px 2px #ea36af, -1px -0.5px 2px #75fa69;
    }
  }

  @keyframes textflicker-small {
    from {
      text-shadow: 0.5px 0 0 #ea36af, -1px 0 0 #75fa69, 0px 0px 15px rgba(255, 255, 255, 0.35);
    }
    to {
      text-shadow: 1px 0.5px 2px #ea36af, -0.5px -0.5px 2px #75fa69, 0px 0px 15px rgba(255, 255, 255, 0.45);
    }
  }

  @keyframes fudge {
    from {
      transform: translate(0px, 0px);
    }
    to {
      transform: translate(0px, 2%);
    }
  }
}