/* Shared reading and navigation basics; no build step required. */
html {
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body { overflow-wrap: anywhere; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.nav-name, .nav-home, .nav-serial,
.nav-links-inline a, .piece-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.piece-nav {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
}

.piece-nav a { min-width: 44px; gap: 0.4em; font-size: 11px; }
.piece-nav-all { grid-column: 2; color: var(--ink-light); }
.piece-nav-link.next { grid-column: 3; justify-self: end; text-align: right; }

/* Skip the fixed noise filter on phones to keep scrolling lightweight. */
@media (max-width: 767px) {
  body::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
