.page-section-target { scroll-margin-top: 2rem; }
.page-section-target:focus:not(:focus-visible) { outline: none; }
.page-sections {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  width: min(240px, calc(100vw - 2rem));
  border: 1px solid #e1ded8;
  border-radius: 12px;
  background: #fffefa;
  color: #334155;
  box-shadow: 0 4px 20px #26343e1a;
  font: 500 0.85rem/1.5 system-ui, sans-serif;
}
.page-sections summary { cursor: pointer; padding: 0.8rem 1rem; font-weight: 600; }
.page-sections nav { display: grid; gap: 0.25rem; padding: 0 0.5rem 0.5rem; max-height: 50dvh; overflow-y: auto; }
.page-sections a { display: block; border-radius: 6px; padding: 0.4rem 0.6rem; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.page-sections a:hover, .page-sections a[aria-current="location"] { color: #a72f28; background: #ffe8e2; }
.page-sections :focus-visible { outline: 2px solid #b63830; outline-offset: 2px; }
@media (min-width: 1400px) {
  .has-page-sections .preview-layout { grid-template-columns: 264px minmax(0, 1fr) 220px; }
  .has-page-sections .admin-shell { grid-template-columns: 288px minmax(0, 1fr) 220px; }
  .page-sections { top: 2rem; bottom: auto; width: 200px; box-shadow: none; }
  .page-sections nav { max-height: calc(100dvh - 8rem); }
}
@media (max-width: 1399px) {
  body.has-page-sections { padding-bottom: 4rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
