/*
@import url('https://fonts.googleapis.com/css2?family=PT+Serif:wght@400;700&display=swap');
*/
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');



@font-face {
    font-family: iawriterduo;
    src: url("/assets/fonts/iAWriterDuoS-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400
}

@font-face {
    font-family: iawriterduo;
    src: url("/assets/fonts/iAWriterDuoS-Italic.woff2") format("woff2");
    font-style: italic;
    font-weight: 400
}

@font-face {
    font-family: iawriterduo;
    src: url("/assets/fonts/iAWriterDuoS-Bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700
}

@font-face {
    font-family: iawriterduo;
    src: url("/assets/fonts/iAWriterDuoS-BoldItalic.woff2.woff2") format("woff2");
    font-style: italic;
    font-weight: 700
}

@font-face {
    font-family: Manrope;
    src: url(/assets/fonts/Manrope-ExtraLight.woff2) format("woff2");
    font-weight:200
}

@font-face {
    font-family: Manrope;
    src: url(/assets/fonts/Manrope-Light.woff2) format("woff2");
    font-weight:300
}

@font-face {
    font-family: Manrope;
    src: url(/assets/fonts/Manrope-Regular.woff2) format("woff2");
    font-weight:400
}

@font-face {
    font-family: Manrope;
    src: url(/assets/fonts/Manrope-Medium.woff2) format("woff2");
    font-weight:500
}

@font-face {
    font-family: Manrope;
    src: url(/assets/fonts/Manrope-SemiBold.woff2) format("woff2");
    font-weight:600
}

@font-face {
    font-family: Manrope;
    src: url(/assets/fonts/Manrope-Bold.woff2) format("woff2");
    font-weight:700
}

@font-face {
    font-family: Manrope;
    src: url(/assets/fonts/Manrope-ExtraBold.woff2) format("woff2");
    font-weight:800
}

:root {
    --secondary-color: #e6e6e6;
    --font-color: #333333;
    --code-color: #333333;
    --bg-color: #fafafa;
    --link-color: #0060a0;
    --deep-black: #000;
    --book-background: #ebebeb;
    --gray-color: #969696;
    --img-shadow-color: rgb(0,0,0,0.1);
    --nav: #f0f0f0;
    --link-hover: #d04000;
    --underline-link: rgba(0, 96, 160, 0.2);
    --underline-link-hover: #e8abab;
    --underline-link-inner: rgb(190, 190, 190);
}

[data-theme="dark"] {
    --secondary-color: #505050;
    --font-color: #fafafa;
    --bg-color: #1e1e1e;
    --link-color:#dcb4ff;
    --code-color: #333333;
    --deep-black: #fff;
    --book-background: #0f0f0f;
    --img-shadow-color: rgba(255, 255, 255, 0.1);
    --nav: #212121;
    --link-hover: rgb(255, 119, 58);
    --underline-link: rgba(220, 180, 255, 0.3);
    --underline-link-hover: #893f1d;
    --underline-link-inner: rgb(90, 90, 90);
}

html { 
    /*font-family: "Inter", sans-serif;*/
    font-family: Manrope, sans-serif;
    
    font-weight: 400;
    font-size: 18px; /* 1.1rem; */
    line-height: 1.5; /* 1.65; */ /* 160%; */

    -webkit-locale: ru;
    overflow-wrap: break-word;
    /*
    letter-spacing: normal;
    */

    letter-spacing: calc(-.03058em + .44638px);

    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -webkit-overflow-scrolling: touch;
}

sup a {
    text-decoration: none;
}

.sans {
    /*font-family: "Inter", sans-serif;*/
    font-family: Manrope, sans-serif;
}

.serif {
        /*
    font-family: "PT Serif";
    font-family: 'Georgia', serif;

    font-family: 'Merriweather', serif;
    font-family: 'EB Garamond', serif;
    
    font-family: 'Athelas';
    font-family: 'Source Serif Pro', serif;
    font-family: 'Literata', serif;
    font-family: 'Playfair Display', serif;
*/
    font-family: 'Noto Serif', serif;
}

.mono {
    font-family: "JetBrains Mono", monospace;
}

.ia{
    font-family: iawriterduo;
}

code, pre, tt, .monoFont {
    font-family: "JetBrains Mono";
    font-weight: 300;
} 

a.reversefootnote {
    font-family: "JetBrains Mono";
    font-size: 24px;
    text-decoration: none;
    padding-left: 4px;
    position: absolute;
}

pre {
    padding: 1em;
    background-color: var(--secondary-color);
    color: var(--code-color);
    border-radius: 8px;

    transition: all 0.5s ease-in-out;
}

p {
    margin-top: 8px;
    margin-bottom: 12px;
}

ol{
    padding-inline-start: 24px;
}

.panel p, ol p{
    margin-block-start: 0em;
    margin-block-end: 0em;
}

.mybody {
    background-color: var(--bg-color);
    max-width: 732px;
    margin: auto;
    padding: 1em;

    margin-top: 0px;
    margin-bottom: 0px;

    transition: all 0.5s ease-in-out;
}

.bookbody{
    max-width: 920px; /*1140px;*/
    box-shadow: 0 0 8px 5px rgba(0,0,0,0.025);
    border-radius: 12px;
    margin-top: 1em;
    margin-bottom: 1em;
    padding-block-end: 1.5em;
}

.wrapper{
    min-width: 320px;
    max-width: 732px;
    margin: auto;
}

.bookbackground{
    background-color: var(--book-background);
}

nav{
    transition: all 0.5s ease-in-out;
}

table, th, td {
    border: 1px solid var(--gray-color);
    padding: 1em;
    border-collapse: collapse;
}

table thead{
background: var(--font-color);
color: var(--bg-color);
}

.nav-book{
    margin-left: 1em;
    margin-right: 1em;
    margin-top: 0.25em;
    /* opacity: 0.45; */
}

/*
@media (prefers-color-scheme: dark) {

}
@media (prefers-color-scheme: light) {

}
*/

/*
article {
    padding-bottom: 8em;
}
*/

body{

    /*
    background-color: var(--bg-color); 


    max-width: 732px;

    
    padding: 1em;
*/
    
    min-width:320px;        
    margin: auto;
    background-color: var(--bg-color);
    color: var(--font-color);
    text-align: left;
    opacity: 1;
    scroll-behavior: smooth;

    transition: background-color 0.5s ease-in-out;

}

.smooth-container { scroll-behavior: smooth }

  body.fade {
      opacity: 0;
      transition: all 0.5s ease-in-out;
  }




.book {
    text-align: justify;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;

    /* word-break: break-all; */
}

.h-book {
    text-align: center; 
    margin-top: 1em; /* 3em; */
    /* margin-bottom: 1em; /* 3em; */
    font-weight: 700; 
    font-size:  2rem; /* 40px; */
}

.custom-h{
    text-align: left; /* center;  */
    margin-top: 1em; /* 3em; */
    /*margin-bottom: 1em; /* 3em; */
    font-weight: 700; 
    font-size:  2rem; /* 40px; */
}

.dark-mode{
    color: var(--font-color);
    background-color: var(--bg-color); 
    transition: all 0.5s ease-in-out;
}
 

h1,h2,h3,h4,h5,h6 {
    /* font-family: "Inter", sans-serif; */
    /* font-family: Manrope, sans-serif; */
}


h1{
    /* 
    text-align: center; 
    padding: 0.5em;
    */

    text-align: left; 
    margin-top: 1em;
    margin-bottom: 0.25em;
    font-weight: 700; 
    font-size:  1.6rem;

    line-height: normal;
    color: var(--deep-black);
    transition: all 0.5s ease-in-out;
}

h2, h3 {
    margin-block-start: 1.2em;
    margin-block-end: 0.1em;
}

h4{
    margin-block-start: 1em;
    margin-block-end: 0em;
}

h2 {font-weight: 700; font-size:  1.4rem;}
h3 {font-weight: 650; font-size:  1.2rem;}
h4 {font-weight: 600; font-size:  1.1rem;}
h5 {font-weight: 400; font-size:  1rem;}
h6 {font-weight: 300;}

a {
    color: var(--link-color);
    text-decoration:  underline; 
    text-underline-offset: 0.25em; 
    text-decoration-style: solid; 
    text-decoration-thickness: .75px;
    text-decoration-color: var(--underline-link);
    transition: all 0.5s ease-in-out;
}
a:hover{
    color: var(--link-hover);
    text-decoration-color: var(--underline-link-hover);
    transition: all 0.5s ease-in-out;
    /*
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-thickness: .75px;
    */
}

.internal-link {
    color: var(--font-color); 
    text-decoration:  underline; 
    text-underline-offset: 0.35em; 
    text-decoration-style: solid; 
    text-decoration-thickness: .75px;
    text-decoration-color: var(--underline-link-inner);
    transition: all 0.5s ease-in-out;
}

a .internal-link :hover {
    text-decoration-thickness: .75px;
    text-decoration-color: var(--underline-link-hover);
    transition: all 0.5s ease-in-out;
}

h1 a.internal-link{
    color: var(--deep-black);
}

.nav-shape{
    fill: var(--font-color);
    transition: fill 0.5s ease-in-out;
}

svg{
    fill: inherit;
}

svg g, path, rect{
  fill: inherit;
}



.mytag{
    border: 1px solid var(--link-color);
    border-radius: 8px;
    padding: 1px 5px;
    color: var(--link-color);
    font-size: 16px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.5s ease-in-out;
}
.mytag:hover{
    border: 1px solid var(--link-hover);
}

input{
    border: 0;
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--gray-color);
    font-size: inherit;
    outline: none;
    font: inherit;
    font-style: inherit;
    background-color: transparent; /* var(--secondary-color); */
    color: inherit;
    -webkit-appearance: none;
    padding: 8px 8px 8px 16px;
    transition: background-color 0.5s ease-in-out;
}

input::-webkit-search-decoration,
input::-webkit-search-results-decoration {
  display: none;
}

input::placeholder {
    color: var(--gray-color);
    font-size: inherit;
    font: inherit;
    font-style: inherit;
  }

.header-nav {
    color: var(--font-color); 
    margin-left: 6px;
    margin-right: 6px;
    text-decoration: none;
    font-size: 0.9em;
    opacity: 0.5;

    transition: all 0.5s ease-in-out; 
}
.header-nav:hover{
    opacity: 1;
    text-decoration: none;
}


sup {
    line-height: 0;
}
/*
.tag-link{
    margin-top: 0.5em;
    color: var(--font-color); 
    border: 1px solid var(--font-color);
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8em;
    opacity: 0.5;
    padding: 0.25em;

    transition: all 0.5s ease-in-out;

}
.tag-link:hover{
    opacity: 1;
}
*/


.hidden{
    display: none;
}

.taglink {
    color: var(--gray-color);
    text-decoration: none;
    /*opacity: 0.5;*/
    text-underline-offset: 0.35em;
    text-decoration-thickness: .75px;
    transition: all 0.5s ease-in-out;
}

blockquote {
    background-color: transparent;
    /* border: solid 1px var(--secondary-color); */
    border-left: solid 4px var(--secondary-color);
    /*
    padding: 0.25em 16px 0.25em 16px;
    border-radius: 8px;
    */
    padding: 0em 0px 0em 16px;
    margin: 1em 0px 1em 0px;

    transition: border-color 0.5s ease-in-out;
}

blockquote p{
    margin-block-start: 0.2em;
    margin-block-end: 0.2em;
}

mark{
background-color: var(--secondary-color);
padding: 3px 5px;
border-radius: 8px;

transition: all 0.5s ease-in-out;
}


ul {
    padding-left: 1.25em;
    margin-block-start: 0.25em;
    margin-block-end: 0.25em;
}

li {
    margin:0 0 5px 0;
}

hr {
    content: '';
    display: block;
    border: none;
    background: var(--secondary-color);;
    /*
    margin-top: 2em;
    margin-bottom: 2em;
    */
    margin-block-start: 1em;
    margin-block-end: 1em;    

    position: relative;
    height: 1px;

    transition: all 0.5s ease-in-out;
}


#tooltip-wrapper {
    background: var(--bg-color);
    padding: 1em;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    position: absolute;
    width: 400px;
    height: 250px;
    font-size: 0.8em;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 100ms;
  }

  #tooltip-wrapper:after {
		content: "";
		position: absolute;
		z-index: 1;
		bottom: 0;
		left: 0;
		pointer-events: none;
		/* background-image: linear-gradient(to bottom, rgba(255,255,255, 0), rgba(255,255,255, 1) 90%); */
		width: 100%;
		height: 75px;
  }

  img {
    max-width: 100%;
    width: 100%;
    display: block;
    margin: 1em auto 1em auto;
    max-height: 100%;
    padding: 0px;
    box-shadow: 0 0 2em var(--img-shadow-color);
    transition: all 0.5s ease-in-out;
  }

  .noshadow img {
    box-shadow: none;
    margin: 0px;
  }

  .noshadow{
    box-shadow: 0 0 2em rgb(0,0,0,0.1);
  }

  #fader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    pointer-events: none;
    background: var(--bg-color);

    /*
    -webkit-backdrop-filter: blur(15px) brightness(90%) saturate(150%);
    backdrop-filter:blur(15px) brightness(90%) saturate(150%);
*/

    animation-duration: 300ms;
    animation-timing-function: ease-in-out;
  }

  @keyframes fade-out {
    from { opacity: 1 }
      to { opacity: 0 }
}

@keyframes fade-in {
    from { opacity: 0 }
      to { opacity: 1 }
}

#fader.fade-out {
    opacity: 0;
    animation-name: fade-out;
}

#fader.fade-in {
    opacity: 1;
    animation-name: fade-in;
}

.desc{
    text-align: left; 
    opacity: 0.5;
    /* padding-bottom: 1em; */
}

/*
@media only screen and (max-width: 1200px){
    .bookbody{
        max-width: 900px;
    }
}
*/

@media only screen and (max-width: 768px){


    .nav-book {
        margin-left: 0em;
        margin-right: 0em;
    }
    /*
    html {
        font-size: 1.1rem;
    }
    */

    .book {
        text-align: left;
    }

    .h-book{  /* h1 */
        margin-top: 1em; /* 3em; */
        margin-bottom: 1em; /* 3em; */
        font-size:  1.8rem; /* 2rem; /* 40px; */
    }

    .desc{
        padding-bottom: 1em;
    }

    /*
    .tag-link, .header-nav{
        font-size: 0.7em;
    }
    */
}

.accordion {
    background-color: transparent;
    color: var(--gray-color);
    cursor: pointer;
    padding: 0px;
    /* padding-top: 0px !important; */
    /* padding-right: 0px; */
    /* padding-bottom: 0px; */
    /* padding-left: 0px; */
    /* box-sizing: border-box; */
    /* opacity: 0.5; */
    font-size: inherit;
    border: none;
    text-align: right;
    /* bottom: 0px; */
    /* float: right; */
    /* outline: none; */
    /* margin: auto; */
    /* padding: 1em; */
    transition: all 0.5s ease-in-out;
  }

  .accordion :focus {
    outline: none;
  }
  
  /**
  .active, .accordion:hover {
    background-color: #ccc;
  }
  */
  
  /*
  .accordion:after {
    content: '\002B';
    color: #777;
    font-weight: bold;
    float: right;
    margin-left: 5px;
  }
  
  .active:after {
    content: "\2212";
  }
  */

  .panel {
      /**
    padding: 0 18px;
    background-color: white;
    */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0px;
    /* padding-left: 2px; */

    transition: 0.5s ease-in-out;
    transition-property: max-height, margin-bottom, margin-top, opacity;
  }

  .contrast-button{
    margin-top: 1em;
    background: var(--font-color);
    color: var(--bg-color);
    border-radius: 24px;
    padding: 0.5em;
    text-align: center;
    cursor: pointer;
    transition: all 0.5s ease-in-out;
  }

  .button {
    background: var(--link-color);
    border-radius: 4px;
    transition: all 0.5s ease-in-out;
  }

  .button a{
    color: white;
    text-decoration: none;
    margin: 12px;
  }

  .custom-h3{
    /* font-family: Manrope, sans-serif; */
    font-weight: 650;
    font-size:  1.2rem;
  }

li h3 {
    margin-block-start: 0.1em;
    margin-block-end: 0.1em;
}

.info{
    background-color: var(--secondary-color);
    padding: 1em;
    border-radius: 0.5em;
    text-align: left;
    transition: all 0.5s ease-in-out;
}

.infolink {
    padding-top: 1em;
    border-style: solid;
    border-color: var(--secondary-color);
    padding: 0.5em;
    margin-top: 1em;
    margin-bottom: 1em;
    text-align: center;
    border-radius: 1em;
    transition: all 0.5s ease-in-out;
    }

.info-border{
    padding: 1em;
    border-radius: 24px;
    border: solid;
    border-width: 2px;
    border-color: var(--secondary-color);
    text-align: left;
    transition: all 0.5s ease-in-out;
}

.info-border p {
    margin-block-start: 0px;
    margin-block-end: 0.5em;
    margin-right: 16px;
    transition: all 0.5s ease-in-out;
    }

.myselect{
    appearance: none;
    border: none;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    outline: none;
    border-width: 0px;
    border-style: none;
    color: black;
    background-color: transparent;
    -webkit-appearance: none;
}