/* ==========================================================================
   Series summary -> in-page series anchors
   Added: 2026-10-14
   Scope: /characters/* detail pages only (this file is linked from the
          characters page template head, injected by gen_characters.py).
   Why a new file: nginx serves /assets/ with `expires 1y; immutable`, so
          editing an existing hashed css in place never reaches visitors.
   ========================================================================== */

/* 1. Summary list items are links now — keep the exact current look,
      add an underline only on hover / keyboard focus. */
.series-summary a {
    color: inherit;
    text-decoration: none;
}

.series-summary a:hover,
.series-summary a:focus {
    text-decoration: underline;
}

.series-summary a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 3px;
}

/* 2. The sticky site header is ~64px tall; without this the target series
      header would land underneath it. */
.series-item {
    scroll-margin-top: 88px;
}

/* 3. Make the jumped-to series obvious. */
.series-item:target {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.series-item:target > .series-item-header {
    background: var(--primary-light);
}

/* 4. Smooth scrolling, but respect reduced-motion users. */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

@media (max-width: 768px) {
    .series-item {
        scroll-margin-top: 76px;
    }
}
