/* Exam typography: neutral text inherits the active theme; teal marks instructions,
   never a correct answer. Scoped away from the administrator and other subjects. */
.math-question.math-question { color:inherit; font-size:1rem; line-height:1.75; font-weight:400; text-align:left; min-width:0; margin:1.5rem 0; }
.math-question .math-source { font-size:.8rem; letter-spacing:.06em; opacity:.75; margin-bottom:.4rem; }
.math-question .math-title { color:inherit; font-size:1.35rem; line-height:1.35; font-weight:700; margin:0 0 1.4rem; }
.math-question p { font:inherit; margin:0 0 1rem; color:inherit; }
.math-question .math-command { font-weight:650; color:var(--math-command-color, #087e75); margin-top:1.35rem; }
.math-question .math-data { background:rgba(20,155,140,.07); border:1px solid rgba(20,155,140,.22); border-radius:12px; padding:1rem; margin:1rem 0 1.4rem; display:flex; flex-wrap:wrap; gap:1rem 1.8rem; font-weight:400; }
.math-question .math-data > div { min-width:0; max-width:100%; }
.math-question .math-condition { border-left:3px solid var(--math-command-color,#087e75); padding-left:1rem; }
.math-question .math-statements { padding-left:1.6rem; margin:.75rem 0 1.4rem; }
.math-question .math-statements > li { padding:.8rem 0 .8rem .4rem; border-bottom:1px solid rgba(128,128,128,.25); }
.math-question .math-statements > li::marker { color:var(--math-command-color,#087e75); font-weight:650; }
.math-question .math-statements p { margin:0; }
.math-inline { font-size:1.18em; font-weight:400; vertical-align:middle; max-width:100%; padding:.15em 0; }
.math-verdicts { display:grid; grid-template-columns:1fr 1fr; gap:.7rem 1.5rem; width:100%; }
.math-verdicts > span { display:flex; flex-direction:column; }
.math-verdicts small { font-size:.7em; font-weight:400; opacity:.75; }
.exam-opt-text:has(.math-verdicts), .answer-text:has(.math-verdicts) { flex:1; min-width:0; }
.daily-answer-grid:has(.math-verdicts), .daily-answer-grid:has(.math-inline) { grid-template-columns:1fr; }
/* The student game uses a fixed dark surface even when the browser is in light mode. */
.adventure-dialog .math-question, .adventure-dialog { --math-command-color:#39dcc2; }
@media (max-width:480px) {
 .math-question.math-question { line-height:1.7; }
 .math-question .math-data { padding:.8rem; gap:1rem; }
 .math-inline { font-size:1.1em; }
}

.math-question p.math-data { display:block; }
.math-expression { display:inline; }
.math-expression > math { margin-right:.15em; }
.math-blank { display:inline-block; min-width:2.5em; margin:0 .2em; text-align:center; border-bottom:2px solid var(--math-command-color,#087e75); color:var(--math-command-color,#087e75); }

/* PDF diagrams retain their original paper background and sharp labels. */
.math-figure { margin:1.25rem 0; text-align:center; }
.math-figure img { display:block; width:auto; max-width:100%; max-height:none; height:auto; margin:auto; padding:8px; box-sizing:border-box; background:#fff; border-radius:8px; }
.math-figure figcaption { margin-top:.5rem; font-size:.8rem; color:inherit; }
.math-figure a { color:inherit; }
.math-choice-image { display:block; width:auto; max-width:100%; height:auto; max-height:none; margin:.6rem auto 0; padding:8px; box-sizing:border-box; background:#fff; border-radius:6px; }
.adventure-dialog .exam-opts.has-images .exam-opt img { max-height:none; width:auto; max-width:100%; }
.adventure-dialog .daily-answer-grid:has(.math-choice-image) { grid-template-columns:repeat(2,minmax(0,1fr)); }
.adventure-dialog .daily-answer-grid:has(.math-choice-image) button { flex-direction:column; align-items:stretch; text-align:left; }
.adventure-dialog .daily-answer-grid:has(.math-choice-image) .answer-text { width:100%; min-width:0; }
.adventure-dialog .daily-answer-grid:has(.math-choice-image) .answer-letter { align-self:flex-start; }
@media(max-width:380px){.adventure-dialog .daily-answer-grid:has(.math-choice-image),.adventure-dialog .exam-opts.has-images{grid-template-columns:1fr;}}
/* Wykresy do zadań ze statystyki (math-content.js chartSVG): kolory serii, tekst dziedziczy kolor motywu. */
.math-chart{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;margin:10px 0;color:inherit}
.math-chart svg{display:block;flex:0 1 auto}
.math-chart-title{flex-basis:100%;font-weight:600;font-size:14px}
.math-chart-legend{list-style:none;margin:0;padding:0;display:grid;gap:4px;font-size:13px}
.math-chart-legend li{display:flex;align-items:center;gap:6px}
.math-chart-legend span{width:12px;height:12px;border-radius:3px;flex:0 0 12px}
.math-chart-unit{flex-basis:100%;margin:0;font-size:12px;opacity:.75}
