/* ============================================================
   «ФОРМАТ» — левая панель: тёмный «архивный» индекс с навигацией,
   каталогом, быстрым заказом и контактами. На планшете/телефоне — шторка.
   ============================================================ */

.fmt-rail {
  position: sticky;
  top: 118px;
  align-self: start;
  margin: 34px 0 40px;
  width: 100%;
  max-height: calc(100vh - 146px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 24px 20px 22px;
  border: 0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(33, 81, 224, .28), transparent 46%),
    linear-gradient(160deg, #101a2e 0%, #0b1220 58%, #0a101c 100%);
  color: #d7deea;
  box-shadow: 0 30px 70px -46px rgba(11, 18, 32, .8);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .22) transparent;
}
.fmt-rail::-webkit-scrollbar { width: 6px; }
.fmt-rail::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 6px; }
.fmt-rail__inner { display: flex; flex-direction: column; }

/* шапка панели */
.fmt-rail__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 18px;
  margin: 0 0 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.fmt-rail__badge {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  font-family: var(--fmt-display);
  font-size: 16px;
  flex: 0 0 auto;
}
.fmt-rail__head-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fmt-rail__kicker { font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--fmt-accent); }
.fmt-rail__title { font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: #fff; }

/* основная навигация */
.fmt-nav { display: flex; flex-direction: column; padding: 10px 0 4px; }
.fmt-nav__link {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 8px;
  padding: 7px 6px 7px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  text-decoration: none;
  color: rgba(230, 236, 245, .78);
  transition: color .16s ease, padding-left .16s ease, background .16s ease;
}
.fmt-nav__link:last-child { border-bottom: 0; }
.fmt-nav__num { font-size: 9.5px; font-weight: 600; letter-spacing: .08em; color: rgba(255, 255, 255, .32); }
.fmt-nav__label { font-size: 14px; font-weight: 500; line-height: 1.35; }
.fmt-nav__arrow { font-size: 13px; color: var(--fmt-accent); opacity: 0; transform: translateX(-4px); transition: opacity .16s ease, transform .16s ease; }
.fmt-nav__link:hover { color: #fff; background: rgba(255, 255, 255, .04); padding-left: 8px; }
.fmt-nav__link:hover .fmt-nav__arrow { opacity: 1; transform: none; }
.fmt-nav__link.is-active { color: var(--fmt-accent); }
.fmt-nav__link.is-active .fmt-nav__num { color: var(--fmt-accent); opacity: .8; }
.fmt-nav__link.is-active .fmt-nav__arrow { opacity: 1; transform: none; }

/* блоки панели */
.fmt-box {
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.fmt-box__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px !important;
  font-family: var(--fmt-sans) !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: .18em !important;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .48) !important;
}
.fmt-box__title::after { content: ""; height: 1px; flex: 1; background: rgba(255, 255, 255, .12); order: 2; }
.fmt-box__title span { order: 1; }
.fmt-box__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fmt-accent);
  text-decoration: none;
}
.fmt-box__more:hover { color: #fff; }

/* категории */
.fmt-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fmt-cats__link {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  text-decoration: none;
  color: rgba(230, 236, 245, .8);
  transition: color .16s ease, background .16s ease;
}
.fmt-cats__link:last-child { border-bottom: 0; }
.fmt-cats__num { font-size: 9px; font-weight: 600; letter-spacing: .06em; color: rgba(255, 255, 255, .3); }
.fmt-cats__name { font-size: 13px; font-weight: 500; line-height: 1.35; }
.fmt-cats__count {
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, .62);
}
.fmt-cats__link:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.fmt-cats__link.is-active { color: var(--fmt-accent); }
.fmt-cats__link.is-active .fmt-cats__count { background: var(--fmt-accent); color: var(--fmt-ink); }

/* оглавление статьи */
.fmt-toc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; counter-reset: v2toc; }
.fmt-toc__item { margin: 0; counter-increment: v2toc; }
.fmt-toc__item--l3 { padding-left: 10px; }
.fmt-toc .v2-toc__link {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  padding: 7px 0;
  margin: 0;
  border-left: 2px solid transparent;
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(230, 236, 245, .68);
  text-decoration: none;
  transition: color .16s ease, border-color .16s ease;
}
.fmt-toc .v2-toc__link::before {
  content: counter(v2toc, decimal-leading-zero);
  padding-top: 1px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .34);
}
.fmt-toc__item--l3 .v2-toc__link::before { content: "—"; }
.fmt-toc .v2-toc__link:hover { background: transparent; color: #fff; }
.fmt-toc .v2-toc__link.is-active { background: transparent; color: var(--fmt-accent); border-left-color: var(--fmt-accent); font-weight: 500; }
.fmt-toc .v2-toc__link.is-active::before { color: var(--fmt-accent); }

/* списки ссылок */
.fmt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fmt-list__link {
  display: block;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(230, 236, 245, .72);
  text-decoration: none;
}
.fmt-list__link:last-child { border-bottom: 0; }
.fmt-list__link:hover, .fmt-list__link.is-active { color: var(--fmt-accent); }
.fmt-list--scroll { max-height: 300px; overflow: auto; padding-right: 6px; }
.fmt-list--posts .fmt-list__link { font-size: 12.5px; }
.fmt-list--cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* быстрый заказ */
.fmt-box--quick { padding: 22px 0 0; }
.fmt-quick { display: flex; flex-direction: column; }
.fmt-box--quick .fmt-field { margin-bottom: 10px; }
.fmt-box--quick .fmt-label { color: rgba(255, 255, 255, .5); font-size: 9.5px; letter-spacing: .12em; }
.fmt-box--quick .fmt-label__hint { color: rgba(255, 255, 255, .32); }
.fmt-box--quick .fmt-input {
  height: 42px;
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 13.5px;
}
.fmt-box--quick .fmt-input::placeholder { color: rgba(255, 255, 255, .32); }
.fmt-box--quick .fmt-input:focus { border-color: var(--fmt-accent); box-shadow: 0 0 0 3px rgba(242, 160, 18, .18); }
.fmt-box--quick .fmt-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-color: rgba(255, 255, 255, .06);
  background-repeat: no-repeat;
  background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,.75) 50%),
                    linear-gradient(135deg, rgba(255,255,255,.75) 50%, transparent 50%);
  background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px;
  background-size: 6px 6px, 6px 6px;
  color: #fff;
}
.fmt-box--quick .fmt-select option { background: var(--fmt-dark-2); color: #fff; }
.fmt-quick__submit { width: 100%; min-height: 46px; margin-top: 4px; font-size: 12.5px; letter-spacing: .02em; }
.fmt-box--quick .fmt-note { color: rgba(255, 255, 255, .4); font-size: 10.5px; }
.fmt-box--quick .fmt-status { color: rgba(255, 255, 255, .7); font-size: 11.5px; }

/* контакты */
.fmt-contacts__row { display: flex; align-items: flex-start; gap: 10px; }
.fmt-contacts__row + .fmt-contacts__row { margin-top: 8px; }
.fmt-contacts__ico { display: inline-flex; flex: 0 0 auto; margin-top: 2px; color: rgba(255, 255, 255, .42); }
.fmt-contacts__phone {
  display: block;
  font-family: var(--fmt-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.02em;
  color: #fff;
  text-decoration: none;
}
.fmt-contacts__phone:hover { color: var(--fmt-accent); }
.fmt-contacts__hours { margin: 0 !important; font-size: 11.5px; color: rgba(255, 255, 255, .45) !important; }
.fmt-contacts__email { display: inline-block; margin-top: 0; font-size: 12.5px; color: rgba(230, 236, 245, .75); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.fmt-contacts__email:hover { color: #fff; border-color: var(--fmt-accent); }
.fmt-contacts__btn { width: 100%; min-height: 40px; margin-top: 14px; background: transparent; border-color: rgba(255, 255, 255, .28); color: #fff; font-size: 12px; }
.fmt-contacts__btn:hover { background: rgba(255, 255, 255, .08); border-color: #fff; }

/* кнопка закрытия на мобильном */
.fmt-rail__close {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* планшетная кнопка «Решения» */
.fmt-railbar { display: none; align-items: center; gap: 8px; margin: 0 0 18px; flex-wrap: wrap; }
.fmt-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--fmt-line-2);
  border-radius: 999px;
  background: #fff;
  font-family: var(--fmt-sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fmt-ink);
  text-decoration: none;
  cursor: pointer;
}
.fmt-chip:hover { border-color: var(--fmt-ink); }
.fmt-chip--accent { background: var(--fmt-accent); border-color: var(--fmt-accent); color: var(--fmt-ink); }
.fmt-chip--accent:hover { background: var(--fmt-accent-2); border-color: var(--fmt-accent-2); color: #fff; }
.fmt-chip__ico { font-size: 13px; }

@media (max-width: 1180px) {
  .fmt-railbar { display: flex; }
  .fmt-rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(368px, 90vw);
    max-height: none;
    margin: 0;
    border-radius: 0;
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform .26s cubic-bezier(.22, .61, .36, 1), visibility .26s ease;
    z-index: 95;
    overflow: auto;
    padding: 24px 20px 34px;
  }
  .fmt-rail.is-open { transform: none; visibility: visible; }
  .fmt-rail__close { display: grid; place-items: center; }
  .fmt-rail__head { padding-right: 44px; }
  body.v2-rail-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 92;
    background: rgba(8, 13, 24, .5);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }
}

/* компактная группа «Вузы» в левой панели */
.fmt-vuzy-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px;
  margin: 8px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .13);
}
.fmt-vuzy-strip__title {
  margin-right: 2px;
  font-family: var(--fmt-sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .4);
}
.fmt-vuzy-strip__link {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 4px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  color: rgba(230, 236, 245, .76);
  text-decoration: none;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.fmt-vuzy-strip__link:hover { color: #fff; border-color: rgba(255, 255, 255, .45); }
.fmt-vuzy-strip__link.is-active { background: var(--fmt-accent); border-color: var(--fmt-accent); color: var(--fmt-ink); }
.fmt-vuzy-strip--ssuzy { margin-top: 6px; padding-top: 0; border-top: 0; }

/* группа «Вузы» в мобильной шторке */
.fmt-drawer__group { margin-top: 10px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .09); }
.fmt-drawer__group-title {
  margin: 0 0 2px !important;
  padding: 0 2px 6px;
  font-family: var(--fmt-sans) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .38) !important;
}
.fmt-drawer__sublink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  font-size: 13.5px;
  color: rgba(230, 236, 245, .74);
  text-decoration: none;
}
.fmt-drawer__sublink:last-child { border-bottom: 0; }
.fmt-drawer__sublink:hover, .fmt-drawer__sublink.is-active { color: var(--fmt-accent); }
.fmt-drawer__sublink .fmt-drawer__arrow { opacity: 0; transform: translateX(-4px); transition: opacity .16s ease, transform .16s ease; }
.fmt-drawer__sublink:hover .fmt-drawer__arrow, .fmt-drawer__sublink.is-active .fmt-drawer__arrow { opacity: 1; transform: none; }


/* контраст и фокус на тёмной панели */
.fmt-rail :focus-visible,
.fmt-drawer :focus-visible {
  outline-color: var(--fmt-accent) !important;
  outline-offset: 2px;
}
.fmt-nav__num { color: rgba(255, 255, 255, .62); }
.fmt-cats__num { color: rgba(255, 255, 255, .62); }
.fmt-box--quick .fmt-label__hint { color: rgba(255, 255, 255, .62); }
.fmt-box--quick .fmt-note { color: rgba(255, 255, 255, .62); }



