/* The tracker ("One prescription"), shared. Home, Medical Cannabis and
   Enterprise carry the same section: markup in lab/shared/ui/relay.html, the
   rig in lab/homelab/relay.js, which also pins the section and fits the frame.
   Moved out of Home on 15 October so the three pages cannot drift apart.
   Page tokens used: --navy, --on, --pin-top, --pad-x, --violet-soft, --label,
   --sec-top, --sec-bot. */
.works { position: relative; background: var(--navy); color: var(--on); padding: var(--sec-top, clamp(72px, 12vh, 140px)) 0 var(--sec-bot, clamp(72px, 12vh, 140px)); }
.works-head { max-width: 1000px; margin: 0 auto clamp(26px, 4vh, 54px); }
/* no word left alone on the heading's last line ("one." at 1536) */
.works-head h2 { text-wrap: balance; }
/* 15 October, the owner: the heading looked "off centre and maybe a bit
   small". It sat in a fixed 1000px column while the frame under it narrowed
   to fit the window, so the two left edges disagreed. The heading now takes
   the frame's own width (relay.js sets --relay-w) and is set larger. */
.works.pinned .works-head { max-width: var(--relay-w, 1000px); }
.works .works-head h2.sec { font-size: clamp(34px, 3.6vw, 58px); line-height: 1.04; letter-spacing: -0.04em; }
.works.pinned { padding: 0; }
.works.pinned .works-run { height: calc(100svh - var(--pin-top) + 50svh); }
.works.pinned .works-stage { position: sticky; top: var(--pin-top); height: calc(100svh - var(--pin-top)); display: flex; flex-direction: column;
  padding: clamp(28px, 7vh, 72px) 0 clamp(20px, 4vh, 44px); overflow: hidden; }
.works.pinned .works-head { flex: none; margin-bottom: clamp(14px, 2.4vh, 30px); width: 100%; }
/* 14 October: on a laptop's shorter window the heading and its space took the
   height the scenes needed, and the frame showed only the bottom band of each
   photograph. There the heading is smaller and sits higher. */
@media (min-width: 861px) and (max-height: 860px) {
  .works.pinned .works-stage { padding-top: clamp(16px, 3.2vh, 32px); }
  .works.pinned .works-head h2.sec { font-size: clamp(32px, 6.2vh, 54px); }
}
.works.pinned .relay-world { flex: 1 1 auto; min-height: 0; width: 100%; }
.works.pinned .relay-frame { flex: 1 1 auto; height: auto; min-height: 200px; max-height: 660px; }
.relay-world { max-width: 1000px; margin: 0 auto; padding: 0 var(--pad-x); display: flex; flex-direction: column; opacity: 0; transition: opacity 0.7s ease; }
.relay-world.relay-world-in { opacity: 1; }
.relay-world.relay-world-off { display: none; }
.relay-trackline { flex: none; position: relative; }
.relay-trackline canvas { display: block; width: 100%; height: 56px; }
.relay-frame { position: relative; height: min(68svh, 660px); overflow: hidden; border-radius: 22px; background: #0b0d1c; }
.relay-frame canvas { position: absolute; left: 0; top: 0; display: block; max-width: none; }
/* 28 September, the owner: the five states on the tracker, each under its
   mark: the one in play in cream and larger, the ones passed in violet, the
   ones to come dim. On a phone only the one in play shows, large, with its count. */
.relay-steps { position: relative; list-style: none; margin: 10px 0 20px; padding: 0; height: 28px; }
.relay-steps li { position: absolute; top: 0; white-space: nowrap; font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em;
  color: rgb(245 247 250 / 0.4); transition: color .35s ease, transform .35s ease; }
.relay-steps li:nth-child(1) { left: 0; }
.relay-steps li:nth-child(2) { left: 25%; transform: translateX(-50%); }
.relay-steps li:nth-child(3) { left: 50%; transform: translateX(-50%); }
.relay-steps li:nth-child(4) { left: 75%; transform: translateX(-50%); }
.relay-steps li:nth-child(5) { right: 0; }
.relay-steps li.done { color: var(--violet-soft); }
/* 15 October, the owner: at his laptop's size the name in play ran into its
   neighbours. Smaller names, and a smaller step up for the one in play. */
.relay-steps li.now { color: var(--on); font-size: 18.5px; top: -2px; }
/* the run now rests on its last state, where the larger last name met the
   fourth: the fourth steps aside while the last is live */
.relay-steps.at-end li:nth-child(4) { transform: translateX(calc(-50% - 26px)); }
.relay-count { display: none; }
.relay-label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 860px) {
  .relay-steps { height: auto; margin: 6px 0 14px; padding-right: 64px; }
  .relay-steps li { display: none; position: static; transform: none !important; }
  .relay-steps li.now { display: block; font-size: 21px; letter-spacing: -0.02em; }
  .relay-count { display: block; position: absolute; right: 0; bottom: 20px; margin: 0; font-family: var(--label); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0; font-size: 14px; color: rgb(245 247 250 / 0.6); }
  .relay-frame { height: min(54svh, 460px); border-radius: 16px; }
  .relay-trackline canvas { height: 46px; }
  .works { padding-top: 64px; }
}
/* The relay at rest: the five worlds as stills on one line. Shown when the
   rig cannot run, without script, and under reduced motion. */
.relay-rest { display: none; }
.relay-world.relay-world-off + .relay-rest, .relay-world.relay-late + .relay-rest,
html:not(.js) .relay-rest { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; list-style: none; max-width: 1000px; margin: 0 auto; padding: 0 var(--pad-x); }
.relay-rest li { margin: 0; }
.relay-rest img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; background: #0b0d1c; }
.relay-rest span { display: block; margin-top: 10px; font-family: var(--label); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0; font-size: 14px; color: var(--on); }
.relay-world.relay-late { display: none; }
html:not(.js) .relay-world { display: none; }
@media (prefers-reduced-motion: reduce) {
  .relay-world { display: none; }
  .relay-rest { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; list-style: none; max-width: 1000px; margin: 0 auto; padding: 0 var(--pad-x); }
}
@media (max-width: 860px) {
  .relay-world.relay-world-off + .relay-rest, .relay-world.relay-late + .relay-rest, html:not(.js) .relay-rest { grid-template-columns: 1fr; gap: 20px; }
  .relay-rest span { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 860px) { .relay-rest { grid-template-columns: 1fr; gap: 20px; } }

