:root {
  --bg: #050505;
  --bg-card: #0c0b08;
  --bg-card-2: #12100a;
  --border: #26200f;
  --red: #c9a227;  /* brand gold (variable names kept so JS keeps working) */
  --red-bright: #e6c35a;
  --red-dim: rgba(201, 162, 39, 0.12);
  --text: #f5f1e6;
  --text-dim: #9b9384;
  --green: #4ade80;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
}

a { color: inherit; text-decoration: none; }

.announce {
  background: #0a0606;
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.announce .tag { color: var(--red-bright); font-weight: 700; letter-spacing: 0.06em; margin-right: 8px; }
.announce strong { color: var(--text); }
.announce a { color: var(--red-bright); font-weight: 600; }

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.logo { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.logo .orb {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a1512, #0a0505 70%);
  border: 2px solid var(--red);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.logo .accent { color: var(--red-bright); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14.5px; color: var(--text-dim); }
.nav-links a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 11px 22px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--red-bright); }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn.ghost:hover { border-color: var(--red); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 90px 40px 120px;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border);
  background: rgba(201, 162, 39, 0.06);
  color: var(--red-bright);
  font-size: 13.5px;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red-bright); animation: pulse 1.6s infinite; }
.dot.green { background: var(--green); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero h1 { font-size: 96px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.hero h1 .accent { color: var(--red); }
.hero .rule { width: 64px; height: 4px; background: var(--red); margin: 28px 0; }
.hero .sub { font-size: 26px; color: var(--text-dim); line-height: 1.4; margin-bottom: 36px; }
.hero .sub strong { color: var(--text); }

.hero-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: radial-gradient(ellipse at 70% 30%, rgba(201, 162, 39,0.14), transparent 60%), var(--bg-card);
  min-height: 380px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-card .status {
  position: absolute; top: 18px; left: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  background: #0a0906; border: 1px solid var(--border);
  font-size: 13px; padding: 7px 14px; border-radius: 999px;
}
.robot { font-size: 110px; filter: drop-shadow(0 0 40px rgba(201, 162, 39,0.45)); animation: float 3.5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Sections ---------- */
section { max-width: 1200px; margin: 0 auto; padding: 80px 40px; }
.section-title { font-size: 44px; font-weight: 800; text-align: center; letter-spacing: -0.02em; margin-bottom: 16px; }
.section-title .accent { color: var(--red-bright); }
.section-sub { text-align: center; color: var(--text-dim); font-size: 18px; max-width: 640px; margin: 0 auto 56px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  padding: 32px 28px;
}
.card .icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--red-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 18px;
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 15px; line-height: 1.55; }

.step-num { font-size: 15px; font-weight: 800; color: var(--red-bright); letter-spacing: 0.1em; margin-bottom: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 880px; margin: 0 auto; }
.chip {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
}

.safety { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.safety .item {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
}
.safety .item span { color: var(--green); }

.cta-final { text-align: center; padding: 110px 40px 130px; }
.cta-final h2 { font-size: 52px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 18px; }
.cta-final p { color: var(--text-dim); font-size: 18px; max-width: 560px; margin: 0 auto 36px; line-height: 1.55; }
.cta-row { display: flex; gap: 14px; justify-content: center; }

footer { border-top: 1px solid var(--border); text-align: center; padding: 32px; color: var(--text-dim); font-size: 13.5px; }

/* ---------- Dashboard ---------- */
.dash { max-width: 1200px; margin: 0 auto; padding: 40px; }
.dash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.dash-head h1 { font-size: 32px; letter-spacing: -0.02em; }
.kill {
  background: transparent; border: 1px solid var(--red); color: var(--red-bright);
  font-weight: 700; padding: 11px 22px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.kill.active { background: var(--red); color: #fff; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); padding: 20px 22px; }
.stat .label { color: var(--text-dim); font-size: 13px; margin-bottom: 8px; }
.stat .value { font-size: 28px; font-weight: 800; }
.stat .value.green { color: var(--green); }

.fleet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.agent-card { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); padding: 24px; }
.agent-card .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.agent-card .avatar { font-size: 30px; }
.agent-card .status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  background: rgba(74, 222, 128, 0.1); color: var(--green);
}
.agent-card .status-pill.paused { background: var(--red-dim); color: var(--red-bright); }
.agent-card h3 { font-size: 17px; margin-bottom: 6px; }
.agent-card .role { color: var(--text-dim); font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
.agent-card .meta { font-size: 13px; color: var(--text-dim); display: flex; flex-direction: column; gap: 5px; }
.agent-card .meta strong { color: var(--text); font-weight: 600; }

.task-box { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); padding: 24px; margin-bottom: 32px; }
.task-box h2 { font-size: 18px; margin-bottom: 16px; }
.task-input-row { display: flex; gap: 12px; }
.task-input-row input {
  flex: 1; background: #0a0906; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 11px 16px; font-size: 14.5px; font-family: var(--font);
}
.task-input-row input:focus { outline: none; border-color: var(--red); }
.task-item { border-top: 1px solid rgba(255,255,255,0.05); padding: 14px 0 6px; margin-top: 14px; }
.task-head { display: flex; align-items: center; gap: 12px; }
.task-text { font-size: 14.5px; }
.task-log { margin: 10px 0 0 4px; font-size: 13px; color: var(--text-dim); display: flex; flex-direction: column; gap: 4px; }
.task-result { margin-top: 10px; font-size: 13.5px; }
.task-result summary { cursor: pointer; color: var(--red-bright); font-weight: 600; }
.task-result pre { white-space: pre-wrap; color: var(--text-dim); margin-top: 8px; font-family: var(--font); }

.feed { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); padding: 24px; }
.feed h2 { font-size: 18px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.feed-item {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 14px;
}
.feed-item:last-child { border-bottom: none; }
.feed-item .time { color: var(--text-dim); min-width: 76px; font-variant-numeric: tabular-nums; }
.feed-item .agent-name { color: var(--red-bright); font-weight: 600; margin-right: 6px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 48px 24px; }
  .hero h1 { font-size: 60px; }
  .grid-3, .fleet, .stats { grid-template-columns: 1fr; }
  nav { padding: 14px 20px; flex-wrap: wrap; gap: 14px; }
  .nav-links { flex-wrap: wrap; gap: 16px; }
  .dash-head { flex-wrap: wrap; gap: 14px; }
}

/* ---------- Agent roster + create form ---------- */
.section-label { font-size: 20px; margin: 8px 0 16px; }
.sub-label { font-size: 14px; color: var(--text-dim); margin: 22px 0 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.agents-panel { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); padding: 24px; margin-bottom: 32px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-head h2 { font-size: 18px; }
.muted { color: var(--text-dim); font-weight: 400; }

.agent-form { border: 1px solid var(--border); border-radius: 12px; background: #0a0906; padding: 18px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 12px; }
.agent-form .form-row { display: flex; gap: 12px; }
.agent-form .form-row #agName { flex: 1; }
.agent-form #agAvatar { width: 70px; text-align: center; }
.agent-form input, .agent-form textarea {
  background: #050505; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 11px 14px; font-size: 14px; font-family: var(--font); width: 100%;
}
.agent-form input:focus, .agent-form textarea:focus { outline: none; border-color: var(--red); }
.agent-form textarea { resize: vertical; line-height: 1.5; }
.form-actions { display: flex; gap: 10px; }

.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.mini-agent { position: relative; border: 1px solid var(--border); border-radius: 12px; background: #0c0b08; padding: 18px; }
.mini-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mini-agent .avatar { font-size: 24px; }
.mini-agent h4 { font-size: 15px; margin-bottom: 6px; }
.mini-agent p { font-size: 13px; color: var(--text-dim); line-height: 1.45; }
.status-pill.run { background: rgba(74,222,128,0.12); color: var(--green); }
.status-pill.idle { background: rgba(255,255,255,0.05); color: var(--text-dim); }
.tag-custom { font-size: 10px; color: var(--red-bright); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; vertical-align: middle; }
.agent-del { position: absolute; top: 12px; right: 12px; background: transparent; border: none; color: var(--text-dim); cursor: pointer; font-size: 13px; opacity: 0; transition: opacity 0.15s; }
.mini-agent:hover .agent-del { opacity: 1; }
.agent-del:hover { color: var(--red-bright); }

/* ---------- Chat panel ---------- */
.chat-panel { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); padding: 24px; margin-bottom: 32px; }
.chat-panel h2 { font-size: 18px; margin-bottom: 16px; }
.chat-log { max-height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; padding-right: 6px; }
.chat-msg { padding: 12px 16px; border-radius: 12px; font-size: 14.5px; line-height: 1.55; max-width: 85%; white-space: pre-wrap; }
.chat-msg .who { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 5px; opacity: 0.7; }
.chat-msg.sirius { background: #0c0b08; border: 1px solid var(--border); align-self: flex-start; }
.chat-msg.sirius .who { color: var(--red-bright); }
.chat-msg.you { background: var(--red-dim); align-self: flex-end; }
.chat-msg .err { color: var(--red-bright); }
.chat-input-row { display: flex; gap: 12px; }
.chat-input-row input { flex: 1; background: #050505; border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 12px 16px; font-size: 14.5px; font-family: var(--font); }
.chat-input-row input:focus { outline: none; border-color: var(--red); }
.chat-hint { font-size: 12.5px; color: var(--text-dim); margin-top: 10px; }

/* ---------- Task outputs + cost ---------- */
.task-cost { margin-left: auto; font-size: 13px; color: var(--green); font-variant-numeric: tabular-nums; }
.task-head { display: flex; align-items: center; gap: 12px; }
.task-output { margin-top: 12px; border: 1px solid var(--border); border-radius: 10px; background: #0a0906; overflow: hidden; }
.task-output .output-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--red-bright); padding: 8px 14px; border-bottom: 1px solid var(--border); }
.task-output pre { white-space: pre-wrap; color: var(--text); font-family: var(--font); font-size: 13.5px; line-height: 1.55; padding: 14px; margin: 0; max-height: 420px; overflow-y: auto; }

/* ---------- Agent cards extras ---------- */
.conn-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.chip-sm { font-size: 10.5px; color: var(--text-dim); border: 1px solid var(--border); border-radius: 5px; padding: 2px 7px; }
.mini-actions { display: flex; gap: 8px; margin-top: 12px; }
.mini-btn { background: transparent; border: 1px solid var(--border); color: var(--text-dim); border-radius: 6px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; }
.mini-btn:hover { border-color: var(--red); color: var(--text); }
.mini-btn.del:hover { border-color: var(--red-bright); color: var(--red-bright); }
.mini-agent { position: relative; }

/* ---------- Agent editor modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: flex-start; justify-content: center; padding: 48px 20px; z-index: 100; overflow-y: auto; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 28px; width: 100%; max-width: 560px; }
.modal h2 { font-size: 20px; margin-bottom: 20px; }
.modal label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin: 16px 0 7px; }
.modal input, .modal textarea { width: 100%; background: #050505; border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 11px 14px; font-size: 14px; font-family: var(--font); }
.modal input:focus, .modal textarea:focus { outline: none; border-color: var(--red); }
.modal textarea { resize: vertical; line-height: 1.5; }
.modal .form-row { display: flex; gap: 12px; }
.modal .form-row #agName { flex: 1; }
.modal .form-row #agAvatar { width: 74px; text-align: center; }
.connections { display: flex; flex-direction: column; gap: 8px; }
.conn-opt { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-dim); text-transform: none; letter-spacing: 0; margin: 0; cursor: pointer; }
.conn-opt input { width: auto; margin-top: 3px; }
.conn-opt strong { color: var(--text); }
.conn-opt em { color: var(--red-bright); font-style: normal; font-size: 11px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 22px; }
.form-err { color: var(--red-bright); font-size: 13px; }

/* ---------- Budget bar ---------- */
.budget-bar { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); padding: 18px 22px; margin-bottom: 32px; }
.budget-head { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--text-dim); margin-bottom: 10px; }
.budget-head strong { color: var(--text); }
.budget-track { height: 10px; background: #0a0906; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.budget-fill { height: 100%; width: 0; background: var(--green); border-radius: 999px; transition: width 0.4s; }
.budget-fill.warn { background: #e0a63b; }
.budget-fill.over { background: var(--red); }
.budget-hint { font-size: 12.5px; color: var(--text-dim); margin-top: 9px; }

/* ---------- Agent mode + lessons ---------- */
.mode-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.mode-pill { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.mode-pill.train { background: rgba(224,166,59,0.14); color: #e0a63b; }
.mode-pill.auto { background: rgba(74,222,128,0.14); color: var(--green); }
.lesson-count { font-size: 11.5px; color: var(--text-dim); }
.mini-btn.grad { border-color: var(--red); color: var(--red-bright); }
.mini-btn.ok:hover { border-color: var(--green); color: var(--green); }

/* ---------- Task review ---------- */
.review-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.05); }
.review-q { font-size: 13px; color: var(--text-dim); }
.review-done { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.05); font-size: 13px; color: var(--text-dim); }

/* ---------- Engine lane selector ---------- */
.lane-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); padding: 14px 20px; margin-bottom: 24px; }
.lane-label { font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.lane-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: #0a0906; border: 1px solid var(--border); border-radius: 10px; color: var(--text); padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.lane-opt .lane-sub { font-size: 11px; font-weight: 400; color: var(--text-dim); }
.lane-opt:hover { border-color: var(--text-dim); }
.lane-opt.active { border-color: var(--red); background: var(--red-dim); }
.lane-note { font-size: 12.5px; color: var(--text-dim); margin-left: auto; }
.task-cost.plan { color: var(--red-bright); }

/* ---------- Voice command center ---------- */
.chat-header { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.chat-id h2 { font-size: 20px; line-height: 1.1; }
.orb-status { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.voice-toggle { margin-left: auto; }
.voice-toggle.active { border-color: var(--green); color: var(--green); }

.voice-orb {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 32% 30%, #ff8a80, var(--red) 55%, #7a1c17 100%);
  box-shadow: 0 0 22px rgba(201, 162, 39,0.5);
  position: relative; transition: box-shadow 0.3s;
}
.voice-orb::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(201, 162, 39,0.4); opacity: 0;
}
.voice-orb.idle { animation: orb-breathe 4s ease-in-out infinite; }
.voice-orb.thinking { animation: orb-breathe 1.1s ease-in-out infinite; }
.voice-orb.speaking { animation: orb-pulse 0.7s ease-in-out infinite; box-shadow: 0 0 34px rgba(201, 162, 39,0.85); }
.voice-orb.listening {
  background: radial-gradient(circle at 32% 30%, #8ab4ff, #3b82f6 55%, #1e3a8a 100%);
  box-shadow: 0 0 30px rgba(59,130,246,0.7);
  animation: orb-pulse 0.8s ease-in-out infinite;
}
@keyframes orb-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes orb-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.14); } }

.mic-btn {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 10px;
  background: #0a0906; border: 1px solid var(--border); color: var(--text);
  font-size: 18px; cursor: pointer; transition: all 0.15s;
}
.mic-btn:hover { border-color: var(--red); }
.mic-btn:active { background: var(--red-dim); }

/* ---------- Voice controls ---------- */
.voice-controls { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.voice-select { background: #0a0906; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; font-family: var(--font); cursor: pointer; }
.voice-select:focus { outline: none; border-color: var(--red); }
#handsFree.active { border-color: var(--green); color: var(--green); }

/* ---------- Agent office (live visual) ---------- */
.office-panel { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); padding: 24px; margin-bottom: 32px; }
.office-floor {
  position: relative; min-height: 190px; border-radius: 12px; overflow: hidden;
  background:
    linear-gradient(180deg, #0c0909 0%, #0c0909 46%, #140f0f 46%, #1a1312 100%);
  border: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 26px 34px;
  padding: 26px 30px 22px;
}
.office-floor::before { /* horizon light */
  content: ''; position: absolute; left: 0; right: 0; top: 44%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39,0.25), transparent);
}
.worker { display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; animation: breathe 4s ease-in-out infinite; animation-delay: var(--delay); }
.worker-av {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 26px; background: #0c0b08; border: 1px solid var(--border);
  position: relative; box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}
.worker-name { font-size: 12px; color: var(--text-dim); max-width: 84px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.worker.working { animation: pace 3.2s ease-in-out infinite; animation-delay: var(--delay); }
.worker.working .worker-av { border-color: var(--green); box-shadow: 0 0 18px rgba(74,222,128,0.5); animation: bob 0.9s ease-in-out infinite; }
.worker.working .worker-name { color: var(--green); }
.work-spark { position: absolute; top: -2px; right: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 1s infinite; }
.worker-bubble {
  position: absolute; top: -22px; background: #0a0906; border: 1px solid var(--border); color: var(--green);
  font-size: 10.5px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; animation: pulse 1.6s infinite;
}
@keyframes breathe { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes pace { 0%,100% { transform: translateX(-10px); } 50% { transform: translateX(10px); } }
.worker.boss .worker-av { border-color: var(--red); box-shadow: 0 0 16px rgba(201, 162, 39,0.4); width: 58px; height: 58px; font-size: 30px; }
.worker.boss .worker-name { color: var(--red-bright); font-weight: 600; }
.worker.boss.working .worker-av { border-color: var(--green); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.tab {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--text-dim); font-family: var(--font); font-size: 14.5px; font-weight: 600;
  padding: 12px 16px; cursor: pointer; transition: color 0.15s, border-color 0.15s; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--red); }
.tab-count { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--red-dim); color: var(--red-bright); font-size: 11px; line-height: 18px; text-align: center; }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fade-in 0.2s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Teamwork explainer ---------- */
.teamwork { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); padding: 22px 24px; margin-bottom: 28px; }
.teamwork h2 { font-size: 18px; margin-bottom: 8px; }
.teamwork p { color: var(--text-dim); font-size: 14px; line-height: 1.6; max-width: 780px; }
.flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.flow-node { display: flex; flex-direction: column; gap: 2px; background: #0a0906; border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 600; }
.flow-node small { font-size: 10.5px; font-weight: 400; color: var(--text-dim); }
.flow-node.boss { border-color: var(--red); color: var(--red-bright); }
.flow-node.done { border-color: var(--green); color: var(--green); }
.flow-arrow { color: var(--text-dim); font-size: 16px; }

/* ---------- Action items ---------- */
.actions-panel { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); padding: 24px; }
.action-add { display: flex; gap: 8px; margin: 16px 0 20px; }
.action-add input { flex: 1; background: #0a0906; border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 11px 14px; font-family: var(--font); font-size: 14px; }
.action-add input:focus { outline: none; border-color: var(--red); }
.action-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.action-item:last-child { border-bottom: none; }
.action-check {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px; cursor: pointer;
  background: #0a0906; border: 1.5px solid var(--border); color: var(--green); font-size: 14px; line-height: 1;
  transition: all 0.15s;
}
.action-check:hover { border-color: var(--green); }
.action-item.done .action-check { background: var(--green); border-color: var(--green); color: #04240f; }
.action-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.action-text { font-size: 14.5px; }
.action-item.done .action-text { text-decoration: line-through; color: var(--text-dim); }
.action-meta { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.action-del { flex-shrink: 0; background: transparent; border: none; color: var(--text-dim); font-size: 14px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.action-del:hover { color: var(--red-bright); background: var(--red-dim); }
.steps-btn { display: block; margin-top: 10px; }

/* ---------- Connections & tools panel ---------- */
.conn-panel { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); padding: 24px; margin-top: 24px; }
.conn-help { font-size: 12.5px; line-height: 1.6; margin: 6px 0 16px; }
.conn-help code { background: #0a0906; border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 12px; }
.conn-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.conn-row:last-child { border-bottom: none; }
.conn-dot { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--text-dim); }
.conn-dot.ok { background: var(--green); box-shadow: 0 0 8px rgba(74,222,128,0.6); }
.conn-dot.err { background: var(--red-bright); box-shadow: 0 0 8px rgba(201, 162, 39,0.6); }
.conn-dot.warn { background: #d9a441; }
.conn-info { flex: 1; min-width: 0; }
.conn-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.conn-src { font-size: 11px; font-weight: 400; color: var(--text-dim); background: #0a0906; border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.conn-tools { font-size: 11px; font-weight: 400; color: var(--green); }
.conn-desc { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.conn-status { flex-shrink: 0; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); }
.conn-status.ok { color: var(--green); }
.conn-status.err { color: var(--red-bright); }
.conn-status.warn { color: #d9a441; }

/* ---------- Persona onboarding ---------- */
.ob-overlay {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  background: rgba(5,3,3,0.82); backdrop-filter: blur(10px); padding: 20px;
}
.ob-modal {
  position: relative; width: min(880px, 96vw); max-height: 94vh; overflow-y: auto;
  background: linear-gradient(180deg, #100b0b, #0a0906);
  border: 1px solid var(--border); border-radius: 20px; padding: 34px 34px 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 60px rgba(201, 162, 39,0.12);
  animation: ob-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.05);
}
@keyframes ob-in { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }
.ob-stars { position: absolute; inset: 0; border-radius: 20px; pointer-events: none; overflow: hidden; }
.ob-stars::before, .ob-stars::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 38% 8%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 64% 16%, rgba(255,180,170,0.5), transparent),
    radial-gradient(1px 1px at 82% 30%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 24% 78%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1.5px 1.5px at 90% 72%, rgba(255,180,170,0.35), transparent);
  animation: ob-twinkle 5s ease-in-out infinite alternate;
}
.ob-stars::after { animation-delay: 2.5s; transform: scale(1.4) rotate(8deg); opacity: 0.6; }
@keyframes ob-twinkle { from { opacity: 0.35; } to { opacity: 1; } }
.ob-title { font-size: 26px; letter-spacing: -0.02em; position: relative; }
.ob-sub { color: var(--text-dim); font-size: 14px; line-height: 1.6; margin-top: 6px; max-width: 640px; position: relative; }

.ob-carousel { position: relative; display: flex; align-items: center; margin: 26px 0 8px; min-height: 340px; }
.ob-track { position: relative; flex: 1; height: 340px; perspective: 900px; }
.ob-card {
  position: absolute; left: 50%; top: 0; width: min(320px, 74vw); height: 330px;
  transform: translateX(-50%); border-radius: 18px; padding: 22px; cursor: pointer;
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 90% at 50% 0%, hsla(var(--hue), 70%, 45%, 0.28), transparent 60%),
    linear-gradient(180deg, #151010, #0b0808);
  transition: transform 0.45s cubic-bezier(0.2, 0.85, 0.3, 1), opacity 0.35s, box-shadow 0.45s, border-color 0.45s;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.ob-card.center {
  transform: translateX(-50%) scale(1); z-index: 3;
  border-color: hsla(var(--hue), 75%, 58%, 0.85);
  box-shadow: 0 0 34px hsla(var(--hue), 80%, 55%, 0.35), 0 18px 44px rgba(0,0,0,0.55);
  animation: ob-card-glow 2.6s ease-in-out infinite alternate;
}
@keyframes ob-card-glow {
  from { box-shadow: 0 0 26px hsla(var(--hue), 80%, 55%, 0.28), 0 18px 44px rgba(0,0,0,0.55); }
  to { box-shadow: 0 0 46px hsla(var(--hue), 80%, 55%, 0.5), 0 18px 44px rgba(0,0,0,0.55); }
}
.ob-card.left { transform: translateX(calc(-50% - 300px)) scale(0.82) rotateY(14deg); opacity: 0.45; z-index: 2; }
.ob-card.right { transform: translateX(calc(-50% + 300px)) scale(0.82) rotateY(-14deg); opacity: 0.45; z-index: 2; }
.ob-card.hidden { transform: translateX(-50%) scale(0.6); opacity: 0; pointer-events: none; z-index: 1; }
.ob-avatar {
  width: 92px; height: 92px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 46px; margin: 10px 0 14px;
  background: radial-gradient(circle at 34% 30%, hsla(var(--hue), 80%, 65%, 0.5), hsla(var(--hue), 70%, 40%, 0.25) 60%, transparent);
  border: 1px solid hsla(var(--hue), 75%, 58%, 0.5);
  box-shadow: 0 0 24px hsla(var(--hue), 80%, 55%, 0.35), inset 0 0 18px hsla(var(--hue), 80%, 60%, 0.18);
}
.ob-card.center .ob-avatar { animation: orb-breathe 3.4s ease-in-out infinite; }
.ob-card h3 { font-size: 21px; letter-spacing: -0.01em; }
.ob-tagline { color: hsla(var(--hue), 85%, 70%, 0.95); font-size: 13px; font-weight: 600; margin-top: 4px; }
.ob-desc { color: var(--text-dim); font-size: 12.5px; line-height: 1.55; margin-top: 10px; }
.ob-badge {
  position: absolute; top: 12px; right: 12px; background: var(--red); color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 999px;
}
.ob-arrow {
  z-index: 5; width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  background: var(--red); color: #fff; border: none; font-size: 19px;
  box-shadow: 0 0 18px rgba(201, 162, 39,0.5); transition: transform 0.15s, box-shadow 0.15s;
}
.ob-arrow:hover { transform: scale(1.1); box-shadow: 0 0 26px rgba(201, 162, 39,0.75); }
.ob-arrow.left { margin-right: -23px; }
.ob-arrow.right { margin-left: -23px; }
.ob-dots { display: flex; justify-content: center; gap: 8px; margin: 14px 0 4px; }
.ob-dot { width: 8px; height: 8px; border-radius: 999px; background: #3a2c2b; cursor: pointer; transition: all 0.25s; }
.ob-dot.on { width: 26px; background: var(--red); box-shadow: 0 0 10px rgba(201, 162, 39,0.6); }
.ob-custom { max-width: 560px; margin: 8px auto 0; position: relative; }
.ob-custom label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
.ob-custom input, .ob-custom textarea {
  width: 100%; background: #0a0906; border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 11px 14px; font-family: var(--font); font-size: 14px; resize: vertical;
}
.ob-custom input:focus, .ob-custom textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 12px rgba(201, 162, 39,0.25); }
.ob-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; position: relative; }
.ob-skip { background: none; border: none; color: var(--text-dim); font-family: var(--font); font-size: 14px; cursor: pointer; padding: 10px 4px; }
.ob-skip:hover { color: var(--text); }
.ob-start { font-size: 15px; padding: 12px 26px; box-shadow: 0 0 22px rgba(201, 162, 39,0.4); }
.ob-toast {
  position: fixed; right: 26px; bottom: 26px; z-index: 400; max-width: 340px;
  background: #131010; border: 1px solid var(--border); border-left: 3px solid var(--red);
  border-radius: 12px; padding: 14px 18px; font-size: 13.5px; color: var(--text-dim); line-height: 1.5;
  box-shadow: 0 14px 40px rgba(0,0,0,0.6); animation: ob-in 0.3s ease;
}
.ob-toast strong { display: block; color: var(--text); font-size: 14.5px; margin-bottom: 2px; }
@media (max-width: 720px) {
  .ob-card.left, .ob-card.right { opacity: 0; pointer-events: none; }
  .ob-arrow.left { margin-right: -40px; }
  .ob-arrow.right { margin-left: -40px; }
}

/* ---------- Chat message actions + brain chips ---------- */
.chat-msg { position: relative; }
.msg-copy {
  position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity 0.15s;
  background: #0a0906; border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 6px; font-size: 12px; padding: 2px 7px; cursor: pointer;
}
.chat-msg:hover .msg-copy { opacity: 1; }
.msg-copy:hover { color: var(--text); border-color: var(--text-dim); }
.brain-chip {
  align-self: center; margin: 4px auto; padding: 5px 14px; border-radius: 999px;
  background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.35); color: var(--green);
  font-size: 12px; animation: ob-in 0.3s ease; max-width: 90%;
}
.brain-chip.auto { background: var(--red-dim); border-color: rgba(201, 162, 39,0.45); color: var(--red-bright); }
.attach-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px;
  background: #0a0906; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 8px 6px 14px; font-size: 12.5px; color: var(--text-dim);
}
.attach-chip button { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 12px; padding: 2px 6px; }
.attach-chip button:hover { color: var(--red-bright); }

/* ---------- Automations ---------- */
.auto-add { display: grid; grid-template-columns: 1fr 1fr 2fr auto; gap: 8px; margin: 16px 0 8px; }
.auto-add input { background: #0a0906; border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 11px 14px; font-family: var(--font); font-size: 13.5px; }
.auto-add input:focus { outline: none; border-color: var(--red); }
.auto-item { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.auto-item:last-child { border-bottom: none; }
.auto-item.off { opacity: 0.5; }
.auto-info { flex: 1; min-width: 0; }
.auto-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.auto-sched { color: var(--red-bright); font-size: 12px; font-weight: 600; background: var(--red-dim); border-radius: 999px; padding: 2px 10px; }
.auto-task { font-size: 13px; color: var(--text-dim); margin-top: 3px; }
.auto-meta { font-size: 11.5px; color: var(--text-dim); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.03em; }
.auto-actions { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 720px) { .auto-add { grid-template-columns: 1fr; } }

/* ---------- Files & Media ---------- */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 14px; }
.file-card {
  border: 1px solid var(--border); border-radius: 12px; background: #0c0b08; padding: 18px 14px 12px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  transition: border-color 0.15s, transform 0.15s;
}
.file-card:hover { border-color: var(--text-dim); transform: translateY(-2px); }
.file-icon { font-size: 40px; }
.file-name { font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-dim); }
.file-tag { border-radius: 999px; padding: 1px 8px; font-weight: 700; text-transform: uppercase; font-size: 9.5px; letter-spacing: 0.05em; }
.file-tag.chat { background: var(--red-dim); color: var(--red-bright); }
.file-tag.agent { background: rgba(74,222,128,0.1); color: var(--green); }
.file-actions { display: flex; gap: 6px; }
.file-actions a { text-decoration: none; }

/* ---------- Credentials vault (integrations) ---------- */
.cred-cats { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }
.cred-cat {
  background: #0a0906; border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 999px; padding: 6px 14px; font-family: var(--font); font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: all 0.15s;
}
.cred-cat:hover { color: var(--text); border-color: var(--text-dim); }
.cred-cat.on { background: var(--red-dim); border-color: var(--red); color: var(--red-bright); }
.cred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cred-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  background: #0c0b08; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
  font-family: var(--font); color: var(--text); cursor: pointer; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.cred-card:hover { border-color: var(--text-dim); transform: translateY(-2px); }
.cred-card.connected { border-color: rgba(74,222,128,0.5); box-shadow: 0 0 14px rgba(74,222,128,0.12); }
.cred-icon { font-size: 24px; }
.cred-name { font-size: 14px; font-weight: 700; }
.cred-cat-tag { font-size: 10.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.cred-state { font-size: 11.5px; color: var(--text-dim); margin-top: 4px; }
.cred-card.connected .cred-state { color: var(--green); }

.cred-modal { max-width: 560px; }
.cred-modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.cred-modal-head .cred-icon { font-size: 30px; }
.cred-modal-head h2 { font-size: 20px; line-height: 1.1; }
.cred-section { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin: 18px 0 6px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.cred-field { margin: 12px 0; }
.cred-field-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cred-field-head label { font-size: 13.5px; font-weight: 600; }
.cred-set { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.cred-set.ok { color: var(--green); }
.cred-field-row { display: flex; gap: 6px; }
.cred-field-row input {
  flex: 1; background: #0a0906; border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 10px 14px; font-family: var(--font); font-size: 13.5px;
}
.cred-field-row input:focus { outline: none; border-color: var(--red); }
.cred-field-row .save { min-width: 56px; }

/* ---------- in-page dialogs (native confirm/prompt are dead in embedded panes) ---------- */
.ask-backdrop {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.72); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: askIn .12s ease-out;
}
@keyframes askIn { from { opacity: 0 } to { opacity: 1 } }
.ask-box {
  background: #12100f; border: 1px solid rgba(255,255,255,.14); border-radius: 14px;
  padding: 22px; max-width: 460px; width: 100%;
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
.ask-msg { font-size: 17px; font-weight: 650; color: #f5f2f0; margin-bottom: 8px; }
.ask-detail { font-size: 13.5px; color: #a09a95; line-height: 1.5; white-space: pre-wrap; margin-bottom: 14px; }
.ask-input {
  width: 100%; padding: 10px 12px; margin-bottom: 14px;
  background: #0b0a09; border: 1px solid rgba(255,255,255,.18); border-radius: 8px;
  color: #f5f2f0; font-size: 14px; font-family: inherit;
}
.ask-input:focus { outline: none; border-color: var(--red, #e5484d); }
.ask-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- toasts (silent failures were half the "buttons don't work" problem) ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 10000; padding: 11px 18px; border-radius: 10px;
  background: #16302099; border: 1px solid #4ade8055; color: #86efac;
  font-size: 14px; font-weight: 550; backdrop-filter: blur(8px);
  box-shadow: 0 10px 34px rgba(0,0,0,.5);
  animation: toastIn .2s cubic-bezier(.2,.9,.3,1.2);
}
.toast.err { background: #3016169e; border-color: #e5484d55; color: #fca5a5; }
.toast.out { opacity: 0; transform: translateX(-50%) translateY(8px); transition: all .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(12px) } to { opacity: 1; transform: translateX(-50%) translateY(0) } }

/* ---------- approvals bulk bar ---------- */
.queue-bulk {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 14px 0 4px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.auto-toggle { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13px; color: #a09a95; margin-left: auto; }
.auto-toggle input { accent-color: #e5484d; width: 15px; height: 15px; cursor: pointer; }
.auto-toggle em { color: #e5848d; font-style: normal; font-size: 12px; }

/* ---------- approvals transparency ---------- */
.medium-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 650;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #e8e3df;
}
.medium-badge.sms   { background: #1e3a2f66; border-color: #4ade8044; color: #86efac; }
.medium-badge.email { background: #1e2a4a66; border-color: #60a5fa44; color: #93c5fd; }
.medium-badge.post  { background: #3a1e3a66; border-color: #e879f944; color: #f0abfc; }
.edited-flag { font-size: 11.5px; color: #fbbf24; background: #3a2e1666; border: 1px solid #fbbf2444; padding: 2px 8px; border-radius: 20px; }

.queue-route { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; margin: 7px 0 2px; font-size: 13px; }
.queue-subject { font-size: 13px; margin-bottom: 4px; color: #d8d3cf; }
.route-label { color: #7d7772; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.route-target { color: #e8e3df; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.route-target strong { font-family: inherit; color: #fff; }
.route-target em { color: #a09a95; font-style: normal; }
.unresolved { color: #fbbf24; font-size: 11px; }
.link-btn { background: none; border: none; color: #e5848d; cursor: pointer; font-size: 12px; text-decoration: underline; padding: 0; }
.link-btn:disabled { opacity: .5; cursor: default; }
.queue-body { margin-top: 6px; padding: 10px 12px; background: rgba(0,0,0,.28); border-radius: 8px; border-left: 2px solid rgba(255,255,255,.14); }

/* editor */
.edit-box { max-width: 620px; }
.edit-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #7d7772; margin: 12px 0 5px; }
.edit-area { font-family: inherit; line-height: 1.55; resize: vertical; min-height: 160px; }
.char-count { float: right; text-transform: none; letter-spacing: 0; color: #7d7772; }
.char-count.over { color: #f87171; font-weight: 650; }

/* ---------- 2.5D agent office ---------- */
.office-stage {
  margin-top: 14px; padding: 12px; border-radius: 12px; overflow-x: auto;
  background: radial-gradient(ellipse at 50% 0%, rgba(229,72,77,.07), transparent 62%), #0a0908;
  border: 1px solid rgba(255,255,255,.08);
}
#officeCanvas { display: block; image-rendering: -webkit-optimize-contrast; }

/* ---------- agent dossier ---------- */
.dossier {
  margin-top: 16px; background: #100e0d; border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px; padding: 16px; box-shadow: 0 14px 44px rgba(0,0,0,.45);
}
.dossier-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dossier-name { font-size: 18px; font-weight: 700; color: #f5f2f0; }
.dossier-role { font-size: 13px; color: #a09a95; margin-top: 3px; max-width: 60ch; line-height: 1.45; }
.dossier-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.dstat {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px; padding: 8px 14px; font-size: 11.5px; color: #a09a95;
  text-transform: uppercase; letter-spacing: .04em;
}
.dstat span { display: block; font-size: 21px; font-weight: 700; color: #4ade80; letter-spacing: 0; text-transform: none; }
.dossier-tabs { display: flex; gap: 6px; border-bottom: 1px solid rgba(255,255,255,.09); margin-bottom: 10px; }
.dtab {
  background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer;
  padding: 7px 13px; color: #7d7772; font-size: 13px; font-weight: 550; font-family: inherit;
}
.dtab.active { color: #f5f2f0; border-bottom-color: #e5484d; }
.dossier-body { max-height: 340px; overflow-y: auto; }
.dline { display: flex; gap: 9px; padding: 5px 0; font-size: 12.5px; border-bottom: 1px solid rgba(255,255,255,.04); align-items: baseline; }
.dtime { color: #6b6560; font-family: ui-monospace, monospace; font-size: 11px; flex-shrink: 0; }
.dtool { color: #60a5fa; font-family: ui-monospace, monospace; font-size: 11px; background: #1e2a4a66; padding: 1px 6px; border-radius: 4px; flex-shrink: 0; }
.dtext { color: #d8d3cf; line-height: 1.5; word-break: break-word; }
.dline.error .dtext, .dline.stderr .dtext { color: #fca5a5; }
.dline.tool_result .dtext { color: #a09a95; }

/* projects & voice tabs */
.proj-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 12px 0 6px; }
.proj-h { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin: 22px 0 8px; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.proj-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: #0a0906; }
.proj-title { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.proj-line { font-size: 13px; margin-top: 5px; }
.proj-link { color: var(--red-bright); text-decoration: none; font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.on { background: var(--green); } .dot.off { background: var(--red-bright); }
.conn-src.ok { border-color: var(--green); color: var(--green); } .conn-src.err { border-color: var(--red-bright); color: var(--red-bright); }
.voice-frame { width: 100%; height: 78vh; min-height: 560px; border: 1px solid var(--border); border-radius: 10px; background: #000; margin-top: 10px; }

/* sales page: imagery */
.hero-card.hero-img { padding: 0; overflow: hidden; }
.hero-card.hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.hero-card.hero-img .status { position: absolute; top: 14px; left: 14px; z-index: 2; background: rgba(5,5,5,.7); padding: 6px 10px; border-radius: 999px; }
.hero-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 22px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.reverse > div:first-child { order: 1; }
.split-img img { width: 100%; border-radius: 16px; border: 1px solid var(--border); display: block; }
.split-img.wide { max-width: 1100px; margin: 36px auto 0; }
.section-title.left, .section-sub.left { text-align: left; margin-left: 0; }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; color: var(--text); font-size: 15px; }
.checks li span { color: var(--red-bright); font-weight: 700; }
.grid-2.tight { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.grid-2.tight .card { padding: 16px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.gallery figure { margin: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.gallery figcaption { padding: 12px 14px; font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }
.gallery figcaption b { color: var(--text); display: block; margin-bottom: 2px; }
@media (max-width: 860px) { .split, .grid-2.tight, .gallery { grid-template-columns: 1fr; } .split.reverse > div:first-child { order: 0; } }

/* motion */
.hero { position: relative; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35; pointer-events: none; z-index: 0; }
.glow.g1 { width: 520px; height: 520px; background: var(--red); top: -160px; right: -120px; animation: drift 14s ease-in-out infinite alternate; }
.glow.g2 { width: 380px; height: 380px; background: #f3e3a8; bottom: -200px; left: -100px; opacity: .18; animation: drift 18s ease-in-out infinite alternate-reverse; }
.hero > div:not(.glow) { position: relative; z-index: 1; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(-60px, 40px) scale(1.15); } }
.hero-card.hero-img video, .gallery video, .split-img video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery video { aspect-ratio: 16/9; }
.hero-card.hero-img { animation: float 7s ease-in-out infinite; box-shadow: 0 30px 80px rgba(201, 162, 39,.25); }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-pills .chip { animation: fadeUp .8s ease both; }
.hero-pills .chip:nth-child(2) { animation-delay: .1s } .hero-pills .chip:nth-child(3) { animation-delay: .2s } .hero-pills .chip:nth-child(4) { animation-delay: .3s }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal .card, .reveal figure { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.in .card, .reveal.in figure { opacity: 1; transform: none; }
.card, .gallery figure { transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease; }
.card:hover, .gallery figure:hover { transform: translateY(-6px); border-color: var(--red); box-shadow: 0 18px 50px rgba(201, 162, 39,.18); }
.card .icon { transition: transform .35s ease; } .card:hover .icon { transform: scale(1.15) rotate(-6deg); }
.chip { transition: transform .25s ease, border-color .25s ease; } .chip:hover { transform: translateY(-2px); border-color: var(--red-bright); }
.badge .dot, .status .dot { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(74,222,128,.6); } 50% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } }
.btn { transition: transform .2s ease, box-shadow .2s ease; } .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(230, 195, 90,.35); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .glow, .hero-card.hero-img, .badge .dot, .status .dot, .hero-pills .chip { animation: none !important; } .reveal, .reveal .card, .reveal figure { transition: none; opacity: 1; transform: none; } }

/* Sirius star theme */
.star-logo { display: inline-flex; margin-right: 8px; filter: drop-shadow(0 0 6px rgba(201,162,39,.9)); animation: twinkle 3.2s ease-in-out infinite; vertical-align: middle; }
.star-logo.small { color: #f3e3a8; margin-right: 6px; animation: twinkle 3.2s ease-in-out infinite; }
@keyframes twinkle { 0%,100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(201,162,39,.9)); } 50% { transform: scale(1.12); filter: drop-shadow(0 0 14px rgba(243,227,168,1)); } }
.logo .tld { color: var(--text-dim); font-weight: 500; }
:root { --star: #f3e3a8; --star-deep: #c9a227; }

/* companion mode */
.comp-stage { position: relative; height: 56vh; min-height: 420px; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: radial-gradient(ellipse at 50% 60%, #14110a 0%, #050505 70%); margin-top: 12px; }
#compCanvas { width: 100%; height: 100%; display: block; }
.comp-hud { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: linear-gradient(to top, rgba(5,5,5,.85), rgba(5,5,5,0)); flex-wrap: wrap; }
.comp-state { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--text); }
.comp-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.comp-controls input { width: 220px; }
.comp-log { margin-top: 12px; max-height: 26vh; overflow: auto; display: grid; gap: 6px; }
.comp-line { font-size: 14px; line-height: 1.5; padding: 8px 12px; border-radius: 10px; background: var(--bg-card); border: 1px solid var(--border); }
.comp-line b { color: var(--text-dim); font-weight: 600; margin-right: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.comp-line.you { border-color: rgba(201,162,39,.35); } .comp-line.sirius { border-color: rgba(201, 162, 39,.35); }
body[data-comp-mode="speaking"] .comp-stage { box-shadow: 0 0 60px rgba(201, 162, 39,.25) inset; }
body[data-comp-mode="listening"] .comp-stage { box-shadow: 0 0 60px rgba(201,162,39,.18) inset; }

/* library */
.lib-bar { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.lib-bar input { flex: 1; min-width: 240px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 12px; }
.lib-results { display: grid; gap: 10px; }
.lib-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--bg-card); }
.lib-hook { font-size: 16px; font-weight: 600; color: var(--text); }
.lib-doc { white-space: pre-wrap; font-size: 13px; line-height: 1.5; background: #080704; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; max-height: 420px; overflow: auto; }

/* office mode */
.office { position: relative; display: grid; grid-template-columns: 240px 1fr; gap: 18px; margin-bottom: 32px; border-radius: 16px; overflow: hidden; }
.office-sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .9; }
.office-side { position: relative; z-index: 1; background: rgba(13,10,10,.72); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; backdrop-filter: blur(8px); }
.office-side-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--star); margin-bottom: 10px; }
.thread-list { flex: 1; overflow: auto; display: grid; gap: 6px; align-content: start; }
.thread { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; font-size: 13px; color: var(--text-dim); }
.thread:hover { border-color: var(--border); color: var(--text); } .thread.active { border-color: rgba(201,162,39,.5); color: var(--text); background: rgba(201,162,39,.06); }
.thread-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .thread-meta { font-size: 11px; opacity: .6; }
.thread-del { background: none; border: 0; color: var(--text-dim); cursor: pointer; opacity: 0; } .thread:hover .thread-del { opacity: 1; }
.office-side-foot { margin-top: 12px; display: grid; gap: 8px; } .office-side-foot p { font-size: 12px; margin: 0; }
.mode-toggle { width: 100%; }
.office-main { position: relative; z-index: 1; margin-bottom: 0; background: rgba(13,10,10,.7); backdrop-filter: blur(10px); }
.office .chat-log { max-height: 56vh; }
.chat-msg.sirius { max-width: 92%; } .chat-msg.sirius p { margin: 0 0 8px; } .chat-msg.sirius p:last-child { margin: 0; }
.chat-msg.sirius ul, .chat-msg.sirius ol { margin: 6px 0 8px 18px; } .chat-msg.sirius code { background: #080704; border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 13px; }
.chat-msg.sirius pre { background: #080704; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; overflow: auto; } .chat-msg.sirius pre code { border: 0; padding: 0; }
.chat-msg.sirius h1, .chat-msg.sirius h2, .chat-msg.sirius h3 { font-size: 15px; margin: 8px 0 4px; color: var(--star); }
.chat-msg.sirius table { border-collapse: collapse; font-size: 13px; } .chat-msg.sirius td, .chat-msg.sirius th { border: 1px solid var(--border); padding: 4px 8px; }
.msg-media { display: block; max-width: 100%; border-radius: 10px; margin: 8px 0; border: 1px solid var(--border); } audio.msg-media { width: 100%; }
.file-link { color: var(--star); }
@media (max-width: 900px) { .office { grid-template-columns: 1fr; } .office-side { order: 2; } }

/* history sidebar + task cards */
.thread-search { width: 100%; margin: 0 0 10px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 7px 10px; font-size: 13px; }
.thread-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin: 10px 4px 4px; }
.thread { grid-template-columns: 1fr auto; }
.thread-tools { display: none; gap: 2px; } .thread:hover .thread-tools, .thread.active .thread-tools { display: inline-flex; }
.thread-tools button { background: none; border: 0; color: var(--text-dim); cursor: pointer; font-size: 12px; padding: 0 3px; } .thread-tools button:hover { color: var(--red-bright); }
.task-toolbar { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; } .task-toolbar .grow { flex: 1; }
.task-toolbar .chip { cursor: pointer; } .task-toolbar .chip.on { border-color: var(--red); color: var(--red-bright); } .task-toolbar .chip span { opacity: .6; margin-left: 4px; }
details.task { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: var(--bg-card); }
details.task summary { list-style: none; display: grid; grid-template-columns: 10px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 14px; cursor: pointer; font-size: 14px; }
details.task summary::-webkit-details-marker { display: none; }
.tdot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); } details.task.running .tdot { background: var(--red-bright); animation: pulse 1.6s infinite; } details.task.done .tdot { background: var(--green); } details.task.failed .tdot { background: #e05a5a; }
.ttitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tmeta { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.tstate { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); } details.task.running .tstate { color: var(--red-bright); } details.task.done .tstate { color: var(--green); }
.tbody { padding: 0 14px 12px 34px; border-top: 1px solid var(--border); }
.tfull { font-size: 13px; white-space: pre-wrap; margin: 10px 0; max-height: 140px; overflow: auto; }
.tout { font-size: 13.5px; line-height: 1.55; max-height: 380px; overflow: auto; } .tout p { margin: 0 0 8px; }

.footer-wordmark { height: 34px; display: block; margin: 0 auto 14px; opacity: .95; }

.task-log-wrap { margin: 8px 0; } .task-log-wrap summary { cursor: pointer; font-size: 12px; }
.task-log .raw { opacity: .55; font-style: italic; }
.tfull { max-height: 96px; }

/* ---------- Cold Email ---------- */
.ce-banner { border: 1px solid var(--border); border-left: 3px solid var(--red); border-radius: 10px; background: var(--red-dim); padding: 12px 14px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 5px; }
.ce-banner strong { color: var(--red-bright); font-size: 13.5px; }
.ce-banner span { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.ce-policy { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 4px; }
.ce-policy label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-dim); }
.ce-policy label.ce-wide { grid-column: 1 / -1; }
.ce-policy input { background: #0a0906; border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 7px 10px; font-size: 13px; font-family: var(--font); }
.ce-policy input:focus { outline: none; border-color: var(--red); }
.ce-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.ce-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ce-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: #0a0906; }
.ce-card-h { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.ce-card p { font-size: 12.5px; line-height: 1.5; margin-bottom: 10px; }
.ce-empty { font-size: 12px; color: var(--text-dim); border: 1px dashed var(--border); border-radius: 6px; padding: 8px 10px; text-align: center; }
.ce-logbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.ce-logbar select, .ce-logbar input { background: #0a0906; border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 6px 10px; font-size: 12.5px; font-family: var(--font); }
.ce-logbar input { flex: 1; min-width: 160px; }
.ce-logbar select:focus, .ce-logbar input:focus { outline: none; border-color: var(--red); }
.ce-row { border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; margin-bottom: 8px; background: #0a0906; }
.ce-row-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; margin-bottom: 4px; }
.ce-agent { color: var(--red-bright); font-weight: 600; }
.ce-tool { color: var(--text-dim); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; }
.ce-kind { color: var(--text-dim); }
.ce-at { color: var(--text-dim); margin-left: auto; }
.ce-text { font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
