/* Codex42 website brief v3 (brief-v3.js): the brief form and its wizard, shared by /brief, /free-mockup-d and the
   Websites page. Load after contact-v2.css; the controls (.field, .seg, .btn, .form-status) come from ui-v4.css.
   Replaces brief-v1.css + brief-wizard-v2.css on those pages (both stay in place for cached pages).
   Versioned filename: after a deploy, copy to brief-v4.css before editing (the CDN caches assets for days). */

/* ---------- the form ---------- */
.bf-form{gap:40px}
.bf-part{border:0;margin:0;padding:0;min-width:0;display:grid;gap:20px}
.bf-h{display:flex;align-items:center;gap:12px;padding:0 0 14px;margin:0 0 10px;width:100%;border-bottom:1px solid var(--c42-line);
  font:600 20px/1.25 var(--c42-display);color:var(--c42-text)}
.bf-h span{display:grid;place-items:center;width:28px;height:28px;flex:0 0 auto;border-radius:50%;
  border:1px solid rgba(67,224,138,.35);font:500 13px/1 var(--c42-mono);color:var(--c42-accent)}
.field legend small{color:var(--c42-faint);font-weight:400}
.seg.bf-chips{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.seg.bf-three{grid-template-columns:repeat(3,minmax(0,1fr))}
.seg.bf-three span{font-size:14px}
.bf-form .field textarea{min-height:110px}
.bf-tip{margin:0;font-size:14.5px;line-height:1.55;color:var(--c42-text-2)}
.bf-tip a{color:var(--c42-text)}
.bf-talk{margin:32px 0 0}
html:not(.js) .bf-js-only{display:none}
@media (max-width:640px){
  .seg.bf-chips{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ---------- the wizard: one step per screen, progress bar, Back / Next ---------- */
.bf-form [hidden]{display:none!important}
.bf-form.is-wizard{gap:16px}
.bf-form.is-wizard .bf-part{gap:14px}
.bf-form.is-wizard .cx-row{gap:14px 20px}
.bf-form.is-wizard .bf-h{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}
.bf-form.is-wizard .field textarea{min-height:96px}
.bf-form.is-wizard [aria-invalid="true"]{border-color:#ff9b8a!important;box-shadow:0 0 0 3px rgba(255,155,138,.18)}
.bw-bar{margin:0 0 6px}
.bw-count{margin:0 0 10px;font:500 12.5px/1.3 var(--c42-mono,monospace);letter-spacing:.12em;text-transform:uppercase;color:var(--c42-accent,#43e08a)}
.bw-track{height:6px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden}
.bw-fill{display:block;height:100%;width:0;border-radius:inherit;background:var(--c42-accent,#43e08a);transition:width .35s ease}
.bw-nav{display:flex;gap:12px;justify-content:space-between;margin-top:6px}
.bw-nav .btn{min-width:140px;min-height:52px}
.bw-nav .bw-next{margin-left:auto}
.bw-nav.is-first .bw-next{flex:1 1 auto;margin-left:0}
.bw-err{margin:0;color:#ff9b8a;font-size:15px}
.bw-err:empty{display:none}
/* lead mode: "Got it" on step 2, "Skip to the end" under the buttons, the privacy line under the first button */
.bw-got{margin:0;padding:12px 14px;border-radius:12px;background:rgba(67,224,138,.12);border:1px solid rgba(67,224,138,.4);
  color:var(--c42-text);font-size:15px;line-height:1.5}
.bw-got b{color:var(--c42-accent)}
.bw-got:focus{outline:none}
.bw-skipline{margin:-4px 0 0;text-align:right}
.bw-skip{padding:6px 2px;border:0;background:none;cursor:pointer;font:500 14.5px/1.3 var(--c42-sans);color:var(--c42-text-2);
  text-decoration:underline;text-underline-offset:3px}
.bw-skip:hover,.bw-skip:focus-visible{color:var(--c42-accent)}
.bf-form .bw-fine{margin:-4px 0 0}
@media (max-width:759.98px){
  .bw-nav .btn{flex:1 1 0;min-width:0}
  .bf-form.is-wizard .seg{gap:8px}
  .bf-form.is-wizard .seg label span{min-height:42px;padding-top:7px;padding-bottom:7px}
  .bf-form.is-wizard .field textarea{min-height:84px}
  /* phones: tighter rows so the longest step (six links) keeps its buttons clear of the chat button */
  .bf-form.is-wizard .bf-part,.bf-form.is-wizard .cx-row{gap:12px}
  .bf-form.is-wizard .field{gap:6px}
  .bf-form.is-wizard .field input,.bf-form.is-wizard .field select{padding-top:12px;padding-bottom:12px}
  .bw-skipline{text-align:center}
}
@media (prefers-reduced-motion:reduce){.bw-fill{transition:none}}

/* ---------- /brief: the page head, one step and the side panel fit on one screen ---------- */
html.bw-on .phead{padding:calc(var(--c42-nav-h) + clamp(18px,3.2vh,36px)) 0 0}
html.bw-on .phead .eyebrow{margin-bottom:8px}
html.bw-on .phead h1{font-size:clamp(30px,3.1vw,44px);margin-bottom:8px;max-width:none}
html.bw-on .phead .lede{font-size:clamp(15.5px,1.15vw,17px);line-height:1.5;max-width:none}
html.bw-on .phead + .sec{padding-top:clamp(18px,3vh,32px);padding-bottom:clamp(28px,5vh,56px)}
html.bw-on .cx-side .cx-steps{gap:10px}
html.bw-on .cx-side .cx-steps li{font-size:14.5px;line-height:1.5}
html.bw-on .bf-talk{margin-top:20px}
@media (max-width:759.98px){
  html.bw-on .phead{padding-top:calc(var(--c42-nav-h) + 14px)}
  html.bw-on .phead h1{font-size:28px;margin-bottom:6px}
  html.bw-on .phead .lede{font-size:14.5px;line-height:1.45}
  html.bw-on .phead + .sec{padding-top:16px}
}
