/*
 * busywork: systems and automation (bone field).
 *
 * The console is an app window drawn in HTML: a side bar, a pipeline with one lead on
 * it, the workflow's steps as nodes on a line, a panel for whatever the current step
 * produced, and an activity feed.
 *
 * The stylesheet's own default is the finished console: with no script it is complete,
 * and nothing here is ever hidden waiting for one.
 *
 * Two ways of moving it, and they never mix:
 *   The scroll (busywork.js, when motion is on). The page's position is the playhead.
 *   The script takes over the lead's column (--col), how far the workflow has run
 *   (--at), each panel and the parts inside it, and adds .is-scroll to the console,
 *   which switches every CSS transition on those off so nothing lags behind the scroll.
 *   The layout that holds the console in place while that happens is at the foot of
 *   this file, under html.motion-ready, so it is in place from first paint.
 *   A chosen step (reduced motion). Classes only (is-done, is-current, is-on) and the
 *   two custom properties, with the short transitions written beside each rule.
 *
 * What moves is transform and opacity.
 */

.busywork {
  --os-bg: var(--paper-hi);
  --os-line: var(--rule-c);
  --os-soft: var(--ink-soft);
  --os-fill: #EDEBE4;
  position: relative;
  overflow-x: clip;
  padding-block: var(--section-y);
}

/* ---------- intro ---------- */

.busywork__eyebrow { margin-bottom: 20px; }
.busywork__title { max-width: 13ch; }
.busywork__line { margin-top: 22px; max-width: 40ch; }

/* ---------- the console ---------- */

.bw-os {
  margin-top: clamp(40px, 6vw, 84px);
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: var(--os-bg);
  box-shadow: 0 1px 0 rgba(17, 17, 16, .06), 0 50px 90px -50px rgba(17, 17, 16, .45);
  /* clip, not hidden: hidden would make the console a scroll container, and the panel
     could not then be held against the page on a phone. hidden is the older fallback. */
  overflow: hidden;
  overflow: clip;
}
.bw-os__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px 10px 6px 14px;
  border-bottom: 1px solid var(--os-line);
  background: var(--os-fill);
}
.bw-os__dots { display: flex; gap: 6px; flex: none; }
.bw-os__dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--stone); }
.bw-os__title {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 92%;
  font-size: .9375rem;
  letter-spacing: -0.01em;
}
.bw-os__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--os-soft);
  line-height: 1.3;
  text-align: right;
}
.bw-os__label::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime-deep);
  box-shadow: 0 0 0 1px var(--ink);
}
.bw-os__bar { position: relative; }
/* The time on the example's own clock: it follows the step the scroll has reached. */
.bw-os__clock {
  flex: none;
  min-width: 6.2em;
  padding: 6px 10px 5px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 88%;
  font-size: .8125rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}
/* How far through the story the scroll is: a line along the foot of the title bar. */
.bw-os__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
}
.bw-os__progress i {
  display: block;
  height: 100%;
  background: var(--ink);
  transform-origin: 0 50%;
}

.bw-os__body { display: grid; grid-template-columns: minmax(0, 1fr); }

/* side bar (desktop only) */
.bw-nav { display: none; }

/* ---------- pipeline ---------- */

.bw-main { display: flex; flex-direction: column; min-width: 0; padding: 14px 14px 16px; }
.bw-pipe {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 6px;
  /* A size container: the lead's travel is written in its inline size. */
  container-type: inline-size;
}
.bw-pipe__col {
  min-height: 92px;
  padding: 8px 8px 0;
  border-radius: 6px;
  background: var(--os-fill);
  transition: background-color .4s var(--ease-soft);
}
.bw-pipe__col.is-here { background: #E3E1D8; }
.bw-pipe__name { font-size: .6875rem; color: var(--os-soft); }
.bw-lead {
  position: absolute;
  left: 0;
  bottom: 8px;
  width: calc((100% - (var(--cols) - 1) * 6px) / var(--cols));
  padding: 0 6px;
  /* One column plus one gap, per step across. */
  transform: translateX(calc(var(--col) * ((100cqi - (var(--cols) - 1) * 6px) / var(--cols) + 6px)));
}
.bw-lead::before {
  content: '';
  position: absolute;
  inset: 0 6px;
  z-index: -1;
  border-radius: 5px;
  border: 1px solid var(--ink);
  background: #fff;
  box-shadow: 0 6px 12px -8px rgba(17, 17, 16, .5);
}
.bw-lead { isolation: isolate; }
.bw-lead__name,
.bw-lead__need {
  display: block;
  padding-inline: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bw-lead__name {
  padding-top: 7px;
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 92%;
  font-size: .8125rem;
  line-height: 1.2;
}
.bw-lead__need { padding-bottom: 7px; font-size: .6875rem; line-height: 1.3; color: var(--os-soft); }

/* Before the run starts there is no lead yet, and the panel waits. */
.bw-lead { transition: transform .7s var(--ease-out), opacity .3s var(--ease-soft); }
.bw-os.is-empty .bw-lead { opacity: 0; }
.bw-os.is-empty .bw-flow__pulse,
.bw-os.is-empty .bw-flow__done { opacity: 0; }
.bw-flow__pulse, .bw-flow__done { transition: transform .7s var(--ease-out), opacity .3s var(--ease-soft); }

/* ---------- workflow strip ---------- */

.bw-flow {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 6px 0;
  /* the line runs between the centres of the first and last node */
  --node: 30px;
}
.bw-flow__track {
  position: absolute;
  left: calc(var(--node) / 2);
  right: calc(var(--node) / 2);
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--os-line);
  container-type: inline-size;
}
.bw-flow__done,
.bw-flow__pulse { position: absolute; top: 0; left: 0; display: block; }
.bw-flow__done {
  width: 100%;
  height: 100%;
  background: var(--ink);
  transform: scaleX(calc(var(--at) / var(--n)));
  transform-origin: 0 50%;
  transition: transform .7s var(--ease-out);
}
.bw-flow__pulse {
  width: 12px;
  height: 12px;
  margin: -5px 0 0 -6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 6px rgba(228, 255, 26, .35);
  transform: translateX(calc(var(--at) / var(--n) * 100cqi));
  transition: transform .7s var(--ease-out);
  z-index: 2;
}
.bw-flow__node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--node);
  height: var(--node);
  border-radius: 50%;
  border: 1.5px solid var(--os-line);
  background: var(--os-bg);
  color: var(--stone);
  transition: border-color .35s var(--ease-soft), color .35s var(--ease-soft), background-color .35s var(--ease-soft);
}
.bw-flow__node svg { width: 15px; height: 15px; }
.bw-flow__node.is-done { border-color: var(--ink); color: var(--ink); }
.bw-flow__node.is-current { background: var(--ink); border-color: var(--ink); color: var(--lime); }

/* ---------- the panel: what the step produced ---------- */

.bw-os.is-empty .bw-panels::after {
  content: 'Waiting for an enquiry';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: .875rem;
  color: var(--stone);
}
.bw-panels {
  position: relative;
  flex: 1 1 auto;
  margin-top: 18px;
  min-height: 236px;
  border: 1px solid var(--os-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.bw-p {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s var(--ease-soft), transform .45s var(--ease-out), visibility 0s linear .3s;
}
.bw-p.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .35s var(--ease-soft) .08s, transform .5s var(--ease-out) .08s, visibility 0s;
}
.bw-p__kick {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 75%;
  font-size: .6875rem;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--os-soft);
}
.bw-p__kick span { font-variant-numeric: tabular-nums; }
.bw-p__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: .8125rem;
  line-height: 1.3;
  color: var(--os-soft);
}
.bw-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--cobalt); }

/* fields (the form, the contact record) */
.bw-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 0; }
.bw-fields dt {
  font-size: .6875rem;
  line-height: 1.2;
  color: var(--os-soft);
}
.bw-fields dd {
  margin: 3px 0 0;
  padding: 7px 9px;
  border: 1px solid var(--os-line);
  border-radius: 4px;
  font-size: .8125rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bw-fields--rows { grid-template-columns: minmax(0, 1fr); gap: 0; }
.bw-fields--rows > div { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-top: 1px solid var(--os-line); }
.bw-fields--rows dt { font-size: .8125rem; }
.bw-fields--rows dd { margin: 0; padding: 0; border: 0; text-align: right; }

.bw-card { display: flex; align-items: center; gap: 12px; }
.bw-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--f-display);
  font-weight: 800;
  font-size: .875rem;
}
.bw-card__name { font-family: var(--f-display); font-weight: 800; font-stretch: 92%; font-size: 1rem; line-height: 1.1; }
.bw-tags { display: flex; gap: 6px; margin-top: 6px; }
.bw-tags span {
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--os-line);
  font-size: .6875rem;
  line-height: 1.2;
}
.bw-tags span:first-child { background: var(--lime); border-color: var(--ink); }

/* the lead check */
.bw-ticks { display: grid; gap: 9px; }
.bw-ticks li { display: flex; align-items: center; gap: 10px; font-size: .875rem; line-height: 1.3; }
.bw-ticks svg {
  flex: none;
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
}
.bw-verdict {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin-top: auto;
  padding: 8px 12px 8px 10px;
  border-radius: 999px;
  background: var(--lime);
  border: 1px solid var(--ink);
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 88%;
  font-size: .875rem;
  line-height: 1;
}
.bw-verdict svg { width: 16px; height: 16px; }

/* the reply */
.bw-bubble {
  align-self: flex-end;
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 14px 14px 3px 14px;
  background: var(--cobalt);
  color: #fff;
  font-size: .875rem;
  line-height: 1.4;
}
.bw-bubble--link {
  margin-top: -6px;
  padding: 7px 13px;
  border-radius: 14px 3px 14px 14px;
  background: var(--paper);
  color: var(--cobalt);
  border: 1px solid var(--cobalt);
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 88%;
}

/* the calendar */
.bw-cal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.bw-cal__day { display: grid; gap: 4px; }
.bw-cal__day span {
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 75%;
  font-size: .6875rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--os-soft);
}
.bw-cal__day i { display: block; height: 20px; border-radius: 3px; background: var(--os-fill); }
.bw-cal__day.is-pick span { color: var(--ink); }
.bw-cal__day .bw-cal__slot { background: var(--lime); box-shadow: 0 0 0 1px var(--ink); }
.bw-booked {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: auto;
  font-size: .875rem;
  line-height: 1.3;
}
.bw-booked svg { width: 17px; height: 17px; flex: none; }
.bw-booked b { font-family: var(--f-display); font-weight: 800; font-stretch: 88%; }

/* the quote */
.bw-doc { padding: 12px 12px 6px; border: 1px solid var(--os-line); border-radius: 4px; }
.bw-doc__to { font-family: var(--f-display); font-weight: 800; font-stretch: 92%; font-size: .875rem; line-height: 1; }
.bw-doc__lines { margin-top: 10px; }
.bw-doc__lines li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-top: 1px solid var(--os-line);
  font-size: .8125rem;
  line-height: 1.2;
}
/* An amount is a bar, not a number: this is a drawing of a quote, not a price list. */
.bw-doc__lines i { display: block; width: 46px; height: 7px; border-radius: 2px; background: var(--sand); }
.bw-doc__lines li:nth-child(2) i { width: 62px; }
.bw-review { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: auto; }
.bw-review__btn {
  padding: 8px 13px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 88%;
  font-size: .8125rem;
  line-height: 1;
}
.bw-review__note { font-size: .8125rem; color: var(--os-soft); }

/* the follow-up task */
.bw-task { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--os-line); border-radius: 6px; font-size: .8125rem; line-height: 1.35; color: var(--os-soft); }
.bw-task b { display: block; font-family: var(--f-display); font-weight: 800; font-stretch: 92%; font-size: .9375rem; line-height: 1.2; color: var(--ink); }
.bw-task__box { flex: none; width: 18px; height: 18px; margin-top: 1px; border: 1.5px solid var(--ink); border-radius: 4px; }

/* The parts of a panel arrive one after another each time it comes on. */
@keyframes bw-arrive { from { opacity: 0; transform: translateY(8px); } }
@keyframes bw-pop { from { opacity: 0; transform: scale(.82); } }
.bw-p.is-on .bw-fields > div,
.bw-p.is-on .bw-ticks li,
.bw-p.is-on .bw-doc__lines li,
.bw-p.is-on .bw-cal__day { animation: bw-arrive .45s var(--ease-out) backwards; }
.bw-p.is-on :is(.bw-fields > div, .bw-ticks li, .bw-doc__lines li, .bw-cal__day):nth-child(1) { animation-delay: .16s; }
.bw-p.is-on :is(.bw-fields > div, .bw-ticks li, .bw-doc__lines li, .bw-cal__day):nth-child(2) { animation-delay: .24s; }
.bw-p.is-on :is(.bw-fields > div, .bw-ticks li, .bw-doc__lines li, .bw-cal__day):nth-child(3) { animation-delay: .32s; }
.bw-p.is-on :is(.bw-fields > div, .bw-ticks li, .bw-doc__lines li, .bw-cal__day):nth-child(4) { animation-delay: .40s; }
.bw-p.is-on :is(.bw-fields > div, .bw-ticks li, .bw-doc__lines li, .bw-cal__day):nth-child(5) { animation-delay: .48s; }
.bw-p.is-on .bw-bubble { animation: bw-pop .4s var(--ease-out) .2s backwards; transform-origin: 100% 100%; }
.bw-p.is-on .bw-bubble--link { animation-delay: .55s; }
.bw-p.is-on :is(.bw-verdict, .bw-booked, .bw-review, .bw-p__foot, .bw-card, .bw-task) { animation: bw-arrive .45s var(--ease-out) .5s backwards; }
.bw-p.is-on .bw-card { animation-delay: .14s; }
.bw-p.is-on .bw-task { animation-delay: .18s; }
.bw-p.is-on .bw-cal__slot { animation: bw-pop .4s var(--ease-out) .62s backwards; }

/* ---------- the feed: the story in words, and the way to choose a step ---------- */

.bw-feed {
  margin: 0;
  padding: 4px 8px 10px;
  border-top: 1px solid var(--os-line);
  list-style: none;
}
.bw-feed__row { position: relative; }
.bw-feed__btn {
  position: relative;
  display: grid;
  grid-template-columns: 5.4em minmax(0, 1fr);
  gap: 2px 10px;
  width: 100%;
  padding: 10px 8px 10px 22px;
  border-radius: 6px;
  text-align: left;
  transition: background-color .2s var(--ease-soft), opacity .3s var(--ease-soft);
}
.bw-feed__btn::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--stone);
  background: var(--os-bg);
  transition: background-color .3s var(--ease-soft), border-color .3s var(--ease-soft);
}
.bw-feed__row.is-done .bw-feed__btn::before { background: var(--ink); border-color: var(--ink); }
.bw-feed__row.is-current .bw-feed__btn::before { background: var(--lime); border-color: var(--ink); }
.bw-feed__btn:hover { background: var(--os-fill); }
.bw-feed__row.is-current .bw-feed__btn { background: var(--os-fill); }
.bw-feed__time {
  font-size: .75rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  color: var(--os-soft);
  white-space: nowrap;
}
.bw-feed__title {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 92%;
  font-size: .9375rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.bw-feed__detail { grid-column: 2; font-size: .8125rem; line-height: 1.4; color: var(--os-soft); }
/* A step that has not happened yet is there, but quiet (busywork.js takes is-done away while it plays). */
.bw-feed__row:not(.is-done) .bw-feed__btn { opacity: .38; }
.bw-feed__row { transition: opacity .3s var(--ease-soft); }

/* ---------- the close ---------- */

.busywork__close { margin-top: clamp(56px, 8vw, 120px); }
.busywork__close-grid { row-gap: 44px; align-items: start; }
.busywork__ai-col { grid-column: 1 / -1; }
.busywork__ai {
  font-family: var(--f-display);
  font-weight: 900;
  font-stretch: 100%;
  font-size: clamp(2rem, 1rem + 3.4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.045em;
  max-width: 13ch;
}
.busywork__close-cta { margin-top: 20px; }
.busywork__also { grid-column: 1 / -1; }
.busywork__also-intro { margin-bottom: 12px; }
.busywork__tally { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.busywork__tally-row {
  display: grid;
  grid-template-columns: 2.6em minmax(0, 1fr);
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-c);
}
.busywork__tally-row:last-child { border-bottom-color: var(--rule); }
.busywork__tally-num { color: var(--ink-soft); }
.busywork__tally-name { font-size: var(--fs-body); line-height: 1.3; }

/* ---------- tablet ---------- */

@media (min-width: 768px) {
  .bw-main { padding: 18px 18px 20px; }
  .bw-pipe { gap: 8px; }
  .bw-pipe__col { min-height: 104px; padding: 10px 10px 0; }
  .bw-lead { width: calc((100% - (var(--cols) - 1) * 8px) / var(--cols)); padding: 0 8px; bottom: 10px;
    transform: translateX(calc(var(--col) * ((100cqi - (var(--cols) - 1) * 8px) / var(--cols) + 8px))); }
  .bw-lead::before { inset: 0 8px; }
  .bw-lead__name { font-size: .875rem; }
  .bw-lead__need { font-size: .75rem; }
  .bw-flow { --node: 36px; margin: 22px 10px 0; }
  .bw-flow__node svg { width: 17px; height: 17px; }
  .bw-panels { min-height: 232px; }
  .bw-p { padding: 20px 22px 18px; }
  .bw-os__body { grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); }
  .bw-feed { border-top: 0; border-left: 1px solid var(--os-line); padding: 10px 10px 14px; align-self: stretch; }
  .busywork__ai-col { grid-column: 1 / span 4; }
  .busywork__also { grid-column: 5 / -1; }
}

/* ---------- desktop: side bar, main, feed ---------- */

@media (min-width: 1024px) {
  .bw-os__body { grid-template-columns: 172px minmax(0, 1fr) minmax(0, 21.5rem); }
  .bw-nav {
    display: block;
    margin: 0;
    padding: 14px 10px;
    border-right: 1px solid var(--os-line);
    background: var(--os-fill);
    list-style: none;
  }
  .bw-nav__item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: .875rem;
    line-height: 1;
    color: var(--os-soft);
    transition: background-color .3s var(--ease-soft), color .3s var(--ease-soft);
  }
  .bw-nav__item svg { width: 17px; height: 17px; flex: none; }
  .bw-nav__item.is-on { background: var(--ink); color: var(--paper); }
  .bw-nav__item.is-on svg { color: var(--lime); }
  .bw-main { padding: 22px 24px 24px; }
  .bw-panels { min-height: 224px; }
  .bw-p { padding: 22px 26px 20px; }
  /* The panel is wide here; its contents keep to a readable measure inside it. */
  .bw-p > * { max-width: 520px; }
  .bw-p > .bw-p__kick { max-width: none; }
  .bw-fields dd { font-size: .875rem; }
  .bw-feed__btn { padding-block: 9px; }
  .busywork__ai-col { grid-column: 1 / span 6; }
  .busywork__also { grid-column: 8 / -1; }
}
@media (min-width: 1280px) {
  .bw-os__body { grid-template-columns: 196px minmax(0, 1fr) minmax(0, 24rem); }
  .bw-panels { min-height: 230px; }
}

/* Phones: the title bar is tight, so the example label takes its own line. */
@media (max-width: 599px) {
  .bw-os__bar { flex-wrap: wrap; row-gap: 2px; padding-block: 8px; }
  .bw-os__label { order: 3; flex-basis: 100%; margin-left: 0; justify-content: flex-start; text-align: left; }
  .bw-os__clock { margin-left: auto; }
  .bw-pipe__name { font-size: .6875rem; letter-spacing: .02em; }
  .bw-lead__need { display: none; }
  .bw-lead__name { padding-block: 8px; font-size: .75rem; }
}

/* The narrowest phones: a pipeline column is under 60px, so the lead's name gives up
   some padding and a little size to stay whole. */
@media (max-width: 359px) {
  .bw-lead__name { padding-inline: 4px; font-size: .6875rem; text-align: center; }
}

/* =====================================================================
   The scroll-driven console (busywork.js)
   ===================================================================== */

/* ---------- while the script is driving: nothing may lag behind the scroll ---------- */

.bw-os.is-scroll .bw-lead,
.bw-os.is-scroll .bw-flow__pulse,
.bw-os.is-scroll .bw-flow__done,
.bw-os.is-scroll .bw-p { transition: none; }
.bw-os.is-scroll .bw-p,
.bw-os.is-scroll .bw-p * { animation: none !important; }
/* The waiting note fades instead of blinking as the first step arrives or is undone. */
.bw-os.is-scroll .bw-panels::after {
  content: 'Waiting for an enquiry';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: .875rem;
  color: var(--stone);
  opacity: 0;
  transition: opacity .25s var(--ease-soft);
  pointer-events: none;
}
.bw-os.is-scroll.is-empty .bw-panels::after { opacity: 1; }
.bw-os.is-scroll .bw-feed__btn { cursor: pointer; }

/* ---------- from 768px: the whole console is held while the page scrolls the story ---------- */

@media (min-width: 768px) {
  /* The distance the page travels while the console is held. A real element's height
     (the ::after), so the page is its true length from first paint. */
  html.motion-ready .busywork:not(.motion-failed) .bw-run:not(.bw-run--flow)::after {
    content: '';
    display: block;
    /* Capped, so a tall tablet does not have to scroll further per step than a laptop does. */
    height: var(--bw-travel, min(200vh, 1900px));
  }
  html.motion-ready .busywork:not(.motion-failed) .bw-run:not(.bw-run--flow) .bw-os {
    position: sticky;
    /* Centred in the space under the header; never tucked up under it. */
    top: max(calc(var(--header-h) + 16px), calc((100vh + var(--header-h) - var(--bw-os-h, 560px)) / 2));
  }
}

/* ---------- phones: the pipeline and the panel are held, the feed scrolls up under them ---------- */

@media (max-width: 767px) {
  html.motion-ready .busywork:not(.motion-failed) .bw-os__body { display: block; }
  html.motion-ready .busywork:not(.motion-failed) .bw-main {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--os-bg);
    border-bottom: 1px solid var(--os-line);
    box-shadow: 0 16px 18px -18px rgba(17, 17, 16, .5);
    transition: top .4s var(--ease-out);
  }
  /* The header comes back when the page is scrolled up (chrome.js): make room for it. */
  html.motion-ready:not(.header-away) .busywork:not(.motion-failed) .bw-main { top: var(--header-h); }
  html.motion-ready .busywork:not(.motion-failed) .bw-feed { border-top: 0; padding: 10px 8px 14px; }
  /* Each row is one step of scrolling: tall enough for its step to be watched. */
  html.motion-ready .busywork:not(.motion-failed) .bw-feed__row { min-height: clamp(116px, 18svh, 152px); }
  /* The rail that joins the steps. */
  html.motion-ready .busywork:not(.motion-failed) .bw-feed__row:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 30px;
    bottom: -12px;
    width: 1.5px;
    background: var(--os-line);
  }
  html.motion-ready .busywork:not(.motion-failed) .bw-feed__row.is-done:not(.is-current)::after { background: var(--ink); }
  html.motion-ready .busywork:not(.motion-failed) .bw-feed__btn::before { z-index: 1; }
}
/* Short phones: the held part gives up some height so the step under it stays in view. */
@media (max-width: 767px) and (max-height: 720px) {
  html.motion-ready .busywork:not(.motion-failed) .bw-pipe__col { min-height: 74px; }
  html.motion-ready .busywork:not(.motion-failed) .bw-panels { min-height: 208px; margin-top: 14px; }
  html.motion-ready .busywork:not(.motion-failed) .bw-flow { margin-top: 14px; }
  html.motion-ready .busywork:not(.motion-failed) .bw-main { padding-block: 10px 12px; }
}
