/* style.css v1.0.0 */
:root {
  color-scheme: light dark;
  --color-background: #f9fafb;
  --color-surface: #ffffff;
  --color-border: #d0d5dd;
  --color-text: #0f172a;
  --color-muted: #475467;
  --color-primary: #2563eb;
  --color-error: #b91c1c;
  --max-width: 960px;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: inherit;
  line-height: 1.6;
}

.page {
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 2rem 1rem 4rem;
}

.page__header {
  margin-bottom: 2rem;
  text-align: center;
}

.lead {
  margin: 0 auto;
  max-width: 40rem;
  color: var(--color-muted);
}

form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}

.form-section + .form-section {
  margin-top: 2rem;
}

.form-section > h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.form-field label,
.form-field legend {
  font-weight: 600;
}

input[type="text"],
input[type="email"],
select,
textarea {
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.choice-group {
  display: flex;
  gap: 1.5rem;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.checkbox-group input {
  margin-top: 0.25rem;
}

.field-help {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.field-error {
  margin: 0;
  color: var(--color-error);
  font-size: 0.9rem;
  min-height: 1.25rem;
}

.form-field--conditional {
  display: none;
}

.form-field--visible {
  display: flex;
}

fieldset.form-field {
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1rem 1.5rem 1.25rem;
}

.suggestions {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  background: var(--color-surface);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  max-height: 14rem;
  overflow-y: auto;
  display: none;
  position: relative;
  z-index: 10;
}

.suggestions li {
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.suggestions li + li {
  border-top: 1px solid var(--color-border);
}

.suggestions li:hover,
.suggestions li:focus {
  background: rgba(37, 99, 235, 0.1);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 2.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.button:hover {
  background: #1d4ed8;
}

.button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.form-actions {
  margin-top: 2.5rem;
}

.form-feedback {
  margin-top: 1.5rem;
  font-weight: 600;
}

.form-feedback--success {
  color: #0f766e;
}

.form-feedback--error {
  color: var(--color-error);
}

@media (max-width: 600px) {
  form {
    padding: 1.5rem;
  }

  .choice-group {
    flex-direction: column;
    gap: 0.75rem;
  }
}
