:root {
  --survey-bg: #f8f8f8;
  --survey-card: #ffffff;
  --survey-line: #e4e4e4;
  --survey-text: #181818;
  --survey-muted: #666;
  --survey-accent: #111;
  --survey-accent-hover: #2b2b2b;
}

.survey-progress-bar-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: rgba(0,0,0,0.08);
  z-index: 9999;
}

.survey-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: #111;
  transition: width 200ms ease;
}

.survey-public-body {
  margin: 0;
  min-height: 100vh;
  background: var(--survey-bg);
  color: var(--survey-text);
  font-family: "Manrope", sans-serif;
}

.survey-topbar {
  width: 100%;
  padding: 1.15rem 1.35rem;
}

.survey-logo {
  height: 34px;
  width: auto;
}

.survey-shell {
  width: min(880px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.25rem 0 2rem;
}

.survey-card {
  border: 1px solid var(--survey-line);
  border-radius: 16px;
  background: var(--survey-card);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  padding: 1.2rem 1.25rem 1rem;
}

.survey-meta {
  margin-bottom: 0.35rem;
}

.survey-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
}

.survey-subtitle {
  margin: 0.5rem 0 0;
  color: var(--survey-muted);
  line-height: 1.45;
}

.survey-intro-text {
  margin: 0.55rem 0 0;
  color: #444;
  line-height: 1.45;
}

.survey-step-counter {
  margin: 0.9rem 0;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  color: var(--survey-muted);
  text-transform: uppercase;
}

.survey-viewport {
  position: relative;
  min-height: 360px;
}

.survey-step {
  display: none;
  animation: fadeInSlide 180ms ease-out;
}

.survey-step.is-active {
  display: block;
}

.clean-block {
  padding: 1rem;
}

.question-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  font-weight: 700;
  line-height: 1.35;
}

.question-help {
  margin-bottom: 0.85rem;
  color: var(--survey-muted);
  font-size: 0.94rem;
}

.required-mark {
  color: #b12727;
}

.survey-input-compact {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid #dbdbdb;
  padding: 0.52rem 0.72rem;
  font-size: 0.96rem;
  box-shadow: none;
  resize: none;
  overflow: hidden;
}

.survey-input-compact:focus {
  border-color: #b7b7b7;
  box-shadow: 0 0 0 0.16rem rgba(0, 0, 0, 0.06);
}

.choice-list {
  display: grid;
  gap: 0.55rem;
}

.choice-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  border: 1px solid #e7e7e7;
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
  background: #fcfcfc;
}

.choice-content {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.choice-image {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #dfdfdf;
  background: #fff;
  flex-shrink: 0;
}

.choice-item .form-check-input {
  margin-top: 0.22rem;
}

.yes-no-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clean-rating {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  background: transparent;
  border: 0;
  padding: 0;
}

.rating-pill {
  position: relative;
  border: 1px solid #dedede;
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  background: #fff;
  min-width: 54px;
  text-align: center;
}

.rating-pill input {
  position: absolute;
  opacity: 0;
}

.rating-pill input:checked + span {
  font-weight: 700;
}

.rating-pill:has(input:checked) {
  border-color: #1d1d1d;
}

.consent-box {
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fafafa;
  padding: 0.8rem;
}

.survey-nav-bar {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 0.62rem;
  margin-top: 0.95rem;
}

.survey-step-error {
  margin: 0.65rem 0 0;
  padding-left: 1rem;
  font-size: 0.9rem;
  color: #b12727;
}

.nav-arrow-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #111;
  font-size: 1.22rem;
  line-height: 1;
  padding: 0;
}

.nav-arrow-btn:hover,
.nav-arrow-btn:focus {
  border-color: #bdbdbd;
  background: #f7f7f7;
}

.nav-arrow-btn:disabled {
  opacity: 0.45;
}

.survey-submit-btn {
  justify-self: end;
  background: var(--survey-accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1.15rem;
}

.survey-submit-btn:hover,
.survey-submit-btn:focus {
  background: var(--survey-accent-hover);
  color: #fff;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 861px) {
  .survey-public-body {
    display: flex;
    flex-direction: column;
  }

  .survey-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0;
  }
}

@media (max-width: 860px) {
  .survey-shell {
    width: calc(100% - 1rem);
  }

  .survey-card {
    border-radius: 14px;
    padding: 0.95rem;
  }

  .survey-viewport {
    min-height: 320px;
  }

  .yes-no-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .survey-topbar {
    padding: 0.95rem 0.72rem;
  }

  .survey-logo {
    height: 30px;
  }

  .survey-shell {
    width: calc(100% - 0.72rem);
  }

  .clean-block {
    padding: 0.78rem;
  }

  .survey-nav-bar {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .nav-arrow-btn {
    width: 100%;
    height: 40px;
  }

  .survey-submit-btn {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
  }
}
