/* The index in the left margin, of the launch post; toc.js builds it from
   the page's headings. It lists the sections, and the one being read unfolds its subsections. */
.toc { display: none; }
.post :is(h2, h3) { scroll-margin-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (min-width: 1240px) {
  /* It sits around the middle of the window's height. Its top is fixed there, so a section that
     unfolds grows downward and the lines above it stay where they are. */
  .toc { --toc-top: max(96px, calc(50vh - 190px)); display: block; position: fixed; top: var(--toc-top); right: calc(50% + var(--wide, 736px) / 2 + 60px); width: 183px; max-height: calc(100vh - var(--toc-top) - 40px); overflow-y: auto; scrollbar-width: none;
    font-family: var(--font-body, var(--sans, system-ui, sans-serif)); font-size: 12.5px; line-height: 1.4; text-align: left; }
  .toc::-webkit-scrollbar { display: none; }
  .toc a { display: block; padding-left: 11px; border-left: 2px solid transparent; color: var(--ink-3); text-decoration: none; transition: color 0.15s, border-color 0.15s; }
  .toc a:hover, .toc a.active { color: var(--ink); }
  .toc-sec { margin-bottom: 9px; }
  .toc-sec.active { border-left-color: var(--accent); }
  /* The subsections sit folded to nothing and open by growing a grid row, which animates their height. */
  .toc-sub { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s ease; }
  .toc-sub > div { overflow: hidden; min-height: 0; }
  .toc-item.open .toc-sub { grid-template-rows: 1fr; opacity: 1; }
  .toc-sub a { padding: 0 0 7px 23px; font-size: 12px; }
  .toc-sub a:last-child { padding-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { .toc-sub { transition: none; } }
@media print { .toc { display: none !important; } }
