/* Shared sync notice and probe state, using Relay's existing theme tokens. */
body .live-sync-banner{
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;
  gap:14px;margin:0 4vw 16px;padding:16px 18px;border:1px solid var(--line);
  border-radius:8px;background:#181918;color:#edf4ec;
}
body[data-theme=terminal] .live-sync-banner{margin-inline:3vw}
body[data-theme=cyber] .live-sync-banner{background:#17191b;color:#eef0f3;border-color:#414348}
.live-sync-copy{min-width:0}
.live-sync-copy strong{font-size:17px}
.live-sync-copy p{display:flex;flex-wrap:wrap;gap:2px 14px;color:#b5bdb7}
.live-sync-icon{
  display:grid;place-items:center;width:28px;height:28px;border:1px solid #73464b;
  border-radius:50%;background:#2c1d20;color:#ff969f;font-weight:700;
}
.live-sync-banner:not([data-state=failed]) .live-sync-icon{visibility:hidden}
.live-sync-retry{padding:8px 12px;min-height:44px;border:1px solid #46504a;border-radius:6px;background:#222923;color:#edf4ec}
.live-sync-retry:hover{background:#2e3a31}
.live-sync-retry[aria-disabled=true]{cursor:progress;color:#b5bdb7}
.live-sync-retry[hidden]{display:none}
.live-empty-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.live-empty-grid .workspace-chart{padding:16px 18px}
.live-empty-grid p,.live-timeout-reading{margin-top:6px}
.live-timeout-reading{display:block;color:var(--danger)}
.live-trend .live-timeout-marker path{fill:none;stroke:var(--danger);stroke-width:2;vector-effect:non-scaling-stroke}
.live-trend .live-crosshair{display:none;stroke:var(--accent);stroke-width:1;stroke-dasharray:3 3;vector-effect:non-scaling-stroke}
body[data-motion=on] .live-trend .live-crosshair{display:inline}
body[data-motion=on] .live-point.selected-point{stroke:var(--accent);stroke-width:2}
@media(max-width:600px){
  body .live-sync-banner{grid-template-columns:auto minmax(0,1fr);align-items:start;padding:14px}
  .live-sync-retry{grid-column:2;justify-self:start}
  .live-empty-grid{grid-template-columns:1fr}
}

/* Decorations sit behind visible content and never receive pointer events. */
.relay-effect-surface{position:relative;isolation:isolate}
.relay-effect-surface > .relay-decoration{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:-1;border-radius:inherit}
.relay-decoration > span{position:absolute;pointer-events:none}
.relay-motion-text{position:relative;display:inline-block;font-variant-numeric:tabular-nums}
.relay-motion-text[data-relay-text-active]{color:transparent!important}
.relay-motion-text .relay-text-overlay{position:absolute;inset:0;color:var(--relay-overlay-color);white-space:nowrap;pointer-events:none}
.relay-motion-text[data-relay-text-active="odometer"]{overflow:hidden}
.relay-motion-text[data-relay-text-active="odometer"] .relay-text-overlay{animation:relay-odometer 135ms ease-out}
.relay-decoration .relay-crt{
  inset:0;background:repeating-linear-gradient(transparent 0 3px,#7cff8310 3px 4px);
}
.relay-decoration .relay-crt::after,.relay-decoration .relay-grid::after{
  content:"";position:absolute;inset:-25% 0 auto;height:25%;background:linear-gradient(transparent,currentColor,transparent);
  opacity:.14;animation:relay-scan 8s linear infinite;
}
.relay-crt{color:#7cff83}
.relay-decoration .relay-characters{right:5%;top:8%;font:600 13px/1.7 Consolas,monospace;white-space:pre;color:#7cff83;opacity:.12;animation:relay-characters 2s steps(2,end) infinite alternate}
.relay-decoration .relay-grid{
  inset:0;color:#31eef0;background-image:linear-gradient(#30eeff10 1px,transparent 1px),linear-gradient(90deg,#30eeff10 1px,transparent 1px);background-size:24px 24px;
}
.relay-decoration .relay-radar{
  inset:auto 16px 12px auto;width:56px;aspect-ratio:1;border:1px solid currentColor;border-radius:50%;opacity:.38;color:var(--accent);
  background:radial-gradient(circle at 64% 34%,currentColor 0 2px,transparent 3px),radial-gradient(circle at 33% 67%,currentColor 0 1px,transparent 2px);
}
.relay-radar::after{content:"";position:absolute;inset:0;border-radius:50%;background:conic-gradient(transparent 73%,currentColor);animation:relay-turn 6s linear infinite;opacity:.55}
.relay-decoration .relay-heartbeat{
  inset:auto 16px 12px auto;width:124px;height:28px;color:var(--good);background:currentColor;opacity:.46;
  clip-path:polygon(0% 54%,30% 54%,38% 45%,44% 53%,50% 15%,56% 82%,63% 52%,100% 52%,100% 60%,64% 60%,56% 94%,50% 35%,45% 62%,38% 53%,31% 62%,0% 62%);
  animation:relay-beat 2.7s ease-out infinite;
}
.relay-decoration .relay-spotlight{inset:0;background:radial-gradient(140px at var(--relay-x,50%) var(--relay-y,50%),#ffffff16,transparent);opacity:0}
.relay-decoration .relay-glare{inset:0;background:linear-gradient(115deg,transparent 40%,#ffffff1a 50%,transparent 60%);transform:translateX(-100%)}
.relay-decoration .relay-electric{inset:0;border:1px solid #ff969f80;border-radius:inherit;box-shadow:inset 0 0 12px #ff66762e;animation:relay-arc 1.5s linear infinite}
.relay-effect-surface:not(.relay-effect-visible) .relay-decoration *,
.relay-effect-surface:not(.relay-effect-visible) .relay-decoration *::after,
html[data-relay-hidden] .relay-decoration *,html[data-relay-hidden] .relay-decoration *::after{animation-play-state:paused!important}
@media(hover:hover) and (pointer:fine){
  body[data-motion=on] .relay-effect-surface:hover .relay-spotlight{opacity:1}
  body[data-motion=on] .relay-effect-surface:hover .relay-glare{animation:relay-glare .55s ease-out both}
}
body[data-motion=off] .relay-decoration{display:none}
body[data-motion=on] .live-sync-banner[data-sync-feedback][aria-busy=true] .live-sync-copy strong{animation:relay-shiny 1.2s ease-in-out 3}
body[data-motion=on][data-theme=terminal] .live-sync-banner[data-sync-feedback][aria-busy=true] .live-sync-icon{visibility:visible;color:var(--accent);border-color:var(--line);background:transparent;animation:relay-turn 1s linear 3}
@keyframes relay-scan{to{transform:translateY(500%)}}
@keyframes relay-characters{to{transform:translateY(8px);opacity:.04;text-shadow:14px 0 currentColor}}
@keyframes relay-turn{to{transform:rotate(1turn)}}
@keyframes relay-beat{0%{clip-path:inset(0 100% 0 0)}75%,100%{opacity:.2}65%,100%{clip-path:inset(0)}}
@keyframes relay-glare{to{transform:translateX(100%)}}
@keyframes relay-arc{0%,100%{border-color:#ff969f80 #ff969f20 #ff969f40 #ff969f20}25%{border-color:#ff969f20 #ff969f80 #ff969f20 #ff969f40}50%{border-color:#ff969f40 #ff969f20 #ff969f80 #ff969f20}75%{border-color:#ff969f20 #ff969f40 #ff969f20 #ff969f80}}
@keyframes relay-shiny{50%{text-shadow:0 0 12px currentColor}}
@keyframes relay-odometer{from{transform:translateY(36%)}to{transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){
  .relay-decoration{display:none}
  .live-sync-banner *{animation:none!important}
}
.live-sync-banner{position:relative}
.live-sync-sparks{position:absolute;right:40px;top:50%;pointer-events:none}
.live-sync-sparks i{position:absolute;width:4px;height:4px;background:var(--good);border-radius:50%}
body[data-motion=off] .live-sync-sparks{display:none}
.live-sync-checks{display:flex;gap:14px;color:var(--accent);font-variant-numeric:tabular-nums}
body[data-motion=off] .live-sync-checks,body[data-theme=cyber] .live-sync-checks{display:none}
body .live-active-issues,body .workspace-alert.alert-active{background:#181918;color:#edf4ec;border:1px solid #4c3639;border-radius:8px}
.live-active-issues strong,.workspace-alert.alert-active h3{color:#ff969f}
.relay-effect-surface .watch-reading.relay-motion-text{display:block}

.relay-characters::after{content:"7C 42 EB 1A 00";position:absolute;inset:0;color:var(--green,#7cff83);opacity:.7;animation:relay-matrix 1.1s steps(1,end) infinite}
@keyframes relay-matrix{0%{transform:translate(25%,0)}33%{content:"A4 3B 60 00 B1";transform:translate(8%,100%)}66%{content:"D3 F1 09 EA 2B";transform:translate(18%,200%)}}

body[data-relay-sync=failed] .relay-heartbeat,body[data-relay-sync=failed] .relay-radar{display:none}
