/* Question editor and the visitor form share one compact, high-contrast canvas. */
.hf-demo {
  --fd-ink: #101211;
  --fd-muted: #5b605d;
  --fd-border: #dedfdf;
  background: #fff;
  color: #101211;
  box-shadow: none;
}
.hf-demo ::selection { background: var(--color-accent); color: #101211; }
.hf-demo .hf-workbench {
  display: grid;
  grid-template-columns: minmax(0, .9fr) 14px minmax(0, 1.1fr);
  align-items: stretch;
  gap: 7px;
  padding: 16px 14px;
}
.hf-demo .hf-builder {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 17px 14px 13px;
  border-radius: 12px;
  background: #171924;
  color: #fff;
}
.hf-demo .hf-builder-heading { display: flex; align-items: center; gap: 9px; }
.hf-demo .hf-builder-mark { display: grid; place-items: center; flex: none; width: 28px; height: 32px; color: var(--color-accent); }
.hf-demo .hf-builder-mark svg { width: 25px; height: 25px; }
.hf-demo .hf-builder-heading h3 { margin: 0; color: #fff; font-size: 15px; font-weight: 600; line-height: 1.25; letter-spacing: -.025em; }
.hf-demo .hf-builder-heading p { margin: 5px 0 0; color: #c7c9d1; font-size: 10px; line-height: 1.45; }
.hf-demo .hf-required-fields { display: flex; gap: 12px; margin: 14px 0 9px; padding-bottom: 10px; border-bottom: 1px solid #41434d; }
.hf-demo .hf-required-fields > span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; color: #fff; font-size: 10px; }
.hf-demo .hf-required-fields svg { width: 12px; height: 12px; color: var(--color-accent); }
.hf-demo .hf-required-fields small { color: #bfc2cc; font-size: 9px; }
.hf-demo .hf-question-list { display: grid; gap: 0; min-width: 0; margin: 0; padding: 0; border: 0; }
.hf-demo .hf-question-option {
  position: relative;
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) 27px;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 9px 0;
  border-bottom: 1px solid #41434d;
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hf-demo .hf-question-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.hf-demo .hf-question-icon { display: grid; place-items: center; color: #c7c9d1; }
.hf-demo .hf-question-icon svg { width: 17px; height: 17px; }
.hf-demo .hf-question-label { display: grid; gap: 3px; }
.hf-demo .hf-question-label b { color: inherit; font-size: 11px; font-weight: 500; line-height: 1.35; }
.hf-demo .hf-question-label small { color: #bfc2cc; font-size: 9px; line-height: 1.4; }
.hf-demo .hf-switch { display: block; width: 27px; height: 16px; padding: 3px; border-radius: 12px; background: #666a79; transition: background .2s; }
.hf-demo .hf-switch i { display: block; width: 10px; height: 10px; border-radius: 50%; background: #fff; transition: transform .2s; }
.hf-demo .hf-question-option:has(input:checked) .hf-switch { background: var(--color-accent); }
.hf-demo .hf-question-option:has(input:checked) .hf-switch i { transform: translateX(11px); background: #171924; }
.hf-demo .hf-question-option:has(input:checked) .hf-question-icon { color: var(--color-accent); }
.hf-demo .hf-question-option:hover .hf-question-label b { color: var(--color-accent); }
.hf-demo .hf-question-option:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 3px; }
.hf-demo .hf-builder-feedback { display: grid; gap: 4px; margin-top: auto; padding-top: 13px; }
.hf-demo .hf-builder-feedback b { color: var(--color-accent); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.hf-demo .hf-builder-feedback > span { min-height: 27px; color: #c7c9d1; font-size: 10px; line-height: 1.4; }
.hf-demo .hf-transfer { display: grid; place-items: center; color: #535953; }
.hf-demo .hf-transfer svg { width: 14px; height: 14px; }
.hf-demo .hf-preview { min-width: 0; padding: 15px 13px 12px; border: 1px solid #d6d9d6; border-radius: 12px; background: #fff; }
.hf-demo .hf-preview-label { display: flex; align-items: center; gap: 5px; color: #525a54; font-size: 9px; font-weight: 500; line-height: 1.3; }
.hf-demo .hf-preview-label svg { width: 13px; height: 13px; }
.hf-demo .hf-preview-label > span { margin-left: auto; color: #101211; font-size: 10px; font-weight: 600; letter-spacing: -.02em; }
.hf-demo .hf-preview > h3 { margin: 12px 0 15px; color: #101211; font-family: Instrument, Geist, sans-serif; font-size: 17px; font-weight: 600; line-height: 1.2; letter-spacing: -.03em; text-wrap: balance; }
.hf-demo .hf-input-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px 7px; }
.hf-demo .hf-field { display: grid; gap: 4px; min-width: 0; }
.hf-demo .hf-field-wide { grid-column: 1 / -1; }
.hf-demo .hf-field > label { color: #414741; font-size: 10px; font-weight: 500; line-height: 1.3; }
.hf-demo .hf-answer { display: block; width: 100%; min-width: 0; height: 30px; padding: 6px 7px; border: 1px solid #cdd1cd; border-radius: 5px; background: #fff; color: #101211; font-size: 11px; line-height: 1.25; text-overflow: ellipsis; caret-color: #101211; transition: border-color .2s, background .2s; }
.hf-demo .hf-answer::placeholder { color: #5b605d; opacity: 1; }
.hf-demo .hf-answer:focus-visible { outline: 2px solid #101211; outline-offset: 2px; }
.hf-demo .hf-primary-action { display: flex; align-items: center; justify-content: space-between; gap: 7px; width: 100%; min-height: 34px; margin-top: 12px; padding: 8px 9px; border: 0; border-radius: 5px; background: var(--color-accent); color: #101211; font-size: 10px; font-weight: 600; line-height: 1.35; cursor: pointer; transition: background .2s, transform .2s; }
.hf-demo .hf-primary-action svg { width: 13px; height: 13px; flex: none; }
.hf-demo .hf-primary-action:hover { background: #acd82d; }
.hf-demo .hf-primary-action:active { transform: translateY(1px); }
.hf-demo .hf-primary-action:focus-visible { outline: 2px solid #101211; outline-offset: 3px; }
.hf-demo .hf-result { display: flex; align-items: center; gap: 5px; min-height: 29px; margin-top: 9px; padding: 6px 7px; border-radius: 5px; background: #171924; color: #fff; font-size: 10px; line-height: 1.35; visibility: hidden; }
.hf-demo .hf-result-mark { display: grid; place-items: center; flex: none; width: 15px; height: 15px; border-radius: 50%; background: var(--color-accent); color: #101211; }
.hf-demo .hf-result-mark svg { width: 11px; height: 11px; }
.hf-demo[data-phase="4"] .hf-result { visibility: visible; }
.hf-demo[data-hf-active-question="phone"] .hf-field[data-fd-preview-field="phone"] .hf-answer,
.hf-demo[data-hf-active-question="budget"] .hf-field[data-fd-preview-field="budget"] .hf-answer,
.hf-demo[data-hf-active-question="intent"] .hf-field[data-fd-preview-field="intent"] .hf-answer { border-color: #718d24; background: #f2f9df; }
.hf-demo[data-hf-active-question="phone"] .hf-question-option:has([data-fd-form-field="phone"]) .hf-question-label b,
.hf-demo[data-hf-active-question="budget"] .hf-question-option:has([data-fd-form-field="budget"]) .hf-question-label b,
.hf-demo[data-hf-active-question="intent"] .hf-question-option:has([data-fd-form-field="intent"]) .hf-question-label b { color: var(--color-accent); }
.hf-demo .hf-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@container (max-width: 430px) {
  .hf-demo .hf-workbench { grid-template-columns: minmax(0, .82fr) 10px minmax(0, 1.18fr); gap: 4px; padding: 12px 9px; }
  .hf-demo .hf-builder { padding: 13px 10px 10px; border-radius: 9px; }
  .hf-demo .hf-builder-heading { display: block; }
  .hf-demo .hf-builder-mark { width: 23px; height: 23px; margin-bottom: 8px; }
  .hf-demo .hf-builder-mark svg { width: 22px; height: 22px; }
  .hf-demo .hf-builder-heading h3 { font-size: 14px; line-height: 1.3; }
  .hf-demo .hf-builder-heading p { margin-top: 6px; font-size: 10px; }
  .hf-demo .hf-required-fields { gap: 7px; margin: 14px 0 4px; padding-bottom: 10px; }
  .hf-demo .hf-required-fields > span { gap: 2px; font-size: 9px; }
  .hf-demo .hf-required-fields svg { width: 10px; height: 10px; }
  .hf-demo .hf-required-fields small { display: none; }
  .hf-demo .hf-question-option { grid-template-columns: minmax(0, 1fr) 24px; gap: 5px; min-height: 57px; padding-block: 10px; }
  .hf-demo .hf-question-icon, .hf-demo .hf-question-label small { display: none; }
  .hf-demo .hf-question-label b { font-size: 10px; line-height: 1.4; }
  .hf-demo .hf-switch { width: 24px; height: 15px; }
  .hf-demo .hf-switch i { width: 9px; height: 9px; }
  .hf-demo .hf-question-option:has(input:checked) .hf-switch i { transform: translateX(9px); }
  .hf-demo .hf-builder-feedback { padding-top: 12px; gap: 6px; }
  .hf-demo .hf-builder-feedback b { font-size: 10px; }
  .hf-demo .hf-builder-feedback > span { min-height: 42px; font-size: 9px; }
  .hf-demo .hf-transfer svg { width: 10px; height: 10px; }
  .hf-demo .hf-preview { padding: 12px 9px 9px; border-radius: 9px; }
  .hf-demo .hf-preview-label { font-size: 9px; gap: 4px; }
  .hf-demo .hf-preview-label > span { display: none; }
  .hf-demo .hf-preview > h3 { margin: 10px 0 13px; font-size: 15px; line-height: 1.25; }
  .hf-demo .hf-input-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hf-demo .hf-field { gap: 3px; }
  .hf-demo .hf-field > label { font-size: 10px; }
  .hf-demo .hf-answer { height: 29px; padding: 6px; font-size: 11px; }
  .hf-demo .hf-primary-action { gap: 4px; min-height: 36px; margin-top: 10px; padding: 7px; font-size: 10px; }
  .hf-demo .hf-result { min-height: 35px; padding-top: 8px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .hf-demo .hf-switch, .hf-demo .hf-switch i, .hf-demo .hf-answer, .hf-demo .hf-primary-action { transition: none; }
}
/* Final pass: stronger field boundaries and a clear selected operation. */
.hf-demo .hf-answer { border-color: #899486; }
.hf-demo .hf-question-option { transition: background .2s; }
.hf-demo[data-hf-active-question="phone"] .hf-question-option:has([data-fd-form-field="phone"]),
.hf-demo[data-hf-active-question="budget"] .hf-question-option:has([data-fd-form-field="budget"]),
.hf-demo[data-hf-active-question="intent"] .hf-question-option:has([data-fd-form-field="intent"]) { margin-inline: -7px; padding-inline: 7px; border-radius: 6px; background: #2a321e; border-bottom-color: #4b5932; }
@container (max-width: 430px) {
  .hf-demo .hf-preview { min-height: 447px; }
  .hf-demo .hf-question-label b { font-size: 11px; }
  .hf-demo .hf-builder-feedback b { font-size: 11px; }
  .hf-demo .hf-builder-feedback > span { font-size: 10px; }
}
