/* What several sections of the event page share.

   The builder's flow: an agent's flow as the Flow Designer draws one (docs.synthflow.ai/flow-designer), in the
   system's marks. A node is a white card with a hairline: its mark and its name as the product names it (Greeting
   Message, Conversation, Call Transfer; a custom action by its own name, in mono), then what it holds (its words,
   the variables it collects, a custom action's method and system). The told hang on Synthflow's violet path, drawn
   at the line's weight; where the flow forks, each condition is a white pill on its path, and the path that hands
   the call to people is dashed, the line language's party that joins later. It stands in a Product window on glass
   over a stage: the canvas is clear and runs on under the window's foot, as the product's canvas scrolls. A picture
   of the product, not a control.

   The use cases: the system's Branch on a stage, a team's calls and a glass pill a use case, and under it what the
   pills are (examples), in primary ink on the stage. */
.flow-name { flex: none; white-space: nowrap; }   /* the screen's name keeps its line; the agent's name ends in the window's own "…" */
.ev-build { border-radius: var(--radius-md); }
.ev-build-canvas { max-height: 24.5rem; overflow: hidden;
  -webkit-mask-image: linear-gradient(var(--c-midnight) calc(100% - var(--space-8)), transparent); mask-image: linear-gradient(var(--c-midnight) calc(100% - var(--space-8)), transparent); }
.ev-cases { display: grid; justify-items: center; gap: var(--space-6); margin: 0; }
.ev-cases-words { color: var(--ink-primary); }
.flow-canvas { padding: var(--space-5); background: var(--surface-sunken); }
.flow, .flow-path, .flow-vars { margin: 0; padding: 0; list-style: none; }
.flow, .flow-path { --flow-step: var(--space-5); --flow-line: var(--accent); --flow-dash: solid; display: grid; justify-items: center; row-gap: var(--flow-step); }
.flow > li, .flow-path > li { position: relative; min-width: 0; }
/* The path: a line from each node up to the one before it */
.flow > li + li::before, .flow-path > li + li::before { content: ""; position: absolute; inset-block-end: calc(100% + 1px); inset-inline-start: 50%;
  height: calc(var(--flow-step) - 1px); border-inline-start: var(--line-drawn) var(--flow-dash) var(--flow-line); translate: -50% 0; }
.flow > .flow-fork::before { inset-block-end: 100%; height: var(--flow-step); }

.flow-node { display: grid; gap: var(--space-2); width: min(100%, 17.5rem); padding: var(--space-3); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); background: var(--surface-card); text-align: start; }
.flow-node-head { display: flex; align-items: center; gap: var(--space-2); min-width: 0; color: var(--ink-primary); font: var(--t-label-s); }
.flow-node-head > .icon { flex: none; width: var(--icon-s); height: var(--icon-s); color: var(--accent); }
.flow-node-head > code { min-width: 0; font: var(--t-code-m); letter-spacing: var(--t-code-m-tracking); overflow-wrap: break-word; }   /* a long name breaks at its underscore (wbr) */
.flow-node-text { color: var(--ink-secondary); font: var(--t-meta); }
.flow-node-call { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.flow-method { color: var(--ink-accent); font: var(--t-code); letter-spacing: var(--t-code-tracking); }
/* What a Conversation node collects: each variable in mono over the question that asks for it, cut where it is long,
   as the product cuts it */
.flow-vars { display: grid; gap: var(--space-1); }
.flow-vars > li { display: grid; gap: 2px; min-width: 0; padding: var(--space-2); border-radius: var(--radius-xs); background: var(--surface-sunken); }
.flow-var { color: var(--ink-accent); font: var(--t-code); letter-spacing: var(--t-code-tracking); }
.flow-vars span { overflow: hidden; color: var(--ink-secondary); font: var(--t-meta-s); white-space: nowrap; text-overflow: ellipsis; }

/* The fork: two paths side by side from one point under the node before them, each turning down to its condition */
.flow-fork { justify-self: stretch; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-4); align-items: start; }
.flow-path { --flow-step: var(--space-4); position: relative; padding-block-start: var(--space-4); }
.flow-path::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: calc(50% - var(--line-drawn) / 2) calc(var(--space-4) / -2); height: var(--space-4); box-sizing: border-box;
  border-block-start: var(--line-drawn) var(--flow-dash) var(--flow-line); border-inline-start: var(--line-drawn) var(--flow-dash) var(--flow-line); border-start-start-radius: var(--radius-xs); }
.flow-path:last-child::before { inset-inline: calc(var(--space-4) / -2) calc(50% - var(--line-drawn) / 2); border-inline-start: 0; border-inline-end: var(--line-drawn) var(--flow-dash) var(--flow-line);
  border-start-start-radius: 0; border-start-end-radius: var(--radius-xs); }
.flow-path--later { --flow-line: var(--border-control); --flow-dash: dashed; }
.flow-path > .flow-node { width: 100%; }
.flow-when { display: inline-flex; align-items: center; min-height: var(--pill-s); padding: 0 var(--space-3); border-radius: var(--radius-full);
  background: var(--surface-card); box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--ink-primary); font: var(--t-caption); text-align: center; }
/* On glass the canvas is clear and the secondary words take the glass's ink */
.glass .flow-canvas { background: none; }
@media (max-width: 599px) {
  .flow-canvas { padding: var(--space-4) var(--space-3); }
  .flow-fork { column-gap: var(--space-2); }
  .flow-path::before { inset-inline: calc(50% - var(--line-drawn) / 2) calc(var(--space-2) / -2); }
  .flow-path:last-child::before { inset-inline: calc(var(--space-2) / -2) calc(50% - var(--line-drawn) / 2); }
  .flow-node { padding: var(--space-2); }
}
@media (forced-colors: active) { .flow-node, .flow-when { border: 1px solid CanvasText; } }

/* The page's resources: PostCard as the system draws it, in its grid; a picture the site keeps in another shape than
   the card's is cut to the card's frame */
.ev-resources .post-card-picture > img { aspect-ratio: 760 / 428; object-fit: cover; }
