/* question-render.css - presentation for TextFormat='html' question content
   rendered by Scripts/question-render.js (2026-08-15). Scoped under .qr-html
   so legacy plain-text surfaces are untouched. Tokens come from _tokens.css
   on every page that loads this sheet. */

/* Many host containers keep white-space:pre-wrap for 'plain' rows; stored
   html is pretty-printed (newlines/indent between tags), so pre-wrap must not
   reach rendered markup or every structural newline doubles the block gaps.
   Authored line breaks survive as real <br> - the renderer promotes them.
   !important is load-bearing: the host page's container rule (.qbr-ms etc.)
   has equal specificity and usually comes later in the cascade. */
.qr-html { white-space: normal !important; }

.qr-html p { margin: 0 0 10px; }
.qr-html p:last-child { margin-bottom: 0; }

.qr-html ul, .qr-html ol { margin: 8px 0 10px; padding-left: 22px; }
.qr-html li { margin: 3px 0; }

.qr-html code, .qr-html pre {
    font-family: var(--font-mono, 'IBM Plex Mono', monospace);
    font-size: 0.92em;
}
.qr-html pre {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 4px;
    overflow-x: auto;
    white-space: pre-wrap;
}

.qr-html table {
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.95em;
}
.qr-html th, .qr-html td {
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 5px 10px;
    text-align: left;
}
.qr-html th { font-weight: 600; }
.qr-html caption {
    caption-side: top;
    text-align: left;
    font-size: 0.85em;
    opacity: 0.75;
    padding-bottom: 4px;
}

/* KaTeX display math: breathing room, horizontal scroll instead of overflow */
.qr-html .katex-display {
    margin: 12px 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0;
}
