/* new table of content layout
 */
div#articleindex.custom-articleindex {
    margin: 5px 0 35px;
}

.tag-rail {
    position: relative;
    height: auto;
    padding: 0;
}

.tag-rail .rail-container {
    cursor: pointer;
    white-space: nowrap;
}

.tag-rail .rail-container .rail {
    overflow: auto hidden;
    scroll-behavior: smooth;
    contain: content;
}

.tag-rail .rail-container.left-shadow:before,
.tag-rail .rail-container.right-shadow:after {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 40px;
    z-index: 2;
}

.tag-rail .rail-container.left-shadow:before {
    background: linear-gradient(90deg, #FFFFFF 0%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0) 100%);
}

.tag-rail .rail-container.right-shadow:after {
    right: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 50%, #FFFFFF 100%);
}

.tag-rail .rail-container .rail::-webkit-scrollbar {
    display: none;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.scroll-arrow > img {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
}

.scroll-left {
    left: 0;
}

.scroll-right {
    right: 0;
}

.tag-rail.left-shadow .scroll-left, .tag-rail.right-shadow .scroll-right {
    opacity: 1;
    pointer-events: auto;
}

.tag {
    white-space: nowrap;
    background-color: white;
    display: inline-block;
    color: #636363;
    border-radius: 10px;
    margin: 3px 5px;
    text-align: center;
    padding: 13px 10px;
    font-weight: 600;
    line-height: 19px;
    font-size: 15px;
    box-shadow: inset 0 0 0 1px #636363;
}

.tag:first-child,
.tag:hover
{
    color: #000;
    text-decoration: none !important;
    box-shadow: inset 0 0 0 2px #000;
}

.tag:first-child
{
    margin-left: 5px;
}

/* For coc/szc shorts
 */
div#articleindex.custom-articleindex.coc,
div#articleindex.custom-articleindex.szc {
    margin: 35px 0 35px;
}

/* End of TOC
 */
