.editorial-statistics {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  background:
    radial-gradient(circle at 92% 10%, rgba(121, 99, 167, .12), transparent 28%),
    radial-gradient(circle at 4% 90%, rgba(221, 178, 87, .09), transparent 24%),
    linear-gradient(180deg, #fbf9fd 0%, #f6f2fa 100%);
}

.editorial-statistics::before {
  position: absolute;
  width: 360px;
  height: 360px;
  top: -235px;
  right: 8%;
  border: 1px solid rgba(121, 99, 167, .1);
  border-radius: 50%;
  box-shadow: 0 0 0 36px rgba(121, 99, 167, .025), 0 0 0 76px rgba(121, 99, 167, .018);
  content: '';
}

.editorial-statistics .container {
  position: relative;
  z-index: 1;
}

.statistics-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.statistics-heading > div {
  max-width: 680px;
}

.statistics-heading .section-overline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7b5d9d;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.statistics-heading .section-overline::before {
  width: 22px;
  height: 2px;
  border-radius: 99px;
  background: #d7b45f;
  content: '';
}

.statistics-heading h2 {
  margin: 9px 0 0;
  color: #30223e;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.65rem, 2.7vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.15;
}

.statistics-heading p {
  max-width: 620px;
  margin: 9px 0 0;
  color: #7f7489;
  font-size: .78rem;
  line-height: 1.7;
}

.statistics-example-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid #ded1e9;
  border-radius: 999px;
  color: #6f4d92;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 7px 18px rgba(58, 35, 77, .05);
  font-size: .65rem;
  font-weight: 800;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.statistics-example-badge i {
  color: #ba8a2d;
  font-size: .82rem;
}

.statistics-panel {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(101, 72, 126, .13);
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 22px 55px rgba(56, 34, 75, .09);
}

.statistics-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #553775 0%, #9a76bb 55%, #e1bc62 100%);
  content: '';
}

.statistics-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 13px;
  padding: 24px 26px;
  border-bottom: 1px solid #eee8f2;
  background: linear-gradient(135deg, #fbf9fd 0%, #f7f2fa 100%);
}

.statistics-filter label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  color: #5c4a69;
  font-size: .66rem;
  font-weight: 800;
}

.statistics-filter label::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a583bf;
  content: '';
}

.statistics-filter select {
  width: 100%;
  min-height: 44px;
  padding: 8px 36px 8px 13px;
  border: 1px solid #ddd3e5;
  border-radius: 10px;
  color: #453153;
  outline: 0;
  background-color: #fff;
  box-shadow: 0 3px 10px rgba(57, 37, 75, .025);
  font: inherit;
  font-size: .75rem;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.statistics-filter select:hover {
  border-color: #c8b5d8;
}

.statistics-filter select:focus {
  border-color: #8868a8;
  box-shadow: 0 0 0 3px rgba(121, 99, 167, .11);
  transform: translateY(-1px);
}

.statistics-reset {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 15px;
  border: 1px solid #d8c9e4;
  border-radius: 10px;
  color: #6f4d92;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: .7rem;
  font-weight: 800;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.statistics-reset:hover {
  border-color: #674586;
  color: #fff;
  background: #674586;
  box-shadow: 0 8px 18px rgba(82, 52, 108, .18);
  transform: translateY(-1px);
}

.statistics-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  padding: 22px 26px 15px;
}

.statistics-result-head strong {
  color: #665a70;
  font-size: .7rem;
  font-weight: 700;
}

.statistics-result-head strong span {
  display: inline-block;
  margin-left: 4px;
  color: #4f3370;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.025em;
}

.statistics-result-head > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #918498;
  font-size: .64rem;
}

.statistics-result-head > span::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d2ad50;
  box-shadow: 0 0 0 4px rgba(210, 173, 80, .12);
  content: '';
}

.statistics-type-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 26px;
}

.statistics-type-card {
  --stat-accent: #7b5ca3;
  --stat-soft: #f0e8f7;
  position: relative;
  overflow: hidden;
  padding: 15px 16px 14px;
  border: 1px solid #ebe4ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 17px rgba(61, 39, 78, .045);
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.statistics-type-card:nth-child(2) {
  --stat-accent: #4f82a5;
  --stat-soft: #e9f2f7;
}

.statistics-type-card:nth-child(3) {
  --stat-accent: #b7852e;
  --stat-soft: #fbf2df;
}

.statistics-type-card:nth-child(4) {
  --stat-accent: #5d8c70;
  --stat-soft: #eaf4ed;
}

.statistics-type-card::after {
  position: absolute;
  width: 72px;
  height: 72px;
  right: -34px;
  bottom: -38px;
  border-radius: 50%;
  background: var(--stat-soft);
  content: '';
  transition: transform .25s ease;
}

.statistics-type-card:hover,
.statistics-type-card.is-selected {
  border-color: var(--stat-accent);
  box-shadow: 0 12px 24px rgba(61, 39, 78, .09);
  transform: translateY(-3px);
}

.statistics-type-card:hover::after,
.statistics-type-card.is-selected::after {
  transform: scale(1.18);
}

.statistics-type-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.statistics-type-card i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--stat-accent);
  background: var(--stat-soft);
  font-size: 1rem;
}

.statistics-type-card small {
  color: #75677e;
  font-size: .64rem;
  font-weight: 800;
}

.statistics-type-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 12px;
  color: #30223e;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -.025em;
}

.statistics-type-card em {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 2px;
  color: #998fa1;
  font-size: .61rem;
  font-style: normal;
}

.statistics-chart {
  margin: 18px 26px 26px;
  padding: 19px 20px 20px;
  border: 1px solid #eee8f2;
  border-radius: 15px;
  background: linear-gradient(135deg, #faf8fc 0%, #f6f1f9 100%);
}

.statistics-chart-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}

.statistics-chart-title strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4e3862;
  font-size: .74rem;
}

.statistics-chart-title strong::before {
  width: 7px;
  height: 18px;
  border-radius: 99px;
  background: linear-gradient(180deg, #77569b, #c3a2da);
  content: '';
}

.statistics-chart-title span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #887a92;
  background: #fff;
  font-size: .61rem;
}

.statistics-bars {
  display: grid;
  gap: 14px;
}

.statistics-bar-row {
  --bar-start: #67468c;
  --bar-end: #a783c4;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 12px;
}

.statistics-bar-row:nth-child(2) {
  --bar-start: #477797;
  --bar-end: #79abc7;
}

.statistics-bar-row:nth-child(3) {
  --bar-start: #ad7a24;
  --bar-end: #d9b65d;
}

.statistics-bar-row:nth-child(4) {
  --bar-start: #4e8063;
  --bar-end: #84b596;
}

.statistics-bar-label,
.statistics-bar-value {
  color: #62546c;
  font-size: .66rem;
  font-weight: 800;
}

.statistics-bar-value {
  color: var(--bar-start);
  text-align: right;
}

.statistics-bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8e1ed;
  box-shadow: inset 0 1px 2px rgba(54, 36, 70, .06);
}

.statistics-bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bar-start), var(--bar-end));
  transition: width .45s cubic-bezier(.22, 1, .36, 1);
}

.statistics-empty {
  padding: 22px 12px;
  border: 1px dashed #d9cde4;
  border-radius: 10px;
  color: #8c8196;
  background: #fff;
  font-size: .72rem;
  text-align: center;
}

.statistics-empty[hidden] {
  display: none;
}

@media (max-width: 991px) {
  .statistics-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .statistics-reset {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .editorial-statistics {
    padding: 54px 0;
  }

  .statistics-heading {
    display: block;
    margin-bottom: 18px;
  }

  .statistics-example-badge {
    margin-top: 14px;
  }

  .statistics-panel {
    border-radius: 18px;
  }

  .statistics-filters {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .statistics-result-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 19px 20px 14px;
  }

  .statistics-result-head strong span {
    display: block;
    margin: 3px 0 0;
  }

  .statistics-type-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 0 20px;
  }

  .statistics-type-card {
    padding: 13px;
  }

  .statistics-chart {
    margin: 16px 20px 20px;
    padding: 16px;
  }

  .statistics-chart-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .statistics-bar-row {
    grid-template-columns: 48px minmax(0, 1fr) 69px;
    gap: 8px;
  }

  .statistics-bar-label,
  .statistics-bar-value {
    font-size: .6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .statistics-filter select,
  .statistics-reset,
  .statistics-type-card,
  .statistics-type-card::after,
  .statistics-bar-fill {
    transition: none;
  }
}
