:root {
  color-scheme: dark;
  --bg: #0f1b4e;
  --bg-deep: #0a1338;
  --accent: #ffaa17;
  --accent-soft: rgba(255, 170, 23, .12);
  --accent-line: rgba(255, 170, 23, .55);
  --on-accent: #0f1b4e;
  --ink: #f3f5fb;
  --muted: #a9b2d0;
  --faint: #7f8ab0;
  --surface: rgba(255, 255, 255, .045);
  --surface-hi: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .10);
  --line-hi: rgba(255, 255, 255, .18);
  --danger: #ff8f87;
  --nps-low: #f0625f;
  --nps-mid: #ffaa17;
  --nps-high: #3ccf8e;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 480px at 50% -12%, rgba(255, 170, 23, .10), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  font: 16px/1.55 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; justify-content: center;
}
.app { width: 100%; max-width: 640px; padding: 36px 16px 40px; display: flex; flex-direction: column; min-height: 100vh; }
.top { margin-bottom: 28px; }
.brand { display: flex; align-items: center; }
.brand img { height: 34px; width: auto; display: block; }
.bar { display: flex; gap: 6px; margin-top: 18px; }
.bar span { flex: 1; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bar span b { display: block; height: 100%; background: var(--accent); width: 0; transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025));
  border: 1px solid var(--line); border-radius: 24px; padding: 36px 32px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 40px 80px -40px rgba(0, 0, 0, .55);
  display: flex; flex-direction: column;
}
.enter { animation: enter .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.kicker { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .14em; margin: 0 0 14px; }
h1 { font-size: 24px; line-height: 1.3; font-weight: 700; letter-spacing: -.015em; margin: 0 0 10px; }
.help { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.field { margin-top: 14px; }
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.opt:hover { border-color: var(--line-hi); background: var(--surface-hi); }
.opt:active { transform: scale(.99); }
.opt .k {
  flex: none; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line-hi);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); transition: all .2s;
}
.opt[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); }
.opt[aria-pressed="true"] .k { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.scale { display: flex; gap: 8px; }
.scale button {
  flex: 1; min-width: 0; height: 54px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  color: var(--ink); font-family: inherit; font-size: 17px; font-weight: 600; cursor: pointer; transition: all .2s;
  font-variant-numeric: tabular-nums;
}
.scale button:hover { border-color: var(--line-hi); background: var(--surface-hi); }
.scale button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 8px 22px -10px rgba(255, 170, 23, .7); }
.scale.nps { gap: 6px; }
.scale.nps button { height: 48px; font-size: 15px; }
.scale.nps button[aria-pressed="true"].lo { background: var(--nps-low); border-color: var(--nps-low); color: #fff; box-shadow: none; }
.scale.nps button[aria-pressed="true"].mid { background: var(--nps-mid); border-color: var(--nps-mid); color: var(--on-accent); box-shadow: none; }
.scale.nps button[aria-pressed="true"].hi { background: var(--nps-high); border-color: var(--nps-high); color: #08291b; box-shadow: none; }
.ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--faint); margin-top: 10px; gap: 12px; }
.ends span:last-child { text-align: right; }
.matrix { display: grid; gap: 10px; }
.mrow { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 14px; }
.mrow p { margin: 0 0 10px; font-weight: 600; font-size: 15px; }
.mrow .scale { gap: 6px; }
.mrow .scale button { height: 40px; font-size: 15px; background: transparent; }
.mrow .scale button[aria-pressed="true"] { background: var(--accent); }
.legend { font-size: 13px; color: var(--faint); margin: 0 0 14px; }
input[type=text], input[type=email], input[type=tel], textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px rgba(255, 170, 23, .10); }
textarea { min-height: 140px; resize: vertical; }
.hint { font-size: 13px; color: var(--faint); margin-top: 10px; }
.err { color: var(--danger); font-size: 14px; min-height: 20px; margin: 14px 0 0; }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; }
.btn {
  font-family: inherit; font-size: 15px; font-weight: 700; letter-spacing: .01em; line-height: 1;
  border-radius: 12px; padding: 16px 26px; cursor: pointer; border: 1px solid transparent; transition: all .2s;
}
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 28px -12px rgba(255, 170, 23, .75); }
.btn.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn.primary[aria-disabled="true"] { background: var(--surface-hi); color: var(--faint); box-shadow: none; transform: none; filter: none; }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn.ghost:hover { color: var(--ink); border-color: var(--line-hi); }
.btn.ghost[hidden], .nav[hidden] { display: none; }
.hero h1 { font-size: 30px; line-height: 1.2; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero ul { list-style: none; padding: 0; margin: 6px 0 28px; display: grid; gap: 10px; color: var(--muted); font-size: 15px; }
.hero li { display: flex; align-items: center; gap: 12px; }
.hero li::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); }
.center { text-align: center; margin: auto 0; padding: 12px 0; }
.center .help { max-width: 420px; margin-left: auto; margin-right: auto; }
.icon {
  width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent);
}
.icon svg { width: 28px; height: 28px; }
.icon.warn { border-color: rgba(255, 143, 135, .5); background: rgba(255, 143, 135, .1); color: var(--danger); }
.spin { width: 40px; height: 40px; margin: 0 auto 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
details { margin-top: 24px; font-size: 13px; text-align: left; color: var(--muted); }
pre { white-space: pre-wrap; word-break: break-word; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); padding: 14px; border-radius: 12px; color: var(--ink); }
.link { background: none; border: 0; color: var(--faint); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; font-size: 14px; margin-left: 14px; }
.link:hover { color: var(--ink); }
.note { border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--ink); margin: 0 0 22px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 480px) {
  .app { padding-top: 24px; }
  .brand img { height: 28px; }
  .card { padding: 26px 18px; border-radius: 20px; }
  h1 { font-size: 21px; }
  .hero h1 { font-size: 25px; }
  .scale { gap: 6px; }
  .scale.nps { flex-wrap: wrap; }
  .scale.nps button { flex: 0 0 calc((100% - 30px) / 6); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
