/* ===== Printed page styles ===== */
.page { position: relative; background: #fff; color: #000; overflow: hidden; box-sizing: border-box;
  font-family: var(--f-main); font-size: var(--fs); line-height: var(--lh); }
.page * { box-sizing: border-box; }
.page [lang="hi"], .page [lang="sa"], .page.lang-main-hi, .page.lang-main-sa { font-family: var(--f-deva); }
.page [lang="en"] { font-family: var(--f-main); }
.page [lang="ur"], .page.lang-main-ur { font-family: var(--f-ur); line-height: calc(var(--lh) * 1.55); }
.page [lang="sa"] { font-size: 1.04em; }
.page .katex { font-size: 1.08em; }
.page .mdisp { text-align: center; margin: 1mm 0; }
.page .mdisp .katex-display { margin: 0; }
.wm { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 60pt; font-weight: 700;
  color: rgba(0, 0, 0, .06); transform: rotate(-35deg); pointer-events: none; white-space: nowrap; }
.pborder { position: absolute; border: 1.2pt solid #000; outline: .4pt solid #000; outline-offset: -1.4mm; pointer-events: none; }
.pfoot { position: absolute; display: flex; justify-content: space-between; font-size: 8.5pt; color: #333; border-top: .4pt solid #999; padding-top: .8mm; }
.pfoot span:only-child { margin-inline-start: auto; }

/* header */
.hdr { flex: none; margin-bottom: 2mm; }
.ph { border-bottom: 1.2pt solid #000; padding-bottom: 1.5mm; }
.ph-classic { border-bottom: 3pt double #000; }
.ph-boxed { border: 1.2pt solid #000; padding: 2mm 3mm; }
.ph-minimal { border-bottom: .6pt solid #000; }
.ph-top { display: flex; align-items: center; gap: 3mm; }
.ph-top .logo { width: 16mm; height: 16mm; object-fit: contain; }
.ph-top .logo-sp { width: 16mm; }
.ph-t { flex: 1; text-align: center; }
.ph-minimal .ph-t { text-align: start; }
.sch { font-size: 1.45em; font-weight: 700; line-height: 1.2; }
.adr { font-size: .85em; }
.exm { font-size: 1.1em; font-weight: 700; margin-top: .5mm; }
.setbox { border: 1.2pt solid #000; padding: .5mm 3mm; text-align: center; font-size: .85em; line-height: 1.2; }
.setbox b { font-size: 1.6em; }
.ph-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1mm 6mm; margin-top: 1mm; font-size: .95em; }
.ph-row:empty { display: none; }
.rollb { display: inline-flex; vertical-align: middle; }
.rollb i { width: 5.5mm; height: 6mm; border: .8pt solid #000; margin-inline-end: -.8pt; display: inline-block; }
.nameline { display: inline-block; width: 55mm; border-bottom: .6pt solid #000; }
.gi { margin-top: 1.5mm; font-size: .92em; }
.gi-t { font-weight: 700; }
.gi ol { margin: .5mm 0 0; padding-inline-start: 6mm; }
.rhdr { flex: none; display: flex; justify-content: space-between; font-size: 8.5pt; border-bottom: .4pt solid #999; margin-bottom: 2mm; padding-bottom: .5mm; }

/* columns */
.cols { column-gap: var(--cgap); }
.cols.rule .col + .col { border-inline-start: .5pt solid #777; padding-inline-start: calc(var(--cgap) / 2); margin-inline-start: calc(var(--cgap) / -2); }
.col { overflow: hidden; min-width: 0; }
.col.over { box-shadow: inset 0 -3px 0 #e53935; }

/* section */
.sec { padding-top: 1.5mm; padding-bottom: 1mm; }
.sec .st { font-weight: 700; font-size: 1.08em; }
.sec .si { font-size: .93em; font-style: normal; }
.sec-center { text-align: center; }
.sec-left { text-align: start; }
.sec-boxed { text-align: center; }
.sec-boxed .st { display: inline-block; border: 1pt solid #000; padding: 0 4mm; }
.sec-underline .st { text-decoration: underline; text-align: center; }

/* question */
.q { padding-bottom: var(--qgap); break-inside: avoid; }
.qrow { display: flex; align-items: flex-start; gap: 1.5mm; }
.qn { flex: none; min-width: 6.5mm; font-weight: 700; }
.qb { flex: 1; min-width: 0; }
.mk { flex: none; font-weight: 700; padding-inline-start: 2mm; white-space: nowrap; }
.mk-in { font-weight: 700; white-space: nowrap; }
.qt2 { margin-top: .3mm; }
.q-passage.boxed .qb { border: .6pt solid #000; padding: 1.5mm 2.5mm; }
.ptitle { font-weight: 700; text-align: center; margin-bottom: .5mm; }
.tfh { font-size: .9em; }
.orl { text-align: center; font-weight: 700; margin: .8mm 0; }
.blank { display: inline-block; border-bottom: .7pt solid #000; height: 1em; vertical-align: baseline; }
.qimg { margin: 1mm 0; text-align: center; }
.qimg img { max-width: 100%; }
.opts { display: grid; gap: .4mm 3mm; margin-top: .6mm; }
.opt { display: flex; gap: 1.2mm; min-width: 0; }
.ol { flex: none; }
.ot { min-width: 0; }
.mt { border-collapse: collapse; width: 100%; margin-top: .8mm; }
.mt th, .mt td { border: .5pt solid #000; padding: .4mm 1.5mm; text-align: start; vertical-align: top; }
.mt th { font-weight: 700; }
.ml { font-weight: 600; }
.alines { margin-top: 1mm; }
.aline { height: 7.5mm; border-bottom: .5pt solid #999; }
.kq .qb { min-width: 0; }
.muted { color: #888; }
.math-err { color: #c00; font-family: monospace; }
.q[dir=rtl] .qn, .page.rtl .qn { direction: ltr; text-align: right; unicode-bidi: isolate; }
.q[dir=rtl] .mk, .page.rtl .mk { unicode-bidi: isolate; }
.qt.ctr { text-align: center; }
.rtab { border-collapse: collapse; margin: 1mm 0; max-width: 100%; }
.rtab th, .rtab td { border: .6pt solid #000; padding: .5mm 2mm; vertical-align: top; text-align: start; }
.rtab th { font-weight: 700; text-align: center; }
.rtab td.bl { min-width: 20mm; height: 7mm; }
.q[dir=rtl] .rtab th, .q[dir=rtl] .rtab td { text-align: right; }
