@page {
  size: a4 portrait;
  margin: 15mm 10mm 15mm 10mm;
  counter-increment: page;
  font-family: "Roboto", sans-serif;
  white-space: pre;
  color: grey;

  @top-left {
    content: 'Сметный офис';
    font-size: 9pt;
  }

  @top-center {
    content: string(chapter);
     font-size: 9pt; 
  }

  @top-right {
    content: 'стр. ' counter(page);
    font-size: 9pt;
  }

  @bottom-left { 
    content: '8-495-974-15-89';
    font-size: 9pt;
    color: grey;
  }
}

@page :first {
  background-image: url('cover_first.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}

@media print {
  .md-header,
  .md-footer, .md-sidebar, .md-tabs, .md-announce, nav.md-nav {
    display: none !important;
  }

  .md-main,
  .md-main__inner, .md-content, .md-typeset, article {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body {
    font-family: Roboto, sans-serif !important;
    margin: 0 !important;
    padding: 1.5cm !important;
    background: none !important;
  }

  .md-content:not(:first-child) {
    page-break-before: always;
  }

  table, pre, blockquote, figure {
    page-break-inside: avoid;
  }

  a:after {
    content: " (" attr(href) ")";
  }

  a[href^="#"]:after,
  a[href^="mailto:"]:after {
    content: "";
  }
}

