/* "The night shift": an animated automation diagram (js/flow.js). Triggers on the left, the automation in the middle, finished work on the right. */
.flow .lede { max-width: 640px; margin: 18px 0 0; color: var(--muted); }
.nf { position: relative; margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr) 210px minmax(0, 1fr); gap: clamp(36px, 8vw, 120px); align-items: center;
  padding: clamp(22px, 3.4vw, 44px); border: 1px solid var(--line); border-radius: 22px; background:
    radial-gradient(ellipse 50% 70% at 50% 50%, rgba(200,255,0,.07), transparent 70%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 100% 36px,
    #0b0b0a; overflow: hidden; }
.nf-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.nf-wires path { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 1.5; stroke-dasharray: 3 7; transition: stroke .5s, stroke-width .5s; }
.nf-wires path.on { stroke: var(--red); stroke-width: 2; stroke-dasharray: none; filter: drop-shadow(0 0 6px rgba(200,255,0,.7)); }
.nf-wires circle { fill: #f4ffc4; filter: drop-shadow(0 0 7px var(--red)) drop-shadow(0 0 14px var(--red)); }
.nf-col { position: relative; z-index: 1; }
.nf-h { font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.nf-in, .nf-out { list-style: none; display: grid; gap: 14px; }
.nf-node, .nf-res { position: relative; display: grid; grid-template-columns: 38px 1fr auto; column-gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #0f0f0e; transition: border-color .4s, box-shadow .4s, background .4s, transform .4s; }
.nf-node svg, .nf-res svg { grid-row: 1 / span 2; width: 38px; height: 38px; padding: 8px; border-radius: 10px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; background: rgba(255,255,255,.04); transition: stroke .4s, background .4s; }
.nf-node b, .nf-res b { font-weight: 500; font-size: 14.5px; color: var(--ink); line-height: 1.25; }
.nf-node span { grid-column: 3; grid-row: 1 / span 2; font: 12px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--muted); }
.nf-res { grid-template-columns: 38px 1fr; }
.nf-res span { grid-column: 2; font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.nf-node.fire { border-color: rgba(200,255,0,.7); box-shadow: 0 0 0 1px rgba(200,255,0,.25), 0 0 30px rgba(200,255,0,.2); transform: translateX(4px); }
.nf-node.fire svg { stroke: var(--red); background: rgba(200,255,0,.1); }
.nf-res { opacity: .45; }
.nf-res.done { opacity: 1; border-color: rgba(200,255,0,.45); background: linear-gradient(90deg, rgba(200,255,0,.08), #0f0f0e 70%); }
.nf-res.done svg { stroke: var(--red); background: rgba(200,255,0,.1); }
.nf-res.pop { transform: translateX(-4px); box-shadow: 0 0 34px rgba(200,255,0,.22); }

.nf-core { position: relative; z-index: 1; width: 210px; height: 210px; display: grid; place-items: center; justify-self: center; }
.nf-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed rgba(200,255,0,.5); animation: nf-spin 26s linear infinite; }
.nf-ring.r2 { inset: 16px; border: 1px solid rgba(255,255,255,.14); border-top-color: var(--red); border-right-color: var(--red); animation-duration: 7s; animation-direction: reverse; }
.nf-core::before { content: ''; position: absolute; inset: 34px; border-radius: 50%; background: radial-gradient(circle, #14180a, #0a0a09 70%); box-shadow: inset 0 0 0 1px rgba(200,255,0,.25), 0 0 50px rgba(200,255,0,.12); transition: box-shadow .35s; }
.nf-core.busy::before { box-shadow: inset 0 0 0 1px rgba(200,255,0,.7), 0 0 70px rgba(200,255,0,.45); }
.nf-clock { position: relative; display: grid; justify-items: center; gap: 3px; text-align: center; }
.nf-clock small, .nf-clock em { font: normal 8.5px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.nf-clock em { color: var(--red); }
.nf-clock b { font: 400 30px/1 var(--display); letter-spacing: .02em; color: var(--ink); font-variant-numeric: tabular-nums; }
@keyframes nf-spin { to { transform: rotate(360deg); } }

.nf-foot { display: grid; grid-template-columns: 1fr auto; gap: 24px; margin-top: 16px; align-items: stretch; }
.nf-log { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: #0b0b0a; min-height: 128px; overflow: hidden; }
.nf-log ol { list-style: none; display: grid; gap: 7px; font: 12.5px/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: var(--muted); }
.nf-log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: nf-in .5s both; }
.nf-log li b { color: var(--red); font-weight: 400; margin-right: 8px; }
.nf-log li:first-child { color: var(--ink); }
@keyframes nf-in { from { opacity: 0; transform: translateY(8px); } }
.nf-tally { display: grid; align-content: center; justify-items: start; gap: 4px; min-width: 230px; border: 1px solid rgba(200,255,0,.35); border-radius: 16px; padding: 18px 24px; background: linear-gradient(#10130a, #0b0b0a); }
.nf-tally span { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.nf-tally b { font: 400 clamp(48px, 6vw, 72px)/1 var(--display); color: var(--red); font-variant-numeric: tabular-nums; text-shadow: 0 0 30px rgba(200,255,0,.35); }
.nf-tally i { font-style: normal; font-size: 12.5px; color: var(--muted); }

@media (max-width: 900px) {
  .nf { grid-template-columns: 1fr; gap: 30px; padding: 20px 14px 22px; }
  .nf-in, .nf-out { grid-template-columns: 1fr 1fr; gap: 10px; }
  .nf-node, .nf-res { grid-template-columns: 1fr; row-gap: 6px; padding: 12px; justify-items: start; }
  .nf-node svg, .nf-res svg { grid-row: auto; width: 32px; height: 32px; padding: 6px; }
  .nf-node span { grid-column: 1; grid-row: auto; }
  .nf-res { grid-template-columns: 1fr; }
  .nf-res span { grid-column: 1; font-size: 11.5px; }
  .nf-node b, .nf-res b { font-size: 13px; }
  .nf-core { width: 176px; height: 176px; }
  .nf-core::before { inset: 28px; }
  .nf-clock b { font-size: 26px; }
  .nf-foot { grid-template-columns: 1fr; }
  .nf-tally { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .nf-ring { animation: none; }
  .nf-res { opacity: 1; }
  .nf-log li { animation: none; }
}
