.math-reasoning-question-context,
.math-reasoning-question-instructions {
  color: #2d2933;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.math-reasoning-question-context {
  margin: 0 0 10px;
}

.math-reasoning-question-instructions {
  margin: 10px 0 0;
}

.math-reasoning-evidence-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(240px, 34dvh);
  object-fit: contain;
  margin: 0 auto 12px;
}

.math-reasoning-question-context + .math-reasoning-evidence-image {
  margin-top: 8px;
}

.math-reasoning-question-context + .math-benchmark-student-preview__banner,
.math-benchmark-student-preview .math-reasoning-question-context,
.math-benchmark-student-preview .math-reasoning-question-instructions,
.math-benchmark-student-preview .math-reasoning-evidence-image {
  margin-block: 0;
}

.math-reasoning-unit-input .q-field__prefix,
.math-reasoning-unit-input .q-field__suffix {
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
}

.math-reasoning-compact-answer {
  width: min(12rem, 100%);
  margin-inline: auto;
}

.math-reasoning-compact-answer .q-field__native {
  font-size: 1.375rem;
}

.math-reasoning-compact-answer .q-field__native::placeholder {
  font-size: 0.875rem;
}

.math-reasoning-compact-answer .q-field__native:has(+ .q-field__suffix:not(:empty)) {
  text-align: end;
}

@supports (field-sizing: content) {
  .math-reasoning-compact-answer.math-reasoning-unit-input .q-field__control-container {
    justify-content: center;
  }

  .math-reasoning-compact-answer.math-reasoning-unit-input .q-field__native {
    field-sizing: content;
    width: auto;
  }
}

.student-assessment-question-banner__blank.math-reasoning-compact-blank {
  width: min(9rem, 100%);
}

.math-reasoning-compact-blank .q-field__prefix,
.math-reasoning-compact-blank .q-field__suffix {
  color: white;
}

.math-reasoning-inline-answer {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
