/* =========================================
   Single Post v5.0 — Full Override
   thuoclangoaicaocap.com / avanam-toolband
   
   v5.0 CHANGES:
   - TOC: 5-item collapse with "Xem thêm" button
   - Sidebar: Pure CSS sticky — no JS overflow hacks
   - Removed max-height scroll on sidebar-sticky
   - Added smooth transitions for TOC expand/collapse
   ========================================= */

/* === NUCLEAR SPECIFICITY OVERRIDES ===
   Parent theme uses .wp-site-blocks .wrap.hfeed which
   beats our simple .sp-* selectors. These rules match
   the full DOM chain to guarantee our styles apply. */
body.single-post .wp-site-blocks .sp-hero,
body.single-post .site .sp-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    padding: 48px 24px 40px !important;
    text-align: center !important;
    color: #fff !important;
    display: block !important;
}
body.single-post .wp-site-blocks .sp-hero *,
body.single-post .site .sp-hero * {
    color: #fff !important;
}
body.single-post .wp-site-blocks .sp-hero .sp-breadcrumb *,
body.single-post .site .sp-hero .sp-breadcrumb * {
    color: rgba(255,255,255,0.7) !important;
}
body.single-post .wp-site-blocks .sp-hero .sp-breadcrumb a,
body.single-post .site .sp-hero .sp-breadcrumb a {
    color: #d4a741 !important;
}
body.single-post .wp-site-blocks .sp-hero .sp-cat-badge,
body.single-post .site .sp-hero .sp-cat-badge {
    color: #d4a741 !important;
}
body.single-post .wp-site-blocks .sp-container,
body.single-post .site .sp-container {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 32px 20px 60px !important;
}
body.single-post .wp-site-blocks .sp-grid,
body.single-post .site .sp-grid {
    display: grid !important;
    grid-template-columns: 1fr 320px !important;
    gap: 32px !important;
    align-items: stretch !important;
}
body.single-post .wp-site-blocks .sp-content,
body.single-post .site .sp-content {
    min-width: 0 !important;
    width: 100% !important;
    float: none !important;
}
body.single-post .wp-site-blocks .sp-sidebar,
body.single-post .site .sp-sidebar {
    min-width: 0 !important;
    display: block !important;
}
/* Kill parent wrappers that fight us */
body.single-post .content-wrap {
    display: block !important;
    max-width: none !important;
    padding: 0 !important;
}
body.single-post #primary {
    width: 100% !important;
    max-width: none !important;
    float: none !important;
    margin: 0 !important;
}
body.single-post .entry-hero,
body.single-post .post-hero-section,
body.single-post #secondary {
    display: none !important;
}

/* === HERO === */
.sp-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 48px 24px 40px;
    text-align: center;
    color: #fff;
}
.sp-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}
.sp-breadcrumb {
    font-size: 13px;
    margin-bottom: 16px;
    opacity: 0.7;
}
.sp-breadcrumb a {
    color: #d4a741;
    text-decoration: none;
}
.sp-breadcrumb a:hover {
    text-decoration: underline;
}
.sp-breadcrumb .separator {
    margin: 0 6px;
    opacity: 0.5;
}
.sp-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 14px;
    color: #fff;
}
.sp-meta {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.sp-meta-sep { opacity: 0.4; }
.sp-cat-badge {
    background: rgba(212,167,65,0.2);
    color: #d4a741;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(212,167,65,0.3);
    transition: all 0.2s;
}
.sp-cat-badge:hover {
    background: #d4a741;
    color: #1a1a2e;
}

/* === CONTAINER + GRID === */
.sp-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}
.sp-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

/* === MAIN CONTENT === */
.sp-content {
    min-width: 0;
}
.sp-article {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
}
.sp-featured-img {
    margin: 0;
    line-height: 0;
}
.sp-featured-img img {
    width: 100%;
    height: auto;
    display: block;
}
.sp-featured-img figcaption {
    font-size: 13px;
    color: #666;
    text-align: center;
    padding: 10px 16px;
    font-style: italic;
    line-height: 1.5;
    background: #fafafa;
}

/* Entry content */
.sp-article .entry-content {
    padding: 28px 32px 32px;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}
.sp-article .entry-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2em 0 0.8em;
    padding-bottom: 8px;
    border-bottom: 2px solid #d4a741;
    color: #1a1a2e;
}
.sp-article .entry-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1.5em 0 0.6em;
    color: #2d3748;
}
.sp-article .entry-content h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.2em 0 0.5em;
    color: #4a5568;
}
.sp-article .entry-content p {
    margin-bottom: 1em;
}
.sp-article .entry-content a {
    color: #c41e3a;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.sp-article .entry-content a:hover {
    color: #d4a741;
}
.sp-article .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.sp-article .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 14px;
}
.sp-article .entry-content table th {
    background: #1a1a2e;
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
}
.sp-article .entry-content table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
}
.sp-article .entry-content table tr:nth-child(even) {
    background: #f7fafc;
}
.sp-article .entry-content table tr:hover {
    background: #edf2f7;
}
.sp-article .entry-content ul,
.sp-article .entry-content ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}
.sp-article .entry-content li {
    margin-bottom: 0.4em;
}
.sp-article .entry-content blockquote {
    border-left: 4px solid #d4a741;
    padding: 16px 20px;
    margin: 1.5em 0;
    background: #fffdf5;
    font-style: italic;
    color: #4a5568;
    border-radius: 0 8px 8px 0;
}

/* Tags */
.sp-tags {
    padding: 20px 32px 24px;
    border-top: 1px solid #eee;
}
.sp-tags a {
    display: inline-block;
    background: #f0f0f0;
    color: #555;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    margin: 4px 4px 4px 0;
    text-decoration: none;
    transition: all 0.2s;
}
.sp-tags a:hover {
    background: #d4a741;
    color: #fff;
}
.sp-tags-label {
    font-weight: 600;
    color: #333;
    margin-right: 4px;
}

/* Post Navigation */
.post-navigation {
    margin-top: 32px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
}
.post-navigation .nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.post-navigation .nav-previous,
.post-navigation .nav-next {
    padding: 20px 24px;
}
.post-navigation .nav-next {
    text-align: right;
    border-left: 1px solid #eee;
}
.post-navigation a {
    text-decoration: none;
    color: #333;
}
.sp-nav-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.sp-nav-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    color: #1a1a2e;
}
.post-navigation a:hover .sp-nav-title {
    color: #d4a741;
}

/* Comments */
.comments-area {
    margin-top: 32px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 28px 32px;
}

/* === SIDEBAR === */
.sp-sidebar {
    min-width: 0;
}
/* v5: Pure CSS sticky — NO JS overflow hacks needed */
.sp-sidebar-sticky {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* No max-height, no overflow — let content flow naturally.
       TOC is now limited to 5 items so sidebar stays compact. */
}

/* Widget common */
.sp-widget {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
}
.sp-widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    background: #f8f9fa;
    border-bottom: 2px solid #d4a741;
}
.sp-widget-title svg {
    flex-shrink: 0;
    color: #d4a741;
}

/* === TOC — Collapse/Expand System === */
.sp-toc .toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-counter;
}
.sp-toc .toc-list .toc-item {
    border-bottom: 1px solid #f0f0f0;
    counter-increment: toc-counter;
}
.sp-toc .toc-list .toc-item:last-child {
    border-bottom: none;
}
/* Hidden items — smooth collapse */
.sp-toc .toc-list .toc-item.toc-hidden {
    display: none;
}
.sp-toc .toc-list a {
    display: block;
    padding: 10px 16px 10px 14px;
    color: #555;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    transition: all 0.15s;
    border-left: 3px solid transparent;
    position: relative;
}
.sp-toc .toc-list a::before {
    content: counter(toc-counter) ".";
    display: inline-block;
    width: 22px;
    color: #999;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
.sp-toc .toc-list a:hover {
    background: #f8f9fa;
    color: #1a1a2e;
}
.sp-toc .toc-list a.toc-active {
    background: #fffdf5;
    color: #c41e3a;
    font-weight: 600;
    border-left-color: #d4a741;
}
.sp-toc .toc-list a.toc-active::before {
    color: #d4a741;
}

/* "Xem thêm" / "Thu gọn" Button */
.toc-show-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: #f8f9fa;
    color: #d4a741;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-top: 1px solid #f0f0f0;
}
.toc-show-more:hover {
    background: #fffdf5;
    color: #c41e3a;
}
.toc-show-more svg {
    transition: transform 0.2s;
}
.toc-show-more[data-expanded="true"] svg {
    transform: rotate(180deg);
}

/* === Recent Posts === */
.sp-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sp-recent-item {
    border-bottom: 1px solid #f0f0f0;
}
.sp-recent-item:last-child {
    border-bottom: none;
}
.sp-recent-item a {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    transition: background 0.15s;
}
.sp-recent-item a:hover {
    background: #f8f9fa;
}
.sp-recent-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
}
.sp-recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sp-recent-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.sp-recent-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sp-recent-date {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* === Products === */
.sp-product-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sp-product-item {
    border-bottom: 1px solid #f0f0f0;
}
.sp-product-item:last-child {
    border-bottom: none;
}
.sp-product-item a {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    transition: background 0.15s;
}
.sp-product-item a:hover {
    background: #f8f9fa;
}
.sp-product-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}
.sp-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sp-product-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.sp-product-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sp-product-price {
    font-size: 13px;
    font-weight: 700;
    color: #c41e3a;
    margin-top: 4px;
}

/* === Banner === */
.sp-banner-link {
    display: block;
    position: relative;
    padding: 28px 20px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    text-align: center;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s;
}
.sp-banner-link:hover {
    transform: translateY(-2px);
}
.sp-banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #fff;
}
.sp-banner-icon {
    font-size: 24px;
    font-weight: 800;
    background: rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 8px;
    margin-bottom: 4px;
}
.sp-banner-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.sp-banner-desc {
    font-size: 12px;
    opacity: 0.8;
    line-height: 1.4;
}
.sp-banner-cta {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 18px;
    background: #d4a741;
    color: #1a1a2e;
    font-size: 13px;
    font-weight: 700;
    border-radius: 20px;
    transition: all 0.2s;
}
.sp-banner-link:hover .sp-banner-cta {
    background: #fff;
    color: #1a1a2e;
}

/* Shine animation */
.sp-banner-link::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    animation: spShine 3s infinite;
    z-index: 3;
}
@keyframes spShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Reading Progress Bar */
#reading-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4a741, #c41e3a);
    z-index: 9999;
    transition: width 0.1s ease;
    width: 0;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .sp-grid,
    body.single-post .wp-site-blocks .sp-grid,
    body.single-post .site .sp-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
    .sp-sidebar {
        order: -1;
    }
    .sp-sidebar-sticky {
        position: relative;
        top: 0;
    }
    /* Mobile: collapse TOC entirely behind title click */
    .sp-toc .sp-toc-nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .sp-toc .toc-show-more {
        display: none;
    }
    .sp-toc.toc-expanded .sp-toc-nav {
        max-height: 2000px;
    }
    .sp-toc.toc-expanded .toc-show-more {
        display: flex;
    }
    /* Show all items on mobile when expanded */
    .sp-toc.toc-expanded .toc-item.toc-hidden {
        display: block;
    }
    .sp-toc .sp-widget-title {
        cursor: pointer;
    }
    .sp-toc .sp-widget-title::after {
        content: '\25BC';
        margin-left: auto;
        font-size: 10px;
        opacity: 0.5;
    }
    .sp-toc.toc-expanded .sp-widget-title::after {
        content: '\25B2';
    }
}
@media (max-width: 768px) {
    .sp-hero {
        padding: 30px 16px 28px;
    }
    .sp-title {
        font-size: 1.4rem;
    }
    .sp-container {
        padding: 20px 12px 40px;
    }
    .sp-article .entry-content {
        padding: 20px 16px 24px;
    }
    .post-navigation .nav-links {
        grid-template-columns: 1fr;
    }
    .post-navigation .nav-next {
        border-left: none;
        border-top: 1px solid #eee;
    }
}

/* === PARENT THEME OVERRIDES === */
body.single-post .entry-hero,
body.single-post .post-hero-section,
body.single-post .entry-hero-container-inner,
body.single-post #secondary {
    display: none !important;
}
body.single-post.has-sidebar #inner-wrap .content-wrap {
    display: block !important;
    max-width: none !important;
}
body.single-post #primary {
    width: 100% !important;
    max-width: none !important;
    float: none !important;
}
body.single-post .site-container,
body.single-post .content-container.site-container {
    max-width: none !important;
    padding: 0 !important;
}
.sp-hero {
    display: block !important;
}


/* === V102: FOXTOOL TOC — FULL REDESIGN MATCHING SINGLE POST WIDGET === */
/* Uses !important to override FoxTool plugin's foxtoc.css */

/* Main container - same as .sp-widget spacing */
.ft-toc-placeholder {
    margin: 32px 0 40px !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Base Widget - exact match to .sp-widget */
.ft-toc-main {
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
    overflow: hidden !important;
    max-width: 100% !important;
    border: 1px solid #f0f0f0 !important;
    padding: 0 !important;
    font-size: 14px !important;
}

/* Header - exact match to .sp-widget-title */
.ft-toc-tit {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 16px !important;
    margin: 0 !important;
    background: #f8f9fa !important;
    border-bottom: 2px solid #d4a741 !important;
}
.ft-toc-tit-sp {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
}

/* Header icon - gold accent */
.ft-toc-tit-svg {
    display: flex !important;
    align-items: center !important;
    width: 18px !important;
    height: 18px !important;
    color: #d4a741 !important;
    flex-shrink: 0 !important;
}
.ft-toc-tit-svg svg {
    fill: currentColor !important;
    width: 18px !important;
    height: 18px !important;
}
.ft-toc-tit-sp svg {
    margin-right: 0 !important;
}

/* Hide the close button on side */
.ft-toc-close,
.ft-toc-close2 {
    display: none !important;
}

/* Toggle icon (expand/collapse header) */
.ft-toc-tit-hi {
    cursor: pointer !important;
    color: #64748b !important;
    border-radius: 4px !important;
    padding: 4px !important;
    transition: background 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    background: transparent !important;
    border: none !important;
}
.ft-toc-tit-hi:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Scroll area reset */
.ft-toc-scrol {
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

/* ===== List Items ===== */
#ft-toc-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Each item - border separator like .sp-toc .toc-item */
#ft-toc-list li {
    margin: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    list-style: none !important;
}
#ft-toc-list li:last-child {
    border-bottom: none !important;
}

/* Link styling - exact match to .sp-toc .toc-list a */
#ft-toc-list li a {
    display: flex !important;
    align-items: flex-start !important;
    padding: 10px 16px 10px 14px !important;
    color: #555 !important;
    text-decoration: none !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    transition: all 0.15s !important;
    border-left: 3px solid transparent !important;
    position: relative !important;
    background: transparent !important;
}

/* Hover state */
#ft-toc-list li a:hover {
    background: #f8f9fa !important;
    color: #1a1a2e !important;
}

/* Scrollspy active state - match .toc-active */
#ft-toc-list li a.active-toc-link {
    background: #fffdf5 !important;
    color: #c41e3a !important;
    font-weight: 600 !important;
    border-left-color: #d4a741 !important;
}

/* Level-1 items - bold, slightly larger */
.ft-toc-level-1 > a {
    font-weight: 600 !important;
    color: #1a1a2e !important;
    font-size: 14px !important;
}

/* Level-2 items - indented + lighter */
.ft-toc-level-2 > a {
    padding-left: 30px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #666 !important;
}

/* Level-3 items - more indent */
.ft-toc-level-3 > a {
    padding-left: 44px !important;
    font-size: 12.5px !important;
    font-weight: 400 !important;
    color: #888 !important;
}

/* Level-4 */
.ft-toc-level-4 > a {
    padding-left: 56px !important;
    font-size: 12px !important;
    color: #999 !important;
}

/* ===== "Xem thêm" / "Thu gọn" Button ===== */
.ft-toc-show-more {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
    padding: 12px 16px !important;
    border: none !important;
    background: linear-gradient(to bottom, #f8f9fa, #f1f3f5) !important;
    color: #d4a741 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    border-top: 1px solid #f0f0f0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-radius: 0 0 12px 12px !important;
}
.ft-toc-show-more:hover {
    background: linear-gradient(to bottom, #fffdf5, #fff8e6) !important;
    color: #c41e3a !important;
}
.ft-toc-show-more svg {
    transition: transform 0.2s !important;
    flex-shrink: 0 !important;
}
.ft-toc-show-more[data-expanded="true"] svg {
    transform: rotate(180deg) !important;
}

/* ===== Overrides for FoxTool dark mode / sidebar ===== */
.ft-toc-sidebar,
.ft-toc-sidebar.dark-mode {
    display: none !important;
}

/* FoxTool light highlight override */
.ft-toc-light,
.ft-toc-light a {
    color: #c41e3a !important;
    transition: color 0.5s ease !important;
}

/* ===== Mobile tweaks ===== */
@media (max-width: 768px) {
    .ft-toc-placeholder {
        margin: 20px 0 24px !important;
    }
    #ft-toc-list li a {
        padding: 9px 12px 9px 10px !important;
        font-size: 13px !important;
    }
    .ft-toc-level-2 > a {
        padding-left: 24px !important;
    }
    .ft-toc-level-3 > a {
        padding-left: 36px !important;
    }
}

/* === STICKY SIDEBAR FIX V2 === */
/* Nuclear overflow reset for ALL ancestors to enable position:sticky */
body.single-post .wp-site-blocks,
body.single-post .site,
body.single-post .site-container,
body.single-post .content-wrap,
body.single-post .content-area,
body.single-post #primary,
body.single-post #inner-wrap,
body.single-post .entry-content-wrap,
body.single-post .hentry,
body.single-post .sp-container,
body.single-post .sp-grid {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
}
/* Ensure sidebar column stretches full grid height */
body.single-post .sp-sidebar {
    overflow: visible !important;
    min-height: 0 !important;
    height: auto !important;
}
/* Sticky inner wrapper — the actual sticky element */
body.single-post .sp-sidebar-sticky {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 80px !important;
    max-height: calc(100vh - 100px) !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
}
body.single-post .sp-sidebar-sticky::-webkit-scrollbar {
    width: 4px;
}
body.single-post .sp-sidebar-sticky::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
}
