/* Proposed shared current-location treatment. Existing page layouts are retained. */
:root { --reading-offset: 104px; }
/* One root offset also protects skip links and anchors outside the contents list. */
html { scroll-padding-top: var(--reading-offset); }
.method-content > section[id], .case-page section[id] { scroll-margin-top: 0; }
.contents-rail { top: var(--reading-offset); max-height: calc(100dvh - var(--reading-offset) - 24px); overflow-y: auto; padding: 3px; margin: -3px; }
.page-contents a { border: 1px solid transparent; border-radius: 6px; }
.page-contents > a, .page-contents ol li a { padding: 11px 12px; margin: 4px 0; }
.page-contents ol { padding-bottom: 14px; margin: 10px 0 14px; }
.page-contents a:hover { background: var(--cream); }
.page-contents a[aria-current="location"], .case-page .case-index a[aria-current="location"] { background: var(--sage); color: var(--green); border-color: var(--green); font-weight: 600; text-decoration: none; }
.page-contents a:focus-visible, .case-page .case-index a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.method-content > section:focus, .case-page section:focus { outline: none; }
.method-content > section.keyboard-destination:focus > :first-child, .case-page section.keyboard-destination:focus > :first-child { outline: 2px solid var(--green); outline-offset: 6px; }
.case-page .case-index [role="navigation"] { gap: 8px; }
.case-page .case-index a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid transparent; border-radius: 6px; }
@media (max-width: 767px) { .contents-rail { position: static; max-height: none; overflow: visible; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } }
