.journey-page {
  max-width: 1180px;
  margin: 0 auto;
}

.journey-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.page-subtitle {
  max-width: 760px;
  margin-top: 0.75rem;
  color: var(--muted, #64748b);
  font-size: 1.05rem;
  line-height: 1.6;
}

.journey-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0.75rem 0 0.25rem;
  color: var(--muted, #64748b);
  font-size: 0.85rem;
}

.journey-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.journey-legend i {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  display: inline-block;
}

.journey-legend i.symptom {
  background: #ef4444;
}

.journey-legend i.treatment {
  background: #3b82f6;
}

.journey-legend i.improvement {
  background: #22c55e;
}

.journey-legend i.worsening {
  background: #f97316;
}

.journey-legend i.milestone {
  background: #8b5cf6;
}

.journey-badge {
  white-space: nowrap;
  border: 1px solid rgba(99, 102, 241, 0.24);
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 650;
}

.journey-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.journey-metric-card {
  border: 1px solid var(--border, rgba(148, 163, 184, 0.28));
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.92));
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.journey-metric-value {
  display: block;
  color: var(--foreground, #0f172a);
  font-size: 1.45rem;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.journey-metric-label {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted, #64748b);
  font-size: 0.84rem;
}

.journey-card {
  border: 1px solid var(--border, rgba(148, 163, 184, 0.28));
  background: var(--card, #ffffff);
  border-radius: 24px;
  padding: 1.25rem;
  margin-top: 1.25rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.journey-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.journey-card-header h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.journey-card-header p {
  margin: 0.35rem 0 0;
  color: var(--muted, #64748b);
  font-size: 0.92rem;
  line-height: 1.5;
}

.journey-plot {
  width: 100%;
  min-height: 650px;
}

.journey-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.25));
}

.journey-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.journey-table th {
  text-align: left;
  background: rgba(248, 250, 252, 0.9);
  color: var(--muted, #64748b);
  font-weight: 650;
  padding: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.journey-table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--foreground, #0f172a);
}

.journey-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 650;
}

.journey-pill.symptom {
  color: #991b1b;
  background: #fee2e2;
}

.journey-pill.treatment {
  color: #1d4ed8;
  background: #dbeafe;
}

.journey-pill.improvement {
  color: #166534;
  background: #dcfce7;
}

.journey-pill.worsening {
  color: #9a3412;
  background: #ffedd5;
}

.journey-pill.milestone {
  color: #5b21b6;
  background: #ede9fe;
}

@media (max-width: 900px) {
  .journey-hero {
    flex-direction: column;
  }

  .journey-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
