:root {
  --bg: #030814;
  --bg-2: #061028;
  --panel: rgba(9, 21, 46, 0.78);
  --panel-2: rgba(12, 28, 60, 0.7);
  --line: rgba(70, 140, 255, 0.14);
  --line-2: rgba(70, 140, 255, 0.24);
  --line-hi: rgba(34, 211, 238, 0.45);
  --text: #e7eefb;
  --text-2: #b7c7e3;
  --muted: #7f93b5;
  --faint: #52668b;
  --blue: #2f6bff;
  --blue-2: #5b93ff;
  --cyan: #22d3ee;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --idle: #7f93b5;
  --radius: 14px;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(1100px 600px at 70% -10%, rgba(47, 107, 255, 0.16), transparent 60%),
    radial-gradient(800px 500px at 0% 100%, rgba(34, 211, 238, 0.07), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 55%);
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(91, 147, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 147, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000, transparent 80%);
}
.sprite { display: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); font-size: 0.92em; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }

/* ---------- shell ---------- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px;
  padding: 22px 16px; background: rgba(4, 10, 24, 0.82); border-right: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 14px; border-bottom: 1px solid var(--line); }
.brand img { filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.45)); }
.brand-name { font: 700 16px/1.1 var(--display); letter-spacing: 0.24em; }
.brand-name span { color: var(--cyan); }
.brand-sub { margin-top: 4px; color: var(--muted); font-size: 10.5px; letter-spacing: 0.26em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--text-2); text-decoration: none; border: 1px solid transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.nav a:hover { background: rgba(47, 107, 255, 0.08); color: var(--text); }
.nav a.active {
  color: #fff; background: linear-gradient(90deg, rgba(47, 107, 255, 0.24), rgba(47, 107, 255, 0.04));
  border-color: rgba(91, 147, 255, 0.3);
}
.nav a.active::before {
  content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan);
}
.nav a.active svg { color: var(--cyan); }
.nav em {
  margin-left: auto; font: 600 11px var(--mono); font-style: normal; color: var(--blue-2);
  padding: 1px 7px; border-radius: 999px; background: rgba(47, 107, 255, 0.14); border: 1px solid rgba(47, 107, 255, 0.28);
}
.nav em:empty { display: none; }

.side-card { margin-top: auto; padding: 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.side-card-head { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.side-card-head svg { width: 14px; height: 14px; color: var(--cyan); }
.side-card-value { margin-top: 8px; font-weight: 600; overflow-wrap: anywhere; }
.side-card-sub { margin-top: 2px; color: var(--faint); font-size: 12px; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 20px;
  padding: 14px 28px; background: rgba(3, 8, 20, 0.74); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  color: var(--text-2); background: var(--panel-2); border: 1px solid var(--line-2);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-hi); }
.icon-btn.menu-btn { display: none; }
.crumb { color: var(--muted); font-size: 11.5px; letter-spacing: 0.08em; }
.title-block h1 { margin: 2px 0 0; font: 650 21px/1.2 var(--display); letter-spacing: 0.01em; }
.top-center { text-align: center; }
.clock { font: 600 22px/1 var(--mono); letter-spacing: 0.06em; color: #dbe8ff; text-shadow: 0 0 18px rgba(47, 107, 255, 0.45); }
.date { margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.top-right { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  font-size: 12px; color: var(--text-2); background: var(--panel-2); border: 1px solid var(--line-2);
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.chip.ok i, .dot-ok { background: var(--ok); box-shadow: 0 0 10px rgba(52, 211, 153, 0.8); }
.chip.warn i { background: var(--warn); box-shadow: 0 0 10px rgba(251, 191, 36, 0.7); }
.chip.bad i { background: var(--bad); box-shadow: 0 0 10px rgba(248, 113, 113, 0.7); }
.chip.active i { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

.banner { margin: 16px 28px 0; padding: 12px 16px; border-radius: 12px; color: #fecaca; background: rgba(127, 29, 29, 0.28); border: 1px solid rgba(248, 113, 113, 0.4); }
.views { padding: 24px 28px 8px; flex: 1; }
.view-intro { margin: 0 0 18px; color: var(--muted); max-width: 760px; }

/* ---------- panels ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }

.panel {
  position: relative; min-width: 0; padding: 18px 18px 18px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 40px -28px rgba(0, 0, 0, 0.9);
}
.panel::after {
  content: ""; position: absolute; top: -1px; left: 18px; width: 64px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
.panel + .panel { margin-top: 16px; }
.grid .panel + .panel { margin-top: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font: 600 11.5px var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-2); }
.tag {
  font: 600 11px var(--mono); padding: 3px 8px; border-radius: 6px; white-space: nowrap;
  color: #a9c4ff; background: rgba(47, 107, 255, 0.12); border: 1px solid rgba(47, 107, 255, 0.28);
}
.tag-live { color: #a7f3d0; background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.35); }
.panel-link, .panel-link-inline { color: var(--blue-2); text-decoration: none; font-size: 12.5px; }
.panel-link { display: inline-block; margin-top: 12px; }
.panel-link:hover, .panel-link-inline:hover { color: var(--cyan); }

/* status pills */
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--idle); }
.state.ok, .state.available { color: #86efac; } .state.ok::before, .state.available::before { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.state.active { color: #a5f3fc; } .state.active::before { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.state.idle { color: var(--text-2); }
.state.warn { color: #fde68a; } .state.warn::before { background: var(--warn); }
.state.bad, .state.unavailable, .state.error, .state.denied, .state.refused { color: #fca5a5; }
.state.bad::before, .state.error::before, .state.denied::before, .state.refused::before { background: var(--bad); }
.state.unavailable { color: var(--muted); } .state.unavailable::before { background: transparent; border: 1px solid var(--faint); }

/* core systems list */
.syslist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.syslist li {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 9px 12px;
  border-radius: 10px; background: rgba(5, 13, 31, 0.6); border: 1px solid var(--line);
}
.sys-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--blue-2); background: rgba(47, 107, 255, 0.12); border: 1px solid rgba(47, 107, 255, 0.24); }
.sys-name { font-weight: 600; }
.sys-sub { color: var(--faint); font-size: 12px; }

/* hero / core: the CORDELL core visualization. Every rule is scoped to .panel-hero; its state comes
   from data-state, set from real run records (static/core.js). Pulses (SVG SMIL) only show while runs are active. */
.panel-hero { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, rgba(47, 107, 255, 0.20), transparent 60%),
              radial-gradient(circle at 50% 40%, rgba(3, 8, 20, 0.6), transparent 80%), var(--panel); }
.panel-hero .core-stage { width: min(360px, 92%); aspect-ratio: 1; margin-top: -14px; }
/* reset the global icon rule (svg { stroke: currentColor; ... }) so only explicitly styled shapes draw lines */
.panel-hero .core-svg { width: 100%; height: 100%; overflow: visible; display: block; stroke: none; stroke-width: 1; fill: none; }
.panel-hero .cg-source-ring { fill: none; stroke: rgba(120, 190, 255, 0.16); stroke-width: 0.8; stroke-dasharray: 1 7; }
.panel-hero .cg-spoke { fill: none; stroke: rgba(34, 211, 238, 0.07); stroke-width: 0.7; transition: stroke 0.8s; }
.panel-hero .cg-source { fill: rgba(159, 233, 255, 0.35); transition: fill 0.8s; }
.panel-hero .cg-orbit path { fill: none; stroke: rgba(126, 186, 255, 0.38); stroke-width: 0.9; }
.panel-hero .cg-chord { stroke: rgba(126, 186, 255, 0.14); stroke-width: 0.6; }
.panel-hero .cg-node { fill: #a5eaff; opacity: 0.8; transition: opacity 0.8s; filter: drop-shadow(0 0 3px rgba(34, 211, 238, 0.8)); }
.panel-hero .cg-spin { transform-box: view-box; transform-origin: 200px 200px; animation: cg-spin 170s linear infinite; }
.panel-hero .cg-spin.s2 { animation-duration: 230s; animation-direction: reverse; }
.panel-hero .cg-spin.s3 { animation-duration: 140s; }
.panel-hero .cg-spin.s4 { animation-duration: 300s; }
.panel-hero .cg-ring { fill: none; stroke: rgba(91, 147, 255, 0.16); stroke-width: 0.7; }
.panel-hero .cg-axis { fill: none; stroke: rgba(91, 147, 255, 0.09); stroke-width: 0.6; }
.panel-hero .cg-link { stroke: rgba(103, 220, 242, 0.13); stroke-width: 0.5; transition: stroke 0.8s; }
.panel-hero .cg-dot { fill: #8ee9fb; opacity: 0.45; transition: opacity 0.8s; }
.panel-hero .cg-sat { stroke: rgba(201, 247, 255, 0.55); stroke-width: 0.6; opacity: 0.85; }
.panel-hero .cg-node.bright { fill: #ffffff; opacity: 0.9; }
.panel-hero .cg-rays { fill: none; stroke: rgba(201, 247, 255, 0.28); stroke-width: 0.7; transition: stroke 0.8s; }
.panel-hero .cg-pulse { fill: #c9f7ff; opacity: 0; transition: opacity 0.6s; }
.panel-hero[data-state="working"] .cg-dot,
.panel-hero[data-state="researching"] .cg-dot { opacity: 0.85; }
.panel-hero[data-state="working"] .cg-link,
.panel-hero[data-state="researching"] .cg-link { stroke: rgba(103, 220, 242, 0.28); }
.panel-hero[data-state="working"] .cg-rays,
.panel-hero[data-state="researching"] .cg-rays { stroke: rgba(201, 247, 255, 0.6); }
.panel-hero[data-state="error"] .cg-rays { stroke: rgba(251, 191, 36, 0.35); }
.panel-hero .cg-wait { fill: none; stroke: rgba(165, 220, 255, 0.75); stroke-width: 1.4; stroke-dasharray: 4 9; opacity: 0;
  transform-box: view-box; transform-origin: 200px 200px; transition: opacity 0.6s; }
.panel-hero .cg-done { fill: none; stroke: rgba(110, 231, 183, 0.8); stroke-width: 1.2; opacity: 0;
  transform-box: view-box; transform-origin: 200px 200px; }
.panel-hero .cg-core-glow { transform-box: view-box; transform-origin: 200px 200px; animation: cg-breathe 7s ease-in-out infinite;
  transition: opacity 0.8s; }
.panel-hero .cg-core-ring { fill: none; stroke: rgba(103, 220, 242, 0.75); stroke-width: 1.1; transition: stroke 0.8s; }
.panel-hero .cg-core-ring.inner { stroke: rgba(103, 220, 242, 0.3); stroke-width: 0.7; }
.panel-hero .cg-emblem { fill: none; stroke: #eafcff; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.7)); transition: stroke 0.8s; }

/* working: data flowing around the orbits */
.panel-hero[data-state="working"] .cg-pw { opacity: 0.95; }
.panel-hero[data-state="working"] .cg-node,
.panel-hero[data-state="researching"] .cg-node { opacity: 1; }
.panel-hero[data-state="working"] .cg-spin,
.panel-hero[data-state="researching"] .cg-spin { animation-duration: 70s; }
.panel-hero[data-state="working"] .cg-spin.s2,
.panel-hero[data-state="researching"] .cg-spin.s2 { animation-duration: 95s; }
.panel-hero[data-state="working"] .cg-core-glow,
.panel-hero[data-state="researching"] .cg-core-glow { animation-duration: 3.2s; }
/* researching: sources feeding the core */
.panel-hero[data-state="researching"] .cg-pr { opacity: 0.95; }
.panel-hero[data-state="researching"] .cg-pw { opacity: 0.45; }
.panel-hero[data-state="researching"] .cg-spoke { stroke: rgba(34, 211, 238, 0.32); }
.panel-hero[data-state="researching"] .cg-source { fill: rgba(201, 247, 255, 0.95); }
/* queued: waiting, clearly not working */
.panel-hero[data-state="queued"] .cg-wait { opacity: 0.9; animation: cg-spin 14s linear infinite; }
.panel-hero[data-state="queued"] .cg-core-glow { opacity: 0.7; animation-duration: 10s; }
/* completed: one restrained ring, then back to idle on the next status update */
.panel-hero[data-state="completed"] .cg-done { animation: cg-done 2.6s ease-out 1 forwards; }
.panel-hero[data-state="completed"] .cg-core-ring { stroke: rgba(110, 231, 183, 0.85); }
/* error: nothing moves, warning colour */
.panel-hero[data-state="error"] .cg-core-ring { stroke: rgba(251, 191, 36, 0.85); }
.panel-hero[data-state="error"] .cg-emblem { stroke: #fde68a; filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6)); }
.panel-hero[data-state="error"] .cg-core-glow { opacity: 0.45; animation: none; }
/* unavailable / loading / neutral: dim and still, never implying work */
.panel-hero[data-state="unavailable"] .core-svg { filter: grayscale(1); opacity: 0.45; }
.panel-hero[data-state="loading"] .core-svg,
.panel-hero[data-state="neutral"] .core-svg { opacity: 0.7; }
.panel-hero[data-state="error"] .cg-spin,
.panel-hero[data-state="unavailable"] .cg-spin,
.panel-hero[data-state="unavailable"] .cg-core-glow,
.panel-hero[data-state="loading"] .cg-spin { animation-play-state: paused; }

.hero-text { margin-top: -10px; text-align: center; position: relative; }
.hero-eyebrow { color: var(--cyan); font: 600 11px var(--mono); letter-spacing: 0.4em; text-transform: uppercase; }
.hero-title { margin-top: 4px; font: 700 34px/1 var(--display); letter-spacing: 0.32em; padding-left: 0.32em;
  background: linear-gradient(180deg, #ffffff, #8db5ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-state { margin-top: 10px; font-weight: 600; color: var(--text-2); }
.panel-hero[data-state="working"] .hero-state,
.panel-hero[data-state="researching"] .hero-state { color: #a5f3fc; }
.panel-hero[data-state="completed"] .hero-state { color: #86efac; }
.panel-hero[data-state="error"] .hero-state { color: #fde68a; }
.panel-hero[data-state="unavailable"] .hero-state { color: #fca5a5; }
.hero-meta { margin-top: 4px; color: var(--faint); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes cg-spin { to { transform: rotate(360deg); } }
@keyframes cg-breathe { 0%, 100% { opacity: 0.78; transform: scale(0.98); } 50% { opacity: 1; transform: scale(1.03); } }
@keyframes cg-done { 0% { opacity: 0.85; transform: scale(1); } 100% { opacity: 0; transform: scale(2.7); } }
@keyframes pulse { 50% { opacity: 0.45; } }
/* reduced motion: a still picture; the state shows through colour, which parts are lit, and the text */
@media (prefers-reduced-motion: reduce) {
  .panel-hero .cg-pulse { display: none; }
  .panel-hero[data-state="completed"] .cg-done { opacity: 0.5; transform: scale(1.35); }
  .panel-hero[data-state="queued"] .cg-wait { opacity: 0.9; }
}

/* feed */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.feed li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 10px; border-radius: 9px; background: rgba(5, 13, 31, 0.55); border: 1px solid var(--line); }
.feed .f-title { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .f-time { color: var(--faint); font: 11px var(--mono); }
.feed .state { grid-column: 1 / -1; }

/* agents */
.agents { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 12px; }
.agent {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; min-height: 132px;
  background: rgba(5, 13, 31, 0.6); border: 1px solid var(--line); transition: border-color 0.2s, transform 0.2s;
}
.agent:hover { border-color: var(--line-hi); transform: translateY(-2px); }
.agent.unavailable { opacity: 0.72; }
.agent-head { display: flex; align-items: center; gap: 10px; }
.agent-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; }
.agent-icon svg { width: 19px; height: 19px; }
.agent.coding .agent-icon { color: #7dd3fc; background: rgba(14, 165, 233, 0.12); border: 1px solid rgba(14, 165, 233, 0.3); }
.agent.research .agent-icon { color: #93c5fd; background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.3); }
.agent.strategy .agent-icon { color: #a5b4fc; background: rgba(99, 102, 241, 0.12); border: 1px solid rgba(99, 102, 241, 0.3); }
.agent.pm .agent-icon { color: #67e8f9; background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.3); }
.agent-name { font-weight: 650; }
.agent-backend { color: var(--faint); font-size: 11.5px; }
.agent-detail { color: var(--muted); font-size: 12.5px; }
.agent-last { margin-top: auto; color: var(--faint); font: 11px var(--mono); }
.agents-full .agent { min-height: 170px; padding: 18px; cursor: pointer; }
.agents-full .agent:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.agent.selected { border-color: var(--cyan); }
.agent.blocked { opacity: 0.85; }
.agent-meta { color: var(--muted); font-size: 11.5px; }
.state.running { color: #a5f3fc; } .state.running::before { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.state.blocked { color: #fde68a; } .state.blocked::before { background: var(--warn); }
.agent-detail { display: grid; gap: 14px; }
.agent-detail[hidden] { display: none; }
.agent-reason { color: var(--muted); padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line-hi); }
.agent-form input[type="text"] { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); font: 13px var(--sans); }
.agent-result { display: grid; gap: 10px; padding: 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); }
.agent-verified { color: #86efac; font-size: 12.5px; }
.agent-unverified { color: #fde68a; font-size: 12.5px; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--panel-2); }

/* kv */
.kv { margin: 0; display: grid; gap: 9px; }
.kv div { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 8px; border-bottom: 1px dashed rgba(82, 102, 139, 0.3); min-width: 0; }
.kv div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv dt { color: var(--muted); flex: none; }
.kv dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* repos */
.repo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.repo-list li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(5, 13, 31, 0.55); border: 1px solid var(--line); min-width: 0; }
.repo-list .r-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-list .r-branch { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--faint); font: 11.5px var(--mono); white-space: nowrap; }
.repo-list .r-branch svg { width: 13px; height: 13px; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 12px; }
.timeline li { position: relative; display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; padding-left: 14px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--blue-2); box-shadow: 0 0 8px rgba(91, 147, 255, 0.8); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 3px; top: calc(50% + 6px); height: calc(100% + 6px); width: 1px; background: var(--line-2); }
.timeline .t-time { color: var(--faint); font: 11.5px var(--mono); }
.timeline .t-name { font-weight: 600; font-family: var(--mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* gauges */
.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gauge { display: grid; justify-items: center; gap: 6px; }
.gauge svg { width: 84px; height: 84px; stroke-width: 7; transform: rotate(-90deg); }
.gauge .g-track { stroke: rgba(91, 147, 255, 0.14); }
.gauge .g-val { stroke: var(--blue); stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; filter: drop-shadow(0 0 4px rgba(47, 107, 255, 0.7)); }
.gauge.cyan .g-val { stroke: var(--cyan); filter: drop-shadow(0 0 4px rgba(34, 211, 238, 0.7)); }
.gauge.hot .g-val { stroke: var(--warn); }
.gauge-wrap { position: relative; }
.gauge-num { position: absolute; inset: 0; display: grid; place-items: center; font: 600 15px var(--mono); }
.gauge-label { color: var(--muted); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 14px; margin-bottom: 16px; }
.tile { padding: 16px 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.tile-num { font: 650 28px/1.1 var(--display); color: #fff; }
.tile-label { margin-top: 4px; color: var(--muted); font-size: 12px; letter-spacing: 0.06em; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; padding: 8px 10px; color: var(--faint); font-weight: 600; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tbody tr:hover { background: rgba(47, 107, 255, 0.06); }
.table td.mono { color: var(--text-2); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter {
  font: 600 12px var(--sans); padding: 6px 12px; border-radius: 999px; cursor: pointer;
  color: var(--text-2); background: var(--panel-2); border: 1px solid var(--line-2);
}
.filter:hover { border-color: var(--line-hi); color: var(--text); }
.filter[aria-pressed="true"] { color: #fff; background: rgba(47, 107, 255, 0.28); border-color: rgba(91, 147, 255, 0.55); }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font: 12px var(--mono); padding: 4px 9px; border-radius: 7px; color: #c7d7f5; background: rgba(76, 141, 255, 0.08); border: 1px solid rgba(76, 141, 255, 0.2); }

/* empty / loading */
.empty { padding: 18px; text-align: center; color: var(--faint); font-size: 13px; border: 1px dashed var(--line-2); border-radius: 10px; list-style: none; }
td.empty { border-radius: 0; border-left: 0; border-right: 0; }
.skeleton { height: 40px; border-radius: 10px; background: linear-gradient(90deg, rgba(47, 107, 255, 0.06), rgba(47, 107, 255, 0.14), rgba(47, 107, 255, 0.06)); background-size: 200% 100%; animation: shimmer 1.4s infinite; list-style: none; }
@keyframes shimmer { to { background-position: -200% 0; } }

.foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 16px 28px; color: var(--faint); font-size: 12px; letter-spacing: 0.06em; }
.foot .sep { opacity: 0.4; }
.foot-right { margin-left: auto; }
.scrim { display: none; }

/* ---------- sign-in ---------- */
#signout { margin: 0; }
.signout-btn {
  padding: 6px 12px; border-radius: 999px; font: 12px var(--sans); color: var(--text-2); cursor: pointer;
  background: transparent; border: 1px solid var(--line-2);
}
.signout-btn:hover, .signout-btn:focus-visible { color: var(--text); border-color: var(--line-hi); outline: none; }
.login-body { display: grid; place-items: center; min-height: 100%; padding: 24px 16px; }
.login-card {
  position: relative; z-index: 1; width: min(380px, 100%); padding: 32px 28px; text-align: center;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 0 60px rgba(47, 107, 255, 0.12);
}
.login-logo { display: block; margin: 0 auto 12px; }
.login-card h1 { margin: 0; font: 600 20px/1.2 var(--display); letter-spacing: 0.14em; }
.login-sub { margin: 6px 0 20px; color: var(--muted); font-size: 12.5px; }
.login-msg {
  margin: 0 0 16px; padding: 8px 12px; border-radius: 10px; font-size: 13px; color: var(--bad);
  background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.3);
}
.login-form { display: grid; gap: 14px; text-align: left; }
.login-form label { display: grid; gap: 6px; font-size: 12px; color: var(--text-2); }
.login-form input {
  padding: 10px 12px; border-radius: 10px; font: 15px var(--sans); color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-2);
}
.login-form input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15); }
.login-form button {
  margin-top: 6px; padding: 11px; border: 0; border-radius: 10px; cursor: pointer;
  font: 600 14px var(--sans); color: #fff; background: linear-gradient(90deg, var(--blue), var(--cyan));
}
.login-form button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.login-foot { margin: 18px 0 0; color: var(--faint); font-size: 11.5px; }

/* ---------- chat ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.new-chat-btn, .btn-primary {
  display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; font: 600 12.5px var(--sans);
  color: #fff; background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: 999px; padding: 7px 14px;
}
.new-chat-btn svg, .btn-primary svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.new-chat-btn:focus-visible, .btn-primary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.chat-layout {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px;
  height: calc(100vh - 190px); min-height: 460px;
}
.chat-side {
  display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.chat-side .btn-primary { justify-content: center; border-radius: 10px; padding: 10px; }
.chat-side-head { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-top: 4px; }
.conv-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; display: grid; align-content: start; gap: 4px; }
.conv {
  width: 100%; text-align: left; display: grid; gap: 2px; padding: 9px 10px; border-radius: 9px; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--text-2); font: 13px var(--sans);
}
.conv:hover, .conv:focus-visible { background: var(--panel-2); border-color: var(--line-2); outline: none; }
.conv.active { background: var(--panel-2); border-color: var(--line-hi); color: var(--text); }
.conv-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-meta { font-size: 11px; color: var(--faint); }
.chat-usage { font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.chat-usage.warn { color: #fde68a; }

.chat-main { display: flex; flex-direction: column; min-height: 0; gap: 10px; }
.chat-thread {
  flex: 1; min-height: 0; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.chat-welcome { margin: auto; text-align: center; max-width: 520px; padding: 24px 8px; }
.chat-welcome h2 { margin: 0 0 6px; font: 600 24px/1.2 var(--display); letter-spacing: 0.02em; }
.chat-welcome p { margin: 0 0 16px; color: var(--text-2); }
.chat-caps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.msg { max-width: min(760px, 92%); padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); }
.msg.user { align-self: flex-end; background: rgba(47, 107, 255, 0.16); border-color: rgba(47, 107, 255, 0.35); }
.msg.assistant { align-self: flex-start; background: var(--panel-2); }
.msg.system { align-self: center; max-width: 92%; font-size: 12.5px; color: var(--text-2); background: transparent; border-style: dashed; }
.msg.system.error { color: #fca5a5; border-color: rgba(248, 113, 113, 0.4); }
.msg-who { font-size: 11px; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 4px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.msg-meta { margin-top: 6px; font-size: 11px; color: var(--faint); }
.run-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; }
.run-meta { color: var(--faint); font-size: 11px; }
.link-btn {
  background: none; border: 1px solid var(--line-2); color: var(--text-2); border-radius: 999px; padding: 2px 10px;
  font: 12px var(--sans); cursor: pointer;
}
.link-btn:hover, .link-btn:focus-visible { color: var(--text); border-color: var(--line-hi); outline: none; }
.chat-alert {
  padding: 9px 12px; border-radius: 10px; font-size: 13px; color: #fecaca;
  background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.35);
}
.chat-alert.ok { color: #bbf7d0; background: rgba(52, 211, 153, 0.08); border-color: rgba(52, 211, 153, 0.3); }

/* archive & delete */
.chat-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-toggle {
  background: none; border: 0; padding: 0; cursor: pointer; font: 11px var(--sans); letter-spacing: 0; text-transform: none;
  color: var(--text-2); text-decoration: underline; text-underline-offset: 2px;
}
.side-toggle:hover, .side-toggle:focus-visible { color: var(--text); outline: none; }
.conv.archived .conv-title { color: var(--faint); }
.item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.item-actions[hidden] { display: none; }
.item-title { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-spacer { flex: 1; }
.link-btn.danger { color: #fca5a5; border-color: rgba(248, 113, 113, 0.4); }
.link-btn.danger:hover, .link-btn.danger:focus-visible { color: #fff; background: rgba(248, 113, 113, 0.18); border-color: var(--bad); }
.pd-archived { padding: 10px 12px; border-radius: 10px; color: var(--text-2); background: var(--panel-2); border: 1px dashed var(--line-hi); }
.confirm-dialog {
  max-width: min(480px, calc(100vw - 32px)); padding: 0; border-radius: var(--radius); color: var(--text);
  background: var(--panel); border: 1px solid var(--line-hi); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.confirm-dialog::backdrop { background: rgba(2, 6, 23, 0.7); }
.confirm-form { padding: 20px; display: grid; gap: 12px; }
.confirm-form h2 { margin: 0; font: 600 17px/1.3 var(--display); overflow-wrap: anywhere; }
.confirm-body p { margin: 0 0 6px; }
.confirm-body .pd-list { margin: 0 0 10px; }
.confirm-blocked { color: #fde68a; }
.confirm-warn { color: #fca5a5; font-size: 13px; }
.confirm-buttons { display: flex; justify-content: flex-end; gap: 10px; }
.confirm-buttons .link-btn { padding: 7px 14px; }
.btn-danger { border: 0; cursor: pointer; font: 600 12.5px var(--sans); color: #fff; background: #dc2626; border-radius: 999px; padding: 7px 14px; }
.btn-danger:hover, .btn-danger:focus-visible { background: #b91c1c; outline: 2px solid #fca5a5; outline-offset: 2px; }
.btn-danger[hidden] { display: none; }
.composer {
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 10px 10px 8px 14px;
}
.composer:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12); }
.composer textarea {
  width: 100%; resize: none; border: 0; background: transparent; color: var(--text); font: 15px/1.5 var(--sans);
  outline: none; min-height: 52px; max-height: 30vh;
}
.composer textarea::placeholder { color: var(--faint); }
.composer-bar { display: flex; align-items: center; gap: 10px; }
.composer-hint { flex: 1; font-size: 11.5px; color: var(--faint); }
.composer-count { font-size: 11px; color: var(--warn); }
.send-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, var(--blue), var(--cyan));
}
.send-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.send-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.chat-note { margin: 0; font-size: 11.5px; color: var(--faint); }
.chat-note a { color: var(--text-2); }

/* ---------- chat modes, projects, reports ---------- */
.mode-switch { display: inline-flex; gap: 4px; padding: 3px; margin-bottom: 8px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.mode { border: 0; background: transparent; color: var(--muted); font: 600 12px var(--sans); padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.mode:hover, .mode:focus-visible { color: var(--text); outline: none; }
.mode.on { color: #fff; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.chat-links { margin: 0; font-size: 11.5px; color: var(--faint); }
.chat-links a { color: var(--text-2); }
.msg.assistant.report { border-color: rgba(34, 211, 238, 0.35); }
.panel-note { margin: -6px 0 12px; font-size: 12.5px; color: var(--muted); }
.report-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.reports-panel { margin-top: 18px; }

.project-main {
  min-height: 0; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.pd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pd-head h2 { margin: 0; font: 600 20px/1.25 var(--display); }
.pd-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pd-section h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.pd-summary { margin: 0 0 10px; color: var(--text); line-height: 1.55; }
.pd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.pd-list { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; display: grid; gap: 4px; }
.pd-plan { display: grid; gap: 12px; }
.pd-milestone { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel-2); }
.pd-m-head { display: flex; align-items: center; gap: 8px; }
.pd-m-acc { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.pd-key { font: 600 11px var(--mono); color: var(--cyan); background: rgba(34, 211, 238, 0.1); border-radius: 6px; padding: 2px 6px; }
.pd-tasks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.pd-task { border-top: 1px solid var(--line); padding-top: 8px; }
.pd-t-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-t-title { flex: 1; min-width: 0; color: var(--text); }
.pd-t-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.pd-t-desc { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.pd-run { border: 1px dashed var(--line-2); border-radius: 12px; padding: 10px 12px; }
.pd-run-who { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.pd-run-msg { font-size: 12.5px; color: #fca5a5; margin-top: 6px; }
.pd-form, .pd-actions { display: grid; gap: 10px; }
.pd-q { display: grid; gap: 4px; }
.pd-q-text { color: var(--text); }
.pd-q-why { font-size: 12px; color: var(--muted); }
.pd-form textarea, .pd-actions textarea {
  width: 100%; resize: vertical; padding: 9px 11px; border-radius: 10px; font: 14px/1.5 var(--sans); color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-2);
}
.pd-form textarea:focus, .pd-actions textarea:focus { outline: none; border-color: var(--cyan); }
.pd-form .btn-primary, .pd-actions .btn-primary { justify-self: start; border-radius: 10px; padding: 9px 16px; }
.pd-actions .link-btn { justify-self: start; }
.pd-hint { margin: 0; font-size: 12px; color: var(--muted); }
.pd-approved { padding: 10px 12px; border-radius: 10px; color: #86efac; background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.3); }
.pd-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pd-h { border-left: 2px solid var(--line-2); padding-left: 10px; }
.pd-h.assistant { border-left-color: var(--cyan); }
.pd-h.system.error { border-left-color: var(--bad); }
.pd-h-who { font-size: 11px; color: var(--faint); margin-bottom: 2px; }

.web-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); }
.web-toggle[hidden] { display: none; }
.sources { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; font-size: 12px; color: var(--text-2); }
.src { display: flex; gap: 6px; overflow-wrap: anywhere; }
.src.failed, .src.blocked { color: #fca5a5; }
.src-id { font: 600 11px var(--mono); color: var(--cyan); flex: none; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .span-3, .span-5 { grid-column: span 6; }
  .panel-hero { grid-column: span 6; }
  .span-8 { grid-column: span 12; }
  .span-4 { grid-column: span 6; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; z-index: 20; left: 0; top: 0; width: min(280px, 84vw); transform: translateX(-102%);
    transition: transform 0.25s ease; box-shadow: 30px 0 60px -30px rgba(0, 0, 0, 0.9);
  }
  .sidebar.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(2, 6, 16, 0.6); }
  .scrim[hidden] { display: none; }
  .icon-btn.menu-btn { display: inline-grid; }
  .topbar { grid-template-columns: auto 1fr auto; padding: 12px 16px; gap: 12px; }
  .top-center { display: none; }
  .views { padding: 18px 16px 8px; }
  .banner { margin: 14px 16px 0; }
  .foot { padding: 14px 16px; }
  .chat-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - 150px); }
  .chat-side { padding: 10px; gap: 8px; }
  .conv-list { grid-auto-flow: column; grid-auto-columns: minmax(160px, 70%); overflow-x: auto; overflow-y: hidden; flex: none; }
  .chat-side-head { justify-content: flex-end; margin-top: 0; }
  .chat-side-head > span { display: none; }   /* label hidden on small screens; the archived toggle stays */
  .project-main { padding: 14px; }
}
@media (max-width: 680px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .grid > * { grid-column: 1 / -1 !important; }
  .top-right #runtime-chip, .top-right #health-chip { display: none; }
  .new-chat-btn span { display: none; }
  .new-chat-btn { padding: 8px; }
  .msg { max-width: 100%; }
  .chat-thread { padding: 12px; }
  .title-block h1 { font-size: 18px; }
  .panel-hero { min-height: 260px; }
  .hero-title { font-size: 28px; }
  .foot-right { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Changes view */
.pd-field { display: grid; gap: 4px; font-size: 12.5px; color: var(--text-2); }
.pd-field input, .pd-field textarea { font: 13px var(--sans); color: var(--text); background: rgba(10, 16, 30, 0.6); border: 1px solid rgba(82, 102, 139, 0.45); border-radius: 8px; padding: 8px 10px; }
.form-error { color: #fca5a5; margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.form-error[hidden] { display: none; }
pre.patch { margin: 0; max-height: 480px; overflow: auto; font: 12px/1.45 ui-monospace, Consolas, monospace; white-space: pre; background: rgba(5, 9, 18, 0.7); border: 1px solid rgba(82, 102, 139, 0.35); border-radius: 8px; padding: 10px; color: var(--text-2); }


/* Agent globes: one per agent around the core, lit only by real records (static/activity.js) */
.panel-hero .ag-beam { stroke: rgba(103, 220, 242, 0.06); stroke-width: 0.8; stroke-dasharray: 3 5; transition: stroke 0.6s; }
.panel-hero .ag-halo { fill: none; stroke: rgba(103, 220, 242, 0.18); stroke-width: 0.8; transition: stroke 0.6s, opacity 0.6s;
  transform-box: fill-box; transform-origin: center; }
.panel-hero .ag-globe { fill: #12284a; stroke: rgba(126, 186, 255, 0.55); stroke-width: 0.9; transition: fill 0.6s, stroke 0.6s; }
.panel-hero .ag-band { fill: none; stroke: rgba(165, 220, 255, 0.28); stroke-width: 0.6; }
.panel-hero .ag-shine { fill: rgba(232, 251, 255, 0.35); }
.panel-hero .ag-label { fill: #7f93b3; font: 600 9px var(--sans); letter-spacing: 0.04em; stroke: none; transition: fill 0.6s; }
.panel-hero .ag[data-state="running"] .ag-globe { fill: #67dcf2; stroke: #e8fbff; filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.95)); }
.panel-hero .ag[data-state="running"] .ag-shine { fill: #ffffff; }
.panel-hero .ag[data-state="running"] .ag-band { stroke: rgba(10, 21, 48, 0.55); }
.panel-hero .ag[data-state="running"] .ag-label { fill: #e8fbff; }
.panel-hero .ag[data-state="running"] .ag-halo { stroke: rgba(103, 220, 242, 0.9); animation: ag-pulse 1.6s ease-out infinite; }
.panel-hero .ag[data-state="running"] .ag-beam { stroke: rgba(103, 220, 242, 0.75); animation: ag-flow 0.9s linear infinite; }
.panel-hero .ag[data-state="queued"] .ag-globe { fill: #3a2a08; stroke: #fbbf24; }
.panel-hero .ag[data-state="queued"] .ag-halo { stroke: rgba(251, 191, 36, 0.6); stroke-dasharray: 3 4; }
.panel-hero .ag[data-state="queued"] .ag-label { fill: #fde68a; }
.panel-hero .ag[data-state="unavailable"] .ag-globe { fill: #111827; stroke: #374151; }
.panel-hero .ag[data-state="unavailable"] .ag-halo, .panel-hero .ag[data-state="unavailable"] .ag-band { opacity: 0; }
.panel-hero .ag[data-state="unavailable"] .ag-label { fill: #4b5563; }
@keyframes ag-pulse { 0% { transform: scale(0.8); opacity: 1; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes ag-flow { to { stroke-dashoffset: -8; } }
@media (prefers-reduced-motion: reduce) {
  .panel-hero .ag[data-state="running"] .ag-halo, .panel-hero .ag[data-state="running"] .ag-beam { animation: none; }
}
.agent-globe-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px;
  justify-content: center; font-size: 11.5px; color: var(--text-2); }
.agent-globe-list .agl { display: inline-flex; align-items: center; gap: 5px; }
.agent-globe-list .agl-dot { width: 7px; height: 7px; border-radius: 50%; background: #1e3a5f; border: 1px solid rgba(126, 186, 255, 0.6); }
.agent-globe-list .agl.running .agl-dot { background: #67dcf2; box-shadow: 0 0 8px #22d3ee; }
.agent-globe-list .agl.running { color: #e8fbff; }
.agent-globe-list .agl.queued .agl-dot { background: #fbbf24; }
.agent-globe-list .agl.unavailable { color: var(--muted); }
.agent-globe-list .agl.unavailable .agl-dot { background: #111827; border-color: #374151; }
.agent-globe-list .agl-state { color: var(--faint); }

/* Activity feed */
.act-list, .act-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.act-item { display: grid; gap: 3px; padding: 8px 10px; border-radius: 10px; background: rgba(10, 16, 30, 0.45);
  border: 1px solid rgba(82, 102, 139, 0.25); min-width: 0; }
.act-item.live { border-color: rgba(103, 220, 242, 0.55); }
.act-item.needs { border-color: rgba(251, 191, 36, 0.55); }
.act-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.act-agent { font-weight: 600; color: var(--text-2); }
.act-title { text-align: left; font-size: 13px; color: var(--text); overflow-wrap: anywhere; padding: 0; }
.act-meta { font-size: 11.5px; color: var(--faint); overflow-wrap: anywhere; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.seg button { font: 600 11.5px var(--sans); color: var(--text-2); background: transparent; border: 1px solid rgba(82, 102, 139, 0.45);
  border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.seg button[aria-pressed="true"] { color: #031018; background: #67dcf2; border-color: #67dcf2; }

.act-title { background: none; border: 0; cursor: pointer; font-family: var(--sans); }
.act-title:hover, .act-title:focus-visible { color: #a5f3fc; text-decoration: underline; outline: none; }
.act-feed .act-item { padding: 7px 9px; }
.act-feed .act-head { gap: 6px; }
.panel-hero .ag-label { font-size: 10.5px; }

.chat-agents { border-top: 1px solid rgba(82, 102, 139, 0.3); padding-top: 10px; margin-top: 8px; display: grid; gap: 8px; }
.agent-globe-list.compact { justify-content: flex-start; font-size: 11px; gap: 4px 10px; margin: 0; }
.act-feed.compact { max-height: 180px; overflow-y: auto; }
.act-feed.compact .act-item { padding: 6px 8px; font-size: 12px; }

.pd-task.needs-you { border-color: rgba(251, 191, 36, 0.6); }
.pd-field select { font: 13px var(--sans); color: var(--text); background: rgba(10, 16, 30, 0.6);
  border: 1px solid rgba(82, 102, 139, 0.45); border-radius: 8px; padding: 6px 8px; }
.state.queued { color: var(--muted); } .state.queued::before { background: var(--faint); }
