:root {
  color-scheme: dark;
  --page: #061815;
  --page-glow: #0a211d;
  --surface: rgba(5, 25, 22, 0.76);
  --surface-hover: rgba(17, 51, 44, 0.74);
  --text: #f3f8f6;
  --muted: #b7c8c3;
  --faint: #829b94;
  --border: rgba(93, 164, 144, 0.2);
  --border-strong: rgba(78, 223, 185, 0.58);
  --mint: #55e8c1;
  --mint-soft: #9af4d3;
  --cta: #cefb91;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--page); }
body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(52, 200, 156, 0.1), transparent 34rem),
    radial-gradient(ellipse at 100% 80%, rgba(18, 88, 69, 0.12), transparent 35rem),
    var(--page);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

@media (min-width: 901px) {
  body { height: 100vh; height: 100svh; overflow: hidden; }
}

button, input, textarea { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 1fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 3.5rem);
  width: min(100% - 3rem, 1320px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 1.5rem 0;
}

@media (min-width: 901px) {
  .page-shell {
    height: 100vh;
    height: 100svh;
    min-height: 0;
    align-items: center;
    padding-block: 1.25rem;
  }
}

.farewell-panel { position: relative; display: flex; min-width: 0; min-height: 0; flex-direction: column; justify-content: center; align-self: stretch; overflow: hidden; }
.brand { display: inline-flex; width: fit-content; align-items: center; gap: 0.65rem; text-decoration: none; }
.brand-mark { display: block; width: 43px; height: 32px; object-fit: contain; }
.wordmark { font-size: 1.55rem; line-height: 1; font-weight: 780; letter-spacing: -0.055em; }
.wordmark-flow { color: var(--mint); }
.farewell-copy { position: relative; z-index: 1; margin-top: 1rem; }
.eyebrow, .section-kicker {
  margin: 0;
  color: var(--mint);
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: 0.19em;
  line-height: 1.4;
  text-transform: uppercase;
}
h1 { margin: 0.5rem 0 0.65rem; font-size: clamp(3.5rem, 6.5vw, 5.35rem); line-height: 0.98; letter-spacing: -0.065em; }
h1 span { color: var(--mint); }
.farewell-lede, .farewell-note { max-width: 390px; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.25vw, 1.15rem); line-height: 1.55; }
.farewell-note { margin-top: 0.5rem; }
.sad-illustration { display: block; width: auto; max-width: min(100%, 440px); max-height: min(47vh, 440px); height: min(47vh, 440px); min-height: 0; margin: 0.4rem auto 0; object-fit: contain; object-position: center bottom; }

.survey-card {
  width: 100%;
  max-width: 600px;
  min-height: 0;
  justify-self: end;
  padding: 0.9rem clamp(1.5rem, 2.3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 1.65rem;
  background: linear-gradient(145deg, rgba(7, 31, 27, 0.9), var(--surface));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22), inset 0 1px rgba(255, 255, 255, 0.025);
}
.survey-topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.55rem; }
.section-kicker { font-size: 0.74rem; letter-spacing: 0.17em; }
.time-estimate { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.time-estimate svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
h2 { margin: 0 0 0.8rem; font-size: clamp(1.8rem, 2.5vw, 2.15rem); line-height: 1.16; letter-spacing: -0.04em; }
.reason-list { display: grid; gap: 0.4rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.reason-option {
  position: relative;
  display: grid;
  grid-template-columns: 2.65rem minmax(0, 1fr) 1.2rem;
  min-height: 53px;
  align-items: center;
  gap: 0.65rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(108, 166, 151, 0.17);
  border-radius: 0.8rem;
  background: rgba(9, 33, 29, 0.4);
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.reason-option:hover { border-color: rgba(85, 232, 193, 0.38); background: var(--surface-hover); }
.reason-option:has(input:checked) { border-color: var(--mint); background: rgba(30, 104, 85, 0.25); box-shadow: inset 0 0 0 1px rgba(85, 232, 193, 0.08); }
.reason-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.reason-option:focus-within { outline: 3px solid var(--mint); outline-offset: 3px; }
.reason-icon { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border: 1px solid rgba(132, 196, 176, 0.12); border-radius: 0.72rem; background: rgba(111, 165, 149, 0.13); color: var(--mint-soft); }
.reason-icon svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }
.reason-label { min-width: 0; color: #dce8e4; font-size: 0.96rem; line-height: 1.35; }
.radio-mark { position: relative; width: 1.15rem; height: 1.15rem; border: 1.5px solid #6f8b82; border-radius: 50%; }
.reason-option:has(input:checked) .radio-mark { border: 5px solid var(--mint); }

.details-field { margin-top: 0.9rem; }
.details-field label { display: block; margin-bottom: 0.4rem; font-size: 0.94rem; font-weight: 720; }
.details-field label span { color: var(--muted); font-weight: 450; }
textarea {
  display: block;
  width: 100%;
  min-height: 78px;
  resize: vertical;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(108, 166, 151, 0.32);
  border-radius: 0.8rem;
  outline: none;
  background: rgba(13, 43, 37, 0.65);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
}
textarea::placeholder { color: #9ab0a9; opacity: 1; }
textarea:focus-visible { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(85, 232, 193, 0.15); }
.primary-button {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 0.65rem;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 0.8rem;
  background: var(--cta);
  color: #071810;
  font-size: 0.96rem;
  font-weight: 780;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}
.primary-button:hover { background: #d9ffac; transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: 0.72; transform: none; }
.primary-button span { font-size: 1.15rem; line-height: 1; }
.reconsider { display: flex; align-items: center; justify-content: center; gap: 0.8rem; margin-top: 0.75rem; padding-top: 0.7rem; border-top: 1px solid rgba(108, 166, 151, 0.12); }
.reconsider-icon { color: #84d9b8; font-size: 1.55rem; line-height: 1; }
.reconsider p { margin: 0; color: #e2ece8; font-size: 0.86rem; font-weight: 650; }
.reconsider .reconsider-links { color: var(--muted); font-size: 0.8rem; font-weight: 450; }
.reconsider a { color: var(--mint); text-underline-offset: 0.18em; }
.action-unavailable { margin: 0.55rem 0 0; color: var(--faint); font-size: 0.7rem; text-align: center; }
.status-message { margin: 0; color: var(--mint); font-size: 0.8rem; line-height: 1.45; text-align: center; }
.status-message:not(:empty) { padding-top: 0.65rem; }
.privacy-note { margin: 0.35rem 0 0; color: var(--faint); font-size: 0.73rem; line-height: 1.4; text-align: center; }

@media (min-width: 901px) {
  .survey-card {
    align-self: center;
    max-height: calc(100svh - 2.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgba(85, 232, 193, 0.35) transparent;
    scrollbar-width: thin;
  }
  .survey-card::-webkit-scrollbar { width: 8px; }
  .survey-card::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: rgba(85, 232, 193, 0.35); background-clip: padding-box; }
}

a:focus-visible, button:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }

@media (max-width: 900px) {
  .page-shell { grid-template-columns: minmax(0, 1fr) minmax(390px, 0.95fr); gap: 2rem; width: min(100% - 3rem, 1100px); }
  h1 { font-size: clamp(3rem, 7vw, 4.5rem); }
  .survey-card { padding: 1.4rem; }
  .reason-option { min-height: 46px; }
  .reason-icon { width: 2.15rem; height: 2.15rem; }
}

@media (max-width: 900px) {
  .page-shell { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; width: min(100% - 2rem, 560px); min-height: 100vh; min-height: 100svh; padding: 1.25rem 0 2.5rem; }
  .farewell-panel { align-self: auto; }
  .brand { gap: 0.55rem; }
  .brand-mark { width: 38px; height: 29px; }
  .wordmark { font-size: 1.35rem; }
  .farewell-copy { margin-top: 2rem; }
  h1 { margin: 0.55rem 0 0.9rem; font-size: clamp(3.25rem, 13vw, 5rem); }
  .farewell-lede, .farewell-note { max-width: 35rem; font-size: 0.98rem; }
  .farewell-note { margin-top: 0.7rem; }
  .sad-illustration { width: min(78%, 330px); height: auto; max-height: none; margin-top: 0.6rem; }
  .survey-card { max-width: none; justify-self: stretch; padding: clamp(1.2rem, 5vw, 1.75rem); border-radius: 1.3rem; }
  h2 { font-size: clamp(1.55rem, 6vw, 1.9rem); }
  .reason-option { min-height: 50px; }
  .reason-label { font-size: 0.86rem; }
  textarea { min-height: 90px; }
}

@media (min-width: 901px) and (max-height: 800px) {
  .sad-illustration { height: min(43vh, 340px); max-height: min(43vh, 340px); }
}

@media (min-width: 901px) and (max-height: 650px) {
  .farewell-copy { margin-top: 0.65rem; }
  h1 { font-size: clamp(2.8rem, 5.4vw, 4rem); }
  .farewell-lede, .farewell-note { font-size: 0.94rem; }
  .sad-illustration { height: min(39vh, 250px); max-height: min(39vh, 250px); }
}

@media (max-width: 390px) {
  .page-shell { width: min(100% - 1.25rem, 560px); padding-top: 1rem; }
  .survey-topline { align-items: flex-start; }
  .section-kicker { font-size: 0.62rem; }
  .time-estimate { font-size: 0.64rem; }
  .reason-option { grid-template-columns: 2.3rem minmax(0, 1fr) 1rem; gap: 0.5rem; padding-inline: 0.55rem; }
  .reason-icon { width: 2rem; height: 2rem; }
  .reason-icon svg { width: 1.2rem; height: 1.2rem; }
  .reason-label { font-size: 0.8rem; }
}

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