/* dynamic_page — the page's own styles, on this page only. */

@media (max-width: 559px) {
  .post__hero { padding: 0; }
  .post__hero img { border-radius: 0; }
}

/* A text page: one axis, the contents beside it where there is room. */
.text-page__body { position: relative; }

.text-page__body h2 { scroll-margin-top: calc(var(--header-sticky-h, 0px) + 1.5rem); }

.toc { margin-bottom: 1.8rem; border: var(--card-border, 1px solid var(--card-line)); border-radius: var(--radius); }

.toc summary { padding: .8rem 1rem; cursor: pointer; font-weight: 600; color: var(--ink); }

.toc__title { display: none; }

.toc__list { margin: 0; padding: 0 1rem 1rem 2.2rem; display: grid; gap: .4rem; }

.toc__list a { color: var(--body-text); text-decoration: none; }

.toc__list a:hover { color: var(--mark, var(--primary)); }

@media (min-width: 1240px) {
  .toc-rail { position: absolute; top: 0; bottom: 0; right: calc(100% - 24px + 2.5rem); width: 12.5rem; }
  .toc { position: sticky; top: calc(var(--header-sticky-h, 0px) + 1.5rem); margin: 0; border: 0; }
  .toc summary { display: none; }
  .toc__title { display: block; margin: 0 0 .7rem; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .toc__list { list-style: none; padding: 0; gap: 0; }
  .toc__list a { display: block; padding: .35rem 0 .35rem .9rem; border-left: 2px solid var(--line); font-size: .9rem; line-height: 1.4; }
  .toc__list a.is-current { border-left-color: var(--ink); color: var(--ink); font-weight: 600; }
}

.text-page { padding-bottom: clamp(3rem, 6vw, 5rem); }
