/* ---------- Rembrandt: the flow diagram and the before/after grids ----------
   The diagram copies the Axoniq Platform's workflow graph (Vue Flow): Untitled UI tokens, task cards with a
   kind line and a status pill, circle events, a diamond gateway, gray smoothstep edges, an 18px dot grid. */

@font-face { font-family: "RB Inter"; src: url(/fonts/inter-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "RB Inter"; src: url(/fonts/inter-500.woff2) format("woff2"); font-weight: 500 600; font-display: swap; }

.ui-rembrandt .ui { font: 400 14px/20px "RB Inter", Inter, system-ui, sans-serif; color: #181d27; background: #f5f5f5; }
.wf { position: absolute; inset: 0; background: radial-gradient(circle, #d5d7da 1px, transparent 1.2px) 0 0 / 18px 18px, #fafafa; }
.wf p { margin: 0; }
.wf-edges { position: absolute; inset: 0; width: 100%; height: 100%; }
.wf-edges path { fill: none; stroke: #a4a7ae; stroke-width: 1.5; marker-end: url(#wf-arrow); }
.wf-edges path.f { stroke: #7a5af8; stroke-width: 2; stroke-dasharray: 6 4; marker-end: url(#wf-arrow-f); }
.wf-elabel { position: absolute; transform: translate(-50%, -50%); font: 500 11px/16px "RB Inter", Inter, sans-serif; padding: 1px 7px; border-radius: 999px; background: #fff; border: 1px solid #d9d6fe; color: #5925dc; white-space: nowrap; }
.wf-elabel.ok { border-color: #abefc6; color: #067647; transform: none; }

.wf-task { position: absolute; width: 170px; height: 74px; display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border: 1px solid #17b26a; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(10,13,18,.05); }
.wf-task .k { font-size: 12px; line-height: 16px; color: #535862; }
.wf-task .n { font-size: 14px; line-height: 18px; font-weight: 500; }
.wf-task .pill { margin-top: auto !important; align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 0 7px 0 6px; border-radius: 999px; border: 1px solid #17b26a; color: #067647; font-size: 11px; line-height: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; }
.wf-task .pill i { width: 6px; height: 6px; border-radius: 50%; background: #17b26a; flex: none; }
.wf-task.warn { border-color: #f79009; }
.wf-task.warn .pill { border-color: #f79009; color: #b54708; }
.wf-task.warn .pill i { background: #f79009; }

.wf-ev { position: absolute; width: 40px; height: 40px; }
.wf-ev i { display: block; width: 100%; height: 100%; border-radius: 50%; border: 1.5px solid #17b26a; background: #ecfdf3; }
.wf-ev.end i { border-width: 3.5px; display: grid; place-items: center; }
.wf-ev.end i::after { content: ""; width: 8px; height: 8px; border-radius: 2px; background: #067647; }
.wf-ev span { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: 130px; text-align: center; font-size: 12px; line-height: 15px; color: #414651; }

.wf-gw { position: absolute; width: 64px; height: 64px; }
.wf-gw i { position: absolute; inset: 15%; transform: rotate(45deg); border: 1.5px solid #17b26a; border-radius: 4px; background: #ecfdf3; }
.wf-gw span { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 500; white-space: nowrap; }

/* before and after: every slide, as received and as delivered */
.rb-decks { display: grid; gap: 28px; margin: 32px min(0px, (800px - min(1072px, 100vw - 2 * var(--gutter))) / 2); }
.rb-deck h3 { display: flex; justify-content: space-between; align-items: baseline; font: 500 15px/20px var(--sans); margin: 0 0 10px; }
.rb-deck h3 span { font: 500 12px/16px var(--mono); color: var(--faint); text-transform: uppercase; }
.rb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.rb-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px var(--line); background: var(--soft); }
.rb-deck.after .rb-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.rb-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0; }
.rb-pair figure { margin: 0; }
.rb-pair img { width: 100%; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }
@media (max-width: 640px) { .rb-pair { grid-template-columns: 1fr; } }

/* the source can be any shape: a PDF page keeps its own proportions */
.rb-deck.pdf .rb-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.rb-deck.pdf .rb-grid img { aspect-ratio: 1210 / 935; object-fit: contain; background: #fff; }
.rb-pair.pdf-pair img { aspect-ratio: 16 / 10; object-fit: contain; background: #f9fafb; padding: 10px; }
/* the same layout at three sizes */
.rb-sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 28px min(0px, (800px - min(1072px, 100vw - 2 * var(--gutter))) / 2) 8px; }
.rb-sizes figure { margin: 0; }
.rb-sizes img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }
.rb-sizes figcaption b { color: var(--ink); font-weight: 500; margin-right: 6px; }
@media (max-width: 640px) { .rb-sizes { grid-template-columns: 1fr; } }
/* a figure can be a video: framed like a screenshot */
.prose figure.shot-fig > video { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 28px -14px rgba(16, 24, 40, 0.18); background: #fff; }
/* before and after: twenty of each, five across and four down */
.rb-deck .rb-grid, .rb-deck.after .rb-grid, .rb-deck.pdf .rb-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }

/* ---------- Flow diagrams, refined ----------
   Quiet hairline cards with a soft shadow; status is a 3px accent bar and a dot, not a coloured outline.
   Slim open arrowheads on fine, rounded edges; small white edge tags; a faint, finer canvas grid. */
.wf { background: radial-gradient(circle, #dde1e8 0.85px, transparent 1.1px) 0 0 / 16px 16px, linear-gradient(180deg, #fcfcfd, #f7f8fa); }
.wf-edges path { stroke: #b9bfca; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.wf-edges path.f { stroke: #7a5af8; stroke-width: 1.5; stroke-dasharray: 4 5; opacity: .85; }
.wf-edges marker path { fill: none; stroke: #9aa1ad; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wf-edges marker#wf-arrow-f path { stroke: #7a5af8; }

.wf-task { --acc: #12b76a; border: 1px solid #e4e7ec; border-radius: 10px; background: #fff; padding: 10px 12px 10px 15px; gap: 1px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 18px -10px rgba(16, 24, 40, .14); }
.wf-task::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--acc); }
.wf-task .k { font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #98a2b3; }
.wf-task .n { font-size: 14px; line-height: 19px; font-weight: 500; letter-spacing: -.01em; color: #101828; }
.wf-task .pill { border: 0; background: #f2f4f7; color: #475467; border-radius: 6px; padding: 1px 7px 1px 6px; font-size: 11px; line-height: 16px; font-weight: 500; }
.wf-task .pill i { width: 5px; height: 5px; background: var(--acc); }
.wf-task.warn { --acc: #f79009; border-color: #e4e7ec; } .wf-task.warn .pill { border: 0; color: #93370d; background: #fffaeb; }
.wf-task.crit { --acc: #f04438; border-color: #e4e7ec; } .wf-task.crit .pill { border: 0; color: #b42318; background: #fef3f2; }
.wf-task.wait { --acc: #7a5af8; border-color: #e4e7ec; } .wf-task.wait .pill { border: 0; color: #5925dc; background: #f4f3ff; }
.wf-task.idle { --acc: #d0d5dd; border-color: #e4e7ec; } .wf-task.idle .n { color: #475467; }
.wf-task.warn .pill i, .wf-task.crit .pill i, .wf-task.wait .pill i, .wf-task.idle .pill i { background: var(--acc); }

.wf-elabel { padding: 2px 8px 2px 7px; border-radius: 6px; background: #fff; border: 1px solid #e4e7ec; color: #5925dc; font-weight: 500; font-size: 11px; line-height: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06); display: inline-flex; align-items: center; gap: 5px; }
.wf-elabel::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .9; }
.wf-elabel.ok { border-color: #e4e7ec; color: #067647; }
.wf-elabel.grey { border-color: #e4e7ec; color: #667085; }
.wf-elabel.red { border-color: #e4e7ec; color: #b42318; }

.wf-ev i { border: 1.5px solid #12b76a; background: #fff; box-shadow: 0 0 0 5px rgba(18, 183, 106, .09), 0 1px 2px rgba(16, 24, 40, .06); }
.wf-ev.timer i { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4.5px #12b76a, 0 0 0 5px rgba(18, 183, 106, .09); }
.wf-ev.end i { border: 2.5px solid #101828; background: #fff; box-shadow: 0 0 0 5px rgba(16, 24, 40, .06); }
.wf-ev.end i::after { width: 9px; height: 9px; border-radius: 2px; background: #101828; }
.wf-ev span { font-size: 11.5px; line-height: 15px; color: #667085; }

.wf-gw i { border: 1.25px solid #d0d5dd; background: #fff; border-radius: 6px; box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 14px -8px rgba(16, 24, 40, .16); }
.wf-gw span { font-size: 12px; font-weight: 500; color: #344054; }
