html {
  scroll-behavior: smooth;
}

.your-practice-answer-row {
  justify-content: stretch;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.answer-toggle-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 15px 22px;
  background: #111;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.answer-toggle-button:hover,
.answer-toggle-button:focus-visible,
.answer-toggle-button.is-open {
  background: #000;
}

.answer-toggle-button:disabled {
  background: #eceff1;
  color: #7b848e;
  cursor: not-allowed;
}

.inline-memo[hidden] {
  display: none !important;
}

.inline-memo {
  display: block;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  background: #fff;
  transition: opacity .24s ease;
}

.inline-memo.is-visible {
  opacity: 1;
}

.inline-memo-pages {
  display: flex;
  gap: 0;
  width: 100%;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  transition: height .26s ease;
}

.inline-memo-pages::-webkit-scrollbar {
  display: none;
}

.inline-memo-pages figure {
  flex: 0 0 100%;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.inline-memo-pages figure.is-loading {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(220px, 62vw, 680px);
  background:
    linear-gradient(100deg, transparent 30%, rgba(255,255,255,.82) 48%, transparent 66%) 0 0 / 220% 100%,
    #f1f2f3;
  animation: memo-page-loading 1.2s ease-in-out infinite;
}

.inline-memo-pages figure.is-loading::after {
  content: 'Loading answers…';
  color: #555;
  font-size: 15px;
  font-weight: 800;
}

.inline-memo-pages figure.is-error {
  display: grid;
  place-items: center;
  min-height: 220px;
  background: #f7f7f7;
}

.inline-memo-pages figure.is-error::after {
  content: 'Answer page could not load. Close and open the answers to retry.';
  max-width: 300px;
  padding: 24px;
  color: #555;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.memo-source-image:not([src]) {
  display: none;
}

@keyframes memo-page-loading {
  to { background-position: -220% 0, 0 0; }
}

.inline-memo-pages img,
.inline-memo-pages canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  background: #fff;
}

.memo-slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 46px;
  padding: 9px 14px;
  border-top: 1px solid #e3e3e3;
  border-bottom: 1px solid #e3e3e3;
  background: #fff;
}

.memo-page-label {
  min-width: 92px;
  color: #333;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.memo-slide-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.memo-slide-dot {
  width: 10px;
  height: 10px;
  margin: 0;
  padding: 0;
  border: 1px solid #111;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.memo-slide-dot.is-active {
  background: #111;
}

.question-page-stack {
  display: block;
  width: 100%;
  background: #fff;
}

.question-page-stack figure {
  width: 100%;
  margin: 0;
  border: 0;
  background: #fff;
}

.question-page-stack img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.your-practice-question-only {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.your-practice-continuous {
  gap: 0;
  width: 100%;
}

.your-practice-continuous .your-practice-question-only {
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.shell.your-practice-full-bleed {
  width: 100%;
  max-width: none;
  padding-right: 0;
  padding-left: 0;
}

.your-practice-full-bleed .practice-layout.practice-layout-full {
  width: 100%;
  max-width: none;
}

.your-practice-question-only .question-image-stage {
  width: 100%;
  padding: 0;
}

.your-practice-question-only .question-image {
  width: 100%;
  border: 0;
  border-radius: 0;
}

.your-practice-question-only .your-practice-answer-row {
  margin: 0;
  padding: 0;
  border-top: 0;
}

.your-practice-question-only .answer-toggle-button {
  border-radius: 0;
}

.your-practice-question-only .inline-memo {
  padding: 0;
}

@media (max-width: 620px) {
  .answer-toggle-button { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .inline-memo { transition: none; }
  .inline-memo-pages figure.is-loading { animation: none; }
}
