:root {
  --bg: #f5f5f4;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --muted: #6a6a6a;
  --line: #e6e6e3;
  --brand: #ff2e35;
  --brand-deep: #e0242b;
  --brand-soft: #ffe9ea;
  --ok: #1f7a4c;
  --radius: 12px;
  --control-h: 48px;
  --label-h: 24px;
  --choice-h: 52px;
  --gap: 1rem;
  --pad: 1.5rem;
  --shadow: 0 1px 2px rgba(26,26,26,.04), 0 10px 28px rgba(26,26,26,.05);
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--font);
  background: var(--bg);
  line-height: 1.5;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
[data-lucide] {
  width: 14px;
  height: 14px;
  stroke-width: 1.75;
  flex-shrink: 0;
}

.shell {
  width: min(820px, calc(100% - 2rem));
  margin: auto;
  padding: 2rem 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  min-height: 44px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.brand img {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}
.brand-text strong {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--brand);
}
.brand-text span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}
.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 36px;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.intro { margin-bottom: 1.25rem; }
.intro h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.intro p {
  margin: 0;
  color: var(--muted);
  max-width: 58ch;
  font-size: 0.94rem;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}
.progress button {
  appearance: none;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  padding: 0;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: background .15s, color .15s;
}
.progress button:last-child { border-right: 0; }
.progress button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--brand);
}
.progress button.done { color: var(--ink); }
.progress button.locked { opacity: 0.4; cursor: not-allowed; }
.progress .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  height: 16px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.progress .n [data-lucide] { width: 13px; height: 13px; }
.progress .t {
  display: block;
  width: 100%;
  padding: 0 0.4rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.form-body { padding: var(--pad); }
.step { display: none; }
.step.active { display: block; }

.section-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  column-gap: 0.9rem;
  margin-bottom: 1.35rem;
  min-height: 48px;
}
.section-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.section-icon [data-lucide] { width: 18px; height: 18px; }
.section-head h2 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.section-head p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}
.grid .full { grid-column: 1 / -1; }

.field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}
.field > label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: var(--label-h);
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #333;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}
.field > label [data-lucide] {
  color: var(--muted);
  width: 14px;
  height: 14px;
}
.req, .opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  margin-left: auto;
  padding: 0 0.42rem;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.req { background: var(--brand-soft); color: var(--brand); }
.opt { background: #f0f0ee; color: #777; }

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input,
.field select {
  height: var(--control-h);
  padding: 0 0.9rem;
  line-height: var(--control-h);
}
.field textarea {
  height: 108px;
  min-height: 108px;
  padding: 0.8rem 0.9rem;
  line-height: 1.45;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: #9a9590; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #ff9a9e;
  box-shadow: 0 0 0 3px rgba(255, 46, 53, 0.12);
}
.field.ok input,
.field.ok textarea { border-color: #9fd5b5; }
.field.error input,
.field.error textarea { border-color: var(--brand); }
.field .err {
  display: none;
  margin-top: 0.3rem;
  color: var(--brand);
  font-size: 0.76rem;
  min-height: 1rem;
}
.field.error .err { display: block; }

/* Seçim kartları — eşit sütun, eşit yükseklik, dikey orta */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(var(--choice-cols, 3), minmax(0, 1fr));
  gap: var(--gap);
  width: 100%;
}
.choice-pad {
  height: var(--choice-h);
  visibility: hidden;
  pointer-events: none;
}
.choice {
  position: relative;
  display: block;
  min-width: 0;
  width: 100%;
  margin: 0;
}
.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice > span {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  box-sizing: border-box;
  width: 100%;
  height: var(--choice-h);
  padding: 0 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: #333;
  font-size: 0.8rem;
  line-height: 1.2;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, background .15s;
}
.choice > span::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #cfc9c2;
  box-sizing: border-box;
  flex: 0 0 auto;
}
.choice > span em {
  font-style: normal;
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
  word-break: break-word;
}
.choice input[type="radio"] + span::before { border-radius: 50%; }
.choice input:checked + span {
  border-color: #ffb0b3;
  background: var(--brand-soft);
  color: var(--ink);
}
.choice input:checked + span::before {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2.5px #fff;
}
.choice:hover > span { border-color: #cfc9c2; }

.other-input { margin-top: 0.65rem; display: none; }
.other-input.show { display: block; }
.other-input input {
  width: 100%;
  height: var(--control-h);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 0.9rem;
}

.consent {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--pad);
  background: #fafafa;
}
.consent p {
  margin: 0 0 1rem;
  color: #444;
  font-size: 0.9rem;
  line-height: 1.5;
}
.consent-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  max-width: 100%;
}
.consent-row .choice > span {
  justify-content: center;
  gap: 0.55rem;
  font-weight: 600;
}
.consent-row .choice > span em {
  flex: 0 1 auto;
  text-align: center;
  -webkit-line-clamp: 1;
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: var(--gap);
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.form-actions > span:empty {
  display: block;
  min-height: 44px;
}
.form-actions .btn {
  width: 100%;
  justify-self: stretch;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  height: 44px;
  min-height: 44px;
  padding: 0 1.15rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: #fafafa; }
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-deep); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.alert {
  border-radius: 10px;
  padding: 0.8rem 0.95rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.alert-error {
  background: #fff1f2;
  border: 1px solid #ffc9cc;
  color: #b01d24;
}

.foot {
  margin-top: 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.success-wrap {
  text-align: center;
  padding: 2.75rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.success-wrap .badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8f6ef;
  color: var(--ok);
}
.success-wrap h1 {
  margin: 0 0 0.45rem;
  font-size: 1.55rem;
  font-weight: 600;
}
.success-wrap .ref {
  display: inline-block;
  margin: 1rem 0 1.3rem;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.rs-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(120%);
  z-index: 1000;
  max-width: min(420px, calc(100% - 2rem));
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #1c1c1c;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
}
.rs-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.rs-toast.error { background: #b01d24; }
.rs-toast.ok { background: #1f7a4c; }

@media (max-width: 720px) {
  .shell { width: calc(100% - 1.25rem); padding: 1.25rem 0 1.75rem; margin: 0 auto; }
  .form-body { padding: 1.15rem; }
  --gap: 0.75rem;
  .progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress button { height: 64px; }
  .progress button:nth-child(1),
  .progress button:nth-child(2) { border-bottom: 1px solid var(--line); }
  .progress button:nth-child(2) { border-right: 0; }
  .grid { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-actions { grid-template-columns: 1fr; }
  .form-actions > span:empty { display: none; }
  .form-actions .btn { width: 100%; }
  .brand img { height: 34px; max-width: 140px; }
}
@media (max-width: 480px) {
  .choice-grid { grid-template-columns: 1fr; }
  .consent-row { grid-template-columns: 1fr; }
}
