/* (c) Innings2, generated by Mathigon Studio */
x-solid, x-polyhedron {
  display: block;
  position: relative;
  margin: 0 auto;
}
x-solid canvas, x-polyhedron canvas {
  max-width: 100%;
  height: auto;
}
x-solid .label3d, x-polyhedron .label3d {
  position: absolute;
  line-height: 1.2;
  font-style: italic;
  pointer-events: none;
}

/* Responsive Binary Swipe Component */
x-binary-swipe {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5em 0;
  width: 100%;
  max-width: 100%;
  /* Very small screens adjustments */
}
x-binary-swipe h3 {
  text-transform: uppercase;
  color: #aaa;
  font-size: clamp(14px, 3vw, 22px);
  margin-top: 0;
  text-align: center;
  overflow-wrap: break-word;
}
x-binary-swipe .stack {
  height: min(260px, 20vw);
  width: min(220px, 28vw);
  position: relative;
  margin: 10px auto;
  border-radius: 8px;
  background: var(--grey-background, #f5f5f5);
}
x-binary-swipe .option .stack .card-wrap {
  z-index: 10;
}
x-binary-swipe .card-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
x-binary-swipe .card-wrap.active {
  cursor: grab;
}
x-binary-swipe .card-wrap.dragging {
  z-index: 20;
}
x-binary-swipe .card {
  border-radius: 8px;
  color: white;
  height: min(220px, 20vw - 10px);
  width: min(200px, 28vw - 10px);
  padding: clamp(6px, 2vw, 16px);
  box-sizing: border-box;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  font-size: clamp(10px, 1.5vw, 16px);
}
x-binary-swipe .card.c-red {
  background: var(--red, #f44336);
}
x-binary-swipe .card.c-orange {
  background: var(--orange, #ff9800);
}
x-binary-swipe .card.c-yellow {
  background: var(--yellow, #ffeb3b);
}
x-binary-swipe .card.c-lime {
  background: var(--lime, #cddc39);
}
x-binary-swipe .card.c-green {
  background: var(--green, #4caf50);
}
x-binary-swipe .card.c-teal {
  background: var(--teal, #009688);
}
x-binary-swipe .card.c-blue {
  background: var(--blue, #2196f3);
}
x-binary-swipe .card.c-purple {
  background: var(--purple, #9c27b0);
}
x-binary-swipe .card::after {
  content: "";
  position: absolute;
  top: 0;
  width: 33%;
  display: block;
  height: 100%;
  background: transparent;
  transition: background 1s;
  mix-blend-mode: overlay;
  border-radius: 8px;
}
x-binary-swipe .card-wrap.committed-left .card::after {
  left: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.75));
}
x-binary-swipe .card-wrap.committed-right .card::after {
  right: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.75));
}
x-binary-swipe .option .card {
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}
x-binary-swipe .card-wrap.active .card {
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
@media (min-width: 768px) {
  x-binary-swipe .card-wrap.active .card {
    transform: scale(1.1);
  }
}
x-binary-swipe .card-wrap.dragging .card {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
}
@media (min-width: 768px) {
  x-binary-swipe .card-wrap.dragging .card {
    transform: scale(1.2);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.45);
  }
}
@media (max-width: 480px) {
  x-binary-swipe {
    gap: 0.5rem;
  }
  x-binary-swipe .stack {
    height: min(260px, 28vw);
    width: min(220px, 30vw);
    margin: 5px auto;
  }
  x-binary-swipe .card {
    height: min(220px, 28vw - 10px);
    width: min(200px, 30vw - 10px);
    padding: 4px;
  }
}

x-solid, x-polyhedron {
  display: block;
  position: relative;
  margin: 0 auto;
}
x-solid canvas, x-polyhedron canvas {
  max-width: 100%;
  height: auto;
}
x-solid .label3d, x-polyhedron .label3d {
  position: absolute;
  line-height: 1.2;
  font-style: italic;
  pointer-events: none;
}

x-quiz {
  display: block;
}
x-quiz .quizcard {
  width: 100%;
}
x-quiz .question {
  display: none;
  font-size: 1.2em;
}
x-quiz .question .correct_answer {
  display: none;
}
x-quiz .question .answers {
  margin-top: 40px;
  list-style: none;
}
x-quiz .question .answers li {
  padding: 0;
  margin: 0px;
  border: 1px solid rgba(33, 36, 44, 0.64);
  border-right: 0px;
  border-left: 0px;
  padding: 5px;
}
x-quiz .question .answers li:hover {
  background-color: #e5e5e5;
}
x-quiz .question .answers li.active {
  background-color: #e5e5e5;
}
x-quiz .question .hint {
  margin-top: 20px;
  font-size: 0.9em;
  color: #555;
}
x-quiz .nav {
  height: 40px;
  position: relative;
}
x-quiz .dots {
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
}
x-quiz .dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(24, 24, 36, 0.2);
  float: left;
  margin: 4px;
  transition: background 0.2s;
}
html[theme=dark] x-quiz .dot {
  background: rgba(255, 255, 255, 0.4);
}
x-quiz .dot.on {
  background: rgba(0, 0, 0, 0.8);
}
html[theme=dark] x-quiz .dot.on {
  background: white;
}

x-polyhedron {
  display: block;
  margin: 0 auto;
}

x-voxel-painter {
  display: block;
  cursor: pointer;
  margin: 0 auto;
  max-width: 100%;
  position: relative;
}
x-voxel-painter .eraser {
  position: absolute;
  width: 40px;
  height: 40px;
  background: red;
}
x-voxel-painter .icon-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
}

#cube-draw x-polypad svg, #cube-net-draw x-polypad svg {
  height: 400px;
}

div.die-faces {
  width: 620px;
  height: 600px;
  text-align: center;
}
div.die-faces svg {
  width: 620px;
  height: 465px;
  background-color: white;
}
div.die-faces svg path.target {
  fill: transparent;
  stroke: black;
  stroke-width: 2px;
}
div.die-faces svg path.target.over {
  fill: #bfc212;
}
div.die-faces div.faces {
  display: inline-flex;
  flex-wrap: wrap;
  margin: auto;
  justify-content: center;
}
div.die-faces div.faces div.face {
  width: 90px;
  height: 90px;
  max-width: 90px;
  flex: 90px;
  margin: 2px;
  background-color: white;
  border: 3px solid black;
  background-size: contain;
  display: inline-block;
}
div.die-faces div.faces div.face svg {
  width: 90px;
  height: 90px;
}

.hover-image {
  transition: transform 0.2s ease-in-out;
}

.hover-image:hover {
  transform: scale(1.1);
}