/*
 * Outline / scroll-nav sidebar.
 * A right-edge strip of ticks surfacing the document's top-level sections.
 * No chrome: no background, border, or buttons — just ticks, an active dot,
 * and a HUD-material tooltip. Desktop only.
 *
 * Colors (--sn-tick, --sn-fg, strip offset) are set on the element by JS
 * from the live background luminance.
 */

.scroll-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 18px;
    z-index: 60;
    pointer-events: none;   /* pass-through; only ticks claim hits */
    --sn-tick: rgba(0, 0, 0, 0.55);
    --sn-fg: var(--fg, #1c1c1c);
}

/* Generous hit band: full strip width x tickPitch tall, centered on the
   drawn bar. Outside the band the strip is pointer-transparent so the
   scroll view underneath receives clicks and wheel events. */
.scroll-nav__tick {
    position: absolute;
    right: 0;
    width: 18px;
    height: var(--sn-pitch, 14px);
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.scroll-nav__bar {
    display: block;
    width: 8px;
    height: 2px;
    border-radius: 1px;
    background: var(--sn-tick);
    transition: width 120ms ease, background 120ms ease, opacity 120ms ease;
}

.scroll-nav__tick:hover .scroll-nav__bar {
    width: 12px;
}

.scroll-nav__tick.is-active .scroll-nav__bar {
    width: 12px;
    background: var(--sn-fg);
    opacity: 1;
}

/* Active dot: just outside the strip's leading (left) edge. */
.scroll-nav__dot {
    position: absolute;
    left: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent, #c2410c);
    transform: translate(-7px, -50%);
    opacity: 0;
    pointer-events: none;
    transition: top 160ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 160ms ease;
}

.scroll-nav.is-ready .scroll-nav__dot {
    opacity: 1;
}

/* HUD-material tooltip, left of the hovered tick. */
.scroll-nav__tip {
    position: absolute;
    right: 26px;
    transform: translateY(-50%);
    max-width: 360px;
    padding: 4px 10px;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    background: rgba(28, 28, 30, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.scroll-nav__tip.is-visible {
    opacity: 1;
}

/* Desktop only. */
@media (max-width: 1023px) {
    .scroll-nav { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-nav__dot,
    .scroll-nav__bar,
    .scroll-nav__tip { transition: none; }
}
