:root {
  --font-sans: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --aegis-ink: #10253f;
  --aegis-navy: #15314f;
  --aegis-blue: #1f7af5;
  --aegis-blue-deep: #1256c9;
  --aegis-sky: #eff6ff;
  --aegis-silver: #d6e2f0;
  --aegis-bg: #edf3f9;
  --aegis-panel: rgba(255, 255, 255, 0.88);
  --aegis-text: #23384f;
  --aegis-muted: #667b93;
  --card-border: rgba(120, 146, 176, 0.18);
  --shadow-lg: 0 28px 70px rgba(14, 32, 53, 0.14);
  --shadow-md: 0 16px 40px rgba(14, 32, 53, 0.1);
  --shadow-sm: 0 8px 24px rgba(14, 32, 53, 0.08);
  --danger: #b54040;
  --success: #177245;
  --field-bg: rgba(255, 255, 255, 0.94);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  position: relative;
  overflow-x: hidden;
  font-family: var(--font-sans);
  color: var(--aegis-text);
  background:
    radial-gradient(circle at 12% 16%, rgba(31, 122, 245, 0.18), transparent 24%),
    radial-gradient(circle at 88% 20%, rgba(18, 86, 201, 0.12), transparent 28%),
    radial-gradient(circle at 52% 100%, rgba(16, 37, 63, 0.08), transparent 34%),
    linear-gradient(180deg, #f9fbfe 0%, var(--aegis-bg) 54%, #e8f0f8 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  filter: blur(10px);
}

body::before {
  inset: auto auto -140px -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 122, 245, 0.22), transparent 68%);
}

body::after {
  inset: 70px -140px auto auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 37, 63, 0.14), transparent 70%);
}

img {
  display: block;
  max-width: 100%;
}

.wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.card {
  position: relative;
  width: 100%;
  max-width: 980px;
  padding: 42px 28px 36px;
  border: 1px solid var(--card-border);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 253, 0.94));
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  text-align: center;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, rgba(31, 122, 245, 0.08), rgba(31, 122, 245, 0.94), rgba(16, 37, 63, 0.68));
}

.logo-wrap {
  width: min(360px, 88%);
  margin: 0 auto 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(16, 37, 63, 0.08));
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  margin-bottom: 16px;
  border-radius: 999px;
  border: 1px solid rgba(31, 122, 245, 0.18);
  background: rgba(31, 122, 245, 0.09);
  color: var(--aegis-blue-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 16px;
  color: var(--aegis-ink);
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

p {
  margin: 12px auto;
  max-width: 760px;
  font-size: 1.06rem;
  line-height: 1.72;
}

.muted,
.section-sub,
.radio-desc {
  color: var(--aegis-muted);
}

.muted {
  font-size: 0.95rem;
}

.divider {
  width: 124px;
  height: 5px;
  margin: 28px auto 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(214, 226, 240, 0.4), rgba(31, 122, 245, 0.96), rgba(16, 37, 63, 0.4));
}

.section-title {
  margin: 0 0 10px;
  color: var(--aegis-ink);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 0 auto 18px;
  max-width: 760px;
  font-size: 0.98rem;
  line-height: 1.65;
}

.next-step-box,
.status {
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(124, 151, 181, 0.18);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(241, 247, 255, 0.92));
  box-shadow: var(--shadow-sm);
}

.next-step-box {
  max-width: 760px;
  margin-top: 28px;
  margin-bottom: 14px;
  padding: 24px 22px;
  text-align: left;
}

.next-step-title,
.radio-title {
  color: var(--aegis-ink);
  font-weight: 800;
}

.next-step-title {
  margin-bottom: 10px;
  font-size: 1.14rem;
}

.next-step-text {
  font-size: 0.98rem;
  line-height: 1.68;
}

.button-row,
.store-row,
.badge-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.button-row {
  margin-top: 22px;
}

button,
.web-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 15px 24px;
  border-radius: 16px;
  border: 1px solid rgba(121, 145, 173, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(234, 241, 249, 0.95));
  color: var(--aegis-ink);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

button:hover,
.web-btn:hover,
.store-btn:hover,
.store-badge:hover,
.radio-card:hover {
  transform: translateY(-2px);
}

button:hover,
.web-btn:hover {
  border-color: rgba(31, 122, 245, 0.28);
  box-shadow: var(--shadow-md);
}

button.primary {
  color: #fff;
  border-color: rgba(18, 86, 201, 0.5);
  background: linear-gradient(135deg, #2a89ff, var(--aegis-blue-deep));
  box-shadow: 0 16px 32px rgba(18, 86, 201, 0.24);
}

button.primary:hover {
  background: linear-gradient(135deg, #3994ff, #0f4eb9);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
  text-align: left;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  color: var(--aegis-ink);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

input,
select {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid rgba(121, 145, 173, 0.24);
  border-radius: 15px;
  outline: none;
  background: var(--field-bg);
  color: var(--aegis-ink);
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(14, 32, 53, 0.03);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input::placeholder {
  color: #8a9aae;
}

input:focus,
select:focus {
  border-color: rgba(31, 122, 245, 0.7);
  box-shadow: 0 0 0 4px rgba(31, 122, 245, 0.12);
  background: #fff;
}

.radio-card-row {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  text-align: left;
}

.radio-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid rgba(121, 145, 173, 0.2);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 247, 255, 0.86));
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.radio-card:has(input:checked) {
  border-color: rgba(31, 122, 245, 0.42);
  box-shadow: var(--shadow-sm);
}

.radio-card input {
  width: auto;
  margin-top: 4px;
  box-shadow: none;
}

.radio-desc {
  margin: 4px 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.status {
  max-width: 660px;
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 16px 18px;
  font-size: 1rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.status.error {
  color: var(--danger);
  border-color: rgba(181, 64, 64, 0.18);
  background: linear-gradient(180deg, rgba(255, 247, 247, 0.96), rgba(255, 239, 239, 0.92));
}

.status.ok {
  color: var(--success);
  border-color: rgba(23, 114, 69, 0.16);
  background: linear-gradient(180deg, rgba(243, 255, 249, 0.96), rgba(233, 250, 241, 0.92));
}

.spinner {
  width: 44px;
  height: 44px;
  margin: 12px auto 22px;
  border-radius: 50%;
  border: 4px solid rgba(31, 122, 245, 0.12);
  border-top-color: var(--aegis-blue);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.store-row,
.badge-row {
  margin: 28px 0 14px;
}

.store-btn,
.store-badge {
  display: inline-block;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.store-btn:hover,
.store-badge:hover {
  border-color: rgba(31, 122, 245, 0.2);
  box-shadow: var(--shadow-md);
  border-radius: 30px;
}

.store-btn img,
.store-badge img {
  width: 280px;
  max-width: 100%;
  height: auto;
}

.web-btn {
  margin-top: 18px;
}

.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .wrap {
    padding: 22px 14px;
  }

  .card {
    padding: 30px 18px 24px;
    border-radius: 22px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  button,
  .web-btn {
    width: 100%;
    min-width: 0;
  }

  .store-btn,
  .store-badge {
    width: min(100%, 320px);
  }

  .store-btn img,
  .store-badge img {
    width: 100%;
  }
}
