/* ============================================================
   1. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Palette */
  --lime: #C8F94F;
  --lime-dim: #BCED4F;
  --black: #0A0A0A;
  --white: #FFFFFF;
  --bg: #F1F1F1;
  --card: #FFFFFF;
  --card-soft: #ECECEC;
  --text: #0A0A0A;
  --text-muted: #8A8A8A;
  --text-dim: #B8B8B8;
  --pill-light: rgba(0, 0, 0, 0.06);
  --pill-dark: rgba(255, 255, 255, 0.18);
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);

  /* Layout */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --pad-x: 18px;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

html, body {
  height: 100%;
  background: #DDD;
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

input, select {
  font: inherit;
}

/* ============================================================
   2. PHONE FRAME (mobile-mock container)
   ============================================================ */
.phone {
  position: relative;
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}

/* ============================================================
   3. SCREENS
   ============================================================ */
.screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 14px var(--pad-x) 120px;
  position: relative;
}

.hidden {
  display: none !important;
}

/* ============================================================
   4. TOP BAR (close / back / menu pills)
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.topbar-right {
  display: flex;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 20px;
  background: var(--pill-light);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s ease;
}

.pill:hover {
  background: rgba(0, 0, 0, 0.1);
}

.pill-icon {
  width: 36px;
  padding: 0;
  justify-content: center;
}

.pill-light { background: var(--pill-light); color: var(--text); }
.pill-dark  { background: var(--pill-dark);  color: var(--white); }

.topbar-on-backdrop .pill-icon {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

.x-icon, .back-icon { font-size: 18px; line-height: 1; }
.chev { font-size: 16px; }
.dots { font-size: 18px; letter-spacing: 1px; }

/* ============================================================
   5. HOME SCREEN
   ============================================================ */
.balance-block {
  position: relative;
  text-align: center;
  padding: 18px 0 14px;
}

.avatar {
  position: absolute;
  left: 8px;
  top: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d8b8a8, #b89888);
}

.balance-label {
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.balance-value {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -1px;
  margin-top: 4px;
}

.balance-cents {
  font-size: 24px;
  color: var(--text-muted);
  font-weight: 500;
}

.chat-bubble {
  position: absolute;
  right: 4px;
  top: 26px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: var(--shadow);
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 18px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--black);
  color: var(--lime);
  font-size: 16px;
  font-weight: 500;
}

.action-icon {
  font-size: 18px;
  font-weight: 600;
}

/* Verify Banner */
.verify-banner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--lime);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
  transition: transform 0.15s ease;
}

.verify-banner:hover { transform: scale(0.99); }
.verify-banner:active { transform: scale(0.97); }

.verify-icon {
  font-size: 32px;
  line-height: 1;
}

.verify-content {
  flex: 1;
  padding-right: 24px;
}

.verify-eyebrow {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.6);
  letter-spacing: 0.4px;
  font-weight: 500;
}

.verify-title {
  font-size: 19px;
  font-weight: 700;
  margin-top: 2px;
}

.verify-sub {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.7);
  margin-top: 2px;
  margin-bottom: 12px;
}

.progress-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.progress-step {
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.18);
}
.progress-step[data-state="filled"] {
  background: var(--black);
}

.verify-progress-text {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.55);
  letter-spacing: 0.5px;
  font-weight: 500;
}

.verify-arrow {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.85);
}

/* Card row */
.card-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.card-tile {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: not-allowed;
  opacity: 0.95;
}

.card-thumb {
  width: 56px;
  height: 36px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.card-thumb-virtual {
  background: linear-gradient(135deg, #C8F94F, #8AC93B);
}
.card-thumb-metal {
  background: linear-gradient(135deg, #2C2C2C, #0A0A0A);
}

.card-name {
  font-size: 16px;
  font-weight: 600;
}

/* Virtual accounts row */
.virtual-account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 10px;
}

.va-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.va-title { font-size: 15px; font-weight: 600; }
.va-sub   { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* Karat row */
.karat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 18px;
}

.karat-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--lime);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.karat-text { flex: 1; }
.karat-title { font-size: 15px; font-weight: 600; }
.karat-sub   { font-size: 13px; color: rgba(255, 255, 255, 0.6); margin-top: 2px; }

.karat-balance        { text-align: right; }
.karat-balance-top    { color: var(--lime); font-size: 14px; font-weight: 600; }
.karat-balance-bottom { color: rgba(255, 255, 255, 0.6); font-size: 12px; margin-top: 2px; }

.transactions-header {
  font-size: 22px;
  font-weight: 700;
  margin-top: 6px;
}

/* ============================================================
   6. SUMSUB INTRO (bottom sheet)
   ============================================================ */
.screen[data-screen="intro"] {
  background: transparent;
  padding-bottom: 0;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(2px);
  z-index: 0;
}

.screen[data-screen="intro"] .topbar {
  position: relative;
  z-index: 2;
}

.sheet {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  padding: 14px 22px 26px;
  text-align: center;
  margin-top: auto;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.15);
  margin: 0 auto 22px;
}

.sheet-emoji { font-size: 64px; line-height: 1; margin-bottom: 14px; }

.sheet-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
}

.sheet-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 18px;
}

.powered-by {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 18px;
}

.sumsub-logo {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
}
.sumsub-logo::before {
  content: "👾 ";
  font-size: 14px;
}

.sheet-info-card {
  background: var(--card-soft);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: center;
  margin-bottom: 22px;
}

.sheet-info-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.sheet-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.sheet-bullets li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--black);
  color: var(--lime);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
}

/* ============================================================
   7. CTA BUTTON
   ============================================================ */
.cta-btn {
  display: block;
  width: 100%;
  height: 58px;
  background: var(--black);
  color: var(--lime);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.cta-btn:not(:disabled):active {
  transform: scale(0.98);
}

.cta-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  color: rgba(200, 249, 79, 0.6);
}

.bottom-cta-bar {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 16px 0 8px;
  background: linear-gradient(to bottom, transparent, var(--bg) 30%);
}

/* ============================================================
   8. LEGAL SCREEN
   ============================================================ */
.legal-emoji {
  font-size: 60px;
  text-align: center;
  margin: 12px 0 10px;
}

.legal-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.legal-sub {
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.45;
  margin: 0 12px 22px;
}

.legal-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 8px 14px;
  margin-bottom: 16px;
}

.legal-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.legal-row:last-child { border-bottom: 0; }

.legal-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 6px;
  background: var(--black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.15s ease;
}

.check-box::after {
  content: "✓";
  color: var(--lime);
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.legal-row input:checked ~ .check-box::after { opacity: 1; }

.legal-row input:focus-visible ~ .check-box {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.legal-text {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
}

.legal-link {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--text);
}

/* ============================================================
   9. STEPS SCREEN
   ============================================================ */
.globe-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.globe-btn {
  background: var(--card);
  box-shadow: var(--shadow);
}

.steps-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 22px;
  flex: 1;
}

.steps-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}

.steps-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.step-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
}

.step-eyebrow {
  font-size: 13px;
  color: var(--text-muted);
}

.step-name {
  font-size: 16px;
  font-weight: 600;
}

.steps-cta-bar {
  text-align: center;
}

.powered-by-bottom {
  margin: 14px 0 0;
  justify-content: center;
  display: flex;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   10. QUESTIONNAIRE
   ============================================================ */
.step-progress-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0 14px;
}

.step-progress-text {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
}

.step-progress-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  border: 1.5px solid rgba(0, 0, 0, 0.18);
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  margin-left: 4px;
}

.q-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.q-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 22px;
  line-height: 1.2;
}

.q-field {
  border: 0;
  margin-bottom: 22px;
}

.q-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.req {
  color: #E25C5C;
  margin-left: 2px;
}

/* Select */
.q-select {
  width: 100%;
  height: 50px;
  padding: 0 36px 0 16px;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
                    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.q-select:invalid { color: var(--text-dim); }

.q-select:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 1px;
}

/* Option card (radio/checkbox lists) */
.option-card {
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: background 0.12s ease;
}
.option-row:last-child { border-bottom: 0; }
.option-row:hover { background: rgba(0, 0, 0, 0.02); }

.option-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-label {
  flex: 1;
  font-size: 15px;
  color: var(--text);
}

.option-mark {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--card-soft);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.option-row input:checked ~ .option-mark {
  background: var(--lime);
  border-color: var(--lime);
}
.option-row input:checked ~ .option-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--black);
}

/* multi-select uses ✓ instead of dot */
.option-row input[type="checkbox"]:checked ~ .option-mark::after {
  content: "✓";
  inset: 0;
  background: transparent;
  color: var(--black);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.option-row input:focus-visible ~ .option-mark {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.q-cta-bar { text-align: center; }

/* ============================================================
   11. SUCCESS SCREEN
   ============================================================ */
.success-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 6px;
}

.success-emoji {
  font-size: 72px;
  margin-bottom: 18px;
}

.success-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
}

.success-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 22px;
}

.success-summary {
  width: 100%;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-align: left;
  margin-bottom: 26px;
  font-size: 14px;
}

.success-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.success-summary-row:last-child { border-bottom: 0; }
.success-summary-row .k { color: var(--text-muted); }
.success-summary-row .v { font-weight: 600; text-align: right; flex: 1; }

.success-wrap .cta-btn { max-width: 320px; }
