:root {
  --font-sans: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;

  --bg: #fafbf9;
  --sidebar-bg: #f3f6f0;
  --surface: #ffffff;
  --surface-subtle: #f7f9f5;
  --surface-hover: #eef3ea;
  --border: #e2e8de;
  --border-strong: #cdd7c7;
  --text: #1c2b22;
  --text-secondary: #536459;
  --text-muted: #7c8b81;

  --accent: #245c42;
  --accent-strong: #173f2e;
  --accent-soft: #e4efe7;
  --accent-text: #1b4d36;

  --ok: #1f7a4c;
  --ok-bg: #e6f5ec;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --info: #1d4ed8;
  --info-bg: #dbeafe;

  --code-bg: #141a17;
  --code-text: #e6eee8;
  --code-muted: #829688;
  --diff-add-bg: rgba(34, 197, 94, 0.16);
  --diff-add-text: #86efac;
  --diff-del-bg: rgba(239, 68, 68, 0.16);
  --diff-del-text: #fca5a5;
  --diff-hunk-text: #93c5fd;

  --shadow-sm: 0 1px 2px rgba(20, 42, 30, 0.05);
  --shadow-md: 0 6px 20px rgba(20, 42, 30, 0.07);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --sidebar-w: 256px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1411;
    --sidebar-bg: #141a16;
    --surface: #19211c;
    --surface-subtle: #1e2822;
    --surface-hover: #243029;
    --border: #2a3730;
    --border-strong: #394a40;
    --text: #ecf3ee;
    --text-secondary: #a8b9ae;
    --text-muted: #76887d;

    --accent: #3fa372;
    --accent-strong: #2d875b;
    --accent-soft: rgba(63, 163, 114, 0.16);
    --accent-text: #8de0b5;

    --ok: #4ade80;
    --ok-bg: rgba(74, 222, 128, 0.14);
    --warn: #fbbf24;
    --warn-bg: rgba(251, 191, 36, 0.14);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.16);
    --info: #60a5fa;
    --info-bg: rgba(96, 165, 250, 0.16);

    --code-bg: #0a0e0c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  --bg: #0f1411;
  --sidebar-bg: #141a16;
  --surface: #19211c;
  --surface-subtle: #1e2822;
  --surface-hover: #243029;
  --border: #2a3730;
  --border-strong: #394a40;
  --text: #ecf3ee;
  --text-secondary: #a8b9ae;
  --text-muted: #76887d;

  --accent: #3fa372;
  --accent-strong: #2d875b;
  --accent-soft: rgba(63, 163, 114, 0.16);
  --accent-text: #8de0b5;

  --ok: #4ade80;
  --ok-bg: rgba(74, 222, 128, 0.14);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.14);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.16);
  --info: #60a5fa;
  --info-bg: rgba(96, 165, 250, 0.16);
  --code-bg: #0a0e0c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 0.5rem; letter-spacing: -0.02em; font-weight: 700; color: var(--text); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: 0.95rem; }
p { margin: 0 0 0.65rem; }
a { color: var(--accent-text); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--font-mono); }

/* Controls & Forms */
button, input, select, textarea { font: inherit; color: var(--text); }
input, select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { min-height: 74px; resize: vertical; }
label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.65rem; }
form { display: flex; flex-direction: column; }

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.46rem 0.85rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background .14s, border-color .14s, transform .08s;
  white-space: nowrap;
}
button:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--accent); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary, form button:not([type="button"]):not(.secondary) {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #ffffff;
}
button.primary:hover:not(:disabled), form button:not([type="button"]):not(.secondary):hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
}
button.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
button.danger:hover:not(:disabled) { background: var(--danger-bg); }
button.ghost { background: transparent; border-color: transparent; }
button.ghost:hover:not(:disabled) { background: var(--surface-hover); border-color: transparent; }
button.sm { padding: 0.3rem 0.6rem; font-size: 12px; }

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1rem 0;
  background: var(--surface-subtle);
}
legend { font-weight: 700; font-size: 12.5px; color: var(--text-secondary); padding: 0 0.45rem; letter-spacing: 0.01em; }

/* Auth Landing Gate */
.auth-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: radial-gradient(circle at 18% 14%, var(--accent-soft), transparent 44%), var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
  box-shadow: var(--shadow-md);
}
.auth-brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.25rem; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #fff; font-weight: 800; font-family: var(--font-display);
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
  flex-shrink: 0;
}
.auth-brand-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; letter-spacing: -0.03em; }
.auth-brand-dot { color: var(--accent); }
.auth-card h2 { font-size: 1.45rem; margin-bottom: 0.45rem; }
.auth-lead { color: var(--text-secondary); margin-bottom: 1.4rem; font-size: 13.5px; }
.auth-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; margin-bottom: 1.6rem; }
.auth-pillar {
  background: var(--surface-subtle); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.65rem 0.75rem;
}
.auth-pillar strong { display: block; font-size: 12.5px; margin-bottom: 0.15rem; }
.auth-pillar span { font-size: 11.5px; color: var(--text-muted); }
.auth-cta {
  display: flex; align-items: center; justify-content: center; width: 100%;
  padding: 0.75rem 1.1rem; border-radius: var(--radius-sm);
  background: var(--accent-strong); color: #fff !important; font-weight: 700;
  font-size: 14px; text-decoration: none !important;
  transition: background .15s;
}
.auth-cta:hover { background: var(--accent); }

/* App Shell */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.1rem 0.85rem;
  z-index: 40;
  overflow-y: auto;
}
.sidebar-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.15rem 0.4rem 0.9rem; }
.sidebar-head .brand-title { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; }
.sidebar-head .brand-tag { margin-left: auto; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); }

.nav-section { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); padding: 0.85rem 0.55rem 0.35rem; }
.nav-list { display: flex; flex-direction: column; gap: 3px; }
.nav-btn {
  width: 100%; justify-content: flex-start; gap: 0.6rem;
  background: transparent; border: 1px solid transparent;
  padding: 0.5rem 0.65rem; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
}
.nav-btn:hover { background: var(--surface-hover); border-color: transparent; color: var(--text); }
.nav-btn.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.nav-btn .nav-badge { margin-left: auto; font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary); }

.sidebar-projects { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sidebar-projects li { margin: 0; }
.sidebar-projects button {
  width: 100%; justify-content: flex-start; text-align: left;
  background: transparent; border: 1px solid transparent;
  padding: 0.42rem 0.65rem; border-radius: 7px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis;
}
.sidebar-projects button:hover { background: var(--surface-hover); border-color: transparent; color: var(--text); }
.sidebar-projects button.active { background: var(--surface); border-color: var(--border); color: var(--text); font-weight: 700; box-shadow: var(--shadow-sm); }

.sidebar-create { margin-top: 0.5rem; padding: 0.6rem; border: 1px dashed var(--border-strong); border-radius: 8px; background: var(--surface); }
.sidebar-create form { gap: 0.35rem; }
.sidebar-create label { margin: 0; font-size: 11px; }
.sidebar-create input { padding: 0.35rem 0.5rem; font-size: 12.5px; }

.sidebar-foot {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.user-chip {
  display: flex; align-items: center; gap: 0.55rem; padding: 0.45rem 0.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.user-avatar {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent-text);
  font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-meta { min-width: 0; flex: 1; }
.user-meta #account { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { font-size: 10.5px; color: var(--text-muted); }
.foot-actions { display: flex; gap: 0.4rem; }
.foot-actions button { flex: 1; padding: 0.36rem 0.5rem; font-size: 12px; }

/* Main Column */
.main-col { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: 58px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex; align-items: center; gap: 0.85rem;
}
.mobile-menu-btn { display: none; padding: 0.35rem 0.55rem; }
.mobile-nav-backdrop { display: none; }
.breadcrumb { display: flex; align-items: center; gap: 0.45rem; font-size: 13px; color: var(--text-muted); min-width: 0; }
.breadcrumb strong { color: var(--text); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 0.65rem; }
.live-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 11.5px; font-weight: 600; color: var(--ok);
  background: var(--ok-bg); padding: 0.22rem 0.65rem; border-radius: 99px;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

.toast-bar {
  margin: 0.75rem 1.5rem 0;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 500;
  min-height: 0;
}
.toast-bar:empty { display: none; }

.workspace-body { padding: 1.4rem 1.5rem 3rem; max-width: 1360px; width: 100%; margin: 0 auto; flex: 1; }

/* Cards & Grids */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.85rem; flex-wrap: wrap; }
.card-header h3, .card-header h4 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm);
}
.stat-label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-family: var(--font-display); font-size: 1.65rem; font-weight: 800; margin-top: 0.2rem; letter-spacing: -0.03em; }
.stat-sub { font-size: 12px; color: var(--text-secondary); margin-top: 0.15rem; }

/* Badges / Pills */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-subtle); border: 1px solid var(--border); color: var(--text-secondary);
}
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.mono { font-family: var(--font-mono); font-size: 12px; }
.muted { color: var(--text-muted); font-size: 12.5px; }
.row-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; }

/* Project Hero & Tabs */
.project-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.35rem 0;
  margin-bottom: 1.15rem;
  box-shadow: var(--shadow-sm);
}
.project-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.project-hero-top h2 { font-size: 1.45rem; margin-bottom: 0.2rem; }
.project-meta { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }

.tab-bar {
  display: flex; gap: 0.25rem; overflow-x: auto;
  border-top: 1px solid var(--border); margin: 0 -1.35rem; padding: 0.35rem 1rem 0;
}
.tab-btn {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0; padding: 0.58rem 0.85rem;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
}
.tab-btn:hover { background: var(--surface-subtle); color: var(--text); border-color: transparent; }
.tab-btn.active { color: var(--accent-text); border-bottom-color: var(--accent); background: transparent; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Lists styled as sleek rows/cards */
.item-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.item-list > li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
}
.item-list > li > p { width: 100%; margin: 0.2rem 0 0; font-size: 12.5px; color: var(--text-secondary); }
.item-list > li button { padding: 0.28rem 0.6rem; font-size: 12px; }

/* Code / Terminal / Unified Diff Viewer */
.code-box {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
  max-height: 520px;
  overflow-y: auto;
}
.diff-line { display: block; padding: 0 0.5rem; margin: 0 -0.5rem; white-space: pre; }
.diff-add { background: var(--diff-add-bg); color: var(--diff-add-text); }
.diff-del { background: var(--diff-del-bg); color: var(--diff-del-text); }
.diff-hunk { color: var(--diff-hunk-text); font-weight: 600; }

/* Git Browser */
.git-split { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 1rem; align-items: start; }
.tree-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tree-table tr { border-bottom: 1px solid var(--border); }
.tree-table tr:last-child { border-bottom: none; }
.tree-table td { padding: 0.52rem 0.65rem; }
.tree-table tr:hover { background: var(--surface-subtle); }
.tree-link { font-weight: 600; color: var(--text); cursor: pointer; display: inline-flex; align-items: center; gap: 0.45rem; }
.tree-link:hover { color: var(--accent-text); }

/* WorkMesh Chatroom Layout */
.chat-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1rem; align-items: start; }
.chat-messages {
  list-style: none; margin: 0 0 0.85rem; padding: 0.75rem;
  background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius);
  max-height: 460px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.6rem;
}
.chat-messages > li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.65rem 0.85rem;
  font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere;
  box-shadow: var(--shadow-sm);
}

.site-footer {
  padding: 1rem 1.5rem; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-muted); text-align: center;
}

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s; box-shadow: var(--shadow-md); }
  .sidebar.open { transform: translateX(0); visibility: visible; }
  .mobile-nav-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 35; border: 0; border-radius: 0; background: rgba(12, 20, 15, .38); }
  .mobile-nav-backdrop:not([hidden]):hover { background: rgba(12, 20, 15, .38); }
  .topbar { padding: 0 .85rem; gap: .55rem; }
  .workspace-body { padding: 1rem .85rem 2rem; }
  .toast-bar { margin: .75rem .85rem 0; }
  .breadcrumb { flex: 1; min-width: 0; }
  .breadcrumb strong { min-width: 0; }
  .main-col { margin-left: 0; }
  .mobile-menu-btn { display: inline-flex; }
  .grid-2, .grid-3, .grid-4, .git-split, .chat-shell { grid-template-columns: 1fr; }
}

/* Project search applies to loaded authorized pages; loading more remains available. */
.project-filter-label { margin: 0 .75rem .25rem; font-size: .73rem; color: var(--text-secondary); }
.project-filter { width: calc(100% - 1.5rem); margin: 0 .75rem .45rem; }
.project-filter-empty { margin: 0 .75rem .4rem; font-size: .75rem; }
#projects li[hidden], #welcome-projects-grid > [hidden], .project-filter-empty[hidden] { display: none !important; }

/* Structured workflows: preserve the definition JSON as a secondary view. */
.workflow-summary { display:flex; flex-wrap:wrap; gap:.45rem; margin:.65rem 0; }
.workflow-steps { list-style:none; padding:0; margin:.7rem 0; display:grid; gap:.55rem; }
.workflow-steps > li, .workflow-run-step { padding:.7rem .8rem; border:1px solid var(--border); border-radius:10px; background:var(--surface-subtle); display:flex; align-items:center; flex-wrap:wrap; gap:.4rem .7rem; }
.workflow-steps > li > strong,.workflow-run-step > strong { flex:1 1 9rem; }
.workflow-steps > li > p,.workflow-run-step > p { flex:1 0 100%; margin:0; overflow-wrap:anywhere; }
.workflow-source { margin:.65rem 0; }
.workflow-source summary { cursor:pointer; font-size:.85rem; color:var(--text-secondary); }
.workflow-dialog { width:min(92vw,34rem); max-height:90vh; overflow:auto; border:1px solid var(--border); border-radius:14px; background:var(--surface); color:var(--text); padding:1.1rem; }
.workflow-dialog::backdrop { background:rgba(0,0,0,.42); }
.workflow-dialog textarea { width:100%; resize:vertical; }
.workflow-request { border:1px solid var(--border); padding:.75rem; margin:.65rem 0; border-radius:10px; background:var(--surface-subtle); }
.workflow-request p { margin:0 0 .6rem; overflow-wrap:anywhere; }
.connector-readiness { border-top:1px solid var(--border); border-bottom:1px solid var(--border); padding:.65rem 0; margin:.65rem 0 .85rem; }
.connector-readiness li { display:flex; align-items:center; flex-wrap:wrap; gap:.4rem .65rem; }
.connector-readiness li > p { flex:1 0 100%; margin:0; overflow-wrap:anywhere; }

/* LiveKit SFU video meeting grid */
.meeting-video-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:.75rem; margin-top:.65rem; }
.meeting-tile { position:relative; border-radius:var(--radius-sm); overflow:hidden; border:1px solid var(--border); background:#0c1118; aspect-ratio:16/10; display:flex; align-items:center; justify-content:center; }
.meeting-tile video { width:100%; height:100%; object-fit:cover; display:block; }
.meeting-tile.screen video { object-fit:contain; }
.meeting-tile-label { position:absolute; left:.5rem; bottom:.5rem; font-size:11px; font-weight:600; color:#fff; background:rgba(12,17,24,.72); padding:2px 8px; border-radius:99px; backdrop-filter:blur(4px); }


/* Intent-first activity: readable titles, compact outcome, responsive evidence. */
.activity-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); gap:1rem; align-items:start; }
.activity-layout > *, .activity-side > * { min-width:0; }
.activity-filters { margin-bottom:.75rem; }
.activity-side { display:grid; gap:1rem; }
.activity-list { list-style:none; margin:.6rem 0; padding:0; display:grid; gap:.45rem; }
.activity-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.35rem .6rem; align-items:start; width:100%; text-align:left; padding:.85rem; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); color:inherit; font:inherit; }
.activity-row strong { overflow-wrap:anywhere; line-height:1.35; }
.activity-row .badge { justify-self:end; white-space:nowrap; }
.activity-row[aria-pressed="true"] { outline:2px solid var(--accent, #245c42); outline-offset:-2px; }
.activity-meta { grid-column:1 / -1; color:var(--text-secondary); font-size:12px; overflow-wrap:anywhere; }
.activity-host-note { font-size:12px; margin:.8rem 0 0; }
#mcp-job-detail-title { overflow-wrap:anywhere; line-height:1.4; }
#mcp-job-detail details { margin-top:.8rem; border-top:1px solid var(--border); padding-top:.7rem; }
#mcp-job-detail summary { cursor:pointer; font-weight:600; }
#mcp-job-detail .code-box { max-width:100%; margin:.65rem 0 0; }
@media(max-width:960px) {
 .activity-layout { grid-template-columns:minmax(0,1fr); }
 .activity-row { padding:.75rem; }
 .activity-filters { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
}
