:root {
  --red: #f30000;
  --green: #0c8744;
  --text: #28282b;
  --muted: #656565;
  --faint: #9d9d9d;
  --line: #cecece;
  --page: #f3f3f3;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--page);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  max-width: 100%;
}

.screen {
  display: none;
  padding: 24px clamp(16px, 3vw, 28px) 0;
  max-width: 100%;
}

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

.card {
  width: 100%;
  max-width: min(656px, 100%);
  min-width: 0;
  margin: 0 auto;
  background: var(--card);
  border-radius: 22px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.form-card {
  padding: 36px clamp(28px, 4vw, 40px) 32px;
}

.process-card {
  padding: 48px clamp(28px, 4vw, 40px) 40px;
}

.module-card {
  padding: 36px clamp(28px, 4vw, 40px) 32px;
}

h1 {
  margin: 0 0 20px;
  color: var(--text);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1.15;
}

.lead,
.module-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.45;
}

.form-logo {
  display: flex;
  justify-content: center;
  margin: -4px 0 20px;
}

.form-logo img {
  display: block;
  width: min(96px, 28vw);
  height: auto;
}

.module-card strong {
  color: var(--text);
}

.lead,
.module-card p,
.notice {
  overflow-wrap: anywhere;
}

.field {
  display: block;
  margin-bottom: 20px;
}

.field span {
  display: block;
  margin-bottom: 10px;
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: 700;
}

input {
  width: 100%;
  max-width: 100%;
  height: 52px;
  border: 2px solid var(--line);
  border-radius: 14px;
  color: #515151;
  background: #fff;
  font-size: clamp(16px, 1.3vw, 18px);
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder {
  color: #9ba2ad;
  letter-spacing: 0.5px;
}

input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(243, 0, 0, 0.08);
}

#tax-id {
  padding: 0 16px;
  letter-spacing: 1px;
}

.phone-control {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  height: 52px;
  border: 2px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.phone-control:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(243, 0, 0, 0.08);
}

.phone-control input {
  height: 48px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
}

.phone-control .country {
  padding: 0 12px;
  border-right: 2px solid var(--line);
  font-size: 17px;
}

.phone-control input:last-child {
  padding: 0 16px;
}

.primary-button {
  width: 100%;
  max-width: 100%;
  height: 52px;
  margin: 0 0 20px;
  border: 0;
  border-radius: 14px;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  font-size: clamp(15px, 1.2vw, 17px);
  font-weight: 800;
  letter-spacing: 0.2px;
  transition: transform 130ms ease, filter 130ms ease;
}

.primary-button:active {
  transform: translateY(1px);
  filter: brightness(0.94);
}

.primary-button:disabled {
  cursor: wait;
  filter: grayscale(0.2) brightness(0.9);
}

.notice {
  margin: 0;
  color: var(--faint);
  font-size: clamp(13px, 1.15vw, 15px);
  line-height: 1.45;
}

.module-card .notice {
  margin-top: 32px;
}

.error-message {
  margin: -14px 0 26px;
  color: #b00020;
  font-size: 18px;
  line-height: 1.4;
}

.steps {
  display: grid;
  gap: 18px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  color: #d9d9d9;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.15;
}

.status-icon {
  width: 32px;
  height: 32px;
  border: 3px solid #ebebeb;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.step.is-current {
  color: var(--text);
}

.step.is-current .status-icon {
  border-color: var(--red);
  border-top-color: transparent;
  animation: spin 900ms linear infinite;
}

.step.is-complete {
  color: var(--green);
}

.step.is-complete .status-icon {
  border: 0;
}

.step.is-complete .status-icon::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 1px;
  width: 12px;
  height: 22px;
  border: solid var(--green);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

footer {
  max-width: min(656px, 100%);
  width: 100%;
  min-width: 0;
  margin: 22px auto 0;
  padding: 0 clamp(16px, 3vw, 28px) 28px;
  color: var(--faint);
  text-align: center;
  font-size: clamp(13px, 1.2vw, 16px);
}

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

@media (max-width: 560px) {
  .shell {
    justify-content: center;
    padding-block: clamp(12px, 4vh, 24px);
    box-sizing: border-box;
  }

  .screen {
    padding: 0 clamp(12px, 4vw, 16px) 0;
  }

  .card {
    border-radius: 20px;
  }

  .form-card,
  .module-card {
    padding: 26px clamp(14px, 4vw, 18px) 22px;
  }

  .process-card {
    padding: 44px clamp(14px, 4vw, 18px) 38px;
  }

  h1 {
    margin-bottom: 14px;
    font-size: clamp(21px, 5.4vw, 24px);
    letter-spacing: 0.8px;
  }

  .lead,
  .module-card p {
    margin-bottom: 14px;
    font-size: clamp(17px, 4.2vw, 19px);
    line-height: 1.45;
  }

  .module-card .primary-button {
    margin-top: 4px;
  }

  .form-logo {
    margin: 0 0 16px;
  }

  .form-logo img {
    width: min(88px, 42vw);
  }

  .field {
    margin-bottom: 16px;
  }

  .field span {
    margin-bottom: 8px;
    font-size: clamp(16px, 4vw, 18px);
  }

  input,
  .phone-control {
    height: 58px;
    border-radius: 16px;
    font-size: clamp(16px, 4vw, 18px);
  }

  .phone-control {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .phone-control input {
    height: 54px;
  }

  .phone-control .country {
    padding: 0 10px;
    font-size: 16px;
  }

  .phone-control input:last-child,
  #tax-id {
    padding: 0 14px;
  }

  .primary-button {
    height: 56px;
    margin-bottom: 14px;
    border-radius: 16px;
    font-size: clamp(15px, 3.8vw, 17px);
  }

  .notice {
    font-size: clamp(14px, 3.6vw, 16px);
    line-height: 1.45;
  }

  .module-card .notice {
    margin-top: 32px;
  }

  .error-message {
    margin: -8px 0 12px;
    font-size: 15px;
  }

  .steps {
    gap: 16px;
    margin-top: 28px;
  }

  .step {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    font-size: clamp(15px, 3.8vw, 17px);
  }

  .status-icon {
    width: 28px;
    height: 28px;
  }

  .step.is-complete .status-icon::before {
    left: 6px;
    width: 10px;
    height: 18px;
    border-width: 0 3px 3px 0;
  }

  footer {
    margin-top: 12px;
    padding: 0 clamp(12px, 4vw, 16px) clamp(8px, 2vh, 16px);
    font-size: clamp(14px, 3.6vw, 16px);
  }
}
