/* A quiet reading guide. Native links work without JavaScript. */
.lab-journey-page main { min-width: 0; }
.lab-journey {
  position: sticky;
  top: 0;
  z-index: 40;
  border-block: 1px solid #73532630;
  background: #f4ead7f5;
  color: #2b2115;
  backdrop-filter: blur(14px);
}
.lab-journey-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 6px;
  padding-block: 8px;
}
.lab-journey-label {
  margin-right: auto;
  padding-right: 20px;
  color: #735326;
  font: 9px/1.5 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .08em;
}
.lab-journey a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 12px;
  border-bottom: 2px solid transparent;
  color: #735326;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: color .15s, background-color .15s;
}
.lab-journey a:hover { background: #7353260a; color: #2b2115; }
.lab-journey a[aria-current="location"] {
  color: #2b2115;
  border-bottom-color: #735326;
  background: #7353260b;
}
.lab-journey a:focus-visible { outline: 2px solid #735326; outline-offset: -3px; }
.lab-journey-page [data-lab-chapter] { scroll-margin-top: 16px; }
html.has-lab-journey { scroll-padding-top: var(--lab-journey-offset, 100px); }
.lab-reading-progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 80; pointer-events: none; }
.lab-reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: #b3863b;
  transform: scaleX(var(--lab-reading-progress, 0));
  transform-origin: left;
}
@media (max-width: 900px) {
  .lab-journey-label { display: none; }
  .lab-journey-inner { gap: 0 4px; }
  .lab-journey a { padding-inline: 11px; }
}
@media (max-width: 600px) {
  /* One row on phones: the links share the width instead of the last one dropping below. */
  .lab-journey-inner { width: calc(100% - 32px); padding-block: 6px; gap: 0 2px; flex-wrap: nowrap; }
  .lab-journey a { flex: 1 1 auto; font-size: 11px; padding-inline: 4px; white-space: nowrap; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .lab-journey { position: relative; }
}
html.motion-paused .lab-journey a,
body.motion-paused .lab-journey a,
html[data-motion="reduced"] .lab-journey a { transition: none; }
html.has-lab-journey.motion-paused,
html.has-lab-journey[data-motion="reduced"] { scroll-behavior: auto; }
@media (prefers-reduced-motion: reduce) {
  html.has-lab-journey { scroll-behavior: auto; }
  .lab-journey a { transition: none; }
}
@media print {
  .lab-journey, .lab-reading-progress { display: none; }
}
