/* Crest workspace layout. Maritime surfaces are defined in maritime.css.
   Calm monochromatic midnight-blue & obsidian canopy; state-driven luminance carries telemetry. */
:root {
  --bg-space: #020408;
  --bg-midnight: #050b16;
  --bg: #020408;
  --bg2: #060d1b;
  --surface: #0a1426;
  --surface2: #111f38;
  --surface3: #182b49;

  --line: rgba(148, 163, 184, 0.15);
  --line2: rgba(186, 230, 253, 0.25);

  --ink: #ffffff;
  --ink2: #f1f5f9;
  --mute: #94a3b8;
  --dim: #64748b;

  /* Monochromatic Orbital Midnight + Polar Ice + Tactical Crimson (Zero Amber/Purple) */
  --cyan: #bae6fd;
  --cobalt: #38bdf8;
  --polar: #f8fafc;
  --mint: #7dd3fc;
  --warm: #e0f2fe;
  --violet: #93c5fd;
  --indigo: #60a5fa;
  --danger: #f43f5e;
  --danger-soft: #fecdd3;

  --r: 18px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --spring: cubic-bezier(0.19, 1, 0.22, 1);
  --spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-space);
  color: var(--ink2);
  font: 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(56, 189, 248, 0.28); }

button:focus-visible, a:focus-visible, summary:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
button:disabled { opacity: 0.5; cursor: wait; }

.mono { font-family: var(--mono); }
.sub { font-size: 12.5px; color: var(--mute); }
.warm { color: var(--polar); }

/* ============================================================================
   1. GENERATED ORBITAL COCKPIT CANOPY BACKGROUND
   ============================================================================ */
.atmosphere {
  position: fixed;
  inset: -3%;
  width: 106%;
  height: 106%;
  z-index: 0;
  pointer-events: none;
  background-color: #020408;
  background-image:
    url('spire-cockpit-bg.jpg'),
    radial-gradient(ellipse 90% 45% at 50% 0%, rgba(14, 38, 76, 0.45) 0%, transparent 70%),
    radial-gradient(circle at 50% 115%, rgba(15, 42, 82, 0.35) 0%, transparent 55%),
    linear-gradient(180deg, #020408 0%, #050c18 55%, #020408 100%);
  background-size: cover;
  background-position: center;
  filter: brightness(0.95) contrast(1.06);
  transition: transform 0.6s var(--spring);
  will-change: transform;
}

.cockpit-grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.75) 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.75) 20%, transparent 85%);
}

.environment-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(2, 4, 8, 0.14) 0%, rgba(2, 4, 8, 0.82) 100%);
}

/* ============================================================================
   2. LIQUID GLASS MATERIAL SYSTEM
   ============================================================================ */
.liquid-glass, .glass, .surface {
  position: relative;
  background: linear-gradient(
    155deg,
    rgba(16, 27, 48, 0.76) 0%,
    rgba(8, 15, 28, 0.84) 55%,
    rgba(4, 8, 16, 0.90) 100%
  );
  backdrop-filter: blur(42px) saturate(175%);
  -webkit-backdrop-filter: blur(42px) saturate(175%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow:
    0 24px 52px -12px rgba(0, 0, 0, 0.86),
    0 0 0 1px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 0 rgba(148, 163, 184, 0.08);
}

/* ============================================================================
   3. FULL-BLEED COCKPIT SHELL (Zero Left/Right Sidebar Clutter)
   ============================================================================ */
#app {
  position: relative;
  z-index: 10;
  height: 100dvh;
  width: 100vw;
  max-width: 1560px;
  margin: 0 auto;
  padding: 14px 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  perspective: 1600px;
}

/* Legacy sidebars hidden on desktop in favor of top Flight-Deck HUD + Uniform MFD Grid */
#nav, #strip, #nav-toggle, #agents-toggle, .panel-close {
  display: none !important;
}

#workspace-header {
  height: 60px;
  padding: 8px 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-shrink: 0;
  z-index: 30;
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.brand-mark-wrap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(186, 230, 253, 0.4);
  box-shadow:
    0 0 16px rgba(56, 189, 248, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  background: #020408;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-mark-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.18);
}

.brand-word {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.brand-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mute);
  padding: 2.5px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.workspace-heading {
  display: none;
}

/* Top HUD Workspace Switcher Pills */
.hud-workspaces {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(2, 5, 11, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.15);
  overflow-x: auto;
  max-width: 54vw;
  scrollbar-width: none;
}

.hud-ws-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--mute);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: all 0.22s var(--spring);
}
.hud-ws-pill:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}
.hud-ws-pill.on {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(224, 242, 254, 0.34);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.hud-ws-count {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(2, 6, 14, 0.65);
  color: var(--mute);
}
.hud-ws-pill.on .hud-ws-count {
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.22);
}
.hud-ws-count.hot {
  background: rgba(248, 250, 252, 0.92);
  color: #020617;
  font-weight: 700;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.hud-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6.5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s var(--spring);
}
.hud-pill-btn:hover, .hud-pill-btn.on {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(224, 242, 254, 0.4);
  color: var(--ink);
}

.sidekick-toggle {
  border: 1px solid rgba(186, 230, 253, 0.42);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.22), rgba(14, 165, 233, 0.1));
  color: var(--polar);
  border-radius: 999px;
  padding: 6.5px 14px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: all 0.2s var(--spring);
}
.sidekick-toggle:hover, .sidekick-toggle[aria-expanded=true] {
  background: rgba(56, 189, 248, 0.32);
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}

#connection-state {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--danger-soft);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.45);
}

/* ============================================================================
   4. MAIN SURFACE & UNIFORM 2x2 COCKPIT MFD GRID (Overview)
   ============================================================================ */
#main {
  flex: 1;
  min-height: 0;
  min-width: 0;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: center center;
}

/* In Flight Deck (overview) mode, #main is a transparent spatial stage so each MFD pane floats directly over the orbital canopy! */
#main[data-view="overview"] {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
}
#main[data-view="overview"]::before {
  display: none;
}

.flight-deck-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 4px 14px;
  flex-shrink: 0;
}

.flight-deck-title-group {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.flight-deck-title {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
}

.flight-deck-sub {
  font-size: 13px;
  color: var(--mute);
}

.state-legend {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(8, 15, 28, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mute);
  backdrop-filter: blur(16px);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.legend-dot.nominal { background: #475569; }
.legend-dot.unread { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }
.legend-dot.approval { background: #f8fafc; box-shadow: 0 0 12px #e0f2fe, 0 0 4px #ffffff; }
.legend-dot.error { background: #f43f5e; box-shadow: 0 0 10px #f43f5e; }

.flight-deck-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: visible;
  padding: 4px 2px 24px;
  scrollbar-width: thin;
}

/* Uniform 2x2 Cockpit Display Grid — Every Agent Pane has identical geometry */
.mfd-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 238px;
  gap: 20px;
  perspective: 1500px;
  transform-style: preserve-3d;
}

/* ============================================================================
   5. INDIVIDUAL LIQUID GLASS MFD PANE & 4-LEVEL STATE GLOW INTENSITY
   ============================================================================ */
.agent-pane {
  border-radius: 22px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-align: left;
  transform-style: preserve-3d;
  transition:
    transform 0.42s var(--spring),
    box-shadow 0.42s var(--spring),
    border-color 0.32s ease,
    background 0.32s ease;
  --mx: 50%;
  --my: 0%;
}

/* Cursor-tracked specular glass sheen */
.agent-pane::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    420px circle at var(--mx) var(--my),
    rgba(255, 255, 255, 0.13) 0%,
    rgba(148, 163, 184, 0.04) 36%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}
.agent-pane:hover::before {
  opacity: 1;
}

/* Top Specular Lip */
.agent-pane::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  pointer-events: none;
  z-index: 2;
}

/* LEVEL 0: NOMINAL (Calm Stealth Smoked Glass — Zero Outer Glow) */
.agent-pane.state-nominal {
  background: linear-gradient(
    155deg,
    rgba(13, 21, 38, 0.72) 0%,
    rgba(7, 12, 24, 0.84) 100%
  );
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow:
    0 22px 44px -12px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.16);
}

/* LEVEL 1: UNREAD / RUNNING WORK (Medium Midnight Cobalt Edge Glow) */
.agent-pane.state-unread {
  background: linear-gradient(
    155deg,
    rgba(14, 165, 233, 0.13) 0%,
    rgba(11, 22, 42, 0.80) 52%,
    rgba(6, 12, 24, 0.90) 100%
  );
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow:
    0 26px 54px -12px rgba(0, 0, 0, 0.88),
    0 0 28px -4px rgba(56, 189, 248, 0.24),
    inset 0 1.5px 1px 0 rgba(186, 230, 253, 0.48),
    inset 0 -1px 2px 0 rgba(56, 189, 248, 0.18);
}
.agent-pane.state-unread::after {
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.88), transparent);
}

/* LEVEL 2: AWAITING APPROVAL (High-Intensity Polar Ice Telemetry Glow) */
.agent-pane.state-approval {
  background: linear-gradient(
    150deg,
    rgba(224, 242, 254, 0.20) 0%,
    rgba(56, 189, 248, 0.11) 42%,
    rgba(9, 18, 34, 0.88) 100%
  );
  border: 1px solid rgba(224, 242, 254, 0.76);
  box-shadow:
    0 32px 68px -12px rgba(0, 0, 0, 0.92),
    0 0 42px -4px rgba(186, 230, 253, 0.38),
    0 0 14px 0 rgba(255, 255, 255, 0.20),
    inset 0 2px 2px 0 rgba(255, 255, 255, 0.88),
    inset 0 -1.5px 3px 0 rgba(186, 230, 253, 0.35);
}
.agent-pane.state-approval::after {
  height: 2px;
  left: 6%;
  right: 6%;
  background: linear-gradient(90deg, transparent, #ffffff, rgba(186, 230, 253, 0.95), #ffffff, transparent);
  box-shadow: 0 0 16px #ffffff;
}

/* LEVEL 3: ERROR / BLOCKED (Focused Tactical Avionics Crimson Glow) */
.agent-pane.state-error {
  background: linear-gradient(
    150deg,
    rgba(244, 63, 94, 0.17) 0%,
    rgba(15, 23, 42, 0.82) 50%,
    rgba(9, 14, 26, 0.92) 100%
  );
  border: 1px solid rgba(244, 63, 94, 0.65);
  box-shadow:
    0 28px 60px -12px rgba(0, 0, 0, 0.9),
    0 0 36px -4px rgba(244, 63, 94, 0.34),
    inset 0 1.5px 1px 0 rgba(254, 205, 211, 0.65),
    inset 0 -1.5px 2px 0 rgba(244, 63, 94, 0.28);
}
.agent-pane.state-error::after {
  height: 2px;
  background: linear-gradient(90deg, transparent, #fb7185, #fecdd3, #fb7185, transparent);
}

.pane-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.pane-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.bay-code {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--dim);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.pane-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pane-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--mute);
}

.pane-place {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink2);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 7px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.status-pill.nominal {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.status-pill.unread {
  background: rgba(56, 189, 248, 0.18);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.45);
}
.status-pill.approval {
  background: rgba(248, 250, 252, 0.94);
  color: #020617;
  border: 1px solid #ffffff;
  box-shadow: 0 0 20px rgba(224, 242, 254, 0.55);
  font-weight: 700;
}
.status-pill.error {
  background: rgba(244, 63, 94, 0.24);
  color: #fecdd3;
  border: 1px solid rgba(251, 113, 133, 0.6);
  box-shadow: 0 0 18px rgba(244, 63, 94, 0.35);
}

.pulse-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: currentColor;
}
.status-pill.unread .pulse-dot,
.status-pill.approval .pulse-dot,
.status-pill.error .pulse-dot {
  animation: pulse-op 1.8s infinite;
}
@keyframes pulse-op {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.pane-narrative {
  position: relative;
  z-index: 3;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink2);
  margin: 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pane-footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border-radius: 13px;
  background: rgba(2, 5, 11, 0.60);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.55);
}

.deliverable-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.deliverable-badge {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  white-space: nowrap;
}

.deliverable-text {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pane-cta {
  padding: 6px 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.09);
  color: var(--ink);
  transition: all 0.2s var(--spring);
}
.state-approval .pane-cta {
  background: linear-gradient(180deg, #ffffff 0%, #dbeafe 100%);
  color: #020617;
  border-color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(186, 230, 253, 0.45);
}
.state-error .pane-cta {
  background: rgba(244, 63, 94, 0.26);
  color: #ffe4e6;
  border-color: rgba(251, 113, 133, 0.65);
}

/* ============================================================================
   6. EXPANDED AGENT DUAL-PANE COCKPIT STAGE (Conversation + Live Artifacts/Files)
   ============================================================================ */
.agent-cockpit-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  overflow: hidden;
}

.agent-conv-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
}

.agent-artifacts-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: rgba(2, 5, 11, 0.42);
}

.artifacts-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.artifacts-eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--cyan);
}

.artifacts-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
}

.artifact-file-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(148, 163, 184, 0.16);
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.2s var(--spring);
}
.artifact-file-card:hover, .artifact-file-card.on {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(186, 230, 253, 0.45);
}

.artifact-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.artifact-file-path {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artifact-file-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--mute);
  white-space: nowrap;
}

.artifact-preview-box {
  margin-top: 4px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(2, 4, 9, 0.82);
  border: 1px solid rgba(186, 230, 253, 0.25);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink2);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 340px;
  overflow: auto;
}

/* ============================================================================
   7. ORBS, HEADERS, MESSAGES, TABLES & MODALS
   ============================================================================ */
.orb {
  --s: 44px;
  width: var(--s);
  height: var(--s);
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: #e2e8f0;
}
.orb svg { width: 62%; height: 62%; fill: none; stroke: currentColor; stroke-width: 1.8; }
.orb.sm { --s: 30px; border-radius: 9px; }
.orb.xs { --s: 20px; border-radius: 6px; }
.orb.sleep { opacity: 0.65; }
.orb.run { color: var(--cobalt); border-color: rgba(56, 189, 248, 0.48); background: rgba(56, 189, 248, 0.14); }
.orb.wait { color: #ffffff; border-color: #ffffff; background: rgba(224, 242, 254, 0.24); box-shadow: 0 0 16px rgba(186, 230, 253, 0.4); }
.orb.failed, .orb.blocked { color: #fda4af; border-color: rgba(244, 63, 94, 0.55); background: rgba(244, 63, 94, 0.18); }

.main-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.title { font-size: 20px; font-weight: 700; letter-spacing: -0.025em; margin: 0; color: var(--ink); }
.desc { color: var(--mute); margin-top: 3px; max-width: 680px; font-size: 13px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line2); color: var(--ink2); font-size: 11.5px; background: rgba(255, 255, 255, 0.04);
}
.chip.warm { color: var(--polar); border-color: rgba(224, 242, 254, 0.5); }
.chip.live { color: var(--cyan); border-color: rgba(56, 189, 248, 0.45); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.scroll { flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }

/* Thread */
.feed { padding: 22px 24px 36px; display: flex; flex-direction: column; gap: 18px; max-width: 920px; }
.msg { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.msg > div { min-width: 0; }
.who { font-size: 12px; color: var(--mute); margin-bottom: 4px; display: flex; gap: 8px; align-items: baseline; }
.who b { color: var(--ink); font-weight: 600; }
.body { color: var(--ink2); white-space: normal; overflow-wrap: anywhere; line-height: 1.6; }
.body p { margin: 0 0 10px; white-space: pre-wrap; }
.body p:last-child { margin-bottom: 0; }
.body pre { white-space: pre; max-width: 100%; overflow: auto; background: #030711; border: 1px solid var(--line); padding: 12px; border-radius: 10px; }
.body pre code { padding: 0; background: none; white-space: pre; font: 12px/1.65 var(--mono); }
.body code, .inline-code { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.msg:has(.human) > .body, .msg:has(.human) > div:last-child {
  background: rgba(56, 189, 248, 0.11);
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 14px;
  padding: 12px 16px;
}

.human {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 11px; font-weight: 600;
  color: var(--ink); background: rgba(56, 189, 248, 0.2); border: 1px solid rgba(186, 230, 253, 0.35);
}

.tool {
  margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(3, 7, 16, 0.72); overflow: hidden;
}
.tool-h { width: 100%; border: 0; background: transparent; text-align: left; display: flex; justify-content: space-between; gap: 12px; padding: 8px 13px; font: 11.5px var(--mono); color: var(--mute); cursor: pointer; }
.tool-h:hover { color: var(--ink); }
.tool-h .ok { color: var(--cyan); }
.tool-h .bad { color: var(--danger-soft); }
.tool-b { padding: 10px 13px; border-top: 1px solid var(--line); font: 12px/1.6 var(--mono); color: var(--ink2); white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; }

.approval {
  margin-top: 10px; border-radius: 14px; padding: 15px 18px; display: flex; flex-direction: column; gap: 10px;
  border: 1px solid rgba(224, 242, 254, 0.65);
  background: linear-gradient(155deg, rgba(224, 242, 254, 0.14), rgba(14, 165, 233, 0.06));
  box-shadow: 0 0 28px -6px rgba(186, 230, 253, 0.28);
}
.approval.done { border-color: var(--line); background: rgba(255, 255, 255, 0.03); box-shadow: none; }
.approval-t { font: 600 11px var(--mono); letter-spacing: 0.08em; color: var(--polar); display: flex; align-items: center; gap: 8px; }
.approval.done .approval-t { color: var(--mute); }
.cmd { padding: 9px 12px; border-radius: 9px; background: rgba(2, 5, 11, 0.75); border: 1px solid var(--line); font: 12.5px var(--mono); word-break: break-word; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sys { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 11.5px; }
.sys::before, .sys::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sys.err { color: var(--danger-soft); }
.ghost { opacity: 0.78; }
.caret::after { content: "▍"; color: var(--cyan); animation: blink 1s steps(2) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 10px; cursor: pointer; white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.07); color: var(--ink); font-size: 12.5px; font-weight: 600;
  transition: all 0.2s var(--spring);
}
.btn:hover { border-color: rgba(255, 255, 255, 0.38); background: rgba(255, 255, 255, 0.14); }
.btn.pri, .btn.warm {
  background: linear-gradient(180deg, #ffffff 0%, #dbeafe 100%);
  color: #020617;
  border-color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(186, 230, 253, 0.38);
}
.btn.pri:hover, .btn.warm:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(224, 242, 254, 0.6);
}
.btn.danger { color: var(--danger-soft); border-color: rgba(244, 63, 94, 0.45); background: rgba(244, 63, 94, 0.14); }
.btn.sm { padding: 5px 11px; font-size: 12px; border-radius: 8px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* Dock / Spotlight Command Composer */
#dock {
  flex-shrink: 0;
}
#command {
  padding: 12px 18px;
  border-radius: 20px;
}
#command form { display: flex; flex-direction: column; gap: 6px; }
.composer-label { font-size: 11.5px; font-weight: 600; color: var(--cyan); }
.composer-label span { color: var(--mute); font-weight: 400; }
#cmd-input {
  width: 100%; border: 0; background: none; resize: none; min-height: 38px; max-height: 150px;
  padding: 4px 0; color: var(--ink); line-height: 1.55; font-size: 14px; outline: none;
}
#cmd-input::placeholder { color: var(--dim); }
.cmd-chips { display: flex; gap: 6px; }
.cmd-chip {
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06);
  color: var(--ink2); font-family: var(--mono); font-size: 11px; padding: 4px 10px; border-radius: 999px;
}
.cmd-chip:hover { background: rgba(255, 255, 255, 0.14); }
.hint { color: var(--dim); font-size: 11px; }
.send {
  width: 32px; height: 32px; flex: none;
  background: linear-gradient(180deg, #ffffff 0%, #bae6fd 100%);
  color: #020617; border: 0; border-radius: 999px; font-size: 16px; font-weight: 800;
}

/* Empty / Hero & Pages */
.hero { padding: 48px 40px; display: flex; flex-direction: column; gap: 22px; max-width: 820px; }
.hero h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; margin: 0; color: var(--ink); }
.hero p { color: var(--mute); margin: 0; max-width: 580px; }
.templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.template {
  padding: 16px; border-radius: 16px; border: 1px solid var(--line);
  background: rgba(13, 21, 38, 0.72); cursor: pointer; display: flex; gap: 12px; align-items: flex-start; text-align: left;
  transition: all 0.22s var(--spring);
}
.template:hover { border-color: var(--line2); transform: translateY(-2px); background: rgba(20, 32, 56, 0.82); }
.template .t-n { font-weight: 600; color: var(--ink); margin-bottom: 3px; }

.page { padding: 22px 24px 40px; display: flex; flex-direction: column; gap: 18px; }
.table { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: auto; flex-shrink: 0; background: rgba(2, 5, 11, 0.45); }
.tr { display: grid; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); min-width: 620px; }
.tr:first-child { border-top: 0; }
.tr.head { font: 600 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); background: rgba(0, 0, 0, 0.25); padding: 9px 16px; }
.tr.done { opacity: 0.5; }
.timers-t .tr { grid-template-columns: 100px minmax(0, 1.5fr) minmax(0, 1.1fr) 130px 56px 76px; }
.secrets-t .tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) 120px 70px; }
.compute-t .tr { grid-template-columns: minmax(0, 1fr) 90px 110px minmax(0, 1fr) 200px; }
.members-t .tr { grid-template-columns: 36px minmax(0, 1fr) 100px 140px; }
.invites-t .tr { grid-template-columns: 36px minmax(0, 1fr) 100px 90px; }
.when { font: 600 14px var(--mono); }
.when.soon { color: var(--cyan); }
.dayline { position: relative; height: 84px; border: 1px solid var(--line); border-radius: 14px; background: rgba(2, 5, 11, 0.5); overflow: hidden; }
.dayline .track-line { position: absolute; left: 0; right: 0; top: 12px; height: 1px; background: var(--line); }
.dayline .track-tick { position: absolute; top: 8px; width: 1px; height: 9px; background: var(--line2); }
.dayline .track-lab { position: absolute; top: 24px; font: 9.5px var(--mono); color: var(--dim); transform: translateX(-50%); }
.dayline .track-now { position: absolute; top: 0; width: 1.5px; height: 24px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.dayline .track-now span { position: absolute; top: -2px; left: 6px; font: 9.5px var(--mono); color: var(--cyan); white-space: nowrap; }
.dayline .track-mark { position: absolute; top: 4px; transform: translateX(-50%); cursor: pointer; }
.dayline .track-mark .orb { --s: 15px; font-size: 0; }
.dayline .track-tip { position: absolute; bottom: 20px; left: 0; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 10.5px var(--mono); color: var(--ink2); padding: 2px 7px; border-radius: 6px; background: rgba(8, 15, 28, 0.9); border: 1px solid var(--line); }

/* Settings, Capacity & Compute */
.settings-page { display: grid; gap: 8px; padding: 24px; }
.setting-link { display: flex; gap: 18px; align-items: center; text-align: left; padding: 18px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.03); width: 100%; transition: all 0.2s var(--spring); }
.setting-link:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--line2); }
.setting-link > span:nth-child(2) { display: grid; gap: 4px; flex: 1; }
.setting-link b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.setting-icon { font-size: 20px; color: var(--cyan); width: 28px; text-align: center; }
.settings-back { border: 0; padding: 0; background: none; color: var(--cyan); font-size: 12px; font-weight: 600; margin-bottom: 8px; }

.cap-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(2, 5, 11, 0.5); }
.cap-num { font: 600 42px/1.05 var(--mono); letter-spacing: -0.04em; margin-bottom: 6px; color: var(--ink); }
.cap-num .u { font-size: 14px; color: var(--mute); margin-left: 8px; }
.cap-side { display: flex; flex-direction: column; gap: 10px; }
.cap-bar { display: flex; gap: 3px; height: 10px; border-radius: 999px; overflow: hidden; }
.cap-seg { background: var(--cobalt); }
.cap-legend { display: flex; flex-direction: column; gap: 6px; }
.cap-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cobalt); flex: none; }
.cap-t .tr { grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1.4fr) 90px 80px 84px; }
.ledger-t .tr { grid-template-columns: 90px minmax(0, 1fr) 90px; }
.cap-paygo { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; }
.range { width: 100%; accent-color: var(--cyan); }
.ws-row { display: flex; gap: 9px; align-items: center; min-width: 0; }
.rail-h { display: flex; justify-content: space-between; font: 600 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.next-timer { padding: 14px; border: 1px solid var(--line2); background: rgba(56, 189, 248, 0.06); border-radius: 14px; }

.sec-h { display: flex; align-items: baseline; gap: 12px; font-size: 14px; font-weight: 600; margin-top: 6px; }
.machines { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: auto; }
.machine { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 1.3fr) auto; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); min-width: 600px; }
.machine:first-child { border-top: 0; }
.m-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.m-name { font-weight: 600; }
.m-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; }
.m-dot.on { background: var(--cobalt); box-shadow: 0 0 10px var(--cobalt); }
.lend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lend-chip { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line2); background: none; color: var(--mute); font-size: 12px; }
.lend-chip.on { color: var(--ink); border-color: var(--cyan); background: rgba(56, 189, 248, 0.15); }
.help-box { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px dashed var(--line2); border-radius: 14px; color: var(--mute); font-size: 12.5px; }
.policy-list { display: flex; flex-direction: column; gap: 6px; }
.policy { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(2, 5, 11, 0.5); }
.policy.on { border-color: var(--cyan); background: rgba(56, 189, 248, 0.14); }

/* Modals & Toasts */
.modal {
  display: none; width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 40px);
  overflow: auto; padding: 24px; flex-direction: column; gap: 14px; color: var(--ink);
  border-radius: 22px; position: fixed; margin: auto;
  border: 1.5px solid rgba(224, 242, 254, 0.35);
  background: linear-gradient(155deg, rgba(16, 27, 48, 0.94), rgba(6, 11, 22, 0.98));
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.92);
}
.modal[open] { display: flex; }
.modal::backdrop { background: rgba(2, 4, 9, 0.65); backdrop-filter: blur(8px); }
.modal h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font: 600 10.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.field input, .field textarea, .field select {
  border: 1px solid var(--line2); background: rgba(2, 5, 11, 0.72); border-radius: 10px; padding: 9px 12px; outline: 0; color: var(--ink);
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.field .help { font-size: 11.5px; color: var(--dim); }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); }
.seg button { flex: 1; padding: 6px; border: 0; border-radius: 7px; background: none; color: var(--mute); font-size: 12.5px; font-weight: 600; }
.seg button.on { background: rgba(255, 255, 255, 0.14); color: var(--ink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.err-msg { color: var(--danger-soft); font-size: 12.5px; }
#toast-root { position: fixed; z-index: 60; top: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 10px 16px; font-size: 12.5px; font-weight: 600; border-radius: 999px; background: rgba(15, 25, 45, 0.94); border: 1px solid var(--line2); }

/* Sidekick Drawer */
#sidekick {
  position: fixed; z-index: 45; right: 28px; top: 82px; bottom: 24px;
  width: min(430px, calc(100vw - 32px)); display: flex; flex-direction: column;
  background: linear-gradient(155deg, rgba(16, 27, 48, 0.92), rgba(6, 11, 22, 0.96));
  border: 1.5px solid rgba(186, 230, 253, 0.38); border-radius: 22px;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.92), inset 0 1.5px 1px rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(44px); overflow: hidden;
}
.sidekick-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sidekick-head > div { display: flex; align-items: center; gap: 8px; }
.sidekick-star { font-size: 18px; color: var(--cyan); }
.sidekick-private { font: 600 9.5px var(--mono); color: var(--cyan); border: 1px solid var(--line2); padding: 2px 6px; border-radius: 5px; text-transform: uppercase; }
.sidekick-context { font-size: 11.5px; color: var(--mute); padding: 10px 18px; border-bottom: 1px solid var(--line); }
.sidekick-feed { overflow: auto; flex: 1; min-height: 0; padding: 18px; display: flex; flex-direction: column; gap: 18px; scrollbar-width: thin; }
.sidekick-empty { color: var(--mute); font-size: 13px; line-height: 1.7; margin: 14px 0; }
.sidekick-message { font-size: 13.5px; overflow-wrap: anywhere; }
.sidekick-message.user { padding: 12px 14px; background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(125, 211, 252, 0.28); border-radius: 12px; }
.sidekick-who { font: 600 10px var(--mono); color: var(--cyan); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.sidekick-status { font-size: 11.5px; color: var(--cyan); padding: 0 18px; }
.sidekick-compose { padding: 14px 18px; display: grid; gap: 9px; border-top: 1px solid var(--line); }
.sidekick-compose label { font-size: 11px; color: var(--mute); }
.sidekick-compose textarea { width: 100%; resize: vertical; min-height: 64px; max-height: 160px; background: rgba(2, 5, 11, 0.72); border: 1px solid var(--line2); border-radius: 10px; padding: 10px; }
.sidekick-compose > .btn { justify-self: end; }
.sidekick-action { padding: 14px; margin-top: 10px; border: 1px solid var(--line2); border-radius: 12px; background: rgba(56, 189, 248, 0.08); }
.sidekick-action dl { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 8px; font-size: 11.5px; }
.sidekick-action dt { color: var(--mute); text-transform: capitalize; }
.sidekick-action dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sidekick-action > .btn { margin-top: 8px; }

/* Generative inline cards & handoff banners */
@keyframes spring-rise { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes beam-sweep { to { transform: translateX(100%); } }
/* Routine projection updates must not fade existing content in again. */
.gen-inline-card {
  padding: 18px 20px; border-radius: 16px; border: 1px solid rgba(186, 230, 253, 0.45);
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.14), rgba(8, 15, 28, 0.90));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  display: flex; flex-direction: column; gap: 11px;
}
.gen-inline-kicker { display: flex; justify-content: space-between; align-items: center; font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--cyan); }
.gen-inline-title { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.gen-inline-meter { padding: 12px 14px; border-radius: 12px; background: rgba(2, 5, 11, 0.65); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.gen-inline-reading b { font: 700 20px var(--mono); color: var(--polar); }
.gen-inline-reading span { font-size: 12.5px; color: var(--mute); }

.handoff-banner {
  position: relative; overflow: hidden; padding: 12px 16px; border-radius: 14px;
  border: 1px solid rgba(125, 211, 252, 0.38);
  background: rgba(56, 189, 248, 0.10);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.handoff-banner::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-100%); pointer-events: none;
}
.handoff-route { display: flex; align-items: center; gap: 8px; font: 600 11.5px var(--mono); }
.handoff-node { padding: 3px 9px; border-radius: 999px; background: rgba(2, 5, 11, 0.65); border: 1px solid var(--line); color: var(--ink2); }
.handoff-node.dim { opacity: 0.65; }
.handoff-node.live { border-color: var(--cyan); color: var(--cyan); }
.handoff-arrow { color: var(--cyan); }
.handoff-copy { font-size: 12px; color: var(--mute); }

.agent-heading { display: flex; gap: 13px; align-items: center; min-width: 0; }
.agent-status { font-size: 11.5px; color: var(--mute); margin-top: 4px; font-family: var(--mono); }
.agent-status.warm { color: var(--polar); }
.detail-label { font: 600 10px var(--mono); color: var(--cyan); text-transform: uppercase; letter-spacing: 0.1em; }
.eyebrow { font: 600 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); margin-bottom: 4px; }

body.signed-out #workspace-header, body.signed-out #dock { display: none; }
body.signed-out #main { max-width: 560px; margin: auto; height: auto; }

@media (max-width: 980px) {
  .mfd-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .agent-cockpit-split { grid-template-columns: 1fr; }
  .agent-artifacts-col { max-height: 260px; border-top: 1px solid var(--line); }
  #app { padding: 10px 14px 14px; }
  .state-legend { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
