:root {
  --navy: #10102f;
  --navy-2: #19163d;
  --aubergine: #3c173f;
  --purple: #6e2f6a;
  --pink: #eb3f91;
  --pink-dark: #d82f7c;
  --cyan: #079bd7;
  --cyan-dark: #0879b4;
  --green: #4a9b43;
  --text: #161631;
  --muted: #687086;
  --line: #dce1ea;
  --line-strong: #c6ceda;
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --focus: #0077b9;
  --danger: #b4233d;
  --shadow: 0 24px 70px rgba(20, 18, 53, 0.12);
  --radius: 10px;
  --content: 1220px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --question-control-space: 22px;
  --question-option-gap: 7px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--surface-soft);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button,
label,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 42%, transparent);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 14px;
  color: #fff;
  background: var(--navy);
  border-radius: 4px;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: relative;
  z-index: 30;
  background: #fff;
  border-bottom: 1px solid rgba(16, 16, 47, 0.08);
}

.site-header__inner {
  width: min(calc(100% - 48px), var(--content));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-actions,
.language-switch {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 24px;
}

.language-switch {
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
}

.language-switch__button {
  min-width: 42px;
  min-height: 34px;
  padding: 5px 9px;
  border: 0;
  border-radius: 3px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.language-switch__button.is-active {
  color: #fff;
  background: var(--navy);
}

.brand-logo {
  display: block;
  width: 226px;
  max-width: 48vw;
  height: auto;
}

.header-note {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

main {
  flex: 1;
}

.welcome-view {
  background: #fff;
}

.welcome-panel {
  min-height: 685px;
  display: grid;
  grid-template-columns: minmax(460px, 0.88fr) minmax(520px, 1.12fr);
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 95%, rgba(235, 63, 145, 0.82), transparent 34%),
    linear-gradient(128deg, var(--aubergine) 0%, var(--navy) 72%);
}

.welcome-panel__content {
  position: relative;
  z-index: 2;
  padding: clamp(72px, 8vw, 118px) clamp(44px, 8vw, 128px);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.welcome-panel__content::after {
  content: "";
  position: absolute;
  right: -150px;
  bottom: -110px;
  width: 310px;
  height: 310px;
  border: 38px solid rgba(255, 255, 255, 0.045);
  transform: rotate(30deg);
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0 50%);
  pointer-events: none;
}

.welcome-panel h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(48px, 5.2vw, 78px);
  line-height: 1.04;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.welcome-lead {
  max-width: 590px;
  margin: 30px 0 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.55;
}

.welcome-note {
  max-width: 590px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.73);
  font-size: 14px;
}

.welcome-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 28px;
  margin-top: 34px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 15px;
}

.meta-item svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.welcome-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.privacy-copy {
  max-width: 570px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.welcome-panel__media {
  position: relative;
  min-height: 685px;
  margin-left: -125px;
  overflow: hidden;
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%, 28% 50%);
  background: #dce7ec;
}

.welcome-panel__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 48% 50%;
}

.button {
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 13px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: inherit;
  background: none;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button--primary {
  color: #fff;
  background: var(--pink);
  border-color: var(--pink);
  box-shadow: 0 12px 28px rgba(235, 63, 145, 0.24);
}

.button--primary:hover {
  background: var(--pink-dark);
  border-color: var(--pink-dark);
}

.button--secondary {
  color: var(--navy);
  background: #fff;
  border-color: var(--line-strong);
}

.button--secondary:hover {
  border-color: var(--navy);
}

.button--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
}

.button--ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.survey-view {
  min-height: 720px;
  padding: 0 0 80px;
  background: var(--surface-soft);
}

.section-progress {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  min-height: 78px;
  padding: 0 max(24px, calc((100vw - var(--content)) / 2));
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.section-progress__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #8a91a1;
  font-size: 15px;
}

.section-progress__item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 64px;
  right: 24px;
  bottom: 20px;
  height: 1px;
  background: var(--line);
}

.section-progress__number {
  width: 36px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--cyan-dark);
  border: 1px solid var(--cyan);
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0 50%);
  background: #fff;
  font-weight: 700;
}

.section-progress__item.is-active {
  color: var(--pink-dark);
  font-weight: 700;
}

.section-progress__item.is-active .section-progress__number {
  color: #fff;
  background: var(--pink);
  border-color: var(--pink);
}

.section-progress__item.is-complete {
  color: var(--navy);
}

.section-progress__item.is-complete .section-progress__number {
  color: #fff;
  background: var(--cyan);
  border-color: var(--cyan);
}

.matrix-row {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.survey-layout {
  width: min(calc(100% - 48px), var(--content));
  margin: 54px auto 0;
  display: grid;
  grid-template-columns: 34% 66%;
  min-height: 655px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.section-media {
  position: relative;
  min-height: 655px;
  overflow: hidden;
  background: var(--navy);
}

.section-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 42%, rgba(16, 16, 47, 0.16) 56%, rgba(16, 16, 47, 0.94) 100%);
  pointer-events: none;
}

.section-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: opacity 180ms ease, object-position 180ms ease, transform 180ms ease;
}

.welcome-panel__media {
  overflow: hidden;
}

.welcome-panel__media img {
  transition: object-position 180ms ease, transform 180ms ease;
}

.section-media__caption {
  position: absolute;
  z-index: 2;
  left: 30px;
  right: 30px;
  bottom: 30px;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  align-items: start;
  color: #fff;
}

.section-media__caption > span {
  color: var(--pink);
  font-size: 34px;
  line-height: 1;
  font-weight: 300;
}

.section-media__caption strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
}

.section-media__caption p {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.question-workspace {
  padding: 42px clamp(34px, 5vw, 68px) 36px;
}

.question-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 24px;
}

.question-counter {
  color: var(--cyan-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.question-required {
  margin-left: 10px;
  color: var(--muted);
  font-size: 12px;
}

.save-status {
  color: var(--muted);
  font-size: 12px;
}

.save-status::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--green);
}

.progress-track {
  height: 3px;
  margin-top: 18px;
  overflow: hidden;
  background: #e9edf2;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  transition: width 220ms ease;
}

#question-form {
  margin-top: 30px;
}

.question-title {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.question-text {
  max-width: 760px;
  margin: 11px 0 0;
  color: var(--text);
  font-size: clamp(24px, 2.3vw, 34px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.question-helper {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.question-note {
  margin: 0 0 18px;
  padding: 12px 15px;
  color: var(--navy);
  background: rgba(0, 156, 220, 0.07);
  border-left: 3px solid var(--cyan);
  font-size: 14px;
  line-height: 1.55;
}

.question-note--rich {
  padding: 16px 18px 15px;
}

.question-note--rich p {
  margin: 0 0 9px;
}

.question-note--rich ul,
.question-note--rich ol {
  margin: 0;
  padding-left: 22px;
}

.question-note--rich li + li {
  margin-top: 8px;
}

.question-note--rich strong,
.question-note--rich b {
  color: #10102f;
  font-weight: 750;
}

.question-note--rich a {
  color: #007fac;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.question-note--rich a:hover {
  color: #e9348b;
}

.option-list {
  display: grid;
  gap: var(--question-option-gap);
  margin-top: var(--question-control-space);
}

.option-card {
  position: relative;
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 13px;
  align-items: start;
  min-height: 48px;
  padding: 11px 14px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.option-card:hover {
  border-color: #aeb8c7;
}

.option-card.is-selected {
  border-color: var(--pink);
  background: rgba(235, 63, 145, 0.035);
  box-shadow: inset 3px 0 0 var(--pink);
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: var(--pink);
}

.option-card__label {
  line-height: 1.4;
}

.option-card__text {
  grid-column: 2;
  width: 100%;
  margin-top: 3px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.text-input,
.textarea-input {
  width: 100%;
  margin-top: var(--question-control-space);
  padding: 15px 16px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.textarea-input {
  min-height: 145px;
  resize: vertical;
}

.text-input:focus,
.textarea-input:focus,
.option-card__text:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(0, 119, 185, 0.12);
  outline: none;
}

.number-input-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  max-width: 360px;
  margin-top: var(--question-control-space);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.number-input-wrap .text-input {
  margin-top: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
}

.number-input-prefix {
  padding: 0 16px;
  color: var(--navy);
  font-weight: 700;
}

.scale-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  gap: 10px;
  margin-top: var(--question-control-space);
}

.scale-option {
  position: relative;
}

.scale-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.scale-option label {
  min-height: 64px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}

.scale-option input:checked + label {
  color: #fff;
  background: var(--pink);
  border-color: var(--pink);
}

.scale-option input:focus-visible + label {
  outline: 3px solid color-mix(in srgb, var(--focus) 42%, transparent);
  outline-offset: 3px;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.matrix-list {
  display: grid;
  gap: 12px;
  margin-top: var(--question-control-space);
}

.matrix-row {
  padding: 18px;
  background: var(--surface-soft);
  border-left: 3px solid var(--cyan);
}

.matrix-row__title {
  margin: 0 0 13px;
  font-weight: 700;
}

.matrix-options {
  display: grid;
  gap: 8px;
}

.matrix-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid transparent;
  cursor: pointer;
}

.matrix-option:has(input:checked) {
  border-color: var(--pink);
}

.matrix-option input {
  margin-top: 3px;
  accent-color: var(--pink);
}

.external-box {
  margin-top: var(--question-control-space);
  padding: 24px;
  background: linear-gradient(135deg, rgba(7, 155, 215, 0.07), rgba(235, 63, 145, 0.06));
  border-left: 4px solid var(--cyan);
}

.external-box .button {
  margin-top: 22px;
}

.validation-message {
  margin-top: 20px;
  padding: 11px 13px;
  color: var(--danger);
  background: #fff3f5;
  border-left: 3px solid var(--danger);
  font-size: 14px;
}

.question-actions {
  margin-top: 28px;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
}

.success-view {
  min-height: 680px;
  padding: 88px 24px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 15% 95%, rgba(235, 63, 145, 0.33), transparent 32%),
    linear-gradient(135deg, var(--aubergine), var(--navy));
}

.success-card {
  width: min(100%, 660px);
  padding: clamp(42px, 7vw, 76px);
  text-align: center;
  background: #fff;
  box-shadow: var(--shadow);
}

.success-mark {
  width: 82px;
  height: 90px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0 50%);
}

.success-mark svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-card h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.success-card p {
  margin: 20px auto 30px;
  color: var(--muted);
  font-size: 18px;
}

.post-submit-survey {
  margin: 34px 0 24px;
  padding: 24px;
  text-align: left;
  background: rgba(0, 156, 220, 0.06);
  border: 1px solid rgba(0, 156, 220, 0.24);
  border-radius: 8px;
}

.post-submit-survey__optional {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--pink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-submit-survey h2 {
  margin: 0;
  color: var(--navy);
  font-size: 24px;
  line-height: 1.2;
}

.post-submit-survey p {
  margin: 12px 0 20px;
  font-size: 15px;
  line-height: 1.55;
}

.post-submit-survey + .button {
  margin-top: 0;
}

.site-footer {
  min-height: 120px;
  padding: 28px max(24px, calc((100vw - var(--content)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.site-footer img {
  width: 185px;
  height: auto;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1020px) {
  .welcome-panel {
    grid-template-columns: 1fr;
  }

  .welcome-panel__content {
    min-height: 590px;
    padding: 70px 48px 90px;
  }

  .welcome-panel__media {
    min-height: 430px;
    margin: -55px 0 0;
    clip-path: polygon(0 16%, 68% 0, 100% 16%, 100% 100%, 0 100%);
  }

  .survey-layout {
    grid-template-columns: 1fr;
  }

  .section-media {
    min-height: 275px;
    max-height: 320px;
  }

  .section-media__caption {
    bottom: 22px;
  }
}

@media (max-width: 720px) {
  .site-header__inner {
    width: min(calc(100% - 32px), var(--content));
    min-height: 72px;
  }

  .brand-logo {
    width: 180px;
  }

  .header-note {
    display: none;
  }

  .welcome-panel__content {
    min-height: 580px;
    padding: 64px 24px 86px;
  }

  .welcome-panel h1 {
    font-size: clamp(43px, 14vw, 60px);
  }

  .welcome-lead {
    font-size: 18px;
  }

  .welcome-meta {
    display: grid;
  }

  .welcome-actions {
    width: 100%;
    display: grid;
  }

  .welcome-actions .button {
    width: 100%;
  }

  .welcome-panel__media {
    min-height: 310px;
  }

  .section-progress {
    min-height: 66px;
    padding: 0 16px;
  }

  .section-progress__item {
    justify-content: center;
  }

  .section-progress__item span:last-child {
    display: none;
  }

  .section-progress__item:not(:last-child)::after {
    left: calc(50% + 28px);
    right: -20%;
    bottom: 16px;
  }

  .survey-view {
    padding-bottom: 40px;
  }

  .survey-layout {
    width: 100%;
    margin-top: 0;
    box-shadow: none;
  }

  .section-media {
    min-height: 215px;
    max-height: 215px;
  }

  .section-media__caption {
    left: 20px;
    right: 20px;
    bottom: 18px;
    grid-template-columns: 42px 1fr;
    gap: 12px;
  }

  .section-media__caption > span {
    font-size: 27px;
  }

  .section-media__caption strong {
    font-size: 18px;
  }

  .section-media__caption p {
    display: none;
  }

  .question-workspace {
    padding: 30px 20px 26px;
  }

  .question-topline {
    align-items: flex-start;
  }

  .save-status {
    max-width: 130px;
    text-align: right;
    font-size: 10px;
  }

  #question-form {
    margin-top: 24px;
  }

  .question-text {
    font-size: 26px;
  }

  .option-card {
    min-height: 50px;
    padding: 12px 13px;
  }

  .scale-list {
    gap: 6px;
  }

  .scale-option label {
    min-height: 56px;
  }

  .question-actions {
    align-items: stretch;
  }

  .question-actions .button {
    min-width: 0;
    padding-inline: 15px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
