:root {
  color-scheme: light;
  --ink: #17191d;
  --muted: #666a73;
  --line: #d9dadc;
  --soft: #f6f5f3;
  --accent: #d93600;
  --accent-dark: #aa2b05;
  --error: #a51d1d;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: #fff;
  font-family: var(--sans);
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  min-height: 92px;
  padding: 24px clamp(24px, 3.5vw, 56px);
  border-bottom: 1px solid var(--line);
}

.survey-title {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.6vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.survey-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
  min-width: 0;
  max-width: 1440px;
  min-height: calc(100vh - 92px);
  margin: 0 auto;
}

.survey-main {
  min-width: 0;
  padding: 58px clamp(28px, 7vw, 108px) 64px;
}

.survey-aside {
  padding: 92px 44px;
  border-left: 1px solid var(--line);
}

.progress-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  gap: 42px;
  align-items: center;
  max-width: 840px;
  margin-bottom: 40px;
}

.progress-row p {
  margin: 0;
  font-weight: 700;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  background: #e3e3e3;
  border-radius: 10px;
}

#progress-fill {
  display: block;
  width: 12.5%;
  height: 100%;
  background: var(--accent);
  transition: width 220ms ease;
}

.privacy-note {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  max-width: 760px;
  margin-bottom: 42px;
  color: var(--muted);
  line-height: 1.6;
}

.privacy-note p {
  margin: 0;
}

.privacy-note strong {
  color: var(--ink);
}

.privacy-icon {
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 19px;
  margin-top: 9px;
  border: 2px solid var(--ink);
  border-radius: 3px;
}

.privacy-icon::before {
  position: absolute;
  top: -11px;
  left: 4px;
  width: 10px;
  height: 11px;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  content: "";
}

#survey-form {
  max-width: 860px;
}

.step-heading {
  max-width: 790px;
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.step-intro {
  max-width: 720px;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.question-group {
  margin: 0 0 34px;
  padding: 0;
  border: 0;
}

.question-label,
.question-group legend {
  display: block;
  margin-bottom: 13px;
  padding: 0;
  font-size: 1.06rem;
  font-weight: 750;
  line-height: 1.45;
}

.optional {
  color: var(--muted);
  font-size: 0.88em;
  font-weight: 500;
}

.option-list {
  display: grid;
  gap: 10px;
}

.option-card {
  position: relative;
  display: flex;
  gap: 15px;
  align-items: center;
  min-height: 58px;
  padding: 15px 18px;
  border: 1px solid #c8c9cc;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

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

.option-card:has(input:checked) {
  border-color: var(--accent);
  background: #fff8f5;
  box-shadow: 0 0 0 1px var(--accent);
}

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

.option-card span {
  line-height: 1.4;
}

.field,
.select-field,
.text-area {
  width: 100%;
  border: 1px solid #bfc1c5;
  border-radius: 3px;
  color: var(--ink);
  background: #fff;
}

.field,
.select-field {
  min-height: 52px;
  padding: 12px 14px;
}

.text-area {
  min-height: 116px;
  padding: 14px;
  resize: vertical;
  line-height: 1.5;
}

.field:focus,
.select-field:focus,
.text-area:focus,
.option-card:focus-within {
  outline: 3px solid rgba(217, 54, 0, 0.18);
  outline-offset: 2px;
}

.scale-grid {
  display: grid;
  gap: 12px;
}

.scale-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(5, 48px);
  gap: 8px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #ececec;
}

.scale-row > span {
  line-height: 1.4;
}

.scale-choice {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #c8c9cc;
  border-radius: 50%;
  cursor: pointer;
}

.scale-choice:has(input:checked) {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

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

.scale-key {
  display: flex;
  justify-content: space-between;
  margin: 8px 0 0 min(100%, 220px);
  color: var(--muted);
  font-size: 0.82rem;
}

.form-error {
  min-height: 24px;
  margin: 6px 0 12px;
  color: var(--error);
  font-weight: 700;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
}

.button {
  min-width: 128px;
  min-height: 52px;
  padding: 12px 24px;
  border-radius: 3px;
  font-weight: 750;
  cursor: pointer;
}

.button-primary {
  border: 1px solid var(--accent);
  color: #fff;
  background: var(--accent);
}

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

.button-secondary {
  border: 1px solid var(--ink);
  color: var(--ink);
  background: #fff;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.aside-item {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 18px;
  padding: 0 0 42px;
  margin-bottom: 42px;
  border-bottom: 1px solid var(--line);
}

.aside-item:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.aside-item h2 {
  margin: 3px 0 10px;
  font-family: var(--serif);
  font-size: 1.23rem;
  line-height: 1.25;
}

.aside-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.aside-number,
.aside-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 800;
}

.completion {
  padding: 18px 0 10px;
}

.completion-summary {
  max-width: 690px;
  padding: 22px;
  margin-top: 28px;
  border-left: 4px solid var(--accent);
  background: var(--soft);
  line-height: 1.6;
}

.completion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

  .survey-main {
    padding: 40px 24px 56px;
  }

  .survey-aside {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    padding: 36px 24px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .aside-item {
    display: block;
    padding: 0;
    margin: 0;
    border: 0;
  }

  .aside-number,
  .aside-symbol {
    margin-bottom: 16px;
  }
}

@media (max-width: 650px) {
  .site-header {
    min-height: 76px;
    padding: 20px;
  }

  .survey-title {
    max-width: 100%;
    font-size: 1.45rem;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .survey-main {
    padding-right: 20px;
    padding-left: 20px;
  }

  .progress-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 30px;
  }

  .privacy-note {
    margin-bottom: 34px;
  }

  .scale-row {
    grid-template-columns: repeat(5, minmax(36px, 1fr));
    gap: 7px;
  }

  .scale-row > span {
    grid-column: 1 / -1;
    margin-bottom: 5px;
  }

  .scale-choice {
    width: 36px;
    height: 36px;
  }

  .scale-key {
    margin-left: 0;
  }

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

  .form-actions {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 14px 0;
    background: rgba(255, 255, 255, 0.96);
  }

  .form-actions .button {
    min-width: 0;
    padding-right: 12px;
    padding-left: 12px;
  }
}
