@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');
/* ═══════════════════════════════════════════════════════════
   Knobot — Shared Design Tokens
   Single source of truth across landing, dashboard, and
   onboarding. Imported by each app's esbuild config and
   prepended to the bundled CSS.

   To change the palette site-wide, edit only this file.
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ── Brand scale (indigo) ── */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;  /* === --brand */
  --brand-700: #4338ca;  /* === --brand-hover */
  --brand-800: #3730a3;
  --brand-900: #312e81;

  /* ── Brand (legacy aliases — keep forever) ── */
  --brand:          #4f46e5;
  --brand-hover:    #4338ca;
  --brand-subtle:   #eef2ff;
  --brand-ring:     rgba(79, 70, 229, 0.25);

  /* ── Surfaces ──
     The airy white spine keeps the whole product clean and open. The
     four steps give us hierarchy with a faint cool bias. */
  --page-bg:        #ffffff;  /* page surface — body / full-page wrappers */
  --page-bg-2:      #fafbfc;  /* inset surface — table heads, code blocks, hover wells */
  --page-bg-3:      #f1f3f7;  /* stronger inset / hover well / placeholder mid */
  --page-bg-4:      #e6e8ec;  /* deep placeholder accent */
  --card-bg:        #ffffff;
  --card-shadow:    var(--shadow-card);
  --card-border:    #ecedf1;  /* card & inset edges (also bot avatar borders) */
  --divider:        #ecedf1;  /* section rules */
  --chrome:         #1e1c2a;  /* dark "browser frame" chrome, landing hero only */

  /* ── Text ── */
  --text:           #1a1a2e;
  --text-secondary: #5a5a72;
  --text-tertiary:  #8e8ea0;
  --text-on-brand:  #ffffff;

  /* ── Inputs ── */
  --input-bg:       #ffffff;
  --input-border:   #d4d4dc;
  --input-focus:    var(--brand);
  --input-placeholder: #b0b0be;

  /* ── Feedback ── */
  --success:        #059669;
  --success-bg:     #ecfdf5;
  --success-border: #a7f3d0;
  --success-text:   #065f46;
  --error:          #dc2626;
  --error-bg:       #fef2f2;
  --error-border:   #fecaca;
  --error-text:     #991b1b;
  --warn:           #d97706;
  --warn-bg:        #fffbeb;
  --warn-border:    #fde68a;

  /* ── Shadow vocabulary (replaces ad-hoc box-shadows site-wide) ── */
  --shadow-card:        0 1px 3px rgba(15,18,30,0.04), 0 6px 20px rgba(15,18,30,0.04);
  --shadow-card-hover:  0 4px 12px rgba(15,18,30,0.06), 0 16px 40px rgba(15,18,30,0.06);
  --shadow-float:       0 4px 20px rgba(15,18,30,0.08), 0 1px 3px rgba(15,18,30,0.06);
  --shadow-selected:    0 1px 2px rgba(79,70,229,0.08), 0 4px 14px rgba(79,70,229,0.10);
  --shadow-modal:       0 32px 90px rgba(10,12,30,0.28), 0 8px 24px rgba(0,0,0,0.10);

  /* ── Motion ── */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:    0.15s;
  --dur-base:    0.2s;
  --dur-slow:    0.35s;

  /* ── Focus ring (single source for every focus state) ── */
  --ring-brand:  0 0 0 3px var(--brand-ring);

  /* ── Spacing ── */
  --radius:         10px;
  --radius-sm:      6px;
  --radius-lg:      14px;

  /* ── Typography ── */
  --font:           'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:      'SF Mono', 'Cascadia Code', 'Fira Code', monospace;

  /* ── Layout ── */
  --navbar-height:  56px;
}

/* ═══════════════════════════════════════════════════════════
   FunnelNav — minimal top bar for unauthenticated pages
   Used by /onboard, /login, and SignupPage. Visually matches
   the landing .nav so the brand reads as one product, but
   carries only a clickable logo + Help mailto: link.
   ═══════════════════════════════════════════════════════════ */

.funnel-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--navbar-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.funnel-nav-logo {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
}

.funnel-nav-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}

.funnel-nav-help:hover {
  background: var(--page-bg-2);
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 640px) {
  .funnel-nav {
    padding: 0 16px;
  }
  .funnel-nav-help-label {
    display: none;
  }
}

.widget-preview-frame {
  position: relative;
  display: block;
  width: 100%;
  max-width: 380px;
  height: 540px;
  margin: 0 auto;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  background: white;
}
.widget-preview-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Loading / timeout overlay so the preview never sits as an indefinite blank */
.widget-preview-frame .preview-frame-status {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: white;
}
.widget-preview-frame .pfs-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--card-border);
  border-top-color: var(--text-secondary, #64748b);
  animation: pfs-spin 0.8s linear infinite;
}
.widget-preview-frame .pfs-msg {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary, #64748b);
  max-width: 220px;
}
.widget-preview-frame .pfs-retry {
  font-size: 13px;
  padding: 7px 18px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--card-border);
  background: var(--card-bg, #fff);
  color: var(--text-primary, #0f172a);
  cursor: pointer;
}
.widget-preview-frame .pfs-retry:hover { background: var(--page-bg, #f8fafc); }
@keyframes pfs-spin { to { transform: rotate(360deg); } }

/* ── Hosted chat page (customer-branded /c/<slug>) ── */
.hosted-shell { min-height: 100vh; }
.hosted-page {
  position: relative; max-width: 1040px; margin: 0 auto;
  padding: 48px 28px 56px; min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
}
/* Watermarks — LogoIcon pattern (replaces old monogram .hosted-wm-* classes) */
.hosted-watermarks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.hosted-watermark {
  position: absolute;
  color: var(--brand, #4f46e5);
}
.hosted-watermark svg { width: 100%; height: 100%; }

.hosted-grid { position: relative; z-index: 1; grid-template-columns: 1fr 312px; gap: 48px; align-items: center; }
.hosted-left { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hosted-id { display: flex; align-items: center; gap: 13px; }
.hosted-logo, .hosted-logo-img { width: 54px; height: 54px; border-radius: 14px; box-shadow: var(--shadow-card); }
.hosted-logo { background: var(--hp-brand, var(--brand)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 23px; font-weight: 800; }
.hosted-logo-img { object-fit: cover; }

/* Avatar fallback when no operator logo — shows Knobot mark */
.hosted-logo-fallback {
  background: #fff;
  border: 1px solid var(--card-border, #ecedf1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand, #4f46e5);
}

.hosted-name { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--text); line-height: 1.15; }
.hosted-headline { font-size: 30px; font-weight: 800; letter-spacing: -.025em; line-height: 1.12; color: var(--text); margin: 4px 0 0; }
.hosted-tagline { font-size: 16.5px; color: var(--text-secondary); line-height: 1.5; max-width: 440px; margin: 0; }
.hosted-info { background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; max-width: 430px; }
.hosted-info-row { display: flex; align-items: center; gap: 13px; padding: 13px 16px; border-bottom: 1px solid var(--page-bg-2); }
.hosted-info-row:last-child { border-bottom: none; }
.hosted-info-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--brand-subtle); color: var(--hp-brand, var(--brand)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hosted-info-ic svg { width: 17px; height: 17px; }
.hosted-info-txt .l { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-tertiary); }
.hosted-info-txt .v { font-size: 14.5px; font-weight: 600; color: var(--text); margin-top: 1px; }
.hosted-info-txt .v a { color: var(--hp-brand, var(--brand)); text-decoration: none; }
.hosted-btns { display: flex; gap: 11px; flex-wrap: wrap; }
.hosted-btn { padding: 12px 22px; border-radius: var(--radius); font-size: 14px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; }
.hosted-btn.primary { background: var(--hp-brand, var(--brand)); color: #fff; box-shadow: var(--shadow-card); }
.hosted-btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--card-border); }
.hosted-right { display: flex; justify-content: center; }

/* Footer band — operator disclosure + Knobot links */
.hosted-foot-band {
  margin-top: 32px;
  padding: 18px 20px;
  background: var(--page-bg-2, #fafbfc);
  border-top: 1px solid var(--card-border, #ecedf1);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  color: var(--text-2, #4b5563);
  font-size: 13px;
  line-height: 1.55;
  position: relative;
  z-index: 1;
}
@media (min-width: 720px) {
  .hosted-foot-band {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
  }
}
.hosted-foot-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text, #111827); }
.hosted-foot-mark { display: inline-flex; color: var(--brand, #4f46e5); }
.hosted-foot-wordmark { font-weight: 600; }
.hosted-foot-tag { color: var(--text-3, #6b7280); font-size: 12.5px; }
.hosted-foot-ai-disclosure { color: var(--text-3, #6b7280); font-size: 12.5px; }
.hosted-foot-ai-disclosure::before { content: "·"; margin: 0 5px; }
.hosted-foot-disclosure { margin: 0; }
.hosted-foot-disclosure a { color: var(--brand, #4f46e5); text-decoration: underline; }
.hosted-foot-links { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3, #6b7280); font-size: 12.5px; }
.hosted-foot-links a { color: var(--text-3, #6b7280); text-decoration: none; border-bottom: 1px dotted currentColor; }
.hosted-foot-links a:hover { color: var(--brand, #4f46e5); }

@media (max-width: 820px) {
  .hosted-grid { grid-template-columns: 1fr; gap: 22px; }
  .hosted-right { order: -1; }
}

/* v2 additions: promo banner, hours chip, typed button outline + leading icon */
.hosted-promo { background: var(--hp-brand, var(--brand, #4f46e5)); color: #fff; text-align: center; padding: 8px 14px; font-size: 13px; position: relative; z-index: 1; }
.hosted-promo a { color: #fff; text-decoration: underline; }
.hosted-hours-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; align-self: flex-start; }
.hosted-hours-chip.is-open { background: #e7f7ee; color: #1e7c3a; }
.hosted-hours-chip.is-closed { background: #f4f4f6; color: #4a4f57; }
.hosted-btn-ic { display: inline-flex; align-items: center; margin-right: 8px; }
.hosted-btn.outline { background: transparent; border: 1px solid var(--hp-brand, var(--brand, #4f46e5)); color: var(--hp-brand, var(--brand, #4f46e5)); }

/* ═══════════════════════════════════════════════════════════
   Knobot Onboarding — Base + Components.
   Design tokens are defined once in packages/shared/css/tokens.css
   and prepended to this file by esbuild at build time.
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   Base
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--page-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--navbar-height) + 40px) 20px 40px;
}

#app {
  width: 100%;
  max-width: 1080px;
}


/* ═══════════════════════════════════════════════════════════
   Card
   ═══════════════════════════════════════════════════════════ */

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--card-shadow);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.card-wide {
  max-width: 620px;
}

.card-header {
  text-align: center;
  margin-bottom: 28px;
}

/* Step cards (Step1–Step4 input/scraping) size to their content. The
   success-hero on Step4 done is intentionally wider and is NOT a .card. */
.onboarding-enter > .card {
  width: 100%;
  max-width: 560px;
}

@media (max-width: 480px) {
  .card { padding: 28px 20px; }
}


/* ═══════════════════════════════════════════════════════════
   Logo
   ═══════════════════════════════════════════════════════════ */

.logo-mark {
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--text-on-brand);
  font-weight: 700;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
}
.logo-mark svg {
  width: 28px;
  height: 28px;
}


/* ═══════════════════════════════════════════════════════════
   Progress Bar
   ═══════════════════════════════════════════════════════════ */

.progress-wrap {
  margin-bottom: 28px;
}

.step-label {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.progress-bar {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.progress-bar .segment {
  width: 44px;
  height: 3px;
  border-radius: 3px;
  background: var(--card-border);
  transition: background 0.3s ease;
}

.progress-bar .segment.filled {
  background: var(--brand);
}


/* ═══════════════════════════════════════════════════════════
   Typography
   ═══════════════════════════════════════════════════════════ */

.step-title {
  font-weight: 700;
  font-size: 22px;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}

.step-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}


/* ═══════════════════════════════════════════════════════════
   Forms
   ═══════════════════════════════════════════════════════════ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
  flex: 1;
  min-width: 0;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.form-group .helper {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.4;
  margin-bottom: 1px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--input-placeholder);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--input-focus);
  box-shadow: var(--ring-brand);
}

.form-group textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.5;
}

.form-row {
  display: flex;
  gap: 12px;
}

@media (max-width: 480px) {
  .form-row { flex-direction: column; gap: 0; }
}


/* ═══════════════════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════════════════ */

.actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

/* Canonical .btn system — see apps/dashboard/src/styles.css for the full block.
   Keep these in sync across landing / dashboard / onboarding. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  box-sizing: border-box;
  transition: background var(--dur-fast) ease,
              border-color var(--dur-fast) ease,
              color var(--dur-fast) ease,
              box-shadow var(--dur-fast) ease,
              transform var(--dur-fast) ease;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring-brand); }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.97); }

.btn-sm { height: 28px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn-md { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 15px; }

.btn-pill { border-radius: 999px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 28px; }
.btn-icon.btn-lg { width: 42px; }

.btn-primary {
  background: var(--brand);
  color: var(--text-on-brand);
  border-color: var(--brand);
}
.btn-primary:hover:not(:disabled) {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text);
  border-color: var(--card-border);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--page-bg-2);
  border-color: var(--text-tertiary);
}

.btn-ghost,
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--card-border);
}
.btn-ghost:hover:not(:disabled),
.btn-outline:hover:not(:disabled) {
  background: var(--page-bg-2);
  border-color: var(--input-border);
  color: var(--text);
}

.btn-danger,
.btn-danger-outline,
.btn-danger-text {
  background: transparent;
  color: var(--error);
  border-color: var(--error-border);
}
.btn-danger:hover:not(:disabled),
.btn-danger-outline:hover:not(:disabled),
.btn-danger-text:hover:not(:disabled) {
  background: var(--error-bg);
  border-color: var(--error);
  color: var(--error);
}

.btn-danger-solid,
.btn-solid-danger {
  background: var(--error);
  color: #fff;
  border-color: var(--error);
}
.btn-danger-solid:hover:not(:disabled),
.btn-solid-danger:hover:not(:disabled) {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* Onboarding-only: hero CTA is just a larger button with a shadow lift. */
.btn-hero { height: 48px; padding: 0 26px; font-size: 15px; border-radius: var(--radius); }
.btn-hero.btn-primary { box-shadow: var(--shadow-card); }
.btn-hero.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
}


/* ═══════════════════════════════════════════════════════════
   Error Banner
   ═══════════════════════════════════════════════════════════ */

.error-banner {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 18px;
  line-height: 1.5;
}


/* ═══════════════════════════════════════════════════════════
   File Upload (Step 3)
   ═══════════════════════════════════════════════════════════ */

.file-drop {
  border: 2px dashed var(--input-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-base) ease, background var(--dur-base) ease;
  background: var(--page-bg-2);
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 480px) {
  .file-drop { min-height: 240px; }
}

.file-drop:hover {
  border-color: var(--brand);
  background: var(--brand-subtle);
}

.file-drop.dragging {
  border-color: var(--brand);
  background: var(--brand-subtle);
  border-style: dashed;
}

.file-drop input[type="file"] { display: none; }

.file-icon {
  color: var(--text-tertiary);
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
}

.file-drop:hover .file-icon { color: var(--brand); }

.file-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.file-hint {
  font-size: 12px;
  color: var(--text-tertiary);
}

.step-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 0.5rem;
}

.file-selected .file-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.file-selected .file-size {
  font-size: 12px;
  color: var(--text-secondary);
}


/* ═══════════════════════════════════════════════════════════
   Spinner
   ═══════════════════════════════════════════════════════════ */

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-svg {
  animation: spin 1.2s linear infinite;
}


/* ═══════════════════════════════════════════════════════════
   Step 4 — Crawl Stats
   ═══════════════════════════════════════════════════════════ */

.crawl-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: var(--page-bg-2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}

.crawl-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.crawl-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}

.crawl-stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════
   Step 4 — Finalizing ("Almost ready") branded reveal
   ═══════════════════════════════════════════════════════════ */
.fin-mark {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  filter: drop-shadow(0 6px 14px rgba(79, 70, 229, 0.18));
}

/* Indeterminate variant of the scrape progress bar — a brand segment slides
   across to say "still finishing" while the greeting/FAQ LLM calls run. */
.scrape-progress-bar.bar-indet {
  margin-top: 24px;
  margin-bottom: 0;
  position: relative;
}
.bar-indet-seg {
  position: absolute;
  top: 0;
  height: 100%;
  width: 40%;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  animation: bar-indet 1.25s ease-in-out infinite;
}
@keyframes bar-indet {
  0%   { left: -42%; }
  100% { left: 102%; }
}
@media (prefers-reduced-motion: reduce) {
  .bar-indet-seg {
    animation: none;
    left: 0;
    width: 60%;
  }
}

/* ═══════════════════════════════════════════════════════════
   Step 4 — URL Feed (real-time crawl progress)
   ═══════════════════════════════════════════════════════════ */

.url-feed {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 280px;
  max-height: 280px;
  overflow-y: auto;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--card-border) transparent;
}

@media (max-width: 480px) {
  .url-feed { min-height: 220px; max-height: 220px; }
}

.url-feed::-webkit-scrollbar {
  width: 6px;
}

.url-feed::-webkit-scrollbar-track {
  background: transparent;
}

.url-feed::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 3px;
}

.url-feed::-webkit-scrollbar-thumb:hover {
  background: var(--input-border);
}

.url-feed-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  animation: feed-slide-in 0.3s ease-out;
}

.url-feed-done {
  color: var(--text-secondary);
}

.url-feed-pending {
  color: var(--text-tertiary);
}

.url-feed-scraping {
  background: var(--brand-subtle);
  color: var(--brand);
  font-weight: 500;
}

.url-feed-scanning {
  color: var(--text-tertiary);
}

.url-feed-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.url-feed-done .url-feed-icon {
  color: var(--success);
}

.url-feed-failed .url-feed-url {
  color: var(--text-tertiary);
  text-decoration: line-through;
  opacity: 0.7;
}

.url-feed-scraping .url-feed-icon {
  color: var(--brand);
}

.url-feed-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid var(--brand);
  border-top-color: var(--brand-subtle, #c7d2fe);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  animation-delay: -999s;
}

.url-feed-url {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.url-feed-detail {
  font-size: 11px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.finish-now-section {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--card-border);
}

.finish-now-text {
  flex: 1;
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.finish-now-btn {
  flex-shrink: 0;
  color: var(--text-secondary);
}

@keyframes feed-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   Step 4 — ScrapeProgress component styles
   ═══════════════════════════════════════════════════════════ */

.scrape-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--card-border);
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}
.scrape-progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.scrape-cancel-section {
  margin-top: 16px;
  text-align: center;
}
.cancel-link {
  font-size: 13px;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cancel-link:hover {
  color: var(--text-secondary);
}
.scrape-error-banner {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.scrape-network-error {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 8px;
}
.scrape-limit-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 12px;
}
.scrape-limit-notice a {
  color: var(--warn);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.scrape-limit-notice a:hover {
  opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════
   Step 4 — Widget Preview
   ═══════════════════════════════════════════════════════════ */

.widget-preview-container {
  margin: 14px 0;
}

.widget-preview-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.widget-preview-frame {
  position: relative;
  display: block;
  width: 100%;
  max-width: 400px;
  height: 600px;
  margin: 0 auto;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  background: white;
}
.widget-preview-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Loading / timeout overlay so the preview never sits as an indefinite blank */
.widget-preview-frame .preview-frame-status {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: white;
}
.widget-preview-frame .pfs-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--card-border);
  border-top-color: var(--text-secondary, #64748b);
  animation: pfs-spin 0.8s linear infinite;
}
.widget-preview-frame .pfs-msg {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary, #64748b);
  max-width: 220px;
}
.widget-preview-frame .pfs-retry {
  font-size: 13px;
  padding: 7px 18px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--card-border);
  background: var(--card-bg, #fff);
  color: var(--text-primary, #0f172a);
  cursor: pointer;
}
.widget-preview-frame .pfs-retry:hover { background: var(--page-bg, #f8fafc); }
@keyframes pfs-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .widget-preview-frame .pfs-spinner { animation-duration: 2s; }
}


/* ═══════════════════════════════════════════════════════════
   Step 4 — Success State (Done)
   ═══════════════════════════════════════════════════════════ */

.success-center {
  text-align: center;
  padding: 4px 0 0;
}

.success-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.success-heading {
  margin-bottom: 14px;
}

.success-heading .title {
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 6px;
}

.success-heading .subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.success-heading .subtitle strong {
  color: var(--text);
  font-weight: 600;
}

.success-cta {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--card-border);
  text-align: center;
}

.success-cta-text {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.success-cta-text strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   Step 4 — Multi-URL Input
   ═══════════════════════════════════════════════════════════ */

.url-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}

.url-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.url-row input {
  flex: 1;
}

.url-count {
  font-size: 11px;
  color: var(--text-tertiary);
}

.add-urls-toggle {
  font-size: 13px;
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}


/* ── Toggle switch ── */
.toggle {
  position: relative;
  width: 34px;
  height: 19px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--input-border);
  border-radius: 10px;
  transition: background var(--dur-base) ease;
}
.toggle input:checked + .toggle-track {
  background: var(--brand);
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transition: transform var(--dur-base) ease;
}
.toggle input:checked ~ .toggle-thumb {
  transform: translateX(15px);
}
.toggle input:focus-visible + .toggle-track {
  box-shadow: var(--ring-brand);
}

/* ── Discover pages toggle row ── */
.discover-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  margin-top: 8px;
  border-top: 1px solid var(--card-border);
}
.discover-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.discover-toggle-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.discover-toggle-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.4;
}


/* ═══════════════════════════════════════════════════════════
   Two-Path Selector
   ═══════════════════════════════════════════════════════════ */

.path-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.path-option {
  flex: 1;
  padding: 18px 16px;
  border: 2px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card-bg);
  cursor: pointer;
  text-align: center;
  position: relative;
  transition: all var(--dur-fast) ease;
  font-family: var(--font);
}

.path-option:hover {
  border-color: var(--brand);
  background: var(--brand-subtle);
}

.path-option-active {
  border-color: var(--brand);
  background: var(--brand-subtle);
}

.path-check {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 22px;
  height: 22px;
  background: var(--brand);
  border-radius: 0 8px 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.path-icon {
  margin-bottom: 8px;
  color: var(--text-tertiary);
}

.path-option-active .path-icon {
  color: var(--brand);
}

.path-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.path-option-active .path-label {
  color: var(--brand-hover);
}

.path-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.char-count {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: right;
  margin-top: 4px;
}

/* ── Hint Box ── */
.hint-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--page-bg-2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.hint-box--warn {
  border-color: var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn);
}

.hint-icon {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--text-tertiary);
}


/* ═══════════════════════════════════════════════════════════
   Signup — Form / Verify States
   ═══════════════════════════════════════════════════════════ */

.state-form, .state-verify {
  transition: opacity var(--dur-slow) ease, transform var(--dur-slow) ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.slide-up-enter {
  animation: slideUp 0.45s var(--ease-out) both;
}

/* Verify state */
.verify-center { text-align: center; padding: 8px 0 0; }

.verify-icon {
  margin: 0 auto 22px;
  display: flex; align-items: center; justify-content: center;
}

.verify-title {
  font-weight: 700; font-size: 20px;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.verify-email {
  font-size: 14px; color: var(--text-secondary);
  margin-bottom: 4px;
}
.verify-email strong { color: var(--text); font-weight: 600; }


.verify-actions {
  display: flex; align-items: center; justify-content: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
}

.link-btn {
  font-size: 13px; color: var(--text-tertiary);
  background: none; border: none;
  font-family: var(--font); cursor: pointer;
  transition: color var(--dur-fast);
  padding: 4px 0;
}
.link-btn:hover { color: var(--brand); }
.link-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.link-btn:disabled:hover { color: var(--text-tertiary); }

.link-sep { width: 1px; height: 14px; background: var(--card-border); }

.link-btn { display: inline-flex; align-items: center; gap: 6px; }

.verify-countdown {
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  padding: 4px 0;
}

.value-line {
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.6;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
}
.value-line strong { color: var(--text-secondary); font-weight: 600; }

.form-error {
  text-align: center;
  font-size: 13px;
  color: var(--error-text);
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  line-height: 1.4;
}

.error-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--error-border);
  border-radius: var(--radius);
  background: var(--error-bg);
}

.error-inline-icon {
  width: 32px;
  height: 32px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.error-inline-body {
  flex: 1;
  min-width: 0;
}

.error-inline-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--error-text);
  margin-bottom: 1px;
}

.error-inline-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.error-inline-action {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast);
  flex-shrink: 0;
}

.error-inline-action:hover {
  background: var(--brand-subtle);
}

.footer-note {
  text-align: center;
  font-size: 13px; color: var(--text-tertiary);
  margin-top: 16px; line-height: 1.5;
}

.already-account {
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 12px;
}

.already-account a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.already-account a:hover {
  text-decoration: underline;
}

/* Gradient text for step-title em */
.step-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* ═══════════════════════════════════════════════════════════
   Color Picker
   ═══════════════════════════════════════════════════════════ */

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.color-input {
  width: 44px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--input-bg);
}
.color-value {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}


/* ── AI Loading Shimmer ── */
.ai-loading-label {
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--brand);
  border-top-color: var(--brand-subtle, #c7d2fe);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.ai-loading-textarea {
  width: 100%;
  min-height: 160px;
  padding: 14px;
  border: 2px solid var(--brand);
  border-radius: 8px;
  background: var(--page-bg-2);
  box-sizing: border-box;
  overflow: hidden;
}

.shimmer-line {
  height: 10px;
  border-radius: 4px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, var(--page-bg-2) 25%, var(--page-bg-3) 50%, var(--page-bg-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.shimmer-line:nth-child(1) { width: 85%; }
.shimmer-line:nth-child(2) { width: 70%; animation-delay: 0.1s; }
.shimmer-line:nth-child(3) { width: 92%; animation-delay: 0.2s; }
.shimmer-line:nth-child(4) { width: 40%; animation-delay: 0.3s; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ═══════════════════════════════════════════════════════════
   Animations
   ═══════════════════════════════════════════════════════════ */

.fade-in {
  animation: fade-in 0.3s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.signup-body.leaving {
  animation: signup-exit var(--dur-slow) cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}

@keyframes signup-exit {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.onboarding-enter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 80px);
  animation: onboarding-fade-in 0.5s var(--ease-out) both;
}

@keyframes onboarding-fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* When signup page is active, body becomes a full-width column container */
body.signup-active {
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
}

body.signup-active #app {
  max-width: 100%;
}


/* ── Google sign-in button ── */
.google-btn {
  width: 100%;
  height: 42px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all var(--dur-fast) ease;
  text-decoration: none;
}
.google-btn:hover {
  background: var(--page-bg-2);
  border-color: var(--page-bg-4);
  box-shadow: var(--shadow-card);
}
.google-btn:active {
  transform: scale(0.98);
}
.google-btn svg { flex-shrink: 0; }

/* ── Sign-in-wrap acceptance byline ──
   Conspicuous notice above signup buttons. Clicking any signup path
   (Google / email / phone) counts as acceptance of ToS+Privacy+DPA per
   Meyer v. Uber / Berkson v. Gogo. */
.signup-acceptance {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 20px;
  text-align: center;
}
.signup-acceptance a {
  color: var(--brand);
  text-decoration: none;
}
.signup-acceptance a:hover { text-decoration: underline; }

/* ── Auth divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}
.auth-divider span {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ── Email send row (signup) ── */
.email-send-row {
  display: flex;
  gap: 8px;
}
.email-send-row > input {
  flex: 1;
  height: 42px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.email-send-row > input::placeholder {
  color: var(--input-placeholder);
}
.email-send-row > input:focus {
  border-color: var(--input-focus);
  box-shadow: var(--ring-brand);
}
.send-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: var(--text-on-brand);
  border: none;
  cursor: pointer;
  transition: background var(--dur-fast) ease;
}
.send-btn:hover { background: var(--brand-hover); }
.send-btn:active { transform: scale(0.97); }

.btn-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════
   Signup — Two-Column Layout
   ═══════════════════════════════════════════════════════════ */

.signup-body {
  /* Transparent so the page-level watermarks (fixed, z-index 0) remain
     visible behind the signup composition. The body itself paints the
     page background. */
  background: transparent;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 40px;
}

.signup-layout {
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 1020px;
  width: 100%;
  margin: 0 auto;
}

/* ── Entrance animation ── */
@keyframes signup-slide-in-left {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes signup-slide-in-right {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Left column: value proposition ── */
.signup-text {
  flex: 1;
  max-width: 500px;
  padding-top: 8px;
  animation: signup-slide-in-left 0.5s var(--ease-out) both;
}

.signup-wordmark {
  display: inline-flex;
  align-items: center;
  opacity: 0.92;
  margin-bottom: 28px;
}

.signup-text h1 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 18px;
}

.signup-subtitle {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
  max-width: 480px;
}


/* ── Social proof byline ──
   Quiet under-subtitle line. No top border, no padding-top: reads as
   ambient evidence rather than a marketing module. */
.signup-social-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.signup-proof-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.signup-proof-text {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.4;
}

.signup-proof-text strong {
  color: var(--text-tertiary);
  font-weight: 500;
}


/* ── Right column: form card ── */
.signup-form-col {
  width: 400px;
  flex-shrink: 0;
  animation: signup-slide-in-right 0.5s var(--ease-out) 0.08s both;
}

.signup-form-col .card {
  padding: 24px 32px 28px;
}

.signup-form-col .step-title {
  font-size: 24px;
  text-align: center;
}

.signup-form-col .step-subtitle {
  text-align: center;
  margin-bottom: 24px;
}

.signup-form-col .card-header {
  text-align: center;
  margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════════════
   Signup — Committed (fade-out) & Verify (fade-in)
   ═══════════════════════════════════════════════════════════ */

.signup-layout.committed {
  animation: page-exit 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}

@keyframes page-exit {
  to {
    opacity: 0;
    transform: scale(0.98);
  }
}

.verify-layout {
  width: 400px;
  max-width: 100%;
  animation: verify-enter 0.45s var(--ease-out) both;
}

.signup-wordmark-verify {
  display: flex;
  justify-content: center;
  margin: 0 0 20px;
  opacity: 0.85;
}

@keyframes verify-enter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ═══════════════════════════════════════════════════════════
   Signup — Mobile
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .signup-body {
    padding: 32px 20px;
  }

  .signup-layout {
    flex-direction: column;
    gap: 32px;
  }

  .signup-text {
    max-width: 100%;
    padding-top: 0;
    text-align: center;
  }

  .signup-wordmark {
    justify-content: center;
    margin-bottom: 20px;
  }

  .signup-text h1 {
    font-size: 28px;
    letter-spacing: -0.015em;
  }

  .signup-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .signup-social-proof {
    justify-content: center;
  }

  .signup-form-col {
    width: 100%;
  }

  .verify-layout {
    width: 100%;
  }
}


/* ═══════════════════════════════════════════════════════════
   Code Input (Email Verification)
   ═══════════════════════════════════════════════════════════ */

.code-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
  width: 100%;
}

.otp-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.otp-digit {
  box-sizing: border-box;
  width: 44px;
  height: 60px;
  font-family: var(--font);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: var(--text);
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  outline: none;
  padding: 0;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  caret-color: transparent;
  -moz-appearance: textfield;
  appearance: textfield;
}

.otp-digit:focus {
  border-color: var(--brand);
  box-shadow: var(--ring-brand);
}

.otp-digit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.otp-digit::-webkit-outer-spin-button,
.otp-digit::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


/* ═══════════════════════════════════════════════════════════
   Auth Method Tabs (Email / Phone)
   ═══════════════════════════════════════════════════════════ */

.auth-method-tabs {
  display: flex;
  background: var(--page-bg-2);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 16px;
  border: 1px solid var(--card-border);
}
.auth-method-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: var(--font);
  transition: all var(--dur-fast) ease;
}
.auth-method-tab.active {
  background: var(--card-bg);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.auth-method-tab:not(.active):hover {
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════
   Phone Input Component
   ═══════════════════════════════════════════════════════════ */

.phone-input-wrap {
  display: block;
  position: relative;
  min-width: 0;
}

/* In flex rows (signup send-row), expand to fill available width */
.email-send-row .phone-input-wrap {
  flex: 1;
}

.phone-input-field {
  display: flex;
  align-items: stretch;
  height: 42px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  overflow: visible;
}

.phone-input-field.phone-input-settings {
  height: 36px;
}

.phone-input-field:focus-within {
  border-color: var(--brand);
  box-shadow: var(--ring-brand);
}

.phone-flag-zone {
  /* Vertically center: flex + align-items:center resolves to the full field height */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 72px;
  flex-shrink: 0;
  padding: 0 6px 0 10px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--input-border);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.12s;
  /* Ensure no inherited line-height shifts content upward */
  line-height: 1;
}

.phone-flag-zone:hover:not(:disabled) {
  background: var(--page-bg-2);
}

.phone-flag-zone:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.phone-input-field:focus-within .phone-flag-zone {
  border-right-color: var(--brand);
}

.phone-flag-emoji {
  font-size: 17px;
  /* line-height:1 prevents emoji from riding high due to ascender space */
  line-height: 1;
  display: flex;
  align-items: center;
}

.phone-dial-code {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  /* Prevent implicit margin from shifting text upward */
  margin: 0;
}

.phone-chevron {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.phone-number-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 12px 0 10px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
}

.phone-number-input::placeholder {
  color: var(--input-placeholder);
}

.phone-number-input:disabled {
  cursor: not-allowed;
}

/* Dropdown */
.phone-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 260px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  z-index: 50;
  overflow: hidden;
}

.phone-dropdown-search {
  padding: 8px;
  border-bottom: 1px solid var(--card-border);
}

.phone-dropdown-search input {
  width: 100%;
  height: 30px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: var(--input-bg);
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.phone-dropdown-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-ring);
}

.phone-dropdown-list {
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--card-border) transparent;
}

.phone-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  line-height: 1.3;
}

.phone-dropdown-item:hover {
  background: var(--brand-subtle);
}

.phone-dropdown-item.selected {
  background: var(--brand-subtle);
  color: var(--brand);
  font-weight: 600;
}

.phone-dropdown-name {
  flex: 1;
  text-align: left;
}

.phone-dropdown-code {
  color: var(--text-tertiary);
  font-size: 12.5px;
  flex-shrink: 0;
}

.phone-dropdown-empty {
  padding: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════
   Onboarding shell + Footer
   ═══════════════════════════════════════════════════════════ */

.onboarding-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.onboarding-main {
  flex: 1;
  position: relative;
  z-index: 1;
}
.footer {
  margin-top: auto;
  padding: 24px 24px 28px;
  border-top: 1px solid var(--card-border);
  color: var(--text-tertiary);
  font-size: 13.5px;
  background: transparent;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-tagline {
  color: var(--text-secondary);
  font-weight: 500;
}
.footer-copy {
  color: var(--text-tertiary);
  opacity: 0.7;
}
.footer-links {
  display: flex;
  gap: 22px;
}
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.footer-links a:hover { color: var(--text); }
@media (max-width: 600px) {
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ═══════════════════════════════════════════════════════════
   Canonical primitives — shared class vocabulary
   These class names appear in every app's CSS so any markup can
   use them and look consistent across landing/dashboard/onboarding.
   ═══════════════════════════════════════════════════════════ */

/* .btn-md / .btn-lg / .btn-secondary / .btn-danger: defined in canonical .btn block above. */

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.card-elev {
  transition: box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-spring);
}
.card-elev:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.input, .select {
  width: 100%;
  height: 36px;
  box-sizing: border-box;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: var(--ring-brand);
}
.input::placeholder, .textarea::placeholder { color: var(--input-placeholder); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 14, 12, 0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  max-width: 480px;
  width: 100%;
  padding: 28px;
}

/* ═══════════════════════════════════════════════════════════
   Onboarding watermark layer
   Page-level constellation marks behind every step.
   ═══════════════════════════════════════════════════════════ */
.onboarding-watermarks {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  animation: watermark-fade-in 0.7s var(--ease-out) both;
}

@keyframes watermark-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.onboarding-watermark {
  position: absolute;
  pointer-events: none;
  display: block;
  color: var(--brand);
}
.onboarding-watermark svg { width: 100%; height: 100%; display: block; }
.onboarding-watermark svg line { stroke: currentColor; }
.onboarding-watermark svg circle:not(:last-of-type) { fill: currentColor; }

@media (max-width: 640px) {
  .onboarding-watermarks { display: none; }
}

/* /demo page: subtle indigo bleed echoing the landing-hero light-tint, plus a
   roomier success-hero. The watermarks render larger via OnboardingWatermarks
   variant="demo". Scoped to .onboarding-shell-demo so other onboarding pages
   (signup, step1-4, compliance) are unaffected. */
.onboarding-shell-demo { position: relative; }
.onboarding-shell-demo::before {
  content: "";
  position: fixed;
  inset: 0 0 0 auto;
  width: 60%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(106deg, rgba(255,255,255,0) 38%, rgba(79,70,229,0.06) 72%, rgba(79,70,229,0.085) 100%);
  -webkit-mask: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
          mask: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
}
.onboarding-shell-demo .success-hero {
  max-width: 1140px;
}
.onboarding-shell-demo .success-hero-grid {
  gap: 80px;
}
.onboarding-shell-demo .success-hero-left {
  gap: 28px;
}
.onboarding-shell-demo .success-hero-left-bottom {
  gap: 26px;
}
.onboarding-shell-demo .success-hero-title {
  margin-bottom: 18px;
}
.onboarding-shell-demo .success-hero-subtitle {
  margin-top: 4px;
}
.onboarding-shell-demo .success-hero-proof {
  padding-top: 28px;
}
@media (max-width: 920px) {
  .onboarding-shell-demo .success-hero-grid { gap: 32px; }
  .onboarding-shell-demo::before { width: 100%; opacity: .55; }
}

/* ═══════════════════════════════════════════════════════════
   Step 4 — Success Hero
   Two-column hero (content left, widget right). Widget preserved
   at its existing 380x580. Stacks on narrow viewports with the
   widget moved above the heading.
   ═══════════════════════════════════════════════════════════ */
.success-hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  position: relative;
  z-index: 1;
}
/* Panel is intentionally chrome-less so the page watermarks remain
   visible behind the hero. Cohesion comes from a balanced two-column
   composition with the wordmark anchoring the left side. */
.success-hero-panel {
  position: relative;
  padding: 0;
}
.success-hero-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 56px;
  align-items: center;
}
.success-hero-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.success-hero-wordmark {
  display: inline-flex;
  align-items: center;
  opacity: 0.92;
}
.success-hero-left-top { min-width: 0; }
.success-hero-left-bottom {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.success-hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.success-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--brand);
  margin-bottom: 14px;
}
.success-hero-title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--text);
  margin: 0 0 14px;
}
.success-hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 520px;
  margin: 0;
}
.success-hero-subtitle strong {
  color: var(--text);
  font-weight: 600;
}
.success-hero-cta-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: wrap;
}

/* Builder-proof strip — shown on the /demo landing under the CTAs.
   Chrome-less (rule + text + marks only) so the page watermarks stay visible. */
.success-hero-proof {
  border-top: 1px solid var(--divider);
  padding: 20px 2px 0;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.proof-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--text-tertiary);
}
.proof-logos {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  flex-wrap: wrap;
}
.plogo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 60px;
}
.plogo-icon {
  height: 24px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.plogo-icon svg { height: 23px; width: auto; display: block; }
.plogo-name {
  font-size: 11.5px;
  color: var(--text-tertiary);
  font-weight: 600;
  text-align: center;
}

/* Upgrade strip — only rendered when scrape limit reached.
   Sits inside the success-hero panel; uses a top divider rather than
   its own card chrome so it reads as one section of the panel. */
.upgrade-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--card-border);
  padding: 20px 2px 0;
  max-width: 560px;
}
.upgrade-strip-mark {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}
.upgrade-strip-text {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}
.upgrade-strip-text strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 2px;
}
.upgrade-strip-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  font-size: 13.5px;
  white-space: nowrap;
  vertical-align: middle;
  margin-left: 6px;
}
.upgrade-strip-link:hover { text-decoration: underline; }


@media (max-width: 920px) {
  .success-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }
  .success-hero-left { gap: 22px; align-items: center; }
  .success-hero-wordmark { justify-content: center; }
  .success-hero-left-top { max-width: 560px; margin: 0 auto; }
  .success-hero-left-bottom { width: 100%; align-items: center; }
  .success-hero-proof { margin-left: auto; margin-right: auto; align-items: center; }
  .success-hero-proof .proof-logos { justify-content: center; }
  .success-hero-right { order: -1; }
  .success-hero-subtitle { margin-left: auto; margin-right: auto; }
  .success-hero-cta-row { justify-content: center; }
  .upgrade-strip {
    margin-left: auto;
    margin-right: auto;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .success-hero { padding: 4px 16px 40px; }
  .success-hero-title { font-size: 32px; }
}

@media (max-width: 480px) {
  .success-hero-title { font-size: 28px; }
  .success-hero-subtitle { font-size: 16px; }
  .success-hero-cta-row { width: 100%; flex-direction: column; }
  .success-hero-cta-row .btn { width: 100%; justify-content: center; }
}

/* Hosted chat page styles moved to packages/ui/css/hosted-page.css */

/* COPPA gate + terms checkbox */
.coppa-question { padding: 0 0 8px; }
.coppa-question p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.coppa-actions { display: flex; gap: 10px; }
.coppa-actions .btn { flex: 1; padding: 10px 0; font-size: 14px; font-weight: 600; border: 1px solid var(--card-border); border-radius: var(--radius); cursor: pointer; background: var(--brand); color: #fff; }
.coppa-actions .btn-secondary { background: #fff; color: var(--text-secondary); }
.terms-notice { font-size: 11.5px; color: var(--text-secondary); line-height: 1.4; text-align: center; padding: 8px 0 0; margin: 0; }
.terms-notice a { color: var(--brand); text-decoration: none; }
.terms-notice a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   COPPA gate + blocked screens
   Shared panel card with watermarks visible behind it.
   ═══════════════════════════════════════════════════════════ */

/* Centering shell — full-height, lets watermarks show around card */
.coppa-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 24px 16px;
  position: relative;
  z-index: 1;
}

/* The card itself */
.coppa-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.07), 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 36px 40px;
  max-width: 440px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (max-width: 480px) {
  .coppa-panel { padding: 28px 24px; border-radius: 14px; }
}

.coppa-wordmark {
  margin-bottom: 28px;
}

.coppa-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 14px;
}

.coppa-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 24px;
}
.coppa-subtitle a { color: var(--brand); text-decoration: none; }
.coppa-subtitle a:hover { text-decoration: underline; }

/* Stacked full-width action buttons */
.coppa-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.coppa-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  background: var(--brand);
  color: var(--text-on-brand);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.coppa-btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }

.coppa-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.coppa-btn-secondary:hover {
  border-color: var(--input-border);
  color: var(--text);
  background: var(--page-bg-2);
}

/* Terms/privacy link row (blocked screen) */
.coppa-links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 28px;
}
.coppa-links a { color: var(--text-secondary); text-decoration: none; }
.coppa-links a:hover { color: var(--brand); text-decoration: underline; }
.coppa-sep {
  width: 1px;
  height: 12px;
  background: var(--card-border);
  flex-shrink: 0;
}

/* Small footnote (gate screen) */
.coppa-notice {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.55;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   Compliance step (step 0 — runs before Step 1 for each new
   business; captures vertical + warranty acceptance via the
   conspicuous byline below the form)
   ═══════════════════════════════════════════════════════════ */

/* Branded dropdown — matches dashboard's .custom-dropdown */
.custom-dropdown {
  position: relative;
  width: 100%;
}
.custom-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
  gap: 8px;
  min-height: 42px;
}
.custom-dropdown-trigger:hover { border-color: var(--brand); }
.custom-dropdown-trigger:focus,
.custom-dropdown.open .custom-dropdown-trigger {
  border-color: var(--input-focus);
  box-shadow: var(--ring-brand);
  outline: none;
}
.custom-dropdown-trigger .dd-label {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-dropdown-trigger .dd-label.dd-placeholder { color: var(--text-tertiary); }
.custom-dropdown-trigger .dd-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  transition: transform var(--dur-fast) ease;
  flex-shrink: 0;
}
.custom-dropdown.open .dd-chevron { transform: rotate(180deg); }
.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--card-bg, #fff);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--card-shadow, 0 8px 24px rgba(15, 23, 42, 0.08));
  z-index: 50;
  padding: 4px;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
  max-height: 320px;
  overflow-y: auto;
}
.custom-dropdown.open .custom-dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.custom-dropdown-search {
  position: sticky;
  top: -4px;
  margin: -4px -4px 4px;
  padding: 8px;
  background: var(--card-bg, #fff);
  border-bottom: 1px solid var(--card-border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  z-index: 1;
}
.custom-dropdown-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--page-bg, #fff);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  outline: none;
}
.custom-dropdown-search-input:focus { border-color: var(--brand); }
.custom-dropdown-search-input::placeholder { color: var(--text-tertiary); }
.custom-dropdown-empty {
  padding: 16px 10px;
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary);
}
.custom-dropdown-group + .custom-dropdown-group { margin-top: 4px; }
.custom-dropdown-group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 8px 10px 4px;
}
.custom-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s ease;
}
.custom-dropdown-item > span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-dropdown-item:hover { background: var(--brand-subtle); }
.custom-dropdown-item.selected {
  background: var(--brand-subtle);
  font-weight: 600;
}
.custom-dropdown-item .dd-check {
  width: 14px;
  height: 14px;
  color: var(--brand);
  flex-shrink: 0;
}
.compliance-warranties {
  margin: 22px 0 0;
  border-top: 1px solid var(--card-border);
}
.compliance-warranties-lead {
  margin: 0;
  padding: 12px 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--card-border);
}
.compliance-warranties-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.compliance-warranties-list li {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  padding: 12px 2px;
  border-bottom: 1px solid var(--card-border);
}
.compliance-warranties-terms a {
  color: var(--brand);
  text-decoration: none;
}
.compliance-warranties-terms a:hover { text-decoration: underline; }
