/* ============================================================
   Главная страница — рейтинг
   ============================================================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.up   { color: #9FE870; }
.down { color: #F0755A; }
.band--cream .up, .band--lime .up     { color: #2E7D32; }
.band--cream .down, .band--lime .down { color: #B03A22; }

.est {
  font-family: var(--font-mono);
  font-size: .625rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */

.hero {
  --fg-dim: rgba(230, 240, 250, .68);
  --rule: rgba(191, 228, 255, .20);
  --flag-on: #FF8A5C;

  position: relative;
  isolation: isolate;
  margin-top: -78px;
  padding-top: calc(78px + clamp(2.5rem, 6vw, 6rem));
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(92% 68% at 73% 0%, #0A5E90 0%, #064066 27%, #021C36 58%, #010F1F 100%);
  color: #EAF3FB;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 2%;
  right: -9%;
  width: min(66vw, 920px);
  aspect-ratio: 900 / 620;
  background: url('../images/hero-constellation.svg') center / contain no-repeat;
  opacity: .55;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 42%, #000 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 42%, #000 100%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}

.hero h1 {
  font-size: clamp(2.25rem, 4.3vw, 3.9rem);
  max-width: 20ch;
  margin-bottom: clamp(1.5rem, 3vw, 2.4rem);
}

.hero__copy {
  max-width: 56ch;
  font-size: clamp(.9375rem, 1.1vw, 1.0625rem);
  line-height: 1.7;
  color: var(--fg-dim);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: clamp(1.8rem, 3vw, 2.6rem);
}

.hero__stat {
  border-left: 1px solid var(--rule);
  padding-left: clamp(1.2rem, 2vw, 2rem);
}

.hero__stat-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  white-space: nowrap;
  color: var(--lime);
}
.hero__stat-value--sm { font-size: clamp(1.6rem, 2.4vw, 2.1rem); margin-top: 2.2rem; }

.hero__stat-label {
  margin: .85rem 0 0;
  font-family: var(--font-mono);
  font-size: .71875rem;
  line-height: 1.7;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  max-width: 26ch;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 6vw, 5rem);
}
.hero__meta p { margin: 0; color: var(--fg-dim); font-size: .71875rem; }
.hero__rule { flex: 1; height: 1px; background: rgba(191, 228, 255, .32); }

.hero__figcaption {
  margin: 1rem auto 0;
  font-family: var(--font-mono);
  font-size: .6875rem;
  line-height: 1.7;
  letter-spacing: .05em;
  color: rgba(230, 240, 250, .42);
  max-width: var(--max-width);
}

@media (min-width: 900px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); }
}

/* ------------------------------------------------------------
   Блок 2 — весовая шкала методики (сигнатурный элемент)
   ------------------------------------------------------------ */

.rig { margin-bottom: clamp(2.5rem, 4vw, 3.5rem); }

.rig__caption {
  margin: 0 0 1rem;
  font-size: .6875rem;
  letter-spacing: .14em;
  color: var(--fg-dim);
}

.rig__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.rig__row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.6fr) 4.5rem;
  grid-template-areas:
    'name bar  pct'
    'what what pct';
  align-items: center;
  gap: .5rem 1.75rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule);
}

.rig__name {
  grid-area: name;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.rig__bar {
  grid-area: bar;
  display: block;
  height: 10px;
  background: rgba(244, 243, 232, .07);
  overflow: hidden;
}

.rig__fill {
  display: block;
  width: calc(var(--w) * 1%);
  height: 100%;
  background: var(--lime);
  transform-origin: left center;
  transform: scaleX(1);
  transition: transform .95s cubic-bezier(.22, .8, .25, 1);
}
.rig.is-armed   .rig__fill { transform: scaleX(0); }
.rig.is-visible .rig__fill { transform: scaleX(1); }

.rig__row:nth-child(2) .rig__fill { transition-delay: .09s; }
.rig__row:nth-child(3) .rig__fill { transition-delay: .18s; }
.rig__row:nth-child(4) .rig__fill { transition-delay: .27s; }
.rig__row:nth-child(5) .rig__fill { transition-delay: .36s; }

.rig__pct {
  grid-area: pct;
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}

.rig__what {
  grid-area: what;
  font-family: var(--font-mono);
  font-size: .71875rem;
  line-height: 1.65;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.rig__note { max-width: 62ch; }
.rig__note p:last-child { margin-top: 1.6rem; }

@media (max-width: 767px) {
  .rig__row {
    grid-template-columns: minmax(0, 1fr) 4rem;
    grid-template-areas:
      'name pct'
      'bar  bar'
      'what what';
    gap: .75rem 1rem;
  }
  .rig__pct { align-self: start; }
}

/* ------------------------------------------------------------
   Блок 3 — сравнительная таблица
   ------------------------------------------------------------ */

.table-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--rule);
  -webkit-overflow-scrolling: touch;
}
.table-scroll:focus-visible { outline-offset: 0; }

.rank-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  text-align: left;
}

.rank-table th,
.rank-table td {
  padding: 1.05rem 1.1rem 1.05rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.rank-table thead th {
  font-family: var(--font-mono);
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--fg-dim);
  padding-top: 0;
  white-space: nowrap;
}

.rank-table tbody td {
  font-family: var(--font-mono);
  font-size: .78125rem;
  line-height: 1.6;
  letter-spacing: .02em;
  color: var(--fg-dim);
  font-variant-numeric: tabular-nums;
}

.rank-table__num {
  width: 40px;
  min-width: 40px;
  padding-right: .5rem !important;
  color: var(--fg-dim);
}
.rank-table tbody .rank-table__num { font-size: .8125rem; }

.rank-table__co { min-width: 190px; }
.rank-table tbody th {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.rank-table tbody th a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color .18s ease, border-color .18s ease;
}
.rank-table tbody th a:hover { color: var(--flag-on); border-color: currentColor; }

.rank-table tbody tr { transition: background-color .18s ease; }
.rank-table tbody tr:hover { background: rgba(14, 18, 22, .045); }

.table-note {
  margin-top: 1.2rem;
  font-size: .6875rem;
  letter-spacing: .06em;
  color: var(--fg-dim);
  text-transform: none;
}

/* ------------------------------------------------------------
   Блок 4 — карточки компаний
   ------------------------------------------------------------ */

.co-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: clamp(1rem, 1.8vw, 1.6rem);
}

.co .ncard__in {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.co__rank {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--lime);
}

.co__name {
  margin: -.5rem 0 0;
  font-size: clamp(1.4rem, 2.1vw, 1.75rem);
}

.co__plaque {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 180;
  object-fit: cover;
}

.co__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 1.05rem 0;
  border-block: 1px solid var(--rule);
}
.co__meta dt {
  font-family: var(--font-mono);
  font-size: .5625rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: .45rem;
}
.co__meta dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .78125rem;
  line-height: 1.45;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.co__meta .est { display: block; margin-top: .2rem; }

.co__text {
  font-size: .9375rem;
  line-height: 1.68;
  color: var(--fg-dim);
  flex: 1;
}
.co__text p + p { margin-top: .9em; }

.co .link-arrow { align-self: flex-start; }

/* ------------------------------------------------------------
   Блок 5 — регуляторная база
   ------------------------------------------------------------ */

.reg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1rem, 1.6vw, 1.4rem);
}

.reg__triple {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1.1rem;
  font-family: var(--font-mono);
  font-size: .5625rem;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.reg__triple span {
  padding: .3rem .5rem;
  border: 1px solid var(--rule);
  color: var(--fg);
}
.reg__triple em {
  font-style: normal;
  color: var(--flag-on);
  letter-spacing: .06em;
}
.reg__triple em::before { content: '→ '; }
.reg__triple em::after  { content: ' →'; }

.card-prose {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.68;
  color: var(--fg-dim);
}
.card-prose a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--flag-on);
  transition: color .18s ease;
}
.card-prose a:hover { color: var(--flag-on); }

.reg-more { margin-top: clamp(2rem, 3.5vw, 3rem); }

/* ------------------------------------------------------------
   Блок 6 — порядок проверки
   ------------------------------------------------------------ */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.steps__item {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule);
}

.steps__num {
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--lime);
  padding-top: .28rem;
}

.steps__item h3 { margin-bottom: .7rem; }
.steps__item p {
  margin: 0;
  max-width: 72ch;
  font-size: .9375rem;
  line-height: 1.7;
  color: var(--fg-dim);
}

.steps__more { margin-top: clamp(2rem, 3.5vw, 3rem); }

@media (max-width: 599px) {
  .steps__item { grid-template-columns: minmax(0, 1fr); gap: .55rem; }
  .steps__num { padding-top: 0; }
}

/* ------------------------------------------------------------
   Блок 7 — FAQ
   ------------------------------------------------------------ */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 3.5rem);
}
.faq-layout .band-head { margin-bottom: 0; }

@media (min-width: 900px) {
  .faq-layout { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); align-items: start; }
}

.faq-layout .band-head h2 { font-size: clamp(1.75rem, 2.6vw, 2.4rem); }

.faq { border-top: 1px solid var(--rule); }

.faq__item { border-bottom: 1px solid var(--rule); }

.faq__item summary {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.45rem 0;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary h3 {
  margin: 0;
  flex: 1;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  transition: color .18s ease;
}
.faq__item summary:hover h3 { color: var(--flag-on); }

.faq__item summary::after {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: .5rem;
  opacity: .75;
  background:
    linear-gradient(var(--fg), var(--fg)) center / 100% 1px no-repeat,
    linear-gradient(var(--fg), var(--fg)) center / 1px 100% no-repeat;
  transition: transform .22s cubic-bezier(.2, .9, .3, 1.2);
}
.faq__item[open] summary::after { transform: rotate(90deg); }
.faq__item[open] summary::after {
  background: linear-gradient(var(--flag-on), var(--flag-on)) center / 100% 1px no-repeat;
}

.faq__answer {
  padding: 0 2.4rem 1.6rem 0;
  max-width: 72ch;
  font-size: .9375rem;
  line-height: 1.72;
  color: var(--fg-dim);
}

/* ------------------------------------------------------------
   Блок 8 — CTA
   ------------------------------------------------------------ */

.cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 3vw, 3rem);
}
.cta__inner > div { max-width: 62ch; }
.cta h2 { margin-bottom: 1.2rem; }

/* ------------------------------------------------------------
   Мобильные уточнения
   ------------------------------------------------------------ */

@media (max-width: 639px) {
  .hero__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--rule);
  }
  .hero__rule { display: none; }

  .hero__stat { border-left: 0; border-top: 1px solid var(--rule); padding: 1.6rem 0 0; }

  .co__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
  .co__meta > div:last-child { grid-column: span 2; }

  .cta__inner { align-items: flex-start; }
}
