/* Статистика пусков */

/* Плашка «всего запущено» */
.stats-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 16.25rem;            /* 260 из макета */
  margin: 0 3.75rem;
  padding: 2.5rem 1.25rem;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    url('../../../img/stat-hero.jpg') no-repeat center / 100% 100%,
    linear-gradient(79.5deg, #050a1b 0%, #0e263e 100%);
  color: #fdfffe;
}
.stats-hero__count {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: .3125rem;                   /* 5 */
  width: 14.5rem;                  /* 232 */
  height: 7.875rem;                /* 126 — на этой высоте колонка встаёт по макету */
  margin-left: 2.921875rem;        /* 46.75: с полем плашки даёт макетные 66,75 */
}
.stats-hero__num {
  font-size: 6.25rem;              /* 100 Bold */
  line-height: 5rem;
  font-weight: 700;
  color: var(--orange);
}
.stats-hero__label {
  font-size: 1.25rem;              /* 20 Semibold caps */
  line-height: 1.875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #717789;
}
.stats-hero__text {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 49.3125rem;           /* 789 — ширина текста в макете */
  margin-left: 7.875rem;           /* 126 от колонки с числом до текста */
}
.stats-hero__text::before {
  content: '';
  position: absolute;
  left: -3.734375rem;              /* 59,75 = 57,75 до текста + сама черта */
  top: 50%;
  width: .125rem;                  /* 2 */
  height: 8.5rem;                  /* 136 */
  transform: translateY(-50%);
  background: var(--orange);
}
.stats-hero__kind {
  height: 2.625rem;                /* 42 — коробка подписи в макете */
  font-size: 1.25rem;
  line-height: 1.875rem;           /* 20/30 */
  font-weight: 600;
  text-transform: uppercase;
  color: #717789;
}
.stats-hero__lead { min-height: 8.25rem; font-size: 1.625rem; line-height: 1.875rem; }
/* 132; 26/30 */
.stats-hero__rocket {
  position: absolute;
  right: 5.75rem;                  /* 92 от края плашки — как в макете */
  top: 50%;
  width: 11rem;                    /* 176 */
  height: 14.5rem;                 /* 232 */
  object-fit: fill;
  transform: translateY(-50%);
  filter: drop-shadow(0 0 8rem rgba(231, 124, 28, .35));
  pointer-events: none;
}
.stats-hero__rocket--sat {
  width: 17.3125rem;               /* 277 */
  height: 13rem;                   /* 208 */
  object-fit: contain;
}
.stats-hero__rocket[hidden] { display: none; }

/* Разделы */
.stats-tabs__toggle { display: none; }

/* Таблица */
.stats-panel { display: flex; flex-direction: column; gap: 1.875rem; padding: 0 3.75rem; }
.stats-panel[hidden] { display: none; }
.stats-table-area { position: relative; }
.stats-table-scroll { overflow-x: auto; scrollbar-width: none; }
.stats-table-scroll::-webkit-scrollbar { display: none; }
.stats-table {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  width: 100%;
  min-width: 65.125rem;            /* ниже этой ширины колонки уже нечитаемы — включается прокрутка */
}
.stats-table colgroup { display: none; }
.stats-table thead,
.stats-table tbody,
.stats-table tfoot,
.stats-table tr { display: contents; }
.stats-table th,
.stats-table td {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.stats-table thead th {
  min-height: 3.0625rem;           /* 49 */
  padding: .3125rem 1.25rem;
  border: 3px solid #edf1f7;       /* просветы между ячейками шапки — из макета */
  background: #dce6f0;
  font-size: 1rem;                 /* 16 Semibold */
  line-height: 1.125rem;
  font-weight: 600;
  color: #0a1226;
}
.stats-table thead tr:first-child th:not(.stats-table__name) { grid-column: span 2; }
.stats-table thead .stats-table__name {
  grid-row: span 2;
  min-height: 6.125rem;            /* 98 — вся высота шапки */
  padding-left: .625rem;
  padding-right: .625rem;
  border-radius: var(--radius) 0 0 var(--radius);
}
.stats-table thead tr:first-child th:last-child { border-radius: 0 var(--radius) 0 0; }
.stats-table thead .stats-table__subhead th {
  background: #fdfffe;
  font-size: 1.25rem;              /* 20 Semibold */
  line-height: 1.5rem;
}
.stats-table__subhead th:last-child { border-radius: 0 0 var(--radius) 0; }
.stats-table tbody td,
.stats-table tbody th {
  min-height: 4.375rem;            /* 70 */
  margin-top: .9375rem;            /* 15 между плашками */
  padding: .625rem 1.25rem;
  background: #fdfffe;
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 700;
  color: #16243b;
}
.stats-table tbody .stats-table__name {
  padding-left: .625rem;
  padding-right: .625rem;
  border-left: 6px solid var(--orange);
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 1.25rem;
  line-height: 1.875rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}
.stats-table tbody td:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.stats-table tbody .stats-table__fail,
.stats-table tfoot .stats-table__fail { color: var(--orange); }
.stats-table tbody tr[hidden] { display: none; }
/* Итоговая строка — на плашке шапки */
.stats-table tfoot th,
.stats-table tfoot td {
  min-height: 3.0625rem;           /* 49 */
  margin-top: .9375rem;
  padding: .3125rem 1.25rem;
  border-left: 2px solid #edf1f7;
  background: #dce6f0;
  font-size: 1rem;
  line-height: 1.125rem;
  font-weight: 700;
  color: #16243b;
}
.stats-table tfoot .stats-table__name { border-left: 0; }
.stats-table tfoot .stats-table__name {
  padding-left: .625rem;
  padding-right: .625rem;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 1.25rem;
  line-height: 1.875rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}
.stats-table tfoot td { border-radius: var(--radius) 0 0 0; }
.stats-table tfoot td:last-child { border-radius: var(--radius) var(--radius) var(--radius) 0; }
.stats-panel .stats-panel__more { align-self: center; width: 18.0625rem; }
@media (max-width: 1279px) {
  /* Справа оставляем место под рендер ракеты, иначе текст уходит под него */
  .stats-hero { gap: 1.5rem; margin: 0 1rem; padding: 1.5rem 10rem 1.5rem 1rem; }
  .stats-hero__count { width: auto; height: auto; margin-left: 0; }
  .stats-hero__text { margin-left: 1.5rem; padding-left: 1.5rem; }
  .stats-hero__text::before { left: 0; }
  .stats-hero__kind { height: auto; }
  .stats-hero__lead { min-height: 0; }
  .stats-hero__num { font-size: 4rem; line-height: 3.5rem; }
  .stats-hero__text { padding-left: 1.5rem; }
  .stats-hero__lead { font-size: 1.125rem; line-height: 1.5rem; }
  .stats-hero__rocket { right: 1rem; width: 7rem; height: 9.25rem; }
  .stats-hero__rocket--sat { width: 9rem; height: 6.75rem; }
  /* 144 × 108 — в поле 160 справа */
  .stats-panel { padding: 0 1rem; }
  .stats-table { min-width: 1042px; }
  .stats-table thead th,
  .stats-table tfoot th,
  .stats-table tfoot td { padding: 1rem; font-size: .875rem; }
  .stats-table thead .stats-table__subhead th { padding: .625rem 1rem; font-size: 1rem; }
  .stats-table tbody td,
  .stats-table tbody th { padding: .75rem 1rem; font-size: 1rem; }
  .stats-table tbody .stats-table__name,
  .stats-table tfoot .stats-table__name { font-size: 1rem; line-height: 1.25rem; }
}
@media (max-width: 767px) {
  .stats-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: 0;
    margin: 0 20px;
    padding: 30px 20px 40px;
    background:
      url('../../../img/stat-hero-mobile.jpg') no-repeat 45.17% 100% / 113.26% 101.13%,
      linear-gradient(79.5deg, #050a1b 0%, #0e263e 100%);
  }
  .stats-hero__count { gap: 5px; width: 137px; padding-left: 0; }
  .stats-hero__num { font-size: 60px; line-height: 60px; }
  .stats-hero__label {
    width: 140px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--orange);
    font-size: 14px;
    line-height: 20px;
    color: #7c8992;
  }
  .stats-hero__text { max-width: none; margin-left: 0; padding-left: 0; }
  .stats-hero__text::before { content: none; }
  .stats-hero__kind { font-size: 14px; line-height: 30px; color: #7c8992; }
  .stats-hero__lead { font-size: 14px; line-height: 20px; }
  /* Мобильный макет 856:20013: рендер 85 × 104 */
  .stats-hero__rocket { top: 30px; right: 20px; width: 85px; height: 104px; transform: none; }
  .stats-hero__rocket--sat { width: 120px; height: 90px; }
  /* правее числа, не заходит на него */
  .stats-tabs { padding: 0 20px; }
  .stats-tabs__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 0;
    border-radius: var(--radius);
    background: var(--orange);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
  }
  .stats-tabs__arrow {
    flex: none;
    width: 14px;
    height: 7px;
    background: url('../../../img/icon-chevron-down.svg') no-repeat center / contain;
    filter: brightness(0) invert(1);           /* шеврон белым по оранжевой плашке */
    transition: transform .2s ease;
  }
  .stats-tabs.is-open .stats-tabs__arrow { transform: rotate(180deg); }
  .stats-tabs .stats-tabs__list { flex-direction: column; gap: 10px; padding: 10px 0 0; }
  .stats-tabs:not(.is-open) .stats-tabs__list { display: none; }
  .stats-panel { gap: 20px; padding: 0 20px; }
  .stats-table { min-width: 1042px; }
  .stats-table thead th,
  .stats-table tfoot th,
  .stats-table tfoot td {
    min-height: 27px;
    padding: 4px 8px;
    border-width: 1.7px;
    border-radius: 5.5px;
    font-size: 9px;
    line-height: 11px;
  }
  .stats-table thead .stats-table__name { min-height: 54px; border-radius: 5.5px 0 0 5.5px; }
  .stats-table thead tr:first-child th:last-child { border-radius: 0 5.5px 0 0; }
  .stats-table thead .stats-table__subhead th { font-size: 11px; line-height: 13px; }
  .stats-table thead .stats-table__subhead th:last-child { border-radius: 0 0 5.5px 0; }
  .stats-table tbody td,
  .stats-table tbody th {
    min-height: 39px;
    margin-top: 5px;
    padding: 4px 8px;
    font-size: 11px;
    line-height: 15px;
  }
  .stats-table tbody .stats-table__name { border-radius: 5.5px 0 0 5.5px; }
  .stats-table tbody td:last-child { border-radius: 0 5.5px 5.5px 0; }
  .stats-table tfoot th,
  .stats-table tfoot td { margin-top: 5px; border-left-width: 1.1px; }
  .stats-table tfoot .stats-table__name { border-radius: 5.5px 0 0 5.5px; }
  .stats-table tfoot td { border-radius: 5.5px 0 0 0; }
  .stats-table tfoot td:last-child { border-radius: 5.5px 5.5px 5.5px 0; }
  .stats-table tbody .stats-table__name,
  .stats-table tfoot .stats-table__name { font-size: 11px; line-height: 15px; }
  .stats-table tbody .stats-table__name { border-left-width: 4px; }
  .stats-panel .stats-panel__more { width: 100%; }
}
