/*
 * Lesson template — simple diagrams built from HTML (no images needed).
 *   .compare   2–3 side-by-side cards ("model A vs model B", "before vs after")
 *   .steps     numbered derivation, one transformation per step
 *   .flow      a pipeline of boxes with arrows (vertical, or .flow.row for horizontal)
 * For anything richer, draw an inline <svg> inside a .figure (see blocks.css).
 */

/* ── Compare cards ────────────────────────────────────── */
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 24px 0; }
.compare > div {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.compare h4 { font-size: 1rem; margin-bottom: 8px; color: var(--accent); }
.compare p:last-child, .compare ul:last-child { margin-bottom: 0; }

/* ── Numbered derivation steps ────────────────────────── */
.steps { list-style: none; counter-reset: step; margin: 24px 0; padding: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 12px 16px 12px 52px;
  margin-bottom: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(73, 138, 155, 0.2);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps .formula.tex { padding: 8px 0 0; text-align: left; }

/* ── Flow / pipeline ──────────────────────────────────── */
.flow { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 24px 0; }
.flow.row { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.flow-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 18px;
  color: var(--text);
  font-size: 0.92rem;
  text-align: center;
  max-width: 560px;
}
.flow-box small { display: block; color: var(--text-dim); font-family: var(--mono); font-size: 0.75rem; }
.flow-box.hot { border-color: var(--accent); background: rgba(73, 138, 155, 0.1); }
.flow-arrow { color: var(--text-dim); padding: 4px 10px; font-family: var(--mono); }
.flow-arrow::before { content: '↓'; }
.flow.row .flow-arrow::before { content: '→'; }
