/* ============================================================
   HOME PAGE — pipeline visualizer, telegram preview
   ============================================================ */

/* Pipeline Visualizer */
.pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 2px 4px;
}

.p-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.p-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  position: relative;
  transition: all 0.3s ease;
}

.p-icon svg { width: 19px; height: 19px; }

.p-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-faint);
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.p-sub {
  font-size: 9.5px;
  color: var(--text-faint);
}

.p-line {
  flex: 0.6;
  height: 2px;
  background: var(--border);
  margin: 0 2px 26px;
  position: relative;
  overflow: hidden;
}

.p-line .fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--accent);
  transition: width 0.5s ease;
}

.p-node.active .p-icon {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--glow);
  background: var(--accent-soft);
}

.p-node.active .p-label { color: var(--accent); }

.p-node.done .p-icon {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.p-node.done .p-label { color: var(--text); }
.p-node.pulse .p-icon { animation: pipeline-pulse 1s ease-in-out infinite; }

@keyframes pipeline-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); }
  50%       { box-shadow: 0 0 0 8px transparent; }
}

/* Telegram Preview */
.tg-empty {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-faint);
  font-size: 12.5px;
}

.tg-empty svg {
  width: 26px;
  height: 26px;
  margin-bottom: 10px;
  opacity: 0.5;
}

.tg-bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.65;
}

.tg-bubble .tg-title   { color: var(--critical); font-weight: 700; font-size: 12.5px; margin-bottom: 10px; }
.tg-bubble .tg-row     { margin-bottom: 6px; }
.tg-bubble .tg-k       { color: var(--text-faint); }
.tg-bubble .tg-v       { color: var(--text); }
.tg-bubble .tg-block-title { color: var(--ai); font-weight: 700; margin: 12px 0 6px; }
.tg-bubble .tg-fix     { color: var(--accent-2); font-weight: 700; margin: 12px 0 6px; }
.tg-bubble ol          { padding-left: 18px; color: var(--text-dim); }
.tg-bubble ol li       { margin-bottom: 4px; }
.tg-bubble code        { background: var(--surface); padding: 1px 5px; border-radius: 4px; color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .pipeline {
    gap: 2px;
  }

  .p-icon {
    width: 34px;
    height: 34px;
  }

  .p-icon svg {
    width: 15px;
    height: 15px;
  }

  .p-label {
    font-size: 9px;
  }

  .p-sub {
    display: none;
  }

  .p-line {
    margin-bottom: 16px;
  }
}
