/* Colors and font copied from the original Typeform theme */
:root {
  --question: #000000;
  --answer: #040404;
  --button: #758976;
  --button-text: #000000;
  --bg: #FFFFFF;
  --choice-bg: rgba(4, 4, 4, 0.06);
  --choice-bg-hover: rgba(4, 4, 4, 0.1);
  --choice-border: rgba(4, 4, 4, 0.12);
  --font: "Instrument Serif", Georgia, serif;
  --radius: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--question);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; min-height: 100dvh; }

button, input { font-family: inherit; }

/* Progress bar */
.progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 4px; background: rgba(4, 4, 4, 0.12); z-index: 10;
}
.progress-fill { height: 100%; width: 0; background: var(--answer); transition: width .4s ease; }

/* Screen wrapper */
.screen {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 72px 24px 120px;
  animation: rise .45s ease both;
}
.screen.back { animation-name: drop; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }

.inner { width: 100%; max-width: 720px; text-align: center; }

/* Welcome */
.welcome { display: flex; flex-direction: column; align-items: center; gap: 28px; padding-top: 32px; }
.welcome-img {
  width: 100%; max-width: 236px; aspect-ratio: 2 / 3;
  object-fit: cover; object-position: 0 0; filter: brightness(0.97);
}
.welcome-text { text-align: center; }
.welcome h1 {
  font-weight: 400; font-size: clamp(26px, 4.2vw, 36px); line-height: 1.2;
  margin: 0 0 16px; white-space: pre-line;
}
.welcome p { font-size: clamp(16px, 2vw, 20px); line-height: 1.4; margin: 0 0 28px; color: var(--answer); }

@media (min-width: 1024px) {
  .screen.welcome-screen { padding: 0; align-items: stretch; }
  .welcome { flex-direction: row; max-width: none; gap: 0; padding-top: 0; min-height: 100vh; }
  .welcome-img { max-width: none; width: 50%; height: 100vh; aspect-ratio: auto; }
  .welcome-text { width: 50%; padding: 0 64px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
}

/* Buttons */
.btn {
  appearance: none; border: 0; cursor: pointer;
  background: var(--button); color: var(--button-text);
  font-size: 20px; font-weight: 600; line-height: 1.2;
  padding: 10px 18px; border-radius: var(--radius);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
  transition: filter .15s ease, transform .1s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, .choice:focus-visible, input:focus-visible { outline: 2px solid var(--answer); outline-offset: 2px; }

.btn-row { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hint { font-size: 13px; color: rgba(4, 4, 4, 0.7); }
.hint b { font-weight: 700; }
.time { margin-top: 14px; font-size: 14px; color: rgba(4, 4, 4, 0.75); display: inline-flex; gap: 6px; align-items: center; }

/* Question */
.q-head { display: flex; justify-content: center; align-items: flex-start; gap: 0; margin-bottom: 8px; }
.q-num {
  display: inline-block; background: var(--answer); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 19px; padding: 0 5px;
  border-radius: 5px 3px; margin-bottom: 12px;
}
.q-title { font-weight: 400; font-size: clamp(20px, 2.6vw, 28px); line-height: 1.3; margin: 0 0 6px; }
.q-title .req { margin-left: 4px; }
.q-desc { font-size: clamp(16px, 1.9vw, 20px); color: rgba(4, 4, 4, 0.7); margin: 0 0 6px; }

.choices { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.choice {
  width: 100%; display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 7px 12px 7px 8px; cursor: pointer;
  background: var(--choice-bg); color: var(--answer);
  border: 1px solid var(--choice-border); border-radius: var(--radius);
  font-size: clamp(16px, 1.9vw, 20px); line-height: 1.3; text-align: left;
  transition: background .15s ease, box-shadow .15s ease;
}
.choice:hover { background: var(--choice-bg-hover); }
.choice .key {
  flex: 0 0 auto; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(4, 4, 4, 0.35); border-radius: 3px; background: var(--bg);
  font-size: 12px; font-weight: 700;
}
.choice .label { flex: 1; }
.choice .check { width: 18px; height: 18px; opacity: 0; }
.choice.selected { box-shadow: inset 0 0 0 1px var(--answer); background: var(--choice-bg-hover); }
.choice.selected .key { background: var(--answer); color: #fff; border-color: var(--answer); }
.choice.selected .check { opacity: 1; }
.choice.blink { animation: blink .35s ease 1; }
@keyframes blink { 0%, 50% { background: var(--choice-bg); } 25%, 75% { background: rgba(4, 4, 4, 0.18); } }

.actions { margin-top: 24px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.error { color: #A3302A; font-size: 15px; margin-top: 12px; min-height: 1em; }

/* Contact form */
.field { text-align: left; margin-top: 28px; }
.field label { display: block; font-size: clamp(18px, 2.2vw, 22px); margin-bottom: 8px; }
.field label .req { margin-left: 4px; }
.field input {
  width: 100%; border: 0; border-bottom: 1px solid rgba(4, 4, 4, 0.3);
  background: transparent; color: var(--answer);
  font-size: clamp(20px, 2.6vw, 28px); padding: 6px 0 8px; outline: none;
  border-radius: 0;
}
.field input:focus { border-bottom: 2px solid var(--answer); padding-bottom: 7px; }
.field input::placeholder { color: rgba(4, 4, 4, 0.3); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Result */
.result .intro { font-style: italic; font-size: clamp(16px, 1.9vw, 19px); color: rgba(4, 4, 4, 0.75); margin: 0 0 24px; line-height: 1.4; }
.result h1 { font-weight: 400; font-size: clamp(28px, 4.2vw, 40px); line-height: 1.2; margin: 0 0 18px; }
.result .desc { font-size: clamp(17px, 2vw, 21px); line-height: 1.45; margin: 0 0 28px; color: var(--answer); }
.result .next { font-style: italic; font-size: clamp(16px, 1.9vw, 19px); margin: 0 0 20px; }
.result .btn { text-decoration: none; display: inline-block; }

/* Up/down arrows, bottom right like Typeform */
.nav-arrows { position: fixed; right: 16px; bottom: 16px; display: flex; gap: 1px; z-index: 10; }
.nav-arrows button {
  width: 36px; height: 32px; border: 0; cursor: pointer;
  background: var(--button); color: var(--button-text);
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-arrows button:first-child { border-radius: 4px 0 0 4px; }
.nav-arrows button:last-child { border-radius: 0 4px 4px 0; }
.nav-arrows button:disabled { opacity: .5; cursor: default; }

/* Phones: button pinned to the bottom like Typeform's mobile layout */
@media (max-width: 767px) {
  .screen { padding: 56px 18px 140px; align-items: flex-start; }
  .screen.question-screen .actions,
  .screen.contact-screen .actions {
    position: fixed; left: 0; right: 0; bottom: 0; margin: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--bg) 70%, rgba(255, 255, 255, 0));
  }
  .screen.question-screen .actions .btn,
  .screen.contact-screen .actions .btn { width: 100%; }
  .screen .actions .hint { display: none; }
  .nav-arrows { display: none !important; }
  .welcome .btn { width: 100%; }
  .result .btn-row .btn { width: 100%; }
}
