/* ============================================================================
   Фирменные токены Adviva.
   Источник — реальный бренд-сайт компании adviva.com (снят 23.08.2026):
   шрифт Manrope, тёмный баклажан #1F1731, алый акцент #FF003D, белый текст.
   До этого здесь был дежурный фиолетовый #6d4aff и системный шрифт — воронка
   выглядела чужой по отношению к сайту, с которого приходит кандидат.
   ========================================================================== */
:root {
  /* фирменные константы */
  --brand-dark: #1f1731;      /* фон герой-секции и тёмных блоков */
  --brand-dark-2: #1f213c;    /* второй тёмный, для градиента */
  --brand-red: #ff003d;       /* акцент бренда */
  --brand-red-hover: #d90034;

  /* светлая часть — воронка и карточки: читаемость важнее эффекта */
  --bg: #f6f5f8;
  --card: #ffffff;
  --card-border: #e4e1ea;
  --text: #1f1731;
  --muted: #827b90;           /* приглушённый текст — тоже из бренда */

  /* семантика: остальной код ссылается на --accent, не на --brand-red */
  --accent: var(--brand-red);
  --accent-hover: var(--brand-red-hover);
  --accent-soft: #ffe9ee;

  --danger: #d9463d;
  --success: #1fa16a;
  --radius: 16px;
  font-size: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ============================================================================
   Ширины. Раньше всё было зажато в 880px — на широком экране лендинг выглядел
   узкой полосой с пустыми полями. Теперь ширина зависит от содержимого:
     лендинг и сетка вакансий — широкие (смотрят, сравнивают, выбирают);
     страница вакансии — средняя;
     экраны анкеты — узкие (читают и отвечают; длинная строка читается хуже).
   ========================================================================== */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 24px;
}

/* лендинг занимает всю доступную ширину */
.landing { width: 100%; }

/* страница вакансии — средняя колонка */
.detail {
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
}

/* экраны анкеты и результата — узкая колонка для чтения */
.app > .card {
  max-width: 720px;
  margin-inline: auto;
}

/* прогресс-бар выравниваем по ширине анкеты, а не по всей странице */
.progress-track {
  max-width: 720px;
  margin-inline: auto;
  width: 100%;
}

.topbar {
  padding: 20px 0 12px;
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.brand {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--text);
}







/* Прогресс: градиент красный→жёлтый→зелёный, серая маска скрывает незаполненную часть
   справа, белый бегунок сидит на границе заполнения. */
.progress-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e5484d 0%, #f5c344 50%, #1fa16a 100%);
  overflow: visible;
}

.progress-mask {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  background: #ddd9e3;
  border-radius: 0 999px 999px 0;
  transition: width 0.3s ease;
}

.progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  box-shadow: 0 1px 5px rgba(31, 23, 49, 0.25);
  transform: translate(-50%, -50%);
  transition: left 0.3s ease;
  z-index: 1;
}

.app {
  flex: 1;
  padding: 24px 0 40px;
}

/* ---------- лендинг / список вакансий ---------- */

.hero {
  position: relative;
  text-align: center;
  padding: clamp(48px, 7vw, 88px) 24px clamp(44px, 6vw, 76px);
  overflow: hidden;
  isolation: isolate;
  border-radius: 24px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/assets/hero-bg.jpg?v=bbe295fe") center 72% / cover no-repeat;
}

/* Тёмная фирменная подложка вместо белого затухания: герой — единственный
   тёмный блок, он якорит бренд (как adviva.com), дальше страница светлая ради
   читаемости анкеты. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    /* тёмная линза под текстом — заголовок читается, город по краям остаётся виден */
    radial-gradient(95% 75% at 50% 42%, rgba(31, 23, 49, 0.78) 0%, rgba(31, 23, 49, 0.42) 60%, rgba(31, 23, 49, 0.08) 100%),
    /* лёгкое общее затемнение + уход в фирменный тёмный к низу */
    linear-gradient(180deg, rgba(31, 23, 49, 0.28) 0%, rgba(31, 23, 49, 0.3) 55%, rgba(31, 23, 49, 0.78) 100%);
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--brand-red);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(30px, 5.2vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  font-weight: 800;
  color: #fff;
  text-wrap: balance;
}

.hero .accent {
  display: block;
  color: var(--brand-red);
}

.hero-sub {
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: 24px;
  margin: 0 0 6px;
}

.section-head p {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
}

/* ---------- закреплённая вакансия (переход по прямой ссылке / UTM) ---------- */

.pinned-section {
  margin-bottom: 8px;
}

.vacancy-grid-pinned {
  grid-template-columns: 1fr;
  max-width: 480px;
  margin: 0 auto;
}

.vacancy-card-pinned {
  border: 2px solid var(--accent);
  box-shadow: 0 10px 28px rgba(255, 0, 61, 0.16);
  position: relative;
}

.pinned-badge {
  position: absolute;
  top: -12px;
  left: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ---------- заголовок трека (RU-вакансии / EN-вакансии) ---------- */

.track-head {
  margin: 28px 0 14px;
}

.track-head h3 {
  font-size: 17px;
  margin: 0 0 2px;
}

.track-head p {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0;
}

/* auto-fit + потолок ширины колонки и центрирование: когда вакансий в треке мало
   (в EN-треке их две), карточки не растягиваются на всю ширину и не жмутся влево. */
.vacancy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 300px));
  justify-content: center;
  gap: 16px;
}

.vacancy-card, .card, .detail-head, .info-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}

.vacancy-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.vacancy-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 0, 61, 0.12);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-dark);
  background: #efedf3;
  padding: 5px 12px;
  border-radius: 999px;
}

.flag {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.vacancy-card h3, .detail-head h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.detail-head h1 { font-size: 24px; margin-top: 6px; }

.card-meta {
  color: var(--muted);
  font-size: 14px;
}

/* Зарплата на карточке. Для массового найма это фильтр №1 — раньше цифра была
   спрятана на клик вглубь, на странице вакансии. */
.card-salary {
  font-size: 17px;
  font-weight: 800;
  color: var(--brand-dark);
  letter-spacing: -0.01em;
  margin-top: 2px;
}

.card-tasks {
  list-style: none;
  margin: 4px 0 6px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-tasks li {
  font-size: 13.5px;
  color: var(--text);
  padding-left: 20px;
  position: relative;
  line-height: 1.4;
}

.card-tasks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.card-tasks-lg li { font-size: 15px; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.btn-outline:hover { background: var(--accent-soft); }

/* ---------- страница вакансии ---------- */

.detail { width: 100%; }

.detail-head {
  padding: 26px 24px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-cta { align-self: flex-start; margin-top: 8px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.info-card {
  padding: 16px 18px;
}

.info-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.info-value {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
}

/* ---------- воронка (карточка страницы с несколькими вопросами) ---------- */

.card {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 24px;
  animation: fadeIn 0.2s ease;
}

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

.result-card { text-align: center; }

.page-card { max-width: 620px; }

.page-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.q-block {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--card-border);
}

.q-block:last-of-type {
  border-bottom: none;
  margin-bottom: 4px;
  padding-bottom: 0;
}

.q-text {
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 15.5px;
  font-weight: 600;
  margin-bottom: 14px;
}

/* Длинная вводная проза: обычное начертание и чуть крупнее — читать, а не сканировать. */
.q-text-prose {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: #3a3350;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.options-radio { gap: 8px; }

.btn {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: #fbfbfe;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.btn:hover { background: var(--accent-soft); border-color: var(--accent); }

.radio-btn {
  position: relative;
  padding-left: 44px;
  font-size: 14.5px;
}

.radio-btn::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--card-border);
  background: #fff;
  transition: border-color 0.12s ease;
}

.radio-btn::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 0.12s ease;
}

.radio-btn.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.radio-btn.selected::before { border-color: var(--accent); }
.radio-btn.selected::after { transform: translateY(-50%) scale(1); }

.page-next { margin-top: 8px; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  text-align: center;
  font-weight: 600;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.links { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.links a { color: var(--accent); }

input[type="text"], input[type="tel"], input[type="number"], textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: #fbfbfe;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 8px;
  font-family: inherit;
}

textarea { min-height: 90px; resize: vertical; }

input:focus, textarea:focus { outline: none; border-color: var(--accent); }

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.back-link:hover { color: var(--accent); }

.result-icon { font-size: 40px; margin-bottom: 12px; }
.result-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.result-text { color: var(--muted); line-height: 1.5; margin-bottom: 20px; }

.tg-link {
  display: block;
  text-align: center;
  padding: 14px;
  border-radius: 10px;
  background: #229ed9;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.foot {
  padding: 12px 0 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.error-text {
  color: var(--danger);
  font-size: 13px;
  margin: 4px 0 14px;
}

/* ---------- полноразмерные блоки лендинга: о компании / преимущества / найм / футер ---------- */

.content-section {
  margin-top: 48px;
}

.about-card {
  padding: 24px;
  max-width: 720px;
  margin: 0 auto;
}

.about-card p {
  margin: 0;
  line-height: 1.6;
  font-size: 15px;
  color: var(--text);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.why-card .info-value { margin-bottom: 6px; }
.why-card .card-meta { line-height: 1.45; font-size: 13.5px; }

.process-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
  margin: 0 auto;
}

.process-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.process-num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.process-body .info-value { margin-bottom: 3px; }
.process-body .card-meta { line-height: 1.4; font-size: 13.5px; }

.landing-foot {
  margin-top: 56px;
  padding: 28px 0 12px;
  text-align: center;
  border-top: 1px solid var(--card-border);
}

.landing-foot .brand { margin-bottom: 8px; }

.landing-foot p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13.5px;
}

@media (max-width: 480px) {
  .hero h1 { font-size: 26px; }
  .vacancy-grid { grid-template-columns: 1fr; }
  .vacancy-grid-pinned { max-width: 100%; }
}


/* Кнопка связи в подвале — единственная ступень с низким порогом:
   написать вопрос, не проходя анкету целиком. */
.foot-cta {
  display: inline-block;
  margin-top: 14px;
  text-decoration: none;
}


/* ---------- Переключатель языка ----------
   От языка зависит состав вакансий, поэтому переключатель не может быть мелким
   ярлыком в углу: подпись «Язык», названия словами, крупные цели нажатия. */
.lang-toggle {
  align-items: center;
  gap: 6px;
  padding: 4px;
}



.lang-btn {
  min-height: 36px;
  padding: 8px 16px;
  font-size: 13.5px;
}

.lang-btn.active {
  background: var(--brand-dark);
  color: #fff;
  box-shadow: none;
}

/* ---------- Цифры под заголовком героя ---------- */
.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(24px, 6vw, 64px);
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.stat-value {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 4px;
}

/* ---------- Плитки «О компании» ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.about-tile {
  padding: 22px;
}

.about-tile h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.about-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

/* Закреплённая карточка теперь живёт в общей сетке — отдельная узкая колонка убрана. */
.vacancy-card-pinned {
  border: 2px solid var(--brand-red);
}


/* ============================================================================
   Переключатель языка — ползунок.
   От языка зависит, какие вакансии человек увидит (RU-трек или EN-трек),
   поэтому это не мелкий ярлык в углу, а физический тумблер: бегунок едет
   между позициями, его можно и нажать, и перетащить.
   ========================================================================== */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.lang-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #eceaf1;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 4px;
  touch-action: pan-y;          /* вертикальную прокрутку страницы не перехватываем */
  user-select: none;
  cursor: grab;
}

.lang-switch:active { cursor: grabbing; }

.lang-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: var(--brand-dark);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(31, 23, 49, 0.28);
  transition: transform 0.28s cubic-bezier(0.34, 1.3, 0.64, 1);
  will-change: transform;
}

.lang-switch[data-lang="en"] .lang-thumb {
  transform: translateX(100%);
}

/* пока тянут — бегунок идёт ровно за пальцем, без догоняющей анимации */
.lang-switch.dragging .lang-thumb {
  transition: none;
}

.lang-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  min-height: 36px;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.lang-btn.active { color: #fff; }

.lang-btn:focus-visible {
  outline: 2px solid var(--brand-red);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .lang-thumb { transition: none; }
}

/* На узких экранах подпись «Язык» съедает место в шапке — сам ползунок с названиями
   языков читается без неё. */
@media (max-width: 420px) {
  .lang-label { display: none; }
  .lang-btn { padding: 8px 14px; font-size: 13px; }
}

/* ============================================================================
   Экран подтверждения номера. Первый шаг отклика — поэтому спокойный,
   короткий и без лишних полей: одно поле, одна кнопка.
   ========================================================================== */
.verify-card { padding: 28px 26px 30px; }

.verify-title {
  margin: 10px 0 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.verify-lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 8px;
}

.verify-input {
  width: 100%;
  font-size: 17px;          /* не меньше 16px — иначе iOS зумит страницу при фокусе */
  letter-spacing: 0.02em;
}

.verify-code-input {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
}

.verify-country {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
}

.verify-sent {
  margin: 0 0 20px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

.verify-submit {
  width: 100%;
  margin-top: 18px;
  min-height: 48px;
  font-size: 15px;
}

.verify-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.link-btn {
  border: none;
  background: none;
  padding: 6px 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 13.5px;
  text-decoration: underline;
  cursor: pointer;
}

.link-btn:hover { color: var(--brand-red); }

/* ============================================================================
   Экран входа через Telegram (16.09.2026). Сначала объяснение — зачем и что произойдёт,
   потом одна большая кнопка. Ничего вводить не нужно, поэтому полей нет.
   ========================================================================== */
.tg-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tg-auth-card .verify-title { margin-top: 12px; }

.tg-steps { margin: 0 0 14px; }

.tg-steps-title {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-dark);
}

.tg-steps-list {
  margin: 0;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.55;
}

.tg-steps-list li { margin-bottom: 6px; }

.tg-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  margin-top: 6px;
  font-size: 15.5px;
  text-decoration: none;
}

.tg-auth-wait {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.tg-auth-wait.tg-auth-done { color: #1a7f37; font-weight: 700; }

/* Компьютер: как открыть Telegram здесь + QR-код для телефона (17.09.2026). На телефоне блока нет. */
.tg-desktop {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: 4px 0 14px;
  padding: 14px 16px;
  border: 1px solid #e7e7ea;
  border-radius: 12px;
  background: #fafafb;
}
.tg-desktop-text { flex: 1; min-width: 0; }
.tg-desktop .tg-steps-list { font-size: 14px; }
.tg-qr { flex: 0 0 156px; text-align: center; }
.tg-qr-box {
  box-sizing: border-box;
  width: 156px;
  height: 156px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e7e7ea;
  border-radius: 8px;
}
.tg-qr-box svg { display: block; width: 100%; height: 100%; }
.tg-qr-caption { margin-top: 6px; font-size: 12px; color: var(--muted); }
@media (max-width: 600px) { .tg-desktop { flex-direction: column; } .tg-qr { align-self: center; } }

/* display:flex в правилах выше сильнее браузерного [hidden]{display:none} — без этого
   блок ожидания и кнопки «проверить» были бы видны ещё до нажатия (поймано тестом 16.09). */
.tg-auth-wait[hidden],
.verify-actions[hidden] { display: none; }

.tg-spinner {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 2px solid var(--card-border);
  border-top-color: var(--brand-red);
  border-radius: 50%;
  animation: tgspin 0.8s linear infinite;
}

@keyframes tgspin { to { transform: rotate(360deg); } }

a.link-btn { text-decoration: underline; }

/* ---------- Выбор канала доставки кода ----------
   Кандидат выбирает сам: он лучше знает, чем пользуется. Показываем только те
   каналы, которые реально работают для его страны и подключены у нас. */
.channel-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.channel-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: #fff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.08s ease;
}

.channel-btn:hover:not(:disabled) {
  border-color: var(--brand-red);
  background: #fffafb;
}

.channel-btn:active:not(:disabled) { transform: translateY(1px); }

.channel-btn:disabled { opacity: 0.55; cursor: default; }

.channel-btn.is-sending { border-color: var(--brand-red); background: var(--accent-soft); }

.channel-icon { font-size: 22px; line-height: 1; }

.channel-text { display: flex; flex-direction: column; gap: 3px; }

.channel-name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--brand-dark);
}

.channel-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ============================================================================
   Первая страница анкеты — «Знакомство» (01.09.2026): вводный текст над полями
   и пояснение под ними. Обычное начертание — это обращение, а не вопрос.
   ========================================================================== */
.page-lead {
  margin: -6px 0 18px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
}

.page-note {
  margin: 4px 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f6f5f8;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- Финальный экран: выбор канала связи (Telegram / WhatsApp) ----------
   Переиспользует стиль .channel-btn с экрана подтверждения номера, но это ссылки. */
.channel-choice {
  text-align: left;
  margin: 4px auto 0;
  max-width: 420px;
}

a.channel-link {
  text-decoration: none;
  color: inherit;
}

a.channel-link.is-chosen {
  border-color: var(--success);
  background: #eefaf3;
}

.channel-chosen {
  margin: 16px 0 0;
  color: var(--success);
  font-size: 14px;
  font-weight: 600;
}

/* ============================================================================
   Страница «Тесты» (16.09.2026): ссылка на тест + зона загрузки скриншота.
   ========================================================================== */
.q-hint {
  margin: -6px 0 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.test-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  padding: 10px 14px;
  font-size: 14px;
  text-decoration: none;
}

.upload-zone { margin-bottom: 20px; }

.upload-input { display: none; }

.upload-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 14px;
  border: 1.5px dashed var(--card-border);
  border-radius: 12px;
  background: #fbfbfe;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-drop:hover { border-color: var(--brand-red); background: #fffafb; }

.upload-icon { font-size: 22px; line-height: 1; }

.upload-main { font-size: 15px; font-weight: 700; color: var(--brand-dark); }

.upload-sub { font-size: 12.5px; color: var(--muted); }

.upload-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: #fff;
}

.upload-img {
  flex: none;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f0f5;
}

.upload-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.upload-name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-status { font-size: 13px; color: var(--muted); }

.upload-zone[data-state="done"] .upload-status { color: #1a7f37; font-weight: 700; }

.upload-zone[data-state="skipped"] .upload-img { display: none; }

.upload-replace { padding: 2px 0; align-self: flex-start; }

.upload-skip { display: block; margin-top: 6px; text-align: left; }

/* display:flex сильнее браузерного [hidden] — прячем явно */
.upload-drop[hidden],
.upload-preview[hidden],
.upload-skip[hidden] { display: none; }

/* ---------- «Кабинет» (16.09.2026): плашка «вошли как» под шапкой и возврат к анкете ---------- */
.tg-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f6f5f8;
  font-size: 13px;
  color: var(--muted);
}

.tg-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tg-chip-text b { color: var(--brand-dark); }

.tg-chip-logout { flex: none; padding: 2px 0; }

.resume-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--brand-red);
  border-radius: 14px;
  background: #fff;
}

.resume-title { font-size: 15px; font-weight: 700; color: var(--brand-dark); }

.resume-hint { margin-top: 2px; font-size: 13px; color: var(--muted); }

.resume-btn { flex: none; }

/* 19.09.2026: подсказка вместо «Пропустить» после двух неудачных загрузок скриншота */
.upload-help { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fff7e6; color: #5c4400; font-size: 14px; line-height: 1.45; }

/* ============================================================================
   Анкета v2 (21.09.2026): вопрос в конце длинной прозы, пересказ ответа (recap), город с подсказками,
   экран отказа по чёрному списку, атрибуция GeoNames в подвале.
   ========================================================================== */

/* Длинные условия (график 5/2, 2/2, гибрид) набраны прозой, а сам вопрос после них — полужирным */
.q-text-prose + .q-ask { margin-top: -4px; }

/* recap — ответ с прошлой страницы, только чтение */
.recap-box {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: #f6f5f8;
  color: #3a3350;
  font-size: 14.5px;
  line-height: 1.5;
  max-height: 220px;
  overflow-y: auto;
}

.recap-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Город: список подсказок — в потоке страницы под полем (не поверх), чтобы на телефоне его не обрезала клавиатура */
.city-wrap { position: relative; }

.city-wrap .city-input { margin-bottom: 0; }

.city-suggest {
  list-style: none;
  margin: 6px 0 0;
  padding: 4px 0;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 23, 49, 0.08);
  max-height: 300px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.city-suggest[hidden] { display: none; }

.city-option {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 14px;
  min-height: 44px; /* палец попадает с первого раза */
  justify-content: center;
  cursor: pointer;
}

.city-option + .city-option { border-top: 1px solid #f0eef4; }

.city-option:hover,
.city-option.active { background: var(--accent-soft); }

.city-name { font-size: 15px; font-weight: 600; color: var(--text); }

.city-sub { font-size: 13px; color: var(--muted); }

.city-wrap + .error-text { margin-top: 8px; }

/* Экран отказа по чёрному списку — один спокойный текст */
.result-card-blacklist { padding-top: 36px; padding-bottom: 36px; }

.result-text-main { color: var(--text); font-size: 16px; margin-bottom: 0; }

/* Подвал: источник справочника городов (лицензия CC BY 4.0) */
.geo-attr { margin-top: 6px; font-size: 11.5px; color: var(--muted); }

.geo-attr a { color: inherit; }

/* Телефон: 16px в полях ввода — иначе iOS увеличивает страницу при фокусе (особенно мешает подсказкам города) */
@media (max-width: 600px) {
  input[type="text"], input[type="tel"], input[type="number"], textarea { font-size: 16px; }
  .city-suggest { max-height: 45vh; }
}

/* ============================================================================
   Резюме на сайте (22.09.2026): окно загрузки на экране «Заявка принята» и в кабинете ?resume=.
   ========================================================================== */
.resume-box {
  margin: 4px auto 20px;
  max-width: 420px;
  padding: 16px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: #fbfbfe;
  text-align: left;
}
.resume-box [hidden] { display: none !important; } /* .btn задаёт display:block — прячем явно */
.resume-box-title { font-size: 16px; font-weight: 700; color: var(--brand-dark); margin-bottom: 6px; }
.resume-box-text { font-size: 14px; line-height: 1.5; color: var(--muted); margin-bottom: 14px; }
.resume-box-btn { cursor: pointer; }
.resume-box-hint { margin-top: 10px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.resume-box-status { font-size: 14px; color: var(--muted); padding: 12px 0; text-align: center; }
.resume-box-done { font-size: 15px; font-weight: 700; color: var(--success); line-height: 1.45; }
.resume-box-name {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.resume-box-replace { margin-top: 8px; padding: 2px 0; }
.resume-box-err { margin-top: 10px; }
.resume-box[data-state="done"] { border-color: var(--success); background: #eefaf3; }
.cabinet-vacancy { font-size: 15px; font-weight: 600; color: var(--brand-dark); margin-bottom: 6px; }
.cabinet-card .btn-outline { max-width: 420px; margin: 0 auto; text-align: center; }
.resume-or {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  margin: -8px auto 12px;
  color: var(--muted);
  font-size: 13px;
}
.resume-or::before, .resume-or::after { content: ""; flex: 1; border-top: 1px solid var(--card-border); }
.resume-or[hidden] { display: none; }


/* ---------- Экран отправки заявки (22.09.2026, просьба Владислава) ----------
   Отправка идёт до минуты. Раньше здесь была одна статичная строка «Отправляем заявку…»,
   и кандидат обновлял страницу, решив, что сайт завис. Всё движение — чистый CSS, без библиотек. */
.send-card {
  text-align: center;
  padding-top: 28px;
  padding-bottom: 28px;
}

.send-spinner {
  width: 40px;
  height: 40px;
  margin: 4px auto 18px;
  border: 3px solid var(--card-border);
  border-top-color: var(--brand-red);
  border-radius: 50%;
  animation: tgspin 0.9s linear infinite;
}

/* Высота фиксирована: подписи разной длины не должны дёргать карточку вверх-вниз. */
.send-step {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  min-height: 48px;
}

.send-bar {
  position: relative;
  max-width: 260px;
  height: 4px;
  margin: 6px auto 14px;
  border-radius: 2px;
  background: var(--card-border);
  overflow: hidden;
}

.send-bar > i {
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  border-radius: 2px;
  background: var(--brand-red);
  animation: sendbar 1.5s ease-in-out infinite;
}

@keyframes sendbar {
  0% { left: -40%; }
  100% { left: 100%; }
}

.send-hint {
  font-size: 14px;
  line-height: 1.45;
  opacity: 0.72;
}

/* Сервер молчит дольше 90 секунд: подпись становится заметной, полоса замедляется. */
.send-slow .send-step { color: var(--brand-red); }
.send-slow .send-bar > i { animation-duration: 3s; }

/* Человеку, который выключил анимации в системе, оставляем статичную полосу — но экран всё равно живой. */
@media (prefers-reduced-motion: reduce) {
  .send-spinner { animation-duration: 3s; }
  .send-bar > i { animation: none; left: 0; width: 100%; opacity: 0.45; }
}
