  .article-toc {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 28px 32px;
    box-shadow: 0 12px 35px rgba(17, 24, 39, 0.08);
    font-family: var(--font1);
  }

  .article-toc--desktop {
    margin: 0 10px 30px;
  }

  /* Desktop: pin the whole right panel to the top while scrolling;
     it scrolls on its own if taller than the viewport */
  @media screen and (min-width: 641px) {
    #x99d3 {
      position: sticky;
      top: 20px;
      max-height: calc(100vh - 40px);
      overflow-y: auto;
      scrollbar-width: thin;
    }
  }

  .article-toc--mobile {
    display: none;
    margin: 0 0 24px;
  }

  .article-toc-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  .article-toc-heading .x99s3 {
    margin-bottom: 0;
  }

  .article-toc-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #fafafa;
    color: #c47a21;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .article-toc-toggle:hover {
    background: #fff7ed;
  }

  .article-toc-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.25s ease;
  }

  .article-toc-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }

  .article-toc.is-collapsed .article-toc-heading {
    margin-bottom: 0;
  }

  .article-toc.is-collapsed .article-toc-list {
    display: none;
  }

  .article-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .article-toc-list li {
    margin: 0 0 10px;
  }

  .article-toc-list li:last-child {
    margin-bottom: 0;
  }

  .article-toc-list a {
    display: block;
    padding: 6px 0 6px 16px;
    border-left: 2px solid #e5e7eb;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
  }

  .article-toc-list a:hover,
  .article-toc-list a:focus-visible {
    color: #c47a21;
    border-left-color: #c47a21;
  }

  .x99d0 h2[id] {
    scroll-margin-top: 20px;
  }

  @media screen and (max-width: 640px) {
    .article-toc--desktop {
      display: none;
    }

    .article-toc--mobile {
      display: block;
      padding: 22px 24px;
    }

    .article-toc-list li {
      margin-bottom: 10px;
    }

    .article-toc-list a {
      font-size: 15px;
    }
  }
