/* questionpaper.js — the editor + the print-ready paper */
.qp-src { width: 100%; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; line-height: 1.5; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); resize: vertical; }
.qp-preview { border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); padding: 14px; max-height: 620px; overflow: auto; }

/* the paper itself — on-screen it looks like an A4 sheet; in print it fills the page */
.qp-paper { position: relative; background: #fff; color: #111; width: 100%; max-width: 720px; margin: 0 auto; padding: 26px 30px; box-shadow: 0 1px 6px rgba(0, 0, 0, .12); font-family: "Times New Roman", Georgia, serif; }
/* faint "Generated with AiduEdSuite" watermark (demo output) — behind the text, prints faintly */
.qp-wm { position: absolute; inset: 0; z-index: 0; display: flex; align-items: center; justify-content: center; pointer-events: none;
  font-family: Arial, Helvetica, sans-serif; font-weight: 800; font-size: 40px; letter-spacing: 2px; white-space: nowrap;
  color: rgba(90, 110, 150, .08); transform: rotate(-26deg); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.qp-head, .qp-meta, .qp-rule, .qp-body { position: relative; z-index: 1; }
.qp-head { display: flex; align-items: center; gap: 12px; justify-content: center; text-align: center; }
.qp-crest { width: 54px; height: 54px; object-fit: contain; flex: 0 0 auto; }
.qp-school-name { font-size: 20px; font-weight: 800; letter-spacing: .01em; }
.qp-exam { font-size: 14px; font-weight: 600; margin-top: 2px; }
.qp-meta { display: flex; flex-wrap: wrap; gap: 4px 22px; justify-content: center; margin: 8px 0 4px; font-size: 13px; }
.qp-rule { border: none; border-top: 2px solid #111; margin: 8px 0 12px; }
.qp-body { font-size: 14px; line-height: 1.6; }
.qp-title { text-align: center; font-size: 16px; font-weight: 800; margin: 6px 0; }
.qp-section { font-weight: 800; margin: 12px 0 6px; border-bottom: 1px solid #999; padding-bottom: 2px; }
.qp-q { margin: 7px 0; position: relative; padding-left: 4px; }
.qp-sub { margin: 4px 0 4px 26px; }
.qp-p { margin: 6px 0; }
.qp-gap { height: 6px; }
.qp-marks { float: right; font-weight: 700; color: #444; margin-left: 8px; }
.qp-paper .katex { font-size: 1.02em; }

@media print {
  .qp-paper { box-shadow: none; max-width: none; margin: 0; padding: 0; }
}
