:root {
  --blue-50: #eef5ff;
  --blue-100: #dcebff;
  --blue-200: #c3ddff;
  --blue-400: #6ba3ff;
  --blue-500: #3b82f6;
  --blue-600: #2f6bff;
  --navy: #16265c;
  --navy-soft: #5b6b93;
  --card: #ffffff;
  --ok: #2f8ff0;
  --err: #e5484d;
  --shadow: 0 18px 46px rgba(47, 107, 255, 0.14);
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--navy);
  font-family: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 620px at 50% -8%, #ffffff 0%, var(--blue-50) 42%, var(--blue-100) 100%)
    fixed;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) 16px 56px;
}

/* Заголовки */
.title {
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  text-align: center;
}
.subtitle {
  margin: 0 auto 24px;
  max-width: 520px;
  color: var(--navy-soft);
  font-size: clamp(14px, 2.6vw, 16px);
  font-weight: 500;
  text-align: center;
}

/* Карточки */
.card {
  background: var(--card);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

/* Крупная плашка-предупреждение */
.notice {
  display: flex;
  gap: 14px;
  align-items: center;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.notice .rot {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  animation: tilt 2.4s ease-in-out infinite;
}
@keyframes tilt {
  0%, 55%, 100% { transform: rotate(0deg); }
  70%, 90% { transform: rotate(-90deg); }
}
.notice b { font-size: clamp(16px, 3.2vw, 20px); font-weight: 800; display: block; }
.notice span { font-size: 13px; opacity: 0.92; font-weight: 500; }

/* Анимированная демонстрация (наш "gif") */
.demo {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--blue-50);
}
/* Демо с переведённой подписью: картинку кадрируем (срезаем вшитый текст снизу),
   подпись выводим отдельной строкой — переводится через i18n. */
.demo-wrap { width: 100%; max-width: 360px; margin: 0 auto; }
.demo-stage {
  position: relative; width: 100%;
  aspect-ratio: 1254 / 884;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--blue-50);
}
.demo-stage img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  opacity: 0; transition: opacity 0.5s ease;
}
.demo-stage img.on { opacity: 1; }
.demo-cap {
  margin-top: 12px; text-align: center;
  font-weight: 800; font-size: 17px; color: var(--navy);
  min-height: 22px; line-height: 1.25;
}
.demo-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  color: var(--navy);
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0));
}
.demo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.demo img.on { opacity: 1; }
.demo-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #e9ecf2;
}
.demo-dots {
  position: absolute;
  bottom: 12px; left: 0; right: 0;
  z-index: 2;
  display: flex;
  gap: 7px;
  justify-content: center;
}
.demo-dots i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue-200);
  transition: background 0.3s, width 0.3s;
}
.demo-dots i.on { background: var(--blue-600); width: 18px; border-radius: 4px; }

/* Кнопки */
.btn {
  appearance: none;
  border: 0;
  width: 100%;
  border-radius: 16px;
  padding: 16px 22px;
  font: inherit;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  background: var(--navy);
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s, background 0.2s;
}
.btn:not(:disabled):hover { background: #1d326f; }
.btn:active { transform: scale(0.99); }
.btn:disabled,
.btn.primary:disabled {
  background: #c3cad9;
  color: #f2f5fb;
  cursor: not-allowed;
  box-shadow: none;
}
.btn.primary { background: var(--blue-600); }
.btn.primary:not(:disabled):hover { background: var(--blue-500); }
.btn:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 3px; }

/* Чекбокс согласия */
.agree {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1.5px solid var(--blue-200);
  border-radius: 16px;
  background: var(--blue-50);
  cursor: pointer;
  user-select: none;
  margin: 22px 0 14px;
  transition: border-color 0.2s, background 0.2s;
}
.agree.checked { border-color: var(--blue-600); background: #fff; }
.agree input { position: absolute; opacity: 0; pointer-events: none; }
.agree .box {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 8px;
  border: 2px solid var(--blue-400);
  background: #fff;
  display: grid;
  place-items: center;
  color: #fff;
  transition: background 0.2s, border-color 0.2s;
}
.agree.checked .box { background: var(--blue-600); border-color: var(--blue-600); }
.agree .box svg { opacity: 0; transition: opacity 0.15s; }
.agree.checked .box svg { opacity: 1; }
.agree .label { font-weight: 700; font-size: 15px; line-height: 1.35; }

/* Сетка шагов */
.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 8px;
}
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
}
/* Кадрируем миниатюру шага: срезаем вшитую подпись снизу (текст на картинке). */
.step img { display: block; width: 100%; aspect-ratio: 1254 / 884; object-fit: cover; object-position: center top; }
.step .n {
  position: absolute;
  top: 10px; left: 10px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--blue-600);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(47,107,255,0.35);
}

.section-h {
  font-size: 18px;
  font-weight: 800;
  margin: 30px 0 12px;
  text-align: center;
}

.center { text-align: center; }
.mt { margin-top: 18px; }

/* Таймер принудительного ознакомления (45 сек) */
.timer {
  display: flex;
  gap: 18px;
  align-items: center;
  background: linear-gradient(135deg, #f2f7ff, #e2edff);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  margin: 26px 0 4px;
}
.timer.done {
  background: linear-gradient(135deg, #eafaf0, #dff5e8);
  border-color: #b7e8cd;
}
.timer-ring { flex: none; position: relative; width: 84px; height: 84px; }
.timer-ring > svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring .track { fill: none; stroke: var(--blue-100); stroke-width: 8; }
.timer-ring .bar {
  fill: none;
  stroke: url(#tg);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.25s linear;
}
.timer-ring .num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--blue-600);
  font-variant-numeric: tabular-nums;
}
.timer-ring .num small { font-size: 12px; font-weight: 700; color: var(--navy-soft); }
.timer-ring .check { color: #2fb673; opacity: 0; transition: opacity 0.3s; }
.timer.done .check { opacity: 1; }
.timer.done .num { opacity: 0; }
/* когда время вышло - мягкий зелёный круг вокруг галочки */
.timer.done .track { stroke: #a7e6c4; }
.timer.done .bar { stroke: #6fce9a; stroke-dashoffset: 0 !important; }
.timer-text b { display: block; font-size: 15.5px; font-weight: 800; margin-bottom: 3px; }
.timer-text span { font-size: 13.5px; color: var(--navy-soft); font-weight: 500; line-height: 1.4; }

@media (max-width: 440px) {
  .timer { flex-direction: row; gap: 14px; padding: 16px; }
  .timer-ring { width: 72px; height: 72px; }
  .timer-ring .num { font-size: 21px; }
}
