:root {
  color-scheme: light;
  --background: #f8f6f2;
  --surface: #ffffff;
  --text: #1f1f1f;
  --muted: #66635f;
  --border: #dedbd6;
  --border-strong: #c9c5bf;
  --accent: #ff6f4f;
  --accent-hover: #ef5d3d;
  --accent-soft: #fff3ef;
  --success: #219642;
  --success-soft: #edf8f0;
  --danger: #b73327;
  --radius: 16px;
  --shadow: 0 22px 65px rgba(32, 28, 22, 0.10);
  --ease: 180ms ease;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--text);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--background); }

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--background);
}

button,
input { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

button { border: 0; }

a { color: inherit; }

.app-shell {
  width: min(100%, 600px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand-header {
  min-height: 86px;
  padding: 26px clamp(24px, 6vw, 38px) 22px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #ece9e5;
  background: rgba(255, 255, 255, 0.97);
  position: relative;
  z-index: 2;
}

.brand-header a {
  display: inline-flex;
  align-items: center;
}

.brand-header img {
  display: block;
  width: 142px;
  height: auto;
}

.quiz-app {
  flex: 1;
  display: grid;
  min-height: 0;
}

.screen {
  grid-area: 1 / 1;
  width: 100%;
  min-height: 100%;
  padding: clamp(30px, 7vw, 48px) clamp(24px, 6vw, 38px);
  background: var(--surface);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--ease), transform var(--ease);
}

.screen.is-active {
  opacity: 1;
  transform: none;
}

.screen[hidden] { display: none !important; }

h1,
h2,
legend {
  font-family: Sora, Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  letter-spacing: -0.042em;
}

h1,
h2,
p { margin-top: 0; }

.welcome-screen {
  min-height: calc(100svh - 86px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(42px, 10vh, 74px);
  padding-bottom: max(34px, env(safe-area-inset-bottom));
}

.welcome-copy h1 {
  max-width: 100%;
  margin-bottom: 28px;
  font-size: clamp(36px, 9vw, 52px);
  line-height: 1.02;
}

.welcome-copy p {
  max-width: 22ch;
  margin-bottom: 0;
  color: #55514d;
  font-size: clamp(20px, 5vw, 26px);
  line-height: 1.38;
  letter-spacing: -0.018em;
}

.welcome-action { display: grid; gap: 24px; }

.button {
  min-height: 58px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: 13px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), transform var(--ease), opacity var(--ease);
}

.button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button:active:not(:disabled) { transform: translateY(1px); }

.button:focus-visible,
input:focus-visible + span,
.input-shell:focus-within {
  outline: 3px solid rgba(255, 111, 79, 0.22);
  outline-offset: 2px;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(255, 111, 79, 0.22);
}

.button-primary:hover:not(:disabled) { background: var(--accent-hover); }

.button-primary:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
}

.button-wide { width: 100%; }

.time-note {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: var(--muted);
  font-size: 16px;
}

.time-note svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.question-screen {
  min-height: calc(100svh - 86px);
  padding-bottom: 126px;
  position: relative;
}

.question-progress { margin-bottom: clamp(42px, 8vh, 70px); }

.progress-copy {
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--muted);
  font-size: 15px;
}

.progress-copy strong {
  color: var(--text);
  font-size: 16px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9e7e4;
}

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

.question-form fieldset,
.contact-methods {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.question-form legend {
  width: 100%;
  margin-bottom: 30px;
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 750;
  line-height: 1.1;
}

.answer-options { display: grid; gap: 14px; }

.answer-options.is-compact { gap: 10px; }

.answer-options.is-compact .answer-option span {
  min-height: 60px;
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 16px;
}

.answer-option { display: block; cursor: pointer; }

.answer-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.answer-option span {
  min-height: 74px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1.5px solid var(--border);
  border-radius: 13px;
  background: #ffffff;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  transition: border-color var(--ease), background-color var(--ease), box-shadow var(--ease);
}

.answer-option span::before,
.method-option i {
  content: "";
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 2px solid #cbc8c3;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 0 0 5px #ffffff;
  transition: border-color var(--ease), background-color var(--ease);
}

.answer-option input:checked + span,
.method-option input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.answer-option input:checked + span::before,
.method-option input:checked + span i {
  border-color: var(--accent);
  background: var(--accent);
}

.answer-option input:focus-visible + span { border-color: var(--accent); }

.question-nav {
  width: 100%;
  min-height: 102px;
  padding: 16px clamp(24px, 6vw, 38px) max(16px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-top: 1px solid #ece9e5;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.button-back {
  min-width: 72px;
  padding: 0;
  border: 1px solid #ebe8e4;
  background: #f4f2ef;
  color: var(--text);
}

.button-next { width: 100%; }

.contact-screen { padding-bottom: max(42px, env(safe-area-inset-bottom)); }

.contact-copy { margin-bottom: 30px; }

.contact-copy h2,
.success-screen h2 {
  margin-bottom: 16px;
  font-size: clamp(32px, 8vw, 44px);
  line-height: 1.05;
}

.contact-copy p,
.success-screen > p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.lead-form { display: grid; gap: 22px; }

.field { display: grid; gap: 9px; }

.field > span:first-child,
.contact-methods legend {
  font-size: 15px;
  font-weight: 650;
}

.input-shell {
  min-height: 58px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  transition: border-color var(--ease), outline var(--ease);
}

.input-shell:focus-within { border-color: var(--accent); }

.input-shell svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: #5e5b57;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input-shell input {
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 17px;
}

.input-shell input::placeholder { color: #9a9690; }

.contact-methods { display: grid; gap: 10px; }

.contact-methods legend { margin-bottom: 9px; }

.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.method-option { cursor: pointer; }

.method-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.method-option > span {
  min-height: 58px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  transition: border-color var(--ease), background-color var(--ease);
}

.method-option i {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  box-shadow: inset 0 0 0 4px #ffffff;
}

.consent-field {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 11px;
  align-items: start;
  cursor: pointer;
}

.consent-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.consent-field > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: #ffffff;
  color: #ffffff;
  transition: background-color var(--ease), border-color var(--ease), outline var(--ease);
}

.consent-field svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.consent-field input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
}

.consent-field input:focus-visible + span {
  outline: 3px solid rgba(255, 111, 79, 0.22);
  outline-offset: 2px;
}

.consent-field small {
  color: #55514d;
  font-size: 14px;
  line-height: 1.45;
}

.consent-field a { color: var(--accent-hover); }

.honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.form-error {
  margin: -4px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff0ee;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.4;
}

.submit-button[aria-busy="true"] { cursor: wait; opacity: 0.7; }

.success-screen {
  min-height: calc(100svh - 86px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-bottom: max(42px, env(safe-area-inset-bottom));
}

.success-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
}

.success-icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-screen > p { margin-bottom: 42px; }

.button-secondary {
  border: 1.5px solid var(--border);
  background: #ffffff;
  color: var(--text);
}

.button-secondary:hover { background: #f6f4f1; }

@media (min-width: 601px) {
  body { padding: 24px; }

  .app-shell {
    min-height: calc(100vh - 48px);
    min-height: calc(100svh - 48px);
    border: 1px solid rgba(37, 32, 24, 0.08);
    border-radius: 28px;
  }

  .welcome-screen,
  .question-screen,
  .success-screen { min-height: calc(100svh - 135px); }
}

@media (max-width: 420px) {
  .brand-header { min-height: 76px; padding-top: 22px; padding-bottom: 18px; }
  .brand-header img { width: 132px; }
  .screen { padding-top: 28px; }
  .welcome-screen { min-height: calc(100svh - 76px); }
  .question-screen { min-height: calc(100svh - 76px); }
  .success-screen { min-height: calc(100svh - 76px); }
  .answer-option span { min-height: 66px; font-size: 17px; }
}

@media (max-width: 340px) {
  .method-grid { grid-template-columns: 1fr; }
}

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