/* Two-column layout only when the new sidebar is present and JS finds headings. */
.wittytool-article-template .wtav2-main.wtav2-has-toc {
    --wtav2-sticky-top: 112px;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 32px 56px !important;
    align-items: start !important;
    overflow: visible !important;
}
.wittytool-article-template .wtav2-main.wtav2-has-toc > .e-con-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 32px 56px !important;
    align-items: start !important;
    width: 100%;
    max-width: none;
    overflow: visible !important;
    grid-column: 1 / -1;
}
.wittytool-article-template .wtav2-body { min-width: 0; }
.wittytool-article-template .wtav2-main .wtav2-toc-sidebar {
    display: none !important;
}
.wittytool-article-template .wtav2-main.wtav2-has-toc .wtav2-toc-sidebar {
    display: block !important;
    position: sticky !important;
    top: var(--wtav2-sticky-top);
    align-self: start !important;
    width: 280px !important;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}
body.admin-bar .wittytool-article-template .wtav2-main { --wtav2-sticky-top: 144px; }
.wittytool-article-template .wtav2-body :is(h2,h3) { scroll-margin-top: 128px; }
body.admin-bar .wittytool-article-template .wtav2-body :is(h2,h3) { scroll-margin-top: 160px; }
.wittytool-article-template .wtav2-toc {
    width: 100%;
    padding: 0;
    border: 1px solid #cee0f8;
    border-radius: 8px;
    background: #fff;
    color: #123267;
    font-family: Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
    text-align: left;
    max-height: calc(100vh - var(--wtav2-sticky-top, 112px) - 24px);
    overflow: auto;
    overscroll-behavior: contain;
}
.wittytool-article-template .wtav2-toc[hidden] { display: none !important; }
.wittytool-article-template .wtav2-toc-title {
    display: flex; align-items: center; gap: 10px;
    margin: 0; padding: 15px 16px 12px;
    color: #09265d; font-size: 15px; line-height: 1.4; font-weight: 600;
}
.wittytool-article-template .wtav2-toc-title span { color: #0665ff; font-size: 20px; }
.wittytool-article-template .wtav2-toc-list {
    list-style: none; counter-reset: wtav2-section;
    margin: 0; padding: 0 0 10px;
}
.wittytool-article-template .wtav2-toc-list li { list-style: none; margin: 0; padding: 0; }
.wittytool-article-template .wtav2-toc-list a {
    display: flex; gap: 10px; align-items: baseline;
    margin: 0; padding: 10px 16px;
    border-left: 2px solid transparent;
    color: #52739f; background: transparent;
    font-size: 13px; font-weight: 400; line-height: 1.55;
    text-decoration: none; overflow-wrap: anywhere;
}
.wittytool-article-template .wtav2-toc-list .wtav2-toc-h2 a::before {
    counter-increment: wtav2-section; content: counter(wtav2-section) ".";
    flex: 0 0 15px; color: inherit;
}
.wittytool-article-template .wtav2-toc-list .wtav2-toc-h3 a { padding-left: 43px; font-size: 12px; }
.wittytool-article-template .wtav2-toc-list a:hover { color: #0665ff; background: #f5f9ff; }
.wittytool-article-template .wtav2-toc-list a[aria-current="location"] {
    border-left-color: #0665ff; background: #eef6ff; color: #0665ff;
}
.wittytool-article-template .wtav2-toc-list a:focus-visible { outline: 2px solid #0665ff; outline-offset: -3px; }
@media (max-width: 1024px) {
    .wittytool-article-template .wtav2-main.wtav2-has-toc,
    .wittytool-article-template .wtav2-main.wtav2-has-toc > .e-con-inner { grid-template-columns: minmax(0,1fr); }
    .wittytool-article-template .wtav2-main.wtav2-has-toc .wtav2-toc-sidebar {
        position: static !important; width: 100% !important; grid-row: 1;
    }
    .wittytool-article-template .wtav2-toc { max-height: 300px; }
}

/* Compact H2-only TOC. Keep title visible while scrolling the list. */
.wittytool-article-template .wtav2-toc {
    display: flex; flex-direction: column;
    max-height: min(520px, calc(100dvh - var(--wtav2-sticky-top, 112px) - 24px));
    overflow: hidden;
}
.wittytool-article-template .wtav2-toc-title { flex: 0 0 auto; padding: 14px 16px; border-bottom: 1px solid #e6edf5; }
.wittytool-article-template .wtav2-toc-list {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    padding: 6px 0; scrollbar-width: thin; scrollbar-color: #a7bad1 transparent;
}
.wittytool-article-template .wtav2-toc-list a { font-size: 14px; line-height: 1.5; padding: 9px 14px; color: #475569; }
.wittytool-article-template .wtav2-toc-list a[aria-current="location"] { color: #1d4ed8; background: #eff6ff; }
.wittytool-article-template .wtav2-toc-list a:hover { color: #1d4ed8; }
@media(max-width:1024px){.wittytool-article-template .wtav2-toc{max-height:300px}}

/* Reference-style TOC; retain the article's Inter font. */
.wittytool-article-template .wtav2-toc {
 border:0 !important; border-radius:0 !important; background:#fff !important;
 font-family:WittytoolInter,Inter,Arial,sans-serif !important;
 max-height:calc(100dvh - var(--wtav2-sticky-top,112px) - 24px);
 box-shadow:none !important;
}
.wittytool-article-template .wtav2-toc-title {
 padding:0 0 18px !important; border:0 !important; color:#000 !important;
 font-family:inherit !important; font-size:16px !important; font-weight:700 !important; line-height:1.5 !important;
}
.wittytool-article-template .wtav2-toc-list {
 margin:0 !important; padding:0 !important; list-style:none !important;
 scrollbar-width:thin; scrollbar-color:#ddd transparent;
}
.wittytool-article-template .wtav2-toc-list > .wtav2-toc-h2 {
 margin:0 !important; padding:0 !important; border-top:1px solid #e5e5e5;
}
.wittytool-article-template .wtav2-toc-list > .wtav2-toc-h2.is-active { border-top:2px solid #6045ff; }
.wittytool-article-template .wtav2-toc-list a {
 display:block !important; margin:0 !important; padding:16px 0 !important;
 border:0 !important; background:transparent !important; color:#000 !important;
 font-family:inherit !important; font-size:20px !important; font-weight:700 !important; line-height:1.45 !important;
 white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-decoration:none !important;
}
.wittytool-article-template .wtav2-toc-list a::before { content:none !important; display:none !important; }
.wittytool-article-template .wtav2-toc-sublist {
 list-style:none !important; margin:0 !important; padding:0 0 20px !important;
}
.wittytool-article-template .wtav2-toc-sublist[hidden] { display:none !important; }
.wittytool-article-template .wtav2-toc-sublist .wtav2-toc-h3 { margin:0 !important; padding:0 !important; border:0 !important; }
.wittytool-article-template .wtav2-toc-sublist .wtav2-toc-h3 a {
 padding:8px 0 !important; color:#808080 !important; font-size:18px !important; font-weight:500 !important; line-height:1.4 !important;
}
.wittytool-article-template .wtav2-toc-list > .is-active > a,
.wittytool-article-template .wtav2-toc-list a[aria-current="location"],
.wittytool-article-template .wtav2-toc-list a:hover { color:#6045ff !important; background:transparent !important; }
.wittytool-article-template .wtav2-toc-list a:focus-visible { outline:2px solid #6045ff; outline-offset:-2px; }
/* Shared left column extends the sticky boundary through article footer. */
.wittytool-article-template .wtav2-left-column {
 display:flex !important; flex-direction:column !important; width:100% !important;
 min-width:0; max-width:100% !important; gap:0 !important; padding:0 !important; margin:0 !important;
}
.wittytool-article-template .wtav2-left-column > .wtav2-body,
.wittytool-article-template .wtav2-left-column > .wtav2-bottom { width:100% !important; max-width:100% !important; min-width:0; }
.wittytool-article-template .wtav2-left-column .wtav2-bottom > .elementor-widget,
.wittytool-article-template .wtav2-left-column .wtav2-bottom > .e-con-inner > .elementor-widget {
 width:100% !important; max-width:100% !important; margin-left:0 !important; margin-right:0 !important;
}
@media(max-width:1024px) {
 .wittytool-article-template .wtav2-toc { max-height:360px; }
 .wittytool-article-template .wtav2-toc-list a { font-size:18px !important; }
 .wittytool-article-template .wtav2-toc-sublist .wtav2-toc-h3 a { font-size:16px !important; }
}
.wittytool-article-template .wtav2-toc-sublist .wtav2-toc-h3 a[aria-current="location"],
.wittytool-article-template .wtav2-toc-sublist .wtav2-toc-h3 a:hover { color:#6045ff !important; }
/* Compact TOC */
.wittytool-article-template .wtav2-toc-title {
    font-size: 14px !important;
    line-height: 1.4 !important;
    padding-bottom: 12px !important;
}

/* H2 */
.wittytool-article-template .wtav2-toc-list > .wtav2-toc-h2 > a {
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    padding: 12px 0 !important;
}

/* H3 */
.wittytool-article-template .wtav2-toc-sublist .wtav2-toc-h3 > a {
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    padding: 6px 0 !important;
}

.wittytool-article-template .wtav2-toc-sublist {
    padding-bottom: 12px !important;
}
/* Smaller TOC typography */
.wittytool-article-template .wtav2-toc-title {
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    padding-bottom: 12px !important;
}

.wittytool-article-template .wtav2-toc-list > .wtav2-toc-h2 > a {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    padding: 11px 0 !important;
}

.wittytool-article-template .wtav2-toc-sublist .wtav2-toc-h3 > a {
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
    padding: 6px 0 !important;
}

.wittytool-article-template .wtav2-toc-sublist {
    padding-bottom: 12px !important;
}