/* Blueprint builder. Every selector is scoped under .bp so nothing leaks into the rest of the site. */

.bp {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  color: var(--ink);
  --bp-muted: #5a6175;
  --bp-edge: #8f8778;
}
@media (max-width: 480px) { .bp { padding: 18px; } }

/* progress */
.bp .bp-head { margin-bottom: 20px; }
.bp .bp-progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bp .bp-progress-bar { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 99px; transition: width .3s; }
.bp .bp-count { margin-top: 8px; font-size: .85rem; color: var(--bp-muted); min-height: 1.4em; }

/* question screen */
.bp .bp-step { display: grid; gap: 16px; margin: 0; }
.bp fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 14px; }
.bp .bp-ask { font-family: var(--display); font-size: 1.35rem; font-weight: 800; line-height: 1.2; color: var(--navy); padding: 0; margin: 0 0 6px; width: 100%; }
.bp .bp-ask:focus { outline: none; }
.bp .bp-intro { font-family: var(--body); color: var(--ink-2); border-left: 3px solid var(--gold); padding-left: 12px; }
.bp[data-track="secure"] .bp-intro { border-left-color: var(--red); }
.bp .bp-help { font-size: .95rem; color: var(--bp-muted); }

/* options */
.bp .bp-options { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) {
  .bp .bp-options:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.bp .bp-opt {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  align-items: start;
  width: 100%;
  min-height: 56px;
  text-align: left;
  font: 1rem/1.35 var(--body);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--bp-edge);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition: background-color .15s, border-color .15s, color .15s;
}
.bp .bp-opt:hover { border-color: var(--navy); }
.bp .bp-opt-label { font: 700 1.02rem/1.25 var(--display); min-width: 0; }
.bp .bp-opt-hint { display: block; margin-top: 2px; font-size: .9rem; color: var(--bp-muted); min-width: 0; }
.bp .bp-opt.is-selected,
.bp .bp-opt.is-checked,
.bp .bp-opt:has(input:checked) { background: var(--navy); color: var(--white); border-color: var(--navy); }
.bp .bp-opt.is-selected .bp-opt-hint,
.bp .bp-opt.is-checked .bp-opt-hint,
.bp .bp-opt:has(input:checked) .bp-opt-hint { color: rgba(255, 255, 255, .75); }

/* multi-choice: checkbox sits left of the text */
.bp .bp-opt:has(input[type="checkbox"]) { grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; }
.bp .bp-opt:has(input[type="checkbox"]) .bp-opt-label { grid-column: 2; grid-row: 1; }
.bp .bp-opt:has(input[type="checkbox"]) .bp-opt-hint { grid-column: 2; grid-row: 2; }
.bp .bp-opt input[type="checkbox"] { grid-column: 1; grid-row: 1 / span 2; width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--gold); cursor: pointer; }

/* fields */
.bp .bp-field { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.bp .bp-field-label { color: var(--ink); }
.bp .bp-input { font: 1rem var(--body); padding: 10px 12px; border: 1px solid var(--bp-edge); border-radius: 8px; background: var(--white); color: var(--ink); width: 100%; }

/* errors and navigation */
.bp .bp-error { color: var(--red-2); font-weight: 600; min-height: 1.4em; margin-top: 8px; }
.bp .bp-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.bp .bp-back { margin-right: auto; }
.bp .bp-back,
.bp .bp-skip,
.bp .bp-edit,
.bp .bp-restart { background: transparent; border: 0; color: var(--navy); font: 700 .95rem var(--display); min-height: 44px; padding: 0 8px; cursor: pointer; }
.bp .bp-back:hover,
.bp .bp-skip:hover,
.bp .bp-edit:hover,
.bp .bp-restart:hover { text-decoration: underline; }

/* summary screen */
.bp .bp-summary { display: grid; gap: 14px; margin: 0; }
.bp .bp-title { font-family: var(--display); font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; line-height: 1.12; color: var(--navy); margin: 0; }
.bp .bp-title:focus { outline: none; }
.bp .bp-badge { justify-self: start; display: inline-block; background: var(--red); color: var(--white); font: 700 .78rem var(--display); text-transform: uppercase; letter-spacing: .1em; padding: 5px 12px; border-radius: 99px; margin: 0; }
.bp .bp-lede { color: var(--ink-2); }
.bp .bp-answers { margin: 0; display: grid; }
.bp .bp-row { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bp .bp-answers dt { font-size: .85rem; color: var(--bp-muted); margin: 0; }
.bp .bp-answers dd { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.bp .bp-edit { margin-left: auto; }

.bp .bp-layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bp .bp-layer { display: grid; gap: 2px; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 8px; padding: 12px 14px; color: var(--ink-2); }
.bp .bp-layer strong { font-family: var(--display); font-size: 1.02rem; color: var(--navy); }

.bp .bp-steps { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; color: var(--ink-2); }
.bp .bp-steps li::marker { color: var(--gold); font-weight: 700; }

.bp .bp-sub, .bp .bp-contact-h { font-size: 1rem; color: var(--navy); margin-top: 4px; }
.bp .bp-contact { display: grid; gap: 14px; margin: 0; padding-top: 18px; border-top: 1px solid var(--line); }
.bp .bp-consent { font-size: .85rem; color: var(--bp-muted); }
.bp .bp-before { font-size: .95rem; color: var(--ink-2); }
.bp .bp-field-hint { font-weight: 400; font-size: .85rem; color: var(--bp-muted); }
.bp .form-msg { display: grid; gap: 6px; }
.bp .bp-sent { color: var(--navy); font-weight: 700; border-left: 3px solid var(--gold); padding-left: 12px; }
.bp .send button:disabled { opacity: .6; cursor: progress; }
.bp .bp-copy { background: var(--white); border: 1px solid var(--navy); color: var(--navy); border-radius: 8px; font: 700 .9rem var(--display); min-height: 44px; padding: 0 14px; cursor: pointer; margin-top: 4px; }

/* honeypot: off-screen, not display:none, so bots still fill it */
.bp .bp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.bp .bp-restart { display: block; margin: 32px auto 0; font-weight: 600; color: var(--bp-muted); }
.bp .bp-restart.is-armed { color: var(--red-2); }
.bp .bp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* entry animation */
.bp .bp-enter { opacity: 0; transform: translateY(8px); pointer-events: none; }
.bp .bp-step,
.bp .bp-summary { transition: opacity .25s, transform .25s; }

/* small screens: primary action first, full width; back and skip on one line below */
@media (max-width: 480px) {
  .bp .bp-nav { flex-wrap: wrap; }
  .bp .bp-next { order: -1; width: 100%; }
}

/* reduced motion: no transitions, no transforms */
@media (prefers-reduced-motion: reduce) {
  .bp .bp-progress-bar,
  .bp .bp-opt,
  .bp .bp-step,
  .bp .bp-summary,
  .bp .bp-enter { transition: none; transform: none; }
}

/* focus, for every interactive element */
.bp button:focus-visible,
.bp input:focus-visible,
.bp textarea:focus-visible,
.bp a:focus-visible,
.bp .bp-opt:has(input:focus-visible) { outline: 3px solid var(--navy); outline-offset: 2px; }

/* keep hidden elements hidden even when a rule sets display (must stay last) */
.bp [hidden] { display: none; }
