/* Based on https://github.com/edwardtufte/tufte-css */

@charset "UTF-8";

/* Excalidraw fonts */
@font-face {
  font-family: "Virgil";
  src: url("https://www.tinders.se/docs/main/web_assets/fonts/Virgil.woff2");
}
@font-face {
  font-family: "Cascadia";
  src: url("https://www.tinders.se/docs/main/web_assets/fonts/Cascadia.woff2");
}
@font-face {
  font-family: "Assistant";
  src: url("https://www.tinders.se/docs/main/web_assets/fonts/Assistant-Regular.woff2");
}

@font-face {
  font-family: "breadtext";
  src: url("https://www.tinders.se/docs/main/web_assets/fonts/Lexend_Deca/LexendDeca-VariableFont_wght.ttf");
}

html {
  font-size: 15px;
}

body {
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 12.5%;
  font-family: breadtext;
  font-weight: 400;
  background-color: #fffff8;
  color: #111;
  max-width: 1400px;
  counter-reset: sidenote-counter;
  }

h1 {
     font-weight: 800;
     margin-bottom: 2rem;
     font-size: 3.2rem;
     line-height: 1;
     }

#header h1:has(~ .details .author) {
  margin-bottom: 0.5rem;  /* adjust this value as needed */
}

.author {
      font-weight: 200;
      margin-bottom: 2rem;
      font-size: 1.8rem;
      line-height: 1;
      color: #a9112e;
}


h2 {
     font-weight: 400;
     margin-top: 1rem;
     margin-bottom: 0.5rem;
     font-size: 2.2rem;
     line-height: 1;
     }

h3 {
  font-weight: 200;
  font-size: 1.7rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  line-height: 1;
}

h4 {
  font-weight: 800;
  font-size: 1.3rem;
  margin-top: 0;
  margin-bottom: 0.3rem;
  line-height: 1;
}

hr {
  display: block;
  height: 1px;
  width: 50%;
  border: 0;
  border-top: 1px solid black;
  margin: 2em;
  padding: 0;
}

p.subtitle {
  margin-bottom: 1rem;
  font-size: 1.8rem;
  display: block;
  line-height: 1;
}

.numeral {
  font-family: breadtext;
}

.danger {
  color: red;
}

.bold-text {
  font-weight: 600;
}

article {
  position: relative;
  padding: 5rem 0rem;
}

section {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

p, ol, ul, dt {
  font-size: 1.4rem;
}
li pre,li code {
  font-size: 1rem;
}

p {
  line-height: 2rem;
  margin-top: 0;
  margin-bottom: 1rem;
  padding-right: 0;
  vertical-align: baseline;
}

/* Chapter Epigraphs */
div.epigraph { margin: 5em 0; }

div.epigraph > blockquote { margin-top: 3em;
                            margin-bottom: 3em; }

div.epigraph > blockquote, div.epigraph > blockquote > p { font-style: italic; }

div.epigraph > blockquote > footer { font-style: normal; }

div.epigraph > blockquote > footer > cite { font-style: italic; }

/* end chapter epigraphs styles */

blockquote { font-size: 1.4rem; }

blockquote p { width: 50%; }

blockquote footer {
  width: 50%;
  font-size: 1.1rem;
  text-align: right;
}

/* lists */

ol, ul {
  width: 89%;
  margin-top:0;
}

li>p {
  margin:0.1em;
}

.hdlist1 {
  font-weight: bold;
}

/* lists end */

figure {
  padding: 0;
  border: 0;
  vertical-align: baseline;
  max-width: 55%;
  -webkit-margin-start: 0;
  -webkit-margin-end: 0;
  margin: 0 0 3em 0;
}

figcaption {
  float: right;
  clear: right;
  margin-right: -48%;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  line-height: 1.6;
  vertical-align: baseline;
  position: relative;
  max-width: 40%;
}

figure.fullwidth figcaption { margin-right: 24%; }

/* Links: replicate underline that clears descenders */
a:link, a:visited { color: inherit; }

a:link {
  color:#a9112e;
  text-decoration:none;
  text-decoration-color:#f3f3f3;
}

a:link::selection { text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe, 0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe, -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe, -0.15em 0 #b4d5fe;
                    background: #b4d5fe; }

a:link::-moz-selection { text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe, 0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe, -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe, -0.15em 0 #b4d5fe;
                         background: #b4d5fe; }

/* admonition blocks */
.admonitionblock {
  margin-bottom: 1rem;
}
.admonitionblock .content {
  font-size: 1.2rem;
  font-style: italic;
}

.admonitionblock td.icon [class^="fa icon-"]{
  font-size:1.5em;
  padding-right: 0.5em;
  cursor:default
}

/* See Font awesome 4.7 cheet sheet at https://fontawesome.com/v4.7.0/cheatsheet/ */
.admonitionblock td.icon .icon-note::before{content:"\f0a4";color:gray}
.admonitionblock td.icon .icon-tip::before{content:"\f0a4";color:gray}
.admonitionblock td.icon .icon-warning::before{content:"\f12a";color:gray}
.admonitionblock td.icon .icon-caution::before{content:"\f12a";color:gray}
.admonitionblock td.icon .icon-important::before{content:"\f0a4";color:gray}
/* admonition block end */

/*** toc start */
#toc {
  display: block;
}

@media screen and (min-width:768px){
  #toctitle{
    font-size:1.375em
    }

body.toc2{
  padding-left:15em;
  padding-right:0;
}

#toc.toc2{
  /* margin-top:0!important;
  background:#f8f8f7;
  border-top-width:0!important;
  border-bottom-width:0!important; */
  position:fixed;
  width:10em;
  left:0;
  top:0;
  border-right:1px solid #e7e7e9;
  z-index:1000;
  padding:1.25em 1em;
  height:100%;
  overflow:auto
}

#toc.toc2 #toctitle{
  margin-top:0;
  margin-bottom:.8rem;
  font-size:1.2em
}

#toc.toc2>ul{
  font-size:.9em;
  margin-bottom:0
}

#toc.toc2 ul ul{
  display:none;
}

#toc.toc2 ul.sectlevel0 ul.sectlevel1{
  padding-left:0;
  margin-top:.5em;
  margin-bottom:.5em
}

body.toc2.toc-right{
  padding-left:0;
  padding-right:15em
}

body.toc2.toc-right #toc.toc2{
  border-right-width:0;
  border-left:1px solid #e7e7e9;
  left:auto;right:0;
}
}

@media screen and (min-width:1280px){
  body.toc2{
    padding-left:20em;
    padding-right:0;
    }

  #toc.toc2{
    width:15em
  }

  #toc.toc2 #toctitle{
    font-size:1.375em
  }

  #toc.toc2>ul{
    font-size:.95em
  }

  #toc.toc2 ul ul{
    display:none;
  }

  body.toc2.toc-right{
    padding-left:0;
    padding-right:20em
  }
}
/*** toc end */

/* audio/video start */
video {
  max-width: 100%;
}

@media screen and (-webkit-min-device-pixel-ratio: 0) { a:link { background-position-y: 87%, 87%, 87%; } }

/* Sidenotes, margin notes, figures, captions */
img {max-width: 70%;}

.image.right {
    float: right;
}
.image.left {
    float: left;
}

.imageblock {
  margin-bottom: 1rem;
}

.imageblock>.title {
    font-style:italic;
}

.footnote {
  float: right;
  clear: right;
  margin-right: -60%;
  width: 50%;
  margin-top: 0;
  margin-bottom: 0;
  font-size: 1.1rem;
  line-height: 1.3;
  vertical-align: baseline;
  position: relative;
}

.footnote a:after, .footnote:before {
  content: counter(sidenote-counter) " ";
  font-family: breadtext;
  position: relative;
  vertical-align: baseline;
}

.footnote a:after {
  content: counter(sidenote-counter);
  font-size: 1rem;
  top: -0.5rem;
  left: 0.1rem;
}

.footnote:before {
  content: counter(sidenote-counter) " ";
  top: -0.5rem;
}

/* Blocks */

/* Example block */
.exampleblock {
 width: fit-content;
 border:lightgrey;
 border-top-width: 1px;
 border-top-style: double;
 border-bottom-width: 1px;
 border-bottom-style: double;
 margin-bottom: 1rem;
}

.exampleblock>.title {
  line-height:1.45;
  text-align: left;
  font-weight:400;
  font-style: italic;
}

/* Listing block */
.listingblock {
 width: fit-content;
  border:lightgrey;
 border-top-width: 1px;
 border-top-style: solid;
 border-bottom-width: 1px;
 border-bottom-style: solid;
 margin-bottom: 1rem;
}

.listingblock>.title {
  line-height:1.45;
  text-align: left;
  font-weight:400;
  font-style: italic;
}

/* Tables */

.table-caption {
  float:right;
  clear:right;
  margin-right: -60%;
  width: 50%;
  margin-top: 0;
  margin-bottom: 0;
  font-size: 1.0rem;
  line-height: 1.6;
}

.tableblock>.title {
  line-height:1.45;
  text-align: left;
  font-weight:400;
  font-style: italic;
  zmargin-top:0;
  margin-bottom:.0em;
}

th.tableblock {
  text-rendering:optimizeLegibility
}

tbody p {
  font-size: 1rem;
  line-height:inherit;
}

tbody li {
  font-size: 1rem;
}

tbody code {
  font-size: 0.8rem;
}

p.tableblock{
  font-size:1em
}

table.tableblock{
  max-width:100%;
  border-collapse:separate;
  margin-bottom: 1rem;
}

/* Defines border */
table.tableblock,th.tableblock,td.tableblock{
  border:0 solid #dedede
}

table.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{
  border-width:0 1px 1px 0
}

table.grid-all>tfoot>tr>.tableblock{
  border-width:1px 1px 0 0
}

table.grid-cols>*>tr>.tableblock{
  border-width:0 1px 0 0
}

table.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{
  border-width:0 0 1px
}

table.grid-rows>tfoot>tr>.tableblock{
  border-width:1px 0 0
}

table.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{
  border-right-width:0
}

table.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{
  border-bottom-width:0
}

/* Override the frame=all rule and skip the frame for the default */
/* table.frame-all{border-width:1px}
*/

table.frame-sides{
  border-width:0 1px
}

table.frame-topbot,table.frame-ends{
  border-width:1px 0
}

table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd),table.stripes-even tr:nth-of-type(even),table.stripes-hover tr:hover{
  background:#f8f8f7
}

th.halign-left,td.halign-left{
  text-align:left
}

th.halign-right,td.halign-right{
  text-align:right
}

th.halign-center,td.halign-center{
  text-align:center
}

th.valign-top,td.valign-top{
  vertical-align:top
}

th.valign-bottom,td.valign-bottom{
  vertical-align:bottom
}

th.valign-middle,td.valign-middle{
  vertical-align:middle
}

table thead th,table tfoot th{
  font-weight:bold
}

tbody tr th{
  display:table-cell;
  line-height:1.6;
}

tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{
  color:rgba(0,0,0,.8);
  font-weight:bold
}

p.tableblock>code:only-child{
  background:none;
  padding:0
}

p.tableblock{
  font-size: 1rem;
}

th.tableblock>p.tableblock {
  font-weight: bold;
  line-height: normal;
}

h1, h2, p, footer, table, div.table-wrapper-small, div.supertable-wrapper > p, div.booktabs-wrapper {
   width: 55%;
}

div.fullwidth, table.fullwidth { width: 100%; }

div.table-wrapper {
  overflow-x: auto;
  font-family: "Trebuchet MS", "Gill Sans", "Gill Sans MT", sans-serif;
}

@media screen and (max-width: 760px) {
  p, footer { width: 90%; }
  pre.code { width: 87.5%; }
  ul { width: 85%; }
  figure { max-width: 90%; }
  figcaption, figure.fullwidth figcaption {
    margin-right: 0%;
    max-width: none;
  }
  blockquote p, blockquote footer { width: 90%; }
}

.sans {
  font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
  letter-spacing: .03em;
}

.code {
  font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 1.125rem;
  line-height: 1.6;
}

h1 .code, h2 .code, h3 .code { font-size: 0.80em; }

.marginnote .code, .sidenote .code { font-size: 1rem; }

pre.code {
  width: 52.5%;
  padding-left: 2.5%;
  overflow-x: auto;
}

.fullwidth {
  max-width: 90%;
  clear:both;
}

span.newthought {
  font-variant: small-caps;
  font-size: 1.2em;
}

input.margin-toggle { display: none; }

label.sidenote-number { display: inline; }

label.margin-toggle:not(.sidenote-number) { display: none; }

@media (max-width: 760px) {
  label.margin-toggle:not(.sidenote-number) {
    display: inline;
  }
  .footnote, .marginnote {
    display: none;
  }
  .margin-toggle:checked + .sidenote, .margin-toggle:checked + .marginnote {
    display: block;
    float: left;
    left: 1rem;
    clear: both;
    width: 95%;
    margin: 1rem 2.5%;
    vertical-align: baseline;
    position: relative;
  }
  label {
    cursor: pointer;
  }
  pre.code {
    width: 90%;
    padding: 0;
  }
  .table-caption {
    display: block;
    float: right;
    clear: both;
    width: 98%;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    margin-left: 1%;
    margin-right: 1%;
    vertical-align: baseline;
    position: relative;
  }
  div.table-wrapper, table, table.booktabs {
    width: 85%;
  }
  div.table-wrapper {
    border-right: 1px solid #efefef;
  }
  img {
    width: 100%;
  }
}
.sidenote,
.marginnote {
    float: right;
    clear: right;
    margin-right: -60%;
    width: 50%;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.1rem;
    line-height: 1.3;
    vertical-align: baseline;
    position: relative;
}

.sidenote-number {
    counter-increment: sidenote-counter;
}

.sidenote-number:after,
.sidenote:before {
    font-family: breadtext;
    position: relative;
    vertical-align: baseline;
}

.sidenote-number:after {
    content: counter(sidenote-counter);
    font-size: 1rem;
    top: -0.5rem;
    left: 0.1rem;
}

.sidenote:before {
    content: counter(sidenote-counter) " ";
    font-size: 1rem;
    top: -0.5rem;
}

blockquote .sidenote,
blockquote .marginnote {
    margin-right: -82%;
    min-width: 59%;
    text-align: left;
}
