:root {
  color-scheme: dark;
  --bg: #080a0f;
  --surface: #10141d;
  --surface-2: #151a25;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f7f9ff;
  --muted: #939daf;
  --muted-2: #687386;
  --blue: #2f63ff;
  --blue-bright: #6387ff;
  --blue-soft: rgba(47, 99, 255, 0.14);
  --danger: #ff7d86;
  --success: #5ce0a4;
  --radius-lg: 28px;
  --radius-md: 17px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -8%, rgba(47, 99, 255, 0.16), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Tahoma, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: min(100% - 28px, 730px);
  margin: 0 auto;
  padding: 24px 0 28px;
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 19, 27, 0.88);
  backdrop-filter: blur(16px);
}

.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand-logo {
  width: 58px;
  height: 50px;
  border-radius: 13px;
  background: #181d27;
  object-fit: contain;
}

.brand-name { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: 0.08em; }
.brand-subtitle { margin: 4px 0 0; color: var(--muted-2); font-size: 10px; letter-spacing: 0.12em; }

.demo-badge {
  flex: none;
  border: 1px solid rgba(99, 135, 255, 0.22);
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--blue-soft);
  color: #9bb0ff;
  font-size: 11px;
  white-space: nowrap;
}

.assessment-card {
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(18, 23, 33, 0.98), rgba(13, 17, 24, 0.98));
  box-shadow: var(--shadow);
}

.intro { padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.eyebrow, .step-kicker { margin: 0; color: var(--blue-bright); font-size: 12px; font-weight: 700; }
.intro h1 { margin: 9px 0 10px; font-size: clamp(24px, 5.8vw, 34px); line-height: 1.35; letter-spacing: -0.02em; }
.intro > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.demo-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(99, 135, 255, 0.18);
  border-radius: 12px;
  background: rgba(47, 99, 255, 0.07);
  color: #aebdf2;
  font-size: 12px;
  line-height: 1.6;
}

.demo-note span { color: #668bff; font-size: 9px; }
.progress-wrap { padding: 23px 0 30px; }
.progress-copy { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 11px; }
.progress-track { height: 5px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.07); }
.progress-track span { display: block; width: 16.66%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #6990ff); transition: width 220ms ease; }

.form-step { animation: step-in 220ms ease; }
@keyframes step-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.section-heading { margin-bottom: 25px; }
.section-heading h2 { margin: 7px 0 8px; font-size: clamp(20px, 4.5vw, 25px); line-height: 1.4; }
.section-heading > p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }

.field-grid { display: grid; gap: 13px; }
.field-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: block; margin-top: 17px; color: #c4cad6; font-size: 13px; }
.field-grid .field { margin-top: 0; }
.field small, legend small { color: var(--muted-2); font-weight: 400; }

input, textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  outline: none;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input { height: 48px; padding: 0 14px; }
textarea { min-height: 78px; resize: vertical; padding: 13px 14px; line-height: 1.65; }
input::placeholder, textarea::placeholder { color: #596475; }
input:focus, textarea:focus { border-color: rgba(99, 135, 255, 0.68); background: rgba(47, 99, 255, 0.035); box-shadow: 0 0 0 3px rgba(47, 99, 255, 0.1); }
.compact-field { max-width: 250px; }

.choice-group { min-width: 0; margin: 0 0 24px; padding: 0; border: 0; }
.choice-group legend { width: 100%; margin-bottom: 11px; color: #dce1eb; font-size: 14px; font-weight: 700; line-height: 1.6; }
.choice-group legend small { display: block; margin-top: 2px; font-size: 11px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.choice-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.choice {
  min-height: 49px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.022);
  color: #acb5c5;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 120ms ease;
}

.choice:hover { border-color: var(--line-strong); color: #e2e6ee; }
.choice:active { transform: scale(0.985); }
.choice.is-selected { border-color: rgba(99, 135, 255, 0.76); background: var(--blue-soft); color: white; box-shadow: inset 0 0 0 1px rgba(47, 99, 255, 0.08); }
.choice-warning.is-selected { border-color: rgba(255, 187, 92, 0.55); background: rgba(255, 173, 57, 0.1); color: #ffd49b; }
.number-grid { display: grid; grid-template-columns: repeat(7, minmax(38px, 1fr)); gap: 7px; direction: ltr; }
.number-choice { min-height: 45px; }
.rating-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; direction: ltr; }
.rating-choice { min-height: 48px; }

.privacy-note {
  display: flex;
  gap: 11px;
  margin-top: 22px;
  padding: 15px;
  border: 1px solid rgba(99, 135, 255, 0.18);
  border-radius: 14px;
  background: rgba(47, 99, 255, 0.07);
  color: #afbbe7;
  font-size: 12px;
  line-height: 1.75;
}

.privacy-note p { margin: 0; }
.shield-icon { display: grid; flex: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(99, 135, 255, 0.18); color: #a7b8ff; font-weight: 800; }
.error-message { margin: 19px 0 0; padding: 11px 13px; border-radius: 12px; background: rgba(255, 82, 95, 0.1); color: #ff9ba2; font-size: 12px; line-height: 1.6; }

.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 30px; }
.button { min-height: 46px; cursor: pointer; border-radius: 13px; padding: 0 20px; font-weight: 700; transition: transform 120ms ease, border-color 150ms ease, background 150ms ease; }
.button:active { transform: scale(0.985); }
.button-primary { margin-right: auto; border: 1px solid var(--blue); background: var(--blue); color: white; box-shadow: 0 8px 25px rgba(47, 99, 255, 0.22); }
.button-primary:hover { background: #4270ff; }
.button-secondary { border: 1px solid var(--line-strong); background: transparent; color: #c6cedb; }
.button-secondary:hover { background: rgba(255, 255, 255, 0.04); }

.success-state { padding: 45px 0 25px; text-align: center; animation: step-in 250ms ease; }
.success-icon { display: grid; place-items: center; width: 65px; height: 65px; margin: 0 auto 20px; border-radius: 50%; background: rgba(65, 213, 151, 0.12); color: var(--success); font-size: 30px; }
.success-state h2 { margin: 8px 0 10px; font-size: 26px; }
.success-state > p:not(.step-kicker) { max-width: 480px; margin: 0 auto; color: var(--muted); font-size: 14px; line-height: 1.85; }
.success-state .button { margin-top: 24px; }

footer { padding: 18px 5px 0; color: #535e70; font-size: 10px; text-align: center; line-height: 1.7; }
footer span { margin: 0 5px; color: #334f9b; }
[hidden] { display: none !important; }

@media (max-width: 560px) {
  .page-shell { width: min(100% - 20px, 730px); padding-top: 12px; }
  .assessment-card { padding: 22px 17px; border-radius: 23px; }
  .brand-bar { border-radius: 17px; }
  .brand-logo { width: 52px; height: 46px; }
  .demo-badge { padding: 6px 9px; }
  .field-grid-3 { grid-template-columns: 1fr 1fr; }
  .field-grid-3 .field:first-child { grid-column: 1 / -1; }
  .choice-grid-3 { grid-template-columns: 1fr; }
  .number-grid { grid-template-columns: repeat(7, minmax(32px, 1fr)); gap: 5px; }
  .number-choice { min-height: 42px; }
}

@media (max-width: 380px) {
  .brand-subtitle { display: none; }
  .choice-grid { grid-template-columns: 1fr; }
  .choice-grid-2 { grid-template-columns: 1fr 1fr; }
  .number-grid { grid-template-columns: repeat(4, 1fr); direction: rtl; }
}

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