@font-face {
  font-family: "BaqRoboto";
  src: url("../fonts/roboto.678ba85b4704.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --forest-950: #102f23;
  --forest-900: #173f2b;
  --forest-800: #24533d;
  --forest-700: #30664d;
  --forest-100: #e8f0eb;
  --cream-100: #f3f1e9;
  --cream-50: #faf9f5;
  --white: #ffffff;
  --ink: #192721;
  --muted: #65716b;
  --line: #dce3de;
  --line-strong: #bdcbc2;
  --danger: #9b3838;
  --danger-soft: #fff7f7;
  --warning: #765817;
  --warning-soft: #fff9eb;
  --focus: #8e6f2b;
  --shadow: 0 14px 42px rgba(24, 48, 36, 0.09);
}

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

html {
  min-width: 320px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--cream-100);
  font-family: "BaqRoboto", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  text-rendering: optimizeLegibility;
}

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

button,
select,
input[type="checkbox"],
input[type="radio"],
input[type="file"] {
  cursor: pointer;
}

button {
  appearance: none;
}

img,
svg {
  display: block;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -80px;
  left: 10px;
  padding: 9px 13px;
  border-radius: 7px;
  color: var(--white);
  background: var(--forest-950);
  text-decoration: none;
}

.skip-link:focus {
  top: 10px;
}

.page-shell {
  width: min(calc(100% - 28px), 900px);
  margin: 0 auto;
  padding: 22px 0;
}

.brand-panel {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-height: 126px;
  padding: 22px 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px 16px 0 0;
  color: var(--white);
  background: linear-gradient(120deg, var(--forest-950), var(--forest-800));
  box-shadow: var(--shadow);
}

.brand-panel__logo {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
}

.brand-panel__logo img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.brand-panel h1 {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 30px);
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.application-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.alert {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 16px 28px 0;
  padding: 10px 12px;
  border: 1px solid;
  border-radius: 8px;
  font-size: 13px;
}

.alert svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.alert strong {
  display: block;
}

.alert p,
.alert ul {
  margin: 0;
}

.alert ul {
  padding-left: 17px;
}

.alert--warning {
  border-color: #e4d39f;
  color: var(--warning);
  background: var(--warning-soft);
}

.alert--error {
  border-color: #e4c2c2;
  color: #813333;
  background: var(--danger-soft);
}

.form-section {
  margin: 0 28px;
  padding: 15px 0 17px;
  border-top: 1px solid var(--line);
}

.form-section--first {
  border-top: 0;
}

.form-section__heading {
  margin: 0 0 10px;
}

.form-section__heading h2 {
  margin: 0;
  color: var(--forest-950);
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.form-field {
  min-width: 0;
}

.field-residential_address,
.field-experience_field_years,
.field-why_hire_you,
.widget-checkbox {
  grid-column: 1 / -1;
}

.field-label {
  display: inline-block;
  margin: 0 0 4px;
  color: #30423a;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
}

.field-control input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.field-control select,
.field-control textarea {
  display: block;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: var(--cream-50);
  box-shadow: none;
  font-size: 14px;
  line-height: 1.35;
}

.field-control input::placeholder,
.field-control textarea::placeholder {
  color: #707b75;
  opacity: 1;
}

.field-control input:focus,
.field-control select:focus,
.field-control textarea:focus {
  border-color: var(--forest-700);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(48, 102, 77, 0.12);
}

.field-control input:disabled,
.field-control select:disabled,
.field-control textarea:disabled {
  cursor: not-allowed;
  color: #707a75;
  background: #eef0ed;
}

.field-control textarea {
  height: 66px;
  min-height: 66px;
  max-height: 180px;
  resize: none;
  overflow-y: auto;
}

.field-why_hire_you .field-control textarea {
  height: 86px;
  min-height: 86px;
}

.field-control select {
  padding-right: 38px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--forest-700) 50%),
    linear-gradient(135deg, var(--forest-700) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 18px,
    calc(100% - 12px) 18px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.custom-select {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.custom-select.is-open {
  z-index: 30;
}

.custom-select.is-enhanced > .custom-select__native {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.custom-select__button {
  position: relative;
  display: block;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 9px 38px 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: var(--cream-50);
  box-shadow: none;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
}

.custom-select__button::after {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 1.7px solid var(--forest-700);
  border-bottom: 1.7px solid var(--forest-700);
  content: "";
  transform: rotate(45deg);
}

.custom-select.is-open .custom-select__button {
  border-color: var(--forest-700);
  border-radius: 8px 8px 5px 5px;
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(48, 102, 77, 0.12);
}

.custom-select.is-open .custom-select__button::after {
  margin-top: -2px;
  transform: rotate(225deg);
}

.custom-select__button:focus-visible {
  border-color: var(--forest-700);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(48, 102, 77, 0.12);
}

.custom-select__button:disabled {
  cursor: not-allowed;
  color: #707a75;
  background: #eef0ed;
}

.custom-select__value {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select__value.is-placeholder {
  color: #44534c;
}

.custom-select__menu {
  position: absolute;
  z-index: 31;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 252px;
  padding: 5px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #aebfb5;
  border-radius: 9px;
  outline: none;
  background: var(--white);
  box-shadow: 0 13px 30px rgba(16, 47, 35, 0.17);
  scrollbar-color: #91a99b #edf2ef;
  scrollbar-width: thin;
}

.custom-select__menu[hidden] {
  display: none;
}

.custom-select.opens-up .custom-select__menu {
  top: auto;
  bottom: calc(100% + 5px);
}

.custom-select__menu::-webkit-scrollbar {
  width: 9px;
}

.custom-select__menu::-webkit-scrollbar-track {
  border-radius: 8px;
  background: #edf2ef;
}

.custom-select__menu::-webkit-scrollbar-thumb {
  border: 2px solid #edf2ef;
  border-radius: 8px;
  background: #91a99b;
}

.custom-select__option {
  min-height: 35px;
  padding: 8px 10px;
  border-radius: 6px;
  outline: none;
  color: #263a31;
  background: var(--white);
  font-size: 13.5px;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
}

.custom-select__option + .custom-select__option {
  margin-top: 2px;
}

.custom-select__option.is-selected {
  color: var(--forest-950);
  background: var(--forest-100);
  font-weight: 700;
}

.custom-select__option.is-active,
.custom-select__option:focus-visible {
  color: var(--white);
  background: var(--forest-800);
}

.custom-select__option.is-disabled {
  color: #8a938e;
  background: #f4f5f2;
  cursor: not-allowed;
}

.field-control input[type="checkbox"],
.field-control input[type="radio"] {
  position: relative;
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 1.5px solid #91a399;
  outline: none;
  background: var(--white);
}

.field-control input[type="checkbox"] {
  border-radius: 5px;
}

.field-control input[type="radio"] {
  border-radius: 50%;
}

.field-control input[type="checkbox"]:checked {
  border-color: var(--forest-700);
  background-color: var(--forest-700);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10 3 3 7-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 15px;
}

.field-control input[type="radio"]:checked {
  border-color: var(--forest-700);
  background: radial-gradient(circle, var(--forest-700) 0 40%, var(--white) 44%);
}

.field-control input[type="checkbox"]:focus-visible,
.field-control input[type="radio"]:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(154, 119, 43, 0.18);
}

.field-control > div:not(.custom-select),
.field-control > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 9px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--cream-50);
  list-style: none;
}

.field-control > div:not(.custom-select) label,
.field-control > ul label {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  margin: 0;
  color: #34463e;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
}

.file-drop {
  position: relative;
  overflow: hidden;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--cream-50);
}

.file-drop:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(154, 119, 43, 0.16);
}

.file-drop input[type="file"] {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
}

.file-drop__content {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 40px;
  padding: 5px 10px;
}

.file-drop__icon {
  display: grid;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 7px;
  color: var(--forest-700);
  background: var(--forest-100);
}

.file-drop__icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-drop__copy {
  min-width: 0;
}

.file-drop__copy strong {
  display: block;
  overflow: hidden;
  color: #294137;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-errors,
.errorlist {
  margin: 4px 0 0;
  padding: 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  list-style: none;
}

.field-errors li::before {
  margin-right: 5px;
  content: "•";
}

.has-error .field-label,
.has-client-error .field-label {
  color: var(--danger);
}

.has-error .field-control input,
.has-error .field-control select,
.has-error .field-control textarea,
.has-error .file-drop,
.has-error .custom-select__button,
.has-client-error .field-control input,
.has-client-error .field-control select,
.has-client-error .field-control textarea,
.has-client-error .file-drop,
.has-client-error .custom-select__button {
  border-color: #c97878;
  background-color: #fffafa;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  padding: 14px 28px 18px;
  border-top: 1px solid var(--line);
  background: var(--cream-50);
}

.submit-button {
  display: inline-flex;
  min-width: 190px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--forest-950);
  border-radius: 8px;
  outline: none;
  color: var(--white);
  background: var(--forest-800);
  box-shadow: none;
  font-size: 13.5px;
  font-weight: 750;
}

.submit-button:hover:not(:disabled) {
  background: var(--forest-950);
}

.submit-button:focus-visible {
  box-shadow: 0 0 0 3px var(--white), 0 0 0 6px rgba(154, 119, 43, 0.65);
}

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

/* Success page */
.success-page {
  display: grid;
  place-items: center;
  padding: 16px;
}

.success-shell {
  width: min(100%, 460px);
}

.success-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.success-card__brand {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, var(--forest-950), var(--forest-800));
}

.success-card__brand img {
  width: 64px;
  height: 64px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  object-fit: contain;
}

.success-card__body {
  padding: 26px;
  text-align: center;
}

.success-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 50%;
  color: var(--forest-700);
  background: var(--forest-100);
}

.success-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-card h1 {
  margin: 0;
  color: var(--forest-950);
  font-size: clamp(23px, 5vw, 29px);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.success-card__lead {
  margin: 7px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.secondary-button {
  display: inline-flex;
  min-height: 42px;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  color: var(--forest-800);
  background: var(--white);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.secondary-button:hover {
  border-color: #8fa498;
  background: var(--forest-100);
}

.secondary-button:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(154, 119, 43, 0.18);
}

.secondary-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 16px), 900px);
    padding: 8px 0;
  }

  .brand-panel {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
    min-height: 94px;
    padding: 15px 18px;
    border-radius: 13px 13px 0 0;
  }

  .brand-panel__logo {
    width: 62px;
    height: 62px;
    border-radius: 14px;
  }

  .brand-panel__logo img {
    width: 55px;
    height: 55px;
  }

  .brand-panel h1 {
    font-size: clamp(21px, 6vw, 27px);
  }

  .application-card {
    border-radius: 0 0 13px 13px;
  }

  .fields-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .form-field,
  .field-residential_address,
  .field-experience_field_years,
  .field-why_hire_you,
  .widget-checkbox {
    grid-column: 1;
  }

  .submit-button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(calc(100% - 10px), 900px);
    padding: 5px 0;
  }

  .brand-panel {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 11px;
    min-height: 78px;
    padding: 12px 13px;
  }

  .brand-panel__logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
  }

  .brand-panel__logo img {
    width: 47px;
    height: 47px;
  }

  .brand-panel h1 {
    font-size: 21px;
  }

  .alert,
  .form-section {
    margin-right: 13px;
    margin-left: 13px;
  }

  .form-section {
    padding: 13px 0 15px;
  }

  .form-section__heading {
    margin-bottom: 9px;
  }

  .form-section__heading h2 {
    font-size: 16px;
  }

  .field-control input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .field-control select,
  .field-control textarea,
  .custom-select__button {
    min-height: 44px;
    font-size: 16px;
  }

  .field-control select {
    background-position:
      calc(100% - 17px) 19px,
      calc(100% - 12px) 19px;
  }

  .custom-select__menu {
    max-height: 220px;
  }

  .field-control > div:not(.custom-select),
  .field-control > ul {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-actions {
    padding: 12px 13px 15px;
  }

  .success-page {
    padding: 8px;
  }

  .success-card__body {
    padding: 22px 17px;
  }

  .secondary-button {
    width: 100%;
  }
}

@media (prefers-contrast: more) {
  .field-control input,
  .field-control select,
  .field-control textarea,
  .file-drop {
    border-width: 2px;
  }
}
