:root {
  --pink: #fdecee;
  --pink-strong: #fbd9dc;
  --teal-light: #e3f8f8;
  --teal: #3fc9c9;
  --teal-dark: #2aa9a9;
  --blue: #5b7ff0;
  --blue-dark: #4666d1;
  --ink: #22262f;
  --muted: #5b6270;
  --card-radius: 18px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", "PT Sans", Arial, sans-serif;
  color: var(--ink);
  background: #f4f6f8;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid #e6e9ee;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar .brand {
  font-weight: 700;
  font-size: 19.5px;
  color: var(--blue-dark);
  white-space: nowrap;
}

.progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 500px;
}

.progress-label {
  font-size: 17px;
  color: var(--muted);
  white-space: nowrap;
}

.progress-track {
  flex: 1;
  height: 6px;
  background: #e9ecf1;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 4px;
  transition: width .25s ease;
  width: 0%;
}

main.stage {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 32px 16px 120px;
}

.screen {
  display: none;
  width: 100%;
  max-width: var(--max-width);
  animation: fadeIn .25s ease;
}

.screen.active { display: block; }

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

.card {
  background: #fff;
  border-radius: var(--card-radius);
  padding: 28px 30px;
  box-shadow: 0 1px 3px rgba(20,20,40,.06);
}

h1.slide-title {
  font-size: 34px;
  line-height: 1.3;
  margin: 0 0 20px;
}

h2.slide-heading {
  font-size: 26px;
  margin: 0 0 16px;
}

p { line-height: 1.6; font-size: 20px; }

.lead {
  font-size: 22px;
  line-height: 1.55;
  margin-bottom: 20px;
}

.callout {
  border-radius: 14px;
  padding: 18px 22px;
  margin: 18px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 19.5px;
  line-height: 1.55;
}

.callout .ico {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  margin-top: 2px;
}

.callout.info { background: var(--teal-light); }
.callout.info .ico { background: var(--teal); }

.callout.warn { background: #eef0f3; }
.callout.warn .ico { background: #e2a53a; }

.callout.pink { background: var(--pink); }
.callout.pink .ico { background: #ee6b7a; }

.callout.pink-strip {
  background: var(--pink);
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 20px;
}
.callout.pink-strip img { width: 110px; flex: 0 0 auto; }
.callout.pink-strip .txt { border-left: 3px solid #f2c3c9; padding-left: 18px; font-size: 19.5px; line-height: 1.6; }

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 20px;
}
@media (max-width: 720px) { .step-grid { grid-template-columns: repeat(2, 1fr); } }

.step-card {
  background: var(--blue);
  color: #fff;
  border-radius: 14px;
  padding: 22px 16px;
  text-align: center;
  font-weight: 700;
  font-size: 19.5px;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-card u { text-decoration: underline; }
.step-card.desc b { margin-right: 5px; }

.step-card.desc {
  background: var(--teal-light);
  color: var(--ink);
  font-weight: 400;
  font-size: 18px;
  text-align: left;
}

.rule-block {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  align-items: start;
  padding: 22px 0;
}
.rule-block + .rule-block { border-top: 1px solid #eee; }

.rule-num {
  border: 3px solid #222;
  border-radius: 6px;
  font-size: 39px;
  font-weight: 800;
  color: var(--blue);
  width: 88px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-1deg);
}

.rule-title {
  display: inline-block;
  font-weight: 700;
  font-size: 20px;
  background: var(--pink-strong);
  padding: 10px 18px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.rule-block.teal .rule-title { background: var(--teal-light); }

.rule-body ul { margin: 10px 0; padding-left: 20px; }
.rule-body li { margin-bottom: 6px; font-size: 19.5px; line-height: 1.5; }

.method {
  margin: 10px 0;
  font-size: 19.5px;
}
.method b { color: var(--blue-dark); margin-right: 6px; }

.numbered-list { margin-top: 10px; }
.numbered-item {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}
.numbered-item .n {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 24px 0;
  text-align: center;
}
@media (max-width: 720px) { .data-grid { grid-template-columns: repeat(2, 1fr); } }
.data-grid img { width: 100%; max-width: 130px; }
.data-grid .cap { font-size: 17.5px; margin-top: 8px; color: var(--ink); }

.illustration-row {
  display: flex;
  align-items: center;
  gap: 30px;
  background: var(--teal-light);
  border-radius: var(--card-radius);
  padding: 30px;
}
.illustration-row img { width: 180px; flex: 0 0 auto; }
.illustration-row .txt { font-size: 27.5px; font-weight: 700; line-height: 1.4; }
@media (max-width: 640px) { .illustration-row { flex-direction: column; text-align: center; } }

.next-hint {
  margin-top: 18px;
  font-size: 17.5px;
  color: var(--muted);
}

.phrase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}
@media (max-width: 720px) { .phrase-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .phrase-grid { grid-template-columns: 1fr; } }

.phrase-card {
  background: var(--teal);
  color: #fff;
  border-radius: 14px;
  padding: 16px;
  font-size: 17.5px;
  line-height: 1.4;
  cursor: pointer;
  position: relative;
  min-height: 140px;
  display: flex;
  align-items: flex-end;
  transition: transform .15s ease;
}
.phrase-card:hover { transform: translateY(-2px); }
.phrase-card .bubble-ico {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 22px;
  border-radius: 8px;
  background: rgba(255,255,255,.85);
}
.phrase-card .verdict {
  display: none;
  background: rgba(0,0,0,.28);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 16.5px;
  position: absolute;
  inset: 8px;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.phrase-card.flipped .verdict { display: flex; }
.phrase-card.flipped .front-text { visibility: hidden; }
.phrase-card.risk { background: #ef8a8a; }
.phrase-card.safe { background: #3fc9c9; }

.email-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
@media (max-width: 700px) { .email-grid { grid-template-columns: 1fr; } }

.email-card {
  background: var(--teal-light);
  border-radius: 14px;
  padding: 18px;
}
.email-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.avatar {
  width: 50px; height: 50px; border-radius: 50%;
  background: #cfd6de; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: #8b95a3; font-size: 26px;
}
.email-meta { font-size: 15.5px; color: var(--muted); }
.email-subject { font-weight: 700; font-size: 19px; margin-top: 2px; }
.email-body { font-size: 17.5px; line-height: 1.5; }
.email-body a { color: #3b6fe0; }
.email-cap { font-size: 16.5px; font-style: italic; color: var(--muted); margin-top: 10px; }

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 10px;
}
@media (max-width: 700px) { .faq-grid { grid-template-columns: 1fr; } }
.faq-card {
  background: #eef3fb;
  border-radius: 14px;
  padding: 20px;
}
.faq-card h3 {
  font-size: 19.5px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 12px;
}
.faq-card ol { padding-left: 20px; margin: 0; }
.faq-card li { font-size: 18px; margin-bottom: 8px; line-height: 1.45; }

/* Cover / results */
.cover, .results {
  text-align: center;
  background: var(--teal);
  border-radius: var(--card-radius);
  padding: 60px 30px;
  color: #fff;
}
.cover h1, .results h1 { font-size: 39px; margin-bottom: 14px; }
.cover p, .results p { font-size: 21px; opacity: .95; }
.cover .cover-illustration, .quiz-intro .cover-illustration {
  width: 220px;
  margin: 20px auto;
  display: block;
}

.tg-login-box {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.tg-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tg-qr-wrap img {
  width: 180px;
  height: 180px;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  display: none;
}
.tg-qr-wrap img[src] { display: block; }
.tg-qr-hint { font-size: 13px; opacity: .85; }
.tg-status { font-size: 15px; opacity: .95; min-height: 1.4em; }

.quiz-intro {
  background: var(--teal);
  border-radius: var(--card-radius);
  padding: 50px 30px;
  text-align: center;
  color: #fff;
}
.quiz-intro .badge {
  background: #fdd835;
  color: #222;
  font-weight: 700;
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 18px;
  margin-bottom: 6px;
}
.quiz-intro h1 { font-size: 34px; margin: 10px 0; }

/* Quiz question */
.q-progress { font-size: 17px; color: var(--teal-dark); font-weight: 700; margin-bottom: 8px; }
.q-title { font-size: 23.5px; font-weight: 700; margin-bottom: 18px; }

.q-media { margin-bottom: 20px; }

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

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f7f8fa;
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 19px;
  transition: background .15s ease;
}
.option:hover { background: #eef1f5; }
.option input { width: 18px; height: 18px; flex: 0 0 auto; }
.option .mark {
  margin-left: auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  flex: 0 0 auto;
}
.option.show-correct { background: #e4f9ee; }
.option.show-correct .mark { display: flex; background: var(--teal); }
.option.show-wrong { background: #fdeaea; }
.option.show-wrong .mark { display: flex; background: #e05a5a; }
.option.locked { pointer-events: none; }

.feedback {
  margin-top: 24px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #eee;
  display: none;
}
.feedback.show { display: block; }
.feedback .fico {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: 31px;
}
.feedback.wrong .fico { border-color: #e05a5a; color: #e05a5a; }
.feedback .verdict-text { font-weight: 700; font-size: 22px; margin-bottom: 8px; }
.feedback .explain { font-size: 19px; color: var(--muted); max-width: 560px; margin: 0 auto; }
.feedback .explain ul { text-align: left; display: inline-block; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 10px;
  padding: 13px 26px;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  background: var(--teal);
  color: #fff;
  transition: background .15s ease;
}
.btn:hover { background: var(--teal-dark); }
.btn:disabled { background: #cbd1d8; cursor: not-allowed; }
.btn.secondary { background: #e9ecf1; color: var(--ink); }
.btn.secondary:hover { background: #dde1e8; }
.btn.on-light { background: #fff; color: var(--teal-dark); }

.inline-action { margin-top: 22px; text-align: center; }

/* Phone / chat mockups */
.phone-mock {
  width: 260px;
  margin: 0 auto 20px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.12);
  border: 1px solid #e2e5ea;
}
.phone-status {
  background: #f5f6f8;
  font-size: 14.5px;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  color: #555;
}
.phone-header {
  background: #fff;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 18px;
  border-bottom: 1px solid #eee;
}
.phone-body { background: #fff; padding: 14px 12px; }
.chat-date { text-align: center; font-size: 14.5px; color: #999; margin-bottom: 8px; }
.chat-bubble {
  background: #eef0f3;
  border-radius: 12px;
  padding: 12px;
  font-size: 17.5px;
  line-height: 1.45;
}
.chat-bubble a { color: #3b6fe0; }

.vk-mock {
  width: 300px;
  margin: 0 auto 20px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2e5ea;
  box-shadow: 0 4px 18px rgba(0,0,0,.1);
}
.vk-top { background: #fff; padding: 10px 12px; font-size: 17px; font-weight: 700; border-bottom: 1px solid #eee; }
.vk-unread { background: #f7f8fa; font-size: 14.5px; color: #999; padding: 6px 12px; }
.vk-msg { background: #eaf2fb; margin: 10px; padding: 12px; border-radius: 10px; font-size: 16.5px; line-height: 1.5; }
.vk-msg a { color: #3b6fe0; }
.vk-banner {
  margin-top: 8px;
  background: #2f5fa8;
  color: #fff;
  text-align: center;
  padding: 10px;
  font-weight: 800;
  font-size: 15.5px;
  border-radius: 6px;
}

.mail-mock {
  border: 1px solid #e2e5ea;
  border-radius: 14px;
  overflow: hidden;
  max-width: 480px;
  margin: 0 auto 20px;
  box-shadow: 0 4px 18px rgba(0,0,0,.08);
}
.mail-toolbar { background: #f5f6f8; padding: 8px 14px; font-size: 19.5px; color: #888; }
.mail-subject-row { padding: 12px 14px 4px; font-size: 17px; color: #999; }
.mail-from-row { padding: 0 14px 10px; font-size: 17.5px; display:flex; align-items:center; gap: 8px; }
.mail-from-row .chip { background:#e2ecfb; color:#3b6fe0; padding:2px 8px; border-radius: 6px; font-size: 15.5px; }
.mail-body { padding: 6px 14px 16px; font-size: 17.5px; line-height: 1.55; border-top: 1px solid #f0f0f0; }
.mail-body a { color: #3b6fe0; }
.mail-body .sig { margin-top: 12px; }

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid #e6e9ee;
  padding: 14px 20px;
  display: flex;
  justify-content: center;
  gap: 14px;
  z-index: 20;
}
.bottom-nav .inner {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 600px) {
  .card { padding: 22px 18px; }
  h1.slide-title { font-size: 28.5px; }
  .rule-block { grid-template-columns: 70px 1fr; gap: 12px; }
  .rule-num { width: 64px; height: 54px; font-size: 28.5px; }
}
