.error {
    color: red;
}

.header__language-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 6px;
    padding: 0;
    vertical-align: middle;
    box-sizing: border-box;
}

/* English desktop brand: reuse the original left-side logo and replace only its label. */
.header__logo:has(.header__brand-en) {
    width: 320px;
}
.header__brand-en {
    position: absolute;
    left: 0;
    top: 50%;
    width: 320px;
    height: 28px;
    transform: translateY(-50%);
}
.header__brand-en > img {
    position: absolute;
    left: 0;
    top: 0;
    width: 278px;
    height: 28px;
    transform: none;
}
.header__brand-en::after {
    position: absolute;
    top: 0;
    left: 176px;
    width: 144px;
    height: 28px;
    border-left: 1px solid #E2E2E2;
    background: #fff;
    content: '';
}
.header__brand-en > span {
    position: absolute;
    z-index: 1;
    top: 1px;
    left: 198px;
    color: #333;
    font-family: 'PingFang SC', Arial, sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 28px;
    white-space: nowrap;
}
.info{
    color: #e23d67;
}
.img4{
    width: 21%;
    margin-left: 3%;
}
.img3{
    width: 30%;
    margin-left: 3%;
}
.img2{
    width: 46%;
    margin-left: 3%;
}
.markdown-section th, .markdown-section td {
    padding: 8px 15px;
}

/* Screenshots embedded in Markdown tables should remain readable without
 * making the whole table excessively wide.  This deliberately targets only
 * static-page table wrappers, leaving normal article illustrations untouched. */
.static-page .static-table-scroll td img,
.static-page .static-table-scroll th img {
    display: block;
    width: auto;
    max-width: 480px;
    height: auto;
    margin: 10px 0;
}

.static-page .static-doc-article img {
    cursor: zoom-in;
}

.static-page .static-doc-article .pdf-download-button img {
    cursor: pointer;
}

.image-preview-open {
    overflow: hidden;
}

.image-preview-overlay {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(0, 0, 0, .72);
    cursor: zoom-out;
}

.image-preview-overlay img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    cursor: zoom-out;
}

.image-preview-close {
    position: fixed;
    top: 20px;
    right: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, .42);
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    .static-page .static-table-scroll td img,
    .static-page .static-table-scroll th img {
        max-width: 320px;
    }
}

/* Long localized sidebar titles must not wrap into the first navigation item. */
.static-doc-aside .doc-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Static pages use a separate, two-level mobile navigation instead of a full sidebar tree. */
@media screen and (max-width: 768px) {
    .static-mobile-sidebar {
        display: none;
    }
    .static-mobile-sidebar.is-open {
        display: flex;
    }
    .static-mobile-categories {
        display: flex;
        width: 100%;
        height: 100%;
        min-height: 0;
    }
    .static-mobile-category-tabs {
        flex: 0 0 7.07rem;
        padding-top: 1.79rem;
        background: #f6f9fc;
    }
    .static-mobile-category-tab {
        display: block;
        width: 100%;
        height: 3.43rem;
        border: 0;
        border-left: 3px solid transparent;
        background: transparent;
        color: #333;
        font-size: 1.14rem;
        font-weight: 700;
        text-align: center;
    }
    .static-mobile-category-tab.is-active {
        border-left-color: #2469f3;
        background: #fff;
        color: #2469f3;
    }
    .static-mobile-category-panels {
        flex: 1;
        min-width: 0;
        overflow-y: auto;
        padding: 1.79rem 1.43rem 3rem;
        background: #fff;
    }
    .static-mobile-category-panel {
        display: none;
    }
    .static-mobile-category-panel.is-active {
        display: block;
    }
    .static-mobile-category-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 3.43rem;
        border-bottom: .07rem solid #efefef;
        color: #333;
        font-size: 1.14rem;
        font-weight: 700;
        text-decoration: none;
    }
    .static-mobile-category-link > a {
        flex: 1;
        min-width: 0;
        color: inherit;
        text-decoration: none;
    }
    .static-mobile-group-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.6rem;
        min-height: 3.43rem;
        border: 0;
        background: transparent;
        color: #999;
        cursor: pointer;
    }
    .static-mobile-category-link span {
        color: #999;
        font-size: 1.8rem;
        font-weight: 300;
    }
    .static-mobile-category-link.is-current {
        color: #2469f3;
    }
    .static-mobile-category-group.is-open > .static-mobile-category-link .static-mobile-group-toggle span {
        font-size: 0;
    }
    .static-mobile-category-group.is-open > .static-mobile-category-link .static-mobile-group-toggle span::after {
        content: '−';
        font-size: 1.8rem;
    }
    .static-mobile-group-tree {
        display: none;
        padding: .45rem 0 .65rem .8rem;
    }
    .static-mobile-category-group.is-open > .static-mobile-group-tree {
        display: block;
    }
    .static-mobile-group-tree ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }
    .static-mobile-group-tree li {
        position: relative;
        margin: 0;
    }
    .static-mobile-group-tree a,
    .static-mobile-group-tree span,
    .static-mobile-group-tree .static-folder-label {
        display: block;
        padding: .6rem .25rem;
        color: #555;
        font-size: .95rem;
        line-height: 1.45;
        text-decoration: none;
    }
    .static-mobile-group-tree span,
    .static-mobile-group-tree .static-folder-label {
        color: #333;
        font-weight: 700;
    }
    .static-mobile-group-tree .static-folder-label::before {
        content: '+';
        display: inline-block;
        width: 1.1rem;
        color: #999;
    }
    .static-mobile-group-tree li.open > .static-folder-label::before {
        content: '−';
    }
    .static-mobile-group-tree li > ul {
        display: none;
        padding-left: .8rem;
    }
    .static-mobile-group-tree li.open > ul {
        display: block;
    }
    .static-mobile-nav-open .polyv-service-btn-pc,
    .static-mobile-nav-open .polyv-service-btn-mobile {
        display: none !important;
    }
}

/*
 * Desktop wide-reading layout.
 *
 * Keep the prose column within a comfortable reading measure, while letting
 * tables, screenshots and code samples use the additional horizontal space.
 * This starts at 1400px only, so the existing tablet and mobile layouts are
 * intentionally unchanged.
 */
@media screen and (min-width: 1400px) {
    main,
    .boundary {
        width: calc(100% - 64px);
        max-width: 1560px;
        min-width: 0;
        margin-right: auto;
        margin-left: auto;
    }

    .sidebar {
        left: max(32px, calc((100% - 1560px) / 2));
    }

    main section.content {
        /* 336px is the fixed left navigation; reserve 232px for the TOC. */
        padding-right: 232px;
    }

    .markdown-section > p,
    .markdown-section > ul,
    .markdown-section > ol,
    .markdown-section > blockquote {
        max-width: 860px;
    }

    aside.toc-nav {
        right: max(32px, calc((100% - 1560px) / 2));
        width: 200px;
        margin-right: 0;
    }
}

/* Article PDF download entry. The native download attribute keeps readers in
 * the Help Center while saving the already-rendered document from /pdf/. */
.doc-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 48px 0 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #efefef;
}

.doc-title-row > h1 {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.pdf-download-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    margin-top: 0;
    padding: 7px 12px;
    border: 0;
    border-radius: 0;
    color: #333;
    background: #fff;
    font-size: 13px;
    font-weight: 400;
    line-height: 20px;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.pdf-download-button:hover {
    color: #333;
    background: #f5f5f5;
    text-decoration: none;
}

/* Override the generic Markdown anchor colour inside article content. */
.markdown-section .pdf-download-button,
.markdown-section .pdf-download-button:hover {
    color: #333;
}

.pdf-download-button img {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

@media screen and (max-width: 768px) {
    .doc-title-row {
        gap: 10px;
        margin: 32px 0 20px;
        padding-bottom: 20px;
    }

    .pdf-download-button {
        width: 36px;
        min-width: 36px;
        padding: 7px;
    }

    .pdf-download-button span {
        display: none;
    }
}
