/* =====================================================================
   Book a demo – /book-a-demo/
   Fields follow the app's AuthField recipe (lib/widgets/auth/auth_field.dart):
   FiPurple.s800 fill, s700 hairline, 13px radius, floating label that turns
   FiYellow.s500, leading icon, 1.5px yellow focus ring. The segmented control
   follows FiSegmentedSelector. Desktop: side panel + card; phone: one column.
   ===================================================================== */

.demo-page { background: var(--fi-purple-950); }

/* No overflow on .bd itself – it would become the sticky side panel's
   scroll container. The glow layer clips its own blobs instead. */
.bd {
  position: relative;
  padding-block: clamp(2rem, 6vw, 4.5rem) clamp(3rem, 8vw, 6rem);
  min-height: calc(100vh - 68px);
}

/* Slow brand glow drifting behind the card */
.bd-glow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.bd-glow::before {
  content: "";
  position: absolute;
  right: -10%; top: -20%;
  width: 70vw; height: 70vw;
  max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, rgba(64, 70, 191, 0.38), rgba(64, 70, 191, 0) 70%);
  filter: blur(10px);
  animation: bd-drift 18s ease-in-out infinite alternate;
}
@keyframes bd-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-8%, 6%) scale(1.08); }
}

.bd-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
}
@media (min-width: 960px) {
  .bd-grid {
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
  }
}

/* ---------- Side panel ---------- */
.bd-side { animation: bd-rise 0.7s var(--ease) both; }
@media (min-width: 960px) { .bd-side { position: sticky; top: 104px; } }

.bd-side__title {
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin-top: 0.75rem;
}
.bd-side__lead {
  color: var(--color-text-secondary);
  margin-top: 1rem;
  max-width: 34ch;
  transition: opacity 0.25s var(--ease);
}
.bd-side__lead.is-swapping { opacity: 0; }

.bd-steps {
  list-style: none;
  padding: 0;
  margin-top: 2.25rem;
  display: none;
}
@media (min-width: 960px) { .bd-steps { display: block; } }

.bd-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-block: 0.7rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color 0.3s var(--ease);
  animation: bd-slide-in 0.45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
/* connector line between dots, fills yellow once that step is done */
.bd-steps li + li::before {
  content: "";
  position: absolute;
  left: 13px; top: -0.85rem;
  width: 2px; height: 1.7rem;
  background: var(--fi-purple-700);
  border-radius: 2px;
}
.bd-steps li + li::after {
  content: "";
  position: absolute;
  left: 13px; top: -0.85rem;
  width: 2px; height: 1.7rem;
  background: var(--color-cta);
  border-radius: 2px;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s var(--ease);
}
.bd-steps li.is-done + li::after,
.bd-steps li.is-done + li.is-current::after { transform: scaleY(1); }

.bd-steps__dot {
  position: relative;
  z-index: 1;
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--fi-purple-700);
  background: var(--fi-purple-900);
  font-size: 0.75rem;
  font-weight: 700;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.bd-steps__dot svg { width: 14px; height: 14px; stroke-width: 2.6; }
.bd-steps li.is-current { color: var(--color-text); }
.bd-steps li.is-current .bd-steps__dot {
  border-color: var(--color-cta);
  color: var(--color-cta);
  animation: bd-pulse 2.2s ease-out infinite;
}
.bd-steps li.is-done { color: var(--color-text-secondary); }
.bd-steps li.is-done .bd-steps__dot {
  background: var(--color-cta);
  border-color: var(--color-cta);
  color: var(--color-cta-on);
}
.bd-steps li.is-done .bd-steps__dot svg { animation: bd-pop 0.35s var(--ease) both; }
.bd-steps li.is-pending { opacity: 0.55; }

@keyframes bd-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(232, 166, 23, 0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(232, 166, 23, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 166, 23, 0); }
}


/* ---------- Card ---------- */
.bd-card {
  position: relative;
  background: var(--fi-purple-900);
  border: 1px solid var(--fi-purple-800);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 4vw, 2.75rem);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.65);
  animation: bd-rise 0.7s var(--ease) 0.08s both;
  max-width: 760px;
}

.bd-card__top { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.75rem; }
.bd-card__count {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.bd-progress {
  height: 4px;
  border-radius: 4px;
  background: var(--fi-purple-800);
  overflow: hidden;
}
.bd-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--color-cta);
  transition: width 0.55s var(--ease);
}

.bd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Steps + transitions ---------- */
.bd-stage {
  position: relative;
  transition: height 0.45s var(--ease);
}
.bd-stage.is-animating { overflow: hidden; }

.bd-step { display: none; }
.bd-step.is-active,
.bd-step.is-leaving { display: block; }
.bd-step.is-leaving {
  position: absolute;
  inset: 0 0 auto 0;
  pointer-events: none;
}
.bd-step.is-leaving.to-left  { animation: bd-out-left 0.28s var(--ease) forwards; }
.bd-step.is-leaving.to-right { animation: bd-out-right 0.28s var(--ease) forwards; }
.bd-step.is-entering > * {
  animation: bd-in-right 0.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms + 90ms);
}
.bd-step.is-entering.from-left > * { animation-name: bd-in-left; }

@keyframes bd-out-left  { to { opacity: 0; transform: translateX(-28px); } }
@keyframes bd-out-right { to { opacity: 0; transform: translateX(28px); } }
@keyframes bd-in-right  { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes bd-in-left   { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: none; } }
@keyframes bd-rise      { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes bd-slide-in  { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes bd-pop       { 0% { transform: scale(0.3); opacity: 0; } 70% { transform: scale(1.2); } 100% { transform: scale(1); opacity: 1; } }

.bd-step__title {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.bd-step__sub {
  margin-top: 0.5rem;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  max-width: 52ch;
}

/* ---------- Start: choice cards ---------- */
.bd-choices { display: grid; gap: 0.9rem; margin-top: 1.75rem; }
@media (min-width: 720px) { .bd-choices { grid-template-columns: 1fr 1fr; } }

.bd-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
  padding: 1.4rem 1.4rem 1.5rem;
  border-radius: 18px;
  background: var(--fi-purple-800);
  border: 1px solid var(--fi-purple-700);
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
}
.bd-choice:hover,
.bd-choice:focus-visible {
  transform: translateY(-4px);
  border-color: var(--color-cta);
}
.bd-choice.is-picked {
  border-color: var(--color-cta);
  animation: bd-press 0.35s var(--ease);
}
@keyframes bd-press { 40% { transform: scale(0.97); } 100% { transform: scale(1); } }

.bd-choice__text { position: relative; display: flex; flex-direction: column; gap: 0.35rem; padding-right: 1.75rem; }
.bd-choice__title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.bd-choice__sub { font-size: 0.875rem; line-height: 1.5; color: var(--color-text-secondary); }
.bd-choice__arrow {
  position: absolute;
  right: 1.2rem; top: 1.5rem;
  width: 20px; height: 20px;
  color: var(--color-cta);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.bd-choice:hover .bd-choice__arrow { opacity: 1; transform: none; }

/* ---------- Fields (app AuthField recipe) ---------- */
.fi-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem 1rem;
  margin-top: 1.6rem;
}
@media (min-width: 640px) {
  .fi-grid { grid-template-columns: 1fr 1fr; }
  .fi-span { grid-column: 1 / -1; }
}

.fi-field { position: relative; display: block; }
.fi-field input,
.fi-field textarea {
  width: 100%;
  height: 56px;
  padding: 22px 16px 7px 48px;
  font: 500 0.95rem/1.3 var(--font-sans);
  color: #fff;
  background: var(--fi-purple-800);
  border: 1px solid var(--fi-purple-700);
  border-radius: 13px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}
.fi-field textarea { height: auto; min-height: 120px; padding-top: 28px; resize: vertical; }
.fi-field input::-webkit-calendar-picker-indicator { opacity: 0; }
.fi-field input[type=number]::-webkit-inner-spin-button,
.fi-field input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.fi-field input[type=number] { -moz-appearance: textfield; }
.fi-field input:hover,
.fi-field textarea:hover { border-color: var(--fi-purple-600); }
.fi-field input:focus,
.fi-field textarea:focus {
  border-color: var(--color-cta);
  box-shadow: 0 0 0 0.5px var(--color-cta), 0 0 0 5px rgba(232, 166, 23, 0.12);
}
.fi-field input:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 100px var(--fi-purple-800) inset;
  caret-color: #fff;
}

.fi-field__icon {
  position: absolute;
  left: 16px; top: 18.5px;
  width: 19px; height: 19px;
  color: var(--fi-neutral-400);
  pointer-events: none;
  transition: color 0.2s var(--ease), transform 0.3s var(--ease);
}
.fi-field:focus-within .fi-field__icon { color: var(--color-cta); transform: scale(1.08); }

.fi-field__label {
  position: absolute;
  left: 48px; right: 14px;
  top: 28px;
  transform: translateY(-50%);
  font-size: 0.875rem;
  color: var(--fi-neutral-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  transform-origin: left center;
  transition: top 0.2s var(--ease), font-size 0.2s var(--ease), color 0.2s var(--ease);
}
.fi-field__label em { font-style: normal; color: var(--fi-neutral-500); }
.fi-field input:focus + .fi-field__label,
.fi-field input:not(:placeholder-shown) + .fi-field__label,
.fi-field textarea:focus + .fi-field__label,
.fi-field textarea:not(:placeholder-shown) + .fi-field__label {
  top: 15px;
  font-size: 0.6875rem;          /* 11px – the app's floating label */
  color: var(--color-cta);
}
/* Long textarea labels wrap instead of being cut off on phones */
.fi-field--area .fi-field__label { top: 19px; transform: none; white-space: normal; line-height: 1.3; }
.fi-field--area textarea:focus + .fi-field__label,
.fi-field--area textarea:not(:placeholder-shown) + .fi-field__label { top: 9px; }
.fi-field input:not(:focus):not(:placeholder-shown) + .fi-field__label,
.fi-field textarea:not(:focus):not(:placeholder-shown) + .fi-field__label { color: var(--fi-neutral-300); }

.fi-hint {
  margin-top: 0.4rem;
  padding-left: 2px;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}
.fi-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 0.55rem;
}

/* Error state – FiRed.s400, as in the app */
.fi-group.has-error .fi-field input,
.fi-group.has-error .fi-field textarea { border-color: #EE4444; }
.fi-group.has-error .fi-field__label,
.fi-group.has-error .fi-field__icon { color: #EE4444 !important; }
.fi-group.has-error .fi-seg { border-color: #EE4444; }
.fi-group.shake { animation: bd-shake 0.4s ease; }
@keyframes bd-shake {
  20% { transform: translateX(-6px); } 40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); } 80% { transform: translateX(2px); }
}
.fi-error {
  margin-top: 0.4rem;
  padding-left: 2px;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #EE4444;
  animation: bd-drop 0.25s var(--ease) both;
}
.fi-group.has-error .fi-hint { display: none; }
@keyframes bd-drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Segmented control (FiSegmentedSelector) ---------- */
.fi-seg {
  position: relative;
  display: flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--fi-purple-900);
  border: 1px solid var(--fi-purple-700);
  transition: border-color 0.2s var(--ease);
}
.fi-seg__pill {
  position: absolute;
  top: 3px; bottom: 3px; left: 0;
  width: 0;
  border-radius: 9px;
  background: var(--color-cta);
  opacity: 0;
  transition: transform 0.35s var(--ease), width 0.35s var(--ease), opacity 0.2s var(--ease);
}
.fi-seg.has-value .fi-seg__pill { opacity: 1; }
.fi-seg label { position: relative; flex: 1; cursor: pointer; }
.fi-seg input { position: absolute; opacity: 0; pointer-events: none; }
.fi-seg span {
  display: block;
  padding: 0.7rem 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: 9px;
  transition: color 0.25s var(--ease);
}
.fi-seg label:hover span { color: var(--color-text); }
.fi-seg input:checked + span { color: var(--color-cta-on); font-weight: 700; }
.fi-seg input:focus-visible + span { outline: 2px solid var(--color-cta); outline-offset: 1px; }

/* ---------- Teams ---------- */
.bd-teams { display: flex; flex-direction: column; margin-top: 0.4rem; }

/* Expand / collapse via grid rows so height animates without measuring */
.bd-team {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.4s var(--ease), opacity 0.3s var(--ease), margin 0.4s var(--ease);
  margin-top: 1.1rem;
}
.bd-team.is-new { grid-template-rows: 0fr; opacity: 0; margin-top: 0; }
.bd-team.is-removing { grid-template-rows: 0fr; opacity: 0; margin-top: 0; }
.bd-team__inner { overflow: hidden; min-height: 0; }
.bd-team__inner > .fi-grid { margin-top: 1rem; padding: 0 1.1rem 1.2rem; }

.bd-team__inner {
  border-radius: 16px;
  border: 1px solid var(--fi-purple-800);
  background: color-mix(in srgb, var(--fi-purple-800) 35%, transparent);
}
.bd-team__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.1rem 0;
}
.bd-team__badge {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--color-cta);
  color: var(--color-cta-on);
  font-size: 0.8rem;
  font-weight: 800;
}
.bd-team__title { font-weight: 700; font-size: 0.95rem; flex: 1; }
.bd-team__remove {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  color: var(--color-text-muted);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.bd-team__remove svg { width: 16px; height: 16px; }
.bd-team__remove:hover { background: rgba(238, 68, 68, 0.14); color: #EE4444; transform: rotate(90deg); }
.bd-team:first-child .bd-team__remove { display: none; }

.bd-add {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  margin-top: 1.1rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1.5px dashed var(--fi-purple-600);
  color: var(--color-cta);
  font-weight: 700;
  font-size: 0.92rem;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), opacity 0.25s var(--ease);
}
.bd-add svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.bd-add:hover { border-color: var(--color-cta); background: rgba(232, 166, 23, 0.06); }
.bd-add:hover svg { transform: rotate(90deg); }
.bd-add__left { margin-left: auto; font-size: 0.75rem; font-weight: 600; color: var(--color-text-muted); }
.bd-add[hidden] { display: none; }

/* ---------- Review ---------- */
.bd-review { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 1.5rem; }
.bd-review__group {
  border-radius: 16px;
  border: 1px solid var(--fi-purple-800);
  background: color-mix(in srgb, var(--fi-purple-800) 35%, transparent);
  padding: 1rem 1.1rem;
}
.bd-review__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.bd-review__title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-cta);
}
.bd-review__edit {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.bd-review__edit:hover { background: var(--fi-purple-800); color: var(--color-text); }
.bd-review dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.35rem 1rem; font-size: 0.875rem; }
@media (min-width: 560px) { .bd-review dl { grid-template-columns: 9.5rem minmax(0, 1fr); } }
.bd-review dt { color: var(--color-text-muted); }
.bd-review dd { margin: 0 0 0.3rem; color: var(--color-text); font-weight: 600; overflow-wrap: anywhere; }
@media (min-width: 560px) { .bd-review dd { margin: 0; } }
.bd-review__sub { grid-column: 1 / -1; margin-top: 0.5rem; font-weight: 700; color: var(--color-text-secondary); }

.bd-who { margin-top: 1.6rem; }

/* Reveal for "Someone else" */
.bd-reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.4s var(--ease), opacity 0.3s var(--ease);
}
.bd-reveal.is-open { grid-template-rows: 1fr; opacity: 1; }
.bd-reveal__inner { overflow: hidden; min-height: 0; padding: 0 6px 6px; margin: 0 -6px -6px; }
.bd-reveal .fi-grid { margin-top: 1rem; }

.bd-privacy {
  margin-top: 1.5rem;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}
.bd-privacy a { color: var(--color-text-secondary); text-decoration: underline; text-underline-offset: 2px; }
.bd-privacy a:hover { color: var(--color-cta); }

/* ---------- Nav ---------- */
.bd-error {
  min-height: 0;
  font-size: 0.85rem;
  color: #EE4444;
  margin-top: 1rem;
}
.bd-error:empty { display: none; }

.bd-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--fi-purple-800);
  transition: opacity 0.3s var(--ease);
}
.bd-nav.is-hidden { display: none; }
.bd-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 0.9rem 0.75rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), opacity 0.2s var(--ease);
}
.bd-back svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.bd-back:hover { color: var(--color-text); background: var(--fi-purple-800); }
.bd-back:hover svg { transform: translateX(-3px); }
.bd-back.is-invisible { opacity: 0; pointer-events: none; }

.bd-next { position: relative; min-width: 9.5rem; padding-inline: 1.5rem; min-height: 48px; }
/* Icons inside flex rows must not shrink (site-wide svg { max-width: 100% }) */
.bd-next__icon, .bd-back svg, .bd-add svg, .bd-team__remove svg { flex: none; max-width: none; }
.bd-next__icon { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.bd-next:hover .bd-next__icon { transform: translateX(3px); }
.bd-spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(32, 23, 3, 0.25);
  border-top-color: var(--color-cta-on);
  opacity: 0;
  animation: bd-spin 0.8s linear infinite;
}
.bd-next.is-busy .bd-next__label,
.bd-next.is-busy .bd-next__icon { opacity: 0; }
.bd-next.is-busy .bd-spinner { opacity: 1; }
.bd-next.is-busy { pointer-events: none; }
@keyframes bd-spin { to { transform: rotate(360deg); } }

/* ---------- Done ---------- */
.bd-done { text-align: center; padding-block: 1.5rem 0.5rem; }
.bd-done .bd-step__sub { margin-inline: auto; }
.bd-done .btn { margin-top: 1.75rem; }
.bd-done__mark {
  position: relative;
  width: 92px; height: 92px;
  margin: 0 auto 1.5rem;
}
.bd-done__mark > svg { width: 100%; height: 100%; overflow: visible; }
.bd-done__ring {
  fill: var(--color-cta);
  fill-opacity: 0;
  stroke: var(--color-cta);
  stroke-width: 2.5;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  transform: rotate(-90deg);
  transform-origin: center;
}
.bd-done__tick {
  fill: none;
  stroke: var(--fi-purple-900);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 34;
  stroke-dashoffset: 34;
}
.bd-done.is-active .bd-done__ring { animation: bd-draw 0.7s var(--ease) 0.15s forwards, bd-fill 0.35s var(--ease) 0.75s forwards; }
.bd-done.is-active .bd-done__tick { animation: bd-draw 0.45s var(--ease) 0.7s forwards; }
@keyframes bd-draw { to { stroke-dashoffset: 0; } }
@keyframes bd-fill { to { fill-opacity: 1; } }

.bd-leaf {
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 20px;
  margin: -10px 0 0 -7px;
  color: var(--color-cta);
  opacity: 0;
}
.bd-leaf svg { width: 100%; height: 100%; fill: currentColor; }
.bd-done.is-active .bd-leaf { animation: bd-burst 1.1s var(--ease) calc(0.75s + var(--d)) both; }
@keyframes bd-burst {
  0%   { opacity: 0; transform: translate(0, 0) rotate(0) scale(0.3); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); }
}

/* ---------- Phone / tablet tweaks ---------- */
@media (max-width: 959px) {
  .bd-side { text-align: left; }
  .bd-side__title { font-size: clamp(1.8rem, 7vw, 2.4rem); }
  .bd-card { margin-inline: auto; width: 100%; }
}
@media (max-width: 480px) {
  .bd-card { border-radius: 20px; }
  .bd-next { min-width: 0; flex: 1; }
  .fi-seg span { font-size: 0.8rem; padding-inline: 0.25rem; }
}

/* ---------- Trial request: role + terms acceptance ---------- */
.bd-role { margin-top: 1rem; }
.bd-accept { margin-top: 1.6rem; }
.fi-check {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
}
.fi-check input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.fi-check__box {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1.5px solid var(--fi-purple-600);
  border-radius: 6px;
  background: var(--fi-purple-800);
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.fi-check__box svg { width: 14px; height: 14px; stroke-width: 2.6; color: var(--color-cta-on); opacity: 0; transform: scale(0.6); transition: opacity 0.15s var(--ease), transform 0.2s var(--ease); }
.fi-check:hover .fi-check__box { border-color: var(--color-cta); }
.fi-check input:checked + .fi-check__box { background: var(--color-cta); border-color: var(--color-cta); }
.fi-check input:checked + .fi-check__box svg { opacity: 1; transform: none; }
.fi-check input:focus-visible + .fi-check__box { outline: 2px solid var(--color-cta); outline-offset: 2px; }
.fi-check__text a { color: var(--color-text); text-decoration: underline; text-underline-offset: 2px; }
.fi-check__text a:hover { color: var(--color-cta); }
.fi-group.has-error .fi-check__box { border-color: #EE4444; }
.bd-accept__note {
  margin-top: 0.5rem;
  padding-left: calc(22px + 0.8rem);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}
.bd-accept .fi-error { padding-left: calc(22px + 0.8rem); }
