/* Retention & Survival Curves.
   The teaching-scaffold classes (act-num, act-narrative, chart-explainer, callout-box)
   are tool-local by convention -- only .interpretation-aid lives in main.css. */

.overview-section .card p { max-width: 78ch; }

.act-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  white-space: nowrap;
  margin-right: 0.6rem;
  vertical-align: middle;
}

.act-narrative {
  font-size: 0.94rem;
  color: #4b5563;
  line-height: 1.65;
  margin: 0 0 1rem;
  max-width: 760px;
}

.chart-explainer {
  font-size: 0.9rem;
  color: var(--app-muted, #5f6b7a);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.callout-box {
  border-left: 4px solid #d1d5db;
  background: #f9fafb;
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.callout-box p { margin: 0 0 0.5rem; }
.callout-box ol, .callout-box ul { margin: 0; padding-left: 1.3rem; }
.callout-box li { margin-bottom: 0.4rem; }
.callout-amber { border-left-color: #f59e0b; background: #fffbeb; }

.exploratory-questions { margin: 0; padding-left: 1.4rem; line-height: 1.65; }
.exploratory-questions li { margin-bottom: 0.85rem; }

/* ------------------------------------------------------------------ setup */

.setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.dsc-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.dsc-panel-title { margin-top: 0; }
.dsc-hint { font-size: 0.85rem; color: var(--app-muted, #5f6b7a); line-height: 1.5; }
.dsc-hint--muted { font-size: 0.8rem; }

.radio-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.radio-row input { margin-top: 0.25rem; flex-shrink: 0; }

.field-label { display: block; font-weight: 600; margin: 1rem 0 0.35rem; font-size: 0.9rem; }
.field-hint { font-size: 0.82rem; color: var(--app-muted, #5f6b7a); margin: 0.35rem 0 0; line-height: 1.5; }

#k-slider { width: 100%; }

.rule-preview {
  margin: 0.6rem 0 0;
  font-size: 0.88rem;
  color: #1e3a8a;
  background: #eff6ff;
  border-radius: 5px;
  padding: 0.5rem 0.7rem;
  min-height: 1.2em;
}

.rule-preview:empty { display: none; }
.rule-preview--warn { color: #92400e; background: #fffbeb; }

.run-row { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.run-status { font-size: 0.88rem; color: var(--app-muted, #5f6b7a); }
.run-status--error { color: #b91c1c; }

.scenario-description { margin-top: 0.75rem; font-size: 0.9rem; line-height: 1.55; }
.scenario-stakeholder { font-style: italic; color: #475569; }
.scenario-question { font-weight: 600; color: #1e3a8a; }

/* ------------------------------------------------------------------ results */

.metric-headline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem 1.15rem;
}

.metric-label { font-size: 0.82rem; color: var(--app-muted, #5f6b7a); font-weight: 600; }
.metric-value { font-size: 1.75rem; font-weight: 700; color: #0f172a; line-height: 1.25; margin: 0.25rem 0; }
.metric-sub { font-size: 0.78rem; color: var(--app-muted, #5f6b7a); line-height: 1.45; }

.chart { width: 100%; }
.chart-note { font-size: 0.85rem; color: var(--app-muted, #5f6b7a); margin-top: 0.75rem; line-height: 1.5; }

/* The at-risk row belongs to the curve above it, so it is deliberately plain: it is a
   axis annotation that happens to be a table, not a result in its own right. */
.at-risk-table { overflow-x: auto; margin-top: -0.5rem; }
.at-risk-heading {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--app-muted, #5f6b7a);
  margin: 0.5rem 0 0.25rem;
}
.at-risk { border-collapse: collapse; font-size: 0.78rem; width: 100%; }
.at-risk th { text-align: left; color: var(--app-muted, #5f6b7a); font-weight: 600; padding: 0.2rem 0.5rem 0.2rem 0; white-space: nowrap; }
.at-risk td { text-align: center; color: #475569; padding: 0.2rem 0.4rem; }

.activity-strip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 1px;
  color: #2563eb;
}

.diagnostics-list { list-style: none; padding: 0; margin: 0; }
.diagnostic { border-left: 4px solid #f59e0b; background: #fffbeb; border-radius: 6px; padding: 0.75rem 1rem; margin-bottom: 0.75rem; }
.diagnostic p { margin: 0.3rem 0 0; font-size: 0.88rem; line-height: 1.55; }
.diagnostic--thin_tail, .diagnostic--few_events { border-left-color: #ef4444; background: #fef2f2; }
.diagnostic--early_cliff { border-left-color: #0ea5e9; background: #f0f9ff; }

.next-step-card { text-align: center; }
.next-step-card p { max-width: 70ch; margin: 0 auto 1rem; font-size: 0.92rem; line-height: 1.6; }
.next-step-card #clv-link { display: inline-block; margin: 0.75rem auto 1.25rem; }

.export-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }

@media print {
  .run-row, .professor-mode-toggle, .export-section, .dsc-panel + .dsc-panel { display: none; }
}
