/* Emerald Valley Library - Interactive Mathematics, generated by Mathigon Studio */
x-enigma {
  display: block;
}
x-enigma .enigma {
  background-color: #333;
  border-radius: 8px;
  text-align: center;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  padding: 20px;
}
x-enigma .keyboard, x-enigma .lightboard {
  margin: 16px 0;
}
x-enigma .keyboard .key, x-enigma .lightboard .key {
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: 17px;
  background: grey;
  margin: 10px;
  color: #ddd;
}
x-enigma .keyboard .key.glowing, x-enigma .lightboard .key.glowing {
  background: yellow;
  color: #333;
}
x-enigma .keyboard .key {
  border: solid #aaa 2px;
  background: #555;
}
x-enigma .lightboard .key {
  border: solid #222 2px;
  background: #333;
}
x-enigma .plugboard svg {
  display: block;
  margin: 0 auto;
  overflow: visible;
}
x-enigma .plugboard .plug {
  stroke: grey;
  stroke-width: 3px;
  fill: black;
}
x-enigma .plugboard .plug:hover {
  stroke: white;
}
x-enigma .plugboard .plug.active {
  fill: red;
}
x-enigma .plugboard .cables {
  pointer-events: none;
}
x-enigma .plugboard .cables path {
  stroke: rgba(255, 0, 0, 0.5);
  stroke-width: 5px;
  stroke-linecap: round;
  fill: none;
}
x-enigma .rotor {
  position: relative;
  border: black solid 1pt;
  padding: 2pt;
  height: 40px;
  width: 20px;
}
x-enigma .rotors {
  border: black solid 1pt;
  display: block;
  padding: 0;
  text-align: center;
  line-height: 33px;
  margin: 5px auto 0 auto;
  width: 115px;
  background-color: #333;
  -webkit-user-select: none;
  -moz-user-select: none;
       user-select: none;
}
x-enigma .rotorctl {
  width: 100%;
  background: #333;
  color: #ddd;
  font-size: 14pt;
  cursor: default;
}
x-enigma .rotorshow {
  width: 100%;
  color: #222222;
  font-size: 18pt;
  text-shadow: 0 1px #AAAAAA;
  background: linear-gradient(0deg, rgb(140, 140, 140) 0%, rgb(216, 216, 216) 31%, rgb(255, 255, 255) 50%, rgb(212, 212, 212) 67%, rgb(140, 140, 140) 100%);
}
x-enigma .rotors span {
  width: 37px;
  display: inline-block;
  border-right: black solid 1pt;
}

x-enigma-rotors {
  display: block;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
x-enigma-rotors svg {
  display: block;
  margin: 0 auto;
}
x-enigma-rotors text {
  text-anchor: middle;
  alignment-baseline: middle;
}
x-enigma-rotors .label {
  font-size: 14px;
  font-weight: 600;
  fill: #656073;
}
x-enigma-rotors .keyboard circle {
  fill: #3a3645;
  cursor: pointer;
  transition: fill 0.2s;
}
x-enigma-rotors .keyboard circle:hover {
  fill: #656073;
}
x-enigma-rotors .keyboard circle.in {
  fill: #0f82f2;
}
x-enigma-rotors .keyboard circle.out {
  fill: #fd8c00;
}
x-enigma-rotors .keyboard text {
  fill: white;
  font-size: 12px;
  pointer-events: none;
}
x-enigma-rotors .connections {
  opacity: 0.2;
}
x-enigma-rotors .connections line, x-enigma-rotors .connections path {
  fill: none;
  stroke: black;
}
x-enigma-rotors .overlay path {
  fill: none;
  stroke-width: 4px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

x-code-box {
  display: flex;
  margin: 1.5em 0;
  flex-wrap: wrap;
}
x-code-box .input, x-code-box .output {
  width: 180px;
  flex-grow: 1;
  background: #f5f5f6;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: black;
  line-height: 1.4em;
  padding: 10px 16px;
  transition: background 0.2s, border 0.2s, box-shadow 0.2s;
}
x-code-box .input {
  margin-right: -1px;
  border-radius: 6px 0 0 6px;
}
x-code-box .output {
  border-radius: 0 6px 6px 0;
}
@media screen and (max-width: 474px) {
  x-code-box .input {
    margin: 0 0 -1px;
    border-radius: 6px 6px 0 0;
  }
  x-code-box .output {
    border-radius: 0 0 6px 6px;
  }
}
x-code-box [contenteditable] {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  height: auto;
  cursor: text;
  z-index: 1;
}
x-code-box [contenteditable]:hover, x-code-box [contenteditable]:focus {
  z-index: 2;
  border-color: #0f82f2;
  background-color: #eee;
}
x-code-box [contenteditable]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 130, 242, 0.5);
}
x-code-box .letter:hover, x-code-box .letter.hover {
  cursor: crosshair;
  background: rgba(15, 130, 242, 0.5);
  padding: 0 3px;
  margin: 0 -3px;
  border-radius: 4px;
}

.window {
  cursor: pointer;
  margin-top: -6px !important;
}
.window .flash {
  position: absolute;
  top: 60px;
  left: 34px;
  opacity: 0;
  transition: opacity 0.2s;
}
.window.pressed .flash {
  opacity: 1;
}

@keyframes electrons {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: 12px;
  }
}
.telegraph {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}
.telegraph .handle, .telegraph .fg, .telegraph svg {
  position: absolute;
  top: 0;
  left: 0;
}
.telegraph .handle {
  transition: transform 0.2s;
  transform-origin: 115px 75px;
}
.telegraph path {
  transition: opacity 0.2s;
  opacity: 0;
  stroke-width: 6px;
  stroke: #cd0e66;
  stroke-dasharray: 0 12px;
  fill: none;
  stroke-linecap: round;
  animation: electrons infinite 0.5s linear;
}
.telegraph.pressed .handle {
  transform: rotate(3.6deg);
}
.telegraph.pressed path {
  opacity: 1;
}

.satellites {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}
.satellites .sat, .satellites .atm, .satellites .bits, .satellites svg {
  position: absolute;
  top: 0;
  left: 0;
}
.satellites .bits {
  transform: scale(0.625, 0.6306306306);
}
.satellites line {
  transition: opacity 0.2s;
  opacity: 0;
  stroke-width: 6px;
  stroke: #cd0e66;
  stroke-dasharray: 0 12px;
  fill: none;
  stroke-linecap: round;
  animation: electrons infinite 0.5s linear;
}
.satellites.pressed line {
  opacity: 1;
}

.alphabet {
  -moz-column-count: 4;
       column-count: 4;
  margin: 1.5em 24px;
  line-height: 1.4;
}
.alphabet strong {
  display: inline-block;
  width: 30px;
}
@media (max-width: 660px) {
  .alphabet {
    -moz-column-count: 3;
         column-count: 3;
  }
}
@media (max-width: 480px) {
  .alphabet {
    -moz-column-count: 2;
         column-count: 2;
  }
}

.radio-play {
  position: absolute;
  width: 40px;
  height: 40px;
  top: 162px;
  left: 142px;
  transition: transform 0.2s, box-shadow 0.2s;
  background: url(/content/codes/images/radio-play.png);
  background-size: 40px 40px;
  cursor: pointer;
  border-radius: 20px;
}
.radio-play:hover {
  transform: scale(1.16);
  box-shadow: 0 0 10px #cd0e66;
}
.radio-play:active {
  transform: scale(1.06);
}
.radio-play.playing {
  background-image: url(/content/codes/images/radio-pause.png);
}

.flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.5em 0;
}
.flags > div {
  width: 90px;
  margin: 5px;
}
.flags img {
  display: block;
  margin: 0 auto;
}
.flags strong {
  display: block;
  text-align: center;
  color: #333;
}

x-morse .dot, x-morse .dash, .morse .dot, .morse .dash {
  display: inline-block;
  background: currentColor;
  height: 6px;
  margin: 0 2px 3px;
  border-radius: 3px;
}
x-morse .dot, .morse .dot {
  width: 6px;
}
x-morse .dash, .morse .dash {
  width: 18px;
}

x-morse {
  cursor: pointer;
}
x-morse:hover, x-morse:focus {
  color: #0f82f2;
  outline: none;
}
x-morse:focus {
  box-shadow: 0 0 0 2px #0f82f2;
  border-radius: 4px;
}

x-code-box .morse > span {
  display: inline-block;
  margin-right: 12px;
}
x-code-box .morse > span:hover, x-code-box .morse > span.hover {
  margin-right: 9px;
}

.capitol-light {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 3px;
  background: red;
  box-shadow: 0 0 5px 3px red;
  left: 101px;
  top: 8px;
}

.beatles {
  border: 1px solid #aaa;
  border-radius: 4px;
  box-shadow: 1px 3px 10px rgba(0, 0, 0, 0.1);
}

.bracket line {
  stroke: black;
}

.xyz {
  background: #cd0e66;
  color: white;
}

.n {
  display: inline-block;
  width: 44px;
  text-align: center;
  color: white;
  height: 26px;
  line-height: 26px;
  position: relative;
  margin: 16px 2px;
  font-style: normal;
  white-space: nowrap;
}
.n:before, .n:after {
  content: "";
  display: block;
  position: absolute;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-bottom: 13px solid;
}
.n .s-wide {
  width: 80px;
  height: 30px;
  margin: 18px 3px;
  line-height: 30px;
}
.n .s-wide:before, .n .s-wide:after {
  border-width: 0 25px 15px 25px;
}
.n:before {
  top: -13px;
}
.n:after {
  transform: rotate(180deg);
  bottom: -13px;
}
.s-grey .n {
  background: #3a3645;
}
.s-grey .n:before, .s-grey .n:after {
  border-bottom-color: #3a3645;
}
.s-orange .n {
  background: #eb4726;
}
.s-orange .n:before, .s-orange .n:after {
  border-bottom-color: #eb4726;
}
.s-purple .n {
  background: #6d3bbf;
}
.s-purple .n:before, .s-purple .n:after {
  border-bottom-color: #6d3bbf;
}
.s-purple .n.z {
  background: #b69ddf;
}
.s-purple .n.z:before, .s-purple .n.z:after {
  border-bottom-color: #b69ddf;
}
.s-teal .n {
  background: #009ea6;
}
.s-teal .n:before, .s-teal .n:after {
  border-bottom-color: #009ea6;
}
.s-teal .n.z {
  background: #80cfd3;
}
.s-teal .n.z:before, .s-teal .n.z:after {
  border-bottom-color: #80cfd3;
}
.s-lime .n {
  background: #bfc212;
}
.s-lime .n:before, .s-lime .n:after {
  border-bottom-color: #bfc212;
}
.s-red .n {
  background: #cd0e66;
}
.s-red .n:before, .s-red .n:after {
  border-bottom-color: #cd0e66;
}
.s-blue .n {
  background: #0f82f2;
}
.s-blue .n:before, .s-blue .n:after {
  border-bottom-color: #0f82f2;
}
.s-green .n {
  background: #22ab24;
}
.s-green .n:before, .s-green .n:after {
  border-bottom-color: #22ab24;
}
.s-yellow .n {
  background: #fd8c00;
}
.s-yellow .n:before, .s-yellow .n:after {
  border-bottom-color: #fd8c00;
}
.s-yellow .n.z {
  background: #fec680;
}
.s-yellow .n.z:before, .s-yellow .n.z:after {
  border-bottom-color: #fec680;
}
.n x-blank {
  display: block;
  margin: 1px 3px;
  max-width: 120px;
}
.n x-blank .target {
  display: block;
  margin: 0;
  height: 24px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.75);
}
.n x-blank input {
  min-width: 0;
  display: block;
  width: 100%;
  height: 24px;
}
.n x-blank.done, .n x-blank.done .target {
  display: inline;
  line-height: inherit;
  box-shadow: none;
  color: white;
}

.ns {
  display: inline-block;
  text-align: center;
  line-height: 30px;
  min-width: 20px;
  padding: 0 5px;
  border-radius: 5px;
  background: #cd0e66;
  color: white;
  position: relative;
}
.ns.b {
  background: #0f82f2;
}
.ns.g {
  background: #22ab24;
}
.ns.y {
  background: #fd8c00;
}
.s-purple .ns {
  background: #6d3bbf;
}
.s-yellow .ns {
  background: #fd8c00;
}
.s-teal .ns {
  background: #009ea6;
}
.ns.lb {
  background: rgba(15, 130, 242, 0.4);
}
.ns.lg {
  background: rgba(34, 171, 36, 0.4);
}
.ns.ly {
  background: rgba(253, 140, 0, 0.4);
}
.ns.lbg {
  background: linear-gradient(to bottom right, rgba(15, 130, 242, 0.4) 50%, rgba(34, 171, 36, 0.4) 50%);
}
.ns.small {
  padding: 0;
  width: 24px;
  line-height: 24px;
  font-size: 1em;
  margin: -6px 1px;
}
.ns.blue.cross {
  position: relative;
  background: rgba(15, 130, 242, 0.3);
}
.ns.cross:after {
  content: "";
  width: 150%;
  height: 2px;
  background: #c00;
  position: absolute;
  left: -25%;
  top: 50%;
  transform: rotate(-45deg);
  margin-top: -1px;
}
.ns.legs:before, .ns.legs:after {
  content: " ";
  display: block;
  position: absolute;
  width: 40px;
  height: 2px;
  background: #c5c2cc;
}
.ns.legs:before {
  transform: rotate(-45deg);
  top: 37px;
  right: 21px;
}
.ns.legs:after {
  transform: rotate(45deg);
  top: 37px;
  left: 21px;
}
.ns.legs.b:before {
  transform: rotate(-30deg);
  top: 33px;
  right: 24px;
}
.ns.legs.a:after {
  transform: rotate(30deg);
  top: 33px;
  left: 24px;
}

.number-grid {
  max-width: 560px;
  margin: 1em auto;
  display: flex;
  flex-wrap: wrap;
}
.stage .number-grid {
  margin-bottom: 32px;
}
@media (max-width: 620px) {
  .number-grid {
    max-width: 440px;
  }
}
@media (max-width: 500px) {
  .number-grid {
    max-width: 360px;
  }
}
@media (max-width: 420px) {
  .number-grid {
    max-width: 280px;
  }
}
.number-grid.ulam-grid {
  max-width: 392px;
}
@media (max-width: 620px) {
  .number-grid.ulam-grid {
    max-width: 310px;
  }
}
@media (max-width: 500px) {
  .number-grid.ulam-grid {
    max-width: 252px;
  }
}
@media (max-width: 420px) {
  .number-grid.ulam-grid {
    max-width: 198px;
  }
}

.number-cell {
  width: 56px;
  height: 56px;
  line-height: 56px;
  margin: 6px;
  background: #c5c2cc;
  text-align: center;
  font-size: 20px;
  border-radius: 10%;
  position: relative;
  transition: color 0.2s, background 0.2s, opacity 0.4s, box-shadow 0.8s;
}
@media (max-width: 620px) {
  .number-cell {
    width: 36px;
    height: 36px;
    line-height: 36px;
    margin: 4px;
    font-size: 18px;
  }
}
@media (max-width: 500px) {
  .number-cell {
    width: 30px;
    height: 30px;
    line-height: 30px;
    margin: 3px;
    font-size: 16px;
  }
}
@media (max-width: 420px) {
  .number-cell {
    width: 24px;
    height: 24px;
    line-height: 24px;
    margin: 2px;
    font-size: 12px;
  }
}
.number-cell.off {
  opacity: 0.05;
}
.number-cell.red {
  color: white;
  background: #cd0e66;
}
.number-cell.blue {
  color: white;
  background: #0f82f2;
}
.number-cell.green {
  color: white;
  background: #22ab24;
}
.number-cell.yellow {
  color: white;
  background: #fd8c00;
}
.number-cell.purple {
  color: white;
  background: #6d3bbf;
}
.number-cell.l-purple-yellow {
  background: linear-gradient(to bottom right, rgba(109, 59, 191, 0.4) 50%, rgba(253, 140, 0, 0.4) 50%);
}
.number-cell.purple-yellow {
  color: white;
  background: linear-gradient(to bottom left, rgba(253, 140, 0, 0.4) 10%, rgba(109, 59, 191, 0.4) 90%);
}
.number-cell.green-yellow {
  color: white;
  background: linear-gradient(to bottom left, rgba(253, 140, 0, 0.4) 10%, rgba(34, 171, 36, 0.4) 90%);
}
#divisibility6 .number-cell.blue.yellow {
  background: linear-gradient(to bottom right, #0f82f2 50%, #fd8c00 50%);
}
#divisibility6 .number-cell.blue.yellow.green {
  box-shadow: inset 0 0 0 30px #22ab24;
}

.number-badge {
  font-size: 15px;
  line-height: 22px;
  width: 22px;
  position: absolute;
  background: #3a3645;
  border-radius: 100%;
  top: -7px;
  right: -7px;
  color: white;
  display: none;
}
@media (max-width: 500px) {
  .number-badge {
    width: 18px;
    line-height: 18px;
    top: -6px;
    right: -6px;
    font-size: 12px;
  }
}

select {
  display: inline-block;
  width: auto;
  text-align: center;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.95);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  background: #181824 url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%234d4d4d%22%20d%3D%22m19.9%207.5a1.4%201.4%200%200%200%20-2.1%200l-5.8%205.8-5.8-5.8a1.4%201.4%200%200%200%20-2.1%200%201.5%201.5%200%200%200%200%202.1l6.8%206.9a1.6%201.6%200%200%200%202.2%200l6.8-6.9a1.4%201.4%200%200%200%200-2.1z%22%2F%3E%3C%2Fsvg%3E") no-repeat right 10px top 14px;
  background-size: 15px 8px;
  padding: 0 36px 0 1em;
  height: 2em;
  line-height: 2em;
  font-weight: 600;
  letter-spacing: 0.2px;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
}
select:hover, select.on {
  z-index: 10;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
select.disabled, select[disabled] {
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}
select:hover, select:focus, select:active {
  background-color: #373752;
}

.appear, .switch {
  background: #5e5870;
  border-radius: 4px;
  width: 120px;
  height: 32px;
  padding: 8px;
  margin: 6px;
  line-height: 32px;
  font-size: 24px;
  color: white;
  text-align: center;
  box-shadow: 0 3px 0 #181824;
  cursor: pointer;
}

.bin-finger .caption {
  text-align: center;
  font-size: large;
}

.focus .bracket g text:not(.focus),
.focus .bracket g line:not(.focus) {
  opacity: 0.1;
}

x-barcode {
  margin: 1em auto;
  top: 44px;
  position: sticky;
}
x-barcode svg {
  background-color: #fd8c00;
}
x-barcode rect.black {
  fill: #181824;
  transition: opacity 0.2s;
}
x-barcode rect.white {
  fill: #ffffff;
  transition: opacity 0.2s;
}
.focus x-barcode rect {
  opacity: 0.2;
}
.focus x-barcode .focus rect {
  opacity: 1;
}
.focus x-barcode text {
  opacity: 0.2;
}
.focus x-barcode text.focus {
  opacity: 1;
}

x-barcode {
  overflow: hidden;
}

x-barcode svg {
  margin: 0 auto 32px;
  transition: transform 0.4s linear;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0.1;
  }
}
@keyframes fadeIn {
  0% {
    opacity: 0.1;
  }
  100% {
    opacity: 1;
  }
}
x-hamming g.dim {
  opacity: 0.1;
  animation: fadeOut 1000ms;
}
x-hamming g.bold {
  opacity: 1;
  animation: fadeIn 1000ms;
}

.focus x-hamming g.focus {
  opacity: 1;
}
.focus x-hamming g:not(.focus) {
  opacity: 0.1;
  animation: fadeOut 400ms;
}

.parchment {
  max-width: 540px;
  margin: 1em auto;
  position: relative;
  padding: 16px 12px;
  text-align: center;
  font-style: italic;
  color: rgba(0, 0, 0, 0.7);
  background-color: #f8f5de;
  background-image: linear-gradient(to right, rgba(255, 210, 0, 0.3), transparent 30%, rgba(200, 160, 0, 0.1) 65%);
  box-shadow: inset 0 0 75px rgba(255, 210, 0, 0.3), inset 0 0 30px rgba(220, 120, 0, 0.8);
}
.parchment:before, .parchment:after {
  content: "";
  height: 2px;
  position: absolute;
  left: 0;
  right: 0;
  clip-path: polygon(0% 0%, 5% 100%, 10% 0%, 15% 100%, 20% 0%, 25% 100%, 30% 0%, 35% 100%, 40% 0%, 45% 100%, 50% 0%, 55% 100%, 60% 0%, 65% 100%, 70% 0%, 75% 100%, 80% 0%, 85% 100%, 90% 0%, 95% 100%, 100% 0%);
}
.parchment:before {
  background-color: white;
  top: 0;
}
.parchment:after {
  background-color: #f0c77f;
  bottom: -2px;
}

.caesar-wheel {
  float: right;
  width: 380px;
  height: 380px;
  border-radius: 100%;
  shape-outside: circle(190px);
  margin: 0 0 1em 1em;
  box-shadow: 2px 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  touch-action: none;
}
@media screen and (min-width: 1000px) {
  .caesar-wheel {
    margin-right: -80px;
  }
}
@media screen and (max-width: 640px) {
  .caesar-wheel {
    float: none;
    margin: 1em auto;
  }
}
.caesar-wheel circle {
  fill: #fd8c00;
}