:root {
  --ink: #001a44;
  --blue: #134baa;
  --blue-dark: #0c347d;
  --soft-blue: #eef1ff;
  --line: #d8def5;
  --muted: #5f6d88;
  --danger: #b3261e;
  --success: #167c52;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(0, 26, 68, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(238, 241, 255, 0.9), rgba(255, 255, 255, 0.94)),
    #ffffff;
  font-family: "Montserrat", Arial, sans-serif;
}

button,
textarea,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.locked-screen,
.survey-screen {
  min-height: 100vh;
}

.locked-screen {
  display: grid;
  align-content: center;
  gap: 34px;
  padding: 40px 20px;
}

.brand-row {
  width: min(920px, 100%);
  margin: 0 auto;
}

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

.locked-panel {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 62px);
  background: var(--soft-blue);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.locked-panel h1,
.survey-aside h1 {
  margin: 0;
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: 0;
}

.locked-panel h1 {
  max-width: 720px;
  font-size: clamp(30px, 5vw, 54px);
}

.locked-panel p {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.locked-social {
  justify-content: flex-start;
  margin-top: 28px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.survey-screen {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
}

.survey-aside {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 48px;
  padding: 42px;
  background: var(--soft-blue);
  border-right: 1px solid var(--line);
  text-align: center;
}

.survey-aside h1 {
  font-size: clamp(42px, 5vw, 66px);
}

.brand-block {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.survey-aside .brand-logo {
  width: 220px;
  margin: 0 auto 28px;
}

.survey-aside .eyebrow {
  margin-bottom: 0;
}

.social-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 14px 10px 11px;
  border: 1px solid rgba(19, 75, 170, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--blue);
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.social-link:hover {
  border-color: var(--blue);
  background: #ffffff;
  transform: translateY(-1px);
}

.social-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.survey-workspace {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 42px clamp(18px, 5vw, 58px);
}

.progress-line {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.progress-line strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
}

.progress-track {
  height: 8px;
  margin: 18px 0 30px;
  overflow: hidden;
  border-radius: 999px;
  background: #dde4fb;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 180ms ease;
}

.question-panel {
  padding: clamp(24px, 4vw, 42px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.question-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: 0;
}

.question-help {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.options-grid {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.option-tile {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  min-height: 58px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.option-tile:hover,
.option-tile:has(input:checked) {
  border-color: var(--blue);
  background: #f6f8ff;
  box-shadow: 0 10px 28px rgba(19, 75, 170, 0.1);
}

.option-tile input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--blue);
}

.option-text {
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.textarea-field {
  width: 100%;
  min-height: 170px;
  margin-top: 28px;
  padding: 18px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  resize: vertical;
  line-height: 1.55;
}

.textarea-field:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(19, 75, 170, 0.12);
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.slider-wrap {
  margin-top: 32px;
}

.slider-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--blue);
  font-size: 42px;
  font-weight: 800;
}

.slider-value span:last-child {
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
}

.range-field {
  width: 100%;
  margin-top: 22px;
  accent-color: var(--blue);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.error-text {
  min-height: 22px;
  margin-top: 16px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.button {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

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

.button-primary {
  color: #ffffff;
  background: var(--blue);
}

.button-primary:hover {
  background: var(--blue-dark);
}

.button-primary:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button-secondary {
  color: var(--blue);
  border-color: rgba(19, 75, 170, 0.32);
  background: #ffffff;
}

.status-message {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.status-message.success {
  color: var(--success);
}

.status-message.error {
  color: var(--danger);
}

[hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  .survey-screen {
    display: block;
  }

  .survey-aside {
    position: static;
    height: auto;
    padding: 28px 20px;
    gap: 26px;
  }

  .survey-workspace {
    padding-top: 24px;
  }

  .progress-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .survey-aside .brand-logo {
    margin-bottom: 10px;
  }

  .locked-social {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #submitButton {
    grid-column: 1 / -1;
  }

  .button {
    width: 100%;
    padding: 0 16px;
  }
}
