.statistics-page {
  --stat-series-1: #2a78d6;
  --stat-series-2: #eb6834;
  --stat-series-3: #1baf7a;
  --stat-grid: var(--vk-gray-10);
  --stat-plot: 220px;
}
.statistics-page .series-1 { background: var(--stat-series-1); }
.statistics-page .series-2 { background: var(--stat-series-2); }
.statistics-page .series-3 { background: var(--stat-series-3); }
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0 0 32px;
}
.stat-tiles > div {
  border: 1px solid var(--vk-gray-20);
  border-radius: var(--vk-radius-lg);
  padding: 20px 24px;
  background: #fff;
}
.stat-tiles dt {
  color: var(--vk-gray-70);
  font-size: 14px;
  font-weight: 700;
}
.stat-tiles dd {
  margin: 8px 0 0;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.stat-card {
  margin-bottom: 32px;
}
.stat-card .vk-section-head h2 {
  font-size: clamp(22px, 3vw, 28px);
}
.stat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 20px;
  padding: 0;
  color: var(--vk-gray-70);
  font-size: 14px;
  list-style: none;
}
.stat-legend li,
.stat-tip span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stat-legend i,
.stat-tip i {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 2px;
}
.stat-chart-scroll {
  overflow-x: auto;
  padding-top: 8px;
}
.stat-chart {
  position: relative;
  min-width: 420px;
  padding-left: 36px;
}
.stat-grid {
  position: absolute;
  top: 0;
  right: 0;
  left: 36px;
  height: var(--stat-plot);
}
.stat-grid span {
  position: absolute;
  right: 0;
  left: 0;
  border-top: 1px solid var(--stat-grid);
}
.stat-grid span:first-child {
  border-top-color: var(--vk-gray-30);
}
.stat-grid i {
  position: absolute;
  top: -9px;
  left: -36px;
  width: 28px;
  color: var(--vk-gray-50);
  font-size: 12px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  line-height: 18px;
  text-align: right;
}
.stat-groups {
  position: relative;
  display: flex;
}
.stat-group {
  position: relative;
  min-width: 0;
  flex: 1;
  text-align: center;
}
.stat-group:hover {
  background: linear-gradient(rgba(36, 107, 235, 0.06), rgba(36, 107, 235, 0.06)) top / 100% var(--stat-plot) no-repeat;
}
.stat-bars {
  display: flex;
  height: var(--stat-plot);
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}
.stat-bars span {
  width: 100%;
  max-width: 20px;
  border-radius: 4px 4px 0 0;
}
.stat-group > b {
  display: block;
  padding-top: 8px;
  color: var(--vk-gray-70);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}
.stat-tip {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 50%;
  display: none;
  min-width: 168px;
  transform: translateX(-50%);
  border: 1px solid var(--vk-gray-20);
  border-radius: var(--vk-radius-md);
  padding: 10px 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(30, 40, 50, 0.14);
  color: var(--vk-gray-90);
  font-size: 13px;
  text-align: left;
  pointer-events: none;
}
.stat-group:hover .stat-tip {
  display: block;
}
.stat-group:first-child .stat-tip {
  left: 0;
  transform: none;
}
.stat-group:last-child .stat-tip {
  right: 0;
  left: auto;
  transform: none;
}
.stat-tip strong {
  display: block;
  margin-bottom: 4px;
}
.stat-tip span {
  padding: 2px 0;
  color: var(--vk-gray-70);
}
.stat-tip em {
  margin-left: auto;
  padding-left: 16px;
  color: var(--vk-gray-90);
  font-style: normal;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stat-tip-total {
  margin-top: 4px;
  border-top: 1px solid var(--vk-gray-10);
  padding-top: 6px !important;
}
.stat-empty {
  margin: 0;
  border-radius: var(--vk-radius-md);
  padding: 40px 16px;
  background: var(--vk-gray-5);
  color: var(--vk-gray-70);
  text-align: center;
}
.stat-table-toggle {
  margin-top: 24px;
}
.stat-table-toggle summary {
  width: fit-content;
  color: var(--vk-primary-60);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.stat-table-wrap {
  margin-top: 20px;
}
.stat-table {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.stat-table th,
.stat-table td {
  padding: 12px 16px;
  text-align: right;
  white-space: nowrap;
}
.stat-table th:first-child {
  text-align: left;
}
.stat-table tbody th {
  font-weight: 700;
}
.stat-pass-table td:last-child {
  width: 46%;
}
.stat-pass-table td:last-child strong {
  display: inline-block;
  min-width: 64px;
}
.stat-meter {
  display: inline-block;
  width: calc(100% - 76px);
  min-width: 60px;
  height: 10px;
  margin-right: 12px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--vk-primary-10);
  vertical-align: middle;
}
.stat-meter i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--vk-primary-50);
}
.stat-pass-total th,
.stat-pass-total td {
  background: var(--vk-gray-5);
}
.stat-notes {
  margin: 0;
  padding-left: 20px;
  color: var(--vk-gray-70);
  font-size: 14px;
}
@media (max-width: 1024px) {
  .stat-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 767px) {
  .stat-card {
    padding: 20px 16px;
  }
  .stat-tiles dd {
    font-size: 28px;
  }
  .stat-pass-table td:last-child {
    width: auto;
  }
  .stat-pass-table td:last-child strong {
    min-width: 0;
  }
  .stat-table {
    font-size: 14px;
  }
  .stat-table th,
  .stat-table td {
    padding: 10px 8px;
  }
  .stat-meter {
    display: none;
  }
}
