:root {
  --bg: #ffffff;
  --navy: #001b44;
  --blue: #0056d2;
  --blue-hover: #0046ad;
  --blue-soft: #ebf2ff;
  --blue-border: #d1e6ff;
  --muted: #5b6b86;
  --error: #c62828;
  --white: #ffffff;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 12px 40px rgba(0, 27, 68, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--navy);
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.marketing-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 16px 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: inherit;
  text-decoration: none;
}

.brand span {
  color: var(--blue);
}

.marketing-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.marketing-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--navy);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.marketing-nav a:hover,
.marketing-nav a.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}

.marketing-nav a.marketing-nav-login {
  margin-left: auto;
  background: var(--blue);
  color: var(--white);
}

.marketing-nav a.marketing-nav-login:hover,
.marketing-nav a.marketing-nav-login.is-active {
  background: var(--blue-hover);
  color: var(--white);
}

.brand:focus-visible,
.marketing-nav a:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

main {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 20px 48px;
  flex: 1;
  width: 100%;
}

.visual h1 {
  margin: 0 0 20px;
}

.panel {
  min-width: 0;
}

.card {
  background: var(--white);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px 20px 20px;
}

.panel .card {
  height: 640px;
}

#lead-form.card {
  display: flex;
  flex-direction: column;
}

#lead-form .step.is-active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

#lead-form .step.is-active:has(.choice-scroll) {
  overflow: hidden;
}

.choice-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.choice-scroll legend {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--white);
}

.choice-list {
  padding-right: 4px;
}

.choice-scroll::-webkit-scrollbar {
  width: 6px;
}

.choice-scroll::-webkit-scrollbar-thumb {
  background: var(--blue-border);
  border-radius: 999px;
}

#lead-form .nav {
  margin-top: auto;
  position: relative;
  z-index: 2;
  background: var(--white);
}

.progress-track {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.progress-track .dot {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--blue-soft);
}

.progress-track .dot.is-done,
.progress-track .dot.is-active {
  background: var(--blue);
}

.hero {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  margin: 0 0 12px;
}

.step-visual {
  display: none;
}

.flow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
}

.flow a {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--blue-border);
  border-radius: 12px;
  background: var(--white);
  text-decoration: none;
  color: inherit;
}

.flow a:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.flow a strong {
  font-size: 14px;
  color: var(--navy);
}

.flow a span:last-child {
  grid-column: 2;
  font-size: 12px;
  font-weight: 400;
  color: var(--blue);
}

.flow-icon,
.choice-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}

.flow-icon {
  grid-row: 1 / span 2;
}

.flow-icon svg,
.choice-ico svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.flow-icon.is-lg {
  width: 64px;
  height: 64px;
}

.flow-icon.is-lg svg {
  width: 32px;
  height: 32px;
}

.thanks-visual {
  display: flex;
  justify-content: center;
  margin: 4px 0 16px;
}

h1 {
  margin: 0 0 24px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--navy);
}

#thanks h1 {
  margin-bottom: 10px;
  color: var(--blue);
}

.progress {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.step {
  display: none;
}

.step.is-active {
  display: block;
}

label,
legend {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

select,
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 14px 14px;
  border: 1px solid var(--blue-border);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%230056d2' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

select:focus,
input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.field {
  margin-bottom: 16px;
}

.field:last-child {
  margin-bottom: 0;
}

.other-field {
  display: none;
  margin-top: 10px;
}

.other-field.is-visible {
  display: block;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  border: 1px solid var(--blue-border);
  border-radius: 10px;
  background: var(--white);
}

.choice .choice-ico {
  flex: none;
}

.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.choice:has(input:checked) {
  background: var(--blue-soft);
  border-color: var(--blue);
}

.choice:has(input:checked) .choice-ico {
  background: var(--blue);
  color: var(--white);
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.error {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: var(--error);
  font-size: 13px;
  font-weight: 600;
}

.captcha {
  flex: 1 0 100%;
  margin: 0;
}

.captcha[hidden] {
  display: none !important;
}

.submit-error {
  margin-top: 12px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  flex: none;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 13px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.btn-back {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--blue-border);
}

.btn-next,
.btn-submit {
  flex: 1;
  background: var(--blue);
  color: var(--white);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-back {
  text-decoration: none;
}

a.btn {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

main.inner {
  display: block;
  max-width: 1120px;
}

.tariffs {
  display: grid;
  gap: 16px;
}

.tariff {
  display: flex;
  flex-direction: column;
  height: auto;
}

.tariff h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.tariff .price {
  margin: 0 0 16px;
  color: var(--blue);
  font-size: 28px;
  font-weight: 700;
}

.tariff ul {
  margin: 0 0 24px;
  padding: 0 0 0 18px;
  flex: 1;
  color: var(--muted);
}

.tariff li {
  margin-bottom: 8px;
}

.lead {
  margin: 0 0 28px;
  max-width: 28em;
  color: var(--muted);
  font-size: 18px;
}

.contact-ways {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.contact-way {
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--blue-border);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}

.contact-way:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.contact-way .flow-icon {
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
}

.contact-way strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
}

.contact-way span:last-child {
  grid-column: 2;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.contact-page .hero {
  display: none;
}

.btn[hidden],
.free-note[hidden],
#lead-form[hidden],
#thanks[hidden] {
  display: none !important;
}

.free-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
}

.free-note::before {
  content: "i";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 12px;
  font-style: italic;
  font-weight: 700;
}

#thanks p {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--blue-border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
}

.consent input {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin-top: 2px;
  accent-color: var(--blue);
}

.consent a {
  font-weight: 700;
  color: var(--blue);
}

.policy h2 {
  margin: 24px 0 8px;
  font-size: 18px;
}

.policy ul {
  margin: 0 0 12px;
  padding-left: 18px;
}

.policy li {
  margin: 0 0 6px;
}

.meta {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.inner-narrow {
  max-width: 520px;
}

.login-card .btn-submit {
  width: 100%;
}

@media (min-width: 960px) {
  body {
    min-height: 100vh;
    background:
      radial-gradient(circle at 88% 20%, var(--blue-soft) 0, transparent 42%),
      var(--bg);
  }

  .marketing-header {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 40px 0;
    width: 100%;
    flex-wrap: nowrap;
  }

  .marketing-nav {
    width: auto;
    flex: 1;
    justify-content: flex-end;
  }

  .brand {
    font-size: 18px;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  main {
    max-width: 1120px;
    display: grid;
    grid-template-columns: minmax(360px, 420px) minmax(0, 1.15fr);
    gap: 56px;
    align-items: center;
    min-height: 0;
    padding: 28px 40px 48px;
  }

  main.inner {
    display: block;
    min-height: 0;
  }

  .contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
  }

  .contact-page .hero {
    display: block;
    max-height: 380px;
    margin: 0;
  }

  .tariffs {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
  }

  .visual h1 {
    font-size: 36px;
    margin-bottom: 28px;
  }

  .hero {
    max-height: 340px;
    margin-bottom: 8px;
  }

  .flow {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 0;
  }

  .flow a {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 16px 10px;
    background: var(--white);
  }

  .flow-icon {
    grid-row: auto;
    margin-bottom: 4px;
  }

  .flow a span:last-child {
    grid-column: auto;
  }

  .panel {
    order: 1;
  }

  .visual {
    order: 2;
  }

  .card {
    padding: 32px 28px 24px;
  }
}

@media (min-width: 720px) and (max-width: 959px) {
  main {
    max-width: 640px;
    padding-top: 28px;
  }

  .card {
    padding: 28px 24px 24px;
  }

  .visual h1 {
    font-size: 30px;
  }

  .flow {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .flow a {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 16px 10px;
  }

  .flow-icon {
    grid-row: auto;
    margin-bottom: 4px;
  }

  .flow a span:last-child {
    grid-column: auto;
  }
}
