/* Shared navigation: quiet ticks, a real draggable thumb and named checkpoints. */
.chapter-rail{--rail-bg:#101d33;--rail-ink:#edf3ff;--rail-line:#8da6cc;--rail-accent:#9fbeff;position:fixed;right:12px;top:50%;transform:translateY(-50%);z-index:45;width:48px;color:var(--rail-ink);font-family:inherit;font-size:12px}
.chapter-rail[hidden]{display:none}.chapter-rail *{box-sizing:border-box}
.chapter-rail summary{list-style:none;cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:center;border:1px solid var(--rail-line);border-radius:12px;background:var(--rail-bg);font-size:20px}
.chapter-rail summary::-webkit-details-marker{display:none}.chapter-rail summary .chapter-current{position:absolute;right:58px;padding:8px 12px;border-radius:8px;background:var(--rail-bg);white-space:nowrap;font-size:12px;opacity:0;pointer-events:none}
.chapter-rail:focus-within summary .chapter-current,.chapter-rail:hover summary .chapter-current{opacity:1}
.chapter-rail ol{position:absolute;right:58px;top:0;margin:0;padding:8px;list-style:none;width:220px;max-height:60dvh;overflow:auto;border:1px solid var(--rail-line);border-radius:16px;background:var(--rail-bg);box-shadow:0 12px 32px #0003}
.chapter-rail a{display:flex;align-items:center;min-height:44px;padding:10px 12px;color:var(--rail-ink);text-decoration:none;border-radius:8px;font-size:13px;line-height:1.4}.chapter-rail a:hover{background:#7c9dcc22}.chapter-rail a[aria-current]{background:#295bed;color:#fff}
.chapter-scrubber{position:relative;height:280px;max-height:40dvh;margin-top:12px;background:repeating-linear-gradient(to bottom,var(--rail-line) 0 1px,transparent 1px 10px) center/12px calc(100% - 22px) no-repeat}
.chapter-scrubber label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.chapter-rail input[type=range]{appearance:none;-webkit-appearance:none;writing-mode:vertical-lr;direction:ltr;width:44px;height:100%;margin:0;background:transparent;cursor:ns-resize;touch-action:none;accent-color:var(--rail-accent)}
.chapter-rail input::-webkit-slider-runnable-track{width:2px;background:transparent}.chapter-rail input::-webkit-slider-thumb{-webkit-appearance:none;width:24px;height:24px;margin-left:-11px;border:3px solid var(--rail-bg);border-radius:8px;background:var(--rail-accent);box-shadow:0 0 0 1px var(--rail-line)}
.chapter-rail input::-moz-range-track{width:2px;background:transparent}.chapter-rail input::-moz-range-thumb{width:18px;height:18px;border:3px solid var(--rail-bg);border-radius:8px;background:var(--rail-accent)}
.chapter-rail :focus-visible{outline:3px solid var(--rail-accent);outline-offset:3px}
[data-chapter]{scroll-margin-top:140px}
@media(min-width:1101px){body:has(.chapter-rail) main,body:has(.chapter-rail)>footer{margin-right:72px}}
@media(max-width:1100px){.chapter-rail{right:16px;top:auto;bottom:max(16px,env(safe-area-inset-bottom));transform:none;width:auto;max-width:calc(100vw - 32px)}.chapter-rail summary{gap:10px;padding:0 14px;font-size:17px;box-shadow:0 4px 18px #0003}.chapter-rail summary .chapter-current{position:static;opacity:1;padding:0;font-size:12px;background:none}.chapter-scrubber{display:none}.chapter-rail ol{right:0;top:auto;bottom:54px;max-width:calc(100vw - 32px)}body:has(.chapter-rail)>footer{padding-bottom:90px}}
body.cloud .chapter-rail{--rail-bg:#f6f9ff;--rail-ink:#12213d;--rail-line:#587197;--rail-accent:#295bed}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}}
