:root {
  --ink: #26342f;
  --muted: #6c766f;
  --cream: #fffaf0;
  --sand: #fff1c8;
  --green: #4f8b67;
  --green-dark: #32624a;
  --sky: #85cde0;
  --yellow: #f6c84f;
  --white: #ffffff;
  --line: rgba(38, 52, 47, 0.14);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--sand);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 255, 255, 0.95), transparent 26rem),
    radial-gradient(circle at 92% 14%, rgba(133, 205, 224, 0.24), transparent 25rem),
    linear-gradient(150deg, #fffaf0 0%, #fff1c7 58%, #f3d594 100%);
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
select,
textarea,
input {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 4px solid rgba(79, 127, 170, 0.34);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.feedback-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: calc(22px + var(--safe-top)) 18px calc(36px + var(--safe-bottom));
}

.back-link {
  position: sticky;
  top: max(8px, var(--safe-top));
  z-index: 5;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  width: fit-content;
  min-height: 58px;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  padding: 8px 16px 8px 10px;
  border: 2px solid rgba(50, 98, 74, 0.18);
  border-radius: 22px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(72, 73, 43, 0.12);
  text-decoration: none;
}

.back-link > span:first-child {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: var(--green);
  font-size: 1.25rem;
  font-weight: 950;
}

.back-link > span:last-child {
  display: grid;
  line-height: 1.08;
}

.back-link strong {
  font-size: 0.9rem;
}

.back-link small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 750;
}

.back-link:hover {
  border-color: rgba(50, 98, 74, 0.42);
  transform: translateY(-1px);
}

.feedback-card {
  padding: clamp(24px, 5vw, 46px);
  border: 6px solid rgba(255, 255, 255, 0.88);
  border-radius: 42px 54px 39px 49px / 46px 38px 52px 42px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 25px 65px rgba(72, 73, 43, 0.16), 0 7px 0 rgba(125, 99, 48, 0.05);
}

.feedback-heading {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 28px;
}

.feedback-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 5px solid var(--white);
  border-radius: 23px;
  color: var(--white);
  background: var(--green);
  box-shadow: 0 10px 20px rgba(50, 98, 74, 0.2);
  font-size: 1.9rem;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--green-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.feedback-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

form {
  display: grid;
  gap: 14px;
}

.field-label,
legend {
  padding: 0;
  font-weight: 900;
}

.field-label span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

select,
textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: var(--white);
}

select {
  min-height: 54px;
  padding: 0 15px;
}

textarea {
  min-height: 150px;
  padding: 15px;
  resize: vertical;
  line-height: 1.5;
}

select:focus,
textarea:focus {
  border-color: var(--green);
}

fieldset {
  min-width: 0;
  margin: 8px 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 12px;
}

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

.choice-grid label {
  position: relative;
  cursor: pointer;
}

.choice-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice-grid span {
  display: flex;
  min-height: 58px;
  align-items: center;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  font-size: 0.9rem;
  font-weight: 800;
}

.choice-grid input:checked + span {
  border-color: var(--green);
  color: var(--green-dark);
  background: #edf7ea;
  box-shadow: inset 0 0 0 2px rgba(79, 139, 103, 0.13);
}

.choice-grid input:focus-visible + span {
  outline: 4px solid rgba(79, 127, 170, 0.34);
  outline-offset: 3px;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: -6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.message-meta p {
  max-width: 520px;
  margin-bottom: 0;
}

.message-meta span {
  flex: 0 0 auto;
}

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

.form-status {
  margin: 2px 0 0;
  padding: 12px 14px;
  border-radius: 15px;
  color: #8c342f;
  background: #fff0ed;
  font-weight: 800;
}

.submit-button {
  min-height: 58px;
  margin-top: 6px;
  padding: 0 24px;
  border: 0;
  border-radius: 20px;
  color: var(--white);
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 8px 0 #274f3b, 0 14px 24px rgba(50, 98, 74, 0.2);
  cursor: pointer;
  font-weight: 900;
}

.submit-button:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 #274f3b, 0 9px 18px rgba(50, 98, 74, 0.18);
}

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

.success-card {
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(145deg, #edf7ea, #e8f6fa);
  text-align: center;
}

.success-card > span {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  color: var(--white);
  background: var(--green);
  font-size: 2rem;
  font-weight: 900;
}

.success-card h2 {
  margin-bottom: 8px;
  font-size: 2rem;
}

.success-card p {
  color: var(--muted);
}

.success-card a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  color: var(--green-dark);
  font-weight: 900;
  text-underline-offset: 4px;
}

@media (max-width: 620px) {
  .feedback-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .feedback-card {
    padding: 25px 18px 28px;
    border-width: 5px;
    border-radius: 32px 41px 30px 38px / 37px 31px 42px 34px;
  }

  .feedback-heading {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
  }

  .feedback-mark {
    width: 52px;
    height: 52px;
    border-width: 4px;
    border-radius: 18px;
    font-size: 1.45rem;
  }

  h1 {
    font-size: 2rem;
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .choice-grid span {
    min-height: 52px;
  }

  .message-meta {
    display: grid;
    gap: 5px;
  }

  .message-meta span {
    justify-self: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
