/* ============================================================
   journal-post.css — Single journal post page
   Page class: body.journal-post-page
   ============================================================ */

/* ── Scroll-snap disable ─────────────────────────────────── */
html:has(body.journal-post-page) {
    scroll-snap-type: none;
    height: auto;
    overflow-y: auto;
}

body.journal-post-page {
    height: auto;
    overflow-y: visible;
}

body.journal-post-page section,
body.journal-post-page header.post__hero {
    height: auto;
    overflow: visible;
    scroll-snap-align: none;
    padding: 0 !important;
}

body.journal-post-page .page {
    background-color: #fff;
}

/* ── Footer pill treatment ───────────────────────────────── */
body.journal-post-page .footer {
    margin: 0 24px 24px;
}

/* ── Reading progress bar ────────────────────────────────── */
.post-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1000;
    background: transparent;
}

.post-progress__bar {
    height: 100%;
    width: 0%;
    background: var(--a-color-green-500);
    transition: width 0.1s linear;
}

/* ── Post wrapper ────────────────────────────────────────── */
.post {
    background: #fff;
}

/* ── Hero ────────────────────────────────────────────────── */
.post__hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: var(--a-color-beige-50);
    overflow: hidden;
}

/* Dot grid — same pattern as legal hero */
.post__hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--a-color-beige-200) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.6;
    pointer-events: none;
}

/* Vignette */
.post__hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, var(--a-color-beige-50) 100%);
    pointer-events: none;
}

.post__hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 120px 24px 72px;
    max-width: 820px;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.post__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(12px);
}

.post__breadcrumb-link {
    font-family: var(--a-font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--a-color-green-500);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post__breadcrumb-link:hover {
    color: var(--a-color-green-600);
}

.post__breadcrumb-sep {
    font-family: var(--a-font-mono);
    font-size: 0.7rem;
    color: var(--a-color-beige-400);
}

.post__breadcrumb-current {
    font-family: var(--a-font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--a-color-beige-500);
}

/* ── Hero meta ───────────────────────────────────────────── */
.post__hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(12px);
}

.post__hero-dot {
    color: var(--a-color-beige-400);
    font-size: 0.75rem;
}

.post__read-time {
    font-family: var(--a-font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--a-color-beige-500);
}

/* ── Hero title ──────────────────────────────────────────── */
.post__hero-title {
    font-family: var(--a-font-mono);
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--a-color-beige-900);
    margin: 0 0 24px;
    opacity: 0;
    transform: translateY(24px);
}

/* ── Hero excerpt ────────────────────────────────────────── */
.post__hero-excerpt {
    font-family: var(--a-font-primary);
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--a-color-beige-600);
    line-height: 1.65;
    max-width: 560px;
    margin: 0 0 32px;
    opacity: 0;
    transform: translateY(16px);
}

/* ── Author row ──────────────────────────────────────────── */
.post__author-row {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(12px);
}

.post__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--a-color-green-600), var(--a-color-green-400));
    flex-shrink: 0;
}

.post__author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post__author-name {
    font-family: var(--a-font-primary);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--a-color-beige-800);
}

.post__author-sub {
    font-family: var(--a-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--a-color-beige-500);
}

/* ── Article layout ──────────────────────────────────────── */
.post__layout {
    display: grid;
    grid-template-columns: 1fr;
    padding: 64px 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* ── Sidebar (hidden on mobile) ──────────────────────────── */
.post__sidebar {
    display: none;
}

/* ── Article body ────────────────────────────────────────── */
.post__body {
    max-width: 800px;
    width: 100%;
}

/* ── Section ─────────────────────────────────────────────── */
.post__section {
    margin-bottom: 0;
}

/* ── Images ──────────────────────────────────────────────── */
.post__figure {
    margin: 36px 0;
    border-radius: var(--a-radius-md);
    border: 1.5px solid var(--a-color-beige-200);
    background: var(--a-color-beige-50);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

/* Full-bleed: stretch edge-to-edge on mobile/tablet */
.post__figure--full {
    margin-left: calc(-1 * (100vw - 680px) / 2);
    margin-right: calc(-1 * (100vw - 680px) / 2);
    max-width: 100vw;
    border-radius: var(--a-radius-xl);
}

/* Wide: bleed 48px each side — but only when no sidebar */
.post__figure--wide {
    margin-left: -48px;
    margin-right: -48px;
}

.post__img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    border: none;
}

/* Caption lives inside the card */
.post__caption {
    font-family: var(--a-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--a-color-black-400);
    padding: 12px 20px 14px;
    border-top: 1px solid var(--a-color-beige-200);
    display: flex;
    align-items: center;
    gap: 8px;
}

.post__caption::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 1px;
    background: var(--a-color-beige-300);
    flex-shrink: 0;
}

/* ── Image grid ──────────────────────────────────────────── */
.post__figure-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 36px 0;
}

.post__figure-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.post__figure-grid--4 {
    grid-template-columns: repeat(2, 1fr);
}

/* Each cell in grid is its own rounded card */
.post__figure-grid .post__figure {
    margin: 0;
}

/* On narrow screens collapse grids to 1 col — this is a mobile base override */
@media (max-width: 480px) {
    .post__figure-grid,
    .post__figure-grid--3,
    .post__figure-grid--4 {
        grid-template-columns: 1fr;
    }

    .post__figure--full,
    .post__figure--wide {
        margin-left: 0;
        margin-right: 0;
    }
}

/* ── Unordered list ──────────────────────────────────────── */
.post__ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post__li--bullet {
    padding-left: 20px;
    position: relative;
}

.post__li--bullet::before {
    content: '—';
    position: absolute;
    left: 0;
    font-family: var(--a-font-mono);
    color: var(--a-color-green-500);
    font-size: 0.75rem;
}

/* ── Inline link ─────────────────────────────────────────── */
.post__link {
    color: var(--a-color-green-600);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(64, 199, 131, 0.4);
    transition: color 0.2s ease;
}

.post__link:hover {
    color: var(--a-color-green-700);
}

/* ── Example cards wrapper ───────────────────────────────── */
.post__example-cards {
    margin: 24px 0;
}

/* ── Headings ────────────────────────────────────────────── */
.post__h2 {
    font-family: var(--a-font-mono);
    font-size: clamp(1.375rem, 3vw, 1.875rem);
    font-weight: 700;
    color: var(--a-color-beige-900);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 20px;
}

/* ── Paragraphs ──────────────────────────────────────────── */
.post__p {
    font-family: var(--a-font-primary);
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--a-color-beige-700);
    margin: 0 0 20px;
}

.post__p--tight {
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 0;
}

/* ── Lists ───────────────────────────────────────────────── */
.post__ol {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    counter-reset: post-counter;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post__li {
    font-family: var(--a-font-primary);
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--a-color-beige-700);
    padding-left: 36px;
    position: relative;
    counter-increment: post-counter;
}

.post__li::before {
    content: counter(post-counter, decimal-leading-zero);
    position: absolute;
    left: 0;
    font-family: var(--a-font-mono);
    font-size: 0.7rem;
    color: var(--a-color-green-500);
    letter-spacing: 0.05em;
    top: 5px;
}

/* ── Divider ─────────────────────────────────────────────── */
.post__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
}

.post__divider span {
    font-family: var(--a-font-mono);
    font-size: 1.25rem;
    letter-spacing: 0.3em;
    color: var(--a-color-beige-700);
}

/* ── Callout block ───────────────────────────────────────── */
.post__callout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--a-color-beige-50);
    border: 1px solid var(--a-color-beige-200);
    border-left: 3px solid var(--a-color-green-500);
    border-radius: 0 var(--a-radius-md) var(--a-radius-md) 0;
    padding: 20px 24px;
    margin: 28px 0;
}

.post__callout--green {
    border-left-color: var(--a-color-green-500);
    background: rgba(64, 199, 131, 0.04);
    border-color: var(--a-color-beige-200);
    border-left-color: var(--a-color-green-500);
}

.post__callout-icon {
    font-family: var(--a-font-mono);
    font-size: 1rem;
    color: var(--a-color-green-500);
    flex-shrink: 0;
    margin-top: 2px;
}

.post__callout-text {
    font-family: var(--a-font-primary);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--a-color-beige-700);
    margin: 0;
    font-style: italic;
}

.post__callout-text em {
    font-style: normal;
    font-weight: 600;
    color: var(--a-color-beige-900);
}

/* ── Code block ──────────────────────────────────────────── */
.post__code-block {
    margin: 28px 0;
    border-radius: var(--a-radius-sm);
    overflow: hidden;
    border: 1px solid var(--a-color-beige-200);
}

.post__code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--a-color-beige-50);
    border-bottom: 1px solid var(--a-color-beige-200);
}

.post__code-lang {
    font-family: var(--a-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--a-color-beige-500);
    text-transform: uppercase;
}

.post__code {
    background: var(--a-color-beige-950);
    padding: 24px 20px;
    margin: 0;
    overflow-x: auto;
}

.post__code code {
    font-family: var(--a-font-mono);
    font-size: 0.8125rem;
    line-height: 1.7;
    color: var(--a-color-beige-200);
    white-space: pre;
    display: block;
}

/* ── Inline code ─────────────────────────────────────────── */
.post__inline-code {
    font-family: var(--a-font-mono);
    font-size: 0.85em;
    color: var(--a-color-green-600);
    background: rgba(64, 199, 131, 0.08);
    padding: 2px 6px;
    border-radius: var(--a-radius-xs);
    border: 1px solid rgba(64, 199, 131, 0.2);
}

/* ── Timeline ────────────────────────────────────────────── */
.post__timeline {
    display: flex;
    flex-direction: column;
    margin: 24px 0;
    border-left: 1px solid var(--a-color-beige-200);
    padding-left: 0;
}

.post__timeline-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 24px;
    padding: 24px 0 24px 32px;
    border-bottom: 1px solid var(--a-color-beige-100);
    position: relative;
}

.post__timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 32px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--a-color-green-500);
    border: 2px solid #fff;
}

.post__timeline-item:last-child {
    border-bottom: none;
}

.post__timeline-marker {
    font-family: var(--a-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--a-color-green-500);
    text-transform: uppercase;
    padding-top: 3px;
    white-space: nowrap;
}

.post__timeline-title {
    font-family: var(--a-font-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--a-color-beige-900);
    display: block;
    margin-bottom: 8px;
}

.post__timeline-text {
    font-family: var(--a-font-primary);
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--a-color-beige-600);
    margin: 0;
}

/* ── Example cards ───────────────────────────────────────── */
.post__example-card {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 20px;
    align-items: start;
    padding: 24px 0;
    border-bottom: 1px solid var(--a-color-beige-100);
}

.post__example-card:last-of-type {
    border-bottom: none;
}

.post__example-num {
    font-family: var(--a-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--a-color-green-500);
    padding-top: 4px;
}

.post__example-title {
    font-family: var(--a-font-primary);
    font-size: 1rem;
    font-weight: 600;
    color: var(--a-color-beige-900);
    display: block;
    margin-bottom: 10px;
}

/* ── Stack rows ──────────────────────────────────────────── */
.post__stack-row {
    display: flex;
    flex-direction: column;
    margin: 24px 0;
}

.post__stack-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--a-color-beige-100);
}

.post__stack-item:last-child {
    border-bottom: none;
}

.post__stack-name {
    font-family: var(--a-font-primary);
    font-size: 1rem;
    font-weight: 700;
    color: var(--a-color-beige-900);
    display: block;
    margin-bottom: 8px;
}

.post__stack-verdict {
    font-family: var(--a-font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 100px;
    display: inline-block;
    margin-bottom: 12px;
}

.post__stack-verdict--yes {
    background: rgba(64, 199, 131, 0.1);
    color: var(--a-color-green-600);
    border: 1px solid rgba(64, 199, 131, 0.25);
}

.post__stack-verdict--sometimes {
    background: rgba(200, 140, 0, 0.08);
    color: #9a6e00;
    border: 1px solid rgba(200, 140, 0, 0.2);
}

.post__stack-verdict--no {
    background: rgba(200, 50, 50, 0.07);
    color: #b83232;
    border: 1px solid rgba(200, 50, 50, 0.18);
}

.post__stack-note {
    font-family: var(--a-font-primary);
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--a-color-beige-600);
    margin: 0;
}

/* ── Sidebar TOC + meta card ─────────────────────────────── */
.post__toc-label {
    font-family: var(--a-font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--a-color-beige-400);
    margin: 0 0 12px;
}

.post__toc-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post__toc-link {
    font-family: var(--a-font-primary);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--a-color-beige-500);
    text-decoration: none;
    display: block;
    padding: 5px 0 5px 12px;
    border-left: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.post__toc-link:hover,
.post__toc-link.is-active {
    color: var(--a-color-beige-900);
    border-left-color: var(--a-color-green-500);
}

.post__meta-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--a-color-beige-200);
    border-radius: var(--a-radius-md);
    overflow: hidden;
    background: var(--a-color-beige-50);
}

.post__meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--a-color-beige-100);
}

.post__meta-row:last-child {
    border-bottom: none;
}

.post__meta-key {
    font-family: var(--a-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--a-color-beige-400);
}

.post__meta-val {
    font-family: var(--a-font-mono);
    font-size: 0.75rem;
    color: var(--a-color-beige-600);
}

/* ── Next post ───────────────────────────────────────────── */
.post__next-wrap {
    padding: 0 24px 24px;
}

.post__next {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 40px 36px;
    background: var(--a-color-beige-50);
    border: 1px solid var(--a-color-beige-200);
    border-radius: var(--a-radius-xl);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.post__next:hover {
    border-color: var(--a-color-green-400);
    box-shadow: 0 8px 32px rgba(64, 199, 131, 0.08);
}

.post__next-label {
    font-family: var(--a-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--a-color-beige-400);
}

.post__next-meta {
    display: flex;
    gap: 8px;
}

.post__next-title {
    font-family: var(--a-font-mono);
    font-size: clamp(1.125rem, 3vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--a-color-beige-900);
    margin: 0;
    line-height: 1.2;
    max-width: 600px;
}

.post__next-arrow {
    position: absolute;
    right: 36px;
    bottom: 36px;
    font-size: 1.25rem;
    color: var(--a-color-green-500);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.post__next:hover .post__next-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ── Responsive ──────────────────────────────────────────── */

/* 360px — small phone */
@media (max-width: 480px) {
    .post__hero {
        min-height: 75vh;
    }

    .post__next {
        padding: 32px 16px;
    }

    .post__divider {
        padding: 24px 0;
    }

    .post__layout {
        display: block;
    }
}

/* 481px — large phone */
@media (min-width: 481px) {
    .post__hero-content {
        padding: 120px 32px 60px;
    }

    .post__layout {
        padding: 56px 32px 80px;
    }

    .post__next-wrap {
        padding: 0 32px 32px;
    }
}

/* 769px — tablet */
@media (min-width: 769px) {
    .post__hero-content {
        padding: 140px 48px 80px;
        max-width: 960px;
    }

    .post__layout {
        padding: 80px 48px 100px;
    }

    .post__next-wrap {
        padding: 0 48px 48px;
    }
}

/* 992px — small desktop */
@media (min-width: 992px) {
    .post__hero-content {
        padding: 150px 64px 88px;
        max-width: 1040px;
    }

    .post__layout {
        padding: 80px 64px 100px;
    }

    .post__next-wrap {
        padding: 0 64px 64px;
    }
}

/* 1100px — sidebar appears */
@media (min-width: 1100px) {
    .post__hero-content {
        padding: 160px 80px 100px;
    }

    .post__layout {
        grid-template-columns: 220px 1fr;
        gap: 64px;
        padding: 80px 80px 100px;
        max-width: 1280px;
    }

    .post__sidebar {
        display: block;
    }

    .post__sidebar-inner {
        position: sticky;
        top: 150px;
    }

    .post__next-wrap {
        padding: 0 80px 80px;
    }

    /* Sidebar present — contain images within post__body */
    .post__figure--wide,
    .post__figure--full {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }
}

/* 1281px — HD desktop */
@media (min-width: 1281px) {
    .post__hero-content {
        padding: 168px 80px 108px;
        max-width: 1040px;
    }

    .post__layout {
        grid-template-columns: 240px 1fr;
        gap: 80px;
        padding: 88px 80px 112px;
        max-width: 1360px;
    }
}

/* 1441px — large desktop */
@media (min-width: 1441px) {
    .post__hero-content {
        padding: 180px 55px 120px;
        max-width: 1100px;
    }

    .post__layout {
        padding: 100px 55px 120px;
        max-width: 1500px;
        grid-template-columns: 260px 1fr;
        gap: 120px;
    }

    .post__next-wrap {
        padding: 0 24px 56px;
    }
}

/* 1921px — Full HD+ */
@media (min-width: 1921px) {
    .post__hero-content {
        padding: 200px 80px 140px;
        max-width: 1300px;
    }

    .post__layout {
        padding: 120px 80px 140px;
        max-width: 1800px;
        grid-template-columns: 300px 1fr;
        gap: 160px;
    }

    .post__next-wrap {
        padding: 0 80px 64px;
    }
}

/* 2561px — 2K */
@media (min-width: 2561px) {
    .post__hero-content {
        padding: 240px 120px 180px;
        max-width: 1600px;
    }

    .post__layout {
        padding: 160px 120px 180px;
        max-width: 2200px;
        grid-template-columns: 360px 1fr;
        gap: 200px;
    }
}

/* 3841px — 4K */
@media (min-width: 3841px) {
    .post__hero-content {
        padding: 320px 180px 240px;
        max-width: 2000px;
    }

    .post__layout {
        padding: 200px 180px 240px;
        max-width: 3000px;
        grid-template-columns: 480px 1fr;
        gap: 280px;
    }
}

/* ── Image lightbox ──────────────────────────────────────── */
.post-lb[hidden] {
    display: none;
}

.post-lb {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.post-lb__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: min(92vw, 1100px);
    width: 100%;
}

/* Close button */
.post-lb__close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.post-lb__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Prev / Next */
.post-lb__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 1;
}

.post-lb__nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.post-lb__nav--prev {
    left: -60px;
}

.post-lb__nav--next {
    right: -60px;
}

/* Lightbox nav — tuck inside panel on small screens */
@media (max-width: 640px) {
    .post-lb__nav--prev {
        left: -4px;
    }

    .post-lb__nav--next {
        right: -4px;
    }

    .post-lb__close {
        top: -44px;
        right: 0;
    }
}

/* Image wrap */
.post-lb__img-wrap {
    width: 100%;
    border-radius: var(--a-radius-xl);
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    background: #111;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
    line-height: 0;
}

.post-lb__img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

/* Caption */
.post-lb__caption {
    font-family: var(--a-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 16px;
    text-align: center;
}

/* Cursor hint on figure */
.post__figure {
    cursor: zoom-in;
}
/* ── Accent borders — synced to footer logo colour cycle via --footer-accent ── */

/* TOC link: border-left matches footer palette, same 1.5s ease transition */
.post__toc-link {
    transition: color 0.2s ease, border-color 1.5s ease;
}
.post__toc-link:hover,
.post__toc-link.is-active {
    color: var(--a-color-beige-900);
    border-left-color: var(--footer-accent, var(--a-color-green-500));
}

/* Callout: always shows the current palette colour on border-left */
.post__callout {
    transition: border-left-color 1.5s ease;
    border-left-color: var(--footer-accent, var(--a-color-green-500));
}
.post__callout--green {
    border-left-color: var(--footer-accent, var(--a-color-green-500));
}
