/* The research questionnaire. Loaded after /waitlist/app.css, whose tokens, type, navigation, footer,
   fields and forward button it reuses. One question per screen, in a single readable column. */

/* No photo under the bar here, so it sits in the flow instead of overlapping a hero. */
.research { max-width: 680px; margin-inline: auto; padding-inline: var(--gut); }
.nav { margin-bottom: 0; }
.research { padding-block: clamp(32px, 6vw, 72px) clamp(48px, 8vw, 96px); min-height: 60vh; }

.r-intro { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.r-intro h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.05; letter-spacing: -0.04em; margin: 0 0 4px; text-wrap: balance; }
.r-lede { font-size: 1.0588rem; color: var(--ink2); margin: 0; max-width: 34em; }
.r-priv { font-size: .8824rem; color: var(--ink2); margin: 0; }
.research .pnote { font-size: .8235rem; color: var(--ink3); margin: 0; padding: 10px 14px; border: 1px dashed var(--sep); border-radius: 12px; }
.r-intro .fwd, .r-done .fwd { margin-top: 8px; min-width: 220px; }

.r-progress { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.r-count { margin: 0; font-size: .8235rem; font-weight: 600; color: var(--ink2); font-variant-numeric: tabular-nums; }
.r-progress progress { appearance: none; -webkit-appearance: none; width: 100%; height: 6px; border: 0; border-radius: 999px; background: var(--fill); overflow: hidden; }
.r-progress progress::-webkit-progress-bar { background: var(--fill); border-radius: 999px; }
.r-progress progress::-webkit-progress-value { background: var(--acc); border-radius: 999px; }
.r-progress progress::-moz-progress-bar { background: var(--acc); border-radius: 999px; }

#q-form { display: flex; flex-direction: column; gap: 16px; }
#q-h { font-size: clamp(1.35rem, 4vw, 1.75rem); line-height: 1.2; letter-spacing: -0.025em; margin: 0; text-wrap: balance; outline: none; }
#q-h:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
.r-hint { margin: -8px 0 0; font-size: .8824rem; color: var(--ink2); }

/* Answers: tiles one per row, as on the waitlist form; chips for short answers such as prices. */
.r-choices { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.r-choices label { position: relative; display: block; }
.r-choices input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.r-choices input:disabled { cursor: not-allowed; }
.r-choices label > span { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; padding: 10px 44px 10px 16px;
  border: 1.5px solid var(--sep); border-radius: 14px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.r-choices label > span b { font-weight: 600; }
.r-choices label > span small { color: var(--ink2); font-size: .8235rem; }
.r-choices input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
/* A tick marks the choice too, so it never rests on the border colour alone. */
.r-choices input:checked + span::after { content: ""; position: absolute; right: 18px; top: 50%; width: 12px; height: 6px; margin-top: -5px;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.r-choices input:disabled + span { opacity: .55; }
.r-choices input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.r-choices label:active > span { transform: scale(.985); }

.r-choices.chips { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.r-choices.chips label > span { align-items: center; text-align: center; padding: 10px 12px; min-height: 52px; font-variant-numeric: tabular-nums; }
.r-choices.chips input:checked + span::after { display: none; }
/* A chosen chip fills with ink (light in dark mode), so it never looks like the unchosen white ones. */
.r-choices.chips input:checked + span { background: var(--primary); color: var(--on-primary); border-color: var(--primary); box-shadow: none; }

#q-body textarea { width: 100%; min-height: 140px; resize: vertical; border: 1.5px solid var(--sep); border-radius: 14px; background: var(--surface);
  padding: 14px 16px; font: inherit; color: inherit; line-height: 1.5; }
#q-body textarea::placeholder { color: var(--ink3); opacity: 1; }
#q-body textarea:focus { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 2px; }
#q-body { display: flex; flex-direction: column; gap: 16px; }
.r-follow { display: flex; flex-direction: column; gap: 12px; }
.r-follow:empty { display: none; }

/* Back and Skip are quiet text buttons; Next is the one primary action, in ink. */
.r-nav { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.r-nav .fwd { margin-left: auto; min-width: 180px; }
.r-back, .r-skip { min-height: 44px; padding: 0 14px; border: 0; background: none; border-radius: 999px; color: var(--ink2); font-weight: 600; font-size: .9412rem; cursor: pointer; }
/* Hover only where there is a mouse, so a tapped button doesn't stay highlighted on a phone. */
@media (hover: hover) { .r-back:hover, .r-skip:hover { background: var(--fill); color: var(--ink); } }
.r-back:focus-visible, .r-skip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 480px) {
  .r-nav .fwd { width: 100%; order: -1; margin-left: 0; }
  .r-intro .fwd, .r-done .fwd { width: 100%; }
}

.r-done { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; outline: none; }
.r-done h2 { font-size: clamp(1.6rem, 5vw, 2.25rem); line-height: 1.15; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }

@media (prefers-reduced-motion: reduce) {
  .r-choices label > span { transition: none; }
}

/* Live copies (scripts/build-site.mjs sets data-live): the preview labels go, the answers send. */
html[data-live] [data-preview] { display: none; }
.research .send-err { font-size: .8235rem; color: var(--bad); font-weight: 500; margin: 12px 0 0; }
.research .fwd[aria-disabled="true"] { opacity: .6; cursor: progress; }
