/* Habby KY applicant pages (welcome + complete) — Habby brand palette */
:root {
  --hb-black: #050607;
  --hb-coal: #0b0f12;
  --hb-panel: #10151a;
  --hb-panel-2: #151a20;
  --hb-soft: #12171c;
  --hb-line: rgba(226, 238, 243, 0.14);
  --hb-line-soft: rgba(226, 238, 243, 0.08);
  --hb-ink: #f4f7f8;
  --hb-muted: #a7b1b8;
  --hb-quiet: #6f7c83;
  --hb-teal: #5860e8;
  --hb-teal-soft: rgba(88, 96, 232, 0.14);
  --hb-teal-border: rgba(88, 96, 232, 0.34);
  --hb-brand: #5860e8;
  --hb-brand-soft: rgba(88, 96, 232, 0.16);
  --hb-red: #d8534a;
  --hb-green: #7c84f0;
  --hb-amber: #c6a969;
  --ssc-bg: var(--hb-black);
  --ssc-panel: var(--hb-panel);
  --ssc-panel-2: var(--hb-panel-2);
  --ssc-soft: var(--hb-soft);
  --ssc-line: var(--hb-line);
  --ssc-line-soft: var(--hb-line-soft);
  --ssc-text: var(--hb-ink);
  --ssc-muted: var(--hb-muted);
  --ssc-faint: var(--hb-quiet);
  --ssc-teal: var(--hb-teal);
  --ssc-purple: var(--hb-brand);
  --ssc-blue: var(--hb-brand);
  --ssc-green: var(--hb-green);
  --ssc-red: var(--hb-red);
  --ssc-amber: var(--hb-amber);
  --vq-bg: var(--hb-black);
  --vq-bg-0: var(--hb-black);
  --vq-bg-1: var(--hb-coal);
  --vq-bg-soft: var(--hb-soft);
  --vq-card: var(--hb-panel);
  --vq-card-border: var(--hb-line);
  --vq-text: var(--hb-ink);
  --vq-muted: var(--hb-muted);
  --vq-line: var(--hb-line);
  --vq-teal: var(--hb-teal);
  --vq-teal-soft: var(--hb-teal-soft);
  --vq-teal-border: var(--hb-teal-border);
  --vq-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  --vq-radius-xl: 14px;
  --vq-radius-lg: 12px;
  --vq-radius-md: 10px;
  --vq-max: 1100px;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 0 !important;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

body.vq-start-page {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--vq-text);
  background:
    radial-gradient(circle at 78% 0%, rgba(88, 96, 232, 0.14), transparent 30rem),
    radial-gradient(circle at 12% 18%, rgba(245, 246, 243, 0.035), transparent 22rem),
    linear-gradient(180deg, #030405, #050607 48%, #0b0f12);
  -webkit-font-smoothing: antialiased;
}

.vq-start {
  width: min(var(--vq-max), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
  display: grid;
  gap: 20px;
}

.vq-start-hold {
  padding: 10px 14px;
  border-radius: var(--vq-radius-md);
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  color: #fcd34d;
  font-size: 13px;
  line-height: 1.45;
}

.vq-start-hold code {
  font-size: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
}

.vq-start-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.vq-start-brand img {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}

.vq-start-heading {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.vq-start-lead {
  margin: 8px 0 0;
  max-width: 52ch;
  font-size: 14px;
  line-height: 1.55;
  color: var(--vq-muted);
  font-weight: 500;
}

.vq-start-card {
  background: var(--vq-card);
  border: 1px solid var(--vq-card-border);
  border-radius: var(--vq-radius-xl);
  box-shadow: var(--vq-shadow);
  overflow: hidden;
}

.vq-start-card-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 42%);
  gap: 0;
  align-items: stretch;
  min-height: 640px;
}

.vq-start-main {
  padding: clamp(20px, 3vw, 28px);
  display: grid;
  gap: 22px;
  align-content: start;
}

.vq-start-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.vq-start-meta-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--vq-card-border);
  background: var(--ssc-soft);
  min-width: 0;
}

.vq-start-meta-item.full {
  grid-column: 1 / -1;
}

.vq-start-meta-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vq-muted);
}

.vq-start-meta-value {
  font-size: 14px;
  font-weight: 650;
  color: var(--vq-text);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vq-start-meta-value.name {
  text-transform: capitalize;
}

.vq-start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vq-start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.vq-start-btn:active {
  transform: scale(0.98);
}

.vq-start-btn-primary {
  flex: 1 1 200px;
  color: #050607;
  background: linear-gradient(180deg, #f8fafc, #e8eef2);
  border: 1px solid rgba(226, 238, 243, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.vq-start-btn-primary:hover {
  background: linear-gradient(180deg, #ffffff, #f1f5f8);
  border-color: #ffffff;
}

.vq-start-btn-primary svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.vq-start-btn-secondary {
  flex: 0 1 auto;
  color: var(--hb-ink);
  background: transparent;
  border: 1px solid var(--hb-line);
}

.vq-start-btn-secondary:hover {
  background: rgba(88, 96, 232, 0.08);
  border-color: var(--hb-teal-border);
}

.vq-start-footnote {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--vq-muted);
}

.vq-start-footnote strong {
  color: #cbd5e1;
  font-weight: 650;
}

.vq-start-tips {
  display: grid;
  gap: 12px;
}

.vq-start-tips-intro {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(226, 238, 243, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--vq-text);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}

.vq-start-tips-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--vq-text);
}

.vq-start-tips-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.vq-start-tips-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--vq-card-border);
  background: rgba(255, 255, 255, 0.02);
}

.vq-start-tips-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(226, 238, 243, 0.16);
  display: grid;
  place-items: center;
  color: #d9e1e6;
}

.vq-start-tips-icon svg {
  width: 18px;
  height: 18px;
}

.vq-start-tips-body strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--vq-text);
  margin-bottom: 3px;
}

.vq-start-tips-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--vq-muted);
  font-weight: 500;
}

/* Premium device showcase */
.vq-start-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  min-height: 640px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(88, 96, 232, 0.1), transparent 55%),
    linear-gradient(180deg, rgba(16, 21, 26, 0.7), rgba(5, 6, 7, 0.96));
  border-left: 1px solid var(--vq-card-border);
}

.vq-start-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at 50% 45%, black 20%, transparent 72%);
  pointer-events: none;
}

.vq-device-glow {
  position: absolute;
  width: 300px;
  height: 568px;
  border-radius: 56px;
  background: radial-gradient(circle, rgba(88, 96, 232, 0.22) 0%, transparent 70%);
  filter: blur(32px);
  pointer-events: none;
}

.vq-device {
  position: relative;
  z-index: 1;
  width: 300px;
  padding: 14px;
  border-radius: 54px;
  background: linear-gradient(155deg, #4a5568 0%, #2d3748 35%, #1a202c 70%, #0b0f12 100%);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -2px 8px rgba(0, 0, 0, 0.35);
}

.vq-device::before,
.vq-device::after {
  content: "";
  position: absolute;
  left: -3px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #64748b, #334155);
}

.vq-device::before { top: 120px; height: 48px; }
.vq-device::after { top: 182px; height: 72px; opacity: 0.7; }

.vq-device-screen {
  position: relative;
  height: 568px;
  border-radius: 44px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(88, 96, 232, 0.1), transparent 48%),
    linear-gradient(180deg, #fcfdff 0%, #f4f8fc 52%, #eef3f9 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.vq-device-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 28px;
  border-radius: 999px;
  background: #1e293b;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  z-index: 8;
}

.vq-device-island::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #64748b, #334155);
}

.vq-device-rail {
  position: absolute;
  top: 58px;
  left: 16px;
  right: 16px;
  z-index: 6;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.vq-device-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #64748b;
}

.vq-device-rail-head strong {
  color: #5860e8;
  font-weight: 800;
}

.vq-device-rail-track {
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.vq-device-rail-fill {
  height: 100%;
  width: 66%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5860e8, #8b92f5);
  box-shadow: 0 0 8px rgba(88, 96, 232, 0.25);
  position: relative;
  overflow: hidden;
}

.vq-device-rail-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: vq-rail-shimmer 2.8s ease-in-out infinite;
}

.vq-device-rail-dots {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 1px;
}

.vq-device-rail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
}

.vq-device-rail-dot.done {
  background: #5860e8;
}

.vq-device-rail-dot.active {
  background: #5860e8;
  box-shadow: 0 0 0 3px rgba(88, 96, 232, 0.2);
}

.vq-device-camera {
  position: absolute;
  inset: 158px 0 118px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.vq-device-camera-glow {
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 96, 232, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.vq-device-portrait {
  position: relative;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: linear-gradient(165deg, #fde8d8 0%, #f5cbb8 100%);
  box-shadow:
    0 8px 24px rgba(15, 23, 42, 0.08),
    inset 0 -3px 8px rgba(180, 120, 90, 0.12);
  z-index: 2;
}

.vq-device-portrait::before {
  content: "";
  position: absolute;
  width: 76px;
  height: 38px;
  border-radius: 999px 999px 16px 16px;
  background: linear-gradient(180deg, #a67c5b, #8b6248);
  left: 24px;
  top: 22px;
  opacity: 0.85;
}

.vq-device-portrait-eye {
  position: absolute;
  top: 62px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #475569;
  opacity: 0.35;
}

.vq-device-portrait-eye.left { left: 40px; }
.vq-device-portrait-eye.right { right: 40px; }

.vq-device-portrait-smile {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  width: 28px;
  height: 12px;
  border-bottom: 2px solid rgba(71, 85, 105, 0.25);
  border-radius: 0 0 22px 22px;
}

.vq-device-scan {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 198px;
  height: 198px;
  display: grid;
  place-items: center;
  z-index: 3;
}

.vq-device-scan-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(88, 96, 232, 0.45);
  animation: vq-scan-pulse 2.6s ease-in-out infinite;
}

.vq-device-scan-ring.outer {
  inset: -10px;
  border-color: rgba(88, 96, 232, 0.15);
  animation-delay: 0.5s;
}

.vq-device-scan-line {
  position: absolute;
  left: 14%;
  right: 14%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(88, 96, 232, 0.65), transparent);
  box-shadow: 0 0 10px rgba(88, 96, 232, 0.35);
  animation: vq-scan-line 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 5;
}

.vq-device-hud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  padding: 14px 16px 20px;
  text-align: center;
}

.vq-device-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(88, 96, 232, 0.1);
  border: 1px solid rgba(88, 96, 232, 0.22);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5860e8;
  margin-bottom: 6px;
}

.vq-device-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5860e8;
  box-shadow: 0 0 6px rgba(88, 96, 232, 0.45);
  animation: vq-badge-pulse 2s ease-in-out infinite;
}

.vq-device-hint {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.vq-device-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.vq-device-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.92);
  color: #64748b;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.vq-device-chip.done {
  border-color: rgba(88, 96, 232, 0.25);
  color: #5860e8;
}

.vq-device-chip.active {
  border-color: rgba(88, 96, 232, 0.3);
  color: #5860e8;
}

.vq-device-chip-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 8px;
  line-height: 1;
}

.vq-device-chip.done .vq-device-chip-icon {
  background: #5860e8;
  color: white;
}

.vq-device-chip.active .vq-device-chip-icon {
  background: rgba(88, 96, 232, 0.15);
  border: 1.5px solid rgba(88, 96, 232, 0.35);
  border-top-color: #5860e8;
  animation: vq-spin 1.1s linear infinite;
}

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

@keyframes vq-scan-pulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.03); opacity: 0.9; }
}

@keyframes vq-scan-line {
  0%, 100% { top: 20%; opacity: 0; }
  15% { opacity: 0.85; }
  50% { top: 75%; opacity: 0.85; }
  85% { opacity: 0; }
}

@keyframes vq-rail-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

@keyframes vq-badge-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.92); }
}

.vq-start-footer {
  display: grid;
  gap: 14px;
  text-align: center;
}

.vq-start-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--vq-muted);
}

.vq-start-trust svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.vq-start-legal {
  font-size: 10px;
  line-height: 1.45;
  color: var(--ssc-faint);
}

.vq-start-legal-line {
  margin: 0;
}

.vq-start-legal-line + .vq-start-legal-line {
  margin-top: 4px;
}

.vq-start-legal-entity {
  color: var(--ssc-muted);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.vq-start-legal-years {
  color: var(--ssc-faint);
  font-size: 9px;
  letter-spacing: 0.04em;
}

#sumsub-websdk-container {
  min-height: min(720px, 80vh);
  padding: 16px;
}

@media (max-width: 768px) {
  .vq-start {
    width: min(var(--vq-max), calc(100% - 20px));
    padding: 16px 0 28px;
    gap: 16px;
  }

  .vq-start-top {
    flex-direction: column-reverse;
    gap: 14px;
  }

  .vq-start-brand img {
    height: 28px;
  }

  .vq-start-lead {
    font-size: 14px;
  }

  .vq-start-card-inner {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .vq-start-visual {
    order: -1;
    min-height: 300px;
    padding: 28px 16px 24px;
    border-left: 0;
    border-bottom: 1px solid var(--vq-card-border);
  }

  .vq-device {
    width: 190px;
    padding: 9px;
    border-radius: 36px;
  }

  .vq-device-screen {
    height: 340px;
    border-radius: 28px;
  }

  .vq-device-glow {
    width: 190px;
    height: 340px;
  }

  .vq-device-scan {
    width: 128px;
    height: 128px;
  }

  .vq-device-portrait {
    width: 78px;
    height: 78px;
  }

  .vq-device-portrait::before {
    width: 48px;
    height: 24px;
    left: 15px;
    top: 14px;
  }

  .vq-device-camera {
    inset: 108px 0 82px;
  }

  .vq-device-rail {
    top: 40px;
    padding: 8px 10px;
  }

  .vq-start-main {
    padding: 18px 16px 20px;
    gap: 18px;
  }

  .vq-start-meta {
    grid-template-columns: 1fr;
  }

  .vq-start-meta-item.full {
    grid-column: auto;
  }

  .vq-start-actions {
    flex-direction: column;
  }

  .vq-start-btn {
    width: 100%;
    min-height: 46px;
  }

  .vq-start-btn-primary {
    flex: none;
  }
}

/* Completion / redirect-after-Sumsub page */
.vq-device-rail-fill-full {
  width: 100%;
}

.vq-device-camera-complete {
  inset: 168px 0 128px;
}

.vq-complete-mark {
  position: relative;
  z-index: 2;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #4338ca;
  background:
    radial-gradient(circle at 35% 30%, #ecfdf5 0%, #ccfbf1 55%, #c5c8ff 100%);
  border: 1px solid rgba(88, 96, 232, 0.35);
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.1),
    0 0 0 10px rgba(88, 96, 232, 0.08);
}

.vq-complete-mark svg {
  width: 48px;
  height: 48px;
}

.vq-device-badge-done {
  background: rgba(88, 96, 232, 0.12);
  border-color: rgba(88, 96, 232, 0.28);
  color: #5860e8;
}

.vq-device-badge-done .vq-device-badge-dot {
  background: #5860e8;
  box-shadow: 0 0 6px rgba(88, 96, 232, 0.45);
  animation: none;
}

@media (max-width: 768px) {
  .vq-device-camera-complete {
    inset: 118px 0 90px;
  }

  .vq-complete-mark {
    width: 72px;
    height: 72px;
    box-shadow:
      0 8px 18px rgba(15, 23, 42, 0.1),
      0 0 0 7px rgba(88, 96, 232, 0.08);
  }

  .vq-complete-mark svg {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vq-start-btn { transition: none; }
  .vq-start-btn:active { transform: none; }
  .vq-device-scan-ring,
  .vq-device-scan-line,
  .vq-device-rail-fill::after,
  .vq-device-badge-dot,
  .vq-device-chip.active .vq-device-chip-icon { animation: none; }
}
