/* Distance is shared at each fork so the light is a continuous current in every scene. */
#replay[data-motion=rails] {
  background: radial-gradient(ellipse at 82% 34%, color-mix(in srgb,var(--deep) 72%,var(--strand-b) 28%) 0%,transparent 55%),
    radial-gradient(ellipse at 48% 67%,color-mix(in srgb,var(--deep) 79%,var(--strand-a) 21%) 0%,transparent 63%),var(--night);
}
#stream-ribbons { fill: none; pointer-events: none; stroke-linecap: round; stroke-linejoin: round; }
.fluid-track { --water: var(--strand-a); --surface-width: 7; --crest-width: 4.5; }
.fluid-track .water-body { stroke: var(--water); stroke-width: var(--surface-width); opacity: .32; }
.fluid-track .water-crest, .fluid-track .water-edge { stroke: var(--water); stroke-dashoffset: calc(var(--current,0px) + var(--origin,0px)); }
.fluid-track .water-crest { stroke-width: var(--crest-width); stroke-dasharray: 66 23 3 23 14 120; opacity: .86; }
.fluid-track .water-edge { stroke-width: 1.5; stroke-dasharray: 111 21 17 72; opacity: .91; }
.fluid-track.inlet, .fluid-track.tributary { --water: url(#feed-tone); --surface-width: 14; --crest-width: 5.4; }
.fluid-track.inlet .water-body { opacity: .47; }
.fluid-track.tributary { --surface-width: 4.5; --crest-width: 2; opacity: .52; }
.fluid-track.base, .fluid-track.outlet { --water: var(--strand-c); }
.fluid-track.base { --surface-width: 5; --crest-width: 3; }
.fluid-track.feature .water-edge { stroke: var(--hot-metal); }
.fluid-track.peer { --surface-width: 4; --crest-width: 2.75; opacity: calc(var(--routing-opacity,1) * .8); }
.git-map:not([data-extended=true]) .fluid-track.extension, .git-map:not([data-landed=true]) .fluid-track.outlet { display: none; }
.fluid-track.outlet { --surface-width: 12; --crest-width: 5; }
.git-map .older-history, .git-map .older-topic { opacity: .15; }
.stream-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: relative; z-index: 2; color: var(--soft); font: .76rem var(--mono); }
.stream-head > span, .stream-head label { display: inline-flex; align-items: center; gap: 8px; }
.stream-head .ico { width: 14px; height: 14px; }
.stream-head b { font-weight: 400; opacity: .83; }
.stream-head select,.scene-view select { color: var(--white); background: var(--night); padding: 5px 7px; font: 550 .79rem var(--sans); border: 1px solid #ffffff4c; border-radius: 5px; color-scheme: dark; }
.stakeholder-index { margin-top: clamp(19px,3.1vh,33px); max-width: 37rem; }
.stakeholder-index > span { color: var(--soft); font: .78rem var(--mono); }
.owner-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; margin-top: 7px; }
.owner-options button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; min-width: 0;
  padding: 9px 4px 5px; border: 0; border-top: 1px solid #ffffff4a; background: transparent; color: var(--soft); position: relative;
}
.owner-options button::before { position: absolute; content: ''; inset: -1px 0 auto; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 350ms cubic-bezier(.2,.7,.2,1); }
.owner-options button[aria-pressed=true] { color: var(--white); }
.owner-options button[aria-pressed=true]::before { transform: scaleX(1); }
.owner-options button:hover { color: var(--accent); }
.owner-options svg { width: 18px; height: 18px; stroke: none; }
.owner-options span { display: grid; gap: 2px; }
.owner-options b { font: 650 .92rem/1.2 var(--sans); }
.owner-options small { font: .71rem/1.25 var(--sans); }
.owner-options button[aria-pressed=true] svg { color: var(--accent); }
.graph-assembly { position: relative; }
#replay .graph-space { isolation: auto; }
.hero-copy { z-index: 2; }
.studio .motion-picker { max-width: 43rem; margin: 0 0 24px; color: var(--ink); border-bottom-color: var(--rule); }
.studio .motion-picker button { color: var(--ink); }
.studio .motion-picker button[aria-pressed=true] { background:var(--ink);color:var(--wash); }
.rail { --phase: 0; position:relative; }
.rail::after { content:''; position:absolute; inset: 0 auto auto 0; height:2px; width:100%; background:var(--strand-b); transform:scaleX(var(--phase)); transform-origin:left; transition: transform .52s cubic-bezier(.2,.7,.2,1); pointer-events:none; }
#usual-bar,#demo-bar { transition: width .38s cubic-bezier(.18,.72,.2,1); }
.agent-track,.work-stages { list-style:none; display:flex; align-items:flex-start; justify-content:space-between; margin:15px 0 0; padding:0; position:relative; isolation:isolate; }
.agent-track::before,.agent-track::after,.work-stages::before,.work-stages::after { content:''; position:absolute; left:0; width:100%; top:4px; height:1px; z-index:-1; background:currentColor; opacity:.28; }
.agent-track::after,.work-stages::after { height:2px; opacity:1; background:currentColor; transform-origin:left; transform:scaleX(var(--progress,0)); transition:transform .5s cubic-bezier(.2,.75,.2,1); }
.agent-track { color:var(--accent); margin-bottom:12px; }
.agent-track li,.work-stages li { display:grid; gap:5px; justify-items:center; font: .7rem/1.2 var(--mono); }
.agent-track li:first-child,.work-stages li:first-child { justify-items:start; }
.agent-track li:last-child,.work-stages li:last-child { justify-items:end; }
.agent-track li::before,.work-stages li::before { content:''; background:var(--deep); border:1px solid currentColor; width:8px; height:8px; border-radius:50%; }
.agent-track li:first-child::before,.agent-track[data-receipt=true] li::before,.work-stages li.done::before,.work-stages li[aria-current]::before { background:currentColor; }
.work-stream { margin: 12px clamp(18px,4vw,58px) 0; padding: 13px 0 14px; border-bottom: 1px solid var(--rule); }
.work-stream[hidden] { display:none; }
.work-stream-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; font:.76rem var(--mono); color:var(--muted); }
.work-stream-head select { font:600 .86rem var(--sans); color:var(--ink); background:var(--wash); border:1px solid var(--rule); border-radius:4px; padding:4px; }
.work-stream-head a { color:var(--rich); }
.work-stages { color:var(--rich); }
.work-stages li::before { background:var(--wash); }
.work-bar #work-motion { background:transparent; border:1px solid var(--rule); border-radius:4px; padding:4px 7px; color:var(--ink); font: .74rem var(--sans); }
.work-bar .workspace-tag { margin-left:auto; }
.work-bar { gap:10px; }
.event-list li { position:relative; }
.event-list li + li::before { content:''; position:absolute; left:0; top:-7px; border-radius:50%; height:3px; width:3px; background:var(--rich); }
.sidebar nav a,.work-filter button,.screens button,.client-switch button,.palette-card,.queue-row { transition: background-color .2s,color .2s,border-color .2s; }
#flow-dialog[open]::backdrop { animation: stream-backdrop .18s ease-out; }
@keyframes stream-backdrop { from { opacity:0; } to { opacity:1; } }
@media (max-width:995px) { .owner-options { gap:0; } .owner-options small { font-size:.68rem; } }
@media (max-width:760px) {
  .stakeholder-index { max-width:35rem; margin-top:18px; }
  .owner-options { margin-top:5px; }
  .owner-options button { padding-top:6px; }
  .owner-options svg { width:16px; height:16px; }
  .stream-head { margin-top:18px; }
  .stream-head + .graph-space { margin-top:0; }
  .work-stream { margin: 4px 16px 0; }
}
@media(max-width:370px) {
  .owner-options b { font-size:.79rem; }
  .owner-options small { font-size:.64rem; }
  .work-bar #work-motion { font-size:.65rem; }
}
@media (prefers-reduced-motion:reduce) {
  :is(.owner-options button,.rail,.work-stages,.agent-track)::before,:is(.owner-options button,.rail,.work-stages,.agent-track)::after,#usual-bar,#demo-bar,.screens button,.sidebar nav a,.work-filter button,.client-switch button,.palette-card,.queue-row { transition:none; }
  #flow-dialog[open]::backdrop { animation:none; }
}
/* The release map pauses its packet and receipt clocks in place. */
html[data-surface-paused=true] :not(.evidence-packets use,.owner-orbit),html[data-surface-paused=true] *::before,html[data-surface-paused=true] *::after,html[data-surface-paused=true] dialog::backdrop { transition-duration:0s!important; animation-duration:0s!important; }
.journey-nav { position:sticky; top:0; z-index:4; background:var(--night); color:var(--white); border-bottom:1px solid #ffffff37; }
.journey-nav .shell { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); position:relative; }
.journey-nav .shell::after { content:''; position:absolute; bottom:-1px; left:0; right:0; height:2px; transform:scaleX(var(--read,0)); transform-origin:left; background:var(--strand-a); pointer-events:none; }
.journey-nav a { padding:10px 2px; font:550 .83rem var(--sans); color:var(--soft); text-decoration:none; }
.journey-nav a[aria-current] { color:var(--accent); }
.journey-nav a:last-of-type { text-align:right; }
#landing main > section { scroll-margin-top: 42px; }
@media(max-width:430px){.journey-nav a { font-size:.71rem; }.journey-nav .shell { gap:3px; }}
#handoff-stream { fill:none; stroke-linejoin:round; stroke-linecap:round; }
.handoff-bank { stroke:var(--night); stroke-width:9; opacity:.82; }
.handoff-core { stroke:url(#handoff-light); stroke-width:6.4; opacity:.68; }
.handoff-current { stroke:url(#handoff-light); stroke-width:3.7; stroke-dasharray:63 22 5 24 12 118; stroke-dashoffset:calc(var(--current,0px) + var(--origin,0px)); }
.handoff-edge { stroke:var(--strand-c); stroke-width:1; stroke-dasharray:94 38 13 82; stroke-dashoffset:calc(var(--current,0px) + var(--origin,0px)); opacity:.8; }
.work-river { width:100%; height:30px; display:block; margin-top:7px; fill:none; stroke-linecap:round; }
.work-feeder { stroke:var(--rich); opacity:.29; stroke-width:1.2; }
.work-river-bed { stroke:var(--rich); opacity:.27; stroke-width:4; }
.work-river-light { stroke:var(--rich); stroke-width:2.1; stroke-dasharray:82 98 8 31; animation:work-current 5.5s linear infinite; animation-play-state:paused; }
.work-stream[data-running=true] .work-river-light { animation-play-state:running; }
.work-river + .work-stages { margin-top:0; }
@keyframes work-current { to { stroke-dashoffset:-219; } }
@media(prefers-reduced-motion:reduce){ .work-river-light { animation:none; } }
.readout { position:relative; }
.last-receipt { position:absolute; pointer-events:none; z-index:1; }
