/* Timeline page — colours via CSS variables (light + html.dark), mirrors blog.html */

.timeline-page {
  /* Light theme (default variables) */
  --tl-surface: #ffffff;
  --tl-content-bg: transparent;
  --tl-heading: #0f172a;
  --tl-body: #475569;
  --tl-muted: #64748b;
  --tl-border: #e2e8f0;
  --tl-note-bg: #f1f5f9;
  --tl-note-border: #4f46e5;
  --tl-dot-ring: #f8fafc;
}

html.dark .timeline-page {
  /* Dark theme — matches blog: white headings, neutral-300 body on neutral-900 */
  --tl-surface: #0f172a;
  --tl-content-bg: #0f172a;
  --tl-heading: #ffffff;
  --tl-body: #cbd5e1;
  --tl-muted: #94a3b8;
  --tl-border: #1e293b;
  --tl-note-bg: #1e293b;
  --tl-note-border: #818cf8;
  --tl-dot-ring: #0f172a;
}

.timeline-page .page-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--tl-border);
  background: var(--tl-surface);
}

html.dark .timeline-page .content-section {
  background-color: var(--tl-content-bg);
}

.timeline-page .lead {
  font-size: 1.125rem;
  color: var(--tl-body);
  max-width: 640px;
  margin-top: 12px;
}

.timeline-page .page-header h1 {
  color: var(--tl-heading);
}

/* Timeline sections */
.timeline-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--tl-border);
}

.timeline-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.timeline-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--tl-heading);
}

.timeline-projection-note {
  background: var(--tl-note-bg);
  border-left: 4px solid var(--tl-note-border);
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: 0.9rem;
  color: var(--tl-body);
}

.timeline-projection-note p {
  margin: 0;
  color: inherit;
}

.timeline-projection-note strong {
  color: var(--tl-heading);
}

/* Timeline list */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Timeline item */
.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--tl-border);
  position: relative;
}

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

/* Timeline dots */
.timeline-item::before {
  content: '';
  position: absolute;
  left: 138px;
  top: 24px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary-600, #4f46e5);
  border: 2px solid var(--tl-dot-ring);
  box-shadow: 0 0 0 2px var(--color-primary-600, #4f46e5);
}

.timeline-item.timeline-current::before {
  background: #d97706;
  box-shadow: 0 0 0 2px #d97706;
}

.timeline-item.timeline-future::before {
  background: #6b7280;
  box-shadow: 0 0 0 2px #6b7280;
}

.timeline-item.timeline-wildcard::before,
.timeline-item.wildcard::before {
  background: #dc2626;
  box-shadow: 0 0 0 2px #dc2626;
}

/* Timeline date */
.timeline-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tl-muted);
  padding-top: 4px;
  text-align: right;
  white-space: nowrap;
}

.timeline-item.timeline-current .timeline-date {
  color: #b45309;
}

html.dark .timeline-item.timeline-current .timeline-date {
  color: #fbbf24;
}

.timeline-item.timeline-wildcard .timeline-date,
.timeline-item.wildcard .timeline-date {
  color: #dc2626;
}

html.dark .timeline-item.timeline-wildcard .timeline-date,
html.dark .timeline-item.wildcard .timeline-date {
  color: #f87171;
}

/* Timeline content */
.timeline-content {
  padding-left: 16px;
}

.timeline-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--tl-heading);
  margin-bottom: 8px;
  line-height: 1.4;
}

.timeline-content p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--tl-body);
  margin: 0;
}

/* Risk tags */
.timeline-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
}

.tag-low {
  background: #d1fae5;
  color: #065f46;
}

.tag-medium {
  background: #fef3c7;
  color: #92400e;
}

.tag-high {
  background: #fed7aa;
  color: #9a3412;
}

.tag-critical {
  background: #fee2e2;
  color: #991b1b;
}

html.dark .tag-low {
  background: #064e3b;
  color: #6ee7b7;
}

html.dark .tag-medium {
  background: #78350f;
  color: #fcd34d;
}

html.dark .tag-high {
  background: #7c2d12;
  color: #fdba74;
}

html.dark .tag-critical {
  background: #7f1d1d;
  color: #fca5a5;
}

.timeline-section > p {
  font-size: 0.95rem;
  color: var(--tl-body);
  line-height: 1.7;
  max-width: 720px;
}

/* Timeline item state accents */
.timeline-item.timeline-current {
  border-left: 3px solid #d97706;
  padding-left: 12px;
  margin-left: -1px;
}

.timeline-item.timeline-future {
  border-left: 3px solid #6b7280;
  padding-left: 12px;
  margin-left: -1px;
}

.timeline-item.timeline-wildcard,
.timeline-item.wildcard {
  border-left: 3px solid #dc2626;
  padding-left: 12px;
  margin-left: -1px;
}

/* Responsive */
@media (max-width: 640px) {
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-left: 24px;
  }

  .timeline-item::before {
    left: 0;
    top: 4px;
  }

  .timeline-date {
    text-align: left;
    font-size: 0.8rem;
  }

  .timeline-content {
    padding-left: 0;
  }
}
