* {
  box-sizing: border-box;
}

html {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #1f3653;
  background: #f4f6f8;
}

body {
  margin: 0;
}

.wm-shell {
  width: min(920px, calc(100% - 32px));
  margin: 40px auto;
}

.wm-card {
  background: #ffffff;
  border: 1px solid #dfe5ea;
  border-radius: 22px;
  padding: 30px;
  box-shadow: 0 18px 55px rgba(31, 54, 83, 0.08);
}

.wm-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 15px;
}

.wm-label span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2f6;
  font-size: 12px;
}

h1 {
  margin: 12px 0 8px;
  font-size: clamp(27px, 5vw, 42px);
  line-height: 1.08;
}

.wm-lead {
  margin: 0;
  color: #52667b;
  line-height: 1.6;
}

.wm-notice {
  margin-top: 26px;
  padding: 18px 20px;
  border-radius: 14px;
  background: #f6f8fa;
  border-left: 4px solid #b46a3c;
}

.wm-notice p {
  margin: 8px 0 0;
  line-height: 1.55;
  color: #42566b;
  font-size: 14px;
}

.wm-notice .wm-warning {
  font-weight: 700;
  color: #1f3653;
}

.wm-form {
  margin-top: 28px;
}

.wm-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 112px;
  padding: 15px 16px;
  border: 1px solid #bcc8d2;
  border-radius: 12px;
  font: inherit;
  line-height: 1.5;
  color: #172d47;
  background: #ffffff;
}

textarea:focus {
  outline: 3px solid rgba(180, 106, 60, 0.18);
  border-color: #b46a3c;
}

.wm-form-bottom {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

#counter {
  font-size: 12px;
  color: #718294;
}

button,
.wm-contact-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid #1f3653;
  background: #1f3653;
  color: #ffffff;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover,
button:focus,
.wm-contact-button:hover,
.wm-contact-button:focus {
  background: #162b44;
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.wm-result {
  margin-top: 28px;
  padding: 22px;
  border-radius: 15px;
  border: 1px solid #d7e0e7;
  background: #ffffff;
}

#result-answer {
  line-height: 1.65;
}

.wm-source {
  display: block;
  margin-top: 16px;
  padding: 15px;
  border-radius: 10px;
  background: #f5f7f9;
  color: #1f3653;
  font-weight: 700;
  text-decoration: none;
}

.wm-source:hover,
.wm-source:focus {
  text-decoration: underline;
}

.wm-contact {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e1e6ea;
}

.wm-contact p {
  margin: 0 0 12px;
  line-height: 1.5;
}

.wm-contact-button {
  background: #b46a3c;
  border-color: #b46a3c;
}

.wm-contact-button:hover,
.wm-contact-button:focus {
  background: #98572f;
}

.wm-error {
  margin-top: 20px;
  padding: 14px;
  border-radius: 10px;
  background: #fff4f2;
  border: 1px solid #e8c1ba;
  color: #7c3026;
}

@media (max-width: 640px) {
  .wm-shell {
    width: min(100% - 20px, 920px);
    margin: 10px auto;
  }

  .wm-card {
    padding: 20px;
    border-radius: 16px;
  }

  .wm-form-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  button,
  .wm-contact-button {
    width: 100%;
  }

  #counter {
    align-self: flex-end;
  }
}
