/* Free upgrade questionnaire (demo.js): one question at a time in a calm centred column. */
.demo { --ease: cubic-bezier(.16, 1, .3, 1); --line: rgba(11,11,12,.14); --lab: #6a6a6a; min-height: 100svh; display: grid; place-items: center; padding: 120px var(--pad) 72px; }
.demo [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.demo :is(button, a, input):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.demo ::selection { background: rgba(77,161,255,.25); }
.demo button { cursor: pointer; border: 0; font-family: var(--sans); }
.demo-wrap { width: min(100%, 720px); }

/* header row + a thin progress line */
.q-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.demo-title { font: 500 14px var(--sans); letter-spacing: -.01em; }
.q-count { font-size: 13px; color: var(--lab); font-variant-numeric: tabular-nums; }
.q-bar { height: 2px; margin: 14px 0 clamp(48px, 9vh, 88px); background: var(--line); border-radius: 2px; overflow: hidden; }
.q-bar i { display: block; height: 100%; width: var(--p, 0%); background: var(--ink); border-radius: inherit; transition: width .9s var(--ease); }

/* the question */
.q-body { display: flex; flex-direction: column; }
.q { border: 0; margin: 0; padding: 0; min-width: 0; }
.q legend { padding: 0; margin-bottom: clamp(28px, 5vh, 44px); font: 400 clamp(40px, 5vw, 68px)/1.02 var(--serif); letter-spacing: -.04em; text-wrap: balance; outline: none; }
/* each word sits in its own clip mask so it can rise out of it */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .06em .16em; margin: 0 -.06em -.16em; }
.w > span { display: inline-block; }
.q input:not([type=radio]) { width: 100%; height: 64px; padding: 0; font: 400 clamp(24px, 2.6vw, 34px) var(--sans); letter-spacing: -.02em; color: inherit; caret-color: var(--blue); border: 0; border-radius: 0; outline: none;
  background: linear-gradient(var(--ink), var(--ink)) 0 100% / 0 1.5px no-repeat, linear-gradient(var(--line), var(--line)) 0 100% / 100% 1px no-repeat; transition: background-size .7s var(--ease); }
.q input::placeholder { color: rgba(11,11,12,.28); }
.demo .q input:not([type=radio]):focus-visible { outline: none; }
.q input:not([type=radio]):focus { background-size: 100% 1.5px, 100% 1px; }
.q input[aria-invalid="true"]:not([type=radio]) { background-image: linear-gradient(var(--blue), var(--blue)), linear-gradient(var(--line), var(--line)); background-size: 100% 1.5px, 100% 1px; }
.q-yn { display: flex; gap: 12px; }
.q-yn label { position: relative; display: flex; align-items: center; justify-content: center; width: 156px; height: 60px; border-radius: 999px; cursor: pointer;
  background: transparent; box-shadow: inset 0 0 0 1px rgba(11,11,12,.55);
  transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .45s var(--ease), transform .45s var(--ease); }
.q-yn input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.q-yn span { font: 500 17px var(--sans); }
.q-yn label:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px #0b0b0c; }
.q-yn label:has(:checked) { color: #fff; background: #0b0b0c; box-shadow: 0 1px 2px rgba(11,11,12,.14), 0 10px 24px -14px rgba(11,11,12,.55); }
.q-yn label:has(:focus-visible) { outline: 2px solid var(--blue); outline-offset: 3px; }

.q-hint { min-height: 1.4em; margin-top: 12px; font-size: 14px; color: var(--lab); }
.q-actions { display: flex; align-items: center; gap: 20px; margin-top: 28px; }
.q-next { height: 52px; padding: 0 28px; font-size: 15px; transition: transform .2s, opacity .4s var(--ease); }
.q-next:disabled { opacity: .25; cursor: default; transform: none; filter: none; }
.demo-form[data-step="site"] .q-next { visibility: hidden; }
.q-back { padding: 10px 4px; background: none; font-size: 14px; color: var(--lab); transition: color .3s; }
.q-back:hover { color: var(--ink); }

.demo-alt { margin-top: clamp(56px, 10vh, 96px); font-size: 14px; color: var(--lab); }
.demo-alt a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.demo .form-msg { margin-top: 14px; }
.demo .form-msg:empty { display: none; }
.demo.done .q-body { display: none; }
.demo.done .form-msg { margin: 0; font: 400 clamp(32px, 3.6vw, 48px)/1.1 var(--serif); letter-spacing: -.03em; }

@media (max-width: 760px) {
  .demo { place-items: start center; padding: 112px var(--pad) 56px; }
  .q legend { font-size: clamp(34px, 10vw, 44px); }
  .q-yn label { flex: 1; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .demo *, .demo *::before, .demo *::after { transition: none !important; animation: none !important; }
}
.q-consent { margin-top: 18px; font-size: 12px; line-height: 1.5; color: var(--lab); max-width: 34em; }
.q-consent a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
