/*
 * Print stylesheet для юр-документов.
 * Подключается в HTML через <link rel="stylesheet" href="/docs/print.css" media="print">.
 * WeasyPrint (docs_render_pdf.py) читает его для рендера PDF; при обычном просмотре
 * HTML в браузере/приложении экранные стили из <style> в <head> продолжают работать.
 */

@page {
  size: A4;
  margin: 20mm 20mm 22mm 20mm;

  @bottom-center {
    content: counter(page) " / " counter(pages);
    font-family: 'Liberation Serif', 'Times New Roman', Times, serif;
    font-size: 10pt;
    color: #555;
  }
}

body {
  font-family: 'Liberation Serif', 'Times New Roman', Times, serif;
  font-size: 11pt;
  line-height: 1.4;
  color: #000;
  background: #fff;
  /* Убираем экранные ограничения — WeasyPrint печатает в область @page */
  max-width: none;
  margin: 0;
  padding: 0;
}

h1 {
  font-size: 18pt;
  font-weight: bold;
  text-align: center;
  margin: 0 0 18pt;
  page-break-after: avoid;
}

h2 {
  font-size: 13pt;
  font-weight: bold;
  margin: 18pt 0 8pt;
  page-break-after: avoid;
}

h3 {
  font-size: 11pt;
  font-weight: bold;
  margin: 12pt 0 6pt;
  page-break-after: avoid;
}

p {
  text-align: justify;
  margin: 0 0 8pt;
  orphans: 3;
  widows: 3;
}

ul {
  padding-left: 18pt;
  margin: 0 0 8pt;
}

li {
  text-align: justify;
  margin-bottom: 3pt;
}

a {
  color: #000;
  text-decoration: none;
}

table {
  border-collapse: collapse;
  width: 100%;
  page-break-inside: avoid;
}

th, td {
  border: 1px solid #000;
  padding: 4pt;
  vertical-align: top;
}

.edition {
  text-align: center;
  margin: 0 0 18pt;
  font-style: italic;
}

.operator p, .contacts p {
  margin: 3pt 0;
}
