/*
 * Печать страницы сайта (реестр паритета T-75): только содержимое, чёрное на белом, адрес после ссылок.
 * Подключается отдельным тегом <link media="print"> после стилей темы и перебивает их только при печати.
 * Что оставить или спрятать вручную: .no-print — прятать, .print-only — показывать только на бумаге.
 */
.print-only { display: none; }

@media print {
    @page { margin: 1.6cm 1.8cm; }

    html, body { background: #fff !important; color: #000 !important; }
    body { font-size: 11.5pt; line-height: 1.5; }

    /* шапка, меню, подвал, боковая колонка, плашки, кнопки, формы, комментарии, скрытое для печати */
    .skip,
    .site-bar,
    .site-head,
    .site-foot,
    .app-foot,
    .langs,
    .side-col,
    .to-top,
    .nx-toast,
    .cookie-banner,
    .markup-bar,
    .comments,
    #comments,
    .news-related,
    .news-poll,
    .pager,
    .pagination,
    nav,
    aside,
    form,
    button,
    video,
    iframe,
    .no-print { display: none !important; }

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

    /* содержимое на всю ширину листа, без рамок и теней темы */
    main,
    .wrap,
    .has-side,
    .main-col { display: block !important; width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
    .panel,
    .card,
    article,
    .news-article { border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; }

    h1, h2, h3, h4 { color: #000 !important; break-after: avoid; page-break-after: avoid; }
    p, li, blockquote { orphans: 3; widows: 3; }
    img, figure, table, pre, blockquote { break-inside: avoid; page-break-inside: avoid; }
    img { max-width: 100% !important; height: auto !important; }
    pre, code { white-space: pre-wrap; word-break: break-word; border: 1px solid #999; color: #000 !important; background: #fff !important; }
    table { border-collapse: collapse; }
    th, td { border: 1px solid #999 !important; color: #000 !important; background: transparent !important; }

    /* ссылки: чёрные, подчёркнутые, адрес — в скобках после текста (внутренние якоря и javascript: не показываем) */
    a { color: #000 !important; text-decoration: underline; }
    main a[href^="http"]::after,
    main a[href^="/"]:not([href^="//"])::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; color: #333; text-decoration: none; }
    main a[href^="#"]::after,
    main a[href^="javascript:"]::after,
    main a:has(> img)::after,
    main a.no-print-url::after { content: none; }
}
