/* Theme of the original Typeform: Georgia, #4F5A3F on #F4F0E7, large rounded corners. */
:root {
  --fg: #4f5a3f;
  --bg: #f4f0e7;
  --soft: rgba(79, 90, 63, .1);
  --line: rgba(79, 90, 63, .3);
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100dvh; overflow: hidden;
  background: var(--bg); color: var(--fg); font-family: Georgia, "Times New Roman", serif;
}
button { font-family: inherit; }

.tf-progress { position: fixed; inset: 0 0 auto; height: 4px; background: var(--line); z-index: 2; }
.tf-progress[hidden] { display: none; }
.tf-progress span { display: block; height: 100%; width: 0; background: var(--fg); border-radius: 0 2px 2px 0; transition: width .4s ease; }

.tf { position: relative; height: 100dvh; max-width: 768px; margin: 0 auto; }
.step {
  position: absolute; inset: 0; padding: 2rem 1.5rem 5rem 3.2rem;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1.6rem;
  opacity: 0; visibility: hidden; transform: translateY(80px);
  transition: opacity .4s ease, transform .5s cubic-bezier(.2, .7, .2, 1), visibility .4s;
}
.step.above { transform: translateY(-80px); }
.step.active { opacity: 1; visibility: visible; transform: none; }

.screen { align-items: center; text-align: center; gap: .9rem; padding-left: 1.5rem; }
.screen-text { margin: 0 0 1rem; max-width: 45rem; font-size: clamp(1.3rem, 3vw, 1.85rem); line-height: 1.35; }
.duration { font-size: .8rem; opacity: .85; }

.q { position: relative; font-size: clamp(1.1rem, 2.6vw, 1.5rem); line-height: 1.35; }
.num {
  position: absolute; left: -1.7rem; top: .3em;
  display: grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 3px;
  background: var(--fg); color: var(--bg); font: bold .65rem Georgia, serif;
}

.step input, .step textarea {
  width: 100%; padding: 0 0 .5rem; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; color: var(--fg); font: clamp(1.2rem, 3vw, 1.75rem) Georgia, serif; resize: none; overflow: hidden;
  transition: border-color .2s;
}
.step input::placeholder, .step textarea::placeholder { color: var(--fg); opacity: .4; }
.step input:focus, .step textarea:focus { outline: 0; border-bottom: 2px solid var(--fg); }

.ages { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; }
.ages label { display: grid; gap: .3rem; font-size: .9rem; }
.ages input { width: 5.5rem; -moz-appearance: textfield; }
.ages input::-webkit-inner-spin-button { -webkit-appearance: none; }
.choices { display: grid; gap: .5rem; min-width: min(100%, 16rem); }
.choice {
  display: flex; align-items: center; gap: .6rem; padding: .45rem 1.2rem .45rem .5rem;
  background: var(--soft); color: var(--fg); border: 1px solid rgba(79, 90, 63, .12); border-radius: 999px;
  font-size: clamp(1rem, 2.2vw, 1.15rem); text-align: left; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.choice:hover { background: rgba(79, 90, 63, .18); }
.choice[aria-checked="true"] { background: rgba(79, 90, 63, .28); border-color: var(--fg); animation: blink .5s; }
.letter {
  display: grid; place-items: center; flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); font-size: .7rem; font-weight: bold;
}
.choice[aria-checked="true"] .letter { background: var(--fg); color: var(--bg); border-color: var(--fg); }
@keyframes blink { 20%, 60% { opacity: .55; } 40%, 80% { opacity: 1; } }

.btn {
  padding: .5rem 1.1rem; border: 0; border-radius: 999px; background: var(--fg); color: var(--bg);
  font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: opacity .15s; text-decoration: none;
}
.btn:hover { opacity: .9; }
.err:empty { display: none; }
.err { margin: -.8rem 0 0; padding: .25rem .6rem; border-radius: 4px; background: #7a1f32; color: var(--bg); font-size: .85rem; }

.tf-nav { position: fixed; right: 1rem; bottom: 1rem; display: flex; gap: 1px; z-index: 2; }
.tf-nav[hidden] { display: none; }
.tf-nav button {
  display: grid; place-items: center; width: 2.25rem; height: 2rem; padding: 0; border: 0;
  background: var(--fg); cursor: pointer;
}
.tf-nav button:disabled { opacity: .35; cursor: default; }
.tf-nav button:first-child { border-radius: 6px 0 0 6px; }
.tf-nav button:last-child { border-radius: 0 6px 6px 0; }
.tf-nav svg { width: 1rem; height: 1rem; fill: none; stroke: var(--bg); stroke-width: 1.8; }

@media (prefers-reduced-motion: reduce) { .step, .tf-progress span { transition: none; } }

.lang { position: fixed; top: 12px; right: 12px; z-index: 3; font-size: .85rem; letter-spacing: 1px; }
.lang a { color: inherit; }
