/* How it works, step 3 · Build it with you: the Work board (milestones as swim lanes, stages as
   columns, Incoming for fixes) with its cards moving across, and the plan revision over it.
   how-ship.css draws the release and Reach live after it. Only tokens. */

.v-work {
  gap: var(--space-3);
  padding-bottom: var(--space-3);
}
.board {
  display: grid;
  align-content: start;
  gap: 6px;
}
.cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-2);
  padding-inline: calc(var(--space-2) + var(--border));
}
.cols span {
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-muted);
}
/* A swim lane: its name and progress on top, its cards across the stages */
.lane {
  display: grid;
  gap: var(--space-1);
  padding: 4px var(--space-2) 6px;
  border-radius: var(--radius-card);
  border: var(--border) solid var(--line);
  background: var(--bg-raised);
}
.lane-h {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  font-size: 13px;
  white-space: nowrap;
}
.lane-h b {
  flex: none;
  max-width: 70%;
  overflow: hidden;
  font-weight: var(--weight-semibold);
  text-overflow: ellipsis;
  color: var(--text-strong);
}
.lane-h > small {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  color: var(--text-muted);
}
.lane-h .swap {
  font-family: var(--font-mono);
}
.lane-p {
  display: block;
  flex: none;
  width: 56px;
  height: 4px;
  margin-inline-start: auto;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--line);
}
.lane-p i {
  display: block;
  width: 60%;
  height: 100%;
  background: var(--ok);
  transition: width 500ms var(--ease-out);
}
.lane:has(.n4.on) .lane-p i {
  width: 80%;
}
.lane:has(.n5.on) .lane-p i {
  width: 100%;
}
.lane-k {
  position: relative;
  height: 78px;
}
.lane-k > .later {
  position: absolute;
  inset: 0 0 auto auto;
  background: var(--surface);
}

/* A card sits in column --c (0 planned to 4 done); its .mN marks move it on as they arrive */
.k {
  --c: 0;
  --n: 0;
  position: absolute;
  inset-block: 0;
  inset-inline-start: calc(var(--c) * (100% + var(--space-2)) / 5);
  display: grid;
  align-content: start;
  width: calc((100% - 4 * var(--space-2)) / 5);
  padding: 5px var(--space-2);
  overflow: hidden;
  line-height: 1.25;
  border-radius: var(--radius-control);
  border: var(--border) solid var(--line);
  background: var(--surface);
}
.hw.js .cw .lane .k {
  transition:
    inset-inline-start 600ms var(--ease-out),
    opacity 350ms var(--ease-out),
    translate 350ms var(--ease-out);
}
.k > i {
  display: none;
}
.k.c1 {
  --c: 1;
}
.k.c2,
.k:has(> .m2.on) {
  --c: 2;
  --n: 1;
}
.k:has(> .m3.on) {
  --c: 3;
  --n: 2;
}
.k:has(> .m4.on) {
  --c: 4;
  --n: 3;
}
.k.fix {
  box-shadow: inset 3px 0 0 var(--info);
}
.k.added {
  box-shadow: inset 3px 0 0 var(--ok);
}
.k b {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: var(--text-strong);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.ks {
  font-size: 13px;
}
.ks em {
  overflow: hidden;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-muted);
}
.ks .ok {
  color: var(--ok);
}
.ks .paused {
  font-weight: var(--weight-semibold);
  color: var(--text-strong);
}

/* The plan revision: what changes, the work already started, and the seal */
.rev-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.rev-h b {
  font-size: 17px;
  font-weight: var(--weight-semibold);
  color: var(--text-strong);
}
.rev-h .sealed {
  margin-inline-start: auto;
}
.rev blockquote {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-inline-start: 3px solid var(--accent);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: var(--bg-raised);
  font-size: 15px;
  color: var(--text-strong);
}
.rev blockquote small,
.rev-ch small,
.started small {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
}
.rev .lbl {
  margin-top: var(--space-1);
}
.rev-ch {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.rev-ch li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-control);
  background: var(--bg-raised);
}
.rev-ch small {
  flex-basis: 100%;
}
.rev-ch b,
.started b {
  font-weight: var(--weight-medium);
  color: var(--text-strong);
}
.started {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-control);
  border: var(--border) solid var(--line);
}
.seg {
  display: inline-flex;
  overflow: hidden;
  border-radius: var(--radius-control);
  border: var(--border) solid var(--line-strong);
}
.seg span {
  padding: 4px 10px;
  border-inline-start: var(--border) solid var(--line);
  font-size: 13px;
  white-space: nowrap;
  transition:
    background var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out);
}
.seg span:first-child {
  border-inline-start: 0;
}
.seg .st.on {
  background: var(--text-strong);
  color: var(--surface);
}
.sheet-act {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

/* Narrower: the board keeps its height by leaving out its line of explanation */
@container (max-width: 960px) {
  .v-work .vw-head small {
    display: none;
  }
}

/* On a phone: the lane's name above its cards, four columns (the prototype's is left out), and a
   card shows only its number */
@container (max-width: 680px) {
  .cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .cols span:nth-child(2),
  .lane-d,
  .k.wide,
  .k b,
  .ks {
    display: none;
  }
  .lane-p {
    display: none;
  }
  .lane-k {
    height: 32px;
  }
  .lane-k > .later {
    inset: auto 0 0 auto;
  }
  .k {
    inset-inline-start: calc(var(--n) * (100% + var(--space-2)) / 4);
    width: calc((100% - 3 * var(--space-2)) / 4);
    padding: 4px var(--space-2);
  }
  .rev-ch li:nth-child(2),
  .rev blockquote small,
  .rev .lbl {
    display: none;
  }
  .sheet {
    padding: var(--space-4);
  }
}
