/*
 * SingularityOS Council — styles.css
 * Design tokens extracted from 07_DESIGN_SYSTEM.md (brand source: MONEY\singularity-deploy-v1,
 * singularityos-ai.com) and cross-checked against the existing Claude-Design mockup
 * ("SingularityOS Command Center.html") for concrete radii / glow / spacing values.
 * Dark-first, mono-labeled, cyan+gold command-deck aesthetic. No build step: plain CSS.
 */

/* ---------------------------------------------------------------------- */
/* Tokens                                                                  */
/* ---------------------------------------------------------------------- */

:root {
  /* Backgrounds */
  --void: #0A0B10;
  --armor: #0d0e16;
  --armor-2: #12141d;
  --glass: rgba(13, 14, 22, 0.75);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  /* Brand accents */
  --cyan: #14DDEE;
  --cyan-bright: #5eeaf5;
  --cyan-rgb: 20, 221, 238;
  --gold: #D4AF37;
  --gold-rgb: 212, 175, 55;

  /* Text */
  --text: #f8fafc;
  --text-soft: #c8d0dc;
  --muted: #94a3b8;
  --muted-2: #7a8494;
  --muted-3: #5b6472;

  /* States */
  --success: #34D399;
  --success-rgb: 52, 211, 153;
  --warn: #FBBF24;
  --warn-rgb: 251, 191, 36;
  --danger: #ff4444;
  --danger-bright: #ff8a80;
  --danger-rgb: 255, 68, 68;
  --danger-bg: #2a1215;
  --danger-border: #5c2b2e;

  --title-grad: linear-gradient(135deg, #fff 0%, #94a3b8 100%);

  /* Type */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Radii (stolen from the mockup's own chat-bubble / panel / pill patterns) */
  --r-panel: 12px;
  --r-card: 12px;
  --r-pill: 20px;
  --r-sm: 6px;
  --r-bubble-in: 10px 10px 10px 2px;
  --r-bubble-out: 10px 10px 2px 10px;

  --shell-max: 1440px;
}

/* ---------------------------------------------------------------------- */
/* Reset                                                                   */
/* ---------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--font-ui);
  overflow-x: hidden;
  min-height: 100%;
}
body { font-size: 14px; line-height: 1.5; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

* { scrollbar-width: thin; scrollbar-color: var(--muted-3) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--muted-3); border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
  flex-shrink: 0;
}

noscript {
  display: block;
  padding: 24px;
  font-family: var(--font-mono);
  color: var(--text);
  background: var(--void);
}

/* ---------------------------------------------------------------------- */
/* Typography scale — closed set of ~8 patterns (brand discipline rule 7)  */
/* ---------------------------------------------------------------------- */

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(var(--cyan-rgb), 0.65);
  margin-bottom: 8px;
}
.h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  background: var(--title-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.h2 { font-size: 21px; font-weight: 600; line-height: 1.25; color: var(--text); }
.h3 { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--text); }
.body { font-size: 14px; font-weight: 400; line-height: 1.55; color: var(--text-soft); }
.body-sm { font-size: 12.5px; font-weight: 400; line-height: 1.5; color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-soft); }
.mono-sm {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.muted { color: var(--muted); }

/* ---------------------------------------------------------------------- */
/* App shell                                                               */
/* ---------------------------------------------------------------------- */

/* ---------------------------------------------------------------------- */
/* App shell — OS Container & Sidebar                                      */
/* ---------------------------------------------------------------------- */

.os-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: var(--void);
}

.os-sidebar {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  background: var(--armor);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.os-sidebar.is-collapsed {
  width: 64px;
  min-width: 64px;
  max-width: 64px;
}

.sidebar-header {
  height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-link { background: none; border: none; padding: 0; }
.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(var(--cyan-rgb), 0.55));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; align-items: flex-start; }
.brand-title { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.15em; color: var(--text); }
.brand-sub { color: rgba(var(--cyan-rgb), 0.65); letter-spacing: 0.25em; }

.sidebar-collapse-btn {
  background: none;
  border: none;
  color: var(--muted);
  padding: 6px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.sidebar-collapse-btn:hover {
  color: var(--cyan);
  background: var(--armor-2);
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-group-title {
  padding: 0 10px 6px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--muted-3);
  font-weight: 600;
  text-transform: uppercase;
}

.os-sidebar.is-collapsed .sidebar-group-title {
  display: none;
}
.os-sidebar.is-collapsed .brand-text {
  display: none;
}
.os-sidebar.is-collapsed .nav-label,
.os-sidebar.is-collapsed .nav-pill,
.os-sidebar.is-collapsed .gem-name,
.os-sidebar.is-collapsed .gem-role,
.os-sidebar.is-collapsed .status-meta {
  display: none;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
}

.sidebar-nav-item:hover {
  color: var(--text);
  background: var(--armor-2);
}

.sidebar-nav-item.is-active {
  color: var(--cyan);
  background: rgba(var(--cyan-rgb), 0.08);
  border-color: rgba(var(--cyan-rgb), 0.25);
  box-shadow: inset 2px 0 0 var(--cyan);
}

.nav-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.nav-pill-live {
  background: rgba(var(--cyan-rgb), 0.15);
  color: var(--cyan);
  border: 1px solid rgba(var(--cyan-rgb), 0.3);
}

/* Gem list items in sidebar */
.sidebar-gem-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-gem-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: none;
  color: var(--text-soft);
  font-size: 13px;
  transition: all 0.15s ease;
  width: 100%;
  cursor: pointer;
}

.sidebar-gem-item:hover {
  background: var(--armor-2);
  color: var(--text);
  border-color: var(--line);
}

.sidebar-gem-item.is-active {
  background: rgba(var(--cyan-rgb), 0.08);
  border-color: rgba(var(--cyan-rgb), 0.3);
  color: #fff;
}

.gem-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot-color, var(--cyan));
  box-shadow: 0 0 6px var(--dot-color, var(--cyan));
  flex-shrink: 0;
}

.gem-name {
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
}

.gem-role {
  font-size: 9.5px;
  color: var(--muted-2);
  letter-spacing: 0.05em;
}

/* ---------------------------------------------------------------------- */
/* Gem Chip Bar — D1: the Board (7-agent sidebar list + its own view) is  */
/* absorbed here, above the main content, visible on every tab. Clicking  */
/* a chip is optional and opens that gem's Deliberation chat.             */
/* ---------------------------------------------------------------------- */

.gem-chip-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.gem-chip-label {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--muted-3);
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 2px;
}

.gem-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--armor-2);
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gem-chip:hover {
  border-color: var(--cyan);
  color: var(--text);
  background: rgba(var(--cyan-rgb), 0.08);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--armor-2);
  flex-shrink: 0;
}

.sidebar-status-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* Main Area & Context Topbar */
.os-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.os-topbar {
  height: 60px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-crumb {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-crumb .eyebrow {
  margin-bottom: 0;
  font-size: 9.5px;
}

.topbar-current-view {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-ui);
}

.os-content-wrap {
  flex: 1;
  padding: 28px 32px 64px;
  max-width: var(--shell-max);
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-head { display: flex; flex-direction: column; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------------------------------------------------------------------- */
/* Banners (honest states)                                                 */
/* ---------------------------------------------------------------------- */

.banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}
.banner .material-symbols-outlined { font-size: 22px; }
.banner-copy { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--text-soft); }
.banner-copy strong { color: var(--text); font-weight: 600; }
.banner-danger { background: var(--danger-bg); border-color: var(--danger-border); }
.banner-danger .material-symbols-outlined { color: var(--danger-bright); }
.banner-warn { background: rgba(var(--warn-rgb), 0.08); border-color: rgba(var(--warn-rgb), 0.35); }
.banner-warn .material-symbols-outlined { color: var(--warn); }

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--armor-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.btn:hover:not(:disabled) { border-color: var(--line-2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-primary {
  background: rgba(var(--cyan-rgb), 0.12);
  border-color: rgba(var(--cyan-rgb), 0.45);
  color: var(--cyan-bright);
}
.btn-primary:hover:not(:disabled) { background: rgba(var(--cyan-rgb), 0.2); border-color: var(--cyan); }
.btn-ghost { background: transparent; }
.btn-outline-danger { background: transparent; border-color: var(--danger-border); color: var(--danger-bright); }
.btn-outline-danger:hover:not(:disabled) { background: var(--danger-bg); border-color: var(--danger); }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--armor-2);
  color: var(--muted);
  flex-shrink: 0;
}
.btn-icon:hover:not(:disabled) { color: var(--text); border-color: var(--line-2); }
.btn-icon:disabled { opacity: 0.4; cursor: not-allowed; }
.mic-btn.is-active { color: var(--gem-color, var(--cyan)); border-color: rgba(var(--gem-rgb, var(--cyan-rgb)), 0.55); }
.mic-btn .pulse-dot { position: absolute; bottom: 2px; right: 2px; }

/* Gemini Live (tap-to-toggle, bidirectional streaming) — cyan, steady glow */
.mic-btn.is-live {
  color: var(--cyan-bright);
  border-color: var(--cyan);
  background: rgba(var(--cyan-rgb), 0.18);
  box-shadow: 0 0 0 3px rgba(var(--cyan-rgb), 0.18);
}

/* Voice note (press-and-hold, REST) — red, pulsing while held */
.mic-btn.is-recording {
  color: #F87171;
  border-color: #F87171;
  background: rgba(248, 113, 113, 0.18);
  animation: mic-recording-pulse 1.1s ease-in-out infinite;
}
@keyframes mic-recording-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(248, 113, 113, 0); }
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(var(--cyan-rgb), 0.25);
  border-top-color: var(--cyan);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Gem-cognition indicator -- the real brand mark spins in place of the      */
/* generic .spinner ring wherever a Gem (any of them, any view) is actually */
/* thinking: composer turn in flight, voice turn in flight, Constitution    */
/* being generated. Plain data-fetch spinners (timeline, MCP list) keep the */
/* ring above -- this glyph is reserved for "a Gem is reasoning right now". */
.gem-logo-spin {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: middle;
  filter: drop-shadow(0 0 4px rgba(var(--cyan-rgb), 0.55));
  animation: gem-logo-spin 1.4s linear infinite;
}
@keyframes gem-logo-spin { to { transform: rotate(360deg); } }

/* Persistent per-turn Gem avatar -- lives in every "in" chat-msg-meta      */
/* (composer + voice-note turns), same element for the entire turn: idle   */
/* (static, resting) while nothing is in flight for THIS turn, then gains  */
/* .is-spinning (slightly larger, brighter glow) the moment the request    */
/* for that turn is sent, then loses .is-spinning and settles back to the  */
/* idle size in place once the reply lands -- never removed/re-added like  */
/* a disappearing spinner, exactly like Claude Code's own turn avatar.     */
.gem-avatar-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: middle;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(var(--cyan-rgb), 0.45));
  transition: width 0.15s ease, height 0.15s ease, filter 0.15s ease;
}
.gem-avatar-icon.is-spinning {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 6px rgba(var(--cyan-rgb), 0.65));
  animation: gem-logo-spin 1.4s linear infinite;
}

/* ---------------------------------------------------------------------- */
/* Pulse dot — the one global "system alive" primitive (brand discipline 8)*/
/* ---------------------------------------------------------------------- */

.pulse-dot {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--pulse-rgb, var(--cyan-rgb)));
  box-shadow: 0 0 6px rgba(var(--pulse-rgb, var(--cyan-rgb)), 0.85);
  flex-shrink: 0;
}
.pulse-dot.is-dim { background: var(--muted-3); box-shadow: none; }
.pulse-dot.is-down { background: var(--danger); box-shadow: 0 0 6px rgba(var(--danger-rgb), 0.7); }
.pulse-dot.is-live::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(var(--pulse-rgb, var(--cyan-rgb)), 0.55);
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(var(--pulse-rgb, var(--cyan-rgb)), 0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(var(--pulse-rgb, var(--cyan-rgb)), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--pulse-rgb, var(--cyan-rgb)), 0); }
}

/* ---------------------------------------------------------------------- */
/* Pills / badges                                                          */
/* ---------------------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--armor-2);
  color: var(--text-soft);
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-weight: 600;
  white-space: nowrap;
}
.badge-success { color: var(--success); background: rgba(var(--success-rgb), 0.12); }
.badge-danger  { color: var(--danger-bright); background: var(--danger-bg); }
.badge-warn    { color: var(--warn); background: rgba(var(--warn-rgb), 0.14); }
.badge-neutral { color: var(--muted); background: var(--armor-2); }
.badge-roadmap { color: var(--gold); background: rgba(var(--gold-rgb), 0.12); border: 1px solid rgba(var(--gold-rgb), 0.35); }

/* ---------------------------------------------------------------------- */
/* Empty / loading / inline-error states                                   */
/* ---------------------------------------------------------------------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 40px 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-panel);
  color: var(--muted);
}
.empty-icon { font-size: 28px; color: var(--muted-3); }

.loading-state { display: flex; align-items: center; gap: 10px; padding: 24px; color: var(--muted); }

.inline-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-bright);
}
.inline-error .material-symbols-outlined { font-size: 16px; }

/* ---------------------------------------------------------------------- */
/* Council Deck — gem grid                                                 */
/* ---------------------------------------------------------------------- */

.gem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.gem-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 13px 14px;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.gem-card:hover {
  border-color: rgba(var(--gem-rgb, var(--cyan-rgb)), 0.45);
  box-shadow: 0 0 20px rgba(var(--gem-rgb, var(--cyan-rgb)), 0.1);
}
.gem-card:active { transform: translateY(1px); }
.gem-card.is-locked { opacity: 0.72; }

.gem-card-top { display: flex; align-items: center; justify-content: space-between; }
.gem-emoji { font-size: 22px; line-height: 1; }
.gem-emoji-sm { font-size: 16px; line-height: 1; }

.gem-card-id { display: flex; flex-direction: column; gap: 2px; }
.gem-title { color: var(--gem-color, var(--cyan)); letter-spacing: 0.1em; }

.gem-card-badges { display: flex; flex-wrap: wrap; gap: 6px; }

.gem-card-desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}

.gem-card-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted-2);
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-top: auto;
}
.dot-sep { color: var(--muted-3); }

.gem-card-lock {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--warn);
  background: rgba(var(--warn-rgb), 0.1);
  border: 1px solid rgba(var(--warn-rgb), 0.3);
  border-radius: var(--r-sm);
  padding: 5px 8px;
}
.gem-card-lock .material-symbols-outlined { font-size: 14px; }

.kpi-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.kpi-strip-empty { color: var(--muted-3); }
.kpi-chip {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 7px;
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  min-width: 70px;
}
.kpi-chip-name { color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.kpi-chip-value { color: var(--text); font-weight: 600; }
.kpi-chip-more { align-self: center; color: var(--muted-3); }

/* ---------------------------------------------------------------------- */
/* Chat layout (Shadow + Gem screens)                                      */
/* ---------------------------------------------------------------------- */

.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  flex: 1;
  min-height: 0;
}

.chat-column {
  display: flex;
  flex-direction: column;
  min-height: 560px;
  height: calc(100vh - 260px);
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  overflow: hidden;
}

.chat-transcript {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-msg { display: flex; flex-direction: column; gap: 4px; max-width: 78%; }
.chat-msg-in { align-self: flex-start; }
.chat-msg-out { align-self: flex-end; }
.chat-msg-meta { display: flex; gap: 8px; align-items: center; color: var(--muted-2); }
.gem-avatar-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 0 4px rgba(var(--cyan-rgb), 0.4));
  transition: transform 0.2s ease, filter 0.2s ease;
  flex-shrink: 0;
}
.gem-avatar-icon.is-spinning {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 8px rgba(var(--cyan-rgb), 0.8));
  animation: spin-logo 1.2s infinite linear;
}
.gem-logo-spin {
  animation: spin-logo 1.2s infinite linear;
  filter: drop-shadow(0 0 6px rgba(var(--cyan-rgb), 0.7));
  vertical-align: middle;
}
@keyframes spin-logo {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.chat-bubble {
  padding: 11px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-soft);
  background: var(--armor-2);
  border: 1px solid var(--line);
  line-height: 1.55;
}
.chat-msg-in .chat-bubble {
  border-radius: var(--r-bubble-in);
  border-left: 3px solid var(--gem-color, var(--cyan));
  background: var(--armor);
}
.chat-msg-out .chat-bubble {
  border-radius: var(--r-bubble-out);
  background: rgba(var(--cyan-rgb), 0.08);
  color: var(--text);
  border-right: 2px solid var(--cyan);
}
/* Aviso inline del /compact (hallazgo 1): el chat anterior quedó consolidado
   a Constitution y Registro histórico; centrado, colorido y distinto de los
   mensajes normales para que el founder vea que nada se borró. */
.chat-msg-system {
  align-self: center;
  max-width: 92%;
}
.chat-msg-system .chat-bubble {
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: var(--gold, #D4AF37);
  background: rgba(212, 175, 55, 0.08);
  border: 1px dashed rgba(212, 175, 55, 0.45);
  border-radius: 10px;
  letter-spacing: 0.2px;
}

.chat-bubble .chat-h2, .deliberation-text .chat-h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 10px 0 4px;
}
.chat-bubble .chat-h3, .deliberation-text .chat-h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  margin: 8px 0 4px;
}
.chat-bubble .chat-h4, .deliberation-text .chat-h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--gem-color, var(--cyan));
  margin: 6px 0 2px;
}
.chat-bubble .chat-ul, .deliberation-text .chat-ul,
.chat-bubble .chat-ol, .deliberation-text .chat-ol {
  margin: 6px 0 6px 18px;
  padding: 0;
}
.chat-bubble .chat-li, .deliberation-text .chat-li,
.chat-bubble .chat-oli, .deliberation-text .chat-oli {
  margin: 3px 0;
  color: var(--text-soft);
}
.chat-bubble .inline-code, .deliberation-text .inline-code {
  background: var(--armor-3);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
}
.chat-bubble .code-block, .deliberation-text .code-block {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  margin: 8px 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}
.chat-p-gap {
  height: 8px;
}

.chat-system {
  align-self: center;
  color: var(--muted-2);
  padding: 6px 12px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-pill);
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--armor);
}
.composer-input {
  flex: 1;
  resize: none;
  min-height: 38px;
  max-height: 200px;
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.4;
}
.composer-input:focus { outline: none; border-color: rgba(var(--cyan-rgb), 0.5); }
.composer-input:disabled { opacity: 0.5; }
.composer-send { border-radius: 50%; width: 38px; height: 38px; flex-shrink: 0; }
.composer-send .material-symbols-outlined { font-size: 18px; }

/* Fleet-level memory spine: circular context-occupancy gauge (plan 2026-08-30).
   A ring beside the send button, matching the DeepSeek/Claude Code ContextMeter:
   an SVG arc whose swept length = estimated context percent, with the % readout
   centred. Turns amber near the consolidation watermark and red past it. */
.token-gauge {
  position: relative;
  flex-shrink: 0;
  align-self: center;
  width: 24px;
  height: 24px;
  cursor: default;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.token-gauge svg { display: block; }
.tg-track { fill: none; stroke: rgba(var(--cyan-rgb), 0.14); stroke-width: 2.5; }
.tg-fill {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dasharray 0.25s ease, stroke 0.2s ease;
}
.tg-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
  color: var(--muted);
}
.token-gauge.is-warm .tg-fill { stroke: #f59e0b; }
.token-gauge.is-warm .tg-pct  { color: #f59e0b; }
.token-gauge.is-hot .tg-fill  { stroke: #ef4444; }
.token-gauge.is-hot .tg-pct   { color: #ef4444; font-weight: 800; }

/* /compact: botón manual junto al gauge (plan espina vertebral round 3). */
.composer-compact {
  flex-shrink: 0;
  align-self: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
}
.composer-compact .material-symbols-outlined { font-size: 18px; }
.composer-compact:hover { color: #f59e0b; border-color: rgba(245, 158, 11, 0.4); }

.mic-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--armor-2);
  border: 1px solid var(--line-2);
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.mic-btn:hover {
  border-color: rgba(var(--cyan-rgb), 0.6);
  color: var(--cyan);
  box-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.25);
}
.mic-btn.is-live {
  background: rgba(var(--cyan-rgb), 0.18);
  border-color: var(--cyan);
  color: var(--cyan-bright);
  box-shadow: 0 0 16px rgba(var(--cyan-rgb), 0.6);
  animation: pulse-live-glow 1.4s infinite alternate ease-in-out;
}
.mic-btn.is-recording {
  background: rgba(var(--danger-rgb), 0.25);
  border-color: var(--danger-bright);
  color: #fff;
  box-shadow: 0 0 18px rgba(var(--danger-rgb), 0.8);
  animation: pulse-stop-glow 1s infinite alternate ease-in-out;
}
.live-pulse-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(var(--cyan-rgb), 0.25);
  border: 1px solid rgba(var(--cyan-rgb), 0.6);
  color: var(--cyan-bright);
  pointer-events: none;
  line-height: 1;
}
.mic-btn.is-live .live-pulse-badge {
  background: var(--cyan);
  color: #000;
  box-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.8);
}
@keyframes pulse-live-glow {
  0% { box-shadow: 0 0 6px rgba(var(--cyan-rgb), 0.3); }
  100% { box-shadow: 0 0 20px rgba(var(--cyan-rgb), 0.9); }
}

.attach-btn { border-radius: 50%; width: 38px; height: 38px; flex-shrink: 0; }
.attach-btn .material-symbols-outlined { font-size: 19px; }
.attach-btn.has-attachment { color: var(--cyan-bright); border-color: rgba(var(--cyan-rgb), 0.55); }

.composer-attachment-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 14px 8px;
  padding: 7px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--armor-2);
  font-size: 12.5px;
  color: var(--text);
}
.composer-attachment-preview img.composer-attachment-thumb {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.composer-attachment-preview .material-symbols-outlined:first-child { font-size: 18px; color: var(--cyan); flex-shrink: 0; }
.composer-attachment-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.composer-attachment-remove { width: 24px; height: 24px; flex-shrink: 0; }
.composer-attachment-remove .material-symbols-outlined { font-size: 16px; }

.composer-stop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  background: rgba(var(--danger-rgb), 0.22);
  border: 1px solid rgba(var(--danger-rgb), 0.7);
  color: var(--danger-bright);
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  animation: pulse-stop-glow 1.5s infinite alternate ease-in-out;
}
.composer-stop:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger-bright);
}
.composer-stop .material-symbols-outlined { font-size: 18px; }

@keyframes pulse-stop-glow {
  0% { box-shadow: 0 0 4px rgba(var(--danger-rgb), 0.3); border-color: rgba(var(--danger-rgb), 0.5); }
  100% { box-shadow: 0 0 14px rgba(var(--danger-rgb), 0.85); border-color: rgba(var(--danger-rgb), 1); }
}

/* ---------------------------------------------------------------------- */
/* Floating Skills Popover (Slash Autocomplete)                            */
/* ---------------------------------------------------------------------- */
.composer-skills-popover {
  position: relative;
  margin: 0 14px 10px;
  background: var(--armor-3, #0f1520);
  border: 1px solid rgba(var(--cyan-rgb), 0.35);
  border-radius: var(--r-panel, 10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.65), 0 0 16px rgba(var(--cyan-rgb), 0.15);
  overflow: hidden;
  z-index: 100;
  backdrop-filter: blur(16px);
  animation: popoverFadeSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes popoverFadeSlide {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.skills-popover-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(var(--armor-rgb, 12, 17, 24), 0.85);
  border-bottom: 1px solid var(--line-2);
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--cyan);
}
.skills-popover-list {
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.skills-popover-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--r-sm, 6px);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  color: var(--text);
  font-family: inherit;
  width: 100%;
}
.skills-popover-item:hover, .skills-popover-item.is-selected {
  background: rgba(var(--cyan-rgb), 0.12);
  border-color: rgba(var(--cyan-rgb), 0.4);
  color: #fff;
}
.skills-popover-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.skills-popover-cmd {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--cyan-bright);
  font-size: 13px;
  padding: 2px 6px;
  background: rgba(var(--cyan-rgb), 0.15);
  border-radius: 4px;
  flex-shrink: 0;
}
.skills-popover-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  flex-shrink: 0;
}
.skills-popover-desc {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}
.skills-popover-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------- */
/* Deliberation panel — the product's visual centerpiece                   */
/* ---------------------------------------------------------------------- */

.deliberation {
  align-self: stretch;
  max-width: 100%;
  padding: 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-panel);
  background: linear-gradient(180deg, rgba(var(--cyan-rgb), 0.05), transparent 60%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.deliberation-label { color: rgba(var(--cyan-rgb), 0.75); }
.deliberation-row { display: flex; flex-wrap: wrap; gap: 12px; }
.deliberation-card {
  flex: 1 1 240px;
  min-width: 220px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--armor);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gem-color, var(--muted));
  border-radius: var(--r-sm);
}
.deliberation-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.deliberation-card-title { color: var(--gem-color, var(--muted)); letter-spacing: 0.08em; }
.deliberation-text { color: var(--text-soft); white-space: pre-wrap; word-break: break-word; }
.deliberation-card-meta { display: flex; gap: 10px; color: var(--muted-3); flex-wrap: wrap; }
.collapsible { display: flex; flex-direction: column; gap: 4px; }

/* ---------------------------------------------------------------------- */
/* Tool call chips                                                         */
/* ---------------------------------------------------------------------- */

.toolcall-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.toolcall-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: var(--armor-2);
  border: 1px solid var(--line);
  color: var(--muted-2);
}
.toolcall-chip .material-symbols-outlined { font-size: 15px; }
.toolcall-name { color: var(--text-soft); }
.toolcall-risk { color: var(--muted-3); }
.toolcall-reason { flex-basis: 100%; color: var(--muted-2); font-size: 12px; }
/* Commit 4 (web grounding): clickable citation sources, real grounding chunks */
.sources-wrap {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}
.sources-label { flex-basis: 100%; color: var(--cyan); letter-spacing: 0.08em; }
.source-link {
  color: var(--text-soft);
  text-decoration: none;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(var(--cyan-rgb), 0.06);
}
.source-link:hover { border-color: var(--cyan); color: var(--cyan); }
.toolcall-generated-image {
  flex-basis: 100%;
  max-width: 320px;
  max-height: 320px;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
}
.toolcall-generated-video {
  flex-basis: 100%;
  width: 100%;
  max-width: 400px;
  max-height: 360px;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #000;
  display: block;
}
.toolcall-chip.is-sensitive { border-color: rgba(var(--warn-rgb), 0.35); }
.toolcall-chip.is-sensitive .material-symbols-outlined { color: var(--warn); }
.toolcall-chip.is-pending { border-color: rgba(var(--gold-rgb), 0.5); background: rgba(var(--gold-rgb), 0.08); }
.toolcall-chip.is-pending .material-symbols-outlined { color: var(--gold); }
.toolcall-chip.is-vetoed { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger-bright); }
.toolcall-chip.is-vetoed .material-symbols-outlined { color: var(--danger-bright); }
.toolcall-chip.is-vetoed .toolcall-name { color: var(--danger-bright); }

/* ---------------------------------------------------------------------- */
/* Side rail (roster / gem detail)                                         */
/* ---------------------------------------------------------------------- */

.side-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  overflow-y: auto;
  height: calc(100vh - 260px);
  min-height: 560px;
}

.roster-list { display: flex; flex-direction: column; gap: 4px; }
.roster-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: none;
  width: 100%;
  text-align: left;
  color: var(--text-soft);
}
.roster-item:hover { background: var(--armor-2); border-color: var(--line); }
.roster-item-text { display: flex; flex-direction: column; overflow: hidden; }
.roster-item-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster-item-title { color: var(--muted-3); font-size: 10px; letter-spacing: 0.06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rail-section { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.rail-section:last-child { border-bottom: none; padding-bottom: 0; }
.rail-title { color: rgba(var(--cyan-rgb), 0.6); }
.rail-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.rail-row-label { color: var(--muted-2); flex-shrink: 0; }
.rail-row-value { color: var(--text-soft); text-align: right; overflow-wrap: anywhere; }
.rail-list-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-soft); }
.rail-list-item .material-symbols-outlined { font-size: 15px; color: var(--muted-3); }
.rail-list-item.is-roadmap { color: var(--muted-2); }
.rail-kpi { display: flex; flex-direction: column; gap: 2px; }
.rail-kpi-name { font-size: 12.5px; color: var(--text-soft); }
.rail-kpi-meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted-3); }
.rail-audit-row { display: flex; flex-direction: column; gap: 1px; font-size: 12px; padding: 4px 0; }

.rail-info-card {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rail-ladder-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rail-ladder-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.rail-ladder-item .badge {
  font-size: 9.5px;
  padding: 2px 5px;
  flex-shrink: 0;
}
.rail-ladder-item .body-sm {
  font-size: 11.5px;
  color: var(--text-soft);
}

/* ---------------------------------------------------------------------- */
/* The Gate — blocking confirmation modal                                  */
/* ---------------------------------------------------------------------- */

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 4, 8, 0.72);
  padding: 20px;
}
.gate-overlay[hidden] { display: none !important; }

/* Inline action gate — lives INSIDE the chat transcript, never full-screen */
.inline-gate-card {
  width: 100%;
  max-width: 640px;
  background: var(--armor);
  border: 1px solid rgba(var(--danger-rgb), 0.4);
  border-radius: var(--r-panel);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.inline-gate-head { display: flex; align-items: flex-start; gap: 10px; }
.inline-gate-icon { font-size: 22px; color: var(--warn); margin-top: 2px; }
.inline-gate-head-text { display: flex; flex-direction: column; gap: 2px; }
.inline-gate-title { font-weight: 700; font-size: 15px; color: var(--text); }
.inline-gate-body { display: flex; flex-direction: column; gap: 8px; }
.inline-gate-who { color: var(--muted-2); }
.inline-gate-args {
  max-height: 180px;
  overflow: auto;
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.inline-gate-note { color: var(--muted-2); }
.inline-gate-actions { display: flex; justify-content: flex-end; gap: 10px; }
.inline-gate-resolved { padding: 6px 10px; border-radius: 8px; font-weight: 700; }
.inline-gate-resolved.is-approved { color: var(--success); background: rgba(var(--success-rgb), 0.12); }
.inline-gate-resolved.is-rejected { color: var(--danger); background: rgba(var(--danger-rgb), 0.12); }

/* Feature D — ask_user inline card (gold accent, sibling of the danger-red gate) */
.inline-ask-card { border-color: rgba(var(--gold-rgb), 0.4); }
.inline-ask-icon { color: var(--gold); }
.inline-ask-options { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-ask-option {
  background: rgba(var(--gold-rgb), 0.10);
  border-color: rgba(var(--gold-rgb), 0.40);
  color: var(--gold);
  white-space: normal;
  text-align: left;
  min-height: 34px;
}
.inline-ask-option:hover:not(:disabled) { background: rgba(var(--gold-rgb), 0.2); border-color: var(--gold); }
.inline-ask-writein { display: flex; gap: 8px; align-items: stretch; }
.inline-ask-input {
  flex: 1;
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--text);
  font-family: var(--font-mono);
}
.inline-ask-input::placeholder { color: var(--muted-3); }
.inline-ask-input:focus { outline: none; border-color: rgba(var(--cyan-rgb), 0.5); }
.inline-ask-input:disabled { opacity: 0.5; }
.gate-modal {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--armor);
  border: 1px solid rgba(var(--danger-rgb), 0.35);
  border-radius: var(--r-panel);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gate-head { display: flex; align-items: flex-start; gap: 12px; }
.gate-icon { font-size: 26px; color: var(--warn); margin-top: 2px; }
.gate-body { display: flex; flex-direction: column; gap: 10px; }
.gate-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; }
.gate-row > span:first-child { color: var(--muted-2); flex-shrink: 0; }
.gate-row > span:last-child { color: var(--text); text-align: right; }
.gate-args { display: flex; flex-direction: column; gap: 6px; }
.gate-args-pre {
  max-height: 220px;
  overflow: auto;
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.gate-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ---------------------------------------------------------------------- */
/* Audit trail                                                             */
/* ---------------------------------------------------------------------- */

.audit-list { display: flex; flex-direction: column; gap: 8px; }
.audit-row {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--armor);
  border: 1px solid var(--line);
  border-left: 3px solid rgba(var(--gem-rgb, var(--muted-3)), 0.6);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.audit-row.is-veto { background: var(--danger-bg); border-color: var(--danger-border); border-left-color: var(--danger); }
.audit-row-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.audit-ts { color: var(--muted-3); flex-shrink: 0; }
.audit-actor { font-weight: 600; color: var(--text); white-space: nowrap; }
.audit-action { color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 80px; }
.audit-reason { color: var(--text-soft); }
.audit-row.is-veto .audit-reason { color: var(--danger-bright); font-weight: 500; }

/* ---------------------------------------------------------------------- */
/* Onboarding                                                              */
/* ---------------------------------------------------------------------- */

.onboarding-flow { max-width: 620px; display: flex; flex-direction: column; gap: 18px; }
.onboarding-progress { color: rgba(var(--cyan-rgb), 0.7); }
.onboarding-thread { display: flex; flex-direction: column; gap: 14px; }
.onboarding-recap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.onboarding-recap-answer { color: var(--text-soft); text-align: right; }
.onboarding-question { display: flex; flex-direction: column; gap: 10px; }
.onboarding-input {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
}
.onboarding-input:focus { outline: none; border-color: rgba(var(--cyan-rgb), 0.5); }
.onboarding-input.input-error { border-color: var(--danger); }
.onboarding-actions { display: flex; gap: 10px; }

.constitution-editor { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.constitution-textarea {
  width: 100%;
  min-height: 420px;
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  padding: 16px;
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
}
.constitution-textarea:focus { outline: none; border-color: rgba(var(--cyan-rgb), 0.4); }

/* ---------------------------------------------------------------------- */
/* Toasts                                                                   */
/* ---------------------------------------------------------------------- */

.toast-root {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}
.toast {
  padding: 11px 14px;
  border-radius: var(--r-sm);
  background: var(--armor-2);
  border: 1px solid var(--line-2);
  color: var(--text-soft);
  font-size: 12.5px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  animation: toast-in 0.2s ease;
}
.toast.is-leaving { opacity: 0; transition: opacity 0.3s ease; }
.toast-success { border-color: rgba(var(--success-rgb), 0.4); color: var(--success); }
.toast-danger { border-color: var(--danger-border); color: var(--danger-bright); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------------------------------------------------------------- */
/* Responsive — guaranteed correct at 1280px+; degrades gracefully below   */
/* ---------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .chat-layout { grid-template-columns: 1fr; }
  .side-rail { height: auto; min-height: 0; max-height: 420px; }
}

@media (max-width: 720px) {
  .topbar { gap: 14px; padding: 0 14px; }
  .topnav .nav-link span:not(.material-symbols-outlined) { display: none; }
  .screen { padding: 20px 14px 40px; }
}

/* ─────────────────────────────────────────────────────────────
   Utilidades de color de texto (pieza V3-G3-bis - timer earnings)
   ───────────────────────────────────────────────────────────── */
.text--success { color: var(--success); }
.text--warn { color: var(--warn); }
.text--muted-2 { color: var(--muted-2); }

/* ─────────────────────────────────────────────────────────────
   Complemento del Arquitecto (2026-08-20)
   Clases que el HTML/JS usa y que faltaban por definir.
   ───────────────────────────────────────────────────────────── */

/* Vistas: el router muestra una y oculta el resto con [hidden]. */
.view {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  min-height: 0;
}
.view[hidden] { display: none; }

/* Salud del backend: verde vivo / rojo apagado.
   Sin backend NO se inventa "en línea" — el punto se apaga y se dice. */
.health-indicator.is-ok .pulse-dot {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(var(--success-rgb), 0.16);
}
.health-indicator.is-down .pulse-dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(var(--danger-rgb), 0.16);
  animation: none;
}

/* Riesgo de una tool: lo SAFE es tipografía; lo SENSITIVE se ve. */
.toolcall-risk.risk-safe {
  color: var(--muted);
  border-color: var(--line);
}
.toolcall-risk.risk-sensitive {
  color: var(--gold);
  border-color: rgba(var(--gold-rgb), 0.35);
  background: rgba(var(--gold-rgb), 0.08);
}

/* Tool vetada por otra gema. Es el momento clave del producto:
   se marca en rojo y no se puede confundir con una ejecución normal. */
.toolcall-chip.is-blocked {
  border-color: rgba(var(--danger-rgb), 0.45);
  background: rgba(var(--danger-rgb), 0.08);
}
.toolcall-chip.is-blocked .toolcall-name {
  color: var(--danger-bright);
  text-decoration: line-through;
  text-decoration-color: rgba(var(--danger-rgb), 0.5);
}
.toolcall-chip.is-blocked .toolcall-reason { color: var(--danger-bright); }

/* ─────────────────────────────────────────────────────────────
   D2: per-turn HUD (peldaño + reason, gem with the ball, veto,
   tool power) and the live Council debate feed (POST /api/deliberation
   + SSE stream)
   ───────────────────────────────────────────────────────────── */

.turn-hud {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 12px;
  margin: -4px 0 2px;
}
.turn-hud-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.turn-hud-ball { color: var(--muted-2); }
.turn-hud-reason { color: var(--muted-3); }
.badge-rung {
  color: var(--cyan);
  background: rgba(var(--cyan-rgb), 0.14);
  border: 1px solid rgba(var(--cyan-rgb), 0.3);
}
.turn-hud-veto {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-bright);
  font-size: 12px;
}
.turn-hud-veto .material-symbols-outlined { font-size: 15px; }

.deliberation-live {
  align-self: stretch;
  max-width: 100%;
  padding: 14px;
  border: 1px solid rgba(var(--gold-rgb), 0.3);
  border-radius: var(--r-panel);
  background: linear-gradient(180deg, rgba(var(--gold-rgb), 0.05), transparent 60%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.deliberation-live > .deliberation-label { color: var(--gold); }
.deliberation-live-feed { display: flex; flex-direction: column; gap: 8px; }
.deliberation-live-error { color: var(--danger-bright); }
.deliberation-quorum-badge {
  padding: 6px 10px;
  border: 1px dashed rgba(var(--gold-rgb), 0.4);
  border-radius: 8px;
  background: rgba(var(--gold-rgb), 0.06);
  color: var(--gold) !important;
}

.debate-turn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--armor);
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
}
.debate-turn-head { color: var(--text-soft); letter-spacing: 0.06em; }
.debate-turn-body { color: var(--muted-2); white-space: pre-wrap; word-break: break-word; }
.debate-turn-proposal { color: var(--gold); }
.debate-turn-dissent { color: var(--danger-bright); }
.debate-turn-topic { border-left-color: var(--gold); }
.debate-turn-synthesis { border-left-color: var(--cyan); }
.debate-turn-halt { border-left-color: var(--muted); opacity: 0.85; }
.debate-stance-agree { border-left-color: var(--success); }
.debate-stance-object { border-left-color: var(--danger-bright); }
.debate-stance-abstain { border-left-color: var(--muted-3); }

/* ─────────────────────────────────────────────────────────────
   Command Center: Telemetría Financiera, Silos y Rutina Faraón
   ───────────────────────────────────────────────────────────── */

.telemetry-header-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.cc-kpi-grid-wrap {
  display: contents;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
}

.kpi-card.is-gold::before { background: var(--gold); }
.kpi-card.is-cyan::before { background: var(--cyan); }
.kpi-card.is-success::before { background: var(--success); }
.kpi-card.is-warn::before { background: var(--warn); }
.kpi-card.is-danger::before { background: var(--danger); }

.kpi-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}

.kpi-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--armor-2);
  border: 1px solid var(--line);
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.kpi-sub {
  font-size: 12px;
  color: var(--muted-2);
}

.telemetry-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 1024px) {
  .telemetry-layout {
    grid-template-columns: 1fr;
  }
}

.telemetry-panel {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.telemetry-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

/* ---------------------------------------------------------------------- */
/* Command Center V2 (G3) -- editable Financial Health / Offer Value panels */
/* ---------------------------------------------------------------------- */

.cc-semaphore {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--armor-2);
  border: 1px solid var(--line);
}

.cc-semaphore-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted-3);
  box-shadow: 0 0 6px transparent;
}

.cc-semaphore.is-green .cc-semaphore-dot { background: var(--success); box-shadow: 0 0 6px rgba(var(--success-rgb), 0.7); }
.cc-semaphore.is-yellow .cc-semaphore-dot { background: var(--warn); box-shadow: 0 0 6px rgba(var(--warn-rgb), 0.7); }
.cc-semaphore.is-red .cc-semaphore-dot { background: var(--danger); box-shadow: 0 0 6px rgba(var(--danger-rgb), 0.7); }
.cc-semaphore.is-approve .cc-semaphore-dot { background: var(--success); box-shadow: 0 0 6px rgba(var(--success-rgb), 0.7); }
.cc-semaphore.is-deny .cc-semaphore-dot { background: var(--danger); box-shadow: 0 0 6px rgba(var(--danger-rgb), 0.7); }

.cc-semaphore.is-green .cc-semaphore-label,
.cc-semaphore.is-approve .cc-semaphore-label { color: var(--success); }
.cc-semaphore.is-yellow .cc-semaphore-label { color: var(--warn); }
.cc-semaphore.is-red .cc-semaphore-label,
.cc-semaphore.is-deny .cc-semaphore-label { color: var(--danger-bright); }

/* ── MijoNotifier Banner (Pieza 5-A) ───────────────────────────────────────── */
.cc-mijo-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  background: var(--armor-2);
  border: 1px solid var(--line);
  font-size: 12.5px;  /* mismo tamano que .body-sm; el tema no define variables de tamano */
}

.cc-mijo-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cc-mijo-banner .material-symbols-outlined {
  font-size: 18px;
  align-self: flex-start;
}

.cc-mijo-banner.is-critico {
  border-color: var(--danger);
  background: rgba(var(--danger-rgb), 0.08);
  color: var(--danger);
}

.cc-mijo-banner.is-soberano {
  border-color: var(--warn);
  background: rgba(var(--warn-rgb), 0.08);
  color: var(--warn);
}

.cc-mijo-banner.is-riesgo {
  border-color: var(--warn);
  background: rgba(var(--warn-rgb), 0.08);
  color: var(--warn);
}

.cc-mijo-banner.is-normal {
  border-color: var(--success);
  background: rgba(var(--success-rgb), 0.08);
  color: var(--success);
}

.cc-mijo-title {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.cc-mijo-message {
  flex: 1;
}

/* ── Blueprint Progress Bar (Pieza 5-A) ─────────────────────────────────────── */
.cc-bp-bar {
  height: 6px;
  background: var(--muted-3);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-top: 6px;
}

.cc-bp-bar-fill {
  height: 100%;
  background: var(--warn);
  border-radius: var(--r-pill);
  transition: width 0.4s ease-out;
  width: 0%;
}

.cc-computed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.cc-computed-grid .kpi-value { font-size: 20px; }

.cc-deny-box {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--r-card);
  padding: 12px 14px;
}

.cc-deny-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--danger-bright);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cc-deny-head .material-symbols-outlined { font-size: 16px; }

.cc-deny-list {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--danger-bright);
  font-size: 12.5px;
  line-height: 1.6;
}

.cc-form-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.cc-subhead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.cc-subhead {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
}

.cc-row-list, .cc-silo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cc-row {
  display: grid;
  grid-template-columns: 1fr 140px 32px;
  gap: 8px;
  align-items: center;
}

.cc-silo-card {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cc-silo-card-head {
  display: grid;
  grid-template-columns: 1fr 32px;
  gap: 8px;
  align-items: center;
}

.cc-silo-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 4px;
  border-left: 2px solid var(--line);
}

.cc-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.cc-row-empty {
  color: var(--muted-3);
  font-size: 12px;
  padding: 6px 0;
}

/* Command Center V2 (oxigeno real, ciclo de cobro dia 15): rows that carry
   the extra critical/due-date/installment-schedule fields don't fit the
   base 3-column `.cc-row` grid, so they get their own template instead of
   overflowing into implicit auto-placed rows. */
.cc-row-critical {
  grid-template-columns: 1fr 100px auto 150px 32px;
}

.cc-row-debt-schedule {
  display: grid;
  grid-template-columns: 150px 110px 130px auto;
  gap: 8px;
  align-items: center;
}

.cc-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted-2);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .cc-computed-grid { grid-template-columns: 1fr; }
  .cc-row { grid-template-columns: 1fr 110px 32px; }
}

.silo-item {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.silo-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.silo-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.silo-amount {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-cyan { background: var(--cyan); }
.progress-gold { background: var(--gold); }
.progress-success { background: var(--success); }
.progress-warn { background: var(--warn); }

.silo-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

.routine-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.routine-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  gap: 12px;
}

.routine-item.is-active {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.15);
}

.routine-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  white-space: nowrap;
}

.routine-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}

.routine-status-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.status-completed {
  background: rgba(var(--success-rgb), 0.15);
  color: var(--success);
  border: 1px solid rgba(var(--success-rgb), 0.3);
}

.status-in_progress {
  background: rgba(var(--cyan-rgb), 0.15);
  color: var(--cyan);
  border: 1px solid rgba(var(--cyan-rgb), 0.3);
  animation: pulse-glow 2s infinite ease-in-out;
}

.status-pending {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid var(--line);
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(var(--cyan-rgb), 0.2); }
  50% { box-shadow: 0 0 14px rgba(var(--cyan-rgb), 0.5); }
}

/* ---------------------------------------------------------------------- */
/* Connectors Hub & MCP Runtimes                                          */
/* ---------------------------------------------------------------------- */

.connectors-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 7px 12px;
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  color: var(--text);
  border-color: var(--line);
}

.filter-pill.is-active {
  background: rgba(var(--cyan-rgb), 0.12);
  color: var(--cyan);
  border-color: rgba(var(--cyan-rgb), 0.3);
  font-weight: 600;
}

.connectors-summary-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.75;
  font-size: 11px;
}

.connectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.connector-card {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.connector-card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

.connector-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.connector-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--armor-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  flex-shrink: 0;
}

.connector-icon-box .material-symbols-outlined {
  font-size: 22px;
}

.connector-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.connector-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.connector-category {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* Transport chip: MCP vs REST. Only rendered for a CONNECTED connector --
   the backend never reports a transport for one that never touched the wire. */
.transport-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}

.transport-chip .material-symbols-outlined {
  font-size: 14px;
}

.transport-chip-sub {
  color: var(--muted);
  padding-left: 6px;
  border-left: 1px solid var(--line);
}

.transport-mcp {
  color: var(--cyan);
  background: rgba(var(--cyan-rgb), 0.12);
  border-color: rgba(var(--cyan-rgb), 0.4);
}

.transport-rest {
  color: var(--muted);
  background: var(--armor-2);
  border-color: var(--line);
}

/* The env var the founder still has to load, named exactly as the connector
   reads it. */
.connector-credential {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 9px;
  overflow-wrap: anywhere;
}

.connector-credential .material-symbols-outlined {
  font-size: 14px;
  flex-shrink: 0;
  color: var(--warn);
}

/* Why MCP was not used. Never let a downgrade to REST happen silently. */
.connector-fallback {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--warn);
  background: rgba(var(--warn-rgb), 0.08);
  border-left: 2px solid var(--warn);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 7px 10px;
}

.connector-fallback .material-symbols-outlined {
  font-size: 14px;
  flex-shrink: 0;
}

/* The reason is a full sentence coming verbatim from the provider. `mono-sm`
   would upper-case it into an unreadable wall. */
.connector-fallback.mono-sm {
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--warn);
}

.connector-desc {
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.5;
  flex: 1;
}

.connector-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  gap: 8px;
}

.connector-assigned-gems {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.gem-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--armor-2);
  border: 1px solid var(--line);
  color: var(--text-soft);
}

/* ---------------------------------------------------------------------- */
/* Settings View & Form Controls                                          */
/* ---------------------------------------------------------------------- */

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

@media (max-width: 1024px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }
}

.settings-card {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.settings-card-head .material-symbols-outlined {
  font-size: 26px;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-label {
  font-size: 10.5px;
  color: var(--muted-2);
  letter-spacing: 0.05em;
  font-weight: 600;
}

.form-input, .form-select {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-ui);
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input.mono {
  font-family: var(--font-mono);
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.2);
}

.vault-status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.vault-status-item {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
}

/* ---------------------------------------------------------------------- */
/* Modal Extensions & Checkboxes                                          */
/* ---------------------------------------------------------------------- */

.connector-modal-box {
  max-width: 540px;
  width: 100%;
}

.gem-assign-checkboxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px;
}

.gem-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
  cursor: pointer;
}

.gem-checkbox-label input[type="checkbox"] {
  accent-color: var(--cyan);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* ---------------------------------------------------------------------- */
/* Executive 2-Panel Onboarding Console                                   */
/* ---------------------------------------------------------------------- */

.onboarding-2col-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.onboarding-wizard-panel {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wizard-steps-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.wizard-step-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--muted-2);
  cursor: pointer;
  transition: var(--t-fast);
  text-align: left;
}

.wizard-step-tab:hover {
  border-color: var(--line-strong);
  color: var(--text-soft);
}

.wizard-step-tab.is-active {
  background: rgba(var(--cyan-rgb), 0.12);
  border-color: var(--cyan);
  color: var(--cyan);
}

.wizard-step-tab.is-completed {
  border-color: rgba(var(--success-rgb), 0.4);
  color: var(--success);
}

.wizard-step-tab .step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid currentColor;
}

.wizard-step-tab .step-label {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wizard-step-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.wizard-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wizard-nav-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 8px;
}

.wizard-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-gold {
  background: linear-gradient(135deg, #D4AF37, #B8860B) !important;
  color: #000 !important;
  font-weight: 700 !important;
  border: 1px solid #FFD700 !important;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.35);
}

.btn-gold:hover {
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.6);
  filter: brightness(1.1);
}

/* ── Shadow Co-Pilot & Document Ingestion Panel ──────────────────────── */

.onboarding-shadow-panel {
  display: flex;
  flex-direction: column;
}

.shadow-copilot-card {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 520px;
}

.copilot-head {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.copilot-avatar {
  font-size: 24px;
  width: 42px;
  height: 42px;
  background: var(--armor-2);
  border: 1px solid var(--cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.25);
}

.copilot-meta {
  flex: 1;
}

.copilot-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.copilot-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--cyan);
}

/* Document Dropzone */
.document-dropzone {
  border: 2px dashed rgba(var(--cyan-rgb), 0.35);
  background: rgba(var(--cyan-rgb), 0.04);
  border-radius: var(--r-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--t-fast);
}

.document-dropzone:hover,
.document-dropzone.is-dragover {
  border-color: var(--cyan);
  background: rgba(var(--cyan-rgb), 0.09);
}

.dropzone-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.dropzone-sub {
  font-size: 11px;
  color: var(--muted-2);
}

/* Copilot Transcript */
.copilot-transcript {
  flex: 1;
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px;
  overflow-y: auto;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.copilot-msg {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-soft);
}

.copilot-input-box {
  display: flex;
  gap: 8px;
}

.copilot-input {
  flex: 1;
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  color: var(--text);
  font-size: 12.5px;
  outline: none;
}

.copilot-input:focus {
  border-color: var(--cyan);
}

/* ---------------------------------------------------------------------- */
/* Unified Mic Button & Recording Banner                                  */
/* ---------------------------------------------------------------------- */

.recording-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(248, 113, 113, 0.15);
  border-bottom: 1px solid rgba(248, 113, 113, 0.4);
  padding: 10px 16px;
  color: #F87171;
}

.recording-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #F87171;
  box-shadow: 0 0 10px #F87171;
  animation: pulse 1s infinite alternate;
}

/* ---------------------------------------------------------------------- */
/* Live Telemetry & Observability HUD Drawer (Ctrl+H)                     */
/* ---------------------------------------------------------------------- */

.hud-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  border-color: rgba(var(--cyan-rgb), 0.35);
  background: rgba(var(--cyan-rgb), 0.06);
  color: var(--cyan);
}
.hud-toggle-btn:hover {
  background: rgba(var(--cyan-rgb), 0.15);
  border-color: var(--cyan);
}

.hud-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

.hud-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 90vw;
  background: var(--bg);
  border-left: 1px solid var(--line);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-drawer.is-open {
  transform: translateX(0);
}

.hud-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.hud-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--armor);
}

.hud-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hud-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
}

.hud-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hud-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.hud-stat-card {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hud-stat-label {
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.hud-stat-val {
  font-size: 14px;
  font-weight: 700;
}

.hud-stat-sub {
  color: var(--muted-3);
  font-size: 10px;
}

.hud-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hud-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hud-stream-feed {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11.5px;
}

.hud-event-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.hud-event-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hud-event-time {
  color: var(--muted-3);
  font-size: 10px;
  flex-shrink: 0;
}

.hud-event-badge {
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  flex-shrink: 0;
}

.hud-event-msg {
  color: var(--text-soft);
  word-break: break-word;
}

.badge-info { background: rgba(var(--cyan-rgb), 0.15); color: var(--cyan); }
.badge-gate { background: rgba(var(--gold-rgb), 0.18); color: var(--gold); }
.badge-exec { background: rgba(var(--success-rgb), 0.18); color: var(--success); }
.badge-error { background: rgba(var(--danger-rgb), 0.2); color: var(--danger); }

.hud-memory-preview {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px;
  color: var(--muted-2);
}

.btn-danger-ghost {
  color: var(--danger);
  border-color: rgba(var(--danger-rgb), 0.3);
}
.btn-danger-ghost:hover {
  background: rgba(var(--danger-rgb), 0.12);
  border-color: var(--danger);
}

/* ---------------------------------------------------------------------- */
/* Debate Council: Controls Toolbar & Structured Constitution Cards        */
/* ---------------------------------------------------------------------- */

.debate-controls-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--armor);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: var(--r-card);
  margin-top: 4px;
}

.debate-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.debate-select-wrap {
  min-width: 260px;
}

.debate-verdict-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.debate-verdict-card {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gem-color, var(--cyan));
  border-radius: var(--r-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.debate-verdict-card.is-dissent {
  border-left-color: var(--danger-bright);
  background: rgba(var(--danger-rgb), 0.05);
}

.debate-verdict-card.is-agree {
  border-left-color: var(--success);
}

.debate-verdict-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.debate-verdict-card.is-dissent .debate-verdict-head {
  color: var(--danger-bright);
}

.debate-verdict-card.is-agree .debate-verdict-head {
  color: var(--success);
}

.debate-verdict-text {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.constitution-structured-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 6px;
}

.const-card {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.const-card:hover {
  border-color: rgba(var(--cyan-rgb), 0.4);
  transform: translateY(-1px);
}

.const-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.const-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.const-card-body {
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.55;
}

.const-card-body strong {
  color: var(--text);
}

.const-card-body em {
  color: var(--gold);
}

/* ---------------------------------------------------------------------- */
/* View: Architecture & State of the Art (A2A & L0-L6)                     */
/* ---------------------------------------------------------------------- */

.arch-meta-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.arch-tabs-nav {
  display: flex;
  gap: 8px;
  background: var(--armor);
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: var(--r-card);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.arch-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.arch-tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.arch-tab-btn.is-active {
  background: var(--armor-2);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.15);
}

.arch-tab-btn .material-symbols-outlined {
  font-size: 18px;
}

.arch-tab-panel {
  display: block;
}

.arch-tab-panel[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------------- */
/* Generic hub sub-tabs — D1: used by the Settings hub (Founder/Connectors/ */
/* Architecture) and the Profile hub (Onboarding/Constitution). Same visual */
/* language as .arch-tab-btn/.arch-tab-panel above, kept as separate       */
/* classes so the two systems never cross-toggle each other's buttons.     */
/* ---------------------------------------------------------------------- */

.subtab-nav {
  display: flex;
  gap: 8px;
  background: var(--armor);
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: var(--r-card);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.subtab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subtab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.subtab-btn.is-active {
  background: var(--armor-2);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.15);
}

.subtab-btn .material-symbols-outlined {
  font-size: 18px;
}

.subtab-panel[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------------- */
/* D3: Debate Council -- unified timeline + per-gem verdict strip          */
/* ---------------------------------------------------------------------- */

.debate-verdict-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.debate-verdict-card {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--armor);
  border: 1px solid var(--line);
  border-left: 3px solid rgba(var(--gem-rgb, var(--muted-3)), 0.7);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.debate-verdict-card.is-agree .material-symbols-outlined { color: var(--success); }
.debate-verdict-card.is-dissent {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  border-left-color: var(--danger);
}
.debate-verdict-card.is-dissent .material-symbols-outlined { color: var(--danger-bright); }

.debate-verdict-head { display: flex; align-items: center; gap: 8px; }
.debate-verdict-head .material-symbols-outlined { font-size: 18px; }
.debate-controls-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timeline-quick-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.debate-feed { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }

/* Collapsible Dropdown Timeline Entry */
.timeline-entry-details {
  padding: 0 !important;
  border-radius: var(--r-sm);
  background: var(--armor);
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted-3);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, background 0.2s ease;
  overflow: hidden;
}

.timeline-entry-details[open] {
  border-color: rgba(var(--cyan-rgb), 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.timeline-entry-details.is-veto {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  border-left-color: var(--danger);
}

.timeline-entry-details.is-confirm {
  border-left-color: var(--success);
}

.timeline-entry-details.timeline-entry-deliberation {
  border-left-color: var(--gold);
}

.timeline-entry-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 10px 14px;
  user-select: none;
  transition: background 0.15s ease;
}

.timeline-entry-summary::-webkit-details-marker {
  display: none;
}

.timeline-entry-summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.timeline-summary-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.timeline-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.timeline-cat-icon {
  font-size: 14px;
}

.timeline-summary-center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.timeline-actor-pills {
  color: var(--cyan);
  font-weight: 600;
  flex-shrink: 0;
  background: rgba(var(--cyan-rgb), 0.08);
  border: 1px solid rgba(var(--cyan-rgb), 0.2);
  padding: 1px 6px;
  border-radius: 4px;
}

.timeline-summary-preview {
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.timeline-summary-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.timeline-chevron {
  font-size: 18px;
  color: var(--muted-2);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-entry-details[open] .timeline-chevron {
  transform: rotate(180deg);
  color: var(--cyan);
}

.timeline-entry-expanded {
  padding: 12px 14px 14px 14px;
  border-top: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--armor-2);
}

.timeline-raw-details {
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  margin-top: 4px;
}

.timeline-raw-summary {
  cursor: pointer;
  user-select: none;
  font-size: 10.5px;
}

.timeline-raw-summary:hover {
  color: var(--text);
}

.timeline-raw-json {
  margin-top: 6px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  overflow-x: auto;
  color: var(--cyan);
  font-size: 11px;
  line-height: 1.45;
  max-height: 220px;
}

.timeline-subrow {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-left: 8px;
  border-left: 2px solid var(--line);
}
.timeline-subrow-actor { color: var(--text); font-weight: 600; flex-shrink: 0; }
.timeline-subrow-text { color: var(--text-soft); flex: 1; }

.debate-turn-subfeed {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding-left: 8px;
  border-left: 2px solid var(--line);
}

/* ── Live Deliberation Streaming & Chat Flow ───────────────────────── */
.deliberation-animated {
  animation: fadeIn 0.3s ease;
}

.deliberation-feed-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.deliberation-turn-card {
  background: var(--armor);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gem-color, var(--cyan));
  border-radius: var(--r-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideUpFade 0.35s ease forwards;
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.deliberation-turn-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deliberation-turn-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--gem-color, var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: var(--armor-2);
  flex-shrink: 0;
}

.deliberation-turn-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex: 1;
}

.deliberation-turn-name {
  font-weight: 700;
  font-size: 13px;
}

.deliberation-turn-body {
  color: var(--text-soft);
  line-height: 1.5;
  font-size: 12.5px;
}

.deliberation-tools-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.deliberation-turn-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--line-2);
  padding-top: 6px;
  margin-top: 2px;
}

.debate-feed-live-entry { border: 1px solid rgba(var(--gold-rgb), 0.4); }

/* Tab 1: Split Grid */
.arch-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .arch-split-grid {
    grid-template-columns: 1fr;
  }
}

.layers-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.layer-card {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px 18px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.layer-card:hover {
  border-color: rgba(var(--cyan-rgb), 0.4);
  transform: translateY(-1px);
}

.layer-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.layer-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(var(--cyan-rgb), 0.15);
  color: var(--cyan);
  border: 1px solid rgba(var(--cyan-rgb), 0.3);
}

.layer-module {
  font-size: 11px;
  color: var(--muted-2);
}

.layer-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.layer-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* Prompt Inspector */
.prompt-inspector-panel {
  position: sticky;
  top: 80px;
}

.inspector-card {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 20px;
}

.inspector-preview-box {
  background: var(--void);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 16px;
  margin-top: 14px;
  max-height: 520px;
  overflow-y: auto;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Tab 2: A2A Mesh */
.a2a-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.a2a-stat-card {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 20px;
}

.cross-audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.cross-audit-card {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px 18px;
  transition: all 0.2s ease;
}

.cross-audit-card:hover {
  border-color: rgba(var(--gold-rgb), 0.4);
}

.cross-audit-actors {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.actor-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.actor-auditor {
  background: rgba(var(--gold-rgb), 0.15);
  color: var(--gold);
  border: 1px solid rgba(var(--gold-rgb), 0.3);
}

.actor-target {
  background: rgba(var(--cyan-rgb), 0.15);
  color: var(--cyan);
  border: 1px solid rgba(var(--cyan-rgb), 0.3);
}

.audit-arrow {
  color: var(--muted-2);
  font-size: 16px;
}

.cross-audit-scope {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* Tab 3: Memory Tiers */
.memory-tiers-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .memory-tiers-layout {
    grid-template-columns: 1fr;
  }
}

.memory-diagram-card, .memory-comparison-card {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 24px;
}

.memory-tiers-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.memory-tier-item {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: var(--r-sm);
  padding: 14px 16px;
}

.memory-tier-item-head {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.memory-tier-item-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.comp-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
}

.status-fail {
  color: var(--danger);
}

.status-pass {
  color: var(--success);
}

/* Tab 4: Decisions Log */
.decisions-table-card {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 20px;
  margin-top: 16px;
}

.decisions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.decision-card {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.decision-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.decision-topic {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.decision-detail {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.badge-implemented {
  background: rgba(var(--success-rgb), 0.15);
  color: var(--success);
  border: 1px solid rgba(var(--success-rgb), 0.3);
}

.badge-discarded {
  background: rgba(var(--danger-rgb), 0.15);
  color: var(--danger);
  border: 1px solid rgba(var(--danger-rgb), 0.3);
}

/* ---------------------------------------------------------------------- */
/* Sovereign Authentication & Google Identity Services (GSI) UI          */
/* ---------------------------------------------------------------------- */

.user-auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  padding: 4px 10px 4px 6px;
  transition: all 0.2s ease;
}

.user-auth-pill:hover {
  border-color: rgba(var(--cyan-rgb), 0.3);
  background: rgba(var(--cyan-rgb), 0.05);
}

.user-avatar-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  object-fit: cover;
}

.user-role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(var(--cyan-rgb), 0.15);
  color: var(--cyan);
  border: 1px solid rgba(var(--cyan-rgb), 0.3);
  letter-spacing: 0.05em;
}

.user-role-badge.judge {
  background: rgba(var(--gold-rgb), 0.15);
  color: var(--gold);
  border-color: rgba(var(--gold-rgb), 0.35);
}

.user-email-text {
  font-size: 12px;
  color: var(--text-soft);
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  padding: 2px 4px;
  color: var(--muted);
  border-radius: 4px;
  transition: color 0.15s;
}

.btn-logout:hover {
  color: var(--danger-bright);
}

/* Sovereign Auth Modal & Gate Overlay */
#modal-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 12, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 20px;
}

.modal-auth-box {
  max-width: 460px;
  width: 100%;
  background: var(--armor);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(var(--cyan-rgb), 0.1);
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: authModalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authModalFadeIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-box-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-brand-badge {
  font-size: 28px;
  color: var(--cyan);
  filter: drop-shadow(0 0 12px rgba(var(--cyan-rgb), 0.6));
  margin-bottom: 8px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--title-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.auth-subtitle {
  color: var(--cyan);
  letter-spacing: 0.08em;
  font-size: 10px;
}

.auth-box-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-guard-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(var(--gold-rgb), 0.25);
  border-radius: 10px;
  padding: 12px 14px;
}

.auth-action-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-section-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gsi-container {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--muted-3);
  margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--line);
}

.auth-divider span {
  padding: 0 10px;
  font-size: 9.5px;
  letter-spacing: 0.1em;
}

.btn-judge-access {
  background: linear-gradient(135deg, #14DDEE 0%, #0099cc 100%);
  color: #000 !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  padding: 12px 16px !important;
  border-radius: 10px !important;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(var(--cyan-rgb), 0.35);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-judge-access:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(var(--cyan-rgb), 0.5);
  filter: brightness(1.1);
}

.auth-box-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 11px;
}

.auth-alias-form {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  gap: 10px;
}

.auth-form-row {
  width: 100%;
}

.auth-select {
  width: 100%;
  background: var(--bg-surface, #0c1017);
  border: 1px solid var(--line-2);
  color: var(--text-main, #f1f5f9);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--font-mono, monospace);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.auth-select:focus {
  border-color: var(--cyan);
}

.auth-input {
  width: 100%;
  background: var(--bg-surface, #0c1017);
  border: 1px solid var(--line-2);
  color: var(--text-main, #f1f5f9);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--font-mono, monospace);
  outline: none;
  transition: border-color 0.2s;
}

.auth-input:focus {
  border-color: var(--cyan);
}

.auth-btn-submit {
  padding: 10px 14px !important;
  font-size: 12.5px !important;
  border-radius: 8px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  border: 1px solid rgba(var(--cyan-rgb), 0.3) !important;
  background: rgba(var(--cyan-rgb), 0.1) !important;
  color: var(--cyan) !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

/* ---------------------------------------------------------------------- */
/* Workflow view (F3, 2026-08-27) -- read-only per-gem Mermaid diagram +   */
/* tools/mcps/skills catalog, between Command Center and Settings.        */
/* ---------------------------------------------------------------------- */

.wf-diagram-wrap {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.wf-diagram {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px;
  overflow-x: auto;
  display: flex;
  justify-content: center;
  min-height: 120px;
}

.wf-diagram svg { max-width: 100%; height: auto; }

.wf-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
  color: var(--muted-2);
}

.wf-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}

.wf-legend-dot.is-active { background: rgba(var(--success-rgb), 0.35); border: 1.5px solid var(--success); }
.wf-legend-dot.is-roadmap { background: rgba(var(--gold-rgb), 0.25); border: 1.5px dashed var(--gold); }

.wf-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.wf-catalog-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wf-item {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wf-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wf-item-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.wf-item-desc {
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.45;
}

.wf-item-empty {
  color: var(--muted-3);
  font-size: 12px;
  padding: 6px 2px;
}

.gem-chip.is-active {
  border-color: var(--cyan);
  color: var(--text);
  background: rgba(var(--cyan-rgb), 0.12);
}

@media (max-width: 900px) {
  .wf-catalog-grid { grid-template-columns: 1fr; }
}

.auth-btn-submit:hover {
  background: rgba(var(--cyan-rgb), 0.2) !important;
  border-color: var(--cyan) !important;
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------------- */
/* Skills Arsenal View & Slash Command Engine                             */
/* ---------------------------------------------------------------------- */

.skills-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.skills-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.skills-search-wrap {
  position: relative;
  width: 100%;
}

.skills-search-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  font-size: 18px;
  pointer-events: none;
}

.skills-search-input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: var(--t-fast);
}

.skills-search-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.2);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.skill-card {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  position: relative;
  overflow: hidden;
}

.skill-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--cyan-rgb), 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.skill-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.skill-card-gem {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan);
}

.skill-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}

.skill-slash-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 3px 8px;
  background: rgba(var(--cyan-rgb), 0.12);
  border: 1px solid rgba(var(--cyan-rgb), 0.3);
  color: var(--cyan);
  border-radius: 4px;
  font-weight: 600;
}

.skill-autonomy-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.skill-autonomy-badge.l1 { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid #38bdf8; }
.skill-autonomy-badge.l2 { background: rgba(250, 204, 21, 0.15); color: #facc15; border: 1px solid #facc15; }
.skill-autonomy-badge.l3 { background: rgba(74, 222, 128, 0.15); color: #4ade80; border: 1px solid #4ade80; }

.skill-card-desc {
  font-size: 12.5px;
  color: var(--muted-2);
  line-height: 1.5;
  flex: 1;
}

.skill-card-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-section-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
}

.skill-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: auto;
}

/* Modal Skill Inspector */
.skill-inspector-modal-box {
  max-width: 760px;
  width: 90vw;
}

.skill-meta-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.skill-description-box {
  padding: 12px 14px;
  background: var(--armor-2);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.skill-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.skill-code-pre {
  max-height: 340px;
  overflow-y: auto;
  background: #090d13;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px;
  font-size: 12px;
  line-height: 1.55;
  color: #e2e8f0;
  white-space: pre-wrap;
}

/* Slash Autocomplete Popup */
.slash-autocomplete-popup {
  position: absolute;
  bottom: 84px;
  left: 30px;
  right: 30px;
  max-width: 580px;
  background: #0d121a;
  border: 1px solid rgba(var(--cyan-rgb), 0.4);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.7);
  border-radius: var(--r-card);
  z-index: 1000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.slash-popup-head {
  padding: 8px 14px;
  background: var(--armor-2);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

.slash-popup-list {
  max-height: 240px;
  overflow-y: auto;
}

.slash-popup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background var(--t-fast);
}

.slash-popup-item:hover,
.slash-popup-item.is-selected {
  background: rgba(var(--cyan-rgb), 0.12);
}

.slash-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slash-item-cmd {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
}

.slash-item-desc {
  font-size: 11px;
  color: var(--muted-2);
}

.slash-item-gem {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--armor-2);
  color: var(--gold);
  border: 1px solid rgba(var(--gold-rgb), 0.3);
}

/* ---------------------------------------------------------------------- */
/* MCP Credentials Configuration Manager                                  */
/* ---------------------------------------------------------------------- */

.mcp-credentials-card {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  padding: 20px;
}

.mcp-creds-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mcp-cred-row {
  display: grid;
  grid-template-columns: 200px 1fr 140px 120px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color var(--t-fast);
}

.mcp-cred-row:hover {
  border-color: rgba(var(--cyan-rgb), 0.3);
}

/* Momentary highlight when a connector-card "Connect" button jumps here
   (see app.js goToMcpCredential) -- confirms the founder landed on the
   right row without a second, duplicate form. */
.mcp-cred-row-highlight {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(var(--cyan-rgb), 0.35);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.mcp-cred-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mcp-cred-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.mcp-cred-env {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted-2);
}

.mcp-cred-input {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  width: 100%;
}

.mcp-cred-input:focus {
  border-color: var(--cyan);
}

.mcp-cred-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ---------------------------------------------------------------------- */
/* Social Media Warfare Hub                                               */
/* ---------------------------------------------------------------------- */

.social-target-card {
  background: linear-gradient(135deg, rgba(var(--cyan-rgb), 0.08), rgba(var(--gold-rgb), 0.04));
  border: 1px solid rgba(var(--cyan-rgb), 0.3);
  border-radius: var(--r-panel);
  padding: 20px;
  margin-bottom: 20px;
}

.social-progress-bar-bg {
  width: 100%;
  height: 14px;
  background: var(--armor-2);
  border-radius: 7px;
  overflow: hidden;
  margin: 10px 0 6px;
  border: 1px solid var(--line);
}

.social-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  border-radius: 7px;
  transition: width 0.6s ease;
}

.social-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.social-channels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.channel-card {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.channel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.channel-name {
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
}

.post-feed-card {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-card-channel {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
}

.post-card-hook {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.post-card-copy {
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .skills-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .social-main-grid { grid-template-columns: 1fr; }
  .mcp-cred-row { grid-template-columns: 1fr; }
  .workspace-inspector-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------- */
/* Gem Thinking & Reasoning Process Details Block                          */
/* ---------------------------------------------------------------------- */
.gem-thinking-block {
  margin: 10px 0 8px 0;
  border-radius: var(--r-sm);
  background: rgba(20, 24, 33, 0.85);
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 8px 12px;
  transition: all 0.25s ease;
}
.gem-thinking-block summary {
  cursor: pointer;
  user-select: none;
  color: #C084FC;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
  outline: none;
}
.gem-thinking-block summary:hover {
  color: #E9D5FF;
}
.gem-thinking-block.is-live-thinking {
  border-color: rgba(139, 92, 246, 0.7);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.2);
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
}
.thinking-brain-pulse {
  display: inline-block;
  animation: brainPulse 1.6s infinite ease-in-out;
}
@keyframes brainPulse {
  0% { transform: scale(1); opacity: 0.8; filter: drop-shadow(0 0 2px #A855F7); }
  50% { transform: scale(1.2); opacity: 1; filter: drop-shadow(0 0 8px #C084FC); }
  100% { transform: scale(1); opacity: 0.8; filter: drop-shadow(0 0 2px #A855F7); }
}
.gem-thinking-content {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--void);
  border-radius: var(--r-xs, 4px);
  border: 1px dashed rgba(139, 92, 246, 0.3);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.live-thinking-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.live-thinking-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #A78BFA;
}
.live-thinking-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C084FC;
  box-shadow: 0 0 6px #C084FC;
  animation: pulseDot 1s infinite alternate;
}

/* ---------------------------------------------------------------------- */
/* Unified Sovereign Workspace & Asset Studio                              */
/* ---------------------------------------------------------------------- */
.workspace-filter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.workspace-category-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.workspace-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 260px;
}
.workspace-search-wrap .search-icon {
  position: absolute;
  left: 10px;
  font-size: 18px;
  color: var(--muted-3);
  pointer-events: none;
}
.workspace-search-wrap input {
  padding-left: 34px;
  background: var(--armor);
  border-color: var(--line);
  color: var(--text);
}

.workspace-meta-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  margin-bottom: 16px;
}
.workspace-inspector-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  min-height: 560px;
}
@media (max-width: 960px) {
  .workspace-inspector-grid {
    grid-template-columns: 1fr;
  }
}
.workspace-files-card, .workspace-viewer-card, .workspace-fleet-card {
  background: var(--armor);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.workspace-card-header {
  padding: 12px 16px;
  background: var(--armor-2);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
}
.fleet-app-list {
  flex: 1;
  overflow-y: auto;
  max-height: 600px;
  display: flex;
  flex-direction: column;
}
.fleet-app-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-dim, rgba(255,255,255,0.05));
  transition: all 0.15s ease;
}
.fleet-app-item:hover {
  background: var(--armor-hover, rgba(255,255,255,0.04));
}
.fleet-app-icon {
  font-size: 18px;
  color: #10B981;
  flex-shrink: 0;
}
.fleet-app-name {
  flex: 1;
  word-break: break-all;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text);
}
.fleet-app-path {
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--text-muted);
}
.fleet-app-run {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fleet-app-run .btn {
  padding: 4px 8px;
  font-size: 11px;
}
.fleet-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.fleet-status {
  font-size: 11px;
  margin-top: 8px;
  color: var(--text-muted);
  text-align: center;
}
.workspace-viewer-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-viewer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.workspace-file-list {
  flex: 1;
  overflow-y: auto;
  max-height: 600px;
  display: flex;
  flex-direction: column;
}
.workspace-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-dim, rgba(255,255,255,0.05));
  cursor: pointer;
  transition: all 0.15s ease;
}
.workspace-file-item:hover {
  background: var(--armor-hover, rgba(255,255,255,0.04));
}
.workspace-file-item.is-selected {
  background: rgba(96, 165, 250, 0.15);
  border-left: 3px solid #60A5FA;
}
.workspace-file-icon {
  font-size: 18px;
  color: #60A5FA;
  flex-shrink: 0;
}
.workspace-file-item[data-cat="creatives"] .workspace-file-icon { color: #EC4899; }
.workspace-file-item[data-cat="landings"] .workspace-file-icon { color: #10B981; }
.workspace-file-item[data-cat="scripts"] .workspace-file-icon { color: #F59E0B; }
.workspace-file-item[data-cat="reports"] .workspace-file-icon { color: #8B5CF6; }

.workspace-file-name {
  flex: 1;
  word-break: break-all;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text);
}
.workspace-file-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.workspace-file-size {
  font-size: 10px;
  flex-shrink: 0;
  color: var(--muted-3);
}

.workspace-viewport {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--void);
  min-height: 520px;
  max-height: 600px;
  overflow: hidden;
}
.workspace-code-pre {
  margin: 0;
  padding: 16px;
  background: var(--void);
  flex: 1;
  max-height: 600px;
  overflow: auto;
  color: #E2E8F0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

/* HTML Live Preview Sandbox */
.workspace-html-preview-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  background: #0f172a;
}
.html-preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--armor-2);
  border-bottom: 1px solid var(--line);
}
.html-preview-controls {
  display: flex;
  gap: 4px;
}
.workspace-iframe-sandbox {
  width: 100%;
  height: 100%;
  flex: 1;
  border: none;
  background: #ffffff;
  transition: width 0.3s ease, margin 0.3s ease;
}
.workspace-iframe-sandbox.is-mobile {
  width: 375px;
  margin: 12px auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

/* Image Creative Gallery */
.workspace-image-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 24px;
  background: repeating-conic-gradient(rgba(255,255,255,0.03) 0% 25%, transparent 0% 50%) 50% / 20px 20px;
  overflow: auto;
}
.workspace-preview-img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: var(--r-sm);
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
  border: 1px solid var(--line);
}

/* Video / Media Player */
.workspace-video-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 24px;
  background: #000;
  overflow: auto;
}
.workspace-preview-video {
  max-width: 100%;
  max-height: 520px;
  width: min(720px, 100%);
  border-radius: var(--r-sm);
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
  border: 1px solid var(--line);
  background: #000;
}

/* Markdown Reader */
.workspace-markdown-preview-wrap {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
  color: var(--text-soft);
  line-height: 1.65;
}
.workspace-md-content h1, .workspace-md-content h2, .workspace-md-content h3 {
  color: var(--text);
  margin-top: 16px;
  margin-bottom: 8px;
}
.workspace-md-content code {
  background: var(--armor-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

/* ── Command Center Rejilla (Registro Toggle) ────────────────────────────── */

.cc-registro {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.cc-registro-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.cc-registro-toggle:hover {
  color: var(--text-soft);
}

.cc-registro-toggle .material-symbols-outlined {
  font-size: 16px;
}

.cc-registro-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.cc-grid-eyebrow {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 6px;
}

.cc-registry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ── End CC Rejilla Styles ────────────────────────────────────────────────── */


/* Command Center Live Registration Styles */
.cc-history-item {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cc-history-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cc-history-labels {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.cc-date {
  font-weight: 500;
  font-size: 11px;
  color: var(--muted-1);
}

.cc-history-amount {
  font-size: 18px;
  font-weight: 800;
  color: var(--success);
}

.cc-history-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cc-chip {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted-1);
}

.cc-chip.is-success { border-color: var(--success); color: var(--success); }
.cc-chip.is-warn { border-color: var(--warn); color: var(--warn); }

.cc-routine-item {
  background: var(--armor-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cc-routine-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.cc-routine-item label {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.cc-routine-meta {
  font-size: 11px;
  color: var(--muted-2);
}

.cc-placeholder {
  padding: 16px;
  text-align: center;
  color: var(--muted-2);
  font-size: 13px;
}

.cc-btn-action {
  min-width: 70px;
}

/* End Command Center Live Registration Styles */

/* ── Danger Zone: Borrar Memoria ─ */
.settings-card[data-panel="founder"] .h3 {
  color: var(--danger-bright);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-card[data-panel="founder"] .h3::before {
  content: "⚠";
  font-size: 18px;
}

#danger-zone-blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.danger-zoom-block {
  background: rgba(var(--danger-rgb), 0.04);
  border: 1px solid rgba(var(--danger-rgb), 0.15);
  border-left: 3px solid var(--danger-border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.danger-zoom-block:hover {
  border-color: rgba(var(--danger-rgb), 0.3);
  box-shadow: 0 0 12px rgba(var(--danger-rgb), 0.08);
}

.danger-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--danger-bright);
  letter-spacing: 0.04em;
  margin: 0 0 6px 0;
  text-transform: uppercase;
}

.danger-desc {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.55;
  margin: 0 0 10px 0;
}

.danger-gem-selector {
  margin-bottom: 10px;
}

.danger-gem-selector label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.danger-select {
  width: 100%;
  min-height: 80px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-pure);
  background: var(--void);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 6px 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.danger-select:focus {
  outline: none;
  border-color: var(--cyan);
  background: rgba(var(--cyan-rgb), 0.04);
}

.danger-select option {
  padding: 4px 6px;
  background: var(--void);
  color: var(--text-pure);
}

.danger-waring {
  font-size: 11px;
  color: var(--text-soft);
  padding: 8px 10px;
  background: rgba(var(--danger-rgb), 0.06);
  border-radius: var(--r-sm);
  margin-bottom: 10px;
  border-left: 2px solid var(--danger-border);
}

.danger-waring strong {
  color: var(--danger-bright);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.danger-confirm-group {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.danger-input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-pure);
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  min-width: 0;
}

.danger-input::placeholder {
  color: var(--muted-2);
  font-style: italic;
}

.danger-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(var(--cyan-rgb), 0.1);
}

.danger-input:not(:disabled):not(:focus):hover {
  border-color: var(--line-2);
}

.danger-btn.delete {
  min-width: 80px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* End Danger Zone Styles */

