:root {
    --article-background: var(--neutral-150);
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
    padding: 0;
}


nav #nav-inner {
    background-color: var(--nav-bg-color);
    box-shadow: 1px 1px 10px -7px var(--neutral-cool-dark);
}

header {
    width: 100%;
    height: 30rem;
    background-size: cover;
    margin: auto;
    display: block;
    position: relative;
    top: -4rem;
    border-radius: 0;
    z-index: 0;
    mask: linear-gradient(white calc(100% - 13rem), transparent);
}

#article-white-bg {
    position: relative;
    top: -4rem;
    padding: 4rem;
}

.article, #article-nav {
    max-width: 65rem;
    margin: auto;
    background-color: var(--article-background);
}

html {
    scroll-behavior: smooth;
}

.article {
    border-radius: 1rem;
    padding: 5rem;
    position: relative;
    z-index: 2;
    top: -13rem;
    border-left: 2px solid var(--neutral-100);
    border-top: 2px solid var(--neutral-100);
    box-shadow: 1px 1px 4px -2px var(--neutral-500);
}

.article > .header-img-credit {
    position: absolute;
    top: -5rem;
    right: 1rem;
}

.article > .header-img-credit * {
    opacity: 0.7;
    color: white;
    text-shadow: 1px 1px 2px var(--neutral-cool-dark);
}

#article-nav {
    background-color: transparent;
    display: block;
    padding: 0;
    height: 8rem;
    overflow-x: visible;
    position: relative;
    z-index: 1;
    top: -12rem;
}

#article-nav ul {
    margin: auto;
    padding: 0;
    height: 8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#article-nav ul button {
    height: 8rem;
    width: 33.1%;
    display: inline-block;
    background-color: var(--neutral-400);
    color: var(--neutral-100);
    box-sizing: border-box;
    padding: 1rem 2rem 2rem 2rem;
    border-radius: 1rem 1rem 0 0;
    font-size: var(--fs-h3);
    border: 0;
    position: relative;
    top: 0;
    transition: top .2s ease-out, color .2s ease-out, height .2s ease-out, background-color .2s ease-out;
}

#article-nav ul button:hover {
    background-color: var(--neutral-500);
    color: var(--neutral-100);
    height: 10rem;
    cursor: pointer;
    top: -1rem;
}

#article-nav ul button.selected {
    background-color: var(--neutral-150);
    color: var(--neutral-600);
    z-index: 5;
}

#article-nav ul button.selected:hover {
    background-color: var(--neutral-150);
    color: var(--neutral-600);
    height: 10rem;
    cursor: pointer;
    top: -1rem;
}

.toc {
    margin: 4rem 0;
}

.toc > ul {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    border-top: 1px solid var(--neutral-200);
    border-left: 1px solid var(--neutral-200);
}

.toc > ul > li::marker {
    content: " ";
}

.toc ul ul {
    padding: 0 0.5rem;
}

.toc ul ul li::marker {
    content: "▸ ";
}

.toc ul li {
    margin: 0.5rem;
}

.toc ul li:hover::marker {
    color: var(--neutral-warm);
    transition: color .2s ease-out;
}

.toc ul li a {
    color: var(--secondary);
    font-size: 1.2rem;
}

.article a:hover {
    text-decoration: underline solid var(--neutral-warm);
    text-underline-offset: 0.25em;
    transition: text-decoration .03s ease-out;
}

section {
    padding-top: 5rem;
    margin-top: -5rem;
    margin-bottom: 5rem;
}

h1 {
    font-size: var(--fs-h1);
    font-weight: var(--fw-strong);
    padding: 0 2rem;
    border-left: 0.6rem solid var(--neutral-200);
    border-radius: 0.25rem;
    line-height: 1.2;
    color: var(--primary);
    margin: 0 0 3rem 0;

}

.subtitle {
    font-size: var(--fs-h3);
    font-weight: var(--fw-thin);
    color: var(--secondary);
    margin: 0 0 6rem 0;
}

h2 {
    font-size: var(--fs-h2);
    /*padding-left: 2.8rem;*/
    font-weight: var(--fw-strong);
    margin: 2rem 0;
    color: var(--neutral-cool-dark);
}

h3 {
    font-size: var(--fs-h3);
    font-weight: var(--fw-regular);
    text-decoration: underline solid var(--neutral-warm);
    -webkit-text-decoration: underline solid var(--neutral-warm);
    text-underline-offset: .8rem;
    margin: 3rem 0 2rem 0;
    color: var(--secondary);
}

h3:lang(en) {
    text-underline-offset: 0.2rem;
    margin: 3rem 0 1.2rem 0;
}

h4 {
    font-size: var(--fs-h4);
    color: var(--primary);
    font-weight: 400;
    margin: 2.5rem 0 1rem 0;
}

p {
    font-size: var(--fs-text);
    line-height: var(--lh-text);
    font-weight: var(--fw-regular);
    color: var(--neutral-700);
    text-align: justify;
    margin: 1rem auto;
    padding: 0 0.5rem;
}

/* 中文、副标题开头空两格 */
p:lang(zh),
.article h1 + p {
    text-indent: 2.8rem;
}

li > p:lang(zh) {
    text-indent: 0;
}

hr {
    border: 1px dashed var(--divider);
    width: 95%;
    margin: 5rem auto;
}

blockquote {
    font-style: italic;
    border-left: 0.3rem solid var(--neutral-200);
    padding-left: 2rem;
    margin: 3rem 5rem 3rem 0;
    opacity: 0.8;
}

.article img + blockquote {
    margin: 1.5rem 0 3rem 0;
    border-left: none;
    padding-left: 0;
    color: var(--neutral-cool-dark);
}

code {
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    width: 100%;
    display: block;
    padding: 1rem;
    background-color: #eee;
    font-family: STZhongsong, "Songti SC", Serif;
    font-weight: 600;
}

.block-table {
    width: 100%;
    overflow-x: auto;
    background: linear-gradient(to right, white 30%, rgba(255, 255, 255, 0)),
    linear-gradient(to right, rgba(255, 255, 255, 0), white 70%) 0 100%,
    radial-gradient(
            farthest-side at 0% 50%,
            rgba(0, 0, 0, 0.2),
            rgba(0, 0, 0, 0)
    ),
    radial-gradient(
            farthest-side at 100% 50%,
            rgba(0, 0, 0, 0.2),
            rgba(0, 0, 0, 0)
    ) 0 100%;
    background-repeat: no-repeat;
    /*background-color: white;*/
    background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
    background-position: 0 0, 100%, 0 0, 100%;
    background-attachment: local, local, scroll, scroll;
}

table {
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

table > caption {
    font-size: var(--fs-text);
    font-weight: var(--fw-regular);
    color: var(--primary);
    padding: 1rem 0 0.5rem 0.1rem;
    text-align: left;
    background-color: var(--article-background);
}

tbody td {
    border-bottom: 1px dashed #00000011;
}

/*tbody tr:nth-child(even) {*/
/*    background-color: #eee;*/
/*}*/

th {
    background-color: var(--neutral-cool-dark);
    color: white;
    padding: 0.6rem;
    white-space: nowrap;
    min-width: 10rem;
}

td {
    padding: 0.5rem 1rem;
    white-space: nowrap;
}

td:first-child {
    min-width: 8rem;
}

td:not(:first-child) {
    text-align: center;
}

td.htLeft {
    text-align: left;
}

td.htCenter {
    text-align: center;
}

td.htRight {
    text-align: right;
}

.article ul li {
    line-height: var(--lh-text);
    font-size: var(--fs-text);
    color: var(--neutral-600);
    padding-left: 1rem;

}

section ul > li::marker,
.article .block-list ul > li::marker {
    color: var(--primary);
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='15' viewBox='0 0 9 15'%3E%3Crect x='0' y='0' width='9' height='15' rx='2' ry='2' stroke-linejoin='round' fill='%235E915C'/%3E%3C/svg%3E");
}

[id*='milestones'] + ul > li::marker {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9.34' height='16' viewBox='0 0 9.34 16'%3E%3Cpath d='M3,15.26H3.9a.54.54,0,0,1,.56.5.5.5,0,0,1-.54.5H1a.45.45,0,0,1-.5-.44.48.48,0,0,1,.37-.54,1.83,1.83,0,0,1,.33,0H2V.93A.93.93,0,0,1,2,.56c.17-.35.49-.37.83-.17L7,2.81,9.46,4.27a.55.55,0,0,1,0,1L3.1,9C3,9.05,3,9.1,3,9.21V15.1A1,1,0,0,0,3,15.26Z' transform='translate(-0.47 -0.26)' fill='%235E915C'/%3E%3C/svg%3E");
}

[id*='advantage'] + ol > li {
    font-size: var(--fs-text);
}

[id*='advantage'] + ol ul > li::marker {
    content: '☑';
}

.article ul li p {
    color: var(--neutral-600);
    background-color: var(--neutral-100);
    padding: 1em;
    border-radius: 0.3rem;
}

.article ol > li {
    color: var(--neutral-600);
    padding-left: 0.5em;
}

.article ol > li::marker {
    color: var(--primary);
    font-size: 1em;
    font-weight: var(--fw-xstrong);
}

.article a {
    color: var(--primary);
    font-weight: var(--fw-regular);
}

.article a[href*="//"]::after {
    content: ' 🔗';
}

.block-image_group {
    background-color: var(--neutral-100);
    border-radius: 5px;
    padding: 1rem;
    margin: 4rem 0;
    border: 1px solid var(--neutral-200);
    box-shadow: 3px 3px 5px var(--neutral-200);
}

.block-image_group:has(.image-group-grid),
.block-image_group:has(.image-group-grid-3),
.block-image_group:has(.image-group-grid-4),
.block-image_group:has(.image-group-plain_grid),
.block-image_group:has(.image-group-plain_grid-3),
.block-image_group:has(.image-group-plain_grid-4) {
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.image-group,
.image-group-grid,
.image-group-grid-3,
.image-group-grid-4,
.image-group-plain_grid,
.image-group-plain_grid-3,
.image-group-plain_grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    grid-gap: 2rem;
    align-items: baseline;
}

.image-group-grid-3, .image-group-plain_grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.image-group-grid-4, .image-group-plain_grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.block-image_group > .image-group-grid img {
    margin: auto;
    width: 100%;
    object-fit: cover;
}

.image-group-grid > .image {
    padding: 1rem;
    background-color: var(--neutral-100);
    border-radius: 5px;
    border: 1px solid var(--neutral-200);
    box-shadow: 3px 3px 5px var(--neutral-200);
}

.image-group-scroll_right {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1rem;
    align-items: baseline;
    overflow-x: auto;
    width: 100%;
    /*scrollbar-color: transparent transparent;*/
    background: linear-gradient(to right, white 30%, rgba(255, 255, 255, 0)),
    linear-gradient(to right, rgba(255, 255, 255, 0), white 70%) 0 100%,
    radial-gradient(
            farthest-side at 0% 50%,
            rgba(0, 0, 0, 0.2),
            rgba(0, 0, 0, 0)
    ),
    radial-gradient(
            farthest-side at 100% 50%,
            rgba(0, 0, 0, 0.2),
            rgba(0, 0, 0, 0)
    ) 0 100%;
    background-repeat: no-repeat;
    /*background-color: white;*/
    background-size: 40px 90%, 40px 90%, 14px 90%, 14px 80%;
    background-position: 0 0, 100%, 0 0, 100%;
    background-attachment: local, local, scroll, scroll;
}

.image-group-scroll_right::-webkit-scrollbar {
    /*display: none;*/
}

.image-group-scroll_right > .image > img {
    border-radius: 5px;
}

.right-note {
    text-align: right;
    color: var(--neutral-cool-dark);
    margin-top: -3rem;
}

img.richtext-image.left {
    width: min(100%, 20rem);
    object-fit: contain;
}

img.richtext-image.full-width {
    width: 100%;
    height: auto;
    max-height: 65vh;
    object-fit: cover;
    margin: 4rem auto;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid var(--neutral-200);
    box-shadow: 1px 1px 3px -1px var(--neutral-600);
    background-color: var(--neutral-100);
}

.article video {
    width: 80%;
    display: block;
    margin: 2rem auto;
}

#attachment {
    max-width: 65rem;
    padding: 5rem;
    margin: auto;
    position: relative;
    top: -12rem;
}

footer {
    position: relative;
    top: -15rem;
}


/* 600px以下的屏幕 */

@media screen and (max-width: 600px) {
    #article-white-bg {
        padding: 0;
        transition: padding .2s ease-out .1s;
    }

    #article-nav, .article {
        top: -1rem;
    }

    .article {
        padding: 2rem;
        border-radius: 0;
        transition: top .3s ease-out, padding .2s ease-out .1s, border-radius .5s ease-out;
    }

    .article p {
        font-size: 1.2rem;
        line-height: 2rem;
        text-align: left;
    }

    .article video {
        width: 90%;
        height: auto;
    }

    #attachment {
        top: -1rem;
        width: 100%;
    }

    footer {
        top: 0;
    }
}
