#kiwaytoc-wrapper {
    font-family: inherit;
    margin: 1rem 0;
}

#kiwaytoc-wrapper .kiwaytoc-title {
    font-weight: bold;
    border-bottom: 0.4rem solid #356fb4;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    font-size:2.8rem;
    text-align: left;  /* 加上此行，讓標題靠左對齊 */
}

#kiwaytoc-wrapper .kiwaytoc-content {
    position: relative;
    padding-left: 1rem;
}

#kiwaytoc-wrapper .kiwaytoc-list,
#kiwaytoc-wrapper .kiwaytoc-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}

#kiwaytoc-wrapper .kiwaytoc-list li,
#kiwaytoc-wrapper .kiwaytoc-sublist li {
    margin: 0.5rem 0;
    position: relative;
    padding-left: 1rem;
    line-height: 1.3;
    text-align: left;
}

#kiwaytoc-wrapper .kiwaytoc-list li a,
#kiwaytoc-wrapper .kiwaytoc-sublist li a {
    font-size: 1.6rem; /* 自訂項目字體大小 */
}


/* Hierarchy indentation: Sub-levels further indent */
#kiwaytoc-wrapper .kiwaytoc-sublist li {
    padding-left: 1.5rem;
}

/* Gray dashed line between same-level items */
#kiwaytoc-wrapper .kiwaytoc-list > li,
#kiwaytoc-wrapper .kiwaytoc-sublist > li {
    border-left: 1px dashed #cccccc;
}

/* Active heading indicator */
#kiwaytoc-wrapper a.kiwaytoc-active {
    color: #327ad1;
    font-weight: bold;
    position: relative;
}

/* Vertical line for active heading */
#kiwaytoc-wrapper a.kiwaytoc-active::before {
    content: "";
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    height: 1.5em;
    width: 3px;
    background-color: #327ad1;
}

/* Link styling */
#kiwaytoc-wrapper a {
    text-decoration: none;
    color: #616161;
    font-weight: 500;
}

#kiwaytoc-wrapper a:hover {
    text-decoration: underline;
}

#kiwaytoc-wrapper li {
    position: relative;
}
