.timeline-line {
  left: 14px;
}

.timeline-card {
  overflow: hidden;
}

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

.timeline-card-media {
  border-right: 0;
  border-bottom: 1px solid rgb(217 225 236);
}

.timeline-mobile-fade,
.timeline-mobile-collapse-row {
  display: none;
}

.timeline-mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0;
  color: #1f4e8c;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.timeline-mobile-toggle:hover,
.timeline-mobile-toggle:focus-visible {
  color: #163a6b;
  outline: none;
}

.timeline-organizer-card {
  position: relative;
}

.timeline-organizer-edit-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgb(217 225 236);
  border-radius: 999px;
  background: #ffffff;
  padding: 0.45rem 0.8rem;
  color: #1f4e8c;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.timeline-organizer-edit-button:hover,
.timeline-organizer-edit-button:focus-visible {
  border-color: #1f4e8c;
  color: #163a6b;
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 78, 140, 0.12);
}

.timeline-organizer-popover {
  margin-top: 0.9rem;
  border: 1px solid rgb(217 225 236);
  border-radius: 1rem;
  background: #ffffff;
  padding: 0.9rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.timeline-organizer-search input {
  width: 100%;
}

.timeline-organizer-results {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.8rem;
  max-height: 16rem;
  overflow-y: auto;
}

.timeline-organizer-result {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgb(217 225 236);
  border-radius: 0.95rem;
  background: #f8fafc;
  padding: 0.75rem;
  text-align: left;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.timeline-organizer-result:hover,
.timeline-organizer-result:focus-visible {
  border-color: #1f4e8c;
  background: #eff6ff;
  outline: none;
}

.timeline-organizer-result.is-current {
  border-color: rgba(31, 78, 140, 0.3);
  background: rgba(31, 78, 140, 0.08);
}

.timeline-organizer-result-avatar {
  display: inline-flex;
  height: 2.5rem;
  width: 2.5rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0.85rem;
  background: #ffffff;
  color: #64748b;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.timeline-organizer-result-avatar img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.timeline-organizer-result-copy {
  min-width: 0;
}

.timeline-organizer-result-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.timeline-organizer-result-meta {
  margin-top: 0.18rem;
  font-size: 0.8rem;
  color: #64748b;
}

.timeline-organizer-status {
  margin-top: 0.8rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  padding: 0.7rem 0.8rem;
  font-size: 0.82rem;
  color: #475569;
}

.timeline-organizer-status.is-error {
  background: #fef2f2;
  color: #b91c1c;
}

.timeline-organizer-status.is-success {
  background: #f0fdf4;
  color: #166534;
}

.timeline-year-pill {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.timeline-year-block {
  display: inline-flex;
  width: 6rem;
  height: 2.2rem;
  flex: 0 0 auto;
  border-radius: 0.35rem;
  background: linear-gradient(135deg, #1e293b, #1f4e8c);
 }

.timeline-marker-shell {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  display: inline-flex;
  height: 26px;
  width: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14);
}

.timeline-marker-dot {
  height: 16px;
  width: 16px;
  border-radius: 999px;
  background: #94a3b8;
}

.timeline-marker-upcoming .timeline-marker-shell {
  height: 30px;
  width: 30px;
}

.timeline-marker-upcoming .timeline-marker-dot {
  height: 18px;
  width: 18px;
  background: #1f4e8c;
  animation: timelinePulse 1.8s ease-in-out infinite;
}

@keyframes timelinePulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(31, 78, 140, 0.36);
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 10px rgba(31, 78, 140, 0);
  }
}

@media (max-width: 1024px) {
  .timeline-card-body {
    padding: 1.5rem;
  }

  .timeline-card-header {
    gap: 1rem;
  }

  .timeline-card-title {
    font-size: 2rem;
    line-height: 1.05;
  }

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

  .timeline-detail-card {
    padding: 1.125rem;
  }
}

@media (max-width: 1200px) {
  .timeline-card-media {
    border-right: 0;
    border-bottom: 1px solid rgb(217 225 236);
  }
}

@media (max-width: 767px) {
  .timeline-year-heading {
    margin-top: 1.5rem;
  }

  .timeline-year-pill {
    gap: 0.75rem;
  }

  .timeline-year-block {
    width: 3.5rem;
    height: 2.4rem;
    border-radius: 0.75rem;
  }

  .timeline-card-header {
    align-items: flex-start;
  }

  .timeline-card-badges {
    width: 100%;
    justify-content: flex-start;
  }

  .timeline-card-title {
    font-size: 1.75rem;
  }

  .timeline-card-body {
    padding: 1rem;
  }

  .timeline-organizer-popover {
    padding: 0.75rem;
  }

  .timeline-mobile-collapsible {
    position: relative;
    max-height: 240px;
    overflow: hidden;
  }

  .timeline-mobile-collapsible.is-expanded {
    max-height: none;
    overflow: visible;
  }

  .timeline-detail-card {
    padding: 1rem;
  }

  .timeline-card-actions {
    flex-direction: column;
    align-items: center;
  }

  .timeline-card-actions .btn-primary {
    width: auto;
  }

  .timeline-share-actions {
    width: auto;
    justify-content: center;
  }

  .timeline-mobile-fade {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    padding: 4rem 1rem 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 58%);
  }

  .timeline-mobile-collapse-row {
    display: none;
    justify-content: center;
    margin-top: 1rem;
  }

  .timeline-mobile-collapsible.is-expanded .timeline-mobile-fade {
    display: none;
  }

  .timeline-mobile-collapsible.is-expanded .timeline-mobile-collapse-row {
    display: flex;
  }
}
