/* Mobile article contents: at <=1000px the side TOC (which used to stack as
   a static 11-link list above the article) is replaced by a sticky bar under
   the topbar. The bar names the section being read; tapping it opens the
   full list as a dropdown. Built by TOC_MOBILE_SCRIPT from the existing
   .toc links, so without JS the original stacked list still renders. */
.toc-m,.toc-m-scrim{display:none}
/* Original sidebar links also serve the no-JavaScript contents fallback. */
.toc a:hover,.toc a:focus-visible{color:var(--flarepop-ink)}
@media(max-width:1000px){
  .body-grid.toc-js{grid-template-columns:minmax(0,1fr);gap:28px}
  .toc-js .toc{display:none}
  .toc-js .toc-m{display:block;position:sticky;top:calc(var(--tb-h,77px) - 1px);z-index:80;margin:0 -32px;background:var(--page);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
  .toc-m-btn{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:0 32px;background:none;border:0;font:inherit;font-size:var(--fs-7);font-weight:600;line-height:1.3;color:var(--ink);text-align:left;cursor:pointer}
  .toc-m-cur{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .toc-m-chev{width:18px;height:18px;flex:none;color:var(--ink-3);transition:transform .18s}
  .toc-m.open .toc-m-chev{transform:rotate(180deg)}
  .toc-m-panel{display:none;position:absolute;top:100%;left:0;right:0;max-height:min(64vh,560px,var(--toc-panel-space,100vh));overflow-y:auto;overscroll-behavior:contain;background:var(--page);border-bottom:1px solid var(--line);padding:6px 0 12px}
  .toc-m.open .toc-m-panel{display:block}
  .toc-m-panel a{display:flex;align-items:center;min-height:44px;padding:4px 32px;font-size:var(--fs-6);line-height:1.35;color:var(--ink-3);text-decoration:none}
  .toc-m-panel a[aria-current="true"]{color:var(--ink);font-weight:600}
  .toc-m-panel a:hover{color:var(--flarepop-ink)}
  .toc-m-scrim{display:block;position:fixed;inset:0;z-index:79;background:rgba(10,10,15,.32);opacity:0;pointer-events:none;transition:opacity .18s}
  .toc-m-scrim.open{opacity:1;pointer-events:auto}
  main [id]{scroll-margin-top:calc(var(--tb-h,77px) + 72px)}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .toc-m-chev,.toc-m-scrim{transition:none}
}
