:root {
  color-scheme: light;
  --bg: #eef4f1;
  --panel: #ffffff;
  --text: #17211d;
  --muted: #5f6f68;
  --line: #d8e2dd;
  --accent: #156f5b;
  --accent-dark: #0f5446;
  --danger: #b42318;
  --focus: #f4b740;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.page {
  width: 100%;
  min-height: 100vh;
  padding: 32px 16px;
  display: grid;
  place-items: center;
}

.survey-shell {
  width: min(760px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(16, 41, 32, 0.12);
  overflow: hidden;
}

.intro {
  padding: 32px 32px 24px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.1;
}

.intro p:last-child {
  max-width: 58ch;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.survey-form {
  padding: 28px 32px 32px;
  display: grid;
  gap: 24px;
}

#survey-sections {
  display: grid;
  gap: 18px;
}

.form-section {
  display: grid;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.form-section h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.section-note {
  margin: -8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.bot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

label,
legend {
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.checkbox-field {
  gap: 12px;
}

.checkbox-grid {
  display: grid;
  gap: 10px;
}

.checkbox-option {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  font-weight: 400;
  line-height: 1.45;
}

.checkbox-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.5;
}

.consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.actions {
  display: grid;
  gap: 12px;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  padding: 12px 18px;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

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

.status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.status.success {
  color: var(--accent-dark);
}

.status.error,
.error {
  color: var(--danger);
}

.error {
  min-height: 18px;
  font-size: 14px;
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.back-link:hover {
  text-decoration: underline;
}

.survey-nav {
  padding: 28px 32px 32px;
  display: grid;
  gap: 16px;
}

.nav-card {
  display: block;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.nav-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(21, 111, 91, 0.1);
}

.nav-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.nav-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .page {
    padding: 16px;
    place-items: start center;
  }

  .intro,
  .survey-form,
  .survey-nav {
    padding-left: 20px;
    padding-right: 20px;
  }
}
