/* Shared across all pupil activities and teacher copies. */
.math-editor-wrap{margin:10px 0}.math-toolbar{display:flex;gap:5px;flex-wrap:wrap;padding:7px;background:#f1f5f7;border:1px solid #cbd8df;border-radius:8px 8px 0 0}.math-toolbar button{font:inherit;font-size:14px;border:1px solid #cbd8df;border-radius:5px;padding:4px 10px;min-height:32px;color:#284e60;background:white;cursor:pointer}.math-toolbar button:hover{background:#e6f2f3}.math-toolbar button:disabled{opacity:.45;cursor:default}.math-editor{min-height:105px;padding:14px;border:1px solid #cbd8df;border-radius:0 0 8px 8px;outline:none;line-height:2.1;font-size:16px;background:white;color:#243648;white-space:pre-wrap;overflow-wrap:anywhere}.math-editor:focus{box-shadow:inset 0 0 0 2px #4e8a91}.math-editor:empty:before{content:attr(data-placeholder);color:#83939f;pointer-events:none}.math-editor[contenteditable=false]{background:#f8fafb}.math-help{font-size:12px;color:#687988;margin:5px 0}.math-readonly{line-height:2;white-space:pre-wrap;overflow-wrap:anywhere}.math-source{display:none!important}
.math{white-space:nowrap;display:inline-block;font-family:Cambria,'Times New Roman',serif;line-height:1.3;vertical-align:middle;margin:0 .12em}.fraction{display:inline-flex;flex-direction:column;text-align:center;vertical-align:middle;min-width:1.2em}.slot{display:inline-block;min-width:.75em;min-height:1.2em;outline:none}.fraction>.slot{padding:1px 7px}.fraction>.num{border-bottom:1.5px solid currentColor}.slot:empty:before{content:'\200b'}.math-editor .slot:empty{background:#edf3fb;min-width:1em}.math-editor .slot:focus{background:#edf6f7}.power,.index{vertical-align:baseline}.power>.slot,.index>.slot{font-size:.72em;position:relative}.power>.slot{top:-.6em}.index>.slot{top:.3em}.radical{display:inline-flex;align-items:stretch}.radical:before{content:'';display:block;flex:0 0 .75em;align-self:stretch;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 100' preserveAspectRatio='none'%3E%3Cpath d='M0 55 L3 52 L6 96 L11 1 L12 1' fill='none' stroke='white' stroke-width='1.4' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center/100% 100% no-repeat;print-color-adjust:exact;-webkit-print-color-adjust:exact}.radical>.slot{border-top:1.5px solid;padding:3px 4px 0}
@media print{.math-toolbar,.math-help{display:none!important}.math-editor{border:0;min-height:0;padding:0}.math-editor-wrap{break-inside:avoid}.math-editor-wrap+.print-text{display:none!important}}

.math.overbar>.slot{border-top:1.5px solid currentColor;padding:0 3px}.math-editor-wrap[hidden]{display:none!important}.math-mode-toggle{display:block;margin:8px 0 5px auto;font:inherit;font-size:12px;padding:5px 10px;border:1px solid #cbd8df;border-radius:6px;background:#f3f7f9;color:#284e60;cursor:pointer}.math-mode-toggle[aria-pressed=true]{background:#e6f2f3}.math-mode-toggle:disabled{opacity:.5;cursor:default}@media print{.math-mode-toggle{display:none!important}}

.math-greek{position:relative}.math-greek>summary{list-style:none;cursor:pointer;padding:5px 10px;border:1px solid #ccd5df;border-radius:6px;background:white;font:inherit}.math-greek>summary::-webkit-details-marker{display:none}.math-greek>summary:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.math-greek>summary[aria-disabled="true"]{opacity:.5;cursor:default}.math-greek-panel{position:absolute;z-index:50;left:0;top:calc(100% + 6px);width:min(320px,80vw);padding:14px;background:#fff;color:#24354b;border:1px solid #cbd5e1;border-radius:10px;box-shadow:0 8px 24px #15304d33}.math-greek-panel>strong,.math-greek-panel>small{display:block;margin:0 0 6px}.math-greek-panel>small{margin-top:10px}.math-greek-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px}.math-toolbar .math-greek-grid button{padding:5px 0;min-width:0;font-size:18px}

/* Portable typography in subject prose. */
.text-size-12{font-size:12px}.text-size-14{font-size:14px}.text-size-16{font-size:16px}.text-size-18{font-size:18px}.text-size-20{font-size:20px}.text-size-24{font-size:24px}.text-size-28{font-size:28px}.text-size-32{font-size:32px}

/* Parentheses follow the full height of their content, including nested fractions. */
.math.parentheses{display:inline-flex;align-items:stretch;gap:.06em}.math.parentheses:before,.math.parentheses:after{content:'';display:block;flex:0 0 .38em;align-self:stretch;min-height:1.3em;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 100' preserveAspectRatio='none'%3E%3Cpath d='M11 2 C0 20 0 80 11 98' fill='none' stroke='white' stroke-width='1.5' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center/100% 100% no-repeat;print-color-adjust:exact;-webkit-print-color-adjust:exact}.math.parentheses:after{transform:scaleX(-1)}.math.parentheses>.slot{padding:1px 2px}
