* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: #172126;
  background:
    linear-gradient(120deg, rgba(249, 202, 85, 0.22), rgba(72, 164, 149, 0.2)),
    #f6f7f2;
}

.page {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.form-panel,
.response-panel {
  background: #ffffff;
  border: 1px solid #dce3dc;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(23, 33, 38, 0.1);
}

.form-panel {
  padding: 32px;
}

.response-panel {
  padding: 28px;
  position: sticky;
  top: 24px;
}

.heading,
.response-header {
  margin-bottom: 24px;
}

.response-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #2f7c72;
}

h1,
h2 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

h2 {
  font-size: 1.55rem;
}

.question-form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid #b9c7be;
  border-radius: 6px;
  padding: 13px 14px;
  font: inherit;
  color: #172126;
  background: #fbfcfa;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

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

input:focus,
textarea:focus {
  outline: none;
  border-color: #2f7c72;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(47, 124, 114, 0.16);
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s, background 0.2s;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

#submitButton {
  margin-top: 8px;
  color: #ffffff;
  background: #d4542f;
}

#submitButton.editing {
  background: #2f7c72;
}

.secondary-button {
  color: #ffffff;
  background: #2f7c72;
}

.ghost-button {
  color: #172126;
  background: #eef2ed;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  color: #5f4a14;
  background: #fff1bf;
}

.status-badge.sent {
  color: #18554e;
  background: #d9f0ea;
}

.status-badge.editing {
  color: #7a3419;
  background: #ffe2d5;
}

.empty-state {
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed #b9c7be;
  border-radius: 8px;
  color: #62706a;
  text-align: center;
  line-height: 1.5;
}

.response-summary {
  margin: 0;
  display: grid;
  gap: 14px;
}

.response-summary div {
  padding-bottom: 14px;
  border-bottom: 1px solid #e8ede8;
}

.response-summary div:last-child {
  border-bottom: 0;
}

.response-summary dt {
  margin-bottom: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #62706a;
}

.response-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.actions {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 820px) {
  .page {
    grid-template-columns: 1fr;
    padding: 24px 0;
  }

  .response-panel {
    position: static;
  }
}

@media (max-width: 520px) {
  .page {
    width: min(100% - 20px, 1120px);
  }

  .form-panel,
  .response-panel {
    padding: 22px;
  }

  .response-header,
  .actions {
    grid-template-columns: 1fr;
  }

  .response-header {
    display: grid;
  }
}
