/* ============================================
    TA — SINGLE POST
    Page sections: ta-post (+ table of contents). JS: toc.js.
============================================ */

/* ==========================================================================
   SINGLE POST
   abbr: ta-post
   Two rows, like a table:
     row 1 · title + excerpt + featured image | promo artwork
     row 2 · the_content() (.ta-rich)          | sticky table of contents
   ========================================================================== */
.ta-post {
    padding: 34px 0 80px;
}
.ta-post-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 277px;
    gap: 40px 56px;
    padding-left: 30px;
}
.ta-post-row-head {
    align-items: start;
}
.ta-post-row-body {
    margin-top: 40px;
}
.ta-post-title {
    max-width: 820px;
    margin: 0;
    font-size: var(--ta-fs-37);
    font-weight: var(--ta-fw-bold);
    line-height: 1.32;
}
.ta-post-excerpt {
    margin: 16px 0 0;
    font-size: var(--ta-fs-13);
}
.ta-post-featured {
    display: block;
    width: 100%;
    max-width: 695px;
    margin-top: 30px;
    aspect-ratio: 695 / 395;
    object-fit: cover;
    border-radius: 16px;
}
.ta-post-promo {
    display: block;
    margin-top: 2px;
    transition: transform var(--ta-ease);
}
.ta-post-promo:hover {
    transform: translateY(-3px);
}
.ta-post-promo img {
    display: block;
    width: 100%;
}
.ta-post-content {
    font-size: var(--ta-fs-15);
}
.ta-post-content .ta-post-intro {
    color: var(--ta-gray-555);
}

/* Unfinished-copy marker from the design */
.ta-post-more {
    margin: 48px 0 0;
    font-size: 2.5rem;
    font-weight: var(--ta-fw-book);
}

/* ---- Table of contents (sticky sidebar) ---- */
.ta-toc {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 20px 20px 22px;
    border: 2px solid var(--ta-peach);
    border-radius: var(--ta-radius-16);
    background-color: var(--ta-white);
}
.ta-toc-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: var(--ta-fs-20);
    font-weight: var(--ta-fw-bold);
    color: var(--ta-gray-555);
}
.ta-toc-title svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.ta-toc-list {
    margin: 0;
    padding-left: 24px;
    font-size: var(--ta-fs-14);
    line-height: 1.4;
    color: var(--ta-red-dark);
}
.ta-toc-list li + li {
    margin-top: 6px;
}
.ta-toc-link {
    color: var(--ta-red-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ta-toc-link:hover {
    color: var(--ta-orange);
}
.ta-toc-link.is-active {
    font-weight: var(--ta-fw-bold);
    color: var(--ta-orange);
}

@media (max-width: 991.98px) {
    .ta-post-row {
        grid-template-columns: minmax(0, 1fr);
        padding-left: 0;
    }
    .ta-post-promo {
        max-width: 277px;
    }
    .ta-post-row-body {
        margin-top: 32px;
    }
    /* Contents first on small screens, not sticky */
    .ta-post-side {
        order: -1;
    }
    .ta-toc {
        position: static;
        max-height: none;
    }
}
