/* The chapter path lives on the physical right edge, independently of scroll. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.chapter-dock { direction: ltr; position: fixed; z-index: 20; top: 50%; right: 24px; transform: translateY(-50%); width: 150px; max-height: calc(100svh - 190px); padding: 0; background: none; }
.rail-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.rail-kicker { color: var(--ash); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.rail-heading button { font-size: 18px; min-width: 36px; min-height: 36px; padding: 0; color: var(--ash); }
.chapter-rail { display: flex; flex-direction: column; position: relative; }
.chapter-rail::before { content: ''; position: absolute; left: 3px; top: 25px; bottom: 25px; width: 1px; background: var(--hairline-strong); }
.chapter-rail a { position: relative; display: flex; align-items: center; min-height: 51px; padding: 8px 0 8px 20px; gap: 10px; color: var(--ash); font-size: 12px; white-space: nowrap; }
.chapter-rail a::before { content: ''; position: absolute; left: 0; top: calc(50% - 3px); height: 7px; width: 7px; border-radius: 50%; background: #6c685d; border: 2px solid var(--obsidian); box-shadow: 0 0 0 1px #6c685d; }
.chapter-rail a[aria-current] { color: var(--porcelain); }
.chapter-rail a[aria-current] .chapter-name { text-decoration: underline; text-decoration-color: var(--brushed-gold); text-underline-offset: 7px; }
.chapter-rail a[aria-current]::before { background: var(--brushed-gold); box-shadow: 0 0 0 1px var(--brushed-gold); }
.chapter-rail a:hover, .chapter-rail a:focus-visible { color: var(--brushed-gold); text-decoration: none; }
.chapter-rail a:hover .chapter-name, .chapter-rail a:focus-visible .chapter-name { text-decoration: underline; text-underline-offset: 7px; }
.constellation .site-footer { padding-bottom: 90px; }
@media (max-height: 760px) and (min-width: 900px) {
  .chapter-rail a { min-height: 44px; }
  .rail-heading { margin-bottom: 6px; }
}
@media (max-width: 899px) {
  .chapter-dock { right: 2px; width: 44px; max-height: calc(100svh - 176px); }
  .rail-heading { margin-bottom: 7px; }
  .rail-heading button { min-height: 44px; width: 44px; font-size: 17px; }
  .chapter-rail a { min-height: 44px; width: 44px; padding: 0; }
  .chapter-rail::before { left: 21px; top: 22px; bottom: 22px; }
  .chapter-rail a::before { left: 18px; }
  .chapter-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .chapter-rail a:focus-visible .chapter-name { width: max-content; height: auto; clip-path: none; overflow: visible; right: 33px; padding: 9px 12px; background: var(--obsidian); border-left: 1px solid var(--brushed-gold); }
  html:not(.journey-ready) .rail-heading { display: none; }
}
@media (max-width: 360px) {
}

.rail-motion { width: 100%; justify-content: flex-start; gap: 10px; padding: 10px 0 0 20px; color: var(--ash); font-size: 11px; margin-top: 8px; }
.arrival-scroll-hint { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; gap: 16px; color: var(--ash); font-size: 12px; white-space: nowrap; }
@media (max-width: 899px) {
  .rail-motion { width: 44px; height: 44px; min-height: 44px; padding: 0; font-size: 0; justify-content: center; margin-top: 10px; }
  .rail-motion span { font-size: 15px; }
  .arrival-scroll-hint { font-size: 11px; }
}

@media (min-width: 900px) { .rail-heading { display: none; } }
