@media screen and (min-width: 961px) {
  .masthead {
    position: sticky;
    top: 0;
    min-height: 100vh;
    border-right: 3px solid #ddd;
    background: #fafafa;
    width: 200px;
    padding: 2em 1em;
  }
  .main {
    margin-left: calc(50% - 250px);
  }
}
body {
  counter-reset: thm_counter, def_counter, q_counter; /* Set 'thm_counter, def_counter', and question_counter to 0. */
  width: auto;
  padding: 0;
}
.main {
  padding: 2em 40px;
  hyphens: auto;
  border-left: none;
}
.archive > ul > li {
  display: inline-block;
  margin-right: 1em;
}
.archive > ul > li > span, .hash-note {
  color: #666;
  font-size: .9em;
}
.menu li:not([class]) a, a:hover, .copyright a {
  border-bottom: none;
}
.menu-extra {
  list-style: circle;
}
.en .main header ~ p:first-of-type::first-line {
  font-variant: small-caps;
  letter-spacing: .05em;
  font-size: 1.1em;
}
.en .main header ~ p:first-of-type::first-letter {
  font-size: 3em;
  padding: .1em .1em 0 0;
  float: left;
  line-height: 1em;
}
code {
  hyphens: none;
}
a {
  border-bottom: 1px dashed;
}
iframe, twitterwidget, video {
  max-width: 100%;
  display: block;
  margin: auto;
}
#TableOfContents {
  background-color: #f8f8f8;
  padding: .5em;
}
table {
  min-width: 50%;
  max-width: 100%;
  margin: auto;
}


.hljs {
  background: #fcfcfc;
}
.home hr {
  margin: 2em auto 1em;
}
.masthead img {
  max-width: 80px;
}
img[src$="#border"] {
  border: 1px solid #ddd;
  box-shadow: 5px 5px 5px #eee;
}
.cn del {
  background-color: #444;
}
.cn del:hover {
  background-color: inherit;
  text-decoration: inherit;
}
.home blockquote, .cn blockquote:not(:hover) {
  border-left-color: transparent;
}
.anchor {
  display: none;
}
:hover > .anchor {
  display: inline;
}
.hash-note { background: lightyellow; }
.hash-note a { color: inherit; }
span.hash-note::before { content: "　# "; }
.hide-notes .hash-note, .unlist { display: none !important; }
.toggle-notes {
  border-top: 4px double #999;
  margin-bottom: 47px;
}

/* code */
code.has-jax {
    -webkit-font-smoothing: antialiased;
    background: inherit !important;
    border: none !important;
    font-size: 100%;
}




@media screen and (max-width: 960px) {
  h1, h2, h3, h4, h5, h6 {
    margin: 2em auto 1.5em auto;
  }
  .title h2, .title h3 {
    margin: 1.5em auto;
  }
  .main .title h1 {
    margin: 1em auto 0 auto;
  }
  .title hr {
    margin: 2em auto;
  }
  .masthead {
    padding: 1em;
  }
  .masthead .menu {
    max-width: inherit;
  }
  .masthead h1 {
    margin-bottom: 10px;
  }
  .masthead .menu ul {
    text-align: center;
  }
  .masthead .menu a {
    display: inline-block;
    padding: 5px 10px;
    background: #444;
    color: #fff;
    border-radius: 5px;
  }
  .masthead .menu .active a {
    background: none;
    border: 1px solid #444;
    color: #000;
  }
  .masthead .menu li, .masthead .menu li:first-child {
    border: none;
    display: inline-block;
    margin-top: 5px;
  }
  .masthead .menu .menu-extra {
    display: none;
  }
}

@media print {
  del, footer, .masthead {
    display: none;
  }
  body {
    max-width: 700px;
  }
  .main {
    margin-left: 0;
    border-left: none;
    padding-left: 10px;
  }
}


.theorem {
    display: block;
    margin: 12px 0;
    font-style: italic;
    counter-increment: thm_counter;
}
.theorem:before {

    content: "Theorem " counter(thm_counter)".";
    font-weight: bold;
    font-style: normal;
}

.theorem[text]:before {
content: "Theorem " counter(thm_counter)"." " (" attr(text) ") ";
}

.theorem-no-number {
    display: block;
    margin: 12px 0;
    font-style: italic;
}

.theorem-no-number:before {
    font-weight: bold;
    font-style: normal;
}

.theorem-no-number[text]:before {
content: "Theorem." " (" attr(text) ") ";
}


.obs {
    display: block;
    margin: 12px 0;
    font-style: italic;
    counter-increment: thm_counter;
}
.obs:before {
    content: "Observation " counter(thm_counter)".";
    font-weight: bold;
    font-style: normal;
}
.obs[text]:before {
content: "Observation " counter(thm_counter)"." " (" attr(text) ") ";
}


.lemma {
    display: block;
    margin: 12px 0;
    font-style: italic;
    counter-increment: thm_counter;
}
.lemma:before {
    content: "Lemma " counter(thm_counter)".";
    font-weight: bold;
    font-style: normal;

}
.lemma[text]:before {
content: "Lemma " counter(thm_counter)"." " (" attr(text) ") ";
}



.proof {
    display: block;
    margin: 12px 0;
    font-style: normal;
}
.proof:before {
    content: "Proof.";
    font-style: italic;
}
.proof:after {
    content: "\25FC";
    float:right;
}

.definition {
    display: block;
    margin: 12px 0;
    font-style: normal;
    counter-increment: def_counter;
}
.definition:before {
    content: "Definition " counter(def_counter)".";
    font-weight: bold;
    font-style: normal;

}
.definition[text]:before {
content: "Definition " counter(def_counter)"." " (" attr(text) ") ";
}

.qts{
    display: block;
    margin: 12px 0;
    font-style: normal;
    counter-increment: q_counter;
}
.qts:before {
    content: "Question " counter(q_counter)".";
    font-weight: bold;
    font-style: normal;

}
.qts[text]:before {
content: "Question " counter(q_counter)"." " (" attr(text) ") ";
}


FootnoteReturnLinkContents = "↑"
// footnote link
a[href^="#fn:"],
// Back to footnote link
a[href^="#fnref:"] {
  text-decoration: none;
  color: $orange;
  font-family: monospace;
}
a[href^="#fn:"]:before{ content: '[' }
a[href^="#fn:"]:after{ content: ']' }


/* for the dark mode: */
body.dark-mode, 
body.dark-mode main * {
    background: rgb(45, 45, 45);
    color: #f5f5f5;
}

