:root {
  --analyst-bg: #020617; /* slate-950 */
  --analyst-surface: rgba(15, 23, 42, 0.72); /* slate-900 @ ~72% */
  --analyst-surface-2: rgba(2, 6, 23, 0.6);
  --analyst-border: rgba(255, 255, 255, 0.10);
  --analyst-text: #e2e8f0; /* slate-200 */
  --analyst-muted: #94a3b8; /* slate-400 */
  --analyst-accent: #38bdf8; /* sky-400 */
  --analyst-accent-2: #a78bfa; /* violet-400 */
  --analyst-danger: #fb7185; /* rose-400 */
  --analyst-success: #34d399; /* emerald-400 */
  --analyst-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

html,
body {
  background: var(--analyst-bg);
}

body {
  color: var(--analyst-text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(800px 450px at 90% 15%, rgba(167, 139, 250, 0.18), transparent 60%),
    radial-gradient(900px 500px at 35% 90%, rgba(52, 211, 153, 0.10), transparent 60%),
    linear-gradient(to bottom, rgba(2, 6, 23, 0.65), rgba(2, 6, 23, 0.95));
}

/* Reusable components */
.analyst-card {
  background: var(--analyst-surface);
  border: 1px solid var(--analyst-border);
  box-shadow: var(--analyst-shadow);
  border-radius: 18px;
}

.analyst-card--flat {
  box-shadow: none;
  background: rgba(15, 23, 42, 0.55);
}

.analyst-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease,
    box-shadow 140ms ease, color 140ms ease;
  user-select: none;
}

.analyst-btn:active {
  transform: translateY(1px);
}

.analyst-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25);
}

.analyst-btn--primary {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.95), rgba(167, 139, 250, 0.95));
  color: #06121e;
}

.analyst-btn--primary:hover {
  filter: brightness(1.04);
}

.analyst-btn--secondary {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
  color: var(--analyst-text);
}

.analyst-btn--secondary:hover {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.32);
}

.analyst-btn--danger {
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.30);
  color: #fecdd3;
}

.analyst-btn--danger:hover {
  background: rgba(251, 113, 133, 0.18);
}

.analyst-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(2, 6, 23, 0.35);
  color: var(--analyst-muted);
}

.analyst-link {
  color: rgba(125, 211, 252, 0.95);
  text-decoration: none;
}

.analyst-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Form defaults */
.analyst-input,
.analyst-textarea {
  width: 100%;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--analyst-text);
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
}

.analyst-input:focus,
.analyst-textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .analyst-btn {
    transition: none;
  }
}

