.fanout { container-type: inline-size; }
.fo { position: relative; transition: opacity .5s; }
.fo.is-fading { opacity: 0; }
.fo .i { width: 15px; height: 15px; flex: none; }
.fo-stage { position: relative; }

.fo-parent { position: relative; max-width: 680px; margin: 0 auto; padding: 20px 22px; border-radius: var(--radius-card); background: var(--color-coal); border: 1px solid color-mix(in srgb, var(--color-accent) 30%, transparent); box-shadow: 0 30px 90px -40px rgb(20 87 253 / .6); opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease-out-expo), transform .5s var(--ease-out-expo), border-color .5s, box-shadow .5s; }
.fo-parent.is-on { opacity: 1; transform: none; }
.fo.is-done .fo-parent { border-color: color-mix(in srgb, var(--color-ok) 55%, transparent); box-shadow: 0 0 0 4px rgb(52 211 153 / .08), 0 0 60px -14px rgb(52 211 153 / .55); }
.fo-p-top { display: flex; align-items: center; gap: 10px; }
.fo-status { --tone: var(--color-accent); display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 28%, transparent); white-space: nowrap; flex: none; }
.fo-status[data-state="done"] { --tone: var(--color-ok); }
.fo-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.fo-status[data-state="running"] .fo-dot { animation: fo-pulse 1.4s ease-out infinite; }
@keyframes fo-pulse { 0% { box-shadow: 0 0 0 0 rgb(91 139 255 / .6); } 100% { box-shadow: 0 0 0 7px rgb(91 139 255 / 0); } }
.fo-kind { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--color-dim); }
.fo-btn { margin-left: auto; width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--color-ash); border: 1px solid var(--color-line); background: transparent; cursor: pointer; }
.fo-btn:hover { color: var(--color-paper); border-color: var(--color-line-strong); }
.fo-p-title { margin-top: 12px; font-size: 17px; font-weight: 600; color: var(--color-paper); }
.fo-p-bar { margin-top: 14px; height: 6px; border-radius: 99px; background: rgb(255 255 255 / .08); overflow: hidden; }
.fo-p-fill { display: block; height: 100%; width: 0; background: var(--grad-brand); transition: width .35s var(--ease-out-expo); }
.fo-p-stats { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 13px; color: var(--color-ash); }
.fo-count b, .fo-tally b { color: var(--color-paper); font-weight: 700; font-variant-numeric: tabular-nums; }
.fo-count { margin-right: auto; }
.fo-tally { display: inline-flex; align-items: center; gap: 6px; transition: color .3s; }
.fo-tally[data-k="rebooked"] .i { color: var(--color-ok); }
.fo-tally[data-k="delivered"] .i { color: var(--color-cyan); }
.fo-tally[data-k="person"] .i { color: var(--color-warn); }
.fo-tally.is-bump b { animation: fo-bump .35s var(--ease-out-expo); }
@keyframes fo-bump { 0% { transform: scale(1.35); } 100% { transform: none; } }
.fo-tally b { display: inline-block; }

.fo-stem, .fo-bus, .fo-drop { background: linear-gradient(var(--color-accent), color-mix(in srgb, var(--color-accent) 40%, transparent)); transition: transform .5s var(--ease-out-expo); }
.fo-stem { width: 2px; height: 26px; margin: 0 0 0 29px; transform: scaleY(0); transform-origin: top; }
.fo-stem.is-on { transform: none; }
.fo-row { position: relative; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); padding-left: 48px; }
.fo-bus { position: absolute; left: 29px; top: 0; bottom: 40px; width: 2px; transform: scaleY(0); transform-origin: top; }
.fo-bus.is-on { transform: none; }
.fo-col { position: relative; }
.fo-drop { position: absolute; left: -19px; top: 26px; width: 19px; height: 2px; transform: scaleX(0); transform-origin: left; }
.fo-drop.is-on { transform: none; }
.fo-sub { position: relative; margin: 10px 0 0 22px; }
.fo-drop-sub { left: -14px; top: -10px; width: 2px; height: 36px; transform: scaleY(0); transform-origin: top; background: color-mix(in srgb, var(--color-sleep) 60%, transparent); }
.fo-drop-sub.is-on { transform: none; }

.fo-child { --tone: var(--color-line-strong); position: relative; padding: 12px 14px; border-radius: 14px; background: var(--color-coal); border: 1px solid var(--color-line); opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease-out-expo), transform .45s var(--ease-out-expo), border-color .4s, background-color .4s; }
.fo-child.is-on { opacity: 1; transform: none; }
.fo-child[data-state="working"] { --tone: var(--color-accent); border-color: color-mix(in srgb, var(--color-accent) 35%, transparent); }
.fo-child[data-state="sleeping"] { --tone: var(--color-sleep); border-style: dashed; border-color: color-mix(in srgb, var(--color-sleep) 35%, transparent); }
.fo-child[data-state="done"] { --tone: var(--color-ok); border-color: color-mix(in srgb, var(--color-ok) 35%, transparent); }
.fo-child[data-state="person"] { --tone: var(--color-warn); border-color: color-mix(in srgb, var(--color-warn) 35%, transparent); }
.fo-grand { background: color-mix(in srgb, var(--color-sleep) 5%, var(--color-coal)); }
.fo-c-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.fo-c-id { font-size: 12.5px; font-weight: 600; color: var(--color-paper); min-width: 0; overflow-wrap: anywhere; }
.fo-c-state { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--tone); white-space: nowrap; }
.fo-child[data-state="idle"] .fo-c-state { color: var(--color-dim); }
.fo-child[data-state="working"] .fo-dot { animation: fo-pulse 1.4s ease-out infinite; }
.fo-c-line { margin-top: 8px; min-height: 2.9em; font-size: 12.5px; line-height: 1.45; color: var(--color-ash); }
.fo-c-line.is-swap { animation: fo-swap .4s var(--ease-out-expo); }
@keyframes fo-swap { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.fo-c-result { display: none; margin-top: 8px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent); }
.fo-c-result.is-on { display: inline-block; }
.fo-stack { box-shadow: 0 6px 0 -2px var(--color-coal-2), 0 6px 0 -1px var(--color-line), 0 12px 0 -4px var(--color-coal-2), 0 12px 0 -3px var(--color-line); }
.fo-s-bar { margin-top: 12px; height: 5px; border-radius: 99px; background: rgb(255 255 255 / .08); overflow: hidden; }
.fo-s-fill { display: block; height: 100%; width: 0; background: var(--grad-brand); transition: width .3s; }
.fo-s-n { color: var(--color-paper); font-variant-numeric: tabular-nums; }

.fo.is-static .fo-btn { display: none; }
.fo.is-static *, .fo.is-static { transition: none !important; animation: none !important; }

@container (min-width: 900px) {
  .fo-stem { margin: 0 auto; }
  .fo-row { grid-template-columns: repeat(5, minmax(0, 1fr)); padding-left: 0; padding-top: 24px; align-items: start; }
  .fo-bus { left: calc(10% - 5.6px); right: calc(10% - 5.6px); top: 0; bottom: auto; width: auto; height: 2px; transform: scaleX(0); transform-origin: center; }
  .fo-bus.is-on { transform: none; }
  .fo-drop { position: absolute; left: calc(50% - 1px); top: -24px; width: 2px; height: 24px; transform: scaleY(0); transform-origin: top; }
  .fo-drop.is-on { transform: none; }
  .fo-sub { margin: 18px 0 0 0; }
  .fo-drop-sub { left: calc(50% - 1px); top: -18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) { .fo *, .fo { transition: none !important; animation: none !important; } }
