/* Identical copy lives in Kobido, Nina and the gateway landing page – change all three. */
.bi-dialog{
  --bi-brand:var(--brand,#2f6f63);
  --bi-brand-dark:var(--brand-dark,#1f4e45);
  --bi-line:var(--line,#dfe6df);
  --bi-muted:var(--muted,#5c645f);
  --bi-ink:var(--ink,#151917);
  --bi-soft:var(--surface-soft,#eef3f0);
  --bi-danger:var(--danger,#b42318);
  --bi-strong:var(--w-strong,700);
  width:min(600px,calc(100% - 32px));
  max-height:min(760px,calc(100dvh - 32px));
  padding:0;
  border:0;
  border-radius:24px;
  background:#fff;
  color:var(--bi-ink);
  box-shadow:0 30px 80px rgba(21,25,23,0.22);
  overflow:hidden;
}
.bi-dialog[open]{display:flex;animation:biIn 0.28s cubic-bezier(.2,.8,.2,1) both}
.bi-dialog::backdrop{background:rgba(18,28,23,0.45);backdrop-filter:blur(4px)}
.bi-dialog [hidden]{display:none !important}
.bi-form{display:flex;flex-direction:column;width:100%;min-height:0}

.bi-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:22px 24px 14px}
.bi-kicker{margin:0 0 4px;color:var(--bi-brand);font-size:0.76rem;font-weight:var(--bi-strong);letter-spacing:0.04em;text-transform:uppercase}
.bi-head h2{margin:0;font-size:1.35rem;font-weight:var(--bi-strong);line-height:1.2}
.bi-close{flex:0 0 auto;width:38px;height:38px;border:1px solid var(--bi-line);border-radius:999px;background:#fff;color:var(--bi-muted);font-size:1.4rem;line-height:1;cursor:pointer;transition:background 0.16s ease,color 0.16s ease}
.bi-close:hover{background:var(--bi-soft);color:var(--bi-ink)}

.bi-progress{height:4px;margin:0 24px;border-radius:999px;background:var(--bi-soft);overflow:hidden}
.bi-progress-bar{display:block;width:33%;height:100%;border-radius:inherit;background:var(--bi-brand);transition:width 0.3s ease}
.bi-step-label{margin:10px 24px 0;color:var(--bi-muted);font-size:0.82rem;font-weight:var(--bi-strong)}

.bi-body{flex:1 1 auto;min-height:0;overflow-y:auto;padding:14px 24px 6px}
.bi-step,.bi-done{display:grid;gap:16px;animation:biStep 0.25s ease both}
.bi-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.bi-field{display:grid;gap:7px;min-width:0;margin:0;padding:0;border:0}
.bi-field label,.bi-field legend{padding:0;font-size:0.84rem;font-weight:var(--bi-strong);color:#3c4340}
.bi-field legend{margin-bottom:8px}
.bi-hint{margin:-4px 0 4px;color:var(--bi-muted);font-size:0.78rem}

.bi-field input[type="text"],
.bi-field input[type="email"],
.bi-field input[type="tel"],
.bi-field select,
.bi-field textarea{
  width:100%;
  min-height:46px;
  padding:11px 12px;
  border:1px solid var(--bi-line);
  border-radius:12px;
  background:#fff;
  color:var(--bi-ink);
  font:inherit;
  font-size:1rem;
  outline:none;
  box-sizing:border-box;
  transition:border-color 0.16s ease,box-shadow 0.16s ease;
}
.bi-field textarea{min-height:84px;resize:vertical;line-height:1.45}
.bi-field input:focus,.bi-field select:focus,.bi-field textarea:focus{border-color:var(--bi-brand);box-shadow:0 0 0 4px rgba(47,111,99,0.16)}
.bi-field [aria-invalid="true"],
.bi-field[aria-invalid="true"] .bi-chip span{border-color:var(--bi-danger)}

.bi-chips{display:flex;flex-wrap:wrap;gap:8px}
.bi-chip{position:relative;cursor:pointer}
.bi-chip input{position:absolute;opacity:0;pointer-events:none}
.bi-chip span{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:8px 14px;
  border:1px solid var(--bi-line);
  border-radius:999px;
  background:#fff;
  color:#3c4340;
  font-size:0.88rem;
  font-weight:var(--bi-strong);
  transition:background 0.16s ease,border-color 0.16s ease,color 0.16s ease,transform 0.16s ease;
}
.bi-chip:hover span{border-color:var(--bi-brand)}
.bi-chip input:checked + span{background:var(--bi-brand);border-color:var(--bi-brand);color:#fff}
.bi-chip input[type="checkbox"]:checked + span::before{content:"\2713";margin-right:6px}
.bi-chip input:focus-visible + span{box-shadow:0 0 0 4px rgba(47,111,99,0.2)}
.bi-soon{margin-left:8px;padding:2px 8px;border-radius:999px;background:#fdf1df;color:#8a5a12;font-size:0.68rem;font-style:normal;letter-spacing:0.03em;text-transform:uppercase;white-space:nowrap}

.bi-consent{display:grid;grid-template-columns:20px 1fr;gap:10px;align-items:start;font-size:0.82rem;line-height:1.5;color:var(--bi-ink);cursor:pointer}
.bi-consent input{width:18px;height:18px;margin:2px 0 0;accent-color:var(--bi-brand);cursor:pointer}
.bi-consent input[aria-invalid="true"]{outline:2px solid var(--bi-danger);outline-offset:2px}
.bi-consent a{color:var(--bi-brand-dark);font-weight:var(--bi-strong)}
.bi-hp{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}

.bi-done{justify-items:center;padding:20px 0 12px;text-align:center;outline:none}
.bi-done h3{margin:0;font-size:1.3rem;font-weight:var(--bi-strong)}
.bi-done p{margin:0;max-width:380px;color:var(--bi-muted);line-height:1.5}
.bi-done-icon{width:72px;height:72px}
.bi-done-icon circle{fill:#2fb37a}
.bi-done-icon path{fill:none;stroke:#fff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:36;stroke-dashoffset:36;animation:biDraw 0.4s ease-out 0.2s forwards}

.bi-error{margin:8px 24px 0;padding:10px 12px;border-radius:12px;background:#fdecea;color:var(--bi-danger);font-size:0.86rem;font-weight:var(--bi-strong);line-height:1.4}
.bi-actions{display:flex;gap:10px;padding:16px 24px 22px;border-top:1px solid var(--bi-line);margin-top:12px}
.bi-back,.bi-next{min-height:50px;border-radius:12px;font:inherit;font-size:0.98rem;font-weight:var(--bi-strong);cursor:pointer;transition:background 0.16s ease,border-color 0.16s ease,transform 0.16s ease}
.bi-back{flex:0 0 auto;padding:0 18px;border:1px solid var(--bi-line);background:#fff;color:var(--bi-ink)}
.bi-back:hover{background:var(--bi-soft)}
.bi-next{flex:1 1 auto;border:0;background:var(--bi-brand);color:#fff}
.bi-next:hover:not(:disabled){background:var(--bi-brand-dark);transform:translateY(-1px)}
.bi-next:disabled{opacity:0.6;cursor:wait}

@keyframes biIn{from{opacity:0;transform:translateY(16px) scale(0.98)}to{opacity:1;transform:none}}
@keyframes biStep{from{opacity:0;transform:translateX(10px)}to{opacity:1;transform:none}}
@keyframes biDraw{to{stroke-dashoffset:0}}

@media (max-width:560px){
  .bi-dialog{width:100%;max-width:100%;max-height:92dvh;margin:auto 0 0;border-radius:22px 22px 0 0}
  .bi-head{padding:18px 18px 12px}
  .bi-progress{margin:0 18px}
  .bi-step-label,.bi-error{margin-left:18px;margin-right:18px}
  .bi-body{padding:12px 18px 6px}
  .bi-grid{grid-template-columns:1fr}
  .bi-actions{padding:14px 18px calc(16px + env(safe-area-inset-bottom))}
}
@media (prefers-reduced-motion:reduce){
  .bi-dialog[open],.bi-step,.bi-done{animation:none}
}
