:root {
  --bg: #FAFAF7;
  --ink: #1A1A18;
  --ink-2: #4B4B47;
  --ink-3: #6B6B6B;
  --line: #D4D2CC;
  --line-soft: #E5E3DD;
  --surface: #FFFFFF;
  --accent: #4338CA;
  --error: #B91C1C;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.progress {
  height: 3px;
  background: var(--line-soft);
  border-radius: 2px;
  margin-bottom: 36px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 250ms ease;
}

.step-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(24px, 4.5vw, 32px);
  line-height: 1.2;
  margin: 0 0 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(20px, 3.6vw, 24px);
  line-height: 1.25;
  margin: 0 0 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
h2 em { font-style: italic; font-weight: 600; }

.lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 28px;
}
.hint {
  font-size: 13px;
  color: var(--ink-3);
  margin: -4px 0 12px;
}

.fields {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

.field-label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 10px;
}
.field-label .muted {
  color: var(--ink-3);
  font-weight: 400;
}

.error {
  font-size: 13px;
  color: var(--error);
  margin-top: 8px;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.2;
  transition: background 100ms ease, color 100ms ease, border-color 100ms ease;
}
.pill:hover { border-color: var(--ink-3); }
.pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pill.selected {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.row {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 100ms ease;
}
.row:hover { border-color: var(--ink-3); }
.row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.row.selected {
  border-color: var(--ink);
  background: var(--bg);
  border-width: 2px;
  padding: 13px 15px;
}

.radio {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.row.selected .radio {
  border-color: var(--ink);
  border-width: 2px;
}
.row.selected .radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--ink);
  border-radius: 50%;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--ink);
}
textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

.other-input {
  margin-top: 8px;
  max-width: 320px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.slider-wrap { flex: 1; position: relative; }
input[type="range"].slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--line-soft);
  border-radius: 3px;
  outline: none;
  margin: 0;
}
input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: var(--ink);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--ink);
  border-radius: 50%;
  cursor: pointer;
}
input[type="range"].slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--ink);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--ink);
  border-radius: 50%;
  cursor: pointer;
}
input[type="range"].slider::-moz-range-track {
  background: var(--line-soft);
  height: 6px;
  border-radius: 3px;
}
.slider-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  min-width: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.slider-caption {
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  gap: 12px;
}
.btn {
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.2;
  font-family: inherit;
  transition: opacity 100ms ease;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-primary { background: var(--ink); color: white; }
.btn-primary:hover:not(:disabled) { background: #000; }
.btn-ghost { background: transparent; color: var(--ink-3); }
.btn-ghost:hover:not(:disabled) { color: var(--ink); }
.btn-link {
  background: transparent;
  color: var(--accent);
  font-weight: 500;
}

.meta-line {
  font-size: 13px;
  color: var(--ink-3);
}

.privacy-foot {
  font-size: 12px;
  color: #8C8A85;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}
.privacy-foot a { color: var(--accent); text-decoration: none; }

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

.thanks {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
}
.checkmark {
  width: 56px;
  height: 56px;
  background: var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}
.checkmark::after {
  content: '';
  width: 16px;
  height: 28px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
  margin-top: -6px;
}
.share-row {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.submit-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--error);
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

@media (max-width: 600px) {
  .app { padding: 24px 16px 40px; }
  h1 { font-size: 22px; }
  h2 { font-size: 19px; }
  .lede { font-size: 15px; }
  .actions { margin-top: 32px; padding-top: 20px; }
  .btn { padding: 11px 18px; font-size: 14px; }
  .pill { font-size: 13px; padding: 8px 12px; }
}
