/* (c) Innings2, generated by Mathigon Studio */
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-buckets {
  display: block;
  margin: 1.5em 0;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  color: #333;
  width: 100%;
}
x-buckets .inputs, x-buckets .bucket {
  position: relative;
}
x-buckets .inputs > *, x-buckets .bucket > * {
  position: absolute;
}
x-buckets .inputs {
  z-index: 1;
  width: 100%;
  min-height: 50px;
}
x-buckets .buckets {
  display: flex;
  margin: 0 -8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
x-buckets .input {
  cursor: move;
  background: rgba(255, 255, 255, 0.6);
  box-sizing: border-box;
  padding: 5px 12px;
  margin: 6px 0;
  border-radius: 4px;
  width: 180px;
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
  transition: left 0.2s, top 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
x-buckets .input.touch-device {
  /* Increase tap target size on touch devices */
  padding: 8px 12px;
}
x-buckets .inputs .input {
  background: #c5c2cc;
}
x-buckets .input.error {
  background: #e9b0cb;
  color: #cd0e66;
}
x-buckets .input.correct {
  background: #b6dfb7;
  color: #22ab24;
}
x-buckets .input.active {
  z-index: 10; /* Ensure active items appear on top */
  background: white;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.45);
  color: inherit;
}
x-buckets .bucket {
  width: 200px;
  border-radius: 8px;
  margin: 6px;
  position: relative;
  padding-bottom: 6px;
  background: #3a3645;
  transition: box-shadow 0.2s;
}
x-buckets .bucket .title {
  text-align: center;
  font-weight: 600;
  margin-top: 8px;
  color: white;
}
x-buckets .bucket.active {
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.4);
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  x-buckets .bucket {
    width: 180px; /* Slightly smaller buckets on tablets */
    margin: 4px;
  }
  x-buckets .input {
    width: 160px; /* Slightly smaller input items */
    font-size: 15px;
  }
}
@media (max-width: 480px) {
  x-buckets .buckets {
    margin: 0 -4px;
  }
  x-buckets .bucket {
    width: calc(50% - 8px); /* Half width minus margins on mobile */
    min-width: 140px; /* Ensure minimum readable width */
    margin: 4px;
  }
  x-buckets .bucket .title {
    font-size: 14px;
    margin-top: 6px;
  }
  x-buckets .input {
    width: 140px; /* Smaller input items on mobile */
    font-size: 14px;
    padding: 6px 8px;
    margin: 4px 0;
  }
  x-buckets .input.active {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45); /* Smaller shadow on mobile */
  }
}
/* Extra small devices */
@media (max-width: 360px) {
  x-buckets .bucket {
    width: 100%; /* Full width on very small devices */
    max-width: 260px;
    margin: 4px auto;
  }
  x-buckets .input {
    width: 130px;
    font-size: 13px;
  }
}
/* 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-quill {
  display: block;
  position: relative;
  margin: 1.5em 0;
}
x-quill .ql-toolbar.ql-snow {
  padding: 4px 12px;
  border-radius: 4px 4px 0 0;
  background: #eee;
}
x-quill .ql-container.ql-snow {
  font-family: inherit;
  font-size: 16px;
  border-radius: 0 0 4px 4px;
}
x-quill .ql-editor {
  padding: 16px 16px 44px 16px;
}
x-quill .btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-size: 16px;
}

marker#axis-arrow {
  fill: #3a3645;
}
html[theme=dark] marker#axis-arrow {
  fill: white;
}

x-chart {
  display: block;
  position: relative;
  margin: 2em auto;
  touch-action: pan-y;
  color: #cd0e66;
}
x-chart svg.canvas {
  display: block;
  width: 100%;
  height: 100% !important;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
x-chart .grid {
  opacity: 0.1;
}
html[theme=dark] x-chart .grid {
  opacity: 0.25;
}
x-chart .grid line {
  stroke: black;
  stroke-width: 2px;
}
html[theme=dark] x-chart .grid line {
  stroke: white;
}
x-chart .axes line {
  stroke: #3a3645;
  stroke-width: 2px;
}
html[theme=dark] x-chart .axes line {
  stroke: white;
}
x-chart .grid, x-chart .axes {
  stroke-linecap: round;
  transition: opacity 0.2s;
}
x-chart .axes line:not(.tick) {
  marker-end: url(#axis-arrow);
}
x-chart .labels text {
  fill: #3a3645;
  font-size: 14px;
  stroke: white;
  stroke-width: 4px;
  paint-order: stroke;
  stroke-linejoin: round;
}
html.is-safari x-chart .labels text {
  stroke: none;
}
x-chart .plot path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3px;
}
x-chart .plot circle {
  fill: currentColor;
}
x-chart.blue, x-chart g.blue {
  color: #0f82f2;
}
x-chart.green, x-chart g.green {
  color: #22ab24;
}
x-chart.yellow, x-chart g.yellow {
  color: #fd8c00;
}
x-chart x-gesture {
  position: absolute;
  top: 0;
  left: 0;
}

.juniper-cell, code, pre, x-step code {
  font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.exercise, .example, .definition {
  padding: 0.6em 1em;
  color: rgba(0, 0, 0, 0.75);
  margin: 1.5em 0;
  border-radius: 2px 4px 4px 2px;
}
.exercise p:last-child, .exercise ul:last-child, .example p:last-child, .example ul:last-child, .definition p:last-child, .definition ul:last-child {
  margin-bottom: 0;
}
.exercise:first-child, .example:first-child, .definition:first-child {
  margin-top: 0;
}
.exercise .caption, .example .caption, .definition .caption {
  color: rgba(0, 0, 0, 0.4);
}

.theorem {
  background: #fbedf6;
  border: 1px solid #b30469;
  border-left: 6px solid #b30469;
}

.exercise {
  background: #f5fefa;
  border: 1px solid #2a9659;
  border-left: 6px solid #2a9659;
}

.example {
  background: #f7ece1;
  border: 1px solid #d8954b;
  border-left: 6px solid #d8954b;
}

.definition {
  background: #c0d6f9;
  border: 1px solid #2667cc;
  border-left: 6px solid #2667cc;
}

x-picker .item {
  display: block;
}

p {
  hanging-punctuation: none;
}

.choice strong {
  color: white;
}

.pill code {
  color: white;
}

.popup code {
  color: white;
}

x-picker .item.pill.bblue {
  background: #0f82f2;
}
x-picker .item.pill.bblue:not(.correct):not(.incorrect):hover {
  background: #095bab;
}
x-picker .item.pill.bblue:after {
  border-width: 2px;
  margin: 2px;
}

x-step code {
  background: transparent;
  border: none;
}

.video-wrap {
  background: black;
  position: relative;
  height: 0;
  padding-bottom: 56.25%;
}
.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.CodeMirror pre {
  margin: 0;
}

.juniper-cell {
  border: 1px solid #ccc;
  border-radius: 4px;
  margin: 1.5em 0;
  line-height: 1.8;
  overflow: hidden;
  font-size: 15px;
}
.juniper-cell .CodeMirror {
  padding: 0.6em 1em;
}
.juniper-cell pre {
  color: #555;
}

.juniper-output {
  background: #eee;
  padding: 0.6em 1em;
  white-space: pre-wrap;
  border-top: 1px solid #ccc;
  min-height: 27px;
  color: inherit;
}

.juniper-button {
  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;
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 16px;
  z-index: 10;
  padding: 0 1.1em;
  height: 2em;
  line-height: 2em;
  font-weight: 600;
  letter-spacing: 0.2px;
  background-color: #22ab24;
  transition: transform 0.4s cubic-bezier(0.33, 1.9, 0.52, 0.7), background 0.2s, color 0.2s, box-shadow 0.2s;
}
.juniper-button:hover, .juniper-button.on {
  z-index: 10;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.juniper-button.disabled, .juniper-button[disabled] {
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}
.juniper-button:active {
  transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
  transform: scale(0.9);
}
.juniper-button:hover, .juniper-button:focus, .juniper-button:active {
  background-color: #29cd2b;
}

code[class*=language-],
pre[class*=language-] {
  color: #393A34;
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  font-size: 0.9em;
  line-height: 1.2em;
  -moz-tab-size: 4;
    -o-tab-size: 4;
       tab-size: 4;
  -webkit-hyphens: none;
          hyphens: none;
}

pre[class*=language-]::-moz-selection, pre[class*=language-] ::-moz-selection, code[class*=language-]::-moz-selection, code[class*=language-] ::-moz-selection {
  background: #C1DEF1;
}

pre[class*=language-]::selection, pre[class*=language-] ::selection,
code[class*=language-]::selection, code[class*=language-] ::selection {
  background: #C1DEF1;
}

pre[class*=language-] {
  padding: 1em;
  margin: 0.5em 0;
  overflow: auto;
  border: 1px solid #ccc;
  background-color: #eee;
  border-radius: 4px;
}

:not(pre) > code[class*=language-] {
  padding: 0.2em;
  padding-top: 1px;
  padding-bottom: 1px;
}

pre > code[class*=language-] {
  padding: 0;
  border: 0;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #008000;
  font-style: italic;
}

.token.namespace {
  opacity: 0.7;
}

.token.string {
  color: #A31515;
}

.token.punctuation,
.token.operator {
  color: #393A34; /* no highlight */
}

.token.url,
.token.symbol,
.token.number,
.token.boolean,
.token.variable,
.token.constant,
.token.inserted {
  color: #36acaa;
}

.token.atrule,
.token.keyword,
.token.attr-value,
.language-autohotkey .token.selector,
.language-json .token.boolean,
.language-json .token.number,
code[class*=language-css] {
  color: #0000ff;
}

.token.function {
  color: #393A34;
}

.token.deleted,
.language-autohotkey .token.tag {
  color: #9a050f;
}

.token.selector,
.language-autohotkey .token.keyword {
  color: #00009f;
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.class-name,
.language-json .token.property {
  color: #2B91AF;
}

.token.tag,
.token.selector {
  color: #800000;
}

.token.attr-name,
.token.property,
.token.regex,
.token.entity {
  color: #ff0000;
}

.token.directive.tag .tag {
  background: #ffff00;
  color: #393A34;
}

.line-numbers .line-numbers-rows {
  border-right-color: #a5a5a5;
}

.line-numbers-rows > span:before {
  color: #2B91AF;
}

.line-highlight {
  background: rgba(193, 222, 241, 0.2);
  background: linear-gradient(to right, rgba(193, 222, 241, 0.2) 70%, rgba(221, 222, 241, 0));
}

x-step pre code {
  overflow: scroll;
}

x-binary-swipe {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 1.5em 0;
}
x-binary-swipe h3 {
  text-transform: uppercase;
  text-align: center;
  color: #aaa;
  font-size: 22px;
  margin-top: 0;
}
x-binary-swipe .stack {
  width: 100%;
  height: 220px;
  position: relative;
  margin: 20px auto;
  border-radius: 8px;
  background: #f5f5f6;
}
x-binary-swipe .option .stack .card-wrap {
  z-index: 10;
}
x-binary-swipe .card-wrap {
  position: absolute;
  top: 0;
  left: 0;
}
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: 220px;
  width: 100%;
  padding: 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;
}
x-binary-swipe .card.c-red {
  background: #cd0e66;
}
x-binary-swipe .card.c-orange {
  background: #eb4726;
}
x-binary-swipe .card.c-yellow {
  background: #fd8c00;
}
x-binary-swipe .card.c-lime {
  background: #bfc212;
}
x-binary-swipe .card.c-green {
  background: #22ab24;
}
x-binary-swipe .card.c-teal {
  background: #009ea6;
}
x-binary-swipe .card.c-blue {
  background: #0f82f2;
}
x-binary-swipe .card.c-purple {
  background: #6d3bbf;
}
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;
}
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.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
x-binary-swipe .card-wrap.dragging .card {
  transform: scale(1.2);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.45);
}

x-picker .item {
  border: 4px solid #ecd1ff;
  border-radius: 8px;
  cursor: pointer;
  margin: 4px;
  position: relative;
  transition: border 0.2s, opacity 0.2s;
  width: 220px;
}

x-picker .item.correct {
  border-color: #22ab24;
  cursor: default;
}

@media screen and (min-width: 680px) {
  .shift-1 {
    margin-top: -70px !important;
  }
}
.space {
  display: inline-block;
  width: 20px;
}

.mountain {
  background: white;
  box-shadow: 0 0 30px 10px white;
  z-index: 100;
}
html[theme=dark] .mountain {
  background: #22212e;
}
html[theme=dark] .mountain {
  box-shadow: 0 0 30px 10px #22212e;
}

.task {
  color: #0f82f2;
  border-bottom: 2px solid #0f82f2;
  padding-bottom: 0.5em;
  margin-bottom: 0.7em;
  font-weight: 600;
}

.middle {
  width: 300px;
  height: 300px;
  top: calc(50vh - 150px);
}

.theorem .row.padded {
  margin: -1em -24px -1em;
}

.theorem svg {
  overflow: visible;
}

#pythagoras-proof x-geopad {
  background: transparent;
  position: relative;
  stroke-linejoin: round;
}
#pythagoras-proof .tri {
  fill: #82bcf4;
}
#pythagoras-proof.focus .tri:not(.focus) {
  fill: #deeaf6;
}
#pythagoras-proof .square {
  fill: #e182ae;
}
#pythagoras-proof.focus .square:not(.focus) {
  fill: #f1dee8;
}
#pythagoras-proof .label {
  position: absolute;
  transform: translate(-50%, -50%) scale(0.4);
  color: white;
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.5s, transform 0.5s;
}
#pythagoras-proof .label.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition-timing-function: linear, cubic-bezier(0.33, 1.9, 0.52, 0.7);
}
#pythagoras-proof .similar-triangle .light {
  opacity: 0.2;
}

.proof-table .pill {
  border-radius: 12px;
  margin-bottom: 6px;
}
.proof-table .pill mfrac {
  margin: 0.2em 0;
}
.proof-table p {
  margin-bottom: 8px !important;
}

#pythagorean-triples-grid circle.move {
  fill: #0f82f2;
  transition: r 0.2s;
}
#pythagorean-triples-grid .thick {
  stroke: #0f82f2;
  transition: none;
}
#pythagorean-triples-grid .label {
  position: absolute;
  background: #0f82f2;
  border-radius: 4px;
  color: white;
  padding: 1px 8px;
  transform: translate(-50%, -50%);
}
#pythagorean-triples-grid .triple circle.move {
  fill: #22ab24;
}
#pythagorean-triples-grid .triple .thick {
  stroke: #22ab24;
  fill: rgba(34, 171, 36, 0.2);
}
#pythagorean-triples-grid .triple .label {
  background: #22ab24;
}

.qed {
  display: block;
  float: right;
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  margin-top: 8px;
}

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

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