html {
    font-size: 16px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
button {
    font-family: Montserrat, "Yu Gothic Medium", "游ゴシック Medium", YuGothic, "游ゴシック体", "ヒラギノ角ゴ Pro W3", "メイリオ", sans-serif;
}

body {
    margin: 0;
}

code {
    font-family: "Fira Code", "Courier New", Consolas, monospace;
    font-size: 0.83rem;
    color: #7700FF;
    border: 1px solid #E0E0E0;
    border-radius: 3px;
    padding: 1px 4px;
    margin: 0px 1px;
    background: white;
}

pre code {
    font-size: 0.8rem;
}

p {
    line-height: 1.65rem;
}

main ul {
    margin-top: 0px;
    margin-bottom: 8px;
}

main li {
    margin-top: 4px;
    margin-bottom: 4px;
    line-height: 1.5;
}

pre {
    line-height: 1.6;
}

a {
    color: #39f;
    text-decoration: none;
}

button {
    font-size: 1rem;
    cursor: pointer;
    border: none;
    background: transparent;
    outline: none;
}

img {
    width: 100%;
    max-width: 100%;
    height: auto;
}

hr {
    border: 1px solid #d7c8ff;
}

/* ul, ol, dl {
      margin: 0;
      padding: 0;
      list-style: none;
      list-style-image: none;
  } */


#content p img {
    padding: 15px;
}

.img-center {
    display: block;
    margin: auto;
}

.max-width-400 {
    max-width: 400px;
}

.max-width-500 {
    max-width: 500px;
}

.max-width-600 {
    max-width: 600px;
}

.max-width-700 {
    max-width: 700px;
}

.headerlink {
    opacity: 0;
    transition: all ease 300ms;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 400;
    color: #32329f;
    padding-top: 1rem;
}

h1:hover .headerlink,
h2:hover .headerlink,
h3:hover .headerlink,
h4:hover .headerlink,
h5:hover .headerlink,
h6:hover .headerlink {
    opacity: 1;
}

.nav ul,
.breadcrumbs ul {
    padding: 0px;
    list-style-type: none;
}

.nav-item {
    display: block;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.1;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-right: 5px;
}

.nav-item.section {
    /* color: #ddd; */
    width: 100%;
    text-align: left;
    color: #555;
}

.nav-item.section:hover {
    /* background: #999;
    color: #333; */
    color: #555;
    background-color: #f0f0f0;
}

a.nav-item {
    /* color: #999; */
    color: #555;
    line-height: 1.5em;
}

a.nav-item.current {
    color: #32329f;
    /* background: #eee; */
    background-color: #e1e1e1;
}

a.nav-item.current:hover {
    color: #333;
    /* background: #bbb; */
    background-color: #e1e1e1;
}

a.nav-item:hover {
    /* background: #66rgb(50, 50, 159)6; */
    background-color: #f0f0f0;
}

.current .subnav {
    position: relative;
}

.current .subnav::before {
    /* content: 'Table of Contents'; */
    display: block;
    width: 100%;
    margin: 10px 0 5px;
    text-align: center;
    text-transform: uppercase;
    font-size: .7rem;
    color: #535353;
}

.current .subnav::after {
    /* content: ' '; */
    display: block;
    position: absolute;
    width: 6px;
    height: calc(100% - 24px);
    top: 12px;
    right: 0;
    background-color: #b8a4ec;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    z-index: 2;
}

.subnav.hide {
    display: none;
}

.nav-item.section::before {
    position: absolute;
    text-align: center;
    width: 5px;
}

.nav-item.section::before {
    font-family: "Font Awesome 5 Free";
    font-weight: bold;
    content: "\f107";
}

.nav-item.section.hide::before {
    content: "\f105";
}

.toctree-l1>.nav-item.section {
    /* padding-left: 25px; */
    padding: 12.5px 25px;
}

.toctree-l1>a.nav-item {
    /* padding-left: 25px; */
    padding: 12.5px 25px;
}

.toctree-l1>.nav-item.section::before {
    left: 10px;
}

.toctree-l2>.nav-item.section {
    /* padding-left: 35px; */
    padding: 12.5px 20px 12.5px 35px;
}

.toctree-l2>a.nav-item {
    /* padding-left: 25px; */
    padding: 12.5px 20px 12.5px 40px;
}

.toctree-l2>.nav-item.section::before {
    left: 20px;
}

.toctree-l3>.nav-item.section {
    /* padding-left: 45px; */
    padding: 12.5px 20px 12.5px 45px;
}

.toctree-l3>a.nav-item {
    /* padding-left: 35px; */
    padding: 12.5px 20px 12.5px 50px;
}

.toctree-l3>.nav-item.section::before {
    left: 30px;
}

.toctree-l4>.nav-item.section {
    /* padding-left: 55px; */
    padding: 12.5px 20px 12.5px 55px;
}

.toctree-l4>a.nav-item {
    /* padding-left: 45px; */
    padding: 12.5px 20px 12.5px 60px;
}

.toctree-l4>.nav-item.section::before {
    left: 40px;
}

.toctree-l5>.nav-item.section {
    /* padding-left: 65px; */
    padding: 12.5px 20px 12.5px 65px;
}

.toctree-l5>a.nav-item {
    /* padding-left: 55px; */
    padding: 12.5px 20px 12.5px 70px;
}

.toctree-l5>.nav-item.section::before {
    left: 50px;
}

.toctree-l6>.nav-item.section {
    /* padding-left: 75px; */
    padding: 12.5px 20px 12.5px 75px;
}

.toctree-l6>a.nav-item {
    /* padding-left: 65px; */
    padding: 12.5px 20px 12.5px 80px;
}

.toctree-l6>.nav-item.section::before {
    left: 45px;
}

.nav-item.toc {
    /* background: #ccc; */
    background-color: #fafafa;
    color: #555;
    border: none;
}

.nav-item.toc:hover {
    /* background: #bbb; */
    background-color: #e1e1e1;
    color: #555;
    border: none;
}

.repo div {
    padding: 0 10px;
}

.repo div:first-child {
    margin-right: auto;
}

.repo a {
    color: #ddd;
    font-size: 0.9rem;
}

.breadcrumbs {
    background-color: #f0f0ff;
    padding-left: 10px;
}

.breadcrumbs li {
    font-size: 0.9rem;
    display: inline;
}

.git-revision-date-localized {
    font-style: italic;
    color: #535353;
}

.footer-buttons {
    position: relative;
    height: 2.5rem;
}

.footer-buttons .previous a,
.footer-buttons .next a {
    padding: 6px 12px;
    border-radius: 5px;
}

.footer-buttons .previous {
    position: absolute;
    left: 0;
    margin: auto;
}

.footer-buttons .next {
    position: absolute;
    right: 0;
}

.footer-buttons a {
    display: inline-block;
    color: #444;
    background: #eee;
    padding: 4px 8px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.footer-buttons span::after,
.footer-buttons span::before {
    font-family: "Font Awesome 5 Free";
    font-weight: bold;
}

.footer-buttons .previous span::before {
    margin-right: 6px;
    content: "\f359";
}

.footer-buttons .next span::after {
    margin-left: 6px;
    content: "\f35a";
}

.footer-note {
    /* display: flex; */
    font-size: 0.9rem;
    color: #aaa;
    /* height: 40px; */
    border-top: 1px solid #ccc;
    /* align-items: center;
    justify-content: center; */
    text-align: center;
}

.footer-note a {
    color: #88d;
}

/**************************************/
/* layout                             */
/**************************************/
#container {
    display: flex;
}

aside {
    flex: 0 0 300px;
    width: 300px;
    height: 100vh;
    order: 1;
    /* background: #f0f0f0; */
    z-index: 999;
}

aside>* {
    width: inherit;
}

.home,
.home-top {
    display: flex;
    background: #f0f0f0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.home {
    position: fixed;
    top: 0;
}

.home .title {
    width: 100%;
}

.site-logo {
    display: block;
    width: 80%;
    /* height: 100px; */
    margin: 7px auto;
}

.site-logo svg {
    overflow: visible;
    max-width: 100%;
    margin: 0 auto;
}

.site-name {
    display: inline-block;
    color: #ddd;
    font-weight: bold;
}

.site-name::before {
    font-family: "Font Awesome 5 Free";
    content: "\f015";
}

.home .search {
    width: 100%;
}

.home .search form {
    display: flex;
    justify-content: center;
}

.home .search input {
    display: inline-block;
    /* border-radius: 40px; */
    padding: 4px 10px;
    outline: none;
    /* width: 250px; */
    /* border: 1px solid #999; */

    width: 90%;
    border-radius: 5px;
    border: none;
    height: 2rem;
}

.nav {
    position: fixed;
    overflow-y: auto;
    /* background: #333; */
    background-color: #fafafa;
}

.repo {
    display: none;
    background: #222;
    position: fixed;
    bottom: 0;
    height: 40px;
    align-items: center;
}

#spacer {
    flex: 0 0 22px;
    order: 2;
}

main {
    flex: 1 1 300px;
    order: 3;
    min-width: 0;
    overflow: hidden;
}

@media screen and (max-width: 768px) {
    html.show {
        overflow-y: hidden;
    }

    aside {
        display: none;
    }

    aside.show {
        display: block;
        flex: 0 0 100%;
        width: 100%;
    }

    .home,
    .home-top {
        height: 80px;
    }

    .home-top {
        position: relative;
    }

    .home .title {
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
    }

    .home .version,
    .home .search {
        display: none;
    }

    .site-logo {
        max-width: 230px;
    }

    .hamburger {
        position: absolute;
        right: 15px;
    }

    .hamburger::before {
        font-family: "Font Awesome 5 Free";
        content: "\f0c9";
        font-weight: bold;
        color: #ddd;
        font-size: 1.3rem;
    }

    .nav {
        /* top: 40px; */
        top: 80px;
        height: calc(100% - 80px);
    }

    .site-name.hide {
        display: none;
    }

    #spacer {
        display: none;
    }

    #main {
        margin: 10px 15px;
    }

    #main #content {
        max-width: 90%;
        margin: auto;
    }

    .footer-note {
        display: none;
    }

    h1 {
        font-size: 1.45rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    h4 {
        font-size: 1.15rem;
    }

    h5 {
        font-size: 1.1rem;
    }

    h6 {
        font-size: 1.0rem;
    }
}

@media screen and (min-width: 768px) {
    .home-top {
        display: none;
    }

    .home {
        height: 140px;
    }

    /* .home .title {
        margin-top: 5px;
        margin-bottom: 10px;
    } */

    .home .version {
        margin-bottom: 2px;
        color: #aaa;
    }

    .nav {
        top: 140px;
        height: calc(100% - 140px);
    }

    #main {
        margin: 10px 50px 10px 30px;
    }

    .hamburger {
        display: none;
    }

    .arrow {
        position: fixed;
        top: calc(50% - 23px);
        bottom: calc(50% - 23px);
        border: 1px solid #dbdbdb;
        border-radius: 0px 14px 14px 0px;
        padding-left: 3px;
        padding-right: 6px;
        margin-left: -10px;
        transition: 0.3s ease 0s;
    }

    .arrow::before {
        font-family: "Font Awesome 5 Free";
        content: "\f053";
        font-weight: bold;
        color: #fff;
        font-size: 1rem;
    }

    .arrow.hide::before {
        content: "\f054";
    }

    .arrow:hover {
        background: #555;
        color: #ddd;
        border-color: #555;
        margin-left: 0px;
    }

    aside.hide {
        display: none;
    }

    h1 {
        font-size: 1.65rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.2rem;
    }

    h5 {
        font-size: 1.1rem;
    }

    h6 {
        font-size: 1.0rem;
    }
}

/**************************************************
   Table style
  **************************************************/
table {
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: auto;
}

th,
td {
    text-align: center;
    padding: 2px 4px;
}

th {
    color: darkblue;
    background: #eee;
    border: 1px solid #333;
}

td {
    color: black;
    border: 1px solid #b9b9b9;
}

tr th:first-child,
tr td:first-child {
    border-left: 1px solid #333366;
}

tr th:last-child,
tr td:last-child {
    border-right: 1px solid #333366;
}

tr:first-child td,
tr:first-child th {
    border-top: 1px solid #333366;
}

tr:last-child td,
tr:last-child th {
    border-bottom: 1px solid #333366;
}

tbody tr:nth-child(2n+1) td {
    background: #fafafa;
}

.admonition {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 0px;
    padding-bottom: 10px;
}

.admonition.note {
    background: #F0F0FF;
}

.note p.admonition-title {
    color: white;
    background: #555599;
    margin: 0px;
    padding: 4px 8px;
}

.note p.admonition-title:before {
    font-family: "Font Awesome 5 Free";
    content: "\f303";
    font-weight: 900;
    padding-right: 5px;
    color: white;
}

.admonition.warning {
    background: #FFEEEE;
}

.warning p.admonition-title {
    color: white;
    background: #FF6666;
    margin: 0px;
    padding: 4px 8px;
}

.warning p.admonition-title:before {
    font-family: "Font Awesome 5 Free";
    content: "\f071";
    font-weight: 900;
    padding-right: 5px;
    color: white;
}

.admonition p {
    margin-top: 5px;
    margin-left: 10px;
    margin-bottom: 5px;
    padding: 4px;
}

.admonition pre {
    margin-top: 5px;
    margin-left: 15px;
}