/* Chain lessons: the intro dialog on Home, the goal/step/mistake header on the
   lesson screen, and the result block on the summary. Paper language, same
   tokens as lesson-paper.css / home-paper.css. */

/* ---------- intro (Home) ---------- */
.chain-intro-dialog .confirm-dialog-panel {
  display: grid;
  gap: 10px;
}

.chain-intro-stage {
  margin: 0;
  color: #a83224;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.chain-intro-goal {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.chain-intro-ask {
  margin: 4px 0 0;
  font-weight: 700;
}

.chain-intro-actions {
  display: grid;
  gap: 8px;
}

.chain-intro-note {
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.7;
}

/* ---------- lesson header ---------- */
body.view-lesson .chain-lesson-header {
  order: 0;
  display: grid;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--lp-ink, #15171b);
}

body.view-lesson .chain-lesson-header[hidden] {
  display: none;
}

.chain-lesson-goal {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}

.chain-lesson-goal b {
  flex: none;
  color: #a83224;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.chain-lesson-meters {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.chain-lesson-hint {
  margin: 2px 0 0;
  color: #a83224;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

/* In a chain the step counter and the prompt carry the orientation; the
   category/status labels and the ladder text are noise here. */
body.is-chain-lesson .prompt-meta,
body.is-chain-lesson .bottom-panel {
  display: none !important;
}

body.view-lesson.is-chain-lesson .conversation-stream {
  grid-template-rows: auto auto 1fr;
  padding-top: 132px;
}

.chain-lesson-goal span {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

/* ---------- summary result ---------- */
.summary-chain-result {
  display: grid;
  gap: 10px;
  margin: 4px 0 14px;
}

.summary-chain-result[hidden] {
  display: none;
}

.summary-chain-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.summary-chain-before {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.72;
}

.summary-chain-goal {
  margin: 0;
  padding: 10px 12px;
  border: 2px solid #15171b;
  border-radius: 4px;
  background: #dbff65;
  color: #15171b;
  box-shadow: 3px 3px 0 #15171b;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.summary-chain-road-label {
  margin-top: 4px;
  color: #a83224;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.summary-chain-road {
  display: grid;
  gap: 4px;
  font-weight: 700;
  font-size: 0.92rem;
}

.summary-chain-step {
  position: relative;
  padding-left: 16px;
  opacity: 0.7;
}

.summary-chain-step.is-said {
  opacity: 1;
}

.summary-chain-step::before {
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.summary-chain-step mark {
  padding: 0 2px;
  border-radius: 3px;
  background: #dbff65;
  color: #15171b;
}

/* The chain result replaces the metric-centric summary blocks. */
body.is-chain-summary #lessonSummaryTitle,
body.is-chain-summary #summaryMessage,
body.is-chain-summary .summary-main,
body.is-chain-summary .summary-metric-grid,
body.is-chain-summary #summaryLearningGains,
body.is-chain-summary #summarySpokenSentences,
body.is-chain-summary #summaryNextStep {
  display: none !important;
}
