*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-main: #050816;
  --bg-elevated: #0b1020;
  --bg-elevated-soft: #10172f;
  --accent-primary: #4ade80;
  --accent-secondary: #38bdf8;
  --accent-warning: #fb923c;
  --accent-danger: #f97373;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.25);
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.8);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, #1f2933 0, #020617 46%);
  color: var(--text-main);
  font-family: var(--font-sans);
}

body {
  display: flex;
  justify-content: center;
}

.app-shell {
  width: 100%;
  max-width: 1220px;
  padding: 32px 20px 48px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.app-header h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  letter-spacing: 0.03em;
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(74, 222, 128, 0.12));
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.8rem;
  color: var(--text-main);
  white-space: nowrap;
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--accent-primary), #22c55e 42%, #0f172a 100%);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.8);
}

/* KPI section */
.kpi-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.kpi-card {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.15), rgba(15, 23, 42, 0.95));
  border-radius: var(--radius-lg);
  padding: 16px 18px 18px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-soft);
}

.kpi-card h2 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

.kpi-value {
  margin: 4px 0 6px;
  font-size: 1.6rem;
  font-weight: 700;
}

.kpi-caption {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Section header */
.section-header {
  margin-bottom: 14px;
}

.section-header h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.section-header p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Timeline */
.timeline-section {
  margin-bottom: 30px;
}

.timeline-wrapper {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.98));
  border-radius: 22px;
  padding: 16px 18px 18px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.timeline-axis {
  position: relative;
  margin-bottom: 14px;
  padding: 10px 0 4px;
  overflow-x: auto;
  white-space: nowrap;
}

.timeline-axis::-webkit-scrollbar {
  height: 6px;
}

.timeline-axis::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

.timeline-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 2px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.5), rgba(74, 222, 128, 0.5));
  opacity: 0.7;
}

.timeline-points {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 48px;
  padding: 0 2px;
}

.timeline-point {
  position: relative;
  text-align: center;
  cursor: pointer;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.8);
  margin: 0 auto 6px;
  background: #020617;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.timeline-point.active .timeline-dot {
  transform: scale(1.15);
  border-color: var(--accent-primary);
  background: radial-gradient(circle, var(--accent-primary), #22c55e 60%, #0f172a 100%);
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.8);
}

.timeline-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline-range {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Timeline cards */
.timeline-cards {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr;
  gap: 16px;
}

.timeline-card {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.09), rgba(15, 23, 42, 0.98));
  border-radius: 18px;
  padding: 14px 14px 16px;
  border: 1px solid var(--border-subtle);
  position: relative;
}

.timeline-card h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.timeline-meta {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.metric-pill span.value {
  font-weight: 600;
  color: var(--accent-secondary);
}

.metric-pill.positive span.value {
  color: var(--accent-primary);
}

.metric-pill.peak span.value {
  color: var(--accent-warning);
}

.timeline-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-main);
  line-height: 1.4;
}

.timeline-tag {
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--text-muted);
}

.timeline-tag.launch {
  border-color: rgba(56, 189, 248, 0.7);
}

.timeline-tag.stability {
  border-color: rgba(74, 222, 128, 0.7);
}

.timeline-tag.growth {
  border-color: rgba(96, 165, 250, 0.7);
}

.timeline-tag.peak {
  border-color: rgba(251, 146, 60, 0.9);
}

.timeline-tag.resilience {
  border-color: rgba(239, 68, 68, 0.8);
}

/* Insights */
.insights-section {
  margin-bottom: 30px;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.insight-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.92));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 14px 14px 16px;
}

.insight-card h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.insight-card ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.82rem;
  color: var(--text-main);
  display: grid;
  gap: 4px;
}

/* Linked dashboards */
.linked-dashboards {
  margin-bottom: 10px;
}

.linked-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.linked-card {
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.15), rgba(15, 23, 42, 0.98));
  border-radius: 16px;
  padding: 12px 13px 13px;
  border: 1px solid var(--border-subtle);
  font-size: 0.84rem;
}

.linked-card h3 {
  margin: 0 0 6px;
  font-size: 0.9rem;
}

.linked-card p {
  margin: 0;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 820px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-tag {
    align-self: flex-start;
  }

  .timeline-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .app-shell {
    padding-inline: 14px;
  }

  .app-header h1 {
    font-size: 1.3rem;
  }

  .kpi-card {
    padding-inline: 14px;
  }
}
