:root {
  --ink: #2c2547;
  --muted: #655e7d;
  --accent: #6d4bc3;
  --accent-dark: #54369f;
  --rose: #c8527f;
  --surface: #ffffff;
  --soft: #f4f0fb;
  --line: #ddd5ee;
  --error: #ad2340;
  --ok: #17684f;
  --bg: linear-gradient(170deg, #2f2560 0%, #6d4bc3 48%, #e5a2b8 100%);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  padding: 24px 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #3c2f78;
  background-image: var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 400 16px/1.55 'Nunito Sans', system-ui, sans-serif;
}
.card {
  width: 100%;
  max-width: 440px;
  padding: 28px 24px 32px;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgb(30 18 70 / 35%);
}
h1, h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 2.3rem; text-align: center; color: var(--accent-dark); }
h2 { font-size: 1.55rem; }
p { margin: 0 0 14px; }
.subtitle { text-align: center; color: var(--muted); font-size: 1.05rem; margin-bottom: 30px; }
.hint { color: var(--muted); font-size: .92rem; }

.stack { display: flex; flex-direction: column; gap: 12px; }
button, .btn { font: inherit; cursor: pointer; }
.btn {
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  transition: background .15s;
}
.btn:hover { background: var(--accent-dark); }
.btn.secondary { color: var(--accent-dark); background: var(--soft); }
.btn.secondary:hover { background: #e8e0f7; }
.btn.danger { color: var(--error); background: #fbeef1; }
.btn:disabled { opacity: .6; cursor: wait; }
.link {
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.back { display: inline-block; margin: -8px 0 12px -2px; text-decoration: none; }
.footer-links { display: flex; justify-content: center; gap: 22px; margin-top: 18px; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; }

label.field { display: block; margin-bottom: 14px; font-weight: 600; }
label.field .req { color: var(--rose); }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%;
  margin-top: 5px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
textarea { min-height: 150px; resize: vertical; }
textarea.output { min-height: 240px; background: var(--soft); line-height: 1.65; }
.reading {
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--soft);
  font-family: 'Fraunces', Georgia, serif;
  line-height: 1.7;
  white-space: pre-wrap;
}

.choices { border: 0; padding: 0; margin: 0 0 18px; }
.choices legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  margin-bottom: 9px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--accent); background: var(--soft); }
.choice input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
.choice small { display: block; color: var(--muted); }
.voice-row { display: flex; align-items: stretch; gap: 8px; margin-bottom: 9px; }
.voice-row .choice { flex: 1; min-width: 0; margin-bottom: 0; }
.demo-btn { width: auto; flex: none; min-width: 112px; padding: 8px 10px; font-size: .9rem; }
.check { display: flex; align-items: center; gap: 10px; margin: 2px 0 16px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }

.paid-box {
  margin-top: 16px;
  padding: 14px;
  border: 2px dashed var(--rose);
  border-radius: 16px;
}
.paid-box.locked { cursor: pointer; }
.paid-box h3 { margin: 0 0 10px; font-size: 1rem; }
.notice { padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; font-weight: 600; }
.notice.error { color: var(--error); background: #fbeef1; }
.notice.ok { color: var(--ok); background: #e9f6f1; }
.steps { padding-left: 22px; margin: 0 0 20px; }
.steps li { margin-bottom: 12px; }
.price { float: right; font-weight: 700; color: var(--accent-dark); }
.history-item {
  display: block;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 9px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-align: left;
}
.history-item:hover { border-color: var(--accent); }
.history-item strong { display: block; }
.history-item span { display: block; color: var(--muted); font-size: .92rem; }
.demo-tag { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: .82rem; }
