/* ═══════════════════════════════════════════════
   SINGLE POST
═══════════════════════════════════════════════ */

:is(.single, .page) .post {
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

:is(.single, .page) .post-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

:is(.single, .page) .entry-content {
    font-size: 1rem;
    line-height: 1.85;
    max-width: 72ch;
    margin-top: 1.75rem;
    margin-inline: auto;
}

/* ── Table of contents component ───────────────── */

.toc {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}

.toc-inline .toc {
    margin-bottom: 2rem;
}

.toc-toggle {
    all: unset;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text);
    user-select: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.toc-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
}

.toc-icon {
    flex-shrink: 0;
    position: relative;
    width: 13px;
    height: 11px;
}
.toc-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    mask-image:
        linear-gradient(currentColor 0 0),
        linear-gradient(currentColor 0 0),
        linear-gradient(currentColor 0 0);
    mask-size: 100% 2px;
    mask-repeat: no-repeat;
    mask-position: top center, center, bottom center;
    -webkit-mask-image:
        linear-gradient(currentColor 0 0),
        linear-gradient(currentColor 0 0),
        linear-gradient(currentColor 0 0);
    -webkit-mask-size: 100% 2px;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: top center, center, bottom center;
    opacity: 0.6;
}

.toc-chevron {
    margin-left: auto;
    width: 0.45em;
    height: 0.45em;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform var(--transition);
    flex-shrink: 0;
}

.toc-toggle[aria-expanded="false"] .toc-chevron {
    transform: rotate(-135deg);
}

.toc-list,
.toc-list ol {
    list-style: none;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.toc-list {
    margin-top: 0.75rem;
    gap: 0.2rem;
    counter-reset: toc-counter;
}

.toc-list[hidden] { display: none; }

.toc-list > li { counter-increment: toc-counter; }

.toc-list > li > a::before {
    content: counter(toc-counter) ". ";
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    font-size: 0.75rem;
    min-width: 1.5em;
    display: inline-block;
}

.toc-list ol {
    padding: 0.15rem 0 0.1rem 1.4rem;
    gap: 0.15rem;
    counter-reset: toc-sub-counter;
}

.toc-list ol li { counter-increment: toc-sub-counter; }

.toc-list ol li a::before {
    content: counter(toc-counter) "." counter(toc-sub-counter) " ";
    color: var(--muted);
    font-size: 0.72rem;
    min-width: 2em;
    display: inline-block;
}

.toc-list a {
    color: var(--text2);
    font-size: 0.82rem;
    text-decoration: none;
    transition: color var(--transition);
    line-height: 1.4;
}

.toc-list a:hover { color: var(--accent); }

.toc-list a.toc-active {
    color: var(--accent);
    font-weight: 600;
}

/* ── Author box ────────────────────────────────── */

/* background/border/radius from .card */
.author-box {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
}


.author-box__avatar {
    flex-shrink: 0;
}

.author-box__avatar-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.author-box__content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

/* font/color from .label-mono in base.css */
.author-box__label { margin: 0; }

.author-box__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition);
}

.author-box__name:hover {
    color: var(--accent);
}

.author-box__bio {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text2);
    margin: 0.35rem 0 0;
}
