:root {
  color-scheme: light dark;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --text: #151823;
  --muted: #687083;
  --line: #dfe3ec;
  --accent: #6e63d8;
  --accent-strong: #574cc5;
  --accent-soft: #eeecff;
  --success: #257a55;
  --danger: #b23a48;
  --shadow: 0 18px 50px rgba(28, 31, 43, .09);
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1118;
    --surface: #171a24;
    --surface-2: #202431;
    --text: #f3f5fb;
    --muted: #a4acbd;
    --line: #303646;
    --accent: #9288f0;
    --accent-strong: #a89ff5;
    --accent-soft: #282542;
    --success: #79d3a8;
    --danger: #ff9aa5;
    --shadow: 0 18px 50px rgba(0, 0, 0, .28);
  }
}

* { box-sizing: border-box; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
a { color: inherit; }

.shell {
  width: min(100% - 32px, 660px);
  margin: 0 auto;
  padding: 30px 0 42px;
}
.brandbar {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 760;
  letter-spacing: -.02em;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 62%, #c9c4ff));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
  position: relative;
}
.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 2px;
  background: white;
}
.brand-mark::before { top: 10px; }
.brand-mark::after { top: 17px; }

.hero { text-align: center; margin-bottom: 24px; }
h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.06;
  letter-spacing: -.045em;
}
.lead {
  max-width: 540px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.card {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
.legend,
.field-label {
  display: block;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 720;
  letter-spacing: .01em;
  color: var(--muted);
}

.reason-list { display: grid; gap: 9px; }
.reason-option { display: block; cursor: pointer; }
.reason-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.reason-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.reason-dot {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 1.5px solid color-mix(in srgb, var(--muted) 70%, transparent);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.reason-dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(.65);
  transition: opacity .16s ease, transform .16s ease;
}
.reason-option:hover .reason-box {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  transform: translateY(-1px);
}
.reason-option input:focus-visible + .reason-box {
  outline: 3px solid color-mix(in srgb, var(--accent) 25%, transparent);
  outline-offset: 2px;
}
.reason-option input:checked + .reason-box {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}
.reason-option input:checked + .reason-box .reason-dot { border-color: var(--accent); }
.reason-option input:checked + .reason-box .reason-dot::after { opacity: 1; transform: scale(1); }
.reason-copy { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }

.reveal {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.reveal[hidden] { display: none !important; }
.subchoices { display: grid; gap: 8px; margin-bottom: 16px; }
.subchoice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  background: var(--surface);
}
.subchoice input { accent-color: var(--accent); }
.subchoice span { font-size: 14px; }

.recovery {
  position: relative;
  margin: 16px 0 0;
  padding: 17px 17px 16px 19px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent-soft) 58%, var(--surface));
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  overflow: hidden;
}
.recovery::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}
.recovery.note {
  border-color: var(--line);
  background: var(--surface-2);
}
.recovery.note::before { background: color-mix(in srgb, var(--muted) 60%, transparent); }
.recovery-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 9px;
  padding: 0 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 13%, var(--surface));
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.recovery.note .recovery-kicker {
  background: color-mix(in srgb, var(--muted) 10%, var(--surface));
  color: var(--muted);
}
.recovery strong { display: block; margin-bottom: 5px; font-size: 15px; }
.recovery p { margin: 0; color: color-mix(in srgb, var(--text) 82%, var(--muted)); }
.recovery-actions { margin-top: 13px; }
.compact-cta { min-height: 40px; padding: 0 14px; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

.feedback-area { margin-top: 16px; }
textarea,
input[type="email"] {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  outline: 0;
}
textarea {
  min-height: 118px;
  resize: vertical;
  padding: 13px 14px;
  line-height: 1.45;
}
input[type="email"] { min-height: 46px; padding: 0 14px; }
textarea:focus,
input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.helper {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.warning { color: color-mix(in srgb, var(--danger) 78%, var(--muted)); }

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}
.btn {
  appearance: none;
  border: 0;
  min-height: 46px;
  border-radius: 12px;
  padding: 0 17px;
  font-weight: 720;
  cursor: pointer;
  background: var(--accent);
  color: white;
  transition: transform .15s ease, background .15s ease, opacity .15s ease;
}
.btn:hover { background: var(--accent-strong); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
}
.link-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  min-height: 44px;
  padding: 0 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.status { margin-top: 12px; font-size: 13px; }
.status.ok { color: var(--success); }
.status.error { color: var(--danger); }

.done { text-align: center; padding: 10px 4px 6px; }
.done h2 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.done p { margin: 8px auto 0; color: var(--muted); max-width: 470px; line-height: 1.5; }

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  min-height: 48px;
  padding: 10px 8px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-weight: 680;
  font-size: 14px;
}
.segmented input:checked + span { background: var(--accent-soft); border-color: var(--accent); }
.segmented input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 25%, transparent); outline-offset: 2px; }

.diag-box {
  display: flex;
  gap: 10px;
  padding: 12px 13px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  cursor: pointer;
}
.diag-box input { margin-top: 2px; accent-color: var(--accent); }
.diag-box b { display: block; font-size: 13px; }
.diag-box em { display: block; margin-top: 3px; color: var(--muted); font-style: normal; font-size: 12px; line-height: 1.45; }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.footer {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px;
}
.footer a { text-underline-offset: 3px; }

@media (max-width: 560px) {
  .shell { width: min(100% - 22px, 660px); padding-top: 22px; }
  .brandbar { margin-bottom: 22px; }
  .card { padding: 17px; border-radius: 16px; }
  .segmented { grid-template-columns: 1fr; }
  .segmented span { min-height: 44px; }
  .actions { align-items: stretch; flex-direction: column; }
  .btn, .link-btn { width: 100%; }
}

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

.screenshot-section { margin-top: 16px; }
.screenshot-drop {
  min-height: 72px;
  padding: 13px 14px;
  border: 1px dashed color-mix(in srgb, var(--muted) 52%, var(--line));
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.screenshot-drop:hover,
.screenshot-drop.dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.screenshot-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
}
.screenshot-drop b { display: block; font-size: 13px; }
.screenshot-drop small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.screenshot-preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.screenshot-preview img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: var(--surface-2);
}
.screenshot-meta {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px 7px 12px;
  color: var(--muted);
  font-size: 12px;
}
.link-btn.compact { min-height: 34px; padding: 0 6px; width: auto; }
