/* Article Guide: reference-site interactions, with the current site's styling. */
.page_show .bd-toc-card[hidden],
.page_show .article_anchor_toggle[hidden],
.page_show .article_anchor_mask[hidden],
.page_show .article_anchor_drawer[hidden] { display: none !important; }

@media (max-width: 768px) {
  body.article_toc_open { overflow: hidden; }
  .page_show .sidebar .bd-toc-card { display: none; }
  .page_show .article_anchor_toggle {
    position: fixed; right: 16px; bottom: 82px; z-index: 60;
    display: flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; padding: 0; border: 0; border-radius: 8px;
    color: #fff; background: var(--inner-blue, #0001f5);
    box-shadow: 0 8px 24px rgba(23, 34, 56, .18); cursor: pointer;
  }
  .page_show .article_anchor_toggle span {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap;
  }
  .page_show .article_anchor_toggle::before {
    content: ""; width: 22px; height: 16px;
    border-top: 2px solid currentColor; border-bottom: 2px solid currentColor;
    background: linear-gradient(currentColor, currentColor) left center / 16px 2px no-repeat;
  }
  .page_show .article_anchor_mask {
    position: fixed; inset: 0; z-index: 10000; display: block;
    background: rgba(23, 34, 56, .45); opacity: 0; visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
  }
  .page_show .article_anchor_drawer {
    position: fixed; right: 0; top: 0; z-index: 10001; display: flex;
    flex-direction: column; width: min(84vw, 340px); height: 100vh; height: 100dvh;
    padding: max(22px, env(safe-area-inset-top)) 20px max(22px, env(safe-area-inset-bottom));
    box-sizing: border-box; background: #fff; box-shadow: -18px 0 40px rgba(23, 34, 56, .16);
    visibility: hidden; transform: translateX(100%);
    transition: transform .28s ease, visibility .28s ease;
  }
  .page_show .article_anchor_drawer_head {
    display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between;
    gap: 16px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--inner-line, #dce5f2);
  }
  .page_show .article_anchor_drawer_head h3 {
    margin: 0; color: var(--inner-ink, #172238); font-size: 20px; line-height: 1.4; font-weight: 600;
  }
  .page_show .article_anchor_close {
    position: relative; flex: 0 0 auto; width: 40px; height: 40px;
    border: 1px solid var(--inner-line, #dce5f2); border-radius: 50%; background: #fff; cursor: pointer;
  }
  .page_show .article_anchor_close::before, .page_show .article_anchor_close::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 2px;
    background: var(--inner-ink, #172238); transform: translate(-50%, -50%) rotate(45deg);
  }
  .page_show .article_anchor_close::after { transform: translate(-50%, -50%) rotate(-45deg); }
  .page_show .article_anchor_drawer .sidebar-anchor-list {
    min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; gap: 16px;
  }
  .page_show .article_anchor_drawer .sidebar-anchor-list a { padding-top: 4px; padding-bottom: 4px; }
  body.article_toc_open .page_show .article_anchor_mask { opacity: 1; visibility: visible; }
  body.article_toc_open .page_show .article_anchor_drawer { visibility: visible; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .page_show .article_anchor_mask, .page_show .article_anchor_drawer { transition: none; }
}
