:root {
  --bg: #0a0a0a;
  --panel: #171717;
  --panel-strong: #202020;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.24);
  --text: #f4f4f4;
  --muted: rgba(255, 255, 255, 0.4);
  --muted-strong: rgba(255, 255, 255, 0.68);
  --button: #525252;
  --button-text: #111111;
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.03), transparent 30%),
    linear-gradient(180deg, #0b0b0b 0%, #090909 100%);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  html,
  body,
  *,
  *::before,
  *::after {
    cursor: none;
  }
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 12px;
  height: 12px;
  border: 0;
}

.cursor-dot__core {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
}

.cursor-ring {
  width: 48px;
  height: 48px;
}

.page-shell {
  min-height: 100svh;
  padding: 28px 24px 40px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.quiz-scale-frame {
  width: 100%;
  height: calc(100svh - 68px);
  display: grid;
  place-items: start center;
  overflow: hidden;
}

.quiz {
  width: min(100%, 1110px);
  margin: 0 auto;
  transform-origin: top center;
  will-change: transform;
}

.quiz__header {
  display: grid;
  justify-items: center;
  row-gap: 18px;
  margin-bottom: 64px;
}

.quiz__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.34em;
  color: var(--muted);
}

.quiz__title {
  margin: 0;
  text-align: center;
  font-size: clamp(58px, 7vw, 84px);
  line-height: 0.88;
  letter-spacing: -0.06em;
  font-weight: 800;
}

.progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 0 auto 58px;
  width: min(100%, 756px);
}

.progress__segment {
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  transition: background-color 260ms ease;
}

.progress__segment.is-active,
.progress__segment.is-complete {
  background: rgba(255, 255, 255, 0.82);
}

.quiz__body {
  position: relative;
  width: min(100%, 756px);
  margin: 0 auto;
}

.panel {
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  filter: blur(8px);
  pointer-events: none;
  transition:
    opacity 420ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.panel.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  pointer-events: auto;
}

.question-block {
  margin-bottom: 36px;
}

.question-block__title {
  margin: 0 0 6px;
  font-size: clamp(34px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.question-block__title span {
  font-size: 0.58em;
  font-weight: 700;
  color: var(--muted-strong);
}

.question-block__hint {
  margin: 0;
  font-size: 18px;
  color: var(--muted);
}

.answers {
  display: grid;
  gap: 8px;
}

.answer {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-height: 70px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  transition:
    border-color 240ms ease,
    background-color 240ms ease,
    box-shadow 240ms ease;
}

.answer:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.07);
}

.answer.is-selected {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.answer__badge {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  color: var(--muted-strong);
  font-size: 15px;
  font-weight: 700;
}

.answer__text {
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.panel__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
}

.panel__counter {
  font-size: 16px;
  color: var(--muted);
}

.action-button,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 34px;
  background: #525252;
  color: #111111;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    background-color 220ms ease;
}

.action-button span,
.submit-button span {
  margin-left: 6px;
}

.action-button:disabled {
  background: #525252;
  color: #111111;
  opacity: 1;
  cursor: not-allowed;
  pointer-events: none;
}

.action-button:not(:disabled) {
  background: #ffffff;
  color: #111111;
}

.action-button:not(:disabled):hover,
.submit-button:hover {
  transform: translateY(-1px);
}

.action-button:disabled:hover {
  background: #525252;
  color: #111111;
  transform: none;
}

.action-button:not(:disabled):hover {
  background: #ffffff;
}

.panel--result {
  padding-top: 8px;
}

.result-card {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 62px;
}

.result-card__copy {
  max-width: 500px;
  margin: 0 auto 46px;
  text-align: center;
}

.result-card__title {
  margin: 0 0 18px;
  font-size: clamp(44px, 6vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 800;
}

.result-card__text {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}

.result-form {
  width: min(100%, 512px);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 10px;
}

.field[hidden] {
  display: none !important;
}

.field--contact-method {
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
}

.field__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.contact-method {
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    border-color 220ms ease,
    background-color 220ms ease,
    color 220ms ease;
}

.contact-method:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.09);
}

.contact-method.is-active {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.field input {
  width: 100%;
  min-height: 58px;
  padding: 0 20px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  outline: none;
  transition:
    border-color 220ms ease,
    background-color 220ms ease,
    box-shadow 220ms ease;
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.field input:focus {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.field input.is-invalid {
  border-color: rgba(255, 103, 103, 0.75);
  box-shadow: 0 0 0 4px rgba(255, 103, 103, 0.08);
}

.form-error {
  min-height: 20px;
  margin: -4px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: #ff9f9f;
}

.form-error[hidden] {
  display: block;
  visibility: hidden;
}

.submit-button {
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.94));
  color: #111111;
  box-shadow: var(--shadow);
}

@media (max-width: 980px) {
  .page-shell {
    padding-inline: 20px;
  }

  .quiz-scale-frame {
    height: auto;
    overflow: visible;
  }

  .quiz__header {
    margin-bottom: 48px;
  }

  .progress,
  .quiz__body {
    width: 100%;
  }

}

@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

@media (max-width: 700px) {
  .page-shell {
    padding: 20px 16px 28px;
    overflow-y: auto;
    display: block;
  }

  .quiz-scale-frame {
    min-height: calc(100svh - 48px);
  }

  .quiz__header {
    row-gap: 14px;
    margin-bottom: 36px;
  }

  .quiz__title {
    font-size: clamp(46px, 16vw, 66px);
    line-height: 0.92;
  }

  .progress {
    margin-bottom: 34px;
  }

  .question-block {
    margin-bottom: 24px;
  }

  .question-block__title {
    font-size: 38px;
    line-height: 0.98;
  }

  .question-block__hint {
    font-size: 16px;
  }

  .answer {
    min-height: 66px;
    padding: 16px 16px;
    gap: 14px;
  }

  .answer__badge {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .answer__text {
    font-size: 15px;
  }

  .panel__footer {
    margin-top: 24px;
    flex-direction: column;
    align-items: stretch;
  }

  .action-button,
  .submit-button {
    width: 100%;
    justify-content: center;
  }

  .result-card {
    padding-top: 36px;
  }

  .result-card__copy {
    margin-bottom: 30px;
  }

  .result-card__title {
    font-size: 42px;
  }

  .result-card__text {
    font-size: 16px;
  }

  .field input,
  .field select {
    min-height: 54px;
  }

  .contact-methods {
    grid-template-columns: 1fr;
  }
}
