/* TSA math practice: change presentation only, never source text or grading.
   The renderer removes this scope when leaving a TSA paper. */
.tsaPracticePaper :is(#questionContent, #mainResultQuestionContent, [data-wrong-question], .wrongReviewPreview) {
  color: #203047;
  font-family: inherit;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: break-word;
}

/* Override the legacy renderer's inline 800 weight and compact line height. */
.tsaPracticePaper :is(#questionContent, #mainResultQuestionContent, [data-wrong-question], .wrongReviewPreview) :is(.contentTextBlock, .contentLatex, p, strong, b) {
  color: inherit !important;
  font-size: inherit !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}

.tsaPracticePaper :is(#questionContent, #mainResultQuestionContent, [data-wrong-question]) .contentTextBlock {
  margin: 0 0 0.8em !important;
}

.tsaPracticePaper :is(#questionContent, #mainResultQuestionContent, [data-wrong-question]) .contentLatex {
  margin: 0.65em 0 0.85em !important;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px 0;
}

.tsaPracticePaper :is(#questionContent, #mainResultQuestionContent, [data-wrong-question]) > :last-child {
  margin-bottom: 0 !important;
}

.tsaPracticePaper .playQuestionHead .qTitle {
  color: #64748b;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

.tsaPracticePaper #answerArea :is(.ansBtn, .ansChoiceInner, .ansChoicePrefix, .ansChoiceMath, .ddPiece, .shortInput, .hsaMultipartAnswer),
.tsaPracticePaper #questionContent .inlineDropSlot {
  font-family: inherit;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}

.tsaPracticePaper #answerArea .ansBtn {
  font-size: 17px !important;
}

.tsaPracticePaper #answerArea .shortInput::placeholder {
  color: #738196;
  font-weight: 400;
  opacity: 1;
}

.tsaPracticePaper :is(#questionContent, #mainResultQuestionContent, [data-wrong-question], .wrongReviewPreview, #answerArea) mjx-container {
  color: #173b68 !important;
  font-weight: 500 !important;
}

/* MathJax SVG glyphs ignore font-weight. This fine contour is only 8/1000 em;
   do not thicken fraction rules, radicals, diagrams or complete SVG groups. */
.tsaPracticePaper :is(#questionContent, #mainResultQuestionContent, [data-wrong-question], .wrongReviewPreview, #answerArea) mjx-container[jax="SVG"] :is([data-mml-node="mi"], [data-mml-node="mn"], [data-mml-node="mo"]) > use {
  stroke: currentColor;
  stroke-width: 8;
  stroke-linejoin: round;
  paint-order: stroke fill;
}

@media (max-width: 760px) {
  .tsaPracticePaper :is(#questionContent, #mainResultQuestionContent, [data-wrong-question], .wrongReviewPreview) {
    font-size: 17px;
  }
  .tsaPracticePaper #answerArea .ansBtn {
    font-size: 16px !important;
  }
}

.tsaPracticePaper .tsaPracticeFeedback {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}
.tsaPracticePaper .tsaPracticeFeedback.isCorrect { background: #f0fdf4; }
.tsaPracticePaper .tsaPracticeFeedback.isWrong { background: #fef2f2; }
.tsaPracticePaper .tsaPracticeResponseRow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.tsaPracticePaper .tsaPracticeResponseRow #feedback { flex: 1 1 240px; }
.tsaPracticePaper .tsaPracticeResponseRow #feedback:empty { display: none; }
.tsaPracticePaper .tsaPracticeResponseRow .btn { flex: 0 0 auto; }
.tsaPracticePaper #solutionContent .contentTextBlock {
  font-weight: 400 !important;
  line-height: 1.5 !important;
}
.tsaPracticePaper #solutionContent mjx-container {
  color: #173b68;
  font-weight: 500;
}
