/* Local reading navigation only; this file does not alter the article or image widths. */
html.afg-chapters-enabled{
  --afg-chapter-header-edge:0px;
  --afg-chapter-bar-height:0px;
  scroll-padding-top:0;
  scroll-behavior:smooth;
}
.afg-chapters-enabled .project-section{
  scroll-margin-top:calc(var(--afg-chapter-header-edge) + 30px);
}
.afg-chapter-rail{
  position:fixed;
  z-index:35;
  left:max(20px,calc((100vw - 760px)/2 - 176px));
  top:calc(var(--afg-chapter-header-edge) + 40px);
  width:144px;
  color:var(--case-muted,#6b7064);
  font-family:inherit;
  opacity:0;
  visibility:hidden;
  transform:translateX(-6px);
  pointer-events:none;
  transition:opacity 280ms cubic-bezier(.23,1,.32,1),transform 280ms cubic-bezier(.23,1,.32,1),visibility 0s linear 280ms;
}
.afg-chapter-rail[data-visible="true"]{
  opacity:1;
  visibility:visible;
  transform:translate(0);
  pointer-events:auto;
  transition-delay:0s;
}
.afg-chapter-list{list-style:none;margin:0;padding:0;border-left:1px solid var(--case-rule,#dcdfd3)}
.afg-chapter-list li{margin:0;padding:0}
.afg-chapter-list a{
  display:flex;
  align-items:baseline;
  gap:10px;
  position:relative;
  padding:11px 0 11px 15px;
  text-decoration:none;
  font-size:12px;
  line-height:1.65;
  color:inherit;
}
.afg-chapter-list small{font-size:9px;font-variant-numeric:tabular-nums;opacity:.7}
.afg-chapter-list a::before{content:"";position:absolute;inset:9px auto 9px -1px;width:2px;background:transparent}
.afg-chapter-list a[aria-current="location"]{color:var(--case-ink,#34382f)}
.afg-chapter-list a[aria-current="location"]::before{background:#d6b34d}
.afg-chapter-list a[aria-current="location"] small{opacity:1}
.afg-chapter-list a:hover{color:var(--case-ink,#34382f)}
.afg-chapter-list a:focus-visible{outline:2px solid var(--case-accent,#747e67);outline-offset:3px}
@media(width < 1180px){
  .afg-chapters-enabled .project-section{scroll-margin-top:calc(var(--afg-chapter-header-edge) + 72px)}
  .afg-chapter-rail{
    inset:var(--afg-chapter-header-edge) 0 auto;
    width:auto;
    max-width:100%;
    border-bottom:1px solid var(--case-rule,#dcdfd3);
    background:var(--case-paper,#f7f5f0);
    transform:translateY(-5px);
  }
  .afg-chapter-rail[data-visible="true"]{transform:translateY(0)}
  .afg-chapter-rail nav{min-width:0;max-width:100%}
  .afg-chapter-list{
    display:flex;
    align-items:stretch;
    width:100%;
    max-width:100%;
    gap:4px;
    padding:0 16px;
    border-left:0;
    overflow-x:auto;
    overflow-y:hidden;
    overscroll-behavior-x:contain;
    scrollbar-width:thin;
    scroll-behavior:auto;
  }
  .afg-chapter-list li{flex:0 0 auto}
  .afg-chapter-list a{white-space:nowrap;padding:14px 9px;font-size:11px;gap:7px}
  .afg-chapter-list small{font-size:8px}
  .afg-chapter-list a::before{inset:auto 9px 0;height:2px;width:auto}
  .afg-chapter-list a:focus-visible{outline-offset:-3px}
}
@media(prefers-reduced-motion:reduce){
  html.afg-chapters-enabled{scroll-behavior:auto!important}
  .afg-chapter-rail{transition:none;transform:none!important}
}
@media print{.afg-chapter-rail{display:none!important}}
