/* Finite, illustrative sequences. The default state is a complete static demo. */
.pilot-demo.pilot-visual {
  --pd-accent: #45e3df;
  height: 278px;
  background: radial-gradient(ellipse at 50% 35%, rgba(37, 103, 122, .15), transparent 75%), #070e16;
}
.pilot-demo [hidden] { display: none !important; }
.pilot-demo .pd-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 43px; padding: 0 14px; border-bottom: 1px solid rgba(157, 193, 216, .08); }
.pilot-demo .pd-label { display: inline-flex; align-items: center; gap: 6px; color: #8ea5b7; font-size: .61rem; letter-spacing: .035em; white-space: nowrap; }
.pilot-demo .pd-label i { width: 4px; height: 4px; border-radius: 50%; background: var(--pd-accent); box-shadow: 0 0 9px rgba(69, 227, 223, .35); }
.pilot-demo .pd-replay { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px; padding: 0 4px; border: 0; border-radius: 5px; background: transparent; color: #a9bfce; font: inherit; font-size: .63rem; cursor: pointer; }
.pilot-demo .pd-replay span { font-size: 1rem; }
.pilot-demo .pd-replay:hover { color: var(--pd-accent); }
.pilot-demo .pd-replay:focus-visible { outline: 2px solid var(--pd-accent); outline-offset: 2px; }
.pilot-demo .pd-replay:disabled { color: #768d9e; cursor: default; }
.pilot-demo .pd-scene { position: relative; height: 234px; padding: 0 16px; }
.pilot-demo .pd-scene-inner { position: relative; width: 100%; max-width: 340px; height: 100%; margin: auto; }
.pilot-demo .pd-stack { position: absolute; inset: 17px 10px auto; height: 69px; border: 1px solid rgba(112, 158, 186, .12); border-radius: 10px; background: #0c1923; }
.pilot-demo .pd-stack-back { transform: translateY(-8px) rotate(-3deg) scale(.94); opacity: .45; }
.pilot-demo .pd-stack-front { transform: translateY(-4px) rotate(2deg) scale(.97); opacity: .6; }
.pilot-demo .pd-window { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 9px; padding: 12px; border: 1px solid rgba(135, 176, 201, .2); border-radius: 10px; background: linear-gradient(120deg, #122332, #101c29); box-shadow: 0 8px 20px rgba(0, 0, 0, .22); }
.pilot-demo .pd-incoming { top: 18px; min-height: 70px; }
.pilot-demo .pd-avatar, .pilot-demo .pd-folder { flex: 0 0 31px; display: grid; place-items: center; width: 31px; height: 34px; border: 1px solid rgba(129, 163, 241, .2); border-radius: 9px; background: rgba(75, 112, 178, .17); color: #a9c4fa; font-size: .62rem; font-weight: 600; }
.pilot-demo .pd-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pilot-demo .pd-copy strong { color: #e3eff5; font-size: .76rem; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; }
.pilot-demo .pd-overline { color: #8ba6ba; font-size: .54rem; letter-spacing: .08em; line-height: 1.25; text-transform: uppercase; }
.pilot-demo .pd-detail { color: #9cb0bf; font-size: .6rem; line-height: 1.35; }
.pilot-demo .pd-unread { flex: 0 0 4px; width: 4px; height: 4px; margin-left: auto; border-radius: 50%; background: #70a5fc; }
.pilot-demo .pd-connector { position: absolute; left: 50%; width: 1px; height: 16px; background: linear-gradient(transparent, rgba(69, 227, 223, .65)); transform-origin: center top; }
.pilot-demo .pd-connector-one { top: 88px; }
.pilot-demo .pd-connector-two { top: 128px; }
.pilot-demo .pd-decision { position: absolute; top: 103px; left: 50%; display: flex; align-items: center; justify-content: center; gap: 5px; width: max-content; max-width: 100%; min-height: 26px; padding: 4px 9px; border: 1px solid rgba(69, 227, 223, .24); border-radius: 20px; background: #0d242b; color: #b6ebe9; font-size: .6rem; line-height: 1.25; transform: translateX(-50%); }
.pilot-demo .pd-spark { color: var(--pd-accent); font-size: .85rem; }
.pilot-demo .pd-separator { color: #477379; }
.pilot-demo .pd-result { top: 144px; min-height: 64px; border-color: rgba(69, 227, 223, .27); background: linear-gradient(120deg, #112a2e, #10212b); }
.pilot-demo .pd-folder { height: 31px; border-color: rgba(69, 227, 223, .17); background: rgba(69, 227, 223, .09); color: var(--pd-accent); }
.pilot-demo svg { width: 20px; height: 20px; }
.pilot-demo .pd-complete { flex: 0 0 20px; display: grid; place-items: center; width: 20px; height: 20px; margin-left: auto; border-radius: 50%; background: rgba(69, 227, 223, .11); color: var(--pd-accent); font-size: .69rem; }
.pilot-demo .pd-timeline { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #9aafbf; font-size: .55rem; letter-spacing: .025em; }
.pilot-demo .pd-timeline i { width: 14px; height: 1px; background: #335466; }
.pilot-demo.pd-follow { --pd-accent: #94b8ff; background: radial-gradient(ellipse at 50% 35%, rgba(56, 79, 132, .17), transparent 75%), #070e16; }
.pilot-demo.pd-follow .pd-result { border-color: rgba(129, 160, 222, .3); background: linear-gradient(120deg, #17233a, #10212b); }
.pilot-demo.pd-follow .pd-decision { color: #c1d3f8; border-color: rgba(129, 160, 222, .3); background: #152137; }
.pilot-demo.pd-follow .pd-connector { background: linear-gradient(transparent, rgba(148, 184, 255, .6)); }
.pilot-demo .pd-draft-line { color: #d9e5f7; font-size: .73rem; line-height: 1.3; }
.pilot-demo .pd-approval { display: inline-flex; align-items: center; gap: 5px; color: #aec5ee; font-size: .6rem; line-height: 1.5; }
.pilot-demo .pd-approval i { width: 4px; height: 4px; border-radius: 50%; background: #a6bde3; }
.pilot-demo .pd-review-icon { background: transparent; color: #9bb9ec; }
.pilot-demo.is-playing .pd-incoming { animation: pd-incoming 4.8s both; }
.pilot-demo.is-playing .pd-connector-one { animation: pd-connect-first 4.8s both; }
.pilot-demo.is-playing .pd-decision { animation: pd-classify 4.8s both; }
.pilot-demo.is-playing .pd-connector-two { animation: pd-connect-second 4.8s both; }
.pilot-demo.is-playing .pd-result { animation: pd-result 4.8s both; }
.pilot-demo.is-playing .pd-complete { animation: pd-complete 4.8s both; }
.pilot-demo.is-playing .pd-timeline span:nth-of-type(1) { animation: pd-received 4.8s both; }
.pilot-demo.is-playing .pd-timeline span:nth-of-type(2) { animation: pd-classified-label 4.8s both; }
.pilot-demo.is-playing .pd-timeline span:nth-of-type(3) { animation: pd-routed-label 4.8s both; }
.is-paused .pilot-demo.is-playing * { animation-play-state: paused !important; }
@keyframes pd-incoming { 0% { opacity: 0; transform: translate(-18px, -5px) rotate(-2deg); } 16%, 100% { opacity: 1; transform: none; } }
@keyframes pd-connect-first { 0%, 20% { transform: scaleY(0); opacity: 0; } 33%, 100% { transform: scaleY(1); opacity: 1; } }
@keyframes pd-classify { 0%, 29% { opacity: 0; transform: translate(-50%, 4px) scale(.94); } 43%, 100% { opacity: 1; transform: translateX(-50%); } }
@keyframes pd-connect-second { 0%, 45% { transform: scaleY(0); opacity: 0; } 58%, 100% { transform: scaleY(1); opacity: 1; } }
@keyframes pd-result { 0%, 56% { opacity: 0; transform: translateY(14px) scale(.97); } 74%, 100% { opacity: 1; transform: none; } }
@keyframes pd-complete { 0%, 75% { opacity: 0; transform: scale(.6); } 86% { transform: scale(1.12); } 93%, 100% { opacity: 1; transform: scale(1); } }
@keyframes pd-received { 0%, 10% { opacity: .28; } 20%, 100% { opacity: 1; } }
@keyframes pd-classified-label { 0%, 33% { opacity: .28; } 44%, 100% { opacity: 1; } }
@keyframes pd-routed-label { 0%, 68% { opacity: .28; } 80%, 100% { opacity: 1; } }
@media (max-width: 420px) {
  .pilot-demo .pd-scene { padding-inline: 10px; }
  .pilot-demo .pd-toolbar { padding-inline: 10px; }
  .pilot-demo .pd-window { gap: 7px; padding: 10px 8px; }
  .pilot-demo .pd-avatar, .pilot-demo .pd-folder { flex-basis: 27px; width: 27px; }
  .pilot-demo .pd-copy strong { font-size: .69rem; }
  .pilot-demo .pd-detail { font-size: .55rem; }
  .pilot-demo .pd-draft-line { font-size: .65rem; }
  .pilot-demo .pd-complete { flex-basis: 16px; width: 16px; height: 16px; }
  .pilot-demo .pd-timeline { gap: 6px; font-size: .52rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pilot-demo.is-playing * { animation: none !important; }
  .pilot-demo .pd-replay { display: none; }
}
@media (forced-colors: active) {
  .pilot-demo.pilot-visual, .pilot-demo .pd-window, .pilot-demo .pd-decision { border-color: CanvasText; }
  .pilot-demo .pd-connector { background: CanvasText; }
}
