/* Distance line (Loam House kit). Rewritten from Loam House's location line (styles.css .location-line + .place
   .location-line i; revealed in the chapter timeline, editorial.js chapterMoves() 679-681), teardown 2026-11-23.

     <p class="dl" data-distance-line>
       <span class="dl__sr">14 Hollow Lane is a three minute drive from the bay.</span>
       <span class="dl__w" aria-hidden="true">14 Hollow Lane</span><i class="dl__h"></i>
       <span class="dl__w" aria-hidden="true">03 min drive</span><i class="dl__h"></i>
       <span class="dl__w" aria-hidden="true">The bay</span>
     </p>

   One row, three tiny caps words with two hairlines between them that take all the room left over (flex: 1), so the
   line always spans its column and the time sits in the middle like the scale on a map: here --- how far --- there.
   9px DM Sans 300, tracked .2em, caps; words 22px from the hairlines (10px on phones <= 800px); hairlines 1px in the
   text colour at 30% (on a photo) or ink at 18% (.dl--paper, the source's paper sections). Ours: the two END words may
   wrap inside themselves (balanced, hugging their own end) before a hairline drops under --dl-min (24px), while the
   middle word (the time) never breaks, so a long street name never pushes the row wider than its column. More words
   = more hairlines (any count works); the .dl__sr sentence is what a screen reader hears.
   part.js reveals it in place: opacity 0 + blur 6px -> rest (see part.js); data-dl-reveal="off" keeps it static. */

.dl {
  display: flex;
  align-items: center;
  gap: var(--dl-gap, 22px);
  margin: 0;
  color: inherit;
  font: var(--dl-weight, 300) var(--dl-size, 9px) / var(--dl-lh, normal) var(--dl-sans, "DM Sans", Arial, sans-serif);
  letter-spacing: var(--dl-track, .2em);
  text-transform: var(--dl-case, uppercase);
}
.dl__w { flex: none; white-space: nowrap; }
.dl__w:nth-child(1 of .dl__w), .dl__w:nth-last-child(1 of .dl__w) { flex: 0 1 auto; min-width: 0; white-space: normal; text-wrap: balance; }
.dl__w:nth-child(1 of .dl__w) { text-align: left; }        /* a wrapped end word hugs its end of the line */
.dl__w:nth-last-child(1 of .dl__w) { text-align: right; }
.dl__h {
  flex: 1 1 0;
  min-width: var(--dl-min, 24px);
  height: var(--dl-line-w, 1px);
  background: var(--dl-hair, currentColor);
  opacity: var(--dl-hair-opacity, .3);
}
/* the source's light sections: --line rgba(30,33,29,.18) at full opacity */
.dl--paper .dl__h { background: var(--dl-hair, rgba(30, 33, 29, .18)); opacity: var(--dl-hair-opacity, 1); }
.dl__sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

@media (max-width: 800px) { .dl { gap: var(--dl-gap-phone, 10px); } }

/* waiting for its reveal (part.js adds .dl-js to <html> and .is-in to the line when it plays) */
.dl-js .dl[data-distance-line]:not(.is-in):not([data-dl-reveal="off"]) { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .dl-js .dl[data-distance-line]:not(.is-in):not([data-dl-reveal="off"]) { opacity: 1; }
}
