/* © 2026 LFM Labs. All rights reserved. */
/* site-ruler.css: the scroll instrument (site-ruler.js; docs/TOURS-PLAN.md §6, BLUEPRINT
   D27). Paper's is a pencil ruler down the right margin. Tokens only: the look's ink,
   paper and accent (index.html :root, looks-mock.css) reach the canvas through
   .ruler-probe. A look picks its instrument with --scroll-instrument; until the others are
   built every look draws the ruler in its own ink. The native bar hides only while the
   ruler is live (html.ruler-on, set by the script), and only from 640 px: a phone keeps
   the tour's top bar and its own scroll bar. */

:root {
  --scroll-instrument: ruler;
  --ruler-ink: var(--ink);
  --ruler-accent: var(--accent);
  --ruler-quiet: color-mix(in srgb, var(--ink) 62%, var(--paper));
  --ruler-type: var(--type);
  --ruler-w: 0px;
}

/* ------------------------------------------------------------ live */
@media (min-width: 640px) {
  html.ruler-on { scrollbar-width: none; --ruler-w: 44px; }
  html.ruler-on::-webkit-scrollbar { display: none; }
  /* The page keeps clear of the ruler; the dev Dark switch steps left of it. */
  html.ruler-on .site { padding-right: var(--ruler-w); }
  html.ruler-on .dev-theme { right: calc(var(--ruler-w) + 24px); }
}
@media (min-width: 1100px) {
  html.ruler-on.ruler-labels { --ruler-w: 148px; }
}

/* ------------------------------------------------------------ the ruler */
.ruler {
  position: fixed; z-index: 15; top: 0; right: 0; bottom: 0; width: var(--ruler-w);
  box-sizing: border-box; padding: 16px 0 14px;
  display: grid; grid-template-rows: minmax(0, 1fr) auto;
  color: var(--ruler-ink); font: 500 11.5px/1.2 var(--ruler-type);
  opacity: 0; pointer-events: none; transition: opacity 400ms var(--ease-lfm-out);
}
html.ruler-on .ruler { opacity: 1; pointer-events: auto; }
html.sheet-open .ruler { opacity: 0; pointer-events: none; }
.ruler-track { position: relative; min-height: 0; }
.ruler-scale, .ruler-dots { position: absolute; top: 0; left: 0; pointer-events: none; }
.ruler-probe { position: absolute; width: 0; height: 0; overflow: hidden; color: var(--ruler-ink); border: 0 solid var(--ruler-accent); }

/* The stops: a link over each chapter's tick, its short name beside it. */
.ruler-stops { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; pointer-events: none; }
.ruler-li { position: absolute; top: 0; right: 0; width: 100%; height: 0; }
.ruler-stop {
  position: absolute; right: 0; top: 0; translate: 0 -50%;
  display: flex; align-items: center; justify-content: flex-end; box-sizing: border-box;
  min-width: 36px; height: 16px; padding-right: 30px;
  color: var(--ruler-quiet); text-decoration: none; white-space: nowrap; pointer-events: auto;
  transition: color 300ms var(--ease-lfm-out);
}
.ruler-stop:hover { color: var(--ruler-ink); }
.ruler-stop[aria-current] { color: var(--ruler-ink); font-weight: 600; }
.ruler-stop:focus-visible { outline: 2px solid var(--ruler-ink); outline-offset: 1px; border-radius: var(--radius-pill); }
/* Narrow (and off a tour): ticks only; the name shows on hover and focus, to the left. */
.ruler-l {
  position: absolute; right: calc(100% + 4px); top: 50%; translate: 0 -50%; padding: 4px 10px;
  border-radius: var(--radius-pill); background: var(--sheet-bg); color: var(--ruler-ink); box-shadow: var(--shadow-card);
  max-width: 260px; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; pointer-events: none; transition: opacity 300ms var(--ease-lfm-out);
}
.ruler-stop:hover .ruler-l, .ruler-stop:focus-visible .ruler-l { opacity: 1; }

/* The thumb: the dots are drawn on .ruler-dots; this is what you grab and focus. */
.ruler-thumb {
  position: absolute; z-index: 2; top: 0; right: 8px; width: 24px; height: 28px;
  border-radius: var(--radius-pill); touch-action: none; cursor: grab;
}
.ruler.is-drag .ruler-thumb { cursor: grabbing; }
.ruler-thumb:focus-visible { outline: 2px solid var(--ruler-ink); outline-offset: 2px; }

/* At the foot: "Start my brief" and "Looking for something else?". Narrow: icons, each
   word on hover and focus (never removed). */
.ruler-foot { display: grid; gap: 6px; justify-items: end; padding: 10px 6px 0 0; }
.ruler-foot .site-pay { padding: 8px; font-size: 13px; box-shadow: none; }
.ruler-act { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.ruler-act-icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ruler-else { padding: 7px; color: var(--ruler-quiet); text-decoration: none; }
.ruler-else:hover { color: var(--ruler-ink); }
.ruler-act-l {
  position: absolute; right: calc(100% + 8px); top: 50%; translate: 0 -50%; white-space: nowrap; padding: 4px 10px;
  border-radius: var(--radius-pill); background: var(--sheet-bg); color: var(--ruler-ink); box-shadow: var(--shadow-card);
  font: 500 13px/1.3 var(--type); opacity: 0; pointer-events: none; transition: opacity 300ms var(--ease-lfm-out);
}
.ruler-act:hover .ruler-act-l, .ruler-act:focus-visible .ruler-act-l { opacity: 1; }

/* Wide, on a tour: every chapter's name beside its tick, the actions in words. */
@media (min-width: 1100px) {
  html.ruler-labels .ruler-l {
    position: static; translate: none; padding: 0; background: none; box-shadow: none; color: inherit;
    max-width: 104px; opacity: 1; pointer-events: auto;
  }
  html.ruler-labels .ruler-foot { padding-right: 10px; gap: 8px; }
  html.ruler-labels .ruler-foot .site-pay { padding: 8px 14px; }
  html.ruler-labels .ruler-act-icon { display: none; }
  html.ruler-labels .ruler-act-l { position: static; translate: none; padding: 0; background: none; box-shadow: none; color: inherit; font-size: inherit; opacity: 1; white-space: normal; }
  html.ruler-labels .ruler-else { padding: 2px 0; max-width: 128px; text-align: right; font-size: 12px; line-height: 1.3; text-decoration: underline; text-underline-offset: 3px; }
}

/* Phones: no ruler; the tour's top bar stays (site-tour.css). */
@media (max-width: 639px) {
  .ruler { display: none; }
}
@media print {
  .ruler { display: none; }
}
