/* Marlin — дизайн-стандарт 2026: светлая тема, монохром + 1 морской акцент,
 * SVG-иконки, без градиентов. Telegram-aware через var(--tg-*). */

:root {
  --accent: #0a6e8a;          /* глубокое море — единственный акцент */
  --accent-ink: #ffffff;
  --ink: #17252b;
  --ink-soft: #5b6b72;
  --line: #e3e9ec;
  --bg: var(--tg-theme-bg-color, #ffffff);
  --card: #f5f8f9;
  --radius: 14px;
  --error: #b3261e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

#app { max-width: 480px; margin: 0 auto; padding: 20px 16px 32px; }

/* ---------------------------------------------------------------- экраны */
.screen { display: none; }
.screen.active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }

/* ---------------------------------------------------------------- hero */
.hero { text-align: center; padding: 28px 0 20px; }
.hero-icon { width: 64px; height: 64px; color: var(--accent); margin-bottom: 12px; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.tagline { color: var(--ink-soft); margin-top: 6px; font-size: 15px; }

.hero-points {
  list-style: none; margin: 20px auto 4px; text-align: left; max-width: 320px;
}
.hero-points li {
  padding: 8px 0 8px 28px; position: relative; font-size: 15px; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.hero-points li:last-child { border-bottom: none; }
.hero-points li::before {
  content: ""; position: absolute; left: 2px; top: 14px; width: 14px; height: 8px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------------------------------------------------------------- кнопки */
.btn {
  display: block; width: 100%; padding: 15px; border: none; border-radius: var(--radius);
  font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 12px;
  transition: opacity .15s ease, transform .05s ease;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .5; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--line); }

.lang-switch { text-align: center; margin-top: 20px; }
.lang {
  border: 1.5px solid var(--line); background: transparent; color: var(--ink-soft);
  padding: 6px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.lang:first-child { border-radius: 8px 0 0 8px; }
.lang:last-child { border-radius: 0 8px 8px 0; margin-left: -1.5px; }
.lang.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------------------------------------------------------------- квиз */
.quiz-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.back {
  background: none; border: none; color: var(--ink-soft); cursor: pointer;
  padding: 4px; display: flex;
}
.progress { flex: 1; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress .bar { height: 100%; background: var(--accent); border-radius: 2px; transition: width .25s ease; }

h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
.quiz-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 16px; }

.options { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.option {
  position: relative; text-align: left; padding: 15px 16px; background: var(--card);
  border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer;
  font-size: 16px; display: flex; flex-direction: column; gap: 3px;
  transition: border-color .12s ease;
}
.option:active { border-color: var(--accent); }
.opt-label { font-weight: 600; color: var(--ink); }
.opt-sub { font-size: 13px; color: var(--ink-soft); }
.badge {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent); border: 1.5px solid var(--accent); border-radius: 6px; padding: 3px 8px;
}

/* ---------------------------------------------------------------- карточки/поля */
.card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 16px; font-size: 15px; line-height: 1.5; margin: 14px 0;
}

.own-flags { list-style: none; margin-top: 12px; }
.own-flags li {
  position: relative; padding: 6px 0 6px 24px; font-size: 14px; color: var(--ink-soft);
}
.own-flags li::before {
  content: ""; position: absolute; left: 2px; top: 13px; width: 11px; height: 6px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.field { display: block; margin-top: 14px; }
.field span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 13px 14px; font-size: 16px; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }

.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.consent span { font-size: 13px; color: var(--ink-soft); line-height: 1.45; }

.error { color: var(--error); font-size: 14px; margin-top: 10px; }
.fineprint { font-size: 12px; color: var(--ink-soft); line-height: 1.45; margin-top: 10px; }

/* ---------------------------------------------------------------- ROI */
.roi-result { display: flex; flex-direction: column; gap: 10px; }
.roi-row { display: flex; flex-direction: column; gap: 2px; }
.roi-row span { font-size: 12px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; }
.roi-row b { font-size: 17px; }
.roi-row i { font-style: normal; font-size: 13px; color: var(--ink-soft); }

/* ---------------------------------------------------------------- done/leads */
.done-mark { text-align: center; color: var(--accent); padding: 36px 0 16px; }
#s-done h2, #s-done .quiz-sub { text-align: center; }

.lead-card { display: flex; flex-direction: column; gap: 4px; }
.lead-card span { font-size: 13px; color: var(--ink-soft); }

/* ---------------------------------------------------------------- узкие экраны */
@media (max-width: 340px) {
  h1 { font-size: 21px; }
  h2 { font-size: 18px; }
  .btn, .option { font-size: 15px; }
}
