/* BUILDER — v3 Stripe DNA */
.builder-body { background: var(--bg-soft); min-height: 100vh; }

.bd-nav { background: white; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.bd-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.builder-progress { display: flex; align-items: center; gap: 0.5rem; flex: 1; justify-content: center; flex-wrap: nowrap; }
.step {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.step-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}
.step-label { letter-spacing: -0.01em; }

/* Current step — purple */
.step.current {
  color: var(--purple);
  background: rgba(99, 91, 255, 0.08);
  border-color: rgba(99, 91, 255, 0.18);
}
.step.current .step-icon {
  background: var(--purple);
  border-color: var(--purple);
  color: white;
  box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.12);
}

/* Completed step — green */
.step.done {
  color: var(--ink);
}
.step.done .step-icon {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.step.done .step-icon svg {
  /* Replace the inline icon with a checkmark on completed steps */
  display: none;
}
.step.done .step-icon::before {
  content: '';
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}

.step-line {
  flex: 0 0 18px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  transition: background 0.3s ease;
}
/* Line lights up when previous step is done */
.step.done + .step-line { background: var(--green); }

/* Legacy class still in JS — alias to new icon */
.step-num { display: none; }

@media (max-width: 1200px) {
  .step-label { display: none; }
  .step { padding: 0.5rem; gap: 0; }
  .builder-progress { gap: 0.25rem; }
  .step-line { flex: 0 0 12px; }
}

.bd-main { padding: 3.5rem 1.5rem 5rem; min-height: calc(100vh - 73px); }
.bd-step { display: none; animation: bdFade 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.bd-step.bd-step-active { display: block; }
@keyframes bdFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.bd-container { max-width: 720px; margin: 0 auto; }
.bd-container-wide { max-width: 1200px; margin: 0 auto; }

.bd-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  margin: 1rem 0;
}
.bd-sub {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 2.5rem;
  max-width: 52em;
}
.bd-actions { display: flex; gap: 0.625rem; align-items: center; margin-top: 2rem; }

.bd-industries { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.bd-industry {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  font-family: inherit;
  box-shadow: var(--shadow-xs);
}
.bd-industry:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.bd-industry.selected {
  border-color: var(--purple);
  background: var(--purple-soft);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}
.bd-industry.selected .bd-ind-check { opacity: 1; }
.bd-ind-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-2);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.bd-ind-meta { flex: 1; }
.bd-ind-meta strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 0.15rem;
}
.bd-ind-meta span { color: var(--ink-muted); font-size: 12.5px; }
.bd-ind-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--purple);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.bd-aria-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-5);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.bd-aria-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--blue), var(--green));
}
.bd-aria-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 1.25rem;
}
.bd-aria-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.bd-aria-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
  animation: pulseDot 2s ease-out infinite;
}
.bd-aria-time { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.bd-aria-row { display: flex; align-items: flex-start; gap: 0.875rem; margin-bottom: 1rem; }
.bd-aria-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.bd-aria-text {
  flex: 1;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  padding-top: 0.5rem;
}
.bd-aria-wave {
  display: flex;
  gap: 3px;
  align-items: center;
  height: 36px;
  padding: 0.875rem 0.5rem 0;
  border-top: 1px solid var(--border-soft);
}
.bd-aria-wave span {
  width: 3px;
  background: var(--purple);
  border-radius: 1.5px;
  height: 30%;
  opacity: 0.3;
}
.bd-aria-wave.active span { opacity: 1; animation: bdWave 1s ease-in-out infinite; }
.bd-aria-wave span:nth-child(1)  { animation-delay: 0.0s; }
.bd-aria-wave span:nth-child(2)  { animation-delay: 0.05s; }
.bd-aria-wave span:nth-child(3)  { animation-delay: 0.1s; }
.bd-aria-wave span:nth-child(4)  { animation-delay: 0.15s; }
.bd-aria-wave span:nth-child(5)  { animation-delay: 0.2s; }
.bd-aria-wave span:nth-child(6)  { animation-delay: 0.25s; }
.bd-aria-wave span:nth-child(7)  { animation-delay: 0.3s; }
.bd-aria-wave span:nth-child(8)  { animation-delay: 0.35s; }
.bd-aria-wave span:nth-child(9)  { animation-delay: 0.4s; }
.bd-aria-wave span:nth-child(10) { animation-delay: 0.45s; }
.bd-aria-wave span:nth-child(11) { animation-delay: 0.5s; }
.bd-aria-wave span:nth-child(12) { animation-delay: 0.55s; }
.bd-aria-wave span:nth-child(13) { animation-delay: 0.6s; }
.bd-aria-wave span:nth-child(14) { animation-delay: 0.65s; }
.bd-aria-wave span:nth-child(15) { animation-delay: 0.7s; }
.bd-aria-wave span:nth-child(16) { animation-delay: 0.75s; }
.bd-aria-wave span:nth-child(17) { animation-delay: 0.8s; }
.bd-aria-wave span:nth-child(18) { animation-delay: 0.85s; }
.bd-aria-wave span:nth-child(19) { animation-delay: 0.9s; }
.bd-aria-wave span:nth-child(20) { animation-delay: 0.95s; }
@keyframes bdWave {
  0%, 100% { height: 25%; }
  50% { height: 90%; }
}

.bd-transcript {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-5);
  padding: 1.25rem;
  height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}
.bd-bubble {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-3);
  max-width: 85%;
  animation: bdFade 0.4s ease;
}
.bd-bubble-aria { align-self: flex-start; background: var(--purple-soft); border: 1px solid rgba(99, 91, 255, 0.2); }
.bd-bubble-user { align-self: flex-end; background: var(--bg-soft); border: 1px solid var(--border-soft); }
.bd-bubble-from {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.bd-bubble-aria .bd-bubble-from { color: var(--purple); }
.bd-bubble-text { color: var(--ink); font-size: 14px; line-height: 1.5; }

.bd-photo { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.bd-upload {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  background: white;
  border: 2px dashed var(--border);
  border-radius: var(--r-5);
  cursor: pointer;
  transition: all 0.2s ease;
}
.bd-upload:hover { border-color: var(--purple); background: var(--purple-soft); }
.bd-upload-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-3);
  background: var(--purple-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  flex-shrink: 0;
}
.bd-upload-title { color: var(--ink); font-size: 1rem; font-weight: 600; }
.bd-upload-sub { color: var(--ink-muted); font-size: 13px; margin-top: 0.15rem; }

.bd-photo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-5);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.bd-photo-side { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.bd-photo-side img,
.bd-photo-loading {
  width: 180px;
  height: 180px;
  border-radius: var(--r-3);
  object-fit: cover;
}
.bd-photo-loading {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--ink-muted);
  font-size: 13px;
}
.bd-photo-side img { border: 1px solid var(--border); }
.bd-photo-preview .bd-photo-side:nth-child(3) img {
  border: 2px solid var(--purple);
  box-shadow: 0 0 0 4px var(--purple-soft);
}
.bd-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: bdSpin 0.8s linear infinite;
}
@keyframes bdSpin { to { transform: rotate(360deg); } }
.bd-photo-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  font-weight: 600;
}
.bd-photo-label-ai { color: var(--purple); }
.bd-photo-arrow { color: var(--purple); }

.bd-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}
.bd-preview-header > div:first-child { flex: 1; }
.bd-match-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.bd-match-ring-wrap { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.bd-match-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.02em;
}
.bd-match-num span { font-size: 0.7rem; margin-left: 1px; color: var(--ink-muted); }
.bd-match-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  font-weight: 600;
  text-transform: uppercase;
}
.bd-match-value { color: var(--ink); font-weight: 600; font-size: 14px; margin-top: 0.15rem; }
.bd-match-meta { font-size: 12px; color: var(--ink-muted); margin-top: 0.15rem; }

.bd-preview-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}
.bd-rail { position: sticky; top: 100px; align-self: start; }
.bd-rail-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.bd-rail-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.25rem;
}
.bd-tpl-pick {
  position: relative;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  text-align: left;
}
.bd-tpl-pick:hover { border-color: var(--border-strong); }
.bd-tpl-pick.active {
  border-color: var(--tpl-accent, var(--purple));
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}
.bd-tpl-badge {
  position: absolute;
  top: -7px;
  left: 8px;
  z-index: 5;
  background: linear-gradient(135deg, #635bff 0%, #ec4899 100%);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(99, 91, 255, 0.35);
  white-space: nowrap;
}
.bd-tpl-thumb {
  aspect-ratio: 612/792;
  background: #fafaf9;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  pointer-events: none;
}
.bd-tpl-thumb svg { width: 100%; height: 100%; }
.bd-tpl-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.bd-tpl-role { font-size: 11px; color: var(--ink-muted); }

.bd-stage { display: flex; flex-direction: column; gap: 1rem; }
.bd-stage-toolbar { display: flex; justify-content: flex-end; gap: 0.5rem; }

.bd-paper {
  position: relative;
  background: #fafaf9;
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  overflow: hidden;
  aspect-ratio: 612/792;
  max-height: 78vh;
  margin: 0 auto;
  width: 100%;
  max-width: 612px;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.4s ease;
  /* anti-copy / anti-screenshot protection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.bd-paper-inner { width: 100%; height: 100%; pointer-events: none; }
.bd-paper-inner svg { width: 100%; height: 100%; pointer-events: none; }

/* MUCH STRONGER watermark — visible on photo capture, hard to crop out */
.bd-watermark {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  display: grid;
  grid-template-rows: repeat(8, 1fr);
  overflow: hidden;
  transform: rotate(-28deg);
  transform-origin: center;
  z-index: 50;
  mix-blend-mode: multiply;
}
.bd-watermark span {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 800;
  color: rgba(99, 91, 255, 0.28);
  letter-spacing: 0.22em;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 0 1px rgba(255,255,255,0.3);
}

/* second diagonal watermark layer (cross-hatched) */
.bd-watermark-2 {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  display: grid;
  grid-template-rows: repeat(8, 1fr);
  overflow: hidden;
  transform: rotate(28deg);
  transform-origin: center;
  z-index: 49;
  mix-blend-mode: multiply;
}
.bd-watermark-2 span {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(220, 38, 127, 0.18);
  letter-spacing: 0.32em;
  white-space: nowrap;
  text-align: center;
}

/* prominent "PREVIEW — UNLOCK TO REMOVE" stamp dead-center */
.bd-watermark-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  z-index: 51;
  pointer-events: none;
  background: rgba(99, 91, 255, 0.92);
  color: #fff;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 4px 18px rgba(99,91,255,0.35), inset 0 0 0 2px rgba(255,255,255,0.2);
  text-align: center;
  white-space: nowrap;
}
.bd-watermark-stamp small {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  opacity: 0.85;
  margin-top: 2px;
  letter-spacing: 0.14em;
}

.bd-locked-pill {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  background: rgba(10, 37, 64, 0.95);
  color: white;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  z-index: 10;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}
.bd-locked-pill svg { color: var(--purple); }

/* ─── SWIPE NAVIGATION (v7.2) ─────────────────────────────────── */
.bd-swipe-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 60;
  transition: all 0.18s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.bd-swipe-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 18px rgba(99, 91, 255, 0.25);
  color: var(--purple);
}
.bd-swipe-nav:active { transform: translateY(-50%) scale(0.96); }
.bd-swipe-prev { left: -22px; }
.bd-swipe-next { right: -22px; }

.bd-swipe-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0.9rem auto 0;
  padding: 0.5rem 1rem;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  background: var(--bg-soft);
  border-radius: 999px;
  width: fit-content;
  animation: hintPulse 2.4s ease-in-out infinite;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.bd-swipe-hint svg { color: var(--purple); animation: hintArrow 1.6s ease-in-out infinite; }
.bd-swipe-hint svg:last-child { animation-delay: 0.8s; }
@keyframes hintArrow {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}
.bd-swipe-hint svg:first-child {
  animation-name: hintArrowLeft;
}
@keyframes hintArrowLeft {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-3px); }
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
.bd-swipe-hint-dismissed {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

@media (max-width: 640px) {
  .bd-swipe-prev { left: -8px; }
  .bd-swipe-next { right: -8px; }
  .bd-swipe-nav {
    width: 38px; height: 38px;
    background: rgba(255, 255, 255, 0.88);
  }
}

.bd-stage-cta { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.bd-fine { font-size: 13px; color: var(--ink-muted); margin: 0; text-align: center; }

.bd-form-card {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  padding: 2rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-5);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.bd-field { display: flex; flex-direction: column; gap: 0.4rem; }
.bd-field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.bd-field-hint { color: var(--ink-muted); font-weight: 400; font-size: 12px; }
.bd-field input,
.bd-field select {
  padding: 0.7rem 0.875rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  color: var(--ink);
  font-size: 14.5px;
  font-family: inherit;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
}
.bd-field input:focus,
.bd-field select:focus {
  outline: 0;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.12);
}
.bd-field-error { border-color: var(--red) !important; }

.bd-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1.5;
}
.bd-checkbox input { margin-top: 0.18rem; accent-color: var(--purple); }
.bd-checkbox a { color: var(--purple); }

.bd-trust { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--ink-muted); }
.bd-trust span { display: inline-flex; align-items: center; gap: 0.4rem; }
.bd-trust svg { color: var(--green); }

.bd-mini-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: bdSpin 0.7s linear infinite;
  margin-right: 0.4rem;
  vertical-align: -2px;
}

.spinning svg {
  animation: bdSpin 0.8s linear infinite;
}

@media (max-width: 980px) {
  .builder-progress { display: none; }
  .bd-industries { grid-template-columns: 1fr; }
  .bd-preview-grid { grid-template-columns: 1fr; }
  .bd-rail { position: static; }
  .bd-rail-list { flex-direction: row; overflow-x: auto; max-height: none; padding-bottom: 0.5rem; }
  .bd-tpl-pick { flex-shrink: 0; width: 130px; }
  .bd-preview-header { flex-direction: column; gap: 1rem; }
}
@media (max-width: 600px) {
  .bd-photo-preview { flex-direction: column; }
  .bd-photo-arrow { transform: rotate(90deg); }
}

/* ============================================================
   V4 ADDITIONS — search bar, photo choice, voice card, reference
   ============================================================ */

/* Step 1 — Role search + voice */
.bd-role-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.bd-role-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-xs);
}
.bd-role-search svg { color: var(--ink-muted); flex-shrink: 0; }
.bd-role-search:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.12);
}
.bd-role-search input {
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 15px;
  font-family: inherit;
  flex: 1;
  color: var(--ink);
}
.bd-role-search input::placeholder { color: var(--ink-light); }

.bd-role-voice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--purple);
  color: white;
  border: 0;
  border-radius: var(--r-3);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-cta);
}
.bd-role-voice:hover {
  background: var(--purple-hover);
  transform: translateY(-1px);
}
.bd-role-voice.listening {
  background: var(--red);
  animation: voicePulse 1.5s ease-in-out infinite;
}
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(223, 27, 65, 0.5); }
  50%      { box-shadow: 0 0 0 12px rgba(223, 27, 65, 0); }
}

/* Step 2 — Photo choice cards */
.bd-photo-choices {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.bd-photo-opt {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  font-family: inherit;
  box-shadow: var(--shadow-xs);
  position: relative;
}
.bd-photo-opt:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.bd-photo-opt.selected {
  border-color: var(--purple);
  background: var(--purple-soft);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}
.bd-photo-opt-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-2);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.bd-photo-opt-meta { flex: 1; }
.bd-photo-opt-meta strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 0.2rem;
}
.bd-photo-opt-meta span {
  color: var(--ink-muted);
  font-size: 13px;
}
.bd-photo-opt-meta em {
  color: var(--purple);
  font-style: normal;
  font-weight: 600;
}
.bd-photo-opt-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.bd-photo-opt-tag-recommended {
  background: var(--green-soft);
  color: var(--green);
}

/* Recommended option — the middle "Use my own photo" — gets a subtle accent
   to draw the eye without being aggressive. Sits between the two siblings. */
.bd-photo-opt-recommended {
  border-color: rgba(34, 197, 94, 0.45);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.04) 0%, rgba(255, 255, 255, 1) 100%);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.08), 0 1px 3px rgba(0,0,0,0.04);
  position: relative;
}
.bd-photo-opt-recommended::before {
  /* Small "Most popular" ribbon on top-right of the recommended option */
  content: 'Most popular';
  position: absolute;
  top: -10px;
  right: 20px;
  background: var(--green);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}
.bd-photo-opt-recommended:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12), 0 4px 12px rgba(34, 197, 94, 0.15);
}
.bd-photo-opt-recommended.selected {
  background: var(--purple-soft);
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.15);
}
.bd-photo-opt-recommended.selected::before {
  background: var(--purple);
  box-shadow: 0 2px 6px rgba(99, 91, 255, 0.3);
}

.bd-photo-upload-area {
  margin-bottom: 1.5rem;
}
.bd-upload.dragging {
  border-color: var(--purple);
  background: var(--purple-soft);
}

/* Step 4 — Aria card controls */
.bd-aria-controls {
  display: flex;
  gap: 0.5rem;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.bd-voice-btn {
  font-size: 14px;
}
.bd-voice-btn.muted {
  background: var(--red);
  color: white;
}
.bd-aria-card.connected::before {
  background: linear-gradient(90deg, var(--green), var(--purple), var(--blue));
  animation: connectedFlow 3s linear infinite;
  background-size: 200% 100%;
}
@keyframes connectedFlow {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
.bd-transcript-empty {
  color: var(--ink-light);
  font-size: 13.5px;
  text-align: center;
  margin: 0;
  padding: 3rem 0;
  font-style: italic;
}

/* Step 5 — Reference service card */
.bd-ref-card {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border: 1px solid rgba(99, 91, 255, 0.2);
  border-radius: var(--r-5);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}
.bd-ref-card::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99,91,255,0.15), transparent 60%);
  pointer-events: none;
}

.bd-ref-card-top {
  position: relative;
  margin-bottom: 2rem;
}
.bd-ref-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: var(--purple);
  color: white;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.bd-ref-headline {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 300;
  color: var(--ink);
  margin: 0 0 1rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.bd-ref-sub {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
}

.bd-ref-features {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.bd-ref-feature {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.bd-ref-feature-icon {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}
.bd-ref-feature strong {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}
.bd-ref-feature span {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.bd-ref-cta-row {
  position: relative;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid rgba(99, 91, 255, 0.15);
}

@media (max-width: 700px) {
  .bd-role-tools { grid-template-columns: 1fr; }
  .bd-photo-opt { flex-direction: column; align-items: flex-start; }
  .bd-photo-opt-tag { align-self: flex-start; margin-top: 0.5rem; }
  .bd-ref-card { padding: 1.5rem; }
  .bd-ref-features { grid-template-columns: 1fr; }
  .bd-ref-cta-row { flex-direction: column; }
  .bd-ref-cta-row .btn { width: 100%; }
  .bd-aria-controls { flex-direction: column; }
  .bd-aria-controls .btn { width: 100%; }
}

/* ============================================================
   V4.1 — Reference qty picker, CV preview, Google auth, perks
   ============================================================ */

/* CV reference preview block */
.bd-ref-cv-preview {
  position: relative;
  margin: 2rem 0;
}
.bd-ref-cv-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.625rem;
  font-weight: 600;
}
.bd-ref-cv-block {
  background: white;
  border: 1px dashed rgba(99, 91, 255, 0.35);
  border-radius: var(--r-3);
  padding: 1.25rem 1.5rem;
  font-family: var(--font-sans);
}
.bd-ref-cv-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.625rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bd-ref-cv-entry {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.6;
}
.bd-ref-cv-entry strong {
  font-weight: 600;
}
.bd-ref-cv-entry > div {
  color: var(--ink-soft);
  font-size: 13px;
}
.bd-ref-cv-contact {
  display: flex !important;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 0.4rem;
  color: var(--ink-soft) !important;
}
.bd-ref-cv-note {
  margin-top: 0.875rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(99, 91, 255, 0.2);
  font-size: 12.5px;
  color: var(--purple);
  font-style: italic;
  line-height: 1.5;
}

/* Reference quantity picker */
.bd-ref-qty {
  position: relative;
  margin: 1.5rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(99, 91, 255, 0.15);
}
.bd-ref-qty-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.875rem;
}
.bd-ref-qty-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.625rem;
}
.bd-ref-qty-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.875rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  font-family: inherit;
}
.bd-ref-qty-btn:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.bd-ref-qty-btn.selected {
  border-color: var(--purple);
  background: var(--purple-soft);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}
.bd-ref-qty-btn strong {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}
.bd-ref-qty-btn span {
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.35;
}
.bd-ref-qty-btn em {
  font-style: normal;
  font-weight: 700;
  color: var(--purple);
  font-size: 14px;
  margin-top: 0.25rem;
}
.bd-ref-qty-btn-best {
  border-color: var(--purple) !important;
}
.bd-ref-qty-tag {
  position: absolute;
  top: -8px;
  right: 8px;
  padding: 0.15rem 0.5rem;
  background: var(--purple);
  color: white !important;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
}

/* Account step — Google button, divider, perks */
.bd-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
}
.bd-google-btn:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.bd-google-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.bd-divider {
  position: relative;
  text-align: center;
  margin: 1.25rem 0;
}
.bd-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}
.bd-divider span {
  position: relative;
  display: inline-block;
  padding: 0 0.875rem;
  background: white;
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bd-field-help {
  display: block;
  margin-top: 0.4rem;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.45;
}

.bd-fine-print {
  margin: 0.75rem 0 0;
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
  line-height: 1.5;
}
.bd-fine-print a { color: var(--purple); }

.bd-account-perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0 1.5rem;
}
.bd-perk {
  display: flex;
  gap: 0.625rem;
  padding: 1rem;
  background: var(--bg-soft);
  border-radius: var(--r-3);
  border: 1px solid var(--border-soft);
}
.bd-perk svg {
  color: var(--purple);
  flex-shrink: 0;
  margin-top: 2px;
}
.bd-perk strong {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.bd-perk span {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* Mobile responsive */
@media (max-width: 700px) {
  .bd-ref-qty-row { grid-template-columns: 1fr 1fr; }
  .bd-ref-cv-contact { flex-direction: column; gap: 0.25rem !important; }
  .bd-account-perks { grid-template-columns: 1fr; }
}

/* ============================================================
   BUILDER — MOBILE OPTIMIZATION (v7.2)
   ============================================================ */
@media (max-width: 900px) {
  .bd-preview-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .bd-rail {
    order: 2; /* preview on top, rail below on mobile */
  }
  .bd-rail-list {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .bd-rail-list::-webkit-scrollbar { display: none; }
  .bd-tpl-pick {
    flex-shrink: 0;
    width: 140px;
    scroll-snap-align: start;
  }
  .bd-stage { order: 1; }
}

@media (max-width: 640px) {
  /* Container */
  .bd-container, .bd-wrap { padding: 0.75rem; }

  /* Stepper bar — pills smaller */
  .bd-stepper { padding: 0.6rem 0.75rem; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; }
  .bd-stepper::-webkit-scrollbar { display: none; }
  .bd-step-pill { flex-shrink: 0; font-size: 11px; padding: 5px 10px; }

  /* Step headlines */
  .bd-headline { font-size: clamp(1.4rem, 6vw, 1.9rem); line-height: 1.15; }
  .bd-sub { font-size: 0.95rem; }

  /* Industries grid */
  .bd-industries {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }
  .bd-industry { padding: 0.85rem 0.7rem; min-height: 80px; }
  .bd-ind-icon { font-size: 1.5rem; }
  .bd-ind-meta strong { font-size: 0.85rem; }
  .bd-ind-meta span { font-size: 0.7rem; }

  /* Photo option cards */
  .bd-photo-opts { grid-template-columns: 1fr; gap: 0.75rem; }
  .bd-photo-opt { padding: 1.25rem; }

  /* Voice interview */
  .bd-voice-stage { padding: 1.5rem 1rem; }
  .bd-voice-orb { width: 140px; height: 140px; }
  .bd-voice-status { font-size: 0.9rem; }

  /* Template preview area */
  .bd-paper { max-height: none; }
  .bd-stage-toolbar { padding: 0.5rem 0; }

  /* Watermarks scale down */
  .bd-watermark span { font-size: 1.1rem; }
  .bd-watermark-2 span { font-size: 0.85rem; }
  .bd-watermark-stamp { padding: 0.55rem 1.2rem; font-size: 0.78rem; }
  .bd-watermark-stamp small { font-size: 0.55rem; }

  /* Reference section */
  .bd-ref-headline { font-size: 1.25rem; }
  .bd-ref-sub { font-size: 0.9rem; }

  /* CTA bottom */
  .bd-stage-cta { padding: 1rem; }
  .bd-stage-cta .btn { width: 100%; }
}

/* Tiny phones */
@media (max-width: 380px) {
  .bd-industries { grid-template-columns: 1fr; }
  .bd-tpl-pick { width: 120px; }
}

/* Touch optimization */
@media (hover: none) and (pointer: coarse) {
  .bd-tpl-pick { min-height: 200px; }
  .bd-swipe-nav { width: 48px; height: 48px; }
}
