.affronter-intelligent-toc {
    position: relative;
    margin: 0 0 2.5rem;
    padding: 1.4rem;
    border: 1px solid rgba(85, 167, 255, 0.28);
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(64, 149, 255, 0.22), transparent 34%),
        linear-gradient(135deg, #07111f 0%, #0d1c32 45%, #101827 100%);
    color: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.affronter-intelligent-toc::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.aitoc-progress-shell {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
}

.aitoc-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #44d7ff, #7c5cff, #f4d56f);
    transition: width 0.18s ease;
}

.aitoc-header,
.aitoc-meta-grid,
.aitoc-list {
    position: relative;
    z-index: 2;
}

.aitoc-header {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.2rem;
}

.aitoc-kicker {
    display: inline-flex;
    margin-bottom: 0.5rem;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    background: rgba(68, 215, 255, 0.12);
    color: #8be8ff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.affronter-intelligent-toc h2 {
    margin: 0 0 0.5rem;
    color: #ffffff;
    font-size: clamp(1.45rem, 3vw, 2.35rem);
    line-height: 1.1;
}

.affronter-intelligent-toc p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.65;
}

.aitoc-toggle {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
}

.aitoc-toggle:hover,
.aitoc-toggle:focus {
    background: rgba(68, 215, 255, 0.16);
    outline: none;
}

.aitoc-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 1.2rem 0;
}

.aitoc-meta-card {
    padding: 0.9rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.11);
}

.aitoc-meta-card span {
    display: block;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.78rem;
}

.aitoc-meta-card strong {
    display: block;
    margin-top: 0.3rem;
    color: #ffffff;
    font-size: 1.15rem;
}

.aitoc-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.aitoc-item a {
    display: grid;
    grid-template-columns: 20px 1fr 18px;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.aitoc-item a:hover,
.aitoc-item a:focus {
    transform: translateX(4px);
    background: rgba(68, 215, 255, 0.12);
    border-color: rgba(68, 215, 255, 0.32);
    outline: none;
}

.aitoc-node {
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.05);
}

.aitoc-title {
    font-weight: 650;
}

.aitoc-status {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.aitoc-item.is-active a {
    background: linear-gradient(135deg, rgba(68, 215, 255, 0.23), rgba(124, 92, 255, 0.16));
    border-color: rgba(68, 215, 255, 0.56);
    color: #ffffff;
}

.aitoc-item.is-active .aitoc-node {
    background: #44d7ff;
    box-shadow: 0 0 0 5px rgba(68, 215, 255, 0.16), 0 0 24px rgba(68, 215, 255, 0.7);
}

.aitoc-item.is-read .aitoc-status {
    background: #58e6a7;
}

.aitoc-level-3 {
    margin-left: 1rem;
}

.aitoc-level-4 {
    margin-left: 2rem;
}

.affronter-intelligent-toc.is-collapsed .aitoc-meta-grid,
.affronter-intelligent-toc.is-collapsed .aitoc-list {
    display: none;
}

@media (max-width: 720px) {
    .affronter-intelligent-toc {
        padding: 1rem;
        border-radius: 22px;
    }

    .aitoc-header {
        flex-direction: column;
    }

    .aitoc-meta-grid {
        grid-template-columns: 1fr;
    }

    .aitoc-level-3,
    .aitoc-level-4 {
        margin-left: 0;
    }
}
