:root {
  --survey-navy: #0d3551;
  --survey-blue: #1b6a96;
  --survey-sky: #cfe8f2;
  --survey-cream: #fff9ef;
  --survey-gold: #efb028;
  --survey-ink: #173042;
  --survey-line: rgba(13, 53, 81, 0.14);
  --survey-shadow: 0 24px 60px rgba(10, 33, 53, 0.18);
}

*,
*:before,
*:after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Nunito', sans-serif;
  color: var(--survey-ink);
  background:
    radial-gradient(circle at top left, rgba(239, 176, 40, 0.2), transparent 26%),
    radial-gradient(circle at bottom right, rgba(27, 106, 150, 0.22), transparent 24%),
    linear-gradient(145deg, #eff7fa 0%, #d8eef5 46%, #fff7ea 100%);
}

.survey-shell {
  width: 100%;
  padding: 38px 18px 56px;
}

.survey-card {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--survey-shadow);
  backdrop-filter: blur(10px);
}

.survey-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.survey-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--survey-blue);
  font-weight: 800;
  text-decoration: none;
}

.survey-back-link:hover {
  color: var(--survey-navy);
}

.survey-back-link::before {
  content: '←';
}

.survey-hero {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 26px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(13, 53, 81, 0.96), rgba(27, 106, 150, 0.9));
  color: #fff;
}

.survey-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.survey-brand-logo {
  width: 100%;
  max-width: 180px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.18);
}

.survey-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.survey-brand-copy h1 {
  margin: 0;
  font-family: 'DM Serif Text', serif;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.02;
}

.survey-intro {
  align-self: center;
}

.survey-intro p {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.94);
}

.survey-section {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--survey-line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 249, 251, 0.94));
}

.section-heading h2,
.survey-instructions h2 {
  margin: 0;
  font-size: 28px;
  color: var(--survey-navy);
}

.section-tag {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--survey-cream);
  color: #8a5a00;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.survey-instructions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}

.scale-guide {
  display: grid;
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  gap: 10px;
}

.scale-guide div {
  padding: 14px 12px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(13, 53, 81, 0.09);
  text-align: center;
}

.scale-guide strong {
  display: block;
  margin-bottom: 4px;
  font-size: 22px;
  color: var(--survey-blue);
}

.scale-guide span {
  font-size: 13px;
  font-weight: 700;
}

.survey-form {
  margin-top: 20px;
}

.rating-grid,
.textarea-grid,
.signature-grid {
  display: grid;
  gap: 16px;
}

.rating-row,
.textarea-row,
.input-row {
  display: grid;
  gap: 10px;
  font-weight: 700;
  color: var(--survey-navy);
}

.rating-row {
  margin: 0;
  min-width: 0;
  border: 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(13, 53, 81, 0.1);
}

.rating-question,
.textarea-row span,
.input-row span {
  font-size: 18px;
  line-height: 1.4;
}

.rating-question {
  margin: 0 0 8px;
  padding: 0;
}

.rating-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.rating-choice {
  position: relative;
  display: block;
  cursor: pointer;
}

.rating-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.rating-choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(13, 53, 81, 0.16);
  background: linear-gradient(180deg, #ffffff, #edf6f9);
  color: var(--survey-blue);
  font-size: 22px;
  font-weight: 900;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.rating-choice input:hover + span {
  transform: translateY(-1px);
  border-color: rgba(27, 106, 150, 0.35);
}

.rating-choice input:focus-visible + span {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(27, 106, 150, 0.14);
  border-color: var(--survey-blue);
}

.rating-choice input:checked + span {
  background: linear-gradient(135deg, var(--survey-blue), var(--survey-navy));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 24px rgba(27, 106, 150, 0.22);
}

.input-row input,
.textarea-row textarea {
  width: 100%;
  border: 1px solid rgba(13, 53, 81, 0.18);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
  color: var(--survey-ink);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.input-row input:focus,
.textarea-row textarea:focus {
  outline: 0;
  border-color: var(--survey-blue);
  box-shadow: 0 0 0 4px rgba(27, 106, 150, 0.12);
  transform: translateY(-1px);
}

.textarea-row textarea {
  resize: vertical;
  min-height: 140px;
}

.signature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.signature-grid .input-row {
  align-content: start;
  align-self: start;
}

.survey-footer {
  margin-top: 24px;
  display: grid;
  gap: 20px;
  align-items: center;
}

.survey-closing {
  padding: 24px 26px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 249, 239, 0.98), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(239, 176, 40, 0.24);
}

.survey-closing p {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.6;
}

.survey-closing p:last-child {
  margin-bottom: 0;
}

.survey-submit {
  justify-self: start;
  border: 0;
  padding: 16px 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--survey-gold), #f18f01);
  color: #4d2f00;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 18px 24px rgba(241, 143, 1, 0.2);
  cursor: pointer;
}

.survey-submit:hover,
.survey-submit:focus {
  filter: brightness(1.05);
}

.survey-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

@media (max-width: 900px) {
  .survey-hero,
  .survey-instructions,
  .signature-grid {
    grid-template-columns: 1fr;
  }

  .scale-guide {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .survey-shell {
    padding: 16px 10px 32px;
  }

  .survey-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .survey-card {
    padding: 14px;
    border-radius: 18px;
  }

  .survey-hero,
  .survey-section,
  .survey-closing {
    padding: 18px;
    border-radius: 18px;
  }

  .survey-brand-copy h1 {
    font-size: 36px;
  }

  .section-heading h2,
  .survey-instructions h2 {
    font-size: 24px;
  }

  .rating-row {
    padding: 14px;
  }

  .rating-options {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }

  .rating-choice span {
    min-height: 48px;
    font-size: 18px;
  }

  .scale-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scale-guide div:last-child {
    grid-column: 1 / -1;
  }

  .survey-submit {
    width: 100%;
    justify-self: stretch;
  }
}