html {
  color: #000;
  background-color: black;
  height: 100%;
}

body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td {
  margin: 0;
  padding: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

fieldset, img {
  border: 0;
}

li {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-size: 100%;
  font-weight: normal;
}

abbr, acronym {
  border: 0;
  font-variant: normal;
}

input, button, textarea, select, optgroup, option {
  font-family: inherit;
  font-size: inherit;
  font-style: inherit;
  font-weight: inherit;
}

input, button, textarea, select {
  *font-size: 100%;
}

body {
    padding: 0 2% 1% 2%;
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media (min-width: 675px) {
    body {
        padding: 0 1% 1% 1%;
    }
}

.content {
  flex: 1 0 auto;
}
#footer {
  flex-shrink: 0;
}

@media (min-width: 560px) {
  .very-narrow-only {
    display: none;
  }
}

@media (min-width: 768px) {
  .narrow-only {
    display: none;
  }
}

@media (max-width: 767px) {
  .non-narrow-only {
    display: none;
  }
}

body #not-working {
  background-color: #444;
  position: fixed;
  top: 0;
  left: 0;
  height: 5px;
  width: 100%;
  z-index: 999;
}
body.working #not-working {
  background-color: black;
}
body.working #working {
  opacity: 1;
  z-index: 1000;
}

body #working {
  opacity: 0;
  background: repeating-linear-gradient(to right,
  yellow,
  yellow 2px,
  white 2px,
  white 4px
  );
background: yellow;
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  transition: width 100ms, opacity 300ms;
}

#about {
  text-align: left;
}

#about h2 {
  padding-top: 10px;
}

#about p {
    margin-top: 10px;
    margin-left: 0;
    color: #eee;
    font: small/20px courier, monospace;
    margin-bottom: 20px;
    text-align: justify;
}

@media (min-height: 700px) {
  #about {
    margin-top: calc(50vh - 20em);
    margin-bottom: calc(50vh - 20em);
  }
}

@media (min-width: 1080px) {
    #about {
      margin-top: 2em;
      margin-bottom: 2em;
    }

  #about p {
    font: medium/40px courier, monospace;
  }
}


#about a, #about a:visited, #about a:link {
  color: #aaa;
  text-decoration: none;
  border: 1px solid #777;
  border-radius: 3px;
  padding: 2px 4px;
}

#about a:hover, #about a:active {
  color: yellow;
  border-color: yellow;
}

#footer {
}

#footer > p {
  color: #eee;
  font: xx-small/20px courier, monospace;
  margin-bottom: 20px;
  text-align: justify;
}

#footer > p.description {
  font: small/20px courier, monospace;
}

#footer a, #footer a:visited, #footer a:link {
  color: white;
  text-decoration: none;
}

#footer a:hover, #footer a:active {
  color: yellow;
  text-decoration: underline;
}

@media (min-width: 1080px) {
  #footer {
    margin-top: 2em;
    margin-bottom: 2em;
  }

  #footer p {
    font: medium/40px courier, monospace;
  }
}


h2 {
  font: normal 21px ImpactLabelReversedRegular, verdana;
}

h2 a {
  color: #68f;
  text-decoration: none;
}

ul {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(75px, auto));
}

ul>li.score-1 {
  order: 0
}
ul>li.score-2 {
  order: 1
}
ul>li.score-3 {
  order: 2;
}
ul li.error {
  grid-row: 1;
  column-span: all;
  order: 3;
  text-align: center;
  font-size: large;
  color: yellow;
  font-family: courier, monospace;
  margin: 5ex 5px;
}
ul>li.show-more {
  order: 4;
  grid-column: 1/-1;
}

ul li {
    background-color: #111;
    margin: -1px 0 0 -1px;
    padding: 0;
    position: relative;
  cursor: pointer;
}

ul li.selected {
  cursor: zoom-in;
}

ul li div {
    border: 1px solid #333;
    padding: 5px;
    text-align: center;
    height: 71px;
    overflow: hidden;
    text-overflow: ellipsis;
}

ul li span {
  display: none;
  font-size: small;
  color: #999;
}

samp {
  margin: 0;
  padding: 0;
  background-color: #ccc;
  border: 1px solid #333;
  font-size: 50px;
  color: #333;
  display: block;
  line-height: 1.4;
  min-height: 70px;
  box-shadow: 2px 2px 5px #999 inset;
}

ul li:not(.show-more):not(.error).selected {
  pointer-events:none;
}
ul li:not(.show-more):not(.error).selected:before {
  position: absolute;
  top: 9px;
  right: 11px;
  content: "\0029c9";
  color: #6688ff;
  font-family: sans-serif;
  font-size: 19px;
  cursor: copy;
  pointer-events: auto;
  z-index: 100;
}

ul li:not(.show-more):not(.error) samp {
  cursor: pointer;
}
ul:focus li:not(.show-more):not(.error) samp {
  cursor: copy;
}

@media (min-width: 720px) {
  u.li.selected:before {
    font-size: 22px;
  }
}
@media (min-width: 900px) {
  u.li.selected:before {
    font-size: 26px;
  }
}

@media (min-width: 720px) {
  ul li:not(.show-more):not(.error).selected > div:after {
    position: absolute;
    bottom: 0;
    right: 6px;
    content: "ⓘ";
    font-family: sans-serif;
    font-size: 21px;
    pointer-events: auto;
    background-color: #6688ff;
    background: radial-gradient(circle at center, #6688ff 0, #6688ff 50%, transparent 80%);
    color: white;
    padding: 2px;
    cursor: zoom-in;
  }

  ul:focus li:not(.show-more):not(.error).selected {
    cursor: zoom-in;
  }
}


ul li.selected > div {
  pointer-events:auto;
}


@media (min-width: 600px) {
  ul {
    grid-template-columns: repeat(auto-fill,minmax(100px, auto))
  }

  ul li div {
    height: 100px;
  }

  ul li span.num {
    padding-top: 5px;
    font-family: courier, sans-serif;
    font-weight: bold;
    /*display: block;*/
  }

  ul li:hover span {
    color: white;
  }

  ul li span.num.seq {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    padding-left: 10px;
    padding-right: 5px;
  }

}

@media (min-width: 720px) {
  ul {
    grid-template-columns: repeat(auto-fill,minmax(110px, auto))
  }
  ul li div {
    height: 150px;
  }
  ul li span.desc {
    display: none;
  }
  ul li span.desc.d1 {
    font-style: italic;
    display: block;
  }
  ul>li.show-more {
    grid-column: auto;
  }
}


@media (min-width:900px) {
  ul li div {
    height: 155px;
  }
  ul li span.num {
    font-size: medium;
  }
}

@media (min-width:1050px) {
  ul li div {
    height: 160px;
  }
}

ul li.selected > div {
  position: relative;
  background-color: #68f;
  color: #fff;
  border-color: #999;
}

ul li.selected > div samp,
ul li:hover > div samp {
    background-color: #fff;
    color: #000;
}

ul li.selected span {
    color: #fff;
}

.show-more {
  padding: 10px;
  text-align: center;
  font-family: courier, monospace;
  color: gray;
  background-color: #181818;
}
.show-more:hover {
    color: white;
    background-color: #333;
}

@media (max-width: 600px) {
  .hide-on-narrow {
    display: none;
  }
}

#modal.character-size span.desc:hover {
  cursor: pointer;
  text-decoration: underline;
}

#modal.character-size samp {
  cursor: copy;
  font-size: 100px;
  background-color: white;
  text-align: center;
  line-height: 1.2;
  border: 2px solid #333;
  box-shadow: 2px 2px 5px #999 inset;
  padding-bottom: 0;
}

#modal.character-size div span {
  font-size: medium;
  color: white;
  text-align: center;
  font-style: italic;
}

#modal.character-size div span.desc {
  display: inline-block;
  opacity: 0.7;
  padding: 0 0 5px 0;
}
#modal.character-size div span.desc.code {
  font-family: courier, monospace;
  font-size: 121%;
  font-style: normal;
}
#modal.character-size div span.desc:after {
  content: ',';
  padding: 0 4px 0 0;
  opacity: 0.5;
}
#modal.character-size div span.desc.code:after {
  margin-left: -5px;
}


#modal.character-size div span.desc:last-child {
  background-color: #68f;
  position: absolute;
  opacity: 0.5;
  bottom: -5px;
  right: 30px;
  left: 30px;
}

#modal.character-size div span.desc:last-child:after,
#modal.character-size div span.desc:nth-last-child(2):after,
#modal.character-size div span.desc.d1:after {
  content: '';
  padding: 0;
}



#modal.character-size div span.d1 {
  font-size: x-large;
  text-align: center;
  display: block;
  opacity: 1;
}

#modal.character-size div span.num {
  font-family: courier, monospace;
  font-style: normal;
  cursor: copy;
}

@media (min-width: 600px) and (min-height: 480px) {
  #modal.character-size samp {
    font-size: 126px;
    line-height: 180px;
    border: 4px solid #333;
    box-shadow: 4px 4px 5px #999 inset;
  }
  #modal.character-size div span {
    font-size: xx-large;
  }

  #modal.character-size div span.desc {
    font-size: x-large;
  }

  #modal.character-size div span.desc.d1 {
    font-size: xx-large;
  }

}

@media (min-width: 900px) and (min-height: 480px) {
  #modal.character-size samp {
    margin: 0 -10px;
  }
  #modal.character-size article>div {
    padding: 0 10px;
  }
  #modal.character-size div span.desc:last-child {
    bottom: 0;
    right: 35px;
    left: 35px;
  }

}

.floating-confirmation {
  position: absolute;
  z-index: 9999;
  color: cornflowerblue;
  background-color: lightyellow;
  font-family: verdana, serif;
  text-align: center;
  vertical-align: middle;
  display: table-cell;
  box-sizing: border-box;
  border: 1px solid black;
  cursor: copy; /* while displayed, will be "wait" below. This is the normal cursor */
}

.floating-confirmation:not(.fade-out) {
  cursor: wait;
}

.floating-confirmation.fade-out {
  transition-property: opacity;
  transition-duration: 1000ms;
  transition-timing-function: ease-out;
  opacity: 0;
}


/* https://www.filamentgroup.com/lab/select-css.html */
.select-css {
  display: block;
  font-size: 16px;
  font-family: courier, monospace;
  font-weight: 700;
  color: #bbb;
  line-height: 1.3;
  padding: .6em 1.4em .5em .8em;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid #aaa;
  box-shadow: 0 1px 0 1px rgba(0,0,0,.96);
  border-radius: .5em;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  background-color: #000;
  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%23007CB2%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, #000 0%,#1a1a1a 100%);
  background-repeat: no-repeat, repeat;
  background-position: right .7em top 50%, 0 0;
  background-size: .65em auto, 100%;
}

.select-css::-ms-expand {
  display: none;
}
.select-css:hover {
  border-color: #888;
}
.select-css:focus {
  border-color: #555;
  box-shadow: 0 0 1px 3px rgba(59, 153, 252, .3);
  box-shadow: 0 0 0 3px -moz-mac-focusring;
  color: #bbb;
  outline: none;
}
.select-css option {
  font-weight:normal;
}

span.num {
  display: none;
}

@media (min-width: 600px) {
  body.unicode span.num.unicode,
  body.html-decimal span.num.html-decimal,
  body.html-decimal span.num.html-entity,
  body.html-decimal .no-ref ~ span.num.unicode,
  body.html-hex span.num.html-hex,
  body.html-hex span.num.html-entity,
  body.html-hex .no-ref ~ span.num.unicode,
  body.json span.num.json,
  body.css span.num.css,
  body.url span.num.url {
    display: block;
  }
}


@keyframes fadeIn {
  0% {opacity:0;}
  75% {opacity:0;}
  100% {opacity:1;}
}

#splash {
  display: none;
}
body:not(.working) ul#results:empty + #splash {
  animation: fadeIn ease 4s;
  display: block;
}
#splash p {
  background-color: inherit;
  font-family: courier;
  color: white;
  font-size: large;
  line-height: 1.1;
  padding: 0 5px 0 5px;
  margin-top: 10px;
}
#splash p:first-child {
  color: yellow;
  font-size: x-large;
  padding: .5ex 5px .5ex 5px;
  max-width: 680px;
}
@media (min-width: 500px) {
  #splash p:first-child {
    line-height: 1.3;
  }
}
@media (min-width: 700px) {
  #splash p:first-child {
    line-height: 1.5;
  }
}
#splash p.note {
  color: #ccc;
  font-size: small;
  padding: 0 0 3ex 3em
}


@media (max-width: 767px) {
  #load-full-container {
    display: none;
  }
}

#results:empty ~ #about {
  display: none;
}

@keyframes fade-in {
  0% {
    opacity: 0.001;
  }
  99.9% {
    opacity: 1.0;
  }
  100% {
    opacity: inherit;
  }
}

@keyframes fade-out {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}


#head {
  background-color: black;
  font-size: xx-large;
  animation: fade-in ease .3s;
  display: grid;
  grid-template-columns: 1fr 5ex;
  grid-gap: 10px;
  margin-bottom: 10px;
}

#head > a {
  color: inherit;
  text-decoration: none;
}

#logo {
  grid-column-start: 1;
  grid-column-end: 3;
  grid-row: 1;
}

#q {
  grid-column-start: 1;
  grid-column-end: 3;
  grid-row: 2;
}

#change-mode {
  display: none;
  grid-column-start: 2;
  grid-column-end: 3;
  grid-row: 2;
}

#hints {
  grid-column-start: 1;
  grid-column-end: 3;
  grid-row: 3;
  overflow: hidden;
  white-space: nowrap;
}

body._pinnedToTop ul {
  margin-top: 156px;
}

@media (min-width: 560px) {
  #q {
    grid-column-start: 1;
    grid-column-end: 2;
  }

  #change-mode {
    display: inline-block;
  }
}

@media (min-width: 750px) {
  body._pinnedToTop ul {
    margin-top: 146px;
  }
}

@media (min-width: 980px) {
  body._pinnedToTop ul {
    margin-top: 91px;
  }

  #head {
    grid-template-columns: 450px 1fr 5ex;
    grid-template-rows: 44px 1fr 1fr;
  }

  #logo {
    grid-column-start: 1;
    grid-column-end: 2;
    grid-row-start: 1;
    grid-row-end: 3;
  }

  #q {
    grid-row-start: 2;
    grid-row-end: 3;
    grid-column-start: 2;
    grid-column-end: 3;
  }

  #change-mode {
    grid-row-start: 2;
    grid-row-end: 3;
    grid-column-start: 3;
    grid-column-end: 4;
  }

  #hints {
    grid-row: 3;
    grid-column-start: 1;
    grid-column-end: 4;
  }
}

@media (min-width: 100px) {

  body._pinnedToTop #head {
    grid-template-columns: minmax(200px, auto) 230px;
    grid-template-rows: 1fr;
    padding-top: 10px;
    padding-bottom: 10px;
    z-index: 1;
  }

  body._pinnedToTop #logo {
    grid-row-start: 1;
    grid-row-end: 1;
    grid-column-start: 2;
    grid-column-end: 3;
    text-align: right;
  }

  body._pinnedToTop #q {
    grid-row: 1;
    grid-column-start: 1;
    grid-column-end: 2;
  }

  body._pinnedToTop #change-mode,
  body._pinnedToTop #hints {
    display: none;
  }
}

#head._moving {
  opacity: 0;
  animation: fade-out ease .2s;
}

#head:not(._moving) {
  opacity: inherit;
}

#head._pinnedToTop {
  animation: fade-in ease .3s
}

#head h1 {
  color: #555;
  font: 26vw/21vw courier, monospace;
  margin: 0;
  padding: 0;
  max-width: 500px;
}

@media (min-width: 400px) {
  #head h1 {
    font-size: 100px;
    line-height: 110px;
    margin-top: -10px;
  }
}

#head._pinnedToTop h1 {
  display: inline-block;
  font: 6vw courier, monospace;
  color: #aaa;
  margin-bottom: -3px;
}

@media (min-width: 600px) {
  #head._pinnedToTop h1 {
    font-size: 36px;
  }
}

#head h2 {
  display: none;
  animation-duration: 3s;
  animation-timing-function: ease-in;
  animation-iteration-count: 1;
  animation-name: fade-in;
}

@media (min-width: 400px) {
  #head h2 {
    display: block;
    margin-left: 7px;
    margin-top: -21px;
    color: #aaa;
    font: 22px/22px ImpactLabelReversedRegular, verdana;
    max-width: 500px;
  }

  #head._pinnedToTop h2 {
    display: none;
  }
}

#head input {
  background-color: #333333;
  color: #FFFFFF;
  font: xx-large/1.4 courier, monospace;
  padding: 0 8px;
  border: none;
}

#head input:focus,
#head select:focus {
  outline-color: yellow;
}

#head select {
  width: 11ex;
}

#head > p {
  font: medium courier, monospace;
  padding: 10px 2px 0 0;
  color: #999;
}

#head p a,
#head p a:link,
#head p a:visited,
#head p a:active {
  position: relative;
  display: inline-block;
  color: #ccc;
  text-decoration: none;
  line-height: 1.4;
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  background-clip: content-box;
  transition: transform 0.3s ease, border 0.2s ease;
  text-align: center;
  margin: 0 -8px 3px -8px;
}
#head p a:first-child,
#head p a:link:first-child,
#head p a:visited:first-child,
#head p a:active:first-child {
  width: auto;
  padding: 0 2px;
  margin-right: 0;
  border-radius: 2px;
  margin-left: 5px;
}

#head p a:hover {
  background-color: #000;
  color: white;
  border: 2px solid white;
  transform: scale(1.2);
  z-index: 1000;
}

#head p a:hover:first-child {
  transform: inherit;
}


@media (min-width: 750px) {

  #head._pinnedToTop h2 {
    display: block;
    margin-top: 3px;
    font: 14px/14px ImpactLabelReversedRegular, verdana;
  }

  #head._pinnedToTop input {
    width: 66vw;
  }

}

@media (min-width: 1140px) {
  #head h1 {
    color: #fff;
  }
}


html body.article,
article {
  background-color: #553
}

body.article {
  margin: 0;
}

article {
  color: navajowhite;
  margin: 20px auto 20px 20px;
  max-width: 700px;
  font-family: 'Lora', serif;
  font-weight: 400;
  margin-top: 0;
}

.article article {
  padding-top: 50px;
}

article dt, article dd {
  position: relative;
}

article dt {
  font-style: italic;
  width: 30%;
  margin-left: 0;
  top: 0;
}

article dd {
  top: -24px;
  width: 60%;
  margin-bottom: -18px;
  margin-left: 30%;
}

article h1,
article h2 {
  font: normal 35px ImpactLabelReversedRegular, verdana;
  background-color: black;
  color: navajowhite;
  padding: 5px 30px 3px 20px;
  margin: 20px 0 16px -20px;
  width: 92%;
}

article h1 {
  /* letter-spacing: 5px; */
  background-color: transparent;
  padding: 0 20px;
  margin: 17px 0 0 -20px;
}

article ol li {
  display: list-item;
  list-style: disc;
  list-style-position: inside;
  font-style: italic;
}

article a:link,
article a:visited {
  /*text-decoration: none;*/
  /*white-space: nowrap;*/
  color: navajowhite;
  font-weight: 800;
  font-style: normal;
  text-decoration-color: #FFDEAD50;
}

article a:hover,
article a:active {
  color: white;
}

article li a {
  font-family: courier, monospace;
  font-weight: 400;
}

article p {
  font-style: italic;
}


#back {
  display: inline-block;
  padding: 10px;
  position: absolute;
  top: 0;
  right: 0;
  font-size: 72px;
  text-decoration: none;
}

#modal {
  box-sizing: content-box;
  background-color: transparent;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  padding: 20px;
}

#modal.character-size {
  height: 320px;
  width: 300px;
}

@media (min-width: 600px) and (min-height: 480px) {
  #modal.character-size {
    height: 500px;
    width: 400px;
  }
}

#modal-scroll {
  background-color: #68f;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 15px;
  max-width: 783px;
  height: 100%;
  max-height: 90vh;
  width: 100%;
}

#modal article {
  padding: 15px;
  background-color: #68f;
  margin: -15px 0 0 0
}

#modal:empty {
  display: none;
}

#modal-mask {
  opacity: 0.7;
  background-color: black;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
}

#modal-close {
  font-size: 72px;
  display: block;
  text-decoration: none;
  color: navajowhite;
  cursor: pointer;
  opacity: 0.1;
  position: absolute;
  top: 0;
  right: -25px;
}

#modal-close > div {
  position: absolute;
  right: 0;
  top: 0;
  background-color: #68f;
  color: white;
  border-radius: 20px;
  line-height: 34px;
  width: 40px;
  height: 40px;
  font-size: 35px;
  font-family: verdana;
  text-align: center;
}

#modal:hover #modal-close {
  opacity: 1;
}

#modal:empty ~ #modal-mask {
  display: none !important;
}



