:root {
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --topbar-h: 48px;
  --amber: #faa805;
  --yellow: #fcdb05;
  --ink: #f2f4f8;
  --muted: #a5adba;
  --dim: #727a88;
  --page: #07090c;
  --panel: rgba(10, 12, 16, .91);
  --panel-solid: #0d1015;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(250, 168, 5, .46);
  --green: #37c988;
  --red: #ff6c68;
}

* { box-sizing: border-box; }

html {
  height: 100%;
  overflow: hidden;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  height: 100%;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--page);
  font-family: var(--font);
}

button, a { font: inherit; }

a { color: inherit; }

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.page-shade {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, .72);
  pointer-events: none;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 clamp(12px, 3vw, 28px);
  background: #000;
  border-bottom: 1px solid rgba(250, 168, 5, .65);
  box-shadow: 0 1px 10px rgba(250, 168, 5, .22);
}

.topnav,
.top-actions,
.lang {
  display: flex;
  align-items: center;
}

.topnav { gap: 20px; }

.top-actions {
  gap: 16px;
  margin-left: auto;
}

.topnav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color .16s;
}

.topnav-link:hover,
.topnav-link.is-active { color: var(--yellow); }

.topnav-link.is-active { border-bottom: 2px solid var(--amber); }

.topnav-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lang { gap: 4px; }

.lang button {
  min-width: 38px;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #d7dbe3;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.lang button.is-active {
  color: #0a0a0a;
  background: var(--amber);
}

/* Топбар «как на главной»: Промо + тариф + вход. Навигация ведёт в приложение (/). */
.topnav { margin-right: auto; }
.top-promo-m {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--amber);
  border-radius: 8px;
  background: transparent;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
}
.user-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.user-tariff {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 2px 10px 2px 0;
  border-right: 1px solid rgba(255, 255, 255, .16);
  color: inherit;
  line-height: 1.15;
  text-decoration: none;
}
.user-tariff .ut-head { color: var(--dim); font-size: 10px; font-weight: 600; white-space: nowrap; }
.user-tariff .ut-plan { color: var(--ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
.btn-auth {
  padding: 7px 15px;
  border-radius: 8px;
  background: var(--amber);
  color: #14171d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
}
.user-name {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 140px;
  overflow: hidden;
  color: var(--yellow);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-decoration: none;
}
.user-name[hidden], .btn-auth[hidden] { display: none; }

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: fit-content;
  flex: 0 0 auto;
  margin: 0 auto 12px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(250, 168, 5, .48);
  border-radius: 12px;
  overflow: hidden;
  background: #090b0e;
  color: var(--amber);
  font-size: 31px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .48);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.20);
}

.brand-name {
  color: var(--amber);
  font-size: 34px;
  font-weight: 900;
}

.brand-name strong {
  display: inline-block;
  margin-left: 3px;
  padding: 5px 11px 6px;
  border-radius: 8px;
  background: var(--amber);
  color: #0a0a0a;
}

.about-main {
  width: min(1420px, calc(100% - 32px));
  height: 100dvh;
  min-height: 0;
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 18px) 0 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.intro {
  flex: 0 0 auto;
  max-width: 850px;
  margin: 0 auto 14px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  font-size: clamp(27px, 3vw, 42px);
  line-height: 1.12;
}

.intro p:last-child {
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.info-shell {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .48);
  backdrop-filter: blur(12px);
}

.section-rail {
  min-height: 0;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: rgba(0, 0, 0, .24);
}

.rail-label {
  margin: 0 10px 12px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.section-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 7px 8px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.section-button:hover { color: var(--ink); }

.section-button.is-active {
  color: var(--ink);
  background: rgba(250, 168, 5, .1);
  box-shadow: inset 3px 0 0 var(--amber);
}

.section-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--amber);
  font-size: 15px;
  font-weight: 800;
}

.section-title {
  font-size: 12px;
  font-weight: 750;
  line-height: 1.28;
}

.section-arrow { color: var(--dim); text-align: right; }

.content-column {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.topic-header {
  position: relative;
  flex: 0 0 auto;
  z-index: 12;
  padding: 14px 22px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 16, 21, .97);
}

.breadcrumb {
  min-height: 18px;
  margin-bottom: 10px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
}

.breadcrumb strong { color: var(--amber); font-weight: 800; }

.topic-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(250, 168, 5, .45) transparent;
}

.topic-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.topic-button:hover { color: var(--ink); border-color: rgba(250, 168, 5, .35); }

.topic-button.is-active {
  color: #0a0a0a;
  border-color: var(--amber);
  background: var(--amber);
}

.articles {
  flex: 1 1 auto;
  min-height: 0;
  padding: 24px clamp(22px, 4vw, 58px) 34px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.articles::-webkit-scrollbar { display: none; }

.js .about-article { display: none; }
.js .about-article.is-active { display: block; animation: articleIn .2s ease-out; }

@keyframes articleIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

html[lang="ru"] [data-copy="kz"],
html[lang="kz"] [data-copy="ru"] { display: none; }

.about-article header { margin-bottom: 24px; }

.article-kicker {
  margin: 0 0 7px;
  color: var(--amber);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.about-article h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}

.article-lead {
  max-width: 850px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.about-article h3 {
  margin: 28px 0 10px;
  font-size: 17px;
  line-height: 1.35;
}

.about-article p,
.about-article li {
  color: #d7dbe3;
  font-size: 14px;
  line-height: 1.72;
}

.about-article p { margin: 10px 0; }
.about-article ul,
.about-article ol { margin: 10px 0; padding-left: 22px; }
.about-article li + li { margin-top: 7px; }

.service-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 24px 0 8px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.fact {
  min-height: 92px;
  padding: 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fact dt {
  margin-bottom: 7px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.fact dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.tariff-stack {
  display: grid;
  gap: 3px;
}

.callout {
  margin: 22px 0;
  padding: 14px 16px;
  border-left: 3px solid var(--amber);
  background: rgba(250, 168, 5, .08);
  color: #e7e9ee;
  font-size: 13px;
  line-height: 1.65;
}

.callout.is-green { border-left-color: var(--green); background: rgba(55, 201, 136, .08); }
.callout.is-danger { border-left-color: var(--red); background: rgba(255, 108, 104, .08); }

.steps {
  margin: 20px 0;
  counter-reset: steps;
  border-top: 1px solid var(--line);
}

.step {
  position: relative;
  min-height: 58px;
  padding: 14px 10px 14px 50px;
  border-bottom: 1px solid var(--line);
  color: #d7dbe3;
  font-size: 14px;
  line-height: 1.6;
  counter-increment: steps;
}

.step::before {
  content: counter(steps);
  position: absolute;
  left: 8px;
  top: 13px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.scenario-list {
  margin: 22px 0;
  border-top: 1px solid var(--line);
}

.scenario {
  border-bottom: 1px solid var(--line);
}

.scenario summary {
  position: relative;
  padding: 16px 38px 16px 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}

.scenario summary::-webkit-details-marker { display: none; }

.scenario summary::after {
  content: "+";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber);
  font-size: 20px;
  font-weight: 500;
}

.scenario[open] summary::after { content: "−"; }

.scenario-body { padding: 0 36px 16px 4px; }
.scenario-body p { margin: 0; }
.scenario-body strong { color: var(--green); }

.tariff-table,
.contact-table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
}

.tariff-table th,
.tariff-table td,
.contact-table th,
.contact-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  color: #d7dbe3;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

.tariff-table th,
.contact-table th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.tariff-table td:first-child { color: var(--ink); font-weight: 800; }
.contact-table td:first-child { width: 210px; color: var(--muted); font-weight: 700; }

.inline-link { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 18px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

/* Контакты и регион работы. Блок нужен Яндексу как подтверждение региональной
   принадлежности, но читать его будут люди — поэтому обычный текст, а не мелкий шрифт
   подвала. */
.page-contacts {
  flex: 0 0 auto;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.page-contacts h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.page-contacts p { margin: 0 0 8px; }
.page-contacts p:last-child { margin-bottom: 0; }
.page-contacts a { color: var(--amber); text-decoration: none; }
.page-contacts a:hover { text-decoration: underline; }

.page-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 4px 0;
  color: var(--dim);
  font-size: 11px;
}

.page-footer a { color: var(--muted); text-decoration: none; }
.page-footer a:hover { color: var(--amber); }

@media (max-width: 920px) {
  .info-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .section-rail {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .section-rail::-webkit-scrollbar { display: none; }
  .topic-strip { scrollbar-width: none; }
  .topic-strip::-webkit-scrollbar { display: none; }
  .rail-label { display: none; }
  .section-button {
    flex: 0 0 auto;
    width: auto;
    min-height: 40px;
    grid-template-columns: 26px auto;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 5px 9px;
  }
  .section-button.is-active { box-shadow: inset 0 -2px 0 var(--amber); }
  .section-icon { width: 24px; height: 24px; border: 0; }
  .section-arrow { display: none; }
  .service-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  :root { --topbar-h: 58px; }
  .topbar { padding-inline: 8px; }
  .topnav { gap: 10px; }
  .topnav-link { min-width: 34px; justify-content: center; }
  .topnav-link span { display: none; }
  .top-actions { gap: 6px; }
  .about-main {
    width: min(100% - 16px, 1420px);
    padding: calc(var(--topbar-h) + 12px) 0 8px;
  }
  .brand { margin-bottom: 10px; gap: 10px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 9px; font-size: 26px; }
  .brand-name { font-size: 27px; }
  .brand-name strong { margin-left: 2px; padding: 4px 8px 5px; }
  .intro { margin-bottom: 10px; }
  .intro p:last-child { font-size: 13px; line-height: 1.55; }
  .info-shell { min-height: 0; }
  .section-title { font-size: 11px; }
  .topic-header { padding: 12px 14px 10px; }
  .articles { padding: 20px 17px 26px; }
  .service-facts { grid-template-columns: 1fr; }
  .fact { min-height: 0; }
  .tariff-table,
  .tariff-table tbody,
  .tariff-table tr,
  .tariff-table th,
  .tariff-table td,
  .contact-table,
  .contact-table tbody,
  .contact-table tr,
  .contact-table th,
  .contact-table td { display: block; width: 100%; }
  .tariff-table thead,
  .contact-table thead { display: none; }
  .tariff-table tr,
  .contact-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tariff-table td,
  .contact-table td { padding: 4px 0; border: 0; }
  .contact-table td:first-child { width: auto; }
  .page-footer { align-items: flex-start; flex-direction: column; gap: 7px; }
}

/* ===== Мобилка (телефон/планшет) — ловим по типу указателя, не по ширине =====
   Раньше раскладка висела на @media(max-width:620), но телефон может рендериться шире 620
   (тогда правило не срабатывало и оставался горизонтальный скролл разделов). Указатель —
   надёжный признак телефона независимо от CSS-ширины; на десктопе этот блок не применяется. */
@media (hover: none) and (pointer: coarse) {
  /* Топбар как на главной: ряд 1 = [иконки] [Промо] [🌐 язык], ряд 2 = [тариф] [вход]. */
  :root { --topbar-h: 84px; }
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 4px;
    padding: 6px 8px;
    height: var(--topbar-h);
  }
  .topnav { grid-column: 1; grid-row: 1; margin: 0; gap: 12px; }
  .topnav-link { padding: 4px; min-width: 0; }
  .topnav-link span { display: none; }
  .top-promo-m { grid-column: 2; grid-row: 1; }
  .lang { grid-column: 3; grid-row: 1; justify-self: end; }
  .lang button { display: none; }
  .lang button.is-active {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 42px; padding: 8px 10px; border: 0; border-radius: 9px;
    color: #0a0a0a; background: var(--amber); font-weight: 800;
  }
  .user-box { grid-column: 1 / -1; grid-row: 2; justify-self: end; gap: 8px; }

  /* Вся страница — один вертикальный скролл (убираем «оболочку на весь экран» с внутренними
     прокрутками и горизонтальные полосы навигации, дававшие боковой скролл). */
  html, body { height: auto; overflow-x: hidden; overflow-y: auto; }
  .about-main { height: auto; overflow: visible; }
  .info-shell { overflow: visible; }
  /* Разделы — вертикальным списком на всю ширину (никакого бокового скролла). */
  .section-rail { flex-direction: column; flex-wrap: nowrap; overflow: visible; }
  .section-button { width: 100%; }
  /* Темы — переносим по строкам. */
  .topic-strip { flex-wrap: wrap; overflow: visible; }
  .articles { overflow: visible; overscroll-behavior: auto; }
}

@media (max-height: 800px) and (min-width: 621px) {
  .about-main { padding: calc(var(--topbar-h) + 10px) 0 8px; }
  .brand { margin-bottom: 7px; gap: 10px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 9px; font-size: 26px; }
  .brand-name { font-size: 28px; }
  .brand-name strong { margin-left: 2px; padding: 4px 8px 5px; }
  .intro { margin-bottom: 9px; }
  .eyebrow { margin-bottom: 3px; font-size: 10px; }
  .intro h1 { font-size: 28px; }
  .intro p:last-child { margin-top: 5px; font-size: 12px; line-height: 1.4; }
  .topic-header { padding-block: 10px 9px; }
  .breadcrumb { margin-bottom: 6px; }
  .articles { padding-top: 18px; }
  .page-footer { padding-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .about-article.is-active { animation: none; }
}
