/* анкета инженера на pro.holodok.tech/anketa/. размеры из 09_pro_найм_инженеров.md, раздел про опрос:
   на компьютере белая карточка 480 по центру на сером фоне, на телефоне во весь экран, «Дальше» в нижней плашке.
   токены, сброс, шапка, кнопки и заглушки общие, из pro.css; здесь только то, что есть у одной анкеты */

body.ak { min-height: 100vh; overflow-x: hidden; }

/* шапка общая (.header из pro.css). у анкеты справа «Закрыть», а «Назад» в шапке только на телефоне */
.header .header__back { display: none; }
.header__close { color: var(--ink-600); }
@media (hover: hover) { .header__close:hover { color: var(--ink-900); } }

/* карточка анкеты: 480 по центру, верх на 104 (16 + 72 + 16), поля 32 */
.ak-main { padding: 16px 16px 48px; }
.ak-card {
  position: relative;
  width: 480px; max-width: 100%;
  margin: 0 auto;
  padding: 24px 32px 32px;
  background: var(--white);
  border-radius: var(--r-24);
}
.ak-nav { height: 44px; display: flex; align-items: center; margin: 0 0 4px -8px; }
.ak-back {
  display: inline-flex; align-items: center; gap: 2px;
  height: 44px; padding: 0 12px 0 4px; border-radius: var(--r-12);
  font: 500 15px/20px var(--font); color: var(--ink-600);
}
.ak-back svg { width: 20px; height: 20px; --icon-stroke: 2.1; }
.ak-back.is-off { visibility: hidden; }

/* прогресс без «3 из 8»: заполнение (i/n)^0.8, чтобы в начале шло быстрее */
.ak-progress { height: 4px; border-radius: 2px; background: var(--skeleton); overflow: hidden; margin-bottom: 24px; }
.ak-progress span { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--ice-500); transition: width .3s var(--ease); }
.ak-progress.is-off { visibility: hidden; }
.ak-card.is-plain .ak-nav, .ak-card.is-plain .ak-progress { display: none; }
.ak-card.is-plain { padding-top: 32px; }

/* вопрос и подсказка */
.ak-title {
  font: 500 24px/30px var(--font); letter-spacing: -0.01em;
  text-wrap: balance;
}
.ak-title:focus { outline: none; }
.ak-hint { margin-top: 8px; font: 400 15px/20px var(--font); color: var(--ink-600); }
.ak-lead { margin-top: 8px; font: 400 17px/24px var(--font); color: var(--ink-600); }

/* ответы: строки 416 на 56, r16, серые без рамки. выбранный: лёд, рамка внутри 2 px и галочка справа */
.ak-opts { display: grid; gap: 8px; margin-top: 24px; }
.ak-group-label { margin-top: 8px; font: 500 15px/20px var(--font); color: var(--ink-600); }
.ak-group-label:first-child { margin-top: 0; }
.ak-opt {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 56px; padding: 6px 16px;
  border-radius: var(--r-16);
  background: var(--fill);
  font: 400 17px/22px var(--font); text-align: left;
  transition: background-color .15s, box-shadow .15s;
}
.ak-opt[aria-checked="true"] { background: var(--ice-100); box-shadow: inset 0 0 0 2px var(--ice-500); }
/* balance: «Вальцовка, труборез, / динамометрический ключ», а не одно слово на второй строке */
.ak-opt__text { flex: 1; min-width: 0; text-wrap: balance; }
.ak-opt__tick { width: 20px; height: 20px; color: var(--ice-700); opacity: 0; --icon-stroke: 2.1; transition: opacity .15s; }
.ak-opt[aria-checked="true"] .ak-opt__tick { opacity: 1; }
/* несколько ответов: квадрат 24 r6 слева */
.ak-box {
  width: 24px; height: 24px; flex: none;
  display: grid; place-items: center;
  border-radius: 6px;
  background: var(--white);
  box-shadow: inset 0 0 0 1.5px var(--ink-600);
  color: var(--white);
  transition: background-color .15s, box-shadow .15s;
}
.ak-box svg { width: 18px; height: 18px; opacity: 0; --icon-stroke: 2.6; }
[aria-checked="true"] > .ak-box, .ak-check input:checked + .ak-box { background: var(--ice-700); box-shadow: none; }
[aria-checked="true"] > .ak-box svg, .ak-check input:checked + .ak-box svg { opacity: 1; }
.ak-check input:focus-visible + .ak-box { outline: 2px solid var(--ice-700); outline-offset: 2px; }

/* дополнительный вопрос под основным (удостоверение, гражданство, машина и радиус) */
.ak-sub { margin-top: 24px; }
.ak-sub__label { font: 500 15px/20px var(--font); color: var(--ink-600); }
.ak-sub__hint { margin-top: 2px; font: 400 13px/16px var(--font); color: var(--ink-600); }
.ak-sub .ak-opts, .ak-sub .ak-seg { margin-top: 8px; }
.ak-note { margin-top: 8px; font: 400 13px/16px var(--font); color: var(--ink-600); }
/* колонки по содержимому и текст в одну строку: «Было, истекло» не переносится рядом с «Есть» и «Нет» */
.ak-seg { display: grid; grid-auto-flow: column; grid-auto-columns: auto; gap: 8px; }
.ak-seg .ak-opt { justify-content: center; text-align: center; padding: 6px 12px; white-space: nowrap; }
/* у сегментов и плиток галочка маленькая в углу: одной заливки и светлой рамки мало, чтобы видеть, что выбрано */
.ak-seg .ak-opt__tick { position: absolute; top: 6px; right: 6px; width: 16px; height: 16px; --icon-stroke: 2.6; }

/* ошибка: чёрный текст 14/18 и значок жара 16 слева. у поля рамка жара внутри */
.ak-err { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; font: 400 14px/18px var(--font); color: var(--ink-900); }
.ak-err:empty { display: none; }
.ak-err svg { width: 16px; height: 16px; margin-top: 1px; }

/* поля */
.ak-field { margin-top: 16px; }
.ak-field:first-child { margin-top: 0; }
.ak-label { display: block; margin-bottom: 8px; font: 500 15px/20px var(--font); color: var(--ink-600); }
.ak-input {
  position: relative;
  display: flex; align-items: center;
  height: 56px; border-radius: var(--r-16);
  background: var(--fill);
  transition: box-shadow .15s, background-color .15s;
}
/* фокус рамкой --ice-700, как у остальных элементов: --ice-500 на сером почти не виден */
.ak-input:focus-within { background: var(--fill); box-shadow: inset 0 0 0 2px var(--ice-700); }
.ak-input.is-invalid, .ak-input.is-invalid:focus-within { box-shadow: inset 0 0 0 2px var(--heat); }
.ak-input input {
  flex: 1; min-width: 0; height: 100%;
  padding: 0 16px; border: 0; background: none; outline: none;
  font: 400 17px/22px var(--font);
}
.ak-input input::placeholder { color: var(--ink-600); opacity: 1; }
/* пример под полем телефона. при ошибке его прячем: рядом с ошибкой он читается как отвергнутый номер */
.ak-example { margin-top: 6px; font: 400 13px/16px var(--font); color: var(--ink-600); }
.ak-input.is-invalid ~ .ak-example { display: none; }
.ak-input__pre { padding-left: 16px; font: 400 17px/22px var(--font); }
.ak-input__pre + input { padding-left: 6px; }

/* подсказки городов под полем */
.ak-combo { position: relative; }
.ak-suggest {
  position: absolute; z-index: 4; left: 0; right: 0; top: calc(100% + 4px);
  padding: 6px; border-radius: var(--r-16);
  background: var(--white); box-shadow: var(--shadow-card);
  max-height: 264px; overflow-y: auto;
}
.ak-suggest li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; padding: 0 12px; border-radius: var(--r-12);
  font: 400 17px/22px var(--font); cursor: pointer;
}
.ak-suggest li span { font-size: 13px; line-height: 16px; color: var(--ink-600); }
.ak-suggest li[aria-selected="true"] { background: var(--fill); }
/* снизу до плашки «Дальше» или клавиатуры мало места: список открывается вверх (решает anketa.js) */
.ak-suggest.is-up { top: auto; bottom: calc(100% + 4px); }
.ak-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; margin-top: 4px;
  font: 500 15px/20px var(--font); color: var(--ice-700);
}
.ak-link svg { width: 20px; height: 20px; --icon-stroke: 2.1; }
.ak-link[aria-busy="true"] { color: var(--ink-600); pointer-events: none; }

/* галочки согласия: квадрат 24, вся строка нажимается, цель от 44. ссылка на текст своей строкой под ней */
.ak-checks { margin-top: 16px; display: grid; gap: 4px; }
.ak-checkrow > .ak-err { margin: 0 0 6px 36px; }
.ak-check__link {
  display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0 0 36px;
  font: 400 13px/16px var(--font); color: var(--ice-700);
  text-decoration: underline; text-underline-offset: 2px;
}
.ak-check {
  display: flex; align-items: flex-start; gap: 12px;
  min-height: 44px; padding: 10px 0;
  font: 400 13px/16px var(--font); color: var(--ink-900);
  cursor: pointer;
}
.ak-check input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ak-check .ak-box { margin-top: -4px; }
.ak-checkrow.is-invalid .ak-box { box-shadow: inset 0 0 0 2px var(--heat); }
.ak-check a, .ak-small a, .ak-text a { color: var(--ice-700); text-decoration: underline; text-underline-offset: 2px; }
.ak-check__text { flex: 1; padding-top: 0; }

/* кнопки: .btn из pro.css */
.ak-foot { margin-top: 24px; }
/* на компьютере «Дальше» липнет к низу окна внутри карточки: в ноутбуке 1366×650 кнопка иначе уходит под сгиб */
@media (min-width: 601px) {
  .ak-foot {
    position: sticky; bottom: 0; z-index: 3;
    margin: 24px -32px -32px; padding: 16px 32px 32px;
    background: var(--white); border-top: 1px solid var(--line);
    border-radius: 0 0 24px 24px;
  }
  /* прокрутка к ошибке оставляет место под липкой кнопкой, иначе ошибка встаёт прямо под ней */
  html { scroll-padding-bottom: 120px; scroll-padding-top: 104px; }
  /* под кнопкой ещё текст (контакты): тогда она не последняя в карточке */
  .ak-foot:has(+ .ak-after:not(:empty)) { margin-bottom: 0; padding-bottom: 16px; border-radius: 0; }
}
/* низкое окно компьютера: строки ответов плотнее */
@media (min-width: 601px) and (max-height: 799px) {
  .ak-opts { gap: 6px; }
  .ak-opt { min-height: 48px; }
}
.ak-skip:empty { display: none; }
.ak-skip .ak-link { margin-top: 0; }
.ak-captcha { position: fixed; left: 0; bottom: 0; z-index: 60; }
.ak-btns { display: grid; gap: 8px; margin-top: 24px; }
/* все кнопки внутри спрятаны: пустая обёртка не держит отступ */
.ak-btns:not(:has(> :not([hidden]))) { display: none; }
.ak-small { margin-top: 12px; font: 400 13px/16px var(--font); color: var(--ink-600); }
.ak-after:empty { display: none; }

/* подтверждение номера: номер большой кнопкой и «Ждём звонок» с бликом */
.ak-callnum {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 24px; height: 72px; border-radius: var(--r-16);
  background: var(--ice-500);
  font: 600 26px/32px var(--font); letter-spacing: -0.01em; color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  transition: background-color .15s;
}
.ak-callnum svg { width: 24px; height: 24px; --icon-stroke: 1.9; }
.ak-dev {
  margin-top: 12px; padding: 10px 12px; border-radius: var(--r-12);
  background: var(--fill); font: 500 14px/18px var(--font); color: var(--ink-900);
}
.ak-wait {
  display: flex; align-items: center; justify-content: center;
  min-height: 40px; margin-top: 12px; padding: 10px 12px; border-radius: var(--r-12);
  font: 500 15px/20px var(--font); color: var(--ink-600); text-align: center;
}
/* блик у «Ждём звонок», заглушек и фото даёт общий .skel из pro.css */
.ak-wait.is-over { animation: none; background: var(--fill); color: var(--ink-900); }
@media (prefers-reduced-motion: reduce) {
  .ak-progress span, .ak-opt, .ak-box { transition: none; }
}

/* заглушка карточки, пока узнаём, вошёл ли человек */
.ak-skel { border-radius: 8px; }
.ak-skel--title { height: 30px; width: 78%; }
.ak-skel--hint { height: 20px; width: 56%; margin-top: 8px; }
.ak-skel--row { height: 56px; border-radius: var(--r-16); margin-top: 8px; }
.ak-skel--hint + .ak-skel--row { margin-top: 24px; }

/* экраны результата и статуса */
.ak-banner { margin-bottom: 16px; padding: 12px 16px; border-radius: var(--r-16); background: var(--ice-100); font: 400 15px/20px var(--font); }
.ak-steps { margin-top: 24px; display: grid; gap: 0; }
/* сноска к доле на экране результата: 14/18, как у денежных цифр на главной */
.ak-fine { margin-top: 16px; }
.ak-step { position: relative; display: flex; gap: 12px; padding-bottom: 16px; font: 400 15px/20px var(--font); }
.ak-step:last-child { padding-bottom: 0; }
.ak-step::before {
  content: ""; position: absolute; left: 5px; top: 18px; bottom: 0; width: 2px; background: var(--line);
}
.ak-step:last-child::before { display: none; }
.ak-step__dot { position: relative; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--white); box-shadow: inset 0 0 0 2px var(--ink-400); flex: none; }
.ak-step.is-now .ak-step__dot { background: var(--ice-500); box-shadow: none; }
.ak-step.is-done .ak-step__dot { background: var(--ice-700); box-shadow: none; }
.ak-step__text b { font-weight: 500; }
.ak-step__state { display: block; margin-top: 2px; color: var(--ink-600); }
.ak-box-card { margin-top: 24px; padding: 16px; border-radius: var(--r-16); background: var(--fill); font: 400 15px/20px var(--font); }
.ak-box-card b { display: block; font-weight: 500; margin-bottom: 4px; }
.ak-box-card a { color: var(--ink-900); text-decoration: underline; text-underline-offset: 2px; }
.ak-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.ak-h2 { font: 500 20px/24px var(--font); }
.ak-q { margin-top: 20px; }
.ak-q__label { font: 500 15px/20px var(--font); color: var(--ink-600); }
.ak-q__hint { margin-top: 2px; font: 400 13px/16px var(--font); color: var(--ink-600); }
.ak-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ak-chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: var(--r-12); background: var(--fill);
  font: 400 15px/20px var(--font);
  transition: background-color .15s, box-shadow .15s;
}
.ak-chip[aria-checked="true"], .ak-chip[aria-pressed="true"] { background: var(--ice-100); box-shadow: inset 0 0 0 2px var(--ice-500); }
.ak-saved { min-height: 16px; margin-top: 6px; font: 400 13px/16px var(--font); color: var(--ink-600); }
/* в ту же строку пишется и ошибка: тогда она как все ошибки, чёрная 14/18 со значком жара */
.ak-saved:has(svg) { display: flex; align-items: flex-start; gap: 8px; font: 400 14px/18px var(--font); color: var(--ink-900); }
.ak-saved svg { width: 16px; height: 16px; margin-top: 1px; }
.ak-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.ak-photos:empty { display: none; }
.ak-photo {
  position: relative; aspect-ratio: 1; border-radius: var(--r-12); overflow: hidden;
  background: var(--skeleton) center / cover no-repeat;
}
.ak-photo__err {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 2px; padding: 8px;
  background: var(--fill); font: 400 13px/16px var(--font); text-align: center;
}
.ak-photo__again {
  min-height: 32px; padding: 0 8px;
  font: 500 13px/16px var(--font); color: var(--ice-700);
  text-decoration: underline; text-underline-offset: 2px;
}
.ak-photo__rm {
  position: absolute; top: 0; right: 0;
  display: grid; place-items: center; width: 44px; height: 44px;
  color: var(--ink-600);
}
.ak-photo-add { margin-top: 8px; }
.ak-photo-add svg { width: 22px; height: 22px; --icon-stroke: 1.91; }
.ak-links { display: grid; gap: 4px; margin-top: 24px; }
.ak-links .ak-link { margin-top: 0; }
.ak-text { margin-top: 12px; font: 400 15px/20px var(--font); }

/* телефон: во весь экран. сверху 56 с «Назад» и «Закрыть», под ней прогресс 4, снизу плашка 89 с «Дальше» */
@media (max-width: 600px) {
  body.ak { background: var(--white); }
  .header--anketa {
    position: sticky; top: 0; z-index: 5;
    display: grid; grid-template-columns: 1fr auto 1fr; padding: 0 4px;
  }
  .header--anketa .header__back { display: inline-flex; justify-self: start; }
  .header--anketa .brand { justify-self: center; }
  .header--anketa .header__end { justify-self: end; margin: 0; }
  .header--anketa .login { padding: 0 8px 0 12px; }
  .ak-main { padding: 0; }
  .ak-card { width: auto; padding: 0 16px 24px; border-radius: 0; }
  .ak-nav { display: none; }
  /* прогресс всегда под полосой 56, даже когда экран вопроса листается */
  .ak-progress { position: sticky; top: 56px; z-index: 5; margin: 0 -16px; border-radius: 0; }
  .ak-progress span { border-radius: 0 2px 2px 0; }
  .ak-body { padding-top: 16px; }
  .ak-title { font-size: 22px; line-height: 28px; }
  .ak-opts { margin-top: 16px; }
  .ak-sub { margin-top: 16px; }
  .ak-desk { display: none; }
  .ak-opts--grid { grid-template-columns: 1fr 1fr; }
  .ak-opts--grid .ak-opt { padding: 6px 24px 6px 12px; }
  .ak-opts--grid .ak-opt__tick { position: absolute; top: 6px; right: 6px; width: 16px; height: 16px; --icon-stroke: 2.6; }
  .ak-foot {
    position: fixed; z-index: 6; left: 0; right: 0; bottom: 0;
    margin: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    background: var(--white); border-top: 1px solid var(--line);
  }
  body.has-foot .ak-card { padding-bottom: calc(89px + 16px + env(safe-area-inset-bottom)); }
  /* ошибка, к которой прокручиваем, встаёт над нижней плашкой, а не под ней и не под шапкой */
  html { scroll-padding-top: 64px; scroll-padding-bottom: calc(105px + env(safe-area-inset-bottom)); }
  .ak-skel--hint + .ak-skel--row { margin-top: 16px; }
  .ak-callnum { font-size: 24px; }
  .ak-suggest { max-height: 220px; }
}
/* наведение только мышью: на телефоне после касания строка залипала бы в цвете наведения */
@media (hover: hover) {
  .ak-back:hover { color: var(--ink-900); background: var(--fill); }
  .ak-opt:not([aria-checked="true"]):hover { background: var(--fill-hover); }
  .ak-input:not(:focus-within):hover { background: var(--fill-hover); }
  .ak-suggest li:hover { background: var(--fill); }
  .ak-link:hover { text-decoration: underline; text-underline-offset: 3px; }
  .ak-callnum:hover { background: var(--ice-600); }
  .ak-chip:not([aria-checked="true"]):not([aria-pressed="true"]):hover { background: var(--fill-hover); }
  .ak-photo__rm:hover { color: var(--ink-900); }
}

/* невысокий телефон (360×800, 375×667): строки ответов 52 и зазор 6, чтобы список из девяти не уходил под плашку */
@media (max-width: 600px) and (max-height: 819px) {
  .ak-opts { gap: 6px; }
  .ak-opt { min-height: 52px; }
}
/* на очень узких экранах, например 320, подпись «Закрыть» прячем, остаётся крестик */
@media (max-width: 359px) {
  .header__close span, .header__back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
