/* Scale — the story under the headline of the home page (index.html), loaded after site.css.
   A white sheet with three bands: the caption, the scene area on the canvas colour, and the controls.
   assets/story.js builds the stage and plays it; without script (or without GSAP: .is-static) the ordered list
   in the page shows instead, as a numbered list in the same sheet.

   The scenes are authored in a fixed design box that one transform scales to the scene area:
   960 × 400 in a container of 800px or more (.is-wide), 326 × 360 below that (.is-tall). Sizes inside
   .story-box are box units, not screen pixels. Wide is written first; .is-tall rules follow each scene. */

.story {
  --story-head: 66px;
  --story-foot: 46px;
  --story-forecast: #2F8F62;     /* DESIGN.md: charts only */
  --story-comparison: #9A9DA3;
  --story-grid: #ECECE7;
  --story-cell: color-mix(in srgb, var(--faint) 72%, var(--sheet));
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 32px auto 0;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(23, 23, 23, .04), 0 10px 24px -14px rgba(23, 23, 23, .16);
  text-align: left;
}

@media (max-width: 359px) {
  .story { --story-head: 86px; }
}

/* 870px of window is 800px of container inside .wrap: the wide box from here up. Narrower than that its type
   would scale below 11px, so a tablet in portrait gets the tall box, at most 460px wide and centred. */
@media (min-width: 870px) {
  .story { --story-head: 56px; --story-foot: 48px; max-width: none; margin-top: 36px; }
}

@media (min-width: 721px) {
  .story { width: min(calc(1025 * var(--u)), 100%); margin-top: calc(36 * var(--u)); }
}

/* the box the script chose wins over the guess made from the window */
.story.is-wide { --story-head: 56px; --story-foot: 48px; }
.story.is-tall { --story-head: 66px; --story-foot: 46px; }
@media (max-width: 359px) {
  .story.is-tall { --story-head: 86px; }
}

/* ---------- without script: the list, as it is ---------- */
.story-steps {
  counter-reset: story;
  padding: 8px 22px;
}
.story-steps li {
  counter-increment: story;
  display: grid;
  grid-template-columns: 26px 128px minmax(0, 1fr);
  column-gap: 12px;
  align-items: baseline;
  padding: 11px 0;
  border-top: 1px solid var(--rule);
  font-size: 15.5px;
  line-height: 1.45;
}
.story-steps li:first-child { border-top: 0; }
.story-steps li::before {
  content: counter(story);
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.story-steps b { font-weight: 600; }
.story-steps span { color: var(--ink-2); }

@media (max-width: 869px) {
  .story-steps { padding: 6px 16px; }
  .story-steps li { grid-template-columns: 22px minmax(0, 1fr); }
  .story-steps span { grid-column: 2; }
}

/* ---------- with script: the stage's size is held from the first paint, the list is out of sight ---------- */
.js .story:not(.is-static) .story-steps {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.js .story:not(.is-static):not(.is-built)::before {
  content: "";
  display: block;
  padding-top: calc(var(--story-head) + var(--story-foot) + 100% * 360 / 326);
}
@media (min-width: 870px) {
  .js .story:not(.is-static):not(.is-built)::before {
    padding-top: calc(var(--story-head) + var(--story-foot) + 100% * 400 / 960);
  }
}

/* ---------- the stage ---------- */
.story-stage {
  -webkit-user-select: none;
  user-select: none;
}

/* head: the current step's caption, and "3 of 10" */
.story-head {
  position: relative;
  height: var(--story-head);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.story-cap {
  position: absolute;
  inset: 0 20px 0 22px;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--display);
  font-weight: 650;
  font-size: max(15.5px, calc(19.5px * var(--story-s, 1)));
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  visibility: hidden;
}
.story-cap-t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.story-count {
  flex: none;
  font-family: var(--font);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* narrow: up to two lines, the count floated into the first */
.is-tall .story-cap {
  display: block;
  inset: 12px 14px 0 16px;
  font-size: 16.5px;
  line-height: 21px;
}
.is-tall .story-cap-t { display: inline; overflow: visible; white-space: normal; }
.is-tall .story-count { float: right; margin-left: 14px; font-size: 13px; line-height: 21px; }
@media (max-width: 359px) {
  .is-tall .story-cap { font-size: 15.5px; }
}

/* scene area */
.story-scene {
  position: relative;
  overflow: hidden;
  background: var(--canvas);
  aspect-ratio: 326 / 360;
}
.is-wide .story-scene { aspect-ratio: 960 / 400; }

/* foot: play or pause, ten steps, the tag */
.story-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--story-foot);
  padding: 0 14px 0 9px;
  border-top: 1px solid var(--rule);
}
.story-play {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 140ms var(--ease);
}
.story-play:hover { background: var(--wash); }
.story-play:active { background: var(--wash-2); }
.story-play:focus-visible { border-radius: 8px; }
.story-play .i { width: 16px; height: 16px; stroke-width: 2; }
.story-play .story-i-play { fill: currentColor; }
.story-play[aria-pressed="true"] .story-i-play,
.story-play[aria-pressed="false"] .story-i-pause { display: none; }

.story-segs {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 4px;
}
.story-seg {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.story-seg > span {
  position: relative;
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--rule-2);
  overflow: hidden;
}
.story-seg:hover > span { background: var(--faint); }
.story-seg i {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.story-tag {
  flex: none;
  height: 22px;
  padding: 0 8px;
  border-radius: 5px;
  background: var(--wash-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 550;
  line-height: 22px;
  white-space: nowrap;
}

.is-tall .story-foot { gap: 9px; padding: 0 10px 0 6px; }
.is-tall .story-segs { gap: 3px; }

/* ---------- the design box ---------- */
.story-box {
  position: absolute;
  left: 0; top: 0;
  width: 326px; height: 360px;
  transform-origin: 0 0;
  font: 400 14px/1.4 var(--font);
  letter-spacing: -0.004em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.is-wide .story-box { width: 960px; height: 400px; }

.sc { position: absolute; inset: 0; visibility: hidden; }
.sc.is-on .wc, .story[data-step="2"] .st-goal { will-change: transform, opacity; }

.story-box .i { width: 16px; height: 16px; }

.st-label {
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
  color: var(--muted);
  white-space: nowrap;
}
.st-person {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--person-1);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}
.st-person.p2 { background: var(--person-2); }
.st-person.p4 { background: var(--person-4); }
.st-agent {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  flex: none;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
}
.story-box .st-agent .i { width: 15px; height: 15px; }
.st-tile { display: block; width: 28px; height: 28px; flex: none; }
.st-who { display: flex; align-items: center; gap: 9px; height: 28px; font-size: 14px; }
.st-who b { font-weight: 600; }
.st-sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; }
/* a sheet that was another sheet a moment ago: story.js scales it from that sheet's rectangle */
.st-frame {
  position: absolute;
  transform-origin: 0 0;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.st-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.st-wires path { fill: none; stroke: var(--rule-2); stroke-width: 1.5; stroke-dasharray: 1; }
.st-wires circle { fill: var(--ink); }
.story-box .st-tick { stroke-dasharray: 22 30; }   /* a tick drawn by its dash offset */

/* the goal, pinned from step 2 to step 9 */
.st-goal {
  position: absolute;
  left: 16px; top: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px 0 9px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  background: var(--sheet);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.story-box .st-goal .i { width: 14px; height: 14px; color: var(--ink-2); }

.is-tall .st-label { font-size: 12px; }
.is-tall .st-who { font-size: 13px; }
.is-tall .st-goal { left: 10px; top: 10px; height: 26px; padding: 0 10px 0 8px; gap: 6px; font-size: 12px; }

/* ---------- 1 · Goal ---------- */
.s1-composer {
  position: absolute;
  left: 230px; top: 214px;
  width: 500px; height: 76px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: var(--sheet);
  border: 1px solid var(--accent);
  border-radius: 14px;
  box-shadow: 0 0 0 3px var(--tint-2);   /* the field has the focus */
}
.s1-composer .st-person { width: 36px; height: 36px; font-size: 13px; }
.s1-field { display: grid; gap: 2px; min-width: 0; }
.s1-line {
  position: relative;
  height: 26px;
  font-size: 19px;
  line-height: 26px;
  letter-spacing: -0.012em;
  white-space: nowrap;
}
.s1-caret {
  display: inline-block;
  width: 2px; height: 22px;
  margin-left: 1px;
  border-radius: 1px;
  background: var(--accent);
  vertical-align: -4px;
}
.s1-caret-0 { position: absolute; left: 0; top: 2px; margin: 0; }
.s10-ghost .s1-caret-0 { display: none; }
.s1-send {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
}
.story-box .s1-send .i { width: 17px; height: 17px; stroke-width: 2; }
.s1-bubble {
  position: absolute;
  right: 230px; top: 62px;
  height: 46px;
  padding: 0 20px;
  border-radius: 23px 23px 6px 23px;
  background: var(--wash-2);
  font-size: 18px;
  line-height: 46px;
  letter-spacing: -0.012em;
  white-space: nowrap;
}
.s1-reply {
  position: absolute;
  left: 230px; top: 132px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  font-size: 18px;
  letter-spacing: -0.012em;
  white-space: nowrap;
}
.s1-tile { display: block; width: 34px; height: 34px; flex: none; }
.s1-tile .st-tile { width: 100%; height: 100%; }

.is-tall .s1-composer { left: 12px; top: 212px; width: 302px; height: 68px; grid-template-columns: 30px minmax(0, 1fr) 32px; gap: 10px; padding: 0 12px; }
.is-tall .s1-composer .st-person { width: 30px; height: 30px; font-size: 11.5px; }
.is-tall .s1-line { height: 22px; font-size: 16px; line-height: 22px; }
.is-tall .s1-caret { height: 19px; vertical-align: -3.5px; }
.is-tall .s1-send { width: 32px; height: 32px; border-radius: 9px; }
.is-tall .s1-bubble { right: 12px; top: 74px; height: 40px; padding: 0 16px; border-radius: 20px 20px 6px 20px; font-size: 15.5px; line-height: 40px; }
.is-tall .s1-reply { left: 12px; top: 136px; gap: 10px; height: 30px; font-size: 15.5px; }
.is-tall .s1-tile { width: 30px; height: 30px; }

/* ---------- 2 · Connect ---------- */
.s2-hub { position: absolute; }
.s2-hub .st-tile { width: 56px; height: 56px; }
.s2-ro { position: absolute; display: inline-flex; align-items: center; gap: 6px; }
.story-box .s2-ro .i { width: 14px; height: 14px; }
.s2-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 13px 0 11px;
  border-radius: 999px;
  background: var(--sheet);
  font-size: 14.5px;
  white-space: nowrap;
}
.s2-edge { position: absolute; inset: 0; border: 1px solid var(--rule-2); border-radius: inherit; pointer-events: none; }
.s2-dash { border-style: dashed; }
.s2-logo { position: relative; width: 20px; height: 20px; flex: none; }
.s2-logo > * { position: absolute; left: 0; top: 0; width: 20px; height: 20px; object-fit: contain; }
.s2-grey { filter: grayscale(1); opacity: .45; }
.story-box .s2-tick { width: 14px; height: 14px; stroke-width: 2; }

.is-tall .s2-hub .st-tile { width: 48px; height: 48px; }
.is-tall .s2-chip { left: 12px; width: 190px; height: 36px; gap: 8px; padding: 0 11px 0 10px; font-size: 12.5px; }
.is-tall .s2-tick { margin-left: auto; }

/* ---------- 3 · Understand ---------- */
.s3-lr, .s3-lg, .s3-lw { position: absolute; left: 16px; }
.s3-lr { top: 67px; }
.s3-lg { top: 115px; }
.s3-lw { left: 32px; top: 291px; z-index: 1; }

.s3-reason {
  position: absolute;
  left: 150px; top: 54px;
  width: 794px; height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 0 9px;
  border-radius: 10px;
  background: var(--ink);
  color: #F2F2EF;
  font-size: 14.5px;
  white-space: nowrap;
}
/* the mark on ink: the tile turns white and the slash ink, as the run log's mark does */
.s3-rmark { display: block; width: 24px; height: 24px; flex: none; border-radius: 6.5px; background: #fff; }
.s3-rmark svg { display: block; width: 24px; height: 24px; fill: var(--ink); }
.s3-reason b { font-weight: 600; }
.s3-reason .spin { color: #fff; }
.s3-stream { margin-left: 8px; padding-left: 16px; border-left: 1px solid #3A3B3F; min-height: 20px; line-height: 20px; }

.s3-node {
  position: absolute;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--rule-2);
  border-radius: 7px;
  background: var(--sheet);
  font-size: 13px;
  font-weight: 500;
  line-height: 24px;
  white-space: nowrap;
}
.s3-root { border-color: var(--ink); font-weight: 600; }
.s3-leaf { border-color: var(--rule); color: var(--ink-2); font-weight: 400; }

.s3-wh { position: absolute; left: 16px; top: 238px; width: 928px; height: 122px; --c: 8px; --p: 12px; }
.s3-tables { position: absolute; left: 150px; top: 13px; display: flex; gap: 15px; }
.s3-table { width: 140px; }
.s3-table code { display: block; font: 500 12.5px/16px var(--mono); letter-spacing: 0; color: var(--ink-2); }
.s3-cells { display: grid; gap: 4px; margin-top: 7px; }
/* rows of cells: empty first, then filled as the data lands (hard stops, no visible gradient) */
.s3-row {
  position: relative;
  display: block;
  height: 8px;
  background: linear-gradient(90deg, var(--wash-2) 0 var(--c), transparent var(--c)) 0 0 / var(--p) 100% repeat-x;
}
/* one tile is one cell; every fifth cell is darker, offset per row (--o) so the block reads as data */
.s3-row b {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--ink-2) 0 var(--c), transparent var(--c)) calc(var(--o) * var(--p)) 0 / calc(var(--p) * 5) 100% repeat-x,
    linear-gradient(90deg, var(--story-cell) 0 var(--c), transparent var(--c)) 0 0 / var(--p) 100% repeat-x;
}

.is-tall .s3-lr, .is-tall .s3-lg, .is-tall .s3-lw { left: 10px; }
.is-tall .s3-lr { top: 42px; }
.is-tall .s3-lg { top: 142px; }
.is-tall .s3-lw { top: 240px; }
.is-tall .s3-reason { left: 10px; top: 60px; width: 306px; height: 68px; flex-wrap: wrap; align-content: center; gap: 5px 8px; padding: 0 12px; font-size: 13px; }
.is-tall .s3-rmark, .is-tall .s3-rmark svg { width: 20px; height: 20px; border-radius: 5.5px; }
.is-tall .s3-stream { flex: 0 0 100%; margin: 0; padding: 0; border: 0; min-height: 17px; font-size: 12.5px; line-height: 17px; white-space: normal; }
.is-tall .s3-node { height: 24px; padding: 0 5px; border-radius: 6px; font-size: 11.5px; line-height: 22px; }
.is-tall .s3-root, .is-tall .s3-leaf { padding: 0 7px; }
.is-tall .s3-wh { left: 10px; top: 258px; width: 306px; height: 84px; --p: 11px; }
.is-tall .s3-tables { left: 12px; top: 9px; display: grid; gap: 0; }
.is-tall .s3-table { display: grid; grid-template-columns: 108px 162px; align-items: center; width: auto; height: 13px; }
.is-tall .s3-table code { font-size: 11.5px; line-height: 13px; }
.is-tall .s3-cells { margin: 0; }

/* ---------- 4 · Investigate ---------- */
.s4-an { position: absolute; left: 16px; top: 52px; width: 450px; }
.s4-chart { position: relative; height: 128px; margin-top: 10px; padding: 11px 16px 0; }
.s4-chart .st-label { display: block; }
.s4-plot { display: block; margin-top: 6px; overflow: visible; }
.s4-grid { fill: none; stroke: var(--story-grid); stroke-width: 1; }
.s4-axis { fill: none; stroke: var(--rule-2); stroke-width: 1; }
.s4-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 1; }
.s4-ring { position: absolute; width: 22px; height: 22px; border: 1.6px solid var(--caution); border-radius: 50%; }
.s4-badge {
  position: absolute;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--caution-tint);
  color: var(--caution);
  font-size: 12px;
  font-weight: 550;
  line-height: 20px;
  white-space: nowrap;
}
.s4-evs { display: grid; gap: 7px; margin-top: 12px; font-size: 13.5px; line-height: 18px; }
.s4-evs li { display: grid; grid-template-columns: 11px minmax(0, 1fr); gap: 9px; align-items: start; }
.s4-evs .ev { margin-top: 3.5px; }
.s4-conf { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 13px; line-height: 16px; color: var(--muted); }
.story-box .s4-conf .i { width: 13px; height: 13px; stroke-width: 2; }

.s4-hy { position: absolute; padding: 14px 20px; border-radius: 10px; background: var(--sheet); }
.s4-edge { position: absolute; inset: 0; border: 1px solid var(--rule); border-radius: inherit; pointer-events: none; }
.s4-dash { border-style: dashed; border-color: var(--faint); }
.s4-kind { position: relative; height: 18px; font-size: 13px; font-weight: 500; line-height: 18px; color: var(--muted); }
.s4-kind > span { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.s4-k1 { color: var(--ink-2); }
.s4-claim {
  margin-top: 8px;
  font-family: var(--display);
  font-weight: 650;
  font-size: 21px;
  line-height: 1.22;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.s4-cr { position: absolute; left: 494px; top: 170px; width: 450px; }
.s4-tests { margin-top: 8px; font-size: 14px; }
.s4-tests li { display: flex; align-items: center; justify-content: space-between; height: 32px; border-top: 1px solid var(--rule); }
.s4-q { position: relative; }
.s4-q i { position: absolute; left: -2px; right: -2px; top: 52%; height: 1.5px; background: var(--ink-2); transform-origin: 0 50%; }
.s4-res { display: grid; justify-items: end; align-items: center; }
.s4-res > * { grid-area: 1 / 1; }
.s4-res em { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-style: normal; color: var(--ink-2); white-space: nowrap; }
.story-box .s4-res .i { width: 13px; height: 13px; stroke-width: 2; }
.s4-res .spin { color: var(--muted); }

.is-tall .s4-an { left: 10px; top: 46px; width: 306px; }
.is-tall .s4-chart { height: 122px; margin-top: 8px; padding: 10px 12px 0; }
.is-tall .s4-evs { margin-top: 10px; gap: 6px; font-size: 12px; line-height: 16px; }
.is-tall .s4-evs .ev { margin-top: 2.5px; }
.is-tall .s4-conf { font-size: 12px; }
.is-tall .s4-hy { padding: 12px 14px; }
.is-tall .s4-kind { font-size: 12px; }
.is-tall .s4-claim { margin-top: 7px; font-size: 17px; }
.is-tall .s4-cr { left: 10px; top: 160px; width: 306px; }
.is-tall .s4-tests { font-size: 13px; }
.is-tall .s4-res em { font-size: 12.5px; }

/* ---------- 5 · Business case ---------- */
.s5-body { position: absolute; padding: 20px 26px; }
.s5-title {
  font-family: var(--display);
  font-weight: 650;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.s5-bars { display: grid; gap: 8px; margin-top: 16px; }
.s5-bar { display: grid; grid-template-columns: 46px 52px minmax(0, 1fr); align-items: center; height: 22px; font-size: 14px; color: var(--ink-2); }
.s5-bar.is-base { color: var(--ink); font-weight: 600; }
.s5-track { display: block; height: 10px; }
.s5-track i { display: block; height: 100%; border-radius: 3px; background: var(--rule-2); transform-origin: 0 50%; }
.s5-bar.is-base .s5-track i { background: var(--ink); }
.s5-unit { display: block; margin: 7px 0 0 98px; }
.s5-cost { margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 13.5px; line-height: 19px; color: var(--ink-2); }
.s5-lock { display: flex; align-items: flex-start; gap: 8px; margin-top: 9px; font-size: 13.5px; font-weight: 500; line-height: 19px; }
.story-box .s5-lock .i { width: 15px; height: 15px; margin-top: 2px; flex: none; }

.is-tall .s5-body { padding: 14px 16px; }
.is-tall .s5-title { font-size: 16.5px; }
.is-tall .s5-bars { margin-top: 13px; }
.is-tall .s5-bar { grid-template-columns: 40px 46px minmax(0, 1fr); font-size: 13px; }
.is-tall .s5-unit { margin-left: 86px; }
.is-tall .s5-cost { margin-top: 13px; padding-top: 12px; font-size: 12px; line-height: 17px; }
.is-tall .s5-lock { font-size: 12px; line-height: 17px; }
.is-tall .s5-lock .i { margin-top: 1px; }

/* ---------- 6 · Re-rank and 7 · Approve: one ranked list ---------- */
.s6-list { position: absolute; }
.s6-grid {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 148px 104px 184px;
  align-items: center;
  padding-right: 14px;
}
.s6-head { height: 32px; font-size: 13px; font-weight: 500; color: var(--muted); }
.s6-head > span:first-child { text-align: center; }
/* the hairlines stay where they are; the rows move over them */
.s6-sep { position: absolute; left: 0; right: 0; height: 1px; background: var(--rule); }
.s6-row { position: absolute; left: 0; right: 0; }
/* the row that moves is opaque, and rounded so it never cuts the sheet's corners */
.s6-row[data-k="a"] { z-index: 2; border-radius: 8px; background: var(--sheet); }
.s6-row > .s6-grid { position: relative; height: 100%; }
/* only while the row is carried to its new rank */
.s6-lift { position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--shadow-pop); }
.s6-wash { position: absolute; inset: 0; border-radius: inherit; background: var(--wash); }
.s6-rank { position: relative; height: 20px; font-size: 14.5px; color: var(--ink-2); text-align: center; }
.s6-rank b { position: absolute; inset: 0; font-weight: 400; line-height: 20px; }
.s6-title {
  padding-right: 14px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s6-impact { font-size: 14px; white-space: nowrap; }
.s6-status { position: relative; height: 12px; }
.s6-status .dots { position: absolute; left: 0; top: 2px; gap: 4px; }
.s6-status .dots i { width: 8px; height: 8px; transition: none; }
.s6-act { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.s7-pills { display: grid; }
.s7-pills > * { grid-area: 1 / 1; justify-self: end; }
.s7-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 11px 0 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 550;
  white-space: nowrap;
}
.s7-needs { background: var(--tint-2); color: var(--accent-ink); }
.s7-needs i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.s7-ok { padding-left: 9px; gap: 5px; background: var(--wash-2); color: var(--ink-2); }
.story-box .s7-ok .i { width: 13px; height: 13px; stroke-width: 2.2; }
.s7-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}
.s7-ring { position: absolute; inset: 0; border: 1.5px solid var(--ink); border-radius: inherit; }
/* the cursor floats, so it may cast a shadow */
.s7-cursor {
  position: absolute;
  left: -5px; top: -3px;
  z-index: 6;
  width: 24px; height: 24px;
  overflow: visible;
  filter: drop-shadow(0 2px 3px rgba(23, 23, 23, .28));
}
.s7-cursor path { fill: var(--ink); stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; }

.is-tall .s6-head { display: none; }
.is-tall .s6-grid {
  grid-template-columns: 30px minmax(0, 1fr) auto;
  grid-template-areas: "rank title title" "rank impact status";
  align-content: center;
  row-gap: 3px;
  padding-right: 12px;
}
.is-tall .s6-rank { grid-area: rank; align-self: start; font-size: 13px; line-height: 17px; height: 17px; }
.is-tall .s6-rank b { line-height: 17px; }
.is-tall .s6-title {
  grid-area: title;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  padding: 0;
  font-size: 13px;
  line-height: 17px;
  white-space: normal;
}
.is-tall .s6-impact { grid-area: impact; font-size: 12px; line-height: 16px; color: var(--ink-2); }
.is-tall .s6-status { grid-area: status; width: 85px; }
.is-tall .s6-status .dots { gap: 3px; }
/* on the narrow box the row opens for its pill and button */
.is-tall .s6-act { position: absolute; left: 30px; right: 12px; top: 100%; height: 36px; padding-bottom: 6px; justify-content: space-between; }
.is-tall .s6-row[data-k="a"] .s6-wash { bottom: -36px; }
.is-tall .s7-pill { height: 26px; font-size: 12px; }
.is-tall .s7-btn { height: 28px; font-size: 12.5px; }

/* ---------- 8 · Prepare: an ink sheet, like the run log ---------- */
.s8-frame { border-color: var(--ink); border-radius: 12px; background: var(--ink); }
.s8-body { position: absolute; padding: 18px 20px; color: #F2F2EF; }
.s8-head { display: flex; align-items: center; gap: 12px; height: 34px; }
.s8-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 8.5px; background: #fff; color: var(--ink); }
.story-box .s8-mark .i { width: 17px; height: 17px; }
.s8-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.s8-state { display: grid; justify-items: end; margin-left: auto; font-size: 13px; color: #D5D6D9; }
.s8-state > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 7px; }
.s8-state .spin { color: #fff; }
.story-box .s8-state .i { width: 14px; height: 14px; stroke-width: 2.2; color: #fff; }
.s8-pb { display: flex; align-items: center; gap: 12px; height: 28px; margin: 8px 0 0 46px; }
.s8-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px 0 3px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.s8-chip .st-person { width: 22px; height: 22px; font-size: 10px; }
/* while the chip is on its way it floats */
.s8-chip-lift { position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); }
.s8-loaded { font-size: 13px; color: #A9ABB0; white-space: nowrap; }
.s8-lines { margin-top: 10px; font-size: 14px; line-height: 20px; }
.s8-lines li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 11px; align-items: start; padding: 4px 0; border-top: 1px solid #2A2B2E; }
.story-box .s8-lines .i { width: 14px; height: 14px; margin-top: 3px; stroke-width: 2; color: #8D8F94; }

.is-tall .s8-body { padding: 14px; }
.is-tall .s8-head { height: 28px; gap: 10px; }
.is-tall .s8-mark { width: 28px; height: 28px; border-radius: 7px; }
.is-tall .s8-mark .i { width: 15px; height: 15px; }
.is-tall .s8-title { font-size: 14.5px; }
.is-tall .s8-state { font-size: 12.5px; }
.is-tall .s8-pb { flex-wrap: wrap; gap: 4px 0; height: auto; margin: 10px 0 0; }
.is-tall .s8-chip { height: 26px; padding: 0 10px 0 2px; gap: 6px; font-size: 12px; }
.is-tall .s8-chip .st-person { width: 22px; height: 22px; font-size: 11px; }
.is-tall .s8-loaded { flex: 0 0 100%; font-size: 12px; line-height: 16px; }
.is-tall .s8-lines { margin-top: 9px; font-size: 12.5px; line-height: 17px; }
.is-tall .s8-lines li { gap: 9px; padding: 5px 0; }
.is-tall .s8-lines .i { width: 13px; height: 13px; margin-top: 2px; }

/* ---------- 9 · Measure ---------- */
.s9-sheet { position: absolute; padding: 12px 14px; }
.s9-head { display: flex; align-items: center; gap: 14px; height: 24px; font-size: 13px; }
.s9-title { font-weight: 550; color: var(--ink-2); white-space: nowrap; }
.s9-legend { display: flex; gap: 14px; margin-left: auto; font-size: 13px; color: var(--muted); }
.s9-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.s9-legend i { width: 16px; height: 0; border-top: 2px solid var(--accent); }
.s9-legend .k-comp i { border-top: 1.5px solid var(--story-comparison); }
.s9-legend .k-fc i { border-top: 2.5px dotted var(--story-forecast); }
.s9-day {
  min-width: 52px;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--wash-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 550;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
}
.s9-plot { position: relative; margin-top: 10px; }
.s9-plot svg { position: absolute; left: 0; top: 0; overflow: visible; }
.s9-plot path { fill: none; }
.s9-grid { stroke: var(--story-grid); stroke-width: 1; }
.s9-axis { stroke: var(--rule-2); stroke-width: 1; stroke-dasharray: 1; }
.s9-hist, .s9-obs { stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 1; }
.s9-comp { stroke: var(--story-comparison); stroke-width: 1.5; stroke-linejoin: round; stroke-dasharray: 1; }
.s9-livel { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 1; }
.s9-plot .s9-band { fill: var(--story-forecast); fill-opacity: .12; }
.s9-fline { stroke: var(--story-forecast); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 0.1 5.6; }
.s9-dot { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.s9-live { position: absolute; top: -2px; padding: 0 5px; background: var(--sheet); font-size: 12px; font-weight: 600; line-height: 16px; }
/* measured uplift: the positive pair, beside its words */
.s9-tip {
  position: absolute;
  padding: 0 9px;
  border-radius: 6px;
  background: var(--positive-tint);
  color: var(--positive);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 24px;
  white-space: nowrap;
}
.s9-tip b { font-weight: 650; }
.s9-tip i { font-style: normal; }

.is-tall .s9-head { font-size: 12px; }
.is-tall .s9-day { margin-left: auto; }
.is-tall .s9-legend { position: absolute; left: 14px; bottom: 11px; gap: 13px; margin: 0; font-size: 12px; }
.is-tall .s9-legend i { width: 14px; }
.is-tall .s9-tip { display: grid; justify-items: end; padding: 4px 8px; font-size: 12px; line-height: 16px; }
.is-tall .s9-tip i { display: none; }

/* ---------- 10 · Context ---------- */
.s10-task { position: absolute; display: flex; align-items: center; gap: 14px; padding: 0 20px 0 18px; }
.s10-task .st-agent { width: 34px; height: 34px; border-radius: 8.5px; }
.story-box .s10-task .st-agent .i { width: 17px; height: 17px; }
.s10-task p {
  font-family: var(--display);
  font-weight: 650;
  font-size: 17.5px;
  line-height: 1.22;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
.s10-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  background: var(--sheet);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}
.story-box .s10-chip .i { width: 16px; height: 16px; color: var(--ink-2); }
.s10-chip .st-person { width: 24px; height: 24px; margin-left: -5px; font-size: 10.5px; }
.s10-legal { position: absolute; right: 24px; top: 236px; display: flex; flex-direction: row-reverse; align-items: flex-start; gap: 12px; }
.s10-who { display: grid; justify-items: center; gap: 4px; flex: none; }
.s10-who .st-person { width: 36px; height: 36px; font-size: 13px; }
.s10-bubble {
  width: 232px;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: 14px 14px 4px 14px;
  background: var(--sheet);
  font-size: 14px;
  line-height: 19px;
  text-wrap: balance;
}
.s10-lockup { position: absolute; left: 0; right: 0; top: 92px; display: grid; justify-items: center; text-align: center; }
.s10-brand { display: flex; align-items: center; gap: 13px; }
.s10-tile { display: block; width: 46px; height: 46px; flex: none; }
.s10-tile .st-tile { width: 100%; height: 100%; }
.s10-word { position: relative; top: -0.06em; padding-right: 2px; font: 650 30px/1.1 var(--font); letter-spacing: -0.035em; }
.s10-l1, .s10-l2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 31px;
  line-height: 1.16;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.s10-l1 { margin-top: 26px; color: var(--muted); }
.s10-l2 { margin-top: 2px; }

.is-tall .s10-task { gap: 11px; padding: 0 14px 0 12px; }
.is-tall .s10-task .st-agent { width: 30px; height: 30px; border-radius: 7.5px; }
.is-tall .s10-task p { font-size: 14.5px; }
.is-tall .s10-chip { height: 28px; gap: 6px; padding: 0 10px 0 8px; font-size: 12px; }
.is-tall .s10-chip .i { width: 15px; height: 15px; }
.is-tall .s10-chip .st-person { width: 22px; height: 22px; margin-left: -5px; font-size: 11px; }
.is-tall .s10-legal { left: 10px; right: 10px; top: 272px; flex-direction: row; gap: 9px; }
.is-tall .s10-who .st-person { width: 30px; height: 30px; font-size: 11.5px; }
.is-tall .s10-who { gap: 2px; }
.is-tall .s10-bubble { flex: 1; width: auto; padding: 8px 12px; border-radius: 4px 14px 14px 14px; font-size: 12.5px; line-height: 17px; }
.is-tall .s10-lockup { top: 76px; padding: 0 14px; }
.is-tall .s10-brand { gap: 10px; }
.is-tall .s10-tile { width: 36px; height: 36px; }
.is-tall .s10-word { font-size: 23.5px; }
.is-tall .s10-l1, .is-tall .s10-l2 { font-size: 21px; }
.is-tall .s10-l1 { margin-top: 20px; }
.is-tall .s10-l2 { margin-top: 4px; }
