/* ==========================================================
   One question at a time — the shared look for the FAIR enquiry form
   and the guided evidence flow (assets/js/typeform.js).

   Without JavaScript the slides simply stack as one ordinary form;
   .tf.is-on (set by the script) turns them into one-at-a-time screens.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600&display=swap');

.tf {
  --tf-sans: 'Public Sans', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --tf-serif: 'Lexend', 'Segoe UI', system-ui, sans-serif;
  --tf-ink: var(--ink, #0f1830);
  --tf-muted: var(--ink-3, #6b768e);
  --tf-line: #c5cbd8;
  --tf-accent: var(--red, #ff1f5e);
  --tf-accent-soft: rgba(255, 31, 94, .08);
  --tf-bg: #fff;
  position: relative;
  background: var(--tf-bg);
  font-family: var(--tf-sans);
  color: var(--tf-ink);
}
.tf-progress { position: sticky; top: 0; z-index: 5; height: 3px; background: #e3e6ed; }
.tf-progress > span { display: block; height: 100%; width: 0; background: var(--tf-accent); transition: width .35s ease; }

.tf-slides { max-width: 720px; margin: 0 auto; padding: 56px 24px 120px; display: grid; gap: 64px; }
.tf-slide { display: grid; gap: 14px; }
/* The site stylesheet clips every <section>; a slide must not cut off focus rings. */
.aifod-page .tf-slide { overflow: visible; }
.tf.is-on .tf-slides { min-height: 88vh; min-height: 88svh; align-content: center; padding-block: 48px 140px; }
.tf.is-on .tf-slide { display: none; }
.tf.is-on .tf-slide.is-current { display: grid; animation: tf-in .2s ease-out; }
.tf.is-on .tf-slide.is-back { animation-name: tf-in-back; }
@keyframes tf-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes tf-in-back { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.tf-num { font: 500 13px 'IBM Plex Mono', ui-monospace, Menlo, monospace; color: var(--tf-muted); display: flex; align-items: center; gap: 8px; }
.tf-q { font-family: var(--tf-serif); font-size: clamp(23px, 3.2vw, 32px); line-height: 1.2; font-weight: 700; letter-spacing: -.02em; margin: 0;
  text-wrap: balance; padding-left: 16px; border-left: 3px solid var(--tf-accent); }
.tf-q .req { color: var(--tf-accent); margin-left: 2px; }
.tf-hint { font-size: 17px; color: var(--tf-muted); margin: 0; line-height: 1.5; max-width: 60ch; }

.tf-field input[type=text], .tf-field input[type=email], .tf-field input[type=url], .tf-field textarea {
  width: 100%; font: inherit; font-size: clamp(19px, 2.4vw, 24px); color: var(--tf-ink);
  border: 0; border-bottom: 1.5px solid var(--tf-ink); border-radius: 0; background: transparent;
  padding: 10px 0 8px; outline: none; box-shadow: none; transition: border-color .15s;
}
.tf-field textarea { min-height: 3.4em; resize: none; overflow: hidden; line-height: 1.45; }
.tf-field input::placeholder, .tf-field textarea::placeholder { color: #9aa3b5; }
.tf-field input:focus, .tf-field textarea:focus { border-bottom-color: var(--tf-accent); box-shadow: none; }
.tf-count { font-size: 13px; color: var(--tf-muted); }
.tf-count.is-ok { color: var(--ok, #2c8859); }

.tf-choices { display: grid; gap: 10px; max-width: 460px; }
.tf-choice { position: relative; display: flex; align-items: center; gap: 12px; cursor: pointer;
  border: 1.5px solid var(--tf-line); border-radius: 3px; padding: 13px 16px; font-size: 18px;
  background: #fff; transition: border-color .12s, background .12s; }
.tf-choice:hover { border-color: var(--tf-accent); }
.tf-choice input { position: absolute; opacity: 0; pointer-events: none; }
.tf-choice kbd { display: none; font: 600 12px var(--tf-sans); border: 1px solid var(--tf-line); border-radius: 5px;
  min-width: 24px; height: 24px; display: inline-grid; place-items: center; color: var(--tf-muted); background: var(--tf-bg); }
.tf-choice:has(input:checked) { border-color: var(--tf-accent); background: var(--tf-accent-soft); }
.tf-choice:has(input:checked) kbd { background: var(--tf-accent); border-color: var(--tf-accent); color: #fff; }
.tf-choice:has(input:focus-visible) { outline: 2px solid var(--tf-accent); outline-offset: 2px; }

.tf-check { display: flex; gap: 14px; align-items: flex-start; font-size: 18px; line-height: 1.5; cursor: pointer; max-width: 56ch; }
.tf-check input { width: 22px; height: 22px; margin-top: 4px; accent-color: var(--tf-accent); flex: none; }

.tf-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.tf-ok { font: inherit; font-size: 17px; font-weight: 600; color: #fff; background: var(--tf-accent); border: 0;
  border-radius: 3px; padding: 12px 24px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; text-decoration: none;
  transition: background .12s; }
.tf-ok:hover { background: #d31552; color: #fff; text-decoration: none; }
.tf-back { font: inherit; font-size: 15px; background: none; border: 0; color: var(--tf-muted); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; padding: 6px 2px; }
.tf-back:hover { color: var(--tf-ink); }
.tf-ok:focus-visible { outline: 2px solid var(--tf-ink); outline-offset: 3px; }
.tf-ok[disabled] { opacity: .5; cursor: wait; transform: none; }
.tf-enter { display: none; }
.tf-enter b { font-weight: 600; color: var(--tf-ink); }
.tf.is-touch .tf-enter { display: none; }
.tf-error { font-size: 15px; font-weight: 600; color: #a80f40; background: none; padding: 0; justify-self: start;
  display: inline-flex; gap: 8px; align-items: center; }
.tf-error[hidden] { display: none; }

.tf-nav, .tf.is-on .tf-nav { display: none !important; }
.tf.is-on .tf-nav { position: fixed; right: 24px; bottom: 24px; z-index: 6; display: flex; gap: 2px;
  background: var(--tf-accent); border-radius: 10px; overflow: hidden; box-shadow: 0 6px 18px rgba(255,31,94,.25); }
.tf-nav button { border: 0; background: transparent; color: #fff; width: 42px; height: 38px; cursor: pointer; font-size: 15px; }
.tf-nav button:hover { background: rgba(0,0,0,.12); }
.tf-nav button[disabled] { opacity: .45; cursor: default; background: transparent; }

/* welcome screen */
.tf-welcome { gap: 22px; }
.tf-welcome .tf-q { font-size: clamp(34px, 5vw, 52px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; border-left: 0; padding-left: 0; }
.tf-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 17px; color: var(--tf-ink); }
.tf-points i { color: var(--tf-accent); width: 22px; }
.tf-small { font-size: 14px; color: var(--tf-muted); }
.tf-small a { color: var(--tf-accent); }
.tf-steps { display: grid; gap: 6px; font-size: 15px; color: var(--tf-muted); margin: 0; padding-left: 1.4em; list-style: decimal; }
.tf-alert { border-left: 3px solid var(--tf-accent); background: var(--tf-accent-soft); padding: 12px 16px; font-size: 15px; }

@media (max-width: 600px) {
  .tf-slides { padding: 36px 18px 110px; gap: 48px; }
  .tf.is-on .tf-nav { right: 16px; bottom: 16px; }
  .tf-hint { font-size: 15.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .tf.is-on .tf-slide.is-current { animation: none; }
  .tf-progress > span { transition: none; }
}

/* Small touches of motion in the one-question flows (reduced-motion respected). */
@media (prefers-reduced-motion: no-preference) {
  .tf-choice { transition: border-color .12s, background .12s, transform .12s; }
  .tf-choice:active { transform: scale(.985); }
  .tf-ok:active { transform: scale(.97); }
  .tf-error:not([hidden]) { animation: tf-shake .32s ease-in-out; }
  @keyframes tf-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
  .tf-count.is-ok { animation: tf-in .3s ease both; }
  .tf-field input:focus, .tf-field textarea:focus { transition: border-color .2s; }
}
