* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f3f4f6;
}

/* Centrado de página */
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Contenedor principal */
.form-box {
  position: relative;
  width: 100%;
  max-width: 1100px;
  background: #ffffff;
  border: 2px solid #9ca3af;
  border-radius: 8px;
  padding: 24px 16px 16px;
}

/* Título flotante */
.form-title {
  position: absolute;
  top: -0.75em;              
  right: 16px;
  padding: 0 12px;
  background: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 2px; 
  flex-wrap: wrap; 
}

.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.field label.question {
  margin: 0;
  white-space: nowrap;
}

.field input,
.field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-family: inherit;
}

.field textarea {
  resize: none;
  line-height: 1.4;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: #3b82f6;
}

.options {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: nowrap;
}

.option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  font-size: 0.8125rem;
  color: #374151;
}

.options input[type="radio"] {
  accent-color: #3b82f6;
  margin: 0;
}

.actions {
  margin-top: 1px;
}

.buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

/* ========================= */
/* Layout en escritorio */
/* ========================= */
@media (min-width: 900px) {

  .form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 10px;
  }

  
  .form > .form-box:nth-of-type(3),
  .form > .form-box.actions {
    grid-column: 1 / -1;
  }

}