:root {
  --bg: #ebeff3;
  --ink: #1a2433;
  --muted: #667483;
  --line: #d7dee7;
  --card: #ffffff;
  --navy: #243b55;
  --navy-deep: #1a2d42;
  --accent: #2f4f73;
  --soft: #f4f6f8;
  --wa: #25d366;
  --ok: #1b6b45;
  --shadow: 0 14px 40px rgba(26, 45, 66, 0.10);
  --font: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}

.hidden { display: none !important; }

.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(700px 280px at 50% 0%, rgba(47, 79, 115, 0.08), transparent 70%),
    linear-gradient(180deg, #f5f7f9 0%, var(--bg) 55%, #e4e9ef 100%);
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 14px max(22px, env(safe-area-inset-bottom));
}

.panel {
  position: relative;
  width: min(440px, 100%);
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(26, 45, 66, 0.08);
  border-radius: 18px;
  padding: 26px 20px 18px;
  box-shadow: var(--shadow);
}

.mark {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.mark-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--navy-deep);
  color: #fff;
}

.mark-icon svg { width: 22px; height: 22px; }

.headline {
  margin: 0 0 10px;
  text-align: center;
  font-size: clamp(20px, 5.2vw, 26px);
  line-height: 1.3;
  font-weight: 800;
  color: var(--navy-deep);
  letter-spacing: -0.02em;
}

.subhead {
  margin: 0 auto 18px;
  max-width: 34ch;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 500;
}

.flow-steps {
  list-style: none;
  margin: 0 0 20px;
  padding: 12px 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.flow-steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 0 6px;
}

.flow-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 14px;
  right: -12%;
  width: 24%;
  height: 1px;
  background: #cfd7e1;
}

.flow-num {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--navy);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.flow-num.is-active,
.flow-num.progress-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(36, 59, 85, 0.14);
}

.flow-steps li:has(.flow-num.is-active) .flow-text,
.flow-steps li:has(.flow-num.progress-active) .flow-text {
  color: var(--navy-deep);
  font-weight: 750;
}

.flow-text {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.25;
  transition: color .2s ease;
}

.dynamic { min-height: 230px; position: relative; z-index: 1; }

.state { width: 100%; }

.field input {
  width: 100%;
  height: 52px;
  border: 1px solid #cdd5df;
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
  text-align: center;
  font-size: 13.5px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.field input::placeholder { color: #8f9bab; }

.field input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 79, 115, 0.12);
}

.hint {
  margin: 8px 0 0;
  text-align: center;
  color: #9a3412;
  font-size: 12px;
  font-weight: 600;
}

.proof {
  margin: 10px 0 14px;
  text-align: center;
  color: #7d8a98;
  font-size: 12px;
}

.btn-primary {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 18px rgba(26, 45, 66, 0.18);
  transition: background .2s ease, transform .15s ease;
}

.btn-ico { width: 18px; height: 18px; }

.btn-primary:hover { background: var(--accent); }
.btn-primary:active { transform: scale(0.985); }

.trust-foot {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.trust-foot li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #6b7887;
  font-size: 10.5px;
  font-weight: 650;
  text-align: center;
  line-height: 1.2;
}

.trust-foot svg {
  width: 16px;
  height: 16px;
  color: var(--navy);
}

.disclaimer {
  margin: 14px 0 6px;
  text-align: center;
  color: #93a0ad;
  font-size: 10.5px;
  line-height: 1.4;
}

.skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 54px;
  pointer-events: none;
  opacity: 0.14;
  background:
    linear-gradient(180deg, transparent, rgba(26, 45, 66, 0.08)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 440 54' fill='%231a2d42'%3E%3Cpath d='M0 54V34h18v20H0zm22 0V22h14v32H22zm18 0V28h10v8h8V18h16v36H40zm38 0V14h20v40H78zm24 0V26h12v28H102zm16 0V20h18v34h-18zm22 0V30h10v24h-10zm14 0V16h22v38H154zm26 0V24h14v30h-14zm18 0V12h20v42h-20zm24 0V28h12v26h-12zm16 0V18h18v36h-18zm22 0V26h14v28h-14zm18 0V20h20v34h-20zm24 0V30h12v24h-12zm16 0V15h22v39h-22zm26 0V24h16v30h-16zm20 0V28h18v26h-18zm22 0V18h20V54z'/%3E%3C/svg%3E")
    bottom center / 100% 54px no-repeat;
}

.state-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 0 18px;
}

.state-loading.hidden { display: none !important; }

.loader {
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 50%;
  border: 3px solid #d7e0ea;
  border-top-color: var(--navy);
  animation: spin .85s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-label {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 650;
}

.progress-track {
  width: min(280px, 100%);
  height: 7px;
  border-radius: 999px;
  background: #e5ebf1;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--navy);
  transition: width .12s linear;
}

.loading-meta {
  margin: 8px 0 0;
  color: #8b96a3;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.result-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

.result-modal.hidden { display: none !important; }

.result-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 28, 42, 0.48);
  backdrop-filter: blur(4px);
}

.result-modal-card {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  background: #fff;
  border: 1px solid rgba(26, 45, 66, 0.08);
  border-radius: 18px;
  padding: 28px 20px 20px;
  box-shadow: 0 24px 60px rgba(17, 28, 42, 0.22);
  text-align: center;
  animation: result-in .3s ease-out;
}

@keyframes result-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(102, 116, 131, 0.32);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.result-close:hover {
  color: rgba(102, 116, 131, 0.72);
  background: rgba(26, 45, 66, 0.04);
}

.result-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(27, 107, 69, 0.1);
  color: var(--ok);
  font-size: 11px;
  font-weight: 750;
}

.result-title {
  margin: 0 0 14px;
  color: var(--navy-deep);
  font-size: clamp(18px, 4.8vw, 22px);
  line-height: 1.35;
  font-weight: 800;
}

.result-title #result-symbol {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.result-note {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.result-note-lead {
  margin: 0;
  color: #667483 !important;
  -webkit-text-fill-color: #667483 !important;
  background: none !important;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
}

.wa-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 999px;
  background: var(--wa);
  color: #fff !important;
  font-weight: 800;
  font-size: 14.5px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.24);
}

.wa-cta-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: currentColor;
}

.wa-cta-pulse { animation: wa-breathe 1.8s ease-in-out infinite; }

@keyframes wa-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}

.result-btn-sub {
  margin: 12px 0 0;
  color: #7d8996;
  font-size: 11.5px;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .panel {
    width: min(480px, 100%);
    padding: 32px 28px 22px;
  }
  .headline { font-size: 28px; }
  .subhead { font-size: 14.5px; }
  .flow-text { font-size: 12.5px; }
  .btn-primary { min-height: 54px; font-size: 15.5px; }
  .trust-foot li { font-size: 11.5px; }
}

@media (max-width: 380px) {
  .headline { font-size: 18px; }
  .flow-text { font-size: 10.5px; }
  .flow-steps { padding: 10px 4px; }
  .trust-foot li { font-size: 9.5px; }
  .btn-primary { font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-cta-pulse,
  .loader,
  .result-modal-card { animation: none; }
}
