/* ==========================================================================
   HALF-YEARLY 2026 — printable mock papers
   Same visual language as the Periodic Test papers, shared by all three
   subjects. Screen shows a page-like sheet; print drops to plain A4.
   ========================================================================== */

@media screen {
  body { background: var(--color-bg); }
  .paper {
    max-width: 820px; margin: var(--space-6) auto; background: #fff;
    padding: var(--space-8); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  }
  .screen-controls { max-width: 820px; margin: var(--space-4) auto var(--space-6); text-align: center; }
  .screen-controls .btn { margin: 0 4px 8px; }
}
@media print {
  .screen-controls { display: none !important; }
  .paper { margin: 0; padding: 0; box-shadow: none; border-radius: 0; max-width: none; }
  body { background: #fff; }
  @page { margin: 14mm 13mm; }
}

.pt-header { text-align: center; border-bottom: 2.5px solid #6B21A8; padding-bottom: 8pt; margin-bottom: 10pt; }
.pt-header h1 { font-family: 'Fredoka One', cursive; font-size: 19pt; color: #6B21A8; margin-bottom: 2pt; }
.pt-header .subtitle { font-size: 11pt; color: #444; font-weight: 700; }
.pt-meta { display: flex; justify-content: space-between; font-size: 10pt; color: #333; margin-top: 4pt; }

.pt-info { display: flex; flex-wrap: wrap; gap: 6pt 18pt; margin: 10pt 0 14pt; font-size: 10.5pt; }
.pt-info .field { display: flex; align-items: baseline; gap: 6pt; }
.pt-info .line { display: inline-block; border-bottom: 1px solid #000; min-width: 120pt; }

.pt-note {
  font-size: 9.5pt; color: #555; background: #faf7ff; border-left: 3pt solid #C4B5FD;
  padding: 5pt 9pt; margin-bottom: 12pt;
}

.pt-section { margin-bottom: 14pt; page-break-inside: avoid; }
.pt-section h3 {
  font-size: 11.5pt; font-weight: 800; padding: 4pt 8pt; background: #f1ecf8;
  border-left: 4pt solid #6B21A8; margin-bottom: 8pt; color: #3b1366;
  font-family: 'Nunito', sans-serif; overflow: hidden;
}
.pt-section h3 .marks { float: right; font-size: 9.5pt; color: #6B21A8; font-weight: 700; }

.q { margin-bottom: 9pt; page-break-inside: avoid; font-size: 11pt; line-height: 1.5; }
.q .n { font-weight: 800; color: #6B21A8; margin-right: 5px; }
.q .hy-blank { display: inline-block; min-width: 46pt; border-bottom: 1.2px solid #333; }
.q .hy-num, .q .hy-word, .q .hy-sent, .q .hy-words, .q .hy-poem { font-weight: 700; }
.q .hy-sub { display: block; font-size: 9pt; color: #666; font-weight: 400; }
.q br + br { display: none; }

.ans-line { display: block; width: 100%; height: 22pt; border-bottom: 1px dotted #999; margin-top: 3pt; }
.ans-short { display: inline-block; min-width: 96pt; border-bottom: 1px dotted #999; margin: 0 6pt; }
.ans-box { border: 1px solid #bbb; border-radius: 3pt; height: 46pt; margin-top: 4pt; }
.ans-box-tall { height: 96pt; }

.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 2pt 18pt; margin: 3pt 0 0 16pt; font-size: 10.5pt; }
.opts span b { color: #6B21A8; }

.tiles { margin: 4pt 0 0 16pt; font-size: 10.5pt; }
.tiles i { font-style: normal; border: 1px solid #bbb; border-radius: 3pt; padding: 1pt 7pt; margin: 0 5pt 4pt 0; display: inline-block; }

.pair-tbl, .bucket-tbl { width: 100%; border-collapse: collapse; margin: 4pt 0 0; font-size: 10.5pt; }
.pair-tbl td, .bucket-tbl td, .bucket-tbl th { border: 1px solid #999; padding: 5pt 8pt; vertical-align: top; }
.bucket-tbl th { background: #f1ecf8; font-size: 10pt; color: #3b1366; }
.pair-tbl td:nth-child(2) { width: 34pt; text-align: center; }

.passage-box {
  border: 1px solid #bbb; border-left: 4pt solid #6B21A8; border-radius: 3pt;
  padding: 7pt 10pt; margin-bottom: 8pt; font-size: 10.5pt; line-height: 1.65; background: #fcfaff;
}
.passage-box p { margin: 0; }

.pt-footer { text-align: center; font-size: 8pt; color: #999; margin-top: 16pt; padding-top: 6pt; border-top: 1px solid #eee; }

.key { page-break-before: always; }
.key h2 { text-align: center; font-family: 'Fredoka One', cursive; color: #6B21A8; font-size: 15pt; margin-bottom: 4pt; }
.key .keynote { text-align: center; font-size: 9pt; color: #777; margin-bottom: 10pt; }
.key h4 { font-size: 10.5pt; color: #3b1366; margin: 9pt 0 3pt; border-bottom: 1px solid #ddd; }
.key ol { margin: 0 0 0 20pt; font-size: 10pt; line-height: 1.65; }
.key ol li { margin-bottom: 1pt; }
.key b { color: #3b1366; }

/* Devanagari sizing on paper */
.hi-paper .q, .hi-paper .opts, .hi-paper .tiles, .hi-paper .passage-box,
.hi-paper .pair-tbl, .hi-paper .bucket-tbl, .hi-paper .key ol {
  font-family: 'Tiro Devanagari Hindi', 'Nunito', serif;
}
.hi-paper .q { font-size: 12pt; line-height: 1.85; }
.hi-paper .passage-box { font-size: 11.5pt; line-height: 2; }
.hi-paper .ans-line { height: 26pt; }
