/* EXP-007 shared request router */
#tail { min-height: 0; display: flex; flex-direction: column; gap: 7px; padding: 9px; color: #f7f0f7; background: #171317; font-family: var(--pixel); }
#tail .route-stage { position: relative; isolation: isolate; flex: 1; min-height: 0; }
#tail .route-wires { position: absolute; z-index: 1; inset: 0; width: 100%; max-width: 100%; height: 100%; overflow: visible; pointer-events: none; }
#tail .route-source { position: relative; z-index: 2; display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 5px 8px; border: 1px solid #b6a9ba; background: #261f29; color: #fff6ff; }
#tail .route-source-label { font: 400 16px/1.2 var(--pixel); }
#tail .route-source-meta { margin-left: auto; color: #c9b9d2; font: 400 12px/1.2 var(--mono); }
#tail .route-source-light { flex: none; width: 9px; height: 9px; background: #2fd9c4; box-shadow: 0 0 0 2px #194c49; }
#tail .route-nodes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; margin: 12px 0 0 36px; }
#tail .route-node { position: relative; z-index: auto; appearance: none; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; gap: 1px 8px; width: 100%; min-width: 0; min-height: 41px; padding: 3px 7px; border: 0; border-radius: 0; background: transparent; color: #f7f0f7; text-align: left; cursor: pointer; }
#tail .route-node::before { position: absolute; z-index: 0; inset: 0; border: 1px solid #4c3c60; background: #211b23; content: ""; pointer-events: none; }
#tail .route-node-copy { position: relative; z-index: 2; grid-column: 2; grid-row: 1; min-width: 0; color: #fff6ff; font: 400 14px/1.15 var(--pixel); }
#tail .route-node-new { display: inline-block; padding: 1px 3px; color: #171317; background: #ffcf4a; font: 400 9px/1.1 var(--mono); vertical-align: 1px; }
#tail .route-node-model { position: relative; z-index: 2; grid-column: 2 / -1; grid-row: 2; min-width: 0; color: #c9bdcb; font: 400 12px/1.2 var(--mono); overflow-wrap: anywhere; }
#tail .route-node-state { position: relative; z-index: 2; grid-column: 3; grid-row: 1; color: #c9bdcb; font: 400 12px/1.2 var(--mono); white-space: nowrap; }
#tail .route-node-mark { position: relative; z-index: 2; grid-column: 1; grid-row: 1 / span 2; align-self: center; width: 8px; height: 8px; border: 1px solid currentColor; background: #4c3c60; }
#tail .route-serving .route-node-mark { color: #2fd9c4; background: #2fd9c4; }
#tail .route-learning .route-node-mark { color: #ffcf4a; background: repeating-conic-gradient(#ffcf4a 0 25%, #211b23 0 50%) 0 0 / 4px 4px; }
#tail .route-drift .route-node-mark { color: #ff62ad; background: #ff62ad; }
#tail .route-training .route-node-mark { color: #ffcf4a; background: #ffcf4a; }
#tail .route-serving .route-node-state { color: #2fd9c4; }
#tail .route-learning .route-node-state,
#tail .route-training .route-node-state { color: #ffcf4a; }
#tail .route-drift .route-node-state,
#tail .route-recheck .route-node-state { color: #ff62ad; }
#tail .route-node:hover::before { border-color: #b6a9ba; background: #302635; }
#tail .route-node:focus-visible { outline: 2px solid #ffcf4a; outline-offset: 2px; }
#tail .route-node.is-current::before { border-color: #2fd9c4; background: #243b38; }
#tail .route-node.route-learning.is-current::before,
#tail .route-node.route-training.is-current::before { border-color: #ffcf4a; background: #393222; }
#tail .route-node.route-drift.is-current::before,
#tail .route-node.route-recheck.is-current::before { border-color: #ff62ad; background: #3c2634; }
#tail .route-node.is-current .route-node-model { color: #fff; }
#tail .route-placeholder { min-height: 41px; display: flex; align-items: center; padding: 4px 8px; border: 1px dashed #75677e; color: #c9bdcb; font: 400 12px/1.25 var(--mono); }
#tail .route-wire { fill: none; stroke: #ffcf4a; stroke-width: 1.5px; stroke-dasharray: 3 3; stroke-linecap: square; stroke-linejoin: miter; }
#tail .route-wire-serving { stroke: #2fd9c4; }
#tail .route-packet { position: absolute; z-index: 3; top: 0; left: 0; width: 0; height: 0; pointer-events: none; }
#tail .route-packet-main { position: absolute; top: -4px; left: -4px; display: block; width: 8px; height: 8px; border: 1px solid #171317; background: #ffcf4a; }
#tail .route-packet-trail { position: absolute; top: -1px; left: -1px; display: block; width: 2px; height: 2px; background: #ffcf4a; opacity: .62; }
#tail .route-packet-trail:last-child { opacity: .36; }
#tail .route-packet-serving .route-packet-main,
#tail .route-packet-serving .route-packet-trail { background: #2fd9c4; }
@media (max-width: 520px) {
  #tail { min-height: 0; padding: 7px; gap: 6px; }
  #tail .route-stage { min-height: 0; }
  #tail .route-nodes { margin-left: 32px; gap: 3px; }
  #tail .route-node { min-height: 41px; padding: 3px 5px; grid-template-columns: 8px minmax(0, 1fr) auto; column-gap: 6px; }
  #tail .route-node-copy { font-size: 14px; }
  #tail .route-node-model { font-size: 12px; }
  #tail .route-node-state { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #tail .route-node { transition: none; }
}
