.rg-timeline-block {
  --timeline-pink: #d91b7f;
  --timeline-cyan: #04bdd6;
  --timeline-orange: #ff7a14;
  --timeline-lime: #8bd114;
  background: transparent;
  color: #0f1830;
}

.rg-timeline {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}

.rg-timeline__sticky-decade {
  position: sticky;
  top: 96px;
  z-index: 20;
  width: fit-content;
  margin: 0 auto 40px;
  padding: 14px 24px;
  border: 2px solid #fff;
  box-shadow: 5px 5px 0 #fff;
  background: #111;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.rg-timeline__sticky-decade.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.rg-timeline__sticky-decade[data-color="pink"] {
  background: #111;
  color: var(--timeline-pink);
}

.rg-timeline__sticky-decade[data-color="cyan"] {
  background: #111;
  color: var(--timeline-cyan);
}

.rg-timeline__sticky-decade[data-color="orange"] {
  background: #111;
  color: var(--timeline-orange);
}

.rg-timeline__sticky-decade[data-color="lime"] {
  background: #111;
  color: var(--timeline-lime);
}

.rg-timeline__line {
  position: absolute;
  top: 140px;
  bottom: 96px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: #e2d9cc;
}

.rg-timeline__group {
  position: relative;
  padding-bottom: 34px;
}

.rg-timeline__decade {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 0 auto 26px;
  padding: 10px 16px;
  border: 2px solid #111;
  box-shadow: 4px 4px 0 #111;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rg-timeline__decade--pink {
  background: var(--timeline-pink);
}

.rg-timeline__decade--cyan {
  background: var(--timeline-cyan);
  color: #072338;
}

.rg-timeline__decade--orange {
  background: var(--timeline-orange);
}

.rg-timeline__decade--lime {
  background: var(--timeline-lime);
  color: #072338;
}

.rg-timeline__events {
  display: grid;
  gap: 18px;
}

.rg-timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2px minmax(0, 1fr);
  align-items: center;
}

.rg-timeline-card__marker {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--timeline-pink);
  box-shadow: 0 0 0 2px #fff;
}

.rg-timeline-card__marker--cyan {
  background: var(--timeline-cyan);
}

.rg-timeline-card__marker--orange {
  background: var(--timeline-orange);
}

.rg-timeline-card__marker--lime {
  background: var(--timeline-lime);
}

.rg-timeline-card__body {
  width: min(100%, 360px);
  padding: 18px 18px 16px;
  border: 2px solid #111;
  box-shadow: 4px 4px 0 #111;
  background: #fff;
}

.rg-timeline-card.is-left .rg-timeline-card__body {
  grid-column: 1;
  justify-self: end;
  margin-right: 34px;
}

.rg-timeline-card.is-right .rg-timeline-card__body {
  grid-column: 3;
  justify-self: start;
  margin-left: 34px;
}

.rg-timeline-card__year {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rg-timeline-card__year--pink {
  background: var(--timeline-pink);
}

.rg-timeline-card__year--cyan {
  background: var(--timeline-cyan);
  color: #072338;
}

.rg-timeline-card__year--orange {
  background: var(--timeline-orange);
}

.rg-timeline-card__year--lime {
  background: var(--timeline-lime);
  color: #072338;
}

.rg-timeline-card__title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 900;
  text-transform: uppercase;
}

.rg-timeline-card__summary {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.rg-timeline-card__toggle {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d91b7f;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.rg-timeline-card__toggle:hover,
.rg-timeline-card__toggle:focus-visible {
  text-decoration: underline;
}

.rg-timeline-card__details {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #ddd4c8;
}

.rg-timeline-card__details ul {
  margin: 0;
  padding-left: 18px;
}

.rg-timeline-card__details li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.rg-timeline__feature {
  position: relative;
  padding-top: 8px;
}

.rg-timeline__feature-card {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 20px 22px;
  border: 2px solid #111;
  box-shadow: 4px 4px 0 #111;
  background: #d61c7a;
  color: #fff;
}

.rg-timeline__feature-year {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 8px;
  background: #8bd114;
  color: #072338;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rg-timeline__feature-card h3 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 900;
  text-transform: uppercase;
}

.rg-timeline__feature-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

.rg-timeline-editor {
  border: 2px solid #111;
  background: #f6f1e8;
  padding: 20px;
}

.rg-timeline-editor__kicker {
  margin: 0 0 10px;
  color: #d91b7f;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rg-timeline-editor__title {
  margin: 0 0 12px;
  font-size: 30px;
  font-weight: 900;
}

.rg-timeline-editor__help {
  margin-bottom: 18px;
  color: #3f4c5a;
}

.rg-timeline-editor__entry {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #d5cdc2;
  background: #fff;
}

.rg-timeline-editor__entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  .rg-timeline {
    padding: 56px 20px 72px;
  }

  .rg-timeline__sticky-decade {
    top: 84px;
    margin-bottom: 24px;
    padding: 12px 18px;
    font-size: 16px;
  }

  .rg-timeline__line {
    left: 24px;
    top: 128px;
  }

  .rg-timeline__decade {
    margin: 0 0 18px 52px;
  }

  .rg-timeline-card {
    display: block;
    padding-left: 52px;
  }

  .rg-timeline-card__marker {
    top: 30px;
    left: 24px;
    transform: translate(-50%, 0);
  }

  .rg-timeline-card__body,
  .rg-timeline-card.is-left .rg-timeline-card__body,
  .rg-timeline-card.is-right .rg-timeline-card__body {
    width: 100%;
    margin: 0;
  }

  .rg-timeline__feature-card {
    margin-left: 52px;
    width: auto;
  }
}
