/*
   "Get started" form. Lives inside the landing page's `.lp` scope, so it uses
   the same fixed dark colours (--lp-*) and the same brand mark and pill
   buttons. Phone first: one column with a sticky Send bar. From 901px up the
   story sits beside a card.
*/
.lp.iq {
  /* `hidden` would make .lp a scroll container and break the sticky bar. */
  overflow-x: clip;
  overflow-y: visible;
}
.iq [hidden] {
  display: none !important;
}
.iq .iq-label em,
.iq .iq-addnote em {
  font-family: inherit;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--lp-dim);
}

/* The app's heading and link colours are theme tokens (dark in the light
   theme). This screen is always dark, so set its own. */
.iq h1,
.iq h2 {
  color: var(--lp-text);
}
.iq a.lp-btn {
  color: var(--lp-text);
  text-decoration: none;
}

.iq-nav {
  height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.iq-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 4px 20px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* ---- story (title, promise, next steps) ---- */
.iq-title {
  margin: 8px 0 10px;
  font-size: clamp(30px, 8vw, 40px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.045em;
}
.iq-sub {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--lp-muted);
}
.iq-trust {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.iq-trust li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--lp-soft);
}
.iq-trust i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(74, 222, 128, 0.14);
  color: var(--lp-go);
}
.iq-trust svg {
  width: 10px;
  height: 10px;
}
.iq-steps {
  list-style: none;
  margin: 0;
  padding: 6px 18px;
  border: 1px solid var(--lp-line);
  border-radius: 18px;
  background: var(--lp-card);
}
.iq-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid var(--lp-line);
}
.iq-steps li:last-child {
  border-bottom: 0;
}
.iq-steps b {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--lp-text);
  color: #09090b;
  font-size: 13px;
}
.iq-steps span {
  font-size: 14px;
  line-height: 1.4;
  color: var(--lp-muted);
}
.iq-steps strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--lp-text);
}
/* On a phone the steps wait for the thank-you screen. */
.iq-story .iq-steps {
  display: none;
}

/* ---- form ---- */
.iq-trap {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.iq-group {
  margin: 6px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lp-dim);
}
.iq-group::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--lp-line);
}
.iq-field {
  margin-bottom: 16px;
}
.iq-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--lp-soft);
}
.iq-label--sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.iq-input {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--lp-line-2);
  border-radius: 13px;
  background: var(--lp-card);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.iq-input:focus-within {
  border-color: var(--lp-text);
  box-shadow: 0 0 0 4px rgba(250, 250, 250, 0.1);
}
.iq-input input {
  flex: 1;
  min-width: 0;
  height: 50px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--lp-text);
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming the page on focus */
}
.iq-input input::placeholder,
.iq-note textarea::placeholder {
  color: var(--lp-dim);
}
.iq-prefix {
  padding-right: 10px;
  border-right: 1px solid var(--lp-line-2);
  font-size: 16px;
  font-weight: 600;
  color: var(--lp-text);
}
.iq-tick {
  display: none;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  place-items: center;
  background: var(--lp-go);
  color: var(--lp-go-ink);
}
.is-ok .iq-tick {
  display: grid;
}
.is-bad .iq-input {
  border-color: #f87171;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12);
}
.iq-err {
  margin: 7px 0 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: #fca5a5;
}
.iq-err--banner {
  margin: 4px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 12px;
  background: rgba(248, 113, 113, 0.08);
}
.iq-hint {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--lp-dim);
}

/* chips: real radio buttons underneath, so keyboard and screen readers work */
.iq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.iq-chip {
  position: relative;
  display: inline-flex;
}
.iq-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.iq-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--lp-line-2);
  border-radius: 999px;
  background: var(--lp-card);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--lp-soft);
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.iq-chip input:checked + span {
  border-color: var(--lp-text);
  background: var(--lp-text);
  color: #09090b;
  font-weight: 600;
}
.iq-chip input:focus-visible + span {
  outline: 2px solid var(--lp-text);
  outline-offset: 3px;
}

.iq-addnote {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--lp-text);
}
.iq-addnote i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--lp-muted);
}
.iq-addnote[aria-expanded="true"] i {
  transform: rotate(45deg);
}
.iq-note textarea {
  width: 100%;
  margin-top: 6px;
  padding: 13px 14px;
  border: 1px solid var(--lp-line-2);
  border-radius: 13px;
  background: var(--lp-card);
  color: var(--lp-text);
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
  resize: vertical;
  outline: 0;
}
.iq-note textarea:focus {
  border-color: var(--lp-text);
  box-shadow: 0 0 0 4px rgba(250, 250, 250, 0.1);
}

/* ---- sticky bar: progress + Send ---- */
.iq-bar {
  position: sticky;
  bottom: 0;
  margin: 8px -20px 0;
  padding: 12px 20px max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--lp-line);
  background: rgba(6, 6, 8, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 5;
}
.iq-prog {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lp-muted);
}
.iq-prog__bar {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--lp-line-2);
  overflow: hidden;
}
.iq-prog__bar i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--lp-text);
  transition:
    width 0.25s,
    background 0.25s;
}
.iq--ready .iq-prog {
  color: var(--lp-go);
}
.iq--ready .iq-prog__bar i {
  background: var(--lp-go);
}
.iq-send {
  width: 100%;
}
/* Not ready: still tappable (it shows what is missing), just quieter. */
.iq:not(.iq--ready) .iq-send {
  background: var(--lp-line-2);
  color: var(--lp-muted) !important;
  box-shadow: none;
}
.iq-send:disabled {
  opacity: 0.7;
  cursor: progress;
}
.iq-micro {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--lp-dim);
}
.iq-micro a {
  color: var(--lp-soft);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- thank-you ---- */
.iq-thanks {
  text-align: center;
  padding: 18px 0 32px;
}
.iq-thanks__check {
  width: 84px;
  height: 84px;
  margin: 8px auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--lp-go);
  color: var(--lp-go-ink);
  box-shadow: 0 0 44px rgba(74, 222, 128, 0.35);
}
.iq-thanks__check svg {
  width: 40px;
  height: 40px;
}
.iq-thanks h2 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.04em;
  outline: 0;
}
.iq-thanks p {
  margin: 0 auto;
  max-width: 340px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--lp-muted);
}
.iq-thanks p b {
  color: var(--lp-text);
}
.iq-steps--card {
  display: block;
  margin: 24px 0 18px;
  text-align: left;
}
.iq-wide {
  width: 100%;
  margin-top: 10px;
}
/* Once sent, the thank-you card takes the whole page. */
.iq--done .iq-story {
  display: none;
}

@media (min-width: 901px) {
  .iq-nav {
    height: 80px;
    padding: 0 56px;
  }
  .iq-grid {
    padding: 24px 56px 72px;
    grid-template-columns: 1fr 520px;
    gap: 80px;
    align-items: start;
  }
  .iq-title {
    margin: 18px 0 16px;
    font-size: 64px;
    line-height: 1;
  }
  .iq-sub {
    max-width: 470px;
    margin-bottom: 22px;
    font-size: 18px;
  }
  .iq-trust {
    margin-bottom: 30px;
  }
  .iq-trust li {
    font-size: 14px;
  }
  .iq-story .iq-steps {
    display: block;
    max-width: 470px;
    padding: 8px 22px;
  }
  .iq--done .iq-grid {
    grid-template-columns: minmax(0, 520px);
    justify-content: center;
  }
  .iq-steps span {
    font-size: 15.5px;
  }
  .iq-card {
    padding: 30px 30px 26px;
    border: 1px solid var(--lp-line-2);
    border-radius: 26px;
    background: var(--lp-card);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4);
  }
  .iq-card .iq-input,
  .iq-card .iq-chip span,
  .iq-card .iq-note textarea {
    background: var(--lp-raise);
  }
  .iq-card .iq-chip input:checked + span {
    background: var(--lp-text);
  }
  .iq-bar {
    position: static;
    margin: 8px 0 0;
    padding: 4px 0 0;
    border-top: 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .iq-input,
  .iq-chip span,
  .iq-prog__bar i {
    transition: none;
  }
}
