/* qxmd307/309 layout lock - loaded last. One owner for: session viewport, header toolbars, info strip,
   question/solution typography, solution end visibility. (Footer geometry stays with examgoal-test-ui.js;
   allen-test-ui.js no longer paints examgoal footers.) */

/* 1) Session viewport: #app-main is position:fixed inset:0 -> never min-height:100vh (large viewport, taller than the
      visible area while the mobile browser bar shows -> content ran under the footer), never transformed (a leftover
      qxPageIn transform turned the fixed footer/header into absolute ones that scrolled away in chapter practice). */
html body.marks-test-active #app-main#app-main.content,
html body.marks-test-active #app-main#app-main,
html body.allen-practice-active #app-main#app-main,
html body.allen-cbt-active #app-main#app-main,
html body.qx-cbt-session #app-main#app-main,
html body.qx-q-fullscreen #app-main#app-main,
html body #app-main#app-main:has(.eg-test-root),
html body #app-main#app-main:has(.mtk-test-root) {
  min-height: 0 !important;
  animation: none !important;
  transform: none !important;
  overscroll-behavior: contain;
}
html body #app-main#app-main .eg-test-root.eg-test-root,
html body #app-main#app-main .eg-test-root.mtk-test-root.mtk-test-root { min-height: 0 !important; }
html body #app-main#app-main .mtk-test-root.allen-practice.allen-practice:not(.eg-test-root) { min-height: 100% !important; }
html body #app-main#app-main .mtk-test-root.allen-practice:not(.eg-test-root) > .mtk-header.mtk-header {
  position: sticky !important; top: 0 !important; z-index: 60 !important;
}
/* stable layout while rendering: no scroll anchoring jumps, no horizontal page drift */
html body.qx-cbt-session, html body.qx-cbt-session #app-main { overflow-x: hidden !important; }
html body #app-main#app-main .eg-test-root .eg-body, html body #app-main#app-main .eg-test-root .eg-main,
html body #app-main:has(.mtk-test-root) { overflow-anchor: none; overflow-x: hidden !important; }

/* 2) Header toolbars: never overflow to the LEFT (flex-end + overflow made Theme/All Q/Palette/Bookmark unreachable
      behind the title). Start-aligned, horizontally scrollable strip, title shrinks first. */
@media (max-width: 900px) {
  html body #app-main#app-main .eg-test-root .eg-top > .eg-top-title,
  html body #app-main#app-main .mtk-test-root .mtk-header .eg-top-title { flex: 1 1 0 !important; min-width: 0 !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
  html body #app-main#app-main .eg-test-root .eg-top > .eg-top-tools.eg-top-tools,
  html body #app-main#app-main .eg-test-root .eg-qx-extras.eg-qx-extras,
  html body #app-main#app-main .eg-test-root .eg-qx-extras > .eg-top-tools.eg-top-tools,
  html body #app-main#app-main .mtk-test-root .mtk-header-tools.mtk-header-tools,
  html body #app-main#app-main .mtk-test-root .qx-prac-tools.qx-prac-tools {
    flex: 0 1 auto !important; min-width: 0 !important; max-width: 100% !important;
    justify-content: flex-start !important; flex-wrap: nowrap !important;
    overflow-x: auto !important; overflow-y: hidden !important; scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; gap: 2px !important; margin-left: auto !important;
  }
  html body #app-main#app-main .eg-test-root .eg-top-tools::-webkit-scrollbar, html body #app-main#app-main .eg-test-root .eg-qx-extras *::-webkit-scrollbar, html body #app-main#app-main .eg-test-root .eg-qx-extras::-webkit-scrollbar,
  html body #app-main#app-main .mtk-test-root .mtk-header-tools::-webkit-scrollbar, html body #app-main#app-main .mtk-test-root .qx-prac-tools::-webkit-scrollbar { display: none !important; }
  html body #app-main#app-main .eg-test-root .eg-top-tools .eg-tool-btn, html body #app-main#app-main .eg-test-root .eg-qx-extras .eg-tool-btn,
  html body #app-main#app-main .eg-test-root .eg-qx-extras > button,
  html body #app-main#app-main .mtk-test-root .mtk-header-tools .eg-tool-btn, html body #app-main#app-main .mtk-test-root .qx-prac-tools .eg-tool-btn {
    flex: 0 0 auto !important; min-width: 40px !important; width: auto !important; padding-left: 3px !important; padding-right: 3px !important;
  }
  html body #app-main#app-main .eg-test-root .eg-tool-btn .eg-tip, html body #app-main#app-main .mtk-test-root .eg-tool-btn .eg-tip { font-size: 10px !important; letter-spacing: 0 !important; white-space: nowrap !important; }
  /* the test tools row spans the full width: spread evenly when it fits */
  html body #app-main#app-main .eg-test-root .eg-qx-extras.eg-qx-extras { margin-left: 0 !important; width: 100% !important; }
  html body #app-main#app-main .eg-test-root .eg-qx-extras.eg-qx-extras > .eg-top-tools.eg-top-tools { flex: 1 1 auto !important; width: 100% !important; margin-left: 0 !important; }
}
@media (max-width: 440px) {
  html body #app-main#app-main .eg-test-root .eg-top > .eg-top-title { min-width: 54px !important; }
  html body #app-main#app-main .eg-test-root .eg-top-tools .eg-tool-btn,
  html body #app-main#app-main .mtk-test-root .mtk-header-tools .eg-tool-btn { min-width: 34px !important; padding-left: 1px !important; padding-right: 1px !important; }
  html body #app-main#app-main .eg-test-root .eg-top-tools .eg-tool-btn .eg-tip,
  html body #app-main#app-main .mtk-test-root .mtk-header-tools .eg-tool-btn .eg-tip { font-size: 9.5px !important; }
}
@media (max-width: 600px) {
  /* All Q duplicates Palette on phones */
  html body #app-main#app-main .eg-test-root[data-eg-mode="practice"] #egAllQBtn.eg-allq-btn { display: none !important; }
}

/* 3) Info strip (Q no, time, marks, exam/date pill, type pill): wrap instead of clipping on phones */
@media (max-width: 600px) {
  html body #app-main#app-main .eg-test-root #egInfoStrip.eg-info-strip {
    flex-wrap: wrap !important; height: auto !important; min-height: 32px !important; max-height: none !important;
    overflow: visible !important; row-gap: 4px !important; padding-top: 4px !important; padding-bottom: 4px !important; align-items: center !important;
  }
  html body #app-main#app-main .eg-test-root #egInfoStrip .eg-paper-line { flex: 0 1 auto !important; max-width: 100% !important; min-width: 0 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  html body #app-main#app-main .eg-test-root #egInfoStrip .eg-type-pill { flex: 0 0 auto !important; }
}

/* 4) One question / solution typography standard (website + app; MARKS photo player untouched) */
html body #app-main#app-main .eg-test-root .eg-q-stem, html body #app-main#app-main .mtk-test-root .mtk-q-text,
html body #app-main#app-main .eg-test-root .eg-opt, html body #app-main#app-main .mtk-test-root .mtk-opt {
  font-size: 18px !important; line-height: 1.65 !important; letter-spacing: 0 !important;
}
html body #app-main#app-main .eg-test-root .eg-q-stem *:not(.katex):not(.katex *), html body #app-main#app-main .mtk-test-root .mtk-q-text *:not(.katex):not(.katex *) { font-size: inherit; line-height: inherit; }
html body #egSolPanel#egSolPanel .qx-sol-flow, html body #qaSolReveal#qaSolReveal .qx-sol-flow, html body #app-main#app-main .qx-sol-card .qx-sol-flow {
  font-size: 17px !important; line-height: 1.72 !important; letter-spacing: 0 !important;
}
html body #egSolPanel#egSolPanel .qx-sol-flow p, html body #qaSolReveal#qaSolReveal .qx-sol-flow p, html body #app-main#app-main .qx-sol-card .qx-sol-flow p,
html body #egSolPanel#egSolPanel .qx-sol-flow .qx-sol-p, html body #qaSolReveal#qaSolReveal .qx-sol-flow .qx-sol-p { font-size: inherit !important; line-height: inherit !important; margin: 0 0 .55em !important; }
html body #app-main#app-main .eg-test-root .eg-q-stem .katex, html body #app-main#app-main .mtk-test-root .mtk-q-text .katex,
html body #app-main#app-main .eg-test-root .eg-opt .katex, html body #app-main#app-main .mtk-test-root .mtk-opt .katex,
html body #egSolPanel#egSolPanel .katex, html body #qaSolReveal#qaSolReveal .katex, html body #app-main#app-main .qx-sol-card .katex { font-size: 1.08em !important; }
@media (max-width: 600px) {
  html body #app-main#app-main .eg-test-root .eg-q-stem, html body #app-main#app-main .mtk-test-root .mtk-q-text,
  html body #app-main#app-main .eg-test-root .eg-opt, html body #app-main#app-main .mtk-test-root .mtk-opt { font-size: 18px !important; }
  html body #egSolPanel#egSolPanel .qx-sol-flow, html body #qaSolReveal#qaSolReveal .qx-sol-flow, html body #app-main#app-main .qx-sol-card .qx-sol-flow { font-size: 17.5px !important; }
}

/* 5) Solution: full text visible. Paragraphs were overflow-x:auto -> also vertical scrollers that clipped tall math
      and showed inner scrollbars; long inline equations could not wrap (katex-html forced inline-block nowrap). */
html body #egSolPanel#egSolPanel .qx-sol-flow p, html body #egSolPanel#egSolPanel .qx-sol-flow .qx-sol-p,
html body #qaSolReveal#qaSolReveal .qx-sol-flow p, html body #qaSolReveal#qaSolReveal .qx-sol-flow .qx-sol-p,
html body #app-main#app-main .qx-sol-card .qx-sol-flow p, html body #app-main#app-main .qx-sol-card .qx-sol-flow .qx-sol-p {
  overflow-x: auto !important; overflow-y: hidden !important; padding-top: .3em !important; padding-bottom: .3em !important;
  max-height: none !important; -webkit-line-clamp: unset !important; scrollbar-width: thin;
}
html body #egSolPanel#egSolPanel .katex:not(.katex-display > .katex),
html body #qaSolReveal#qaSolReveal .katex:not(.katex-display > .katex),
html body #app-main#app-main .qx-sol-card .katex:not(.katex-display > .katex) { white-space: normal !important; max-width: 100%; }
html body #egSolPanel#egSolPanel .katex:not(.katex-display > .katex) > .katex-html,
html body #qaSolReveal#qaSolReveal .katex:not(.katex-display > .katex) > .katex-html,
html body #app-main#app-main .qx-sol-card .katex:not(.katex-display > .katex) > .katex-html { display: inline !important; white-space: normal !important; }
/* wide display math / tables / images pan inside their own box only */
html body #app-main#app-main .eg-test-root .katex-display, html body #app-main#app-main .mtk-test-root .katex-display,
html body #qaSolReveal#qaSolReveal .katex-display, html body #app-main#app-main .qx-sol-card .katex-display {
  overflow-x: auto !important; overflow-y: hidden !important; max-width: 100% !important; padding: .35em 0 !important; -webkit-overflow-scrolling: touch;
}
html body #app-main#app-main .eg-test-root .eg-q-stem table, html body #app-main#app-main .mtk-test-root .mtk-q-text table, html body #app-main#app-main .qx-sol-flow table { display: block; max-width: 100%; overflow-x: auto; }
html body #app-main#app-main .eg-test-root .eg-q-stem img, html body #app-main#app-main .mtk-test-root .mtk-q-text img, html body #app-main#app-main .qx-sol-flow img { max-width: 100% !important; height: auto !important; }
/* clean solution card */
html body #egSolPanel#egSolPanel .qx-sol-card, html body #qaSolReveal#qaSolReveal .qx-sol-card { border-radius: 14px !important; }

/* qxmd309: phone toolbars fit with no sideways scroll. Low-priority tools move to Settings > Tools
   (practice/chapter rows already proxy them; qx-tool-overflow.js adds Print/Proctor/Instructions/Paper for tests). */
@media (max-width: 440px) {
  html body #app-main#app-main .eg-test-root[data-eg-mode="practice"] .eg-top > .eg-top-tools #egPlusBtn,
  html body #app-main#app-main .eg-test-root[data-eg-mode="practice"] .eg-top > .eg-top-tools #egFullBtn,
  html body #app-main#app-main .eg-test-root[data-eg-mode="practice"] .eg-top > .eg-top-tools #mtkReportBtn,
  html body #app-main#app-main .eg-test-root[data-eg-mode="practice"] .eg-top > .eg-top-tools #egAllQBtn,
  html body #app-main#app-main .eg-test-root .eg-qx-extras #egPrintBtn,
  html body #app-main#app-main .eg-test-root .eg-qx-extras #qzrrProctorBtn,
  html body #app-main#app-main .eg-test-root .eg-qx-extras #qzrrInstrBtn,
  html body #app-main#app-main .eg-test-root .eg-qx-extras #qzrrPaperBtn,
  html body #app-main#app-main .mtk-test-root .mtk-header-tools #pracGroupBtn,
  html body #app-main#app-main .mtk-test-root .mtk-header-tools #pracFullBtn,
  html body #app-main#app-main .mtk-test-root .mtk-header-tools #pracReportBtn,
  html body #app-main#app-main .mtk-test-root .mtk-header-tools #pracAllQBtn { display: none !important; }
  html body #app-main#app-main .eg-test-root .eg-top > .eg-top-tools.eg-top-tools,
  html body #app-main#app-main .mtk-test-root .mtk-header-tools.mtk-header-tools,
  html body #app-main#app-main .eg-test-root .eg-qx-extras > .eg-top-tools.eg-top-tools { overflow-x: visible !important; gap: 4px !important; }
  html body #app-main#app-main .eg-test-root .eg-top > .eg-top-tools .eg-tool-btn,
  html body #app-main#app-main .mtk-test-root .mtk-header-tools .eg-tool-btn { min-width: 42px !important; padding-left: 4px !important; padding-right: 4px !important; }
  html body #app-main#app-main .eg-test-root .eg-top-tools .eg-tool-btn .eg-tip,
  html body #app-main#app-main .mtk-test-root .mtk-header-tools .eg-tool-btn .eg-tip { font-size: 10px !important; }
  html body #app-main#app-main .eg-test-root .eg-top > .eg-top-title { min-width: 0 !important; }
  html body #app-main#app-main .eg-test-root .eg-qx-extras > .eg-top-tools.eg-top-tools { justify-content: space-around !important; }
  html body #app-main#app-main .eg-test-root .eg-qx-extras > .eg-top-tools .eg-tool-btn { flex: 1 1 0 !important; min-width: 0 !important; max-width: 72px !important; }
}

/* qxmd309: Instructions / Question Paper modals (opened from the test toolbar or Settings > Tools) were created but
   hidden by a legacy rule in the QUANTREX test format. The wrapper only exists while open (close removes it). */
html body #app-main#app-main .qzrr-modal-backdrop, html body .qzrr-modal-backdrop.qzrr-modal-backdrop {
  display: flex !important; visibility: visible !important; opacity: 1 !important; position: fixed !important; inset: 0 !important;
  z-index: 2147483600 !important; align-items: center !important; justify-content: center !important;
  padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px)) !important;
  background: rgba(15, 23, 42, .5) !important; box-sizing: border-box !important;
  width: 100% !important; height: 100% !important; max-height: none !important; min-height: 0 !important; overflow: hidden !important; transform: none !important;
  pointer-events: auto !important;
}
html body .qzrr-modal-backdrop.qzrr-modal-backdrop * { pointer-events: auto !important; }
html body #app-main#app-main .qzrr-modal-backdrop .qzrr-modal, html body .qzrr-modal-backdrop.qzrr-modal-backdrop .qzrr-modal {
  display: flex !important; flex-direction: column !important; visibility: visible !important; position: relative !important;
  width: min(640px, 100%) !important; height: auto !important; min-height: 0 !important; max-height: 100% !important; border-radius: 14px !important; overflow: hidden !important;
}
html body .qzrr-modal-backdrop .qzrr-modal-body { flex: 1 1 auto !important; min-height: 0 !important; overflow: auto !important; -webkit-overflow-scrolling: touch; }
html body .qzrr-modal-backdrop .qzrr-modal-head, html body .qzrr-modal-backdrop .qzrr-modal-foot { flex: 0 0 auto !important; }

/* qxmd309: home hero card (blue gradient) - light theme text was dark slate/navy on blue (poor contrast). Match dark theme. */
html body .dash-greet-bar.qx-hero h1, html body .dash-greet-bar.qx-hero h2 { color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
html body .dash-greet-bar.qx-hero p { color: rgba(255, 255, 255, .9) !important; -webkit-text-fill-color: rgba(255, 255, 255, .9) !important; }
html body .dash-greet-bar.qx-hero .qx-plan-chip, html body .dash-greet-bar.qx-hero .dash-premium-btn {
  color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; border: 1px solid rgba(255, 255, 255, .35) !important;
}

/* qxmd309: desktop/landscape (sidebar layout) - .main is a flex item with margin-left for the fixed sidebar; min-width:auto let
   its 1100px content push it past the viewport (topbar Login, hero and stats cut off on the right). */
html body .app > .main { min-width: 0 !important; }

/* qxmd309: top bar user chip is an empty circle while logged out (Login link is shown instead) */
html body #qxUserChip.qx-user-chip:empty { display: none !important; }

/* qxmd309: dark theme polish - numeric answer box had a square slate slab behind the input; question palette stayed light */
html[data-theme="dark"] body #app-main#app-main .qx-num-entry, html body #app-main#app-main .eg-test-root.qx-theme-dark .qx-num-entry,
html body #app-main#app-main .eg-test-root[data-test-theme="dark"] .qx-num-entry { background: transparent !important; box-shadow: none !important; }
html[data-theme="dark"] body #app-main#app-main .eg-test-root:not([data-test-theme="light"]) #egSide.eg-side,
html body #app-main#app-main .eg-test-root[data-test-theme="dark"] #egSide.eg-side {
  background: #0f172a !important; color: #e2e8f0 !important; border-color: #334155 !important;
}
html[data-theme="dark"] body #app-main#app-main .eg-test-root:not([data-test-theme="light"]) #egSide .eg-side-head,
html[data-theme="dark"] body #app-main#app-main .eg-test-root:not([data-test-theme="light"]) #egSide .eg-legend,
html body #app-main#app-main .eg-test-root[data-test-theme="dark"] #egSide .eg-side-head,
html body #app-main#app-main .eg-test-root[data-test-theme="dark"] #egSide .eg-legend { color: #e2e8f0 !important; }
html[data-theme="dark"] body #app-main#app-main .eg-test-root:not([data-test-theme="light"]) #egSide .eg-pal-cell.eg-unseen,
html body #app-main#app-main .eg-test-root[data-test-theme="dark"] #egSide .eg-pal-cell.eg-unseen {
  background: #1e293b !important; color: #e2e8f0 !important; -webkit-text-fill-color: #e2e8f0 !important; border-color: #334155 !important;
}
html body #app-main#app-main .eg-test-root #egSide .eg-legend { display: flex !important; flex-wrap: wrap !important; gap: 6px 12px !important; }
html body #app-main#app-main .eg-test-root #egSide .eg-legend > span { display: inline-flex !important; align-items: center !important; gap: 5px !important; white-space: nowrap !important; }

/* qxmd310: test header stayed light in dark theme -> white Exit (X) was invisible */
html body #app-main .eg-test-root.eg-test-root[data-eg-mode="test"][data-test-theme="dark"] header.eg-top.eg-marks-top, html body .eg-test-root.eg-test-root[data-eg-mode="test"][data-test-theme="dark"] header.eg-top.eg-marks-top { background: #0f172a !important; background-color: #0f172a !important; background-image: none !important; border-bottom-color: #1e293b !important; }
html body .eg-test-root.eg-test-root[data-eg-mode="test"][data-test-theme="dark"] #egFoot#egFoot, html body .eg-test-root.eg-test-root[data-eg-mode="test"][data-test-theme="dark"] #egFoot#egFoot.eg-foot-marks-test { background: #0f172a !important; background-color: #0f172a !important; background-image: none !important; border-top-color: #1e293b !important; }
html body .eg-test-root.eg-test-root[data-eg-mode="test"][data-test-theme="dark"] .eg-main.eg-main { background: #0f172a !important; background-color: #0f172a !important; background-image: none !important; }
html body .eg-test-root[data-test-theme="dark"] header.eg-marks-top #qxTimer, html body .eg-test-root.qx-theme-dark header.eg-marks-top #qxTimer { background: #1e293b !important; color: #93c5fd !important; border-color: #1e40af !important; }
html body .eg-test-root[data-test-theme="dark"] header.eg-marks-top #qxSubmitTop, html body .eg-test-root.qx-theme-dark header.eg-marks-top #qxSubmitTop { background: #1e293b !important; color: #fca5a5 !important; border-color: #ef4444 !important; }
html body .eg-test-root[data-test-theme="dark"] header.eg-marks-top #egMarksExitBtn, html body .eg-test-root.qx-theme-dark header.eg-marks-top #egMarksExitBtn { color: #f8fafc !important; border-color: #f8fafc !important; }

/* qxmd311: footer drift fix. The question host scrolled sideways when one long inline equation was wider than the
   phone (test-engine set overflow-x:auto on .eg-body / #qzrrQArea), so the question panel slid left against the
   bottom bar. Hosts never scroll sideways; wide math / tables / code / images scroll inside their own box. */
html body.marks-test-active, html body.allen-practice-active, html body.allen-cbt-active, html body.qx-cbt-session, html body.qx-q-fullscreen,
html:has(body .eg-test-root), html:has(body .mtk-test-root) { overflow-x: hidden !important; }
@supports (overflow: clip) {
  html:has(body .eg-test-root), html:has(body .mtk-test-root), html body:has(.eg-test-root), html body:has(.mtk-test-root) { overflow-x: clip !important; }
}
html body .eg-test-root .eg-body, html body .eg-test-root #egQArea.eg-body, html body #qzrrQArea, html body .qzrr-q-area,
html body #app-main#app-main .eg-test-root .eg-main, html body #app-main#app-main .eg-test-root .eg-q-card { overscroll-behavior-x: none; }
html body .eg-test-root .eg-q-stem, html body .eg-test-root .eg-opt, html body .mtk-test-root .mtk-q-text, html body .mtk-test-root .mtk-opt,
html body .qzrr-cbt .mtk-q-text, html body .qx-sol-flow { min-width: 0; max-width: 100%; overflow-wrap: break-word; word-break: normal; }
html body .eg-test-root .katex.qx-katex-wide, html body .mtk-test-root .katex.qx-katex-wide, html body .qzrr-cbt .katex.qx-katex-wide,
html body #qaSolReveal .katex.qx-katex-wide, html body #egSolPanel .katex.qx-katex-wide, html body .qx-sol-card .katex.qx-katex-wide {
  display: inline-block !important; max-width: 100% !important; overflow-x: auto !important; overflow-y: hidden !important;
  vertical-align: middle !important; padding: .28em 0 !important; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: thin;
}
html body .eg-test-root .katex.qx-katex-wide > .katex-html, html body .mtk-test-root .katex.qx-katex-wide > .katex-html, html body .qzrr-cbt .katex.qx-katex-wide > .katex-html,
html body .qx-sol-card .katex.qx-katex-wide > .katex-html { white-space: nowrap !important; display: inline-block !important; }
html body .eg-test-root pre, html body .mtk-test-root pre, html body .qzrr-cbt pre, html body .qx-sol-flow pre { max-width: 100%; overflow-x: auto; white-space: pre; }
html body .eg-test-root .eg-opt img, html body .mtk-test-root .mtk-opt img, html body .qzrr-cbt img, html body .qx-sol-flow img, html body .eg-test-root svg:not(.katex svg) { max-width: 100% !important; height: auto; }
html body .eg-test-root .eg-opt table, html body .mtk-test-root .mtk-opt table, html body .qzrr-cbt table { display: block; max-width: 100%; overflow-x: auto; }
html body .eg-test-root mjx-container, html body .mtk-test-root mjx-container { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
/* fixed footers: full width of the layout viewport, notch-safe side padding */
html body .eg-test-root > #egFoot, html body .eg-test-root #egFoot, html body .mtk-test-root .qx-prac-foot {
  left: 0 !important; right: 0 !important; max-width: 100% !important; transform: none !important; translate: none !important; box-sizing: border-box !important;
  padding-left: max(12px, env(safe-area-inset-left, 0px)) !important; padding-right: max(12px, env(safe-area-inset-right, 0px)) !important;
}

/* qxmd327: report card must scroll. Do not inherit CBT overflow:hidden + overflow:visible trap. */
html body.qzrr-analysis-active #app-main#app-main,
html body.marks-results-active #app-main#app-main,
html body.qx-q-fullscreen #app-main#app-main:has(#qzAnPage),
html body.qx-cbt-session #app-main#app-main:has(#qzAnPage) {
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  min-height: 0 !important;
  position: fixed !important;
  inset: 0 !important;
}
html body.qzrr-analysis-active #egFoot,
html body.marks-results-active #egFoot,
html body #app-main:has(#qzAnPage) #egFoot {
  display: none !important;
}
