/* Печать и сохранение в PDF: конспект лекции без меню, кнопок и фонов */
@page { size: A4; margin: 16mm 15mm 18mm; }

:root, :root[data-mode="dark"] {
  color-scheme: light;
  --bg: #fff; --surface: #fff; --surface-2: #F4F0EA; --line: #D8D0C4; --line-strong: #BDB1A1;
  --text: #1B1410; --text-2: #4B4038; --accent: #A8461F; --accent-btn: #A8461F; --accent-text: #8F3C1B; --accent-2: #B7791F;
  --accent-soft: rgba(168, 70, 31, .07); --ok: #2E6B3D; --ok-soft: rgba(46, 107, 61, .08); --err: #A3271C; --err-soft: rgba(163, 39, 28, .07);
  --warn: #8A5A10; --warn-soft: rgba(183, 121, 31, .1); --shadow-s: none; --shadow-m: none; --shadow-frame: none;
}
html, body { background: #fff !important; color: var(--text); }
body { font-size: 11pt; line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
*, *::before, *::after { animation: none !important; transition: none !important; }
.rv, .diagram.grow .tnode { opacity: 1 !important; transform: none !important; }

/* всё, что нужно только на экране */
.side, .bottom, .sheet, .sheet-scrim, .footer, .skip, .to-top, .toast, .splash, .confetti, .tip, .zoombox,
.crumbs, .tabs, .pager, .ch-link, .toc, .toc-btn, .read-bar, .ch-cards, .ch-end, .diagram .zoom, .summary-card .cta,
.banner img, .banner .shade, .banner .chips, .faq summary .plus, .faq summary .ic { display: none !important; }
.app, .page, #view { display: block !important; margin: 0 !important; padding: 0 !important; max-width: none !important; width: auto !important; }
.view { animation: none !important; }

/* шапка лекции вместо картинки */
.banner { aspect-ratio: auto !important; min-height: 0 !important; border-radius: 0 !important; box-shadow: none !important; overflow: visible !important; background: none !important; border-bottom: 2px solid var(--accent); padding-bottom: 4mm; margin-bottom: 2mm; }
.frame::after { display: none !important; }
.banner .in { position: static !important; color: var(--text) !important; text-shadow: none !important; padding: 0 !important; gap: 2mm !important; }
.banner .in .label { color: var(--accent-text) !important; }
.banner h1 { font-size: 22pt !important; }
.banner p { color: var(--text-2) !important; font-size: 11pt !important; max-width: none !important; }

/* путеводитель */
.guide { display: block !important; }
.chapter { padding-top: 7mm !important; gap: 3mm !important; }
.chapter > h2 { font-size: 16pt !important; margin-top: 0 !important; }
.chapter .lead { font-size: 11.5pt !important; }
.chapter p { max-width: none !important; }
.chapter h3 { font-size: 12.5pt !important; }
h2, h3, .chapter > .num, .ch-top { break-after: avoid; page-break-after: avoid; }
.plq, .pair > div, .ex-line, .diagram, .summary-card, .faq details, .tbl tr, .walk li { break-inside: avoid; page-break-inside: avoid; }
.card, .plq, .pair > div, .tbl, .diagram, .faq details { box-shadow: none !important; }
.plq.def .txt { font-size: 12pt !important; }
.tbl { overflow: visible !important; }
.tbl table { font-size: 10pt !important; }
.tbl th { position: static !important; }
.diagram { padding: 4mm !important; overflow: visible !important; }
.tree { overflow: visible !important; }

/* термины и примеры: подсказок на бумаге нет, поэтому пояснение к примеру печатается рядом */
.t { border-bottom: 0 !important; font-weight: 700; }
.exm { background: none !important; padding: 0 !important; }
.exm[data-tip]::after { content: " (" attr(data-tip) ")"; font-style: normal; color: var(--text-2); font-size: .92em; }

/* «Частые ошибки» раскрыты (details открываются скриптом перед печатью) */
.faq summary { padding: 3mm 4mm !important; }
.faq .ans { padding: 0 4mm 3mm !important; }

/* ссылки не выделяются цветом */
a { color: inherit !important; text-decoration: none !important; }
