@font-face {
  font-family: "Open Sans Muzmost";
  src: url("assets/fonts/OpenSans-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
}

@font-face {
  font-family: "PT Serif Muzmost";
  src: url("assets/fonts/PTSerif-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --radius: 10px;
  --radius-small: 8px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --background: #f5f3f1;
  --surface: rgb(255 255 255 / .94);
  --surface-strong: #fffdfb;
  --surface-muted: #eceae8;
  --text: #1f1f1e;
  --body: #494744;
  --muted: #706c68;
  --line: #d4d0cc;
  --line-strong: #9b9691;
  --accent: #8b4e33;
  --accent-strong: #743f2b;
  --accent-ink: #743f2b;
  --accent-soft: #e8e5e2;
  --on-accent: #fff9f4;
  --control: #1b1b1a;
  --control-hover: #30302e;
  --on-control: #faf9f7;
  --selection: #8b4e33;
  --selection-hover: #743f2b;
  --selection-border: #613722;
  --on-selection: #fff9f4;
  --accent-text: #8b4e33;
  --step-hover-text: #743f2b;
  --step-hover-line: #a96142;
  --canvas-rgb: 139 78 51;
  --focus: #4e4b48;
  --error: #a43b32;
  --shadow: 0 18px 48px rgb(42 38 35 / .12);
  font-family: "Open Sans Muzmost", "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --background: #1f1e1d;
  --surface: rgb(42 40 38 / .97);
  --surface-strong: #302e2c;
  --surface-muted: #393633;
  --text: #f1ece7;
  --body: #d4ccc5;
  --muted: #aaa19a;
  --line: #4b4743;
  --line-strong: #716b65;
  --accent: #363636;
  --accent-strong: #464646;
  --accent-ink: #e2b18f;
  --accent-soft: #3b3937;
  --on-accent: #f4f0eb;
  --control: #171717;
  --control-hover: #101010;
  --on-control: #f4f0eb;
  --selection: #8b4e33;
  --selection-hover: #743f2b;
  --selection-border: #c08467;
  --on-selection: #fff9f4;
  --accent-text: #d5a082;
  --step-hover-text: #f0b495;
  --step-hover-line: #d98a65;
  --canvas-rgb: 213 160 130;
  --focus: #d4ccc5;
  --error: #ff9c90;
  --shadow: 0 22px 54px rgb(12 10 9 / .3);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    color-scheme: dark;
    --background: #1f1e1d;
    --surface: rgb(42 40 38 / .97);
    --surface-strong: #302e2c;
    --surface-muted: #393633;
    --text: #f1ece7;
    --body: #d4ccc5;
    --muted: #aaa19a;
    --line: #4b4743;
    --line-strong: #716b65;
    --accent: #363636;
    --accent-strong: #464646;
    --accent-ink: #e2b18f;
    --accent-soft: #3b3937;
    --on-accent: #f4f0eb;
    --control: #171717;
    --control-hover: #101010;
    --on-control: #f4f0eb;
    --selection: #8b4e33;
    --selection-hover: #743f2b;
    --selection-border: #c08467;
    --on-selection: #fff9f4;
    --accent-text: #d5a082;
    --step-hover-text: #f0b495;
    --step-hover-line: #d98a65;
    --canvas-rgb: 213 160 130;
    --focus: #d4ccc5;
    --error: #ff9c90;
    --shadow: 0 22px 54px rgb(12 10 9 / .3);
  }
}

body,
button,
input,
textarea {
  font-family: "Open Sans Muzmost", "Segoe UI", sans-serif;
}

html {
  overflow-x: hidden;
  overflow-x: clip;
}

button,
.choice-card,
.summary-edit,
.review-accordion summary,
.brand,
.theme-button,
.step-navigation button {
  cursor: pointer;
}

input:not(:disabled) {
  cursor: text;
}

button:disabled,
input:disabled,
.step-navigation button:disabled {
  cursor: not-allowed;
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.photo-backdrop {
  inset: -22px;
  background-image: url("assets/bar-interior-v2.webp");
  background-position: 68% center;
  filter: saturate(.9) contrast(1.03) brightness(1.01);
  transform: translate3d(var(--parallax-x, 0), var(--parallax-y, 0), 0) scale(1.015);
}

.photo-backdrop::after {
  background: linear-gradient(90deg, #f5f3f1 0%, #f5f3f1 42%, rgb(245 243 241 / .97) 49%, rgb(245 243 241 / .82) 62%, rgb(248 247 245 / .48) 78%, rgb(250 249 247 / .28) 100%);
}

.melody-canvas {
  position: fixed;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

html[data-theme="dark"] .photo-backdrop::after {
  background: linear-gradient(90deg, #1f1e1d 0%, #1f1e1d 42%, rgb(31 30 29 / .97) 49%, rgb(31 30 29 / .76) 62%, rgb(31 30 29 / .34) 78%, rgb(31 30 29 / .14) 100%);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] .photo-backdrop::after {
    background: linear-gradient(90deg, #1f1e1d 0%, #1f1e1d 42%, rgb(31 30 29 / .97) 49%, rgb(31 30 29 / .76) 62%, rgb(31 30 29 / .34) 78%, rgb(31 30 29 / .14) 100%);
  }
}

.page-shell {
  z-index: 2;
  width: min(100% - 48px, 1180px);
  padding: 24px 0 48px;
}

.topbar {
  min-height: 42px;
}

.brand {
  gap: 11px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.012em;
}

.brand__mark {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--text);
}

.brand__mark svg {
  width: 27px;
  height: 27px;
  stroke-width: 1.8;
}

.brand img {
  display: none;
}

.theme-switcher {
  grid-template-columns: repeat(3, 36px);
  padding: 3px;
  border-color: var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-strong);
  box-shadow: none;
  backdrop-filter: none;
}

.theme-button {
  width: 36px;
  height: 34px;
  border-radius: 6px;
  transition: color 160ms ease, background-color 160ms ease;
}

.theme-button:hover {
  background: color-mix(in srgb, var(--selection) 10%, var(--surface-strong));
  color: var(--selection);
}

.theme-button:active {
  transform: none;
  background: var(--line);
}

.theme-button[aria-pressed="true"] {
  background: var(--selection);
  color: var(--on-selection);
}

.intro {
  width: min(850px, 100%);
  margin: clamp(54px, 7vw, 82px) 0 32px;
}

.audience-rail {
  gap: 18px;
  margin: 0;
}

.audience-rail--below {
  justify-content: flex-end;
  padding: 0;
}

.survey-footer {
  margin-top: 18px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  backdrop-filter: none;
}

.survey-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 16px;
}

.survey-footer__contact {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-shadow: none;
}

.survey-footer__contact svg {
  color: currentColor;
  filter: none;
}

.survey-footer__email {
  color: var(--text);
  font-weight: 700;
  transition: color 160ms ease;
}

.survey-footer__email:hover,
.survey-footer__email:focus-visible {
  color: var(--accent-strong);
}

.survey-footer__social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 160ms ease;
}

.survey-footer__social:hover,
.survey-footer__social:focus-visible {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.survey-footer__social svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.survey-footer__copy {
  flex: 0 0 auto;
  color: var(--text);
  transition: color 160ms ease, transform 160ms ease;
}

.survey-footer__copy:hover,
.survey-footer__copy:focus-visible,
.survey-footer__copy[data-copied="true"] {
  color: var(--accent-strong);
}

.survey-footer__copy:active {
  transform: scale(.9);
}

.audience-rail span {
  gap: 7px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  backdrop-filter: none;
}

.audience-rail svg {
  width: 15px;
  height: 15px;
  color: var(--accent-strong);
}

.audience-rail--below span {
  color: var(--text);
  text-shadow: none;
}

.audience-rail--below svg {
  color: currentColor;
  filter: none;
}

.eyebrow,
.question-kicker {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .035em;
}

.quiz__counter {
  color: var(--accent-text);
}

h1,
h2 {
  font-family: "PT Serif Muzmost", Georgia, serif;
  font-weight: 400;
  letter-spacing: -.026em;
}

h1 {
  max-width: 22ch;
  margin-bottom: 18px;
  color: var(--text);
  font-size: clamp(38px, 4.25vw, 52px);
  line-height: 1.08;
}

.intro__lead {
  max-width: 58ch;
  color: var(--body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.72;
}

.quiz {
  padding: clamp(24px, 3.2vw, 38px);
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.quiz__topline {
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 18px;
}

.quiz__caption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.progress {
  display: none;
}

.step-navigation {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 17px 4px 2px;
  scrollbar-width: thin;
}

.step-navigation ol {
  display: grid;
  min-width: 760px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-navigation button {
  display: grid;
  width: 100%;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 0;
  min-height: 42px;
  padding: 7px 6px 9px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.step-navigation button:not(:disabled):hover {
  border-bottom-color: var(--step-hover-line);
  color: var(--step-hover-text);
}

.step-navigation button:not(:disabled):hover .step-navigation__number {
  border-color: var(--step-hover-line);
  background: color-mix(in srgb, var(--step-hover-line) 12%, transparent);
}

.step-navigation button:disabled {
  opacity: .55;
}

.step-navigation__number {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  padding: 0;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.step-navigation__label {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-navigation button[aria-current="step"] {
  color: var(--accent-text);
}

.step-navigation button[aria-current="step"] .step-navigation__number {
  border-color: var(--accent-text);
  background: color-mix(in srgb, var(--accent-text) 12%, transparent);
  color: var(--accent-text);
}

.step-navigation button[aria-current="step"] {
  border-bottom-color: var(--selection);
}

.step-navigation button[data-complete="true"] {
  color: var(--text);
}

.step-navigation button[data-complete="true"] .step-navigation__number {
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.step-stage {
  overflow: visible;
}

.step {
  min-height: 280px;
  padding: clamp(34px, 4.2vw, 50px) 0 32px;
}

.question-layout {
  grid-template-columns: minmax(0, .8fr) minmax(360px, 1.2fr);
  gap: clamp(40px, 6vw, 80px);
}

.question-layout > div:first-child {
  position: sticky;
  top: 24px;
  align-self: start;
}

.question-kicker {
  margin-bottom: 12px;
}

h2 {
  max-width: 16ch;
  margin-bottom: 16px;
  color: var(--text);
  font-size: clamp(28px, 3.1vw, 40px);
  line-height: 1.18;
}

.question-layout > div > p:not(.question-kicker) {
  color: var(--body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
}

.form-stack {
  gap: 24px;
}

fieldset + fieldset {
  margin-top: 24px;
}

legend {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.choice-grid,
.choice-list {
  gap: 10px;
}

.choice-card {
  min-height: 54px;
  gap: 11px;
  padding: 10px 12px;
  border-color: var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-strong) 82%, var(--surface-muted));
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: none;
}

.choice-card:hover {
  border-color: var(--selection);
  background: color-mix(in srgb, var(--selection) 9%, var(--surface-strong));
  box-shadow: none;
  transform: none;
}

.choice-card:active {
  background: color-mix(in srgb, var(--selection) 14%, var(--surface-strong));
}

.choice-card:has(input:checked) {
  border-color: var(--selection-border);
  background: var(--selection);
  color: var(--on-selection);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--on-selection) 10%, transparent);
}

.choice-card:has(input:checked):hover {
  border-color: var(--selection-border);
  background: var(--selection-hover);
}

.choice-card:has(input:disabled),
.choice-card:has(input:disabled):hover,
.choice-card:has(input:disabled):active {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-strong) 82%, var(--surface-muted));
  color: var(--muted);
  box-shadow: none;
  opacity: .5;
  transform: none;
  cursor: not-allowed;
}

.choice-card:has(input:disabled) .choice-card__icon {
  color: var(--muted);
}

.selection-limit-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.choice-card:has(input:focus-visible) {
  outline-color: var(--selection);
}

.choice-card__icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 6px;
  background: transparent;
  color: var(--body);
}

.choice-card:has(input:checked) .choice-card__icon {
  background: color-mix(in srgb, var(--on-selection) 12%, transparent);
  color: var(--on-selection);
}

.choice-card__icon svg {
  width: 16px;
  height: 16px;
}

fieldset[data-validate="role"] .choice-grid {
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

fieldset[data-validate="role"] .choice-card {
  min-height: 54px;
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-strong) 82%, var(--surface-muted));
}

fieldset[data-validate="role"] .choice-card:hover {
  border-color: var(--selection);
  background: color-mix(in srgb, var(--selection) 9%, var(--surface-strong));
}

fieldset[data-validate="role"] .choice-card:has(input:checked) {
  border-color: var(--selection-border);
  background: var(--selection);
  color: var(--on-selection);
}

.success-state__icon {
  background: var(--surface-muted);
  color: var(--text);
}

.is-invalid legend {
  color: var(--error);
}

fieldset.is-invalid {
  margin: -10px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--error) 48%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--error) 4%, transparent);
}

.is-invalid .choice-card,
.is-invalid .choice-card:hover {
  border-color: var(--line);
}

.is-invalid[data-validate="role"] .choice-card,
.is-invalid[data-validate="role"] .choice-card:hover {
  border-color: var(--line);
}

.age-notice {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.age-notice svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-top: 1px;
}

.age-notice--minor {
  color: var(--body);
}

.age-fieldset--venue .choice-card:has(input:checked:disabled),
.age-fieldset--venue .choice-card:has(input:checked:disabled):hover,
.age-fieldset--venue .choice-card:has(input:checked:disabled):active {
  border-color: var(--line-strong);
  background: var(--surface-muted);
  color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line-strong) 18%, transparent);
  opacity: 1;
  transform: none;
  cursor: default;
}

.age-fieldset--venue .choice-card:has(input:checked:disabled) .choice-card__icon {
  background: color-mix(in srgb, var(--line-strong) 14%, transparent);
  color: var(--text);
}

.age-fieldset--venue .choice-card:has(input:disabled:not(:checked)),
.age-fieldset--venue .choice-card:has(input:disabled:not(:checked)):hover,
.age-fieldset--venue .choice-card:has(input:disabled:not(:checked)):active {
  opacity: .45;
}

.field {
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field textarea {
  min-height: 48px;
  padding: 12px 14px;
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field input:hover:not(:disabled),
.field textarea:hover:not(:disabled) {
  border-color: var(--line-strong);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent);
}

.field-validation {
  display: grid;
  gap: 8px;
}

.field-validation.is-invalid {
  margin: 0;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--error) 48%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--error) 4%, transparent);
}

.field-validation.is-invalid.conditional-reveal--nested {
  margin-top: 14px;
}

.field-validation.is-invalid .field > span {
  color: var(--error);
}

.field-validation > .field-error {
  margin: 0;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: color-mix(in srgb, var(--error) 72%, var(--line));
  background: color-mix(in srgb, var(--error) 3%, var(--surface-strong));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--error) 10%, transparent);
}

.field-help,
.field-error {
  font-size: 13px;
}

.feedback-panel {
  display: grid;
}

.feedback-panel .field-help {
  margin-top: 8px;
}

.field textarea {
  min-height: 132px;
  max-height: 320px;
}

.field-optional {
  margin-left: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.feedback-help {
  align-items: baseline;
  margin-bottom: 0;
}

.field-error[data-inline-error]:not([hidden]),
.validation-message {
  display: flex;
  width: fit-content;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--error) 58%, var(--line));
  border-radius: var(--radius-small);
  background: color-mix(in srgb, var(--error) 7%, var(--surface));
  color: var(--error);
  font-weight: 700;
  line-height: 1.4;
  animation: conditional-reveal 180ms var(--ease) both;
}

.form-error {
  width: fit-content;
  max-width: 100%;
  margin: 4px 0 16px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--error) 64%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--error) 7%, var(--surface));
  color: var(--error);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.conditional-reveal {
  animation: conditional-reveal 240ms var(--ease) both;
}

.conditional-reveal--nested {
  margin-top: 14px;
}

.conditional-reveal--nested > .field-help,
.dependent-question {
  margin: 0 0 10px;
}

.dependent-question {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.conditional-reveal .choice-card {
  animation: conditional-choice-reveal 220ms var(--ease) both;
}

.conditional-reveal .choice-card:nth-child(2) { animation-delay: 24ms; }
.conditional-reveal .choice-card:nth-child(3) { animation-delay: 48ms; }
.conditional-reveal .choice-card:nth-child(4) { animation-delay: 72ms; }
.conditional-reveal .choice-card:nth-child(5) { animation-delay: 96ms; }
.conditional-reveal .choice-card:nth-child(6) { animation-delay: 120ms; }
.conditional-reveal .choice-card:nth-child(7) { animation-delay: 144ms; }
.conditional-reveal .choice-card:nth-child(8) { animation-delay: 168ms; }

.question-kicker {
  display: block;
  margin-bottom: 18px;
}

.question-kicker__icon {
  display: inline-grid;
  width: 60px;
  height: 60px;
  place-items: center start;
  color: var(--text);
}

.question-kicker__icon svg {
  width: 48px;
  height: 48px;
  stroke-width: 1.25;
}

.question-help-trigger {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  margin-left: 5px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  transition: color 150ms ease, background-color 150ms ease;
}

.question-help-trigger:hover,
.question-help-trigger:focus-visible {
  background: var(--surface-muted);
  color: var(--text);
}

.question-help-trigger svg {
  width: 15px;
  height: 15px;
}

@media (hover: hover) and (pointer: fine) {
  .question-help-trigger {
    display: inline-grid;
  }
}

.contact-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-color: var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
}

.contact-panel > .field-help,
.contact-panel > .field,
.contact-panel > .field-error {
  margin: 0;
}

.contact-panel > .field-help {
  color: var(--body);
  line-height: 1.5;
}

.quiz__actions {
  position: static;
  width: max-content;
  max-width: 100%;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.button__spinner {
  width: 15px;
  height: 15px;
  border: 2px solid color-mix(in srgb, currentColor 35%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: button-spin 700ms linear infinite;
}

@keyframes button-spin {
  to { transform: rotate(360deg); }
}

.submission-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

.tooltip-layer {
  position: fixed;
  z-index: 20;
  width: min(300px, calc(100vw - 24px));
  padding: 13px 14px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-strong) 96%, transparent);
  color: var(--text);
  box-shadow: 0 16px 38px rgb(9 10 9 / .18);
  pointer-events: none;
  backdrop-filter: blur(16px) saturate(.9);
  animation: tooltip-in 150ms var(--ease) both;
}

.tooltip-layer[hidden] {
  display: none;
}

.tooltip-layer::after {
  position: absolute;
  left: var(--tooltip-arrow-left, 50%);
  width: 9px;
  height: 9px;
  border: solid var(--line-strong);
  background: var(--surface-strong);
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.tooltip-layer[data-placement="top"]::after {
  bottom: -5px;
  border-width: 0 1px 1px 0;
}

.tooltip-layer[data-placement="bottom"]::after {
  top: -5px;
  border-width: 1px 0 0 1px;
}

.tooltip-layer__heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.tooltip-layer__heading svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: var(--muted);
}

.tooltip-layer__heading strong {
  font-size: 13px;
  line-height: 1.35;
}

.tooltip-layer p {
  margin: 0;
  color: var(--body);
  font-size: 12px;
  line-height: 1.55;
}

.tooltip-layer[data-compact] {
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 7px 9px;
  border-radius: 8px;
}

.tooltip-layer[data-compact] .tooltip-layer__heading {
  gap: 0;
  margin: 0;
}

.tooltip-layer[data-compact] .tooltip-layer__heading svg,
.tooltip-layer[data-compact] p {
  display: none;
}

@keyframes conditional-reveal {
  from { opacity: 0; transform: translate3d(0, 9px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes conditional-choice-reveal {
  from { opacity: 0; transform: translate3d(0, 6px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes tooltip-in {
  from { opacity: 0; transform: translate3d(0, 5px, 0) scale(.985); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.button {
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.button:active:not(:disabled) {
  transform: none;
}

.button--primary {
  border-color: var(--selection-border);
  background: var(--selection);
  color: var(--on-selection);
  box-shadow: none;
}

.button--primary:hover:not(:disabled) {
  border-color: var(--selection-border);
  background: var(--selection-hover);
}

.button--primary:active:not(:disabled) {
  border-color: var(--selection-border);
  background: var(--selection-hover);
}

.checkline input {
  accent-color: var(--control);
}

.range-field strong {
  color: var(--accent-text);
}

.range-field input[type="range"] {
  width: 100%;
  height: 22px;
  margin: 0;
  border: 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: ew-resize;
  accent-color: var(--selection);
}

.range-field input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--selection) 0,
    var(--selection) var(--range-progress),
    var(--surface-muted) var(--range-progress),
    var(--surface-muted) 100%
  );
}

.range-field input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border: 2px solid var(--on-selection);
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--selection);
  box-shadow:
    0 0 0 1px var(--selection-border),
    0 4px 10px color-mix(in srgb, var(--selection) 28%, transparent);
  transition: transform 150ms var(--ease), background-color 150ms ease;
}

.range-field input[type="range"]::-moz-range-track {
  height: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-muted);
}

.range-field input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--selection);
}

.range-field input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid var(--on-selection);
  border-radius: 50%;
  background: var(--selection);
  box-shadow:
    0 0 0 1px var(--selection-border),
    0 4px 10px color-mix(in srgb, var(--selection) 28%, transparent);
  transition: transform 150ms var(--ease), background-color 150ms ease;
}

.range-field input[type="range"]:hover::-webkit-slider-thumb,
.range-field input[type="range"]:focus-visible::-webkit-slider-thumb,
.range-field input[type="range"]:hover::-moz-range-thumb,
.range-field input[type="range"]:focus-visible::-moz-range-thumb {
  background: var(--selection-hover);
  transform: scale(1.08);
}

.range-field input[type="range"]:focus-visible::-webkit-slider-runnable-track,
.range-field input[type="range"]:focus-visible::-moz-range-track {
  border-color: var(--selection-border);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--selection) 18%, transparent);
}

.button--secondary {
  border-color: var(--line-strong);
  background: var(--surface-strong);
  color: var(--text);
}

.button--secondary:hover:not(:disabled) {
  border-color: var(--text);
  background: var(--surface-muted);
}

.review-accordion {
  overflow: clip;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-strong) 80%, transparent);
  padding: 0;
}

.review-accordion summary {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  list-style: none;
  transition: background-color 160ms ease;
}

.review-accordion summary::-webkit-details-marker {
  display: none;
}

.review-accordion summary::marker {
  content: "";
}

.review-accordion summary:hover {
  background: var(--surface-muted);
}

.review-accordion__title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.review-accordion__title > span:last-child {
  display: grid;
  gap: 2px;
}

.review-accordion__title strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

.review-accordion__title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.review-accordion__icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.review-accordion__icon svg,
.review-accordion__chevron {
  width: 18px;
  height: 18px;
  stroke-width: 1.6;
}

.review-accordion__chevron {
  flex: 0 0 auto;
  transition: transform 220ms var(--ease);
}

.review-accordion[open] .review-accordion__chevron {
  transform: rotate(180deg);
}

.review-accordion__body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 260ms var(--ease), opacity 180ms ease;
}

.review-accordion[open] .review-accordion__body {
  grid-template-rows: 1fr;
  opacity: 1;
}

.review-accordion .summary {
  min-height: 0;
  overflow: hidden;
  margin: 0 15px 15px;
  border-top: 1px solid var(--line);
}

.review-accordion .summary > div {
  grid-template-columns: minmax(130px, .32fr) minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 15px 0;
}

.review-accordion .summary dt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
}

.summary__step {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 6px;
  background: var(--control);
  color: var(--on-control);
  font-size: 11px;
  line-height: 1;
}

.summary-edit {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  margin: -5px 0 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 9px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.summary-edit:hover {
  border-color: var(--text);
  background: var(--surface-muted);
}

.summary-edit svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
}

.review-note,
.success-state > p:not(.question-kicker) {
  color: var(--body);
  font-weight: 400;
}

.step.is-entering-forward {
  animation: step-in-forward 260ms var(--ease) both;
}

.step.is-entering-back {
  animation: step-in-back 260ms var(--ease) both;
}

.step.is-leaving-forward {
  animation: step-out-forward 160ms ease both;
}

.step.is-leaving-back {
  animation: step-out-back 160ms ease both;
}

@keyframes step-in-forward {
  from { opacity: 0; transform: translate3d(16px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes step-out-forward {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(-10px, 0, 0); }
}

@keyframes step-in-back {
  from { opacity: 0; transform: translate3d(-16px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes step-out-back {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(10px, 0, 0); }
}

@media (max-width: 900px) {
  .melody-canvas {
    display: none;
  }

  .photo-backdrop {
    transform: scale(1.015);
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 28px, 640px);
    padding-top: 18px;
  }

  .intro {
    margin: 32px 0 24px;
  }

  .photo-backdrop::after {
    background: linear-gradient(90deg, var(--background) 0%, color-mix(in srgb, var(--background) 96%, transparent) 68%, color-mix(in srgb, var(--background) 74%, transparent) 100%);
  }

  .audience-rail--below {
    justify-content: flex-start;
  }

  .survey-footer {
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    padding: 0 2px;
  }

  .survey-footer__contact {
    align-self: flex-start;
    font-size: 12px;
  }

  .survey-footer__links {
    justify-content: flex-start;
  }

  .survey-footer__social {
    font-size: 12px;
  }

  h1 {
    max-width: 19ch;
    font-size: clamp(30px, 8.2vw, 34px);
    line-height: 1.07;
  }

  .quiz {
    padding: 20px;
  }

  .quiz__topline {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .step-navigation {
    margin-inline: 0;
    padding-inline: 0;
    scrollbar-width: none;
  }

  .step-navigation ol {
    min-width: 0;
    grid-template-columns: repeat(6, minmax(36px, 1fr));
    gap: 6px;
  }

  .step-navigation::-webkit-scrollbar {
    display: none;
  }

  .step-navigation button {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-inline: 0;
  }

  .step-navigation__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .question-layout,
  .question-layout--contact {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .question-layout > div:first-child {
    position: static;
  }

  .review-accordion .summary > div {
    grid-template-columns: minmax(112px, .28fr) minmax(0, 1fr);
  }

  .review-accordion .summary-edit {
    grid-column: 2;
    justify-self: start;
    margin-top: -4px;
  }

  .step {
    padding: 28px 0 24px;
  }

  h2 {
    max-width: 18ch;
  }

  .form-stack {
    gap: 20px;
  }

  fieldset + fieldset {
    margin-top: 0;
  }
}

@media (max-width: 430px) {
  .brand {
    font-size: 15px;
  }

  .brand__mark {
    width: 25px;
    height: 25px;
  }

  .theme-switcher {
    grid-template-columns: repeat(3, 32px);
  }

  .theme-button {
    width: 32px;
    height: 32px;
  }

  .audience-rail {
    gap: 14px;
  }

  .intro__lead {
    font-size: 15px;
  }

  h2 {
    font-size: 26px;
    line-height: 1.16;
  }

  .quiz {
    padding: 17px;
  }

  .choice-grid--two {
    grid-template-columns: 1fr;
  }

  fieldset[data-validate="events"] .choice-grid--two,
  fieldset[data-validate="agreement"] .choice-grid--two,
  fieldset[data-validate="incidents"] .choice-grid--two,
  fieldset[data-validate="time"] .choice-grid--two,
  fieldset[data-validate="promo"] .choice-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  fieldset[data-validate="role"] .choice-grid,
  fieldset[data-validate="age"] .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quiz__actions {
    width: max-content;
    margin: 0 0 0 auto;
    padding: 0;
  }

  .button {
    min-height: 45px;
    padding-inline: 14px;
  }

  .choice-card {
    min-height: 52px;
    gap: 9px;
    padding: 9px 10px;
    font-size: 13px;
  }

  .choice-card > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  fieldset[data-validate="organizer"] .choice-grid--two,
  fieldset[data-validate="trust"] .choice-grid--two {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 161px), 1fr));
  }

  .survey-footer__copy {
    width: 32px;
    height: 32px;
    margin-left: -2px;
  }

  .review-accordion summary {
    min-height: 66px;
    padding: 11px 12px;
  }

  .review-accordion__title small {
    display: none;
  }

  .review-accordion .summary {
    margin-inline: 12px;
  }

  .review-accordion .summary > div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .review-accordion .summary-edit {
    grid-column: 1;
    margin-top: 0;
  }
}

@media (min-width: 360px) and (max-width: 430px) {
  fieldset[data-conditional="genres"] .choice-grid--two,
  fieldset[data-validate="material"] .choice-grid--two,
  fieldset:has(input[name="languages"]) .choice-grid--two,
  fieldset[data-validate="fee"] .choice-grid--two,
  [data-validate="incidentType"].choice-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  fieldset[data-validate="fee"] .choice-card:last-child {
    grid-column: 1 / -1;
  }

  fieldset[data-conditional="genres"] .choice-card:nth-child(7):last-child,
  fieldset:has(input[name="languages"]) .choice-card:nth-child(3):last-child,
  fieldset[data-validate="trust"] .choice-card:nth-child(5):last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 380px) and (max-width: 430px) {
  fieldset[data-validate="specialization"] .choice-grid--two,
  fieldset[data-validate="equipment"] .choice-grid--two,
  fieldset[data-validate="valueReasons"] .choice-grid--two,
  fieldset:has(input[name="paidFeatures"]) .choice-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  fieldset[data-validate="specialization"] .choice-card:nth-child(5):last-child,
  fieldset[data-validate="equipment"] .choice-card:nth-child(3):last-child,
  fieldset[data-validate="valueReasons"] .choice-card:nth-child(5):last-child {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
