/* =========================================================================
   views/onboarding-form.css — a custom-build client's own onboarding form (shared/lib/onboardingForm).
     ofv-  the form as the client fills it in (features/onboarding/onboardingFormView): one page of titled
           sections, the Pro Seal questionnaire's reading order in the app's parts. On the first-login screen
           (onboardingFormFlow) it sits in a card on the welcome flow's canvas (.onb-scrim, onboarding.css); in the
           builder it's the live preview.
     ofb-  the agency's form builder (features/onboarding/formBuilder): the questions to edit on the left, the page
           as they'll see it on the right.
   Linked in both shells (the portal fills it in, the admin builds and previews it), after sites.css: the files
   question is the shared photo drop zone (.sb-drop) and the chips are .sb-chip.
   ========================================================================= */

/* ---- the page ---------------------------------------------------------------------------------------------------- */
/* the card is as long as its form: it starts under the lockup's band and the canvas scrolls (the welcome flow's
   card centres instead) */
.ofv-scrim { justify-content: flex-start; }
.ofv-card {
  width: min(760px, 100%); flex: 0 0 auto; margin: 0 auto var(--space-10);
  padding: var(--space-10) var(--space-12);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-2xl); box-shadow: var(--shadow-lg);
  animation: ofvIn 420ms var(--ease-enter);
}
@keyframes ofvIn { from { opacity: 0; transform: translateY(8px); } }
.ofv-later { position: fixed; top: calc(var(--space-10) + var(--safe-top)); right: var(--space-6); z-index: 1; }
.ofv-later[hidden] { display: none; }   /* (the .btn flex display beats the UA [hidden] rule) */

.ofv-head { margin-bottom: var(--space-2); }
.ofv-title { margin: 0 0 var(--space-2); font-size: var(--text-2xl); line-height: var(--leading-tight); letter-spacing: -.02em; font-weight: var(--fw-semibold); color: var(--text-strong); }
.ofv-intro { margin: 0 0 var(--space-2); color: var(--text-muted); line-height: var(--leading-relaxed); white-space: pre-line; }
.ofv-soft { color: var(--text-soft); font-size: var(--text-sm); }

/* a section: a hairline above, its title and the line under it, then its questions in two columns (a half-width
   question takes one, everything else both) */
.ofv-sec { padding-top: var(--space-8); margin-top: var(--space-8); border-top: 1px solid var(--border-faint); }
.ofv-sec-title { margin: 0 0 var(--space-1); font-size: var(--text-lg); line-height: var(--leading-snug); font-weight: var(--fw-semibold); color: var(--text-strong); }
.ofv-sec-sub b { font-weight: var(--fw-semibold); color: var(--text); }
.ofv-sec-sub { margin: 0; color: var(--text-soft); font-size: var(--text-sm); line-height: var(--leading-snug); }
.ofv-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-4); margin-top: var(--space-5); }
.ofv-q { grid-column: 1 / -1; display: flex; flex-direction: column; gap: var(--space-1-5); min-width: 0; }
.ofv-q.is-half { grid-column: auto; }
.ofv-label, .ofv-sublabel { display: flex; flex-direction: column; gap: 2px; font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.ofv-label { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); }
.ofv-need { font-size: var(--text-xs); font-weight: var(--fw-regular); color: var(--text-soft); }
.ofv-hint { display: block; margin-top: -2px; font-size: var(--text-xs); font-weight: var(--fw-regular); line-height: var(--leading-snug); color: var(--text-soft); }
.ofv-sublabel { margin-top: var(--space-2); }
.ofv-q .field-msg { margin-top: 0; }

/* a box that grows with what's typed (the height is set as they type) */
.ofv textarea.ofv-grow { resize: vertical; overflow: hidden; padding-left: 10px; padding-right: 10px; }   /* (the one-line .input's inset, so the words line up; the corner handle drags a paragraph box taller) */
.ofv textarea.ofv-line { resize: none; }   /* (one-line boxes: no handle) */
.ofv textarea.ofv-line { min-height: 0; height: var(--control-md); line-height: var(--leading-snug); padding-top: 8px; padding-bottom: 8px; }

/* cards they add one at a time (services): the number beside the name, the description the card's width, the tick
   and Remove under it; a thick left edge that turns ink once the card is ticked (Hugo's pick from the questionnaire,
   30 Oct 2026; ink, not the accent: §1c) */
.ofv-cards { display: flex; flex-direction: column; gap: var(--space-3-5); }
.ofv-entry { display: flex; flex-direction: column; gap: var(--space-2-5); padding: var(--space-4); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 4px; background: var(--surface); transition: border-color var(--dur) var(--ease); }
/* squarer, as the questionnaire has them: every box on the form, the cards, the drop zone and the Add buttons */
.ofv .input, .ofv .sb-drop, .ofv-prov-menu { border-radius: 4px; }
.ofv .ofv-add { height: 40px; padding: 0 var(--space-4); border: 1px solid var(--text-strong); border-radius: 4px; box-shadow: none; font-weight: var(--fw-semibold); color: var(--text-strong); }
.ofv-entry.is-flag { border-left-color: var(--text-strong); }
.ofv-entry-top { display: flex; align-items: center; gap: var(--space-3); }
.ofv-entry-n { flex: none; min-width: 18px; font-size: var(--text-xs); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; color: var(--text-muted); }
.ofv-entry-title { flex: 1; min-width: 0; font-weight: var(--fw-semibold); }
.ofv-entry > textarea { min-height: 96px; }
.ofv-entry-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.ofv-flag { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--text); cursor: pointer; }
/* Remove: a quiet underlined word, not a button that competes with the card */
.ofv-rm { padding: var(--space-1); border: 0; background: none; font: inherit; font-size: var(--text-sm); color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; border-radius: var(--radius-sm); }
@media (hover: hover) and (pointer: fine) { .ofv-rm:hover { color: var(--text-strong); } }
/* pairs (values): two boxes side by side on each row, no card and no number */
.ofv-cards--pairs { gap: var(--space-2-5); }
.ofv-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.ofv-add { align-self: flex-start; margin-top: var(--space-1); }
.ofv-q.is-invalid .ofv-entry:first-child, .ofv-q.is-invalid .ofv-pair:first-child .input { border-color: var(--danger-300); }

.ofv-chips { gap: var(--space-2); }
.ofv-q.is-invalid .ofv-chips .sb-chip:not(.is-on) { box-shadow: inset 0 0 0 1px var(--danger-300); }

/* files: the shared drop zone, the list under it (a spinner while each uploads) */
.ofv-drop { min-height: 104px; }
.ofv-q.is-invalid .ofv-drop { border-color: var(--danger-300); }
.ofv-files { list-style: none; margin: 0; padding: 0; }
.ofv-files:empty { display: none; }
.ofv-file { display: flex; align-items: center; gap: var(--space-2-5); min-height: 40px; padding: var(--space-1) 0; border-bottom: 1px solid var(--border-faint); font-size: var(--text-sm); }
.ofv-file-ic { flex: none; display: inline-flex; color: var(--success-600); }
.ofv-file.is-err .ofv-file-ic { color: var(--danger-600); }
.ofv-file-ic svg { width: 16px; height: 16px; }
.ofv-file-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.ofv-file-s { flex: none; font-size: var(--text-xs); color: var(--text-soft); font-variant-numeric: tabular-nums; }
.ofv-file .spinner { flex: none; width: 16px; height: 16px; }

/* a domain login: who it's with (a list with each provider's logo), the username and the password side by side */
.ofv-login { display: flex; flex-direction: column; gap: var(--space-4); }
.ofv-login-field { display: flex; flex-direction: column; gap: var(--space-1-5); min-width: 0; }
.ofv-login-field .ofv-sublabel { margin-top: 0; }
.ofv-login-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.ofv-prov { position: relative; }
.ofv-prov-btn { display: flex; align-items: center; gap: var(--space-2-5); text-align: left; cursor: pointer; }
.ofv-prov-btn > span:not(.ofv-prov-logo):not(.ofv-prov-caret) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ofv-prov-none { color: var(--text-placeholder); }
.ofv-prov-caret { flex: none; display: inline-flex; color: var(--text-soft); }
.ofv-prov-caret svg { width: 16px; height: 16px; }
.ofv-prov-menu {
  position: absolute; top: calc(100% + var(--space-1)); left: 0; right: 0; z-index: calc(var(--z-sticky) + 1);
  display: flex; flex-direction: column; max-height: 320px; overflow: auto; padding: var(--space-1);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop);
}
.ofv-prov-menu[hidden] { display: none; }
.ofv-prov-opt { display: flex; align-items: center; gap: var(--space-2-5); min-height: var(--control-md); padding: 0 var(--space-2-5); border: 0; border-radius: var(--radius-md); background: none; font: inherit; font-size: var(--text-sm); color: var(--text); text-align: left; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ofv-prov-opt:hover { background: var(--nav-hover-bg); } }
.ofv-prov-opt:focus-visible { outline: none; background: var(--nav-hover-bg); box-shadow: inset var(--ring-primary); }
.ofv-prov-opt[aria-checked="true"] { background: var(--surface-selected); font-weight: var(--fw-medium); }
.ofv-prov-opt:last-child { margin-top: var(--space-1); border-top: 1px solid var(--border-faint); border-radius: 0 0 var(--radius-md) var(--radius-md); }
/* the logo tile: the provider's own icon, or its initials when that doesn't load */
.ofv-prov-logo { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-faint); overflow: hidden; }
.ofv-prov-logo img { width: 18px; height: 18px; display: block; }
.ofv-prov-logo.is-initials::before { content: attr(data-initials); font-size: 9px; font-weight: var(--fw-semibold); color: var(--text-muted); }
.ofv-prov-logo.is-other { color: var(--text-soft); background: var(--surface-sunk); }
.ofv-prov-logo.is-other svg { width: 14px; height: 14px; }
.ofv-pw { position: relative; display: block; }
.ofv-pw > .input { padding-right: 64px; }
.ofv-pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); }
.ofv-secure { display: flex; align-items: flex-start; gap: var(--space-1-5); margin: 0; font-size: var(--text-xs); line-height: var(--leading-snug); color: var(--text-soft); }
.ofv-secure svg { flex: none; width: 13px; height: 13px; margin-top: 1px; }

/* pages: the progress over the page, Back and Next under it */
.ofv-steps { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-2); }
.ofv-steps-bar { height: 4px; border-radius: var(--radius-full); background: var(--gray-100); overflow: hidden; }
.ofv-steps-bar i { display: block; height: 100%; border-radius: inherit; background: var(--text-strong); transition: width var(--dur-slow) var(--ease); }
.ofv-steps-text { margin: 0; font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--text-soft); }
.ofv.is-paged .ofv-sec { border-top: 0; margin-top: var(--space-2); padding-top: var(--space-4); }
.ofv.is-paged .ofv-head:not([hidden]) + .ofv-steps { margin-top: var(--space-6); }
.ofv-sec[hidden], .ofv-head[hidden], .ofv-foot [hidden] { display: none; }
/* Back on the left, then the saved line, Next / Send on the right */
.ofv.is-paged .ofv-back { order: -2; }
.ofv.is-paged .ofv-saved { order: -1; margin-right: auto; }
@media (prefers-reduced-motion: reduce) { .ofv-steps-bar i { transition: none; } }

.ofv-foot { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3) var(--space-4); margin-top: var(--space-10); padding-top: var(--space-8); border-top: 1px solid var(--border-faint); }
.ofv-send { min-width: 180px; height: var(--control-lg); }
.ofv-saved { font-size: var(--text-xs); color: var(--text-soft); }

/* sent */
.ofv-done { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); outline: none; }
.ofv-done-ic { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: var(--space-3); border-radius: var(--radius-full); background: var(--success-bg); color: var(--success-600); }
.ofv-done-ic svg { width: 22px; height: 22px; stroke-width: 2.4; }
.ofv-done .btn { margin-top: var(--space-4); }
/* the last question on "Thanks, we've got it": light or dark (the welcome flow's own cards, onboarding.css .onb-themes) */
.ofv-theme { align-self: stretch; margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--border-faint); }
.ofv-theme-q { margin: 0 0 var(--space-3); font-size: var(--text-md); font-weight: var(--fw-semibold); color: var(--text-strong); }
/* Client View: the form as they'll see it, saving nothing (onboardingFormFlow viewOnly) */
.ofv-viewonly { position: fixed; bottom: calc(var(--space-6) + var(--safe-bottom)); left: 50%; transform: translateX(-50%); z-index: 1; display: inline-flex; align-items: center; gap: var(--space-1-5); margin: 0; padding: var(--space-1-5) var(--space-3); border-radius: var(--radius-full); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-size: var(--text-xs); color: var(--text-muted); }
.ofv-viewonly svg { width: 14px; height: 14px; flex: none; }

/* phones: the welcome flow's (onboarding.css ≤720) edge-to-edge screen with no lockup, Finish later at the top of the
   page (it scrolls away with it) */
@media (max-width: 720px) {
  .ofv-card { width: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; padding: calc(var(--space-12) + var(--safe-top)) max(var(--space-5), var(--safe-right)) calc(var(--space-8) + var(--safe-bottom)) max(var(--space-5), var(--safe-left)); }
  .ofv-later { position: absolute; top: calc(var(--space-2) + var(--safe-top)); right: max(var(--space-2), var(--safe-right)); }
}
@media (max-width: 640px) {
  .ofv-items { grid-template-columns: minmax(0, 1fr); }
  .ofv-q.is-half { grid-column: 1 / -1; }
  .ofv-title { font-size: var(--text-xl); }
  .ofv-pair { grid-template-columns: minmax(0, 1fr); gap: var(--space-1-5); }
  .ofv-login-row { grid-template-columns: minmax(0, 1fr); }
  .ofv-cards--pairs { gap: var(--space-4); }
  .ofv-send { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .ofv-card { animation: none; } }

/* ---- the builder ------------------------------------------------------------------------------------------------- */
body.ofb-open .note-menu { z-index: calc(var(--z-modal) + 4); }
.ofb-title { display: inline-flex; align-items: center; gap: var(--space-2); }
.ofb-title svg { width: 18px; height: 18px; }
.ofb-title-sub { font-weight: var(--fw-regular); color: var(--text-soft); }
.ofb { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(360px, 34%) minmax(0, 1fr); }   /* the editor narrower, the page they'll see wider */
.ofb-edit { min-height: 0; overflow: auto; padding: var(--space-5) var(--space-6) var(--space-10); display: flex; flex-direction: column; gap: var(--space-4); }
.ofb-preview { min-height: 0; overflow: auto; padding: var(--space-5) var(--space-6) var(--space-10); background: var(--surface-sunk); border-left: 1px solid var(--border-faint); }
.ofb-preview-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.ofb-preview-bar .ofb-preview-label { margin: 0; }
/* the one-scroll preview: each page a card of its own (the client gets them one at a time), with its page number */
.ofb-preview-card:has(> .ofv.is-all) { padding: 0; background: none; border: 0; box-shadow: none; }
.ofv.is-all .ofv-head, .ofv.is-all .ofv-sec, .ofv.is-all .ofv-foot { padding: var(--space-8); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-2xl); box-shadow: var(--shadow-sm); }
.ofv.is-all .ofv-sec { margin-top: var(--space-4); }
.ofv.is-all .ofv-head { margin-bottom: 0; }
.ofv.is-all .ofv-foot { margin-top: var(--space-4); }
.ofv-page-tag { margin: 0 0 var(--space-2); font-size: var(--text-2xs); font-weight: var(--fw-medium); color: var(--text-soft); }
.ofb-preview-label { margin: 0 0 var(--space-3); font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--text-soft); }
.ofb-preview-card { margin: 0 auto; padding: var(--space-8); animation: none; box-shadow: var(--shadow-sm); }

.ofb-bar { display: flex; align-items: center; gap: var(--space-3); }
.ofb-head { display: flex; flex-direction: column; gap: var(--space-3); }
.ofb-mini { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--text-soft); }
.ofb-mini > .input { font-weight: var(--fw-regular); color: var(--text); }
.ofb-mini--inline { flex-direction: row; align-items: center; gap: var(--space-2); }
.ofb-mini--inline > .input { width: auto; }

.ofb-secs { display: flex; flex-direction: column; gap: var(--space-4); }
.ofb-sec { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) var(--space-3) var(--space-3-5); border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); }
.ofb-sec-head { display: flex; align-items: center; gap: var(--space-2); }
.ofb-bar-left { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; }
/* a collapsed section: one line (its name, how many questions), the whole line opens it */
.ofb-sec.is-collapsed { padding: var(--space-1) var(--space-2); }
.ofb-sec-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-2); min-height: var(--control-md); padding: 0 var(--space-1-5); border: 0; border-radius: var(--radius-md); background: none; font: inherit; text-align: left; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ofb-sec-toggle:hover { background: var(--nav-hover-bg); } }
.ofb-sec-chev { flex: none; display: inline-flex; color: var(--text-soft); }
.ofb-sec-chev svg { width: 16px; height: 16px; }
.ofb-sec-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-md); font-weight: var(--fw-semibold); color: var(--text-strong); }
.ofb-sec-count { flex: none; font-size: var(--text-xs); color: var(--text-soft); }
.ofb-sec-collapse { flex: none; }
.ofb-sec-title { flex: 1; min-width: 0; font-size: var(--text-md); font-weight: var(--fw-semibold); color: var(--text-strong); }
.ofb-sec-sub { font-size: var(--text-sm); color: var(--text-soft); }
.ofb-tool-row { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.ofb-tool-row .icon-ghost:disabled { opacity: .35; cursor: default; }
.ofb-items { display: flex; flex-direction: column; margin-top: var(--space-2); border: 1px solid var(--border-faint); border-radius: var(--radius-lg); overflow: hidden; }
.ofb-none { margin: 0; padding: var(--space-3); font-size: var(--text-sm); color: var(--text-soft); }
/* a question: one line (its type, the question, the line under it), Required, and its tools; the gear opens its hint
   and what its type needs */
.ofb-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; padding: var(--space-1-5) var(--space-2); border-top: 1px solid var(--border-faint); }
.ofb-item:first-child { border-top: 0; }
.ofb-item.is-open { align-items: start; background: var(--surface-sunk); }
.ofb-item-ic { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius-md); background: var(--surface-sunk); color: var(--text-soft); }
.ofb-item.is-open .ofb-item-ic { margin-top: 4px; background: var(--surface); }
.ofb-item-ic svg { width: 15px; height: 15px; }
.ofb-item-main { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.ofb-item-label { font-weight: var(--fw-medium); color: var(--text-strong); }
.ofb-item-hint { font-size: var(--text-xs); color: var(--text-soft); }
.ofb-item-sum { padding: 0 12px 2px; font-size: var(--text-xs); line-height: var(--leading-snug); color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ofb-item-tools { display: flex; align-items: center; gap: var(--space-2); }
.ofb-item.is-open .ofb-item-tools { padding-top: 4px; }
.ofb-open.is-on { box-shadow: var(--press-inset-ghost); background: var(--surface-selected); }
/* a section's Remove shows on the line under the pointer or the keyboard (always on touch) */
@media (hover: hover) and (pointer: fine) {
  .ofb-sec-head:not(:hover):not(:focus-within) .ofb-tool-row { opacity: 0; }
}
.ofb-check { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.ofb-set { display: flex; flex-direction: column; gap: var(--space-2); margin: var(--space-1-5) 0 var(--space-1) var(--space-3); }
.ofb-set--row { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.ofb-set--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-3); }
.ofb-mini--wide { grid-column: 1 / -1; }
.ofb-opts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1-5); }
.ofb-opt { display: inline-flex; align-items: center; gap: 2px; }
.ofb-opt > .input { width: 150px; }
.ofb-add { align-self: flex-start; margin-top: var(--space-1-5); }
.ofb-add-sec { align-self: flex-start; }
.ofb-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-1-5); margin-top: var(--space-2); }
.ofb-types > .btn { grid-column: 1 / -1; justify-self: start; }
.ofb-type { display: flex; align-items: center; gap: var(--space-2-5); padding: var(--space-2) var(--space-2-5); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); text-align: left; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ofb-type:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); } }
.ofb-type:active { box-shadow: var(--press-inset); }
.ofb-type-ic { flex: none; display: inline-flex; color: var(--text-soft); }
.ofb-type-ic svg { width: 16px; height: 16px; }
.ofb-type-text { display: flex; flex-direction: column; min-width: 0; }
.ofb-type-text b { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-strong); }
.ofb-type-text small { font-size: var(--text-2xs); color: var(--text-soft); }
/* Add section: the ready-made sections, two to a row, each with how many questions it brings */
.ofb-secpick { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); border: 1px dashed var(--border-strong); border-radius: var(--radius-xl); }
.ofb-secpick-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.ofb-secpick-head b { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.ofb-secpick .ofb-types { margin-top: 0; }
.ofb-type--sec { align-items: flex-start; justify-content: space-between; }
.ofb-type-n { flex: none; font-size: var(--text-2xs); color: var(--text-soft); white-space: nowrap; padding-top: 2px; }
.ofb-in { font-style: normal; font-weight: var(--fw-regular); font-size: var(--text-2xs); color: var(--text-soft); margin-left: var(--space-1); }
.ofb-start { margin: 0; }
.ofb-start .choice-row { text-align: left; }
.ofb-start-label { font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--text-soft); }
.ofb-tpl-row { display: flex; align-items: center; gap: var(--space-1); }
.ofb-tpl-row .choice-row { flex: 1; min-width: 0; }
.ofb-tpl-modal { display: flex; flex-direction: column; gap: var(--space-2); }

.ofb-foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); width: 100%; }
.ofb-foot-sum { margin-right: auto; font-size: var(--text-xs); color: var(--text-soft); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .ofb { grid-template-columns: minmax(0, 1fr); overflow: auto; }
  .ofb-edit, .ofb-preview { overflow: visible; }
  .ofb-preview { border-left: 0; border-top: 1px solid var(--border-faint); }
}
@media (max-width: 640px) {
  .ofb-edit, .ofb-preview { padding: var(--space-4) var(--space-3) var(--space-8); }
  .ofb-preview-card { padding: var(--space-5) var(--space-4); }
  .ofb-types, .ofb-set--grid { grid-template-columns: minmax(0, 1fr); }
  .ofb-foot-sum { display: none; }
}

/* the client record's setup card: a domain login's password once Show password is pressed (clientSetup) */
.setup-row .setup-secret { padding: 1px var(--space-1-5); border-radius: var(--radius-sm); background: var(--surface-sunk); font-family: ui-monospace, Menlo, monospace; font-size: var(--text-xs); color: var(--text-strong); user-select: all; }

/* the preview's section flashes the logo gold when it's opened on the left, then fades back (Hugo, 31 Oct 2026) */
@keyframes ofbFlash { 0%, 25% { background-color: var(--brand-gold-soft); box-shadow: 0 0 0 2px var(--brand-gold); } 100% { background-color: var(--surface); box-shadow: 0 0 0 0 transparent; } }
.ofv-sec.is-flash { animation: ofbFlash 1.4s var(--ease) both; }
.ofv:not(.is-all) .ofv-sec.is-flash { border-radius: var(--radius-lg); }
@media (prefers-reduced-motion: reduce) { .ofv-sec.is-flash { animation-duration: 0.8s; } }
/* a closed section's Remove sits after its count (its place kept while hidden, so nothing moves or overlaps) */
@media (hover: hover) and (pointer: fine) {
  .ofb-sec.is-collapsed:not(:hover):not(:focus-within) .ofb-tool-row { visibility: hidden; }
}

/* ---- drag to reorder (31 Oct 2026): a handle on every section and question, always showing ---- */
.ofb-drag { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 28px; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-placeholder); cursor: grab; touch-action: none; }
.ofb-drag svg { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) { .ofb-drag:hover { color: var(--text-muted); background: var(--nav-hover-bg); } }
.ofb-drag:focus-visible { color: var(--text-muted); }
.ofb-item { grid-template-columns: 20px 28px minmax(0, 1fr) auto; }
.ofb-item.is-open > .ofb-drag { margin-top: 4px; }
.is-dragging { position: relative; z-index: 2; box-shadow: var(--shadow-md); background: var(--surface); opacity: .96; cursor: grabbing; }
.is-dragging .ofb-drag { cursor: grabbing; }
.ofb-drop-line { position: absolute; left: 0; right: 0; height: 2px; border-radius: var(--radius-full); background: var(--text-strong); pointer-events: none; z-index: 3; }
.ofb-drop-line[hidden] { display: none; }

/* a closed section: the grey fill on hover covers the whole line (the card itself), the toggle inside stays clear */
.ofb-sec.is-collapsed { padding: var(--space-1) var(--space-2) var(--space-1) var(--space-1-5); transition: background var(--dur-fast) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .ofb-sec.is-collapsed:hover { background: var(--nav-hover-bg); }
  .ofb-sec-toggle:hover { background: none !important; }
}
.ofb-sec-head { gap: var(--space-1-5); }
.ofb-sec.is-open .ofb-sec-head { padding-left: calc(var(--space-1) * -1); }
/* the arrow points down while the section is open (it turns as it opens and closes: formBuilder toggleSection) */
.ofb-sec.is-open .ofb-sec-chev { transform: rotate(90deg); }
.ofb-sec-collapse .ofb-sec-chev { display: inline-flex; }
.ofb-sec-body { display: flex; flex-direction: column; gap: var(--space-1); }

/* a question's Copy and Remove live in its settings (the gear), not over the row */
.ofb-item-acts { display: flex; gap: var(--space-1); margin: var(--space-1-5) 0 0 var(--space-2); }
