.math-static-lesson {
  margin-top: 1.5rem;
}

.math-static-intro {
  max-width: 44rem;
  margin: 0 0 1rem;
  color: #536171;
  font-size: 1.05rem;
  line-height: 1.55;
}

.math-static-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 0 1.25rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
  color: #536171;
  font-size: 0.96rem;
}

.math-static-swatch {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid #0b6bcb;
  border-radius: 4px;
  background: #e7f1ff;
}

.math-static-playbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.35rem 0 1.15rem;
}

.math-static-play-button {
  appearance: none;
  border: 1px solid #0b6bcb;
  border-radius: 8px;
  background: #0b6bcb;
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  padding: 0.65rem 0.95rem;
  cursor: pointer;
}

.math-static-play-button:hover,
.math-static-play-button:focus-visible {
  background: #084f9a;
  border-color: #084f9a;
}

.math-static-play-button:focus-visible {
  outline: 3px solid #bfdbfe;
  outline-offset: 2px;
}

.math-static-slideshow-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.math-static-steps {
  display: grid;
  gap: 1.15rem;
}

.math-static-step {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(28, 36, 48, 0.08);
}

.math-static-step.math-static-slideshow-current {
  border-color: #0b6bcb;
  box-shadow: 0 18px 42px rgba(11, 107, 203, 0.16);
}

.math-static-step h2 {
  margin: 0 0 0.65rem;
  font-size: 1.28rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.math-static-instruction {
  margin: 0 0 1.3rem;
  color: #536171;
  font-size: 1rem;
  line-height: 1.55;
}

.math-static-math {
  overflow-x: auto;
  padding: 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fbfdff;
}

.math-static-math .katex-display {
  margin: 0;
}

.math-static-math .katex {
  font-size: clamp(1.1rem, 2.7vw, 1.45rem);
}

.math-static-diagram {
  margin-top: 1rem;
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fbfdff;
}

.math-static-diagram svg {
  display: block;
  width: min(100%, 520px);
  height: auto;
  margin: 0 auto;
}

@media print {
  .math-static-playbar {
    display: none !important;
  }
}
