/* The selected chapter gets one measured line; the existing fallback remains without JS. */
.chapters.mm-tabs-ready { position: relative; }
.chapters.mm-tabs-ready button::after { content: none; }
.chapters .mm-tab-underline {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 1px;
  height: 2px;
  background: var(--ink);
  transform-origin: 0 50%;
  pointer-events: none;
}
.chapters .mm-tab-underline[hidden] { display: none; }
.mm-tab-underline.mm-line-running { will-change: transform; }
.mm-mask-running { will-change: clip-path; }

/* Feedback stays on the actual link/label; photographs do not get a global hover effect. */
.mm-enabled .text-link { transition: color 120ms ease-out, border-color 120ms ease-out; }
.mm-enabled .image-action { transition: background-color 120ms ease-out, color 120ms ease-out; }
.mm-enabled :is(.photo-button, .craft-card-photo):focus-visible .image-action {
  background: var(--ink);
  color: var(--paper);
}
@media (hover: hover) {
  .mm-enabled .text-link:hover { color: var(--blue); border-color: var(--blue); }
  .mm-enabled :is(.photo-button, .craft-card-photo):hover .image-action {
    background: var(--ink);
    color: var(--paper);
  }
}
@media (prefers-reduced-motion: reduce) {
  .mm-enabled .text-link,
  .mm-enabled .image-action { transition: none; }
  .mm-tab-underline.mm-line-running,
  .mm-mask-running { will-change: auto; }
}
