.typeset-question { font: inherit; color: inherit; overflow-wrap: break-word; }
.typeset-question p { margin: 0 0 1em; line-height: 1.7; }
.typeset-question code, .choice-code { font-family: Consolas, "Cascadia Code", monospace; font-size: .94em; }
.question-code { margin: 1em 0; padding: 1em; background: #f6f8fb; border: 1px solid #dce2eb; border-radius: 6px; white-space: pre; overflow-x: auto; max-width: 100%; font-size: 1em; line-height: 1.5; overflow-wrap: normal; }
.question-code code { font-size: .94em; }
.question-table-wrap { overflow-x: auto; margin: 1em 0; }
.question-table { border-collapse: collapse; font: inherit; max-width: 100%; }
.question-table td, .question-table th { border: 1px solid #8e99a8; padding: .5em .75em; text-align: left; vertical-align: top; }
.question-figure { margin: 1.2em 0; }
.question-diagram { display: block; max-width: 100%; height: auto; object-fit: contain; }
.choice-text { min-width: 0; }
.choice-code { display: block; white-space: pre-wrap; text-align: left; overflow-wrap: anywhere; line-height: 1.5; }
.choice-prose { display: block; }
.semantic-math { max-width: 100%; }
.typeset-question .katex-display { overflow-x: auto; overflow-y: hidden; padding: .35em 0; margin: 1em 0; }
@media (max-width: 600px) { .question-code { padding: .75em; } .question-table td { padding: .4em; } }
.choice-table-wrap { display: block; max-width: 100%; overflow-x: auto; }
.choice-table { display: table; border-collapse: collapse; font: inherit; }
.choice-table [role="rowgroup"] { display: table-row-group; }
.choice-table [role="row"] { display: table-row; }
.choice-table [role="cell"] { display: table-cell; padding: .35em .5em; border: 1px solid #8e99a8; white-space: nowrap; }
.stem .katex, .choice-text .katex { font-size: 1.06em; }

.question-table td, .question-table th { overflow-wrap: normal; word-break: normal; }
.question-table { max-width: none; }

/* Code layout: preserve indentation and contain scrolling within each listing. */
.question-code, .question-code code, .choice-code { tab-size: 4; font-variant-ligatures: none; text-align: left; }
.choice-text { min-width: 0; }
.choice-code { white-space: pre; overflow-wrap: normal; overflow-x: auto; max-width: 100%; }
.code-alternative-label { margin: 1em 0 .25em; }
.code-alternative-label + .question-code { margin-top: .25em; }
