/* The About chapter rhythm, adapted to long-form reading. Keep the panels in normal flow. */
.blog-reading.has-chapters{grid-template-columns:minmax(0,850px);gap:clamp(18px,3.4vw,54px)}
.blog-reading.has-toc.has-chapters{grid-template-columns:minmax(160px,225px) minmax(0,850px)}
.blog-reading.has-chapters .blog-toc{border-radius:20px;background:#f4efe7}
.blog-reading.has-chapters .blog-toc nav a:not(.blog-toc-nested){border-block-start:1px solid var(--blog-line);border-radius:0}
.blog-reading.has-chapters .blog-toc nav a[aria-current]{box-shadow:inset 2px 0 var(--accent);background:#eee2d4;padding-inline-start:8px}
.blog-reading.has-chapters .blog-toc nav .blog-toc-nested[aria-current]{padding-inline-start:12px}
.blog-prose-chapters>.blog-chapter{
 position:relative;isolation:isolate;min-inline-size:0;
 margin-block:0 clamp(14px,2vw,24px);
 padding:clamp(22px,5vw,66px);
 border:1px solid var(--blog-line);border-radius:clamp(18px,2.2vw,32px);
 background:linear-gradient(150deg,#f8f1e6,#fffdf8 65%);
 box-shadow:0 10px 26px #3524130a;
}
.blog-prose .blog-chapter-number{
 position:absolute;z-index:-1;inset-block-start:10px;inset-inline-end:18px;
 color:#af6f3519;font:650 clamp(60px,10vw,124px)/1 var(--blog-display);
 font-variant-numeric:tabular-nums;letter-spacing:-.08em;pointer-events:none;
}
.blog-prose .blog-chapter > .blog-chapter-number+h2,
.blog-prose .blog-chapter > .blog-chapter-number+:is(div,section)>h2:first-child{margin-block-start:0;font-size:clamp(25px,3vw,40px);line-height:1.2}
.blog-prose .blog-chapter>:last-child,.blog-prose .blog-chapter>:is(div,section):last-child>:last-child{margin-block-end:0}

/* Count only chapters: a lead paragraph or figure does not shift the palette. */
.blog-prose .blog-chapter:nth-child(even of .blog-chapter){
 --blog-muted:#c6bfb8;
 --blog-accent:#ffb57d;
 --blog-line:#68605a;
 --blog-paper:#302b27;
 --chapter-title:#faf7f1;
 --chapter-inset:#322b26;
 color-scheme:dark;
 color:#eee8e1;
 background:#252321 radial-gradient(ellipse at top right,#382b22,transparent 70%);
 box-shadow:0 10px 26px #26190f20;
}
.blog-prose .blog-chapter:nth-child(even of .blog-chapter) :is(h2,h3,h4,h5,h6){color:var(--chapter-title)}
.blog-prose .blog-chapter:nth-child(even of .blog-chapter) .blog-chapter-number{color:#ffdbb420}
.blog-prose .blog-chapter:nth-child(even of .blog-chapter) a:not(.blog-button){color:var(--blog-accent);text-decoration-color:currentColor}
.blog-prose .blog-chapter:nth-child(even of .blog-chapter) a:not(.blog-button):hover{color:var(--chapter-title)}
.blog-prose .blog-chapter:nth-child(even of .blog-chapter) :is(a,summary,.blog-table-scroll):focus-visible{outline:2px solid var(--blog-accent);outline-offset:3px}
.blog-prose .blog-chapter:nth-child(even of .blog-chapter) :is(blockquote,.blog-callout,details,.blog-table-scroll,tbody tr:nth-child(even),mark,:not(pre)>code,kbd){background:var(--chapter-inset);color:inherit;border-color:var(--blog-line)}
.blog-prose .blog-chapter:nth-child(even of .blog-chapter) :is(hr,details[open]>summary){border-color:var(--blog-line)}
.blog-prose .blog-chapter:nth-child(even of .blog-chapter) details summary::after{color:var(--blog-accent)}
.blog-prose .blog-chapter:nth-child(even of .blog-chapter) blockquote{border-inline-start-color:var(--blog-accent)}
@media(max-width:850px){
 .blog-reading.has-toc.has-chapters{grid-template-columns:minmax(0,740px)}
}
@media(max-width:600px){
 .blog-prose-chapters>.blog-chapter{padding:22px 18px}
 .blog-prose .blog-chapter-number{inset-inline-end:14px}
}
