@layer components {
  .c-toc { margin-block: var(--space-8); padding-block: var(--space-4) var(--space-6); border-block-start: 1px solid var(--ink); border-block-end: 1px solid var(--border); }
  .c-toc__title { margin: 0 0 var(--space-4); font-size: var(--fs-xs); font-weight: var(--fw-strong); font-stretch: var(--stretch-label); letter-spacing: var(--track-label); line-height: 1.3; text-transform: uppercase; }
  .c-toc__list { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
  .c-toc__item { counter-increment: toc; break-inside: avoid; padding-block: 0.125rem; font-size: 0.9375rem; line-height: 1.4; }
  .c-toc__link { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); align-items: baseline; min-block-size: 1.75rem; color: var(--ink); text-decoration: none; }
  .c-toc__link::before { content: counter(toc, decimal-leading-zero); font-size: var(--fs-xs); color: var(--ink-muted); }
  .c-toc__link:hover { text-decoration: underline; text-underline-offset: 0.2em; }
  .c-toc__sub { margin: var(--space-1) 0 var(--space-2); padding: 0 0 0 2.25rem; list-style: none; }
  .c-toc__sub a { display: block; padding-block: var(--space-1); font-size: 0.875rem; color: var(--ink-muted); text-decoration: none; }
  .c-toc__sub a:hover { color: var(--ink); text-decoration: underline; }
  @media (min-width: 48em) {
    /* long tables of contents flow into two columns */
    .c-toc__list:has(> li:nth-child(6)) { column-count: 2; column-gap: var(--space-8); }
  }
}
