:root {
  --ink: #171717;
  --ink-soft: #4b4b4b;
  --muted: #6c6c6c;
  --line: #dedede;
  --line-strong: #bfbfbf;
  --paper: #ffffff;
  --canvas: #f4f3f1;
  --canvas-warm: #ece9e4;
  --accent: #801f3f;
  --accent-dark: #641731;
  --accent-soft: #f5e9ed;
  --success: #1c6b45;
  --success-soft: #e8f4ee;
  --danger: #9f1d2b;
  --danger-soft: #fbeaec;
  --focus: #0a66c2;
  --shadow: 0 18px 50px rgba(22, 22, 22, 0.08);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --max-width: 920px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-180%);
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.brand-logo { width: 180px; height: auto; }
.brand-logo-light { filter: none; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.optional {
  margin-left: 6px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 500;
}
.small-note { color: var(--muted); font-size: .86rem; }
.text-link { font-weight: 700; text-underline-offset: 3px; }

.site-header {
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header-label {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

.survey-shell {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 60px 0 90px;
}
.survey-intro {
  max-width: 760px;
  margin-bottom: 28px;
}
.survey-intro h1,
.thanks-card h1,
.install-header h1 {
  margin: 0 0 16px;
  font-size: clamp(2.1rem, 6vw, 4.2rem);
  line-height: .98;
  letter-spacing: -.045em;
}
.survey-intro p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.06rem;
}

.survey-progress {
  margin: 26px 0 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.progress-track {
  height: 6px;
  flex: 1;
  overflow: hidden;
  background: #ddd8d4;
  border-radius: 999px;
}
.progress-track span {
  display: block;
  width: 25%;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width .25s ease;
}
.survey-progress p {
  margin: 0;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
  white-space: nowrap;
}

.survey-form,
.install-form {
  background: var(--paper);
  border: 1px solid rgba(23, 23, 23, .08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.survey-step { padding: clamp(24px, 5vw, 52px); }
.js .survey-step[hidden] { display: none; }
.step-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 36px;
}
.step-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .82rem;
  font-weight: 900;
}
.step-heading h2 {
  margin: 0 0 5px;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  letter-spacing: -.025em;
  line-height: 1.15;
}
.step-heading p { margin: 0; color: var(--muted); }

.form-grid { display: grid; gap: 18px; }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full-width { grid-column: 1 / -1; }
.field { display: grid; gap: 8px; }
.field label,
.question-label {
  color: var(--ink);
  font-weight: 750;
}
.field small,
.textarea-meta small { color: var(--muted); }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="date"],
input:not([type]),
textarea,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 150px; resize: vertical; }
input:hover, textarea:hover, select:hover { border-color: #8d8d8d; }
input:focus, textarea:focus, select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(10, 102, 194, .13);
  outline: none;
}

.question-block {
  margin: 0;
  padding: 28px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.question-block:first-of-type { border-top: 0; padding-top: 0; }
.question-block legend,
.question-label {
  max-width: 780px;
  padding: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.4;
}
.question-help { margin: 7px 0 16px; color: var(--muted); font-size: .9rem; }
.choice-list { display: grid; gap: 10px; margin-top: 16px; }
.choice-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.choice-card:hover { border-color: var(--accent); background: #fffafb; }
.choice-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid #777;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 4px #fff;
}
.choice-card:has(input:checked) .choice-indicator {
  border-color: var(--accent);
  background: var(--accent);
}
.choice-card:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.score-grid {
  display: grid;
  grid-template-columns: repeat(11, minmax(44px, 1fr));
  gap: 8px;
  margin-top: 18px;
}
.score-option { position: relative; cursor: pointer; }
.score-option input { position: absolute; opacity: 0; }
.score-option span {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font-weight: 800;
}
.score-option:hover span { border-color: var(--accent); }
.score-option input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.score-option input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.score-labels { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: .78rem; }
.textarea-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 6px; }

.consent-panel {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding: 22px;
  border-radius: var(--radius-md);
  background: #f7f6f4;
  border: 1px solid var(--line);
}
.check-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  cursor: pointer;
}
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.consent-panel .small-note { margin: 0 0 0 32px; }

.step-actions,
.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
}
.step-actions-end { justify-content: flex-end; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 19px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-dark); color: #fff; }
.button-secondary { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.button-secondary:hover { border-color: var(--ink); color: var(--ink); }
.button-large { min-height: 54px; padding-inline: 24px; }
.button-full { width: 100%; }

.error-summary,
.inline-alert {
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid #e3aab1;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: #6d101b;
}
.error-summary h2 { margin: 0 0 8px; font-size: 1.05rem; }
.error-summary ul { margin: 0; padding-left: 20px; }
.status-card,
.empty-state {
  padding: 28px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--line);
}
.status-success,
.success-alert { background: var(--success-soft); border-color: #a7d0ba; color: #154d34; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.site-footer {
  padding: 0 20px 36px;
  text-align: center;
  color: var(--muted);
  font-size: .84rem;
}

.thanks-page { min-height: 100vh; }
.thanks-shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}
.thanks-card {
  padding: clamp(28px, 6vw, 64px);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}
.success-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 1.8rem;
  font-weight: 900;
}
.thanks-card > p:not(.eyebrow) { color: var(--ink-soft); font-size: 1.04rem; }
.review-panel {
  margin: 34px 0 26px;
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--canvas);
}
.review-panel h2 { margin: 0 0 10px; }
.review-panel p { margin: 0 0 20px; color: var(--ink-soft); }

.install-page { min-height: 100vh; padding: 40px 16px; }
.install-shell { width: min(900px, 100%); margin: 0 auto; }
.install-header { margin-bottom: 24px; }
.install-header .brand-logo { margin-bottom: 40px; }
.install-header h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
.install-header > p:last-child { color: var(--ink-soft); }
.install-form { padding: clamp(22px, 5vw, 42px); }
.install-form fieldset { margin: 0; padding: 26px 0; border: 0; border-top: 1px solid var(--line); }
.install-form fieldset:first-of-type { padding-top: 0; border-top: 0; }
.install-form legend { margin-bottom: 20px; padding: 0; font-size: 1.15rem; font-weight: 850; }
.install-form > .button { margin-top: 10px; }

@media (max-width: 760px) {
  .header-inner { width: min(100% - 28px, 1180px); min-height: 70px; }
  .brand-logo { width: 150px; }
  .header-label { display: none; }
  .survey-shell { width: min(100% - 20px, var(--max-width)); padding: 34px 0 56px; }
  .survey-form { border-radius: 20px; }
  .form-grid.two-columns { grid-template-columns: 1fr; }
  .full-width { grid-column: auto; }
  .score-grid { grid-template-columns: repeat(6, 1fr); }
  .step-actions { flex-wrap: wrap; }
  .step-actions .button { flex: 1 1 150px; }
  .textarea-meta { flex-direction: column; gap: 2px; }
}

@media (max-width: 460px) {
  .survey-intro h1 { font-size: 2.45rem; }
  .survey-step { padding: 22px 18px; }
  .step-heading { grid-template-columns: 1fr; gap: 10px; }
  .step-number { width: 38px; height: 38px; }
  .score-grid { grid-template-columns: repeat(4, 1fr); }
  .consent-panel { padding: 18px 14px; }
  .button-row { align-items: stretch; flex-direction: column; }
  .button-row .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
