[data-math-practice] {
  --mp-ink: #23233c;
  --mp-muted: #526075;
  --mp-rule: #d2dde2;
  --mp-teal: #195e64;
  --mp-green: #24644a;
  --mp-board: #f1f7f8;
  color: var(--mp-ink);
  font-family: var(--body, system-ui, sans-serif);
  line-height: 1.5;
  margin-block: 1.25rem;
  min-width: 0;
}
[data-math-practice] .mp-card {
  background: #fff;
  border: 1px solid var(--mp-rule);
  border-radius: 20px;
  box-shadow: 0 12px 30px -24px #293b59;
  padding: clamp(1rem, 3vw, 2rem);
}
[data-math-practice] .mp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-block-end: .65rem;
}
[data-math-practice] .mp-count,
[data-math-practice] .mp-step {
  color: var(--mp-teal);
  font-size: .88rem;
  font-weight: 800;
  margin: 0;
}
[data-math-practice] .mp-progress {
  display: flex;
  gap: 3px;
  flex: 0 1 120px;
  min-width: 45px;
}
[data-math-practice] .mp-progress span {
  flex: 1;
  height: 6px;
  border-radius: 10px;
  background: #dce5e8;
}
[data-math-practice] .mp-progress .mp-current { background: #659aa1; }
[data-math-practice] .mp-progress .mp-done { background: var(--mp-teal); }
[data-math-practice] .mp-prompt {
  color: var(--mp-ink);
  font: 600 clamp(1.35rem, 3.7vw, 1.85rem)/1.35 var(--disp, system-ui, sans-serif);
  margin: 0 0 1.15rem;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
[data-math-practice] :is(h2, h3, p, button, summary) { scroll-margin-block: 5rem 1rem; }
[data-math-practice] .mp-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 1.15rem;
}
[data-math-practice] .mp-board,
[data-math-practice] .mp-demo-board {
  display: grid;
  place-items: center;
  padding: clamp(.35rem, 1.5vw, .9rem);
  border: 1px solid #dce7e8;
  background: var(--mp-board);
  border-radius: 13px;
  overflow: hidden;
}
[data-math-practice] .mp-measurer {
  position: fixed;
  inset: 0 auto auto 0;
  width: 480px;
  height: 156px;
  visibility: hidden;
  overflow: hidden;
  pointer-events: none;
  contain: layout style size;
}
[data-math-practice] .mp-picture {
  width: min(100%, 600px);
  min-width: 0;
  margin-inline: auto;
  line-height: 0;
}
[data-math-practice] .mp-picture > svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  margin-inline: auto;
}
[data-math-practice] .mp-choice-label {
  margin: 0 0 .55rem;
  color: var(--mp-muted);
  font-size: .95rem;
  font-weight: 700;
}
[data-math-practice] .mp-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}
[data-math-practice] button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .55rem;
  padding: .55rem .85rem;
  min-width: 44px;
  min-height: 44px;
  color: inherit;
  border: 1px solid #abbec4;
  border-radius: .7rem;
  font: inherit;
  line-height: 1.45;
  white-space: normal;
  background: #fff;
  cursor: pointer;
  overflow-wrap: anywhere;
}
[data-math-practice] .mp-choice {
  min-height: 54px;
  min-width: 0;
  border-width: 1.5px;
  font-size: clamp(1.05rem, 3vw, 1.22rem);
  font-weight: 750;
}
[data-math-practice] .mp-choice:hover:enabled,
[data-math-practice] .mp-small:hover:enabled {
  border-color: var(--mp-teal);
  background: #eaf4f5;
}
[data-math-practice] :is(button, summary, [tabindex="-1"]):focus-visible {
  outline: 3px solid #985025;
  outline-offset: 3px;
}
[data-math-practice] .mp-choice:disabled {
  color: #596977;
  background: #f8fafb;
  cursor: default;
  opacity: 1;
}
[data-math-practice] .mp-choice.mp-correct-choice {
  color: var(--mp-green);
  border-color: var(--mp-green);
  background: #eaf6ee;
}
[data-math-practice] .mp-feedback,
[data-math-practice] .mp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem 1.1rem;
}
[data-math-practice] .mp-feedback {
  border-top: 1px solid var(--mp-rule);
  margin-block-start: 1.15rem;
  padding-block-start: 1rem;
}
[data-math-practice] .mp-success,
[data-math-practice] .mp-coach-title {
  margin: 0;
  font: 600 1.17rem/1.5 var(--disp, system-ui, sans-serif);
}
[data-math-practice] .mp-success {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  color: var(--mp-green);
}
[data-math-practice] .mp-primary {
  color: #fff;
  border-color: var(--mp-teal);
  background: var(--mp-teal);
  font-weight: 750;
  padding-inline: 1rem;
}
[data-math-practice] .mp-primary:enabled:hover {
  background: #0e4a50;
  border-color: #0e4a50;
}
[data-math-practice] .mp-icon {
  display: inline-block;
  width: 1.13em;
  height: 1.13em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[data-math-practice][dir="rtl"] :is(.mp-icon-previous, .mp-icon-forward) { transform: scaleX(-1); }
[data-math-practice] .mp-coach {
  border-block-start: 1px solid var(--mp-rule);
  padding-block-start: .9rem;
}
[data-math-practice] .mp-coach-title { margin-block-end: .65rem; }
[data-math-practice] .mp-demo {
  overflow: hidden;
  border: 1px solid #d6e4e6;
  border-radius: 13px;
  background: var(--mp-board);
}
[data-math-practice] .mp-demo-board { border: 0; border-radius: 0; }
[data-math-practice] .mp-caption {
  padding: .7rem 1rem .9rem;
  border-block-start: 1px solid #d6e4e6;
  background: #f7fbfb;
}
[data-math-practice] .mp-explanation {
  color: var(--mp-ink);
  margin: .1rem 0 0;
  font-size: 1.04rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
[data-math-practice] .mp-toolbar { margin-block-start: .9rem; }
[data-math-practice] .mp-transport {
  display: flex;
  align-items: center;
  gap: .3rem;
}
[data-math-practice] .mp-small {
  padding-inline: .55rem;
  font-size: .9rem;
  font-weight: 700;
}
[data-math-practice] .mp-small:disabled {
  color: #889398;
  background: #f3f5f5;
  border-color: #d6dee0;
  cursor: default;
}
[data-math-practice] .mp-transcript {
  font-size: .94rem;
  color: var(--mp-muted);
  margin-block-start: .6rem;
}
[data-math-practice] .mp-transcript summary {
  width: fit-content;
  padding-block: .45rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
[data-math-practice] .mp-transcript ol { padding-inline-start: 1.6rem; margin: .3rem 0; }
[data-math-practice] .mp-transcript li + li { margin-block-start: .3rem; }
[data-math-practice] .mp-complete { text-align: center; }
[data-math-practice] .mp-complete .mp-prompt { margin: .5rem 0 .25rem; }
[data-math-practice] .mp-complete p { margin: 0 0 1.15rem; color: var(--mp-muted); }
[data-math-practice] .mp-completion-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: var(--mp-green);
  background: #e4f4ed;
  font-size: 1.8rem;
}
[data-math-practice] .mp-error { margin: 1rem 0; }
@media (min-width: 780px) {
  [data-math-practice] .mp-stage { grid-template-columns: minmax(0, 1.4fr) minmax(215px, .8fr); }
  [data-math-practice] .mp-board { min-height: 170px; }
}
@media (max-width: 360px) {
  [data-math-practice] .mp-card { padding: .8rem; }
  [data-math-practice] .mp-small, [data-math-practice] .mp-primary { padding-inline: .45rem; }
}
@media (prefers-reduced-motion: no-preference) {
  [data-math-practice] .mp-mark {
    animation: np-practice-reveal .5s ease-out var(--mp-delay, 0ms) both;
  }
}
@keyframes np-practice-reveal {
  from { opacity: 0; }
}
