/* Kontent himoyasi — chop etish ko'rinishi (js/protect/protect.js).
   Ekranda hech narsa o'zgarmaydi: ikkala element ham faqat qog'ozda chiqadi. */
.print-notice, .print-mark { display: none; }

@media print {
  @page { margin: 16mm 14mm 18mm; }

  :root {
    color-scheme: light;
    --canvas: white; --canvas-raised: white;
    --text-primary: black; --text-body: black;
    --text-secondary: dimgray; --text-tertiary: dimgray;
  }
  html, body { background: none; color: black; }

  /* Ruxsat yo'q — faqat ogohlantirish varag'i. */
  html:not([data-print="allow"]) body > :not(.print-notice) { display: none !important; }
  html:not([data-print="allow"]) .print-notice { display: block; padding-top: 30vh; text-align: center; }
  .print-notice-title { margin: 0 0 12px; font-size: 20pt; font-weight: 600; }
  .print-notice-body { margin: 0 auto; max-width: 120mm; font-size: 12pt; line-height: 1.5; }

  /* Ruxsat bor — faqat mazmun, har varaq pastida egasi va sana. */
  html[data-print="allow"] .print-mark {
    display: block; position: fixed; left: 0; right: 0; bottom: 0;
    font-size: 8pt; color: dimgray; text-align: center;
  }
  /* `button:not(.lesson-atama)` — atama belgisi tugma bo'lsa ham MATNNING
     o'zi hisoblanadi (spec 2026-09-23 §5.2). Umumiy `button` qoidasi uni
     ham yashirib, belgilangan so'z chop etilgan maqoladan butunlay
     yo'qolardi: «KT tekshiruvi» → « tekshiruvi». */
  html[data-print="allow"] :is(.site-header, .mobile-bottom-nav, .drawer, .floating-toast, .reader-progress,
    .lesson-bar, .lesson-type-panel, .lesson-status, .lesson-locked, .lesson-done, .lesson-guest,
    .lesson-pager, .lesson-practice, .toc-panel, .atama-oyna, button:not(.lesson-atama)) { display: none !important; }
  /* Qog'ozda bosiladigan joy yo'q — nuqtali chiziq ham ortiqcha. */
  html[data-print="allow"] .lesson-atama { text-decoration: none; }
  html[data-print="allow"] :is(h1, h2, h3, h4) { break-after: avoid; }
  html[data-print="allow"] :is(table, figure, img, blockquote, pre) { break-inside: avoid; }
}
