/* ============================================================================
   pedagogy.css — PEDAGOGISKA KOMPONENTER  ·  drop-in, länkas SIST (efter v2)
   ----------------------------------------------------------------------------
   Lär ut METODEN och hur man läser svaret — visuellt och kontextuellt, inte med
   slogans (jfr borttagna taglinen). Två delar:
     1. Tomt-läge i tråden innan första frågan: flöde (3 steg) + metod + färgnyckel.
     2. Per-tur statusflöde: ~4 begripliga faser tänds live + förfluten tid (visar att
        systemet arbetar, aldrig fryst). Abstraherat från de interna stegen (skyddar metoden).
   Vilar på paper-ink-v2-tokens (--brand, --line, --panel, --muted, --serif …).
   ============================================================================ */

/* ── 1. Pedagogiskt tomt-läge ─────────────────────────────────────────────── */
.thread-empty { display: grid; gap: 1.2rem; margin-top: 1.2rem; }

.te-eyebrow {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 0.7rem; color: var(--muted); margin-bottom: 0.4rem;
}
.te-title {
  margin: 0; font-family: var(--serif); font-weight: 600;
  font-size: 1.35rem; line-height: 1.2; color: var(--ink);
}

.te-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.te-step { display: grid; grid-template-columns: 1.7rem 1fr; gap: 0.8rem; align-items: start; }
.te-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.7rem; height: 1.7rem; background: var(--brand); color: #fff;
  font-family: var(--sans); font-weight: 700; font-size: 0.85rem;
}
.te-step strong { font-weight: 600; color: var(--ink); }
.te-sub { color: var(--muted); font-size: 0.95rem; margin-top: 0.15rem; line-height: 1.5; }

.te-block { border-top: 1px solid var(--line); padding-top: 1rem; }
.te-chain { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); line-height: 1.9; }
.te-example { text-align: left; font-family: var(--serif); font-size: 0.98rem; line-height: 1.4; }

/* Färgnyckel: kopplar källtyps-/statusfärgerna till sin betydelse (pedagogiskt). */
.te-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; align-items: center;
             font-family: var(--sans); font-size: 0.74rem; color: var(--muted); }
.te-legend .sl { display: inline-flex; align-items: center; gap: 0.35rem; }
.te-legend .dot { width: 0.6rem; height: 0.6rem; border-radius: 999px !important; display: inline-block; }
.te-legend .dot.t-lag { background: var(--src-lag); }
.te-legend .dot.t-forarbete { background: var(--src-forarbete); }
.te-legend .dot.t-praxis { background: var(--src-praxis); }
.te-legend .dot.g-ok { background: var(--ok); }
.te-legend .dot.g-weak { background: var(--warn); }
.te-legend .dot.g-bad { background: var(--del); }
.te-legend .sep { width: 1px; height: 0.9rem; background: var(--line); display: inline-block; }

/* ── 2. Per-tur statusflöde (live) ────────────────────────────────────────── */
.turn-progress { margin: 0.3rem 0 1.1rem; }
.progress-phases {
  list-style: none; margin: 0 0 0.5rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.4rem; align-items: center;
}
.progress-phases:empty { display: none; }

.progress-phase {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--sans); font-size: 0.74rem; color: var(--muted);
  padding: 0.22rem 0.6rem; border: 1px solid var(--line); background: var(--panel);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.pp-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 999px !important;
  background: var(--line); flex: none; transition: background 0.2s ease;
}

/* Klar fas: bläck-text, accent-dot, accent-kant. */
.progress-phase.done { color: var(--ink); border-color: var(--brand); }
.progress-phase.done .pp-dot { background: var(--brand); }

/* Aktiv fas: accent-fyllning + (pulserande dot) — var systemet är just nu. */
.progress-phase.active {
  color: var(--brand); border-color: var(--brand);
  background: var(--brand-soft); font-weight: 600;
}
.progress-phase.active .pp-dot { background: var(--brand); }

/* Lugnande rad: förfluten tid + ev. text, med pulserande prick (aldrig fryst-känsla). */
.progress-note {
  margin: 0; font-family: var(--sans); font-size: 0.78rem; color: var(--muted);
  display: flex; align-items: center; gap: 0.45rem; min-height: 1.1em;
}
.progress-note:empty { display: none; }
.progress-note::before {
  content: ""; width: 0.5rem; height: 0.5rem; border-radius: 999px !important;
  background: var(--brand); flex: none;
}

@media (prefers-reduced-motion: no-preference) {
  .progress-phase.active .pp-dot,
  .progress-note::before { animation: pp-pulse 1.1s ease-in-out infinite; }
  @keyframes pp-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.6); opacity: 0.5; }
  }
}
