/* 07 what the first call covers (#how-it-works). Warm tone: an Oatmeal band with the elevation pattern, the agenda on
   a white rounded card; the live element (dot, trace, live node) is Summit, blooms Sandstone, passed stops Charcoal.
   The agenda is one line through four stops. Narrow (the base): the line runs down the left edge. Wide (the card's
   own width >= 860px): one row, the line runs left to right. instruments/agenda.js drives each stop through custom
   properties (below) and CSS maps them onto whichever axis is showing. The class defaults are the FINISHED frame
   (01-03 passed, resting on 04), which no-JS and reduced-motion visitors see.
     --p trace 0..1 (node to next node)   --d dot position 0..1   --da dot alpha   --tail px   --hot dot scale
     --lead leader 0..1
     --lit column opacity   --wash live-column wash   --pass passed-node centre   --core live-node centre (no JS)
     --node node border   --leadc leader colour   --numc number colour */
.first-call.topo { --topo-ink: var(--white); --topo-alpha: .55; }
.first-call__lede { margin-top: 18px; max-width: 36em; }
.first-call__card {
  container-type: inline-size;
  margin-top: 44px;
  padding: clamp(20px, 2.6vw, 32px) clamp(20px, 2.8vw, 36px) clamp(20px, 2.4vw, 28px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-panel);
}
.first-call__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  margin-bottom: 36px;
}
.first-call__hud { white-space: nowrap; }

/* ---- the stops (base: vertical) ---- */
.first-call__stops { margin: 0; padding: 0; list-style: none; }
.first-call__stop { position: relative; padding: 0 0 36px 34px; }
.first-call__stop--last { padding-bottom: 4px; }
.first-call__stop--passed { --p: 1; --pass: 1; --node: var(--charcoal); }
.first-call__stop--live { --core: 1; --wash: 1; --node: var(--summit); --leadc: var(--summit); --numc: var(--summit); }

.first-call__rail { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.first-call__rail::before {  /* the base line: this node's centre to the next node's centre */
  content: "";
  position: absolute;
  left: -.5px;
  top: 8.5px;
  bottom: -8.5px;
  width: 1px;
  background: var(--line-strong);
}
.first-call__stop--last .first-call__rail::before { bottom: 0; }
.first-call__trace { position: absolute; left: -1px; top: 8.5px; width: 2px; height: calc(var(--p, 0) * 100%); background: var(--summit); }
.first-call__node {
  position: absolute;
  left: -6.5px;
  top: 2px;
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--node, var(--line-strong));
  border-radius: 50%;
  background: var(--white);
}
.first-call__node::before, .first-call__node::after { content: ""; position: absolute; border-radius: 50%; }
.first-call__node::after { inset: 2px; background: var(--charcoal); opacity: var(--pass, 0); }  /* passed: a resting Charcoal centre */
.first-call__node::before {  /* the live centre when there is no script (the moving dot draws it otherwise) */
  left: 1.5px;
  top: 1.5px;
  width: 7px;
  height: 7px;
  background: var(--summit);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--summit) 20%, transparent), 0 0 12px 2px color-mix(in srgb, var(--sandstone) 75%, transparent);
  opacity: var(--core, 0);
}
.first-call__leader {  /* 1px leader from the node to the stop's number */
  position: absolute;
  left: 7.5px;
  top: 8px;
  width: 18px;
  height: 1px;
  background: var(--leadc, var(--line-strong));
  transform-origin: left center;
  transform: scaleX(var(--lead, 1));
}
.first-call__end { position: absolute; left: -5.5px; bottom: 0; width: 11px; height: 1px; background: var(--line-strong); }

/* the travelling dot (built by agenda.js): a Summit core with a comet tail behind it */
/* moved by transform (the rail's length is measured into --leny / --lenx), so travel causes no layout shift */
.first-call__dot { position: absolute; left: 0; top: 8.5px; width: 0; height: 0; opacity: var(--da, 0); transform: translateY(calc(var(--d, 0) * var(--leny, 0px))); }
.first-call__dot::after {
  content: "";
  position: absolute;
  left: -3.5px;
  top: -3.5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--summit);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--summit) 20%, transparent), 0 0 12px 2px color-mix(in srgb, var(--sandstone) 75%, transparent);
  transform: scale(var(--hot, 1));
}
.first-call__tail {
  position: absolute;
  left: -1px;
  top: -60px;
  width: 2px;
  height: 60px;
  background: linear-gradient(0deg, color-mix(in srgb, var(--summit) 85%, transparent), color-mix(in srgb, var(--summit) 0%, transparent));
  transform-origin: center bottom;
  transform: scaleY(var(--tailk, 0));
}

/* bloom + ring on arrival (agenda.js): anchored at the node's centre; the bloom sits under the line */
.agenda-fx { position: absolute; left: 0; top: 8.5px; width: 0; height: 0; pointer-events: none; }
.agenda-fx__bloom {
  position: absolute;
  left: -43px;
  top: -43px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sandstone) 60%, transparent), color-mix(in srgb, var(--sandstone) 26%, transparent) 50%, color-mix(in srgb, var(--sandstone) 0%, transparent));
  opacity: 0;
}
.agenda-fx__ring { position: absolute; left: -60px; top: -60px; max-width: none; overflow: visible; }  /* site.css caps svg at 100% of a 0px host */
.agenda-fx__ring circle { fill: none; stroke: var(--summit); opacity: 0; }

/* the live column: a soft Summit wash behind it */
.first-call__wash {
  position: absolute;
  left: 18px;
  right: -14px;
  top: -10px;
  bottom: 16px;
  border-radius: var(--r);
  background: linear-gradient(90deg, color-mix(in srgb, var(--summit) 9%, transparent), color-mix(in srgb, var(--summit) 0%, transparent) 90%);
  opacity: var(--wash, 0);
}

.first-call__body { position: relative; opacity: var(--lit, 1); }
.first-call__num {
  display: block;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: var(--fs-mono);
  letter-spacing: .16em;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  color: var(--numc, var(--muted));
}
.first-call__title { margin: 8px 0; }
.first-call__text { max-width: 40em; font-size: var(--fs-small); line-height: 1.6; color: var(--text); }
.first-call__text--list { margin-bottom: 18px; }

/* the coverage lines under 02: each ticks on (check draws, the box blooms, the rule under it lights) */
.first-call__lines {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  border-top: 1px solid var(--line-soft);
}
.first-call__lines li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-small);
  color: var(--ink);
}
.first-call__lines li::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--summit);
  transform-origin: left center;
  transform: scaleX(var(--u, 0));
  opacity: var(--ua, 0);
}
.first-call__tick { flex: none; overflow: visible; }
.first-call__tick rect { fill: color-mix(in srgb, var(--sandstone) 0%, transparent); stroke: var(--summit); stroke-width: 1; rx: 2px; }
.first-call__tick path {
  fill: none;
  stroke: var(--charcoal-deep);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 0;
}

.first-call__controls { margin-top: 26px; }

/* ---- wide: one row, the line runs left to right ---- */
@container (min-width: 860px) {
  .first-call__stops { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr) minmax(0, 1fr) minmax(0, 1fr); }
  .first-call__stop { padding: 30px 32px 0 0; }
  .first-call__stop--wide { padding-right: 40px; }
  .first-call__stop--last { padding-right: 0; padding-bottom: 0; }
  .first-call__rail { right: 0; bottom: auto; width: auto; height: 0; }
  .first-call__rail::before { left: 6.5px; right: -6.5px; top: -.5px; bottom: auto; width: auto; height: 1px; }
  .first-call__stop--last .first-call__rail::before { right: 0; }
  .first-call__trace { left: 6.5px; top: -1px; width: calc(var(--p, 0) * 100%); height: 2px; }
  .first-call__node { left: 0; top: -6.5px; }
  .first-call__leader { left: 6px; top: 7px; width: 1px; height: 18px; transform-origin: center top; transform: scaleY(var(--lead, 1)); }
  .first-call__end { left: auto; right: 0; top: -5.5px; bottom: auto; width: 1px; height: 11px; }
  .first-call__dot { left: 6.5px; top: 0; transform: translateX(calc(var(--d, 0) * var(--lenx, 0px))); }
  .first-call__tail {
    left: -60px;
    top: -1px;
    width: 60px;
    height: 2px;
    background: linear-gradient(270deg, color-mix(in srgb, var(--summit) 85%, transparent), color-mix(in srgb, var(--summit) 0%, transparent));
    transform-origin: right center;
    transform: scaleX(var(--tailk, 0));
  }
  .agenda-fx { left: 6.5px; top: 0; }
  .first-call__wash {
    left: -16px;
    right: 14px;
    top: 1px;
    bottom: -18px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--summit) 9%, transparent), color-mix(in srgb, var(--summit) 0%, transparent) 85%);
  }
  .first-call__stop--last .first-call__wash { right: 0; }
}
