/* Agents live scene (Feature #956). House tokens only (main.css vars; light theme comes from
 * the same vars under [data-theme="light"]), no raw colours — tests/test_design_tokens_audit.py. */
.als-page { max-width: 1240px; margin: 0 auto; padding: 16px 16px 40px; color: var(--text-primary); --als-blue: var(--accent-vibrant-blue); }
.als-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.als-title { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 0 0 4px; color: var(--text-heading); letter-spacing: 0.01em; }
.als-sub { margin: 0; max-width: 62ch; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.45; }
.als-status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-secondary); white-space: nowrap; }
.als-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-secondary); box-shadow: 0 0 0 2px rgba(0,150,255,0.15); }
.als-dot[data-state="live"] { background: var(--accent-cyan); box-shadow: 0 0 8px rgba(0,207,255,0.6); }
.als-dot[data-state="reconnecting"] { background: var(--als-blue); animation: als-blink 1.2s infinite; }
.als-dot[data-state="offline"] { background: var(--text-secondary); opacity: 0.6; box-shadow: none; }
@keyframes als-blink { 50% { opacity: 0.25; } }
.als-sep { opacity: 0.5; margin: 0 2px; }

.als-stage { position: relative; height: min(68vh, 720px); height: min(68dvh, 720px); min-height: 320px; border-radius: 14px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, var(--bg-tertiary) 0%, var(--bg-secondary) 45%, var(--bg-primary) 100%);
  border: 1px solid rgba(0,150,255,0.15); touch-action: none; }
.als-stage canvas { display: block; width: 100%; height: 100%; }
.als-empty { position: absolute; inset: auto 0 14px 0; text-align: center; font-size: 0.85rem; color: var(--text-secondary); pointer-events: none; }
.als-toast { position: absolute; left: 12px; top: 12px; max-width: min(70%, 420px); padding: 8px 12px; border-radius: 10px;
  background: var(--bg-panel); border: 1px solid rgba(0,150,255,0.25); color: var(--text-primary); font-size: 0.85rem; line-height: 1.35;
  opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s; pointer-events: none; backdrop-filter: blur(6px); }
.als-toast.on { opacity: 1; transform: none; }
.als-toast b { color: var(--accent-cyan); font-weight: 600; }
.als-toast[data-tone="positive"] b { color: var(--positive-color); }
.als-toast[data-tone="negative"] b { color: var(--negative-color); }
.als-toast[data-tone="blue"] b { color: var(--als-blue); }

.als-under { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 16px; margin-top: 16px; }
.als-h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); margin: 0 0 8px; font-weight: 600; }
.als-legend, .als-feed { background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px 14px; }
.als-legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.9rem; }
.als-legend-list li { display: flex; align-items: center; gap: 10px; }
.als-sw { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.als-sw-accent { background: var(--accent-cyan); box-shadow: 0 0 8px rgba(0,207,255,0.6); }
.als-sw-blue { background: var(--als-blue); box-shadow: 0 0 8px rgba(0,170,255,0.6); }
.als-sw-positive { background: var(--positive-color); box-shadow: 0 0 8px rgba(0,255,136,0.6); }
.als-sw-negative { background: var(--negative-color); box-shadow: 0 0 8px rgba(255,68,68,0.6); }
.als-sw-ring { background: transparent; border: 2px solid var(--accent-cyan); }
.als-dim { color: var(--text-secondary); font-size: 0.82rem; margin: 10px 0 0; }
.als-feed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.88rem; max-height: 260px; overflow: auto; }
.als-feed-list li { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--border-color); }
.als-feed-list li:last-child { border-bottom: 0; }
.als-feed-list i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-cyan); transform: translateY(-1px); }
.als-feed-list li[data-tone="positive"] i { background: var(--positive-color); }
.als-feed-list li[data-tone="negative"] i { background: var(--negative-color); }
.als-feed-list li[data-tone="blue"] i { background: var(--als-blue); }
.als-feed-list b { font-weight: 600; color: var(--text-heading); }
.als-feed-list time { color: var(--text-secondary); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.als-pack { margin-top: 14px; }
.als-pack code { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-cyan); }
.als-pack a { color: var(--accent-cyan); text-decoration: none; }
.als-pack a:hover { text-decoration: underline; }

[data-theme="light"] .als-stage { border-color: var(--border-color); }
[data-theme="light"] .als-toast { border-color: var(--border-color); }
[data-theme="light"] .als-sw-accent, [data-theme="light"] .als-sw-blue, [data-theme="light"] .als-sw-positive, [data-theme="light"] .als-sw-negative { box-shadow: none; }

@media (max-width: 760px) {
  .als-under { grid-template-columns: 1fr; }
  .als-stage { height: 58vh; height: 58dvh; min-height: 300px; border-radius: 10px; }
  .als-head { align-items: flex-start; }
  .als-toast { max-width: calc(100% - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  .als-dot[data-state="reconnecting"] { animation: none; }
  .als-toast { transition: none; }
}
