.vipassana-page {
    background:
        radial-gradient(circle at 50% 0, rgba(99, 102, 241, 0.055), transparent 34rem),
        var(--bg-primary);
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2000;
    padding: 0.65rem 0.9rem;
    border-radius: 0.5rem;
    background: var(--bg-dark);
    color: #fff;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.vipassana-main {
    padding: 8rem 0 5rem;
}

.reading-shell {
    display: grid;
    grid-template-columns: 10.5rem minmax(0, 45rem);
    gap: clamp(2.5rem, 5vw, 4.5rem);
    justify-content: center;
    width: min(calc(100% - 3rem), 70rem);
    margin: 0 auto;
}

.article-toc {
    position: sticky;
    top: 6.5rem;
    align-self: start;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.55;
}

.toc-label {
    margin: 0 0 0.9rem;
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.article-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-toc li + li {
    margin-top: 0.6rem;
}

.article-toc a {
    display: block;
    padding-left: 0.75rem;
    border-left: 2px solid var(--border-color);
    color: inherit;
    text-decoration: none;
}

.article-toc a:hover,
.article-toc a[aria-current="location"] {
    border-left-color: var(--primary-color);
    color: var(--primary-dark);
}

.reading-column {
    min-width: 0;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--primary-dark);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
    text-underline-offset: 0.22em;
}

.mobile-toc {
    display: none;
}

.post {
    color: var(--text-primary);
    font-size: 1.0625rem;
    line-height: 1.9;
    letter-spacing: 0.005em;
    text-wrap: pretty;
}

.post-header {
    margin-bottom: 3rem;
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--primary-dark);
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.post h1 {
    max-width: 15ch;
    margin: 0 0 1rem;
    color: var(--text-primary);
    font-size: clamp(2.125rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.dek {
    max-width: 38rem;
    margin: 0 0 1.25rem;
    color: #4b5563;
    font-size: 1.12rem;
    line-height: 1.75;
}

.post-meta {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-variant-numeric: tabular-nums;
}

.intensity-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0 0;
}

.intensity-row span {
    padding: 0.32rem 0.65rem;
    border: 1px solid rgba(79, 70, 229, 0.18);
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.055);
    color: #4338ca;
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.4;
}

.post h2,
.post h3,
.post h4,
.post [id] {
    scroll-margin-top: 6.75rem;
}

.post h2 {
    margin: 4rem 0 1.25rem;
    color: var(--text-primary);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.post h3 {
    margin: 2.5rem 0 0.85rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 650;
    line-height: 1.5;
}

.post h4 {
    margin: 1.9rem 0 0.65rem;
    color: var(--text-primary);
    font-size: 1.075rem;
    font-weight: 700;
    line-height: 1.55;
}

.post p {
    margin: 0 0 1.05em;
}

.post :where(ul, ol) {
    margin: 0.65em 0 1.35em;
    padding-inline-start: 1.45em;
}

.post li + li {
    margin-top: 0.45em;
}

.post strong {
    color: #111827;
    font-weight: 650;
}

.post a {
    color: var(--primary-dark);
    overflow-wrap: anywhere;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

.overview-card {
    margin: 2rem 0 2.75rem;
    padding: 1.35rem 1.5rem 1.25rem;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    border-radius: 0.65rem;
    background: rgba(249, 250, 251, 0.84);
}

.overview-card h2 {
    margin: 0 0 0.9rem;
    font-size: 1.16rem;
}

.overview-card p:last-child,
.callout p:last-child,
.source-note p:last-child {
    margin-bottom: 0;
}

.reading-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.book-spread {
    display: contents;
}

.story-chapter {
    margin: 2rem 0;
    overflow: clip;
    border: 1px solid var(--border-color);
    border-radius: 0.8rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.035);
}

.story-chapter > summary {
    position: relative;
    display: grid;
    grid-template-columns: 2.25rem 1fr;
    gap: 0 0.85rem;
    min-height: 5rem;
    padding: 1.25rem 3.5rem 1.25rem 1.5rem;
    cursor: pointer;
    list-style: none;
}

.story-chapter > summary::-webkit-details-marker,
.subchapter > summary::-webkit-details-marker,
.mobile-toc > summary::-webkit-details-marker {
    display: none;
}

.story-chapter > summary::after,
.subchapter > summary::after,
.mobile-toc > summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 1.35rem;
    color: var(--primary-dark);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1;
    transform: translateY(-50%);
    transition: transform 160ms ease;
}

.story-chapter[open] > summary::after,
.subchapter[open] > summary::after,
.mobile-toc[open] > summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.story-chapter[open] > summary {
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.chapter-number {
    grid-row: 1 / span 2;
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.08em;
}

.chapter-title {
    color: var(--text-primary);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.chapter-meta {
    margin-top: 0.2rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}

.story-chapter > .chapter-body {
    padding: 0.75rem 1.75rem 2.5rem;
}

.chapter-intro {
    margin: 1.25rem 0 2.25rem;
    color: #4b5563;
    font-size: 0.95rem;
}

.subchapter {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid var(--border-color);
    border-radius: 0;
    background: transparent;
}

.subchapter > summary {
    position: relative;
    min-height: 3rem;
    padding: 1rem 2.5rem 1rem 0;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.5;
    list-style: none;
}

.subchapter > summary::after {
    right: 0.25rem;
    font-size: 1.1rem;
}

.subchapter > .detail-body {
    margin: 0.25rem 0 1.75rem;
    padding-left: 1.25rem;
    border-left: 2px solid var(--border-color);
}

.callout,
.source-note {
    margin: 1.5rem 0;
    padding: 1rem 1.15rem;
    border-left: 3px solid #d97706;
    border-radius: 0.5rem;
    background: #fffbeb;
    color: #4b5563;
    font-size: 0.91rem;
    line-height: 1.75;
}

.callout-medical {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.source-note {
    border-left-color: #9ca3af;
    background: var(--bg-secondary);
}

.pull-quote {
    margin: 2.25rem 0;
    padding: 0.15rem 0 0.15rem 1.35rem;
    border-left: 3px solid var(--primary-color);
    color: #312e81;
    font-size: 1.22rem;
    font-weight: 600;
    line-height: 1.65;
}

.entry-date {
    margin: 2rem 0 0.55rem !important;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    font-variant-numeric: tabular-nums;
}

.historical-notes > h3 {
    padding-top: 0.4rem;
    border-top: 1px solid var(--border-color);
}

.table-scroll {
    margin: 1.25rem 0;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.55rem;
    -webkit-overflow-scrolling: touch;
}

.post table {
    width: 100%;
    min-width: 38rem;
    border-collapse: collapse;
    font-size: 0.925rem;
    line-height: 1.6;
}

.post th,
.post td {
    padding: 0.75rem 0.875rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    text-align: left;
}

.post th {
    background: var(--bg-secondary);
    font-weight: 650;
}

.post tr:last-child td {
    border-bottom: 0;
}

.read-next {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin: 3rem 0 0;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(79, 70, 229, 0.24);
    border-radius: 0.65rem;
    background: rgba(99, 102, 241, 0.055);
    color: var(--primary-dark);
    cursor: pointer;
    font: inherit;
    font-weight: 650;
    text-align: left;
}

.read-next:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.09);
}

.read-next span:last-child {
    font-size: 1.2rem;
}

.end-note {
    margin: 3.25rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.post :where(a, summary, button):focus-visible {
    border-radius: 0.35rem;
    outline: 3px solid rgba(99, 102, 241, 0.32);
    outline-offset: 4px;
}

@media (min-width: 1280px) {
    .vipassana-page {
        background:
            radial-gradient(circle at 50% -8rem, rgba(99, 102, 241, 0.09), transparent 42rem),
            linear-gradient(90deg, #f8f7f4 0, #fdfdfc 50%, #f8f7f4 100%);
    }

    .vipassana-main {
        padding: 7.5rem 0 6rem;
    }

    .reading-shell {
        grid-template-columns: 10.75rem minmax(0, 1fr);
        gap: clamp(2.5rem, 3.5vw, 3.75rem);
        width: min(calc(100% - 4rem), 94rem);
    }

    .article-toc {
        top: 7rem;
        font-size: 0.84rem;
    }

    .reading-column {
        padding: 2.25rem clamp(2.75rem, 4vw, 4.25rem) 4rem;
        border: 1px solid rgba(107, 114, 128, 0.16);
        border-radius: 0.3rem;
        background: #fff;
        box-shadow:
            0 2.2rem 5rem rgba(17, 24, 39, 0.08),
            0 0.25rem 0.8rem rgba(17, 24, 39, 0.035);
    }

    .post {
        font-size: 1.075rem;
        line-height: 1.92;
    }

    .post-header {
        position: relative;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "eyebrow eyebrow"
            "title dek"
            "title meta"
            "title tags";
        column-gap: clamp(4rem, 6vw, 6rem);
        align-items: start;
        min-height: 22rem;
        margin: 0 -0.5rem 3.5rem;
        padding: 1.5rem 0.5rem 2.75rem;
        border-bottom: 1px solid var(--border-color);
    }

    .post-header::after {
        content: "";
        position: absolute;
        top: 3.75rem;
        bottom: 2.75rem;
        left: 50%;
        width: 1px;
        background: linear-gradient(transparent, rgba(107, 114, 128, 0.24) 12%, rgba(107, 114, 128, 0.24) 88%, transparent);
        box-shadow: 0 0 1.25rem rgba(17, 24, 39, 0.08);
    }

    .eyebrow {
        grid-area: eyebrow;
        margin-bottom: 1.5rem;
    }

    .post h1 {
        grid-area: title;
        max-width: 13ch;
        margin: 0;
        font-size: clamp(2.75rem, 3.4vw, 3.65rem);
        line-height: 1.15;
    }

    .dek {
        grid-area: dek;
        align-self: end;
        max-width: 31rem;
        margin: 0 0 1.5rem;
        color: #374151;
        font-size: 1.2rem;
        line-height: 1.8;
    }

    .post-meta {
        grid-area: meta;
    }

    .intensity-row {
        grid-area: tags;
        margin-top: 1.25rem;
    }

    .overview-card {
        position: relative;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.25rem clamp(3.5rem, 5vw, 5rem);
        margin: 0 0 3.5rem;
        padding: 2rem 2.25rem 1.75rem;
        border-left-width: 1px;
        border-radius: 0.3rem;
        background: #fafaf8;
    }

    .overview-card h2,
    .overview-card p:nth-of-type(3),
    .overview-card .reading-note {
        grid-column: 1 / -1;
    }

    .overview-card h2 {
        padding-bottom: 0.85rem;
        border-bottom: 1px solid var(--border-color);
        font-size: 1.3rem;
    }

    .overview-card p:nth-of-type(3) {
        margin-top: 0.4rem;
    }

    .overview-card .reading-note {
        margin-top: 0.65rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }

    .story-chapter {
        margin: 2.75rem 0;
        border-radius: 0.35rem;
        box-shadow: 0 0.75rem 2rem rgba(17, 24, 39, 0.035);
    }

    .story-chapter > summary {
        min-height: 6rem;
        padding: 1.55rem 4rem 1.55rem 2rem;
    }

    .chapter-title {
        font-size: 1.5rem;
    }

    .story-chapter > .chapter-body {
        padding: 1rem clamp(2.25rem, 3.6vw, 3.75rem) 3.5rem;
    }

    .chapter-body > :where(.chapter-intro, p, h2, h3, h4, ul, ol, .callout, .source-note, .pull-quote, #practice-log) {
        width: min(100%, 50rem);
        margin-inline: auto;
    }

    .chapter-intro {
        margin-block: 1.75rem 2.75rem;
        font-size: 1rem;
    }

    .subchapter > .detail-body {
        width: min(100%, 52rem);
        margin-inline: auto;
    }

    .book-spread--two {
        display: flow-root;
        margin: 2.75rem 0 3.25rem;
        padding: 2.25rem 0 1.2rem;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        column-count: 2;
        column-gap: clamp(3.75rem, 6vw, 5.75rem);
        column-rule: 1px solid rgba(107, 114, 128, 0.19);
    }

    .book-spread--two > h2 {
        column-span: all;
        margin: 0 0 1.65rem;
        padding-bottom: 0.8rem;
        border-bottom: 1px solid rgba(107, 114, 128, 0.14);
        font-size: 1.55rem;
    }

    .book-spread--two > :where(p, .source-note),
    .book-spread--two li {
        break-inside: avoid;
    }

    .book-spread--two > :last-child,
    .book-spread--two > :last-child > :last-child {
        margin-bottom: 0;
    }

    .book-spread--paired > ul {
        padding-inline-start: 0;
        list-style: none;
    }

    .book-spread--paired > ul > li {
        padding: 1rem 1.1rem;
        border: 1px solid var(--border-color);
        border-radius: 0.5rem;
        background: #fafaf8;
    }
}

@media (max-width: 1024px) {
    .reading-shell {
        display: block;
        width: min(calc(100% - 2.5rem), 45rem);
    }

    .article-toc {
        display: none;
    }

    .mobile-toc {
        display: block;
        margin: 0 0 2rem;
        border: 1px solid var(--border-color);
        border-radius: 0.6rem;
        background: var(--bg-secondary);
    }

    .mobile-toc > summary {
        position: relative;
        min-height: 2.75rem;
        padding: 0.7rem 2.75rem 0.7rem 0.9rem;
        cursor: pointer;
        color: var(--text-primary);
        font-size: 0.86rem;
        font-weight: 650;
        list-style: none;
    }

    .mobile-toc > summary::after {
        right: 0.9rem;
        font-size: 1rem;
    }

    .mobile-toc ol {
        margin: 0;
        padding: 0 1rem 1rem 2.2rem;
    }

    .mobile-toc li + li {
        margin-top: 0.35rem;
    }

    .mobile-toc a {
        font-size: 0.86rem;
    }
}

@media (max-width: 768px) {
    .vipassana-main {
        padding: 6.75rem 0 3.5rem;
    }

    .reading-shell {
        width: min(calc(100% - 2.25rem), 45rem);
    }

    .post {
        font-size: 1rem;
        line-height: 1.86;
    }

    .post h1 {
        font-size: clamp(1.95rem, 9vw, 2.2rem);
    }

    .dek {
        font-size: 1.03rem;
        line-height: 1.7;
    }

    .post h2 {
        margin-top: 3rem;
        font-size: 1.4rem;
    }

    .post h3 {
        margin-top: 2rem;
        font-size: 1.15rem;
    }

    .overview-card {
        padding: 1.1rem 1.15rem;
    }

    .story-chapter > summary {
        grid-template-columns: 1.75rem 1fr;
        gap: 0 0.5rem;
        padding: 1rem 3rem 1rem 1rem;
    }

    .chapter-title {
        font-size: 1.18rem;
    }

    .story-chapter > .chapter-body {
        padding: 0.5rem 1rem 1.85rem;
    }

    .subchapter > .detail-body {
        padding-left: 0.9rem;
    }

    .pull-quote {
        font-size: 1.08rem;
    }
}

@media (max-width: 380px) {
    .reading-shell {
        width: min(calc(100% - 1.75rem), 45rem);
    }

    .story-chapter > summary {
        padding-left: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .post *,
    .post *::before,
    .post *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    @page {
        margin: 18mm;
    }

    .navbar,
    .footer,
    .skip-link,
    .back-link,
    .article-toc,
    .mobile-toc,
    .read-next {
        display: none !important;
    }

    .vipassana-main {
        padding: 0;
    }

    .reading-shell {
        display: block;
        width: auto;
        max-width: none;
    }

    .reading-column {
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .post-header {
        display: block;
        min-height: 0;
        padding: 0;
        border-bottom: 0;
    }

    .post-header::after {
        display: none;
    }

    .overview-card {
        display: block;
    }

    .book-spread {
        display: block !important;
        padding: 0;
        border: 0;
        column-count: 1 !important;
        column-rule: 0;
    }

    .post {
        color: #000;
        font-size: 11.5pt;
        line-height: 1.65;
    }

    .story-chapter,
    .story-chapter > summary {
        border: 0;
        box-shadow: none;
    }

    .story-chapter > summary {
        padding-inline: 0;
    }

    .story-chapter > summary::after,
    .subchapter > summary::after {
        display: none;
    }

    .story-chapter > .chapter-body {
        padding-inline: 0;
    }

    details:not([open]) > :not(summary) {
        display: block !important;
    }

    h2,
    h3,
    h4,
    summary {
        break-after: avoid;
    }

    .callout,
    .source-note,
    blockquote {
        break-inside: avoid;
    }
}
