.algo-form {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: #0f172a;
  font-family: inherit;
}

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

.algo-form__title {
  margin: 0 0 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
}

.algo-form__fields {
  display: grid;
  gap: 1rem;
}

.algo-form__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.925rem;
  font-weight: 600;
  color: #334155;
}

.algo-form__required {
  color: #dc2626;
  margin-left: 0.15rem;
}

.algo-form__control {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 16px; /* avoid iOS zoom */
  line-height: 1.4;
}

.algo-form__control:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.algo-form__control {
  min-height: 110px;
  resize: vertical;
}

.algo-form__actions {
  margin-top: 1.25rem;
}

.algo-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: 6px;
  background: #1e40af;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.algo-form__submit:hover {
  background: #1e3a8a;
}

.algo-form__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.algo-form__message {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.925rem;
}

.algo-form__message--success {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #14532d;
}

.algo-form__message--error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #7f1d1d;
}

@media (max-width: 640px) {
  .algo-form__submit {
    width: 100%;
  }
}

.algo-form__hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
}
