:root {
  --bp-blue: #00376b;
  --bp-blue-2: #0b5fa5;
  --bp-text: #17324d;
  --bp-muted: #64748b;
  --bp-border: #d7e3ee;
  --bp-soft: #f5f8fb;
  --bp-error: #c62828;
  --bp-success: #16784a;
}

* {
  box-sizing: border-box;
}

html {
  background: #fff;
  color: var(--bp-text);
  font-family: Manrope, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bp-soft);
}

.anketa-header {
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
  background: var(--bp-soft);
}

.anketa-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
}

.anketa-logo img {
  display: block;
  width: 156px;
  max-width: 180px;
  height: auto;
}

.lang-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-width: 116px;
  padding: 3px;
  background: var(--bp-soft);
  border: 1px solid var(--bp-border);
  border-radius: 8px;
}

.lang-switch button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--bp-blue);
  font: inherit;
  font-weight: 800;
}

.lang-switch button.active {
  background: var(--bp-blue);
  color: #fff;
}

.anketa-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

.anketa-intro {
  margin: 2px 0 16px;
  text-align: center;
}

.anketa-intro h1,
.success-screen h1 {
  margin: 0 0 8px;
  color: var(--bp-blue);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
}

.anketa-intro p,
.success-screen p {
  margin: 0;
  color: var(--bp-muted);
  font-size: 15px;
}

.candidate-form {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: 18px 16px 20px;
  background: #fff;
  border: 1px solid rgba(215, 227, 238, 0.9);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 55, 107, 0.08);
}

.form-section {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: 0;
  border-top: 0;
}

.form-section + .form-section {
  padding-top: 2px;
}

.form-section h2 {
  margin: 0 0 2px;
  color: var(--bp-blue);
  font-size: 17px;
  line-height: 1.25;
}

.field {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

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

.field > span,
.check-row {
  color: var(--bp-text);
  font-weight: 700;
}

.field b,
.check-row b {
  color: var(--bp-error);
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--bp-border);
  border-radius: 8px;
  background: #fff;
  color: var(--bp-text);
  padding: 13px 14px;
  font-size: 16px;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--bp-blue-2);
  outline: 3px solid rgba(11, 95, 165, 0.16);
}

.has-error input,
.has-error select,
.has-error textarea,
.consent-error {
  border-color: var(--bp-error);
}

.field-error {
  min-height: 18px;
  color: var(--bp-error);
  font-size: 14px;
  font-weight: 600;
}

.check-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 2px 0;
  margin-bottom: 16px;
}

.check-row input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 2px 0 0;
  accent-color: var(--bp-blue);
}

.consent-row {
  line-height: 1.45;
}

.submit-btn,
.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  background: var(--bp-blue);
  color: #fff;
  padding: 15px 16px;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.submit-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.home-btn {
  margin-top: 22px;
  background: var(--bp-blue);
}

.form-status {
  min-height: 18px;
  color: var(--bp-error);
  font-weight: 700;
}

.success-screen {
  min-height: calc(100vh - 110px);
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 34px 18px;
  background: #fff;
  border: 1px solid rgba(215, 227, 238, 0.9);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 55, 107, 0.08);
  text-align: center;
}

.success-logo {
  width: 154px;
  height: auto;
  margin-bottom: 22px;
}

.success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: rgba(22, 120, 74, 0.12);
  color: var(--bp-success);
  font-size: 34px;
  font-weight: 800;
}

.success-copy {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.success-copy p {
  margin: 0;
  color: var(--bp-text);
  font-size: 15px;
  line-height: 1.5;
}

.success-copy .success-team {
  margin-top: 4px;
  color: var(--bp-blue);
  font-weight: 800;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

@media (min-width: 560px) {
  .anketa-header {
    grid-template-columns: 1fr auto 1fr;
    padding: 18px 24px 12px;
  }

  .anketa-logo {
    grid-column: 2;
  }

  .lang-switch {
    grid-column: 3;
    justify-self: end;
  }

  .anketa-logo img {
    width: 172px;
  }

  .anketa-shell {
    padding-top: 18px;
  }

  .anketa-intro h1,
  .success-screen h1 {
    font-size: 26px;
  }
}

@media (max-width: 380px) {
  .anketa-shell {
    padding: 14px;
  }

  .candidate-form {
    padding: 16px 14px 18px;
  }

  .anketa-logo img {
    width: 144px;
  }

  .anketa-intro h1,
  .success-screen h1 {
    font-size: 24px;
  }
}
