/* ============================================================
   BLUMI — insight.css (Sprint 2: Deep Insight Page)
   Extends style.css — do NOT redefine existing tokens.
   ============================================================ */

/* ── Page layout ── */
.insight-body {
  background-color: var(--color-warm-white);
  min-height: 100vh;
}

.insight-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-3xl);
}

/* ── Header summary card ── */
.insight-summary {
  background: linear-gradient(135deg, var(--color-sage) 0%, var(--color-sage-dark) 100%);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  color: white;
  margin-bottom: var(--space-xl);
  animation: fadeUp 0.35s ease-out;
}

.insight-summary * { color: white !important; }

.insight-summary-emoji {
  font-size: 48px;
  display: block;
  margin-bottom: var(--space-sm);
}

.insight-summary-title {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

.insight-summary-meta {
  font-size: var(--font-size-small);
  color: rgba(255,255,255,0.85);
  margin-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.insight-summary-meta span {
  background: rgba(255,255,255,0.25);
  padding: 4px 12px;
  border-radius: var(--border-radius-pill);
  font-size: var(--font-size-caption);
  color: rgba(255,255,255,0.9);
}

.insight-score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-top: var(--space-md);
  background: rgba(255,255,255,0.3);
  border-radius: var(--border-radius-pill);
  padding: 6px 18px;
}

.insight-score .score-num {
  font-size: 28px;
  font-weight: var(--font-weight-bold);
}

.insight-score .score-max {
  font-size: var(--font-size-small);
  opacity: 0.85;
}

/* ── Aspect section card ── */
.aspect-section {
  background: var(--color-surface);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-lg);
  overflow: hidden;
  animation: fadeUp 0.35s ease-out both;
}

.aspect-section-header {
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  border-bottom: 1.5px solid var(--color-border);
}

.aspect-section-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.aspect-section-title {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.aspect-section-subtitle {
  font-size: var(--font-size-caption);
  color: var(--color-text-tertiary);
  margin-top: 2px;
}

.aspect-section-body {
  padding: var(--space-lg);
}

/* ── "Why it matters" block ── */
.why-matters {
  background: var(--color-sage-light);
  border-radius: var(--border-radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.why-matters-label {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-semibold);
  color: var(--color-sage-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.why-matters-text {
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  line-height: 1.6;
}

/* ── Failed items list ── */
.failed-items-label {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-semibold);
  color: var(--color-alert);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.failed-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
  line-height: 1.5;
  border-bottom: 1px solid var(--color-border);
}

.failed-item:last-child {
  border-bottom: none;
}

.failed-item-icon {
  color: var(--color-alert);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Stimulation instructions ── */
.stimulation-block {
  margin-top: var(--space-lg);
}

.stimulation-label {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-semibold);
  color: var(--color-sage-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.stimulation-card {
  background: var(--color-surface-alt);
  border-radius: var(--border-radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  border-left: 3px solid var(--color-sage);
}

.stimulation-step {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-bold);
  color: var(--color-sage-dark);
  margin-bottom: var(--space-xs);
}

.stimulation-title {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.stimulation-desc {
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.stimulation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: var(--font-size-caption);
  color: var(--color-text-tertiary);
}

.stimulation-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-surface);
  border-radius: var(--border-radius-pill);
  padding: 2px 10px;
}

/* ── Expected progress ── */
.expected-progress {
  background: var(--color-success-soft);
  border-radius: var(--border-radius-md);
  padding: var(--space-md);
  margin-top: var(--space-md);
}

.expected-progress-label {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-semibold);
  color: var(--color-success);
  margin-bottom: var(--space-xs);
}

.expected-progress-text {
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  line-height: 1.5;
}

/* ── When to worry ── */
.when-to-worry {
  background: var(--color-warning-soft);
  border-radius: var(--border-radius-md);
  padding: var(--space-md);
  margin-top: var(--space-sm);
}

.when-to-worry-label {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-semibold);
  color: #92400E;
  margin-bottom: var(--space-xs);
}

.when-to-worry-text {
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  line-height: 1.5;
}

/* ── Passed aspects (collapsed) ── */
.passed-section {
  background: var(--color-surface);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-lg);
  animation: fadeUp 0.35s ease-out both;
}

.passed-section-header {
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.passed-section-title {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  color: var(--color-success);
}

.passed-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: 0 var(--space-lg) var(--space-lg);
}

/* ── Screen time card ── */
.screentime-card {
  background: var(--color-surface);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  animation: fadeUp 0.35s ease-out both;
}

.screentime-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.screentime-icon {
  font-size: 24px;
}

.screentime-title {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.screentime-age {
  font-size: var(--font-size-caption);
  color: var(--color-text-tertiary);
}

.screentime-text {
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.screentime-source {
  font-size: var(--font-size-caption);
  color: var(--color-text-tertiary);
  margin-top: var(--space-sm);
  font-style: italic;
}

/* ── CTA section ── */
.insight-ctas {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  animation: fadeUp 0.35s ease-out both;
}

/* ── Generic insight (all passed) ── */
.insight-generic {
  background: var(--color-surface);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  text-align: center;
  animation: fadeUp 0.35s ease-out both;
}

.insight-generic-emoji {
  font-size: 48px;
  display: block;
  margin-bottom: var(--space-md);
}

.insight-generic-text {
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}
