/* Emerald Valley Library - Interactive Mathematics, generated by Mathigon Studio */
x-solved {
  display: none;
  position: absolute;
  width: 200px;
  left: 50%;
  margin: 20px 0 0 -100px;
  z-index: 200;
  border-radius: 12px;
  padding: 5px 15px 15px;
  box-sizing: border-box;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}
x-solved x-icon.sketch {
  margin: 0 auto;
  fill: white;
  display: block;
  opacity: 0.8;
}
x-solved .message {
  text-align: center;
  color: white;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}
x-solved .close {
  position: absolute;
  right: 0;
  top: 0;
  padding: 8px;
  transition: transform 0.2s;
  cursor: pointer;
  z-index: 10;
}
x-solved .close x-icon {
  fill: rgba(255, 255, 255, 0.4);
  display: block;
  transition: fill 0.2s;
}
x-solved .close:hover {
  transform: scale(1.4);
}
x-solved .close:hover .icon {
  fill: white;
}

.svg-block {
  margin: 0 0 1em 0;
}

x-parallax.full-width {
  position: relative;
  left: calc(520px - 50vw);
  height: 480px;
  margin: 1.5em 0;
  width: calc(100vw - 280px);
}
@media screen and (max-width: 1120px) {
  x-parallax.full-width {
    left: -40px;
  }
}
@media screen and (max-width: 840px) {
  x-parallax.full-width {
    width: 100vw;
  }
}
@media screen and (max-width: 540px) {
  x-parallax.full-width {
    left: -24px;
  }
}
x-parallax.full-width .credit {
  position: absolute;
  bottom: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 11px;
  padding: 1px 8px;
}

@keyframes effects-pulse-down {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(0.9);
  }
  65% {
    transform: scale(1.04);
  }
  85% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1);
  }
}
.effects-pulse-down {
  animation: effects-pulse-down 0.5s;
}

.drawing-path {
  fill: none;
  stroke: rgba(0, 0, 0, 0.7);
  stroke-width: 6px;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
html[theme=dark] .drawing-path {
  stroke: rgba(255, 255, 255, 0.8);
}

.node {
  stroke: #f5f5f6;
  fill: #cd0e66;
  stroke-width: 2px;
  cursor: move;
}
html[theme=dark] .node {
  stroke: #2d2c38;
}

.link {
  stroke: #c5c2cc;
  stroke-width: 2px;
  fill: transparent;
}

.arrow {
  fill: #c5c2cc;
}

.graph {
  background: #f5f5f6;
  border-radius: 4px;
}
html[theme=dark] .graph {
  background: #2d2c38;
}

#graph0 .node {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: scale(1);
  transform-origin: center;
}

#graph0.novertices .node {
  transform: scale(0);
  cursor: default;
}

#graph0 .link {
  stroke-dasharray: 70px;
  stroke-dashoffset: 140px;
  transition: stroke-dashoffset 1.6s;
}

#graph0.noedges .link {
  stroke-dashoffset: 70px;
}

.person {
  display: inline-block;
  width: 24px;
  height: 24px;
  text-align: center;
  color: #FFF;
  border-radius: 20px;
  line-height: 24px;
  font-weight: 600;
}

.handshakes .duplicate {
  opacity: 1;
  transition: opacity 0.5s;
}

.complete .handshakes .duplicate {
  opacity: 0.1;
}

.handshakes td {
  text-align: center;
  color: #666;
}

@media screen and (max-width: 1100px) {
  .handshakes {
    width: 100%;
    max-width: 500px;
    line-height: 1.4;
  }
  .handshakes .person {
    margin-left: calc(50% - 12px);
    margin-right: calc(50% - 12px);
  }
}
.house {
  fill: #eee;
}
html[theme=dark] .house {
  fill: #383742;
}

.bridge {
  fill: #fd8c00;
  stroke: transparent;
  stroke-width: 16px;
  transition: fill 0.2s;
}

.bridge.green {
  fill: #22ab24;
}

.bridge.red {
  fill: #cd0e66;
}

.water {
  fill: #57a8f6;
}

#planarity {
  margin-top: -20px;
}

#planarity circle {
  fill: #0f82f2;
  cursor: move;
  stroke: #cfe6fc;
  stroke-width: 2.5px;
}

#planarity circle.intersect {
  fill: #cd0e66;
}

#planarity line {
  stroke: rgba(0, 0, 0, 0.3);
  stroke-width: 2.5px;
}

#planarity line.intersect {
  stroke: #cd0e66;
}

#konigsberg-proof text {
  font-weight: 600;
  text-anchor: middle;
  fill: white;
  font-size: 32px;
}

.utility {
  z-index: 10;
}

.utility1, .utility2, .utility3 {
  opacity: 0;
  transition: opacity 0.3s;
}

#planar-1 .link, #planar-2 .link, #planar-3 .link {
  stroke-width: 3px;
}

.box > .btn, .tab .btn {
  position: absolute;
  bottom: 10px;
  left: 10px;
}

.tab .btn.right {
  left: auto;
  right: 10px;
}

.four-colour-icons {
  display: flex;
  justify-content: center;
  margin-bottom: 1em;
  flex-wrap: wrap;
}

.four-colour-icon {
  width: 40px;
  height: 40px;
  border: 5px solid transparent;
  margin: 0 4px;
  cursor: pointer;
  border-radius: 100%;
  opacity: 0.6;
}

.four-colour-icon.on {
  border-color: rgba(0, 0, 0, 0.6);
  opacity: 1;
}

.four-colours .solve {
  left: auto;
  right: 10px;
}

.four-colours path {
  transition: 0.2s;
  cursor: pointer;
}
.four-colours path:hover {
  opacity: 0.8;
}

.colour-count {
  color: #181824;
  font-size: 22px;
  font-weight: 600;
  margin: 8px 0 -12px;
  text-align: center;
}

#dominoes {
  cursor: pointer;
}

#dominoes g rect {
  fill: #999;
}

#dominoes g text {
  fill: #F2F2F2;
  font-size: 18px;
  letter-spacing: -1px;
}

#dominoes g { /* rtl:ignore */
  transform-origin: bottom right;
  transition: transform 0.1s linear;
}

.tsm {
  background: url(/content/graph-theory/images/map.jpg);
  background-size: cover;
  border-radius: 6px;
}
.tsm rect {
  fill: transparent;
  cursor: pointer;
}
.tsm circle {
  fill: #cd0e66;
  cursor: move;
}
.tsm path {
  fill: none;
  stroke: #0f82f2;
  stroke-width: 6;
}

.vertex-orders text {
  font-size: 18px;
  fill: white;
}

.vertex-orders circle {
  transition: fill 0.5s;
}

.euler-sum {
  opacity: 0;
  margin: 0.4em 0 0;
  padding-top: 0.4em;
  border-top: 1px solid #ddd;
}

#euler-2 .node {
  stroke: white;
}

.euler-table {
  position: absolute;
  background: #e2e1e6;
  top: 20px;
  right: 0;
  padding: 8px 12px;
  border-radius: 8px;
  line-height: 1.2;
}
.euler-table p {
  margin: 0;
}

x-automaton {
  display: block;
}
x-automaton .cellular-rules {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
x-automaton .cellular-rules > svg {
  margin: 5px;
  cursor: pointer;
  transition: transform 0.2s;
}
x-automaton .cellular-rules > svg:hover {
  transform: scale(1.2);
}
x-automaton .cellular-grid {
  margin: 0 auto;
  cursor: crosshair;
}
x-automaton .cellular-rules rect, x-automaton .cellular-grid rect {
  stroke: #dddce1;
  fill: white;
}
x-automaton .cellular-rules rect.fill, x-automaton .cellular-grid rect.fill {
  fill: #3a3645;
  stroke: #504b5c;
}
x-automaton .cellular-rules rect.red, x-automaton .cellular-grid rect.red {
  stroke: #cd0e66;
  stroke-width: 2px;
  stroke-linejoin: round;
}
x-automaton .highlight {
  fill: none;
  stroke: #fd8c00;
  stroke-width: 5px;
  opacity: 0.85;
  display: none;
}
x-automaton svg.focus .highlight {
  display: block;
}

.chaos-game {
  margin: 1.5rem 0;
}
@media screen and (max-width: 540px) {
  .chaos-game {
    margin: 1.5em -24px;
  }
}
.chaos-game x-select.tabs {
  position: relative;
  z-index: 1;
}
.chaos-game x-geopad {
  border-radius: 4px 4px 0 0;
}
.chaos-game .chaos-rules {
  background: #c5c2cc;
  display: flex;
  flex-wrap: wrap;
  padding: 8px;
  border-radius: 0 0 4px 4px;
}
.chaos-game .chaos-rules .form-field, .chaos-game .chaos-rules .button-field {
  padding: 8px;
}
.chaos-game .chaos-rules .form-field {
  flex-grow: 1;
}
.chaos-game .chaos-rules .btn {
  display: block;
  height: 49px;
  line-height: 49px;
}

.fractal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
x-step.focus .fractal-overlay {
  opacity: 0.85;
}

svg.var .red {
  fill: #cd0e66;
}
svg.var .blue {
  fill: #0f82f2;
}
svg.var .white {
  fill: white;
}
svg.var .overlay {
  fill: white;
  opacity: 0;
  transition: opacity 0.2s;
}
svg.var .overlay.focus {
  opacity: 0.9;
}

.sierpinski {
  overflow: visible;
}
.sierpinski g {
  transition: transform 0.3s, fill 0.3s;
}
.focus .sierpinski .t1 {
  transform: translate(10px, 5px);
  fill: #0f82f2;
}
.focus .sierpinski .t2 {
  transform: translate(-10px, 5px);
  fill: #22ab24;
}
.focus .sierpinski .t3 {
  transform: translate(0, -10px);
  fill: #fd8c00;
}

x-menger-sponge {
  display: block;
}

x-menger-sponge canvas {
  width: 100%;
  height: auto;
}

.coastline path {
  fill: #656073;
}
.coastline line {
  stroke: #fd8c00;
  stroke-width: 6px;
  stroke-linecap: square;
}
.coastline line.border {
  stroke: #933f36;
  stroke-width: 10px;
}

#coastline-grid .grid, #coastline-grid .cells {
  transition: opacity 0.8s;
}
#coastline-grid .coast {
  vector-effect: non-scaling-stroke;
}

.pascal-grid {
  position: relative;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.pascal-grid .r {
  display: flex;
  justify-content: center;
}
.pascal-grid .c {
  cursor: pointer;
  width: 36px;
  font-size: 13px;
  background: #ddd;
  margin: 1px;
  text-align: center;
  position: relative;
  line-height: 20px;
  border-radius: 3px;
  transition: color 0.4s, background 0.4s;
  box-shadow: inset 0 -1px rgba(0, 0, 0, 0.3);
  padding-bottom: 1px;
}
.pascal-grid .c.red {
  color: white;
  background: #cd0e66;
  cursor: default;
}
.pascal-grid.done .c {
  cursor: default;
}

.pascal-canvas {
  position: relative;
  float: left;
  shape-outside: polygon(0 0, 240px 0, 480px 420px, 0 420px);
  shape-margin: 32px;
  margin: 0 32px 1.5em 0;
}
.pascal-canvas canvas {
  width: 480px;
  max-width: 100%;
  height: auto;
}
.pascal-canvas .label {
  position: absolute;
  top: 32px;
  left: 24px;
  font-weight: 600;
  color: #333;
}
.pascal-canvas .circled {
  width: 32px;
  height: 32px;
  line-height: 32px;
}
@media screen and (max-width: 1007px) and (min-width: 841px) {
  .pascal-canvas {
    float: none;
    max-width: 480px;
    margin: 0 auto 1.5em;
    shape-outside: none;
  }
}
@media screen and (max-width: 727px) {
  .pascal-canvas {
    float: none;
    max-width: 480px;
    margin: 0 auto 1.5em;
    shape-outside: none;
  }
}
@media screen and (max-width: 460px) {
  .pascal-canvas .label {
    top: 12px;
    left: 0;
  }
}

x-geopad .points circle.chaos-point {
  stroke: none;
  fill: currentColor;
}

.geo-legend {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 14px;
}
.geo-legend .formula, .geo-legend .sequence {
  width: -moz-fit-content;
  width: fit-content;
  background: #e2e1e6;
  border: 2px solid white;
  padding: 2px 4px;
  border-radius: 8px;
}
.geo-legend .formula {
  margin-top: -2px;
  border-bottom-left-radius: 0;
}
.geo-legend .sequence {
  margin-top: -2px;
  border-top-left-radius: 0;
}
.geo-legend .pill {
  padding: 0 8px;
  min-width: 0;
}
.geo-legend .vdots {
  transform: rotate(90deg);
  display: inline-block;
  margin-left: 13px;
  margin-right: 24px;
}
@media screen and (max-width: 940px) and (min-width: 841px), screen and (max-width: 660px) {
  .geo-legend {
    font-size: 12px;
  }
  .geo-legend .pill {
    padding: 0 7px;
  }
  .geo-legend .formula, .geo-legend .sequence {
    padding: 2px 3px;
  }
}
@media screen and (max-width: 560px) {
  .geo-legend {
    font-size: 10px;
  }
  .geo-legend .pill {
    padding: 0 6px;
  }
  .geo-legend .formula, .geo-legend .sequence {
    padding: 1px 2px;
  }
}
@media screen and (max-width: 400px) {
  .geo-legend {
    display: none;
  }
}

.mandel-frame {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  padding-bottom: 65.79%;
}
.mandel-frame img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.mandel-frame .scale {
  position: absolute;
  left: 50%;
  bottom: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: 1px solid white;
  border-radius: 20px;
  line-height: 24px;
  font-size: 16px;
  padding: 0 14px;
  transform: translateX(-50%);
}

x-geopad img {
  transition: opacity 0.2s;
}

.focus x-geopad img {
  opacity: 0.2;
}

svg.circles {
  width: 100%;
  height: auto;
  overflow: visible;
}
svg.circles .inner {
  fill: #cd0e66;
  cursor: grab;
  stroke: white;
  stroke-width: 0.5px;
}
svg.circles .outer {
  fill: #b2b0b9;
}
svg.circles text {
  text-anchor: middle;
  font-size: 9px;
  fill: white;
  pointer-events: none;
}