/* ─────────────────────────────────────────────
   Services page – AI development process (Issue #44)
   Loaded after styles.css; uses its design tokens only,
   so light and dark themes need no extra rules.
   ───────────────────────────────────────────── */

/* ── Overview strip ── */
.ai-flow {
  padding: 1.25rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.ai-flow-list {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.6rem 0;
  list-style: none; margin: 0; padding: 0;
}
.ai-flow-list li { display: flex; align-items: center; }
.ai-flow-list li:not(:last-child)::after {
  content: "";
  width: 0.45rem; height: 0.45rem; margin: 0 0.7rem 0 0.55rem;
  border-top: 1.5px solid var(--muted); border-right: 1.5px solid var(--muted);
  transform: rotate(45deg);
}

.ai-flow-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0.9rem 0.3rem 0.3rem;
  border-radius: var(--radius-pill);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text); font-size: 0.9375rem; font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.ai-flow-link:hover,
.ai-flow-link:focus-visible { border-color: var(--brand); color: var(--brand); }

.ai-flow-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--brand); color: var(--bg);
  font-size: 0.8125rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ai-flow-loop {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 1rem 0 0;
  color: var(--muted); font-size: 0.875rem;
}
.ai-flow-loop i { color: var(--brand); }

/* ── Stage list ── */
.ai-stages { list-style: none; margin: 2.5rem 0 0; padding: 0; }

.ai-stage {
  position: relative;
  display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); column-gap: 1.25rem;
  padding-bottom: 1.5rem;
  scroll-margin-top: 6.5rem;
}
.ai-stage:last-child { padding-bottom: 0; }

/* rail joining one marker to the next */
.ai-stage:not(:last-child)::before {
  content: ""; position: absolute;
  left: calc(1.375rem - 1px); top: 3.25rem; bottom: 0.5rem; width: 2px;
  background: var(--border);
}

.ai-stage-marker {
  display: flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font-size: 1.0625rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ai-stage-body {
  padding: 1.5rem 1.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}
.ai-stage-body > p { max-width: 62ch; }

/* ── What goes in / what comes out ── */
.ai-io {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
  margin: 1.25rem 0 0; padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.ai-io dt {
  display: flex; align-items: center; gap: 0.4rem;
  margin-bottom: 0.4rem;
  color: var(--text); font-size: 0.8125rem; font-weight: 600;
}
.ai-io dt i { color: var(--brand); }
.ai-io dd { margin: 0; }
.ai-io ul {
  list-style: none; margin: 0; padding: 0;
  color: var(--muted-strong); font-size: 0.9375rem; line-height: 1.45;
}
.ai-io li + li { margin-top: 0.25rem; }

/* ── Feedback loop note ── */
.ai-feedback {
  display: flex; gap: 0.6rem;
  margin: 1.25rem 0 0; padding: 0.75rem 1rem;
  border: 1.5px dashed var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--text); font-size: 0.9375rem; line-height: 1.45;
}
.ai-feedback i { color: var(--brand); flex-shrink: 0; }

.ai-note { max-width: 62ch; margin: 2rem 0 0; color: var(--muted); font-size: 0.9375rem; }

/* ── Examples block ── */
.ai-vary-list li i { color: var(--brand); }

@media (min-width: 768px) {
  .ai-io { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 575.98px) {
  .ai-flow { padding: 1rem; }
  .ai-stage { grid-template-columns: 2.25rem minmax(0, 1fr); column-gap: 0.75rem; }
  .ai-stage:not(:last-child)::before { left: calc(1.125rem - 1px); top: 2.75rem; }
  .ai-stage-marker { width: 2.25rem; height: 2.25rem; font-size: 0.9375rem; }
  .ai-stage-body { padding: 1.25rem; }
}

/* ── Building blocks: numbered "how it is built" steps ── */
.ai-steps {
  list-style: none; counter-reset: ai-step;
  margin: 1.25rem 0 0; padding: 1.25rem 0 0;
  border-top: 1px solid var(--border);
  color: var(--muted-strong); font-size: 0.9375rem; line-height: 1.45;
}
.ai-steps li {
  position: relative; counter-increment: ai-step;
  padding-left: 2.1rem;
}
.ai-steps li + li { margin-top: 0.75rem; }
.ai-steps li::before {
  content: counter(ai-step);
  position: absolute; left: 0; top: 0.05rem;
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font-size: 0.75rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ai-steps strong { color: var(--text); font-weight: 600; }

/* ── Channels ── */
.ai-measure { max-width: 62ch; }
.ai-channel {
  height: 100%; padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

@media (min-width: 992px) {
  .ai-steps-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  .ai-steps-row li + li { margin-top: 0; }
}

/* ── Spec-driven development steps ── */
.ai-sdd-step .tag-chip { white-space: normal; }
.ai-sdd-step p { font-size: 0.9375rem; line-height: 1.45; }

.ai-check-grid li { margin-bottom: 0.875rem; }

/* ── Technology chips ── */
.ai-chip-list {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  list-style: none; margin: 0; padding: 0;
}

@media (min-width: 768px) {
  .ai-check-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; }
}
