/* Kalam (SIL Open Font License, fonts/Kalam-OFL.txt): the handwriting of the worked solutions, served with the papers */
@font-face { font-family: "Kalam"; font-style: normal; font-weight: 400; font-display: swap; src: url("/papers/fonts/kalam-400.woff2") format("woff2"); }
@font-face { font-family: "Kalam"; font-style: normal; font-weight: 700; font-display: swap; src: url("/papers/fonts/kalam-700.woff2") format("woff2"); }
/* Chalkbox practice papers: exact A4 pages (210 x 297 mm) on screen and in print. Board layouts: .aqa, .edexcel, .ocr */
.cbp { --z: 1; font-family: Arial, "Liberation Sans", Helvetica, sans-serif; color: #000; }
.pgw { position: relative; width: calc(210mm * var(--z)); height: calc(297mm * var(--z)); margin: 0 auto 18px; box-shadow: 0 1px 2px rgba(38,16,31,.12), 0 6px 24px rgba(38,16,31,.10); background: #fff; }
.pg { position: absolute; left: 0; top: 0; width: 210mm; height: 297mm; overflow: hidden; background: #fff; transform: scale(var(--z)); transform-origin: 0 0;
  font-size: 11pt; line-height: 1.38; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pg * { box-sizing: border-box; }
.ink, .inkimg { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: multiply; }
.inkimg { pointer-events: none; }

/* frame: page no. top-left, brand top-right, QR bottom-left, © bottom-centre, "Turn over" bottom-right */
.ph { position: absolute; left: 14mm; right: 14mm; top: 7mm; height: 8mm; display: flex; align-items: center; gap: 4mm; font-size: 8pt; color: #333; border-bottom: .3mm solid var(--pen, #cc0e66); }
.ph .pno { font-weight: 700; color: var(--pen, #cc0e66); background: var(--pen-soft, #f4eaef); border-radius: 1.5mm; padding: .4mm 2mm; white-space: nowrap; }
.ph .pnm { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph .brand { display: flex; align-items: center; gap: 1.6mm; white-space: nowrap; }
.ph .brand b { font-size: 10pt; letter-spacing: -.02em; color: var(--pen, #26101f); }
.ph .brand span { color: var(--pen, #cc0e66); font-weight: 700; }
.pf { position: absolute; left: 10mm; right: 14mm; bottom: 5mm; height: 15mm; display: flex; align-items: flex-end; gap: 4mm; font-size: 7pt; color: #555; }
.pf .qrw { display: flex; align-items: flex-end; gap: 1.6mm; line-height: 1.2; min-width: 34mm; }
.pf .qr { display: block; }
.pf .cp { flex: 1; text-align: center; padding-bottom: 1mm; color: var(--pen, #555); }
.pf .qrw > span { color: var(--pen, #555); }
.pg .side { color: var(--pen, inherit); }
.pf .to { min-width: 26mm; text-align: right; font-weight: 700; font-size: 9pt; color: #000; padding-bottom: 1mm; }
.side { position: absolute; left: 6mm; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); white-space: nowrap; font-size: 6.5pt; color: #c9aebb; letter-spacing: .04em; }
.edexcel.q .side { left: 4.5mm; }
.mtx { position: absolute; top: 50%; white-space: nowrap; font-size: 6.5pt; color: #8a8a8a; letter-spacing: .08em; text-transform: uppercase; }
.mtx.r { right: 6mm; transform: translate(50%, -50%) rotate(90deg); }
.mtx.l { left: 11mm; transform: translate(-50%, -50%) rotate(-90deg); }
.pb { position: absolute; left: 18mm; right: 18mm; top: 19mm; bottom: 23mm; overflow: hidden; }
.aqa.q .pb { right: 20mm; }
.aqa.q::after { content: ""; position: absolute; top: 18mm; bottom: 22mm; right: 13mm; border-right: .3mm solid #000; }
.edexcel.q .pb { left: 21mm; right: 21mm; }

/* text and maths */
.pb p { margin: 0 0 2.2mm; }
.ctr { display: block; text-align: center; margin: 1.5mm 0; line-height: 1.7; }
.m { white-space: nowrap; }
.m i { font-family: "Times New Roman", "Liberation Serif", serif; font-size: 1.12em; }
.m .rm { font-style: normal; }
.fr { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 .4mm; font-size: .92em; line-height: 1.1; }
.fr > span:first-child { border-bottom: .25mm solid currentColor; padding: 0 .6mm; }
.fr > span:last-child { padding: 0 .6mm; }
.sq > span { border-top: .25mm solid currentColor; padding: 0 .4mm; }
.sq .ix { font-size: .65em; margin-right: -.6mm; }
.rd { position: relative; } .rd::before { content: "•"; position: absolute; left: 50%; top: -.75em; transform: translateX(-50%); font-size: .7em; }
.ar { position: relative; display: inline-block; font-style: normal; } .ar::before { content: "→"; position: absolute; left: 0; right: 0; top: -.78em; text-align: center; font-size: .8em; line-height: 1; }
.ol { border-top: .25mm solid currentColor; }
.vec { font-weight: 700; font-style: normal; font-family: Arial, "Liberation Sans", sans-serif; }
.cv { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.05; border-left: .3mm solid; border-right: .3mm solid; border-radius: 2mm; padding: 0 1.4mm; }
.gap { display: inline-block; width: 22mm; border-bottom: .25mm solid; }
.tbox { display: inline-block; width: 6mm; height: 6mm; border: .3mm solid; vertical-align: middle; }
.blank { display: inline-block; width: 14mm; border-bottom: .3mm dotted; }

/* questions */
.qpart { padding-top: 2mm; }
.qrow { display: grid; grid-template-columns: 17mm 1fr; }
.qnum { font-weight: 700; display: flex; gap: 1.6mm; align-items: flex-start; }
.qrow.intro + .qrow .qnum .qn:empty { display: none; }
.qn.sci { display: inline-flex; align-items: center; gap: .4mm; }
.nb { display: inline-grid; place-items: center; width: 5.2mm; height: 5.6mm; border: .3mm solid #000; font-size: 10pt; }
.qn.sci .dot { margin: 0 .3mm; }
.aqa.sci-paper .qrow { grid-template-columns: 24mm 1fr; }
.qbody { min-width: 0; }
.mk { text-align: right; font-weight: 700; margin: 1mm 0 1.2mm; }
.mk.ocr { font-weight: 700; margin: 0 0 0 2mm; white-space: nowrap; }
.mk.edx { margin-top: 1.6mm; }
.ws { height: 20mm; }
.al { display: flex; align-items: flex-end; justify-content: flex-end; gap: 2mm; margin: 2mm 0 1mm; }
.al .lab { white-space: nowrap; }
.al .ln { width: 62mm; border-bottom: .3mm solid #000; height: 6mm; }
.al .dl { width: 66mm; border-bottom: .5mm dotted #000; height: 6mm; }
.al .un { white-space: nowrap; }
.al.nl .sp { flex: 1; }
.rsn { display: grid; grid-template-columns: auto 1fr; column-gap: 2mm; align-items: end; margin: 1mm 0; } .rsn i { grid-column: 2; height: 8mm; border-bottom: .3mm solid #000; } .rsn span { grid-row: 1; align-self: end; }
.edexcel .rsn i, .ocr .rsn i { border-bottom: .5mm dotted #000; }
.wl { height: 8.5mm; border-bottom: .25mm solid #9a9a9a; }
.edexcel .wl, .ocr .wl { border-bottom: .5mm dotted #000; }
.hint { font-weight: 700; margin: 1mm 0; font-size: 10pt; }
.mcq { display: flex; justify-content: space-around; gap: 3mm; margin: 3mm 0 3mm; }
.mcq .opt { border: .3mm solid #000; min-width: 24mm; text-align: center; padding: 2mm 3mm; }
.tick { border-collapse: collapse; margin: 2mm 0; }
.tick td { padding: 1.4mm 3mm 1.4mm 0; }
.tick td.tb { width: 8mm; height: 7mm; border: .3mm solid #000; }
.tick tr + tr td.tb { border-top: none; }
.tot { text-align: right; margin: 2mm 0 1mm; font-size: 10.5pt; }
hr.qrule { border: 0; border-top: .5mm solid #000; margin: 1mm 0 0; }
.endq { text-align: center; margin: 8mm 0 4mm; letter-spacing: .06em; }
.edexcel .endq b { display: inline-block; border: .5mm solid #000; padding: 2mm 6mm; }

/* blocks */
.fig { margin: 2mm auto 3mm; display: block; text-align: center; max-width: 100%; box-sizing: border-box; }
.fig.l { margin-left: 0; text-align: left; } .fig.r { margin-right: 0; text-align: right; }
.fig svg { max-width: 100%; height: auto; overflow: visible; }
.fig figcaption, .fig .nts { font-size: 9pt; margin-top: 1mm; }
.fig .nts { font-style: italic; text-align: right; }
.tw { display: flex; justify-content: center; margin: 2mm 0 3mm; } .tw.l { justify-content: flex-start; }
table.t { border-collapse: collapse; }
table.t th, table.t td { border: .3mm solid #000; padding: 1.4mm 3mm; text-align: center; vertical-align: middle; }
table.t th { font-weight: 700; background: #f2f2f2; }
table.t td.tans, table.t th.tans { min-width: 13mm; height: 8.5mm; background: #fff; }
table.t.left td { text-align: left; }
.ls { margin: 0 0 2mm 5mm; padding: 0; }
.bx { border: .3mm solid #000; padding: 2mm 3mm; margin: 2mm 0; }
/* diagrams (SVG in mm) */
svg .g0 { stroke: #b9c9d6; stroke-width: .12; } svg .g1 { stroke: #7f9bb0; stroke-width: .26; }
svg .ax { stroke: #000; stroke-width: .35; fill: none; }
svg .tl { font: 3.1px Arial, "Liberation Sans", sans-serif; fill: #000; } svg .al { font: italic 3.6px "Times New Roman", "Liberation Serif", serif; fill: #000; }
svg .bar { fill: none; stroke: #000; stroke-width: .4; } svg .pl { fill: none; stroke: #000; stroke-width: .4; } svg .pt { stroke: #000; stroke-width: .35; }
svg .tr { stroke: #000; stroke-width: .35; } svg .tp { font: 3.6px Arial, "Liberation Sans", sans-serif; } svg .tf { stroke: #000; stroke-width: .25; }
svg .tb { fill: #fff; stroke: #000; stroke-width: .25; stroke-dasharray: .8 .6; }
svg .d { fill: none; stroke: #000; stroke-width: .4; } svg .dt { font: 3.6px Arial, "Liberation Sans", sans-serif; } svg .di { font: italic 4px "Times New Roman", "Liberation Serif", serif; }

/* cover */
.cover { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 4mm; }
.cbadge { display: inline-block; background: #26101f; color: #fff; font-weight: 700; font-size: 10pt; padding: 1.6mm 3.4mm; border-radius: 1.6mm; letter-spacing: .02em; }
.ctop { display: flex; align-items: center; gap: 4mm; }
.cdis { font-size: 8.5pt; color: #444; line-height: 1.3; }
.cfields { display: grid; grid-template-columns: 1.6fr 1fr .8fr; gap: 3mm; }
.cfields div { border: .3mm solid #000; height: 11mm; display: flex; align-items: flex-start; padding: 1mm 2mm; gap: 2mm; font-size: 8pt; }
.cfields i { flex: 1; } .cfields b { align-self: flex-end; font-size: 11pt; }
.ctitle { border-top: 1mm solid #26101f; border-bottom: .3mm solid #26101f; padding: 4mm 0; }
.ctitle .lv { font-size: 12pt; font-weight: 700; color: var(--pen, #cc0e66); }
.ctitle h1 { font-size: 26pt; margin: 0; line-height: 1.1; }
.ctitle h2 { font-size: 15pt; margin: 1mm 0 2mm; font-weight: 700; }
.cmeta { display: flex; gap: 6mm; font-size: 10pt; }
.cmeta span + span::before { content: "·"; margin-right: 6mm; }
.nocalc { align-self: flex-start; border: .5mm solid #000; padding: 1.4mm 4mm; font-weight: 700; font-size: 11pt; }
.ccols { display: grid; grid-template-columns: 1fr; gap: 1mm; font-size: 9.6pt; line-height: 1.32; }
.ccols h3 { font-size: 10.5pt; margin: 0 0 .6mm; }
.ccols p { margin: 0 0 .6mm; }
.ccols ul { margin: 0 0 1.5mm 4.5mm; padding: 0; }
.mgrid { border-collapse: collapse; width: 100%; font-size: 8pt; }
.mgrid th, .mgrid td { border: .25mm solid #000; padding: .8mm .4mm; text-align: center; }
.mgrid th { width: 15mm; text-align: left; padding-left: 1.4mm; background: #f4eaef; }
.mgrid tr:last-child td { height: 7mm; }
.cfoot { margin-top: auto; font-size: 8.5pt; color: #444; }
/* formulae sheet */
.formulae h2 { font-size: 16pt; margin: 0 0 1mm; } .formulae .muted { color: #555; font-size: 9pt; }
.formulae section { border: .3mm solid #000; padding: 2mm 4mm; margin: 0 0 3mm; } .formulae h3 { margin: 0 0 1mm; font-size: 11pt; } .formulae p { margin: 1.2mm 0; }

/* mark scheme */
.scheme .pb { font-size: 9.6pt; line-height: 1.3; }
.msintro h1 { font-size: 15pt; margin: 3mm 0 1mm; } .msintro h3 { margin: 3mm 0 1mm; font-size: 11pt; } .msintro .muted { color: #444; }
.msintro p { margin: 0 0 2mm; }
table.key { width: 100%; margin: 1mm 0 4mm; } table.key th { width: 22mm; } table.key td { text-align: left; }
.msr { display: grid; grid-template-columns: 17mm 1fr 14mm 56mm; border: .3mm solid #000; border-top: none; }
.msr.head { border-top: .3mm solid #000; background: #26101f; color: #fff; font-weight: 700; }
.msr.head > div { padding: 1.4mm 2mm; }
.msr > div { padding: .9mm 2mm; border-left: .3mm solid #000; }
.msr > .mq { border-left: none; font-weight: 700; }
.msr > .ma.f, .msr > .mm.f { padding-top: 1.6mm; }
.msr > .mm { text-align: center; font-weight: 700; }
.msr > .mc { font-size: 8.8pt; color: #222; }
.msr.lv { grid-template-columns: 17mm 1fr; }
.lvb { padding: 1.6mm 2mm !important; } .lvl { margin: 0 0 1.4mm; } .ind ul { margin: .6mm 0 0 4mm; padding: 0; }
.scheme .endq { margin-top: 5mm; }

/* topic packs (exam questions on one topic): title band on page 1, no cover */
.tphead { display: grid; gap: 3mm; margin-bottom: 4mm; }
.tptitle { border-top: 1mm solid #26101f; border-bottom: .3mm solid #26101f; padding: 2.4mm 0 2.6mm; }
.tptitle .lv { font-size: 10pt; font-weight: 700; color: var(--pen, #cc0e66); }
.tptitle h1 { font-size: 21pt; margin: 0 0 1mm; line-height: 1.1; }
.tphead .cfields div { height: 9mm; }
.tphead .cmeta { flex-wrap: wrap; row-gap: 1mm; font-size: 9.6pt; } .tphead .cmeta span { white-space: nowrap; }
.tpnote { font-size: 9.4pt; color: #333; margin: 0 !important; }
.qnum { flex-wrap: wrap; }
.nocalc-ic { display: flex; flex-basis: 100%; margin-top: 1mm; }
.nocalc-ic svg { display: block; }
.qtags { margin: 0 0 1mm; } .qtag { display: inline-block; border: .3mm solid #000; border-radius: 1mm; padding: 0 1.6mm; font-size: 8pt; font-weight: 700; margin-right: 1.5mm; }

/* worked solutions: handwriting in colour, like a teacher's answer sheet */
.sol .hw, .sol .hwa, .sol .hwt, .hwsample { font-family: "Kalam", "Patrick Hand", "Comic Sans MS", cursive; color: #e0007a; }
.sol .ws.hw { height: auto; }
.sol .hw { padding: 1mm 0 2mm 6mm; font-size: 13.2pt; line-height: 1.5; }
.sol .hw p { margin: 0 0 .8mm; }
.sol .hw .m i { font-family: inherit; font-size: 1em; }
.sol .hw .fr > span:first-child { border-bottom-color: #e0007a; }
.sol .hw .hwn, .hwsample.n { color: #1d4ed8; }
.sol .hw .hwn { font-size: 11.6pt; }
.sol .hwm, .hwsample.m { color: #0a8a4a; }
.sol .hwm { font-family: Arial, "Liberation Sans", sans-serif; font-size: 8.4pt; font-weight: 700; text-align: right; letter-spacing: .03em; }
.sol .al .ln, .sol .al .dl { height: auto; min-height: 6mm; text-align: center; }
.sol .hwa { font-size: 14pt; line-height: 1.1; white-space: normal; overflow-wrap: anywhere; }
.sol .al .ln { width: auto; min-width: 62mm; max-width: 100%; box-sizing: border-box; }
.sol .hwt { font-size: 13pt; }
.sol .mcq .opt.pick { border-color: #000; box-shadow: 0 0 0 .6mm #fff, 0 0 0 1.2mm #e0007a; border-radius: 50%; }
.sol .fig .hw, .sol .hw .fig { margin-left: 0; }
svg .bar.hw, svg .pl.hw { stroke: #e0007a; stroke-width: .55; } svg .pt.hw { stroke: #e0007a; stroke-width: .5; }
svg .hwd { stroke: #e0007a; fill: none; stroke-width: .5; } svg .hwl { font: 4px "Kalam", cursive; fill: #e0007a; }

/* print: the pages only, one per sheet, no shadows, no app around them */
@page { size: A4; margin: 0; }
@media print {
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body > *:not(.printroot) { display: none !important; }
  .printroot { display: block !important; position: static !important; overflow: visible !important; padding: 0 !important; margin: 0 !important; }
  .printroot .cbp { --z: 1 !important; }
  .printroot .cbp:not(.printing) { display: none !important; }
  .pgw { margin: 0 !important; box-shadow: none !important; break-after: page; page-break-after: always; width: 210mm !important; height: 297mm !important; overflow: hidden; }
  .pgw:last-child { break-after: auto; page-break-after: auto; }
  .pg { transform: none !important; }
  .ink { display: none !important; }
  body.print-blank .inkimg { display: none !important; }
}

/* real photographs in question packs (credit line under each) */
.cbp .photo .pwrap{position:relative;display:block;width:100%}
.cbp .photo img{display:block;width:100%;height:auto;border:.25mm solid #333;filter:none}
.cbp .photo .pm{position:absolute;transform:translate(-50%,-50%);min-width:5.2mm;height:5.2mm;line-height:5.2mm;text-align:center;background:#fff;border:.35mm solid #111;border-radius:50%;font:700 9pt/5.2mm Arial,Helvetica,sans-serif;color:#111}
.cbp .photo .pcr{font:5.6pt/1.25 Arial,Helvetica,sans-serif;color:#555;margin-top:.8mm;text-align:right}

/* grade circle: a simple ring with the question's difficulty grade (1-9) in the theme pen colour */
.gr{display:flex;flex:none;flex-basis:auto;margin-top:0;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;width:10.4mm;height:10.4mm;border-radius:50%;background:#e3e3e3;border:.8mm solid #1b1b1b;box-shadow:inset 0 0 0 .45mm #e3e3e3,inset 0 0 0 .75mm #1b1b1b;color:#111;font-family:Arial,Helvetica,sans-serif;line-height:1;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.qnum .gr{order:2}.qnum .gr + .nocalc-ic,.qnum .nocalc-ic{order:3}
.qnum:has(.gr){flex-wrap:wrap;align-content:flex-start}
.gr i{font:700 4.8pt/1 Arial,Helvetica,sans-serif;font-style:normal;margin-bottom:.4mm}
.gr b{font:700 8pt/1 Arial,Helvetica,sans-serif}

/* model answer written on the ruled lines */
.sol .wlh { font-family: "Kalam", "Patrick Hand", "Comic Sans MS", cursive; color: #e0007a; font-size: 12.8pt; line-height: 7.8mm; padding-left: 2mm;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 7.55mm, #9a9a9a 7.55mm, #9a9a9a 7.8mm); background-position: 0 var(--wlo, 0mm); }
.sol .wlh p { margin: 0; position: relative; top: -.6mm; }
.sol .wlh .hwn { color: #1d4ed8; font-size: 11.6pt; }
.sol .wlh .hwm { font-family: Arial, Helvetica, sans-serif; color: #1d4ed8; font-size: 9pt; font-weight: 700; }
.sol .wlh .m i { font-family: inherit; font-size: 1em; }
