/* Swappable presentation: section-navigation.js only tracks aria-current + marker Y. */
.rail-nav::before { border-left-width: 0; }
.rail-nav:is([data-nav-style="labels"], [data-nav-style="responsive"]) { --section-marker-y: 6px; gap: .85rem; }
.rail-nav:is([data-nav-style="labels"], [data-nav-style="responsive"]) a { white-space: nowrap; }
.rail-nav:is([data-nav-style="labels"], [data-nav-style="responsive"]) a[aria-current="location"] { color: var(--blue); }
.rail-nav:is([data-nav-style="labels"], [data-nav-style="responsive"]) .section-marker {
  position: absolute;
  left: -.5rem;
  top: 0;
  width: 8px;
  height: 8px;
  background: var(--purple);
  clip-path: polygon(0 0, 35% 0, 100% 50%, 35% 100%, 0 100%, 65% 50%);
  transform: translateY(calc(var(--section-marker-y) - 4px));
  transition: transform .45s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}
.rail-nav:is([data-nav-style="labels"], [data-nav-style="responsive"]) a { padding-left: .35rem; }

/* Alternative skin. Equal vertex counts allow a true shape morph, not a swap. */
.rail-nav[data-nav-style="minimal"] { gap: .35rem; }
.rail-nav[data-nav-style="minimal"] .section-marker { display: none; }
.rail-nav[data-nav-style="minimal"] a { display: block; width: 24px; height: 24px; }
.rail-nav[data-nav-style="minimal"] .nav-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.rail-nav:is([data-nav-style="minimal"], [data-nav-style="responsive"]) a::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--soft);
  clip-path: polygon(0 0, 50% 0, 100% 0, 100% 100%, 50% 100%, 0 100%);
  transition: clip-path .35s cubic-bezier(.22,1,.36,1), background-color .35s;
}
.rail-nav:is([data-nav-style="minimal"], [data-nav-style="responsive"]) a[aria-current="location"]::after {
  background: var(--purple);
  clip-path: polygon(0 0, 35% 0, 100% 50%, 35% 100%, 0 100%, 65% 50%);
}
.rail-nav:is([data-nav-style="minimal"], [data-nav-style="responsive"]) a:focus-visible { outline: 1px solid var(--blue); outline-offset: 2px; }
.rail-nav:is([data-nav-style="minimal"], [data-nav-style="responsive"]) a:not([aria-current="location"]):hover::after { background: var(--text); }
.rail-nav[data-nav-style="responsive"] a::after { display: none; }
/* 1024px leaves the full text rail clear of the main content's side padding. */
@media (max-width: 1023px) {
  .rail-nav[data-nav-style="responsive"] { display: grid; left: 8px; gap: .35rem; }
  .rail-nav[data-nav-style="responsive"] .section-marker { display: none; }
  .rail-nav[data-nav-style="responsive"] a { display: block; width: 24px; height: 24px; padding-left: 0; }
  .rail-nav[data-nav-style="responsive"] a::after { display: block; }
  .rail-nav[data-nav-style="responsive"] .nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rail-nav .section-marker,
  .rail-nav a::after { transition: none; }
}
