
body, html {
  font-family:'Gentium Book Basic', sans-serif;
  font-weight:300;
  font-size: 15px;
  box-sizing: border-box;
  margin:0;
  padding:0;
  text-rendering:geometricPrecision;
  line-height:1.5em;
}

b, strong {
  font-weight: 600;
  color: #1b1b1b;
  text-shadow: 0px 0px 0.08em black;
}

#title {
  padding: 30px;
  border: 1px;
  border-radius: 10px;
  background: #FAFAFA;
  text-align: center;
  font-size: 2em;
  margin-bottom:25px;
}

#navigation {
  background-color:#010101;
  border-bottom:1px solid #222222;
}

#navigation ul {
  padding: 0px;
  padding-left: 20px;
  margin-top: 0;
  margin-bottom: 0;
  list-style: none;
}

#navigation > ul {
  display: none;
  padding: 25px;
  padding-top: 30px;
}

#navigation a {
  text-decoration:none;
  color: #efefef;
}

#navigation b {
  color: #e11e38;
}

#navigation a:hover {
  text-decoration:underline;
}

#content {
  padding:25px;
}

#toc {
  background: #f7f8f9;
  font-size: 0.8em;
  line-height: 1.3em;
  border-radius: 5px;
  padding-right: 10px;
  padding-left: 10px;
  margin-bottom: 10px;
  border: 1px dotted #bbb;
}

.toctitle {
  text-align: center;
  font-size: 1.2em;
  font-weight: 600;
  padding-top: 10px;
}

#toc ul {
  list-style-type: none;
  padding: 0px;
  padding-left: 10px;
}

#toc > ul {
  padding: 10px;
  padding-top: 0;
  padding-bottom: 20px;
}

#toc ul li {
  margin-top: 0.2em;
  max-width: 250px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.index-item {
  margin-bottom: 1em;
}

#credits a {
  color:#e11e38;
  text-decoration-line: underline;
  text-decoration-style: dotted;
}

#content h1:nth-child(1) {
  margin-top:0;
}

h2,h3,h4,h5,h6 {
  font-family: "Special Elite", Arial, sans-serif;
  line-height: 1.1em;
  font-weight: 400;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

h1 {
  font-family: "3rd Man", Arial, sans-serif;
  color: #e11e38;
  font-weight: 300;
  font-size: 2.7em;
  padding-bottom: 10px;
  margin-bottom: 30px;
  border-bottom: 2px dotted #B9C3CF;
}

h2 {
  color: #010101;
  font-weight: 400;
  font-size: 1.8em;
}

h3 {
  color: #010101;
  font-weight: 400;
  font-size: 1.4em;
}

h4 {
  border-bottom: solid 2px #41403E;
  border-bottom-right-radius: 75% 15%;
  border-bottom-left-radius: 55% 25%;
  display: inline-block;
  font-size: 1.2em;
}

p {
  margin-top: 0;
}

#content a {
  color:#e11e38;
  font-weight: bold;
  text-decoration: none;
}

#content a:hover {
  text-decoration: underline;
}

#content a:active {
  text-decoration: underline;
}

#content strike {
  color: grey;
}

#content u {
  text-decoration: none;
  background-color: yellow;
}

#content tt, #content pre {
  color: #141618;
  background: #f7f8f9;
  border-radius: 5px;
  font-family: Consolas, "Andale Mono", Courier, "Courier New", monospace;
}

#content tt {
  padding: 0 0.5em;
}

#content pre {
  border: 1px dotted #bbb;
  padding: 30px;
  line-height: 1.5em;
}

#content img {
  display: inline-block;
  float: inline-start;
  padding-right: 2em;
  max-width: 50%;
}

#content img {
  display: inline-block;
  float: inline-start;
  padding-right: 2em;
}

#content ol {
  display: flex;
  flex-wrap: wrap;
}

#content ol li {
  display: flex;
  padding: 0.5em;
  margin: 0.2em;
  width: 15em;

  border: solid 2px #41403E;
  border-top-left-radius: calc(calc(var(--index) + 1) * 5px) calc(calc(var(--index)) * 2px);
      border-top-right-radius: calc( calc(5 - var(--index)) * 1px) calc(calc(var(--index)) * 20px);
      border-bottom-right-radius: calc( calc(10 - var(--index)) * 1px) calc(calc(var(--index)) * 15px);
      border-bottom-left-radius: calc( calc(5 - var(--index)) * 1px) calc(calc(var(--index)) * 20px);

}

//#content p:nth-of-type(odd) img {
//  display: inline-block;
//  float: inline-start;
//  padding-right: 2em;
//}
//
//#content p:nth-of-type(even) img {
//  display: inline-block;
//  float: inline-end;
//  padding-left: 2em;
//}

#content h4:nth-of-type(odd)+p>img {
  display: inline-block;
  float: inline-start;
  padding-right: 2em;
}

#content h4:nth-of-type(even)+p>img {
  display: inline-block;
  float: inline-end;
  padding-left: 2em;
}

#credits {
  grid-column: span 2;
  grid-row: row;
  background-color: #010101;
  border-top: 1px solid #B9C3CF;
  border-bottom: 1px solid #B9C3CF;
  font-family: "Special Elite";
  font-size: 0.7em;
  text-align: center;
  padding: 10px;
  color: #efefef;
}

th, td{
  vertical-align: middle;
}

table {
  -moz-border-image: none;
  border-collapse: separate;
  border-radius: 4px 4px 4px 4px;
  border-style: solid solid solid none;
  border-width: 1px 1px 1px 0;
  background-color: transparent;
  border-spacing: 0;
  max-width: 100%;
}

thead th {
  border-left: 1px solid #DDDDDD;
  line-height: 18px;
  padding: 8px;
}

th, td {
  border-left: 1px solid #DDDDDD;
  border-top: 1px solid #DDDDDD;
  line-height: 18px;
  padding: 8px;
}

tbody tr:nth-child(2n+1) td, tbody tr:nth-child(2n+1) th {
  background-color: #F9F9F9;
}

hr.footrule {
  width: 20%;
  margin-left: 0;
  margin-top: 2em;
  color: #B9C3CF;
}

span.zim-tag {
  color: #ce5c00;
}

div.zim-object {
  border-style:solid;
  border-width:1px;
}

.toggle {
  padding-top: 30px;
  padding-right: 20px;
  width: 50px;
  height: 40px;
  display: inline;
  float: right;
}

.toggle line {
  stroke: #428DB5;
  stroke-width:2;
}

@media screen and (min-width: 950px) {
  .wrapper {
    display: grid;
    grid-template-columns: 400px 1fr;
    grid-row-gap: 15px;
  }
  #navigation {
    border-radius: 0 0 15px 0;
    border-right:1px solid #B9C3CF;
  }
  .toggle {
    display: none;
  }
  #navigation ul {
    display: block;
  }
  #content {
    padding:65px;
  }
  #toc {
    float: right;
  }
  #toc > ul {
    padding-bottom: 0;
  }
}

@media print {
  body, html {
    font-size: 13px;
  }
  #navigation {
    display: none;
  }
  #footblock {
    display: none;
  }
  #credits {
    display: none;
  }
  #content {
    padding: 0;
  }
  h1 {  
    margin-bottom: 0;
  }
  #toc {
    padding: 0;
  }
  .toctitle {
    text-align: left;
  }
}

@font-face {
    font-family: "3rd Man";
    src: 
      url("3rd Man.otf")
  }

@font-face {
    font-family: "Gentium Book Basic";
    src: 
      url("GenBkBasR.ttf");
  }
@font-face {
    font-family: "Gentium Book Basic";
    src: 
      url("GenBkBasB.ttf");
    font-weight: bold;
  }
@font-face {
    font-family: "Gentium Book Basic";
    src: 
      url("GenBkBasI.ttf");
    font-style: italic;
  }
@font-face {
    font-family: "Gentium Book Basic";
    src: 
      url("GenBkBasBI.ttf");
    font-weight: bold;
    font-style: italic;
  }

@font-face {
    font-family: "Special Elite";
    src: 
      url("SpecialElite-Regular.ttf")
  }

#content a[href*=Personnages] {
  color: #A93535 !important;
  text-shadow: 0px 0px 0.08em black;
}

#content a[href*=Lieux] {
  color: #5F0008 !important;
  text-shadow: 0px 0px 0.08em black;
}

#content a[href*=Creatures] {
  color: #6C713E !important;
  text-shadow: 0px 0px 0.08em black;
}

#content a[href*=Mysteres] {
  color: #e11e38 !important;
  text-shadow: 0px 0px 0.08em black;
}

#content a[href*=Organisations] {
  color: #801321 !important;
  text-shadow: 0px 0px 0.08em black;
}

*:nth-of-type(odd) {
  --index: 1 ;
}

*:nth-of-type(even) {
  --index: 2 ;
}

*:nth-of-type(3n) {
  --index: 3 ;
}
