/* Class notes — dedicated A4 print stylesheet (loaded with media="print").
   Only the generated .print-doc is printed; the editor is hidden. */

@page {
  size: A4;
  margin: 18mm 17mm 20mm;
  @bottom-right {
    content: counter(page) " / " counter(pages);
    font: 8pt system-ui, sans-serif;
    color: #555;
  }
}

html, body {
  background: #fff !important;
  color: #000 !important;
  height: auto;
}

body {
  font: 10.5pt/1.5 "Noto Sans", "DejaVu Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.app, .toast, .noscript { display: none !important; }

.print-doc { display: block !important; }

/* ---------- Header ---------- */

.p-head {
  border-bottom: 1.5pt solid #000;
  padding-bottom: 4mm;
  margin-bottom: 6mm;
  break-after: avoid;
}
.p-subject {
  font-size: 8.5pt; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  margin: 0 0 1mm;
}
.p-title { font-size: 19pt; line-height: 1.2; font-weight: 700; margin: 0 0 1.5mm; }
.p-date { font-size: 10pt; margin: 0; color: #333; }

/* ---------- Entries ---------- */

.p-entries { margin: 0; padding: 0; list-style: none; }

.p-entry {
  margin: 0 0 3.2mm;
  orphans: 3;
  widows: 3;
}
/* Short cards stay in one piece; long ones may flow across pages. */
.p-entry.short { break-inside: avoid; }

.p-label {
  display: block;
  font-size: 7.5pt;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 .8mm;
  break-after: avoid;
}

.p-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Note: plain paragraph, no box */
.p-entry.note .p-text { padding: 0; }

/* Quote: double rule on the left, italic */
.p-entry.quote {
  border-left: 3pt double #000;
  padding: .5mm 0 .5mm 4mm;
}
.p-entry.quote .p-text { font-style: italic; }

/* Definition: full thin box with light tint */
.p-entry.definition {
  border: .8pt solid #000;
  background: #f2f2f2;
  padding: 2.2mm 3.5mm;
}

/* Example: dashed left rule */
.p-entry.example {
  border-left: 1.5pt dashed #000;
  padding: .5mm 0 .5mm 4mm;
}

/* Question: solid thick left rule, status in label */
.p-entry.question {
  border-left: 2.5pt solid #000;
  padding: .5mm 0 .5mm 4mm;
}
.p-entry.question.answered .p-text { color: #444; }

/* ---------- Still to revise ---------- */

.p-revise {
  margin-top: 8mm;
  border-top: .8pt solid #000;
  padding-top: 4mm;
}
.p-revise h2 {
  font-size: 11pt; margin: 0 0 2.5mm;
  break-after: avoid;
}
.p-revise ul { list-style: none; margin: 0; padding: 0; }
.p-revise li {
  display: flex; gap: 2.5mm;
  margin: 0 0 2mm;
  break-inside: avoid;
}
.p-box {
  flex: none;
  width: 3.4mm; height: 3.4mm;
  border: .8pt solid #000;
  margin-top: 1mm;
}
.p-revise .p-text { flex: 1; }

.p-empty { color: #555; font-style: italic; }

/* ---------- v1.1: topics and missed markers ---------- */
.p-topic { margin: 6mm 0 3mm; break-after: avoid; break-inside: avoid; }
.p-entries > .p-topic:first-child { margin-top: 0; }
.p-topic h2 {
  font-size: 13pt; margin: 0; padding-bottom: 1mm;
  border-bottom: .8pt solid #000;
}

/* Missed: dotted box, so it stands out in black and white */
.p-entry.missed {
  border: 1pt dotted #000;
  padding: 1.8mm 3.5mm;
}
.p-entry.missed .p-text { font-style: italic; }
.p-entry.missed.answered .p-text { font-style: normal; color: #333; }

.p-ctx { display: block; font-size: 8.5pt; color: #444; }

/* ---------- v1.2: lists ---------- */
/* List: same left-rule style as the other cards, no line across the page
   (full-width lines are reserved for topic headings). */
.p-entry.list {
  border-left: 1.5pt solid #000;
  padding: .5mm 0 .5mm 4mm;
}
.p-list-title { margin: 0 0 .8mm; font-weight: 700; }
.plist { margin: 0; padding-left: 5.5mm; }
.plist .plist { margin: .4mm 0; padding-left: 5mm; }
.plist li { margin: .5mm 0; }
.plist-text { white-space: pre-wrap; overflow-wrap: anywhere; }
ul.plist-l0 { list-style: disc; }
ul.plist-l1 { list-style: circle; }
ul.plist-l2 { list-style: square; }
