/* Match the reference's 12px type and ~38px row at 1440px viewport width. */
.home-progress { display: none; }
@media (min-width: 901px) {
    .home-page .home-progress {
        --rail-unit: calc(100vw / 90);
        --rail-height: calc(var(--rail-unit) * 2.4);
        position: fixed;
        inset: 0 0 auto;
        z-index: 90;
        display: block;
        height: var(--rail-height);
        background: transparent;
        color: #f0f0f0;
        mix-blend-mode: difference;
    }
    /* Keep the existing controls clear of the thinner, full-width chapter rail. */
    .home-page .site-header button.site-audio-toggle,
    .home-page .site-header button.theme-toggle,
    .home-page .site-header button.menu-toggle {
        top: calc(100vw / 90 * 2.4 + 1rem);
    }
    .home-progress__chapters {
        position: relative;
        height: 100%;
        width: 100%;
    }
    .home-progress__link {
        position: absolute;
        left: var(--chapter-position, 0%);
        bottom: 0;
        display: flex;
        align-items: flex-end;
        padding: var(--rail-unit) 0 calc(var(--rail-unit) * 0.5);
        color: rgba(240, 240, 240, 0.72);
        font-family: Helvetica, Arial, sans-serif;
        font-size: calc(var(--rail-unit) * 0.75);
        font-weight: 500;
        line-height: 1.2;
        letter-spacing: -0.02em;
        white-space: nowrap;
        text-decoration: none;
        transition: color 0.2s ease;
    }
    /* Captions may shift to avoid collisions; ticks retain their true positions. */
    .home-progress__link span {
        transform: translateX(var(--caption-shift, 0px));
    }
    .home-progress__marker {
        position: absolute;
        left: var(--chapter-position, 0%);
        bottom: 0;
        color: rgba(240, 240, 240, 0.72);
        pointer-events: none;
    }
    .home-progress__link::after,
    .home-progress__marker::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: calc(var(--rail-unit) * -0.1875);
        width: 1px;
        height: calc(var(--rail-unit) * 0.4375);
        background: currentColor;
    }
    .home-progress__link[aria-current],
    .home-progress__link:hover,
    .home-progress__link:focus-visible { color: #f0f0f0; }
    .home-progress__link:focus-visible {
        outline: 1px solid currentColor;
        outline-offset: 3px;
    }
    .home-progress__track {
        position: absolute;
        inset: auto 0 0;
        height: 1px;
        background: rgba(240, 240, 240, 0.18);
        pointer-events: none;
    }
    .home-progress__fill {
        display: block;
        width: 100%;
        height: 100%;
        background: currentColor;
        transform: scaleX(0);
        transform-origin: left center;
    }
    .home-page.menu-open .home-progress { visibility: hidden; }
    .home-page #home-works,
    .home-page #home-daily,
    .home-page #home-articles,
    .home-page #home-about {
        scroll-margin-top: calc(100vw / 90 * 2.4 + 1rem);
    }
}
@media (prefers-reduced-motion: reduce) {
    .home-progress__link { transition: none; }
}
