/* Reusable article navigation; the layout only applies to opted-in articles. */
.article-navigation-layout { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.article-navigation-content { grid-column: 1; grid-row: 1; min-width: 0; }
.article-navigation-content > .content-section { padding-inline: 0; }
.article-navigation-content > .content-section.tinted { padding-inline: 24px; border-radius: 16px; }
.article-navigation-sidebar { grid-column: 2; grid-row: 1; position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; overscroll-behavior: contain; }
.article-navigation { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--deep); }
.article-navigation h2 { margin: 0 0 12px; font-size: 1.05rem; color: var(--deep); }
.article-navigation details { border-top: 1px solid var(--line); }
.article-navigation summary { position: relative; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; font-weight: 700; font-size: .9rem; line-height: 1.35; }
.article-navigation summary::-webkit-details-marker { display: none; }
.article-navigation summary::after { content: '+'; font-size: 1.25rem; font-weight: 400; }
.article-navigation details[open] summary::after { content: '−'; }
.article-navigation ul { list-style: none; margin: 0 0 10px; padding: 0; }
.article-navigation li { margin: 0; }
.article-navigation a { display: block; padding: 9px 8px 9px 12px; border-left: 3px solid transparent; color: var(--deep); font-size: .9rem; line-height: 1.4; text-decoration: none; }
.article-navigation a:hover { text-decoration: underline; text-underline-offset: 3px; }
.article-navigation a[aria-current="location"] { border-left-color: var(--vers-blue, var(--forest)); background: var(--soft); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.article-navigation :focus-visible, .article-navigation-open:focus-visible, .article-navigation-close:focus-visible { outline: 3px solid var(--vers-blue, var(--forest)); outline-offset: 2px; }
.article-navigation-open, .article-navigation-dialog { display: none; }
@media (max-width: 1050px) {
 .article-navigation-layout { display: block; }
 .article-navigation-sidebar { position: static; max-height: none; margin-bottom: 20px; }
 .article-navigation-content > .content-section { padding-inline: 0; }
 .article-navigation-content .split { grid-template-columns: minmax(0, 1fr); }
 .article-navigation-enhanced .article-navigation-sidebar { display: none; }
 .article-navigation-enhanced .article-navigation-open { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 18px; border: 1px solid var(--vers-blue, var(--forest)); border-radius: 999px; color: var(--deep); background: var(--paper); font: inherit; font-weight: 700; cursor: pointer; }
 .article-navigation-launch { position: sticky; top: 72px; z-index: 30; padding: 8px 0; pointer-events: none; }
 .article-navigation-launch > button { pointer-events: auto; }
 .article-navigation-dialog[open] { display: flex; flex-direction: column; position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: min(82dvh, 760px); margin: 0; padding: 0; border: 0; border-radius: 18px 18px 0 0; background: var(--paper); color: var(--deep); overflow: hidden; }
 .article-navigation-dialog::backdrop { background: rgba(18, 37, 49, .5); }
 .article-navigation-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
 .article-navigation-dialog-header h2 { margin: 0; font-size: 1.1rem; color: var(--deep); }
 .article-navigation-close { min-width: 44px; min-height: 44px; background: transparent; border: 1px solid var(--line); border-radius: 50%; color: var(--deep); font-size: 1.5rem; cursor: pointer; }
 .article-navigation-dialog-body { overflow: auto; overscroll-behavior: contain; padding: 0 20px max(20px, env(safe-area-inset-bottom)); }
 .article-navigation-dialog .article-navigation { padding: 0; border: 0; }
 .article-navigation-dialog .article-navigation > h2 { display: none; }
 .article-navigation-dialog .article-navigation a { min-height: 44px; display: flex; align-items: center; }
}
@media (min-width: 701px) and (max-width: 1050px) { .article-navigation-launch { top: 80px; } }
@media (prefers-reduced-motion: no-preference) { html:has([data-article-navigation]) { scroll-behavior: smooth; } .article-navigation a { transition: background-color .15s, border-color .15s; } }
@media print { .article-navigation-launch, .article-navigation-dialog { display: none !important; } .article-navigation-sidebar { position: static; max-height: none; } }
/* The shared reader clips overflow; clip without creating a scroll container so sticky works. */
.vers-page main:has(> .article-navigation-layout) { overflow: clip; }
@media (max-width:1050px) {
 .article-navigation-launch .article-navigation-open { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 18px; border: 1px solid var(--vers-blue, var(--forest)); border-radius: 999px; color: var(--deep); background: var(--paper); font: inherit; font-weight: 700; cursor: pointer; }
}
@media (min-width:1051px) { .article-navigation-sidebar { top: 145px; max-height: calc(100vh - 160px); } .vers-page .article-navigation-content [id] { scroll-margin-top: 145px; } }
@media (max-width:1050px) { .article-navigation-launch { top: 135px; } .vers-page .article-navigation-content [id] { scroll-margin-top: 200px; } }
