/*Q-container，通过Q-container嵌套，控制内容宽度*/
.Q-container {
    margin-left: auto;
    margin-right: auto;
    padding: 0px 1em;
    width: 100%;
    max-width: 1100px;
}

/*@media (min-width: 1240px) {*/
/*    .Q-container {*/
/*        max-width: 1200px;*/
/*    }*/
/*}*/

@media screen and (min-width: 769px) {
    /* STYLES HERE */
}

/*header*/
.Q-top {
    z-index: 1000;
}

body{
    background-color: #FFF;
    background-color: var(--background-color, #FFF);
}

body > header.Q-top {
    background-color: rgba(255, 255, 255, 0.85);
    background-color: var(--header-background-top, rgba(255, 255, 255, 0.85));
    border-bottom: solid 1px #DDD;
    border-bottom: solid 1px var(--header-border, #DDD);
}

body > header {
    position: fixed;
    right: 0px;
    left: 0px;
    top: 0px;
    display: flex;
    z-index: 1;
}

body{
    margin-top: 80px;
}
/*body > header~div:first-of-type{*/
/*    margin-top: 80px;*/
/*}*/

/*body > header+*{*/
/*    margin-top: 100px !important;*/
/*}*/

/*导航栏，设置高度，内部元素垂直居中*/
.Q-navbar {
    min-height: 60px;
    display: flex;
    align-items: center;
    /*flex-grow: 1;*/
}

.navbar-logo, .navbar-title {
    display: inline-block;
}

.navbar-logo > img {
    height: 36px;
    vertical-align: middle;
}

.navbar-title {
    color: #777;
    color: var(--navbar-title-color, #777);
    font-size: 1.1em;
    margin: 0px 20px;
}

.Q-navbar > ul {
    text-align: right;
    flex-grow: 1;
    margin: 0px;
}

.Q-navbar > ul > li {
    display: inline-block;
    font-size: 1.2em;
    font-weight: 100;
}

.Q-navbar > ul > li > * {
    padding: 5px 10px;
}

/*main*/
main.Q-container{
    /*display: flex;*/
    /*margin-top: 20px;*/
    min-height: 500px;
    /*margin-top: 100px;*/
    /*margin-bottom: 30px;*/
}

aside {
    flex: 0 0 16rem;
}

/*page-title*/
.page-title {
    position: sticky;
    top: 0px;
}

.page-title > h1 {
    margin: auto;
    margin-top: 1em;
}

.page-title.Q-top {
    /*z-index: 2000;*/
    pointer-events: none;
}

.page-title.Q-top > h1 {
    margin-left: 111px;
    font-size: 1.2em;
    /*font-weight: 100;*/
    pointer-events: all;
}

aside.book-menu, aside.book-toc {
    position: sticky;
    overflow: auto;
    top: 70px;
    /*bottom: 0px;*/
}

aside.book-menu{
    max-height: 100vh;
}
/*aside.book-toc{*/
/*    max-height: 50vh;*/
/*}*/

.main-content {
    flex-grow: 1;
}

/*footer*/
footer {
    text-align: center;
    border-top: solid 1px #DDD;
    border-top: solid 1px var(--footer-border, #DDD);
    padding: 20px;
    font-size: 0.9em;
    /*margin-top: 80px;*/
}

/*language*/
.popup-menu {
    display: none;
    list-style: none;
    position: absolute;
    background-color: #FFF;
    background-color: var(--popup-menu-background, #FFF);
    border-radius: 5px;
    /*box-shadow: 0 0 0.25rem rgb(0 0 0 / 10%);*/
    box-shadow: 0 0 0.25rem #888;
    box-shadow: 0 0 0.25rem var(--popup-menu-shadow, #888);
    text-align: left;
}

.popup-menu > li {
    /*font-size: 0.9em;*/
    line-height: 2;
}

.btn-language > .popup-menu{
    /*font-size: 0.8em;*/
    margin: 0px;
    padding: 0px 10px;
}
.btn-language > a{
    opacity: 0.5;
    /*font-size: 0.9em;*/
}
.btn-language > a > *{
    padding: 1px;
}

.current-language{
    opacity: 0.5;
}

.btn-language img{
    vertical-align: middle;
    height: 1em;
    filter: var(--icon-filter);
    /*padding-right: 5px;*/
}

.btn-language:hover > .popup-menu, .popup-menu:hover {
    display: block;
}

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

.flex{
    display: flex;
}
.center{
    flex-grow: 1;
}

/*doc tree, sidebar*/
main .doc-tree, main .sidebar  {
    flex-basis: 28%;
    flex-shrink: 0;
    /*background-color: #EEE;*/
}

.doc-tree{
    position: sticky;
    max-height: 100vh;
    top: 60px;
    overflow: auto;
}

.doc-tree > ul{
    padding-left: 0px;
}

article img, .excerpt-content img{
    width: auto;
    height: auto;
    max-width: 700px;
    display: block;
    margin: auto;
}