.sidebar.open {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar.open > * {
  margin-top: 0 !important;
}

.sidebar-stories--related,
.sidebar-stories--popular:not(.sidebar-stories--popular-current) {
  order: 1;
}

.sidebar-markets {
  order: 2;
}

.sidebar-telegram {
  order: 3;
}

.sidebar-stories--popular-current {
  order: 4;
}

.sidebar-events {
  order: 5;
}

.sidebar-form {
  order: 6;
}

.sidebar-stories {
  margin-top: 0;
  padding: 2rem;
  border: 1px solid #e7e9e4;
  border-radius: 2rem;
  background: #fff;
}

.sidebar-widget-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sidebar-widget-heading h2 {
  margin: 0;
  color: #1d1d1d;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.sidebar-widget-heading__live,
.sidebar-widget-heading__market {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: #eef6e6;
  color: #5d8b2c;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

.sidebar-widget-heading__live i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #87bd45;
  box-shadow: 0 0 0 0.35rem rgba(135, 189, 69, 0.14);
}

.sidebar-stories__list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.sidebar-stories__item + .sidebar-stories__item {
  border-top: 1px solid #eceee9;
}

.sidebar-stories__link {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  align-items: center;
  gap: 1.1rem;
  padding: 1.25rem 0;
  color: inherit;
  text-decoration: none;
}

.sidebar-stories__item:first-child .sidebar-stories__link {
  padding-top: 0;
}

.sidebar-stories__item:last-child .sidebar-stories__link {
  padding-bottom: 0;
}

.sidebar-stories__rank {
  color: #a4cb76;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.08em;
}

.sidebar-stories__content {
  min-width: 0;
}

.sidebar-stories__title {
  display: -webkit-box;
  overflow: hidden;
  color: #252923;
  font-size: 1.35rem;
  font-weight: 650;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 180ms ease;
}

.sidebar-stories__link:hover .sidebar-stories__title,
.sidebar-stories__link:focus-visible .sidebar-stories__title {
  color: #659b2d;
}

.sidebar-stories__link:focus-visible {
  border-radius: 0.8rem;
  outline: 2px solid rgba(135, 189, 69, 0.48);
  outline-offset: 0.4rem;
}

.sidebar-stories__meta {
  margin-top: 0.65rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #858b80;
  font-size: 1.1rem;
  line-height: 1.2;
}

.sidebar-stories__views {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.sidebar-stories__views svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: currentColor;
}

.sidebar-stories--related .sidebar-stories__link {
  grid-template-columns: 7.2rem minmax(0, 1fr);
}

.sidebar-stories__thumb {
  width: 7.2rem;
  height: 6rem;
  overflow: hidden;
  border-radius: 1.1rem;
  background: linear-gradient(145deg, #eef2e9, #dfe8d5);
}

.sidebar-stories__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.sidebar-stories__link:hover .sidebar-stories__thumb img,
.sidebar-stories__link:focus-visible .sidebar-stories__thumb img {
  transform: scale(1.04);
}

.sidebar .sidebar-markets.sidebar__block {
  padding: 2rem;
  border: 1px solid #e7e9e4;
  border-radius: 2rem;
  background: #f7f8f5;
}

.sidebar .sidebar-markets .sidebar-actives__list {
  margin-top: 1.4rem;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e6e9e2;
  border-radius: 1.6rem;
  background: #fff;
}

.sidebar .sidebar-markets .sidebar-actives__list-item {
  min-height: 6.2rem;
  padding: 1rem 1.2rem;
  text-decoration: none;
  transition: background-color 180ms ease;
}

.sidebar .sidebar-markets .sidebar-actives__list-item:hover,
.sidebar .sidebar-markets .sidebar-actives__list-item:focus-visible {
  background: #f4f9ee;
  outline: none;
}

.sidebar .sidebar-markets .sidebar-actives__list-item:not(:last-of-type) {
  border-bottom-color: #e7eae4;
}

.sidebar .sidebar-markets .sidebar-actives__icon,
.sidebar .sidebar-markets .sidebar-actives__icons {
  flex: 0 0 3.8rem;
}

.sidebar .sidebar-markets .sidebar-actives__icon {
  border-color: #d5e7c1;
  background: #f7fbf3;
}

.sidebar .sidebar-markets .sidebar-actives__icon img {
  width: 2.2rem;
  height: 2.2rem;
  object-fit: contain;
}

.sidebar .sidebar-markets .sidebar-actives__icons-text_2 {
  background: #fff;
}

.sidebar-actives__asset {
  min-width: 0;
  margin-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-actives__asset strong {
  overflow: hidden;
  color: #2b2f28;
  font-size: 1.35rem;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-actives__asset small {
  color: #92988d;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
}

.sidebar .sidebar-markets .sidebar-actives__values {
  flex-shrink: 0;
  gap: 0.35rem;
}

.sidebar .sidebar-markets .sidebar-actives__price {
  color: #262b23;
  font-size: 1.3rem;
  font-weight: 700;
}

.sidebar .sidebar-markets .sidebar-actives__percent {
  gap: 0.25rem;
  color: #5d9a27;
  font-size: 1.05rem;
  font-weight: 700;
}

.sidebar .sidebar-markets .sidebar-actives__percent svg {
  width: 1.35rem;
  height: 1.35rem;
}

.sidebar .sidebar-markets .sidebar-actives__percent span {
  margin-left: 0;
}

.sidebar .sidebar-markets .sidebar-actives__percent.red {
  color: #e66551;
}

.sidebar .sidebar-markets .sidebar-actives__percent.red svg {
  transform: rotate(90deg);
}

.sidebar .sidebar-markets .sidebar-actives__percent.red svg path {
  stroke: currentColor;
}

@media only screen and (min-width: 1100px) {
  .news-home__feed-layout .sidebar,
  .news-category__layout .sidebar,
  .news-article__layout > .sidebar,
  body .sidebar {
    top: 10rem;
    bottom: auto;
    height: auto;
    display: flex !important;
    flex-direction: column;
    gap: 2rem;
    overflow: visible;
  }

  .sidebar > * {
    margin-top: 0 !important;
  }

  body .news-article__layout > aside.sidebar {
    display: flex !important;
  }

}

@media only screen and (max-width: 1279px) {
  .sidebar-stories,
  .sidebar .sidebar-markets.sidebar__block,
  .sidebar .sidebar-telegram.sidebar__block,
  .sidebar .sidebar-events.sidebar__block,
  .sidebar .sidebar-form.sidebar__block {
    width: min(100%, 52rem);
    margin-right: auto;
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-stories__title,
  .sidebar-stories__thumb img,
  .sidebar .sidebar-markets .sidebar-actives__list-item {
    transition: none;
  }
}
