body {
  counter-reset: chapternum;
}

header h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Open Sans, sans-serif;
}
header h1 abbr {
  text-decoration: none;
}
header h1 abbr span {
  position: relative;
  display: inline-block;
  padding: 0.3em 0.4em;
  border: 1px solid #000;
  border-radius: 0.5rem;
  box-shadow: -0.15rem 0.15rem currentColor;
  z-index: 1;
}
header h1 > span::after {
  display: inline-block;
  content: ': ' attr(data-title);
}

header nav,
header .settings,
footer,
section aside {
  display: none;
}

main {
  width: 100%;
  margin: 0;
  float: none;
}

nav.subnav {
  page-break-before: always;
  font-family: Open Sans, sans-serif;
}
nav.subnav::before {
  display: block;
  content: 'Inhoudsopgave';
  font-size: 2rem;
  font-weight: bold;
}
nav.subnav ol {
  padding: 0;
  list-style-position: inside;
}
nav.subnav > ol {
  counter-reset: chapter;
}

ol.toc-level-2,
ol.toc-level-3,
ol.toc-level-4,
ol.toc-level-5,
ol.toc-level-6 {
  counter-increment: chapter;
}

li.toc-item::marker {
  content: counters(list-item, '.') ': ';
}

ol.toc-level-2,
ol.toc-level-3 {
  margin-bottom: 0.5rem;
}

a.toc-link-h2,
a.toc-link-h3 {
  font-weight: bold;
}
a.toc-link::after {
  content: target-counter(attr(href), page);
}

img {
  max-width: 100%;
}

a {
  color: currentColor;
  text-decoration: none;
}

p a[href^="https://"]:after
{
  word-wrap: break-word;
  content: ' (' attr(href) ')';
}
a {
  color: #000;
}

@page {
  size: A4 portrait;
  margin: 4cm;
}

/* @page :first {
  margin: 1cm;
} */
@page :right {
  @bottom-right {
    content: counter(page);
  }
}

@page :left {
  @bottom-left {
    content: counter(page);
  }
}

h2 {
  page-break-before: always;
}
h2.chapter:before {
  counter-increment: chapternum;
  content: counter(chapternum) '. ';
}

h2,
h3,
h4,
h5,
h6 {
  page-break-after: avoid;
}
table,
figure {
  page-break-inside: avoid;
}
