/* CSS DEMO pagedjs*/

body{
  background-color: white;
}

@prince-pdf {
  prince-pdf-page-layout: two-column-right
}


.sidenote, .footnote, .footnote::footnote-call, .footnote::footnote-marker{
    display:none!important;
}


html{
    --serif: 'spectral', serif;
    --sans-serif: 'hk-grotesk', sans-serif;
    --font-size: 13px;
    --font-size-notes: 9px;
    --line-height: 15px;
    --line-height-notes: calc(15px*2/3);
    --indent: 6mm;
    --baseline: 15px;
  }

  @page {
    size: 140mm 205mm;
    margin-left: 18mm;
    margin-right: 18mm;

    /* background-image:  repeating-linear-gradient(180deg, transparent  0, transparent 14px , rgba(0,255,0,0.7) var(--baseline)) ; */
    background-size: cover;
    background-position:  0 -3px , 0 0 

  }

  @page:first {
    /* margin: 0;
    background: url("../images/cover.jpg");
    background-position: center;
    background-size: 104%;
    background-repeat: no-repeat;

    @top-left{ content: none; }
    @top-center{ content: none; }
    @top-right{ content: none; }
    @bottom-left{ content: none; } */
  }

  @page:blank {
    /* @top-left-corner{ content: none; }
    @top-left{ content: none; }
    @top-center{ content: none; }
    @top-right{ content: none; }
    @top-right-corner{ content: none; }
    @right-top{ content: none; }
    @right-middle{ content: none; }
    @right-bottom{ content: none; }
    @bottom-right-corner{ content: none; }
    @bottom-right{ content: none; }
    @bottom-center{ content: none; }
    @bottom-left{ content: none; }
    @bottom-left-corner{ content: none; }
    @left-bottom{ content: none; }
    @left-middle{ content: none; }
    @left-top{ content: none; } */
  }




  @page:left {
    /* margin-left:22mm;
    margin-right:14mm;
    margin-top: 73px;
    margin-bottom: 73px;

    @top-left{
        content: counter(page);
        font-weight: 400;
        font-family: var(--serif);
        font-size: var(--font-size);
        font-weight: normal;
        line-height: var(--line-height);
        vertical-align: bottom;
        margin-bottom: 14px;
        font-variant-numeric: oldstyle-nums;
    }

    @top-center{
        content: string(booktitle);
        font-weight: 400;
        font-family: var(--serif);
        font-size: var(--font-size);
        font-weight: normal;
        line-height: var(--line-height);
        vertical-align: bottom;
        margin-bottom: 14px;
        font-variant-numeric: oldstyle-nums;
        font-variant: small-caps;
        width: 85mm;
        text-align: left;
      
    } */

    
  }

  @page:right {
    /* margin-left:14mm;
    margin-right:22mm;
    margin-top: 73px;
    margin-bottom: 73px; 
    @top-right{
        content: counter(page);
        font-weight: 400;
        font-family: var(--serif);
        font-size: var(--font-size);
        font-weight: normal;
        line-height: var(--line-height);
        vertical-align: bottom;
        margin-bottom: 14px;
        font-variant-numeric: oldstyle-nums;
        text-align: right;
    }

    @top-center{
        content: element(shorter);      
        vertical-align: bottom;
        text-align: right;
        margin-bottom: 1px;
        width: 85mm;          
      } */
  }


  .part h2, #appendices h2,
  section[data-type="half-title"],
  section[data-type="titlepage"],
  section[data-type="copyright"],
  section[data-type="dedication"],
  section[data-type="epigraph"],
  #toc {
    /* margin-left: 10mm  */
  }

  
  


  .part h2, #appendices h2{
    /* page: part; */
  }



  /* running elements */

  #cover h1 {
    string-set: booktitle content(text);
  }

  .shorter{  
    position: running(shorter);
    font-weight: 400;
    font-family: var(--serif);
    font-size: var(--font-size);
    font-weight: normal;
    line-height: var(--line-height);
    text-align: right;
    /* font-style: italic; */
    font-variant-numeric: oldstyle-nums;
  }



 

  /* flexbox */
  section[data-type="copyright"] #flexbox {
    /* display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    left:0; */
  }

  #flexbox img {
    margin-left: calc(50% - 75px);
    margin-top: 20px;
  
  }


}






/* table of content */

#toc{
  
  counter-reset: chaptoc apptoc;
}
.toc-part a[href]::before{
  content: target-text(attr(href), before);

}

.toc-part a[href]::after,
.toc-chap a[href]::before,
.toc-part-app a[href]::before,
.toc-app a[href]::before {
  content: target-text(attr(href), content);
}

.toc-chap{
  counter-increment: chaptoc;
}
.toc-chap::before{
  content: "Chapter " counter(chaptoc);
}

.toc-app {
  counter-increment: apptoc;
}

.toc-app::before{
  content: "Appendix " counter(apptoc);
}


.toc-chap a[href]::after,
.toc-app a[href]::after {
  content: leader(dotted) target-counter(attr(href), page);
}

.toc-subchap a[href]::before{
  content: target-text(attr(href)); /* pdfreactor */
}

.toc-subchap a[href]::after {
    content: target-counter(attr(href), page);
    float:right;
}

.toc-subchap a[href]::before{
  content: target-text(attr(href)); /* pdfreactor */
}









/* frontmatter */

/* #absolute-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80%
} */




section[data-type="titlepage"] #editor {
  /* position: absolute;
  bottom: 0;
  left: 0;
  margin-left: 5mm;
  width: 100%; */
}


.shorter {
  display: none;
}


h3, h2 {
  /* height: 47.7mm;  */
  /* padding-top: 15.8mm; */
  margin-top: 30px;
  margin-bottom: 30px;
}


.part h2:before {
  /* content: "– Part " counter(numpart, upper-roman) " –"; */
}


.chapter .titlechapter:before {
  /* content: "– " counter(numchap) " –"; */
}

.sidenote{
  display: none;
}


body{
  max-width: 800px;
  margin: 0 auto;
}






/* Page break */
/* 
#cover {
  page-break-after: always;
}

#pre {
  page-break-after: always;
}

section[data-type="half-title"], section[data-type="titlepage"], section[data-type="epigraph"] {
  page-break-before: right;
  page-break-after: always;
}

section[data-type="copyright"] {
  page-break-before: always;
  page-break-after: always;
}

#toc {
  page-break-before: right;
  page-break-after: always;
}

.list-plates {
  page-break-before: right;
  page-break-after: always;
}

.part {
  page-break-before: right;
  page-break-after: always;
}

.part h2 {
  page-break-after: always;
}

.part h3 {
  page-break-before: right;
}

.chapter, .preface, .introduction, #appendices, .appendix {
  page-break-before: right;
  page-break-after: always;
}

figure {
  page-break-inside: avoid;
}

.dedication {
  page-break-before: always;
  page-break-after: always;
} */
 



 p:not(.shorter), li {
  /* orphans: 2; */
  /* widows: 2; */
  /* hyphens: auto; */
}


figure{
  width: 90mm;
  margin:0 auto;
  padding-top: 10px;
  padding-bottom: 10px;
}


figure img {
  width: 100%;
}


