/* 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; }
/* Real CKE exam task (math-content.js ckeBadge): one static green-neon label on every screen, loaded site-wide. */
.e8k-cke-badge { display:table; max-width:100%; box-sizing:border-box; margin:0 0 12px; padding:8px 12px; border:1px solid #6df5d2; border-radius:8px; background:#102b30; color:#a7ffe8; font-size:13px; font-weight:800; line-height:1.5; letter-spacing:.04em; text-align:left; text-transform:none; box-shadow:0 0 12px #36ebbd30; overflow-wrap:anywhere; }
.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}
.math-chart-series{display:flex;flex-wrap:wrap;gap:4px 14px;flex-basis:100%}

/* Geometry worksheets: touch scratchpad and optional local calculator. */
.gd-tools{display:flex;flex-wrap:wrap;gap:1rem;align-items:flex-start;margin:1rem 0;color:inherit}
.gd-desk,.gd-calculator{box-sizing:border-box;border:1px solid #458c9d88;border-radius:14px;padding:14px;min-width:0;background:#458c9d0c;color:inherit}
.gd-desk{flex:1 1 420px}.gd-calculator{flex:1 1 230px;max-width:360px}.gd-desk h4{margin:0 0 .5rem}.gd-desk p,.gd-calculator p{font-size:.9rem;line-height:1.5}.gd-calculator summary{font-weight:700;cursor:pointer;min-height:32px}
.gd-toolbar,.gd-coordinates{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.gd-tools button{font:inherit;font-size:.85rem;min-height:44px;padding:6px 12px;border:1px solid #458c9d88;border-radius:8px;background:transparent;color:inherit;cursor:pointer}.gd-tools button[aria-pressed=true]{background:#176bb0;color:#fff;border-color:#176bb0}.gd-tools button:disabled{opacity:.45}.gd-tools button:focus-visible,.gd-tools input:focus-visible{outline:3px solid #d79314;outline-offset:2px}
.gd-board{position:relative;aspect-ratio:5/3;background-color:#fff;background-image:linear-gradient(#ccdfe8 1px,transparent 1px),linear-gradient(90deg,#ccdfe8 1px,transparent 1px);background-size:3.333333% 5.555556%;border:1px solid #7099ac;border-radius:8px;overflow:hidden}
.gd-board svg,.gd-reference{position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:fill}.gd-reference{pointer-events:none;opacity:.8}.gd-board [data-gd-ink]{touch-action:none;user-select:none;cursor:crosshair;background:transparent}.gd-protractor{pointer-events:none}.gd-protractor[hidden]{display:none}.gd-snap{display:flex;gap:8px;align-items:center;min-height:40px}.gd-snap input{width:20px;height:20px}
.gd-tools input[type=text],.gd-tools input[type=number]{box-sizing:border-box;min-width:0;border:1px solid #458c9d88;border-radius:6px;padding:8px;background:transparent;color:inherit;font:inherit}.gd-calculator label{display:block}.gd-calculator input{display:block;width:100%;margin:8px 0}.gd-coordinates label{display:flex;flex-direction:column;gap:4px;width:55px}.gd-coordinates input{width:100%;min-height:44px}.gd-keys{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.gd-keys [data-gd-reset],.gd-keys [data-gd-equals]{grid-column:span 2}.gd-keys [data-gd-equals]{background:#176bb0;color:white}.gd-calculator output{display:block;overflow-wrap:anywhere;padding-top:12px;font-weight:700}
@media(max-width:480px){.gd-desk,.gd-calculator{padding:10px}.gd-calculator{max-width:none}.gd-toolbar button{flex:1 1 28%;padding:6px}.gd-coordinates{gap:5px}}
.gd-protractor-controls{display:grid;gap:8px;margin:12px 0}.gd-protractor-controls[hidden]{display:none}.gd-protractor-controls label{display:grid;grid-template-columns:1fr 2fr 3ch;align-items:center;gap:6px;font-size:.85rem}.gd-protractor-controls input{min-width:0;width:100%;min-height:36px}
.gd-exercise{display:flex;flex-wrap:wrap;align-items:flex-start;gap:16px}.gd-illustration{flex:1 1 300px;min-width:0}.gd-illustration .math-figure{margin:1rem 0}.gd-side-tools{flex:1 1 230px;max-width:360px;min-width:0}.gd-side-tools .gd-calculator{max-width:none;width:100%}@media(max-width:600px){.gd-side-tools{max-width:none}}
