/* Writing: chalk only, still reading, token values only. */
/* ---------- Index ---------- */
.feature { position: relative; display: grid; gap: var(--s-5); }
.feature__plate img { display: block; width: 100%; height: auto; border-radius: var(--r-md); background: var(--instrument); }
.feature__text { display: grid; align-content: start; justify-items: start; gap: var(--s-4); }
.feature__title { font-size: var(--t-h2); }
.feature__title a { color: inherit; text-decoration: none; }
.feature__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-md); }
.feature__title a:focus-visible { outline: none; }
.feature__title a:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 6px; }
.feature__dek { font-size: var(--t-lead); line-height: var(--lh-lead); color: var(--ink-2); max-width: 46ch; }
.feature__meta, .post__byline { color: var(--ink-3); font-size: var(--t-small); line-height: var(--lh-small); }
@media (min-width: 1024px) {
  .feature { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--grid-gap); align-items: center; }
  .feature__plate { grid-column: 1 / span 7; }
  .feature__text { grid-column: 9 / span 4; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .feature__plate img { transition: transform var(--d-move) var(--e-settle); }
  .feature:hover .feature__plate img { transform: translateY(-4px); }
}

/* ---------- Post ---------- */
.post { padding-bottom: var(--s-section-half); }
.post__head { display: grid; justify-items: start; gap: var(--s-4); padding-top: var(--s-section-half); max-width: var(--measure-long); }
.post__title { font-size: var(--t-h1); line-height: var(--lh-h1); letter-spacing: var(--tr-h1); }
.post__dek { font-size: var(--t-lead); line-height: var(--lh-lead); letter-spacing: var(--tr-lead); color: var(--ink-2); }
.post__cover { display: block; width: min(100% - 2 * var(--frame-gutter), 880px); margin: var(--s-7) auto; }
.post__cover img { display: block; width: 100%; height: auto; border-radius: var(--r-md); background: var(--instrument); }
.post__layout { display: grid; gap: var(--s-7); }
.post__toc { font-size: var(--t-small); line-height: var(--lh-small); max-width: var(--measure-long); }
.post__toc-title { font-size: var(--t-small); line-height: var(--lh-small); letter-spacing: 0; font-weight: 600; font-stretch: 100%; margin-bottom: var(--s-3); }
.post__toc ol { display: grid; gap: var(--s-2); padding: 0; margin: 0; list-style: none; }
.post__toc a { display: block; padding-left: var(--s-3); border-left: 2px solid var(--line); color: var(--ink-2); text-decoration: none; transition: color var(--d-quick) var(--e-glide), border-color var(--d-quick) var(--e-glide); }
.post__toc a:hover, .post__toc a[aria-current="true"] { color: var(--ink); border-color: var(--pass); }
.post__body { max-width: var(--measure-long); font-size: var(--t-body); line-height: var(--lh-read); }
.post__body > p { color: var(--ink); }
.post__body h2 { margin: var(--s-8) 0 var(--s-4); scroll-margin-top: calc(var(--header-h) + var(--s-5)); }
.post__body h3 { margin: var(--s-6) 0 var(--s-3); }
.post__note { margin-bottom: var(--s-6); }
.post__ref { font-size: .72em; line-height: 0; }
.post__ref a { padding-inline: 1px; scroll-margin-top: calc(var(--header-h) + var(--s-5)); }
.post__fiction { display: grid; gap: var(--s-4); margin: var(--s-7) 0; padding: clamp(20px, 3vw, 32px); }
.post__fiction p + p { margin-top: 0; }
.post__notes { margin-top: var(--s-8); padding-top: var(--s-6); border-top: 1px solid var(--line); }
.post__notes h2 { margin-top: 0; font-size: var(--t-h3); line-height: var(--lh-h3); letter-spacing: var(--tr-h3); font-weight: var(--wght-h3); font-stretch: var(--wdth-h3); }
.post__notes ol { display: grid; gap: var(--s-3); padding-left: 1.4em; color: var(--ink-2); font-size: var(--t-small); line-height: var(--lh-small); }
.post__notes li { scroll-margin-top: calc(var(--header-h) + var(--s-5)); }
.post__end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--t-small); }
/* Below the rail breakpoint the contents sit above the text: centre that single column under the cover. */
@media (min-width: 768px) and (max-width: 1359.98px) {
  .post__layout { max-width: var(--measure-long); margin-inline: auto; }
}
@media (min-width: 1360px) {
  .post__layout { grid-template-columns: minmax(0, 1fr) var(--measure-long) minmax(0, 1fr); gap: var(--grid-gap); }
  .post__toc { grid-column: 1; grid-row: 1; justify-self: end; position: sticky; top: calc(var(--header-h) + var(--s-6)); align-self: start; width: min(100%, 240px); margin-right: var(--s-7); }
  .post__body { grid-column: 2; grid-row: 1; }
}
/* A 2 px reading line, only where scroll-driven animation exists and motion is on. */
@supports (animation-timeline: scroll()) {
  html[data-motion="full"] .post__progress { position: fixed; inset: 0 0 auto; z-index: 60; height: 2px; background: var(--pass); transform-origin: 0 50%; animation: post-progress linear both; animation-timeline: scroll(root); }
}
@keyframes post-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
::view-transition-group(*) { animation-duration: var(--d-roll); animation-timing-function: var(--e-glide); }
/* A title changes size and line length between the list and the essay, so its two pictures never overlap: the old
   one leaves as the box starts to move and the new one arrives as it lands (a crossfade showed the title twice). */
::view-transition-old(*.post-title) { animation: winch-vt-out 110ms var(--e-glide) both; }
::view-transition-new(*.post-title) { animation: winch-vt-in 200ms var(--e-glide) 120ms both; }

.post__figure { margin: var(--s-7) 0; display: grid; gap: var(--s-3); }
.post__figure-shot { position: relative; }
.post__figure-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-md); background: var(--instrument); }
.post__figure-label { position: absolute; left: var(--s-3); top: var(--s-3); margin: 0; padding: 2px 8px; border-radius: var(--r-md); background: var(--chalk); color: var(--ink); font-size: 13px; }
.post__figure figcaption { color: var(--ink-2); font-size: 15px; }
